Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--VERSION2
-rw-r--r--etc/dependencies/package.json8
-rw-r--r--src/main/webapp/electron.js76
-rw-r--r--src/main/webapp/js/app.min.js1184
-rw-r--r--src/main/webapp/js/diagramly/Editor.js4
-rw-r--r--src/main/webapp/js/diagramly/EditorUi.js45
-rw-r--r--src/main/webapp/js/diagramly/ElectronApp.js24
-rw-r--r--src/main/webapp/js/extensions.min.js39
-rw-r--r--src/main/webapp/js/integrate.min.js2203
-rw-r--r--src/main/webapp/js/mermaid/README.md29
-rw-r--r--src/main/webapp/js/mermaid/mermaid.min.js39
-rw-r--r--src/main/webapp/js/viewer-static.min.js1544
-rw-r--r--src/main/webapp/js/viewer.min.js1544
-rw-r--r--src/main/webapp/mxgraph/mxClient.js2
-rw-r--r--src/main/webapp/service-worker.js2
-rw-r--r--src/main/webapp/service-worker.js.map2
17 files changed, 3333 insertions, 3420 deletions
diff --git a/ChangeLog b/ChangeLog
index 6a553bb1..57eab61b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+03-JUN-2022: 19.0.0
+
+- Removes IE 11 support
+- Updates mermaid.js to 9.1.1
+- Fixes updating existing cells in CSV import [2796]
+
02-JUN-2022: 18.2.1
- Updates JSZip to 3.10.0
diff --git a/VERSION b/VERSION
index 745b4906..2941b819 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-18.2.1 \ No newline at end of file
+19.0.0 \ No newline at end of file
diff --git a/etc/dependencies/package.json b/etc/dependencies/package.json
index ce3d0c3c..955db7eb 100644
--- a/etc/dependencies/package.json
+++ b/etc/dependencies/package.json
@@ -9,9 +9,15 @@
},
"homepage": "https://github.com/jgraph/drawio",
"dependencies": {
- "jsZip": "3.1.3",
+ "jsZip": "3.10.1",
"perfect-freehand": "1.0.16",
"jquery": "3.3.1",
+ "mermaid": "9.1.1",
+ "pako": "2.0.3",
+ "crypto-js": "3.1.2",
+ "dompurify": "2.3.6",
+ "spin.js": "2.0.0",
+ "roughjs": "4.4.1",
"jscolor": "^3.8.0"
}
}
diff --git a/src/main/webapp/electron.js b/src/main/webapp/electron.js
index bdde5ecf..2c87190f 100644
--- a/src/main/webapp/electron.js
+++ b/src/main/webapp/electron.js
@@ -39,6 +39,7 @@ const isWin = process.platform === 'win32'
let enableSpellCheck = store.get('enableSpellCheck');
enableSpellCheck = enableSpellCheck != null? enableSpellCheck : isMac;
let enableStoreBkp = store.get('enableStoreBkp') != null? store.get('enableStoreBkp') : true;
+let dialogOpen = false;
//Read config file
var queryObj = {
@@ -177,43 +178,43 @@ function createWindow (opt = {})
if (contents != null)
{
- contents.executeJavaScript('if(typeof window.__emt_isModified === \'function\'){window.__emt_isModified()}', true)
- .then((isModified) =>
+ ipcMain.once('isModified-result', (evt, data) =>
+ {
+ if (data.isModified)
{
- if (__DEV__)
- {
- console.log('__emt_isModified', isModified)
- }
-
- if (isModified)
- {
- var choice = dialog.showMessageBoxSync(
- win,
- {
- type: 'question',
- buttons: ['Cancel', 'Discard Changes'],
- title: 'Confirm',
- message: 'The document has unsaved changes. Do you really want to quit without saving?' //mxResources.get('allChangesLost')
- })
-
- if (choice === 1)
+ dialog.showMessageBox(
+ win,
{
- //If user chose not to save, remove the draft
- contents.executeJavaScript('window.__emt_removeDraft()', true);
- win.destroy()
- }
- else
+ type: 'question',
+ buttons: ['Cancel', 'Discard Changes'],
+ title: 'Confirm',
+ message: 'The document has unsaved changes. Do you really want to quit without saving?' //mxResources.get('allChangesLost')
+ }).then( async result =>
{
- cmdQPressed = false
- }
- }
- else
- {
- win.destroy()
- }
- })
+ if (result.response === 1)
+ {
+ //If user chose not to save, remove the draft
+ if (data.draftPath != null)
+ {
+ await deleteFile(data.draftPath);
+ }
- event.preventDefault()
+ win.destroy();
+ }
+ else
+ {
+ cmdQPressed = false;
+ }
+ });
+ }
+ else
+ {
+ win.destroy();
+ }
+ });
+
+ contents.send('isModified');
+ event.preventDefault();
}
})
@@ -621,6 +622,9 @@ app.on('ready', e =>
else
{
app.on('second-instance', (event, commandLine, workingDirectory) => {
+ // Creating a new window while a save/open dialog is open crashes the app
+ if (dialogOpen) return;
+
//Create another window
let win = createWindow()
@@ -843,6 +847,8 @@ app.on('will-finish-launching', function()
app.on("open-file", function(event, path)
{
event.preventDefault();
+ // Creating a new window while a save/open dialog is open crashes the app
+ if (dialogOpen) return;
if (firstWinLoaded)
{
@@ -2244,10 +2250,14 @@ ipcMain.on("rendererReq", async (event, args) =>
ret = await checkFileExists(args.pathParts);
break;
case 'showOpenDialog':
+ dialogOpen = true;
ret = await showOpenDialog(args.defaultPath, args.filters, args.properties);
+ dialogOpen = false;
break;
case 'showSaveDialog':
+ dialogOpen = true;
ret = await showSaveDialog(args.defaultPath, args.filters);
+ dialogOpen = false;
break;
case 'installPlugin':
ret = await installPlugin(args.filePath);
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index a3cd31da..83470a43 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -469,7 +469,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.2.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"19.0.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
@@ -11105,12 +11105,12 @@ x&&"svg"==M?window.setTimeout(function(){b.spinner.stop();L(x,M,"data:image/svg+
295,212)},200):b.generatePlantUmlImage(x,M,function(W,J,V){b.spinner.stop();L(x,M,W,J,V)},function(W){b.handleError(W)})}}else if("mermaid"==y)b.spinner.spin(document.body,mxResources.get("inserting"))&&(O=b.editor.graph,b.generateMermaidImage(x,M,function(W,J,V){n=mxEvent.isAltDown(z)?n:O.getCenterInsertPoint(new mxRectangle(0,0,J,V));b.spinner.stop();var U=null;O.getModel().beginUpdate();try{U=O.insertVertex(null,null,null,n.x,n.y,J,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
W+";"),O.setAttributeForCell(U,"mermaidData",JSON.stringify({data:x,config:EditorUi.defaultMermaidConfig},null,2))}finally{O.getModel().endUpdate()}null!=U&&(O.setSelectionCell(U),O.scrollCellToVisible(U))},function(W){b.handleError(W)}));else if("table"==y){y=null;for(var u=[],D=0,B={},C=0;C<A.length;C++){var G=mxUtils.trim(A[C]);if("primary key"==G.substring(0,11).toLowerCase()){var N=G.match(/\((.+)\)/);N&&N[1]&&(B[N[1]]=!0);A.splice(C,1)}else 0<G.toLowerCase().indexOf("primary key")&&(B[G.split(" ")[0]]=
!0,A[C]=mxUtils.trim(G.replace(/primary key/i,"")))}for(C=0;C<A.length;C++)if(G=mxUtils.trim(A[C]),"create table"==G.substring(0,12).toLowerCase())G=mxUtils.trim(G.substring(12)),"("==G.charAt(G.length-1)&&(G=mxUtils.trim(G.substring(0,G.length-1))),y=new mxCell(G,new mxGeometry(D,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),y.vertex=!0,u.push(y),G=b.editor.graph.getPreferredSizeForCell(I),null!=
-G&&(y.geometry.width=G.width+10);else if(null!=y&&")"==G.charAt(0))D+=y.geometry.width+40,y=null;else if("("!=G&&null!=y){G=G.substring(0,","==G.charAt(G.length-1)?G.length-1:G.length);N=B[G.split(" ")[0]];var I=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(N?"1":"0")+";");I.vertex=!0;var E=new mxCell(N?"PK":"",
-new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(N?"fontStyle=1;":""));E.vertex=!0;I.insert(E);G=new mxCell(G,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(N?"fontStyle=5;":""));G.vertex=!0;I.insert(G);G=b.editor.graph.getPreferredSizeForCell(G);null!=G&&y.geometry.width<G.width+30&&(y.geometry.width=Math.min(320,
+G&&(y.geometry.width=G.width+10);else if(null!=y&&")"==G.charAt(0))D+=y.geometry.width+40,y=null;else if("("!=G&&null!=y){G=G.substring(0,","==G.charAt(G.length-1)?G.length-1:G.length);N=B[G.split(" ")[0]];var I=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(N?"1":"0")+";");I.vertex=!0;var F=new mxCell(N?"PK":"",
+new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(N?"fontStyle=1;":""));F.vertex=!0;I.insert(F);G=new mxCell(G,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(N?"fontStyle=5;":""));G.vertex=!0;I.insert(G);G=b.editor.graph.getPreferredSizeForCell(G);null!=G&&y.geometry.width<G.width+30&&(y.geometry.width=Math.min(320,
Math.max(y.geometry.width,G.width+30)));y.insert(I,N?0:null);y.geometry.height+=30}0<u.length&&(O=b.editor.graph,n=mxEvent.isAltDown(z)?n:O.getCenterInsertPoint(O.getBoundingBoxFromGeometry(u,!0)),O.setSelectionCells(O.importCells(u,n.x,n.y)),O.scrollCellToVisible(O.getSelectionCell()))}else if("list"==y){if(0<A.length){O=b.editor.graph;I=null;u=[];for(C=y=0;C<A.length;C++)";"!=A[C].charAt(0)&&(0==A[C].length?I=null:null==I?(I=new mxCell(A[C],new mxGeometry(y,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
I.vertex=!0,u.push(I),G=O.getPreferredSizeForCell(I),null!=G&&I.geometry.width<G.width+10&&(I.geometry.width=G.width+10),y+=I.geometry.width+40):"--"==A[C]?(G=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),G.vertex=!0,I.geometry.height+=G.geometry.height,I.insert(G)):0<A[C].length&&(D=new mxCell(A[C],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
D.vertex=!0,G=O.getPreferredSizeForCell(D),null!=G&&D.geometry.width<G.width&&(D.geometry.width=G.width),I.geometry.width=Math.max(I.geometry.width,D.geometry.width),I.geometry.height+=D.geometry.height,I.insert(D)));if(0<u.length){n=mxEvent.isAltDown(z)?n:O.getCenterInsertPoint(O.getBoundingBoxFromGeometry(u,!0));O.getModel().beginUpdate();try{u=O.importCells(u,n.x,n.y);G=[];for(C=0;C<u.length;C++)G.push(u[C]),G=G.concat(u[C].children);O.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{O.getModel().endUpdate()}O.setSelectionCells(u);
-O.scrollCellToVisible(O.getSelectionCell())}}}else{I=function(W){var J=H[W];null==J&&(J=new mxCell(W,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),J.vertex=!0,H[W]=J,u.push(J));return J};var H={};u=[];for(C=0;C<A.length;C++)if(";"!=A[C].charAt(0)){var R=A[C].split("->");2<=R.length&&(N=I(R[0]),E=I(R[R.length-1]),R=new mxCell(2<R.length?R[1]:"",new mxGeometry),R.edge=!0,N.insertEdge(R,!0),E.insertEdge(R,!1),u.push(R))}if(0<u.length){A=document.createElement("div");A.style.visibility="hidden";
+O.scrollCellToVisible(O.getSelectionCell())}}}else{I=function(W){var J=H[W];null==J&&(J=new mxCell(W,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),J.vertex=!0,H[W]=J,u.push(J));return J};var H={};u=[];for(C=0;C<A.length;C++)if(";"!=A[C].charAt(0)){var R=A[C].split("->");2<=R.length&&(N=I(R[0]),F=I(R[R.length-1]),R=new mxCell(2<R.length?R[1]:"",new mxGeometry),R.edge=!0,N.insertEdge(R,!0),F.insertEdge(R,!1),u.push(R))}if(0<u.length){A=document.createElement("div");A.style.visibility="hidden";
document.body.appendChild(A);O=new Graph(A);O.getModel().beginUpdate();try{u=O.importCells(u);for(C=0;C<u.length;C++)O.getModel().isVertex(u[C])&&(G=O.getPreferredSizeForCell(u[C]),u[C].geometry.width=Math.max(u[C].geometry.width,G.width),u[C].geometry.height=Math.max(u[C].geometry.height,G.height));C=!0;"horizontalFlow"==y||"verticalFlow"==y?((new mxHierarchicalLayout(O,"horizontalFlow"==y?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(O.getDefaultParent(),u),C=!1):"circle"==y?
(new mxCircleLayout(O)).execute(O.getDefaultParent()):(D=new mxFastOrganicLayout(O),D.disableEdgeStyle=!1,D.forceConstant=180,D.execute(O.getDefaultParent()));C&&(B=new mxParallelEdgeLayout(O),B.spacing=30,B.execute(O.getDefaultParent()))}finally{O.getModel().endUpdate()}O.clearCellOverlays();G=[];b.editor.graph.getModel().beginUpdate();try{u=O.getModel().getChildren(O.getDefaultParent()),n=mxEvent.isAltDown(z)?n:b.editor.graph.getCenterInsertPoint(O.getBoundingBoxFromGeometry(u,!0)),G=b.editor.graph.importCells(u,
n.x,n.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(G);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());O.destroy();A.parentNode.removeChild(A)}}}function m(){return"list"==d.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==d.value?
@@ -11122,48 +11122,48 @@ l.setAttribute("value","horizontalFlow");mxUtils.write(l,mxResources.get("horizo
"selected");k=document.createElement("option");k.setAttribute("value","plantUmlPng");mxUtils.write(k,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");l=document.createElement("option");l.setAttribute("value","plantUmlTxt");mxUtils.write(l,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==f&&(d.appendChild(g),d.appendChild(k),d.appendChild(l));var q=m();v.value=q;e.appendChild(v);this.init=function(){v.focus()};
Graph.fileSupport&&(v.addEventListener("dragover",function(x){x.stopPropagation();x.preventDefault()},!1),v.addEventListener("drop",function(x){x.stopPropagation();x.preventDefault();if(0<x.dataTransfer.files.length){x=x.dataTransfer.files[0];var y=new FileReader;y.onload=function(z){v.value=z.target.result};y.readAsText(x)}},!1));e.appendChild(d);mxEvent.addListener(d,"change",function(){var x=m();if(0==v.value.length||v.value==q)q=x,v.value=q});b.isOffline()||"mermaid"!=f&&"plantUml"!=f||(g=mxUtils.button(mxResources.get("help"),
function(){b.openLink("mermaid"==f?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),g.className="geBtn",e.appendChild(g));g=mxUtils.button(mxResources.get("close"),function(){v.value==q?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});g.className="geBtn";b.editor.cancelFirst&&e.appendChild(g);k=mxUtils.button(mxResources.get("insert"),function(x){b.hideDialog();c(v.value,d.value,x)});e.appendChild(k);k.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-e.appendChild(g);this.container=e},NewDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y,z,A,L){function O(fa){null!=fa&&(Da=oa=fa?135:140);fa=!0;if(null!=Ka)for(;H<Ka.length&&(fa||0!=mxUtils.mod(H,30));){var ra=Ka[H++];ra=D(ra.url,ra.libs,ra.title,ra.tooltip?ra.tooltip:ra.title,ra.select,ra.imgUrl,ra.info,ra.onClick,ra.preview,ra.noImg,ra.clibs);fa&&ra.click();fa=!1}}function M(){if(Y&&null!=x)f||b.hideDialog(),x(Y,da,E.value);else if(c)f||b.hideDialog(),c(Q,E.value,ca,T);else{var fa=E.value;null!=fa&&
-0<fa.length&&b.pickFolder(b.mode,function(ra){b.createFile(fa,Q,null!=T&&0<T.length?T:null,null,function(){b.hideDialog()},null,ra,null,null!=P&&0<P.length?P:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function u(fa,ra,xa,wa,sa,va,ja){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");W.removeAttribute("disabled");Q=ra;T=xa;P=va;S=fa;Y=wa;ca=ja;da=sa;S.style.backgroundColor=d;S.style.border=g}function D(fa,ra,xa,wa,sa,va,ja,pa,
-ba,ea,na){function la(Ma,Ta){null==Na?(La=Ma,La=/^https?:\/\//.test(La)&&!b.editor.isCorsEnabledForUrl(La)?PROXY_URL+"?url="+encodeURIComponent(La):TEMPLATE_PATH+"/"+La,mxUtils.get(La,mxUtils.bind(this,function(Ua){200<=Ua.getStatus()&&299>=Ua.getStatus()&&(Na=Ua.getText());Ta(Na,La)}))):Ta(Na,La)}function ma(Ma,Ta,Ua){if(null!=Ma&&mxUtils.isAncestorNode(document.body,ia)){Ma=mxUtils.parseXml(Ma);Ma=Editor.parseDiagramNode(Ma.documentElement);var Za=new mxCodec(Ma.ownerDocument),Wa=new mxGraphModel;
-Za.decode(Ma,Wa);Ma=Wa.root.getChildAt(0).children;b.sidebar.createTooltip(ia,Ma,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=xa?mxResources.get(xa,null,xa):null,!0,new mxPoint(Ta,Ua),!0,function(){Ya=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;u(ia,null,null,fa,ja,na)},!0,!1)}}function ta(Ma,Ta){null==fa||Qa||
-b.sidebar.currentElt==ia?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Sa?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Sa.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Sa.naturalWidth+'" height="'+Sa.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",ma(Ta,mxEvent.getClientX(Ma),mxEvent.getClientY(Ma))):(b.sidebar.currentElt=
-ia,Qa=!0,la(fa,function(Ua){Qa&&b.sidebar.currentElt==ia&&ma(Ua,mxEvent.getClientX(Ma),mxEvent.getClientY(Ma));Qa=!1})))}var ia=document.createElement("div");ia.className="geTemplate";ia.style.position="relative";ia.style.height=Da+"px";ia.style.width=oa+"px";var Na=null,La=fa;Editor.isDarkMode()&&(ia.style.filter="invert(100%)");null!=xa?ia.setAttribute("title",mxResources.get(xa,null,xa)):null!=wa&&0<wa.length&&ia.setAttribute("title",wa);var Qa=!1,Sa=null;if(null!=va){ia.style.display="inline-flex";
-ia.style.justifyContent="center";ia.style.alignItems="center";sa=document.createElement("img");sa.setAttribute("src",va);sa.setAttribute("alt",wa);sa.style.maxWidth=Da+"px";sa.style.maxHeight=oa+"px";Sa=sa;var Ia=va.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");ia.appendChild(sa);sa.onerror=function(){this.src!=Ia?this.src=Ia:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(ia,mxUtils.bind(this,function(Ma){u(ia,null,null,fa,ja,na)}),null,null);mxEvent.addListener(ia,
-"dblclick",function(Ma){M();mxEvent.consume(Ma)})}else if(!ea&&null!=fa&&0<fa.length){var Ja=function(Ma){W.setAttribute("disabled","disabled");ia.style.backgroundColor="transparent";ia.style.border="1px solid transparent";R.spin(Z);la(fa,function(Ta,Ua){R.stop();null!=Ta&&(u(ia,Ta,ra,null,null,na,Ua),Ma&&M())})};sa=ba||TEMPLATE_PATH+"/"+fa.substring(0,fa.length-4)+".png";ia.style.backgroundImage="url("+sa+")";ia.style.backgroundPosition="center center";ia.style.backgroundRepeat="no-repeat";if(null!=
-xa){wa=document.createElement("table");wa.setAttribute("width","100%");wa.setAttribute("height","100%");wa.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";wa.style.lineHeight="1.3em";wa.style.border="inherit";va=document.createElement("tbody");ba=document.createElement("tr");ea=document.createElement("td");ea.setAttribute("align","center");ea.setAttribute("valign","middle");var Pa=document.createElement("span");Pa.style.display="inline-block";Pa.style.padding="4px 8px 4px 8px";
-Pa.style.userSelect="none";Pa.style.borderRadius="3px";Pa.style.background="rgba(255,255,255,0.85)";Pa.style.overflow="hidden";Pa.style.textOverflow="ellipsis";Pa.style.maxWidth=Da-34+"px";mxUtils.write(Pa,mxResources.get(xa,null,xa));ea.appendChild(Pa);ba.appendChild(ea);va.appendChild(ba);wa.appendChild(va);ia.appendChild(wa)}mxEvent.addGestureListeners(ia,mxUtils.bind(this,function(Ma){Ja()}),null,null);mxEvent.addListener(ia,"dblclick",function(Ma){Ja(!0);mxEvent.consume(Ma)})}else wa=document.createElement("table"),
-wa.setAttribute("width","100%"),wa.setAttribute("height","100%"),wa.style.lineHeight="1.3em",va=document.createElement("tbody"),ba=document.createElement("tr"),ea=document.createElement("td"),ea.setAttribute("align","center"),ea.setAttribute("valign","middle"),Pa=document.createElement("span"),Pa.style.display="inline-block",Pa.style.padding="4px 8px 4px 8px",Pa.style.userSelect="none",Pa.style.borderRadius="3px",Pa.style.background="#ffffff",Pa.style.overflow="hidden",Pa.style.textOverflow="ellipsis",
-Pa.style.maxWidth=Da-34+"px",mxUtils.write(Pa,mxResources.get(xa,null,xa)),ea.appendChild(Pa),ba.appendChild(ea),va.appendChild(ba),wa.appendChild(va),ia.appendChild(wa),sa&&u(ia),mxEvent.addGestureListeners(ia,mxUtils.bind(this,function(Ma){u(ia,null,null,fa,ja)}),null,null),null!=pa?mxEvent.addListener(ia,"click",pa):(mxEvent.addListener(ia,"click",function(Ma){u(ia,null,null,fa,ja)}),mxEvent.addListener(ia,"dblclick",function(Ma){M();mxEvent.consume(Ma)}));if(null!=fa){var Ra=document.createElement("img");
-Ra.setAttribute("src",Sidebar.prototype.searchImage);Ra.setAttribute("title",mxResources.get("preview"));Ra.className="geActiveButton";Ra.style.position="absolute";Ra.style.cursor="default";Ra.style.padding="8px";Ra.style.right="0px";Ra.style.top="0px";ia.appendChild(Ra);var Ya=!1;mxEvent.addGestureListeners(Ra,mxUtils.bind(this,function(Ma){Ya=b.sidebar.currentElt==ia}),null,null);mxEvent.addListener(Ra,"click",mxUtils.bind(this,function(Ma){Ya||ta(Ma,Ra);mxEvent.consume(Ma)}))}Z.appendChild(ia);
-return ia}function B(){function fa(ta,ia){var Na=mxResources.get(ta);null==Na&&(Na=ta.substring(0,1).toUpperCase()+ta.substring(1));18<Na.length&&(Na=Na.substring(0,18)+"&hellip;");return Na+" ("+ia.length+")"}function ra(ta,ia,Na){mxEvent.addListener(ia,"click",function(){Fa!=ia&&(Fa.style.backgroundColor="",Fa=ia,Fa.style.backgroundColor=v,Z.scrollTop=0,Z.innerHTML="",H=0,Ka=Na?Aa[ta][Na]:Ba[ta],V=null,O(!1))})}Ga&&(Ga=!1,mxEvent.addListener(Z,"scroll",function(ta){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&&
-(O(),mxEvent.consume(ta))}));if(0<Oa){var xa=document.createElement("div");xa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(xa,mxResources.get("custom"));Ca.appendChild(xa);for(var wa in Ha){var sa=document.createElement("div"),va=wa;xa=Ha[wa];18<va.length&&(va=va.substring(0,18)+"&hellip;");sa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
-sa.setAttribute("title",va+" ("+xa.length+")");mxUtils.write(sa,sa.getAttribute("title"));null!=k&&(sa.style.padding=k);Ca.appendChild(sa);(function(ta,ia){mxEvent.addListener(sa,"click",function(){Fa!=ia&&(Fa.style.backgroundColor="",Fa=ia,Fa.style.backgroundColor=v,Z.scrollTop=0,Z.innerHTML="",H=0,Ka=Ha[ta],V=null,O(!1))})})(wa,sa)}xa=document.createElement("div");xa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(xa,"draw.io");Ca.appendChild(xa)}for(wa in Ba){va=
-Aa[wa];var ja=sa=document.createElement(va?"ul":"div");xa=Ba[wa];var pa=fa(wa,xa);if(null!=va){var ba=document.createElement("li"),ea=document.createElement("div");ea.className="geTempTreeCaret";ea.setAttribute("title",pa);mxUtils.write(ea,pa);ja=ea;ba.appendChild(ea);pa=document.createElement("ul");pa.className="geTempTreeNested";pa.style.visibility="hidden";for(var na in va){var la=document.createElement("li"),ma=fa(na,va[na]);la.setAttribute("title",ma);mxUtils.write(la,ma);ra(wa,la,na);pa.appendChild(la)}ba.appendChild(pa);
-sa.className="geTempTree";sa.appendChild(ba);(function(ta,ia){mxEvent.addListener(ia,"click",function(){ta.style.visibility="visible";ta.classList.toggle("geTempTreeActive");ta.classList.toggle("geTempTreeNested")&&setTimeout(function(){ta.style.visibility="hidden"},550);ia.classList.toggle("geTempTreeCaret-down")})})(pa,ea)}else sa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
-sa.setAttribute("title",pa),mxUtils.write(sa,pa);null!=k&&(sa.style.padding=k);Ca.appendChild(sa);null==Fa&&0<xa.length&&(Fa=sa,Fa.style.backgroundColor=v,Ka=xa);ra(wa,ja)}O(!1)}var C=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;m=null!=m?m:!1;v=null!=v?v:"#ebf2f9";d=null!=d?d:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";g=null!=g?g:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";l=null!=l?l:EditorUi.templateFile;var G=document.createElement("div");
+e.appendChild(g);this.container=e},NewDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y,z,A,L){function O(fa){null!=fa&&(Da=Ca=fa?135:140);fa=!0;if(null!=Ma)for(;H<Ma.length&&(fa||0!=mxUtils.mod(H,30));){var sa=Ma[H++];sa=D(sa.url,sa.libs,sa.title,sa.tooltip?sa.tooltip:sa.title,sa.select,sa.imgUrl,sa.info,sa.onClick,sa.preview,sa.noImg,sa.clibs);fa&&sa.click();fa=!1}}function M(){if(Y&&null!=x)f||b.hideDialog(),x(Y,da,F.value);else if(c)f||b.hideDialog(),c(Q,F.value,ba,T);else{var fa=F.value;null!=fa&&
+0<fa.length&&b.pickFolder(b.mode,function(sa){b.createFile(fa,Q,null!=T&&0<T.length?T:null,null,function(){b.hideDialog()},null,sa,null,null!=P&&0<P.length?P:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function u(fa,sa,xa,wa,ua,va,ia){null!=S&&(S.style.backgroundColor="transparent",S.style.border="1px solid transparent");W.removeAttribute("disabled");Q=sa;T=xa;P=va;S=fa;Y=wa;ba=ia;da=ua;S.style.backgroundColor=d;S.style.border=g}function D(fa,sa,xa,wa,ua,va,ia,ra,
+aa,ca,na){function la(Oa,Ta){null==Ja?(La=Oa,La=/^https?:\/\//.test(La)&&!b.editor.isCorsEnabledForUrl(La)?PROXY_URL+"?url="+encodeURIComponent(La):TEMPLATE_PATH+"/"+La,mxUtils.get(La,mxUtils.bind(this,function(Ua){200<=Ua.getStatus()&&299>=Ua.getStatus()&&(Ja=Ua.getText());Ta(Ja,La)}))):Ta(Ja,La)}function qa(Oa,Ta,Ua){if(null!=Oa&&mxUtils.isAncestorNode(document.body,ka)){Oa=mxUtils.parseXml(Oa);Oa=Editor.parseDiagramNode(Oa.documentElement);var Za=new mxCodec(Oa.ownerDocument),Wa=new mxGraphModel;
+Za.decode(Oa,Wa);Oa=Wa.root.getChildAt(0).children;b.sidebar.createTooltip(ka,Oa,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=xa?mxResources.get(xa,null,xa):null,!0,new mxPoint(Ta,Ua),!0,function(){Ya=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;u(ka,null,null,fa,ia,na)},!0,!1)}}function ta(Oa,Ta){null==fa||Sa||
+b.sidebar.currentElt==ka?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ra?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Ra.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Ra.naturalWidth+'" height="'+Ra.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",qa(Ta,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa))):(b.sidebar.currentElt=
+ka,Sa=!0,la(fa,function(Ua){Sa&&b.sidebar.currentElt==ka&&qa(Ua,mxEvent.getClientX(Oa),mxEvent.getClientY(Oa));Sa=!1})))}var ka=document.createElement("div");ka.className="geTemplate";ka.style.position="relative";ka.style.height=Da+"px";ka.style.width=Ca+"px";var Ja=null,La=fa;Editor.isDarkMode()&&(ka.style.filter="invert(100%)");null!=xa?ka.setAttribute("title",mxResources.get(xa,null,xa)):null!=wa&&0<wa.length&&ka.setAttribute("title",wa);var Sa=!1,Ra=null;if(null!=va){ka.style.display="inline-flex";
+ka.style.justifyContent="center";ka.style.alignItems="center";ua=document.createElement("img");ua.setAttribute("src",va);ua.setAttribute("alt",wa);ua.style.maxWidth=Da+"px";ua.style.maxHeight=Ca+"px";Ra=ua;var Ga=va.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");ka.appendChild(ua);ua.onerror=function(){this.src!=Ga?this.src=Ga:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(Oa){u(ka,null,null,fa,ia,na)}),null,null);mxEvent.addListener(ka,
+"dblclick",function(Oa){M();mxEvent.consume(Oa)})}else if(!ca&&null!=fa&&0<fa.length){var Na=function(Oa){W.setAttribute("disabled","disabled");ka.style.backgroundColor="transparent";ka.style.border="1px solid transparent";R.spin(Z);la(fa,function(Ta,Ua){R.stop();null!=Ta&&(u(ka,Ta,sa,null,null,na,Ua),Oa&&M())})};ua=aa||TEMPLATE_PATH+"/"+fa.substring(0,fa.length-4)+".png";ka.style.backgroundImage="url("+ua+")";ka.style.backgroundPosition="center center";ka.style.backgroundRepeat="no-repeat";if(null!=
+xa){wa=document.createElement("table");wa.setAttribute("width","100%");wa.setAttribute("height","100%");wa.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";wa.style.lineHeight="1.3em";wa.style.border="inherit";va=document.createElement("tbody");aa=document.createElement("tr");ca=document.createElement("td");ca.setAttribute("align","center");ca.setAttribute("valign","middle");var Pa=document.createElement("span");Pa.style.display="inline-block";Pa.style.padding="4px 8px 4px 8px";
+Pa.style.userSelect="none";Pa.style.borderRadius="3px";Pa.style.background="rgba(255,255,255,0.85)";Pa.style.overflow="hidden";Pa.style.textOverflow="ellipsis";Pa.style.maxWidth=Da-34+"px";mxUtils.write(Pa,mxResources.get(xa,null,xa));ca.appendChild(Pa);aa.appendChild(ca);va.appendChild(aa);wa.appendChild(va);ka.appendChild(wa)}mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(Oa){Na()}),null,null);mxEvent.addListener(ka,"dblclick",function(Oa){Na(!0);mxEvent.consume(Oa)})}else wa=document.createElement("table"),
+wa.setAttribute("width","100%"),wa.setAttribute("height","100%"),wa.style.lineHeight="1.3em",va=document.createElement("tbody"),aa=document.createElement("tr"),ca=document.createElement("td"),ca.setAttribute("align","center"),ca.setAttribute("valign","middle"),Pa=document.createElement("span"),Pa.style.display="inline-block",Pa.style.padding="4px 8px 4px 8px",Pa.style.userSelect="none",Pa.style.borderRadius="3px",Pa.style.background="#ffffff",Pa.style.overflow="hidden",Pa.style.textOverflow="ellipsis",
+Pa.style.maxWidth=Da-34+"px",mxUtils.write(Pa,mxResources.get(xa,null,xa)),ca.appendChild(Pa),aa.appendChild(ca),va.appendChild(aa),wa.appendChild(va),ka.appendChild(wa),ua&&u(ka),mxEvent.addGestureListeners(ka,mxUtils.bind(this,function(Oa){u(ka,null,null,fa,ia)}),null,null),null!=ra?mxEvent.addListener(ka,"click",ra):(mxEvent.addListener(ka,"click",function(Oa){u(ka,null,null,fa,ia)}),mxEvent.addListener(ka,"dblclick",function(Oa){M();mxEvent.consume(Oa)}));if(null!=fa){var Qa=document.createElement("img");
+Qa.setAttribute("src",Sidebar.prototype.searchImage);Qa.setAttribute("title",mxResources.get("preview"));Qa.className="geActiveButton";Qa.style.position="absolute";Qa.style.cursor="default";Qa.style.padding="8px";Qa.style.right="0px";Qa.style.top="0px";ka.appendChild(Qa);var Ya=!1;mxEvent.addGestureListeners(Qa,mxUtils.bind(this,function(Oa){Ya=b.sidebar.currentElt==ka}),null,null);mxEvent.addListener(Qa,"click",mxUtils.bind(this,function(Oa){Ya||ta(Oa,Qa);mxEvent.consume(Oa)}))}Z.appendChild(ka);
+return ka}function B(){function fa(ta,ka){var Ja=mxResources.get(ta);null==Ja&&(Ja=ta.substring(0,1).toUpperCase()+ta.substring(1));18<Ja.length&&(Ja=Ja.substring(0,18)+"&hellip;");return Ja+" ("+ka.length+")"}function sa(ta,ka,Ja){mxEvent.addListener(ka,"click",function(){Ha!=ka&&(Ha.style.backgroundColor="",Ha=ka,Ha.style.backgroundColor=v,Z.scrollTop=0,Z.innerHTML="",H=0,Ma=Ja?Ba[ta][Ja]:pa[ta],V=null,O(!1))})}Fa&&(Fa=!1,mxEvent.addListener(Z,"scroll",function(ta){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&&
+(O(),mxEvent.consume(ta))}));if(0<Ka){var xa=document.createElement("div");xa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(xa,mxResources.get("custom"));Aa.appendChild(xa);for(var wa in Ea){var ua=document.createElement("div"),va=wa;xa=Ea[wa];18<va.length&&(va=va.substring(0,18)+"&hellip;");ua.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
+ua.setAttribute("title",va+" ("+xa.length+")");mxUtils.write(ua,ua.getAttribute("title"));null!=k&&(ua.style.padding=k);Aa.appendChild(ua);(function(ta,ka){mxEvent.addListener(ua,"click",function(){Ha!=ka&&(Ha.style.backgroundColor="",Ha=ka,Ha.style.backgroundColor=v,Z.scrollTop=0,Z.innerHTML="",H=0,Ma=Ea[ta],V=null,O(!1))})})(wa,ua)}xa=document.createElement("div");xa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(xa,"draw.io");Aa.appendChild(xa)}for(wa in pa){va=
+Ba[wa];var ia=ua=document.createElement(va?"ul":"div");xa=pa[wa];var ra=fa(wa,xa);if(null!=va){var aa=document.createElement("li"),ca=document.createElement("div");ca.className="geTempTreeCaret";ca.setAttribute("title",ra);mxUtils.write(ca,ra);ia=ca;aa.appendChild(ca);ra=document.createElement("ul");ra.className="geTempTreeNested";ra.style.visibility="hidden";for(var na in va){var la=document.createElement("li"),qa=fa(na,va[na]);la.setAttribute("title",qa);mxUtils.write(la,qa);sa(wa,la,na);ra.appendChild(la)}aa.appendChild(ra);
+ua.className="geTempTree";ua.appendChild(aa);(function(ta,ka){mxEvent.addListener(ka,"click",function(){ta.style.visibility="visible";ta.classList.toggle("geTempTreeActive");ta.classList.toggle("geTempTreeNested")&&setTimeout(function(){ta.style.visibility="hidden"},550);ka.classList.toggle("geTempTreeCaret-down")})})(ra,ca)}else ua.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
+ua.setAttribute("title",ra),mxUtils.write(ua,ra);null!=k&&(ua.style.padding=k);Aa.appendChild(ua);null==Ha&&0<xa.length&&(Ha=ua,Ha.style.backgroundColor=v,Ma=xa);sa(wa,ia)}O(!1)}var C=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;m=null!=m?m:!1;v=null!=v?v:"#ebf2f9";d=null!=d?d:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";g=null!=g?g:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";l=null!=l?l:EditorUi.templateFile;var G=document.createElement("div");
G.style.userSelect="none";G.style.height="100%";var N=document.createElement("div");N.style.whiteSpace="nowrap";N.style.height="46px";f&&G.appendChild(N);var I=document.createElement("img");I.setAttribute("border","0");I.setAttribute("align","absmiddle");I.style.width="40px";I.style.height="40px";I.style.marginRight="10px";I.style.paddingBottom="4px";I.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?
IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||C||!f||N.appendChild(I);f&&mxUtils.write(N,(C?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");I=".drawio";
-b.mode==App.MODE_GOOGLE&&null!=b.drive?I=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?I=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?I=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?I=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?I=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(I=b.trello.extension);var E=document.createElement("input");E.setAttribute("value",b.defaultFilename+I);E.style.marginLeft="10px";E.style.width=e||
-C?"144px":"244px";this.init=function(){f&&(E.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?E.select():document.execCommand("selectAll",!1,null));null!=Z.parentNode&&null!=Z.parentNode.parentNode&&mxEvent.addGestureListeners(Z.parentNode.parentNode,mxUtils.bind(this,function(fa){b.sidebar.hideTooltip()}),null,null)};f&&(N.appendChild(E),L?E.style.width=e||C?"350px":"450px":(null!=b.editor.diagramFileTypes&&(L=FilenameDialog.createFileTypes(b,E,b.editor.diagramFileTypes),L.style.marginLeft=
-"6px",L.style.width=e||C?"80px":"180px",N.appendChild(L)),null!=b.editor.fileExtensions&&(C=FilenameDialog.createTypeHint(b,E,b.editor.fileExtensions),C.style.marginTop="12px",N.appendChild(C))));N=!1;var H=0,R=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),W=mxUtils.button(z||mxResources.get("create"),function(){W.setAttribute("disabled","disabled");M();W.removeAttribute("disabled")});W.className="geBtn gePrimaryBtn";
-if(p||q){var J=[],V=null,U=null,X=null,t=function(fa){W.setAttribute("disabled","disabled");for(var ra=0;ra<J.length;ra++)J[ra].className=ra==fa?"geBtn gePrimaryBtn":"geBtn"};N=!0;z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";G.appendChild(z);C=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Ca.style.display="";ha.style.display="";Z.style.left="160px";t(0);Z.scrollTop=0;Z.innerHTML="";H=0;V!=Ka&&(Ka=V,Ba=U,Oa=X,Ca.innerHTML="",B(),V=null)});
-J.push(C);z.appendChild(C);var F=function(fa){Ca.style.display="none";ha.style.display="none";Z.style.left="30px";t(fa?-1:1);null==V&&(V=Ka);Z.scrollTop=0;Z.innerHTML="";R.spin(Z);var ra=function(xa,wa,sa){H=0;R.stop();Ka=xa;sa=sa||{};var va=0,ja;for(ja in sa)va+=sa[ja].length;if(wa)Z.innerHTML=wa;else if(0==xa.length&&0==va)Z.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Z.innerHTML="",0<va){Ca.style.display="";Z.style.left="160px";Ca.innerHTML="";
-Oa=0;Ba={"draw.io":xa};for(ja in sa)Ba[ja]=sa[ja];B()}else O(!0)};fa?q(K.value,ra):p(ra)};p&&(C=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){F()}),z.appendChild(C),J.push(C));if(q){C=document.createElement("span");C.style.marginLeft="10px";C.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");z.appendChild(C);var K=document.createElement("input");K.style.marginRight="10px";K.style.marginLeft="10px";K.style.width="220px";mxEvent.addListener(K,"keypress",function(fa){13==
-fa.keyCode&&F(!0)});z.appendChild(K);C=mxUtils.button(mxResources.get("search"),function(){F(!0)});C.className="geBtn";z.appendChild(C)}t(0)}var T=null,P=null,Q=null,S=null,Y=null,ca=null,da=null,Z=document.createElement("div");Z.style.border="1px solid #d3d3d3";Z.style.position="absolute";Z.style.left="160px";Z.style.right="34px";z=(f?72:40)+(N?30:0);Z.style.top=z+"px";Z.style.bottom="68px";Z.style.margin="6px 0 0 -1px";Z.style.padding="6px";Z.style.overflow="auto";var ha=document.createElement("div");
-ha.style.cssText="position:absolute;left:30px;width:128px;top:"+z+"px;height:22px;margin-top: 6px;white-space: nowrap";var aa=document.createElement("input");aa.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";aa.setAttribute("placeholder",mxResources.get("search"));aa.setAttribute("type","text");ha.appendChild(aa);var ua=document.createElement("img"),ka="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";ua.setAttribute("src",
-ka);ua.setAttribute("title",mxResources.get("search"));ua.style.position="relative";ua.style.left="-18px";ua.style.top="1px";ua.style.background="url('"+b.editor.transparentImage+"')";ha.appendChild(ua);mxEvent.addListener(ua,"click",function(){ua.getAttribute("src")==Dialog.prototype.closeImage&&(ua.setAttribute("src",ka),ua.setAttribute("title",mxResources.get("search")),aa.value="",null!=Ea&&(Ea.click(),Ea=null));aa.focus()});mxEvent.addListener(aa,"keydown",mxUtils.bind(this,function(fa){if(13==
-fa.keyCode){var ra=aa.value;if(""==ra)null!=Ea&&(Ea.click(),Ea=null);else{if(null==NewDialog.tagsList[l]){var xa={};for(na in Ba)for(var wa=Ba[na],sa=0;sa<wa.length;sa++){var va=wa[sa];if(null!=va.tags)for(var ja=va.tags.toLowerCase().split(";"),pa=0;pa<ja.length;pa++)null==xa[ja[pa]]&&(xa[ja[pa]]=[]),xa[ja[pa]].push(va)}NewDialog.tagsList[l]=xa}var ba=ra.toLowerCase().split(" ");xa=NewDialog.tagsList[l];if(0<Oa&&null==xa.__tagsList__){for(na in Ha)for(wa=Ha[na],sa=0;sa<wa.length;sa++)for(va=wa[sa],
-ja=va.title.split(" "),ja.push(na),pa=0;pa<ja.length;pa++){var ea=ja[pa].toLowerCase();null==xa[ea]&&(xa[ea]=[]);xa[ea].push(va)}xa.__tagsList__=!0}var na=[];wa={};for(sa=ja=0;sa<ba.length;sa++)if(0<ba[sa].length){ea=xa[ba[sa]];var la={};na=[];if(null!=ea)for(pa=0;pa<ea.length;pa++)va=ea[pa],0==ja==(null==wa[va.url])&&(la[va.url]=!0,na.push(va));wa=la;ja++}Z.scrollTop=0;Z.innerHTML="";H=0;xa=document.createElement("div");xa.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";
-mxUtils.write(xa,mxResources.get(0==na.length?"noResultsFor":"resultsFor",[ra]));Z.appendChild(xa);null!=Fa&&null==Ea&&(Fa.style.backgroundColor="",Ea=Fa,Fa=xa);Ka=na;V=null;O(!1)}mxEvent.consume(fa)}}));mxEvent.addListener(aa,"keyup",mxUtils.bind(this,function(fa){""==aa.value?(ua.setAttribute("src",ka),ua.setAttribute("title",mxResources.get("search"))):(ua.setAttribute("src",Dialog.prototype.closeImage),ua.setAttribute("title",mxResources.get("reset")))}));z+=23;var Ca=document.createElement("div");
-Ca.style.cssText="position:absolute;left:30px;width:128px;top:"+z+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(Z,"scroll",function(){b.sidebar.hideTooltip()});var Da=140,oa=140,Ba={},Aa={},Ha={},Oa=0,Ga=!0,Fa=null,Ea=null;Ba.basic=[{title:"blankDiagram",select:!0}];var Ka=Ba.basic;if(!e){var za=function(){mxUtils.get(qa,function(fa){if(!ya){ya=!0;fa=fa.getXml().documentElement.firstChild;for(var ra={};null!=fa;){if("undefined"!==typeof fa.getAttribute)if("clibs"==
-fa.nodeName){for(var xa=fa.getAttribute("name"),wa=fa.getElementsByTagName("add"),sa=[],va=0;va<wa.length;va++)sa.push(encodeURIComponent(mxUtils.getTextContent(wa[va])));null!=xa&&0<sa.length&&(ra[xa]=sa.join(";"))}else if(sa=fa.getAttribute("url"),null!=sa){wa=fa.getAttribute("section");xa=fa.getAttribute("subsection");if(null==wa&&(va=sa.indexOf("/"),wa=sa.substring(0,va),null==xa)){var ja=sa.indexOf("/",va+1);-1<ja&&(xa=sa.substring(va+1,ja))}va=Ba[wa];null==va&&(va=[],Ba[wa]=va);sa=fa.getAttribute("clibs");
-null!=ra[sa]&&(sa=ra[sa]);sa={url:fa.getAttribute("url"),libs:fa.getAttribute("libs"),title:fa.getAttribute("title"),tooltip:fa.getAttribute("name")||fa.getAttribute("url"),preview:fa.getAttribute("preview"),clibs:sa,tags:fa.getAttribute("tags")};va.push(sa);null!=xa&&(va=Aa[wa],null==va&&(va={},Aa[wa]=va),wa=va[xa],null==wa&&(wa=[],va[xa]=wa),wa.push(sa))}fa=fa.nextSibling}R.stop();B()}})};G.appendChild(ha);G.appendChild(Ca);G.appendChild(Z);var ya=!1,qa=l;/^https?:\/\//.test(qa)&&!b.editor.isCorsEnabledForUrl(qa)&&
-(qa=PROXY_URL+"?url="+encodeURIComponent(qa));R.spin(Z);null!=A?A(function(fa,ra){Ha=fa;X=Oa=ra;za()},za):za();U=Ba}mxEvent.addListener(E,"keypress",function(fa){b.dialog.container.firstChild==G&&13==fa.keyCode&&M()});A=document.createElement("div");A.style.marginTop=e?"4px":"16px";A.style.textAlign="right";A.style.position="absolute";A.style.left="40px";A.style.bottom="24px";A.style.right="40px";e||b.isOffline()||!f||null!=c||m||(z=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
-z.className="geBtn",A.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=n&&n();b.hideDialog(!0)});z.className="geBtn";!b.editor.cancelFirst||m&&null==n||A.appendChild(z);e||"1"==urlParams.embed||m||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var fa=new FilenameDialog(b,"",mxResources.get("create"),function(ra){null!=ra&&0<ra.length&&(ra=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+
-encodeURIComponent(E.value)+"&create="+encodeURIComponent(ra)),null==b.getCurrentFile()?window.location.href=ra:window.openWindow(ra))},mxResources.get("url"));b.showDialog(fa.container,300,80,!0,!0);fa.init()}),e.className="geBtn",A.appendChild(e));Graph.fileSupport&&y&&(y=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var fa=document.createElement("input");fa.setAttribute("multiple","multiple");fa.setAttribute("type","file");mxEvent.addListener(fa,"change",function(ra){b.openFiles(fa.files,
+b.mode==App.MODE_GOOGLE&&null!=b.drive?I=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?I=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?I=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?I=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?I=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(I=b.trello.extension);var F=document.createElement("input");F.setAttribute("value",b.defaultFilename+I);F.style.marginLeft="10px";F.style.width=e||
+C?"144px":"244px";this.init=function(){f&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null));null!=Z.parentNode&&null!=Z.parentNode.parentNode&&mxEvent.addGestureListeners(Z.parentNode.parentNode,mxUtils.bind(this,function(fa){b.sidebar.hideTooltip()}),null,null)};f&&(N.appendChild(F),L?F.style.width=e||C?"350px":"450px":(null!=b.editor.diagramFileTypes&&(L=FilenameDialog.createFileTypes(b,F,b.editor.diagramFileTypes),L.style.marginLeft=
+"6px",L.style.width=e||C?"80px":"180px",N.appendChild(L)),null!=b.editor.fileExtensions&&(C=FilenameDialog.createTypeHint(b,F,b.editor.fileExtensions),C.style.marginTop="12px",N.appendChild(C))));N=!1;var H=0,R=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),W=mxUtils.button(z||mxResources.get("create"),function(){W.setAttribute("disabled","disabled");M();W.removeAttribute("disabled")});W.className="geBtn gePrimaryBtn";
+if(p||q){var J=[],V=null,U=null,X=null,t=function(fa){W.setAttribute("disabled","disabled");for(var sa=0;sa<J.length;sa++)J[sa].className=sa==fa?"geBtn gePrimaryBtn":"geBtn"};N=!0;z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";G.appendChild(z);C=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){Aa.style.display="";ja.style.display="";Z.style.left="160px";t(0);Z.scrollTop=0;Z.innerHTML="";H=0;V!=Ma&&(Ma=V,pa=U,Ka=X,Aa.innerHTML="",B(),V=null)});
+J.push(C);z.appendChild(C);var E=function(fa){Aa.style.display="none";ja.style.display="none";Z.style.left="30px";t(fa?-1:1);null==V&&(V=Ma);Z.scrollTop=0;Z.innerHTML="";R.spin(Z);var sa=function(xa,wa,ua){H=0;R.stop();Ma=xa;ua=ua||{};var va=0,ia;for(ia in ua)va+=ua[ia].length;if(wa)Z.innerHTML=wa;else if(0==xa.length&&0==va)Z.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Z.innerHTML="",0<va){Aa.style.display="";Z.style.left="160px";Aa.innerHTML="";
+Ka=0;pa={"draw.io":xa};for(ia in ua)pa[ia]=ua[ia];B()}else O(!0)};fa?q(K.value,sa):p(sa)};p&&(C=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){E()}),z.appendChild(C),J.push(C));if(q){C=document.createElement("span");C.style.marginLeft="10px";C.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");z.appendChild(C);var K=document.createElement("input");K.style.marginRight="10px";K.style.marginLeft="10px";K.style.width="220px";mxEvent.addListener(K,"keypress",function(fa){13==
+fa.keyCode&&E(!0)});z.appendChild(K);C=mxUtils.button(mxResources.get("search"),function(){E(!0)});C.className="geBtn";z.appendChild(C)}t(0)}var T=null,P=null,Q=null,S=null,Y=null,ba=null,da=null,Z=document.createElement("div");Z.style.border="1px solid #d3d3d3";Z.style.position="absolute";Z.style.left="160px";Z.style.right="34px";z=(f?72:40)+(N?30:0);Z.style.top=z+"px";Z.style.bottom="68px";Z.style.margin="6px 0 0 -1px";Z.style.padding="6px";Z.style.overflow="auto";var ja=document.createElement("div");
+ja.style.cssText="position:absolute;left:30px;width:128px;top:"+z+"px;height:22px;margin-top: 6px;white-space: nowrap";var ea=document.createElement("input");ea.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";ea.setAttribute("placeholder",mxResources.get("search"));ea.setAttribute("type","text");ja.appendChild(ea);var ha=document.createElement("img"),ma="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";ha.setAttribute("src",
+ma);ha.setAttribute("title",mxResources.get("search"));ha.style.position="relative";ha.style.left="-18px";ha.style.top="1px";ha.style.background="url('"+b.editor.transparentImage+"')";ja.appendChild(ha);mxEvent.addListener(ha,"click",function(){ha.getAttribute("src")==Dialog.prototype.closeImage&&(ha.setAttribute("src",ma),ha.setAttribute("title",mxResources.get("search")),ea.value="",null!=Ia&&(Ia.click(),Ia=null));ea.focus()});mxEvent.addListener(ea,"keydown",mxUtils.bind(this,function(fa){if(13==
+fa.keyCode){var sa=ea.value;if(""==sa)null!=Ia&&(Ia.click(),Ia=null);else{if(null==NewDialog.tagsList[l]){var xa={};for(na in pa)for(var wa=pa[na],ua=0;ua<wa.length;ua++){var va=wa[ua];if(null!=va.tags)for(var ia=va.tags.toLowerCase().split(";"),ra=0;ra<ia.length;ra++)null==xa[ia[ra]]&&(xa[ia[ra]]=[]),xa[ia[ra]].push(va)}NewDialog.tagsList[l]=xa}var aa=sa.toLowerCase().split(" ");xa=NewDialog.tagsList[l];if(0<Ka&&null==xa.__tagsList__){for(na in Ea)for(wa=Ea[na],ua=0;ua<wa.length;ua++)for(va=wa[ua],
+ia=va.title.split(" "),ia.push(na),ra=0;ra<ia.length;ra++){var ca=ia[ra].toLowerCase();null==xa[ca]&&(xa[ca]=[]);xa[ca].push(va)}xa.__tagsList__=!0}var na=[];wa={};for(ua=ia=0;ua<aa.length;ua++)if(0<aa[ua].length){ca=xa[aa[ua]];var la={};na=[];if(null!=ca)for(ra=0;ra<ca.length;ra++)va=ca[ra],0==ia==(null==wa[va.url])&&(la[va.url]=!0,na.push(va));wa=la;ia++}Z.scrollTop=0;Z.innerHTML="";H=0;xa=document.createElement("div");xa.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";
+mxUtils.write(xa,mxResources.get(0==na.length?"noResultsFor":"resultsFor",[sa]));Z.appendChild(xa);null!=Ha&&null==Ia&&(Ha.style.backgroundColor="",Ia=Ha,Ha=xa);Ma=na;V=null;O(!1)}mxEvent.consume(fa)}}));mxEvent.addListener(ea,"keyup",mxUtils.bind(this,function(fa){""==ea.value?(ha.setAttribute("src",ma),ha.setAttribute("title",mxResources.get("search"))):(ha.setAttribute("src",Dialog.prototype.closeImage),ha.setAttribute("title",mxResources.get("reset")))}));z+=23;var Aa=document.createElement("div");
+Aa.style.cssText="position:absolute;left:30px;width:128px;top:"+z+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(Z,"scroll",function(){b.sidebar.hideTooltip()});var Da=140,Ca=140,pa={},Ba={},Ea={},Ka=0,Fa=!0,Ha=null,Ia=null;pa.basic=[{title:"blankDiagram",select:!0}];var Ma=pa.basic;if(!e){var za=function(){mxUtils.get(oa,function(fa){if(!ya){ya=!0;fa=fa.getXml().documentElement.firstChild;for(var sa={};null!=fa;){if("undefined"!==typeof fa.getAttribute)if("clibs"==
+fa.nodeName){for(var xa=fa.getAttribute("name"),wa=fa.getElementsByTagName("add"),ua=[],va=0;va<wa.length;va++)ua.push(encodeURIComponent(mxUtils.getTextContent(wa[va])));null!=xa&&0<ua.length&&(sa[xa]=ua.join(";"))}else if(ua=fa.getAttribute("url"),null!=ua){wa=fa.getAttribute("section");xa=fa.getAttribute("subsection");if(null==wa&&(va=ua.indexOf("/"),wa=ua.substring(0,va),null==xa)){var ia=ua.indexOf("/",va+1);-1<ia&&(xa=ua.substring(va+1,ia))}va=pa[wa];null==va&&(va=[],pa[wa]=va);ua=fa.getAttribute("clibs");
+null!=sa[ua]&&(ua=sa[ua]);ua={url:fa.getAttribute("url"),libs:fa.getAttribute("libs"),title:fa.getAttribute("title"),tooltip:fa.getAttribute("name")||fa.getAttribute("url"),preview:fa.getAttribute("preview"),clibs:ua,tags:fa.getAttribute("tags")};va.push(ua);null!=xa&&(va=Ba[wa],null==va&&(va={},Ba[wa]=va),wa=va[xa],null==wa&&(wa=[],va[xa]=wa),wa.push(ua))}fa=fa.nextSibling}R.stop();B()}})};G.appendChild(ja);G.appendChild(Aa);G.appendChild(Z);var ya=!1,oa=l;/^https?:\/\//.test(oa)&&!b.editor.isCorsEnabledForUrl(oa)&&
+(oa=PROXY_URL+"?url="+encodeURIComponent(oa));R.spin(Z);null!=A?A(function(fa,sa){Ea=fa;X=Ka=sa;za()},za):za();U=pa}mxEvent.addListener(F,"keypress",function(fa){b.dialog.container.firstChild==G&&13==fa.keyCode&&M()});A=document.createElement("div");A.style.marginTop=e?"4px":"16px";A.style.textAlign="right";A.style.position="absolute";A.style.left="40px";A.style.bottom="24px";A.style.right="40px";e||b.isOffline()||!f||null!=c||m||(z=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
+z.className="geBtn",A.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=n&&n();b.hideDialog(!0)});z.className="geBtn";!b.editor.cancelFirst||m&&null==n||A.appendChild(z);e||"1"==urlParams.embed||m||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(e=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var fa=new FilenameDialog(b,"",mxResources.get("create"),function(sa){null!=sa&&0<sa.length&&(sa=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+
+encodeURIComponent(F.value)+"&create="+encodeURIComponent(sa)),null==b.getCurrentFile()?window.location.href=sa:window.openWindow(sa))},mxResources.get("url"));b.showDialog(fa.container,300,80,!0,!0);fa.init()}),e.className="geBtn",A.appendChild(e));Graph.fileSupport&&y&&(y=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var fa=document.createElement("input");fa.setAttribute("multiple","multiple");fa.setAttribute("type","file");mxEvent.addListener(fa,"change",function(sa){b.openFiles(fa.files,
!0);fa.value=""});fa.style.display="none";document.body.appendChild(fa);b.newDlgFileInputElt=fa}b.newDlgFileInputElt.click()}),y.className="geBtn",A.appendChild(y));A.appendChild(W);b.editor.cancelFirst||null!=c||m&&null==n||A.appendChild(z);G.appendChild(A);this.container=G};NewDialog.tagsList={};
-var CreateDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y,z,A){function L(N,I,E,H){function R(){mxEvent.addListener(W,"click",function(){var t=E;if(v){var F=u.value,K=F.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>K){t=null!=t?t:G.value;var T="";t==App.MODE_GOOGLE?T=b.drive.extension:t==App.MODE_GITHUB?T=b.gitHub.extension:t==App.MODE_GITLAB?T=b.gitLab.extension:t==App.MODE_TRELLO?T=b.trello.extension:t==App.MODE_DROPBOX?T=b.dropbox.extension:t==App.MODE_ONEDRIVE?T=b.oneDrive.extension:t==App.MODE_DEVICE&&
-(T=".drawio");0<=K&&(F=F.substring(0,K));u.value=F+T}}O(E)})}var W=document.createElement("a");W.style.overflow="hidden";var J=document.createElement("img");J.src=N;J.setAttribute("border","0");J.setAttribute("align","absmiddle");J.style.width="60px";J.style.height="60px";J.style.paddingBottom="6px";W.style.display="inline-block";W.className="geBaseButton";W.style.position="relative";W.style.margin="4px";W.style.padding="8px 8px 10px 8px";W.style.whiteSpace="nowrap";W.appendChild(J);W.style.color=
+var CreateDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y,z,A){function L(N,I,F,H){function R(){mxEvent.addListener(W,"click",function(){var t=F;if(v){var E=u.value,K=E.lastIndexOf(".");if(0>e.lastIndexOf(".")&&0>K){t=null!=t?t:G.value;var T="";t==App.MODE_GOOGLE?T=b.drive.extension:t==App.MODE_GITHUB?T=b.gitHub.extension:t==App.MODE_GITLAB?T=b.gitLab.extension:t==App.MODE_TRELLO?T=b.trello.extension:t==App.MODE_DROPBOX?T=b.dropbox.extension:t==App.MODE_ONEDRIVE?T=b.oneDrive.extension:t==App.MODE_DEVICE&&
+(T=".drawio");0<=K&&(E=E.substring(0,K));u.value=E+T}}O(F)})}var W=document.createElement("a");W.style.overflow="hidden";var J=document.createElement("img");J.src=N;J.setAttribute("border","0");J.setAttribute("align","absmiddle");J.style.width="60px";J.style.height="60px";J.style.paddingBottom="6px";W.style.display="inline-block";W.className="geBaseButton";W.style.position="relative";W.style.margin="4px";W.style.padding="8px 8px 10px 8px";W.style.whiteSpace="nowrap";W.appendChild(J);W.style.color=
"gray";W.style.fontSize="11px";var V=document.createElement("div");W.appendChild(V);mxUtils.write(V,I);if(null!=H&&null==b[H]){J.style.visibility="hidden";mxUtils.setOpacity(V,10);var U=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});U.spin(W);var X=window.setTimeout(function(){null==b[H]&&(U.stop(),W.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[H]&&(window.clearTimeout(X),
mxUtils.setOpacity(V,100),J.style.visibility="",U.stop(),R())}))}else R();B.appendChild(W);++C==p&&(mxUtils.br(B),C=0)}function O(N){var I=u.value;if(null==N||null!=I&&0<I.length)A&&b.hideDialog(),f(I,N,u)}l="1"==urlParams.noDevice?!1:l;v=null!=v?v:!0;d=null!=d?d:!0;p=null!=p?p:4;A=null!=A?A:!0;n=document.createElement("div");n.style.whiteSpace="nowrap";null==c&&b.addLanguageMenu(n);var M=document.createElement("h2");mxUtils.write(M,m||mxResources.get("create"));M.style.marginTop="0px";M.style.marginBottom=
"24px";n.appendChild(M);mxUtils.write(n,mxResources.get("filename")+":");var u=document.createElement("input");u.setAttribute("value",e);u.style.width="200px";u.style.marginLeft="10px";u.style.marginBottom="20px";u.style.maxWidth="70%";this.init=function(){u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null)};n.appendChild(u);null!=z&&(null!=b.editor.diagramFileTypes&&(m=FilenameDialog.createFileTypes(b,u,b.editor.diagramFileTypes),
@@ -11184,7 +11184,7 @@ Dialog.prototype.clearImage+"')";p.style.backgroundRepeat="no-repeat";p.style.ba
e.appendChild(p);e.appendChild(f);l.appendChild(e);var q=d,x,y,z=function(M,u,D,B){var C="data:"==M.substring(0,5);!b.isOffline()||C&&"undefined"===typeof chrome?0<M.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(M,function(G){b.spinner.stop();b.hideDialog();var N=!1===B?1:null!=u&&null!=D?Math.max(u/G.width,D/G.height):Math.min(1,Math.min(520/G.width,520/G.height));n&&(M=b.convertDataUri(M));c(M,Math.round(Number(G.width)*N),Math.round(Number(G.height)*N),q,x,y)},
function(){b.spinner.stop();c(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),c(M,null,null,q,x,y)):(M=b.convertDataUri(M),u=null==u?120:u,D=null==D?100:D,b.hideDialog(),c(M,u,D,q,x,y))},A=function(M,u){if(null!=M){var D=m?null:k.getModel().getGeometry(k.getSelectionCell());null!=D?z(M,D.width,D.height,u):z(M,null,null,u)}else b.hideDialog(),c(null)};this.init=function(){p.focus();if(Graph.fileSupport){p.setAttribute("placeholder",
mxResources.get("dragImagesHere"));var M=l.parentNode,u=null;mxEvent.addListener(M,"dragleave",function(D){null!=u&&(u.parentNode.removeChild(u),u=null);D.stopPropagation();D.preventDefault()});mxEvent.addListener(M,"dragover",mxUtils.bind(this,function(D){null==u&&(!mxClient.IS_IE||10<document.documentMode)&&(u=b.highlightElement(M));D.stopPropagation();D.preventDefault()}));mxEvent.addListener(M,"drop",mxUtils.bind(this,function(D){null!=u&&(u.parentNode.removeChild(u),u=null);if(0<D.dataTransfer.files.length)b.importFiles(D.dataTransfer.files,
-0,0,b.maxImageSize,function(C,G,N,I,E,H,R,W){A(C,W)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var G=0;G<C.length;G++)C[G]()},!mxEvent.isControlDown(D),null,null,!0);else if(0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")){var B=D.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(B)&&A(decodeURIComponent(B))}D.stopPropagation();D.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop="14px";d.style.textAlign=
+0,0,b.maxImageSize,function(C,G,N,I,F,H,R,W){A(C,W)},function(){},function(C){return"image/"==C.type.substring(0,6)},function(C){for(var G=0;G<C.length;G++)C[G]()},!mxEvent.isControlDown(D),null,null,!0);else if(0<=mxUtils.indexOf(D.dataTransfer.types,"text/uri-list")){var B=D.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(B)&&A(decodeURIComponent(B))}D.stopPropagation();D.preventDefault()}),!1)}};d=document.createElement("div");d.style.marginTop="14px";d.style.textAlign=
"center";f=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);ImageDialog.filePicked=function(M){M.action==google.picker.Action.PICKED&&null!=M.docs[0].thumbnails&&(M=M.docs[0].thumbnails[M.docs[0].thumbnails.length-1],null!=M&&(p.value=M.url));p.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var L=document.createElement("input");L.setAttribute("multiple","multiple");L.setAttribute("type",
"file");mxEvent.addListener(L,"change",function(M){null!=L.files&&(b.importFiles(L.files,0,0,b.maxImageSize,function(u,D,B,C,G,N){A(u)},function(){},function(u){return"image/"==u.type.substring(0,6)},function(u){for(var D=0;D<u.length;D++)u[D]()},!0),L.type="",L.type="file",L.value="")});L.style.display="none";document.body.appendChild(L);b.imgDlgFileInputElt=L}e=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});e.className="geBtn";d.appendChild(e)}mxEvent.addListener(p,
"keypress",function(M){13==M.keyCode&&A(p.value)});var O=mxUtils.button(mxResources.get("crop"),function(){var M=new CropImageDialog(b,p.value,q,function(u,D,B){q=u;x=D;y=B});b.showDialog(M.container,300,390,!0,!0)});v&&(O.className="geBtn",d.appendChild(O));mxEvent.addListener(p,"change",function(M){q=null;g()});g();v=mxUtils.button(mxResources.get("apply"),function(){A(p.value)});v.className="geBtn gePrimaryBtn";d.appendChild(v);b.editor.cancelFirst||d.appendChild(f);Graph.fileSupport&&(d.style.marginTop=
@@ -11215,24 +11215,24 @@ d.getGlobalVariable=function(S){return"page"==S&&null!=k&&null!=k[l]?k[l].getAtt
hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},x=new Spinner(q),y=b.getCurrentFile(),z=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),A={};for(q=0;q<z.length;q++)A[z[q].getAttribute("id")]=z[q];var L=null,O=null,M=null,u=null,D=mxUtils.button("",function(){null!=M&&d.zoomIn()});D.className="geSprite geSprite-zoomin";D.setAttribute("title",mxResources.get("zoomIn"));D.style.outline="none";D.style.border="none";D.style.margin="2px";D.setAttribute("disabled","disabled");
mxUtils.setOpacity(D,20);var B=mxUtils.button("",function(){null!=M&&d.zoomOut()});B.className="geSprite geSprite-zoomout";B.setAttribute("title",mxResources.get("zoomOut"));B.style.outline="none";B.style.border="none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var C=mxUtils.button("",function(){null!=M&&(d.maxFitScale=8,d.fit(8),d.center())});C.className="geSprite geSprite-fit";C.setAttribute("title",mxResources.get("fit"));C.style.outline="none";C.style.border=
"none";C.style.margin="2px";C.setAttribute("disabled","disabled");mxUtils.setOpacity(C,20);var G=mxUtils.button("",function(){null!=M&&(d.zoomActual(),d.center())});G.className="geSprite geSprite-actualsize";G.setAttribute("title",mxResources.get("actualSize"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var N=mxUtils.button("",function(){});N.className="geSprite geSprite-middle";N.setAttribute("title",mxResources.get("compare"));
-N.style.outline="none";N.style.border="none";N.style.margin="2px";mxUtils.setOpacity(N,60);var I=n.cloneNode(!1);I.style.pointerEvent="none";n.parentNode.appendChild(I);var E=new Graph(I);E.setTooltips(!1);E.setEnabled(!1);E.setPanning(!0);E.panningHandler.ignoreCell=!0;E.panningHandler.useLeftButtonForPanning=!0;E.minFitScale=null;E.maxFitScale=null;E.centerZoom=!0;mxEvent.addGestureListeners(N,function(S){S=A[k[g].getAttribute("id")];mxUtils.setOpacity(N,20);v.innerHTML="";null==S?mxUtils.write(v,
-mxResources.get("pageNotFound")):(H.style.display="none",n.style.display="none",I.style.display="",I.style.backgroundColor=n.style.backgroundColor,S=Editor.parseDiagramNode(S),(new mxCodec(S.ownerDocument)).decode(S,E.getModel()),E.view.scaleAndTranslate(d.view.scale,d.view.translate.x,d.view.translate.y))},null,function(){mxUtils.setOpacity(N,60);v.innerHTML="";"none"==n.style.display&&(H.style.display="",n.style.display="",I.style.display="none")});var H=document.createElement("div");H.style.position=
+N.style.outline="none";N.style.border="none";N.style.margin="2px";mxUtils.setOpacity(N,60);var I=n.cloneNode(!1);I.style.pointerEvent="none";n.parentNode.appendChild(I);var F=new Graph(I);F.setTooltips(!1);F.setEnabled(!1);F.setPanning(!0);F.panningHandler.ignoreCell=!0;F.panningHandler.useLeftButtonForPanning=!0;F.minFitScale=null;F.maxFitScale=null;F.centerZoom=!0;mxEvent.addGestureListeners(N,function(S){S=A[k[g].getAttribute("id")];mxUtils.setOpacity(N,20);v.innerHTML="";null==S?mxUtils.write(v,
+mxResources.get("pageNotFound")):(H.style.display="none",n.style.display="none",I.style.display="",I.style.backgroundColor=n.style.backgroundColor,S=Editor.parseDiagramNode(S),(new mxCodec(S.ownerDocument)).decode(S,F.getModel()),F.view.scaleAndTranslate(d.view.scale,d.view.translate.x,d.view.translate.y))},null,function(){mxUtils.setOpacity(N,60);v.innerHTML="";"none"==n.style.display&&(H.style.display="",n.style.display="",I.style.display="none")});var H=document.createElement("div");H.style.position=
"absolute";H.style.textAlign="right";H.style.color="gray";H.style.marginTop="10px";H.style.backgroundColor="transparent";H.style.top="440px";H.style.right="32px";H.style.maxWidth="380px";H.style.cursor="default";var R=mxUtils.button(mxResources.get("download"),function(){if(null!=M){var S=mxUtils.getXml(M.documentElement),Y=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(S,Y,"text/xml"):(S="undefined"===typeof pako?"&xml="+encodeURIComponent(S):"&data="+encodeURIComponent(Graph.compress(S)),
(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Y)+"&format=xml"+S)).simulate(document,"_blank"))}});R.className="geBtn";R.setAttribute("disabled","disabled");var W=mxUtils.button(mxResources.get("restore"),function(S){null!=M&&null!=u&&(mxEvent.isShiftDown(S)?null!=M&&(S=b.getPagesForNode(M.documentElement),S=b.diffPages(b.pages,S),S=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(S,null,2),function(Y){if(0<Y.length)try{b.confirm(mxResources.get("areYouSure"),function(){y.patch([JSON.parse(Y)],
-null,!0);b.hideDialog();b.hideDialog()})}catch(ca){b.handleError(ca)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(S.container,620,460,!0,!0),S.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(u):b.spinner.spin(document.body,mxResources.get("restoring"))&&y.save(!0,function(Y){b.spinner.stop();b.replaceFileData(u);b.hideDialog()},function(Y){b.spinner.stop();b.editor.setStatus("");b.handleError(Y,null!=Y?mxResources.get("errorSavingFile"):null)})}))});
+null,!0);b.hideDialog();b.hideDialog()})}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(S.container,620,460,!0,!0),S.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=f?f(u):b.spinner.spin(document.body,mxResources.get("restoring"))&&y.save(!0,function(Y){b.spinner.stop();b.replaceFileData(u);b.hideDialog()},function(Y){b.spinner.stop();b.editor.setStatus("");b.handleError(Y,null!=Y?mxResources.get("errorSavingFile"):null)})}))});
W.className="geBtn";W.setAttribute("disabled","disabled");W.setAttribute("title","Shift+Click for Diff");var J=document.createElement("select");J.setAttribute("disabled","disabled");J.style.maxWidth="80px";J.style.position="relative";J.style.top="-2px";J.style.verticalAlign="bottom";J.style.marginRight="6px";J.style.display="none";var V=null;mxEvent.addListener(J,"change",function(S){null!=V&&(V(S),mxEvent.consume(S))});var U=mxUtils.button(mxResources.get("edit"),function(){null!=M&&(window.openFile=
new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(M.documentElement)),b.openLink(b.getUrl(),null,!0))});U.className="geBtn";U.setAttribute("disabled","disabled");null!=f&&(U.style.display="none");var X=mxUtils.button(mxResources.get("show"),function(){null!=O&&b.openLink(O.getUrl(J.selectedIndex))});X.className="geBtn gePrimaryBtn";X.setAttribute("disabled","disabled");null!=f&&(X.style.display="none",W.className="geBtn gePrimaryBtn");z=document.createElement("div");
-z.style.position="absolute";z.style.top="482px";z.style.width="640px";z.style.textAlign="right";var t=document.createElement("div");t.className="geToolbarContainer";t.style.backgroundColor="transparent";t.style.padding="2px";t.style.border="none";t.style.left="199px";t.style.top="442px";var F=null;if(null!=e&&0<e.length){n.style.cursor="move";var K=document.createElement("table");K.style.border="1px solid lightGray";K.style.borderCollapse="collapse";K.style.borderSpacing="0px";K.style.width="100%";
-var T=document.createElement("tbody"),P=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(g=mxUtils.indexOf(b.pages,b.currentPage));for(q=e.length-1;0<=q;q--){var Q=function(S){var Y=new Date(S.modifiedDate),ca=null;if(0<=Y.getTime()){var da=function(ha){x.stop();v.innerHTML="";var aa=mxUtils.parseXml(ha),ua=b.editor.extractGraphModel(aa.documentElement,!0);if(null!=ua){var ka=function(Da){null!=Da&&(Da=Ca(Editor.parseDiagramNode(Da)));return Da},Ca=function(Da){var oa=Da.getAttribute("background");
-if(null==oa||""==oa||oa==mxConstants.NONE)oa=d.defaultPageBackgroundColor;n.style.backgroundColor=oa;(new mxCodec(Da.ownerDocument)).decode(Da,d.getModel());d.maxFitScale=1;d.fit(8);d.center();return Da};J.style.display="none";J.innerHTML="";M=aa;u=ha;k=parseSelectFunction=null;l=0;if("mxfile"==ua.nodeName){aa=ua.getElementsByTagName("diagram");k=[];for(ha=0;ha<aa.length;ha++)k.push(aa[ha]);l=Math.min(g,k.length-1);0<k.length&&ka(k[l]);if(1<k.length)for(J.removeAttribute("disabled"),J.style.display=
-"",ha=0;ha<k.length;ha++)aa=document.createElement("option"),mxUtils.write(aa,k[ha].getAttribute("name")||mxResources.get("pageWithNumber",[ha+1])),aa.setAttribute("value",ha),ha==l&&aa.setAttribute("selected","selected"),J.appendChild(aa);V=function(){try{var Da=parseInt(J.value);l=g=Da;ka(k[Da])}catch(oa){J.value=g,b.handleError(oa)}}}else Ca(ua);ha=S.lastModifyingUserName;null!=ha&&20<ha.length&&(ha=ha.substring(0,20)+"...");H.innerHTML="";mxUtils.write(H,(null!=ha?ha+" ":"")+Y.toLocaleDateString()+
-" "+Y.toLocaleTimeString());H.setAttribute("title",ca.getAttribute("title"));D.removeAttribute("disabled");B.removeAttribute("disabled");C.removeAttribute("disabled");G.removeAttribute("disabled");N.removeAttribute("disabled");null!=y&&y.isRestricted()||(b.editor.graph.isEnabled()&&W.removeAttribute("disabled"),R.removeAttribute("disabled"),X.removeAttribute("disabled"),U.removeAttribute("disabled"));mxUtils.setOpacity(D,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(C,60);mxUtils.setOpacity(G,60);
-mxUtils.setOpacity(N,60)}else J.style.display="none",J.innerHTML="",H.innerHTML="",mxUtils.write(H,mxResources.get("errorLoadingFile")),mxUtils.write(v,mxResources.get("errorLoadingFile"))};ca=document.createElement("tr");ca.style.borderBottom="1px solid lightGray";ca.style.fontSize="12px";ca.style.cursor="pointer";var Z=document.createElement("td");Z.style.padding="6px";Z.style.whiteSpace="nowrap";S==e[e.length-1]?mxUtils.write(Z,mxResources.get("current")):Y.toDateString()===P?mxUtils.write(Z,Y.toLocaleTimeString()):
-mxUtils.write(Z,Y.toLocaleDateString()+" "+Y.toLocaleTimeString());ca.appendChild(Z);ca.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString()+(null!=S.fileSize?" "+b.formatFileSize(parseInt(S.fileSize)):"")+(null!=S.lastModifyingUserName?" "+S.lastModifyingUserName:""));mxEvent.addListener(ca,"click",function(ha){O!=S&&(x.stop(),null!=L&&(L.style.backgroundColor=""),O=S,L=ca,L.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",u=M=null,H.removeAttribute("title"),H.innerHTML=
+z.style.position="absolute";z.style.top="482px";z.style.width="640px";z.style.textAlign="right";var t=document.createElement("div");t.className="geToolbarContainer";t.style.backgroundColor="transparent";t.style.padding="2px";t.style.border="none";t.style.left="199px";t.style.top="442px";var E=null;if(null!=e&&0<e.length){n.style.cursor="move";var K=document.createElement("table");K.style.border="1px solid lightGray";K.style.borderCollapse="collapse";K.style.borderSpacing="0px";K.style.width="100%";
+var T=document.createElement("tbody"),P=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(g=mxUtils.indexOf(b.pages,b.currentPage));for(q=e.length-1;0<=q;q--){var Q=function(S){var Y=new Date(S.modifiedDate),ba=null;if(0<=Y.getTime()){var da=function(ja){x.stop();v.innerHTML="";var ea=mxUtils.parseXml(ja),ha=b.editor.extractGraphModel(ea.documentElement,!0);if(null!=ha){var ma=function(Da){null!=Da&&(Da=Aa(Editor.parseDiagramNode(Da)));return Da},Aa=function(Da){var Ca=Da.getAttribute("background");
+if(null==Ca||""==Ca||Ca==mxConstants.NONE)Ca=d.defaultPageBackgroundColor;n.style.backgroundColor=Ca;(new mxCodec(Da.ownerDocument)).decode(Da,d.getModel());d.maxFitScale=1;d.fit(8);d.center();return Da};J.style.display="none";J.innerHTML="";M=ea;u=ja;k=parseSelectFunction=null;l=0;if("mxfile"==ha.nodeName){ea=ha.getElementsByTagName("diagram");k=[];for(ja=0;ja<ea.length;ja++)k.push(ea[ja]);l=Math.min(g,k.length-1);0<k.length&&ma(k[l]);if(1<k.length)for(J.removeAttribute("disabled"),J.style.display=
+"",ja=0;ja<k.length;ja++)ea=document.createElement("option"),mxUtils.write(ea,k[ja].getAttribute("name")||mxResources.get("pageWithNumber",[ja+1])),ea.setAttribute("value",ja),ja==l&&ea.setAttribute("selected","selected"),J.appendChild(ea);V=function(){try{var Da=parseInt(J.value);l=g=Da;ma(k[Da])}catch(Ca){J.value=g,b.handleError(Ca)}}}else Aa(ha);ja=S.lastModifyingUserName;null!=ja&&20<ja.length&&(ja=ja.substring(0,20)+"...");H.innerHTML="";mxUtils.write(H,(null!=ja?ja+" ":"")+Y.toLocaleDateString()+
+" "+Y.toLocaleTimeString());H.setAttribute("title",ba.getAttribute("title"));D.removeAttribute("disabled");B.removeAttribute("disabled");C.removeAttribute("disabled");G.removeAttribute("disabled");N.removeAttribute("disabled");null!=y&&y.isRestricted()||(b.editor.graph.isEnabled()&&W.removeAttribute("disabled"),R.removeAttribute("disabled"),X.removeAttribute("disabled"),U.removeAttribute("disabled"));mxUtils.setOpacity(D,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(C,60);mxUtils.setOpacity(G,60);
+mxUtils.setOpacity(N,60)}else J.style.display="none",J.innerHTML="",H.innerHTML="",mxUtils.write(H,mxResources.get("errorLoadingFile")),mxUtils.write(v,mxResources.get("errorLoadingFile"))};ba=document.createElement("tr");ba.style.borderBottom="1px solid lightGray";ba.style.fontSize="12px";ba.style.cursor="pointer";var Z=document.createElement("td");Z.style.padding="6px";Z.style.whiteSpace="nowrap";S==e[e.length-1]?mxUtils.write(Z,mxResources.get("current")):Y.toDateString()===P?mxUtils.write(Z,Y.toLocaleTimeString()):
+mxUtils.write(Z,Y.toLocaleDateString()+" "+Y.toLocaleTimeString());ba.appendChild(Z);ba.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString()+(null!=S.fileSize?" "+b.formatFileSize(parseInt(S.fileSize)):"")+(null!=S.lastModifyingUserName?" "+S.lastModifyingUserName:""));mxEvent.addListener(ba,"click",function(ja){O!=S&&(x.stop(),null!=L&&(L.style.backgroundColor=""),O=S,L=ba,L.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",u=M=null,H.removeAttribute("title"),H.innerHTML=
mxUtils.htmlEntities(mxResources.get("loading")+"..."),n.style.backgroundColor=d.defaultPageBackgroundColor,v.innerHTML="",d.getModel().clear(),W.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),D.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"),J.setAttribute("disabled",
-"disabled"),mxUtils.setOpacity(D,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(C,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(N,20),x.spin(n),S.getXml(function(aa){if(O==S)try{da(aa)}catch(ua){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+ua.message)}},function(aa){x.stop();J.style.display="none";J.innerHTML="";H.innerHTML="";mxUtils.write(H,mxResources.get("errorLoadingFile"));mxUtils.write(v,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ha))});mxEvent.addListener(ca,
-"dblclick",function(ha){X.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ha)},!1);T.appendChild(ca)}return ca}(e[q]);null!=Q&&q==e.length-1&&(F=Q)}K.appendChild(T);m.appendChild(K)}else null==y||null==b.drive&&y.constructor==window.DriveFile||null==b.dropbox&&y.constructor==window.DropboxFile?(n.style.display="none",t.style.display="none",mxUtils.write(m,mxResources.get("notAvailable"))):(n.style.display="none",t.style.display=
-"none",mxUtils.write(m,mxResources.get("noRevisions")));this.init=function(){null!=F&&F.click()};m=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.className="geBtn";t.appendChild(J);t.appendChild(D);t.appendChild(B);t.appendChild(G);t.appendChild(C);t.appendChild(N);b.editor.cancelFirst?(z.appendChild(m),z.appendChild(R),z.appendChild(U),z.appendChild(W),z.appendChild(X)):(z.appendChild(R),z.appendChild(U),z.appendChild(W),z.appendChild(X),z.appendChild(m));c.appendChild(z);
+"disabled"),mxUtils.setOpacity(D,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(C,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(N,20),x.spin(n),S.getXml(function(ea){if(O==S)try{da(ea)}catch(ha){H.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+ha.message)}},function(ea){x.stop();J.style.display="none";J.innerHTML="";H.innerHTML="";mxUtils.write(H,mxResources.get("errorLoadingFile"));mxUtils.write(v,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ja))});mxEvent.addListener(ba,
+"dblclick",function(ja){X.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ja)},!1);T.appendChild(ba)}return ba}(e[q]);null!=Q&&q==e.length-1&&(E=Q)}K.appendChild(T);m.appendChild(K)}else null==y||null==b.drive&&y.constructor==window.DriveFile||null==b.dropbox&&y.constructor==window.DropboxFile?(n.style.display="none",t.style.display="none",mxUtils.write(m,mxResources.get("notAvailable"))):(n.style.display="none",t.style.display=
+"none",mxUtils.write(m,mxResources.get("noRevisions")));this.init=function(){null!=E&&E.click()};m=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});m.className="geBtn";t.appendChild(J);t.appendChild(D);t.appendChild(B);t.appendChild(G);t.appendChild(C);t.appendChild(N);b.editor.cancelFirst?(z.appendChild(m),z.appendChild(R),z.appendChild(U),z.appendChild(W),z.appendChild(X)):(z.appendChild(R),z.appendChild(U),z.appendChild(W),z.appendChild(X),z.appendChild(m));c.appendChild(z);
c.appendChild(t);c.appendChild(H);this.container=c},DraftDialog=function(b,e,f,c,m,n,v,d,g){var k=document.createElement("div"),l=document.createElement("div");l.style.marginTop="0px";l.style.whiteSpace="nowrap";l.style.overflow="auto";l.style.lineHeight="normal";mxUtils.write(l,e);k.appendChild(l);var p=document.createElement("select"),q=mxUtils.bind(this,function(){O=mxUtils.parseXml(g[p.value].data);M=b.editor.extractGraphModel(O.documentElement,!0);u=0;this.init()});if(null!=g){p.style.marginLeft=
"4px";for(e=0;e<g.length;e++){var x=document.createElement("option");x.setAttribute("value",e);var y=new Date(g[e].created),z=new Date(g[e].modified);mxUtils.write(x,y.toLocaleDateString()+" "+y.toLocaleTimeString()+" - "+(y.toDateString(),z.toDateString(),z.toLocaleDateString())+" "+z.toLocaleTimeString());p.appendChild(x)}l.appendChild(p);mxEvent.addListener(p,"change",q)}null==f&&(f=g[0].data);var A=document.createElement("div");A.style.position="absolute";A.style.border="1px solid lightGray";
A.style.marginTop="10px";A.style.left="40px";A.style.right="40px";A.style.top="46px";A.style.bottom="74px";A.style.overflow="hidden";mxEvent.disableContextMenu(A);k.appendChild(A);var L=new Graph(A);L.setEnabled(!1);L.setPanning(!0);L.panningHandler.ignoreCell=!0;L.panningHandler.useLeftButtonForPanning=!0;L.minFitScale=null;L.maxFitScale=null;L.centerZoom=!0;var O=mxUtils.parseXml(f),M=b.editor.extractGraphModel(O.documentElement,!0),u=0,D=null,B=L.getGlobalVariable;L.getGlobalVariable=function(G){return"page"==
@@ -11241,25 +11241,25 @@ mxResources.get("zoomOut"));l.style.outline="none";l.style.border="none";l.style
x.style.outline="none";x.style.border="none";x.style.margin="2px";mxUtils.setOpacity(x,60);v=mxUtils.button(v||mxResources.get("discard"),function(){m.apply(this,[p.value,mxUtils.bind(this,function(){null!=p.parentNode&&(p.options[p.selectedIndex].parentNode.removeChild(p.options[p.selectedIndex]),0<p.options.length?(p.value=p.options[0].value,q()):b.hideDialog(!0))})])});v.className="geBtn";var C=document.createElement("select");C.style.maxWidth="80px";C.style.position="relative";C.style.top="-2px";
C.style.verticalAlign="bottom";C.style.marginRight="6px";C.style.display="none";n=mxUtils.button(n||mxResources.get("edit"),function(){c.apply(this,[p.value])});n.className="geBtn gePrimaryBtn";y=document.createElement("div");y.style.position="absolute";y.style.bottom="30px";y.style.right="40px";y.style.textAlign="right";z=document.createElement("div");z.className="geToolbarContainer";z.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
this.init=function(){function G(H){if(null!=H){var R=H.getAttribute("background");if(null==R||""==R||R==mxConstants.NONE)R=Editor.isDarkMode()?"transparent":"#ffffff";A.style.backgroundColor=R;(new mxCodec(H.ownerDocument)).decode(H,L.getModel());L.maxFitScale=1;L.fit(8);L.center()}return H}function N(H){null!=H&&(H=G(Editor.parseDiagramNode(H)));return H}mxEvent.addListener(C,"change",function(H){u=parseInt(C.value);N(D[u]);mxEvent.consume(H)});if("mxfile"==M.nodeName){var I=M.getElementsByTagName("diagram");
-D=[];for(var E=0;E<I.length;E++)D.push(I[E]);0<D.length&&N(D[u]);C.innerHTML="";if(1<D.length)for(C.style.display="",E=0;E<D.length;E++)I=document.createElement("option"),mxUtils.write(I,D[E].getAttribute("name")||mxResources.get("pageWithNumber",[E+1])),I.setAttribute("value",E),E==u&&I.setAttribute("selected","selected"),C.appendChild(I);else C.style.display="none"}else G(M)};z.appendChild(C);z.appendChild(f);z.appendChild(l);z.appendChild(x);z.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog(!0)});f.className="geBtn";d=null!=d?mxUtils.button(mxResources.get("ignore"),d):null;null!=d&&(d.className="geBtn");b.editor.cancelFirst?(y.appendChild(f),null!=d&&y.appendChild(d),y.appendChild(v),y.appendChild(n)):(y.appendChild(n),y.appendChild(v),null!=d&&y.appendChild(d),y.appendChild(f));k.appendChild(y);k.appendChild(z);this.container=k},FindWindow=function(b,e,f,c,m,n){function v(U,X,t,F){if("object"===typeof X.value&&null!=X.value.attributes){X=X.value.attributes;
-for(var K=0;K<X.length;K++)if("label"!=X[K].nodeName){var T=mxUtils.trim(X[K].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(F&&0<=T.indexOf(t)||!F&&T.substring(0,t.length)===t)||null!=U&&U.test(T))return!0}}return!1}function d(){x&&D.value?(R.removeAttribute("disabled"),W.removeAttribute("disabled")):(R.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"));D.value&&u.value?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}function g(U,
-X,t){E.innerHTML="";var F=l.model.getDescendants(l.model.getRoot()),K=u.value.toLowerCase(),T=B.checked?new RegExp(K):null,P=null;z=null;p!=K&&(p=K,q=null,y=!1);var Q=null==q;if(0<K.length){if(y){y=!1;for(var S,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){S=Y;break}U=(S+1)%b.pages.length;q=null;do y=!1,F=b.pages[U],l=b.createTemporaryGraph(l.getStylesheet()),b.updatePageRoot(F),l.model.setRoot(F.root),U=(U+1)%b.pages.length;while(!g(!0,X,t)&&U!=S);q&&(q=null,t?b.editor.graph.model.execute(new SelectPage(b,
-F)):b.selectPage(F));y=!1;l=b.editor.graph;return g(!0,X,t)}for(Y=0;Y<F.length;Y++){S=l.view.getState(F[Y]);X&&null!=T&&(Q=Q||S==q);if(null!=S&&null!=S.cell.value&&(Q||null==P)&&(l.model.isVertex(S.cell)||l.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(G.innerHTML=l.sanitizeHtml(l.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([G])):label=l.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var ca=0;X&&n&&null!=T&&S==q&&(label=label.substr(A),
-ca=A);var da=""==D.value,Z=da;if(null==T&&(Z&&0<=label.indexOf(K)||!Z&&label.substring(0,K.length)===K||da&&v(T,S.cell,K,Z))||null!=T&&(T.test(label)||da&&v(T,S.cell,K,Z)))if(n&&(null!=T?(da=label.match(T),null!=da&&0<da.length&&(z=da[0].toLowerCase(),A=ca+da.index+z.length)):(z=K,A=z.length)),Q){P=S;break}else null==P&&(P=S)}Q=Q||S==q}}if(null!=P){if(Y==F.length&&C.checked)return q=null,y=!0,g(!0,X,t);q=P;l.scrollCellToVisible(q.cell);l.isEnabled()&&!l.isCellLocked(q.cell)?t||l.getSelectionCell()==
+D=[];for(var F=0;F<I.length;F++)D.push(I[F]);0<D.length&&N(D[u]);C.innerHTML="";if(1<D.length)for(C.style.display="",F=0;F<D.length;F++)I=document.createElement("option"),mxUtils.write(I,D[F].getAttribute("name")||mxResources.get("pageWithNumber",[F+1])),I.setAttribute("value",F),F==u&&I.setAttribute("selected","selected"),C.appendChild(I);else C.style.display="none"}else G(M)};z.appendChild(C);z.appendChild(f);z.appendChild(l);z.appendChild(x);z.appendChild(e);f=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog(!0)});f.className="geBtn";d=null!=d?mxUtils.button(mxResources.get("ignore"),d):null;null!=d&&(d.className="geBtn");b.editor.cancelFirst?(y.appendChild(f),null!=d&&y.appendChild(d),y.appendChild(v),y.appendChild(n)):(y.appendChild(n),y.appendChild(v),null!=d&&y.appendChild(d),y.appendChild(f));k.appendChild(y);k.appendChild(z);this.container=k},FindWindow=function(b,e,f,c,m,n){function v(U,X,t,E){if("object"===typeof X.value&&null!=X.value.attributes){X=X.value.attributes;
+for(var K=0;K<X.length;K++)if("label"!=X[K].nodeName){var T=mxUtils.trim(X[K].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(E&&0<=T.indexOf(t)||!E&&T.substring(0,t.length)===t)||null!=U&&U.test(T))return!0}}return!1}function d(){x&&D.value?(R.removeAttribute("disabled"),W.removeAttribute("disabled")):(R.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"));D.value&&u.value?J.removeAttribute("disabled"):J.setAttribute("disabled","disabled")}function g(U,
+X,t){F.innerHTML="";var E=l.model.getDescendants(l.model.getRoot()),K=u.value.toLowerCase(),T=B.checked?new RegExp(K):null,P=null;z=null;p!=K&&(p=K,q=null,y=!1);var Q=null==q;if(0<K.length){if(y){y=!1;for(var S,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){S=Y;break}U=(S+1)%b.pages.length;q=null;do y=!1,E=b.pages[U],l=b.createTemporaryGraph(l.getStylesheet()),b.updatePageRoot(E),l.model.setRoot(E.root),U=(U+1)%b.pages.length;while(!g(!0,X,t)&&U!=S);q&&(q=null,t?b.editor.graph.model.execute(new SelectPage(b,
+E)):b.selectPage(E));y=!1;l=b.editor.graph;return g(!0,X,t)}for(Y=0;Y<E.length;Y++){S=l.view.getState(E[Y]);X&&null!=T&&(Q=Q||S==q);if(null!=S&&null!=S.cell.value&&(Q||null==P)&&(l.model.isVertex(S.cell)||l.model.isEdge(S.cell))){null!=S.style&&"1"==S.style.html?(G.innerHTML=l.sanitizeHtml(l.getLabel(S.cell)),label=mxUtils.extractTextWithWhitespace([G])):label=l.getLabel(S.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var ba=0;X&&n&&null!=T&&S==q&&(label=label.substr(A),
+ba=A);var da=""==D.value,Z=da;if(null==T&&(Z&&0<=label.indexOf(K)||!Z&&label.substring(0,K.length)===K||da&&v(T,S.cell,K,Z))||null!=T&&(T.test(label)||da&&v(T,S.cell,K,Z)))if(n&&(null!=T?(da=label.match(T),null!=da&&0<da.length&&(z=da[0].toLowerCase(),A=ba+da.index+z.length)):(z=K,A=z.length)),Q){P=S;break}else null==P&&(P=S)}Q=Q||S==q}}if(null!=P){if(Y==E.length&&C.checked)return q=null,y=!0,g(!0,X,t);q=P;l.scrollCellToVisible(q.cell);l.isEnabled()&&!l.isCellLocked(q.cell)?t||l.getSelectionCell()==
q.cell&&1==l.getSelectionCount()||l.setSelectionCell(q.cell):l.highlightCell(q.cell)}else{if(!U&&C.checked)return y=!0,g(!0,X,t);l.isEnabled()&&!t&&l.clearSelection()}x=null!=P;n&&!U&&d();return 0==K.length||null!=P}var k=b.actions.get("findReplace"),l=b.editor.graph,p=null,q=null,x=!1,y=!1,z=null,A=0,L=1,O=document.createElement("div");O.style.userSelect="none";O.style.overflow="hidden";O.style.padding="10px";O.style.height="100%";var M=n?"260px":"200px",u=document.createElement("input");u.setAttribute("placeholder",
mxResources.get("find"));u.setAttribute("type","text");u.style.marginTop="4px";u.style.marginBottom="6px";u.style.width=M;u.style.fontSize="12px";u.style.borderRadius="4px";u.style.padding="6px";O.appendChild(u);mxUtils.br(O);if(n){var D=document.createElement("input");D.setAttribute("placeholder",mxResources.get("replaceWith"));D.setAttribute("type","text");D.style.marginTop="4px";D.style.marginBottom="6px";D.style.width=M;D.style.fontSize="12px";D.style.borderRadius="4px";D.style.padding="6px";
O.appendChild(D);mxUtils.br(O);mxEvent.addListener(D,"input",d)}var B=document.createElement("input");B.setAttribute("id","geFindWinRegExChck");B.setAttribute("type","checkbox");B.style.marginRight="4px";O.appendChild(B);M=document.createElement("label");M.setAttribute("for","geFindWinRegExChck");O.appendChild(M);mxUtils.write(M,mxResources.get("regularExpression"));O.appendChild(M);M=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");M.style.position="relative";M.style.marginLeft=
"6px";M.style.top="-1px";O.appendChild(M);mxUtils.br(O);var C=document.createElement("input");C.setAttribute("id","geFindWinAllPagesChck");C.setAttribute("type","checkbox");C.style.marginRight="4px";O.appendChild(C);M=document.createElement("label");M.setAttribute("for","geFindWinAllPagesChck");O.appendChild(M);mxUtils.write(M,mxResources.get("allPages"));O.appendChild(M);var G=document.createElement("div");mxUtils.br(O);M=document.createElement("div");M.style.left="0px";M.style.right="0px";M.style.marginTop=
-"6px";M.style.padding="0 6px 0 6px";M.style.textAlign="center";O.appendChild(M);var N=mxUtils.button(mxResources.get("reset"),function(){E.innerHTML="";u.value="";u.style.backgroundColor="";n&&(D.value="",d());p=q=null;y=!1;u.focus()});N.setAttribute("title",mxResources.get("reset"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow="ellipsis";N.className="geBtn";n||M.appendChild(N);var I=mxUtils.button(mxResources.get("find"),
-function(){try{u.style.backgroundColor=g()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){b.handleError(U)}});I.setAttribute("title",mxResources.get("find")+" (Enter)");I.style.float="none";I.style.width="120px";I.style.marginTop="6px";I.style.marginLeft="8px";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.className="geBtn gePrimaryBtn";M.appendChild(I);var E=document.createElement("div");E.style.marginTop="10px";if(n){var H=function(U,X,t,F,K){if(null==K||"1"!=K.html)return F=U.toLowerCase().indexOf(X,
-F),0>F?U:U.substr(0,F)+t+U.substr(F+X.length);var T=U;X=mxUtils.htmlEntities(X);K=[];var P=-1;for(U=U.replace(/<br>/ig,"\n");-1<(P=U.indexOf("<",P+1));)K.push(P);P=U.match(/<[^>]*>/g);U=U.replace(/<[^>]*>/g,"");F=U.toLowerCase().indexOf(X,F);if(0>F)return T;T=F+X.length;t=mxUtils.htmlEntities(t);U=U.substr(0,F)+t+U.substr(T);for(var Q=0,S=0;S<K.length;S++){if(K[S]-Q<F)U=U.substr(0,K[S])+P[S]+U.substr(K[S]);else{var Y=K[S]-Q<T?F+Q:K[S]+(t.length-X.length);U=U.substr(0,Y)+P[S]+U.substr(Y)}Q+=P[S].length}return U.replace(/\n/g,
+"6px";M.style.padding="0 6px 0 6px";M.style.textAlign="center";O.appendChild(M);var N=mxUtils.button(mxResources.get("reset"),function(){F.innerHTML="";u.value="";u.style.backgroundColor="";n&&(D.value="",d());p=q=null;y=!1;u.focus()});N.setAttribute("title",mxResources.get("reset"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow="ellipsis";N.className="geBtn";n||M.appendChild(N);var I=mxUtils.button(mxResources.get("find"),
+function(){try{u.style.backgroundColor=g()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){b.handleError(U)}});I.setAttribute("title",mxResources.get("find")+" (Enter)");I.style.float="none";I.style.width="120px";I.style.marginTop="6px";I.style.marginLeft="8px";I.style.overflow="hidden";I.style.textOverflow="ellipsis";I.className="geBtn gePrimaryBtn";M.appendChild(I);var F=document.createElement("div");F.style.marginTop="10px";if(n){var H=function(U,X,t,E,K){if(null==K||"1"!=K.html)return E=U.toLowerCase().indexOf(X,
+E),0>E?U:U.substr(0,E)+t+U.substr(E+X.length);var T=U;X=mxUtils.htmlEntities(X);K=[];var P=-1;for(U=U.replace(/<br>/ig,"\n");-1<(P=U.indexOf("<",P+1));)K.push(P);P=U.match(/<[^>]*>/g);U=U.replace(/<[^>]*>/g,"");E=U.toLowerCase().indexOf(X,E);if(0>E)return T;T=E+X.length;t=mxUtils.htmlEntities(t);U=U.substr(0,E)+t+U.substr(T);for(var Q=0,S=0;S<K.length;S++){if(K[S]-Q<E)U=U.substr(0,K[S])+P[S]+U.substr(K[S]);else{var Y=K[S]-Q<T?E+Q:K[S]+(t.length-X.length);U=U.substr(0,Y)+P[S]+U.substr(Y)}Q+=P[S].length}return U.replace(/\n/g,
"<br>")},R=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=z&&null!=q&&D.value){var U=q.cell,X=l.getLabel(U);l.isCellEditable(U)&&l.model.setValue(U,H(X,z,D.value,A-z.length,l.getCurrentCellStyle(U)));u.style.backgroundColor=g(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(t){b.handleError(t)}});R.setAttribute("title",mxResources.get("replFind"));R.style.float="none";R.style.width="120px";R.style.marginTop="6px";R.style.marginLeft="8px";R.style.overflow="hidden";R.style.textOverflow=
"ellipsis";R.className="geBtn gePrimaryBtn";R.setAttribute("disabled","disabled");M.appendChild(R);mxUtils.br(M);var W=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=z&&null!=q&&D.value){var U=q.cell,X=l.getLabel(U);l.model.setValue(U,H(X,z,D.value,A-z.length,l.getCurrentCellStyle(U)));R.setAttribute("disabled","disabled");W.setAttribute("disabled","disabled")}}catch(t){b.handleError(t)}});W.setAttribute("title",mxResources.get("replace"));W.style.float="none";W.style.width="120px";
-W.style.marginTop="6px";W.style.marginLeft="8px";W.style.overflow="hidden";W.style.textOverflow="ellipsis";W.className="geBtn gePrimaryBtn";W.setAttribute("disabled","disabled");M.appendChild(W);var J=mxUtils.button(mxResources.get("replaceAll"),function(){E.innerHTML="";if(D.value){p=null;var U=b.currentPage,X=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;l.getModel().beginUpdate();try{for(var t=0,F={};g(!1,!0,!0)&&100>t;){var K=q.cell,T=l.getLabel(K),P=F[K.id];if(P&&P.replAllMrk==
-L&&P.replAllPos>=A)break;F[K.id]={replAllMrk:L,replAllPos:A};l.isCellEditable(K)&&(l.model.setValue(K,H(T,z,D.value,A-z.length,l.getCurrentCellStyle(K))),t++)}U!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,U));mxUtils.write(E,mxResources.get("matchesRepl",[t]))}catch(Q){b.handleError(Q)}finally{l.getModel().endUpdate(),b.editor.graph.setSelectionCells(X),b.editor.graph.rendering=!0}L++}});J.setAttribute("title",mxResources.get("replaceAll"));J.style.float="none";J.style.width="120px";
+W.style.marginTop="6px";W.style.marginLeft="8px";W.style.overflow="hidden";W.style.textOverflow="ellipsis";W.className="geBtn gePrimaryBtn";W.setAttribute("disabled","disabled");M.appendChild(W);var J=mxUtils.button(mxResources.get("replaceAll"),function(){F.innerHTML="";if(D.value){p=null;var U=b.currentPage,X=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;l.getModel().beginUpdate();try{for(var t=0,E={};g(!1,!0,!0)&&100>t;){var K=q.cell,T=l.getLabel(K),P=E[K.id];if(P&&P.replAllMrk==
+L&&P.replAllPos>=A)break;E[K.id]={replAllMrk:L,replAllPos:A};l.isCellEditable(K)&&(l.model.setValue(K,H(T,z,D.value,A-z.length,l.getCurrentCellStyle(K))),t++)}U!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,U));mxUtils.write(F,mxResources.get("matchesRepl",[t]))}catch(Q){b.handleError(Q)}finally{l.getModel().endUpdate(),b.editor.graph.setSelectionCells(X),b.editor.graph.rendering=!0}L++}});J.setAttribute("title",mxResources.get("replaceAll"));J.style.float="none";J.style.width="120px";
J.style.marginTop="6px";J.style.marginLeft="8px";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.className="geBtn gePrimaryBtn";J.setAttribute("disabled","disabled");M.appendChild(J);mxUtils.br(M);M.appendChild(N);N=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));N.setAttribute("title",mxResources.get("close"));N.style.float="none";N.style.width="120px";N.style.marginTop="6px";N.style.marginLeft="8px";N.style.overflow="hidden";N.style.textOverflow=
-"ellipsis";N.className="geBtn";M.appendChild(N);mxUtils.br(M);M.appendChild(E)}else N.style.width="90px",I.style.width="90px";mxEvent.addListener(u,"keyup",function(U){if(91==U.keyCode||93==U.keyCode||17==U.keyCode)mxEvent.consume(U);else if(27==U.keyCode)k.funct();else if(p!=u.value.toLowerCase()||13==U.keyCode)try{u.style.backgroundColor=g()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(X){u.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(O,"keydown",function(U){70==
+"ellipsis";N.className="geBtn";M.appendChild(N);mxUtils.br(M);M.appendChild(F)}else N.style.width="90px",I.style.width="90px";mxEvent.addListener(u,"keyup",function(U){if(91==U.keyCode||93==U.keyCode||17==U.keyCode)mxEvent.consume(U);else if(27==U.keyCode)k.funct();else if(p!=u.value.toLowerCase()||13==U.keyCode)try{u.style.backgroundColor=g()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(X){u.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(O,"keydown",function(U){70==
U.keyCode&&b.keyHandler.isControlDown(U)&&!mxEvent.isShiftDown(U)&&(k.funct(),mxEvent.consume(U))});this.window=new mxWindow(mxResources.get("find")+(n?"/"+mxResources.get("replace"):""),O,e,f,c,m,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(u.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():
document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?C.removeAttribute("disabled"):(C.checked=!1,C.setAttribute("disabled","disabled"))):l.container.focus()}));this.window.setLocation=function(U,X){var t=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;U=Math.max(0,Math.min(U,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));X=Math.max(0,Math.min(X,t-this.table.clientHeight-("1"==
urlParams.sketch?3:48)));this.getX()==U&&this.getY()==X||mxWindow.prototype.setLocation.apply(this,arguments)};var V=mxUtils.bind(this,function(){var U=this.window.getX(),X=this.window.getY();this.window.setLocation(U,X)});mxEvent.addListener(window,"resize",V);this.destroy=function(){mxEvent.removeListener(window,"resize",V);this.window.destroy()}},FreehandWindow=function(b,e,f,c,m,n){var v=b.editor.graph;b=document.createElement("div");b.style.textAlign="center";b.style.userSelect="none";b.style.overflow=
@@ -11276,16 +11276,16 @@ var v="Unknown",d=document.createElement("img");d.setAttribute("border","0");d.s
(v=mxResources.get("gitlab"),d.src=IMAGE_PATH+"/gitlab-logo.svg",d.style.width="32px"):e==b.trello&&(v=mxResources.get("trello"),d.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[v]));var g=document.createElement("input");g.setAttribute("type","checkbox");v=mxUtils.button(mxResources.get("authorize"),function(){c(g.checked)});v.insertBefore(d,v.firstChild);v.style.marginTop="6px";v.className="geBigButton";v.style.fontSize=
"18px";v.style.padding="14px";m.appendChild(n);m.appendChild(b);m.appendChild(v);f&&(f=document.createElement("p"),f.style.marginTop="20px",f.appendChild(g),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberMe")),f.appendChild(n),m.appendChild(f),g.checked=!0,g.defaultChecked=!0,mxEvent.addListener(n,"click",function(k){g.checked=!g.checked;mxEvent.consume(k)}));this.container=m},MoreShapesDialog=function(b,e,f){f=null!=f?f:b.sidebar.entries;var c=document.createElement("div"),
m=[];if(null!=b.sidebar.customEntries)for(var n=0;n<b.sidebar.customEntries.length;n++){for(var v=b.sidebar.customEntries[n],d={title:b.getResource(v.title),entries:[]},g=0;g<v.entries.length;g++){var k=v.entries[g];d.entries.push({id:k.id,title:b.getResource(k.title),desc:b.getResource(k.desc),image:k.preview})}m.push(d)}for(n=0;n<f.length;n++)if(null==b.sidebar.enabledLibraries)m.push(f[n]);else{d={title:f[n].title,entries:[]};for(g=0;g<f[n].entries.length;g++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,
-f[n].entries[g].id)&&d.entries.push(f[n].entries[g]);0<d.entries.length&&m.push(d)}f=m;if(e){n=mxUtils.bind(this,function(B){for(var C=0;C<B.length;C++)(function(G){var N=y.cloneNode(!1);N.style.fontWeight="bold";N.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";N.style.padding="6px 0px 6px 20px";mxUtils.write(N,G.title);l.appendChild(N);for(var I=0;I<G.entries.length;I++)(function(E){var H=y.cloneNode(!1);H.style.cursor="pointer";H.style.padding="4px 0px 4px 20px";H.style.whiteSpace=
-"nowrap";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.setAttribute("title",E.title+" ("+E.id+")");var R=document.createElement("input");R.setAttribute("type","checkbox");R.checked=b.sidebar.isEntryVisible(E.id);R.defaultChecked=R.checked;H.appendChild(R);mxUtils.write(H," "+E.title);l.appendChild(H);var W=function(J){if(null==J||"INPUT"!=mxEvent.getSource(J).nodeName){p.style.textAlign="center";p.style.padding="0px";p.style.color="";p.innerHTML="";if(null!=E.desc){var V=document.createElement("pre");
-V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,E.desc);p.appendChild(V)}null!=E.imageCallback?E.imageCallback(p):null!=E.image?p.innerHTML+='<img border="0" src="'+E.image+'"/>':null==E.desc&&(p.style.padding="20px",p.style.color="rgb(179, 179, 179)",mxUtils.write(p,mxResources.get("noPreview")));null!=q&&(q.style.backgroundColor="");q=H;q.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=
-J&&mxEvent.consume(J)}};mxEvent.addListener(H,"click",W);mxEvent.addListener(H,"dblclick",function(J){R.checked=!R.checked;mxEvent.consume(J)});x.push(function(){return R.checked?E.id:null});0==C&&0==I&&W()})(G.entries[I])})(B[C])});g=document.createElement("div");g.className="geDialogTitle";mxUtils.write(g,mxResources.get("shapes"));g.style.position="absolute";g.style.top="0px";g.style.left="0px";g.style.lineHeight="40px";g.style.height="40px";g.style.right="0px";var l=document.createElement("div"),
+f[n].entries[g].id)&&d.entries.push(f[n].entries[g]);0<d.entries.length&&m.push(d)}f=m;if(e){n=mxUtils.bind(this,function(B){for(var C=0;C<B.length;C++)(function(G){var N=y.cloneNode(!1);N.style.fontWeight="bold";N.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";N.style.padding="6px 0px 6px 20px";mxUtils.write(N,G.title);l.appendChild(N);for(var I=0;I<G.entries.length;I++)(function(F){var H=y.cloneNode(!1);H.style.cursor="pointer";H.style.padding="4px 0px 4px 20px";H.style.whiteSpace=
+"nowrap";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.setAttribute("title",F.title+" ("+F.id+")");var R=document.createElement("input");R.setAttribute("type","checkbox");R.checked=b.sidebar.isEntryVisible(F.id);R.defaultChecked=R.checked;H.appendChild(R);mxUtils.write(H," "+F.title);l.appendChild(H);var W=function(J){if(null==J||"INPUT"!=mxEvent.getSource(J).nodeName){p.style.textAlign="center";p.style.padding="0px";p.style.color="";p.innerHTML="";if(null!=F.desc){var V=document.createElement("pre");
+V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,F.desc);p.appendChild(V)}null!=F.imageCallback?F.imageCallback(p):null!=F.image?p.innerHTML+='<img border="0" src="'+F.image+'"/>':null==F.desc&&(p.style.padding="20px",p.style.color="rgb(179, 179, 179)",mxUtils.write(p,mxResources.get("noPreview")));null!=q&&(q.style.backgroundColor="");q=H;q.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=
+J&&mxEvent.consume(J)}};mxEvent.addListener(H,"click",W);mxEvent.addListener(H,"dblclick",function(J){R.checked=!R.checked;mxEvent.consume(J)});x.push(function(){return R.checked?F.id:null});0==C&&0==I&&W()})(G.entries[I])})(B[C])});g=document.createElement("div");g.className="geDialogTitle";mxUtils.write(g,mxResources.get("shapes"));g.style.position="absolute";g.style.top="0px";g.style.left="0px";g.style.lineHeight="40px";g.style.height="40px";g.style.right="0px";var l=document.createElement("div"),
p=document.createElement("div");l.style.position="absolute";l.style.top="40px";l.style.left="0px";l.style.width="202px";l.style.bottom="60px";l.style.overflow="auto";p.style.position="absolute";p.style.left="202px";p.style.right="0px";p.style.top="40px";p.style.bottom="60px";p.style.overflow="auto";p.style.borderLeft="1px solid rgb(211, 211, 211)";p.style.textAlign="center";var q=null,x=[],y=document.createElement("div");y.style.position="relative";y.style.left="0px";y.style.right="0px";n(f);c.style.padding=
"30px";c.appendChild(g);c.appendChild(l);c.appendChild(p);f=document.createElement("div");f.className="geDialogFooter";f.style.position="absolute";f.style.paddingRight="16px";f.style.color="gray";f.style.left="0px";f.style.right="0px";f.style.bottom="0px";f.style.height="60px";f.style.lineHeight="52px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.position="relative";z.style.top="1px";z.checked=b.sidebar.sidebarTitles;z.defaultChecked=z.checked;f.appendChild(z);n=
document.createElement("span");mxUtils.write(n," "+mxResources.get("labels"));n.style.paddingRight="20px";f.appendChild(n);mxEvent.addListener(n,"click",function(B){z.checked=!z.checked;mxEvent.consume(B)});var A=document.createElement("input");A.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)n=document.createElement("span"),n.style.paddingRight="20px",n.appendChild(A),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),A.style.position="relative",A.style.top="1px",
A.checked=!0,A.defaultChecked=!0,mxEvent.addListener(n,"click",function(B){mxEvent.getSource(B)!=A&&(A.checked=!A.checked,mxEvent.consume(B))}),f.appendChild(n);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var B=[],C=0;C<x.length;C++){var G=x[C].apply(this,arguments);null!=G&&B.push(G)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(C=mxUtils.indexOf(B,".scratchpad"),null!=b.scratchpad!=
(0<=C&&0<B.splice(C,1).length)&&b.toggleScratchpad(),C=mxUtils.indexOf(B,"search"),mxSettings.settings.search=0<=C&&0<B.splice(C,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),A.checked&&mxSettings.save());b.sidebar.showEntries(B.join(";"),A.checked,!0);b.setSidebarTitles(z.checked,A.checked)});g.className="geBtn gePrimaryBtn"}else{var L=document.createElement("table");n=document.createElement("tbody");c.style.height="100%";c.style.overflow="auto";g=document.createElement("tr");
-L.style.width="100%";e=document.createElement("td");m=document.createElement("td");v=document.createElement("td");var O=mxUtils.bind(this,function(B,C,G){var N=document.createElement("input");N.type="checkbox";L.appendChild(N);N.checked=b.sidebar.isEntryVisible(G);var I=document.createElement("span");mxUtils.write(I,C);C=document.createElement("div");C.style.display="block";C.appendChild(N);C.appendChild(I);mxEvent.addListener(I,"click",function(E){N.checked=!N.checked;mxEvent.consume(E)});B.appendChild(C);
+L.style.width="100%";e=document.createElement("td");m=document.createElement("td");v=document.createElement("td");var O=mxUtils.bind(this,function(B,C,G){var N=document.createElement("input");N.type="checkbox";L.appendChild(N);N.checked=b.sidebar.isEntryVisible(G);var I=document.createElement("span");mxUtils.write(I,C);C=document.createElement("div");C.style.display="block";C.appendChild(N);C.appendChild(I);mxEvent.addListener(I,"click",function(F){N.checked=!N.checked;mxEvent.consume(F)});B.appendChild(C);
return function(){return N.checked?G:null}});g.appendChild(e);g.appendChild(m);g.appendChild(v);n.appendChild(g);L.appendChild(n);x=[];var M=0;for(n=0;n<f.length;n++)for(g=0;g<f[n].entries.length;g++)M++;var u=[e,m,v],D=0;for(n=0;n<f.length;n++)(function(B){for(var C=0;C<B.entries.length;C++){var G=B.entries[C];x.push(O(u[Math.floor(D/(M/3))],G.title,G.id));D++}})(f[n]);c.appendChild(L);f=document.createElement("div");f.style.marginTop="18px";f.style.textAlign="center";A=document.createElement("input");
isLocalStorage&&(A.setAttribute("type","checkbox"),A.checked=!0,A.defaultChecked=!0,f.appendChild(A),n=document.createElement("span"),mxUtils.write(n," "+mxResources.get("rememberThisSetting")),f.appendChild(n),mxEvent.addListener(n,"click",function(B){A.checked=!A.checked;mxEvent.consume(B)}));c.appendChild(f);n=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});n.className="geBtn";g=mxUtils.button(mxResources.get("apply"),function(){for(var B=["search"],C=0;C<x.length;C++){var G=
x[C].apply(this,arguments);null!=G&&B.push(G)}b.sidebar.showEntries(0<B.length?B.join(";"):"",A.checked);b.hideDialog()});g.className="geBtn gePrimaryBtn";f=document.createElement("div");f.style.marginTop="26px";f.style.textAlign="right"}b.editor.cancelFirst?(f.appendChild(n),f.appendChild(g)):(f.appendChild(g),f.appendChild(n));c.appendChild(f);this.container=c},PluginsDialog=function(b,e,f,c){function m(){g=!0;if(0==d.length)v.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{v.innerHTML=
@@ -11294,12 +11294,12 @@ f(d[L]);d.splice(L,1);m()})}}(y))}}}var n=document.createElement("div"),v=docume
y.appendChild(z);var A=document.createElement("select");A.style.width="150px";for(z=0;z<App.publicPlugin.length;z++){var L=document.createElement("option");mxUtils.write(L,App.publicPlugin[z]);L.value=App.publicPlugin[z];A.appendChild(L)}y.appendChild(A);mxUtils.br(y);mxUtils.br(y);z=mxUtils.button(mxResources.get("custom")+"...",function(){var O=new FilenameDialog(b,"",mxResources.get("add"),function(M){b.hideDialog();if(null!=M&&0<M.length){M=M.split(";");for(var u=0;u<M.length;u++){var D=M[u],
B=App.pluginRegistry[D];null!=B&&(D=B);0<D.length&&0>mxUtils.indexOf(d,D)&&d.push(D)}m()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(O.container,300,80,!0,!0);O.init()});z.className="geBtn";y=new CustomDialog(b,y,mxUtils.bind(this,function(){var O=App.pluginRegistry[A.value];0>mxUtils.indexOf(d,O)&&(d.push(O),m())}),null,null,null,z);b.showDialog(y.container,300,100,!0,!0)});k.className="geBtn";var l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
l.className="geBtn";var p=mxUtils.button(c?mxResources.get("close"):mxResources.get("apply"),function(){g?(mxSettings.setPlugins(d),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});p.className="geBtn gePrimaryBtn";var q=document.createElement("div");q.style.marginTop="14px";q.style.textAlign="right";var x=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});x.className="geBtn";b.isOffline()&&
-!mxClient.IS_CHROMEAPP&&(x.style.display="none");q.appendChild(x);b.editor.cancelFirst?(c||q.appendChild(l),q.appendChild(k),q.appendChild(p)):(q.appendChild(k),q.appendChild(p),c||q.appendChild(l));n.appendChild(q);this.container=n},CropImageDialog=function(b,e,f,c){function m(){var B=A.checked,C=L.checked,G=x.geometry,N=g.width,I=g.height,E=(300-N)/2,H=(300-I)/2;G.x<E?(G.width-=E-G.x,G.x=E):G.x+G.width>E+N&&(G.width=E+N-G.x,G.x=Math.min(G.x,E+N));G.y<H?(G.height-=H-G.y,G.y=H):G.y+G.height>H+I&&
-(G.height=H+I-G.y,G.y=Math.min(G.y,H+I));var R=(G.x-E)/N*100;N=100-(G.x+G.width-E)/N*100;E=(G.y-H)/I*100;G=100-(G.y+G.height-H)/I*100;return"inset("+mxUtils.format(E)+"% "+mxUtils.format(N)+"% "+mxUtils.format(G)+"% "+mxUtils.format(R)+"%"+(B?" round "+q+"%":C?" round 50%":"")+")"}function n(B){null!=l&&(!0!==B&&(l.model.setGeometry(x,p.clone()),q=5,M.value=q),l.model.setStyle(x,y+m()),l.selectAll(),O.style.visibility=A.checked?"visible":"hidden")}var v=document.createElement("div"),d=document.createElement("div");
+!mxClient.IS_CHROMEAPP&&(x.style.display="none");q.appendChild(x);b.editor.cancelFirst?(c||q.appendChild(l),q.appendChild(k),q.appendChild(p)):(q.appendChild(k),q.appendChild(p),c||q.appendChild(l));n.appendChild(q);this.container=n},CropImageDialog=function(b,e,f,c){function m(){var B=A.checked,C=L.checked,G=x.geometry,N=g.width,I=g.height,F=(300-N)/2,H=(300-I)/2;G.x<F?(G.width-=F-G.x,G.x=F):G.x+G.width>F+N&&(G.width=F+N-G.x,G.x=Math.min(G.x,F+N));G.y<H?(G.height-=H-G.y,G.y=H):G.y+G.height>H+I&&
+(G.height=H+I-G.y,G.y=Math.min(G.y,H+I));var R=(G.x-F)/N*100;N=100-(G.x+G.width-F)/N*100;F=(G.y-H)/I*100;G=100-(G.y+G.height-H)/I*100;return"inset("+mxUtils.format(F)+"% "+mxUtils.format(N)+"% "+mxUtils.format(G)+"% "+mxUtils.format(R)+"%"+(B?" round "+q+"%":C?" round 50%":"")+")"}function n(B){null!=l&&(!0!==B&&(l.model.setGeometry(x,p.clone()),q=5,M.value=q),l.model.setStyle(x,y+m()),l.selectAll(),O.style.visibility=A.checked?"visible":"hidden")}var v=document.createElement("div"),d=document.createElement("div");
d.style.height="300px";d.style.width="300px";d.style.display="inline-flex";d.style.justifyContent="center";d.style.alignItems="center";d.style.position="absolute";var g=document.createElement("img");g.onload=function(){function B(){l.model.setStyle(x,y+m())}l=new Graph(k);l.autoExtend=!1;l.autoScroll=!1;l.setGridEnabled(!1);l.setEnabled(!0);l.setPanning(!1);l.setConnectable(!1);l.getRubberband().setEnabled(!1);l.graphHandler.allowLivePreview=!1;var C=l.createVertexHandler;l.createVertexHandler=function(){var K=
-C.apply(this,arguments);K.livePreview=!1;return K};if(null!=f)try{if("inset"==f.substring(0,5)){var G=x.geometry,N=g.width,I=g.height,E=(300-N)/2,H=(300-I)/2,R=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),W=parseFloat(R[0]),J=parseFloat(R[1]),V=parseFloat(R[2]),U=parseFloat(R[3]);isFinite(W)&&isFinite(J)&&isFinite(V)&&isFinite(U)?(G.x=U/100*N+E,G.y=W/100*I+H,G.width=(100-J)/100*N+E-G.x,G.height=(100-V)/100*I+H-G.y,"round"==R[4]?"50%"==R[5]?L.setAttribute("checked","checked"):(q=parseInt(R[5]),M.value=
+C.apply(this,arguments);K.livePreview=!1;return K};if(null!=f)try{if("inset"==f.substring(0,5)){var G=x.geometry,N=g.width,I=g.height,F=(300-N)/2,H=(300-I)/2,R=f.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),W=parseFloat(R[0]),J=parseFloat(R[1]),V=parseFloat(R[2]),U=parseFloat(R[3]);isFinite(W)&&isFinite(J)&&isFinite(V)&&isFinite(U)?(G.x=U/100*N+F,G.y=W/100*I+H,G.width=(100-J)/100*N+F-G.x,G.height=(100-V)/100*I+H-G.y,"round"==R[4]?"50%"==R[5]?L.setAttribute("checked","checked"):(q=parseInt(R[5]),M.value=
q,A.setAttribute("checked","checked"),O.style.visibility="visible"):z.setAttribute("checked","checked")):f=null}else f=null}catch(K){}x.style=y+(f?f:m());x.vertex=!0;l.addCell(x,null,null,null,null);l.selectAll();l.addListener(mxEvent.CELLS_MOVED,B);l.addListener(mxEvent.CELLS_RESIZED,B);var X=l.graphHandler.mouseUp,t=l.graphHandler.mouseDown;l.graphHandler.mouseUp=function(){X.apply(this,arguments);k.style.backgroundColor="#fff9"};l.graphHandler.mouseDown=function(){t.apply(this,arguments);k.style.backgroundColor=
-""};l.dblClick=function(){};var F=l.getSelectionModel().changeSelection;l.getSelectionModel().changeSelection=function(){F.call(this,[x],[x])}};g.onerror=function(){g.onload=null;g.src=Editor.errorImage};g.setAttribute("src",e);g.style.maxWidth="300px";g.style.maxHeight="300px";d.appendChild(g);v.appendChild(d);var k=document.createElement("div");k.style.width="300px";k.style.height="300px";k.style.overflow="hidden";k.style.backgroundColor="#fff9";v.appendChild(k);var l=null,p=new mxGeometry(100,
+""};l.dblClick=function(){};var E=l.getSelectionModel().changeSelection;l.getSelectionModel().changeSelection=function(){E.call(this,[x],[x])}};g.onerror=function(){g.onload=null;g.src=Editor.errorImage};g.setAttribute("src",e);g.style.maxWidth="300px";g.style.maxHeight="300px";d.appendChild(g);v.appendChild(d);var k=document.createElement("div");k.style.width="300px";k.style.height="300px";k.style.overflow="hidden";k.style.backgroundColor="#fff9";v.appendChild(k);var l=null,p=new mxGeometry(100,
100,100,100),q=5,x=new mxCell("",p.clone(),""),y="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+e.replace(";base64","")+";clipPath=",z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingRect");z.setAttribute("name","croppingShape");z.setAttribute("checked","checked");z.style.margin="5px";v.appendChild(z);e=document.createElement("label");e.setAttribute("for","croppingRect");mxUtils.write(e,mxResources.get("rectangle"));v.appendChild(e);
var A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingRounded");A.setAttribute("name","croppingShape");A.style.margin="5px";v.appendChild(A);e=document.createElement("label");e.setAttribute("for","croppingRounded");mxUtils.write(e,mxResources.get("rounded"));v.appendChild(e);var L=document.createElement("input");L.setAttribute("type","radio");L.setAttribute("id","croppingEllipse");L.setAttribute("name","croppingShape");L.style.margin="5px";v.appendChild(L);
e=document.createElement("label");e.setAttribute("for","croppingEllipse");mxUtils.write(e,mxResources.get("ellipse"));v.appendChild(e);mxEvent.addListener(z,"change",n);mxEvent.addListener(A,"change",n);mxEvent.addListener(L,"change",n);var O=document.createElement("div");O.style.textAlign="center";O.style.visibility="hidden";var M=document.createElement("input");M.setAttribute("type","range");M.setAttribute("min","1");M.setAttribute("max","49");M.setAttribute("value",q);M.setAttribute("title",mxResources.get("arcSize"));
@@ -11313,28 +11313,28 @@ document.createElement("td");mxUtils.write(g,mxResources.get("height")+":");var
1==e.length?mxUtils.getValue(f.getCellStyle(e[0]),mxConstants.STYLE_ROTATION,0):"";k.appendChild(L);d.appendChild(g);d.appendChild(k);v.appendChild(d);n.appendChild(v);m.appendChild(n);c=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});c.className="geBtn";var O=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();f.getModel().beginUpdate();try{for(var M=0;M<e.length;M++){var u=f.getCellGeometry(e[M]);null!=u&&(u=u.clone(),f.isCellMovable(e[M])&&(u.relative=l.checked,
0<mxUtils.trim(p.value).length&&(u.x=Number(p.value)),0<mxUtils.trim(q.value).length&&(u.y=Number(q.value)),0<mxUtils.trim(x.value).length&&(null==u.offset&&(u.offset=new mxPoint),u.offset.x=Number(x.value)),0<mxUtils.trim(y.value).length&&(null==u.offset&&(u.offset=new mxPoint),u.offset.y=Number(y.value))),f.isCellResizable(e[M])&&(0<mxUtils.trim(z.value).length&&(u.width=Number(z.value)),0<mxUtils.trim(A.value).length&&(u.height=Number(A.value))),f.getModel().setGeometry(e[M],u));0<mxUtils.trim(L.value).length&&
f.setCellStyles(mxConstants.STYLE_ROTATION,Number(L.value),[e[M]])}}finally{f.getModel().endUpdate()}});O.className="geBtn gePrimaryBtn";mxEvent.addListener(m,"keypress",function(M){13==M.keyCode&&O.click()});n=document.createElement("div");n.style.marginTop="20px";n.style.textAlign="right";b.editor.cancelFirst?(n.appendChild(c),n.appendChild(O)):(n.appendChild(O),n.appendChild(c));m.appendChild(n);this.container=m},LibraryDialog=function(b,e,f,c,m,n){function v(C){for(C=document.elementFromPoint(C.clientX,
-C.clientY);null!=C&&C.parentNode!=x;)C=C.parentNode;var G=null;if(null!=C){var N=x.firstChild;for(G=0;null!=N&&N!=C;)N=N.nextSibling,G++}return G}function d(C,G,N,I,E,H,R,W,J){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==C&&null!=R||null==z[C]){var V=function(){Q.innerHTML="";Q.style.cursor="pointer";Q.style.whiteSpace="nowrap";Q.style.textOverflow="ellipsis";mxUtils.write(Q,null!=S.title&&0<S.title.length?S.title:mxResources.get("untitled"));Q.style.color=null==S.title||0==
-S.title.length?"#d0d0d0":""};x.style.backgroundImage="";y.style.display="none";var U=E,X=H;if(E>b.maxImageSize||H>b.maxImageSize){var t=Math.min(1,Math.min(b.maxImageSize/Math.max(1,E)),b.maxImageSize/Math.max(1,H));E*=t;H*=t}U>X?(X=Math.round(100*X/U),U=100):(U=Math.round(100*U/X),X=100);var F=document.createElement("div");F.setAttribute("draggable","true");F.style.display="inline-block";F.style.position="relative";F.style.padding="0 12px";F.style.cursor="move";mxUtils.setPrefixedStyle(F.style,"transition",
-"transform .1s ease-in-out");if(null!=C){var K=document.createElement("img");K.setAttribute("src",M.convert(C));K.style.width=U+"px";K.style.height=X+"px";K.style.margin="10px";K.style.paddingBottom=Math.floor((100-X)/2)+"px";K.style.paddingLeft=Math.floor((100-U)/2)+"px";F.appendChild(K)}else if(null!=R){var T=b.stringToCells(Graph.decompress(R.xml));0<T.length&&(b.sidebar.createThumb(T,100,100,F,null,!0,!1),F.firstChild.style.display="inline-block",F.firstChild.style.cursor="")}var P=document.createElement("img");
-P.setAttribute("src",Editor.closeBlackImage);P.setAttribute("border","0");P.setAttribute("title",mxResources.get("delete"));P.setAttribute("align","top");P.style.paddingTop="4px";P.style.position="absolute";P.style.marginLeft="-12px";P.style.zIndex="1";P.style.cursor="pointer";mxEvent.addListener(P,"dragstart",function(Z){mxEvent.consume(Z)});(function(Z,ha,aa){mxEvent.addListener(P,"click",function(ua){z[ha]=null;for(var ka=0;ka<l.length;ka++)if(null!=l[ka].data&&l[ka].data==ha||null!=l[ka].xml&&
-null!=aa&&l[ka].xml==aa.xml){l.splice(ka,1);break}F.parentNode.removeChild(Z);0==l.length&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",y.style.display="");mxEvent.consume(ua)});mxEvent.addListener(P,"dblclick",function(ua){mxEvent.consume(ua)})})(F,C,R);F.appendChild(P);F.style.marginBottom="30px";var Q=document.createElement("div");Q.style.position="absolute";Q.style.boxSizing="border-box";Q.style.bottom="-18px";Q.style.left="10px";Q.style.right="10px";Q.style.backgroundColor=
-Editor.isDarkMode()?Editor.darkColor:"#ffffff";Q.style.overflow="hidden";Q.style.textAlign="center";var S=null;null!=C?(S={data:C,w:E,h:H,title:J},null!=W&&(S.aspect=W),z[C]=K,l.push(S)):null!=R&&(R.aspect="fixed",l.push(R),S=R);mxEvent.addListener(Q,"keydown",function(Z){13==Z.keyCode&&null!=O&&(O(),O=null,mxEvent.consume(Z))});V();F.appendChild(Q);mxEvent.addListener(Q,"mousedown",function(Z){"true"!=Q.getAttribute("contentEditable")&&mxEvent.consume(Z)});T=function(Z){if(mxClient.IS_IOS||mxClient.IS_FF||
-!(null==document.documentMode||9<document.documentMode)){var ha=new FilenameDialog(b,S.title||"",mxResources.get("ok"),function(aa){null!=aa&&(S.title=aa,V())},mxResources.get("enterValue"));b.showDialog(ha.container,300,80,!0,!0);ha.init();mxEvent.consume(Z)}else if("true"!=Q.getAttribute("contentEditable")){null!=O&&(O(),O=null);if(null==S.title||0==S.title.length)Q.innerHTML="";Q.style.textOverflow="";Q.style.whiteSpace="";Q.style.cursor="text";Q.style.color="";Q.setAttribute("contentEditable",
-"true");mxUtils.setPrefixedStyle(Q.style,"user-select","text");Q.focus();document.execCommand("selectAll",!1,null);O=function(){Q.removeAttribute("contentEditable");Q.style.cursor="pointer";S.title=Q.innerHTML;V()};mxEvent.consume(Z)}};mxEvent.addListener(Q,"click",T);mxEvent.addListener(F,"dblclick",T);x.appendChild(F);mxEvent.addListener(F,"dragstart",function(Z){null==C&&null!=R&&(P.style.visibility="hidden",Q.style.visibility="hidden");mxClient.IS_FF&&null!=R.xml&&Z.dataTransfer.setData("Text",
-R.xml);A=v(Z);mxClient.IS_GC&&(F.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(F.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(F,30);P.style.visibility="";Q.style.visibility=""},0)});mxEvent.addListener(F,"dragend",function(Z){"hidden"==P.style.visibility&&(P.style.visibility="",Q.style.visibility="");A=null;mxUtils.setOpacity(F,100);mxUtils.setPrefixedStyle(F.style,"transform",null)})}else u||(u=!0,b.handleError({message:mxResources.get("fileExists")}));else{E=
-!1;try{if(U=mxUtils.parseXml(C),"mxlibrary"==U.documentElement.nodeName){X=JSON.parse(mxUtils.getTextContent(U.documentElement));if(null!=X&&0<X.length)for(var Y=0;Y<X.length;Y++)null!=X[Y].xml?d(null,null,0,0,0,0,X[Y]):d(X[Y].data,null,0,0,X[Y].w,X[Y].h,null,"fixed",X[Y].title);E=!0}else if("mxfile"==U.documentElement.nodeName){var ca=U.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ca.length;Y++){X=mxUtils.getTextContent(ca[Y]);T=b.stringToCells(Graph.decompress(X));var da=b.editor.graph.getBoundingBoxFromGeometry(T);
-d(null,null,0,0,0,0,{xml:X,w:da.width,h:da.height})}E=!0}}catch(Z){}E||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function g(C){C.dataTransfer.dropEffect=null!=A?"move":"copy";C.stopPropagation();C.preventDefault()}function k(C){C.stopPropagation();C.preventDefault();u=!1;L=v(C);if(null!=A)null!=L&&L<x.children.length?(l.splice(L>A?L-1:L,0,l.splice(A,1)[0]),x.insertBefore(x.children[A],x.children[L])):(l.push(l.splice(A,1)[0]),x.appendChild(x.children[A]));
+C.clientY);null!=C&&C.parentNode!=x;)C=C.parentNode;var G=null;if(null!=C){var N=x.firstChild;for(G=0;null!=N&&N!=C;)N=N.nextSibling,G++}return G}function d(C,G,N,I,F,H,R,W,J){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==C&&null!=R||null==z[C]){var V=function(){Q.innerHTML="";Q.style.cursor="pointer";Q.style.whiteSpace="nowrap";Q.style.textOverflow="ellipsis";mxUtils.write(Q,null!=S.title&&0<S.title.length?S.title:mxResources.get("untitled"));Q.style.color=null==S.title||0==
+S.title.length?"#d0d0d0":""};x.style.backgroundImage="";y.style.display="none";var U=F,X=H;if(F>b.maxImageSize||H>b.maxImageSize){var t=Math.min(1,Math.min(b.maxImageSize/Math.max(1,F)),b.maxImageSize/Math.max(1,H));F*=t;H*=t}U>X?(X=Math.round(100*X/U),U=100):(U=Math.round(100*U/X),X=100);var E=document.createElement("div");E.setAttribute("draggable","true");E.style.display="inline-block";E.style.position="relative";E.style.padding="0 12px";E.style.cursor="move";mxUtils.setPrefixedStyle(E.style,"transition",
+"transform .1s ease-in-out");if(null!=C){var K=document.createElement("img");K.setAttribute("src",M.convert(C));K.style.width=U+"px";K.style.height=X+"px";K.style.margin="10px";K.style.paddingBottom=Math.floor((100-X)/2)+"px";K.style.paddingLeft=Math.floor((100-U)/2)+"px";E.appendChild(K)}else if(null!=R){var T=b.stringToCells(Graph.decompress(R.xml));0<T.length&&(b.sidebar.createThumb(T,100,100,E,null,!0,!1),E.firstChild.style.display="inline-block",E.firstChild.style.cursor="")}var P=document.createElement("img");
+P.setAttribute("src",Editor.closeBlackImage);P.setAttribute("border","0");P.setAttribute("title",mxResources.get("delete"));P.setAttribute("align","top");P.style.paddingTop="4px";P.style.position="absolute";P.style.marginLeft="-12px";P.style.zIndex="1";P.style.cursor="pointer";mxEvent.addListener(P,"dragstart",function(Z){mxEvent.consume(Z)});(function(Z,ja,ea){mxEvent.addListener(P,"click",function(ha){z[ja]=null;for(var ma=0;ma<l.length;ma++)if(null!=l[ma].data&&l[ma].data==ja||null!=l[ma].xml&&
+null!=ea&&l[ma].xml==ea.xml){l.splice(ma,1);break}E.parentNode.removeChild(Z);0==l.length&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",y.style.display="");mxEvent.consume(ha)});mxEvent.addListener(P,"dblclick",function(ha){mxEvent.consume(ha)})})(E,C,R);E.appendChild(P);E.style.marginBottom="30px";var Q=document.createElement("div");Q.style.position="absolute";Q.style.boxSizing="border-box";Q.style.bottom="-18px";Q.style.left="10px";Q.style.right="10px";Q.style.backgroundColor=
+Editor.isDarkMode()?Editor.darkColor:"#ffffff";Q.style.overflow="hidden";Q.style.textAlign="center";var S=null;null!=C?(S={data:C,w:F,h:H,title:J},null!=W&&(S.aspect=W),z[C]=K,l.push(S)):null!=R&&(R.aspect="fixed",l.push(R),S=R);mxEvent.addListener(Q,"keydown",function(Z){13==Z.keyCode&&null!=O&&(O(),O=null,mxEvent.consume(Z))});V();E.appendChild(Q);mxEvent.addListener(Q,"mousedown",function(Z){"true"!=Q.getAttribute("contentEditable")&&mxEvent.consume(Z)});T=function(Z){if(mxClient.IS_IOS||mxClient.IS_FF||
+!(null==document.documentMode||9<document.documentMode)){var ja=new FilenameDialog(b,S.title||"",mxResources.get("ok"),function(ea){null!=ea&&(S.title=ea,V())},mxResources.get("enterValue"));b.showDialog(ja.container,300,80,!0,!0);ja.init();mxEvent.consume(Z)}else if("true"!=Q.getAttribute("contentEditable")){null!=O&&(O(),O=null);if(null==S.title||0==S.title.length)Q.innerHTML="";Q.style.textOverflow="";Q.style.whiteSpace="";Q.style.cursor="text";Q.style.color="";Q.setAttribute("contentEditable",
+"true");mxUtils.setPrefixedStyle(Q.style,"user-select","text");Q.focus();document.execCommand("selectAll",!1,null);O=function(){Q.removeAttribute("contentEditable");Q.style.cursor="pointer";S.title=Q.innerHTML;V()};mxEvent.consume(Z)}};mxEvent.addListener(Q,"click",T);mxEvent.addListener(E,"dblclick",T);x.appendChild(E);mxEvent.addListener(E,"dragstart",function(Z){null==C&&null!=R&&(P.style.visibility="hidden",Q.style.visibility="hidden");mxClient.IS_FF&&null!=R.xml&&Z.dataTransfer.setData("Text",
+R.xml);A=v(Z);mxClient.IS_GC&&(E.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(E,30);P.style.visibility="";Q.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(Z){"hidden"==P.style.visibility&&(P.style.visibility="",Q.style.visibility="");A=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else u||(u=!0,b.handleError({message:mxResources.get("fileExists")}));else{F=
+!1;try{if(U=mxUtils.parseXml(C),"mxlibrary"==U.documentElement.nodeName){X=JSON.parse(mxUtils.getTextContent(U.documentElement));if(null!=X&&0<X.length)for(var Y=0;Y<X.length;Y++)null!=X[Y].xml?d(null,null,0,0,0,0,X[Y]):d(X[Y].data,null,0,0,X[Y].w,X[Y].h,null,"fixed",X[Y].title);F=!0}else if("mxfile"==U.documentElement.nodeName){var ba=U.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ba.length;Y++){X=mxUtils.getTextContent(ba[Y]);T=b.stringToCells(Graph.decompress(X));var da=b.editor.graph.getBoundingBoxFromGeometry(T);
+d(null,null,0,0,0,0,{xml:X,w:da.width,h:da.height})}F=!0}}catch(Z){}F||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function g(C){C.dataTransfer.dropEffect=null!=A?"move":"copy";C.stopPropagation();C.preventDefault()}function k(C){C.stopPropagation();C.preventDefault();u=!1;L=v(C);if(null!=A)null!=L&&L<x.children.length?(l.splice(L>A?L-1:L,0,l.splice(A,1)[0]),x.insertBefore(x.children[A],x.children[L])):(l.push(l.splice(A,1)[0]),x.appendChild(x.children[A]));
else if(0<C.dataTransfer.files.length)b.importFiles(C.dataTransfer.files,0,0,b.maxImageSize,D(C));else if(0<=mxUtils.indexOf(C.dataTransfer.types,"text/uri-list")){var G=decodeURIComponent(C.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(G)||/(\.png)($|\?)/i.test(G)||/(\.gif)($|\?)/i.test(G)||/(\.svg)($|\?)/i.test(G))&&b.loadImage(G,function(N){d(G,null,0,0,N.width,N.height);x.scrollTop=x.scrollHeight})}C.stopPropagation();C.preventDefault()}var l=[];f=document.createElement("div");
f.style.height="100%";var p=document.createElement("div");p.style.whiteSpace="nowrap";p.style.height="40px";f.appendChild(p);mxUtils.write(p,mxResources.get("filename")+":");null==e&&(e=b.defaultLibraryName+".xml");var q=document.createElement("input");q.setAttribute("value",e);q.style.marginRight="20px";q.style.marginLeft="10px";q.style.width="500px";null==m||m.isRenamable()||q.setAttribute("disabled","true");this.init=function(){if(null==m||m.isRenamable())q.focus(),mxClient.IS_GC||mxClient.IS_FF||
5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};p.appendChild(q);var x=document.createElement("div");x.style.borderWidth="1px 0px 1px 0px";x.style.borderColor="#d3d3d3";x.style.borderStyle="solid";x.style.marginTop="6px";x.style.overflow="auto";x.style.height="340px";x.style.backgroundPosition="center center";x.style.backgroundRepeat="no-repeat";0==l.length&&Graph.fileSupport&&(x.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var y=document.createElement("div");
y.style.position="absolute";y.style.width="640px";y.style.top="260px";y.style.textAlign="center";y.style.fontSize="22px";y.style.color="#a0c3ff";mxUtils.write(y,mxResources.get("dragImagesHere"));f.appendChild(y);var z={},A=null,L=null,O=null;e=function(C){"true"!=mxEvent.getSource(C).getAttribute("contentEditable")&&null!=O&&(O(),O=null,mxEvent.consume(C))};mxEvent.addListener(x,"mousedown",e);mxEvent.addListener(x,"pointerdown",e);mxEvent.addListener(x,"touchstart",e);var M=new mxUrlConverter,u=
-!1;if(null!=c)for(e=0;e<c.length;e++)p=c[e],d(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(x,"dragleave",function(C){y.style.cursor="";for(var G=mxEvent.getSource(C);null!=G;){if(G==x||G==y){C.stopPropagation();C.preventDefault();break}G=G.parentNode}});var D=function(C){return function(G,N,I,E,H,R,W,J,V){null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V.name)||/(\.vs(x|sx?))($|\?)/i.test(V.name))?b.importVisio(V,mxUtils.bind(this,function(U){d(U,N,I,E,H,R,W,"fixed",mxEvent.isAltDown(C)?
-null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," "))})):null!=V&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(G,V.name)?b.isExternalDataComms()?b.parseFile(V,mxUtils.bind(this,function(U){4==U.readyState&&(b.spinner.stop(),200<=U.status&&299>=U.status&&(d(U.responseText,N,I,E,H,R,W,"fixed",mxEvent.isAltDown(C)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
-(d(G,N,I,E,H,R,W,"fixed",mxEvent.isAltDown(C)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight)}};mxEvent.addListener(x,"dragover",g);mxEvent.addListener(x,"drop",k);mxEvent.addListener(y,"dragover",g);mxEvent.addListener(y,"drop",k);f.appendChild(x);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&
+!1;if(null!=c)for(e=0;e<c.length;e++)p=c[e],d(p.data,null,0,0,p.w,p.h,p,p.aspect,p.title);mxEvent.addListener(x,"dragleave",function(C){y.style.cursor="";for(var G=mxEvent.getSource(C);null!=G;){if(G==x||G==y){C.stopPropagation();C.preventDefault();break}G=G.parentNode}});var D=function(C){return function(G,N,I,F,H,R,W,J,V){null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V.name)||/(\.vs(x|sx?))($|\?)/i.test(V.name))?b.importVisio(V,mxUtils.bind(this,function(U){d(U,N,I,F,H,R,W,"fixed",mxEvent.isAltDown(C)?
+null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," "))})):null!=V&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(G,V.name)?b.isExternalDataComms()?b.parseFile(V,mxUtils.bind(this,function(U){4==U.readyState&&(b.spinner.stop(),200<=U.status&&299>=U.status&&(d(U.responseText,N,I,F,H,R,W,"fixed",mxEvent.isAltDown(C)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
+(d(G,N,I,F,H,R,W,"fixed",mxEvent.isAltDown(C)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),x.scrollTop=x.scrollHeight)}};mxEvent.addListener(x,"dragover",g);mxEvent.addListener(x,"drop",k);mxEvent.addListener(y,"dragover",g);mxEvent.addListener(y,"drop",k);f.appendChild(x);c=document.createElement("div");c.style.textAlign="right";c.style.marginTop="20px";e=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});e.setAttribute("id","btnCancel");e.className="geBtn";b.editor.cancelFirst&&
c.appendChild(e);"draw.io"!=b.getServiceName()||null==m||m.constructor!=DriveLibrary&&m.constructor!=GitHubLibrary||(p=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&m.getPublicUrl(function(C){b.spinner.stop();if(null!=C){var G=b.getSearch("create title mode url drive splash state clibs ui".split(" "));G+=(0==G.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(C);C=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
"/"+G,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(C.container,450,240,!0);C.init()}else m.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(m.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),p.className="geBtn",c.appendChild(p));p=mxUtils.button(mxResources.get("export"),
function(){var C=b.createLibraryDataFromImages(l),G=q.value;/(\.xml)$/i.test(G)||(G+=".xml");b.isLocalFileSave()?b.saveLocalFile(C,G,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(G)+"&format=xml&xml="+encodeURIComponent(C))).simulate(document,"_blank")});p.setAttribute("id","btnDownload");p.className="geBtn";c.appendChild(p);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var B=document.createElement("input");B.setAttribute("multiple","multiple");
-B.setAttribute("type","file");mxEvent.addListener(B,"change",function(C){u=!1;b.importFiles(B.files,0,0,b.maxImageSize,function(G,N,I,E,H,R,W,J,V){null!=B.files&&(D(C)(G,N,I,E,H,R,W,J,V),B.type="",B.type="file",B.value="")});x.scrollTop=x.scrollHeight});B.style.display="none";document.body.appendChild(B);b.libDlgFileInputElt=B}p=mxUtils.button(mxResources.get("import"),function(){null!=O&&(O(),O=null);b.libDlgFileInputElt.click()});p.setAttribute("id","btnAddImage");p.className="geBtn";c.appendChild(p)}p=
+B.setAttribute("type","file");mxEvent.addListener(B,"change",function(C){u=!1;b.importFiles(B.files,0,0,b.maxImageSize,function(G,N,I,F,H,R,W,J,V){null!=B.files&&(D(C)(G,N,I,F,H,R,W,J,V),B.type="",B.type="file",B.value="")});x.scrollTop=x.scrollHeight});B.style.display="none";document.body.appendChild(B);b.libDlgFileInputElt=B}p=mxUtils.button(mxResources.get("import"),function(){null!=O&&(O(),O=null);b.libDlgFileInputElt.click()});p.setAttribute("id","btnAddImage");p.className="geBtn";c.appendChild(p)}p=
mxUtils.button(mxResources.get("addImages"),function(){null!=O&&(O(),O=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(C,G,N){u=!1;if(null!=C){if("data:image/"==C.substring(0,11)){var I=C.indexOf(",");0<I&&(C=C.substring(0,I)+";base64,"+C.substring(I+1))}d(C,null,0,0,G,N);x.scrollTop=x.scrollHeight}})});p.setAttribute("id","btnAddImageUrl");p.className="geBtn";c.appendChild(p);this.saveBtnClickHandler=function(C,G,N,I){b.saveLibrary(C,G,N,I)};p=mxUtils.button(mxResources.get("save"),
mxUtils.bind(this,function(){null!=O&&(O(),O=null);this.saveBtnClickHandler(q.value,l,m,n)}));p.setAttribute("id","btnSave");p.className="geBtn gePrimaryBtn";c.appendChild(p);b.editor.cancelFirst||c.appendChild(e);f.appendChild(c);this.container=f},EditShapeDialog=function(b,e,f,c,m){c=null!=c?c:300;m=null!=m?m:120;var n=document.createElement("table"),v=document.createElement("tbody");n.style.cellPadding="4px";var d=document.createElement("tr");var g=document.createElement("td");g.setAttribute("colspan",
"2");g.style.fontSize="10pt";mxUtils.write(g,f);d.appendChild(g);v.appendChild(d);d=document.createElement("tr");g=document.createElement("td");var k=document.createElement("textarea");k.style.outline="none";k.style.resize="none";k.style.width=c-200+"px";k.style.height=m+"px";this.textarea=k;this.init=function(){k.focus();k.scrollTop=0};g.appendChild(k);d.appendChild(g);g=document.createElement("td");f=document.createElement("div");f.style.position="relative";f.style.border="1px solid gray";f.style.top=
@@ -11344,45 +11344,45 @@ var x=function(y,z,A){var L=k.value,O=mxUtils.parseXml(L);L=mxUtils.getPrettyXml
"stencil("+L+")",[z])}catch(u){throw u;}finally{y.getModel().endUpdate()}O&&(y.setSelectionCell(z),y.scrollCellToVisible(z))}};f=mxUtils.button(mxResources.get("preview"),function(){x(l,p,!1)});f.className="geBtn";g.appendChild(f);f=mxUtils.button(mxResources.get("apply"),function(){x(b.editor.graph,e,!0)});f.className="geBtn gePrimaryBtn";g.appendChild(f);b.editor.cancelFirst||g.appendChild(m);d.appendChild(g);v.appendChild(d);n.appendChild(v);this.container=n},CustomDialog=function(b,e,f,c,m,n,
v,d,g,k,l){var p=document.createElement("div");p.appendChild(e);var q=document.createElement("div");q.style.marginTop="30px";q.style.textAlign="center";null!=v&&q.appendChild(v);b.isOffline()||null==n||(e=mxUtils.button(mxResources.get("help"),function(){b.openLink(n)}),e.className="geBtn",q.appendChild(e));g=mxUtils.button(g||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c()});g.className="geBtn";d&&(g.style.display="none");b.editor.cancelFirst&&q.appendChild(g);m=mxUtils.button(m||
mxResources.get("ok"),mxUtils.bind(this,function(){k||b.hideDialog(null,null,this.container);if(null!=f){var x=f();if("string"===typeof x){b.showError(mxResources.get("error"),x);return}}k&&b.hideDialog(null,null,this.container)}));q.appendChild(m);m.className="geBtn gePrimaryBtn";b.editor.cancelFirst||q.appendChild(g);if(null!=l)for(d=0;d<l.length;d++)(function(x,y,z){x=mxUtils.button(x,function(A){y(A)});null!=z&&x.setAttribute("title",z);x.className="geBtn";q.appendChild(x)})(l[d][0],l[d][1],l[d][2]);
-p.appendChild(q);this.cancelBtn=g;this.okButton=m;this.container=p},TemplatesDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y){function z(ja){Ga.innerHTML=mxUtils.htmlEntities(ja);Ga.style.display="block";setTimeout(function(){Ga.style.display="none"},4E3)}function A(){null!=X&&(X.style.fontWeight="normal",X.style.textDecoration="none",t=X,X=null)}function L(ja,pa,ba,ea,na,la,ma){if(-1<ja.className.indexOf("geTempDlgRadioBtnActive"))return!1;ja.className+=" geTempDlgRadioBtnActive";J.querySelector(".geTempDlgRadioBtn[data-id="+
-ea+"]").className="geTempDlgRadioBtn "+(ma?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");J.querySelector("."+pa).src="/images/"+ba+"-sel.svg";J.querySelector("."+na).src="/images/"+la+".svg";return!0}function O(ja,pa,ba,ea){function na(ia,Na){null==ma?(ia=/^https?:\/\//.test(ia)&&!b.editor.isCorsEnabledForUrl(ia)?PROXY_URL+"?url="+encodeURIComponent(ia):TEMPLATE_PATH+"/"+ia,mxUtils.get(ia,mxUtils.bind(this,function(La){200<=La.getStatus()&&299>=La.getStatus()&&(ma=La.getText());Na(ma)}))):Na(ma)}
-function la(ia,Na,La){if(null!=ia&&mxUtils.isAncestorNode(document.body,pa)&&(ia=mxUtils.parseXml(ia),ia=Editor.extractGraphModel(ia.documentElement,!0),null!=ia)){"mxfile"==ia.nodeName&&(ia=Editor.parseDiagramNode(ia.getElementsByTagName("diagram")[0]));var Qa=new mxCodec(ia.ownerDocument),Sa=new mxGraphModel;Qa.decode(ia,Sa);ia=Sa.root.getChildAt(0).children||[];b.sidebar.createTooltip(pa,ia,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||
-document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ja.title?mxResources.get(ja.title,null,ja.title):null,!0,new mxPoint(Na,La),!0,null,!0);var Ia=document.createElement("div");Ia.className="geTempDlgDialogMask";J.appendChild(Ia);var Ja=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ia&&(J.removeChild(Ia),Ia=null,Ja.apply(this,arguments),b.sidebar.hideTooltip=Ja)};mxEvent.addListener(Ia,"click",function(){b.sidebar.hideTooltip()})}}var ma=null;if(Ea||b.sidebar.currentElt==
-pa)b.sidebar.hideTooltip();else{var ta=function(ia){Ea&&b.sidebar.currentElt==pa&&la(ia,mxEvent.getClientX(ea),mxEvent.getClientY(ea));Ea=!1;ba.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=pa;Ea=!0;ba.src="/images/aui-wait.gif";ja.isExt?g(ja,ta,function(){z(mxResources.get("cantLoadPrev"));Ea=!1;ba.src="/images/icon-search.svg"}):na(ja.url,ta)}}function M(ja,pa,ba){if(null!=F){for(var ea=F.className.split(" "),na=0;na<ea.length;na++)if(-1<ea[na].indexOf("Active")){ea.splice(na,
-1);break}F.className=ea.join(" ")}null!=ja?(F=ja,F.className+=" "+pa,K=ba,Aa.className="geTempDlgCreateBtn"):(K=F=null,Aa.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function u(ja,pa){if(null!=K){var ba=function(ta){ma.isExternal?g(ma,function(ia){ea(ia,ta)},na):ma.url?mxUtils.get(TEMPLATE_PATH+"/"+ma.url,mxUtils.bind(this,function(ia){200<=ia.getStatus()&&299>=ia.getStatus()?ea(ia.getText(),ta):na()})):ea(b.emptyDiagramXml,ta)},ea=function(ta,ia){y||b.hideDialog(!0);e(ta,ia,ma,pa)},na=function(){z(mxResources.get("cannotLoad"));
-la()},la=function(){K=ma;Aa.className="geTempDlgCreateBtn";pa&&(Ha.className="geTempDlgOpenBtn")},ma=K;K=null;"boolean"!==typeof pa&&(pa=ma.isExternal&&p);1==ja?k(ma.url,ma):pa?(Ha.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ba()):(Aa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ja=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ja=new FilenameDialog(b,b.defaultFilename+".drawio",
-mxResources.get("ok"),ba,ja,function(ta){var ia=null!=ta&&0<ta.length;return ia&&y?(ba(ta),!1):ia},null,null,null,la,x?null:[]),b.showDialog(ja.container,350,80,!0,!0),ja.init())}}function D(ja){Aa.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||ja?"create":"copy"));ja=ja?"none":"";p&&(Ha.style.display=ja);for(var pa=J.querySelectorAll(".geTempDlgLinkToDiagram"),ba=0;ba<pa.length;ba++)pa[ba].style.display=ja}function B(ja,pa,ba,ea,na){na||(aa.innerHTML="",M(),S=ja,Y=ea);var la=null;if(ba){la=document.createElement("table");
-la.className="geTempDlgDiagramsListGrid";var ma=document.createElement("tr"),ta=document.createElement("th");ta.style.width="50%";ta.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));ma.appendChild(ta);ta=document.createElement("th");ta.style.width="25%";ta.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));ma.appendChild(ta);ta=document.createElement("th");ta.style.width="25%";ta.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));ma.appendChild(ta);la.appendChild(ma);
-aa.appendChild(la)}for(ma=0;ma<ja.length;ma++){ja[ma].isExternal=!pa;var ia=ja[ma].url,Na=(ta=mxUtils.htmlEntities(pa?mxResources.get(ja[ma].title,null,ja[ma].title):ja[ma].title))||ja[ma].url,La=ja[ma].imgUrl,Qa=mxUtils.htmlEntities(ja[ma].changedBy||""),Sa="";ja[ma].lastModifiedOn&&(Sa=b.timeSince(new Date(ja[ma].lastModifiedOn)),null==Sa&&(Sa=mxResources.get("lessThanAMinute")),Sa=mxUtils.htmlEntities(mxResources.get("timeAgo",[Sa],"{1} ago")));La||(La=TEMPLATE_PATH+"/"+ia.substring(0,ia.length-
-4)+".png");ia=ba?50:15;null!=ta&&ta.length>ia&&(ta=ta.substring(0,ia)+"&hellip;");if(ba){var Ia=document.createElement("tr");La=document.createElement("td");var Ja=document.createElement("img");Ja.src="/images/icon-search.svg";Ja.className="geTempDlgDiagramListPreviewBtn";Ja.setAttribute("title",mxResources.get("preview"));na||La.appendChild(Ja);Na=document.createElement("span");Na.className="geTempDlgDiagramTitle";Na.innerHTML=ta;La.appendChild(Na);Ia.appendChild(La);La=document.createElement("td");
-La.innerHTML=Qa;Ia.appendChild(La);La=document.createElement("td");La.innerHTML=Sa;Ia.appendChild(La);la.appendChild(Ia);null==F&&(D(pa),M(Ia,"geTempDlgDiagramsListGridActive",ja[ma]));(function(Ma,Ta,Ua){mxEvent.addListener(Ia,"click",function(){F!=Ta&&(D(pa),M(Ta,"geTempDlgDiagramsListGridActive",Ma))});mxEvent.addListener(Ia,"dblclick",u);mxEvent.addListener(Ja,"click",function(Za){O(Ma,Ta,Ua,Za)})})(ja[ma],Ia,Ja)}else{var Pa=document.createElement("div");Pa.className="geTempDlgDiagramTile";Pa.setAttribute("title",
-Na);null==F&&(D(pa),M(Pa,"geTempDlgDiagramTileActive",ja[ma]));Qa=document.createElement("div");Qa.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Ra=document.createElement("img");Ra.style.display="none";(function(Ma,Ta,Ua){Ra.onload=function(){Ta.className="geTempDlgDiagramTileImg";Ma.style.display=""};Ra.onerror=function(){this.src!=Ua?this.src=Ua:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Ra,Qa,La?La.replace(".drawio.xml","").replace(".drawio",
-"").replace(".xml",""):"");Ra.src=La;Qa.appendChild(Ra);Pa.appendChild(Qa);Qa=document.createElement("div");Qa.className="geTempDlgDiagramTileLbl";Qa.innerHTML=null!=ta?ta:"";Pa.appendChild(Qa);Ja=document.createElement("img");Ja.src="/images/icon-search.svg";Ja.className="geTempDlgDiagramPreviewBtn";Ja.setAttribute("title",mxResources.get("preview"));na||Pa.appendChild(Ja);(function(Ma,Ta,Ua){mxEvent.addListener(Pa,"click",function(){F!=Ta&&(D(pa),M(Ta,"geTempDlgDiagramTileActive",Ma))});mxEvent.addListener(Pa,
-"dblclick",u);mxEvent.addListener(Ja,"click",function(Za){O(Ma,Ta,Ua,Za)})})(ja[ma],Pa,Ja);aa.appendChild(Pa)}}for(var Ya in ea)ja=ea[Ya],0<ja.length&&(na=document.createElement("div"),na.className="geTempDlgImportCat",na.innerHTML=mxResources.get(Ya,null,Ya),aa.appendChild(na),B(ja,pa,ba,null,!0))}function C(ja,pa){Ba.innerHTML="";M();var ba=Math.floor(Ba.offsetWidth/150)-1;pa=!pa&&ja.length>ba?ba:ja.length;for(var ea=0;ea<pa;ea++){var na=ja[ea];na.isCategory=!0;var la=document.createElement("div"),
-ma=mxResources.get(na.title);null==ma&&(ma=na.title.substring(0,1).toUpperCase()+na.title.substring(1));la.className="geTempDlgNewDiagramCatItem";la.setAttribute("title",ma);ma=mxUtils.htmlEntities(ma);15<ma.length&&(ma=ma.substring(0,15)+"&hellip;");null==F&&(D(!0),M(la,"geTempDlgNewDiagramCatItemActive",na));var ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemImg";var ia=document.createElement("img");ia.src=NEW_DIAGRAM_CATS_PATH+"/"+na.img;ta.appendChild(ia);la.appendChild(ta);
-ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemLbl";ta.innerHTML=ma;la.appendChild(ta);Ba.appendChild(la);(function(Na,La){mxEvent.addListener(la,"click",function(){F!=La&&(D(!0),M(La,"geTempDlgNewDiagramCatItemActive",Na))});mxEvent.addListener(la,"dblclick",u)})(na,la)}la=document.createElement("div");la.className="geTempDlgNewDiagramCatItem";ma=mxResources.get("showAllTemps");la.setAttribute("title",ma);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemImg";
-ta.innerHTML="...";ta.style.fontSize="32px";la.appendChild(ta);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemLbl";ta.innerHTML=ma;la.appendChild(ta);Ba.appendChild(la);mxEvent.addListener(la,"click",function(){function Na(){var Qa=La.querySelector(".geTemplateDrawioCatLink");null!=Qa?Qa.click():setTimeout(Na,200)}Z=!0;var La=J.querySelector(".geTemplatesList");La.style.display="block";Ca.style.width="";Oa.style.display="";Oa.value="";ca=null;Na()});ha.style.display=ja.length<=
-ba?"none":""}function G(ja,pa,ba){function ea(Ra,Ya){var Ma=mxResources.get(Ra);null==Ma&&(Ma=Ra.substring(0,1).toUpperCase()+Ra.substring(1));Ra=Ma+" ("+Ya.length+")";var Ta=Ma=mxUtils.htmlEntities(Ma);15<Ma.length&&(Ma=Ma.substring(0,15)+"&hellip;");return{lbl:Ma+" ("+Ya.length+")",fullLbl:Ra,lblOnly:Ta}}function na(Ra,Ya,Ma,Ta,Ua){mxEvent.addListener(Ma,"click",function(){X!=Ma&&(null!=X?(X.style.fontWeight="normal",X.style.textDecoration="none"):(oa.style.display="none",Da.style.minHeight="100%"),
-X=Ma,X.style.fontWeight="bold",X.style.textDecoration="underline",Ca.scrollTop=0,V&&(U=!0),ua.innerHTML=Ya,ka.style.display="none",B(Ua?pa[Ra]:Ta?qa[Ra][Ta]:ja[Ra],Ua?!1:!0))})}var la=J.querySelector(".geTemplatesList");if(0<ba){ba=document.createElement("div");ba.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ba,mxResources.get("custom"));la.appendChild(ba);for(var ma in pa){ba=document.createElement("div");var ta=pa[ma];
-ta=ea(ma,ta);ba.className="geTemplateCatLink";ba.setAttribute("title",ta.fullLbl);ba.innerHTML=ta.lbl;la.appendChild(ba);na(ma,ta.lblOnly,ba,null,!0)}ba=document.createElement("div");ba.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ba,"draw.io");la.appendChild(ba)}for(ma in ja){var ia=qa[ma],Na=ba=document.createElement(ia?"ul":"div");ta=ja[ma];ta=ea(ma,ta);if(null!=ia){var La=document.createElement("li"),Qa=document.createElement("div");
-Qa.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Qa.style.padding="0";Qa.setAttribute("title",ta.fullLbl);Qa.innerHTML=ta.lbl;Na=Qa;La.appendChild(Qa);var Sa=document.createElement("ul");Sa.className="geTempTreeNested";Sa.style.visibility="hidden";for(var Ia in ia){var Ja=document.createElement("li"),Pa=ea(Ia,ia[Ia]);Ja.setAttribute("title",Pa.fullLbl);Ja.innerHTML=Pa.lbl;Ja.className="geTemplateCatLink";Ja.style.padding="0";Ja.style.margin="0";na(ma,Pa.lblOnly,Ja,Ia);Sa.appendChild(Ja)}La.appendChild(Sa);
-ba.className="geTempTree";ba.appendChild(La);(function(Ra,Ya){mxEvent.addListener(Ya,"click",function(){for(var Ma=Ra.querySelectorAll("li"),Ta=0;Ta<Ma.length;Ta++)Ma[Ta].style.margin="";Ra.style.visibility="visible";Ra.classList.toggle("geTempTreeActive");Ra.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Ua=0;Ua<Ma.length;Ua++)Ma[Ua].style.margin="0";Ra.style.visibility="hidden"},250);Ya.classList.toggle("geTempTreeCaret-down")})})(Sa,Qa)}else ba.className="geTemplateCatLink geTemplateDrawioCatLink",
-ba.setAttribute("title",ta.fullLbl),ba.innerHTML=ta.lbl;la.appendChild(ba);na(ma,ta.lblOnly,Na)}}function N(){mxUtils.get(c,function(ja){if(!Ka){Ka=!0;ja=ja.getXml().documentElement.firstChild;for(var pa={};null!=ja;){if("undefined"!==typeof ja.getAttribute)if("clibs"==ja.nodeName){for(var ba=ja.getAttribute("name"),ea=ja.getElementsByTagName("add"),na=[],la=0;la<ea.length;la++)na.push(encodeURIComponent(mxUtils.getTextContent(ea[la])));null!=ba&&0<na.length&&(pa[ba]=na.join(";"))}else if(na=ja.getAttribute("url"),
-null!=na){ea=ja.getAttribute("section");ba=ja.getAttribute("subsection");if(null==ea&&(la=na.indexOf("/"),ea=na.substring(0,la),null==ba)){var ma=na.indexOf("/",la+1);-1<ma&&(ba=na.substring(la+1,ma))}la=ya[ea];null==la&&(xa++,la=[],ya[ea]=la);na=ja.getAttribute("clibs");null!=pa[na]&&(na=pa[na]);na={url:ja.getAttribute("url"),libs:ja.getAttribute("libs"),title:ja.getAttribute("title")||ja.getAttribute("name"),preview:ja.getAttribute("preview"),clibs:na,tags:ja.getAttribute("tags")};la.push(na);null!=
-ba&&(la=qa[ea],null==la&&(la={},qa[ea]=la),ea=la[ba],null==ea&&(ea=[],la[ba]=ea),ea.push(na))}ja=ja.nextSibling}G(ya,fa,wa)}})}function I(ja){v&&(Ca.scrollTop=0,aa.innerHTML="",Fa.spin(aa),U=!1,V=!0,ua.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ca=null,v(sa,function(){z(mxResources.get("cannotLoad"));sa([])},ja?null:n))}function E(ja){if(""==ja)null!=t&&(t.click(),t=null);else{if(null==TemplatesDialog.tagsList[c]){var pa={};for(Na in ya)for(var ba=ya[Na],ea=0;ea<ba.length;ea++){var na=
-ba[ea];if(null!=na.tags)for(var la=na.tags.toLowerCase().split(";"),ma=0;ma<la.length;ma++)null==pa[la[ma]]&&(pa[la[ma]]=[]),pa[la[ma]].push(na)}TemplatesDialog.tagsList[c]=pa}var ta=ja.toLowerCase().split(" ");pa=TemplatesDialog.tagsList[c];if(0<wa&&null==pa.__tagsList__){for(Na in fa)for(ba=fa[Na],ea=0;ea<ba.length;ea++)for(na=ba[ea],la=na.title.split(" "),la.push(Na),ma=0;ma<la.length;ma++){var ia=la[ma].toLowerCase();null==pa[ia]&&(pa[ia]=[]);pa[ia].push(na)}pa.__tagsList__=!0}var Na=[];ba={};
-for(ea=la=0;ea<ta.length;ea++)if(0<ta[ea].length){ia=pa[ta[ea]];var La={};Na=[];if(null!=ia)for(ma=0;ma<ia.length;ma++)na=ia[ma],0==la==(null==ba[na.url])&&(La[na.url]=!0,Na.push(na));ba=La;la++}0==Na.length?ua.innerHTML=mxResources.get("noResultsFor",[ja]):B(Na,!0)}}function H(ja){if(ca!=ja||P!=da)A(),Ca.scrollTop=0,aa.innerHTML="",ua.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(ja)+'"',va=null,Z?E(ja):d&&(ja?(Fa.spin(aa),U=!1,V=!0,d(ja,sa,function(){z(mxResources.get("searchFailed"));
-sa([])},P?null:n)):I(P)),ca=ja,da=P}function R(ja){null!=va&&clearTimeout(va);13==ja.keyCode?H(Oa.value):va=setTimeout(function(){H(Oa.value)},1E3)}var W='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(d?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
+p.appendChild(q);this.cancelBtn=g;this.okButton=m;this.container=p},TemplatesDialog=function(b,e,f,c,m,n,v,d,g,k,l,p,q,x,y){function z(ia){Fa.innerHTML=mxUtils.htmlEntities(ia);Fa.style.display="block";setTimeout(function(){Fa.style.display="none"},4E3)}function A(){null!=X&&(X.style.fontWeight="normal",X.style.textDecoration="none",t=X,X=null)}function L(ia,ra,aa,ca,na,la,qa){if(-1<ia.className.indexOf("geTempDlgRadioBtnActive"))return!1;ia.className+=" geTempDlgRadioBtnActive";J.querySelector(".geTempDlgRadioBtn[data-id="+
+ca+"]").className="geTempDlgRadioBtn "+(qa?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");J.querySelector("."+ra).src="/images/"+aa+"-sel.svg";J.querySelector("."+na).src="/images/"+la+".svg";return!0}function O(ia,ra,aa,ca){function na(ka,Ja){null==qa?(ka=/^https?:\/\//.test(ka)&&!b.editor.isCorsEnabledForUrl(ka)?PROXY_URL+"?url="+encodeURIComponent(ka):TEMPLATE_PATH+"/"+ka,mxUtils.get(ka,mxUtils.bind(this,function(La){200<=La.getStatus()&&299>=La.getStatus()&&(qa=La.getText());Ja(qa)}))):Ja(qa)}
+function la(ka,Ja,La){if(null!=ka&&mxUtils.isAncestorNode(document.body,ra)&&(ka=mxUtils.parseXml(ka),ka=Editor.extractGraphModel(ka.documentElement,!0),null!=ka)){"mxfile"==ka.nodeName&&(ka=Editor.parseDiagramNode(ka.getElementsByTagName("diagram")[0]));var Sa=new mxCodec(ka.ownerDocument),Ra=new mxGraphModel;Sa.decode(ka,Ra);ka=Ra.root.getChildAt(0).children||[];b.sidebar.createTooltip(ra,ka,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||
+document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ia.title?mxResources.get(ia.title,null,ia.title):null,!0,new mxPoint(Ja,La),!0,null,!0);var Ga=document.createElement("div");Ga.className="geTempDlgDialogMask";J.appendChild(Ga);var Na=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ga&&(J.removeChild(Ga),Ga=null,Na.apply(this,arguments),b.sidebar.hideTooltip=Na)};mxEvent.addListener(Ga,"click",function(){b.sidebar.hideTooltip()})}}var qa=null;if(Ia||b.sidebar.currentElt==
+ra)b.sidebar.hideTooltip();else{var ta=function(ka){Ia&&b.sidebar.currentElt==ra&&la(ka,mxEvent.getClientX(ca),mxEvent.getClientY(ca));Ia=!1;aa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=ra;Ia=!0;aa.src="/images/aui-wait.gif";ia.isExt?g(ia,ta,function(){z(mxResources.get("cantLoadPrev"));Ia=!1;aa.src="/images/icon-search.svg"}):na(ia.url,ta)}}function M(ia,ra,aa){if(null!=E){for(var ca=E.className.split(" "),na=0;na<ca.length;na++)if(-1<ca[na].indexOf("Active")){ca.splice(na,
+1);break}E.className=ca.join(" ")}null!=ia?(E=ia,E.className+=" "+ra,K=aa,Ba.className="geTempDlgCreateBtn"):(K=E=null,Ba.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function u(ia,ra){if(null!=K){var aa=function(ta){qa.isExternal?g(qa,function(ka){ca(ka,ta)},na):qa.url?mxUtils.get(TEMPLATE_PATH+"/"+qa.url,mxUtils.bind(this,function(ka){200<=ka.getStatus()&&299>=ka.getStatus()?ca(ka.getText(),ta):na()})):ca(b.emptyDiagramXml,ta)},ca=function(ta,ka){y||b.hideDialog(!0);e(ta,ka,qa,ra)},na=function(){z(mxResources.get("cannotLoad"));
+la()},la=function(){K=qa;Ba.className="geTempDlgCreateBtn";ra&&(Ea.className="geTempDlgOpenBtn")},qa=K;K=null;"boolean"!==typeof ra&&(ra=qa.isExternal&&p);1==ia?k(qa.url,qa):ra?(Ea.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",aa()):(Ba.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ia=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ia=new FilenameDialog(b,b.defaultFilename+".drawio",
+mxResources.get("ok"),aa,ia,function(ta){var ka=null!=ta&&0<ta.length;return ka&&y?(aa(ta),!1):ka},null,null,null,la,x?null:[]),b.showDialog(ia.container,350,80,!0,!0),ia.init())}}function D(ia){Ba.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||ia?"create":"copy"));ia=ia?"none":"";p&&(Ea.style.display=ia);for(var ra=J.querySelectorAll(".geTempDlgLinkToDiagram"),aa=0;aa<ra.length;aa++)ra[aa].style.display=ia}function B(ia,ra,aa,ca,na){na||(ea.innerHTML="",M(),S=ia,Y=ca);var la=null;if(aa){la=document.createElement("table");
+la.className="geTempDlgDiagramsListGrid";var qa=document.createElement("tr"),ta=document.createElement("th");ta.style.width="50%";ta.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));qa.appendChild(ta);ta=document.createElement("th");ta.style.width="25%";ta.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));qa.appendChild(ta);ta=document.createElement("th");ta.style.width="25%";ta.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));qa.appendChild(ta);la.appendChild(qa);
+ea.appendChild(la)}for(qa=0;qa<ia.length;qa++){ia[qa].isExternal=!ra;var ka=ia[qa].url,Ja=(ta=mxUtils.htmlEntities(ra?mxResources.get(ia[qa].title,null,ia[qa].title):ia[qa].title))||ia[qa].url,La=ia[qa].imgUrl,Sa=mxUtils.htmlEntities(ia[qa].changedBy||""),Ra="";ia[qa].lastModifiedOn&&(Ra=b.timeSince(new Date(ia[qa].lastModifiedOn)),null==Ra&&(Ra=mxResources.get("lessThanAMinute")),Ra=mxUtils.htmlEntities(mxResources.get("timeAgo",[Ra],"{1} ago")));La||(La=TEMPLATE_PATH+"/"+ka.substring(0,ka.length-
+4)+".png");ka=aa?50:15;null!=ta&&ta.length>ka&&(ta=ta.substring(0,ka)+"&hellip;");if(aa){var Ga=document.createElement("tr");La=document.createElement("td");var Na=document.createElement("img");Na.src="/images/icon-search.svg";Na.className="geTempDlgDiagramListPreviewBtn";Na.setAttribute("title",mxResources.get("preview"));na||La.appendChild(Na);Ja=document.createElement("span");Ja.className="geTempDlgDiagramTitle";Ja.innerHTML=ta;La.appendChild(Ja);Ga.appendChild(La);La=document.createElement("td");
+La.innerHTML=Sa;Ga.appendChild(La);La=document.createElement("td");La.innerHTML=Ra;Ga.appendChild(La);la.appendChild(Ga);null==E&&(D(ra),M(Ga,"geTempDlgDiagramsListGridActive",ia[qa]));(function(Oa,Ta,Ua){mxEvent.addListener(Ga,"click",function(){E!=Ta&&(D(ra),M(Ta,"geTempDlgDiagramsListGridActive",Oa))});mxEvent.addListener(Ga,"dblclick",u);mxEvent.addListener(Na,"click",function(Za){O(Oa,Ta,Ua,Za)})})(ia[qa],Ga,Na)}else{var Pa=document.createElement("div");Pa.className="geTempDlgDiagramTile";Pa.setAttribute("title",
+Ja);null==E&&(D(ra),M(Pa,"geTempDlgDiagramTileActive",ia[qa]));Sa=document.createElement("div");Sa.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Qa=document.createElement("img");Qa.style.display="none";(function(Oa,Ta,Ua){Qa.onload=function(){Ta.className="geTempDlgDiagramTileImg";Oa.style.display=""};Qa.onerror=function(){this.src!=Ua?this.src=Ua:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Qa,Sa,La?La.replace(".drawio.xml","").replace(".drawio",
+"").replace(".xml",""):"");Qa.src=La;Sa.appendChild(Qa);Pa.appendChild(Sa);Sa=document.createElement("div");Sa.className="geTempDlgDiagramTileLbl";Sa.innerHTML=null!=ta?ta:"";Pa.appendChild(Sa);Na=document.createElement("img");Na.src="/images/icon-search.svg";Na.className="geTempDlgDiagramPreviewBtn";Na.setAttribute("title",mxResources.get("preview"));na||Pa.appendChild(Na);(function(Oa,Ta,Ua){mxEvent.addListener(Pa,"click",function(){E!=Ta&&(D(ra),M(Ta,"geTempDlgDiagramTileActive",Oa))});mxEvent.addListener(Pa,
+"dblclick",u);mxEvent.addListener(Na,"click",function(Za){O(Oa,Ta,Ua,Za)})})(ia[qa],Pa,Na);ea.appendChild(Pa)}}for(var Ya in ca)ia=ca[Ya],0<ia.length&&(na=document.createElement("div"),na.className="geTempDlgImportCat",na.innerHTML=mxResources.get(Ya,null,Ya),ea.appendChild(na),B(ia,ra,aa,null,!0))}function C(ia,ra){pa.innerHTML="";M();var aa=Math.floor(pa.offsetWidth/150)-1;ra=!ra&&ia.length>aa?aa:ia.length;for(var ca=0;ca<ra;ca++){var na=ia[ca];na.isCategory=!0;var la=document.createElement("div"),
+qa=mxResources.get(na.title);null==qa&&(qa=na.title.substring(0,1).toUpperCase()+na.title.substring(1));la.className="geTempDlgNewDiagramCatItem";la.setAttribute("title",qa);qa=mxUtils.htmlEntities(qa);15<qa.length&&(qa=qa.substring(0,15)+"&hellip;");null==E&&(D(!0),M(la,"geTempDlgNewDiagramCatItemActive",na));var ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemImg";var ka=document.createElement("img");ka.src=NEW_DIAGRAM_CATS_PATH+"/"+na.img;ta.appendChild(ka);la.appendChild(ta);
+ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemLbl";ta.innerHTML=qa;la.appendChild(ta);pa.appendChild(la);(function(Ja,La){mxEvent.addListener(la,"click",function(){E!=La&&(D(!0),M(La,"geTempDlgNewDiagramCatItemActive",Ja))});mxEvent.addListener(la,"dblclick",u)})(na,la)}la=document.createElement("div");la.className="geTempDlgNewDiagramCatItem";qa=mxResources.get("showAllTemps");la.setAttribute("title",qa);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemImg";
+ta.innerHTML="...";ta.style.fontSize="32px";la.appendChild(ta);ta=document.createElement("div");ta.className="geTempDlgNewDiagramCatItemLbl";ta.innerHTML=qa;la.appendChild(ta);pa.appendChild(la);mxEvent.addListener(la,"click",function(){function Ja(){var Sa=La.querySelector(".geTemplateDrawioCatLink");null!=Sa?Sa.click():setTimeout(Ja,200)}Z=!0;var La=J.querySelector(".geTemplatesList");La.style.display="block";Aa.style.width="";Ka.style.display="";Ka.value="";ba=null;Ja()});ja.style.display=ia.length<=
+aa?"none":""}function G(ia,ra,aa){function ca(Qa,Ya){var Oa=mxResources.get(Qa);null==Oa&&(Oa=Qa.substring(0,1).toUpperCase()+Qa.substring(1));Qa=Oa+" ("+Ya.length+")";var Ta=Oa=mxUtils.htmlEntities(Oa);15<Oa.length&&(Oa=Oa.substring(0,15)+"&hellip;");return{lbl:Oa+" ("+Ya.length+")",fullLbl:Qa,lblOnly:Ta}}function na(Qa,Ya,Oa,Ta,Ua){mxEvent.addListener(Oa,"click",function(){X!=Oa&&(null!=X?(X.style.fontWeight="normal",X.style.textDecoration="none"):(Ca.style.display="none",Da.style.minHeight="100%"),
+X=Oa,X.style.fontWeight="bold",X.style.textDecoration="underline",Aa.scrollTop=0,V&&(U=!0),ha.innerHTML=Ya,ma.style.display="none",B(Ua?ra[Qa]:Ta?oa[Qa][Ta]:ia[Qa],Ua?!1:!0))})}var la=J.querySelector(".geTemplatesList");if(0<aa){aa=document.createElement("div");aa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(aa,mxResources.get("custom"));la.appendChild(aa);for(var qa in ra){aa=document.createElement("div");var ta=ra[qa];
+ta=ca(qa,ta);aa.className="geTemplateCatLink";aa.setAttribute("title",ta.fullLbl);aa.innerHTML=ta.lbl;la.appendChild(aa);na(qa,ta.lblOnly,aa,null,!0)}aa=document.createElement("div");aa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(aa,"draw.io");la.appendChild(aa)}for(qa in ia){var ka=oa[qa],Ja=aa=document.createElement(ka?"ul":"div");ta=ia[qa];ta=ca(qa,ta);if(null!=ka){var La=document.createElement("li"),Sa=document.createElement("div");
+Sa.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Sa.style.padding="0";Sa.setAttribute("title",ta.fullLbl);Sa.innerHTML=ta.lbl;Ja=Sa;La.appendChild(Sa);var Ra=document.createElement("ul");Ra.className="geTempTreeNested";Ra.style.visibility="hidden";for(var Ga in ka){var Na=document.createElement("li"),Pa=ca(Ga,ka[Ga]);Na.setAttribute("title",Pa.fullLbl);Na.innerHTML=Pa.lbl;Na.className="geTemplateCatLink";Na.style.padding="0";Na.style.margin="0";na(qa,Pa.lblOnly,Na,Ga);Ra.appendChild(Na)}La.appendChild(Ra);
+aa.className="geTempTree";aa.appendChild(La);(function(Qa,Ya){mxEvent.addListener(Ya,"click",function(){for(var Oa=Qa.querySelectorAll("li"),Ta=0;Ta<Oa.length;Ta++)Oa[Ta].style.margin="";Qa.style.visibility="visible";Qa.classList.toggle("geTempTreeActive");Qa.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Ua=0;Ua<Oa.length;Ua++)Oa[Ua].style.margin="0";Qa.style.visibility="hidden"},250);Ya.classList.toggle("geTempTreeCaret-down")})})(Ra,Sa)}else aa.className="geTemplateCatLink geTemplateDrawioCatLink",
+aa.setAttribute("title",ta.fullLbl),aa.innerHTML=ta.lbl;la.appendChild(aa);na(qa,ta.lblOnly,Ja)}}function N(){mxUtils.get(c,function(ia){if(!Ma){Ma=!0;ia=ia.getXml().documentElement.firstChild;for(var ra={};null!=ia;){if("undefined"!==typeof ia.getAttribute)if("clibs"==ia.nodeName){for(var aa=ia.getAttribute("name"),ca=ia.getElementsByTagName("add"),na=[],la=0;la<ca.length;la++)na.push(encodeURIComponent(mxUtils.getTextContent(ca[la])));null!=aa&&0<na.length&&(ra[aa]=na.join(";"))}else if(na=ia.getAttribute("url"),
+null!=na){ca=ia.getAttribute("section");aa=ia.getAttribute("subsection");if(null==ca&&(la=na.indexOf("/"),ca=na.substring(0,la),null==aa)){var qa=na.indexOf("/",la+1);-1<qa&&(aa=na.substring(la+1,qa))}la=ya[ca];null==la&&(xa++,la=[],ya[ca]=la);na=ia.getAttribute("clibs");null!=ra[na]&&(na=ra[na]);na={url:ia.getAttribute("url"),libs:ia.getAttribute("libs"),title:ia.getAttribute("title")||ia.getAttribute("name"),preview:ia.getAttribute("preview"),clibs:na,tags:ia.getAttribute("tags")};la.push(na);null!=
+aa&&(la=oa[ca],null==la&&(la={},oa[ca]=la),ca=la[aa],null==ca&&(ca=[],la[aa]=ca),ca.push(na))}ia=ia.nextSibling}G(ya,fa,wa)}})}function I(ia){v&&(Aa.scrollTop=0,ea.innerHTML="",Ha.spin(ea),U=!1,V=!0,ha.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,v(ua,function(){z(mxResources.get("cannotLoad"));ua([])},ia?null:n))}function F(ia){if(""==ia)null!=t&&(t.click(),t=null);else{if(null==TemplatesDialog.tagsList[c]){var ra={};for(Ja in ya)for(var aa=ya[Ja],ca=0;ca<aa.length;ca++){var na=
+aa[ca];if(null!=na.tags)for(var la=na.tags.toLowerCase().split(";"),qa=0;qa<la.length;qa++)null==ra[la[qa]]&&(ra[la[qa]]=[]),ra[la[qa]].push(na)}TemplatesDialog.tagsList[c]=ra}var ta=ia.toLowerCase().split(" ");ra=TemplatesDialog.tagsList[c];if(0<wa&&null==ra.__tagsList__){for(Ja in fa)for(aa=fa[Ja],ca=0;ca<aa.length;ca++)for(na=aa[ca],la=na.title.split(" "),la.push(Ja),qa=0;qa<la.length;qa++){var ka=la[qa].toLowerCase();null==ra[ka]&&(ra[ka]=[]);ra[ka].push(na)}ra.__tagsList__=!0}var Ja=[];aa={};
+for(ca=la=0;ca<ta.length;ca++)if(0<ta[ca].length){ka=ra[ta[ca]];var La={};Ja=[];if(null!=ka)for(qa=0;qa<ka.length;qa++)na=ka[qa],0==la==(null==aa[na.url])&&(La[na.url]=!0,Ja.push(na));aa=La;la++}0==Ja.length?ha.innerHTML=mxResources.get("noResultsFor",[ia]):B(Ja,!0)}}function H(ia){if(ba!=ia||P!=da)A(),Aa.scrollTop=0,ea.innerHTML="",ha.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(ia)+'"',va=null,Z?F(ia):d&&(ia?(Ha.spin(ea),U=!1,V=!0,d(ia,ua,function(){z(mxResources.get("searchFailed"));
+ua([])},P?null:n)):I(P)),ba=ia,da=P}function R(ia){null!=va&&clearTimeout(va);13==ia.keyCode?H(Ka.value):va=setTimeout(function(){H(Ka.value)},1E3)}var W='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(d?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
mxResources.get("myDiagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><div class="geTempDlgErrMsg"></div>'+
(q?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(p?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",J=document.createElement("div");J.innerHTML=W;J.className=
-"geTemplateDlg";this.container=J;c=null!=c?c:TEMPLATE_PATH+"/index.xml";m=null!=m?m:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,U=!1,X=null,t=null,F=null,K=null,T=!1,P=!0,Q=!1,S=[],Y=null,ca,da,Z=!1,ha=J.querySelector(".geTempDlgShowAllBtn"),aa=J.querySelector(".geTempDlgDiagramsTiles"),ua=J.querySelector(".geTempDlgDiagramsListTitle"),ka=J.querySelector(".geTempDlgDiagramsListBtns"),Ca=J.querySelector(".geTempDlgContent"),Da=J.querySelector(".geTempDlgDiagramsList"),oa=J.querySelector(".geTempDlgNewDiagramCat"),
-Ba=J.querySelector(".geTempDlgNewDiagramCatList"),Aa=J.querySelector(".geTempDlgCreateBtn"),Ha=J.querySelector(".geTempDlgOpenBtn"),Oa=J.querySelector(".geTempDlgSearchBox"),Ga=J.querySelector(".geTempDlgErrMsg"),Fa=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(J.querySelector(".geTempDlgBack"),"click",function(){A();Z=!1;J.querySelector(".geTemplatesList").style.display="none";Ca.style.width=
-"100%";oa.style.display="";Da.style.minHeight="calc(100% - 280px)";Oa.style.display=d?"":"none";Oa.value="";ca=null;I(P)});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){L(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(P=!0,null==ca?I(P):H(ca))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){L(this,"geTempDlgMyDiagramsBtnImg",
-"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(P=!1,null==ca?I(P):H(ca))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){L(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(Q=!0,B(S,!1,Q,Y))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){L(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(Q=!1,B(S,!1,Q,Y))});
-var Ea=!1;mxEvent.addListener(ha,"click",function(){T?(oa.style.height="280px",Ba.style.height="190px",ha.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),C(ra)):(oa.style.height="440px",Ba.style.height="355px",ha.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),C(ra,!0));T=!T});var Ka=!1,za=!1,ya={},qa={},fa={},ra=[],xa=1,wa=0;null!=l?l(function(ja,pa){fa=ja;wa=pa;N()},N):N();mxUtils.get(m,function(ja){if(!za){za=!0;for(ja=ja.getXml().documentElement.firstChild;null!=ja;)"undefined"!==
-typeof ja.getAttribute&&null!=ja.getAttribute("title")&&ra.push({img:ja.getAttribute("img"),libs:ja.getAttribute("libs"),clibs:ja.getAttribute("clibs"),title:ja.getAttribute("title")}),ja=ja.nextSibling;C(ra)}});var sa=function(ja,pa,ba){ka.style.display="";Fa.stop();V=!1;if(U)U=!1;else if(pa)aa.innerHTML=pa;else{ba=ba||{};pa=0;for(var ea in ba)pa+=ba[ea].length;0==ja.length&&0==pa?aa.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):B(ja,!1,Q,0==pa?null:ba)}};I(P);var va=null;mxEvent.addListener(Oa,
-"keyup",R);mxEvent.addListener(Oa,"search",R);mxEvent.addListener(Oa,"input",R);mxEvent.addListener(Aa,"click",function(ja){u(!1,!1)});p&&mxEvent.addListener(Ha,"click",function(ja){u(!1,!0)});q&&mxEvent.addListener(J.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ja){u(!0)});mxEvent.addListener(J.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=f&&f();y||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
+"geTemplateDlg";this.container=J;c=null!=c?c:TEMPLATE_PATH+"/index.xml";m=null!=m?m:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,U=!1,X=null,t=null,E=null,K=null,T=!1,P=!0,Q=!1,S=[],Y=null,ba,da,Z=!1,ja=J.querySelector(".geTempDlgShowAllBtn"),ea=J.querySelector(".geTempDlgDiagramsTiles"),ha=J.querySelector(".geTempDlgDiagramsListTitle"),ma=J.querySelector(".geTempDlgDiagramsListBtns"),Aa=J.querySelector(".geTempDlgContent"),Da=J.querySelector(".geTempDlgDiagramsList"),Ca=J.querySelector(".geTempDlgNewDiagramCat"),
+pa=J.querySelector(".geTempDlgNewDiagramCatList"),Ba=J.querySelector(".geTempDlgCreateBtn"),Ea=J.querySelector(".geTempDlgOpenBtn"),Ka=J.querySelector(".geTempDlgSearchBox"),Fa=J.querySelector(".geTempDlgErrMsg"),Ha=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(J.querySelector(".geTempDlgBack"),"click",function(){A();Z=!1;J.querySelector(".geTemplatesList").style.display="none";Aa.style.width=
+"100%";Ca.style.display="";Da.style.minHeight="calc(100% - 280px)";Ka.style.display=d?"":"none";Ka.value="";ba=null;I(P)});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){L(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(P=!0,null==ba?I(P):H(ba))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){L(this,"geTempDlgMyDiagramsBtnImg",
+"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(P=!1,null==ba?I(P):H(ba))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){L(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(Q=!0,B(S,!1,Q,Y))});mxEvent.addListener(J.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){L(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(Q=!1,B(S,!1,Q,Y))});
+var Ia=!1;mxEvent.addListener(ja,"click",function(){T?(Ca.style.height="280px",pa.style.height="190px",ja.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),C(sa)):(Ca.style.height="440px",pa.style.height="355px",ja.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),C(sa,!0));T=!T});var Ma=!1,za=!1,ya={},oa={},fa={},sa=[],xa=1,wa=0;null!=l?l(function(ia,ra){fa=ia;wa=ra;N()},N):N();mxUtils.get(m,function(ia){if(!za){za=!0;for(ia=ia.getXml().documentElement.firstChild;null!=ia;)"undefined"!==
+typeof ia.getAttribute&&null!=ia.getAttribute("title")&&sa.push({img:ia.getAttribute("img"),libs:ia.getAttribute("libs"),clibs:ia.getAttribute("clibs"),title:ia.getAttribute("title")}),ia=ia.nextSibling;C(sa)}});var ua=function(ia,ra,aa){ma.style.display="";Ha.stop();V=!1;if(U)U=!1;else if(ra)ea.innerHTML=ra;else{aa=aa||{};ra=0;for(var ca in aa)ra+=aa[ca].length;0==ia.length&&0==ra?ea.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):B(ia,!1,Q,0==ra?null:aa)}};I(P);var va=null;mxEvent.addListener(Ka,
+"keyup",R);mxEvent.addListener(Ka,"search",R);mxEvent.addListener(Ka,"input",R);mxEvent.addListener(Ba,"click",function(ia){u(!1,!1)});p&&mxEvent.addListener(Ea,"click",function(ia){u(!1,!0)});q&&mxEvent.addListener(J.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ia){u(!0)});mxEvent.addListener(J.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=f&&f();y||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
var BtnDialog=function(b,e,f,c){var m=document.createElement("div");m.style.textAlign="center";var n=document.createElement("p");n.style.fontSize="16pt";n.style.padding="0px";n.style.margin="0px";n.style.color="gray";mxUtils.write(n,mxResources.get("done"));var v="Unknown",d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.marginRight="10px";e==b.drive?(v=mxResources.get("googleDrive"),d.src=IMAGE_PATH+"/google-drive-logo-white.svg"):e==b.dropbox?
(v=mxResources.get("dropbox"),d.src=IMAGE_PATH+"/dropbox-logo-white.svg"):e==b.oneDrive?(v=mxResources.get("oneDrive"),d.src=IMAGE_PATH+"/onedrive-logo-white.svg"):e==b.gitHub?(v=mxResources.get("github"),d.src=IMAGE_PATH+"/github-logo-white.svg"):e==b.gitLab?(v=mxResources.get("gitlab"),d.src=IMAGE_PATH+"/gitlab-logo.svg"):e==b.trello&&(v=mxResources.get("trello"),d.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[v],"You are now authorized in {1}"));
f=mxUtils.button(f,c);f.insertBefore(d,f.firstChild);f.style.marginTop="6px";f.className="geBigButton";f.style.fontSize="18px";f.style.padding="14px";m.appendChild(n);m.appendChild(b);m.appendChild(f);this.container=m},FontDialog=function(b,e,f,c,m){function n(M){this.style.border="";13==M.keyCode&&O.click()}var v=document.createElement("table"),d=document.createElement("tbody");v.style.marginTop="8px";var g=document.createElement("tr");var k=document.createElement("td");k.colSpan=2;k.style.whiteSpace=
@@ -11415,21 +11415,21 @@ l&&(p.setAttribute("checked","checked"),p.defaultChecked=!0);d=document.createEl
d.style.width="120px";mxUtils.write(d,mxResources.get("realtimeCollaboration")+":");m.appendChild(d);var q=document.createElement("input");q.setAttribute("type","checkbox");var x=c.isRealtimeEnabled();if(x="disabled"!=b.drive.getCustomProperty(c.desc,"collaboration"))q.setAttribute("checked","checked"),q.defaultChecked=!0;prevApply=n;n=function(){prevApply();b.hideDialog();q.checked!=x&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&c.setRealtimeEnabled(q.checked,mxUtils.bind(this,
function(y){b.spinner.stop()}),mxUtils.bind(this,function(y){b.spinner.stop();b.showError(mxResources.get("error"),null!=y&&null!=y.error?y.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){q.focus()};d=document.createElement("td");d.style.whiteSpace="nowrap";d.appendChild(q);d.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));m.appendChild(d);f.appendChild(m)}this.init=null!=this.init?this.init:
function(){};n=mxUtils.button(mxResources.get("apply"),n);n.className="geBtn gePrimaryBtn";m=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="20px";d.style.whiteSpace="nowrap";d.setAttribute("align","center");v=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});v.className="geBtn";b.editor.cancelFirst&&d.appendChild(v);d.appendChild(n);b.editor.cancelFirst||d.appendChild(v);m.appendChild(d);f.appendChild(m);e.appendChild(f);this.container=
-e},ConnectionPointsDialog=function(b,e){function f(){null!=m&&m.destroy()}var c=document.createElement("div");c.style.userSelect="none";var m=null;this.init=function(){function n(E,H){E=new mxCell("",new mxGeometry(E,H,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");E.vertex=!0;E.cp=!0;return p.addCell(E)}function v(E){E=p.getSelectionCells();p.deleteCells(E)}function d(){var E=parseInt(C.value)||0;E=0>E?0:100<E?100:E;
-C.value=E;var H=parseInt(N.value)||0;H=0>H?0:100<H?100:H;N.value=H;var R=parseInt(G.value)||0,W=parseInt(I.value)||0;E=p.getConnectionPoint(y,new mxConnectionConstraint(new mxPoint(E/100,H/100),!1,null,R,W));H=p.getSelectionCell();if(null!=H){R=H.geometry.clone();W=p.view.scale;var J=p.view.translate;R.x=(E.x-3*W)/W-J.x;R.y=(E.y-3*W)/W-J.y;p.model.setGeometry(H,R)}}function g(E){var H=0,R=0,W=q.geometry,J=mxUtils.format((E.geometry.x+3-W.x)/W.width);E=mxUtils.format((E.geometry.y+3-W.y)/W.height);
-0>J?(H=J*W.width,J=0):1<J&&(H=(J-1)*W.width,J=1);0>E?(R=E*W.height,E=0):1<E&&(R=(E-1)*W.height,E=1);return{x:J,y:E,dx:parseInt(H),dy:parseInt(R)}}function k(){if(1==p.getSelectionCount()){var E=p.getSelectionCell();E=g(E);C.value=100*E.x;N.value=100*E.y;G.value=E.dx;I.value=E.dy;B.style.visibility=""}else B.style.visibility="hidden"}var l=document.createElement("div");l.style.width="350px";l.style.height="350px";l.style.overflow="hidden";l.style.border="1px solid lightGray";l.style.boxSizing="border-box";
-mxEvent.disableContextMenu(l);c.appendChild(l);var p=new Graph(l);p.autoExtend=!1;p.autoScroll=!1;p.setGridEnabled(!1);p.setEnabled(!0);p.setPanning(!0);p.setConnectable(!1);p.setTooltips(!1);p.minFitScale=null;p.maxFitScale=null;p.centerZoom=!0;p.maxFitScale=2;l=e.geometry;var q=new mxCell(e.value,new mxGeometry(0,0,l.width,l.height),e.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");q.vertex=!0;p.addCell(q);p.dblClick=function(E,H){if(null!=H&&H!=q)p.setSelectionCell(H);else{H=
-mxUtils.convertPoint(p.container,mxEvent.getClientX(E),mxEvent.getClientY(E));mxEvent.consume(E);E=p.view.scale;var R=p.view.translate;p.setSelectionCell(n((H.x-3*E)/E-R.x,(H.y-3*E)/E-R.y))}};m=new mxKeyHandler(p);m.bindKey(46,v);m.bindKey(8,v);p.getRubberband().isForceRubberbandEvent=function(E){return 0==E.evt.button&&(null==E.getCell()||E.getCell()==q)};p.panningHandler.isForcePanningEvent=function(E){return 2==E.evt.button};var x=p.isCellSelectable;p.isCellSelectable=function(E){return E==q?!1:
+e},ConnectionPointsDialog=function(b,e){function f(){null!=m&&m.destroy()}var c=document.createElement("div");c.style.userSelect="none";var m=null;this.init=function(){function n(F,H){F=new mxCell("",new mxGeometry(F,H,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");F.vertex=!0;F.cp=!0;return p.addCell(F)}function v(F){F=p.getSelectionCells();p.deleteCells(F)}function d(){var F=parseInt(C.value)||0;F=0>F?0:100<F?100:F;
+C.value=F;var H=parseInt(N.value)||0;H=0>H?0:100<H?100:H;N.value=H;var R=parseInt(G.value)||0,W=parseInt(I.value)||0;F=p.getConnectionPoint(y,new mxConnectionConstraint(new mxPoint(F/100,H/100),!1,null,R,W));H=p.getSelectionCell();if(null!=H){R=H.geometry.clone();W=p.view.scale;var J=p.view.translate;R.x=(F.x-3*W)/W-J.x;R.y=(F.y-3*W)/W-J.y;p.model.setGeometry(H,R)}}function g(F){var H=0,R=0,W=q.geometry,J=mxUtils.format((F.geometry.x+3-W.x)/W.width);F=mxUtils.format((F.geometry.y+3-W.y)/W.height);
+0>J?(H=J*W.width,J=0):1<J&&(H=(J-1)*W.width,J=1);0>F?(R=F*W.height,F=0):1<F&&(R=(F-1)*W.height,F=1);return{x:J,y:F,dx:parseInt(H),dy:parseInt(R)}}function k(){if(1==p.getSelectionCount()){var F=p.getSelectionCell();F=g(F);C.value=100*F.x;N.value=100*F.y;G.value=F.dx;I.value=F.dy;B.style.visibility=""}else B.style.visibility="hidden"}var l=document.createElement("div");l.style.width="350px";l.style.height="350px";l.style.overflow="hidden";l.style.border="1px solid lightGray";l.style.boxSizing="border-box";
+mxEvent.disableContextMenu(l);c.appendChild(l);var p=new Graph(l);p.autoExtend=!1;p.autoScroll=!1;p.setGridEnabled(!1);p.setEnabled(!0);p.setPanning(!0);p.setConnectable(!1);p.setTooltips(!1);p.minFitScale=null;p.maxFitScale=null;p.centerZoom=!0;p.maxFitScale=2;l=e.geometry;var q=new mxCell(e.value,new mxGeometry(0,0,l.width,l.height),e.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");q.vertex=!0;p.addCell(q);p.dblClick=function(F,H){if(null!=H&&H!=q)p.setSelectionCell(H);else{H=
+mxUtils.convertPoint(p.container,mxEvent.getClientX(F),mxEvent.getClientY(F));mxEvent.consume(F);F=p.view.scale;var R=p.view.translate;p.setSelectionCell(n((H.x-3*F)/F-R.x,(H.y-3*F)/F-R.y))}};m=new mxKeyHandler(p);m.bindKey(46,v);m.bindKey(8,v);p.getRubberband().isForceRubberbandEvent=function(F){return 0==F.evt.button&&(null==F.getCell()||F.getCell()==q)};p.panningHandler.isForcePanningEvent=function(F){return 2==F.evt.button};var x=p.isCellSelectable;p.isCellSelectable=function(F){return F==q?!1:
x.apply(this,arguments)};p.getLinkForCell=function(){return null};var y=p.view.getState(q);l=p.getAllConnectionConstraints(y);for(var z=0;null!=l&&z<l.length;z++){var A=p.getConnectionPoint(y,l[z]);n(A.x-3,A.y-3)}p.fit(8);p.center();z=mxUtils.button("",function(){p.zoomIn()});z.className="geSprite geSprite-zoomin";z.setAttribute("title",mxResources.get("zoomIn"));z.style.position="relative";z.style.outline="none";z.style.border="none";z.style.margin="2px";z.style.cursor="pointer";z.style.top=mxClient.IS_FF?
"-6px":"0px";mxUtils.setOpacity(z,60);A=mxUtils.button("",function(){p.zoomOut()});A.className="geSprite geSprite-zoomout";A.setAttribute("title",mxResources.get("zoomOut"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(A,60);var L=mxUtils.button("",function(){p.fit(8);p.center()});L.className="geSprite geSprite-fit";L.setAttribute("title",mxResources.get("fit"));L.style.position=
"relative";L.style.outline="none";L.style.border="none";L.style.margin="2px";L.style.cursor="pointer";L.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(L,60);var O=mxUtils.button("",function(){p.zoomActual();p.center()});O.className="geSprite geSprite-actualsize";O.setAttribute("title",mxResources.get("actualSize"));O.style.position="relative";O.style.outline="none";O.style.border="none";O.style.margin="2px";O.style.cursor="pointer";O.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(O,
60);var M=mxUtils.button("",v);M.className="geSprite geSprite-delete";M.setAttribute("title",mxResources.get("delete"));M.style.position="relative";M.style.outline="none";M.style.border="none";M.style.margin="2px";M.style.float="right";M.style.cursor="pointer";mxUtils.setOpacity(M,10);l=document.createElement("div");l.appendChild(z);l.appendChild(A);l.appendChild(O);l.appendChild(L);l.appendChild(M);c.appendChild(l);var u=document.createElement("input");u.setAttribute("type","number");u.setAttribute("min",
-"1");u.setAttribute("value","1");u.style.width="45px";u.style.position="relative";u.style.top=mxClient.IS_FF?"0px":"-4px";u.style.margin="0 4px 0 4px";l.appendChild(u);var D=document.createElement("select");D.style.position="relative";D.style.top=mxClient.IS_FF?"0px":"-4px";A=["left","right","top","bottom"];for(z=0;z<A.length;z++)L=A[z],O=document.createElement("option"),mxUtils.write(O,mxResources.get(L)),O.value=L,D.appendChild(O);l.appendChild(D);z=mxUtils.button(mxResources.get("add"),function(){var E=
-parseInt(u.value);E=1>E?1:100<E?100:E;u.value=E;for(var H=D.value,R=q.geometry,W=[],J=0;J<E;J++){switch(H){case "left":var V=R.x;var U=R.y+(J+1)*R.height/(E+1);break;case "right":V=R.x+R.width;U=R.y+(J+1)*R.height/(E+1);break;case "top":V=R.x+(J+1)*R.width/(E+1);U=R.y;break;case "bottom":V=R.x+(J+1)*R.width/(E+1),U=R.y+R.height}W.push(n(V-3,U-3))}p.setSelectionCells(W)});z.style.position="relative";z.style.marginLeft="8px";z.style.top=mxClient.IS_FF?"0px":"-4px";l.appendChild(z);var B=document.createElement("div");
+"1");u.setAttribute("value","1");u.style.width="45px";u.style.position="relative";u.style.top=mxClient.IS_FF?"0px":"-4px";u.style.margin="0 4px 0 4px";l.appendChild(u);var D=document.createElement("select");D.style.position="relative";D.style.top=mxClient.IS_FF?"0px":"-4px";A=["left","right","top","bottom"];for(z=0;z<A.length;z++)L=A[z],O=document.createElement("option"),mxUtils.write(O,mxResources.get(L)),O.value=L,D.appendChild(O);l.appendChild(D);z=mxUtils.button(mxResources.get("add"),function(){var F=
+parseInt(u.value);F=1>F?1:100<F?100:F;u.value=F;for(var H=D.value,R=q.geometry,W=[],J=0;J<F;J++){switch(H){case "left":var V=R.x;var U=R.y+(J+1)*R.height/(F+1);break;case "right":V=R.x+R.width;U=R.y+(J+1)*R.height/(F+1);break;case "top":V=R.x+(J+1)*R.width/(F+1);U=R.y;break;case "bottom":V=R.x+(J+1)*R.width/(F+1),U=R.y+R.height}W.push(n(V-3,U-3))}p.setSelectionCells(W)});z.style.position="relative";z.style.marginLeft="8px";z.style.top=mxClient.IS_FF?"0px":"-4px";l.appendChild(z);var B=document.createElement("div");
B.style.margin="4px 0px 8px 0px";B.style.whiteSpace="nowrap";B.style.height="24px";l=document.createElement("span");mxUtils.write(l,mxResources.get("dx"));B.appendChild(l);var C=document.createElement("input");C.setAttribute("type","number");C.setAttribute("min","0");C.setAttribute("max","100");C.style.width="45px";C.style.margin="0 4px 0 4px";B.appendChild(C);mxUtils.write(B,"%");var G=document.createElement("input");G.setAttribute("type","number");G.style.width="45px";G.style.margin="0 4px 0 4px";
B.appendChild(G);mxUtils.write(B,"pt");l=document.createElement("span");mxUtils.write(l,mxResources.get("dy"));l.style.marginLeft="12px";B.appendChild(l);var N=document.createElement("input");N.setAttribute("type","number");N.setAttribute("min","0");N.setAttribute("max","100");N.style.width="45px";N.style.margin="0 4px 0 4px";B.appendChild(N);mxUtils.write(B,"%");var I=document.createElement("input");I.setAttribute("type","number");I.style.width="45px";I.style.margin="0 4px 0 4px";B.appendChild(I);
-mxUtils.write(B,"pt");c.appendChild(B);k();p.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<p.getSelectionCount()?mxUtils.setOpacity(M,60):mxUtils.setOpacity(M,10);k()});p.addListener(mxEvent.CELLS_MOVED,k);mxEvent.addListener(C,"change",d);mxEvent.addListener(N,"change",d);mxEvent.addListener(G,"change",d);mxEvent.addListener(I,"change",d);l=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});l.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){var E=
-p.model.cells,H=[],R=[],W;for(W in E){var J=E[W];J.cp&&R.push(g(J))}R.sort(function(V,U){return V.x!=U.x?V.x-U.x:V.y!=U.y?V.y-U.y:V.dx!=U.dx?V.dx-U.dx:V.dy-U.dy});for(E=0;E<R.length;E++)0<E&&R[E].x==R[E-1].x&&R[E].y==R[E-1].y&&R[E].dx==R[E-1].dx&&R[E].dy==R[E-1].dy||H.push("["+R[E].x+","+R[E].y+",0,"+R[E].dx+","+R[E].dy+"]");b.editor.graph.setCellStyles("points","["+H.join(",")+"]",[e]);f();b.hideDialog()});z.className="geBtn gePrimaryBtn";A=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
+mxUtils.write(B,"pt");c.appendChild(B);k();p.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<p.getSelectionCount()?mxUtils.setOpacity(M,60):mxUtils.setOpacity(M,10);k()});p.addListener(mxEvent.CELLS_MOVED,k);mxEvent.addListener(C,"change",d);mxEvent.addListener(N,"change",d);mxEvent.addListener(G,"change",d);mxEvent.addListener(I,"change",d);l=mxUtils.button(mxResources.get("cancel"),function(){f();b.hideDialog()});l.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){var F=
+p.model.cells,H=[],R=[],W;for(W in F){var J=F[W];J.cp&&R.push(g(J))}R.sort(function(V,U){return V.x!=U.x?V.x-U.x:V.y!=U.y?V.y-U.y:V.dx!=U.dx?V.dx-U.dx:V.dy-U.dy});for(F=0;F<R.length;F++)0<F&&R[F].x==R[F-1].x&&R[F].y==R[F-1].y&&R[F].dx==R[F-1].dx&&R[F].dy==R[F-1].dy||H.push("["+R[F].x+","+R[F].y+",0,"+R[F].dx+","+R[F].dy+"]");b.editor.graph.setCellStyles("points","["+H.join(",")+"]",[e]);f();b.hideDialog()});z.className="geBtn gePrimaryBtn";A=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
null,[e]);f();b.hideDialog()});A.className="geBtn";L=document.createElement("div");L.style.marginTop="10px";L.style.textAlign="right";b.editor.cancelFirst?(L.appendChild(l),L.appendChild(A),L.appendChild(z)):(L.appendChild(A),L.appendChild(z),L.appendChild(l));c.appendChild(L)};this.destroy=f;this.container=c};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
@@ -11456,56 +11456,56 @@ IMAGE_PATH+"/img-lo-res.png";Editor.cameraImage="data:image/svg+xml;base64,PHN2Z
Editor.tagsImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjE4cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE4cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMjEuNDEsMTEuNDFsLTguODMtOC44M0MxMi4yMSwyLjIxLDExLjcsMiwxMS4xNywySDRDMi45LDIsMiwyLjksMiw0djcuMTdjMCwwLjUzLDAuMjEsMS4wNCwwLjU5LDEuNDFsOC44Myw4LjgzIGMwLjc4LDAuNzgsMi4wNSwwLjc4LDIuODMsMGw3LjE3LTcuMTdDMjIuMiwxMy40NiwyMi4yLDEyLjIsMjEuNDEsMTEuNDF6IE0xMi44MywyMEw0LDExLjE3VjRoNy4xN0wyMCwxMi44M0wxMi44MywyMHoiLz48Y2lyY2xlIGN4PSI2LjUiIGN5PSI2LjUiIHI9IjEuNSIvPjwvZz48L2c+PC9zdmc+";
Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;
-Editor.enableExportUrl=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(t){t.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(t,F){return"1"==mxUtils.getValue(t.style,"enumerate","0")}},
-{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(t,F){return"1"!=mxUtils.getValue(t.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(t,F){return"1"==mxUtils.getValue(t.style,"comic","0")||"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(t,F){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},
-{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(t,F){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(t,F){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(t,F){return"1"==mxUtils.getValue(t.style,
-"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(t,F){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(t,F){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(t,
-F){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(t,F){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(t,F){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",
-type:"int",defVal:-1,isVisible:function(t,F){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(t,F){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+Editor.enableExportUrl=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(t){t.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"enumerate","0")}},
+{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(t,E){return"1"!=mxUtils.getValue(t.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"comic","0")||"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},
+{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,
+"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(t,
+E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",
+type:"int",defVal:-1,isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")&&0<t.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(t,E){return"1"==mxUtils.getValue(t.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",
dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(t){return"orthogonalEdgeStyle"==mxUtils.getValue(t.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",
type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",
dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);
-Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(t,F){F=F.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&F.isTableCell(t.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(t,F){F=F.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&F.isTableCell(t.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(t,
-F){t=F.editorUi.editor.graph.getCellStyle(1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null);return"1"==mxUtils.getValue(t,"resizeLastRow","0")},isVisible:function(t,F){F=F.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&F.isTable(t.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(t,F){t=F.editorUi.editor.graph.getCellStyle(1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null);return"1"==mxUtils.getValue(t,"resizeLast",
-"0")},isVisible:function(t,F){F=F.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&F.isTable(t.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},
+Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(t,E){E=E.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&E.isTableCell(t.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(t,E){E=E.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&E.isTableCell(t.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(t,
+E){t=E.editorUi.editor.graph.getCellStyle(1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null);return"1"==mxUtils.getValue(t,"resizeLastRow","0")},isVisible:function(t,E){E=E.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&E.isTable(t.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(t,E){t=E.editorUi.editor.graph.getCellStyle(1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null);return"1"==mxUtils.getValue(t,"resizeLast",
+"0")},isVisible:function(t,E){E=E.editorUi.editor.graph;return 1==t.vertices.length&&0==t.edges.length&&E.isTable(t.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},
{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},
-{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(t,F){return F.editorUi.editor.graph.isCellConnectable(0<t.vertices.length&&0==t.edges.length?t.vertices[0]:null)},isVisible:function(t,F){return 0<t.vertices.length&&0==t.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
+{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(t,E){return E.editorUi.editor.graph.isCellConnectable(0<t.vertices.length&&0==t.edges.length?t.vertices[0]:null)},isVisible:function(t,E){return 0<t.vertices.length&&0==t.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",
-dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(t,F){return 1==t.vertices.length&&0==t.edges.length}},
-{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(t,F){t=1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null;F=F.editorUi.editor.graph;return null!=t&&(F.isSwimlane(t)||0<F.model.getChildCount(t))},isVisible:function(t,F){return 1==t.vertices.length&&0==t.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(t,F){var K=1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null;F=F.editorUi.editor.graph;return null!=K&&(F.isContainer(K)&&
-"0"!=t.style.collapsible||!F.isContainer(K)&&"1"==t.style.collapsible)},isVisible:function(t,F){return 1==t.vertices.length&&0==t.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(t,F){return 1==t.vertices.length&&0==t.edges.length&&!F.editorUi.editor.graph.isSwimlane(t.vertices[0])&&null==mxUtils.getValue(t.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,
-isVisible:function(t,F){F=F.editorUi.editor.graph.model;return 0<t.vertices.length?F.isVertex(F.getParent(t.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(t,F){t=0<t.vertices.length?
-F.editorUi.editor.graph.getCellGeometry(t.vertices[0]):null;return null!=t&&!t.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",
-type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(t,F){var K=mxUtils.getValue(t.style,mxConstants.STYLE_FILLCOLOR,null);return F.editorUi.editor.graph.isSwimlane(t.vertices[0])||null==K||K==mxConstants.NONE||0==mxUtils.getValue(t.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(t.style,mxConstants.STYLE_OPACITY,100)||null!=t.style.pointerEvents}},{name:"moveCells",
-dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(t,F){return 0<t.vertices.length&&F.editorUi.editor.graph.isContainer(t.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(t){var F=rough.canvas({getContext:function(){return t}});F.draw=function(K){var T=K.sets||[];K=K.options||this.getDefaultOptions();for(var P=0;P<T.length;P++){var Q=T[P];switch(Q.type){case "path":null!=K.stroke&&this._drawToContext(t,Q,K);break;case "fillPath":this._drawToContext(t,Q,K);break;case "fillSketch":this.fillSketch(t,Q,K)}}};F.fillSketch=function(K,T,P){var Q=t.state.strokeColor,S=t.state.strokeWidth,Y=t.state.strokeAlpha,ca=t.state.dashed,da=P.fillWeight;
-0>da&&(da=P.strokeWidth/2);t.setStrokeAlpha(t.state.fillAlpha);t.setStrokeColor(P.fill||"");t.setStrokeWidth(da);t.setDashed(!1);this._drawToContext(K,T,P);t.setDashed(ca);t.setStrokeWidth(S);t.setStrokeColor(Q);t.setStrokeAlpha(Y)};F._drawToContext=function(K,T,P){K.begin();for(var Q=0;Q<T.ops.length;Q++){var S=T.ops[Q],Y=S.data;switch(S.op){case "move":K.moveTo(Y[0],Y[1]);break;case "bcurveTo":K.curveTo(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case "lineTo":K.lineTo(Y[0],Y[1])}}K.end();"fillPath"===
-T.type&&P.filled?K.fill():K.stroke()};return F};(function(){function t(Q,S,Y){this.canvas=Q;this.rc=S;this.shape=Y;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,t.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,t.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,t.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
+dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(t,E){return 1==t.vertices.length&&0==t.edges.length}},
+{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(t,E){t=1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null;E=E.editorUi.editor.graph;return null!=t&&(E.isSwimlane(t)||0<E.model.getChildCount(t))},isVisible:function(t,E){return 1==t.vertices.length&&0==t.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(t,E){var K=1==t.vertices.length&&0==t.edges.length?t.vertices[0]:null;E=E.editorUi.editor.graph;return null!=K&&(E.isContainer(K)&&
+"0"!=t.style.collapsible||!E.isContainer(K)&&"1"==t.style.collapsible)},isVisible:function(t,E){return 1==t.vertices.length&&0==t.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(t,E){return 1==t.vertices.length&&0==t.edges.length&&!E.editorUi.editor.graph.isSwimlane(t.vertices[0])&&null==mxUtils.getValue(t.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,
+isVisible:function(t,E){E=E.editorUi.editor.graph.model;return 0<t.vertices.length?E.isVertex(E.getParent(t.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(t,E){t=0<t.vertices.length?
+E.editorUi.editor.graph.getCellGeometry(t.vertices[0]):null;return null!=t&&!t.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",
+type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(t,E){var K=mxUtils.getValue(t.style,mxConstants.STYLE_FILLCOLOR,null);return E.editorUi.editor.graph.isSwimlane(t.vertices[0])||null==K||K==mxConstants.NONE||0==mxUtils.getValue(t.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(t.style,mxConstants.STYLE_OPACITY,100)||null!=t.style.pointerEvents}},{name:"moveCells",
+dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(t,E){return 0<t.vertices.length&&E.editorUi.editor.graph.isContainer(t.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(t){var E=rough.canvas({getContext:function(){return t}});E.draw=function(K){var T=K.sets||[];K=K.options||this.getDefaultOptions();for(var P=0;P<T.length;P++){var Q=T[P];switch(Q.type){case "path":null!=K.stroke&&this._drawToContext(t,Q,K);break;case "fillPath":this._drawToContext(t,Q,K);break;case "fillSketch":this.fillSketch(t,Q,K)}}};E.fillSketch=function(K,T,P){var Q=t.state.strokeColor,S=t.state.strokeWidth,Y=t.state.strokeAlpha,ba=t.state.dashed,da=P.fillWeight;
+0>da&&(da=P.strokeWidth/2);t.setStrokeAlpha(t.state.fillAlpha);t.setStrokeColor(P.fill||"");t.setStrokeWidth(da);t.setDashed(!1);this._drawToContext(K,T,P);t.setDashed(ba);t.setStrokeWidth(S);t.setStrokeColor(Q);t.setStrokeAlpha(Y)};E._drawToContext=function(K,T,P){K.begin();for(var Q=0;Q<T.ops.length;Q++){var S=T.ops[Q],Y=S.data;switch(S.op){case "move":K.moveTo(Y[0],Y[1]);break;case "bcurveTo":K.curveTo(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case "lineTo":K.lineTo(Y[0],Y[1])}}K.end();"fillPath"===
+T.type&&P.filled?K.fill():K.stroke()};return E};(function(){function t(Q,S,Y){this.canvas=Q;this.rc=S;this.shape=Y;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,t.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,t.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,t.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,t.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,t.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,t.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,t.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,t.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
t.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,t.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,t.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,t.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,t.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,t.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}t.prototype.moveOp="M";t.prototype.lineOp="L";t.prototype.quadOp="Q";t.prototype.curveOp="C";t.prototype.closeOp="Z";t.prototype.getStyle=function(Q,S){var Y=1;if(null!=this.shape.state){var ca=this.shape.state.cell.id;if(null!=ca)for(var da=0;da<ca.length;da++)Y=(Y<<5)-Y+ca.charCodeAt(da)<<0}Y={strokeWidth:this.canvas.state.strokeWidth,seed:Y,preserveVertices:!0};ca=this.rc.getDefaultOptions();Y.stroke=Q?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":
-this.canvas.state.strokeColor:mxConstants.NONE;Q=null;(Y.filled=S)?(Y.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Q=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):Y.fill="";Y.bowing=mxUtils.getValue(this.shape.style,"bowing",ca.bowing);Y.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ca.hachureAngle);Y.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ca.curveFitting);Y.roughness=mxUtils.getValue(this.shape.style,
-"jiggle",ca.roughness);Y.simplification=mxUtils.getValue(this.shape.style,"simplification",ca.simplification);Y.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ca.disableMultiStroke);Y.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ca.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);Y.hachureGap="auto"==S?-1:S;Y.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);Y.dashOffset=mxUtils.getValue(this.shape.style,
-"dashOffset",S);Y.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);Y.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==S&&(S=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),S=null!=Y.fill&&(null!=Q||null!=S&&Y.fill==S)?"solid":ca.fillStyle);Y.fillStyle=S;return Y};t.prototype.begin=function(){this.passThrough?
+this.path=[];this.passThrough=!1}t.prototype.moveOp="M";t.prototype.lineOp="L";t.prototype.quadOp="Q";t.prototype.curveOp="C";t.prototype.closeOp="Z";t.prototype.getStyle=function(Q,S){var Y=1;if(null!=this.shape.state){var ba=this.shape.state.cell.id;if(null!=ba)for(var da=0;da<ba.length;da++)Y=(Y<<5)-Y+ba.charCodeAt(da)<<0}Y={strokeWidth:this.canvas.state.strokeWidth,seed:Y,preserveVertices:!0};ba=this.rc.getDefaultOptions();Y.stroke=Q?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":
+this.canvas.state.strokeColor:mxConstants.NONE;Q=null;(Y.filled=S)?(Y.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Q=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):Y.fill="";Y.bowing=mxUtils.getValue(this.shape.style,"bowing",ba.bowing);Y.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ba.hachureAngle);Y.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ba.curveFitting);Y.roughness=mxUtils.getValue(this.shape.style,
+"jiggle",ba.roughness);Y.simplification=mxUtils.getValue(this.shape.style,"simplification",ba.simplification);Y.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ba.disableMultiStroke);Y.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ba.disableMultiStrokeFill);S=mxUtils.getValue(this.shape.style,"hachureGap",-1);Y.hachureGap="auto"==S?-1:S;Y.dashGap=mxUtils.getValue(this.shape.style,"dashGap",S);Y.dashOffset=mxUtils.getValue(this.shape.style,
+"dashOffset",S);Y.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",S);S=mxUtils.getValue(this.shape.style,"fillWeight",-1);Y.fillWeight="auto"==S?-1:S;S=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==S&&(S=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),S=null!=Y.fill&&(null!=Q||null!=S&&Y.fill==S)?"solid":ba.fillStyle);Y.fillStyle=S;return Y};t.prototype.begin=function(){this.passThrough?
this.originalBegin.apply(this.canvas,arguments):this.path=[]};t.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};t.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Q=2;Q<arguments.length;Q+=2)this.lastX=arguments[Q-1],this.lastY=arguments[Q],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};t.prototype.lineTo=function(Q,S){this.passThrough?this.originalLineTo.apply(this.canvas,
-arguments):(this.addOp(this.lineOp,Q,S),this.lastX=Q,this.lastY=S)};t.prototype.moveTo=function(Q,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,S),this.lastX=Q,this.lastY=S,this.firstX=Q,this.firstY=S)};t.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};t.prototype.quadTo=function(Q,S,Y,ca){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Q,
-S,Y,ca),this.lastX=Y,this.lastY=ca)};t.prototype.curveTo=function(Q,S,Y,ca,da,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,S,Y,ca,da,Z),this.lastX=da,this.lastY=Z)};t.prototype.arcTo=function(Q,S,Y,ca,da,Z,ha){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var aa=mxUtils.arcToCurves(this.lastX,this.lastY,Q,S,Y,ca,da,Z,ha);if(null!=aa)for(var ua=0;ua<aa.length;ua+=6)this.curveTo(aa[ua],aa[ua+1],aa[ua+2],aa[ua+3],aa[ua+4],
-aa[ua+5]);this.lastX=Z;this.lastY=ha}};t.prototype.rect=function(Q,S,Y,ca){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,S,Y,ca,this.getStyle(!0,!0)))};t.prototype.ellipse=function(Q,S,Y,ca){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+Y/2,S+ca/2,Y,ca,this.getStyle(!0,!0)))};t.prototype.roundrect=function(Q,S,Y,ca,da,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,
-arguments):(this.begin(),this.moveTo(Q+da,S),this.lineTo(Q+Y-da,S),this.quadTo(Q+Y,S,Q+Y,S+Z),this.lineTo(Q+Y,S+ca-Z),this.quadTo(Q+Y,S+ca,Q+Y-da,S+ca),this.lineTo(Q+da,S+ca),this.quadTo(Q,S+ca,Q,S+ca-Z),this.lineTo(Q,S+Z),this.quadTo(Q,S,Q+da,S))};t.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(Y){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in Q)this.nextShape.options[S]=Q[S];Q.stroke!=mxConstants.NONE&&null!=
+arguments):(this.addOp(this.lineOp,Q,S),this.lastX=Q,this.lastY=S)};t.prototype.moveTo=function(Q,S){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,S),this.lastX=Q,this.lastY=S,this.firstX=Q,this.firstY=S)};t.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};t.prototype.quadTo=function(Q,S,Y,ba){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,Q,
+S,Y,ba),this.lastX=Y,this.lastY=ba)};t.prototype.curveTo=function(Q,S,Y,ba,da,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,S,Y,ba,da,Z),this.lastX=da,this.lastY=Z)};t.prototype.arcTo=function(Q,S,Y,ba,da,Z,ja){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var ea=mxUtils.arcToCurves(this.lastX,this.lastY,Q,S,Y,ba,da,Z,ja);if(null!=ea)for(var ha=0;ha<ea.length;ha+=6)this.curveTo(ea[ha],ea[ha+1],ea[ha+2],ea[ha+3],ea[ha+4],
+ea[ha+5]);this.lastX=Z;this.lastY=ja}};t.prototype.rect=function(Q,S,Y,ba){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,S,Y,ba,this.getStyle(!0,!0)))};t.prototype.ellipse=function(Q,S,Y,ba){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+Y/2,S+ba/2,Y,ba,this.getStyle(!0,!0)))};t.prototype.roundrect=function(Q,S,Y,ba,da,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,
+arguments):(this.begin(),this.moveTo(Q+da,S),this.lineTo(Q+Y-da,S),this.quadTo(Q+Y,S,Q+Y,S+Z),this.lineTo(Q+Y,S+ba-Z),this.quadTo(Q+Y,S+ba,Q+Y-da,S+ba),this.lineTo(Q+da,S+ba),this.quadTo(Q,S+ba,Q,S+ba-Z),this.lineTo(Q,S+Z),this.quadTo(Q,S,Q+da,S))};t.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(Y){}this.passThrough=!1}else if(null!=this.nextShape){for(var S in Q)this.nextShape.options[S]=Q[S];Q.stroke!=mxConstants.NONE&&null!=
Q.stroke||delete this.nextShape.options.stroke;Q.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};t.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};t.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};t.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,
arguments):this.drawPath(this.getStyle(!0,!0))};t.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;
-this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new t(Q,Editor.createRoughCanvas(Q),this)};var F=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?F.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle",
-"rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var K=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,S,Y,ca,da){null!=Q.handJiggle&&Q.handJiggle.passThrough||K.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var S=Q.addTolerance,Y=!0;null!=this.style&&(Y="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==t&&!this.outline){Q.save();
-var ca=this.fill,da=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,ha=Q.setStrokeColor;Q.setStrokeColor=function(){};var aa=Q.setFillColor;Q.setFillColor=function(){};Y||null==ca||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;T.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=aa;Q.setStrokeColor=ha;this.configurePointerEvents=Z;this.stroke=da;this.fill=ca;Q.restore();Y&&null!=ca&&(Q.addTolerance=function(){})}T.apply(this,arguments);
-Q.addTolerance=S};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,S,Y,ca,da,Z){null!=Q.handJiggle&&Q.handJiggle.constructor==t?(Q.handJiggle.passThrough=!0,P.apply(this,arguments),Q.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?t:Graph.arrayBufferToString(pako.deflateRaw(t))};Editor.fastDecompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?
-t:pako.inflateRaw(Graph.stringToArrayBuffer(atob(t)),{to:"string"})};Editor.extractGraphModel=function(t,F,K){if(null!=t&&"undefined"!==typeof pako){var T=t.ownerDocument.getElementsByTagName("div"),P=[];if(null!=T&&0<T.length)for(var Q=0;Q<T.length;Q++)if("mxgraph"==T[Q].getAttribute("class")){P.push(T[Q]);break}0<P.length&&(T=P[0].getAttribute("data-mxgraph"),null!=T?(P=JSON.parse(T),null!=P&&null!=P.xml&&(t=mxUtils.parseXml(P.xml),t=t.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&
-(T=mxUtils.getTextContent(P[0]),T=Graph.decompress(T,null,K),0<T.length&&(t=mxUtils.parseXml(T),t=t.documentElement))))}if(null!=t&&"svg"==t.nodeName)if(T=t.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&(T=decodeURIComponent(T)),null!=T&&0<T.length)t=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==t||F||(P=null,"diagram"==t.nodeName?P=t:"mxfile"==
-t.nodeName&&(T=t.getElementsByTagName("diagram"),0<T.length&&(P=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=P&&(t=Editor.parseDiagramNode(P,K)));null==t||"mxGraphModel"==t.nodeName||F&&"mxfile"==t.nodeName||(t=null);return t};Editor.parseDiagramNode=function(t,F){var K=mxUtils.trim(mxUtils.getTextContent(t)),T=null;0<K.length?(t=Graph.decompress(K,null,F),null!=t&&0<t.length&&(T=mxUtils.parseXml(t).documentElement)):(t=mxUtils.getChildNodes(t),0<t.length&&(T=mxUtils.createXmlDocument(),
-T.appendChild(T.importNode(t[0],!0)),T=T.documentElement));return T};Editor.getDiagramNodeXml=function(t){var F=mxUtils.getTextContent(t),K=null;0<F.length?K=Graph.decompress(F):null!=t.firstChild&&(K=mxUtils.getXml(t.firstChild));return K};Editor.extractGraphModelFromPdf=function(t){t=t.substring(t.indexOf(",")+1);t=window.atob&&!mxClient.IS_SF?atob(t):Base64.decode(t,!0);if("%PDF-1.7"==t.substring(0,8)){var F=t.indexOf("EmbeddedFile");if(-1<F){var K=t.indexOf("stream",F)+9;if(0<t.substring(F,K).indexOf("application#2Fvnd.jgraph.mxfile"))return F=
-t.indexOf("endstream",K-1),pako.inflateRaw(Graph.stringToArrayBuffer(t.substring(K,F)),{to:"string"})}return null}K=null;F="";for(var T=0,P=0,Q=[],S=null;P<t.length;){var Y=t.charCodeAt(P);P+=1;10!=Y&&(F+=String.fromCharCode(Y));Y=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var ca=t.indexOf("%3C%2Fmxfile%3E)",P)+15;P-=9;if(ca>P){K=t.substring(P,ca);break}}10==Y&&("endobj"==F?S=null:"obj"==F.substring(F.length-3,F.length)||"xref"==F||"trailer"==F?(S=[],Q[F.split(" ")[0]]=S):null!=S&&S.push(F),
-F="")}null==K&&(K=Editor.extractGraphModelFromXref(Q));null!=K&&(K=decodeURIComponent(K.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return K};Editor.extractGraphModelFromXref=function(t){var F=t.trailer,K=null;null!=F&&(F=/.* \/Info (\d+) (\d+) R/g.exec(F.join("\n")),null!=F&&0<F.length&&(F=t[F[1]],null!=F&&(F=/.* \/Subject (\d+) (\d+) R/g.exec(F.join("\n")),null!=F&&0<F.length&&(t=t[F[1]],null!=t&&(t=t.join("\n"),K=t.substring(1,t.length-1))))));return K};Editor.extractParserError=function(t,F){var K=
-null;t=null!=t?t.getElementsByTagName("parsererror"):null;null!=t&&0<t.length&&(K=F||mxResources.get("invalidChars"),F=t[0].getElementsByTagName("div"),0<F.length&&(K=mxUtils.getTextContent(F[0])));return null!=K?mxUtils.trim(K):K};Editor.addRetryToError=function(t,F){null!=t&&(t=null!=t.error?t.error:t,null==t.retry&&(t.retry=F))};Editor.configure=function(t,F){if(null!=t){Editor.config=t;Editor.configVersion=t.version;Menus.prototype.defaultFonts=t.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
+this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new t(Q,Editor.createRoughCanvas(Q),this)};var E=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?E.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle",
+"rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var K=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,S,Y,ba,da){null!=Q.handJiggle&&Q.handJiggle.passThrough||K.apply(this,arguments)};var T=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var S=Q.addTolerance,Y=!0;null!=this.style&&(Y="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==t&&!this.outline){Q.save();
+var ba=this.fill,da=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,ja=Q.setStrokeColor;Q.setStrokeColor=function(){};var ea=Q.setFillColor;Q.setFillColor=function(){};Y||null==ba||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;T.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=ea;Q.setStrokeColor=ja;this.configurePointerEvents=Z;this.stroke=da;this.fill=ba;Q.restore();Y&&null!=ba&&(Q.addTolerance=function(){})}T.apply(this,arguments);
+Q.addTolerance=S};var P=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,S,Y,ba,da,Z){null!=Q.handJiggle&&Q.handJiggle.constructor==t?(Q.handJiggle.passThrough=!0,P.apply(this,arguments),Q.handJiggle.passThrough=!1):P.apply(this,arguments)}})();Editor.fastCompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?t:Graph.arrayBufferToString(pako.deflateRaw(t))};Editor.fastDecompress=function(t){return null==t||0==t.length||"undefined"===typeof pako?
+t:pako.inflateRaw(Graph.stringToArrayBuffer(atob(t)),{to:"string"})};Editor.extractGraphModel=function(t,E,K){if(null!=t&&"undefined"!==typeof pako){var T=t.ownerDocument.getElementsByTagName("div"),P=[];if(null!=T&&0<T.length)for(var Q=0;Q<T.length;Q++)if("mxgraph"==T[Q].getAttribute("class")){P.push(T[Q]);break}0<P.length&&(T=P[0].getAttribute("data-mxgraph"),null!=T?(P=JSON.parse(T),null!=P&&null!=P.xml&&(t=mxUtils.parseXml(P.xml),t=t.documentElement)):(P=P[0].getElementsByTagName("div"),0<P.length&&
+(T=mxUtils.getTextContent(P[0]),T=Graph.decompress(T,null,K),0<T.length&&(t=mxUtils.parseXml(T),t=t.documentElement))))}if(null!=t&&"svg"==t.nodeName)if(T=t.getAttribute("content"),null!=T&&"<"!=T.charAt(0)&&"%"!=T.charAt(0)&&(T=unescape(window.atob?atob(T):Base64.decode(cont,T))),null!=T&&"%"==T.charAt(0)&&(T=decodeURIComponent(T)),null!=T&&0<T.length)t=mxUtils.parseXml(T).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==t||E||(P=null,"diagram"==t.nodeName?P=t:"mxfile"==
+t.nodeName&&(T=t.getElementsByTagName("diagram"),0<T.length&&(P=T[Math.max(0,Math.min(T.length-1,urlParams.page||0))])),null!=P&&(t=Editor.parseDiagramNode(P,K)));null==t||"mxGraphModel"==t.nodeName||E&&"mxfile"==t.nodeName||(t=null);return t};Editor.parseDiagramNode=function(t,E){var K=mxUtils.trim(mxUtils.getTextContent(t)),T=null;0<K.length?(t=Graph.decompress(K,null,E),null!=t&&0<t.length&&(T=mxUtils.parseXml(t).documentElement)):(t=mxUtils.getChildNodes(t),0<t.length&&(T=mxUtils.createXmlDocument(),
+T.appendChild(T.importNode(t[0],!0)),T=T.documentElement));return T};Editor.getDiagramNodeXml=function(t){var E=mxUtils.getTextContent(t),K=null;0<E.length?K=Graph.decompress(E):null!=t.firstChild&&(K=mxUtils.getXml(t.firstChild));return K};Editor.extractGraphModelFromPdf=function(t){t=t.substring(t.indexOf(",")+1);t=window.atob&&!mxClient.IS_SF?atob(t):Base64.decode(t,!0);if("%PDF-1.7"==t.substring(0,8)){var E=t.indexOf("EmbeddedFile");if(-1<E){var K=t.indexOf("stream",E)+9;if(0<t.substring(E,K).indexOf("application#2Fvnd.jgraph.mxfile"))return E=
+t.indexOf("endstream",K-1),pako.inflateRaw(Graph.stringToArrayBuffer(t.substring(K,E)),{to:"string"})}return null}K=null;E="";for(var T=0,P=0,Q=[],S=null;P<t.length;){var Y=t.charCodeAt(P);P+=1;10!=Y&&(E+=String.fromCharCode(Y));Y=="/Subject (%3Cmxfile".charCodeAt(T)?T++:T=0;if(19==T){var ba=t.indexOf("%3C%2Fmxfile%3E)",P)+15;P-=9;if(ba>P){K=t.substring(P,ba);break}}10==Y&&("endobj"==E?S=null:"obj"==E.substring(E.length-3,E.length)||"xref"==E||"trailer"==E?(S=[],Q[E.split(" ")[0]]=S):null!=S&&S.push(E),
+E="")}null==K&&(K=Editor.extractGraphModelFromXref(Q));null!=K&&(K=decodeURIComponent(K.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return K};Editor.extractGraphModelFromXref=function(t){var E=t.trailer,K=null;null!=E&&(E=/.* \/Info (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(E=t[E[1]],null!=E&&(E=/.* \/Subject (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(t=t[E[1]],null!=t&&(t=t.join("\n"),K=t.substring(1,t.length-1))))));return K};Editor.extractParserError=function(t,E){var K=
+null;t=null!=t?t.getElementsByTagName("parsererror"):null;null!=t&&0<t.length&&(K=E||mxResources.get("invalidChars"),E=t[0].getElementsByTagName("div"),0<E.length&&(K=mxUtils.getTextContent(E[0])));return null!=K?mxUtils.trim(K):K};Editor.addRetryToError=function(t,E){null!=t&&(t=null!=t.error?t.error:t,null==t.retry&&(t.retry=E))};Editor.configure=function(t,E){if(null!=t){Editor.config=t;Editor.configVersion=t.version;Menus.prototype.defaultFonts=t.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
t.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=t.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=t.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=t.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=t.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=t.autosaveDelay||DrawioFile.prototype.autosaveDelay;
t.debug&&(urlParams.test="1");null!=t.templateFile&&(EditorUi.templateFile=t.templateFile);null!=t.styles&&(Array.isArray(t.styles)?Editor.styles=t.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=t.globalVars&&(Editor.globalVars=t.globalVars);null!=t.compressXml&&(Editor.compressXml=t.compressXml);null!=t.includeDiagram&&(Editor.defaultIncludeDiagram=t.includeDiagram);null!=t.simpleLabels&&(Editor.simpleLabels=t.simpleLabels);null!=t.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
t.oneDriveInlinePicker);null!=t.darkColor&&(Editor.darkColor=t.darkColor);null!=t.lightColor&&(Editor.lightColor=t.lightColor);null!=t.settingsName&&(Editor.configurationKey="."+t.settingsName+"-configuration",Editor.settingsKey="."+t.settingsName+"-config",mxSettings.key=Editor.settingsKey);t.customFonts&&(Menus.prototype.defaultFonts=t.customFonts.concat(Menus.prototype.defaultFonts));t.customPresetColors&&(ColorDialog.prototype.presetColors=t.customPresetColors.concat(ColorDialog.prototype.presetColors));
@@ -11514,53 +11514,53 @@ t.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabl
null!=t.defaultPageVisible&&(Graph.prototype.defaultPageVisible=t.defaultPageVisible);null!=t.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=t.defaultGridEnabled);null!=t.zoomWheel&&(Graph.zoomWheel=t.zoomWheel);null!=t.zoomFactor&&(K=parseFloat(t.zoomFactor),!isNaN(K)&&1<K?Graph.prototype.zoomFactor=K:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=t.gridSteps&&(K=parseInt(t.gridSteps),!isNaN(K)&&0<K?mxGraphView.prototype.gridSteps=K:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
null!=t.pageFormat&&(K=parseInt(t.pageFormat.width),T=parseInt(t.pageFormat.height),!isNaN(K)&&0<K&&!isNaN(T)&&0<T?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,K,T),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));t.thumbWidth&&(Sidebar.prototype.thumbWidth=t.thumbWidth);t.thumbHeight&&(Sidebar.prototype.thumbHeight=t.thumbHeight);t.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
t.emptyLibraryXml);t.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=t.emptyDiagramXml);t.sidebarWidth&&(EditorUi.prototype.hsplitPosition=t.sidebarWidth);t.sidebarTitles&&(Sidebar.prototype.sidebarTitles=t.sidebarTitles);t.sidebarTitleSize&&(K=parseInt(t.sidebarTitleSize),!isNaN(K)&&0<K?Sidebar.prototype.sidebarTitleSize=K:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));t.fontCss&&("string"===typeof t.fontCss?Editor.configureFontCss(t.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
-null!=t.autosaveDelay&&(K=parseInt(t.autosaveDelay),!isNaN(K)&&0<K?DrawioFile.prototype.autosaveDelay=K:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=t.plugins&&!F)for(App.initPluginCallback(),F=0;F<t.plugins.length;F++)mxscript(t.plugins[F]);null!=t.maxImageBytes&&(EditorUi.prototype.maxImageBytes=t.maxImageBytes);null!=t.maxImageSize&&(EditorUi.prototype.maxImageSize=t.maxImageSize);null!=t.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=t.shareCursorPosition);
-null!=t.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=t.showRemoteCursors)}};Editor.configureFontCss=function(t){if(null!=t){Editor.prototype.fontCss=t;var F=document.getElementsByTagName("script")[0];if(null!=F&&null!=F.parentNode){var K=document.createElement("style");K.setAttribute("type","text/css");K.appendChild(document.createTextNode(t));F.parentNode.insertBefore(K,F);t=t.split("url(");for(K=1;K<t.length;K++){var T=t[K].indexOf(")");T=Editor.trimCssUrl(t[K].substring(0,T));var P=
-document.createElement("link");P.setAttribute("rel","preload");P.setAttribute("href",T);P.setAttribute("as","font");P.setAttribute("crossorigin","");F.parentNode.insertBefore(P,F)}}}};Editor.trimCssUrl=function(t){return t.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(t){t=null!=
-t?t:Editor.GUID_LENGTH;for(var F=[],K=0;K<t;K++)F.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return F.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(t){t=null!=t&&"mxlibrary"!=t.nodeName?this.extractGraphModel(t):
-null;if(null!=t){var F=Editor.extractParserError(t,mxResources.get("invalidOrMissingFile"));if(F)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[t],"cause",[F]),Error(mxResources.get("notADiagramFile")+" ("+F+")");if("mxGraphModel"==t.nodeName){F=t.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=F&&""!=F)F!=this.graph.currentStyle&&(K=null!=this.graph.themes?this.graph.themes[F]:mxUtils.load(STYLE_PATH+"/"+F+".xml").getDocumentElement(),null!=K&&(T=new mxCodec(K.ownerDocument),
-T.decode(K,this.graph.getStylesheet())));else{var K=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=K){var T=new mxCodec(K.ownerDocument);T.decode(K,this.graph.getStylesheet())}}this.graph.currentStyle=F;this.graph.mathEnabled="1"==urlParams.math||"1"==t.getAttribute("math");F=t.getAttribute("backgroundImage");null!=F?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(F)):this.graph.setBackgroundImage(null);
-mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==t.getAttribute("shadow"),!1);if(F=t.getAttribute("extFonts"))try{for(F=F.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}}),K=0;K<F.length;K++)this.graph.addExtFont(F[K].name,F[K].url)}catch(P){console.log("ExtFonts format error: "+
-P.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(t,F){t=null!=t?t:!0;var K=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&K.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,
-F);null!=T&&K.setAttribute("backgroundImage",JSON.stringify(T));K.setAttribute("math",this.graph.mathEnabled?"1":"0");K.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(P){return P.name+"^"+P.url}),K.setAttribute("extFonts",T.join("|")));return K};Editor.prototype.isDataSvg=function(t){try{var F=mxUtils.parseXml(t).documentElement.getAttribute("content");if(null!=F&&(null!=F&&"<"!=F.charAt(0)&&"%"!=
-F.charAt(0)&&(F=unescape(window.atob?atob(F):Base64.decode(cont,F))),null!=F&&"%"==F.charAt(0)&&(F=decodeURIComponent(F)),null!=F&&0<F.length)){var K=mxUtils.parseXml(F).documentElement;return"mxfile"==K.nodeName||"mxGraphModel"==K.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(t,F,K){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
+null!=t.autosaveDelay&&(K=parseInt(t.autosaveDelay),!isNaN(K)&&0<K?DrawioFile.prototype.autosaveDelay=K:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=t.plugins&&!E)for(App.initPluginCallback(),E=0;E<t.plugins.length;E++)mxscript(t.plugins[E]);null!=t.maxImageBytes&&(EditorUi.prototype.maxImageBytes=t.maxImageBytes);null!=t.maxImageSize&&(EditorUi.prototype.maxImageSize=t.maxImageSize);null!=t.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=t.shareCursorPosition);
+null!=t.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=t.showRemoteCursors)}};Editor.configureFontCss=function(t){if(null!=t){Editor.prototype.fontCss=t;var E=document.getElementsByTagName("script")[0];if(null!=E&&null!=E.parentNode){var K=document.createElement("style");K.setAttribute("type","text/css");K.appendChild(document.createTextNode(t));E.parentNode.insertBefore(K,E);t=t.split("url(");for(K=1;K<t.length;K++){var T=t[K].indexOf(")");T=Editor.trimCssUrl(t[K].substring(0,T));var P=
+document.createElement("link");P.setAttribute("rel","preload");P.setAttribute("href",T);P.setAttribute("as","font");P.setAttribute("crossorigin","");E.parentNode.insertBefore(P,E)}}}};Editor.trimCssUrl=function(t){return t.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(t){t=null!=
+t?t:Editor.GUID_LENGTH;for(var E=[],K=0;K<t;K++)E.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return E.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(t){t=null!=t&&"mxlibrary"!=t.nodeName?this.extractGraphModel(t):
+null;if(null!=t){var E=Editor.extractParserError(t,mxResources.get("invalidOrMissingFile"));if(E)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[t],"cause",[E]),Error(mxResources.get("notADiagramFile")+" ("+E+")");if("mxGraphModel"==t.nodeName){E=t.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=E&&""!=E)E!=this.graph.currentStyle&&(K=null!=this.graph.themes?this.graph.themes[E]:mxUtils.load(STYLE_PATH+"/"+E+".xml").getDocumentElement(),null!=K&&(T=new mxCodec(K.ownerDocument),
+T.decode(K,this.graph.getStylesheet())));else{var K=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=K){var T=new mxCodec(K.ownerDocument);T.decode(K,this.graph.getStylesheet())}}this.graph.currentStyle=E;this.graph.mathEnabled="1"==urlParams.math||"1"==t.getAttribute("math");E=t.getAttribute("backgroundImage");null!=E?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(E)):this.graph.setBackgroundImage(null);
+mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==t.getAttribute("shadow"),!1);if(E=t.getAttribute("extFonts"))try{for(E=E.split("|").map(function(P){P=P.split("^");return{name:P[0],url:P[1]}}),K=0;K<E.length;K++)this.graph.addExtFont(E[K].name,E[K].url)}catch(P){console.log("ExtFonts format error: "+
+P.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(t,E){t=null!=t?t:!0;var K=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&K.setAttribute("style",this.graph.currentStyle);var T=this.graph.getBackgroundImageObject(this.graph.backgroundImage,
+E);null!=T&&K.setAttribute("backgroundImage",JSON.stringify(T));K.setAttribute("math",this.graph.mathEnabled?"1":"0");K.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(T=this.graph.extFonts.map(function(P){return P.name+"^"+P.url}),K.setAttribute("extFonts",T.join("|")));return K};Editor.prototype.isDataSvg=function(t){try{var E=mxUtils.parseXml(t).documentElement.getAttribute("content");if(null!=E&&(null!=E&&"<"!=E.charAt(0)&&"%"!=
+E.charAt(0)&&(E=unescape(window.atob?atob(E):Base64.decode(cont,E))),null!=E&&"%"==E.charAt(0)&&(E=decodeURIComponent(E)),null!=E&&0<E.length)){var K=mxUtils.parseXml(E).documentElement;return"mxfile"==K.nodeName||"mxGraphModel"==K.nodeName}}catch(T){}return!1};Editor.prototype.extractGraphModel=function(t,E,K){return Editor.extractGraphModel.apply(this,arguments)};var f=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();f.apply(this,arguments)};var c=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){c.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?
-!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";Editor.initMath=function(t,F){if("undefined"===typeof window.MathJax){t=(null!=t?t:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full,Safe";Editor.mathJaxQueue=
-[];Editor.doMathJaxRender=function(S){window.setTimeout(function(){"hidden"!=S.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,S])},0)};var K=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";F=null!=F?F:{"HTML-CSS":{availableFonts:[K],imageFont:null},SVG:{font:K,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(F);
+!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";Editor.initMath=function(t,E){if("undefined"===typeof window.MathJax){t=(null!=t?t:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full,Safe";Editor.mathJaxQueue=
+[];Editor.doMathJaxRender=function(S){window.setTimeout(function(){"hidden"!=S.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,S])},0)};var K=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";E=null!=E?E:{"HTML-CSS":{availableFonts:[K],imageFont:null},SVG:{font:K,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(E);
MathJax.Hub.Register.StartupHook("Begin",function(){for(var S=0;S<Editor.mathJaxQueue.length;S++)Editor.doMathJaxRender(Editor.mathJaxQueue[S])})}};Editor.MathJaxRender=function(S){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(S):Editor.mathJaxQueue.push(S)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var T=Editor.prototype.init;Editor.prototype.init=function(){T.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(S,
Y){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};K=document.getElementsByTagName("script");if(null!=K&&0<K.length){var P=document.createElement("script");P.setAttribute("type","text/javascript");P.setAttribute("src",t);K[0].parentNode.appendChild(P)}try{if(mxClient.IS_GC||mxClient.IS_SF){var Q=document.createElement("style");Q.type="text/css";Q.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(Q)}}catch(S){}}};
-Editor.prototype.csvToArray=function(t){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(t))return null;var F=[];t.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(K,T,P,Q){void 0!==T?F.push(T.replace(/\\'/g,"'")):void 0!==P?F.push(P.replace(/\\"/g,
-'"')):void 0!==Q&&F.push(Q);return""});/,\s*$/.test(t)&&F.push("");return F};Editor.prototype.isCorsEnabledForUrl=function(t){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||t.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(t)||"https://raw.githubusercontent.com/"===t.substring(0,34)||"https://fonts.googleapis.com/"===
-t.substring(0,29)||"https://fonts.gstatic.com/"===t.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var t=new mxUrlConverter;t.updateBaseUrl();var F=t.convert,K=this;t.convert=function(T){if(null!=T){var P="http://"==T.substring(0,7)||"https://"==T.substring(0,8);P&&!navigator.onLine?T=Editor.svgBrokenImage.src:!P||T.substring(0,t.baseUrl.length)==t.baseUrl||K.crossOriginImages&&K.isCorsEnabledForUrl(T)?"chrome-extension://"==T.substring(0,19)||mxClient.IS_CHROMEAPP||(T=F.apply(this,
-arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T)}return T};return t};Editor.createSvgDataUri=function(t){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(t)))};Editor.prototype.convertImageToDataUri=function(t,F){try{var K=!0,T=window.setTimeout(mxUtils.bind(this,function(){K=!1;F(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(t))mxUtils.get(t,mxUtils.bind(this,function(Q){window.clearTimeout(T);K&&F(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(T);
-K&&F(Editor.svgBrokenImage.src)});else{var P=new Image;this.crossOriginImages&&(P.crossOrigin="anonymous");P.onload=function(){window.clearTimeout(T);if(K)try{var Q=document.createElement("canvas"),S=Q.getContext("2d");Q.height=P.height;Q.width=P.width;S.drawImage(P,0,0);F(Q.toDataURL())}catch(Y){F(Editor.svgBrokenImage.src)}};P.onerror=function(){window.clearTimeout(T);K&&F(Editor.svgBrokenImage.src)};P.src=t}}catch(Q){F(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(t,F,K,
-T){null==T&&(T=this.createImageUrlConverter());var P=0,Q=K||{};K=mxUtils.bind(this,function(S,Y){S=t.getElementsByTagName(S);for(var ca=0;ca<S.length;ca++)mxUtils.bind(this,function(da){try{if(null!=da){var Z=T.convert(da.getAttribute(Y));if(null!=Z&&"data:"!=Z.substring(0,5)){var ha=Q[Z];null==ha?(P++,this.convertImageToDataUri(Z,function(aa){null!=aa&&(Q[Z]=aa,da.setAttribute(Y,aa));P--;0==P&&F(t)})):da.setAttribute(Y,ha)}else null!=Z&&da.setAttribute(Y,Z)}}catch(aa){}})(S[ca])});K("image","xlink:href");
-K("img","src");0==P&&F(t)};Editor.base64Encode=function(t){for(var F="",K=0,T=t.length,P,Q,S;K<T;){P=t.charCodeAt(K++)&255;if(K==T){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4);F+="==";break}Q=t.charCodeAt(K++);if(K==T){F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&
-3)<<4|(Q&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);F+="=";break}S=t.charCodeAt(K++);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(Q&240)>>4);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2|(S&192)>>6);F+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return F};
-Editor.prototype.loadUrl=function(t,F,K,T,P,Q,S,Y){try{var ca=!S&&(T||/(\.png)($|\?)/i.test(t)||/(\.jpe?g)($|\?)/i.test(t)||/(\.gif)($|\?)/i.test(t)||/(\.pdf)($|\?)/i.test(t));P=null!=P?P:!0;var da=mxUtils.bind(this,function(){mxUtils.get(t,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=F){var ha=Z.getText();if(ca){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();
-ha=Array(Z.length);for(var aa=0;aa<Z.length;aa++)ha[aa]=String.fromCharCode(Z[aa]);ha=ha.join("")}Q=null!=Q?Q:"data:image/png;base64,";ha=Q+Editor.base64Encode(ha)}F(ha)}}else null!=K&&(0==Z.getStatus()?K({message:mxResources.get("accessDenied")},Z):K({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=K&&K({message:mxResources.get("error")+" "+Z.getStatus()})},ca,this.timeout,function(){P&&null!=K&&K({code:App.ERROR_TIMEOUT,retry:da})},Y)});da()}catch(Z){null!=K&&K(Z)}};
-Editor.prototype.absoluteCssFonts=function(t){var F=null;if(null!=t){var K=t.split("url(");if(0<K.length){F=[K[0]];t=window.location.pathname;var T=null!=t?t.lastIndexOf("/"):-1;0<=T&&(t=t.substring(0,T+1));T=document.getElementsByTagName("base");var P=null;null!=T&&0<T.length&&(P=T[0].getAttribute("href"));for(var Q=1;Q<K.length;Q++)if(T=K[Q].indexOf(")"),0<T){var S=Editor.trimCssUrl(K[Q].substring(0,T));this.graph.isRelativeUrl(S)&&(S=null!=P?P+S:window.location.protocol+"//"+window.location.hostname+
-("/"==S.charAt(0)?"":t)+S);F.push('url("'+S+'"'+K[Q].substring(T))}else F.push(K[Q])}else F=[t]}return null!=F?F.join(""):null};Editor.prototype.mapFontUrl=function(t,F,K){/^https?:\/\//.test(F)&&!this.isCorsEnabledForUrl(F)&&(F=PROXY_URL+"?url="+encodeURIComponent(F));K(t,F)};Editor.prototype.embedCssFonts=function(t,F){var K=t.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var P=mxUtils.bind(this,function(){if(0==T){for(var ca=[K[0]],da=1;da<K.length;da++){var Z=K[da].indexOf(")");
-ca.push('url("');ca.push(this.cachedFonts[Editor.trimCssUrl(K[da].substring(0,Z))]);ca.push('"'+K[da].substring(Z))}F(ca.join(""))}});if(0<K.length){for(t=1;t<K.length;t++){var Q=K[t].indexOf(")"),S=null,Y=K[t].indexOf("format(",Q);0<Y&&(S=Editor.trimCssUrl(K[t].substring(Y+7,K[t].indexOf(")",Y))));mxUtils.bind(this,function(ca){if(null==this.cachedFonts[ca]){this.cachedFonts[ca]=ca;T++;var da="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(ca))da="image/svg+xml";else if("otf"==S||"embedded-opentype"==
-S||/(\.otf)($|\?)/i.test(ca))da="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(ca))da="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(ca))da="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(ca))da="application/vnd.ms-fontobject";else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(ca))da="application/font-sfnt";this.mapFontUrl(da,ca,mxUtils.bind(this,function(Z,ha){this.loadUrl(ha,mxUtils.bind(this,function(aa){this.cachedFonts[ca]=aa;T--;P()}),mxUtils.bind(this,
-function(aa){T--;P()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(K[t].substring(0,Q)),S)}P()}else F(t)};Editor.prototype.loadFonts=function(t){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(F){this.resolvedFontCss=F;null!=t&&t()})):null!=t&&t()};Editor.prototype.createGoogleFontCache=function(){var t={},F;for(F in Graph.fontMapping)Graph.isCssFontUrl(F)&&(t[F]=Graph.fontMapping[F]);return t};Editor.prototype.embedExtFonts=
-function(t){var F=this.graph.getCustomFonts();if(0<F.length){var K=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var P=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(K.join(""),t)}),Q=0;Q<F.length;Q++)mxUtils.bind(this,function(S,Y){Graph.isCssFontUrl(Y)?null==this.cachedGoogleFonts[Y]?(T++,this.loadUrl(Y,mxUtils.bind(this,function(ca){this.cachedGoogleFonts[Y]=ca;K.push(ca+"\n");T--;P()}),mxUtils.bind(this,function(ca){T--;K.push("@import url("+
-Y+");\n");P()}))):K.push(this.cachedGoogleFonts[Y]+"\n"):K.push('@font-face {font-family: "'+S+'";src: url("'+Y+'")}\n')})(F[Q].name,F[Q].url);P()}else t()};Editor.prototype.addMathCss=function(t){t=t.getElementsByTagName("defs");if(null!=t&&0<t.length)for(var F=document.getElementsByTagName("style"),K=0;K<F.length;K++){var T=mxUtils.getTextContent(F[K]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&t[0].appendChild(F[K].cloneNode(!0))}};Editor.prototype.addFontCss=function(t,F){F=null!=
-F?F:this.absoluteCssFonts(this.fontCss);if(null!=F){var K=t.getElementsByTagName("defs"),T=t.ownerDocument;0==K.length?(K=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=t.firstChild?t.insertBefore(K,t.firstChild):t.appendChild(K)):K=K[0];t=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"style"):T.createElement("style");t.setAttribute("type","text/css");mxUtils.setTextContent(t,F);K.appendChild(t)}};Editor.prototype.isExportToCanvas=
-function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(t,F,K){var T=mxClient.IS_FF?8192:16384;return Math.min(K,Math.min(T/t,T/F))};Editor.prototype.exportToCanvas=function(t,F,K,T,P,Q,S,Y,ca,da,Z,ha,aa,ua,ka,Ca,Da,oa){try{Q=null!=Q?Q:!0;S=null!=S?S:!0;ha=null!=ha?ha:this.graph;aa=null!=aa?aa:0;var Ba=ca?null:ha.background;Ba==mxConstants.NONE&&(Ba=null);null==Ba&&(Ba=T);null==Ba&&0==ca&&(Ba=Ca?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(ha.getSvg(null,null,aa,ua,null,S,null,null,null,da,null,Ca,Da,oa),mxUtils.bind(this,function(Aa){try{var Ha=new Image;Ha.onload=mxUtils.bind(this,function(){try{var Ga=function(){mxClient.IS_SF?window.setTimeout(function(){za.drawImage(Ha,0,0);t(Fa,Aa)},0):(za.drawImage(Ha,0,0),t(Fa,Aa))},Fa=document.createElement("canvas"),Ea=parseInt(Aa.getAttribute("width")),Ka=parseInt(Aa.getAttribute("height"));Y=null!=Y?Y:1;null!=F&&(Y=Q?Math.min(1,Math.min(3*F/(4*Ka),F/Ea)):F/Ea);Y=this.getMaxCanvasScale(Ea,
-Ka,Y);Ea=Math.ceil(Y*Ea);Ka=Math.ceil(Y*Ka);Fa.setAttribute("width",Ea);Fa.setAttribute("height",Ka);var za=Fa.getContext("2d");null!=Ba&&(za.beginPath(),za.rect(0,0,Ea,Ka),za.fillStyle=Ba,za.fill());1!=Y&&za.scale(Y,Y);if(ka){var ya=ha.view,qa=ya.scale;ya.scale=1;var fa=btoa(unescape(encodeURIComponent(ya.createSvgGrid(ya.gridColor))));ya.scale=qa;fa="data:image/svg+xml;base64,"+fa;var ra=ha.gridSize*ya.gridSteps*Y,xa=ha.getGraphBounds(),wa=ya.translate.x*qa,sa=ya.translate.y*qa,va=wa+(xa.x-wa)/
-qa-aa,ja=sa+(xa.y-sa)/qa-aa,pa=new Image;pa.onload=function(){try{for(var ba=-Math.round(ra-mxUtils.mod((wa-va)*Y,ra)),ea=-Math.round(ra-mxUtils.mod((sa-ja)*Y,ra));ba<Ea;ba+=ra)for(var na=ea;na<Ka;na+=ra)za.drawImage(pa,ba/Y,na/Y);Ga()}catch(la){null!=P&&P(la)}};pa.onerror=function(ba){null!=P&&P(ba)};pa.src=fa}else Ga()}catch(ba){null!=P&&P(ba)}});Ha.onerror=function(Ga){null!=P&&P(Ga)};da&&this.graph.addSvgShadow(Aa);this.graph.mathEnabled&&this.addMathCss(Aa);var Oa=mxUtils.bind(this,function(){try{null!=
-this.resolvedFontCss&&this.addFontCss(Aa,this.resolvedFontCss),Ha.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}catch(Ga){null!=P&&P(Ga)}});this.embedExtFonts(mxUtils.bind(this,function(Ga){try{null!=Ga&&this.addFontCss(Aa,Ga),this.loadFonts(Oa)}catch(Fa){null!=P&&P(Fa)}}))}catch(Ga){null!=P&&P(Ga)}}),K,Z)}catch(Aa){null!=P&&P(Aa)}};Editor.crcTable=[];for(var m=0;256>m;m++)for(var n=m,v=0;8>v;v++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[m]=n;Editor.updateCRC=function(t,F,K,T){for(var P=
-0;P<T;P++)t=Editor.crcTable[(t^F.charCodeAt(K+P))&255]^t>>>8;return t};Editor.crc32=function(t){for(var F=-1,K=0;K<t.length;K++)F=F>>>8^Editor.crcTable[(F^t.charCodeAt(K))&255];return(F^-1)>>>0};Editor.writeGraphModelToPng=function(t,F,K,T,P){function Q(Z,ha){var aa=ca;ca+=ha;return Z.substring(aa,ca)}function S(Z){Z=Q(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function Y(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}t=t.substring(t.indexOf(",")+
-1);t=window.atob?atob(t):Base64.decode(t,!0);var ca=0;if(Q(t,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(Q(t,4),"IHDR"!=Q(t,4))null!=P&&P();else{Q(t,17);P=t.substring(0,ca);do{var da=S(t);if("IDAT"==Q(t,4)){P=t.substring(0,ca-8);"pHYs"==F&&"dpi"==K?(K=Math.round(T/.0254),K=Y(K)+Y(K)+String.fromCharCode(1)):K=K+String.fromCharCode(0)+("zTXt"==F?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,F,0,4);T=Editor.updateCRC(T,K,0,K.length);P+=Y(K.length)+
-F+K+Y(T^4294967295);P+=t.substring(ca-8,t.length);break}P+=t.substring(ca-8,ca-4+da);Q(t,da);Q(t,4)}while(da);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(t,F){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
-function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(t,F){var K=null;null!=t.editor.graph.getModel().getParent(F)?K=F.getId():null!=t.currentPage&&(K=t.currentPage.getId());return K});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;
+Editor.prototype.csvToArray=function(t){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(t))return null;var E=[];t.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(K,T,P,Q){void 0!==T?E.push(T.replace(/\\'/g,"'")):void 0!==P?E.push(P.replace(/\\"/g,
+'"')):void 0!==Q&&E.push(Q);return""});/,\s*$/.test(t)&&E.push("");return E};Editor.prototype.isCorsEnabledForUrl=function(t){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||t.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(t)||"https://raw.githubusercontent.com/"===t.substring(0,34)||"https://fonts.googleapis.com/"===
+t.substring(0,29)||"https://fonts.gstatic.com/"===t.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var t=new mxUrlConverter;t.updateBaseUrl();var E=t.convert,K=this;t.convert=function(T){if(null!=T){var P="http://"==T.substring(0,7)||"https://"==T.substring(0,8);P&&!navigator.onLine?T=Editor.svgBrokenImage.src:!P||T.substring(0,t.baseUrl.length)==t.baseUrl||K.crossOriginImages&&K.isCorsEnabledForUrl(T)?"chrome-extension://"==T.substring(0,19)||mxClient.IS_CHROMEAPP||(T=E.apply(this,
+arguments)):T=PROXY_URL+"?url="+encodeURIComponent(T)}return T};return t};Editor.createSvgDataUri=function(t){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(t)))};Editor.prototype.convertImageToDataUri=function(t,E){try{var K=!0,T=window.setTimeout(mxUtils.bind(this,function(){K=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(t))mxUtils.get(t,mxUtils.bind(this,function(Q){window.clearTimeout(T);K&&E(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(T);
+K&&E(Editor.svgBrokenImage.src)});else{var P=new Image;this.crossOriginImages&&(P.crossOrigin="anonymous");P.onload=function(){window.clearTimeout(T);if(K)try{var Q=document.createElement("canvas"),S=Q.getContext("2d");Q.height=P.height;Q.width=P.width;S.drawImage(P,0,0);E(Q.toDataURL())}catch(Y){E(Editor.svgBrokenImage.src)}};P.onerror=function(){window.clearTimeout(T);K&&E(Editor.svgBrokenImage.src)};P.src=t}}catch(Q){E(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(t,E,K,
+T){null==T&&(T=this.createImageUrlConverter());var P=0,Q=K||{};K=mxUtils.bind(this,function(S,Y){S=t.getElementsByTagName(S);for(var ba=0;ba<S.length;ba++)mxUtils.bind(this,function(da){try{if(null!=da){var Z=T.convert(da.getAttribute(Y));if(null!=Z&&"data:"!=Z.substring(0,5)){var ja=Q[Z];null==ja?(P++,this.convertImageToDataUri(Z,function(ea){null!=ea&&(Q[Z]=ea,da.setAttribute(Y,ea));P--;0==P&&E(t)})):da.setAttribute(Y,ja)}else null!=Z&&da.setAttribute(Y,Z)}}catch(ea){}})(S[ba])});K("image","xlink:href");
+K("img","src");0==P&&E(t)};Editor.base64Encode=function(t){for(var E="",K=0,T=t.length,P,Q,S;K<T;){P=t.charCodeAt(K++)&255;if(K==T){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4);E+="==";break}Q=t.charCodeAt(K++);if(K==T){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&
+3)<<4|(Q&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);E+="=";break}S=t.charCodeAt(K++);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(Q&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2|(S&192)>>6);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return E};
+Editor.prototype.loadUrl=function(t,E,K,T,P,Q,S,Y){try{var ba=!S&&(T||/(\.png)($|\?)/i.test(t)||/(\.jpe?g)($|\?)/i.test(t)||/(\.gif)($|\?)/i.test(t)||/(\.pdf)($|\?)/i.test(t));P=null!=P?P:!0;var da=mxUtils.bind(this,function(){mxUtils.get(t,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=E){var ja=Z.getText();if(ba){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();
+ja=Array(Z.length);for(var ea=0;ea<Z.length;ea++)ja[ea]=String.fromCharCode(Z[ea]);ja=ja.join("")}Q=null!=Q?Q:"data:image/png;base64,";ja=Q+Editor.base64Encode(ja)}E(ja)}}else null!=K&&(0==Z.getStatus()?K({message:mxResources.get("accessDenied")},Z):K({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=K&&K({message:mxResources.get("error")+" "+Z.getStatus()})},ba,this.timeout,function(){P&&null!=K&&K({code:App.ERROR_TIMEOUT,retry:da})},Y)});da()}catch(Z){null!=K&&K(Z)}};
+Editor.prototype.absoluteCssFonts=function(t){var E=null;if(null!=t){var K=t.split("url(");if(0<K.length){E=[K[0]];t=window.location.pathname;var T=null!=t?t.lastIndexOf("/"):-1;0<=T&&(t=t.substring(0,T+1));T=document.getElementsByTagName("base");var P=null;null!=T&&0<T.length&&(P=T[0].getAttribute("href"));for(var Q=1;Q<K.length;Q++)if(T=K[Q].indexOf(")"),0<T){var S=Editor.trimCssUrl(K[Q].substring(0,T));this.graph.isRelativeUrl(S)&&(S=null!=P?P+S:window.location.protocol+"//"+window.location.hostname+
+("/"==S.charAt(0)?"":t)+S);E.push('url("'+S+'"'+K[Q].substring(T))}else E.push(K[Q])}else E=[t]}return null!=E?E.join(""):null};Editor.prototype.mapFontUrl=function(t,E,K){/^https?:\/\//.test(E)&&!this.isCorsEnabledForUrl(E)&&(E=PROXY_URL+"?url="+encodeURIComponent(E));K(t,E)};Editor.prototype.embedCssFonts=function(t,E){var K=t.split("url("),T=0;null==this.cachedFonts&&(this.cachedFonts={});var P=mxUtils.bind(this,function(){if(0==T){for(var ba=[K[0]],da=1;da<K.length;da++){var Z=K[da].indexOf(")");
+ba.push('url("');ba.push(this.cachedFonts[Editor.trimCssUrl(K[da].substring(0,Z))]);ba.push('"'+K[da].substring(Z))}E(ba.join(""))}});if(0<K.length){for(t=1;t<K.length;t++){var Q=K[t].indexOf(")"),S=null,Y=K[t].indexOf("format(",Q);0<Y&&(S=Editor.trimCssUrl(K[t].substring(Y+7,K[t].indexOf(")",Y))));mxUtils.bind(this,function(ba){if(null==this.cachedFonts[ba]){this.cachedFonts[ba]=ba;T++;var da="application/x-font-ttf";if("svg"==S||/(\.svg)($|\?)/i.test(ba))da="image/svg+xml";else if("otf"==S||"embedded-opentype"==
+S||/(\.otf)($|\?)/i.test(ba))da="application/x-font-opentype";else if("woff"==S||/(\.woff)($|\?)/i.test(ba))da="application/font-woff";else if("woff2"==S||/(\.woff2)($|\?)/i.test(ba))da="application/font-woff2";else if("eot"==S||/(\.eot)($|\?)/i.test(ba))da="application/vnd.ms-fontobject";else if("sfnt"==S||/(\.sfnt)($|\?)/i.test(ba))da="application/font-sfnt";this.mapFontUrl(da,ba,mxUtils.bind(this,function(Z,ja){this.loadUrl(ja,mxUtils.bind(this,function(ea){this.cachedFonts[ba]=ea;T--;P()}),mxUtils.bind(this,
+function(ea){T--;P()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(K[t].substring(0,Q)),S)}P()}else E(t)};Editor.prototype.loadFonts=function(t){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(E){this.resolvedFontCss=E;null!=t&&t()})):null!=t&&t()};Editor.prototype.createGoogleFontCache=function(){var t={},E;for(E in Graph.fontMapping)Graph.isCssFontUrl(E)&&(t[E]=Graph.fontMapping[E]);return t};Editor.prototype.embedExtFonts=
+function(t){var E=this.graph.getCustomFonts();if(0<E.length){var K=[],T=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var P=mxUtils.bind(this,function(){0==T&&this.embedCssFonts(K.join(""),t)}),Q=0;Q<E.length;Q++)mxUtils.bind(this,function(S,Y){Graph.isCssFontUrl(Y)?null==this.cachedGoogleFonts[Y]?(T++,this.loadUrl(Y,mxUtils.bind(this,function(ba){this.cachedGoogleFonts[Y]=ba;K.push(ba+"\n");T--;P()}),mxUtils.bind(this,function(ba){T--;K.push("@import url("+
+Y+");\n");P()}))):K.push(this.cachedGoogleFonts[Y]+"\n"):K.push('@font-face {font-family: "'+S+'";src: url("'+Y+'")}\n')})(E[Q].name,E[Q].url);P()}else t()};Editor.prototype.addMathCss=function(t){t=t.getElementsByTagName("defs");if(null!=t&&0<t.length)for(var E=document.getElementsByTagName("style"),K=0;K<E.length;K++){var T=mxUtils.getTextContent(E[K]);0>T.indexOf("mxPageSelector")&&0<T.indexOf("MathJax")&&t[0].appendChild(E[K].cloneNode(!0))}};Editor.prototype.addFontCss=function(t,E){E=null!=
+E?E:this.absoluteCssFonts(this.fontCss);if(null!=E){var K=t.getElementsByTagName("defs"),T=t.ownerDocument;0==K.length?(K=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=t.firstChild?t.insertBefore(K,t.firstChild):t.appendChild(K)):K=K[0];t=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"style"):T.createElement("style");t.setAttribute("type","text/css");mxUtils.setTextContent(t,E);K.appendChild(t)}};Editor.prototype.isExportToCanvas=
+function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(t,E,K){var T=mxClient.IS_FF?8192:16384;return Math.min(K,Math.min(T/t,T/E))};Editor.prototype.exportToCanvas=function(t,E,K,T,P,Q,S,Y,ba,da,Z,ja,ea,ha,ma,Aa,Da,Ca){try{Q=null!=Q?Q:!0;S=null!=S?S:!0;ja=null!=ja?ja:this.graph;ea=null!=ea?ea:0;var pa=ba?null:ja.background;pa==mxConstants.NONE&&(pa=null);null==pa&&(pa=T);null==pa&&0==ba&&(pa=Aa?this.graph.defaultPageBackgroundColor:"#ffffff");
+this.convertImages(ja.getSvg(null,null,ea,ha,null,S,null,null,null,da,null,Aa,Da,Ca),mxUtils.bind(this,function(Ba){try{var Ea=new Image;Ea.onload=mxUtils.bind(this,function(){try{var Fa=function(){mxClient.IS_SF?window.setTimeout(function(){za.drawImage(Ea,0,0);t(Ha,Ba)},0):(za.drawImage(Ea,0,0),t(Ha,Ba))},Ha=document.createElement("canvas"),Ia=parseInt(Ba.getAttribute("width")),Ma=parseInt(Ba.getAttribute("height"));Y=null!=Y?Y:1;null!=E&&(Y=Q?Math.min(1,Math.min(3*E/(4*Ma),E/Ia)):E/Ia);Y=this.getMaxCanvasScale(Ia,
+Ma,Y);Ia=Math.ceil(Y*Ia);Ma=Math.ceil(Y*Ma);Ha.setAttribute("width",Ia);Ha.setAttribute("height",Ma);var za=Ha.getContext("2d");null!=pa&&(za.beginPath(),za.rect(0,0,Ia,Ma),za.fillStyle=pa,za.fill());1!=Y&&za.scale(Y,Y);if(ma){var ya=ja.view,oa=ya.scale;ya.scale=1;var fa=btoa(unescape(encodeURIComponent(ya.createSvgGrid(ya.gridColor))));ya.scale=oa;fa="data:image/svg+xml;base64,"+fa;var sa=ja.gridSize*ya.gridSteps*Y,xa=ja.getGraphBounds(),wa=ya.translate.x*oa,ua=ya.translate.y*oa,va=wa+(xa.x-wa)/
+oa-ea,ia=ua+(xa.y-ua)/oa-ea,ra=new Image;ra.onload=function(){try{for(var aa=-Math.round(sa-mxUtils.mod((wa-va)*Y,sa)),ca=-Math.round(sa-mxUtils.mod((ua-ia)*Y,sa));aa<Ia;aa+=sa)for(var na=ca;na<Ma;na+=sa)za.drawImage(ra,aa/Y,na/Y);Fa()}catch(la){null!=P&&P(la)}};ra.onerror=function(aa){null!=P&&P(aa)};ra.src=fa}else Fa()}catch(aa){null!=P&&P(aa)}});Ea.onerror=function(Fa){null!=P&&P(Fa)};da&&this.graph.addSvgShadow(Ba);this.graph.mathEnabled&&this.addMathCss(Ba);var Ka=mxUtils.bind(this,function(){try{null!=
+this.resolvedFontCss&&this.addFontCss(Ba,this.resolvedFontCss),Ea.src=Editor.createSvgDataUri(mxUtils.getXml(Ba))}catch(Fa){null!=P&&P(Fa)}});this.embedExtFonts(mxUtils.bind(this,function(Fa){try{null!=Fa&&this.addFontCss(Ba,Fa),this.loadFonts(Ka)}catch(Ha){null!=P&&P(Ha)}}))}catch(Fa){null!=P&&P(Fa)}}),K,Z)}catch(Ba){null!=P&&P(Ba)}};Editor.crcTable=[];for(var m=0;256>m;m++)for(var n=m,v=0;8>v;v++)n=1==(n&1)?3988292384^n>>>1:n>>>1,Editor.crcTable[m]=n;Editor.updateCRC=function(t,E,K,T){for(var P=
+0;P<T;P++)t=Editor.crcTable[(t^E.charCodeAt(K+P))&255]^t>>>8;return t};Editor.crc32=function(t){for(var E=-1,K=0;K<t.length;K++)E=E>>>8^Editor.crcTable[(E^t.charCodeAt(K))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(t,E,K,T,P){function Q(Z,ja){var ea=ba;ba+=ja;return Z.substring(ea,ba)}function S(Z){Z=Q(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function Y(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}t=t.substring(t.indexOf(",")+
+1);t=window.atob?atob(t):Base64.decode(t,!0);var ba=0;if(Q(t,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(Q(t,4),"IHDR"!=Q(t,4))null!=P&&P();else{Q(t,17);P=t.substring(0,ba);do{var da=S(t);if("IDAT"==Q(t,4)){P=t.substring(0,ba-8);"pHYs"==E&&"dpi"==K?(K=Math.round(T/.0254),K=Y(K)+Y(K)+String.fromCharCode(1)):K=K+String.fromCharCode(0)+("zTXt"==E?String.fromCharCode(0):"")+T;T=4294967295;T=Editor.updateCRC(T,E,0,4);T=Editor.updateCRC(T,K,0,K.length);P+=Y(K.length)+
+E+K+Y(T^4294967295);P+=t.substring(ba-8,t.length);break}P+=t.substring(ba-8,ba-4+da);Q(t,da);Q(t,4)}while(da);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(t,E){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var g=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
+function(){g.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(t,E){var K=null;null!=t.editor.graph.getModel().getParent(E)?K=E.getId():null!=t.currentPage&&(K=t.currentPage.getId());return K});if(null!=window.StyleFormatPanel){var k=Format.prototype.init;Format.prototype.init=function(){k.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;
Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?l.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var t=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=t&&t.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(t){return!1};var p=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(t){t=p.apply(this,arguments);
-this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var F=this.editorUi,K=F.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return K.shadowVisible},function(P){var Q=new ChangePageSetup(F);Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=P;K.model.execute(Q)},{install:function(P){this.listener=function(){P(K.shadowVisible)};F.addListener("shadowVisibleChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});Editor.enableShadowOption||
-(T.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(T,60));t.appendChild(T)}return t};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(t){t=q.apply(this,arguments);var F=this.editorUi,K=F.editor.graph;if(K.isEnabled()){var T=F.getCurrentFile();if(null!=T&&T.isAutosaveOptional()){var P=this.createOption(mxResources.get("autosave"),function(){return F.editor.autosave},function(S){F.editor.setAutosave(S);F.editor.autosave&&
-T.isModified()&&T.fileChanged()},{install:function(S){this.listener=function(){S(F.editor.autosave)};F.editor.addListener("autosaveChanged",this.listener)},destroy:function(){F.editor.removeListener(this.listener)}});t.appendChild(P)}}if(this.isMathOptionVisible()&&K.isEnabled()&&"undefined"!==typeof MathJax){P=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return K.mathEnabled},function(S){F.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=
-function(){S(K.mathEnabled)};F.addListener("mathEnabledChanged",this.listener)},destroy:function(){F.removeListener(this.listener)}});P.style.paddingTop="5px";t.appendChild(P);var Q=F.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Q.style.position="relative";Q.style.marginLeft="6px";Q.style.top="2px";P.appendChild(Q)}return t};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,K=E.editor.graph,T=this.createOption(mxResources.get("shadow"),function(){return K.shadowVisible},function(P){var Q=new ChangePageSetup(E);Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=P;K.model.execute(Q)},{install:function(P){this.listener=function(){P(K.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption||
+(T.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(T,60));t.appendChild(T)}return t};var q=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(t){t=q.apply(this,arguments);var E=this.editorUi,K=E.editor.graph;if(K.isEnabled()){var T=E.getCurrentFile();if(null!=T&&T.isAutosaveOptional()){var P=this.createOption(mxResources.get("autosave"),function(){return E.editor.autosave},function(S){E.editor.setAutosave(S);E.editor.autosave&&
+T.isModified()&&T.fileChanged()},{install:function(S){this.listener=function(){S(E.editor.autosave)};E.editor.addListener("autosaveChanged",this.listener)},destroy:function(){E.editor.removeListener(this.listener)}});t.appendChild(P)}}if(this.isMathOptionVisible()&&K.isEnabled()&&"undefined"!==typeof MathJax){P=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return K.mathEnabled},function(S){E.actions.get("mathematicalTypesetting").funct()},{install:function(S){this.listener=
+function(){S(K.mathEnabled)};E.addListener("mathEnabledChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});P.style.paddingTop="5px";t.appendChild(P);var Q=E.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Q.style.position="relative";Q.style.marginLeft="6px";Q.style.top="2px";P.appendChild(Q)}return t};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=
[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",
type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
@@ -11583,94 +11583,94 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName
stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
-function(t,F,K){if(null!=F){var T=function(Q){if(null!=Q)if(K)for(var S=0;S<Q.length;S++)F[Q[S].name]=Q[S];else for(var Y in F){var ca=!1;for(S=0;S<Q.length;S++)if(Q[S].name==Y&&Q[S].type==F[Y].type){ca=!0;break}ca||delete F[Y]}},P=this.editorUi.editor.graph.view.getState(t);null!=P&&null!=P.shape&&(P.shape.commonCustomPropAdded||(P.shape.commonCustomPropAdded=!0,P.shape.customProperties=P.shape.customProperties||[],P.cell.vertex?Array.prototype.push.apply(P.shape.customProperties,Editor.commonVertexProperties):
-Array.prototype.push.apply(P.shape.customProperties,Editor.commonEdgeProperties)),T(P.shape.customProperties));t=t.getAttribute("customProperties");if(null!=t)try{T(JSON.parse(t))}catch(Q){}}};var x=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var t=this.editorUi.getSelectionState();"image"!=t.style.shape&&!t.containsLabel&&0<t.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));x.apply(this,arguments);if(Editor.enableCustomProperties){for(var F=
-{},K=t.vertices,T=t.edges,P=0;P<K.length;P++)this.findCommonProperties(K[P],F,0==P);for(P=0;P<T.length;P++)this.findCommonProperties(T[P],F,0==K.length&&0==P);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(F).length&&this.container.appendChild(this.addProperties(this.createPanel(),F,t))}};var y=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(t){this.addActions(t,["copyStyle","pasteStyle"]);return y.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
-!0;StyleFormatPanel.prototype.addProperties=function(t,F,K){function T(za,ya,qa,fa){ha.getModel().beginUpdate();try{var ra=[],xa=[];if(null!=qa.index){for(var wa=[],sa=qa.parentRow.nextSibling;sa&&sa.getAttribute("data-pName")==za;)wa.push(sa.getAttribute("data-pValue")),sa=sa.nextSibling;qa.index<wa.length?null!=fa?wa.splice(fa,1):wa[qa.index]=ya:wa.push(ya);null!=qa.size&&wa.length>qa.size&&(wa=wa.slice(0,qa.size));ya=wa.join(",");null!=qa.countProperty&&(ha.setCellStyles(qa.countProperty,wa.length,
-ha.getSelectionCells()),ra.push(qa.countProperty),xa.push(wa.length))}ha.setCellStyles(za,ya,ha.getSelectionCells());ra.push(za);xa.push(ya);if(null!=qa.dependentProps)for(za=0;za<qa.dependentProps.length;za++){var va=qa.dependentPropsDefVal[za],ja=qa.dependentPropsVals[za];if(ja.length>ya)ja=ja.slice(0,ya);else for(var pa=ja.length;pa<ya;pa++)ja.push(va);ja=ja.join(",");ha.setCellStyles(qa.dependentProps[za],ja,ha.getSelectionCells());ra.push(qa.dependentProps[za]);xa.push(ja)}if("function"==typeof qa.onChange)qa.onChange(ha,
-ya);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ra,"values",xa,"cells",ha.getSelectionCells()))}finally{ha.getModel().endUpdate()}}function P(za,ya,qa){var fa=mxUtils.getOffset(t,!0),ra=mxUtils.getOffset(za,!0);ya.style.position="absolute";ya.style.left=ra.x-fa.x+"px";ya.style.top=ra.y-fa.y+"px";ya.style.width=za.offsetWidth+"px";ya.style.height=za.offsetHeight-(qa?4:0)+"px";ya.style.zIndex=5}function Q(za,ya,qa){var fa=document.createElement("div");fa.style.width="32px";fa.style.height=
-"4px";fa.style.margin="2px";fa.style.border="1px solid black";fa.style.background=ya&&"none"!=ya?ya:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(ra){this.editorUi.pickColor(ya,function(xa){fa.style.background="none"==xa?"url('"+Dialog.prototype.noColorImage+"')":xa;T(za,xa,qa)});mxEvent.consume(ra)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(fa);return btn}function S(za,ya,qa,fa,ra,xa,wa){null!=ya&&(ya=ya.split(","),
-aa.push({name:za,values:ya,type:qa,defVal:fa,countProperty:ra,parentRow:xa,isDeletable:!0,flipBkg:wa}));btn=mxUtils.button("+",mxUtils.bind(Z,function(sa){for(var va=xa,ja=0;null!=va.nextSibling;)if(va.nextSibling.getAttribute("data-pName")==za)va=va.nextSibling,ja++;else break;var pa={type:qa,parentRow:xa,index:ja,isDeletable:!0,defVal:fa,countProperty:ra};ja=da(za,"",pa,0==ja%2,wa);T(za,fa,pa);va.parentNode.insertBefore(ja,va.nextSibling);mxEvent.consume(sa)}));btn.style.height="16px";btn.style.width=
-"25px";btn.className="geColorBtn";return btn}function Y(za,ya,qa,fa,ra,xa,wa){if(0<ra){var sa=Array(ra);ya=null!=ya?ya.split(","):[];for(var va=0;va<ra;va++)sa[va]=null!=ya[va]?ya[va]:null!=fa?fa:"";aa.push({name:za,values:sa,type:qa,defVal:fa,parentRow:xa,flipBkg:wa,size:ra})}return document.createElement("div")}function ca(za,ya,qa){var fa=document.createElement("input");fa.type="checkbox";fa.checked="1"==ya;mxEvent.addListener(fa,"change",function(){T(za,fa.checked?"1":"0",qa)});return fa}function da(za,
-ya,qa,fa,ra){var xa=qa.dispName,wa=qa.type,sa=document.createElement("tr");sa.className="gePropRow"+(ra?"Dark":"")+(fa?"Alt":"")+" gePropNonHeaderRow";sa.setAttribute("data-pName",za);sa.setAttribute("data-pValue",ya);fa=!1;null!=qa.index&&(sa.setAttribute("data-index",qa.index),xa=(null!=xa?xa:"")+"["+qa.index+"]",fa=!0);var va=document.createElement("td");va.className="gePropRowCell";xa=mxResources.get(xa,null,xa);mxUtils.write(va,xa);va.setAttribute("title",xa);fa&&(va.style.textAlign="right");
-sa.appendChild(va);va=document.createElement("td");va.className="gePropRowCell";if("color"==wa)va.appendChild(Q(za,ya,qa));else if("bool"==wa||"boolean"==wa)va.appendChild(ca(za,ya,qa));else if("enum"==wa){var ja=qa.enumList;for(ra=0;ra<ja.length;ra++)if(xa=ja[ra],xa.val==ya){mxUtils.write(va,mxResources.get(xa.dispName,null,xa.dispName));break}mxEvent.addListener(va,"click",mxUtils.bind(Z,function(){var pa=document.createElement("select");P(va,pa);for(var ba=0;ba<ja.length;ba++){var ea=ja[ba],na=
-document.createElement("option");na.value=mxUtils.htmlEntities(ea.val);mxUtils.write(na,mxResources.get(ea.dispName,null,ea.dispName));pa.appendChild(na)}pa.value=ya;t.appendChild(pa);mxEvent.addListener(pa,"change",function(){var la=mxUtils.htmlEntities(pa.value);T(za,la,qa)});pa.focus();mxEvent.addListener(pa,"blur",function(){t.removeChild(pa)})}))}else"dynamicArr"==wa?va.appendChild(S(za,ya,qa.subType,qa.subDefVal,qa.countProperty,sa,ra)):"staticArr"==wa?va.appendChild(Y(za,ya,qa.subType,qa.subDefVal,
-qa.size,sa,ra)):"readOnly"==wa?(ra=document.createElement("input"),ra.setAttribute("readonly",""),ra.value=ya,ra.style.width="96px",ra.style.borderWidth="0px",va.appendChild(ra)):(va.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ya)),mxEvent.addListener(va,"click",mxUtils.bind(Z,function(){function pa(){var ea=ba.value;ea=0==ea.length&&"string"!=wa?0:ea;qa.allowAuto&&(null!=ea.trim&&"auto"==ea.trim().toLowerCase()?(ea="auto",wa="string"):(ea=parseFloat(ea),ea=isNaN(ea)?0:ea));null!=qa.min&&ea<
-qa.min?ea=qa.min:null!=qa.max&&ea>qa.max&&(ea=qa.max);ea=encodeURIComponent(("int"==wa?parseInt(ea):ea)+"");T(za,ea,qa)}var ba=document.createElement("input");P(va,ba,!0);ba.value=decodeURIComponent(ya);ba.className="gePropEditor";"int"!=wa&&"float"!=wa||qa.allowAuto||(ba.type="number",ba.step="int"==wa?"1":"any",null!=qa.min&&(ba.min=parseFloat(qa.min)),null!=qa.max&&(ba.max=parseFloat(qa.max)));t.appendChild(ba);mxEvent.addListener(ba,"keypress",function(ea){13==ea.keyCode&&pa()});ba.focus();mxEvent.addListener(ba,
-"blur",function(){pa()})})));qa.isDeletable&&(ra=mxUtils.button("-",mxUtils.bind(Z,function(pa){T(za,"",qa,qa.index);mxEvent.consume(pa)})),ra.style.height="16px",ra.style.width="25px",ra.style.float="right",ra.className="geColorBtn",va.appendChild(ra));sa.appendChild(va);return sa}var Z=this,ha=this.editorUi.editor.graph,aa=[];t.style.position="relative";t.style.padding="0";var ua=document.createElement("table");ua.className="geProperties";ua.style.whiteSpace="nowrap";ua.style.width="100%";var ka=
-document.createElement("tr");ka.className="gePropHeader";var Ca=document.createElement("th");Ca.className="gePropHeaderCell";var Da=document.createElement("img");Da.src=Sidebar.prototype.expandedImage;Da.style.verticalAlign="middle";Ca.appendChild(Da);mxUtils.write(Ca,mxResources.get("property"));ka.style.cursor="pointer";var oa=function(){var za=ua.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){Da.src=Sidebar.prototype.collapsedImage;var ya="none";for(var qa=t.childNodes.length-
-1;0<=qa;qa--)try{var fa=t.childNodes[qa],ra=fa.nodeName.toUpperCase();"INPUT"!=ra&&"SELECT"!=ra||t.removeChild(fa)}catch(xa){}}else Da.src=Sidebar.prototype.expandedImage,ya="";for(qa=0;qa<za.length;qa++)za[qa].style.display=ya};mxEvent.addListener(ka,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;oa()});ka.appendChild(Ca);Ca=document.createElement("th");Ca.className="gePropHeaderCell";Ca.innerHTML=mxResources.get("value");ka.appendChild(Ca);ua.appendChild(ka);var Ba=
-!1,Aa=!1;ka=null;1==K.vertices.length&&0==K.edges.length?ka=K.vertices[0].id:0==K.vertices.length&&1==K.edges.length&&(ka=K.edges[0].id);null!=ka&&ua.appendChild(da("id",mxUtils.htmlEntities(ka),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ha in F)if(ka=F[Ha],"function"!=typeof ka.isVisible||ka.isVisible(K,this)){var Oa=null!=K.style[Ha]?mxUtils.htmlEntities(K.style[Ha]+""):null!=ka.getDefaultValue?ka.getDefaultValue(K,this):ka.defVal;if("separator"==ka.type)Aa=!Aa;else{if("staticArr"==ka.type)ka.size=
-parseInt(K.style[ka.sizeProperty]||F[ka.sizeProperty].defVal)||0;else if(null!=ka.dependentProps){var Ga=ka.dependentProps,Fa=[],Ea=[];for(Ca=0;Ca<Ga.length;Ca++){var Ka=K.style[Ga[Ca]];Ea.push(F[Ga[Ca]].subDefVal);Fa.push(null!=Ka?Ka.split(","):[])}ka.dependentPropsDefVal=Ea;ka.dependentPropsVals=Fa}ua.appendChild(da(Ha,Oa,ka,Ba,Aa));Ba=!Ba}}for(Ca=0;Ca<aa.length;Ca++)for(ka=aa[Ca],F=ka.parentRow,K=0;K<ka.values.length;K++)Ha=da(ka.name,ka.values[K],{type:ka.type,parentRow:ka.parentRow,isDeletable:ka.isDeletable,
-index:K,defVal:ka.defVal,countProperty:ka.countProperty,size:ka.size},0==K%2,ka.flipBkg),F.parentNode.insertBefore(Ha,F.nextSibling),F=Ha;t.appendChild(ua);oa();return t};StyleFormatPanel.prototype.addStyles=function(t){function F(ka){mxEvent.addListener(ka,"mouseenter",function(){ka.style.opacity="1"});mxEvent.addListener(ka,"mouseleave",function(){ka.style.opacity="0.5"})}var K=this.editorUi,T=K.editor.graph,P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.paddingLeft="24px";
-P.style.paddingRight="20px";t.style.paddingLeft="16px";t.style.paddingBottom="6px";t.style.position="relative";t.appendChild(P);var Q="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var Y=[],ca=0;ca<this.defaultColorSchemes.length;ca++){var da=
-document.createElement("div");da.style.display="inline-block";da.style.width="6px";da.style.height="6px";da.style.marginLeft="4px";da.style.marginRight="3px";da.style.borderRadius="3px";da.style.cursor="pointer";da.style.background="transparent";da.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ka){mxEvent.addListener(da,"click",mxUtils.bind(this,function(){Z(ka)}))})(ca);Y.push(da);S.appendChild(da)}var Z=mxUtils.bind(this,function(ka){null!=Y[ka]&&(null!=this.format.currentScheme&&
-null!=Y[this.format.currentScheme]&&(Y[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ka,ha(this.defaultColorSchemes[this.format.currentScheme]),Y[this.format.currentScheme].style.background="#84d7ff")}),ha=mxUtils.bind(this,function(ka){var Ca=mxUtils.bind(this,function(oa){var Ba=mxUtils.button("",mxUtils.bind(this,function(Oa){T.getModel().beginUpdate();try{for(var Ga=K.getSelectionState().cells,Fa=0;Fa<Ga.length;Fa++){for(var Ea=T.getModel().getStyle(Ga[Fa]),
-Ka=0;Ka<Q.length;Ka++)Ea=mxUtils.removeStylename(Ea,Q[Ka]);var za=T.getModel().isVertex(Ga[Fa])?T.defaultVertexStyle:T.defaultEdgeStyle;null!=oa?(mxEvent.isShiftDown(Oa)||(Ea=""==oa.fill?mxUtils.setStyle(Ea,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Ea,mxConstants.STYLE_FILLCOLOR,oa.fill||mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,null)),Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_GRADIENTCOLOR,oa.gradient||mxUtils.getValue(za,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Oa)||
-mxClient.IS_MAC&&mxEvent.isMetaDown(Oa)||!T.getModel().isVertex(Ga[Fa])||(Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_FONTCOLOR,oa.font||mxUtils.getValue(za,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Oa)||(Ea=""==oa.stroke?mxUtils.setStyle(Ea,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Ea,mxConstants.STYLE_STROKECOLOR,oa.stroke||mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,null)))):(Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,
-"#ffffff")),Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000")),Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(za,mxConstants.STYLE_GRADIENTCOLOR,null)),T.getModel().isVertex(Ga[Fa])&&(Ea=mxUtils.setStyle(Ea,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(za,mxConstants.STYLE_FONTCOLOR,null))));T.getModel().setStyle(Ga[Fa],Ea)}}finally{T.getModel().endUpdate()}}));Ba.className="geStyleButton";Ba.style.width="36px";
-Ba.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ba.style.margin="0px 6px 6px 0px";if(null!=oa){var Aa="1"==urlParams.sketch?"2px solid":"1px solid";null!=oa.gradient?mxClient.IS_IE&&10>document.documentMode?Ba.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+oa.fill+"', EndColorStr='"+oa.gradient+"', GradientType=0)":Ba.style.backgroundImage="linear-gradient("+oa.fill+" 0px,"+oa.gradient+" 100%)":oa.fill==mxConstants.NONE?Ba.style.background="url('"+Dialog.prototype.noColorImage+
-"')":Ba.style.backgroundColor=""==oa.fill?mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):oa.fill||mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ba.style.border=oa.stroke==mxConstants.NONE?Aa+" transparent":""==oa.stroke?Aa+" "+mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Aa+" "+(oa.stroke||mxUtils.getValue(T.defaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=oa.title&&Ba.setAttribute("title",oa.title)}else{Aa=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ha=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Ba.style.backgroundColor=Aa;Ba.style.border="1px solid "+Ha}Ba.style.borderRadius="0";P.appendChild(Ba)});P.innerHTML="";for(var Da=0;Da<ka.length;Da++)0<Da&&0==mxUtils.mod(Da,4)&&mxUtils.br(P),Ca(ka[Da])});
-null==this.format.currentScheme?Z(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):Z(this.format.currentScheme);ca=10>=this.defaultColorSchemes.length?28:8;var aa=document.createElement("div");aa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ca+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ua=document.createElement("div");ua.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ca+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(t.appendChild(aa),t.appendChild(ua));mxEvent.addListener(ua,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));F(aa);F(ua);ha(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&t.appendChild(S);return t};StyleFormatPanel.prototype.addEditOps=function(t){var F=this.editorUi.getSelectionState(),K=this.editorUi.editor.graph,T=null;1==F.cells.length&&(T=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(P){this.editorUi.actions.get("editStyle").funct()})),T.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),T.style.width="210px",T.style.marginBottom="2px",t.appendChild(T));K=1==F.cells.length?K.view.getState(F.cells[0]):null;null!=K&&null!=K.shape&&null!=K.shape.stencil?(F=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(P){this.editorUi.actions.get("editShape").funct()})),F.setAttribute("title",
-mxResources.get("editShape")),F.style.marginBottom="2px",null==T?F.style.width="210px":(T.style.width="104px",F.style.width="104px",F.style.marginLeft="2px"),t.appendChild(F)):F.image&&0<F.cells.length&&(F=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(P){this.editorUi.actions.get("image").funct()})),F.setAttribute("title",mxResources.get("editImage")),F.style.marginBottom="2px",null==T?F.style.width="210px":(T.style.width="104px",F.style.width="104px",F.style.marginLeft="2px"),
-t.appendChild(F));return t}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(t){return t.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(t){return Graph.isGoogleFontUrl(t)};Graph.createFontElement=function(t,
-F){var K=Graph.fontMapping[F];null==K&&Graph.isCssFontUrl(F)?(t=document.createElement("link"),t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("charset","UTF-8"),t.setAttribute("href",F)):(null==K&&(K='@font-face {\nfont-family: "'+t+'";\nsrc: url("'+F+'");\n}'),t=document.createElement("style"),mxUtils.write(t,K));return t};Graph.addFont=function(t,F,K){if(null!=t&&0<t.length&&null!=F&&0<F.length){var T=t.toLowerCase();if("helvetica"!=T&&"arial"!=t&&"sans-serif"!=
-T){var P=Graph.customFontElements[T];null!=P&&P.url!=F&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=F,"http:"==F.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(F)),P={name:t,url:F,elt:Graph.createFontElement(t,P)},Graph.customFontElements[T]=P,Graph.recentCustomFonts[T]=P,F=document.getElementsByTagName("head")[0],null!=K&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=K,P.elt.onerror=K):K()),null!=F&&F.appendChild(P.elt)):null!=K&&K()}else null!=K&&K()}else null!=K&&K();
-return t};Graph.getFontUrl=function(t,F){t=Graph.customFontElements[t.toLowerCase()];null!=t&&(F=t.url);return F};Graph.processFontAttributes=function(t){t=t.getElementsByTagName("*");for(var F=0;F<t.length;F++){var K=t[F].getAttribute("data-font-src");if(null!=K){var T="FONT"==t[F].nodeName?t[F].getAttribute("face"):t[F].style.fontFamily;null!=T&&Graph.addFont(T,K)}}};Graph.processFontStyle=function(t){if(null!=t){var F=mxUtils.getValue(t,"fontSource",null);if(null!=F){var K=mxUtils.getValue(t,mxConstants.STYLE_FONTFAMILY,
-null);null!=K&&Graph.addFont(K,decodeURIComponent(F))}}return t};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var z=Graph.prototype.init;Graph.prototype.init=function(){function t(P){F=P}z.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var F=null;mxEvent.addListener(this.container,"mouseenter",t);mxEvent.addListener(this.container,"mousemove",t);mxEvent.addListener(this.container,"mouseleave",function(P){F=null});this.isMouseInsertPoint=function(){return null!=F};var K=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=F?this.getPointForEvent(F):K.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var Q=this.graph.getCellStyle(P);if(null!=Q&&"rack"==Q.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=Q.marginLeft||0;S.marginRight=Q.marginRight||0;S.marginTop=Q.marginTop||0;S.marginBottom=
-Q.marginBottom||0;S.allowGaps=Q.allowGaps||0;S.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var A=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(t,F){return Graph.processFontStyle(A.apply(this,arguments))};var L=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(t,F,K,T,P,Q,S,Y,ca,da,Z){L.apply(this,arguments);Graph.processFontAttributes(Z)};
-var O=mxText.prototype.redraw;mxText.prototype.redraw=function(){O.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(t,F,K){function T(){for(var ka=S.getSelectionCells(),Ca=[],Da=0;Da<ka.length;Da++)S.isCellVisible(ka[Da])&&Ca.push(ka[Da]);S.setSelectionCells(Ca)}function P(ka){S.setHiddenTags(ka?[]:Y.slice());T();S.refresh()}function Q(ka,Ca){da.innerHTML="";if(0<ka.length){var Da=document.createElement("table");
-Da.setAttribute("cellpadding","2");Da.style.boxSizing="border-box";Da.style.tableLayout="fixed";Da.style.width="100%";var oa=document.createElement("tbody");if(null!=ka&&0<ka.length)for(var Ba=0;Ba<ka.length;Ba++)(function(Aa){var Ha=0>mxUtils.indexOf(S.hiddenTags,Aa),Oa=document.createElement("tr"),Ga=document.createElement("td");Ga.style.align="center";Ga.style.width="16px";var Fa=document.createElement("img");Fa.setAttribute("src",Ha?Editor.visibleImage:Editor.hiddenImage);Fa.setAttribute("title",
-mxResources.get(Ha?"hideIt":"show",[Aa]));mxUtils.setOpacity(Fa,Ha?75:25);Fa.style.verticalAlign="middle";Fa.style.cursor="pointer";Fa.style.width="16px";if(F||Editor.isDarkMode())Fa.style.filter="invert(100%)";Ga.appendChild(Fa);mxEvent.addListener(Fa,"click",function(Ka){mxEvent.isShiftDown(Ka)?P(0<=mxUtils.indexOf(S.hiddenTags,Aa)):(S.toggleHiddenTag(Aa),T(),S.refresh());mxEvent.consume(Ka)});Oa.appendChild(Ga);Ga=document.createElement("td");Ga.style.overflow="hidden";Ga.style.whiteSpace="nowrap";
-Ga.style.textOverflow="ellipsis";Ga.style.verticalAlign="middle";Ga.style.cursor="pointer";Ga.setAttribute("title",Aa);a=document.createElement("a");mxUtils.write(a,Aa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ha?100:40);Ga.appendChild(a);mxEvent.addListener(Ga,"click",function(Ka){if(mxEvent.isShiftDown(Ka)){P(!0);var za=S.getCellsForTags([Aa],null,null,!0);S.isEnabled()?S.setSelectionCells(za):S.highlightCells(za)}else if(Ha&&0<S.hiddenTags.length)P(!0);else{za=
-Y.slice();var ya=mxUtils.indexOf(za,Aa);za.splice(ya,1);S.setHiddenTags(za);T();S.refresh()}mxEvent.consume(Ka)});Oa.appendChild(Ga);if(S.isEnabled()){Ga=document.createElement("td");Ga.style.verticalAlign="middle";Ga.style.textAlign="center";Ga.style.width="18px";if(null==Ca){Ga.style.align="center";Ga.style.width="16px";Fa=document.createElement("img");Fa.setAttribute("src",Editor.crossImage);Fa.setAttribute("title",mxResources.get("removeIt",[Aa]));mxUtils.setOpacity(Fa,Ha?75:25);Fa.style.verticalAlign=
-"middle";Fa.style.cursor="pointer";Fa.style.width="16px";if(F||Editor.isDarkMode())Fa.style.filter="invert(100%)";mxEvent.addListener(Fa,"click",function(Ka){var za=mxUtils.indexOf(Y,Aa);0<=za&&Y.splice(za,1);S.removeTagsForCells(S.model.getDescendants(S.model.getRoot()),[Aa]);S.refresh();mxEvent.consume(Ka)});Ga.appendChild(Fa)}else{var Ea=document.createElement("input");Ea.setAttribute("type","checkbox");Ea.style.margin="0px";Ea.defaultChecked=null!=Ca&&0<=mxUtils.indexOf(Ca,Aa);Ea.checked=Ea.defaultChecked;
-Ea.style.background="transparent";Ea.setAttribute("title",mxResources.get(Ea.defaultChecked?"removeIt":"add",[Aa]));mxEvent.addListener(Ea,"change",function(Ka){Ea.checked?S.addTagsForCells(S.getSelectionCells(),[Aa]):S.removeTagsForCells(S.getSelectionCells(),[Aa]);mxEvent.consume(Ka)});Ga.appendChild(Ea)}Oa.appendChild(Ga)}oa.appendChild(Oa)})(ka[Ba]);Da.appendChild(oa);da.appendChild(Da)}}var S=this,Y=S.hiddenTags.slice(),ca=document.createElement("div");ca.style.userSelect="none";ca.style.overflow=
-"hidden";ca.style.padding="10px";ca.style.height="100%";var da=document.createElement("div");da.style.boxSizing="border-box";da.style.borderRadius="4px";da.style.userSelect="none";da.style.overflow="auto";da.style.position="absolute";da.style.left="10px";da.style.right="10px";da.style.top="10px";da.style.border=S.isEnabled()?"1px solid #808080":"none";da.style.bottom=S.isEnabled()?"48px":"10px";ca.appendChild(da);var Z=mxUtils.button(mxResources.get("reset"),function(ka){S.setHiddenTags([]);mxEvent.isShiftDown(ka)||
-(Y=S.hiddenTags.slice());T();S.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var ha=mxUtils.button(mxResources.get("add"),function(){null!=K&&K(Y,function(ka){Y=ka;aa()})});ha.setAttribute("title",mxResources.get("add"));ha.className="geBtn";ha.style.margin="0";S.addListener(mxEvent.ROOT,function(){Y=S.hiddenTags.slice()});var aa=mxUtils.bind(this,function(ka,Ca){if(t()){ka=S.getAllTags();for(Ca=0;Ca<ka.length;Ca++)0>mxUtils.indexOf(Y,
-ka[Ca])&&Y.push(ka[Ca]);Y.sort();S.isSelectionEmpty()?Q(Y):Q(Y,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,aa);S.model.addListener(mxEvent.CHANGE,aa);S.addListener(mxEvent.REFRESH,aa);var ua=document.createElement("div");ua.style.boxSizing="border-box";ua.style.whiteSpace="nowrap";ua.style.position="absolute";ua.style.overflow="hidden";ua.style.bottom="0px";ua.style.height="42px";ua.style.right="10px";ua.style.left="10px";S.isEnabled()&&(ua.appendChild(Z),
-ua.appendChild(ha),ca.appendChild(ua));return{div:ca,refresh:aa}};Graph.prototype.getCustomFonts=function(){var t=this.extFonts;t=null!=t?t.slice():[];for(var F in Graph.customFontElements){var K=Graph.customFontElements[F];t.push({name:K.name,url:K.url})}return t};Graph.prototype.setFont=function(t,F){Graph.addFont(t,F);document.execCommand("fontname",!1,t);if(null!=F){var K=this.cellEditor.textarea.getElementsByTagName("font");F=Graph.getFontUrl(t,F);for(var T=0;T<K.length;T++)K[T].getAttribute("face")==
-t&&K[T].getAttribute("data-font-src")!=F&&K[T].setAttribute("data-font-src",F)}};var M=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return M.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var t=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=t)for(var F in t)this.globalVars[F]=
-t[F]}catch(K){null!=window.console&&console.log("Error in vars URL parameter: "+K)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var u=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(t){var F=u.apply(this,arguments);null==F&&null!=this.globalVars&&(F=this.globalVars[t]);return F};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var t=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(t.ownerDocument)).decode(t)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(t,F,K,T,P,Q,S,Y,ca,da,Z,ha,aa,ua){var ka=null,Ca=null,Da=null;ha||null==this.themes||"darkTheme"!=this.defaultThemeName||(ka=this.stylesheet,Ca=this.shapeForegroundColor,Da=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
-"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var oa=D.apply(this,arguments),Ba=this.getCustomFonts();if(Z&&0<Ba.length){var Aa=oa.ownerDocument,Ha=null!=Aa.createElementNS?Aa.createElementNS(mxConstants.NS_SVG,"style"):Aa.createElement("style");null!=Aa.setAttributeNS?Ha.setAttributeNS("type","text/css"):Ha.setAttribute("type","text/css");for(var Oa="",Ga="",Fa=0;Fa<Ba.length;Fa++){var Ea=Ba[Fa].name,Ka=Ba[Fa].url;Graph.isCssFontUrl(Ka)?
-Oa+="@import url("+Ka+");\n":Ga+='@font-face {\nfont-family: "'+Ea+'";\nsrc: url("'+Ka+'");\n}\n'}Ha.appendChild(Aa.createTextNode(Oa+Ga));oa.getElementsByTagName("defs")[0].appendChild(Ha)}null!=ka&&(this.shapeBackgroundColor=Da,this.shapeForegroundColor=Ca,this.stylesheet=ka,this.refresh());return oa};var B=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var t=B.apply(this,arguments);if(this.mathEnabled){var F=t.drawText;t.drawText=function(K,T){if(null!=K.text&&
-null!=K.text.value&&K.text.checkBounds()&&(mxUtils.isNode(K.text.value)||K.text.dialect==mxConstants.DIALECT_STRICTHTML)){var P=K.text.getContentNode();if(null!=P){P=P.cloneNode(!0);if(P.getElementsByTagNameNS)for(var Q=P.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<Q.length;)Q[0].parentNode.removeChild(Q[0]);null!=P.innerHTML&&(Q=K.text.value,K.text.value=P.innerHTML,F.apply(this,arguments),K.text.value=Q)}}else F.apply(this,arguments)}}return t};var C=mxCellRenderer.prototype.destroy;
+function(t,E,K){if(null!=E){var T=function(Q){if(null!=Q)if(K)for(var S=0;S<Q.length;S++)E[Q[S].name]=Q[S];else for(var Y in E){var ba=!1;for(S=0;S<Q.length;S++)if(Q[S].name==Y&&Q[S].type==E[Y].type){ba=!0;break}ba||delete E[Y]}},P=this.editorUi.editor.graph.view.getState(t);null!=P&&null!=P.shape&&(P.shape.commonCustomPropAdded||(P.shape.commonCustomPropAdded=!0,P.shape.customProperties=P.shape.customProperties||[],P.cell.vertex?Array.prototype.push.apply(P.shape.customProperties,Editor.commonVertexProperties):
+Array.prototype.push.apply(P.shape.customProperties,Editor.commonEdgeProperties)),T(P.shape.customProperties));t=t.getAttribute("customProperties");if(null!=t)try{T(JSON.parse(t))}catch(Q){}}};var x=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var t=this.editorUi.getSelectionState();"image"!=t.style.shape&&!t.containsLabel&&0<t.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));x.apply(this,arguments);if(Editor.enableCustomProperties){for(var E=
+{},K=t.vertices,T=t.edges,P=0;P<K.length;P++)this.findCommonProperties(K[P],E,0==P);for(P=0;P<T.length;P++)this.findCommonProperties(T[P],E,0==K.length&&0==P);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(E).length&&this.container.appendChild(this.addProperties(this.createPanel(),E,t))}};var y=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(t){this.addActions(t,["copyStyle","pasteStyle"]);return y.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(t,E,K){function T(za,ya,oa,fa){ja.getModel().beginUpdate();try{var sa=[],xa=[];if(null!=oa.index){for(var wa=[],ua=oa.parentRow.nextSibling;ua&&ua.getAttribute("data-pName")==za;)wa.push(ua.getAttribute("data-pValue")),ua=ua.nextSibling;oa.index<wa.length?null!=fa?wa.splice(fa,1):wa[oa.index]=ya:wa.push(ya);null!=oa.size&&wa.length>oa.size&&(wa=wa.slice(0,oa.size));ya=wa.join(",");null!=oa.countProperty&&(ja.setCellStyles(oa.countProperty,wa.length,
+ja.getSelectionCells()),sa.push(oa.countProperty),xa.push(wa.length))}ja.setCellStyles(za,ya,ja.getSelectionCells());sa.push(za);xa.push(ya);if(null!=oa.dependentProps)for(za=0;za<oa.dependentProps.length;za++){var va=oa.dependentPropsDefVal[za],ia=oa.dependentPropsVals[za];if(ia.length>ya)ia=ia.slice(0,ya);else for(var ra=ia.length;ra<ya;ra++)ia.push(va);ia=ia.join(",");ja.setCellStyles(oa.dependentProps[za],ia,ja.getSelectionCells());sa.push(oa.dependentProps[za]);xa.push(ia)}if("function"==typeof oa.onChange)oa.onChange(ja,
+ya);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",sa,"values",xa,"cells",ja.getSelectionCells()))}finally{ja.getModel().endUpdate()}}function P(za,ya,oa){var fa=mxUtils.getOffset(t,!0),sa=mxUtils.getOffset(za,!0);ya.style.position="absolute";ya.style.left=sa.x-fa.x+"px";ya.style.top=sa.y-fa.y+"px";ya.style.width=za.offsetWidth+"px";ya.style.height=za.offsetHeight-(oa?4:0)+"px";ya.style.zIndex=5}function Q(za,ya,oa){var fa=document.createElement("div");fa.style.width="32px";fa.style.height=
+"4px";fa.style.margin="2px";fa.style.border="1px solid black";fa.style.background=ya&&"none"!=ya?ya:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(sa){this.editorUi.pickColor(ya,function(xa){fa.style.background="none"==xa?"url('"+Dialog.prototype.noColorImage+"')":xa;T(za,xa,oa)});mxEvent.consume(sa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(fa);return btn}function S(za,ya,oa,fa,sa,xa,wa){null!=ya&&(ya=ya.split(","),
+ea.push({name:za,values:ya,type:oa,defVal:fa,countProperty:sa,parentRow:xa,isDeletable:!0,flipBkg:wa}));btn=mxUtils.button("+",mxUtils.bind(Z,function(ua){for(var va=xa,ia=0;null!=va.nextSibling;)if(va.nextSibling.getAttribute("data-pName")==za)va=va.nextSibling,ia++;else break;var ra={type:oa,parentRow:xa,index:ia,isDeletable:!0,defVal:fa,countProperty:sa};ia=da(za,"",ra,0==ia%2,wa);T(za,fa,ra);va.parentNode.insertBefore(ia,va.nextSibling);mxEvent.consume(ua)}));btn.style.height="16px";btn.style.width=
+"25px";btn.className="geColorBtn";return btn}function Y(za,ya,oa,fa,sa,xa,wa){if(0<sa){var ua=Array(sa);ya=null!=ya?ya.split(","):[];for(var va=0;va<sa;va++)ua[va]=null!=ya[va]?ya[va]:null!=fa?fa:"";ea.push({name:za,values:ua,type:oa,defVal:fa,parentRow:xa,flipBkg:wa,size:sa})}return document.createElement("div")}function ba(za,ya,oa){var fa=document.createElement("input");fa.type="checkbox";fa.checked="1"==ya;mxEvent.addListener(fa,"change",function(){T(za,fa.checked?"1":"0",oa)});return fa}function da(za,
+ya,oa,fa,sa){var xa=oa.dispName,wa=oa.type,ua=document.createElement("tr");ua.className="gePropRow"+(sa?"Dark":"")+(fa?"Alt":"")+" gePropNonHeaderRow";ua.setAttribute("data-pName",za);ua.setAttribute("data-pValue",ya);fa=!1;null!=oa.index&&(ua.setAttribute("data-index",oa.index),xa=(null!=xa?xa:"")+"["+oa.index+"]",fa=!0);var va=document.createElement("td");va.className="gePropRowCell";xa=mxResources.get(xa,null,xa);mxUtils.write(va,xa);va.setAttribute("title",xa);fa&&(va.style.textAlign="right");
+ua.appendChild(va);va=document.createElement("td");va.className="gePropRowCell";if("color"==wa)va.appendChild(Q(za,ya,oa));else if("bool"==wa||"boolean"==wa)va.appendChild(ba(za,ya,oa));else if("enum"==wa){var ia=oa.enumList;for(sa=0;sa<ia.length;sa++)if(xa=ia[sa],xa.val==ya){mxUtils.write(va,mxResources.get(xa.dispName,null,xa.dispName));break}mxEvent.addListener(va,"click",mxUtils.bind(Z,function(){var ra=document.createElement("select");P(va,ra);for(var aa=0;aa<ia.length;aa++){var ca=ia[aa],na=
+document.createElement("option");na.value=mxUtils.htmlEntities(ca.val);mxUtils.write(na,mxResources.get(ca.dispName,null,ca.dispName));ra.appendChild(na)}ra.value=ya;t.appendChild(ra);mxEvent.addListener(ra,"change",function(){var la=mxUtils.htmlEntities(ra.value);T(za,la,oa)});ra.focus();mxEvent.addListener(ra,"blur",function(){t.removeChild(ra)})}))}else"dynamicArr"==wa?va.appendChild(S(za,ya,oa.subType,oa.subDefVal,oa.countProperty,ua,sa)):"staticArr"==wa?va.appendChild(Y(za,ya,oa.subType,oa.subDefVal,
+oa.size,ua,sa)):"readOnly"==wa?(sa=document.createElement("input"),sa.setAttribute("readonly",""),sa.value=ya,sa.style.width="96px",sa.style.borderWidth="0px",va.appendChild(sa)):(va.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ya)),mxEvent.addListener(va,"click",mxUtils.bind(Z,function(){function ra(){var ca=aa.value;ca=0==ca.length&&"string"!=wa?0:ca;oa.allowAuto&&(null!=ca.trim&&"auto"==ca.trim().toLowerCase()?(ca="auto",wa="string"):(ca=parseFloat(ca),ca=isNaN(ca)?0:ca));null!=oa.min&&ca<
+oa.min?ca=oa.min:null!=oa.max&&ca>oa.max&&(ca=oa.max);ca=encodeURIComponent(("int"==wa?parseInt(ca):ca)+"");T(za,ca,oa)}var aa=document.createElement("input");P(va,aa,!0);aa.value=decodeURIComponent(ya);aa.className="gePropEditor";"int"!=wa&&"float"!=wa||oa.allowAuto||(aa.type="number",aa.step="int"==wa?"1":"any",null!=oa.min&&(aa.min=parseFloat(oa.min)),null!=oa.max&&(aa.max=parseFloat(oa.max)));t.appendChild(aa);mxEvent.addListener(aa,"keypress",function(ca){13==ca.keyCode&&ra()});aa.focus();mxEvent.addListener(aa,
+"blur",function(){ra()})})));oa.isDeletable&&(sa=mxUtils.button("-",mxUtils.bind(Z,function(ra){T(za,"",oa,oa.index);mxEvent.consume(ra)})),sa.style.height="16px",sa.style.width="25px",sa.style.float="right",sa.className="geColorBtn",va.appendChild(sa));ua.appendChild(va);return ua}var Z=this,ja=this.editorUi.editor.graph,ea=[];t.style.position="relative";t.style.padding="0";var ha=document.createElement("table");ha.className="geProperties";ha.style.whiteSpace="nowrap";ha.style.width="100%";var ma=
+document.createElement("tr");ma.className="gePropHeader";var Aa=document.createElement("th");Aa.className="gePropHeaderCell";var Da=document.createElement("img");Da.src=Sidebar.prototype.expandedImage;Da.style.verticalAlign="middle";Aa.appendChild(Da);mxUtils.write(Aa,mxResources.get("property"));ma.style.cursor="pointer";var Ca=function(){var za=ha.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){Da.src=Sidebar.prototype.collapsedImage;var ya="none";for(var oa=t.childNodes.length-
+1;0<=oa;oa--)try{var fa=t.childNodes[oa],sa=fa.nodeName.toUpperCase();"INPUT"!=sa&&"SELECT"!=sa||t.removeChild(fa)}catch(xa){}}else Da.src=Sidebar.prototype.expandedImage,ya="";for(oa=0;oa<za.length;oa++)za[oa].style.display=ya};mxEvent.addListener(ma,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;Ca()});ma.appendChild(Aa);Aa=document.createElement("th");Aa.className="gePropHeaderCell";Aa.innerHTML=mxResources.get("value");ma.appendChild(Aa);ha.appendChild(ma);var pa=
+!1,Ba=!1;ma=null;1==K.vertices.length&&0==K.edges.length?ma=K.vertices[0].id:0==K.vertices.length&&1==K.edges.length&&(ma=K.edges[0].id);null!=ma&&ha.appendChild(da("id",mxUtils.htmlEntities(ma),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ea in E)if(ma=E[Ea],"function"!=typeof ma.isVisible||ma.isVisible(K,this)){var Ka=null!=K.style[Ea]?mxUtils.htmlEntities(K.style[Ea]+""):null!=ma.getDefaultValue?ma.getDefaultValue(K,this):ma.defVal;if("separator"==ma.type)Ba=!Ba;else{if("staticArr"==ma.type)ma.size=
+parseInt(K.style[ma.sizeProperty]||E[ma.sizeProperty].defVal)||0;else if(null!=ma.dependentProps){var Fa=ma.dependentProps,Ha=[],Ia=[];for(Aa=0;Aa<Fa.length;Aa++){var Ma=K.style[Fa[Aa]];Ia.push(E[Fa[Aa]].subDefVal);Ha.push(null!=Ma?Ma.split(","):[])}ma.dependentPropsDefVal=Ia;ma.dependentPropsVals=Ha}ha.appendChild(da(Ea,Ka,ma,pa,Ba));pa=!pa}}for(Aa=0;Aa<ea.length;Aa++)for(ma=ea[Aa],E=ma.parentRow,K=0;K<ma.values.length;K++)Ea=da(ma.name,ma.values[K],{type:ma.type,parentRow:ma.parentRow,isDeletable:ma.isDeletable,
+index:K,defVal:ma.defVal,countProperty:ma.countProperty,size:ma.size},0==K%2,ma.flipBkg),E.parentNode.insertBefore(Ea,E.nextSibling),E=Ea;t.appendChild(ha);Ca();return t};StyleFormatPanel.prototype.addStyles=function(t){function E(ma){mxEvent.addListener(ma,"mouseenter",function(){ma.style.opacity="1"});mxEvent.addListener(ma,"mouseleave",function(){ma.style.opacity="0.5"})}var K=this.editorUi,T=K.editor.graph,P=document.createElement("div");P.style.whiteSpace="nowrap";P.style.paddingLeft="24px";
+P.style.paddingRight="20px";t.style.paddingLeft="16px";t.style.paddingBottom="6px";t.style.position="relative";t.appendChild(P);var Q="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),S=document.createElement("div");S.style.whiteSpace="nowrap";S.style.position="relative";S.style.textAlign="center";S.style.width="210px";for(var Y=[],ba=0;ba<this.defaultColorSchemes.length;ba++){var da=
+document.createElement("div");da.style.display="inline-block";da.style.width="6px";da.style.height="6px";da.style.marginLeft="4px";da.style.marginRight="3px";da.style.borderRadius="3px";da.style.cursor="pointer";da.style.background="transparent";da.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ma){mxEvent.addListener(da,"click",mxUtils.bind(this,function(){Z(ma)}))})(ba);Y.push(da);S.appendChild(da)}var Z=mxUtils.bind(this,function(ma){null!=Y[ma]&&(null!=this.format.currentScheme&&
+null!=Y[this.format.currentScheme]&&(Y[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ma,ja(this.defaultColorSchemes[this.format.currentScheme]),Y[this.format.currentScheme].style.background="#84d7ff")}),ja=mxUtils.bind(this,function(ma){var Aa=mxUtils.bind(this,function(Ca){var pa=mxUtils.button("",mxUtils.bind(this,function(Ka){T.getModel().beginUpdate();try{for(var Fa=K.getSelectionState().cells,Ha=0;Ha<Fa.length;Ha++){for(var Ia=T.getModel().getStyle(Fa[Ha]),
+Ma=0;Ma<Q.length;Ma++)Ia=mxUtils.removeStylename(Ia,Q[Ma]);var za=T.getModel().isVertex(Fa[Ha])?T.defaultVertexStyle:T.defaultEdgeStyle;null!=Ca?(mxEvent.isShiftDown(Ka)||(Ia=""==Ca.fill?mxUtils.setStyle(Ia,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Ia,mxConstants.STYLE_FILLCOLOR,Ca.fill||mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,null)),Ia=mxUtils.setStyle(Ia,mxConstants.STYLE_GRADIENTCOLOR,Ca.gradient||mxUtils.getValue(za,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Ka)||
+mxClient.IS_MAC&&mxEvent.isMetaDown(Ka)||!T.getModel().isVertex(Fa[Ha])||(Ia=mxUtils.setStyle(Ia,mxConstants.STYLE_FONTCOLOR,Ca.font||mxUtils.getValue(za,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Ka)||(Ia=""==Ca.stroke?mxUtils.setStyle(Ia,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Ia,mxConstants.STYLE_STROKECOLOR,Ca.stroke||mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,null)))):(Ia=mxUtils.setStyle(Ia,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(za,mxConstants.STYLE_FILLCOLOR,
+"#ffffff")),Ia=mxUtils.setStyle(Ia,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(za,mxConstants.STYLE_STROKECOLOR,"#000000")),Ia=mxUtils.setStyle(Ia,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(za,mxConstants.STYLE_GRADIENTCOLOR,null)),T.getModel().isVertex(Fa[Ha])&&(Ia=mxUtils.setStyle(Ia,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(za,mxConstants.STYLE_FONTCOLOR,null))));T.getModel().setStyle(Fa[Ha],Ia)}}finally{T.getModel().endUpdate()}}));pa.className="geStyleButton";pa.style.width="36px";
+pa.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";pa.style.margin="0px 6px 6px 0px";if(null!=Ca){var Ba="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ca.gradient?mxClient.IS_IE&&10>document.documentMode?pa.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ca.fill+"', EndColorStr='"+Ca.gradient+"', GradientType=0)":pa.style.backgroundImage="linear-gradient("+Ca.fill+" 0px,"+Ca.gradient+" 100%)":Ca.fill==mxConstants.NONE?pa.style.background="url('"+Dialog.prototype.noColorImage+
+"')":pa.style.backgroundColor=""==Ca.fill?mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ca.fill||mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");pa.style.border=Ca.stroke==mxConstants.NONE?Ba+" transparent":""==Ca.stroke?Ba+" "+mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ba+" "+(Ca.stroke||mxUtils.getValue(T.defaultVertexStyle,
+mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ca.title&&pa.setAttribute("title",Ca.title)}else{Ba=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ea=mxUtils.getValue(T.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");pa.style.backgroundColor=Ba;pa.style.border="1px solid "+Ea}pa.style.borderRadius="0";P.appendChild(pa)});P.innerHTML="";for(var Da=0;Da<ma.length;Da++)0<Da&&0==mxUtils.mod(Da,4)&&mxUtils.br(P),Aa(ma[Da])});
+null==this.format.currentScheme?Z(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):Z(this.format.currentScheme);ba=10>=this.defaultColorSchemes.length?28:8;var ea=document.createElement("div");ea.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ba+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(ea,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ha=document.createElement("div");ha.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ba+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(t.appendChild(ea),t.appendChild(ha));mxEvent.addListener(ha,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));E(ea);E(ha);ja(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&t.appendChild(S);return t};StyleFormatPanel.prototype.addEditOps=function(t){var E=this.editorUi.getSelectionState(),K=this.editorUi.editor.graph,T=null;1==E.cells.length&&(T=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(P){this.editorUi.actions.get("editStyle").funct()})),T.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),T.style.width="210px",T.style.marginBottom="2px",t.appendChild(T));K=1==E.cells.length?K.view.getState(E.cells[0]):null;null!=K&&null!=K.shape&&null!=K.shape.stencil?(E=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(P){this.editorUi.actions.get("editShape").funct()})),E.setAttribute("title",
+mxResources.get("editShape")),E.style.marginBottom="2px",null==T?E.style.width="210px":(T.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),t.appendChild(E)):E.image&&0<E.cells.length&&(E=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(P){this.editorUi.actions.get("image").funct()})),E.setAttribute("title",mxResources.get("editImage")),E.style.marginBottom="2px",null==T?E.style.width="210px":(T.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),
+t.appendChild(E));return t}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(t){return t.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(t){return Graph.isGoogleFontUrl(t)};Graph.createFontElement=function(t,
+E){var K=Graph.fontMapping[E];null==K&&Graph.isCssFontUrl(E)?(t=document.createElement("link"),t.setAttribute("rel","stylesheet"),t.setAttribute("type","text/css"),t.setAttribute("charset","UTF-8"),t.setAttribute("href",E)):(null==K&&(K='@font-face {\nfont-family: "'+t+'";\nsrc: url("'+E+'");\n}'),t=document.createElement("style"),mxUtils.write(t,K));return t};Graph.addFont=function(t,E,K){if(null!=t&&0<t.length&&null!=E&&0<E.length){var T=t.toLowerCase();if("helvetica"!=T&&"arial"!=t&&"sans-serif"!=
+T){var P=Graph.customFontElements[T];null!=P&&P.url!=E&&(P.elt.parentNode.removeChild(P.elt),P=null);null==P?(P=E,"http:"==E.substring(0,5)&&(P=PROXY_URL+"?url="+encodeURIComponent(E)),P={name:t,url:E,elt:Graph.createFontElement(t,P)},Graph.customFontElements[T]=P,Graph.recentCustomFonts[T]=P,E=document.getElementsByTagName("head")[0],null!=K&&("link"==P.elt.nodeName.toLowerCase()?(P.elt.onload=K,P.elt.onerror=K):K()),null!=E&&E.appendChild(P.elt)):null!=K&&K()}else null!=K&&K()}else null!=K&&K();
+return t};Graph.getFontUrl=function(t,E){t=Graph.customFontElements[t.toLowerCase()];null!=t&&(E=t.url);return E};Graph.processFontAttributes=function(t){t=t.getElementsByTagName("*");for(var E=0;E<t.length;E++){var K=t[E].getAttribute("data-font-src");if(null!=K){var T="FONT"==t[E].nodeName?t[E].getAttribute("face"):t[E].style.fontFamily;null!=T&&Graph.addFont(T,K)}}};Graph.processFontStyle=function(t){if(null!=t){var E=mxUtils.getValue(t,"fontSource",null);if(null!=E){var K=mxUtils.getValue(t,mxConstants.STYLE_FONTFAMILY,
+null);null!=K&&Graph.addFont(K,decodeURIComponent(E))}}return t};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var z=Graph.prototype.init;Graph.prototype.init=function(){function t(P){E=P}z.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var E=null;mxEvent.addListener(this.container,"mouseenter",t);mxEvent.addListener(this.container,"mousemove",t);mxEvent.addListener(this.container,"mouseleave",function(P){E=null});this.isMouseInsertPoint=function(){return null!=E};var K=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):K.apply(this,arguments)};var T=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var Q=this.graph.getCellStyle(P);if(null!=Q&&"rack"==Q.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=Q.marginLeft||0;S.marginRight=Q.marginRight||0;S.marginTop=Q.marginTop||0;S.marginBottom=
+Q.marginBottom||0;S.allowGaps=Q.allowGaps||0;S.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return T.apply(this,arguments)};this.updateGlobalUrlVariables()};var A=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(t,E){return Graph.processFontStyle(A.apply(this,arguments))};var L=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(t,E,K,T,P,Q,S,Y,ba,da,Z){L.apply(this,arguments);Graph.processFontAttributes(Z)};
+var O=mxText.prototype.redraw;mxText.prototype.redraw=function(){O.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(t,E,K){function T(){for(var ma=S.getSelectionCells(),Aa=[],Da=0;Da<ma.length;Da++)S.isCellVisible(ma[Da])&&Aa.push(ma[Da]);S.setSelectionCells(Aa)}function P(ma){S.setHiddenTags(ma?[]:Y.slice());T();S.refresh()}function Q(ma,Aa){da.innerHTML="";if(0<ma.length){var Da=document.createElement("table");
+Da.setAttribute("cellpadding","2");Da.style.boxSizing="border-box";Da.style.tableLayout="fixed";Da.style.width="100%";var Ca=document.createElement("tbody");if(null!=ma&&0<ma.length)for(var pa=0;pa<ma.length;pa++)(function(Ba){var Ea=0>mxUtils.indexOf(S.hiddenTags,Ba),Ka=document.createElement("tr"),Fa=document.createElement("td");Fa.style.align="center";Fa.style.width="16px";var Ha=document.createElement("img");Ha.setAttribute("src",Ea?Editor.visibleImage:Editor.hiddenImage);Ha.setAttribute("title",
+mxResources.get(Ea?"hideIt":"show",[Ba]));mxUtils.setOpacity(Ha,Ea?75:25);Ha.style.verticalAlign="middle";Ha.style.cursor="pointer";Ha.style.width="16px";if(E||Editor.isDarkMode())Ha.style.filter="invert(100%)";Fa.appendChild(Ha);mxEvent.addListener(Ha,"click",function(Ma){mxEvent.isShiftDown(Ma)?P(0<=mxUtils.indexOf(S.hiddenTags,Ba)):(S.toggleHiddenTag(Ba),T(),S.refresh());mxEvent.consume(Ma)});Ka.appendChild(Fa);Fa=document.createElement("td");Fa.style.overflow="hidden";Fa.style.whiteSpace="nowrap";
+Fa.style.textOverflow="ellipsis";Fa.style.verticalAlign="middle";Fa.style.cursor="pointer";Fa.setAttribute("title",Ba);a=document.createElement("a");mxUtils.write(a,Ba);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ea?100:40);Fa.appendChild(a);mxEvent.addListener(Fa,"click",function(Ma){if(mxEvent.isShiftDown(Ma)){P(!0);var za=S.getCellsForTags([Ba],null,null,!0);S.isEnabled()?S.setSelectionCells(za):S.highlightCells(za)}else if(Ea&&0<S.hiddenTags.length)P(!0);else{za=
+Y.slice();var ya=mxUtils.indexOf(za,Ba);za.splice(ya,1);S.setHiddenTags(za);T();S.refresh()}mxEvent.consume(Ma)});Ka.appendChild(Fa);if(S.isEnabled()){Fa=document.createElement("td");Fa.style.verticalAlign="middle";Fa.style.textAlign="center";Fa.style.width="18px";if(null==Aa){Fa.style.align="center";Fa.style.width="16px";Ha=document.createElement("img");Ha.setAttribute("src",Editor.crossImage);Ha.setAttribute("title",mxResources.get("removeIt",[Ba]));mxUtils.setOpacity(Ha,Ea?75:25);Ha.style.verticalAlign=
+"middle";Ha.style.cursor="pointer";Ha.style.width="16px";if(E||Editor.isDarkMode())Ha.style.filter="invert(100%)";mxEvent.addListener(Ha,"click",function(Ma){var za=mxUtils.indexOf(Y,Ba);0<=za&&Y.splice(za,1);S.removeTagsForCells(S.model.getDescendants(S.model.getRoot()),[Ba]);S.refresh();mxEvent.consume(Ma)});Fa.appendChild(Ha)}else{var Ia=document.createElement("input");Ia.setAttribute("type","checkbox");Ia.style.margin="0px";Ia.defaultChecked=null!=Aa&&0<=mxUtils.indexOf(Aa,Ba);Ia.checked=Ia.defaultChecked;
+Ia.style.background="transparent";Ia.setAttribute("title",mxResources.get(Ia.defaultChecked?"removeIt":"add",[Ba]));mxEvent.addListener(Ia,"change",function(Ma){Ia.checked?S.addTagsForCells(S.getSelectionCells(),[Ba]):S.removeTagsForCells(S.getSelectionCells(),[Ba]);mxEvent.consume(Ma)});Fa.appendChild(Ia)}Ka.appendChild(Fa)}Ca.appendChild(Ka)})(ma[pa]);Da.appendChild(Ca);da.appendChild(Da)}}var S=this,Y=S.hiddenTags.slice(),ba=document.createElement("div");ba.style.userSelect="none";ba.style.overflow=
+"hidden";ba.style.padding="10px";ba.style.height="100%";var da=document.createElement("div");da.style.boxSizing="border-box";da.style.borderRadius="4px";da.style.userSelect="none";da.style.overflow="auto";da.style.position="absolute";da.style.left="10px";da.style.right="10px";da.style.top="10px";da.style.border=S.isEnabled()?"1px solid #808080":"none";da.style.bottom=S.isEnabled()?"48px":"10px";ba.appendChild(da);var Z=mxUtils.button(mxResources.get("reset"),function(ma){S.setHiddenTags([]);mxEvent.isShiftDown(ma)||
+(Y=S.hiddenTags.slice());T();S.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var ja=mxUtils.button(mxResources.get("add"),function(){null!=K&&K(Y,function(ma){Y=ma;ea()})});ja.setAttribute("title",mxResources.get("add"));ja.className="geBtn";ja.style.margin="0";S.addListener(mxEvent.ROOT,function(){Y=S.hiddenTags.slice()});var ea=mxUtils.bind(this,function(ma,Aa){if(t()){ma=S.getAllTags();for(Aa=0;Aa<ma.length;Aa++)0>mxUtils.indexOf(Y,
+ma[Aa])&&Y.push(ma[Aa]);Y.sort();S.isSelectionEmpty()?Q(Y):Q(Y,S.getCommonTagsForCells(S.getSelectionCells()))}});S.selectionModel.addListener(mxEvent.CHANGE,ea);S.model.addListener(mxEvent.CHANGE,ea);S.addListener(mxEvent.REFRESH,ea);var ha=document.createElement("div");ha.style.boxSizing="border-box";ha.style.whiteSpace="nowrap";ha.style.position="absolute";ha.style.overflow="hidden";ha.style.bottom="0px";ha.style.height="42px";ha.style.right="10px";ha.style.left="10px";S.isEnabled()&&(ha.appendChild(Z),
+ha.appendChild(ja),ba.appendChild(ha));return{div:ba,refresh:ea}};Graph.prototype.getCustomFonts=function(){var t=this.extFonts;t=null!=t?t.slice():[];for(var E in Graph.customFontElements){var K=Graph.customFontElements[E];t.push({name:K.name,url:K.url})}return t};Graph.prototype.setFont=function(t,E){Graph.addFont(t,E);document.execCommand("fontname",!1,t);if(null!=E){var K=this.cellEditor.textarea.getElementsByTagName("font");E=Graph.getFontUrl(t,E);for(var T=0;T<K.length;T++)K[T].getAttribute("face")==
+t&&K[T].getAttribute("data-font-src")!=E&&K[T].setAttribute("data-font-src",E)}};var M=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return M.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var t=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=t)for(var E in t)this.globalVars[E]=
+t[E]}catch(K){null!=window.console&&console.log("Error in vars URL parameter: "+K)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var u=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(t){var E=u.apply(this,arguments);null==E&&null!=this.globalVars&&(E=this.globalVars[t]);return E};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var t=this.themes["default-style2"];this.defaultStylesheet=
+(new mxCodec(t.ownerDocument)).decode(t)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var D=Graph.prototype.getSvg;Graph.prototype.getSvg=function(t,E,K,T,P,Q,S,Y,ba,da,Z,ja,ea,ha){var ma=null,Aa=null,Da=null;ja||null==this.themes||"darkTheme"!=this.defaultThemeName||(ma=this.stylesheet,Aa=this.shapeForegroundColor,Da=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
+"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ca=D.apply(this,arguments),pa=this.getCustomFonts();if(Z&&0<pa.length){var Ba=Ca.ownerDocument,Ea=null!=Ba.createElementNS?Ba.createElementNS(mxConstants.NS_SVG,"style"):Ba.createElement("style");null!=Ba.setAttributeNS?Ea.setAttributeNS("type","text/css"):Ea.setAttribute("type","text/css");for(var Ka="",Fa="",Ha=0;Ha<pa.length;Ha++){var Ia=pa[Ha].name,Ma=pa[Ha].url;Graph.isCssFontUrl(Ma)?
+Ka+="@import url("+Ma+");\n":Fa+='@font-face {\nfont-family: "'+Ia+'";\nsrc: url("'+Ma+'");\n}\n'}Ea.appendChild(Ba.createTextNode(Ka+Fa));Ca.getElementsByTagName("defs")[0].appendChild(Ea)}null!=ma&&(this.shapeBackgroundColor=Da,this.shapeForegroundColor=Aa,this.stylesheet=ma,this.refresh());return Ca};var B=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var t=B.apply(this,arguments);if(this.mathEnabled){var E=t.drawText;t.drawText=function(K,T){if(null!=K.text&&
+null!=K.text.value&&K.text.checkBounds()&&(mxUtils.isNode(K.text.value)||K.text.dialect==mxConstants.DIALECT_STRICTHTML)){var P=K.text.getContentNode();if(null!=P){P=P.cloneNode(!0);if(P.getElementsByTagNameNS)for(var Q=P.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<Q.length;)Q[0].parentNode.removeChild(Q[0]);null!=P.innerHTML&&(Q=K.text.value,K.text.value=P.innerHTML,E.apply(this,arguments),K.text.value=Q)}}else E.apply(this,arguments)}}return t};var C=mxCellRenderer.prototype.destroy;
mxCellRenderer.prototype.destroy=function(t){C.apply(this,arguments);null!=t.secondLabel&&(t.secondLabel.destroy(),t.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(t){return[t.shape,t.text,t.secondLabel,t.control]};var G=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){G.apply(this,arguments);this.enumerationState=0};var N=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(t){null!=t.shape&&this.redrawEnumerationState(t);
-return N.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(t){t=decodeURIComponent(mxUtils.getValue(t.style,"enumerateValue",""));""==t&&(t=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(t)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(t){var F="1"==mxUtils.getValue(t.style,"enumerate",0);F&&null==t.secondLabel?(t.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,
-mxConstants.ALIGN_BOTTOM),t.secondLabel.size=12,t.secondLabel.state=t,t.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(t,t.secondLabel)):F||null==t.secondLabel||(t.secondLabel.destroy(),t.secondLabel=null);F=t.secondLabel;if(null!=F){var K=t.view.scale,T=this.createEnumerationValue(t);t=this.graph.model.isVertex(t.cell)?new mxRectangle(t.x+t.width-4*K,t.y+4*K,0,0):mxRectangle.fromPoint(t.view.getPoint(t));F.bounds.equals(t)&&F.value==T&&F.scale==K||(F.bounds=
-t,F.value=T,F.scale=K,F.redraw())}};var I=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){I.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var t=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
-this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",t.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,t.ownerSVGElement))}};var E=Graph.prototype.refresh;Graph.prototype.refresh=function(){E.apply(this,
+return N.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(t){t=decodeURIComponent(mxUtils.getValue(t.style,"enumerateValue",""));""==t&&(t=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(t)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(t){var E="1"==mxUtils.getValue(t.style,"enumerate",0);E&&null==t.secondLabel?(t.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,
+mxConstants.ALIGN_BOTTOM),t.secondLabel.size=12,t.secondLabel.state=t,t.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(t,t.secondLabel)):E||null==t.secondLabel||(t.secondLabel.destroy(),t.secondLabel=null);E=t.secondLabel;if(null!=E){var K=t.view.scale,T=this.createEnumerationValue(t);t=this.graph.model.isVertex(t.cell)?new mxRectangle(t.x+t.width-4*K,t.y+4*K,0,0):mxRectangle.fromPoint(t.view.getPoint(t));E.bounds.equals(t)&&E.value==T&&E.scale==K||(E.bounds=
+t,E.value=T,E.scale=K,E.redraw())}};var I=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){I.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var t=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
+this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",t.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,t.ownerSVGElement))}};var F=Graph.prototype.refresh;Graph.prototype.refresh=function(){F.apply(this,
arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var H=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){H.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(t){"data:action/json,"==t.substring(0,17)&&(t=JSON.parse(t.substring(17)),null!=
-t.actions&&this.executeCustomActions(t.actions))};Graph.prototype.executeCustomActions=function(t,F){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var K=!1,T=0,P=0,Q=mxUtils.bind(this,function(){K||(K=!0,this.model.beginUpdate())}),S=mxUtils.bind(this,
-function(){K&&(K=!1,this.model.endUpdate())}),Y=mxUtils.bind(this,function(){0<T&&T--;0==T&&ca()}),ca=mxUtils.bind(this,function(){if(P<t.length){var da=this.stoppingCustomActions,Z=t[P++],ha=[];if(null!=Z.open)if(S(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||da||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;Y()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=Z.wait?parseInt(Z.wait):1E3),S());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,Y,da?0:Z.fadeIn.delay));null!=Z.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,Y,da?0:Z.fadeOut.delay));null!=Z.wipeIn&&(ha=ha.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,
-!0),!0)));null!=Z.wipeOut&&(ha=ha.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(Q(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){Q();var aa=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(aa),1);this.setCellsVisible(aa,!0)}null!=Z.hide&&(Q(),aa=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(aa),0),this.setCellsVisible(aa,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&&
-(Q(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(Q(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));aa=[];null!=Z.select&&this.isEnabled()&&(aa=this.getCellsForAction(Z.select),this.setSelectionCells(aa));null!=Z.highlight&&(aa=this.getCellsForAction(Z.highlight),this.highlightCells(aa,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity));
-null!=Z.scroll&&(aa=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<aa.length&&this.scrollCellToVisible(aa[0]);if(null!=Z.tags){aa=[];null!=Z.tags.hidden&&(aa=aa.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var ua=this.getAllTags(),ka=0;ka<ua.length;ka++)0>mxUtils.indexOf(Z.tags.visible,ua[ka])&&0>mxUtils.indexOf(aa,ua[ka])&&aa.push(ua[ka]);this.setHiddenTags(aa);this.refresh()}0<ha.length&&(T++,this.executeAnimations(ha,Y,da?1:Z.steps,da?0:Z.delay));
-0==T?ca():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=F&&F()});ca()}};Graph.prototype.doUpdateCustomLinksForCell=function(t,F){var K=this.getLinkForCell(F);null!=K&&"data:action/json,"==K.substring(0,17)&&this.setLinkForCell(F,this.updateCustomLink(t,K));if(this.isHtmlLabel(F)){var T=document.createElement("div");T.innerHTML=this.sanitizeHtml(this.getLabel(F));for(var P=T.getElementsByTagName("a"),Q=!1,S=0;S<P.length;S++)K=P[S].getAttribute("href"),null!=K&&"data:action/json,"==
-K.substring(0,17)&&(P[S].setAttribute("href",this.updateCustomLink(t,K)),Q=!0);Q&&this.labelChanged(F,T.innerHTML)}};Graph.prototype.updateCustomLink=function(t,F){if("data:action/json,"==F.substring(0,17))try{var K=JSON.parse(F.substring(17));null!=K.actions&&(this.updateCustomLinkActions(t,K.actions),F="data:action/json,"+JSON.stringify(K))}catch(T){}return F};Graph.prototype.updateCustomLinkActions=function(t,F){for(var K=0;K<F.length;K++){var T=F[K],P;for(P in T)this.updateCustomLinkAction(t,
-T[P],"cells"),this.updateCustomLinkAction(t,T[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(t,F,K){if(null!=F&&null!=F[K]){for(var T=[],P=0;P<F[K].length;P++)if("*"==F[K][P])T.push(F[K][P]);else{var Q=t[F[K][P]];null!=Q?""!=Q&&T.push(Q):T.push(F[K][P])}F[K]=T}};Graph.prototype.getCellsForAction=function(t,F){F=this.getCellsById(t.cells).concat(this.getCellsForTags(t.tags,null,F));if(null!=t.excludeCells){for(var K=[],T=0;T<F.length;T++)0>t.excludeCells.indexOf(F[T].id)&&K.push(F[T]);
-F=K}return F};Graph.prototype.getCellsById=function(t){var F=[];if(null!=t)for(var K=0;K<t.length;K++)if("*"==t[K]){var T=this.model.getRoot();F=F.concat(this.model.filterDescendants(function(Q){return Q!=T},T))}else{var P=this.model.getCell(t[K]);null!=P&&F.push(P)}return F};var R=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(t){return R.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(t))};Graph.prototype.setHiddenTags=function(t){this.hiddenTags=t;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
-Graph.prototype.toggleHiddenTag=function(t){var F=mxUtils.indexOf(this.hiddenTags,t);0>F?this.hiddenTags.push(t):0<=F&&this.hiddenTags.splice(F,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(t){if(null==t||0==t.length||0==this.hiddenTags.length)return!1;t=t.split(" ");if(t.length>this.hiddenTags.length)return!1;for(var F=0;F<t.length;F++)if(0>mxUtils.indexOf(this.hiddenTags,t[F]))return!1;return!0};Graph.prototype.getCellsForTags=function(t,F,K,
-T){var P=[];if(null!=t){F=null!=F?F:this.model.getDescendants(this.model.getRoot());for(var Q=0,S={},Y=0;Y<t.length;Y++)0<t[Y].length&&(S[t[Y]]=!0,Q++);for(Y=0;Y<F.length;Y++)if(K&&this.model.getParent(F[Y])==this.model.root||this.model.isVertex(F[Y])||this.model.isEdge(F[Y])){var ca=this.getTagsForCell(F[Y]),da=!1;if(0<ca.length&&(ca=ca.split(" "),ca.length>=t.length)){for(var Z=da=0;Z<ca.length&&da<Q;Z++)null!=S[ca[Z]]&&da++;da=da==Q}da&&(1!=T||this.isCellVisible(F[Y]))&&P.push(F[Y])}}return P};
-Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(t){for(var F=null,K=[],T=0;T<t.length;T++){var P=this.getTagsForCell(t[T]);K=[];if(0<P.length){P=P.split(" ");for(var Q={},S=0;S<P.length;S++)if(null==F||null!=F[P[S]])Q[P[S]]=!0,K.push(P[S]);F=Q}else return[]}return K};Graph.prototype.getTagsForCells=function(t){for(var F=[],K={},T=0;T<t.length;T++){var P=this.getTagsForCell(t[T]);if(0<
-P.length){P=P.split(" ");for(var Q=0;Q<P.length;Q++)null==K[P[Q]]&&(K[P[Q]]=!0,F.push(P[Q]))}}return F};Graph.prototype.getTagsForCell=function(t){return this.getAttributeForCell(t,"tags","")};Graph.prototype.addTagsForCells=function(t,F){if(0<t.length&&0<F.length){this.model.beginUpdate();try{for(var K=0;K<t.length;K++){for(var T=this.getTagsForCell(t[K]),P=T.split(" "),Q=!1,S=0;S<F.length;S++){var Y=mxUtils.trim(F[S]);""!=Y&&0>mxUtils.indexOf(P,Y)&&(T=0<T.length?T+" "+Y:Y,Q=!0)}Q&&this.setAttributeForCell(t[K],
-"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(t,F){if(0<t.length&&0<F.length){this.model.beginUpdate();try{for(var K=0;K<t.length;K++){var T=this.getTagsForCell(t[K]);if(0<T.length){for(var P=T.split(" "),Q=!1,S=0;S<F.length;S++){var Y=mxUtils.indexOf(P,F[S]);0<=Y&&(P.splice(Y,1),Q=!0)}Q&&this.setAttributeForCell(t[K],"tags",P.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(t){this.model.beginUpdate();try{for(var F=0;F<
-t.length;F++)this.model.setVisible(t[F],!this.model.isVisible(t[F]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(t,F){this.model.beginUpdate();try{for(var K=0;K<t.length;K++)this.model.setVisible(t[K],F)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(t,F,K,T){for(var P=0;P<t.length;P++)this.highlightCell(t[P],F,K,T)};Graph.prototype.highlightCell=function(t,F,K,T,P){F=null!=F?F:mxConstants.DEFAULT_VALID_COLOR;K=null!=K?K:1E3;t=this.view.getState(t);
-var Q=null;null!=t&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(t.style,mxConstants.STYLE_STROKEWIDTH,1)+P),Q=new mxCellHighlight(this,F,P,!1),null!=T&&(Q.opacity=T),Q.highlight(t),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,"transition","all 1200ms ease-in-out"),Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},1200)},K));return Q};Graph.prototype.addSvgShadow=function(t,F,K,T){K=null!=K?K:!1;T=null!=T?T:!0;var P=t.ownerDocument,
+t.actions&&this.executeCustomActions(t.actions))};Graph.prototype.executeCustomActions=function(t,E){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var K=!1,T=0,P=0,Q=mxUtils.bind(this,function(){K||(K=!0,this.model.beginUpdate())}),S=mxUtils.bind(this,
+function(){K&&(K=!1,this.model.endUpdate())}),Y=mxUtils.bind(this,function(){0<T&&T--;0==T&&ba()}),ba=mxUtils.bind(this,function(){if(P<t.length){var da=this.stoppingCustomActions,Z=t[P++],ja=[];if(null!=Z.open)if(S(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||da||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;Y()}),T++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=Z.wait?parseInt(Z.wait):1E3),S());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,Y,da?0:Z.fadeIn.delay));null!=Z.fadeOut&&(T++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,Y,da?0:Z.fadeOut.delay));null!=Z.wipeIn&&(ja=ja.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,
+!0),!0)));null!=Z.wipeOut&&(ja=ja.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(Q(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){Q();var ea=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ea),1);this.setCellsVisible(ea,!0)}null!=Z.hide&&(Q(),ea=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ea),0),this.setCellsVisible(ea,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&&
+(Q(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(Q(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));ea=[];null!=Z.select&&this.isEnabled()&&(ea=this.getCellsForAction(Z.select),this.setSelectionCells(ea));null!=Z.highlight&&(ea=this.getCellsForAction(Z.highlight),this.highlightCells(ea,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity));
+null!=Z.scroll&&(ea=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<ea.length&&this.scrollCellToVisible(ea[0]);if(null!=Z.tags){ea=[];null!=Z.tags.hidden&&(ea=ea.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var ha=this.getAllTags(),ma=0;ma<ha.length;ma++)0>mxUtils.indexOf(Z.tags.visible,ha[ma])&&0>mxUtils.indexOf(ea,ha[ma])&&ea.push(ha[ma]);this.setHiddenTags(ea);this.refresh()}0<ja.length&&(T++,this.executeAnimations(ja,Y,da?1:Z.steps,da?0:Z.delay));
+0==T?ba():S()}else this.stoppingCustomActions=this.executingCustomActions=!1,S(),null!=E&&E()});ba()}};Graph.prototype.doUpdateCustomLinksForCell=function(t,E){var K=this.getLinkForCell(E);null!=K&&"data:action/json,"==K.substring(0,17)&&this.setLinkForCell(E,this.updateCustomLink(t,K));if(this.isHtmlLabel(E)){var T=document.createElement("div");T.innerHTML=this.sanitizeHtml(this.getLabel(E));for(var P=T.getElementsByTagName("a"),Q=!1,S=0;S<P.length;S++)K=P[S].getAttribute("href"),null!=K&&"data:action/json,"==
+K.substring(0,17)&&(P[S].setAttribute("href",this.updateCustomLink(t,K)),Q=!0);Q&&this.labelChanged(E,T.innerHTML)}};Graph.prototype.updateCustomLink=function(t,E){if("data:action/json,"==E.substring(0,17))try{var K=JSON.parse(E.substring(17));null!=K.actions&&(this.updateCustomLinkActions(t,K.actions),E="data:action/json,"+JSON.stringify(K))}catch(T){}return E};Graph.prototype.updateCustomLinkActions=function(t,E){for(var K=0;K<E.length;K++){var T=E[K],P;for(P in T)this.updateCustomLinkAction(t,
+T[P],"cells"),this.updateCustomLinkAction(t,T[P],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(t,E,K){if(null!=E&&null!=E[K]){for(var T=[],P=0;P<E[K].length;P++)if("*"==E[K][P])T.push(E[K][P]);else{var Q=t[E[K][P]];null!=Q?""!=Q&&T.push(Q):T.push(E[K][P])}E[K]=T}};Graph.prototype.getCellsForAction=function(t,E){E=this.getCellsById(t.cells).concat(this.getCellsForTags(t.tags,null,E));if(null!=t.excludeCells){for(var K=[],T=0;T<E.length;T++)0>t.excludeCells.indexOf(E[T].id)&&K.push(E[T]);
+E=K}return E};Graph.prototype.getCellsById=function(t){var E=[];if(null!=t)for(var K=0;K<t.length;K++)if("*"==t[K]){var T=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(Q){return Q!=T},T))}else{var P=this.model.getCell(t[K]);null!=P&&E.push(P)}return E};var R=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(t){return R.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(t))};Graph.prototype.setHiddenTags=function(t){this.hiddenTags=t;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
+Graph.prototype.toggleHiddenTag=function(t){var E=mxUtils.indexOf(this.hiddenTags,t);0>E?this.hiddenTags.push(t):0<=E&&this.hiddenTags.splice(E,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(t){if(null==t||0==t.length||0==this.hiddenTags.length)return!1;t=t.split(" ");if(t.length>this.hiddenTags.length)return!1;for(var E=0;E<t.length;E++)if(0>mxUtils.indexOf(this.hiddenTags,t[E]))return!1;return!0};Graph.prototype.getCellsForTags=function(t,E,K,
+T){var P=[];if(null!=t){E=null!=E?E:this.model.getDescendants(this.model.getRoot());for(var Q=0,S={},Y=0;Y<t.length;Y++)0<t[Y].length&&(S[t[Y]]=!0,Q++);for(Y=0;Y<E.length;Y++)if(K&&this.model.getParent(E[Y])==this.model.root||this.model.isVertex(E[Y])||this.model.isEdge(E[Y])){var ba=this.getTagsForCell(E[Y]),da=!1;if(0<ba.length&&(ba=ba.split(" "),ba.length>=t.length)){for(var Z=da=0;Z<ba.length&&da<Q;Z++)null!=S[ba[Z]]&&da++;da=da==Q}da&&(1!=T||this.isCellVisible(E[Y]))&&P.push(E[Y])}}return P};
+Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(t){for(var E=null,K=[],T=0;T<t.length;T++){var P=this.getTagsForCell(t[T]);K=[];if(0<P.length){P=P.split(" ");for(var Q={},S=0;S<P.length;S++)if(null==E||null!=E[P[S]])Q[P[S]]=!0,K.push(P[S]);E=Q}else return[]}return K};Graph.prototype.getTagsForCells=function(t){for(var E=[],K={},T=0;T<t.length;T++){var P=this.getTagsForCell(t[T]);if(0<
+P.length){P=P.split(" ");for(var Q=0;Q<P.length;Q++)null==K[P[Q]]&&(K[P[Q]]=!0,E.push(P[Q]))}}return E};Graph.prototype.getTagsForCell=function(t){return this.getAttributeForCell(t,"tags","")};Graph.prototype.addTagsForCells=function(t,E){if(0<t.length&&0<E.length){this.model.beginUpdate();try{for(var K=0;K<t.length;K++){for(var T=this.getTagsForCell(t[K]),P=T.split(" "),Q=!1,S=0;S<E.length;S++){var Y=mxUtils.trim(E[S]);""!=Y&&0>mxUtils.indexOf(P,Y)&&(T=0<T.length?T+" "+Y:Y,Q=!0)}Q&&this.setAttributeForCell(t[K],
+"tags",T)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(t,E){if(0<t.length&&0<E.length){this.model.beginUpdate();try{for(var K=0;K<t.length;K++){var T=this.getTagsForCell(t[K]);if(0<T.length){for(var P=T.split(" "),Q=!1,S=0;S<E.length;S++){var Y=mxUtils.indexOf(P,E[S]);0<=Y&&(P.splice(Y,1),Q=!0)}Q&&this.setAttributeForCell(t[K],"tags",P.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(t){this.model.beginUpdate();try{for(var E=0;E<
+t.length;E++)this.model.setVisible(t[E],!this.model.isVisible(t[E]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(t,E){this.model.beginUpdate();try{for(var K=0;K<t.length;K++)this.model.setVisible(t[K],E)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(t,E,K,T){for(var P=0;P<t.length;P++)this.highlightCell(t[P],E,K,T)};Graph.prototype.highlightCell=function(t,E,K,T,P){E=null!=E?E:mxConstants.DEFAULT_VALID_COLOR;K=null!=K?K:1E3;t=this.view.getState(t);
+var Q=null;null!=t&&(P=null!=P?P:4,P=Math.max(P+1,mxUtils.getValue(t.style,mxConstants.STYLE_STROKEWIDTH,1)+P),Q=new mxCellHighlight(this,E,P,!1),null!=T&&(Q.opacity=T),Q.highlight(t),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,"transition","all 1200ms ease-in-out"),Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},1200)},K));return Q};Graph.prototype.addSvgShadow=function(t,E,K,T){K=null!=K?K:!1;T=null!=T?T:!0;var P=t.ownerDocument,
Q=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"filter"):P.createElement("filter");Q.setAttribute("id",this.shadowId);var S=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):P.createElement("feGaussianBlur");S.setAttribute("in","SourceAlpha");S.setAttribute("stdDeviation",this.svgShadowBlur);S.setAttribute("result","blur");Q.appendChild(S);S=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feOffset"):P.createElement("feOffset");S.setAttribute("in",
"blur");S.setAttribute("dx",this.svgShadowSize);S.setAttribute("dy",this.svgShadowSize);S.setAttribute("result","offsetBlur");Q.appendChild(S);S=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feFlood"):P.createElement("feFlood");S.setAttribute("flood-color",this.svgShadowColor);S.setAttribute("flood-opacity",this.svgShadowOpacity);S.setAttribute("result","offsetColor");Q.appendChild(S);S=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feComposite"):P.createElement("feComposite");
S.setAttribute("in","offsetColor");S.setAttribute("in2","offsetBlur");S.setAttribute("operator","in");S.setAttribute("result","offsetBlur");Q.appendChild(S);S=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"feBlend"):P.createElement("feBlend");S.setAttribute("in","SourceGraphic");S.setAttribute("in2","offsetBlur");Q.appendChild(S);S=t.getElementsByTagName("defs");0==S.length?(P=null!=P.createElementNS?P.createElementNS(mxConstants.NS_SVG,"defs"):P.createElement("defs"),null!=t.firstChild?
-t.insertBefore(P,t.firstChild):t.appendChild(P)):P=S[0];P.appendChild(Q);K||(F=null!=F?F:t.getElementsByTagName("g")[0],null!=F&&(F.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(t.getAttribute("width")))&&T&&(t.setAttribute("width",parseInt(t.getAttribute("width"))+6),t.setAttribute("height",parseInt(t.getAttribute("height"))+6),F=t.getAttribute("viewBox"),null!=F&&0<F.length&&(F=F.split(" "),3<F.length&&(w=parseFloat(F[2])+6,h=parseFloat(F[3])+6,t.setAttribute("viewBox",F[0]+" "+
-F[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(t,F){mxClient.IS_SVG&&!mxClient.IS_SF&&(F=null!=F?F:!0,(this.shadowVisible=t)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),F&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var t=this.model.getChildCount(this.model.root),F=0;do var K=this.model.getChildAt(this.model.root,
-F);while(F++<t&&"1"==mxUtils.getValue(this.getCellStyle(K),"locked","0"));null!=K&&this.setDefaultParent(K)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=
+t.insertBefore(P,t.firstChild):t.appendChild(P)):P=S[0];P.appendChild(Q);K||(E=null!=E?E:t.getElementsByTagName("g")[0],null!=E&&(E.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(t.getAttribute("width")))&&T&&(t.setAttribute("width",parseInt(t.getAttribute("width"))+6),t.setAttribute("height",parseInt(t.getAttribute("height"))+6),E=t.getAttribute("viewBox"),null!=E&&0<E.length&&(E=E.split(" "),3<E.length&&(w=parseFloat(E[2])+6,h=parseFloat(E[3])+6,t.setAttribute("viewBox",E[0]+" "+
+E[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(t,E){mxClient.IS_SVG&&!mxClient.IS_SF&&(E=null!=E?E:!0,(this.shadowVisible=t)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),E&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var t=this.model.getChildCount(this.model.root),E=0;do var K=this.model.getChildAt(this.model.root,
+E);while(E++<t&&"1"==mxUtils.getValue(this.getCellStyle(K),"locked","0"));null!=K&&this.setDefaultParent(K)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=
[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",
STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];
mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];
@@ -11681,36 +11681,36 @@ mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js
"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=
[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",
STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+
-"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(t){var F=null;null!=t&&0<t.length&&("ER"==t.substring(0,2)?F="mxgraph.er":"sysML"==t.substring(0,5)&&(F="mxgraph.sysml"));return F};var W=mxMarker.createMarker;mxMarker.createMarker=function(t,F,K,T,P,Q,S,Y,ca,da){if(null!=K&&null==mxMarker.markers[K]){var Z=this.getPackageForType(K);null!=
-Z&&mxStencilRegistry.getStencil(Z)}return W.apply(this,arguments)};var J=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(t,F,K,T,P,Q){"1"==mxUtils.getValue(F.style,"lineShape",null)&&t.setFillColor(mxUtils.getValue(F.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return J.apply(this,arguments)};PrintDialog.prototype.create=function(t,F){function K(){aa.value=Math.max(1,Math.min(Y,Math.max(parseInt(aa.value),parseInt(ha.value))));ha.value=Math.max(1,Math.min(Y,Math.min(parseInt(aa.value),
-parseInt(ha.value))))}function T(xa){function wa(Ia,Ja,Pa){var Ra=Ia.useCssTransforms,Ya=Ia.currentTranslate,Ma=Ia.currentScale,Ta=Ia.view.translate,Ua=Ia.view.scale;Ia.useCssTransforms&&(Ia.useCssTransforms=!1,Ia.currentTranslate=new mxPoint(0,0),Ia.currentScale=1,Ia.view.translate=new mxPoint(0,0),Ia.view.scale=1);var Za=Ia.getGraphBounds(),Wa=0,bb=0,Va=fa.get(),ab=1/Ia.pageScale,$a=oa.checked;if($a){ab=parseInt(ya.value);var hb=parseInt(qa.value);ab=Math.min(Va.height*hb/(Za.height/Ia.view.scale),
-Va.width*ab/(Za.width/Ia.view.scale))}else ab=parseInt(Da.value)/(100*Ia.pageScale),isNaN(ab)&&(sa=1/Ia.pageScale,Da.value="100 %");Va=mxRectangle.fromRectangle(Va);Va.width=Math.ceil(Va.width*sa);Va.height=Math.ceil(Va.height*sa);ab*=sa;!$a&&Ia.pageVisible?(Za=Ia.getPageLayout(),Wa-=Za.x*Va.width,bb-=Za.y*Va.height):$a=!0;if(null==Ja){Ja=PrintDialog.createPrintPreview(Ia,ab,Va,0,Wa,bb,$a);Ja.pageSelector=!1;Ja.mathEnabled=!1;ua.checked&&(Ja.isCellVisible=function(Xa){return Ia.isCellSelected(Xa)});
-Wa=t.getCurrentFile();null!=Wa&&(Ja.title=Wa.getTitle());var ib=Ja.writeHead;Ja.writeHead=function(Xa){ib.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)Xa.writeln('<style type="text/css">'),Xa.writeln(Editor.mathJaxWebkitCss),Xa.writeln("</style>");mxClient.IS_GC&&(Xa.writeln('<style type="text/css">'),Xa.writeln("@media print {"),Xa.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),Xa.writeln("}"),Xa.writeln("</style>"));null!=t.editor.fontCss&&(Xa.writeln('<style type="text/css">'),
-Xa.writeln(t.editor.fontCss),Xa.writeln("</style>"));for(var db=Ia.getCustomFonts(),cb=0;cb<db.length;cb++){var fb=db[cb].name,eb=db[cb].url;Graph.isCssFontUrl(eb)?Xa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(eb)+'" charset="UTF-8" type="text/css">'):(Xa.writeln('<style type="text/css">'),Xa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fb)+'";\nsrc: url("'+mxUtils.htmlEntities(eb)+'");\n}'),Xa.writeln("</style>"))}};if("undefined"!==typeof MathJax){var jb=Ja.renderPage;
-Ja.renderPage=function(Xa,db,cb,fb,eb,lb){var kb=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!t.editor.useForeignObjectForMath?!0:t.editor.originalNoForeignObject;var gb=jb.apply(this,arguments);mxClient.NO_FO=kb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:gb.className="geDisableMathJax";return gb}}Wa=null;bb=P.shapeForegroundColor;$a=P.shapeBackgroundColor;Va=P.enableFlowAnimation;P.enableFlowAnimation=!1;null!=P.themes&&"darkTheme"==P.defaultThemeName&&(Wa=P.stylesheet,
-P.stylesheet=P.getDefaultStylesheet(),P.shapeForegroundColor="#000000",P.shapeBackgroundColor="#ffffff",P.refresh());Ja.open(null,null,Pa,!0);P.enableFlowAnimation=Va;null!=Wa&&(P.shapeForegroundColor=bb,P.shapeBackgroundColor=$a,P.stylesheet=Wa,P.refresh())}else{Va=Ia.background;if(null==Va||""==Va||Va==mxConstants.NONE)Va="#ffffff";Ja.backgroundColor=Va;Ja.autoOrigin=$a;Ja.appendGraph(Ia,ab,Wa,bb,Pa,!0);Pa=Ia.getCustomFonts();if(null!=Ja.wnd)for(Wa=0;Wa<Pa.length;Wa++)bb=Pa[Wa].name,$a=Pa[Wa].url,
-Graph.isCssFontUrl($a)?Ja.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities($a)+'" charset="UTF-8" type="text/css">'):(Ja.wnd.document.writeln('<style type="text/css">'),Ja.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(bb)+'";\nsrc: url("'+mxUtils.htmlEntities($a)+'");\n}'),Ja.wnd.document.writeln("</style>"))}Ra&&(Ia.useCssTransforms=Ra,Ia.currentTranslate=Ya,Ia.currentScale=Ma,Ia.view.translate=Ta,Ia.view.scale=Ua);return Ja}var sa=parseInt(ra.value)/
-100;isNaN(sa)&&(sa=1,ra.value="100 %");sa*=.75;var va=null,ja=P.shapeForegroundColor,pa=P.shapeBackgroundColor;null!=P.themes&&"darkTheme"==P.defaultThemeName&&(va=P.stylesheet,P.stylesheet=P.getDefaultStylesheet(),P.shapeForegroundColor="#000000",P.shapeBackgroundColor="#ffffff",P.refresh());var ba=ha.value,ea=aa.value,na=!da.checked,la=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(t,da.checked,ba,ea,oa.checked,ya.value,qa.value,parseInt(Da.value)/100,parseInt(ra.value)/100,fa.get());
-else{na&&(na=ua.checked||ba==ca&&ea==ca);if(!na&&null!=t.pages&&t.pages.length){var ma=0;na=t.pages.length-1;da.checked||(ma=parseInt(ba)-1,na=parseInt(ea)-1);for(var ta=ma;ta<=na;ta++){var ia=t.pages[ta];ba=ia==t.currentPage?P:null;if(null==ba){ba=t.createTemporaryGraph(P.stylesheet);ba.shapeForegroundColor=P.shapeForegroundColor;ba.shapeBackgroundColor=P.shapeBackgroundColor;ea=!0;ma=!1;var Na=null,La=null;null==ia.viewState&&null==ia.root&&t.updatePageRoot(ia);null!=ia.viewState&&(ea=ia.viewState.pageVisible,
-ma=ia.viewState.mathEnabled,Na=ia.viewState.background,La=ia.viewState.backgroundImage,ba.extFonts=ia.viewState.extFonts);null!=La&&null!=La.originalSrc&&(La=t.createImageForPageLink(La.originalSrc,ia));ba.background=Na;ba.backgroundImage=null!=La?new mxImage(La.src,La.width,La.height,La.x,La.y):null;ba.pageVisible=ea;ba.mathEnabled=ma;var Qa=ba.getGraphBounds;ba.getGraphBounds=function(){var Ia=Qa.apply(this,arguments),Ja=this.backgroundImage;if(null!=Ja&&null!=Ja.width&&null!=Ja.height){var Pa=
-this.view.translate,Ra=this.view.scale;Ia=mxRectangle.fromRectangle(Ia);Ia.add(new mxRectangle((Pa.x+Ja.x)*Ra,(Pa.y+Ja.y)*Ra,Ja.width*Ra,Ja.height*Ra))}return Ia};var Sa=ba.getGlobalVariable;ba.getGlobalVariable=function(Ia){return"page"==Ia?ia.getName():"pagenumber"==Ia?ta+1:"pagecount"==Ia?null!=t.pages?t.pages.length:1:Sa.apply(this,arguments)};document.body.appendChild(ba.container);t.updatePageRoot(ia);ba.model.setRoot(ia.root)}la=wa(ba,la,ta!=na);ba!=P&&ba.container.parentNode.removeChild(ba.container)}}else la=
-wa(P);null==la?t.handleError({message:mxResources.get("errorUpdatingPreview")}):(la.mathEnabled&&(na=la.wnd.document,xa&&(la.wnd.IMMEDIATE_PRINT=!0),na.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),la.closeDocument(),!la.mathEnabled&&xa&&PrintDialog.printPreview(la));null!=va&&(P.shapeForegroundColor=ja,P.shapeBackgroundColor=pa,P.stylesheet=va,P.refresh())}}var P=t.editor.graph,Q=document.createElement("div"),S=document.createElement("h3");S.style.width=
-"100%";S.style.textAlign="center";S.style.marginTop="0px";mxUtils.write(S,F||mxResources.get("print"));Q.appendChild(S);var Y=1,ca=1;S=document.createElement("div");S.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var da=document.createElement("input");da.style.cssText="margin-right:8px;margin-bottom:8px;";da.setAttribute("value","all");da.setAttribute("type","radio");da.setAttribute("name","pages-printdialog");S.appendChild(da);F=document.createElement("span");
-mxUtils.write(F,mxResources.get("printAllPages"));S.appendChild(F);mxUtils.br(S);var Z=da.cloneNode(!0);da.setAttribute("checked","checked");Z.setAttribute("value","range");S.appendChild(Z);F=document.createElement("span");mxUtils.write(F,mxResources.get("pages")+":");S.appendChild(F);var ha=document.createElement("input");ha.style.cssText="margin:0 8px 0 8px;";ha.setAttribute("value","1");ha.setAttribute("type","number");ha.setAttribute("min","1");ha.style.width="50px";S.appendChild(ha);F=document.createElement("span");
-mxUtils.write(F,mxResources.get("to"));S.appendChild(F);var aa=ha.cloneNode(!0);S.appendChild(aa);mxEvent.addListener(ha,"focus",function(){Z.checked=!0});mxEvent.addListener(aa,"focus",function(){Z.checked=!0});mxEvent.addListener(ha,"change",K);mxEvent.addListener(aa,"change",K);if(null!=t.pages&&(Y=t.pages.length,null!=t.currentPage))for(F=0;F<t.pages.length;F++)if(t.currentPage==t.pages[F]){ca=F+1;ha.value=ca;aa.value=ca;break}ha.setAttribute("max",Y);aa.setAttribute("max",Y);t.isPagesEnabled()?
-1<Y&&(Q.appendChild(S),Z.checked=!0):Z.checked=!0;mxUtils.br(S);var ua=document.createElement("input");ua.setAttribute("value","all");ua.setAttribute("type","radio");ua.style.marginRight="8px";P.isSelectionEmpty()&&ua.setAttribute("disabled","disabled");var ka=document.createElement("div");ka.style.marginBottom="10px";1==Y?(ua.setAttribute("type","checkbox"),ua.style.marginBottom="12px",ka.appendChild(ua)):(ua.setAttribute("name","pages-printdialog"),ua.style.marginBottom="8px",S.appendChild(ua));
-F=document.createElement("span");mxUtils.write(F,mxResources.get("selectionOnly"));ua.parentNode.appendChild(F);1==Y&&mxUtils.br(ua.parentNode);var Ca=document.createElement("input");Ca.style.marginRight="8px";Ca.setAttribute("value","adjust");Ca.setAttribute("type","radio");Ca.setAttribute("name","printZoom");ka.appendChild(Ca);F=document.createElement("span");mxUtils.write(F,mxResources.get("adjustTo"));ka.appendChild(F);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";
-Da.setAttribute("value","100 %");Da.style.width="50px";ka.appendChild(Da);mxEvent.addListener(Da,"focus",function(){Ca.checked=!0});Q.appendChild(ka);S=S.cloneNode(!1);var oa=Ca.cloneNode(!0);oa.setAttribute("value","fit");Ca.setAttribute("checked","checked");F=document.createElement("div");F.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";F.appendChild(oa);S.appendChild(F);ka=document.createElement("table");ka.style.display="inline-block";var Ba=document.createElement("tbody"),
-Aa=document.createElement("tr"),Ha=Aa.cloneNode(!0),Oa=document.createElement("td"),Ga=Oa.cloneNode(!0),Fa=Oa.cloneNode(!0),Ea=Oa.cloneNode(!0),Ka=Oa.cloneNode(!0),za=Oa.cloneNode(!0);Oa.style.textAlign="right";Ea.style.textAlign="right";mxUtils.write(Oa,mxResources.get("fitTo"));var ya=document.createElement("input");ya.style.cssText="margin:0 8px 0 8px;";ya.setAttribute("value","1");ya.setAttribute("min","1");ya.setAttribute("type","number");ya.style.width="40px";Ga.appendChild(ya);F=document.createElement("span");
-mxUtils.write(F,mxResources.get("fitToSheetsAcross"));Fa.appendChild(F);mxUtils.write(Ea,mxResources.get("fitToBy"));var qa=ya.cloneNode(!0);Ka.appendChild(qa);mxEvent.addListener(ya,"focus",function(){oa.checked=!0});mxEvent.addListener(qa,"focus",function(){oa.checked=!0});F=document.createElement("span");mxUtils.write(F,mxResources.get("fitToSheetsDown"));za.appendChild(F);Aa.appendChild(Oa);Aa.appendChild(Ga);Aa.appendChild(Fa);Ha.appendChild(Ea);Ha.appendChild(Ka);Ha.appendChild(za);Ba.appendChild(Aa);
-Ba.appendChild(Ha);ka.appendChild(Ba);S.appendChild(ka);Q.appendChild(S);S=document.createElement("div");F=document.createElement("div");F.style.fontWeight="bold";F.style.marginBottom="12px";mxUtils.write(F,mxResources.get("paperSize"));S.appendChild(F);F=document.createElement("div");F.style.marginBottom="12px";var fa=PageSetupDialog.addPageFormatPanel(F,"printdialog",t.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);S.appendChild(F);F=document.createElement("span");mxUtils.write(F,
-mxResources.get("pageScale"));S.appendChild(F);var ra=document.createElement("input");ra.style.cssText="margin:0 8px 0 8px;";ra.setAttribute("value","100 %");ra.style.width="60px";S.appendChild(ra);Q.appendChild(S);F=document.createElement("div");F.style.cssText="text-align:right;margin:48px 0 0 0;";S=mxUtils.button(mxResources.get("cancel"),function(){t.hideDialog()});S.className="geBtn";t.editor.cancelFirst&&F.appendChild(S);t.isOffline()||(ka=mxUtils.button(mxResources.get("help"),function(){P.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
-ka.className="geBtn",F.appendChild(ka));PrintDialog.previewEnabled&&(ka=mxUtils.button(mxResources.get("preview"),function(){t.hideDialog();T(!1)}),ka.className="geBtn",F.appendChild(ka));ka=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){t.hideDialog();T(!0)});ka.className="geBtn gePrimaryBtn";F.appendChild(ka);t.editor.cancelFirst||F.appendChild(S);Q.appendChild(F);this.container=Q};var V=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(t){var E=null;null!=t&&0<t.length&&("ER"==t.substring(0,2)?E="mxgraph.er":"sysML"==t.substring(0,5)&&(E="mxgraph.sysml"));return E};var W=mxMarker.createMarker;mxMarker.createMarker=function(t,E,K,T,P,Q,S,Y,ba,da){if(null!=K&&null==mxMarker.markers[K]){var Z=this.getPackageForType(K);null!=
+Z&&mxStencilRegistry.getStencil(Z)}return W.apply(this,arguments)};var J=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(t,E,K,T,P,Q){"1"==mxUtils.getValue(E.style,"lineShape",null)&&t.setFillColor(mxUtils.getValue(E.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return J.apply(this,arguments)};PrintDialog.prototype.create=function(t,E){function K(){ea.value=Math.max(1,Math.min(Y,Math.max(parseInt(ea.value),parseInt(ja.value))));ja.value=Math.max(1,Math.min(Y,Math.min(parseInt(ea.value),
+parseInt(ja.value))))}function T(xa){function wa(Ga,Na,Pa){var Qa=Ga.useCssTransforms,Ya=Ga.currentTranslate,Oa=Ga.currentScale,Ta=Ga.view.translate,Ua=Ga.view.scale;Ga.useCssTransforms&&(Ga.useCssTransforms=!1,Ga.currentTranslate=new mxPoint(0,0),Ga.currentScale=1,Ga.view.translate=new mxPoint(0,0),Ga.view.scale=1);var Za=Ga.getGraphBounds(),Wa=0,bb=0,Va=fa.get(),ab=1/Ga.pageScale,$a=Ca.checked;if($a){ab=parseInt(ya.value);var hb=parseInt(oa.value);ab=Math.min(Va.height*hb/(Za.height/Ga.view.scale),
+Va.width*ab/(Za.width/Ga.view.scale))}else ab=parseInt(Da.value)/(100*Ga.pageScale),isNaN(ab)&&(ua=1/Ga.pageScale,Da.value="100 %");Va=mxRectangle.fromRectangle(Va);Va.width=Math.ceil(Va.width*ua);Va.height=Math.ceil(Va.height*ua);ab*=ua;!$a&&Ga.pageVisible?(Za=Ga.getPageLayout(),Wa-=Za.x*Va.width,bb-=Za.y*Va.height):$a=!0;if(null==Na){Na=PrintDialog.createPrintPreview(Ga,ab,Va,0,Wa,bb,$a);Na.pageSelector=!1;Na.mathEnabled=!1;ha.checked&&(Na.isCellVisible=function(Xa){return Ga.isCellSelected(Xa)});
+Wa=t.getCurrentFile();null!=Wa&&(Na.title=Wa.getTitle());var ib=Na.writeHead;Na.writeHead=function(Xa){ib.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)Xa.writeln('<style type="text/css">'),Xa.writeln(Editor.mathJaxWebkitCss),Xa.writeln("</style>");mxClient.IS_GC&&(Xa.writeln('<style type="text/css">'),Xa.writeln("@media print {"),Xa.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),Xa.writeln("}"),Xa.writeln("</style>"));null!=t.editor.fontCss&&(Xa.writeln('<style type="text/css">'),
+Xa.writeln(t.editor.fontCss),Xa.writeln("</style>"));for(var db=Ga.getCustomFonts(),cb=0;cb<db.length;cb++){var fb=db[cb].name,eb=db[cb].url;Graph.isCssFontUrl(eb)?Xa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(eb)+'" charset="UTF-8" type="text/css">'):(Xa.writeln('<style type="text/css">'),Xa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fb)+'";\nsrc: url("'+mxUtils.htmlEntities(eb)+'");\n}'),Xa.writeln("</style>"))}};if("undefined"!==typeof MathJax){var jb=Na.renderPage;
+Na.renderPage=function(Xa,db,cb,fb,eb,lb){var kb=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!t.editor.useForeignObjectForMath?!0:t.editor.originalNoForeignObject;var gb=jb.apply(this,arguments);mxClient.NO_FO=kb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:gb.className="geDisableMathJax";return gb}}Wa=null;bb=P.shapeForegroundColor;$a=P.shapeBackgroundColor;Va=P.enableFlowAnimation;P.enableFlowAnimation=!1;null!=P.themes&&"darkTheme"==P.defaultThemeName&&(Wa=P.stylesheet,
+P.stylesheet=P.getDefaultStylesheet(),P.shapeForegroundColor="#000000",P.shapeBackgroundColor="#ffffff",P.refresh());Na.open(null,null,Pa,!0);P.enableFlowAnimation=Va;null!=Wa&&(P.shapeForegroundColor=bb,P.shapeBackgroundColor=$a,P.stylesheet=Wa,P.refresh())}else{Va=Ga.background;if(null==Va||""==Va||Va==mxConstants.NONE)Va="#ffffff";Na.backgroundColor=Va;Na.autoOrigin=$a;Na.appendGraph(Ga,ab,Wa,bb,Pa,!0);Pa=Ga.getCustomFonts();if(null!=Na.wnd)for(Wa=0;Wa<Pa.length;Wa++)bb=Pa[Wa].name,$a=Pa[Wa].url,
+Graph.isCssFontUrl($a)?Na.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities($a)+'" charset="UTF-8" type="text/css">'):(Na.wnd.document.writeln('<style type="text/css">'),Na.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(bb)+'";\nsrc: url("'+mxUtils.htmlEntities($a)+'");\n}'),Na.wnd.document.writeln("</style>"))}Qa&&(Ga.useCssTransforms=Qa,Ga.currentTranslate=Ya,Ga.currentScale=Oa,Ga.view.translate=Ta,Ga.view.scale=Ua);return Na}var ua=parseInt(sa.value)/
+100;isNaN(ua)&&(ua=1,sa.value="100 %");ua*=.75;var va=null,ia=P.shapeForegroundColor,ra=P.shapeBackgroundColor;null!=P.themes&&"darkTheme"==P.defaultThemeName&&(va=P.stylesheet,P.stylesheet=P.getDefaultStylesheet(),P.shapeForegroundColor="#000000",P.shapeBackgroundColor="#ffffff",P.refresh());var aa=ja.value,ca=ea.value,na=!da.checked,la=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(t,da.checked,aa,ca,Ca.checked,ya.value,oa.value,parseInt(Da.value)/100,parseInt(sa.value)/100,fa.get());
+else{na&&(na=ha.checked||aa==ba&&ca==ba);if(!na&&null!=t.pages&&t.pages.length){var qa=0;na=t.pages.length-1;da.checked||(qa=parseInt(aa)-1,na=parseInt(ca)-1);for(var ta=qa;ta<=na;ta++){var ka=t.pages[ta];aa=ka==t.currentPage?P:null;if(null==aa){aa=t.createTemporaryGraph(P.stylesheet);aa.shapeForegroundColor=P.shapeForegroundColor;aa.shapeBackgroundColor=P.shapeBackgroundColor;ca=!0;qa=!1;var Ja=null,La=null;null==ka.viewState&&null==ka.root&&t.updatePageRoot(ka);null!=ka.viewState&&(ca=ka.viewState.pageVisible,
+qa=ka.viewState.mathEnabled,Ja=ka.viewState.background,La=ka.viewState.backgroundImage,aa.extFonts=ka.viewState.extFonts);null!=La&&null!=La.originalSrc&&(La=t.createImageForPageLink(La.originalSrc,ka));aa.background=Ja;aa.backgroundImage=null!=La?new mxImage(La.src,La.width,La.height,La.x,La.y):null;aa.pageVisible=ca;aa.mathEnabled=qa;var Sa=aa.getGraphBounds;aa.getGraphBounds=function(){var Ga=Sa.apply(this,arguments),Na=this.backgroundImage;if(null!=Na&&null!=Na.width&&null!=Na.height){var Pa=
+this.view.translate,Qa=this.view.scale;Ga=mxRectangle.fromRectangle(Ga);Ga.add(new mxRectangle((Pa.x+Na.x)*Qa,(Pa.y+Na.y)*Qa,Na.width*Qa,Na.height*Qa))}return Ga};var Ra=aa.getGlobalVariable;aa.getGlobalVariable=function(Ga){return"page"==Ga?ka.getName():"pagenumber"==Ga?ta+1:"pagecount"==Ga?null!=t.pages?t.pages.length:1:Ra.apply(this,arguments)};document.body.appendChild(aa.container);t.updatePageRoot(ka);aa.model.setRoot(ka.root)}la=wa(aa,la,ta!=na);aa!=P&&aa.container.parentNode.removeChild(aa.container)}}else la=
+wa(P);null==la?t.handleError({message:mxResources.get("errorUpdatingPreview")}):(la.mathEnabled&&(na=la.wnd.document,xa&&(la.wnd.IMMEDIATE_PRINT=!0),na.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),la.closeDocument(),!la.mathEnabled&&xa&&PrintDialog.printPreview(la));null!=va&&(P.shapeForegroundColor=ia,P.shapeBackgroundColor=ra,P.stylesheet=va,P.refresh())}}var P=t.editor.graph,Q=document.createElement("div"),S=document.createElement("h3");S.style.width=
+"100%";S.style.textAlign="center";S.style.marginTop="0px";mxUtils.write(S,E||mxResources.get("print"));Q.appendChild(S);var Y=1,ba=1;S=document.createElement("div");S.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var da=document.createElement("input");da.style.cssText="margin-right:8px;margin-bottom:8px;";da.setAttribute("value","all");da.setAttribute("type","radio");da.setAttribute("name","pages-printdialog");S.appendChild(da);E=document.createElement("span");
+mxUtils.write(E,mxResources.get("printAllPages"));S.appendChild(E);mxUtils.br(S);var Z=da.cloneNode(!0);da.setAttribute("checked","checked");Z.setAttribute("value","range");S.appendChild(Z);E=document.createElement("span");mxUtils.write(E,mxResources.get("pages")+":");S.appendChild(E);var ja=document.createElement("input");ja.style.cssText="margin:0 8px 0 8px;";ja.setAttribute("value","1");ja.setAttribute("type","number");ja.setAttribute("min","1");ja.style.width="50px";S.appendChild(ja);E=document.createElement("span");
+mxUtils.write(E,mxResources.get("to"));S.appendChild(E);var ea=ja.cloneNode(!0);S.appendChild(ea);mxEvent.addListener(ja,"focus",function(){Z.checked=!0});mxEvent.addListener(ea,"focus",function(){Z.checked=!0});mxEvent.addListener(ja,"change",K);mxEvent.addListener(ea,"change",K);if(null!=t.pages&&(Y=t.pages.length,null!=t.currentPage))for(E=0;E<t.pages.length;E++)if(t.currentPage==t.pages[E]){ba=E+1;ja.value=ba;ea.value=ba;break}ja.setAttribute("max",Y);ea.setAttribute("max",Y);t.isPagesEnabled()?
+1<Y&&(Q.appendChild(S),Z.checked=!0):Z.checked=!0;mxUtils.br(S);var ha=document.createElement("input");ha.setAttribute("value","all");ha.setAttribute("type","radio");ha.style.marginRight="8px";P.isSelectionEmpty()&&ha.setAttribute("disabled","disabled");var ma=document.createElement("div");ma.style.marginBottom="10px";1==Y?(ha.setAttribute("type","checkbox"),ha.style.marginBottom="12px",ma.appendChild(ha)):(ha.setAttribute("name","pages-printdialog"),ha.style.marginBottom="8px",S.appendChild(ha));
+E=document.createElement("span");mxUtils.write(E,mxResources.get("selectionOnly"));ha.parentNode.appendChild(E);1==Y&&mxUtils.br(ha.parentNode);var Aa=document.createElement("input");Aa.style.marginRight="8px";Aa.setAttribute("value","adjust");Aa.setAttribute("type","radio");Aa.setAttribute("name","printZoom");ma.appendChild(Aa);E=document.createElement("span");mxUtils.write(E,mxResources.get("adjustTo"));ma.appendChild(E);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";
+Da.setAttribute("value","100 %");Da.style.width="50px";ma.appendChild(Da);mxEvent.addListener(Da,"focus",function(){Aa.checked=!0});Q.appendChild(ma);S=S.cloneNode(!1);var Ca=Aa.cloneNode(!0);Ca.setAttribute("value","fit");Aa.setAttribute("checked","checked");E=document.createElement("div");E.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";E.appendChild(Ca);S.appendChild(E);ma=document.createElement("table");ma.style.display="inline-block";var pa=document.createElement("tbody"),
+Ba=document.createElement("tr"),Ea=Ba.cloneNode(!0),Ka=document.createElement("td"),Fa=Ka.cloneNode(!0),Ha=Ka.cloneNode(!0),Ia=Ka.cloneNode(!0),Ma=Ka.cloneNode(!0),za=Ka.cloneNode(!0);Ka.style.textAlign="right";Ia.style.textAlign="right";mxUtils.write(Ka,mxResources.get("fitTo"));var ya=document.createElement("input");ya.style.cssText="margin:0 8px 0 8px;";ya.setAttribute("value","1");ya.setAttribute("min","1");ya.setAttribute("type","number");ya.style.width="40px";Fa.appendChild(ya);E=document.createElement("span");
+mxUtils.write(E,mxResources.get("fitToSheetsAcross"));Ha.appendChild(E);mxUtils.write(Ia,mxResources.get("fitToBy"));var oa=ya.cloneNode(!0);Ma.appendChild(oa);mxEvent.addListener(ya,"focus",function(){Ca.checked=!0});mxEvent.addListener(oa,"focus",function(){Ca.checked=!0});E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsDown"));za.appendChild(E);Ba.appendChild(Ka);Ba.appendChild(Fa);Ba.appendChild(Ha);Ea.appendChild(Ia);Ea.appendChild(Ma);Ea.appendChild(za);pa.appendChild(Ba);
+pa.appendChild(Ea);ma.appendChild(pa);S.appendChild(ma);Q.appendChild(S);S=document.createElement("div");E=document.createElement("div");E.style.fontWeight="bold";E.style.marginBottom="12px";mxUtils.write(E,mxResources.get("paperSize"));S.appendChild(E);E=document.createElement("div");E.style.marginBottom="12px";var fa=PageSetupDialog.addPageFormatPanel(E,"printdialog",t.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);S.appendChild(E);E=document.createElement("span");mxUtils.write(E,
+mxResources.get("pageScale"));S.appendChild(E);var sa=document.createElement("input");sa.style.cssText="margin:0 8px 0 8px;";sa.setAttribute("value","100 %");sa.style.width="60px";S.appendChild(sa);Q.appendChild(S);E=document.createElement("div");E.style.cssText="text-align:right;margin:48px 0 0 0;";S=mxUtils.button(mxResources.get("cancel"),function(){t.hideDialog()});S.className="geBtn";t.editor.cancelFirst&&E.appendChild(S);t.isOffline()||(ma=mxUtils.button(mxResources.get("help"),function(){P.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
+ma.className="geBtn",E.appendChild(ma));PrintDialog.previewEnabled&&(ma=mxUtils.button(mxResources.get("preview"),function(){t.hideDialog();T(!1)}),ma.className="geBtn",E.appendChild(ma));ma=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){t.hideDialog();T(!0)});ma.className="geBtn gePrimaryBtn";E.appendChild(ma);t.editor.cancelFirst||E.appendChild(S);Q.appendChild(E);this.container=Q};var V=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var t=this.image;null!=t&&null!=t.src&&Graph.isPageLink(t.src)&&(t={originalSrc:t.src});this.page.viewState.backgroundImage=t}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=
this.shadowVisible)}}else V.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var U=document.createElement("canvas"),X=new Image;X.onload=function(){try{U.getContext("2d").drawImage(X,
-0,0);var t=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=t&&6<t.length}catch(F){}};X.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(t){}})();
+0,0);var t=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=t&&6<t.length}catch(E){}};X.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(t){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};b.afterDecode=function(e,f,c){c.previousColor=c.color;c.previousImage=c.image;c.previousFormat=c.format;null!=c.foldingEnabled&&(c.foldingEnabled=!c.foldingEnabled);null!=c.mathEnabled&&(c.mathEnabled=!c.mathEnabled);null!=c.shadowVisible&&(c.shadowVisible=!c.shadowVisible);return c};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.2.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,f,c){c.ui=e.ui;return f};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="19.0.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,g,k,l,p,q,x){q=null!=q?q:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
@@ -11762,14 +11762,14 @@ urlParams.pages&&null==this.fileNode&&null!=g&&(this.fileNode=g.ownerDocument.cr
x=q.getChildren(q.root);for(l=0;l<x.length;l++){var y=x[l];q.setVisible(y,g[y.id]||!1)}}catch(z){}};EditorUi.prototype.getBaseFilename=function(d){var g=this.getCurrentFile();g=null!=g&&null!=g.getTitle()?g.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(g)||/(\.html)$/i.test(g)||/(\.svg)$/i.test(g)||/(\.png)$/i.test(g))g=g.substring(0,g.lastIndexOf("."));/(\.drawio)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
0<this.currentPage.getName().length&&(g=g+"-"+this.currentPage.getName());return g};EditorUi.prototype.downloadFile=function(d,g,k,l,p,q,x,y,z,A,L,O){try{l=null!=l?l:this.editor.graph.isSelectionEmpty();var M=this.getBaseFilename("remoteSvg"==d?!1:!p),u=M+("xml"==d||"pdf"==d&&L?".drawio":"")+"."+d;if("xml"==d){var D=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,l,p,null,null,null,g);this.saveData(u,d,D,"text/xml")}else if("html"==d)D=this.getHtml2(this.getFileData(!0),this.editor.graph,
M),this.saveData(u,d,D,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)u=M+".png";else if("jpeg"==d)u=M+".jpg";else if("remoteSvg"==d){u=M+".svg";d="svg";var B=parseInt(z);"string"===typeof y&&0<y.indexOf("%")&&(y=parseInt(y)/100);if(0<B){var C=this.editor.graph,G=C.getGraphBounds();var N=Math.ceil(G.width*y/C.view.scale+2*B);var I=Math.ceil(G.height*y/C.view.scale+2*B)}}this.saveRequest(u,d,mxUtils.bind(this,function(J,V){try{var U=
-this.editor.graph.pageVisible;0==q&&(this.editor.graph.pageVisible=q);var X=this.createDownloadRequest(J,d,l,V,x,p,y,z,A,L,O,N,I);this.editor.graph.pageVisible=U;return X}catch(t){this.handleError(t)}}))}else{var E=null,H=mxUtils.bind(this,function(J){J.length<=MAX_REQUEST_SIZE?this.saveData(u,"svg",J,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(E)}))});if("svg"==d){var R=this.editor.graph.background;
-if(x||R==mxConstants.NONE)R=null;var W=this.editor.graph.getSvg(R,null,null,null,null,l);k&&this.editor.graph.addSvgShadow(W);this.editor.convertImages(W,mxUtils.bind(this,mxUtils.bind(this,function(J){this.spinner.stop();H(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(J))})))}else u=M+".svg",E=this.getFileData(!1,!0,null,mxUtils.bind(this,function(J){this.spinner.stop();H(J)}),l)}}catch(J){this.handleError(J)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,l,p,q,x,y,z,
+this.editor.graph.pageVisible;0==q&&(this.editor.graph.pageVisible=q);var X=this.createDownloadRequest(J,d,l,V,x,p,y,z,A,L,O,N,I);this.editor.graph.pageVisible=U;return X}catch(t){this.handleError(t)}}))}else{var F=null,H=mxUtils.bind(this,function(J){J.length<=MAX_REQUEST_SIZE?this.saveData(u,"svg",J,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});if("svg"==d){var R=this.editor.graph.background;
+if(x||R==mxConstants.NONE)R=null;var W=this.editor.graph.getSvg(R,null,null,null,null,l);k&&this.editor.graph.addSvgShadow(W);this.editor.convertImages(W,mxUtils.bind(this,mxUtils.bind(this,function(J){this.spinner.stop();H(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(J))})))}else u=M+".svg",F=this.getFileData(!1,!0,null,mxUtils.bind(this,function(J){this.spinner.stop();H(J)}),l)}}catch(J){this.handleError(J)}};EditorUi.prototype.createDownloadRequest=function(d,g,k,l,p,q,x,y,z,
A,L,O,M){var u=this.editor.graph,D=u.getGraphBounds();k=this.getFileData(!0,null,null,null,k,0==q?!1:"xmlpng"!=g,null,null,null,!1,"pdf"==g);var B="",C="";if(D.width*D.height>MAX_AREA||k.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};A=A?"1":"0";"pdf"==g&&(null!=L?C="&from="+L.from+"&to="+L.to:0==q&&(C="&allPages=1"));"xmlpng"==g&&(A="1",g="png");if(("xmlpng"==g||"svg"==g)&&null!=this.pages&&null!=this.currentPage)for(q=0;q<this.pages.length;q++)if(this.pages[q]==this.currentPage){B=
"&from="+q;break}q=u.background;"png"!=g&&"pdf"!=g&&"svg"!=g||!p?p||null!=q&&q!=mxConstants.NONE||(q="#ffffff"):q=mxConstants.NONE;p={globalVars:u.getExportVariables()};z&&(p.grid={size:u.gridSize,steps:u.view.gridSteps,color:u.view.gridColor});Graph.translateDiagram&&(p.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+g+B+C+"&bg="+(null!=q?q:mxConstants.NONE)+"&base64="+l+"&embedXml="+A+"&xml="+encodeURIComponent(k)+(null!=d?"&filename="+encodeURIComponent(d):"")+
"&extras="+encodeURIComponent(JSON.stringify(p))+(null!=x?"&scale="+x:"")+(null!=y?"&border="+y:"")+(O&&isFinite(O)?"&w="+O:"")+(M&&isFinite(M)?"&h="+M:""))};EditorUi.prototype.setMode=function(d,g){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,g,k){var l=window.location.hash,p=mxUtils.bind(this,function(q){var x=null!=d.data?d.data:"";null!=q&&0<q.length&&(0<x.length&&(x+="\n"),x+=q);q=new LocalFile(this,"csv"!=d.format&&0<x.length?x:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):
this.defaultFilename,!0);q.getHash=function(){return l};this.fileLoaded(q);"csv"==d.format&&this.importCsv(x,mxUtils.bind(this,function(O){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var y=null!=d.interval?parseInt(d.interval):6E4,z=null,A=mxUtils.bind(this,function(){var O=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(M){O===this.currentPage&&(200<=
M.getStatus()&&300>=M.getStatus()?(this.updateDiagram(M.getText()),L()):this.handleError({message:mxResources.get("error")+" "+M.getStatus()}))}),mxUtils.bind(this,function(M){this.handleError(M)}))}),L=mxUtils.bind(this,function(){window.clearTimeout(z);z=window.setTimeout(A,y)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){L();A()}));L();A()}null!=g&&g()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,mxUtils.bind(this,function(q){p(q)}),mxUtils.bind(this,function(q){null!=
-k&&k(q)})):p("")};EditorUi.prototype.updateDiagram=function(d){function g(I){var E=new mxCellOverlay(I.image||p.warningImage,I.tooltip,I.align,I.valign,I.offset);E.addListener(mxEvent.CLICK,function(H,R){l.alert(I.tooltip)});return E}var k=null,l=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var p=this.editor.graph,q=p.getModel();q.beginUpdate();var x=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var y=q.getCell(d.getAttribute("id"));
+k&&k(q)})):p("")};EditorUi.prototype.updateDiagram=function(d){function g(I){var F=new mxCellOverlay(I.image||p.warningImage,I.tooltip,I.align,I.valign,I.offset);F.addListener(mxEvent.CLICK,function(H,R){l.alert(I.tooltip)});return F}var k=null,l=this;if(null!=d&&0<d.length&&(k=mxUtils.parseXml(d),d=null!=k?k.documentElement:null,null!=d&&"updates"==d.nodeName)){var p=this.editor.graph,q=p.getModel();q.beginUpdate();var x=null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var y=q.getCell(d.getAttribute("id"));
if(null!=y){try{var z=d.getAttribute("value");if(null!=z){var A=mxUtils.parseXml(z).documentElement;if(null!=A)if("1"==A.getAttribute("replace-value"))q.setValue(y,A);else for(var L=A.attributes,O=0;O<L.length;O++)p.setAttributeForCell(y,L[O].nodeName,0<L[O].nodeValue.length?L[O].nodeValue:null)}}catch(I){null!=window.console&&console.log("Error in value for "+y.id+": "+I)}try{var M=d.getAttribute("style");null!=M&&p.model.setStyle(y,M)}catch(I){null!=window.console&&console.log("Error in style for "+
y.id+": "+I)}try{var u=d.getAttribute("icon");if(null!=u){var D=0<u.length?JSON.parse(u):null;null!=D&&D.append||p.removeCellOverlays(y);null!=D&&p.addCellOverlay(y,g(D))}}catch(I){null!=window.console&&console.log("Error in icon for "+y.id+": "+I)}try{var B=d.getAttribute("geometry");if(null!=B){B=JSON.parse(B);var C=p.getCellGeometry(y);if(null!=C){C=C.clone();for(key in B){var G=parseFloat(B[key]);"dx"==key?C.x+=G:"dy"==key?C.y+=G:"dw"==key?C.width+=G:"dh"==key?C.height+=G:C[key]=parseFloat(B[key])}p.model.setGeometry(y,
C)}}}catch(I){null!=window.console&&console.log("Error in icon for "+y.id+": "+I)}}}else if("model"==d.nodeName){for(var N=d.firstChild;null!=N&&N.nodeType!=mxConstants.NODETYPE_ELEMENT;)N=N.nextSibling;null!=N&&(new mxCodec(d.firstChild)).decode(N,q)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(p.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||d.hasAttribute("dy"))p.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==
@@ -11793,15 +11793,15 @@ A.style.position="absolute";A.style.right="0px";A.style.top="0px";A.style.paddin
var O=null;if(".scratchpad"!=d.title||this.closableScratchpad)A.appendChild(L),mxEvent.addListener(L,"click",mxUtils.bind(this,function(N){if(!mxEvent.isConsumed(N)){var I=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=O?this.confirm(mxResources.get("allChangesLost"),null,I,mxResources.get("cancel"),mxResources.get("discardChanges")):I();mxEvent.consume(N)}}));if(d.isEditable()){var M=this.editor.graph,u=null,D=mxUtils.bind(this,function(N){this.showLibraryDialog(d.getTitle(),y,g,d,d.getMode());
mxEvent.consume(N)}),B=mxUtils.bind(this,function(N){d.setModified(!0);d.isAutosave()?(null!=u&&null!=u.parentNode&&u.parentNode.removeChild(u),u=L.cloneNode(!1),u.setAttribute("src",Editor.spinImage),u.setAttribute("title",mxResources.get("saving")),u.style.cursor="default",u.style.marginRight="2px",u.style.marginTop="-2px",A.insertBefore(u,A.firstChild),z.style.paddingRight=18*A.childNodes.length+"px",this.saveLibrary(d.getTitle(),g,d,d.getMode(),!0,!0,function(){null!=u&&null!=u.parentNode&&(u.parentNode.removeChild(u),
z.style.paddingRight=18*A.childNodes.length+"px")})):null==O&&(O=L.cloneNode(!1),O.setAttribute("src",Editor.saveImage),O.setAttribute("title",mxResources.get("save")),A.insertBefore(O,A.firstChild),mxEvent.addListener(O,"click",mxUtils.bind(this,function(I){this.saveLibrary(d.getTitle(),g,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==O||d.isModified()||(z.style.paddingRight=18*A.childNodes.length+"px",O.parentNode.removeChild(O),O=null)});mxEvent.consume(I)})),z.style.paddingRight=
-18*A.childNodes.length+"px")}),C=mxUtils.bind(this,function(N,I,E,H){N=M.cloneCells(mxUtils.sortCells(M.model.getTopmostCells(N)));for(var R=0;R<N.length;R++){var W=M.getCellGeometry(N[R]);null!=W&&W.translate(-I.x,-I.y)}y.appendChild(this.sidebar.createVertexTemplateFromCells(N,I.width,I.height,H||"",!0,null,!1));N={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(N))),w:I.width,h:I.height};null!=H&&(N.title=H);g.push(N);B(E);null!=q&&null!=q.parentNode&&0<g.length&&(q.parentNode.removeChild(q),
-q=null)}),G=mxUtils.bind(this,function(N){if(M.isSelectionEmpty())M.getRubberband().isActive()?(M.getRubberband().execute(N),M.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var I=M.getSelectionCells(),E=M.view.getBounds(I),H=M.view.scale;E.x/=H;E.y/=H;E.width/=H;E.height/=H;E.x-=M.view.translate.x;E.y-=M.view.translate.y;C(I,E)}mxEvent.consume(N)});mxEvent.addGestureListeners(y,function(){},mxUtils.bind(this,function(N){M.isMouseDown&&
+18*A.childNodes.length+"px")}),C=mxUtils.bind(this,function(N,I,F,H){N=M.cloneCells(mxUtils.sortCells(M.model.getTopmostCells(N)));for(var R=0;R<N.length;R++){var W=M.getCellGeometry(N[R]);null!=W&&W.translate(-I.x,-I.y)}y.appendChild(this.sidebar.createVertexTemplateFromCells(N,I.width,I.height,H||"",!0,null,!1));N={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(N))),w:I.width,h:I.height};null!=H&&(N.title=H);g.push(N);B(F);null!=q&&null!=q.parentNode&&0<g.length&&(q.parentNode.removeChild(q),
+q=null)}),G=mxUtils.bind(this,function(N){if(M.isSelectionEmpty())M.getRubberband().isActive()?(M.getRubberband().execute(N),M.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var I=M.getSelectionCells(),F=M.view.getBounds(I),H=M.view.scale;F.x/=H;F.y/=H;F.width/=H;F.height/=H;F.x-=M.view.translate.x;F.y-=M.view.translate.y;C(I,F)}mxEvent.consume(N)});mxEvent.addGestureListeners(y,function(){},mxUtils.bind(this,function(N){M.isMouseDown&&
null!=M.panningManager&&null!=M.graphHandler.first&&(M.graphHandler.suspend(),null!=M.graphHandler.hint&&(M.graphHandler.hint.style.visibility="hidden"),y.style.backgroundColor="#f1f3f4",y.style.cursor="copy",M.panningManager.stop(),M.autoScroll=!1,mxEvent.consume(N))}),mxUtils.bind(this,function(N){M.isMouseDown&&null!=M.panningManager&&null!=M.graphHandler&&(y.style.backgroundColor="",y.style.cursor="default",this.sidebar.showTooltips=!0,M.panningManager.stop(),M.graphHandler.reset(),M.isMouseDown=
!1,M.autoScroll=!0,G(N),mxEvent.consume(N))}));mxEvent.addListener(y,"mouseleave",mxUtils.bind(this,function(N){M.isMouseDown&&null!=M.graphHandler.first&&(M.graphHandler.resume(),null!=M.graphHandler.hint&&(M.graphHandler.hint.style.visibility="visible"),y.style.backgroundColor="",y.style.cursor="",M.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(y,"dragover",mxUtils.bind(this,function(N){y.style.backgroundColor="#f1f3f4";N.dataTransfer.dropEffect="copy";y.style.cursor="copy";this.sidebar.hideTooltip();
-N.stopPropagation();N.preventDefault()})),mxEvent.addListener(y,"drop",mxUtils.bind(this,function(N){y.style.cursor="";y.style.backgroundColor="";0<N.dataTransfer.files.length&&this.importFiles(N.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(I,E,H,R,W,J,V,U,X){if(null!=I&&"image/"==E.substring(0,6))I="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(I),I=[new mxCell("",new mxGeometry(0,0,W,J),I)],I[0].vertex=!0,
-C(I,new mxRectangle(0,0,W,J),N,mxEvent.isAltDown(N)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),null!=q&&null!=q.parentNode&&0<g.length&&(q.parentNode.removeChild(q),q=null);else{var t=!1,F=mxUtils.bind(this,function(K,T){null!=K&&"application/pdf"==T&&(T=Editor.extractGraphModelFromPdf(K),null!=T&&0<T.length&&(K=T));if(null!=K)if(K=mxUtils.parseXml(K),"mxlibrary"==K.documentElement.nodeName)try{var P=JSON.parse(mxUtils.getTextContent(K.documentElement));x(P,y);g=g.concat(P);B(N);this.spinner.stop();
-t=!0}catch(ca){}else if("mxfile"==K.documentElement.nodeName)try{var Q=K.documentElement.getElementsByTagName("diagram");for(P=0;P<Q.length;P++){var S=this.stringToCells(Editor.getDiagramNodeXml(Q[P])),Y=this.editor.graph.getBoundingBoxFromGeometry(S);C(S,new mxRectangle(0,0,Y.width,Y.height),N)}t=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=q&&null!=q.parentNode&&0<g.length&&
-(q.parentNode.removeChild(q),q=null)});null!=X&&null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V)||/(\.vs(x|sx?))($|\?)/i.test(V))?this.importVisio(X,function(K){F(K,"text/xml")},null,V):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(I,V)&&null!=X?this.isExternalDataComms()?this.parseFile(X,mxUtils.bind(this,function(K){4==K.readyState&&(this.spinner.stop(),200<=K.status&&299>=K.status?F(K.responseText,"text/xml"):this.handleError({message:mxResources.get(413==K.status?"drawingTooLarge":"invalidOrMissingFile")},
-mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):F(I,E)}}));N.stopPropagation();N.preventDefault()})),mxEvent.addListener(y,"dragleave",function(N){y.style.cursor="";y.style.backgroundColor="";N.stopPropagation();N.preventDefault()}));L=L.cloneNode(!1);L.setAttribute("src",Editor.editImage);L.setAttribute("title",mxResources.get("edit"));A.insertBefore(L,A.firstChild);mxEvent.addListener(L,"click",D);mxEvent.addListener(y,
+N.stopPropagation();N.preventDefault()})),mxEvent.addListener(y,"drop",mxUtils.bind(this,function(N){y.style.cursor="";y.style.backgroundColor="";0<N.dataTransfer.files.length&&this.importFiles(N.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(I,F,H,R,W,J,V,U,X){if(null!=I&&"image/"==F.substring(0,6))I="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(I),I=[new mxCell("",new mxGeometry(0,0,W,J),I)],I[0].vertex=!0,
+C(I,new mxRectangle(0,0,W,J),N,mxEvent.isAltDown(N)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),null!=q&&null!=q.parentNode&&0<g.length&&(q.parentNode.removeChild(q),q=null);else{var t=!1,E=mxUtils.bind(this,function(K,T){null!=K&&"application/pdf"==T&&(T=Editor.extractGraphModelFromPdf(K),null!=T&&0<T.length&&(K=T));if(null!=K)if(K=mxUtils.parseXml(K),"mxlibrary"==K.documentElement.nodeName)try{var P=JSON.parse(mxUtils.getTextContent(K.documentElement));x(P,y);g=g.concat(P);B(N);this.spinner.stop();
+t=!0}catch(ba){}else if("mxfile"==K.documentElement.nodeName)try{var Q=K.documentElement.getElementsByTagName("diagram");for(P=0;P<Q.length;P++){var S=this.stringToCells(Editor.getDiagramNodeXml(Q[P])),Y=this.editor.graph.getBoundingBoxFromGeometry(S);C(S,new mxRectangle(0,0,Y.width,Y.height),N)}t=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}t||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=q&&null!=q.parentNode&&0<g.length&&
+(q.parentNode.removeChild(q),q=null)});null!=X&&null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V)||/(\.vs(x|sx?))($|\?)/i.test(V))?this.importVisio(X,function(K){E(K,"text/xml")},null,V):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(I,V)&&null!=X?this.isExternalDataComms()?this.parseFile(X,mxUtils.bind(this,function(K){4==K.readyState&&(this.spinner.stop(),200<=K.status&&299>=K.status?E(K.responseText,"text/xml"):this.handleError({message:mxResources.get(413==K.status?"drawingTooLarge":"invalidOrMissingFile")},
+mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):E(I,F)}}));N.stopPropagation();N.preventDefault()})),mxEvent.addListener(y,"dragleave",function(N){y.style.cursor="";y.style.backgroundColor="";N.stopPropagation();N.preventDefault()}));L=L.cloneNode(!1);L.setAttribute("src",Editor.editImage);L.setAttribute("title",mxResources.get("edit"));A.insertBefore(L,A.firstChild);mxEvent.addListener(L,"click",D);mxEvent.addListener(y,
"dblclick",function(N){mxEvent.getSource(N)==y&&D(N)});l=L.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));A.insertBefore(l,A.firstChild);mxEvent.addListener(l,"click",G);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(l=document.createElement("span"),l.setAttribute("title",mxResources.get("help")),l.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(l,"?"),mxEvent.addGestureListeners(l,
mxUtils.bind(this,function(N){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(N)})),A.insertBefore(l,A.firstChild))}z.appendChild(A);z.style.paddingRight=18*A.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,g){for(var k=0;k<d.length;k++){var l=d[k],p=l.data;if(null!=p){p=this.convertDataUri(p);var q="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==l.aspect&&(q+="aspect=fixed;");g.appendChild(this.sidebar.createVertexTemplate(q+
"image="+p,l.w,l.h,"",l.title||"",!1,null,!0))}else null!=l.xml&&(p=this.stringToCells(Graph.decompress(l.xml)),0<p.length&&g.appendChild(this.sidebar.createVertexTemplateFromCells(p,l.w,l.h,l.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",
@@ -11817,7 +11817,7 @@ d.columnNumber,d,"INFO")}catch(u){}if(null!=z||null!=g){x=mxUtils.htmlEntities(m
this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var O=null!=p?null:null!=q?q:window.location.hash;if(null!=O&&("#G"==O.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==O.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==z.code||404==z.status)){O="#U"==O.substring(0,
2)?O.substring(45,O.lastIndexOf("%26ex")):O.substring(2);this.showError(g,x,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+O);this.handleError(d,g,k,l,p)}),L,mxResources.get("changeUser"),mxUtils.bind(this,function(){function u(){G.innerHTML="";for(var N=0;N<D.length;N++){var I=document.createElement("option");mxUtils.write(I,D[N].displayName);I.value=N;G.appendChild(I);I=document.createElement("option");I.innerHTML="&nbsp;&nbsp;&nbsp;";
mxUtils.write(I,"<"+D[N].email+">");I.setAttribute("disabled","disabled");G.appendChild(I)}I=document.createElement("option");mxUtils.write(I,mxResources.get("addAccount"));I.value=D.length;G.appendChild(I)}var D=this.drive.getUsersList(),B=document.createElement("div"),C=document.createElement("span");C.style.marginTop="6px";mxUtils.write(C,mxResources.get("changeUser")+": ");B.appendChild(C);var G=document.createElement("select");G.style.width="200px";u();mxEvent.addListener(G,"change",mxUtils.bind(this,
-function(){var N=G.value,I=D.length!=N;I&&this.drive.setUser(D[N]);this.drive.authorize(I,mxUtils.bind(this,function(){I||(D=this.drive.getUsersList(),u())}),mxUtils.bind(this,function(E){this.handleError(E)}),!0)}));B.appendChild(G);B=new CustomDialog(this,B,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(B.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),480,150);return}}null!=z.message?
+function(){var N=G.value,I=D.length!=N;I&&this.drive.setUser(D[N]);this.drive.authorize(I,mxUtils.bind(this,function(){I||(D=this.drive.getUsersList(),u())}),mxUtils.bind(this,function(F){this.handleError(F)}),!0)}));B.appendChild(G);B=new CustomDialog(this,B,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(B.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=k&&k()}),480,150);return}}null!=z.message?
x=""==z.message&&null!=z.name?mxUtils.htmlEntities(z.name):mxUtils.htmlEntities(z.message):null!=z.response&&null!=z.response.error?x=mxUtils.htmlEntities(z.response.error):"undefined"!==typeof window.App&&(z.code==App.ERROR_TIMEOUT?x=mxUtils.htmlEntities(mxResources.get("timeout")):z.code==App.ERROR_BUSY?x=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof z&&0<z.length&&(x=mxUtils.htmlEntities(z)))}var M=q=null;null!=z&&null!=z.helpLink?(q=mxResources.get("help"),M=mxUtils.bind(this,
function(){return this.editor.graph.openLink(z.helpLink)})):null!=z&&null!=z.ownerEmail&&(q=mxResources.get("contactOwner"),x+=mxUtils.htmlEntities(" ("+q+": "+z.ownerEmail+")"),M=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(z.ownerEmail))}));this.showError(g,x,A,k,L,null,null,q,M,null,null,null,l?k:null)}else null!=k&&k()};EditorUi.prototype.alert=function(d,g,k){d=new ErrorDialog(this,null,d,mxResources.get("ok"),g);this.showDialog(d.container,k||340,100,!0,!1);
d.init()};EditorUi.prototype.confirm=function(d,g,k,l,p,q){var x=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},y=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){x();null!=g&&g()},function(){x();null!=k&&k()},l,p,null,null,null,null,y);this.showDialog(d.container,340,46+y,!0,q);d.init()};EditorUi.prototype.showBanner=function(d,g,k,l){var p=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=
@@ -11850,8 +11850,8 @@ this.saveLocalFile(k,d,l,p,g):this.saveRequest(d,g,mxUtils.bind(this,function(q,
null!=O&&(L==App.MODE_DEVICE||"download"==L||"_blank"==L?O.simulate(document,"_blank"):this.pickFolder(L,mxUtils.bind(this,function(M){q=null!=q?q:"pdf"==g?"application/pdf":"image/"+g;if(null!=l)try{this.exportFile(l,A,q,!0,L,M)}catch(u){this.handleError(u)}else this.spinner.spin(document.body,mxResources.get("saving"))&&O.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=O.getStatus()&&299>=O.getStatus())try{this.exportFile(O.getText(),A,q,!0,L,M)}catch(u){this.handleError(u)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
function(u){this.spinner.stop();this.handleError(u)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,x,null,1<y,z,l,q,p);y=this.isServices(y)?4<y?390:280:160;this.showDialog(d.container,420,y,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,g,k,l,p,q){};EditorUi.prototype.pickFolder=function(d,
g,k){g(null)};EditorUi.prototype.exportSvg=function(d,g,k,l,p,q,x,y,z,A,L,O,M,u){if(this.spinner.spin(document.body,mxResources.get("export")))try{var D=this.editor.graph.isSelectionEmpty();k=null!=k?k:D;var B=g?null:this.editor.graph.background;B==mxConstants.NONE&&(B=null);null==B&&0==g&&(B=L?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var C=this.editor.graph.getSvg(B,d,x,y,null,k,null,null,"blank"==A?"_blank":"self"==A?"_top":null,null,!M,L,O);l&&this.editor.graph.addSvgShadow(C);var G=
-this.getBaseFilename()+(p?".drawio":"")+".svg";u=null!=u?u:mxUtils.bind(this,function(E){this.isLocalFileSave()||E.length<=MAX_REQUEST_SIZE?this.saveData(G,"svg",E,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(E)}))});var N=mxUtils.bind(this,function(E){this.spinner.stop();p&&E.setAttribute("content",this.getFileData(!0,null,null,null,k,z,null,null,null,!1));u(Graph.xmlDeclaration+"\n"+(p?Graph.svgFileComment+
-"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(E))});this.editor.graph.mathEnabled&&this.editor.addMathCss(C);var I=mxUtils.bind(this,function(E){q?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(E,N,this.thumbImageCache)):N(E)});M?this.embedFonts(C,I):(this.editor.addFontCss(C),I(C))}catch(E){this.handleError(E)}};EditorUi.prototype.addRadiobox=function(d,g,k,l,p,q,x){return this.addCheckbox(d,k,l,p,q,x,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,l,p,q,x,
+this.getBaseFilename()+(p?".drawio":"")+".svg";u=null!=u?u:mxUtils.bind(this,function(F){this.isLocalFileSave()||F.length<=MAX_REQUEST_SIZE?this.saveData(G,"svg",F,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});var N=mxUtils.bind(this,function(F){this.spinner.stop();p&&F.setAttribute("content",this.getFileData(!0,null,null,null,k,z,null,null,null,!1));u(Graph.xmlDeclaration+"\n"+(p?Graph.svgFileComment+
+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(F))});this.editor.graph.mathEnabled&&this.editor.addMathCss(C);var I=mxUtils.bind(this,function(F){q?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(F,N,this.thumbImageCache)):N(F)});M?this.embedFonts(C,I):(this.editor.addFontCss(C),I(C))}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(d,g,k,l,p,q,x){return this.addCheckbox(d,k,l,p,q,x,!0,g)};EditorUi.prototype.addCheckbox=function(d,g,k,l,p,q,x,
y){q=null!=q?q:!0;var z=document.createElement("input");z.style.marginRight="8px";z.style.marginTop="16px";z.setAttribute("type",x?"radio":"checkbox");x="geCheckbox-"+Editor.guid();z.id=x;null!=y&&z.setAttribute("name",y);k&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);l&&z.setAttribute("disabled","disabled");q&&(d.appendChild(z),k=document.createElement("label"),mxUtils.write(k,g),k.setAttribute("for",x),d.appendChild(k),p||mxUtils.br(d));return z};EditorUi.prototype.addEditButton=function(d,
g){var k=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);k.style.marginLeft="24px";var l=this.getCurrentFile(),p="";null!=l&&l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER&&(p=window.location.href);var q=document.createElement("select");q.style.maxWidth="200px";q.style.width="auto";q.style.marginLeft="8px";q.style.marginRight="10px";q.className="geBtn";l=document.createElement("option");l.setAttribute("value","blank");mxUtils.write(l,mxResources.get("makeCopy"));q.appendChild(l);
l=document.createElement("option");l.setAttribute("value","custom");mxUtils.write(l,mxResources.get("custom")+"...");q.appendChild(l);d.appendChild(q);mxEvent.addListener(q,"change",mxUtils.bind(this,function(){if("custom"==q.value){var x=new FilenameDialog(this,p,mxResources.get("ok"),function(y){null!=y?p=y:q.value="blank"},mxResources.get("url"),null,null,null,null,function(){q.value="blank"});this.showDialog(x.container,300,80,!0,!1);x.init()}}));mxEvent.addListener(k,"change",mxUtils.bind(this,
@@ -11874,8 +11874,8 @@ L||L.constructor!=window.DriveFile||g)x=null!=x?x:"https://www.diagrams.net/doc/
mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(L.getId())}));O.style.marginTop="12px";O.className="geBtn";A.appendChild(O);z.appendChild(A);O=document.createElement("a");O.style.paddingLeft="12px";O.style.color="gray";O.style.fontSize="11px";O.style.cursor="pointer";mxUtils.write(O,mxResources.get("check"));A.appendChild(O);mxEvent.addListener(O,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),
mxUtils.bind(this,function(H){this.spinner.stop();H=new ErrorDialog(this,null,mxResources.get(null!=H?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(H.container,300,80,!0,!1);H.init()}))}))}var M=null,u=null;if(null!=k||null!=l)d+=30,mxUtils.write(z,mxResources.get("width")+":"),M=document.createElement("input"),M.setAttribute("type","text"),M.style.marginRight="16px",M.style.width="50px",M.style.marginLeft="6px",M.style.marginRight="16px",M.style.marginBottom="10px",
M.value="100%",z.appendChild(M),mxUtils.write(z,mxResources.get("height")+":"),u=document.createElement("input"),u.setAttribute("type","text"),u.style.width="50px",u.style.marginLeft="6px",u.style.marginBottom="10px",u.value=l+"px",z.appendChild(u),mxUtils.br(z);var D=this.addLinkSection(z,q);k=null!=this.pages&&1<this.pages.length;var B=null;if(null==L||L.constructor!=window.DriveFile||g)B=this.addCheckbox(z,mxResources.get("allPages"),k,!k);var C=this.addCheckbox(z,mxResources.get("lightbox"),!0,
-null,null,!q),G=this.addEditButton(z,C),N=G.getEditInput();q&&(N.style.marginLeft=C.style.marginLeft,C.style.display="none",d-=20);var I=this.addCheckbox(z,mxResources.get("layers"),!0);I.style.marginLeft=N.style.marginLeft;I.style.marginTop="8px";var E=this.addCheckbox(z,mxResources.get("tags"),!0);E.style.marginLeft=N.style.marginLeft;E.style.marginBottom="16px";E.style.marginTop="16px";mxEvent.addListener(C,"change",function(){C.checked?(I.removeAttribute("disabled"),N.removeAttribute("disabled")):
-(I.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));N.checked&&C.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,z,mxUtils.bind(this,function(){p(D.getTarget(),D.getColor(),null==B?!0:B.checked,C.checked,G.getLink(),I.checked,null!=M?M.value:null,null!=u?u.value:null,E.checked)}),null,mxResources.get("create"),x,y);this.showDialog(g.container,340,300+d,!0,!0);null!=M?(M.focus(),mxClient.IS_GC||
+null,null,!q),G=this.addEditButton(z,C),N=G.getEditInput();q&&(N.style.marginLeft=C.style.marginLeft,C.style.display="none",d-=20);var I=this.addCheckbox(z,mxResources.get("layers"),!0);I.style.marginLeft=N.style.marginLeft;I.style.marginTop="8px";var F=this.addCheckbox(z,mxResources.get("tags"),!0);F.style.marginLeft=N.style.marginLeft;F.style.marginBottom="16px";F.style.marginTop="16px";mxEvent.addListener(C,"change",function(){C.checked?(I.removeAttribute("disabled"),N.removeAttribute("disabled")):
+(I.setAttribute("disabled","disabled"),N.setAttribute("disabled","disabled"));N.checked&&C.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,z,mxUtils.bind(this,function(){p(D.getTarget(),D.getColor(),null==B?!0:B.checked,C.checked,G.getLink(),I.checked,null!=M?M.value:null,null!=u?u.value:null,F.checked)}),null,mxResources.get("create"),x,y);this.showDialog(g.container,340,300+d,!0,!0);null!=M?(M.focus(),mxClient.IS_GC||
mxClient.IS_FF||5<=document.documentMode?M.select():document.execCommand("selectAll",!1,null)):D.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,g,k,l,p){var q=document.createElement("div");q.style.whiteSpace="nowrap";var x=document.createElement("h3");mxUtils.write(x,mxResources.get("image"));x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(p?"10":"4")+"px";q.appendChild(x);if(p){mxUtils.write(q,mxResources.get("zoom")+":");var y=document.createElement("input");
y.setAttribute("type","text");y.style.marginRight="16px";y.style.width="60px";y.style.marginLeft="4px";y.style.marginRight="12px";y.value=this.lastExportZoom||"100%";q.appendChild(y);mxUtils.write(q,mxResources.get("borderWidth")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.value=this.lastExportBorder||"0";q.appendChild(z);mxUtils.br(q)}var A=this.addCheckbox(q,mxResources.get("selectionOnly"),!1,
this.editor.graph.isSelectionEmpty()),L=l?null:this.addCheckbox(q,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);x=this.editor.graph;var O=l?null:this.addCheckbox(q,mxResources.get("transparentBackground"),x.background==mxConstants.NONE||null==x.background);null!=O&&(O.style.marginBottom="16px");d=new CustomDialog(this,q,mxUtils.bind(this,function(){var M=parseInt(y.value)/100||1,u=parseInt(z.value)||0;k(!A.checked,null!=L?L.checked:!1,null!=O?O.checked:!1,M,u)}),null,d,g);
@@ -11883,13 +11883,13 @@ this.showDialog(d.container,300,(p?25:0)+(l?125:210),!0,!0)};EditorUi.prototype.
u.setAttribute("type","text");u.style.marginRight="16px";u.style.width="60px";u.style.marginLeft="4px";u.style.marginRight="12px";u.value=this.lastExportZoom||"100%";A.appendChild(u);mxUtils.write(A,mxResources.get("borderWidth")+":");var D=document.createElement("input");D.setAttribute("type","text");D.style.marginRight="16px";D.style.width="60px";D.style.marginLeft="4px";D.value=this.lastExportBorder||"0";A.appendChild(D);mxUtils.br(A);var B=this.addCheckbox(A,mxResources.get("selectionOnly"),!1,
L.isSelectionEmpty()),C=document.createElement("input");C.style.marginTop="16px";C.style.marginRight="8px";C.style.marginLeft="24px";C.setAttribute("disabled","disabled");C.setAttribute("type","checkbox");var G=document.createElement("select");G.style.marginTop="16px";G.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var N={};for(M=0;M<d.length;M++)if(!L.isSelectionEmpty()||"selectionOnly"!=d[M]){var I=document.createElement("option");mxUtils.write(I,mxResources.get(d[M]));I.setAttribute("value",
d[M]);G.appendChild(I);N[d[M]]=I}z?(mxUtils.write(A,mxResources.get("size")+":"),A.appendChild(G),mxUtils.br(A),O+=26,mxEvent.addListener(G,"change",function(){"selectionOnly"==G.value&&(B.checked=!0)})):q&&(A.appendChild(C),mxUtils.write(A,mxResources.get("crop")),mxUtils.br(A),O+=30,mxEvent.addListener(B,"change",function(){B.checked?C.removeAttribute("disabled"):C.setAttribute("disabled","disabled")}));L.isSelectionEmpty()?z&&(B.style.display="none",B.nextSibling.style.display="none",B.nextSibling.nextSibling.style.display=
-"none",O-=30):(G.value="diagram",C.setAttribute("checked","checked"),C.defaultChecked=!0,mxEvent.addListener(B,"change",function(){G.value=B.checked?"selectionOnly":"diagram"}));var E=this.addCheckbox(A,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=y),H=null;Editor.isDarkMode()&&(H=this.addCheckbox(A,mxResources.get("dark"),!0),O+=26);var R=this.addCheckbox(A,mxResources.get("shadow"),L.shadowVisible),W=null;if("png"==y||"jpeg"==y)W=this.addCheckbox(A,mxResources.get("grid"),!1,this.isOffline()||
+"none",O-=30):(G.value="diagram",C.setAttribute("checked","checked"),C.defaultChecked=!0,mxEvent.addListener(B,"change",function(){G.value=B.checked?"selectionOnly":"diagram"}));var F=this.addCheckbox(A,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=y),H=null;Editor.isDarkMode()&&(H=this.addCheckbox(A,mxResources.get("dark"),!0),O+=26);var R=this.addCheckbox(A,mxResources.get("shadow"),L.shadowVisible),W=null;if("png"==y||"jpeg"==y)W=this.addCheckbox(A,mxResources.get("grid"),!1,this.isOffline()||
!this.canvasSupported,!1,!0),O+=30;var J=this.addCheckbox(A,mxResources.get("includeCopyOfMyDiagram"),x,null,null,"jpeg"!=y);J.style.marginBottom="16px";var V=document.createElement("input");V.style.marginBottom="16px";V.style.marginRight="8px";V.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||V.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.style.marginBottom="16px";
U.className="geBtn";q=document.createElement("option");q.setAttribute("value","none");mxUtils.write(q,mxResources.get("noChange"));U.appendChild(q);q=document.createElement("option");q.setAttribute("value","embedFonts");mxUtils.write(q,mxResources.get("embedFonts"));U.appendChild(q);q=document.createElement("option");q.setAttribute("value","lblToSvg");mxUtils.write(q,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||U.appendChild(q);mxEvent.addListener(U,"change",mxUtils.bind(this,
function(){"lblToSvg"==U.value?(V.checked=!0,V.setAttribute("disabled","disabled"),N.page.style.display="none","page"==G.value&&(G.value="diagram"),R.checked=!1,R.setAttribute("disabled","disabled"),t.style.display="inline-block",X.style.display="none"):"disabled"==V.getAttribute("disabled")&&(V.checked=!1,V.removeAttribute("disabled"),R.removeAttribute("disabled"),N.page.style.display="",t.style.display="none",X.style.display="")}));g&&(A.appendChild(V),mxUtils.write(A,mxResources.get("embedImages")),
mxUtils.br(A),mxUtils.write(A,mxResources.get("txtSettings")+":"),A.appendChild(U),mxUtils.br(A),O+=60);var X=document.createElement("select");X.style.maxWidth="260px";X.style.marginLeft="8px";X.style.marginRight="10px";X.className="geBtn";g=document.createElement("option");g.setAttribute("value","auto");mxUtils.write(g,mxResources.get("automatic"));X.appendChild(g);g=document.createElement("option");g.setAttribute("value","blank");mxUtils.write(g,mxResources.get("openInNewWindow"));X.appendChild(g);
g=document.createElement("option");g.setAttribute("value","self");mxUtils.write(g,mxResources.get("openInThisWindow"));X.appendChild(g);var t=document.createElement("div");mxUtils.write(t,mxResources.get("LinksLost"));t.style.margin="7px";t.style.display="none";"svg"==y&&(mxUtils.write(A,mxResources.get("links")+":"),A.appendChild(X),A.appendChild(t),mxUtils.br(A),mxUtils.br(A),O+=50);k=new CustomDialog(this,A,mxUtils.bind(this,function(){this.lastExportBorder=D.value;this.lastExportZoom=u.value;
-p(u.value,E.checked,!B.checked,R.checked,J.checked,V.checked,D.value,C.checked,!1,X.value,null!=W?W.checked:null,null!=H?H.checked:null,G.value,"embedFonts"==U.value,"lblToSvg"==U.value)}),null,k,l);this.showDialog(k.container,340,O,!0,!0,null,null,null,null,!0);u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,k,l,p){var q=document.createElement("div");q.style.whiteSpace="nowrap";
+p(u.value,F.checked,!B.checked,R.checked,J.checked,V.checked,D.value,C.checked,!1,X.value,null!=W?W.checked:null,null!=H?H.checked:null,G.value,"embedFonts"==U.value,"lblToSvg"==U.value)}),null,k,l);this.showDialog(k.container,340,O,!0,!0,null,null,null,null,!0);u.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?u.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,g,k,l,p){var q=document.createElement("div");q.style.whiteSpace="nowrap";
var x=this.editor.graph;if(null!=g){var y=document.createElement("h3");mxUtils.write(y,g);y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";q.appendChild(y)}var z=this.addCheckbox(q,mxResources.get("fit"),!0),A=this.addCheckbox(q,mxResources.get("shadow"),x.shadowVisible&&l,!l),L=this.addCheckbox(q,k),O=this.addCheckbox(q,mxResources.get("lightbox"),!0),M=this.addEditButton(q,O),u=M.getEditInput(),D=1<x.model.getChildCount(x.model.getRoot()),B=this.addCheckbox(q,mxResources.get("layers"),
D,!D);B.style.marginLeft=u.style.marginLeft;B.style.marginBottom="12px";B.style.marginTop="8px";mxEvent.addListener(O,"change",function(){O.checked?(D&&B.removeAttribute("disabled"),u.removeAttribute("disabled")):(B.setAttribute("disabled","disabled"),u.setAttribute("disabled","disabled"));u.checked&&O.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")});g=new CustomDialog(this,q,mxUtils.bind(this,function(){d(z.checked,A.checked,L.checked,
O.checked,M.getLink(),B.checked)}),null,mxResources.get("embed"),p);this.showDialog(g.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,g,k,l,p,q,x,y){function z(u){var D=" ",B="";l&&(D=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
@@ -11944,14 +11944,14 @@ A?A:!0;var M=!1,u=null,D=mxUtils.bind(this,function(B){var C=null;null!=B&&"<mxl
z)+d.substring(d.indexOf(",",z+1))),A&&g.isGridEnabled()&&(k=g.snap(k),l=g.snap(l)),u=[g.insertVertex(null,null,"",k,l,p,q,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(M=!0,this.importGraphML(d,D)):null!=z&&null!=x&&(/(\.v(dx|sdx?))($|\?)/i.test(x)||/(\.vs(x|sx?))($|\?)/i.test(x))?(M=!0,this.importVisio(z,D)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,x)?this.isOffline()?
this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(M=!0,p=mxUtils.bind(this,function(B){4==B.readyState&&(200<=B.status&&299>=B.status?D(B.responseText):null!=y&&y(null))}),null!=d?this.parseFileData(d,p,x):this.parseFile(z,p,x)):0==d.indexOf("PK")&&null!=z?(M=!0,this.importZipFile(z,D,mxUtils.bind(this,function(){u=this.insertTextAt(this.validateFileData(d),k,l,!0,null,A);y(u)}))):/(\.v(sd|dx))($|\?)/i.test(x)||/(\.vs(s|x))($|\?)/i.test(x)||(u=this.insertTextAt(this.validateFileData(d),
k,l,!0,null,A,null,null!=O?mxEvent.isControlDown(O):null));M||null==y||y(u);return u};EditorUi.prototype.importFiles=function(d,g,k,l,p,q,x,y,z,A,L,O,M){l=null!=l?l:this.maxImageSize;A=null!=A?A:this.maxImageBytes;var u=null!=g&&null!=k,D=!0;g=null!=g?g:0;k=null!=k?k:0;var B=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var C=L||this.resampleThreshold,G=0;G<d.length;G++)if("image/svg"!==d[G].type.substring(0,9)&&"image/"===d[G].type.substring(0,6)&&d[G].size>C){B=!0;break}var N=mxUtils.bind(this,function(){var I=
-this.editor.graph,E=I.gridSize;p=null!=p?p:mxUtils.bind(this,function(U,X,t,F,K,T,P,Q,S){try{return null!=U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,P)),null):this.importFile(U,X,t,F,K,T,P,Q,S,u,O,M)}catch(Y){return this.handleError(Y),null}});q=null!=q?q:mxUtils.bind(this,function(U){I.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var H=d.length,R=H,W=[],J=mxUtils.bind(this,function(U,X){W[U]=X;if(0==
---R){this.spinner.stop();if(null!=y)y(W);else{var t=[];I.getModel().beginUpdate();try{for(U=0;U<W.length;U++){var F=W[U]();null!=F&&(t=t.concat(F))}}finally{I.getModel().endUpdate()}}q(t)}}),V=0;V<H;V++)mxUtils.bind(this,function(U){var X=d[U];if(null!=X){var t=new FileReader;t.onload=mxUtils.bind(this,function(F){if(null==x||x(X))if("image/"==X.type.substring(0,6))if("image/svg"==X.type.substring(0,9)){var K=Graph.clipSvgDataUri(F.target.result),T=K.indexOf(",");T=decodeURIComponent(escape(atob(K.substring(T+
-1))));var P=mxUtils.parseXml(T);T=P.getElementsByTagName("svg");if(0<T.length){T=T[0];var Q=O?null:T.getAttribute("content");null!=Q&&"<"!=Q.charAt(0)&&"%"!=Q.charAt(0)&&(Q=unescape(window.atob?atob(Q):Base64.decode(Q,!0)));null!=Q&&"%"==Q.charAt(0)&&(Q=decodeURIComponent(Q));null==Q||"<mxfile "!==Q.substring(0,8)&&"<mxGraphModel "!==Q.substring(0,14)?J(U,mxUtils.bind(this,function(){try{if(null!=P){var ca=P.getElementsByTagName("svg");if(0<ca.length){var da=ca[0],Z=da.getAttribute("width"),ha=da.getAttribute("height");
-Z=null!=Z&&"%"!=Z.charAt(Z.length-1)?parseFloat(Z):NaN;ha=null!=ha&&"%"!=ha.charAt(ha.length-1)?parseFloat(ha):NaN;var aa=da.getAttribute("viewBox");if(null==aa||0==aa.length)da.setAttribute("viewBox","0 0 "+Z+" "+ha);else if(isNaN(Z)||isNaN(ha)){var ua=aa.split(" ");3<ua.length&&(Z=parseFloat(ua[2]),ha=parseFloat(ua[3]))}K=Editor.createSvgDataUri(mxUtils.getXml(da));var ka=Math.min(1,Math.min(l/Math.max(1,Z)),l/Math.max(1,ha)),Ca=p(K,X.type,g+U*E,k+U*E,Math.max(1,Math.round(Z*ka)),Math.max(1,Math.round(ha*
-ka)),X.name);if(isNaN(Z)||isNaN(ha)){var Da=new Image;Da.onload=mxUtils.bind(this,function(){Z=Math.max(1,Da.width);ha=Math.max(1,Da.height);Ca[0].geometry.width=Z;Ca[0].geometry.height=ha;da.setAttribute("viewBox","0 0 "+Z+" "+ha);K=Editor.createSvgDataUri(mxUtils.getXml(da));var oa=K.indexOf(";");0<oa&&(K=K.substring(0,oa)+K.substring(K.indexOf(",",oa+1)));I.setCellStyles("image",K,[Ca[0]])});Da.src=Editor.createSvgDataUri(mxUtils.getXml(da))}return Ca}}}catch(oa){}return null})):J(U,mxUtils.bind(this,
-function(){return p(Q,"text/xml",g+U*E,k+U*E,0,0,X.name)}))}else J(U,mxUtils.bind(this,function(){return null}))}else{T=!1;if("image/png"==X.type){var S=O?null:this.extractGraphModelFromPng(F.target.result);if(null!=S&&0<S.length){var Y=new Image;Y.src=F.target.result;J(U,mxUtils.bind(this,function(){return p(S,"text/xml",g+U*E,k+U*E,Y.width,Y.height,X.name)}));T=!0}}T||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
-mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(F.target.result,mxUtils.bind(this,function(ca){this.resizeImage(ca,F.target.result,mxUtils.bind(this,function(da,Z,ha){J(U,mxUtils.bind(this,function(){if(null!=da&&da.length<A){var aa=D&&this.isResampleImageSize(X.size,L)?Math.min(1,Math.min(l/Z,l/ha)):1;return p(da,X.type,g+U*E,k+U*E,Math.round(Z*aa),Math.round(ha*aa),X.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),D,l,L,X.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else K=F.target.result,p(K,X.type,g+U*E,k+U*E,240,160,X.name,function(ca){J(U,function(){return ca})},X)});/(\.v(dx|sdx?))($|\?)/i.test(X.name)||/(\.vs(x|sx?))($|\?)/i.test(X.name)?p(null,X.type,g+U*E,k+U*E,240,160,X.name,function(F){J(U,function(){return F})},X):"image"==X.type.substring(0,5)||"application/pdf"==X.type?t.readAsDataURL(X):t.readAsText(X)}})(V)});if(B){B=
+this.editor.graph,F=I.gridSize;p=null!=p?p:mxUtils.bind(this,function(U,X,t,E,K,T,P,Q,S){try{return null!=U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,P)),null):this.importFile(U,X,t,E,K,T,P,Q,S,u,O,M)}catch(Y){return this.handleError(Y),null}});q=null!=q?q:mxUtils.bind(this,function(U){I.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var H=d.length,R=H,W=[],J=mxUtils.bind(this,function(U,X){W[U]=X;if(0==
+--R){this.spinner.stop();if(null!=y)y(W);else{var t=[];I.getModel().beginUpdate();try{for(U=0;U<W.length;U++){var E=W[U]();null!=E&&(t=t.concat(E))}}finally{I.getModel().endUpdate()}}q(t)}}),V=0;V<H;V++)mxUtils.bind(this,function(U){var X=d[U];if(null!=X){var t=new FileReader;t.onload=mxUtils.bind(this,function(E){if(null==x||x(X))if("image/"==X.type.substring(0,6))if("image/svg"==X.type.substring(0,9)){var K=Graph.clipSvgDataUri(E.target.result),T=K.indexOf(",");T=decodeURIComponent(escape(atob(K.substring(T+
+1))));var P=mxUtils.parseXml(T);T=P.getElementsByTagName("svg");if(0<T.length){T=T[0];var Q=O?null:T.getAttribute("content");null!=Q&&"<"!=Q.charAt(0)&&"%"!=Q.charAt(0)&&(Q=unescape(window.atob?atob(Q):Base64.decode(Q,!0)));null!=Q&&"%"==Q.charAt(0)&&(Q=decodeURIComponent(Q));null==Q||"<mxfile "!==Q.substring(0,8)&&"<mxGraphModel "!==Q.substring(0,14)?J(U,mxUtils.bind(this,function(){try{if(null!=P){var ba=P.getElementsByTagName("svg");if(0<ba.length){var da=ba[0],Z=da.getAttribute("width"),ja=da.getAttribute("height");
+Z=null!=Z&&"%"!=Z.charAt(Z.length-1)?parseFloat(Z):NaN;ja=null!=ja&&"%"!=ja.charAt(ja.length-1)?parseFloat(ja):NaN;var ea=da.getAttribute("viewBox");if(null==ea||0==ea.length)da.setAttribute("viewBox","0 0 "+Z+" "+ja);else if(isNaN(Z)||isNaN(ja)){var ha=ea.split(" ");3<ha.length&&(Z=parseFloat(ha[2]),ja=parseFloat(ha[3]))}K=Editor.createSvgDataUri(mxUtils.getXml(da));var ma=Math.min(1,Math.min(l/Math.max(1,Z)),l/Math.max(1,ja)),Aa=p(K,X.type,g+U*F,k+U*F,Math.max(1,Math.round(Z*ma)),Math.max(1,Math.round(ja*
+ma)),X.name);if(isNaN(Z)||isNaN(ja)){var Da=new Image;Da.onload=mxUtils.bind(this,function(){Z=Math.max(1,Da.width);ja=Math.max(1,Da.height);Aa[0].geometry.width=Z;Aa[0].geometry.height=ja;da.setAttribute("viewBox","0 0 "+Z+" "+ja);K=Editor.createSvgDataUri(mxUtils.getXml(da));var Ca=K.indexOf(";");0<Ca&&(K=K.substring(0,Ca)+K.substring(K.indexOf(",",Ca+1)));I.setCellStyles("image",K,[Aa[0]])});Da.src=Editor.createSvgDataUri(mxUtils.getXml(da))}return Aa}}}catch(Ca){}return null})):J(U,mxUtils.bind(this,
+function(){return p(Q,"text/xml",g+U*F,k+U*F,0,0,X.name)}))}else J(U,mxUtils.bind(this,function(){return null}))}else{T=!1;if("image/png"==X.type){var S=O?null:this.extractGraphModelFromPng(E.target.result);if(null!=S&&0<S.length){var Y=new Image;Y.src=E.target.result;J(U,mxUtils.bind(this,function(){return p(S,"text/xml",g+U*F,k+U*F,Y.width,Y.height,X.name)}));T=!0}}T||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(E.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,E.target.result,mxUtils.bind(this,function(da,Z,ja){J(U,mxUtils.bind(this,function(){if(null!=da&&da.length<A){var ea=D&&this.isResampleImageSize(X.size,L)?Math.min(1,Math.min(l/Z,l/ja)):1;return p(da,X.type,g+U*F,k+U*F,Math.round(Z*ea),Math.round(ja*ea),X.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),D,l,L,X.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else K=E.target.result,p(K,X.type,g+U*F,k+U*F,240,160,X.name,function(ba){J(U,function(){return ba})},X)});/(\.v(dx|sdx?))($|\?)/i.test(X.name)||/(\.vs(x|sx?))($|\?)/i.test(X.name)?p(null,X.type,g+U*F,k+U*F,240,160,X.name,function(E){J(U,function(){return E})},X):"image"==X.type.substring(0,5)||"application/pdf"==X.type?t.readAsDataURL(X):t.readAsText(X)}})(V)});if(B){B=
[];for(G=0;G<d.length;G++)B.push(d[G]);d=B;this.confirmImageResize(function(I){D=I;N()},z)}else N()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,g){g=null!=g?g:!1;var k=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
null,p=function(q,x){if(q||g)mxSettings.setResizeImages(q?x:null),mxSettings.save();k();d(x)};null==l||g?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(q){p(q,!0)},function(q){p(q,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,
!0,!0):p(!1,l)};EditorUi.prototype.parseFile=function(d,g,k){k=null!=k?k:d.name;var l=new FileReader;l.onload=mxUtils.bind(this,function(){this.parseFileData(l.result,g,k)});l.readAsText(d)};EditorUi.prototype.parseFileData=function(d,g,k){var l=new XMLHttpRequest;l.open("POST",OPEN_URL);l.setRequestHeader("Content-Type","application/x-www-form-urlencoded");l.onreadystatechange=function(){g(l)};l.send("format=xml&filename="+encodeURIComponent(k)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",
@@ -11959,31 +11959,31 @@ action:"size_"+file.size})}catch(p){}};EditorUi.prototype.isResampleImageSize=fu
M.toDataURL();if(u.length<g.length){var D=document.createElement("canvas");D.width=L;D.height=O;var B=D.toDataURL();u!==B&&(g=u,y=L,z=O)}}}catch(C){}k(g,y,z)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,g,k){try{var l=new Image;l.onload=function(){l.width=0<l.width?l.width:120;l.height=0<l.height?l.height:120;g(l)};null!=k&&(l.onerror=k);l.src=d}catch(p){if(null!=k)k(p);else throw p;}};EditorUi.prototype.getDefaultSketchMode=
function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var m=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=
mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,g=this.editor.graph;Editor.isDarkMode()&&(g.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(g.panningHandler.isPanningTrigger=function(C){var G=C.getEvent();return null==C.getState()&&!mxEvent.isMouseEvent(G)&&!g.freehand.isDrawing()||mxEvent.isPopupTrigger(G)&&(null==C.getState()||mxEvent.isControlDown(G)||mxEvent.isShiftDown(G))});g.cellEditor.editPlantUmlData=function(C,
-G,N){var I=JSON.parse(N);G=new TextareaDialog(d,mxResources.get("plantUml")+":",I.data,function(E){null!=E&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(E,I.format,function(H,R,W){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==I.format)g.labelChanged(C,"<pre>"+H+"</pre>"),g.updateCellSize(C,!0);else{g.setCellStyles("image",d.convertDataUri(H),[C]);var J=g.model.getGeometry(C);null!=J&&(J=J.clone(),J.width=R,J.height=W,g.cellsResized([C],[J],!1))}g.setAttributeForCell(C,
-"plantUmlData",JSON.stringify({data:E,format:I.format}))}finally{g.getModel().endUpdate()}},function(H){d.handleError(H)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};g.cellEditor.editMermaidData=function(C,G,N){var I=JSON.parse(N);G=new TextareaDialog(d,mxResources.get("mermaid")+":",I.data,function(E){null!=E&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(E,I.config,function(H,R,W){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",
-H,[C]);var J=g.model.getGeometry(C);null!=J&&(J=J.clone(),J.width=Math.max(J.width,R),J.height=Math.max(J.height,W),g.cellsResized([C],[J],!1));g.setAttributeForCell(C,"mermaidData",JSON.stringify({data:E,config:I.config},null,2))}finally{g.getModel().endUpdate()}},function(H){d.handleError(H)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};var k=g.cellEditor.startEditing;g.cellEditor.startEditing=function(C,G){try{var N=this.graph.getAttributeForCell(C,"plantUmlData");if(null!=
-N)this.editPlantUmlData(C,G,N);else if(N=this.graph.getAttributeForCell(C,"mermaidData"),null!=N)this.editMermaidData(C,G,N);else{var I=g.getCellStyle(C);"1"==mxUtils.getValue(I,"metaEdit","0")?d.showDataDialog(C):k.apply(this,arguments)}}catch(E){d.handleError(E)}};g.getLinkTitle=function(C){return d.getLinkTitle(C)};g.customLinkClicked=function(C){var G=!1;try{d.handleCustomLink(C),G=!0}catch(N){d.handleError(N)}return G};var l=g.parseBackgroundImage;g.parseBackgroundImage=function(C){var G=l.apply(this,
+G,N){var I=JSON.parse(N);G=new TextareaDialog(d,mxResources.get("plantUml")+":",I.data,function(F){null!=F&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(F,I.format,function(H,R,W){d.spinner.stop();g.getModel().beginUpdate();try{if("txt"==I.format)g.labelChanged(C,"<pre>"+H+"</pre>"),g.updateCellSize(C,!0);else{g.setCellStyles("image",d.convertDataUri(H),[C]);var J=g.model.getGeometry(C);null!=J&&(J=J.clone(),J.width=R,J.height=W,g.cellsResized([C],[J],!1))}g.setAttributeForCell(C,
+"plantUmlData",JSON.stringify({data:F,format:I.format}))}finally{g.getModel().endUpdate()}},function(H){d.handleError(H)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};g.cellEditor.editMermaidData=function(C,G,N){var I=JSON.parse(N);G=new TextareaDialog(d,mxResources.get("mermaid")+":",I.data,function(F){null!=F&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(F,I.config,function(H,R,W){d.spinner.stop();g.getModel().beginUpdate();try{g.setCellStyles("image",
+H,[C]);var J=g.model.getGeometry(C);null!=J&&(J=J.clone(),J.width=Math.max(J.width,R),J.height=Math.max(J.height,W),g.cellsResized([C],[J],!1));g.setAttributeForCell(C,"mermaidData",JSON.stringify({data:F,config:I.config},null,2))}finally{g.getModel().endUpdate()}},function(H){d.handleError(H)})},null,null,400,220);d.showDialog(G.container,420,300,!0,!0);G.init()};var k=g.cellEditor.startEditing;g.cellEditor.startEditing=function(C,G){try{var N=this.graph.getAttributeForCell(C,"plantUmlData");if(null!=
+N)this.editPlantUmlData(C,G,N);else if(N=this.graph.getAttributeForCell(C,"mermaidData"),null!=N)this.editMermaidData(C,G,N);else{var I=g.getCellStyle(C);"1"==mxUtils.getValue(I,"metaEdit","0")?d.showDataDialog(C):k.apply(this,arguments)}}catch(F){d.handleError(F)}};g.getLinkTitle=function(C){return d.getLinkTitle(C)};g.customLinkClicked=function(C){var G=!1;try{d.handleCustomLink(C),G=!0}catch(N){d.handleError(N)}return G};var l=g.parseBackgroundImage;g.parseBackgroundImage=function(C){var G=l.apply(this,
arguments);null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src});return G};var p=g.setBackgroundImage;g.setBackgroundImage=function(C){null!=C&&null!=C.originalSrc&&(C=d.createImageForPageLink(C.originalSrc,d.currentPage,this));p.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){g.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",
mxUtils.bind(this,function(C,G){C=null!=g.backgroundImage?g.backgroundImage.originalSrc:null;if(null!=C){var N=C.indexOf(",");if(0<N)for(C=C.substring(N+1),G=G.getProperty("patches"),N=0;N<G.length;N++)if(null!=G[N][EditorUi.DIFF_UPDATE]&&null!=G[N][EditorUi.DIFF_UPDATE][C]||null!=G[N][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(G[N][EditorUi.DIFF_REMOVE],C)){g.refreshBackgroundImage();break}}}));var q=g.getBackgroundImageObject;g.getBackgroundImageObject=function(C,G){var N=q.apply(this,arguments);
-if(null!=N&&null!=N.originalSrc)if(!G)N={src:N.originalSrc};else if(G&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var I=this.stylesheet,E=this.shapeForegroundColor,H=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";N=d.createImageForPageLink(N.originalSrc);this.shapeBackgroundColor=H;this.shapeForegroundColor=E;this.stylesheet=I}return N};var x=this.clearDefaultStyle;this.clearDefaultStyle=function(){x.apply(this,
+if(null!=N&&null!=N.originalSrc)if(!G)N={src:N.originalSrc};else if(G&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var I=this.stylesheet,F=this.shapeForegroundColor,H=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";N=d.createImageForPageLink(N.originalSrc);this.shapeBackgroundColor=H;this.shapeForegroundColor=F;this.stylesheet=I}return N};var x=this.clearDefaultStyle;this.clearDefaultStyle=function(){x.apply(this,
arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var y=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(C){C=null!=C?C:"";"1"==urlParams.dev&&(C+=(0<C.length?"&":"?")+"dev=1");return y.apply(this,arguments)};
-var z=g.addClickHandler;g.addClickHandler=function(C,G,N){var I=G;G=function(E,H){if(null==H){var R=mxEvent.getSource(E);"a"==R.nodeName.toLowerCase()&&(H=R.getAttribute("href"))}null!=H&&g.isCustomLink(H)&&(mxEvent.isTouchEvent(E)||!mxEvent.isPopupTrigger(E))&&g.customLinkClicked(H)&&mxEvent.consume(E);null!=I&&I(E,H)};z.call(this,C,G,N)};m.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var A=Menus.prototype.addPopupMenuEditItems;
+var z=g.addClickHandler;g.addClickHandler=function(C,G,N){var I=G;G=function(F,H){if(null==H){var R=mxEvent.getSource(F);"a"==R.nodeName.toLowerCase()&&(H=R.getAttribute("href"))}null!=H&&g.isCustomLink(H)&&(mxEvent.isTouchEvent(F)||!mxEvent.isPopupTrigger(F))&&g.customLinkClicked(H)&&mxEvent.consume(F);null!=I&&I(F,H)};z.call(this,C,G,N)};m.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(g.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var A=Menus.prototype.addPopupMenuEditItems;
this.menus.addPopupMenuEditItems=function(C,G,N){d.editor.graph.isSelectionEmpty()?A.apply(this,arguments):d.menus.addMenuItems(C,"delete - cut copy copyAsImage - duplicate".split(" "),null,N)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var L=g.getExportVariables;g.getExportVariables=function(){var C=L.apply(this,arguments),G=d.getCurrentFile();null!=
G&&(C.filename=G.getTitle());C.pagecount=null!=d.pages?d.pages.length:1;C.page=null!=d.currentPage?d.currentPage.getName():"";C.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return C};var O=g.getGlobalVariable;g.getGlobalVariable=function(C){var G=d.getCurrentFile();return"filename"==C&&null!=G?G.getTitle():"page"==C&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==C?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:
"pagecount"==C?null!=d.pages?d.pages.length:1:O.apply(this,arguments)};var M=g.labelLinkClicked;g.labelLinkClicked=function(C,G,N){var I=G.getAttribute("href");if(null==I||!g.isCustomLink(I)||!mxEvent.isTouchEvent(N)&&mxEvent.isPopupTrigger(N))M.apply(this,arguments);else{if(!g.isEnabled()||null!=C&&g.isCellLocked(C.cell))g.customLinkClicked(I),g.getRubberband().reset();mxEvent.consume(N)}};this.editor.getOrCreateFilename=function(){var C=d.defaultFilename,G=d.getCurrentFile();null!=G&&(C=null!=G.getTitle()?
G.getTitle():C);return C};var u=this.actions.get("print");u.setEnabled(!mxClient.IS_IOS||!navigator.standalone);u.visible=u.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,
!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&g.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(C){var G=g.cellEditor.text2,N=null;null!=G&&(mxEvent.addListener(G,"dragleave",function(I){null!=N&&(N.parentNode.removeChild(N),N=null);I.stopPropagation();
I.preventDefault()}),mxEvent.addListener(G,"dragover",mxUtils.bind(this,function(I){null==N&&(!mxClient.IS_IE||10<document.documentMode)&&(N=this.highlightElement(G));I.stopPropagation();I.preventDefault()})),mxEvent.addListener(G,"drop",mxUtils.bind(this,function(I){null!=N&&(N.parentNode.removeChild(N),N=null);if(0<I.dataTransfer.files.length)this.importFiles(I.dataTransfer.files,0,0,this.maxImageSize,function(H,R,W,J,V,U){g.insertImage(H,V,U)},function(){},function(H){return"image/"==H.type.substring(0,
-6)},function(H){for(var R=0;R<H.length;R++)H[R]()},mxEvent.isControlDown(I));else if(0<=mxUtils.indexOf(I.dataTransfer.types,"text/uri-list")){var E=I.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(E)?this.loadImage(decodeURIComponent(E),mxUtils.bind(this,function(H){var R=Math.max(1,H.width);H=Math.max(1,H.height);var W=this.maxImageSize;W=Math.min(1,Math.min(W/Math.max(1,R)),W/Math.max(1,H));g.insertImage(decodeURIComponent(E),R*W,H*W)})):document.execCommand("insertHTML",
+6)},function(H){for(var R=0;R<H.length;R++)H[R]()},mxEvent.isControlDown(I));else if(0<=mxUtils.indexOf(I.dataTransfer.types,"text/uri-list")){var F=I.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(F)?this.loadImage(decodeURIComponent(F),mxUtils.bind(this,function(H){var R=Math.max(1,H.width);H=Math.max(1,H.height);var W=this.maxImageSize;W=Math.min(1,Math.min(W/Math.max(1,R)),W/Math.max(1,H));g.insertImage(decodeURIComponent(F),R*W,H*W)})):document.execCommand("insertHTML",
!1,I.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(I.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(I.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,I.dataTransfer.getData("text/plain"));I.stopPropagation();I.preventDefault()})))}));this.isSettingsEnabled()&&(u=this.editor.graph.view,u.setUnit(mxSettings.getUnit()),u.addListener("unitChanged",function(C,G){mxSettings.setUnit(G.getProperty("unit"));
mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,u.unit),this.refresh());if("1"==urlParams.styledev){u=document.getElementById("geFooter");null!=u&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left=
"2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),u.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(C,G){0<this.editor.graph.getSelectionCount()?(C=this.editor.graph.getSelectionCell(),
C=this.editor.graph.getModel().getStyle(C),this.styleInput.value=C||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var D=this.isSelectionAllowed;this.isSelectionAllowed=function(C){return mxEvent.getSource(C)==this.styleInput?!0:D.apply(this,arguments)}}u=document.getElementById("geInfo");null!=u&&u.parentNode.removeChild(u);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var B=null;mxEvent.addListener(g.container,"dragleave",function(C){g.isEnabled()&&
(null!=B&&(B.parentNode.removeChild(B),B=null),C.stopPropagation(),C.preventDefault())});mxEvent.addListener(g.container,"dragover",mxUtils.bind(this,function(C){null==B&&(!mxClient.IS_IE||10<document.documentMode)&&(B=this.highlightElement(g.container));null!=this.sidebar&&this.sidebar.hideTooltip();C.stopPropagation();C.preventDefault()}));mxEvent.addListener(g.container,"drop",mxUtils.bind(this,function(C){null!=B&&(B.parentNode.removeChild(B),B=null);if(g.isEnabled()){var G=mxUtils.convertPoint(g.container,
-mxEvent.getClientX(C),mxEvent.getClientY(C)),N=C.dataTransfer.files,I=g.view.translate,E=g.view.scale,H=G.x/E-I.x,R=G.y/E-I.y;if(0<N.length)G=1==N.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===N[0].type.substring(0,9)||"image/"!==N[0].type.substring(0,6)||/(\.drawio.png)$/i.test(N[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(C)||G)?(!mxEvent.isShiftDown(C)&&G&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(N,!0)):(mxEvent.isAltDown(C)&&(R=H=null),this.importFiles(N,
+mxEvent.getClientX(C),mxEvent.getClientY(C)),N=C.dataTransfer.files,I=g.view.translate,F=g.view.scale,H=G.x/F-I.x,R=G.y/F-I.y;if(0<N.length)G=1==N.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===N[0].type.substring(0,9)||"image/"!==N[0].type.substring(0,6)||/(\.drawio.png)$/i.test(N[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(C)||G)?(!mxEvent.isShiftDown(C)&&G&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(N,!0)):(mxEvent.isAltDown(C)&&(R=H=null),this.importFiles(N,
H,R,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(C),null,null,mxEvent.isShiftDown(C),C));else{mxEvent.isAltDown(C)&&(R=H=0);var W=0<=mxUtils.indexOf(C.dataTransfer.types,"text/uri-list")?C.dataTransfer.getData("text/uri-list"):null;N=this.extractGraphModelFromEvent(C,null!=this.pages);if(null!=N)g.setSelectionCells(this.importXml(N,H,R,!0));else if(0<=mxUtils.indexOf(C.dataTransfer.types,"text/html")){var J=C.dataTransfer.getData("text/html");N=document.createElement("div");N.innerHTML=
g.sanitizeHtml(J);var V=null;G=N.getElementsByTagName("img");null!=G&&1==G.length?(J=G[0].getAttribute("src"),null==J&&(J=G[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(J)||(V=!0)):(G=N.getElementsByTagName("a"),null!=G&&1==G.length?J=G[0].getAttribute("href"):(N=N.getElementsByTagName("pre"),null!=N&&1==N.length&&(J=mxUtils.getTextContent(N[0]))));var U=!0,X=mxUtils.bind(this,function(){g.setSelectionCells(this.insertTextAt(J,H,R,!0,V,null,U,mxEvent.isControlDown(C)))});V&&null!=
-J&&J.length>this.resampleThreshold?this.confirmImageResize(function(t){U=t;X()},mxEvent.isControlDown(C)):X()}else null!=W&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)?this.loadImage(decodeURIComponent(W),mxUtils.bind(this,function(t){var F=Math.max(1,t.width);t=Math.max(1,t.height);var K=this.maxImageSize;K=Math.min(1,Math.min(K/Math.max(1,F)),K/Math.max(1,t));g.setSelectionCell(g.insertVertex(null,null,"",H,R,F*K,t*K,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+J&&J.length>this.resampleThreshold?this.confirmImageResize(function(t){U=t;X()},mxEvent.isControlDown(C)):X()}else null!=W&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)?this.loadImage(decodeURIComponent(W),mxUtils.bind(this,function(t){var E=Math.max(1,t.width);t=Math.max(1,t.height);var K=this.maxImageSize;K=Math.min(1,Math.min(K/Math.max(1,E)),K/Math.max(1,t));g.setSelectionCell(g.insertVertex(null,null,"",H,R,E*K,t*K,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
W+";"))}),mxUtils.bind(this,function(t){g.setSelectionCells(this.insertTextAt(W,H,R,!0))})):0<=mxUtils.indexOf(C.dataTransfer.types,"text/plain")&&g.setSelectionCells(this.insertTextAt(C.dataTransfer.getData("text/plain"),H,R,!0))}}C.stopPropagation();C.preventDefault()}),!1)}g.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",
mxUtils.bind(this,function(g){if(!mxEvent.isConsumed(g))try{for(var k=g.clipboardData||g.originalEvent.clipboardData,l=!1,p=0;p<k.types.length;p++)if("text/"===k.types[p].substring(0,5)){l=!0;break}if(!l){var q=k.items;for(index in q){var x=q[index];if("file"===x.kind){if(d.isEditing())this.importFiles([x.getAsFile()],0,0,this.maxImageSize,function(z,A,L,O,M,u){d.insertImage(z,M,u)},function(){},function(z){return"image/"==z.type.substring(0,6)},function(z){for(var A=0;A<z.length;A++)z[A]()});else{var y=
this.editor.graph.getInsertPoint();this.importFiles([x.getAsFile()],y.x,y.y,this.maxImageSize);mxEvent.consume(g)}break}}}}catch(z){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){k.innerHTML="&nbsp;";k.focus();document.execCommand("selectAll",!1,null)},0)}var g=this.editor.graph,k=document.createElement("div");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck",
@@ -12041,25 +12041,25 @@ A.message,null!=A.buttonKey?mxResources.get(A.buttonKey):A.button);null!=A.modif
"*")},null!=A.titleKey?mxResources.get(A.titleKey):A.title);this.showDialog(u.container,300,80,!0,!1);u.init();return}if("draft"==A.action){var D=O(A.xml);this.spinner.stop();u=new DraftDialog(this,mxResources.get("draftFound",[A.name||this.defaultFilename]),D,mxUtils.bind(this,function(){this.hideDialog();x.postMessage(JSON.stringify({event:"draft",result:"edit",message:A}),"*")}),mxUtils.bind(this,function(){this.hideDialog();x.postMessage(JSON.stringify({event:"draft",result:"discard",message:A}),
"*")}),A.editKey?mxResources.get(A.editKey):null,A.discardKey?mxResources.get(A.discardKey):null,A.ignore?mxUtils.bind(this,function(){this.hideDialog();x.postMessage(JSON.stringify({event:"draft",result:"ignore",message:A}),"*")}):null);this.showDialog(u.container,640,480,!0,!1,mxUtils.bind(this,function(Q){Q&&this.actions.get("exit").funct()}));try{u.init()}catch(Q){x.postMessage(JSON.stringify({event:"draft",error:Q.toString(),message:A}),"*")}return}if("template"==A.action){this.spinner.stop();
var B=1==A.enableRecent,C=1==A.enableSearch,G=1==A.enableCustomTemp;if("1"==urlParams.newTempDlg&&!A.templatesOnly&&null!=A.callback){var N=this.getCurrentUser(),I=new TemplatesDialog(this,function(Q,S,Y){Q=Q||this.emptyDiagramXml;x.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:S,tempUrl:Y.url,libs:Y.libs,builtIn:null!=Y.info&&null!=Y.info.custContentId,message:A}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=N?N.id:
-null,B?mxUtils.bind(this,function(Q,S,Y){this.remoteInvoke("getRecentDiagrams",[Y],null,Q,S)}):null,C?mxUtils.bind(this,function(Q,S,Y,ca){this.remoteInvoke("searchDiagrams",[Q,ca],null,S,Y)}):null,mxUtils.bind(this,function(Q,S,Y){this.remoteInvoke("getFileContent",[Q.url],null,S,Y)}),null,G?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,!1,!1,!0,!0);this.showDialog(I.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}u=
-new NewDialog(this,!1,A.templatesOnly?!1:null!=A.callback,mxUtils.bind(this,function(Q,S,Y,ca){Q=Q||this.emptyDiagramXml;null!=A.callback?x.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:S,tempUrl:Y,libs:ca,builtIn:!0,message:A}),"*"):(d(Q,z,Q!=this.emptyDiagramXml,A.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,B?mxUtils.bind(this,function(Q){this.remoteInvoke("getRecentDiagrams",[null],null,Q,function(){Q(null,
+null,B?mxUtils.bind(this,function(Q,S,Y){this.remoteInvoke("getRecentDiagrams",[Y],null,Q,S)}):null,C?mxUtils.bind(this,function(Q,S,Y,ba){this.remoteInvoke("searchDiagrams",[Q,ba],null,S,Y)}):null,mxUtils.bind(this,function(Q,S,Y){this.remoteInvoke("getFileContent",[Q.url],null,S,Y)}),null,G?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,!1,!1,!0,!0);this.showDialog(I.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}u=
+new NewDialog(this,!1,A.templatesOnly?!1:null!=A.callback,mxUtils.bind(this,function(Q,S,Y,ba){Q=Q||this.emptyDiagramXml;null!=A.callback?x.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:S,tempUrl:Y,libs:ba,builtIn:!0,message:A}),"*"):(d(Q,z,Q!=this.emptyDiagramXml,A.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,B?mxUtils.bind(this,function(Q){this.remoteInvoke("getRecentDiagrams",[null],null,Q,function(){Q(null,
"Network Error!")})}):null,C?mxUtils.bind(this,function(Q,S){this.remoteInvoke("searchDiagrams",[Q,null],null,S,function(){S(null,"Network Error!")})}):null,mxUtils.bind(this,function(Q,S,Y){x.postMessage(JSON.stringify({event:"template",docUrl:Q,info:S,name:Y}),"*")}),null,null,G?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,1==A.withoutType);this.showDialog(u.container,620,460,!0,!1,mxUtils.bind(this,function(Q){this.sidebar.hideTooltip();
-Q&&this.actions.get("exit").funct()}));u.init();return}if("textContent"==A.action){var E=this.getDiagramTextContent();x.postMessage(JSON.stringify({event:"textContent",data:E,message:A}),"*");return}if("status"==A.action){null!=A.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(A.messageKey))):null!=A.message&&this.editor.setStatus(mxUtils.htmlEntities(A.message));null!=A.modified&&(this.editor.modified=A.modified);return}if("spinner"==A.action){var H=null!=A.messageKey?mxResources.get(A.messageKey):
+Q&&this.actions.get("exit").funct()}));u.init();return}if("textContent"==A.action){var F=this.getDiagramTextContent();x.postMessage(JSON.stringify({event:"textContent",data:F,message:A}),"*");return}if("status"==A.action){null!=A.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(A.messageKey))):null!=A.message&&this.editor.setStatus(mxUtils.htmlEntities(A.message));null!=A.modified&&(this.editor.modified=A.modified);return}if("spinner"==A.action){var H=null!=A.messageKey?mxResources.get(A.messageKey):
A.message;null==A.show||A.show?this.spinner.spin(document.body,H):this.spinner.stop();return}if("exit"==A.action){this.actions.get("exit").funct();return}if("viewport"==A.action){null!=A.viewport&&(this.embedViewport=A.viewport);return}if("snapshot"==A.action){this.sendEmbeddedSvgExport(!0);return}if("export"==A.action){if("png"==A.format||"xmlpng"==A.format){if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin)){var R=null!=A.xml?A.xml:
this.getFileData(!0);this.editor.graph.setEnabled(!1);var W=this.editor.graph,J=mxUtils.bind(this,function(Q){this.editor.graph.setEnabled(!0);this.spinner.stop();var S=this.createLoadMessage("export");S.format=A.format;S.message=A;S.data=Q;S.xml=R;x.postMessage(JSON.stringify(S),"*")}),V=mxUtils.bind(this,function(Q){null==Q&&(Q=Editor.blankImage);"xmlpng"==A.format&&(Q=Editor.writeGraphModelToPng(Q,"tEXt","mxfile",encodeURIComponent(R)));W!=this.editor.graph&&W.container.parentNode.removeChild(W.container);
-J(Q)}),U=A.pageId||(null!=this.pages?A.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=U){var Q=W.getGlobalVariable;W=this.createTemporaryGraph(W.getStylesheet());for(var S,Y=0;Y<this.pages.length;Y++)if(this.pages[Y].getId()==U){S=this.updatePageRoot(this.pages[Y]);break}null==S&&(S=this.currentPage);W.getGlobalVariable=function(ha){return"page"==ha?S.getName():"pagenumber"==
-ha?1:Q.apply(this,arguments)};document.body.appendChild(W.container);W.model.setRoot(S.root)}if(null!=A.layerIds){var ca=W.model,da=ca.getChildCells(ca.getRoot()),Z={};for(Y=0;Y<A.layerIds.length;Y++)Z[A.layerIds[Y]]=!0;for(Y=0;Y<da.length;Y++)ca.setVisible(da[Y],Z[da[Y].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ha){V(ha.toDataURL("image/png"))}),A.width,null,A.background,mxUtils.bind(this,function(){V(null)}),null,null,A.scale,A.transparent,A.shadow,null,W,A.border,null,A.grid,
+J(Q)}),U=A.pageId||(null!=this.pages?A.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=U){var Q=W.getGlobalVariable;W=this.createTemporaryGraph(W.getStylesheet());for(var S,Y=0;Y<this.pages.length;Y++)if(this.pages[Y].getId()==U){S=this.updatePageRoot(this.pages[Y]);break}null==S&&(S=this.currentPage);W.getGlobalVariable=function(ja){return"page"==ja?S.getName():"pagenumber"==
+ja?1:Q.apply(this,arguments)};document.body.appendChild(W.container);W.model.setRoot(S.root)}if(null!=A.layerIds){var ba=W.model,da=ba.getChildCells(ba.getRoot()),Z={};for(Y=0;Y<A.layerIds.length;Y++)Z[A.layerIds[Y]]=!0;for(Y=0;Y<da.length;Y++)ba.setVisible(da[Y],Z[da[Y].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ja){V(ja.toDataURL("image/png"))}),A.width,null,A.background,mxUtils.bind(this,function(){V(null)}),null,null,A.scale,A.transparent,A.shadow,null,W,A.border,null,A.grid,
A.keepTheme)});null!=A.xml&&0<A.xml.length?(k=!0,this.setFileData(R),k=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(X)},0):X()):X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==A.format?"1":"0")+(null!=U?"&pageId="+U:"")+(null!=A.layerIds&&0<A.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:A.layerIds})):"")+(null!=A.scale?"&scale="+A.scale:"")+"&base64=1&xml="+encodeURIComponent(R))).send(mxUtils.bind(this,function(Q){200<=
Q.getStatus()&&299>=Q.getStatus()?J("data:image/png;base64,"+Q.getText()):V(null)}),mxUtils.bind(this,function(){V(null)}))}}else X=mxUtils.bind(this,function(){var Q=this.createLoadMessage("export");Q.message=A;if("html2"==A.format||"html"==A.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var S=this.getXmlFileData();Q.xml=mxUtils.getXml(S);Q.data=this.getFileData(null,null,!0,null,null,null,S);Q.format=A.format}else if("html"==A.format)S=this.editor.getGraphXml(),Q.data=this.getHtml(S,
-this.editor.graph),Q.xml=mxUtils.getXml(S),Q.format=A.format;else{mxSvgCanvas2D.prototype.foAltText=null;S=null!=A.background?A.background:this.editor.graph.background;S==mxConstants.NONE&&(S=null);Q.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Q.format="svg";var Y=mxUtils.bind(this,function(ca){this.editor.graph.setEnabled(!0);this.spinner.stop();Q.data=Editor.createSvgDataUri(ca);x.postMessage(JSON.stringify(Q),"*")});if("xmlsvg"==A.format)(null==A.spin&&null==A.spinKey||
+this.editor.graph),Q.xml=mxUtils.getXml(S),Q.format=A.format;else{mxSvgCanvas2D.prototype.foAltText=null;S=null!=A.background?A.background:this.editor.graph.background;S==mxConstants.NONE&&(S=null);Q.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Q.format="svg";var Y=mxUtils.bind(this,function(ba){this.editor.graph.setEnabled(!0);this.spinner.stop();Q.data=Editor.createSvgDataUri(ba);x.postMessage(JSON.stringify(Q),"*")});if("xmlsvg"==A.format)(null==A.spin&&null==A.spinKey||
this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin))&&this.getEmbeddedSvg(Q.xml,this.editor.graph,null,!0,Y,null,null,A.embedImages,S,A.scale,A.border,A.shadow,A.keepTheme);else if(null==A.spin&&null==A.spinKey||this.spinner.spin(document.body,null!=A.spinKey?mxResources.get(A.spinKey):A.spin))this.editor.graph.setEnabled(!1),S=this.editor.graph.getSvg(S,A.scale,A.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||A.shadow,null,A.keepTheme),(this.editor.graph.shadowVisible||
-A.shadow)&&this.editor.graph.addSvgShadow(S),this.embedFonts(S,mxUtils.bind(this,function(ca){A.embedImages||null==A.embedImages?this.editor.convertImages(ca,mxUtils.bind(this,function(da){Y(mxUtils.getXml(da))})):Y(mxUtils.getXml(ca))}));return}x.postMessage(JSON.stringify(Q),"*")}),null!=A.xml&&0<A.xml.length?(k=!0,this.setFileData(A.xml),k=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(X)},0):X()):X();return}if("load"==A.action){M=A.toSketch;l=1==A.autosave;
+A.shadow)&&this.editor.graph.addSvgShadow(S),this.embedFonts(S,mxUtils.bind(this,function(ba){A.embedImages||null==A.embedImages?this.editor.convertImages(ba,mxUtils.bind(this,function(da){Y(mxUtils.getXml(da))})):Y(mxUtils.getXml(ba))}));return}x.postMessage(JSON.stringify(Q),"*")}),null!=A.xml&&0<A.xml.length?(k=!0,this.setFileData(A.xml),k=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(X)},0):X()):X();return}if("load"==A.action){M=A.toSketch;l=1==A.autosave;
this.hideDialog();null!=A.modified&&null==urlParams.modified&&(urlParams.modified=A.modified);null!=A.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=A.saveAndExit);null!=A.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=A.noSaveBtn);if(null!=A.rough){var t=Editor.sketchMode;this.doSetSketchMode(A.rough);t!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=A.dark&&(t=Editor.darkMode,this.doSetDarkMode(A.dark),t!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));
-null!=A.border&&(this.embedExportBorder=A.border);null!=A.background&&(this.embedExportBackground=A.background);null!=A.viewport&&(this.embedViewport=A.viewport);this.embedExitPoint=null;if(null!=A.rect){var F=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=A.rect.top+"px";this.diagramContainer.style.left=A.rect.left+"px";this.diagramContainer.style.height=A.rect.height+"px";this.diagramContainer.style.width=A.rect.width+"px";this.diagramContainer.style.bottom=
-"";this.diagramContainer.style.right="";L=mxUtils.bind(this,function(){var Q=this.editor.graph,S=Q.maxFitScale;Q.maxFitScale=A.maxFitScale;Q.fit(2*F);Q.maxFitScale=S;Q.container.scrollTop-=2*F;Q.container.scrollLeft-=2*F;this.fireEvent(new mxEventObject("editInlineStart","data",[A]))})}null!=A.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=A.noExitBtn);null!=A.title&&null!=this.buttonContainer&&(D=document.createElement("span"),mxUtils.write(D,A.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+null!=A.border&&(this.embedExportBorder=A.border);null!=A.background&&(this.embedExportBackground=A.background);null!=A.viewport&&(this.embedViewport=A.viewport);this.embedExitPoint=null;if(null!=A.rect){var E=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=A.rect.top+"px";this.diagramContainer.style.left=A.rect.left+"px";this.diagramContainer.style.height=A.rect.height+"px";this.diagramContainer.style.width=A.rect.width+"px";this.diagramContainer.style.bottom=
+"";this.diagramContainer.style.right="";L=mxUtils.bind(this,function(){var Q=this.editor.graph,S=Q.maxFitScale;Q.maxFitScale=A.maxFitScale;Q.fit(2*E);Q.maxFitScale=S;Q.container.scrollTop-=2*E;Q.container.scrollLeft-=2*E;this.fireEvent(new mxEventObject("editInlineStart","data",[A]))})}null!=A.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=A.noExitBtn);null!=A.title&&null!=this.buttonContainer&&(D=document.createElement("span"),mxUtils.write(D,A.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
this.buttonContainer.appendChild(D),this.embedFilenameSpan=D);try{A.libs&&this.sidebar.showEntries(A.libs)}catch(Q){}A=null!=A.xmlpng?this.extractGraphModelFromPng(A.xmlpng):null!=A.descriptor?A.descriptor:A.xml}else{if("merge"==A.action){var K=this.getCurrentFile();null!=K&&(D=O(A.xml),null!=D&&""!=D&&K.mergeFile(new LocalFile(this,D),function(){x.postMessage(JSON.stringify({event:"merge",message:A}),"*")},function(Q){x.postMessage(JSON.stringify({event:"merge",message:A,error:Q}),"*")}))}else"remoteInvokeReady"==
A.action?this.handleRemoteInvokeReady(x):"remoteInvoke"==A.action?this.handleRemoteInvoke(A,z.origin):"remoteInvokeResponse"==A.action?this.handleRemoteInvokeResponse(A):x.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(A)}),"*");return}}catch(Q){this.handleError(Q)}}var T=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),P=mxUtils.bind(this,function(Q,S){k=!0;try{d(Q,
-S,null,M)}catch(Y){this.handleError(Y)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");p=T();l&&null==g&&(g=mxUtils.bind(this,function(Y,ca){Y=T();Y==p||k||(ca=this.createLoadMessage("autosave"),ca.xml=Y,(window.opener||window.parent).postMessage(JSON.stringify(ca),"*"));p=Y}),this.editor.graph.model.addListener(mxEvent.CHANGE,g),this.editor.graph.addListener("gridSizeChanged",g),this.editor.graph.addListener("shadowVisibleChanged",g),this.addListener("pageFormatChanged",g),this.addListener("pageScaleChanged",
+S,null,M)}catch(Y){this.handleError(Y)}k=!1;null!=urlParams.modified&&this.editor.setStatus("");p=T();l&&null==g&&(g=mxUtils.bind(this,function(Y,ba){Y=T();Y==p||k||(ba=this.createLoadMessage("autosave"),ba.xml=Y,(window.opener||window.parent).postMessage(JSON.stringify(ba),"*"));p=Y}),this.editor.graph.model.addListener(mxEvent.CHANGE,g),this.editor.graph.addListener("gridSizeChanged",g),this.editor.graph.addListener("shadowVisibleChanged",g),this.addListener("pageFormatChanged",g),this.addListener("pageScaleChanged",
g),this.addListener("backgroundColorChanged",g),this.addListener("backgroundImageChanged",g),this.addListener("foldingEnabledChanged",g),this.addListener("mathEnabledChanged",g),this.addListener("gridEnabledChanged",g),this.addListener("guidesEnabledChanged",g),this.addListener("pageViewChanged",g));if("1"==urlParams.returnbounds||"json"==urlParams.proto)S=this.createLoadMessage("load"),S.xml=Q,x.postMessage(JSON.stringify(S),"*");null!=L&&L()});null!=A&&"function"===typeof A.substring&&"data:application/vnd.visio;base64,"==
A.substring(0,34)?(O="0M8R4KGxGuE"==A.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(A.substring(A.indexOf(",")+1)),function(Q){P(Q,z)},mxUtils.bind(this,function(Q){this.handleError(Q)}),O)):null!=A&&"function"===typeof A.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(A,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(A,mxUtils.bind(this,function(Q){4==Q.readyState&&200<=Q.status&&299>=Q.status&&
"<mxGraphModel"==Q.responseText.substring(0,13)&&P(Q.responseText,z)}),""):null!=A&&"function"===typeof A.substring&&this.isLucidChartData(A)?this.convertLucidChart(A,mxUtils.bind(this,function(Q){P(Q)}),mxUtils.bind(this,function(Q){this.handleError(Q)})):null==A||"object"!==typeof A||null==A.format||null==A.data&&null==A.url?(A=O(A),P(A,z)):this.loadDescriptor(A,mxUtils.bind(this,function(Q){P(T(),z)}),mxUtils.bind(this,function(Q){this.handleError(Q,mxResources.get("errorLoadingFile"))}))}}));
@@ -12069,37 +12069,37 @@ d.appendChild(g)}}else mxUtils.write(g,mxResources.get("save")),g.setAttribute("
"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(g),k=g);"1"!=urlParams.noExitBtn&&(g=document.createElement("a"),k="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(g,k),g.setAttribute("title",k),g.className="geBigButton geBigStandardButton",g.style.marginLeft="6px",mxEvent.addListener(g,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(g),k=g);k.style.marginRight="20px";this.toolbar.container.appendChild(d);
this.toolbar.staticElements.push(d);d.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,
640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var g=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?g():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
-function(){mxscript("js/orgchart/mxOrgChartLayout.js",g)})})}):mxscript("js/extensions.min.js",g))};EditorUi.prototype.importCsv=function(d,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,g)}))};EditorUi.prototype.doImportCsv=function(d,g){try{var k=d.split("\n"),l=[],p=[],q=[],x={};if(0<k.length){var y={},z=this.editor.graph,A=null,L=null,O=null,M=null,u=null,D=null,B=null,C="whiteSpace=wrap;html=1;",G=null,N=null,I="",E="auto",H="auto",R=null,W=null,J=40,V=40,U=100,X=
-0,t=function(){null!=g?g(ya):(z.setSelectionCells(ya),z.scrollCellToVisible(z.getSelectionCell()))},F=z.getFreeInsertPoint(),K=F.x,T=F.y;F=T;var P=null,Q="auto";N=null;for(var S=[],Y=null,ca=null,da=0;da<k.length&&"#"==k[da].charAt(0);){d=k[da].replace(/\r$/,"");for(da++;da<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[da].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(k[da].substring(1)),da++;if("#"!=d.charAt(1)){var Z=d.indexOf(":");if(0<Z){var ha=mxUtils.trim(d.substring(1,Z)),aa=mxUtils.trim(d.substring(Z+
-1));"label"==ha?P=z.sanitizeHtml(aa):"labelname"==ha&&0<aa.length&&"-"!=aa?u=aa:"labels"==ha&&0<aa.length&&"-"!=aa?B=JSON.parse(aa):"style"==ha?L=aa:"parentstyle"==ha?C=aa:"unknownStyle"==ha&&"-"!=aa?D=aa:"stylename"==ha&&0<aa.length&&"-"!=aa?M=aa:"styles"==ha&&0<aa.length&&"-"!=aa?O=JSON.parse(aa):"vars"==ha&&0<aa.length&&"-"!=aa?A=JSON.parse(aa):"identity"==ha&&0<aa.length&&"-"!=aa?G=aa:"parent"==ha&&0<aa.length&&"-"!=aa?N=aa:"namespace"==ha&&0<aa.length&&"-"!=aa?I=aa:"width"==ha?E=aa:"height"==
-ha?H=aa:"left"==ha&&0<aa.length?R=aa:"top"==ha&&0<aa.length?W=aa:"ignore"==ha?ca=aa.split(","):"connect"==ha?S.push(JSON.parse(aa)):"link"==ha?Y=aa:"padding"==ha?X=parseFloat(aa):"edgespacing"==ha?J=parseFloat(aa):"nodespacing"==ha?V=parseFloat(aa):"levelspacing"==ha?U=parseFloat(aa):"layout"==ha&&(Q=aa)}}}if(null==k[da])throw Error(mxResources.get("invalidOrMissingFile"));var ua=this.editor.csvToArray(k[da].replace(/\r$/,""));Z=d=null;ha=[];for(aa=0;aa<ua.length;aa++)G==ua[aa]&&(d=aa),N==ua[aa]&&
-(Z=aa),ha.push(mxUtils.trim(ua[aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==P&&(P="%"+ha[0]+"%");if(null!=S)for(var ka=0;ka<S.length;ka++)null==y[S[ka].to]&&(y[S[ka].to]={});G=[];for(aa=da+1;aa<k.length;aa++){var Ca=this.editor.csvToArray(k[aa].replace(/\r$/,""));if(null==Ca){var Da=40<k[aa].length?k[aa].substring(0,40)+"...":k[aa];throw Error(Da+" ("+aa+"):\n"+mxResources.get("containsValidationErrors"));}0<Ca.length&&G.push(Ca)}z.model.beginUpdate();try{for(aa=0;aa<
-G.length;aa++){Ca=G[aa];var oa=null,Ba=null!=d?I+Ca[d]:null;null!=Ba&&(oa=z.model.getCell(Ba));k=null!=oa;var Aa=new mxCell(P,new mxGeometry(K,F,0,0),L||"whiteSpace=wrap;html=1;");Aa.vertex=!0;Aa.id=Ba;Da=null!=oa?oa:Aa;for(var Ha=0;Ha<Ca.length;Ha++)z.setAttributeForCell(Da,ha[Ha],Ca[Ha]);if(null!=u&&null!=B){var Oa=B[Da.getAttribute(u)];null!=Oa&&z.labelChanged(Da,Oa)}if(null!=M&&null!=O){var Ga=O[Da.getAttribute(M)];null!=Ga&&(Da.style=Ga)}z.setAttributeForCell(Da,"placeholders","1");Da.style=
-z.replacePlaceholders(Da,Da.style,A);k?(0>mxUtils.indexOf(q,oa)&&q.push(oa),z.fireEvent(new mxEventObject("cellsInserted","cells",[oa]))):z.fireEvent(new mxEventObject("cellsInserted","cells",[Aa]));oa=Aa;if(!k)for(ka=0;ka<S.length;ka++)y[S[ka].to][oa.getAttribute(S[ka].to)]=oa;null!=Y&&"link"!=Y&&(z.setLinkForCell(oa,oa.getAttribute(Y)),z.setAttributeForCell(oa,Y,null));var Fa=this.editor.graph.getPreferredSizeForCell(oa);N=null!=Z?z.model.getCell(I+Ca[Z]):null;if(oa.vertex){Da=null!=N?0:K;da=null!=
-N?0:T;null!=R&&null!=oa.getAttribute(R)&&(oa.geometry.x=Da+parseFloat(oa.getAttribute(R)));null!=W&&null!=oa.getAttribute(W)&&(oa.geometry.y=da+parseFloat(oa.getAttribute(W)));var Ea="@"==E.charAt(0)?oa.getAttribute(E.substring(1)):null;oa.geometry.width=null!=Ea&&"auto"!=Ea?parseFloat(oa.getAttribute(E.substring(1))):"auto"==E||"auto"==Ea?Fa.width+X:parseFloat(E);var Ka="@"==H.charAt(0)?oa.getAttribute(H.substring(1)):null;oa.geometry.height=null!=Ka&&"auto"!=Ka?parseFloat(Ka):"auto"==H||"auto"==
-Ka?Fa.height+X:parseFloat(H);F+=oa.geometry.height+V}k?(null==x[Ba]&&(x[Ba]=[]),x[Ba].push(oa)):(l.push(oa),null!=N?(N.style=z.replacePlaceholders(N,C,A),z.addCell(oa,N),p.push(N)):q.push(z.addCell(oa)))}for(aa=0;aa<p.length;aa++)Ea="@"==E.charAt(0)?p[aa].getAttribute(E.substring(1)):null,Ka="@"==H.charAt(0)?p[aa].getAttribute(H.substring(1)):null,"auto"!=E&&"auto"!=Ea||"auto"!=H&&"auto"!=Ka||z.updateGroupBounds([p[aa]],X,!0);var za=q.slice(),ya=q.slice();for(ka=0;ka<S.length;ka++){var qa=S[ka];for(aa=
-0;aa<l.length;aa++){oa=l[aa];var fa=mxUtils.bind(this,function(ma,ta,ia){var Na=ta.getAttribute(ia.from);if(null!=Na&&""!=Na){Na=Na.split(",");for(var La=0;La<Na.length;La++){var Qa=y[ia.to][Na[La]];if(null==Qa&&null!=D){Qa=new mxCell(Na[La],new mxGeometry(K,T,0,0),D);Qa.style=z.replacePlaceholders(ta,Qa.style,A);var Sa=this.editor.graph.getPreferredSizeForCell(Qa);Qa.geometry.width=Sa.width+X;Qa.geometry.height=Sa.height+X;y[ia.to][Na[La]]=Qa;Qa.vertex=!0;Qa.id=Na[La];q.push(z.addCell(Qa))}if(null!=
-Qa){Sa=ia.label;null!=ia.fromlabel&&(Sa=(ta.getAttribute(ia.fromlabel)||"")+(Sa||""));null!=ia.sourcelabel&&(Sa=z.replacePlaceholders(ta,ia.sourcelabel,A)+(Sa||""));null!=ia.tolabel&&(Sa=(Sa||"")+(Qa.getAttribute(ia.tolabel)||""));null!=ia.targetlabel&&(Sa=(Sa||"")+z.replacePlaceholders(Qa,ia.targetlabel,A));var Ia="target"==ia.placeholders==!ia.invert?Qa:ma;Ia=null!=ia.style?z.replacePlaceholders(Ia,ia.style,A):z.createCurrentEdgeStyle();Sa=z.insertEdge(null,null,Sa||"",ia.invert?Qa:ma,ia.invert?
-ma:Qa,Ia);if(null!=ia.labels)for(Ia=0;Ia<ia.labels.length;Ia++){var Ja=ia.labels[Ia],Pa=new mxCell(Ja.label||Ia,new mxGeometry(null!=Ja.x?Ja.x:0,null!=Ja.y?Ja.y:0,0,0),"resizable=0;html=1;");Pa.vertex=!0;Pa.connectable=!1;Pa.geometry.relative=!0;null!=Ja.placeholders&&(Pa.value=z.replacePlaceholders("target"==Ja.placeholders==!ia.invert?Qa:ma,Pa.value,A));if(null!=Ja.dx||null!=Ja.dy)Pa.geometry.offset=new mxPoint(null!=Ja.dx?Ja.dx:0,null!=Ja.dy?Ja.dy:0);Sa.insert(Pa)}ya.push(Sa);mxUtils.remove(ia.invert?
-ma:Qa,za)}}}});fa(oa,oa,qa);if(null!=x[oa.id])for(Ha=0;Ha<x[oa.id].length;Ha++)fa(oa,x[oa.id][Ha],qa)}}if(null!=ca)for(aa=0;aa<l.length;aa++)for(oa=l[aa],Ha=0;Ha<ca.length;Ha++)z.setAttributeForCell(oa,mxUtils.trim(ca[Ha]),null);if(0<q.length){var ra=new mxParallelEdgeLayout(z);ra.spacing=J;ra.checkOverlap=!0;var xa=function(){0<ra.spacing&&ra.execute(z.getDefaultParent());for(var ma=0;ma<q.length;ma++){var ta=z.getCellGeometry(q[ma]);ta.x=Math.round(z.snap(ta.x));ta.y=Math.round(z.snap(ta.y));"auto"==
-E&&(ta.width=Math.round(z.snap(ta.width)));"auto"==H&&(ta.height=Math.round(z.snap(ta.height)))}};if("["==Q.charAt(0)){var wa=t;z.view.validate();this.executeLayouts(z.createLayouts(JSON.parse(Q)),function(){xa();wa()});t=null}else if("circle"==Q){var sa=new mxCircleLayout(z);sa.disableEdgeStyle=!1;sa.resetEdges=!1;var va=sa.isVertexIgnored;sa.isVertexIgnored=function(ma){return va.apply(this,arguments)||0>mxUtils.indexOf(q,ma)};this.executeLayout(function(){sa.execute(z.getDefaultParent());xa()},
-!0,t);t=null}else if("horizontaltree"==Q||"verticaltree"==Q||"auto"==Q&&ya.length==2*q.length-1&&1==za.length){z.view.validate();var ja=new mxCompactTreeLayout(z,"horizontaltree"==Q);ja.levelDistance=V;ja.edgeRouting=!1;ja.resetEdges=!1;this.executeLayout(function(){ja.execute(z.getDefaultParent(),0<za.length?za[0]:null)},!0,t);t=null}else if("horizontalflow"==Q||"verticalflow"==Q||"auto"==Q&&1==za.length){z.view.validate();var pa=new mxHierarchicalLayout(z,"horizontalflow"==Q?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);pa.intraCellSpacing=V;pa.parallelEdgeSpacing=J;pa.interRankCellSpacing=U;pa.disableEdgeStyle=!1;this.executeLayout(function(){pa.execute(z.getDefaultParent(),ya);z.moveCells(ya,K,T)},!0,t);t=null}else if("orgchart"==Q){z.view.validate();var ba=new mxOrgChartLayout(z,2,U,V),ea=ba.isVertexIgnored;ba.isVertexIgnored=function(ma){return ea.apply(this,arguments)||0>mxUtils.indexOf(q,ma)};this.executeLayout(function(){ba.execute(z.getDefaultParent());xa()},!0,t);t=null}else if("organic"==
-Q||"auto"==Q&&ya.length>q.length){z.view.validate();var na=new mxFastOrganicLayout(z);na.forceConstant=3*V;na.disableEdgeStyle=!1;na.resetEdges=!1;var la=na.isVertexIgnored;na.isVertexIgnored=function(ma){return la.apply(this,arguments)||0>mxUtils.indexOf(q,ma)};this.executeLayout(function(){na.execute(z.getDefaultParent());xa()},!0,t);t=null}}this.hideDialog()}finally{z.model.endUpdate()}null!=t&&t()}}catch(ma){this.handleError(ma)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&
-"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",l;for(l in urlParams)0>mxUtils.indexOf(d,l)&&null!=urlParams[l]&&(g+=k+l+"="+urlParams[l],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var g=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),l;for(l in urlParams)0>mxUtils.indexOf(k,
-l)&&(d=0==g?d+"?":d+"&",null!=urlParams[l]&&(d+=l+"="+urlParams[l],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,k,l,p){d=new LinkDialog(this,d,g,k,!0,l,p);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var g=1;null==this.drive&&"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||g++;null!=this.gitHub&&g++;null!=
-this.gitLab&&g++;d&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),g=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);this.menus.get("viewZoom").setEnabled(g);var k=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!k);this.actions.get("print").setEnabled(!k);
-this.menus.get("exportAs").setEnabled(!k);this.menus.get("embed").setEnabled(!k);k="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(k);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(k),this.menus.get("newLibrary").setEnabled(k));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g);this.actions.get("resetView").setEnabled(g);
-this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(g);this.menus.get("view").setEnabled(g);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=
-function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var d=this.editor.graph,g=this.getCurrentFile(),k=this.getSelectionState(),
-l=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(l);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(l);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(l);this.actions.get("connectionArrows").setEnabled(l);this.actions.get("connectionPoints").setEnabled(l);this.actions.get("copyStyle").setEnabled(l&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(l&&
-0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(l);this.actions.get("createRevision").setEnabled(l);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(l&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);
-this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("hidden"!=this.diagramContainer.style.visibility);g.label=mxResources.get("find")+
-(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(l&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var v=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);v.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=
-function(d,g,k,l,p,q,x,y){var z=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(z.getSvg(l,p,q)),"image/svg+xml");else{var A=d.getFileData(!0,null,null,null,null,!0),L=z.getGraphBounds(),O=Math.floor(L.width*p/z.view.scale),M=Math.floor(L.height*p/z.view.scale);if(A.length<=MAX_REQUEST_SIZE&&O*M<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&"jpeg"!=k||!d.isExportToCanvas()){var u=
-{globalVars:z.getExportVariables()};y&&(u.grid={size:z.gridSize,steps:z.view.gridSteps,color:z.view.gridColor});d.saveRequest(g,k,function(D,B){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(B||"0")+(null!=D?"&filename="+encodeURIComponent(D):"")+"&extras="+encodeURIComponent(JSON.stringify(u))+(0<x?"&dpi="+x:"")+"&bg="+(null!=l?l:"none")+"&w="+O+"&h="+M+"&border="+q+"&xml="+encodeURIComponent(A))})}else"png"==k?d.exportImage(p,null==l||"none"==l,!0,!1,!1,q,!0,!1,null,y,x):d.exportImage(p,
-!1,!0,!1,!1,q,!0,!1,"jpeg",y);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,g="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var l=d;this.currentPage!=this.pages[k]&&(l=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[k]),l.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+l.getIndexableText()+" "}else g=d.getIndexableText();
-this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var g={},k=document.createElement("div");k.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,mxUtils.htmlEntities(d));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(l);var p=document.createElement("div");p.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";p.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+
+function(){mxscript("js/orgchart/mxOrgChartLayout.js",g)})})}):mxscript("js/extensions.min.js",g))};EditorUi.prototype.importCsv=function(d,g){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,g)}))};EditorUi.prototype.doImportCsv=function(d,g){try{var k=d.split("\n"),l=[],p=[],q=[],x={};if(0<k.length){var y={},z=this.editor.graph,A=null,L=null,O=null,M=null,u=null,D=null,B=null,C="whiteSpace=wrap;html=1;",G=null,N=null,I="",F="auto",H="auto",R=!1,W=null,J=null,V=40,U=40,X=
+100,t=0,E=function(){null!=g?g(oa):(z.setSelectionCells(oa),z.scrollCellToVisible(z.getSelectionCell()))},K=z.getFreeInsertPoint(),T=K.x,P=K.y;K=P;var Q=null,S="auto";N=null;for(var Y=[],ba=null,da=null,Z=0;Z<k.length&&"#"==k[Z].charAt(0);){d=k[Z].replace(/\r$/,"");for(Z++;Z<k.length&&"\\"==d.charAt(d.length-1)&&"#"==k[Z].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(k[Z].substring(1)),Z++;if("#"!=d.charAt(1)){var ja=d.indexOf(":");if(0<ja){var ea=mxUtils.trim(d.substring(1,ja)),ha=mxUtils.trim(d.substring(ja+
+1));"label"==ea?Q=z.sanitizeHtml(ha):"labelname"==ea&&0<ha.length&&"-"!=ha?u=ha:"labels"==ea&&0<ha.length&&"-"!=ha?B=JSON.parse(ha):"style"==ea?L=ha:"parentstyle"==ea?C=ha:"unknownStyle"==ea&&"-"!=ha?D=ha:"stylename"==ea&&0<ha.length&&"-"!=ha?M=ha:"styles"==ea&&0<ha.length&&"-"!=ha?O=JSON.parse(ha):"vars"==ea&&0<ha.length&&"-"!=ha?A=JSON.parse(ha):"identity"==ea&&0<ha.length&&"-"!=ha?G=ha:"parent"==ea&&0<ha.length&&"-"!=ha?N=ha:"namespace"==ea&&0<ha.length&&"-"!=ha?I=ha:"width"==ea?F=ha:"height"==
+ea?H=ha:"collapsed"==ea&&"-"!=ha?R="true"==ha:"left"==ea&&0<ha.length?W=ha:"top"==ea&&0<ha.length?J=ha:"ignore"==ea?da=ha.split(","):"connect"==ea?Y.push(JSON.parse(ha)):"link"==ea?ba=ha:"padding"==ea?t=parseFloat(ha):"edgespacing"==ea?V=parseFloat(ha):"nodespacing"==ea?U=parseFloat(ha):"levelspacing"==ea?X=parseFloat(ha):"layout"==ea&&(S=ha)}}}if(null==k[Z])throw Error(mxResources.get("invalidOrMissingFile"));var ma=this.editor.csvToArray(k[Z].replace(/\r$/,""));ja=d=null;ea=[];for(ha=0;ha<ma.length;ha++)G==
+ma[ha]&&(d=ha),N==ma[ha]&&(ja=ha),ea.push(mxUtils.trim(ma[ha]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Q&&(Q="%"+ea[0]+"%");if(null!=Y)for(var Aa=0;Aa<Y.length;Aa++)null==y[Y[Aa].to]&&(y[Y[Aa].to]={});G=[];for(ha=Z+1;ha<k.length;ha++){var Da=this.editor.csvToArray(k[ha].replace(/\r$/,""));if(null==Da){var Ca=40<k[ha].length?k[ha].substring(0,40)+"...":k[ha];throw Error(Ca+" ("+ha+"):\n"+mxResources.get("containsValidationErrors"));}0<Da.length&&G.push(Da)}z.model.beginUpdate();
+try{for(ha=0;ha<G.length;ha++){Da=G[ha];var pa=null,Ba=null!=d?I+Da[d]:null;null!=Ba&&(pa=z.model.getCell(Ba));var Ea=new mxCell(Q,new mxGeometry(T,K,0,0),L||"whiteSpace=wrap;html=1;");Ea.collapsed=R;Ea.vertex=!0;Ea.id=Ba;null!=pa&&z.model.setCollapsed(pa,R);for(var Ka=0;Ka<Da.length;Ka++)z.setAttributeForCell(Ea,ea[Ka],Da[Ka]),null!=pa&&z.setAttributeForCell(pa,ea[Ka],Da[Ka]);if(null!=u&&null!=B){var Fa=B[Ea.getAttribute(u)];null!=Fa&&(z.labelChanged(Ea,Fa),null!=pa&&z.cellLabelChanged(pa,Fa))}if(null!=
+M&&null!=O){var Ha=O[Ea.getAttribute(M)];null!=Ha&&(Ea.style=Ha)}z.setAttributeForCell(Ea,"placeholders","1");Ea.style=z.replacePlaceholders(Ea,Ea.style,A);null!=pa?(z.model.setStyle(pa,Ea.style),0>mxUtils.indexOf(q,pa)&&q.push(pa),z.fireEvent(new mxEventObject("cellsInserted","cells",[pa]))):z.fireEvent(new mxEventObject("cellsInserted","cells",[Ea]));k=null!=pa;pa=Ea;if(!k)for(Aa=0;Aa<Y.length;Aa++)y[Y[Aa].to][pa.getAttribute(Y[Aa].to)]=pa;null!=ba&&"link"!=ba&&(z.setLinkForCell(pa,pa.getAttribute(ba)),
+z.setAttributeForCell(pa,ba,null));var Ia=this.editor.graph.getPreferredSizeForCell(pa);N=null!=ja?z.model.getCell(I+Da[ja]):null;if(pa.vertex){Ca=null!=N?0:T;Z=null!=N?0:P;null!=W&&null!=pa.getAttribute(W)&&(pa.geometry.x=Ca+parseFloat(pa.getAttribute(W)));null!=J&&null!=pa.getAttribute(J)&&(pa.geometry.y=Z+parseFloat(pa.getAttribute(J)));var Ma="@"==F.charAt(0)?pa.getAttribute(F.substring(1)):null;pa.geometry.width=null!=Ma&&"auto"!=Ma?parseFloat(pa.getAttribute(F.substring(1))):"auto"==F||"auto"==
+Ma?Ia.width+t:parseFloat(F);var za="@"==H.charAt(0)?pa.getAttribute(H.substring(1)):null;pa.geometry.height=null!=za&&"auto"!=za?parseFloat(za):"auto"==H||"auto"==za?Ia.height+t:parseFloat(H);K+=pa.geometry.height+U}k?(null==x[Ba]&&(x[Ba]=[]),x[Ba].push(pa)):(l.push(pa),null!=N?(N.style=z.replacePlaceholders(N,C,A),z.addCell(pa,N),p.push(N)):q.push(z.addCell(pa)))}for(ha=0;ha<p.length;ha++)Ma="@"==F.charAt(0)?p[ha].getAttribute(F.substring(1)):null,za="@"==H.charAt(0)?p[ha].getAttribute(H.substring(1)):
+null,"auto"!=F&&"auto"!=Ma||"auto"!=H&&"auto"!=za||z.updateGroupBounds([p[ha]],t,!0);var ya=q.slice(),oa=q.slice();for(Aa=0;Aa<Y.length;Aa++){var fa=Y[Aa];for(ha=0;ha<l.length;ha++){pa=l[ha];var sa=mxUtils.bind(this,function(ta,ka,Ja){var La=ka.getAttribute(Ja.from);if(null!=La&&""!=La){La=La.split(",");for(var Sa=0;Sa<La.length;Sa++){var Ra=y[Ja.to][La[Sa]];if(null==Ra&&null!=D){Ra=new mxCell(La[Sa],new mxGeometry(T,P,0,0),D);Ra.style=z.replacePlaceholders(ka,Ra.style,A);var Ga=this.editor.graph.getPreferredSizeForCell(Ra);
+Ra.geometry.width=Ga.width+t;Ra.geometry.height=Ga.height+t;y[Ja.to][La[Sa]]=Ra;Ra.vertex=!0;Ra.id=La[Sa];q.push(z.addCell(Ra))}if(null!=Ra){Ga=Ja.label;null!=Ja.fromlabel&&(Ga=(ka.getAttribute(Ja.fromlabel)||"")+(Ga||""));null!=Ja.sourcelabel&&(Ga=z.replacePlaceholders(ka,Ja.sourcelabel,A)+(Ga||""));null!=Ja.tolabel&&(Ga=(Ga||"")+(Ra.getAttribute(Ja.tolabel)||""));null!=Ja.targetlabel&&(Ga=(Ga||"")+z.replacePlaceholders(Ra,Ja.targetlabel,A));var Na="target"==Ja.placeholders==!Ja.invert?Ra:ta;Na=
+null!=Ja.style?z.replacePlaceholders(Na,Ja.style,A):z.createCurrentEdgeStyle();Ga=z.insertEdge(null,null,Ga||"",Ja.invert?Ra:ta,Ja.invert?ta:Ra,Na);if(null!=Ja.labels)for(Na=0;Na<Ja.labels.length;Na++){var Pa=Ja.labels[Na],Qa=new mxCell(Pa.label||Na,new mxGeometry(null!=Pa.x?Pa.x:0,null!=Pa.y?Pa.y:0,0,0),"resizable=0;html=1;");Qa.vertex=!0;Qa.connectable=!1;Qa.geometry.relative=!0;null!=Pa.placeholders&&(Qa.value=z.replacePlaceholders("target"==Pa.placeholders==!Ja.invert?Ra:ta,Qa.value,A));if(null!=
+Pa.dx||null!=Pa.dy)Qa.geometry.offset=new mxPoint(null!=Pa.dx?Pa.dx:0,null!=Pa.dy?Pa.dy:0);Ga.insert(Qa)}oa.push(Ga);mxUtils.remove(Ja.invert?ta:Ra,ya)}}}});sa(pa,pa,fa);if(null!=x[pa.id])for(Ka=0;Ka<x[pa.id].length;Ka++)sa(pa,x[pa.id][Ka],fa)}}if(null!=da)for(ha=0;ha<l.length;ha++)for(pa=l[ha],Ka=0;Ka<da.length;Ka++)z.setAttributeForCell(pa,mxUtils.trim(da[Ka]),null);if(0<q.length){var xa=new mxParallelEdgeLayout(z);xa.spacing=V;xa.checkOverlap=!0;var wa=function(){0<xa.spacing&&xa.execute(z.getDefaultParent());
+for(var ta=0;ta<q.length;ta++){var ka=z.getCellGeometry(q[ta]);ka.x=Math.round(z.snap(ka.x));ka.y=Math.round(z.snap(ka.y));"auto"==F&&(ka.width=Math.round(z.snap(ka.width)));"auto"==H&&(ka.height=Math.round(z.snap(ka.height)))}};if("["==S.charAt(0)){var ua=E;z.view.validate();this.executeLayouts(z.createLayouts(JSON.parse(S)),function(){wa();ua()});E=null}else if("circle"==S){var va=new mxCircleLayout(z);va.disableEdgeStyle=!1;va.resetEdges=!1;var ia=va.isVertexIgnored;va.isVertexIgnored=function(ta){return ia.apply(this,
+arguments)||0>mxUtils.indexOf(q,ta)};this.executeLayout(function(){va.execute(z.getDefaultParent());wa()},!0,E);E=null}else if("horizontaltree"==S||"verticaltree"==S||"auto"==S&&oa.length==2*q.length-1&&1==ya.length){z.view.validate();var ra=new mxCompactTreeLayout(z,"horizontaltree"==S);ra.levelDistance=U;ra.edgeRouting=!1;ra.resetEdges=!1;this.executeLayout(function(){ra.execute(z.getDefaultParent(),0<ya.length?ya[0]:null)},!0,E);E=null}else if("horizontalflow"==S||"verticalflow"==S||"auto"==S&&
+1==ya.length){z.view.validate();var aa=new mxHierarchicalLayout(z,"horizontalflow"==S?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);aa.intraCellSpacing=U;aa.parallelEdgeSpacing=V;aa.interRankCellSpacing=X;aa.disableEdgeStyle=!1;this.executeLayout(function(){aa.execute(z.getDefaultParent(),oa);z.moveCells(oa,T,P)},!0,E);E=null}else if("orgchart"==S){z.view.validate();var ca=new mxOrgChartLayout(z,2,X,U),na=ca.isVertexIgnored;ca.isVertexIgnored=function(ta){return na.apply(this,arguments)||
+0>mxUtils.indexOf(q,ta)};this.executeLayout(function(){ca.execute(z.getDefaultParent());wa()},!0,E);E=null}else if("organic"==S||"auto"==S&&oa.length>q.length){z.view.validate();var la=new mxFastOrganicLayout(z);la.forceConstant=3*U;la.disableEdgeStyle=!1;la.resetEdges=!1;var qa=la.isVertexIgnored;la.isVertexIgnored=function(ta){return qa.apply(this,arguments)||0>mxUtils.indexOf(q,ta)};this.executeLayout(function(){la.execute(z.getDefaultParent());wa()},!0,E);E=null}}this.hideDialog()}finally{z.model.endUpdate()}null!=
+E&&E()}}catch(ta){this.handleError(ta)}};EditorUi.prototype.getSearch=function(d){var g="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var k="?",l;for(l in urlParams)0>mxUtils.indexOf(d,l)&&null!=urlParams[l]&&(g+=k+l+"="+urlParams[l],k="&")}else g=window.location.search;return g};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var g=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var k="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+l;for(l in urlParams)0>mxUtils.indexOf(k,l)&&(d=0==g?d+"?":d+"&",null!=urlParams[l]&&(d+=l+"="+urlParams[l],g++))}return d};EditorUi.prototype.showLinkDialog=function(d,g,k,l,p){d=new LinkDialog(this,d,g,k,!0,l,p);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var g=1;null==this.drive&&"function"!==typeof window.DriveClient||g++;null==this.dropbox&&"function"!==typeof window.DropboxClient||g++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
+g++;null!=this.gitHub&&g++;null!=this.gitLab&&g++;d&&isLocalStorage&&"1"==urlParams.browser&&g++;return g};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),g=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(g);this.menus.get("viewZoom").setEnabled(g);var k=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!k);
+this.actions.get("print").setEnabled(!k);this.menus.get("exportAs").setEnabled(!k);this.menus.get("embed").setEnabled(!k);k="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(k);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(k),this.menus.get("newLibrary").setEnabled(k));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(g);this.actions.get("zoomIn").setEnabled(g);this.actions.get("zoomOut").setEnabled(g);
+this.actions.get("resetView").setEnabled(g);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(g);this.menus.get("view").setEnabled(g);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};
+EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var n=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){n.apply(this,arguments);var d=this.editor.graph,
+g=this.getCurrentFile(),k=this.getSelectionState(),l=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(l);this.actions.get("autosave").setEnabled(null!=g&&g.isEditable()&&g.isAutosaveOptional());this.actions.get("guides").setEnabled(l);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(l);this.actions.get("connectionArrows").setEnabled(l);this.actions.get("connectionPoints").setEnabled(l);this.actions.get("copyStyle").setEnabled(l&&!d.isSelectionEmpty());
+this.actions.get("pasteStyle").setEnabled(l&&0<k.cells.length);this.actions.get("editGeometry").setEnabled(0<k.vertices.length);this.actions.get("createShape").setEnabled(l);this.actions.get("createRevision").setEnabled(l);this.actions.get("moveToFolder").setEnabled(null!=g);this.actions.get("makeCopy").setEnabled(null!=g&&!g.isRestricted());this.actions.get("editDiagram").setEnabled(l&&(null==g||!g.isRestricted()));this.actions.get("publishLink").setEnabled(null!=g&&!g.isRestricted());this.actions.get("tags").setEnabled("hidden"!=
+this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=g&&g.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=g);this.menus.get("publish").setEnabled(null!=g&&!g.isRestricted());g=this.actions.get("findReplace");g.setEnabled("hidden"!=this.diagramContainer.style.visibility);
+g.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(l&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var v=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);v.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=
+!1,ExportDialog.exportFile=function(d,g,k,l,p,q,x,y){var z=d.editor.graph;if("xml"==k)d.hideDialog(),d.saveData(g,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==k)d.hideDialog(),d.saveData(g,"svg",mxUtils.getXml(z.getSvg(l,p,q)),"image/svg+xml");else{var A=d.getFileData(!0,null,null,null,null,!0),L=z.getGraphBounds(),O=Math.floor(L.width*p/z.view.scale),M=Math.floor(L.height*p/z.view.scale);if(A.length<=MAX_REQUEST_SIZE&&O*M<MAX_AREA)if(d.hideDialog(),"png"!=k&&"jpg"!=k&&
+"jpeg"!=k||!d.isExportToCanvas()){var u={globalVars:z.getExportVariables()};y&&(u.grid={size:z.gridSize,steps:z.view.gridSteps,color:z.view.gridColor});d.saveRequest(g,k,function(D,B){return new mxXmlRequest(EXPORT_URL,"format="+k+"&base64="+(B||"0")+(null!=D?"&filename="+encodeURIComponent(D):"")+"&extras="+encodeURIComponent(JSON.stringify(u))+(0<x?"&dpi="+x:"")+"&bg="+(null!=l?l:"none")+"&w="+O+"&h="+M+"&border="+q+"&xml="+encodeURIComponent(A))})}else"png"==k?d.exportImage(p,null==l||"none"==
+l,!0,!1,!1,q,!0,!1,null,y,x):d.exportImage(p,!1,!0,!1,!1,q,!0,!1,"jpeg",y);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,g="";if(null!=this.pages)for(var k=0;k<this.pages.length;k++){var l=d;this.currentPage!=this.pages[k]&&(l=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[k]),l.model.setRoot(this.pages[k].root));g+=this.pages[k].getName()+" "+l.getIndexableText()+
+" "}else g=d.getIndexableText();this.editor.graph.setEnabled(!0);return g};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var g={},k=document.createElement("div");k.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,mxUtils.htmlEntities(d));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";k.appendChild(l);var p=document.createElement("div");p.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";p.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+
IMAGE_PATH+'/spin.gif"></div>';var q={};try{var x=mxSettings.getCustomLibraries();for(d=0;d<x.length;d++){var y=x[d];if("R"==y.substring(0,1)){var z=JSON.parse(decodeURIComponent(y.substring(1)));q[z[0]]={id:z[0],title:z[1],downloadUrl:z[2]}}}}catch(A){}this.remoteInvoke("getCustomLibraries",null,null,function(A){p.innerHTML="";if(0==A.length)p.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var L=0;L<
A.length;L++){var O=A[L];q[O.id]&&(g[O.id]=O);var M=this.addCheckbox(p,O.title,q[O.id]);(function(u,D){mxEvent.addListener(D,"change",function(){this.checked?g[u.id]=u:delete g[u.id]})})(O,M)}},mxUtils.bind(this,function(A){p.innerHTML="";var L=document.createElement("div");L.style.padding="8px";L.style.textAlign="center";mxUtils.write(L,mxResources.get("error")+": ");mxUtils.write(L,null!=A&&null!=A.message?A.message:mxResources.get("unknownError"));p.appendChild(L)}));k.appendChild(p);k=new CustomDialog(this,
k,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var A=0,L;for(L in g)null==q[L]&&(A++,mxUtils.bind(this,function(O){this.remoteInvoke("getFileContent",[O.downloadUrl],null,mxUtils.bind(this,function(M){A--;0==A&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,M,O))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){A--;0==A&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(g[L]));
@@ -12125,28 +12125,28 @@ return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=f
function(d,g,k,l){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,g,k,l)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,g,k,l,p){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,g,k,l,p)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
urlParams.forceMigration)return null;for(var d=[],g=0;g<localStorage.length;g++){var k=localStorage.key(g),l=localStorage.getItem(k);if(0<k.length&&(".scratchpad"==k||"."!=k.charAt(0))&&0<l.length){var p="<mxfile "===l.substring(0,8)||"<?xml"===l.substring(0,5)||"\x3c!--[if IE]>"===l.substring(0,12);l="<mxlibrary>"===l.substring(0,11);(p||l)&&d.push(k)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
var g=localStorage.getItem(d);return{title:d,data:g,isLib:"<mxlibrary>"===g.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,f,c,m,n){function v(){for(var I=O.getElementsByTagName("div"),E=0,H=0;H<I.length;H++)"none"!=I[H].style.display&&I[H].parentNode==O&&E++;M.style.display=0==E?"block":"none"}function d(I,E,H,R){function W(){E.removeChild(U);E.removeChild(X);V.style.display="block";J.style.display="block"}z={div:E,comment:I,saveCallback:H,deleteOnCancel:R};var J=E.querySelector(".geCommentTxt"),V=E.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className=
-"geCommentEditTxtArea";U.style.minHeight=J.offsetHeight+"px";U.value=I.content;E.insertBefore(U,J);var X=document.createElement("div");X.className="geCommentEditBtns";var t=mxUtils.button(mxResources.get("cancel"),function(){R?(E.parentNode.removeChild(E),v()):W();z=null});t.className="geCommentEditBtn";X.appendChild(t);var F=mxUtils.button(mxResources.get("save"),function(){J.innerHTML="";I.content=U.value;mxUtils.write(J,I.content);W();H(I);z=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this,
-function(K){mxEvent.isConsumed(K)||((mxEvent.isControlDown(K)||mxClient.IS_MAC&&mxEvent.isMetaDown(K))&&13==K.keyCode?(F.click(),mxEvent.consume(K)):27==K.keyCode&&(t.click(),mxEvent.consume(K)))}));F.focus();F.className="geCommentEditBtn gePrimaryBtn";X.appendChild(F);E.insertBefore(X,J);V.style.display="none";J.style.display="none";U.focus()}function g(I,E){E.innerHTML="";I=new Date(I.modifiedDate);var H=b.timeSince(I);null==H&&(H=mxResources.get("lessThanAMinute"));mxUtils.write(E,mxResources.get("timeAgo",
-[H],"{1} ago"));E.setAttribute("title",I.toLocaleDateString()+" "+I.toLocaleTimeString())}function k(I){var E=document.createElement("img");E.className="geCommentBusyImg";E.src=IMAGE_PATH+"/spin.gif";I.appendChild(E);I.busyImg=E}function l(I){I.style.border="1px solid red";I.removeChild(I.busyImg)}function p(I){I.style.border="";I.removeChild(I.busyImg)}function q(I,E,H,R,W){function J(P,Q,S){var Y=document.createElement("li");Y.className="geCommentAction";var ca=document.createElement("a");ca.className=
-"geCommentActionLnk";mxUtils.write(ca,P);Y.appendChild(ca);mxEvent.addListener(ca,"click",function(da){Q(da,I);da.preventDefault();mxEvent.consume(da)});T.appendChild(Y);S&&(Y.style.display="none")}function V(){function P(Y){Q.push(S);if(null!=Y.replies)for(var ca=0;ca<Y.replies.length;ca++)S=S.nextSibling,P(Y.replies[ca])}var Q=[],S=X;P(I);return{pdiv:S,replies:Q}}function U(P,Q,S,Y,ca){function da(){k(ua);I.addReply(aa,function(ka){aa.id=ka;I.replies.push(aa);p(ua);S&&S()},function(ka){Z();l(ua);
-b.handleError(ka,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,ca)}function Z(){d(aa,ua,function(ka){da()},!0)}var ha=V().pdiv,aa=b.newComment(P,b.getCurrentUser());aa.pCommentId=I.id;null==I.replies&&(I.replies=[]);var ua=q(aa,I.replies,ha,R+1);Q?Z():da()}if(W||!I.isResolved){M.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",I.id);X.style.marginLeft=20*R+5+"px";I.isResolved&&!Editor.isDarkMode()&&
-(X.style.backgroundColor="ghostWhite");var t=document.createElement("div");t.className="geCommentHeader";var F=document.createElement("img");F.className="geCommentUserImg";F.src=I.user.pictureUrl||Editor.userImage;t.appendChild(F);F=document.createElement("div");F.className="geCommentHeaderTxt";t.appendChild(F);var K=document.createElement("div");K.className="geCommentUsername";mxUtils.write(K,I.user.displayName||"");F.appendChild(K);K=document.createElement("div");K.className="geCommentDate";K.setAttribute("data-commentId",
-I.id);g(I,K);F.appendChild(K);X.appendChild(t);t=document.createElement("div");t.className="geCommentTxt";mxUtils.write(t,I.content||"");X.appendChild(t);I.isLocked&&(X.style.opacity="0.5");t=document.createElement("div");t.className="geCommentActions";var T=document.createElement("ul");T.className="geCommentActionsList";t.appendChild(T);x||I.isLocked||0!=R&&!y||J(mxResources.get("reply"),function(){U("",!0)},I.isResolved);F=b.getCurrentUser();null==F||F.id!=I.user.id||x||I.isLocked||(J(mxResources.get("edit"),
+var CommentsWindow=function(b,e,f,c,m,n){function v(){for(var I=O.getElementsByTagName("div"),F=0,H=0;H<I.length;H++)"none"!=I[H].style.display&&I[H].parentNode==O&&F++;M.style.display=0==F?"block":"none"}function d(I,F,H,R){function W(){F.removeChild(U);F.removeChild(X);V.style.display="block";J.style.display="block"}z={div:F,comment:I,saveCallback:H,deleteOnCancel:R};var J=F.querySelector(".geCommentTxt"),V=F.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className=
+"geCommentEditTxtArea";U.style.minHeight=J.offsetHeight+"px";U.value=I.content;F.insertBefore(U,J);var X=document.createElement("div");X.className="geCommentEditBtns";var t=mxUtils.button(mxResources.get("cancel"),function(){R?(F.parentNode.removeChild(F),v()):W();z=null});t.className="geCommentEditBtn";X.appendChild(t);var E=mxUtils.button(mxResources.get("save"),function(){J.innerHTML="";I.content=U.value;mxUtils.write(J,I.content);W();H(I);z=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this,
+function(K){mxEvent.isConsumed(K)||((mxEvent.isControlDown(K)||mxClient.IS_MAC&&mxEvent.isMetaDown(K))&&13==K.keyCode?(E.click(),mxEvent.consume(K)):27==K.keyCode&&(t.click(),mxEvent.consume(K)))}));E.focus();E.className="geCommentEditBtn gePrimaryBtn";X.appendChild(E);F.insertBefore(X,J);V.style.display="none";J.style.display="none";U.focus()}function g(I,F){F.innerHTML="";I=new Date(I.modifiedDate);var H=b.timeSince(I);null==H&&(H=mxResources.get("lessThanAMinute"));mxUtils.write(F,mxResources.get("timeAgo",
+[H],"{1} ago"));F.setAttribute("title",I.toLocaleDateString()+" "+I.toLocaleTimeString())}function k(I){var F=document.createElement("img");F.className="geCommentBusyImg";F.src=IMAGE_PATH+"/spin.gif";I.appendChild(F);I.busyImg=F}function l(I){I.style.border="1px solid red";I.removeChild(I.busyImg)}function p(I){I.style.border="";I.removeChild(I.busyImg)}function q(I,F,H,R,W){function J(P,Q,S){var Y=document.createElement("li");Y.className="geCommentAction";var ba=document.createElement("a");ba.className=
+"geCommentActionLnk";mxUtils.write(ba,P);Y.appendChild(ba);mxEvent.addListener(ba,"click",function(da){Q(da,I);da.preventDefault();mxEvent.consume(da)});T.appendChild(Y);S&&(Y.style.display="none")}function V(){function P(Y){Q.push(S);if(null!=Y.replies)for(var ba=0;ba<Y.replies.length;ba++)S=S.nextSibling,P(Y.replies[ba])}var Q=[],S=X;P(I);return{pdiv:S,replies:Q}}function U(P,Q,S,Y,ba){function da(){k(ha);I.addReply(ea,function(ma){ea.id=ma;I.replies.push(ea);p(ha);S&&S()},function(ma){Z();l(ha);
+b.handleError(ma,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,ba)}function Z(){d(ea,ha,function(ma){da()},!0)}var ja=V().pdiv,ea=b.newComment(P,b.getCurrentUser());ea.pCommentId=I.id;null==I.replies&&(I.replies=[]);var ha=q(ea,I.replies,ja,R+1);Q?Z():da()}if(W||!I.isResolved){M.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",I.id);X.style.marginLeft=20*R+5+"px";I.isResolved&&!Editor.isDarkMode()&&
+(X.style.backgroundColor="ghostWhite");var t=document.createElement("div");t.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=I.user.pictureUrl||Editor.userImage;t.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";t.appendChild(E);var K=document.createElement("div");K.className="geCommentUsername";mxUtils.write(K,I.user.displayName||"");E.appendChild(K);K=document.createElement("div");K.className="geCommentDate";K.setAttribute("data-commentId",
+I.id);g(I,K);E.appendChild(K);X.appendChild(t);t=document.createElement("div");t.className="geCommentTxt";mxUtils.write(t,I.content||"");X.appendChild(t);I.isLocked&&(X.style.opacity="0.5");t=document.createElement("div");t.className="geCommentActions";var T=document.createElement("ul");T.className="geCommentActionsList";t.appendChild(T);x||I.isLocked||0!=R&&!y||J(mxResources.get("reply"),function(){U("",!0)},I.isResolved);E=b.getCurrentUser();null==E||E.id!=I.user.id||x||I.isLocked||(J(mxResources.get("edit"),
function(){function P(){d(I,X,function(){k(X);I.editComment(I.content,function(){p(X)},function(Q){l(X);P();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}P()},I.isResolved),J(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){k(X);I.deleteComment(function(P){if(!0===P){P=X.querySelector(".geCommentTxt");P.innerHTML="";mxUtils.write(P,mxResources.get("msgDeleted"));var Q=X.querySelectorAll(".geCommentAction");for(P=
-0;P<Q.length;P++)Q[P].parentNode.removeChild(Q[P]);p(X);X.style.opacity="0.5"}else{Q=V(I).replies;for(P=0;P<Q.length;P++)O.removeChild(Q[P]);for(P=0;P<E.length;P++)if(E[P]==I){E.splice(P,1);break}M.style.display=0==O.getElementsByTagName("div").length?"block":"none"}},function(P){l(X);b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},I.isResolved));x||I.isLocked||0!=R||J(I.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(P){function Q(){var S=
-P.target;S.innerHTML="";I.isResolved=!I.isResolved;mxUtils.write(S,I.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Y=I.isResolved?"none":"",ca=V(I).replies,da=Editor.isDarkMode()?"transparent":I.isResolved?"ghostWhite":"white",Z=0;Z<ca.length;Z++){ca[Z].style.backgroundColor=da;for(var ha=ca[Z].querySelectorAll(".geCommentAction"),aa=0;aa<ha.length;aa++)ha[aa]!=S.parentNode&&(ha[aa].style.display=Y);B||(ca[Z].style.display="none")}v()}I.isResolved?U(mxResources.get("reOpened")+
+0;P<Q.length;P++)Q[P].parentNode.removeChild(Q[P]);p(X);X.style.opacity="0.5"}else{Q=V(I).replies;for(P=0;P<Q.length;P++)O.removeChild(Q[P]);for(P=0;P<F.length;P++)if(F[P]==I){F.splice(P,1);break}M.style.display=0==O.getElementsByTagName("div").length?"block":"none"}},function(P){l(X);b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},I.isResolved));x||I.isLocked||0!=R||J(I.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(P){function Q(){var S=
+P.target;S.innerHTML="";I.isResolved=!I.isResolved;mxUtils.write(S,I.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Y=I.isResolved?"none":"",ba=V(I).replies,da=Editor.isDarkMode()?"transparent":I.isResolved?"ghostWhite":"white",Z=0;Z<ba.length;Z++){ba[Z].style.backgroundColor=da;for(var ja=ba[Z].querySelectorAll(".geCommentAction"),ea=0;ea<ja.length;ea++)ja[ea]!=S.parentNode&&(ja[ea].style.display=Y);B||(ba[Z].style.display="none")}v()}I.isResolved?U(mxResources.get("reOpened")+
": ",!0,Q,!1,!0):U(mxResources.get("markedAsResolved"),!1,Q,!0)});X.appendChild(t);null!=H?O.insertBefore(X,H.nextSibling):O.appendChild(X);for(H=0;null!=I.replies&&H<I.replies.length;H++)t=I.replies[H],t.isResolved=I.isResolved,q(t,I.replies,null,R+1,W);null!=z&&(z.comment.id==I.id?(W=I.content,I.content=z.comment.content,d(I,X,z.saveCallback,z.deleteOnCancel),I.content=W):null==z.comment.id&&z.comment.pCommentId==I.id&&(O.appendChild(z.div),d(z.comment,z.div,z.saveCallback,z.deleteOnCancel)));return X}}
var x=!b.canComment(),y=b.canReplyToReplies(),z=null,A=document.createElement("div");A.className="geCommentsWin";A.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var L=EditorUi.compactUi?"26px":"30px",O=document.createElement("div");O.className="geCommentsList";O.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";O.style.bottom=parseInt(L)+7+"px";A.appendChild(O);var M=document.createElement("span");M.style.cssText="display:none;padding-top:10px;text-align:center;";
mxUtils.write(M,mxResources.get("noCommentsFound"));var u=document.createElement("div");u.className="geToolbarContainer geCommentsToolbar";u.style.height=L;u.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";u.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";L=document.createElement("a");L.className="geButton";if(!x){var D=L.cloneNode();D.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';D.setAttribute("title",mxResources.get("create")+
-"...");mxEvent.addListener(D,"click",function(I){function E(){d(H,R,function(W){k(R);b.addComment(W,function(J){W.id=J;C.push(W);p(R)},function(J){l(R);E();b.handleError(J,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var H=b.newComment("",b.getCurrentUser()),R=q(H,C,null,0);E();I.preventDefault();mxEvent.consume(I)});u.appendChild(D)}D=L.cloneNode();D.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';D.setAttribute("title",mxResources.get("showResolved"));
+"...");mxEvent.addListener(D,"click",function(I){function F(){d(H,R,function(W){k(R);b.addComment(W,function(J){W.id=J;C.push(W);p(R)},function(J){l(R);F();b.handleError(J,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var H=b.newComment("",b.getCurrentUser()),R=q(H,C,null,0);F();I.preventDefault();mxEvent.consume(I)});u.appendChild(D)}D=L.cloneNode();D.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';D.setAttribute("title",mxResources.get("showResolved"));
var B=!1;Editor.isDarkMode()&&(D.style.filter="invert(100%)");mxEvent.addListener(D,"click",function(I){this.className=(B=!B)?"geButton geCheckedBtn":"geButton";G();I.preventDefault();mxEvent.consume(I)});u.appendChild(D);b.commentsRefreshNeeded()&&(D=L.cloneNode(),D.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',D.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(D.style.filter="invert(100%)"),mxEvent.addListener(D,"click",function(I){G();
I.preventDefault();mxEvent.consume(I)}),u.appendChild(D));b.commentsSaveNeeded()&&(L=L.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',L.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(I){n();I.preventDefault();mxEvent.consume(I)}),u.appendChild(L));A.appendChild(u);var C=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=z)try{z.div=z.div.cloneNode(!0);
-var I=z.div.querySelector(".geCommentEditTxtArea"),E=z.div.querySelector(".geCommentEditBtns");z.comment.content=I.value;I.parentNode.removeChild(I);E.parentNode.removeChild(E)}catch(H){b.handleError(H)}O.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";y=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(H){function R(W){if(null!=W){W.sort(function(V,U){return new Date(V.modifiedDate)-
+var I=z.div.querySelector(".geCommentEditTxtArea"),F=z.div.querySelector(".geCommentEditBtns");z.comment.content=I.value;I.parentNode.removeChild(I);F.parentNode.removeChild(F)}catch(H){b.handleError(H)}O.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";y=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(H){function R(W){if(null!=W){W.sort(function(V,U){return new Date(V.modifiedDate)-
new Date(U.modifiedDate)});for(var J=0;J<W.length;J++)R(W[J].replies)}}H.sort(function(W,J){return new Date(W.modifiedDate)-new Date(J.modifiedDate)});O.innerHTML="";O.appendChild(M);M.style.display="block";C=H;for(H=0;H<C.length;H++)R(C[H].replies),q(C[H],C,null,0,B);null!=z&&null==z.comment.id&&null==z.comment.pCommentId&&(O.appendChild(z.div),d(z.comment,z.div,z.saveCallback,z.deleteOnCancel))},mxUtils.bind(this,function(H){O.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(H&&H.message?
-": "+H.message:""));this.hasError=!0})):O.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;u=mxUtils.bind(this,function(){function I(J){var V=H[J.id];if(null!=V)for(g(J,V),V=0;null!=J.replies&&V<J.replies.length;V++)I(J.replies[V])}if(this.window.isVisible()){for(var E=O.querySelectorAll(".geCommentDate"),H={},R=0;R<E.length;R++){var W=E[R];H[W.getAttribute("data-commentId")]=W}for(R=0;R<C.length;R++)I(C[R])}});setInterval(u,6E4);this.refreshCommentsTime=u;this.window=
-new mxWindow(mxResources.get("comments"),A,e,f,c,m,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(I,E){var H=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;I=Math.max(0,Math.min(I,(window.innerWidth||
-document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));E=Math.max(0,Math.min(E,H-this.table.clientHeight-48));this.getX()==I&&this.getY()==E||mxWindow.prototype.setLocation.apply(this,arguments)};var N=mxUtils.bind(this,function(){var I=this.window.getX(),E=this.window.getY();this.window.setLocation(I,E)});mxEvent.addListener(window,"resize",N);this.destroy=function(){mxEvent.removeListener(window,"resize",N);this.window.destroy()}},ConfirmDialog=function(b,e,f,
+": "+H.message:""));this.hasError=!0})):O.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;u=mxUtils.bind(this,function(){function I(J){var V=H[J.id];if(null!=V)for(g(J,V),V=0;null!=J.replies&&V<J.replies.length;V++)I(J.replies[V])}if(this.window.isVisible()){for(var F=O.querySelectorAll(".geCommentDate"),H={},R=0;R<F.length;R++){var W=F[R];H[W.getAttribute("data-commentId")]=W}for(R=0;R<C.length;R++)I(C[R])}});setInterval(u,6E4);this.refreshCommentsTime=u;this.window=
+new mxWindow(mxResources.get("comments"),A,e,f,c,m,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(I,F){var H=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;I=Math.max(0,Math.min(I,(window.innerWidth||
+document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));F=Math.max(0,Math.min(F,H-this.table.clientHeight-48));this.getX()==I&&this.getY()==F||mxWindow.prototype.setLocation.apply(this,arguments)};var N=mxUtils.bind(this,function(){var I=this.window.getX(),F=this.window.getY();this.window.setLocation(I,F)});mxEvent.addListener(window,"resize",N);this.destroy=function(){mxEvent.removeListener(window,"resize",N);this.window.destroy()}},ConfirmDialog=function(b,e,f,
c,m,n,v,d,g,k,l){var p=document.createElement("div");p.style.textAlign="center";l=null!=l?l:44;var q=document.createElement("div");q.style.padding="6px";q.style.overflow="auto";q.style.maxHeight=l+"px";q.style.lineHeight="1.2em";mxUtils.write(q,e);p.appendChild(q);null!=k&&(q=document.createElement("div"),q.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",k),q.appendChild(e),p.appendChild(q));k=document.createElement("div");k.style.textAlign="center";k.style.whiteSpace=
"nowrap";var x=document.createElement("input");x.setAttribute("type","checkbox");n=mxUtils.button(n||mxResources.get("cancel"),function(){b.hideDialog();null!=c&&c(x.checked)});n.className="geBtn";null!=d&&(n.innerHTML=d+"<br>"+n.innerHTML,n.style.paddingBottom="8px",n.style.paddingTop="8px",n.style.height="auto",n.style.width="40%");b.editor.cancelFirst&&k.appendChild(n);var y=mxUtils.button(m||mxResources.get("ok"),function(){b.hideDialog();null!=f&&f(x.checked)});k.appendChild(y);null!=v?(y.innerHTML=
v+"<br>"+y.innerHTML+"<br>",y.style.paddingBottom="8px",y.style.paddingTop="8px",y.style.height="auto",y.className="geBtn",y.style.width="40%"):y.className="geBtn gePrimaryBtn";b.editor.cancelFirst||k.appendChild(n);p.appendChild(k);g?(k.style.marginTop="10px",q=document.createElement("p"),q.style.marginTop="20px",q.style.marginBottom="0px",q.appendChild(x),m=document.createElement("span"),mxUtils.write(m," "+mxResources.get("rememberThisSetting")),q.appendChild(m),p.appendChild(q),mxEvent.addListener(m,
@@ -12341,16 +12341,16 @@ q=!0:p=z}catch(L){q=!0}}}else/\.pdf$/i.test(f.title)?(y=Editor.extractGraphModel
9)||/\.png$/i.test(f.title)||/\.jpe?g$/i.test(f.title)||/\.pdf$/i.test(f.title),null,null,null,d)});l()}}catch(p){if(null!=m)m(p);else throw p;}};DriveClient.prototype.saveFile=function(f,c,m,n,v,d,g,k,l){try{var p=0;f.saveLevel=1;var q=mxUtils.bind(this,function(C){if(null!=n)n(C);else throw C;try{if(!f.isConflict(C)){var G="sl_"+f.saveLevel+"-error_"+(f.getErrorMessage(C)||"unknown");null!=C&&null!=C.error&&null!=C.error.code&&(G+="-code_"+C.error.code);EditorUi.logEvent({category:"ERROR-SAVE-FILE-"+
f.getHash()+"-rev_"+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),action:G,label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}}catch(N){}}),x=mxUtils.bind(this,function(C){q(C);try{EditorUi.logError(C.message,null,null,
C)}catch(G){}});if(f.isEditable()&&null!=f.desc){var y=(new Date).getTime(),z=f.desc.etag,A=f.desc.modifiedDate,L=f.desc.headRevisionId,O=this.ui.useCanvasForExport&&/(\.png)$/i.test(f.getTitle());d=null!=d?d:!1;var M=null,u=!1,D={mimeType:f.desc.mimeType,title:f.getTitle()};if(this.isGoogleRealtimeMimeType(D.mimeType))D.mimeType=this.xmlMimeType,M=f.desc,u=c=!0;else if("application/octet-stream"==D.mimeType||"1"==urlParams["override-mime"]&&D.mimeType!=this.xmlMimeType)D.mimeType=this.xmlMimeType;
-var B=mxUtils.bind(this,function(C,G,N){try{f.saveLevel=3;f.constructor==DriveFile&&(null==k&&(k=[]),null==f.getChannelId()&&k.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&k.push({key:"key",value:Editor.guid(32)}),k.push({key:"secret",value:null!=l?l:Editor.guid(32)}));N||(null!=C||d||(C=this.placeholderThumbnail,G=this.placeholderMimeType),null!=C&&null!=G&&(D.thumbnail={image:C,mimeType:G}));var I=f.getData(),E=mxUtils.bind(this,function(W){try{if(f.saveDelay=(new Date).getTime()-
+var B=mxUtils.bind(this,function(C,G,N){try{f.saveLevel=3;f.constructor==DriveFile&&(null==k&&(k=[]),null==f.getChannelId()&&k.push({key:"channel",value:Editor.guid(32)}),null==f.getChannelKey()&&k.push({key:"key",value:Editor.guid(32)}),k.push({key:"secret",value:null!=l?l:Editor.guid(32)}));N||(null!=C||d||(C=this.placeholderThumbnail,G=this.placeholderMimeType),null!=C&&null!=G&&(D.thumbnail={image:C,mimeType:G}));var I=f.getData(),F=mxUtils.bind(this,function(W){try{if(f.saveDelay=(new Date).getTime()-
y,f.saveLevel=11,null==W)q({message:mxResources.get("errorSavingFile")+": Empty response"});else{var J=(new Date(W.modifiedDate)).getTime()-(new Date(A)).getTime();if(0>=J||z==W.etag||c&&L==W.headRevisionId){f.saveLevel=12;var V=[];0>=J&&V.push("invalid modified time");z==W.etag&&V.push("stale etag");c&&L==W.headRevisionId&&V.push("stale revision");var U=V.join(", ");q({message:mxResources.get("errorSavingFile")+": "+U},W);try{EditorUi.logError("Critical: Error saving to Google Drive "+f.desc.id,
null,"from-"+L+"."+A+"-"+this.ui.hashValue(z)+"-to-"+W.headRevisionId+"."+W.modifiedDate+"-"+this.ui.hashValue(W.etag)+(0<U.length?"-errors-"+U:""),"user-"+(null!=this.user?this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync"))}catch(X){}}else if(f.saveLevel=null,m(W,I),null!=M){this.executeRequest({url:"/files/"+M.id+"/revisions/"+M.headRevisionId+"?supportsAllDrives=true"},mxUtils.bind(this,mxUtils.bind(this,function(X){X.pinned=!0;this.executeRequest({url:"/files/"+M.id+"/revisions/"+
M.headRevisionId,method:"PUT",params:X})})));try{EditorUi.logEvent({category:f.convertedFrom+"-CONVERT-FILE-"+f.getHash(),action:"from_"+M.id+"."+M.headRevisionId+"-to_"+f.desc.id+"."+f.desc.headRevisionId,label:null!=this.user?"user_"+this.user.id:"nouser"+(null!=f.sync?"-client_"+f.sync.clientId:"nosync")})}catch(X){}}}}catch(X){x(X)}}),H=mxUtils.bind(this,function(W,J){f.saveLevel=4;try{null!=k&&(D.properties=k);var V=g||f.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?
-null:f.getCurrentEtag(),U=mxUtils.bind(this,function(F){f.saveLevel=5;try{var K=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&f.desc.mimeType!=this.libraryMimeType,T=!0,P=null;try{P=window.setTimeout(mxUtils.bind(this,function(){T=!1;q({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Q){}this.executeRequest(this.createUploadRequest(f.getId(),D,W,c||F||K,J,F?null:V,u),mxUtils.bind(this,function(Q){window.clearTimeout(P);T&&E(Q)}),mxUtils.bind(this,function(Q){window.clearTimeout(P);
+null:f.getCurrentEtag(),U=mxUtils.bind(this,function(E){f.saveLevel=5;try{var K=f.desc.mimeType!=this.xmlMimeType&&f.desc.mimeType!=this.mimeType&&f.desc.mimeType!=this.libraryMimeType,T=!0,P=null;try{P=window.setTimeout(mxUtils.bind(this,function(){T=!1;q({code:App.ERROR_TIMEOUT})}),5*this.ui.timeout)}catch(Q){}this.executeRequest(this.createUploadRequest(f.getId(),D,W,c||E||K,J,E?null:V,u),mxUtils.bind(this,function(Q){window.clearTimeout(P);T&&F(Q)}),mxUtils.bind(this,function(Q){window.clearTimeout(P);
if(T){f.saveLevel=6;try{f.isConflict(Q)?this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(S){f.saveLevel=7;try{if(null!=S&&S.etag==V)if(p<this.staleEtagMaxRetries){p++;var Y=2*p*this.coolOff*(1+.1*(Math.random()-.5));window.setTimeout(X,Y);"1"==urlParams.test&&EditorUi.debug("DriveClient: Stale Etag Detected","retry",p,"delay",Y)}else{X(!0);try{EditorUi.logEvent({category:"STALE-ETAG-SAVE-FILE-"+f.getHash(),action:"rev_"+
-f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(ca){}}else"1"==urlParams.test&&S.headRevisionId==L&&EditorUi.debug("DriveClient: Remote Etag Changed","local",V,
-"remote",S.etag,"rev",f.desc.headRevisionId,"response",[S],"file",[f]),q(Q,S)}catch(ca){x(ca)}}),mxUtils.bind(this,function(){q(Q)})):q(Q)}catch(S){x(S)}}}))}catch(Q){x(Q)}}),X=mxUtils.bind(this,function(F){f.saveLevel=9;if(F||null==V)U(F);else{var K=!0,T=null;try{T=window.setTimeout(mxUtils.bind(this,function(){K=!1;q({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(P){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(P){window.clearTimeout(T);
-if(K){f.saveLevel=10;try{null!=P&&P.headRevisionId==L?("1"==urlParams.test&&V!=P.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",V,"to",P.etag,"rev",f.desc.headRevisionId,"response",[P],"file",[f]),V=P.etag,U(F)):q({error:{code:412}},P)}catch(Q){x(Q)}}}),mxUtils.bind(this,function(P){window.clearTimeout(T);K&&(f.saveLevel=11,q(P))}))}});if(O&&null==C){f.saveLevel=8;var t=new Image;t.onload=mxUtils.bind(this,function(){try{var F=this.thumbnailWidth/t.width,K=document.createElement("canvas");
-K.width=this.thumbnailWidth;K.height=Math.floor(t.height*F);K.getContext("2d").drawImage(t,0,0,K.width,K.height);var T=K.toDataURL();T=T.substring(T.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");D.thumbnail={image:T,mimeType:"image/png"};X(!1)}catch(P){try{X(!1)}catch(Q){x(Q)}}});t.src="data:image/png;base64,"+W}else X(!1)}catch(F){x(F)}});if(O){var R=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(W){H(W,!0)}),q,this.ui.getCurrentFile()!=f?
+f.desc.headRevisionId+"-mod_"+f.desc.modifiedDate+"-size_"+f.getSize()+"-mime_"+f.desc.mimeType+(this.ui.editor.autosave?"":"-nosave")+(f.isAutosave()?"":"-noauto")+(f.changeListenerEnabled?"":"-nolisten")+(f.inConflictState?"-conflict":"")+(f.invalidChecksum?"-invalid":""),label:(null!=this.user?"user_"+this.user.id:"nouser")+(null!=f.sync?"-client_"+f.sync.clientId:"-nosync")})}catch(ba){}}else"1"==urlParams.test&&S.headRevisionId==L&&EditorUi.debug("DriveClient: Remote Etag Changed","local",V,
+"remote",S.etag,"rev",f.desc.headRevisionId,"response",[S],"file",[f]),q(Q,S)}catch(ba){x(ba)}}),mxUtils.bind(this,function(){q(Q)})):q(Q)}catch(S){x(S)}}}))}catch(Q){x(Q)}}),X=mxUtils.bind(this,function(E){f.saveLevel=9;if(E||null==V)U(E);else{var K=!0,T=null;try{T=window.setTimeout(mxUtils.bind(this,function(){K=!1;q({code:App.ERROR_TIMEOUT})}),3*this.ui.timeout)}catch(P){}this.executeRequest({url:"/files/"+f.getId()+"?supportsAllDrives=true&fields="+this.catchupFields},mxUtils.bind(this,function(P){window.clearTimeout(T);
+if(K){f.saveLevel=10;try{null!=P&&P.headRevisionId==L?("1"==urlParams.test&&V!=P.etag&&EditorUi.debug("DriveClient: Preflight Etag Update","from",V,"to",P.etag,"rev",f.desc.headRevisionId,"response",[P],"file",[f]),V=P.etag,U(E)):q({error:{code:412}},P)}catch(Q){x(Q)}}}),mxUtils.bind(this,function(P){window.clearTimeout(T);K&&(f.saveLevel=11,q(P))}))}});if(O&&null==C){f.saveLevel=8;var t=new Image;t.onload=mxUtils.bind(this,function(){try{var E=this.thumbnailWidth/t.width,K=document.createElement("canvas");
+K.width=this.thumbnailWidth;K.height=Math.floor(t.height*E);K.getContext("2d").drawImage(t,0,0,K.width,K.height);var T=K.toDataURL();T=T.substring(T.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");D.thumbnail={image:T,mimeType:"image/png"};X(!1)}catch(P){try{X(!1)}catch(Q){x(Q)}}});t.src="data:image/png;base64,"+W}else X(!1)}catch(E){x(E)}});if(O){var R=this.ui.getPngFileProperties(this.ui.fileNode);this.ui.getEmbeddedPng(mxUtils.bind(this,function(W){H(W,!0)}),q,this.ui.getCurrentFile()!=f?
I:null,R.scale,R.border)}else H(I,!1)}catch(W){x(W)}});try{f.saveLevel=2,(d||O||f.constructor==DriveLibrary||!this.enableThumbnails||"0"==urlParams.thumb||null!=D.mimeType&&"application/vnd.jgraph.mxfile"!=D.mimeType.substring(0,29)||!this.ui.getThumbnail(this.thumbnailWidth,mxUtils.bind(this,function(C){try{var G=null;try{null!=C&&(G=C.toDataURL("image/png")),null!=G&&(G=G.length>this.maxThumbnailSize?null:G.substring(G.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_"))}catch(N){G=null}B(G,"image/png")}catch(N){x(N)}})))&&
B(null,null,f.constructor!=DriveLibrary)}catch(C){x(C)}}else this.ui.editor.graph.reset(),q({message:mxResources.get("readOnly")})}catch(C){x(C)}};DriveClient.prototype.insertFile=function(f,c,m,n,v,d,g){d=null!=d?d:this.xmlMimeType;f={mimeType:d,title:f};null!=m&&(f.parents=[{kind:"drive#fileLink",id:m}]);this.executeRequest(this.createUploadRequest(null,f,c,!1,g),mxUtils.bind(this,function(k){d==this.libraryMimeType?n(new DriveLibrary(this.ui,c,k)):0==k?null!=v&&v({message:mxResources.get("errorSavingFile")}):
n(new DriveFile(this.ui,c,k))}),v)};DriveClient.prototype.createUploadRequest=function(f,c,m,n,v,d,g){v=null!=v?v:!1;var k={"Content-Type":'multipart/mixed; boundary="-------314159265358979323846"'};null!=d&&(k["If-Match"]=d);f={fullUrl:"https://content.googleapis.com/upload/drive/v2/files"+(null!=f?"/"+f:"")+"?uploadType=multipart&supportsAllDrives=true&enforceSingleParent=true&fields="+this.allFields,method:null!=f?"PUT":"POST",headers:k,params:"\r\n---------314159265358979323846\r\nContent-Type: application/json\r\n\r\n"+
@@ -12483,15 +12483,15 @@ function(){M()})],[mxResources.get("authorize"),mxUtils.bind(this,function(){thi
C&&(G.style.textDecoration="underline");null!=B&&(u=l.cloneNode(),u.style.padding=B,u.appendChild(G),G=u);return G}),x=mxUtils.bind(this,function(u){var D=document.createElement("div");D.style.marginBottom="8px";D.appendChild(q(c+"/"+m,mxUtils.bind(this,function(){v=null;M()}),null,!0));u||(mxUtils.write(D," / "),D.appendChild(q(decodeURIComponent(n),mxUtils.bind(this,function(){v=null;O()}),null,!0)));if(null!=v&&0<v.length){var B=v.split("/");for(u=0;u<B.length;u++)(function(C){mxUtils.write(D,
" / ");D.appendChild(q(B[C],mxUtils.bind(this,function(){v=B.slice(0,C+1).join("/");L()}),null,!0))})(u)}k.appendChild(D)}),y=mxUtils.bind(this,function(u){this.ui.handleError(u,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=n=m=c=null,M()):this.ui.hideDialog()}),null,{})}),z=null,A=null,L=mxUtils.bind(this,function(u){null==u&&(k.innerHTML="",u=1);var D=new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+m+"/contents/"+v+"?ref="+encodeURIComponent(n)+"&per_page=100&page="+
u,null,"GET");this.ui.spinner.spin(k,mxResources.get("loading"));p.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){L(u+1)});mxEvent.addListener(z,"click",B);this.executeRequest(D,mxUtils.bind(this,function(C){this.ui.spinner.stop();1==u&&(x(),
-k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,M();else{var E=v.split("/");v=E.slice(0,E.length-1).join("/");L()}}),"4px")));var G=JSON.parse(C.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else{var N=!0,I=0;C=mxUtils.bind(this,function(E){for(var H=0;H<G.length;H++)mxUtils.bind(this,function(R,W){if(E==("dir"==R.type)){W=l.cloneNode();W.style.backgroundColor=N?Editor.isDarkMode()?"#000000":"#eeeeee":"";N=!N;var J=document.createElement("img");
+k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,M();else{var F=v.split("/");v=F.slice(0,F.length-1).join("/");L()}}),"4px")));var G=JSON.parse(C.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else{var N=!0,I=0;C=mxUtils.bind(this,function(F){for(var H=0;H<G.length;H++)mxUtils.bind(this,function(R,W){if(F==("dir"==R.type)){W=l.cloneNode();W.style.backgroundColor=N?Editor.isDarkMode()?"#000000":"#eeeeee":"";N=!N;var J=document.createElement("img");
J.src=IMAGE_PATH+"/"+("dir"==R.type?"folder.png":"file.png");J.setAttribute("align","absmiddle");J.style.marginRight="4px";J.style.marginTop="-4px";J.width=20;W.appendChild(J);W.appendChild(q(R.name+("dir"==R.type?"/":""),mxUtils.bind(this,function(){"dir"==R.type?(v=R.path,L()):e&&"file"==R.type&&(this.ui.hideDialog(),f(c+"/"+m+"/"+encodeURIComponent(n)+"/"+R.path))})));k.appendChild(W);I++}})(G[H],H)});C(!0);e&&C(!1)}}),y,!0)}),O=mxUtils.bind(this,function(u,D){null==u&&(k.innerHTML="",u=1);var B=
new mxXmlRequest(this.baseUrl+"/repos/"+c+"/"+m+"/branches?per_page=100&page="+u,null,"GET");p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var C=mxUtils.bind(this,function(){O(u+1)});mxEvent.addListener(z,"click",
-C);this.executeRequest(B,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==u&&(x(!0),k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){v=null;M()}),"4px")));G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else if(1==G.length&&D)n=G[0].name,v="",L();else{for(var N=0;N<G.length;N++)mxUtils.bind(this,function(I,E){var H=l.cloneNode();H.style.backgroundColor=0==E%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(q(I.name,mxUtils.bind(this,
+C);this.executeRequest(B,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==u&&(x(!0),k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){v=null;M()}),"4px")));G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else if(1==G.length&&D)n=G[0].name,v="",L();else{for(var N=0;N<G.length;N++)mxUtils.bind(this,function(I,F){var H=l.cloneNode();H.style.backgroundColor=0==F%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(q(I.name,mxUtils.bind(this,
function(){n=I.name;v="";L()})));k.appendChild(H)})(G[N],N);100==G.length&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&C()},mxEvent.addListener(k,"scroll",A))}}),y)}),M=mxUtils.bind(this,function(u){null==u&&(k.innerHTML="",u=1);var D=new mxXmlRequest(this.baseUrl+"/user/repos?per_page=100&page="+u,null,"GET");p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=A&&mxEvent.removeListener(k,"scroll",A);null!=z&&null!=
z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){M(u+1)});mxEvent.addListener(z,"click",B);this.executeRequest(D,mxUtils.bind(this,function(C){this.ui.spinner.stop();C=JSON.parse(C.getText());if(null==C||0==C.length)mxUtils.write(k,mxResources.get("noFiles"));else{1==u&&(k.appendChild(q(mxResources.get("enterValue")+"...",mxUtils.bind(this,function(){var N=
-new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(I){if(null!=I){var E=I.split("/");if(1<E.length){I=E[0];var H=E[1];3>E.length?(c=I,m=H,v=n=null,O()):this.ui.spinner.spin(k,mxResources.get("loading"))&&(E=encodeURIComponent(E.slice(2,E.length).join("/")),this.getFile(I+"/"+H+"/"+E,mxUtils.bind(this,function(R){this.ui.spinner.stop();c=R.meta.org;m=R.meta.repo;n=decodeURIComponent(R.meta.ref);v="";L()}),mxUtils.bind(this,function(R){this.ui.spinner.stop();
-this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(N.container,300,80,!0,!1);N.init()}))),mxUtils.br(k),mxUtils.br(k));for(var G=0;G<C.length;G++)mxUtils.bind(this,function(N,I){var E=l.cloneNode();E.style.backgroundColor=0==I%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";E.appendChild(q(N.full_name,mxUtils.bind(this,function(){c=N.owner.login;
-m=N.name;v="";O(null,!0)})));k.appendChild(E)})(C[G],G)}100==C.length&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&B()},mxEvent.addListener(k,"scroll",A))}),y)});M()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
+new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(I){if(null!=I){var F=I.split("/");if(1<F.length){I=F[0];var H=F[1];3>F.length?(c=I,m=H,v=n=null,O()):this.ui.spinner.spin(k,mxResources.get("loading"))&&(F=encodeURIComponent(F.slice(2,F.length).join("/")),this.getFile(I+"/"+H+"/"+F,mxUtils.bind(this,function(R){this.ui.spinner.stop();c=R.meta.org;m=R.meta.repo;n=decodeURIComponent(R.meta.ref);v="";L()}),mxUtils.bind(this,function(R){this.ui.spinner.stop();
+this.ui.handleError({message:mxResources.get("fileNotFound")})})))}else this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})}}),mxResources.get("enterValue"));this.ui.showDialog(N.container,300,80,!0,!1);N.init()}))),mxUtils.br(k),mxUtils.br(k));for(var G=0;G<C.length;G++)mxUtils.bind(this,function(N,I){var F=l.cloneNode();F.style.backgroundColor=0==I%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";F.appendChild(q(N.full_name,mxUtils.bind(this,function(){c=N.owner.login;
+m=N.name;v="";O(null,!0)})));k.appendChild(F)})(C[G],G)}100==C.length&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&B()},mxEvent.addListener(k,"scroll",A))}),y)});M()};GitHubClient.prototype.logout=function(){this.clearPersistentToken();this.setUser(null);b=null}})();TrelloFile=function(b,e,f){DrawioFile.call(this,b,e);this.meta=f;this.saveNeededCounter=0};mxUtils.extend(TrelloFile,DrawioFile);TrelloFile.prototype.getHash=function(){return"T"+encodeURIComponent(this.meta.compoundId)};TrelloFile.prototype.getMode=function(){return App.MODE_TRELLO};TrelloFile.prototype.isAutosave=function(){return!0};TrelloFile.prototype.getTitle=function(){return this.meta.name};TrelloFile.prototype.isRenamable=function(){return!1};TrelloFile.prototype.getSize=function(){return this.meta.bytes};
TrelloFile.prototype.save=function(b,e,f){this.doSave(this.getTitle(),e,f)};TrelloFile.prototype.saveAs=function(b,e,f){this.doSave(b,e,f)};TrelloFile.prototype.doSave=function(b,e,f){var c=this.meta.name;this.meta.name=b;DrawioFile.prototype.save.apply(this,[null,mxUtils.bind(this,function(){this.meta.name=c;this.saveFile(b,!1,e,f)}),f])};
TrelloFile.prototype.saveFile=function(b,e,f,c){this.isEditable()?this.savingFile?null!=c&&(this.saveNeededCounter++,c({code:App.ERROR_BUSY})):(this.savingFileTime=new Date,this.setShadowModified(!1),this.savingFile=!0,this.getTitle()==b?this.ui.trello.saveFile(this,mxUtils.bind(this,function(m){this.setModified(this.getShadowModified());this.savingFile=!1;this.meta=m;this.contentChanged();null!=f&&f();0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,
function(m){this.savingFile=!1;null!=c&&c(m)})):this.ui.pickFolder(App.MODE_TRELLO,mxUtils.bind(this,function(m){this.ui.trello.insertFile(b,this.getData(),mxUtils.bind(this,function(n){this.savingFile=!1;null!=f&&f();this.ui.fileLoaded(n);0<this.saveNeededCounter&&(this.saveNeededCounter--,this.saveFile(b,e,f,c))}),mxUtils.bind(this,function(){this.savingFile=!1;null!=c&&c()}),!1,m)}))):null!=f&&f()};TrelloLibrary=function(b,e,f){TrelloFile.call(this,b,e,f)};mxUtils.extend(TrelloLibrary,TrelloFile);TrelloLibrary.prototype.doSave=function(b,e,f){this.saveFile(b,!1,e,f)};TrelloLibrary.prototype.open=function(){};TrelloClient=function(b){DrawioClient.call(this,b,"tauth");Trello.setKey(this.key)};mxUtils.extend(TrelloClient,DrawioClient);TrelloClient.prototype.key="e89d109082298ce91f6576f82f458551";TrelloClient.prototype.baseUrl="https://api.trello.com/1/";TrelloClient.prototype.SEPARATOR="|$|";TrelloClient.prototype.maxFileSize=1E7;TrelloClient.prototype.extension=".xml";
@@ -12537,38 +12537,38 @@ encodeURIComponent(f))});this.showGitLabDialog(!0,e)};GitLabClient.prototype.sho
370,!0,!0);e&&p.okButton.parentNode.removeChild(p.okButton);var q=mxUtils.bind(this,function(u,D,B,C){var G=document.createElement("a");G.setAttribute("title",u);G.style.cursor="pointer";mxUtils.write(G,u);mxEvent.addListener(G,"click",D);C&&(G.style.textDecoration="underline");null!=B&&(u=l.cloneNode(),u.style.padding=B,u.appendChild(G),G=u);return G}),x=mxUtils.bind(this,function(u){var D=document.createElement("div");D.style.marginBottom="8px";D.appendChild(q(c+"/"+m,mxUtils.bind(this,function(){v=
null;M()}),null,!0));u||(mxUtils.write(D," / "),D.appendChild(q(decodeURIComponent(n),mxUtils.bind(this,function(){v=null;O()}),null,!0)));if(null!=v&&0<v.length){var B=v.split("/");for(u=0;u<B.length;u++)(function(C){mxUtils.write(D," / ");D.appendChild(q(B[C],mxUtils.bind(this,function(){v=B.slice(0,C+1).join("/");L()}),null,!0))})(u)}k.appendChild(D)}),y=mxUtils.bind(this,function(u){this.ui.handleError(u,null,mxUtils.bind(this,function(){this.ui.spinner.stop();null!=this.getUser()?(v=n=m=c=null,
M()):this.ui.hideDialog()}))}),z=null,A=null,L=mxUtils.bind(this,function(u){null==u&&(k.innerHTML="",u=1);var D=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+m)+"/repository/tree?path="+v+"&ref="+n+"&per_page=100&page="+u,null,"GET");this.ui.spinner.spin(k,mxResources.get("loading"));p.okButton.removeAttribute("disabled");null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display=
-"block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){L(u+1)});mxEvent.addListener(z,"click",B);this.executeRequest(D,mxUtils.bind(this,function(C){this.ui.spinner.stop();1==u&&(x(!n),k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,M();else{var E=v.split("/");v=E.slice(0,E.length-1).join("/");L()}}),"4px")));var G=JSON.parse(C.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else{var N=
-!0,I=0;C=mxUtils.bind(this,function(E){for(var H=0;H<G.length;H++)mxUtils.bind(this,function(R){if(E==("tree"==R.type)){var W=l.cloneNode();W.style.backgroundColor=N?Editor.isDarkMode()?"#000000":"#eeeeee":"";N=!N;var J=document.createElement("img");J.src=IMAGE_PATH+"/"+("tree"==R.type?"folder.png":"file.png");J.setAttribute("align","absmiddle");J.style.marginRight="4px";J.style.marginTop="-4px";J.width=20;W.appendChild(J);W.appendChild(q(R.name+("tree"==R.type?"/":""),mxUtils.bind(this,function(){"tree"==
+"block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var B=mxUtils.bind(this,function(){L(u+1)});mxEvent.addListener(z,"click",B);this.executeRequest(D,mxUtils.bind(this,function(C){this.ui.spinner.stop();1==u&&(x(!n),k.appendChild(q("../ [Up]",mxUtils.bind(this,function(){if(""==v)v=null,M();else{var F=v.split("/");v=F.slice(0,F.length-1).join("/");L()}}),"4px")));var G=JSON.parse(C.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else{var N=
+!0,I=0;C=mxUtils.bind(this,function(F){for(var H=0;H<G.length;H++)mxUtils.bind(this,function(R){if(F==("tree"==R.type)){var W=l.cloneNode();W.style.backgroundColor=N?Editor.isDarkMode()?"#000000":"#eeeeee":"";N=!N;var J=document.createElement("img");J.src=IMAGE_PATH+"/"+("tree"==R.type?"folder.png":"file.png");J.setAttribute("align","absmiddle");J.style.marginRight="4px";J.style.marginTop="-4px";J.width=20;W.appendChild(J);W.appendChild(q(R.name+("tree"==R.type?"/":""),mxUtils.bind(this,function(){"tree"==
R.type?(v=R.path,L()):e&&"blob"==R.type&&(this.ui.hideDialog(),f(c+"/"+m+"/"+n+"/"+R.path))})));k.appendChild(W);I++}})(G[H])});C(!0);e&&C(!1);100==I&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&B()},mxEvent.addListener(k,"scroll",A))}}),y,!0)}),O=mxUtils.bind(this,function(u,D){null==u&&(k.innerHTML="",u=1);var B=new mxXmlRequest(this.baseUrl+"/projects/"+encodeURIComponent(c+"/"+m)+"/repository/branches?per_page=100&page="+u,null,"GET");p.okButton.setAttribute("disabled",
"disabled");this.ui.spinner.spin(k,mxResources.get("loading"));null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var C=mxUtils.bind(this,function(){O(u+1)});mxEvent.addListener(z,"click",C);this.executeRequest(B,mxUtils.bind(this,function(G){this.ui.spinner.stop();1==u&&(x(!0),k.appendChild(q("../ [Up]",mxUtils.bind(this,
-function(){v=null;M()}),"4px")));G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else if(1==G.length&&D)n=G[0].name,v="",L();else{for(var N=0;N<G.length;N++)mxUtils.bind(this,function(I,E){var H=l.cloneNode();H.style.backgroundColor=0==E%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(q(I.name,mxUtils.bind(this,function(){n=encodeURIComponent(I.name);v="";L()})));k.appendChild(H)})(G[N],N);100==G.length&&(k.appendChild(z),A=function(){k.scrollTop>=
+function(){v=null;M()}),"4px")));G=JSON.parse(G.getText());if(null==G||0==G.length)mxUtils.write(k,mxResources.get("noFiles"));else if(1==G.length&&D)n=G[0].name,v="",L();else{for(var N=0;N<G.length;N++)mxUtils.bind(this,function(I,F){var H=l.cloneNode();H.style.backgroundColor=0==F%2?Editor.isDarkMode()?"#000000":"#eeeeee":"";H.appendChild(q(I.name,mxUtils.bind(this,function(){n=encodeURIComponent(I.name);v="";L()})));k.appendChild(H)})(G[N],N);100==G.length&&(k.appendChild(z),A=function(){k.scrollTop>=
k.scrollHeight-k.offsetHeight&&C()},mxEvent.addListener(k,"scroll",A))}}),y)});p.okButton.setAttribute("disabled","disabled");this.ui.spinner.spin(k,mxResources.get("loading"));var M=mxUtils.bind(this,function(u){var D=this.ui.spinner,B=0;this.ui.spinner.stop();var C=function(){D.spin(k,mxResources.get("loading"));B+=1},G=function(){--B;0===B&&D.stop()};null==u&&(k.innerHTML="",u=1);null!=A&&(mxEvent.removeListener(k,"scroll",A),A=null);null!=z&&null!=z.parentNode&&z.parentNode.removeChild(z);z=document.createElement("a");
-z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var N=mxUtils.bind(this,function(){0===B&&M(u+1)});mxEvent.addListener(z,"click",N);var I=mxUtils.bind(this,function(H){C();var R=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(R,mxUtils.bind(this,function(W){H(JSON.parse(W.getText()));G()}),y)}),E=mxUtils.bind(this,function(H,R){C();var W=new mxXmlRequest(this.baseUrl+"/groups/"+H.id+"/projects?per_page=100",null,
+z.style.display="block";z.style.cursor="pointer";mxUtils.write(z,mxResources.get("more")+"...");var N=mxUtils.bind(this,function(){0===B&&M(u+1)});mxEvent.addListener(z,"click",N);var I=mxUtils.bind(this,function(H){C();var R=new mxXmlRequest(this.baseUrl+"/groups?per_page=100",null,"GET");this.executeRequest(R,mxUtils.bind(this,function(W){H(JSON.parse(W.getText()));G()}),y)}),F=mxUtils.bind(this,function(H,R){C();var W=new mxXmlRequest(this.baseUrl+"/groups/"+H.id+"/projects?per_page=100",null,
"GET");this.executeRequest(W,mxUtils.bind(this,function(J){R(H,JSON.parse(J.getText()));G()}),y)});I(mxUtils.bind(this,function(H){if(null==this.user)mxUtils.write(k,mxResources.get("loggedOut"));else{C();var R=new mxXmlRequest(this.baseUrl+"/users/"+this.user.id+"/projects?per_page=100&page="+u,null,"GET");this.executeRequest(R,mxUtils.bind(this,function(W){W=JSON.parse(W.getText());if(null!=W&&0!=W.length||null!=H&&0!=H.length){1==u&&(k.appendChild(q(mxResources.get("enterValue")+"...",mxUtils.bind(this,
function(){if(0===B){var U=new FilenameDialog(this.ui,"org/repo/ref",mxResources.get("ok"),mxUtils.bind(this,function(X){null!=X&&(X=X.split("/"),1<X.length?(c=X[0],m=X[1],n=v=null,2<X.length?(n=encodeURIComponent(X.slice(2,X.length).join("/")),L()):O(null,!0)):(this.ui.spinner.stop(),this.ui.handleError({message:mxResources.get("invalidName")})))}),mxResources.get("enterValue"));this.ui.showDialog(U.container,300,80,!0,!1);U.init()}}))),mxUtils.br(k),mxUtils.br(k));for(var J=!0,V=0;V<W.length;V++)mxUtils.bind(this,
-function(U){var X=l.cloneNode();X.style.backgroundColor=J?Editor.isDarkMode()?"#000000":"#eeeeee":"";J=!J;X.appendChild(q(U.name_with_namespace,mxUtils.bind(this,function(){0===B&&(c=U.owner.username,m=U.path,v="",O(null,!0))})));k.appendChild(X)})(W[V]);for(V=0;V<H.length;V++)C(),E(H[V],mxUtils.bind(this,function(U,X){G();for(var t=0;t<X.length;t++){var F=l.cloneNode();F.style.backgroundColor=J?"dark"==uiTheme?"#000000":"#eeeeee":"";J=!J;mxUtils.bind(this,function(K){F.appendChild(q(K.name_with_namespace,
-mxUtils.bind(this,function(){0===B&&(c=U.full_path,m=K.path,v="",O(null,!0))})));k.appendChild(F)})(X[t])}}));G()}else G(),mxUtils.write(k,mxResources.get("noFiles"));100==W.length&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&N()},mxEvent.addListener(k,"scroll",A))}),y)}}))});b?this.user?M():this.updateUser(function(){M()},y,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){M()},y,!0)}),y)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+
+function(U){var X=l.cloneNode();X.style.backgroundColor=J?Editor.isDarkMode()?"#000000":"#eeeeee":"";J=!J;X.appendChild(q(U.name_with_namespace,mxUtils.bind(this,function(){0===B&&(c=U.owner.username,m=U.path,v="",O(null,!0))})));k.appendChild(X)})(W[V]);for(V=0;V<H.length;V++)C(),F(H[V],mxUtils.bind(this,function(U,X){G();for(var t=0;t<X.length;t++){var E=l.cloneNode();E.style.backgroundColor=J?"dark"==uiTheme?"#000000":"#eeeeee":"";J=!J;mxUtils.bind(this,function(K){E.appendChild(q(K.name_with_namespace,
+mxUtils.bind(this,function(){0===B&&(c=U.full_path,m=K.path,v="",O(null,!0))})));k.appendChild(E)})(X[t])}}));G()}else G(),mxUtils.write(k,mxResources.get("noFiles"));100==W.length&&(k.appendChild(z),A=function(){k.scrollTop>=k.scrollHeight-k.offsetHeight&&N()},mxEvent.addListener(k,"scroll",A))}),y)}}))});b?this.user?M():this.updateUser(function(){M()},y,!0):this.authenticate(mxUtils.bind(this,function(){this.updateUser(function(){M()},y,!0)}),y)};GitLabClient.prototype.logout=function(){this.ui.editor.loadUrl(this.redirectUri+
"?doLogout=1&state="+encodeURIComponent("cId="+this.clientId+"&domain="+window.location.hostname));this.clearPersistentToken();this.setUser(null);b=null;this.setToken(null)}})();DrawioComment=function(b,e,f,c,m,n,v){this.file=b;this.id=e;this.content=f;this.modifiedDate=c;this.createdDate=m;this.isResolved=n;this.user=v;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,f,c,m){e()};DrawioComment.prototype.editComment=function(b,e,f){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DriveComment=function(b,e,f,c,m,n,v,d){DrawioComment.call(this,b,e,f,c,m,n,v);this.pCommentId=d};mxUtils.extend(DriveComment,DrawioComment);DriveComment.prototype.addReply=function(b,e,f,c,m){b={content:b.content};c?b.verb="resolve":m&&(b.verb="reopen");this.file.ui.drive.executeRequest({url:"/files/"+this.file.getId()+"/comments/"+this.id+"/replies",params:b,method:"POST"},mxUtils.bind(this,function(n){e(n.replyId)}),f)};
DriveComment.prototype.editComment=function(b,e,f){this.content=b;b={content:b};this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,params:b,method:"PATCH"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,params:b,method:"PATCH"},e,f)};
-DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,m,n,v,d,g,k,l,p,q,x){function y(P,Q){Q=Q||document;return Q.querySelector(P)}function z(P,Q,S){if(null==P["@microsoft.graph.downloadUrl"])if(null==P.parentReference)S();else{c(P.id,P.parentReference.driveId,function(da){z(da,Q,S)},S);return}var Y=new XMLHttpRequest;Y.open("GET",P["@microsoft.graph.downloadUrl"]);var ca=P.file?"image/png"==P.file.mimeType:!1;Y.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var da=Y.responseText;
-ca&&(da="data:image/png;base64,"+Editor.base64Encode(da),da=Editor.extractGraphModelFromPng(da));var Z=mxUtils.parseXml(da),ha="mxlibrary"==Z.documentElement.nodeName?Z.documentElement:Editor.extractGraphModel(Z.documentElement);if(null!=ha){Q(ha.ownerDocument);return}}catch(aa){}S()}};ca&&Y.overrideMimeType&&Y.overrideMimeType("text/plain; charset=x-user-defined");Y.send()}function A(){p&&null!=E?I.exportToCanvas(function(P){P=EditorUi.prototype.createImageDataUri(P,null,"png");v(H,P);n(H)},400,
-null,null,function(P){console.log(P)},600,null,null,null,null,null,E):(v(H,void 0),n(H))}function L(P){function Q(S){F.style.background="transparent";F.innerHTML="";var Y=document.createElement("div");Y.className="odPreviewStatus";mxUtils.write(Y,S);F.appendChild(Y);N.stop()}if(null!=F)if(F.style.background="transparent",F.innerHTML="",null==P||P.folder||/\.drawiolib$/.test(P.name))Q(mxResources.get("noPreview"));else try{null!=P.remoteItem&&(P=P.remoteItem),U=P,N.spin(F),z(P,function(S){N.stop();
-if(U==P)if("mxlibrary"==S.documentElement.nodeName)Q(mxResources.get("noPreview"));else{var Y=S.getElementsByTagName("diagram");E=AspectDialog.prototype.createViewer(F,0==Y.length?S.documentElement:Y[0],null,"transparent")}},function(){H=null;Q(mxResources.get("notADiagramFile"))})}catch(S){H=null,Q(mxResources.get("notADiagramFile"))}}function O(){var P=y(".odFilesBreadcrumb");if(null!=P){P.innerHTML="";for(var Q=0;Q<J.length-1;Q++){var S=document.createElement("span");S.className="odBCFolder";S.innerHTML=
-mxUtils.htmlEntities(J[Q].name||mxResources.get("home"));P.appendChild(S);(function(ca,da){S.addEventListener("click",function(){e(null);J=J.slice(0,da);u(ca.driveId,ca.folderId,ca.siteId,ca.name)})})(J[Q],Q);var Y=document.createElement("span");Y.innerHTML=" &gt; ";P.appendChild(Y)}null!=J[J.length-1]&&(Q=document.createElement("span"),Q.innerHTML=mxUtils.htmlEntities(1==J.length?mxResources.get("officeSelDiag"):J[J.length-1].name||mxResources.get("home")),P.appendChild(Q))}}function M(){if(null!=
-H&&!W)if("sharepoint"==R)u("site",null,H.id,H.displayName);else if("site"==R)u("subsite",null,H.id,H.name);else{var P=H.folder;H=H.remoteItem?H.remoteItem:H;var Q=(H.parentReference?H.parentReference.driveId:null)||R,S=H.id;P?u(Q,S,null,H.name):A()}}function u(P,Q,S,Y,ca){function da(oa){N.stop();var Ba=document.createElement("table");Ba.className="odFileListGrid";for(var Aa=null,Ha=0,Oa=0;null!=oa&&Oa<oa.length;Oa++){var Ga=oa[Oa];if(1!=ha||!Ga.webUrl||0<Ga.webUrl.indexOf("sharepoint.com/sites/")||
-0>Ga.webUrl.indexOf("sharepoint.com/")){var Fa=Ga.displayName||Ga.name,Ea=mxUtils.htmlEntities(Ga.description||Fa);ha&&(Ga.folder=2==ha?{isRoot:!0}:!0);var Ka=null!=Ga.folder;if(!g||Ka){var za=document.createElement("tr");za.className=Ha++%2?"odOddRow":"odEvenRow";var ya=document.createElement("td");ya.style.width="36px";var qa=document.createElement("img");qa.src="/images/"+(Ka?"folder.png":"file.png");qa.className="odFileImg";ya.appendChild(qa);za.appendChild(ya);ya=document.createElement("td");
-Ka=document.createElement("div");Ka.className="odFileTitle";Ka.innerHTML=mxUtils.htmlEntities(Fa);Ka.setAttribute("title",Ea);ya.appendChild(Ka);za.appendChild(ya);Ba.appendChild(za);null==Aa&&(Aa=za,Aa.className+=" odRowSelected",H=Ga,R=P,x||e(H));(function(fa,ra){za.addEventListener("dblclick",M);za.addEventListener("click",function(){Aa!=ra&&(Aa.className=Aa.className.replace("odRowSelected",""),Aa=ra,Aa.className+=" odRowSelected",H=fa,R=P,x||e(H))})})(Ga,za)}}}0==Ha?(oa=document.createElement("div"),
-oa.className="odEmptyFolder",oa.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),ua.appendChild(oa)):ua.appendChild(Ba);O();W=!1}if(!W){y(".odCatsList").style.display="block";y(".odFilesSec").style.display="block";null!=F&&(F.innerHTML="",F.style.top="50%");var Z=W=!0,ha=0;V=arguments;var aa=setTimeout(function(){W=Z=!1;N.stop();d(mxResources.get("timeout"))},2E4),ua=y(".odFilesList");ua.innerHTML="";N.spin(ua);switch(P){case "recent":J=[{name:mxResources.get("recent",
-null,"Recent"),driveId:P}];var ka=m()||{};var Ca=[],Da;for(Da in ka)Ca.push(ka[Da]);clearTimeout(aa);da(Ca);return;case "shared":ka="/me/drive/sharedWithMe";J=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:P}];break;case "sharepoint":ka="/sites?search=";J=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:P}];ha=1;break;case "site":J.push({name:Y,driveId:P,folderId:Q,siteId:S});ka="/sites/"+S+"/drives";ha=2;break;case "subsite":J.push({name:Y,driveId:P,
-folderId:Q,siteId:S});ka="/drives/"+S+(Q?"/items/"+Q:"/root")+"/children";break;case "search":P=R;J=[{driveId:P,name:mxResources.get("back",null,"Back")}];ca=encodeURIComponent(ca.replace(/'/g,"\\'"));ka=P?"/drives/"+P+"/root/search(q='"+ca+"')":"/me/drive/root/search(q='"+ca+"')";break;default:null==Q?J=[{driveId:P}]:J.push({name:Y,driveId:P,folderId:Q}),ka=(P?"/drives/"+P:"/me/drive")+(Q?"/items/"+Q:"/root")+"/children"}ha||(ka+=(0<ka.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");
-f(ka,function(oa){if(Z){clearTimeout(aa);oa=oa.value||[];for(var Ba=x||ha?oa:[],Aa=0;!ha&&!x&&Aa<oa.length;Aa++){var Ha=oa[Aa],Oa=Ha.file?Ha.file.mimeType:null;(Ha.folder||"text/html"==Oa||"text/xml"==Oa||"application/xml"==Oa||"image/png"==Oa||/\.svg$/.test(Ha.name)||/\.html$/.test(Ha.name)||/\.xml$/.test(Ha.name)||/\.png$/.test(Ha.name)||/\.drawio$/.test(Ha.name)||/\.drawiolib$/.test(Ha.name))&&Ba.push(Ha)}da(Ba)}},function(oa){if(Z){clearTimeout(aa);var Ba=null;try{Ba=JSON.parse(oa.responseText).error.message}catch(Aa){}d(mxResources.get("errorFetchingFolder",
-null,"Error fetching folder items")+(null!=Ba?" ("+Ba+")":""));W=!1;N.stop()}})}}function D(P){K.className=K.className.replace("odCatSelected","");K=P;K.className+=" odCatSelected"}function B(P){W||(T=null,u("search",null,null,null,P))}var C="";null==e&&(e=L,C='<div style="text-align: center;" class="odPreview"></div>');null==m&&(m=function(){var P=null;try{P=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(Q){}return P});null==n&&(n=function(P){if(null!=P){var Q=m()||{};delete P["@microsoft.graph.downloadUrl"];
+DriveComment.prototype.deleteComment=function(b,e){this.file.ui.drive.executeRequest(this.pCommentId?{url:"/files/"+this.file.getId()+"/comments/"+this.pCommentId+"/replies/"+this.id,method:"DELETE"}:{url:"/files/"+this.file.getId()+"/comments/"+this.id,method:"DELETE"},b,e)};function mxODPicker(b,e,f,c,m,n,v,d,g,k,l,p,q,x){function y(P,Q){Q=Q||document;return Q.querySelector(P)}function z(P,Q,S){if(null==P["@microsoft.graph.downloadUrl"])if(null==P.parentReference)S();else{c(P.id,P.parentReference.driveId,function(da){z(da,Q,S)},S);return}var Y=new XMLHttpRequest;Y.open("GET",P["@microsoft.graph.downloadUrl"]);var ba=P.file?"image/png"==P.file.mimeType:!1;Y.onreadystatechange=function(){if(4==this.readyState){if(200<=this.status&&299>=this.status)try{var da=Y.responseText;
+ba&&(da="data:image/png;base64,"+Editor.base64Encode(da),da=Editor.extractGraphModelFromPng(da));var Z=mxUtils.parseXml(da),ja="mxlibrary"==Z.documentElement.nodeName?Z.documentElement:Editor.extractGraphModel(Z.documentElement);if(null!=ja){Q(ja.ownerDocument);return}}catch(ea){}S()}};ba&&Y.overrideMimeType&&Y.overrideMimeType("text/plain; charset=x-user-defined");Y.send()}function A(){p&&null!=F?I.exportToCanvas(function(P){P=EditorUi.prototype.createImageDataUri(P,null,"png");v(H,P);n(H)},400,
+null,null,function(P){console.log(P)},600,null,null,null,null,null,F):(v(H,void 0),n(H))}function L(P){function Q(S){E.style.background="transparent";E.innerHTML="";var Y=document.createElement("div");Y.className="odPreviewStatus";mxUtils.write(Y,S);E.appendChild(Y);N.stop()}if(null!=E)if(E.style.background="transparent",E.innerHTML="",null==P||P.folder||/\.drawiolib$/.test(P.name))Q(mxResources.get("noPreview"));else try{null!=P.remoteItem&&(P=P.remoteItem),U=P,N.spin(E),z(P,function(S){N.stop();
+if(U==P)if("mxlibrary"==S.documentElement.nodeName)Q(mxResources.get("noPreview"));else{var Y=S.getElementsByTagName("diagram");F=AspectDialog.prototype.createViewer(E,0==Y.length?S.documentElement:Y[0],null,"transparent")}},function(){H=null;Q(mxResources.get("notADiagramFile"))})}catch(S){H=null,Q(mxResources.get("notADiagramFile"))}}function O(){var P=y(".odFilesBreadcrumb");if(null!=P){P.innerHTML="";for(var Q=0;Q<J.length-1;Q++){var S=document.createElement("span");S.className="odBCFolder";S.innerHTML=
+mxUtils.htmlEntities(J[Q].name||mxResources.get("home"));P.appendChild(S);(function(ba,da){S.addEventListener("click",function(){e(null);J=J.slice(0,da);u(ba.driveId,ba.folderId,ba.siteId,ba.name)})})(J[Q],Q);var Y=document.createElement("span");Y.innerHTML=" &gt; ";P.appendChild(Y)}null!=J[J.length-1]&&(Q=document.createElement("span"),Q.innerHTML=mxUtils.htmlEntities(1==J.length?mxResources.get("officeSelDiag"):J[J.length-1].name||mxResources.get("home")),P.appendChild(Q))}}function M(){if(null!=
+H&&!W)if("sharepoint"==R)u("site",null,H.id,H.displayName);else if("site"==R)u("subsite",null,H.id,H.name);else{var P=H.folder;H=H.remoteItem?H.remoteItem:H;var Q=(H.parentReference?H.parentReference.driveId:null)||R,S=H.id;P?u(Q,S,null,H.name):A()}}function u(P,Q,S,Y,ba){function da(Ca){N.stop();var pa=document.createElement("table");pa.className="odFileListGrid";for(var Ba=null,Ea=0,Ka=0;null!=Ca&&Ka<Ca.length;Ka++){var Fa=Ca[Ka];if(1!=ja||!Fa.webUrl||0<Fa.webUrl.indexOf("sharepoint.com/sites/")||
+0>Fa.webUrl.indexOf("sharepoint.com/")){var Ha=Fa.displayName||Fa.name,Ia=mxUtils.htmlEntities(Fa.description||Ha);ja&&(Fa.folder=2==ja?{isRoot:!0}:!0);var Ma=null!=Fa.folder;if(!g||Ma){var za=document.createElement("tr");za.className=Ea++%2?"odOddRow":"odEvenRow";var ya=document.createElement("td");ya.style.width="36px";var oa=document.createElement("img");oa.src="/images/"+(Ma?"folder.png":"file.png");oa.className="odFileImg";ya.appendChild(oa);za.appendChild(ya);ya=document.createElement("td");
+Ma=document.createElement("div");Ma.className="odFileTitle";Ma.innerHTML=mxUtils.htmlEntities(Ha);Ma.setAttribute("title",Ia);ya.appendChild(Ma);za.appendChild(ya);pa.appendChild(za);null==Ba&&(Ba=za,Ba.className+=" odRowSelected",H=Fa,R=P,x||e(H));(function(fa,sa){za.addEventListener("dblclick",M);za.addEventListener("click",function(){Ba!=sa&&(Ba.className=Ba.className.replace("odRowSelected",""),Ba=sa,Ba.className+=" odRowSelected",H=fa,R=P,x||e(H))})})(Fa,za)}}}0==Ea?(Ca=document.createElement("div"),
+Ca.className="odEmptyFolder",Ca.innerHTML=mxUtils.htmlEntities(mxResources.get("folderEmpty",null,"Folder is empty!")),ha.appendChild(Ca)):ha.appendChild(pa);O();W=!1}if(!W){y(".odCatsList").style.display="block";y(".odFilesSec").style.display="block";null!=E&&(E.innerHTML="",E.style.top="50%");var Z=W=!0,ja=0;V=arguments;var ea=setTimeout(function(){W=Z=!1;N.stop();d(mxResources.get("timeout"))},2E4),ha=y(".odFilesList");ha.innerHTML="";N.spin(ha);switch(P){case "recent":J=[{name:mxResources.get("recent",
+null,"Recent"),driveId:P}];var ma=m()||{};var Aa=[],Da;for(Da in ma)Aa.push(ma[Da]);clearTimeout(ea);da(Aa);return;case "shared":ma="/me/drive/sharedWithMe";J=[{name:mxResources.get("sharedWithMe",null,"Shared With Me"),driveId:P}];break;case "sharepoint":ma="/sites?search=";J=[{name:mxResources.get("sharepointSites",null,"Sharepoint Sites"),driveId:P}];ja=1;break;case "site":J.push({name:Y,driveId:P,folderId:Q,siteId:S});ma="/sites/"+S+"/drives";ja=2;break;case "subsite":J.push({name:Y,driveId:P,
+folderId:Q,siteId:S});ma="/drives/"+S+(Q?"/items/"+Q:"/root")+"/children";break;case "search":P=R;J=[{driveId:P,name:mxResources.get("back",null,"Back")}];ba=encodeURIComponent(ba.replace(/'/g,"\\'"));ma=P?"/drives/"+P+"/root/search(q='"+ba+"')":"/me/drive/root/search(q='"+ba+"')";break;default:null==Q?J=[{driveId:P}]:J.push({name:Y,driveId:P,folderId:Q}),ma=(P?"/drives/"+P:"/me/drive")+(Q?"/items/"+Q:"/root")+"/children"}ja||(ma+=(0<ma.indexOf("?")?"&":"?")+"select=id,name,description,parentReference,file,createdBy,lastModifiedBy,lastModifiedDateTime,size,folder,remoteItem,@microsoft.graph.downloadUrl");
+f(ma,function(Ca){if(Z){clearTimeout(ea);Ca=Ca.value||[];for(var pa=x||ja?Ca:[],Ba=0;!ja&&!x&&Ba<Ca.length;Ba++){var Ea=Ca[Ba],Ka=Ea.file?Ea.file.mimeType:null;(Ea.folder||"text/html"==Ka||"text/xml"==Ka||"application/xml"==Ka||"image/png"==Ka||/\.svg$/.test(Ea.name)||/\.html$/.test(Ea.name)||/\.xml$/.test(Ea.name)||/\.png$/.test(Ea.name)||/\.drawio$/.test(Ea.name)||/\.drawiolib$/.test(Ea.name))&&pa.push(Ea)}da(pa)}},function(Ca){if(Z){clearTimeout(ea);var pa=null;try{pa=JSON.parse(Ca.responseText).error.message}catch(Ba){}d(mxResources.get("errorFetchingFolder",
+null,"Error fetching folder items")+(null!=pa?" ("+pa+")":""));W=!1;N.stop()}})}}function D(P){K.className=K.className.replace("odCatSelected","");K=P;K.className+=" odCatSelected"}function B(P){W||(T=null,u("search",null,null,null,P))}var C="";null==e&&(e=L,C='<div style="text-align: center;" class="odPreview"></div>');null==m&&(m=function(){var P=null;try{P=JSON.parse(localStorage.getItem("mxODPickerRecentList"))}catch(Q){}return P});null==n&&(n=function(P){if(null!=P){var Q=m()||{};delete P["@microsoft.graph.downloadUrl"];
Q[P.id]=P;localStorage.setItem("mxODPickerRecentList",JSON.stringify(Q))}});C='<div class="odCatsList"><div class="odCatsListLbl">OneDrive</div><div id="odFiles" class="odCatListTitle odCatSelected">'+mxUtils.htmlEntities(mxResources.get("files"))+'</div><div id="odRecent" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("recent"))+'</div><div id="odShared" class="odCatListTitle">'+mxUtils.htmlEntities(mxResources.get("shared"))+'</div><div id="odSharepoint" class="odCatListTitle">'+
mxUtils.htmlEntities(mxResources.get("sharepoint"))+'</div></div><div class="odFilesSec"><div class="searchBar" style="display:none"><input type="search" id="odSearchBox" placeholder="'+mxUtils.htmlEntities(mxResources.get("search"))+'"></div><div class="odFilesBreadcrumb"></div><div id="refreshOD" class="odRefreshButton"><img src="/images/update32.png" width="16" height="16" title="'+mxUtils.htmlEntities(mxResources.get("refresh"))+'Refresh" border="0"/></div><div class="odFilesList"></div></div>'+
C+(k?'<div id="odBackBtn" class="odLinkBtn">&lt; '+mxUtils.htmlEntities(mxResources.get("back"))+"</div>":"")+(l?'<button id="odSubmitBtn" class="odSubmitBtn">'+mxUtils.htmlEntities(mxResources.get(g?"save":"open"))+"</button>":"");var G=null!=window.Editor&&null!=Editor.isDarkMode&&Editor.isDarkMode();G=".odCatsList *, .odFilesSec * { user-select: none; }.odCatsList {\tbox-sizing: border-box;\tposition:absolute;\ttop:0px;\tbottom:50%;\twidth:30%;\tborder: 1px solid #CCCCCC;\tborder-bottom:none;\tdisplay: inline-block;\toverflow-x: hidden;\toverflow-y: auto;}.odCatsListLbl {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;}.odFilesSec {\tbox-sizing: border-box;\tposition:absolute;\tleft:30%;\ttop:0px;\tbottom:50%;\twidth: 70%;\tborder: 1px solid #CCCCCC;\tborder-left:none;\tborder-bottom:none;\tdisplay: inline-block;\toverflow: hidden;}.odFilesBreadcrumb {\tbox-sizing: border-box;\tposition:absolute;\tmin-height: 32px;\tleft:0px;\tright:20px;\ttext-overflow:ellipsis;\toverflow:hidden;\tfont-size: 13px;\tcolor: #6D6D6D;\tpadding: 5px;}.odRefreshButton {\tbox-sizing: border-box;\tposition:absolute;\tright:0px;\ttop:0px;\tpadding: 4px;\tmargin: 1px;\theight:24px;\tcursor:default;}.odRefreshButton>img {\topacity:0.5;}.odRefreshButton:hover {\tbackground-color:#ddd;\tborder-radius:50%;}.odRefreshButton:active {\topacity:0.7;}.odFilesList {\tbox-sizing: border-box;\tposition:absolute;\ttop:32px;\tbottom:0px;\twidth: 100%;\toverflow-x: hidden;\toverflow-y: auto;}.odFileImg {\twidth: 24px;\tpadding-left: 5px;\tpadding-right: 5px;}.odFileTitle {\tcursor: default;\tfont-weight: normal;\tcolor: #666666 !important;\twidth: calc(100% - 20px);\twhite-space: nowrap;\toverflow: hidden;\ttext-overflow: ellipsis;}.odFileListGrid {\twidth: 100%;\twhite-space: nowrap;\tfont-size: 13px; box-sizing: border-box; border-spacing: 0;}.odOddRow {"+
(G?"":"\tbackground-color: #eeeeee;")+"}.odEvenRow {"+(G?"":"\tbackground-color: #FFFFFF;")+"}.odRowSelected {\tbackground-color: #cadfff;}.odCatListTitle {\tbox-sizing: border-box;\theight: 17px;\tcursor: default;\tcolor: #666666;\tfont-size: 14px;\tline-height: 17px;\tmargin: 5px 0 5px 0px; padding-left: 10px;}.odCatSelected {\tfont-weight: bold;\tbackground-color: #cadfff;}.odEmptyFolder {\theight: 17px;\tcolor: #6D6D6D;\tfont-size: 14px;\tfont-weight: bold;\tline-height: 17px;\tmargin: 10px 0 3px 5px;\twidth: 100%; text-align: center;}.odBCFolder {\tcursor: pointer;\tcolor: #0432ff;}.odPreviewStatus {\tposition:absolute;\ttext-align:center;\twidth:100%;\ttop:50%;\ttransform: translateY(-50%);\tfont-size:13px;\topacity:0.5;}.odPreview { position:absolute;\t overflow:hidden;\t border: 1px solid #CCCCCC; bottom:0px; top: 50%; left:0px; right:0px;}.odLinkBtn { position: absolute;\tfont-size: 12px;\tcursor: pointer;\tcolor: #6D6D6D;\tleft: 5px;\tbottom: 3px;}.odSubmitBtn { position: absolute;\tcolor: #333;\tright: 5px;\tbottom: 5px;}";
-var N=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),I=new Editor,E=null,H=null,R=null,W=!1,J=[],V=null,U=null;this.getSelectedItem=function(){null!=H&&n(H);return H};if(null==y("#mxODPickerCss")){var X=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");X.appendChild(t);t.type="text/css";t.id="mxODPickerCss";t.appendChild(document.createTextNode(G))}b.innerHTML=
-C;var F=y(".odPreview"),K=y("#odFiles");b=function(P,Q){Q=Q||document;return Q.querySelectorAll(P)}(".odCatListTitle");for(C=0;C<b.length;C++)b[C].addEventListener("click",function(){H=U=null;if(!W)switch(D(this),this.id){case "odFiles":u();break;case "odRecent":u("recent");break;case "odShared":u("shared");break;case "odSharepoint":u("sharepoint")}});var T=null;y("#odSearchBox").addEventListener("keyup",function(P){var Q=this;null!=T&&clearTimeout(T);13==P.keyCode?B(Q.value):T=setTimeout(function(){B(Q.value)},
+var N=new Spinner({left:"50%",lines:12,length:8,width:3,radius:5,rotate:0,color:"#000",speed:1,trail:60,shadow:!1,hwaccel:!1,className:"spinner",zIndex:2E9}),I=new Editor,F=null,H=null,R=null,W=!1,J=[],V=null,U=null;this.getSelectedItem=function(){null!=H&&n(H);return H};if(null==y("#mxODPickerCss")){var X=document.head||document.getElementsByTagName("head")[0],t=document.createElement("style");X.appendChild(t);t.type="text/css";t.id="mxODPickerCss";t.appendChild(document.createTextNode(G))}b.innerHTML=
+C;var E=y(".odPreview"),K=y("#odFiles");b=function(P,Q){Q=Q||document;return Q.querySelectorAll(P)}(".odCatListTitle");for(C=0;C<b.length;C++)b[C].addEventListener("click",function(){H=U=null;if(!W)switch(D(this),this.id){case "odFiles":u();break;case "odRecent":u("recent");break;case "odShared":u("shared");break;case "odSharepoint":u("sharepoint")}});var T=null;y("#odSearchBox").addEventListener("keyup",function(P){var Q=this;null!=T&&clearTimeout(T);13==P.keyCode?B(Q.value):T=setTimeout(function(){B(Q.value)},
500)});y("#refreshOD").addEventListener("click",function(){null!=V&&(e(null),u.apply(this,V))});k&&y("#odBackBtn").addEventListener("click",k);l&&y("#odSubmitBtn").addEventListener("click",A);null!=q?(k=q.pop(),"sharepoint"==q[0].driveId&&D(y("#odSharepoint")),J=q,u(k.driveId,k.folderId,k.siteId,k.name)):u()};App=function(b,e,f){EditorUi.call(this,b,e,null!=f?f:"1"==urlParams.lightbox||"min"==uiTheme&&"0"!=urlParams.chrome);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||(window.onunload=mxUtils.bind(this,function(){var c=this.getCurrentFile();if(null!=c&&c.isModified()){var m={category:"DISCARD-FILE-"+c.getHash(),action:(c.savingFile?"saving":"")+(c.savingFile&&null!=c.savingFileTime?"_"+Math.round((Date.now()-c.savingFileTime.getTime())/1E3):"")+(null!=c.saveLevel?"-sl_"+c.saveLevel:"")+"-age_"+(null!=
c.ageStart?Math.round((Date.now()-c.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(c.isAutosave()?"":"-noauto")+"-open_"+(null!=c.opened?Math.round((Date.now()-c.opened.getTime())/1E3):"x")+"-save_"+(null!=c.lastSaved?Math.round((Date.now()-c.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=c.lastChanged?Math.round((Date.now()-c.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=c.sync?"client_"+c.sync.clientId:"nosync"};
c.constructor==DriveFile&&null!=c.desc&&null!=this.drive&&(m.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+c.desc.headRevisionId+"-mod_"+c.desc.modifiedDate+"-size_"+c.getSize()+"-mime_"+c.desc.mimeType);EditorUi.logEvent(m)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var c=this.getCurrentFile();null!=c&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+c.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?
@@ -12830,8 +12830,8 @@ var m=document.createElement("img");mxUtils.setOpacity(m,50);m.style.height="16p
Menus.prototype.init=function(){function f(u,D,B){this.ui=u;this.previousExtFonts=this.extFonts=D;this.prevCustomFonts=this.customFonts=B}e.apply(this,arguments);var c=this.editorUi,m=c.editor.graph,n=mxUtils.bind(m,m.isEnabled),v=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),d=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
(null==document.documentMode||9<document.documentMode),g=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),k="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
c.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(u){return"file"!=u}));c.actions.addAction("new...",function(){var u=c.isOffline();if(u||"1"!=urlParams.newTempDlg||c.mode!=App.MODE_GOOGLE){var D=new NewDialog(c,u,!(c.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));c.showDialog(D.container,u?350:620,u?70:460,!0,!0,function(C){c.sidebar.hideTooltip();C&&null==c.getCurrentFile()&&c.showSplash()});
-D.init()}else{var B=function(C){return{id:C.id,isExt:!0,url:C.downloadUrl,title:C.title,imgUrl:C.thumbnailLink,changedBy:C.lastModifyingUserName,lastModifiedOn:C.modifiedDate}};u=new TemplatesDialog(c,function(C,G,N){var I=N.libs,E=N.clibs;c.pickFolder(c.mode,function(H){c.createFile(G,C,null!=I&&0<I.length?I:null,null,function(){c.hideDialog()},null,H,null,null!=E&&0<E.length?E:null)},null==c.stateArg||null==c.stateArg.folderId)},null,null,null,"user",function(C,G,N){var I=new Date;I.setDate(I.getDate()-
-7);c.drive.listFiles(null,I,N?!0:!1,function(E){for(var H=[],R=0;R<E.items.length;R++)H.push(B(E.items[R]));C(H)},G)},function(C,G,N,I){c.drive.listFiles(C,null,I?!0:!1,function(E){for(var H=[],R=0;R<E.items.length;R++)H.push(B(E.items[R]));G(H)},N)},function(C,G,N){c.drive.getFile(C.id,function(I){G(I.data)},N)},null,null,!1,!1);c.showDialog(u.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(m.isEnabled()&&
+D.init()}else{var B=function(C){return{id:C.id,isExt:!0,url:C.downloadUrl,title:C.title,imgUrl:C.thumbnailLink,changedBy:C.lastModifyingUserName,lastModifiedOn:C.modifiedDate}};u=new TemplatesDialog(c,function(C,G,N){var I=N.libs,F=N.clibs;c.pickFolder(c.mode,function(H){c.createFile(G,C,null!=I&&0<I.length?I:null,null,function(){c.hideDialog()},null,H,null,null!=F&&0<F.length?F:null)},null==c.stateArg||null==c.stateArg.folderId)},null,null,null,"user",function(C,G,N){var I=new Date;I.setDate(I.getDate()-
+7);c.drive.listFiles(null,I,N?!0:!1,function(F){for(var H=[],R=0;R<F.items.length;R++)H.push(B(F.items[R]));C(H)},G)},function(C,G,N,I){c.drive.listFiles(C,null,I?!0:!1,function(F){for(var H=[],R=0;R<F.items.length;R++)H.push(B(F.items[R]));G(H)},N)},function(C,G,N){c.drive.getFile(C.id,function(I){G(I.data)},N)},null,null,!1,!1);c.showDialog(u.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});c.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(m.isEnabled()&&
!m.isCellLocked(m.getDefaultParent())){var u=new NewDialog(c,null,!1,function(D){c.hideDialog();if(null!=D){var B=c.editor.graph.getFreeInsertPoint();m.setSelectionCells(c.importXml(D,Math.max(B.x,20),Math.max(B.y,20),!0,null,null,!0));m.scrollCellToVisible(m.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));c.showDialog(u.container,620,460,!0,!0,function(){c.sidebar.hideTooltip()});u.init()}})).isEnabled=n;var l=c.actions.addAction("shareCursor",
function(){c.setShareCursorPosition(!c.isShareCursorPosition())});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.isShareCursorPosition()});l=c.actions.addAction("showRemoteCursors",function(){c.setShowRemoteCursors(!c.isShowRemoteCursors())});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.isShowRemoteCursors()});l=c.actions.addAction("points",function(){c.editor.graph.view.setUnit(mxConstants.POINTS)});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.editor.graph.view.unit==
mxConstants.POINTS});l=c.actions.addAction("inches",function(){c.editor.graph.view.setUnit(mxConstants.INCHES)});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.INCHES});l=c.actions.addAction("millimeters",function(){c.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});l.setToggleAction(!0);l.setSelectedCallback(function(){return c.editor.graph.view.unit==mxConstants.MILLIMETERS});l=c.actions.addAction("meters",function(){c.editor.graph.view.setUnit(mxConstants.METERS)});
@@ -12840,14 +12840,14 @@ l.setToggleAction(!0);l.setSelectedCallback(function(){return null!=c.ruler});l=
Editor.inlineFullscreen:null!=document.fullscreenElement});c.actions.addAction("properties...",function(){var u=new FilePropertiesDialog(c);c.showDialog(u.container,320,120,!0,!0);u.init()}).isEnabled=n;window.mxFreehand&&(c.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(u){m.isEnabled()&&(null==this.freehandWindow&&(u=!mxClient.IS_IE&&!mxClient.IS_IE11,this.freehandWindow=new FreehandWindow(c,document.body.offsetWidth-420,102,176,u?120:84,u)),m.freehand.isDrawing()?
m.freehand.stopDrawing():m.freehand.startDrawing(),this.freehandWindow.window.setVisible(m.freehand.isDrawing()))})).isEnabled=function(){return n()&&mxClient.IS_SVG});c.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var u=document.createElement("div");u.style.whiteSpace="nowrap";var D=null==c.pages||1>=c.pages.length,B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatXml"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
u.appendChild(B);var C=c.addCheckbox(u,mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),G=c.addCheckbox(u,mxResources.get("compressed"),!0),N=c.addCheckbox(u,mxResources.get("allPages"),!D,D);N.style.marginBottom="16px";mxEvent.addListener(C,"change",function(){C.checked?N.setAttribute("disabled","disabled"):N.removeAttribute("disabled")});u=new CustomDialog(c,u,mxUtils.bind(this,function(){c.downloadFile("xml",!G.checked,null,!C.checked,D||!N.checked)}),null,mxResources.get("export"));c.showDialog(u.container,
-300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(u,D,B,C,G,N,I,E,H){I=[];H&&I.push("tags=%7B%7D");u=new EmbedDialog(c,c.createLink(u,D,B,C,G,N,null,!0,I));c.showDialog(u.container,450,240,!0,!0);u.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
-function(u){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,u,function(D,B,C,G,N,I,E,H,R,W,J){c.createHtml(D,B,C,G,N,I,E,H,R,W,J,mxUtils.bind(this,function(V,U){var X=c.getBaseFilename(E);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+U+"\n</body>\n</html>";c.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+
-".html","html",V,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport){var u=null==c.pages||1>=c.pages.length,D=document.createElement("div");D.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatPdf"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";D.appendChild(B);var C=function(){E!=this&&this.checked?
-(U.removeAttribute("disabled"),U.checked=!m.pageVisible):(U.setAttribute("disabled","disabled"),U.checked=!1)};B=200;var G=1,N=null;if(c.pdfPageExport&&!u){var I=function(){J.value=Math.max(1,Math.min(G,Math.max(parseInt(J.value),parseInt(R.value))));R.value=Math.max(1,Math.min(G,Math.min(parseInt(J.value),parseInt(R.value))))},E=c.addRadiobox(D,"pages",mxResources.get("allPages"),!0),H=c.addRadiobox(D,"pages",mxResources.get("pages")+":",!1,null,!0),R=document.createElement("input");R.style.cssText=
+300,200,!0,!0)}));Editor.enableExportUrl&&c.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){c.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(u,D,B,C,G,N,I,F,H){I=[];H&&I.push("tags=%7B%7D");u=new EmbedDialog(c,c.createLink(u,D,B,C,G,N,null,!0,I));c.showDialog(u.container,450,240,!0,!0);u.init()})}));c.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
+function(u){c.spinner.stop();c.showHtmlDialog(mxResources.get("export"),null,u,function(D,B,C,G,N,I,F,H,R,W,J){c.createHtml(D,B,C,G,N,I,F,H,R,W,J,mxUtils.bind(this,function(V,U){var X=c.getBaseFilename(F);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+U+"\n</body>\n</html>";c.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+
+".html","html",V,"text/html")}))})})}));c.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!c.isOffline()&&!c.printPdfExport){var u=null==c.pages||1>=c.pages.length,D=document.createElement("div");D.style.whiteSpace="nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatPdf"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";D.appendChild(B);var C=function(){F!=this&&this.checked?
+(U.removeAttribute("disabled"),U.checked=!m.pageVisible):(U.setAttribute("disabled","disabled"),U.checked=!1)};B=200;var G=1,N=null;if(c.pdfPageExport&&!u){var I=function(){J.value=Math.max(1,Math.min(G,Math.max(parseInt(J.value),parseInt(R.value))));R.value=Math.max(1,Math.min(G,Math.min(parseInt(J.value),parseInt(R.value))))},F=c.addRadiobox(D,"pages",mxResources.get("allPages"),!0),H=c.addRadiobox(D,"pages",mxResources.get("pages")+":",!1,null,!0),R=document.createElement("input");R.style.cssText=
"margin:0 8px 0 8px;";R.setAttribute("value","1");R.setAttribute("type","number");R.setAttribute("min","1");R.style.width="50px";D.appendChild(R);var W=document.createElement("span");mxUtils.write(W,mxResources.get("to"));D.appendChild(W);var J=R.cloneNode(!0);D.appendChild(J);mxEvent.addListener(R,"focus",function(){H.checked=!0});mxEvent.addListener(J,"focus",function(){H.checked=!0});mxEvent.addListener(R,"change",I);mxEvent.addListener(J,"change",I);if(null!=c.pages&&(G=c.pages.length,null!=c.currentPage))for(I=
-0;I<c.pages.length;I++)if(c.currentPage==c.pages[I]){N=I+1;R.value=N;J.value=N;break}R.setAttribute("max",G);J.setAttribute("max",G);mxUtils.br(D);var V=c.addRadiobox(D,"pages",mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),U=c.addCheckbox(D,mxResources.get("crop"),!1,!0),X=c.addCheckbox(D,mxResources.get("grid"),!1,!1);mxEvent.addListener(E,"change",C);mxEvent.addListener(H,"change",C);mxEvent.addListener(V,"change",C);B+=64}else V=c.addCheckbox(D,mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),
-U=c.addCheckbox(D,mxResources.get("crop"),!m.pageVisible||!c.pdfPageExport,!c.pdfPageExport),X=c.addCheckbox(D,mxResources.get("grid"),!1,!1),c.pdfPageExport||mxEvent.addListener(V,"change",C);C=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName();var t=null,F=null;if(EditorUi.isElectronApp||C)F=c.addCheckbox(D,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),B+=30;C&&(t=c.addCheckbox(D,mxResources.get("transparentBackground"),!1),B+=30);D=new CustomDialog(c,
-D,mxUtils.bind(this,function(){var K=null;if(!u){K=parseInt(R.value);var T=parseInt(J.value);K=E.checked||K==N&&T==N?null:{from:Math.max(0,Math.min(G-1,K-1)),to:Math.max(0,Math.min(G-1,T-1))}}c.downloadFile("pdf",null,null,!V.checked,u?!0:!E.checked&&null==K,!U.checked,null!=t&&t.checked,null,null,X.checked,null!=F&&F.checked,K)}),null,mxResources.get("export"));c.showDialog(D.container,300,B,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<
+0;I<c.pages.length;I++)if(c.currentPage==c.pages[I]){N=I+1;R.value=N;J.value=N;break}R.setAttribute("max",G);J.setAttribute("max",G);mxUtils.br(D);var V=c.addRadiobox(D,"pages",mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),U=c.addCheckbox(D,mxResources.get("crop"),!1,!0),X=c.addCheckbox(D,mxResources.get("grid"),!1,!1);mxEvent.addListener(F,"change",C);mxEvent.addListener(H,"change",C);mxEvent.addListener(V,"change",C);B+=64}else V=c.addCheckbox(D,mxResources.get("selectionOnly"),!1,m.isSelectionEmpty()),
+U=c.addCheckbox(D,mxResources.get("crop"),!m.pageVisible||!c.pdfPageExport,!c.pdfPageExport),X=c.addCheckbox(D,mxResources.get("grid"),!1,!1),c.pdfPageExport||mxEvent.addListener(V,"change",C);C=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==c.getServiceName();var t=null,E=null;if(EditorUi.isElectronApp||C)E=c.addCheckbox(D,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),B+=30;C&&(t=c.addCheckbox(D,mxResources.get("transparentBackground"),!1),B+=30);D=new CustomDialog(c,
+D,mxUtils.bind(this,function(){var K=null;if(!u){K=parseInt(R.value);var T=parseInt(J.value);K=F.checked||K==N&&T==N?null:{from:Math.max(0,Math.min(G-1,K-1)),to:Math.max(0,Math.min(G-1,T-1))}}c.downloadFile("pdf",null,null,!V.checked,u?!0:!F.checked&&null==K,!U.checked,null!=t&&t.checked,null,null,X.checked,null!=E&&E.checked,K)}),null,mxResources.get("export"));c.showDialog(D.container,300,B,!0,!0)}else c.showDialog((new PrintDialog(c,mxResources.get("formatPdf"))).container,360,null!=c.pages&&1<
c.pages.length&&(c.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));c.actions.addAction("open...",function(){c.pickFile()});c.actions.addAction("close",function(){function u(){null!=D&&D.removeDraft();c.fileLoaded(null)}var D=c.getCurrentFile();null!=D&&D.isModified()?c.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()});c.actions.addAction("editShape...",mxUtils.bind(this,function(){m.getSelectionCells();if(1==m.getSelectionCount()){var u=
m.getSelectionCell(),D=m.view.getState(u);null!=D&&null!=D.shape&&null!=D.shape.stencil&&(u=new EditShapeDialog(c,u,mxResources.get("editShape")+":",630,400),c.showDialog(u.container,640,480,!0,!1),u.init())}}));c.actions.addAction("revisionHistory...",function(){c.isRevisionHistorySupported()?c.spinner.spin(document.body,mxResources.get("loading"))&&c.getRevisions(mxUtils.bind(this,function(u,D){c.spinner.stop();u=new RevisionDialog(c,u,D);c.showDialog(u.container,640,480,!0,!0);u.init()}),mxUtils.bind(this,
function(u){c.handleError(u)})):c.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});c.actions.addAction("createRevision",function(){c.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");l=c.actions.addAction("synchronize",function(){c.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(l.label=mxResources.get("refresh"));c.actions.addAction("upload...",function(){var u=c.getCurrentFile();null!=u&&(window.drawdata=
@@ -12855,9 +12855,9 @@ c.getFileData(),u=null!=u.getTitle()?u.getTitle():c.defaultFilename,c.openLink(w
l.isEnabled=n);isLocalStorage&&(l=c.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),l.setToggleAction(!0),l.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var p=c.actions.addAction("autosave",function(){c.editor.setAutosave(!c.editor.autosave)});p.setToggleAction(!0);p.setSelectedCallback(function(){return p.isEnabled()&&c.editor.autosave});c.actions.addAction("editGeometry...",function(){for(var u=
m.getSelectionCells(),D=[],B=0;B<u.length;B++)m.getModel().isVertex(u[B])&&D.push(u[B]);0<D.length&&(u=new EditGeometryDialog(c,D),c.showDialog(u.container,200,270,!0,!0),u.init())},null,null,Editor.ctrlKey+"+Shift+M");var q=null;c.actions.addAction("copyStyle",function(){m.isEnabled()&&!m.isSelectionEmpty()&&(q=m.copyStyle(m.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");c.actions.addAction("pasteStyle",function(){m.isEnabled()&&!m.isSelectionEmpty()&&null!=q&&m.pasteStyle(q,m.getSelectionCells())},
null,null,Editor.ctrlKey+"+Shift+V");c.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!c.isOffline()){var u=new BackgroundImageDialog(c,function(D){c.setBackgroundImage(D)});c.showDialog(u.container,400,170,!0,!0);u.init()}}));c.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,
-function(u,D,B,C,G,N,I,E,H,R,W,J,V,U,X){H=parseInt(u);!isNaN(H)&&0<H&&(X?c.downloadFile("remoteSvg",null,null,B,null,E,D,u,I,null,G):c.exportSvg(H/100,D,B,C,G,N,I,!E,!1,R,J,V,U))}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(u,D,B,C,G,N,I,E,H,R,W,J,V){u=parseInt(u);!isNaN(u)&&
-0<u&&c.exportImage(u/100,D,B,C,G,I,!E,!1,null,W,null,J,V)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(u,D,B,C,G){c.downloadFile(D?"xmlpng":"png",null,null,u,null,null,B,C,G)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",
-mxUtils.bind(this,function(u,D,B,C,G,N,I,E,H,R,W,J,V){u=parseInt(u);!isNaN(u)&&0<u&&c.exportImage(u/100,!1,B,C,!1,I,!E,!1,"jpeg",W,null,J,V)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(u,D,B,C,G){c.downloadFile("jpeg",null,null,u,null,null,null,C,G)}),!0,!0)}));l=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var u=mxUtils.sortCells(m.model.getTopmostCells(m.getSelectionCells())),
+function(u,D,B,C,G,N,I,F,H,R,W,J,V,U,X){H=parseInt(u);!isNaN(H)&&0<H&&(X?c.downloadFile("remoteSvg",null,null,B,null,F,D,u,I,null,G):c.exportSvg(H/100,D,B,C,G,N,I,!F,!1,R,J,V,U))}),!0,null,"svg",!0)}));c.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(u,D,B,C,G,N,I,F,H,R,W,J,V){u=parseInt(u);!isNaN(u)&&
+0<u&&c.exportImage(u/100,D,B,C,G,I,!F,!1,null,W,null,J,V)}),!0,Editor.defaultIncludeDiagram,"png",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(u,D,B,C,G){c.downloadFile(D?"xmlpng":"png",null,null,u,null,null,B,C,G)}),!1,!0)}));c.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){c.isExportToCanvas()?c.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",
+mxUtils.bind(this,function(u,D,B,C,G,N,I,F,H,R,W,J,V){u=parseInt(u);!isNaN(u)&&0<u&&c.exportImage(u/100,!1,B,C,!1,I,!F,!1,"jpeg",W,null,J,V)}),!0,!1,"jpeg",!0):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||c.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(u,D,B,C,G){c.downloadFile("jpeg",null,null,u,null,null,null,C,G)}),!0,!0)}));l=c.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var u=mxUtils.sortCells(m.model.getTopmostCells(m.getSelectionCells())),
D=mxUtils.getXml(0==u.length?c.editor.getGraphXml():m.encodeCells(u));c.copyImage(u,D)}));l.visible=Editor.enableNativeCipboard&&c.isExportToCanvas()&&!mxClient.IS_SF;l=c.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){m.setShadowVisible(!m.shadowVisible)}));l.setToggleAction(!0);l.setSelectedCallback(function(){return m.shadowVisible});c.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){c.isOffline()||mxClient.IS_CHROMEAPP||
EditorUi.isElectronApp?c.alert(c.editor.appName+" "+EditorUi.VERSION):c.openLink("https://www.diagrams.net/")}));c.actions.addAction("support...",function(){EditorUi.isElectronApp?c.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):c.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});c.actions.addAction("exportOptionsDisabled...",function(){c.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});c.actions.addAction("keyboardShortcuts...",
function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?c.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):c.openLink("shortcuts.svg")});c.actions.addAction("feedback...",function(){var u=new FeedbackDialog(c);c.showDialog(u.container,610,360,!0,!1);u.init()});c.actions.addAction("quickStart...",function(){c.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});l=c.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?
@@ -12867,7 +12867,7 @@ this[D].window.setVisible(!0)}else this[D].window.setVisible(!this[D].window.isV
"nowrap";var B=document.createElement("h3");mxUtils.write(B,mxResources.get("formatVsdx"));B.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";D.appendChild(B);var C=c.addCheckbox(D,mxResources.get("allPages"),!u,u);C.style.marginBottom="16px";u=new CustomDialog(c,D,mxUtils.bind(this,function(){c.exportVisio(!C.checked)}),null,mxResources.get("export"));c.showDialog(u.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&c.actions.addAction("configuration...",
function(){var u=document.createElement("input");u.setAttribute("type","checkbox");u.style.marginRight="4px";u.checked=mxSettings.getShowStartScreen();u.defaultChecked=u.checked;if(c.isSettingsEnabled()&&"1"==urlParams.sketch){var D=document.createElement("span");D.style["float"]="right";D.style.cursor="pointer";D.style.userSelect="none";D.style.marginTop="-4px";D.appendChild(u);mxUtils.write(D,mxResources.get("showStartScreen"));mxEvent.addListener(D,"click",function(G){mxEvent.getSource(G)!=u&&
(u.checked=!u.checked)});header=D}var B=localStorage.getItem(Editor.configurationKey);D=[[mxResources.get("reset"),function(G,N){c.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(G)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),c.hideDialog(),c.alert(mxResources.get("restartForChangeRequired")))}catch(I){c.handleError(I)}})},"Shift+Click to Reset Settings"]];var C=c.actions.get("plugins");
-null!=C&&"1"==urlParams.sketch&&D.push([mxResources.get("plugins"),C.funct]);EditorUi.isElectronApp||D.push([mxResources.get("share"),function(G,N){if(0<N.value.length)try{var I=JSON.parse(N.value),E=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(I)),H=new EmbedDialog(c,E);c.showDialog(H.container,450,240,!0);H.init()}catch(R){c.handleError(R)}else c.handleError({message:mxResources.get("invalidInput")})}]);D=new TextareaDialog(c,mxResources.get("configuration")+
+null!=C&&"1"==urlParams.sketch&&D.push([mxResources.get("plugins"),C.funct]);EditorUi.isElectronApp||D.push([mxResources.get("share"),function(G,N){if(0<N.value.length)try{var I=JSON.parse(N.value),F=window.location.protocol+"//"+window.location.host+"/"+c.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(I)),H=new EmbedDialog(c,F);c.showDialog(H.container,450,240,!0);H.init()}catch(R){c.handleError(R)}else c.handleError({message:mxResources.get("invalidInput")})}]);D=new TextareaDialog(c,mxResources.get("configuration")+
":",null!=B?JSON.stringify(JSON.parse(B),null,2):"",function(G){if(null!=G)try{if(null!=u.parentNode&&(mxSettings.setShowStartScreen(u.checked),mxSettings.save()),G==B)c.hideDialog();else{if(0<G.length){var N=JSON.parse(G);localStorage.setItem(Editor.configurationKey,JSON.stringify(N))}else localStorage.removeItem(Editor.configurationKey);c.hideDialog();c.alert(mxResources.get("restartForChangeRequired"))}}catch(I){c.handleError(I)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",
D,u.parentNode);c.showDialog(D.container,620,460,!0,!1);D.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(u,D){var B=mxUtils.bind(this,function(G){var N=""==G?mxResources.get("automatic"):mxLanguageMap[G],I=null;""!=N&&(I=u.addItem(N,null,mxUtils.bind(this,function(){mxSettings.setLanguage(G);mxSettings.save();mxClient.language=G;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);c.alert(mxResources.get("restartForChangeRequired"))}),
D),(G==mxLanguage||""==G&&null==mxLanguage)&&u.addCheckmark(I,Editor.checkmarkImage));return I});B("");u.addSeparator(D);for(var C in mxLanguageMap)B(C)})));var x=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(u){var D=x.apply(this,arguments);if(null!=D&&"1"!=urlParams.noLangIcon){var B=this.get("language");if(null!=B){B=D.addMenu("",B.funct);B.setAttribute("title",mxResources.get("language"));B.style.width="16px";B.style.paddingTop="2px";B.style.paddingLeft="4px";B.style.zIndex=
@@ -12875,9 +12875,9 @@ D),(G==mxLanguage||""==G&&null==mxLanguage)&&u.addCheckmark(I,Editor.checkmarkIm
"1";B.appendChild(C);mxUtils.setOpacity(B,40);"1"==urlParams.winCtrls&&(B.style.right="95px",B.style.width="19px",B.style.height="19px",B.style.webkitAppRegion="no-drag",C.style.webkitAppRegion="no-drag");if("atlas"==uiTheme||"dark"==uiTheme)B.style.opacity="0.85",B.style.filter="invert(100%)";document.body.appendChild(B);D.langIcon=B}}return D}}c.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];
c.actions.addAction("runLayout",function(){var u=new TextareaDialog(c,"Run Layouts:",JSON.stringify(c.customLayoutConfig,null,2),function(D){if(0<D.length)try{var B=JSON.parse(D);c.executeLayouts(m.createLayouts(B));c.customLayoutConfig=B;c.hideDialog()}catch(C){c.handleError(C)}},null,null,null,null,function(D,B){var C=mxUtils.button(mxResources.get("copy"),function(){try{var G=B.value;B.value=JSON.stringify(JSON.parse(G));B.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?B.select():
document.execCommand("selectAll",!1,null);document.execCommand("copy");c.alert(mxResources.get("copiedToClipboard"));B.value=G}catch(N){c.handleError(N)}});C.setAttribute("title","copy");C.className="geBtn";D.appendChild(C)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");c.showDialog(u.container,620,460,!0,!0);u.init()});l=this.get("layout");var y=l.funct;l.funct=function(u,D){y.apply(this,arguments);u.addItem(mxResources.get("orgChart"),null,function(){var B=null,C=20,G=20,N=function(){if("undefined"!==
-typeof mxOrgChartLayout&&null!=B){var U=c.editor.graph,X=new mxOrgChartLayout(U,B,C,G),t=U.getDefaultParent();1<U.model.getChildCount(U.getSelectionCell())&&(t=U.getSelectionCell());X.execute(t)}},I=document.createElement("div"),E=document.createElement("div");E.style.marginTop="6px";E.style.display="inline-block";E.style.width="140px";mxUtils.write(E,mxResources.get("orgChartType")+": ");I.appendChild(E);var H=document.createElement("select");H.style.width="200px";H.style.boxSizing="border-box";
-E=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var R=0;R<E.length;R++){var W=document.createElement("option");mxUtils.write(W,E[R]);W.value=R;2==R&&W.setAttribute("selected","selected");H.appendChild(W)}mxEvent.addListener(H,"change",function(){B=H.value});I.appendChild(H);E=document.createElement("div");E.style.marginTop=
-"6px";E.style.display="inline-block";E.style.width="140px";mxUtils.write(E,mxResources.get("parentChildSpacing")+": ");I.appendChild(E);var J=document.createElement("input");J.type="number";J.value=C;J.style.width="200px";J.style.boxSizing="border-box";I.appendChild(J);mxEvent.addListener(J,"change",function(){C=J.value});E=document.createElement("div");E.style.marginTop="6px";E.style.display="inline-block";E.style.width="140px";mxUtils.write(E,mxResources.get("siblingSpacing")+": ");I.appendChild(E);
+typeof mxOrgChartLayout&&null!=B){var U=c.editor.graph,X=new mxOrgChartLayout(U,B,C,G),t=U.getDefaultParent();1<U.model.getChildCount(U.getSelectionCell())&&(t=U.getSelectionCell());X.execute(t)}},I=document.createElement("div"),F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("orgChartType")+": ");I.appendChild(F);var H=document.createElement("select");H.style.width="200px";H.style.boxSizing="border-box";
+F=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var R=0;R<F.length;R++){var W=document.createElement("option");mxUtils.write(W,F[R]);W.value=R;2==R&&W.setAttribute("selected","selected");H.appendChild(W)}mxEvent.addListener(H,"change",function(){B=H.value});I.appendChild(H);F=document.createElement("div");F.style.marginTop=
+"6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("parentChildSpacing")+": ");I.appendChild(F);var J=document.createElement("input");J.type="number";J.value=C;J.style.width="200px";J.style.boxSizing="border-box";I.appendChild(J);mxEvent.addListener(J,"change",function(){C=J.value});F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("siblingSpacing")+": ");I.appendChild(F);
var V=document.createElement("input");V.type="number";V.value=G;V.style.width="200px";V.style.boxSizing="border-box";I.appendChild(V);mxEvent.addListener(V,"change",function(){G=V.value});I=new CustomDialog(c,I,function(){null==B&&(B=2);c.loadOrgChartLayouts(N)});c.showDialog(I.container,355,140,!0,!0)},D,null,n());u.addSeparator(D);u.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var B=new mxParallelEdgeLayout(m);B.checkOverlap=!0;c.prompt(mxResources.get("spacing"),B.spacing,
mxUtils.bind(this,function(C){B.spacing=C;c.executeLayout(function(){B.execute(m.getDefaultParent(),m.isSelectionEmpty()?null:m.getSelectionCells())},!1)}))}),D);u.addSeparator(D);c.menus.addMenuItem(u,"runLayout",D,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(u,D){if(!mxClient.IS_CHROMEAPP&&c.isOffline())this.addMenuItems(u,["about"],D);else{var B=u.addItem("Search:",null,null,D,null,null,!1);B.style.backgroundColor=Editor.isDarkMode()?"#505759":
"whiteSmoke";B.style.cursor="default";var C=document.createElement("input");C.setAttribute("type","text");C.setAttribute("size","25");C.style.marginLeft="8px";mxEvent.addListener(C,"keydown",mxUtils.bind(this,function(G){var N=mxUtils.trim(C.value);13==G.keyCode&&0<N.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(N)),C.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",
@@ -12886,42 +12886,42 @@ function(){c.checkForUpdates()}),this.addMenuItems(u,"- keyboardShortcuts quickS
prompt("Language Code",Graph.diagramLanguage||"");null!=u&&(Graph.diagramLanguage=0<u.length?u:null,m.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");
mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");c.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!m.isSelectionEmpty()){var u=m.cloneCells(m.getSelectionCells()),D=m.getBoundingBoxFromGeometry(u);u=m.moveCells(u,-D.x,-D.y);c.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+D.width+", "+D.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(m.encodeCells(u)))+
"'),")}}));c.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var u=m.getGraphBounds(),D=m.view.translate,B=m.view.scale;m.insertVertex(m.getDefaultParent(),null,"",u.x/B-D.x,u.y/B-D.y,u.width/B,u.height/B,"fillColor=none;strokeColor=red;")}));c.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var u=null!=c.pages&&null!=c.getCurrentFile()?c.getCurrentFile().getAnonymizedXmlForPages(c.pages):"";u=new TextareaDialog(c,"Paste Data:",u,function(D){if(0<D.length)try{var B=
-function(E){function H(T){if(null==K[T]){if(K[T]=!0,null!=J[T]){for(;0<J[T].length;){var P=J[T].pop();H(P)}delete J[T]}}else mxLog.debug(R+": Visited: "+T)}var R=E.parentNode.id,W=E.childNodes;E={};for(var J={},V=null,U={},X=0;X<W.length;X++){var t=W[X];if(null!=t.id&&0<t.id.length)if(null==E[t.id]){E[t.id]=t.id;var F=t.getAttribute("parent");null==F?null!=V?mxLog.debug(R+": Multiple roots: "+t.id):V=t.id:(null==J[F]&&(J[F]=[]),J[F].push(t.id))}else U[t.id]=t.id}W=Object.keys(U);0<W.length?(W=R+": "+
-W.length+" Duplicates: "+W.join(", "),mxLog.debug(W+" (see console)")):mxLog.debug(R+": Checked");var K={};null==V?mxLog.debug(R+": No root"):(H(V),Object.keys(K).length!=Object.keys(E).length&&(mxLog.debug(R+": Invalid tree: (see console)"),console.log(R+": Invalid tree",J)))};"<"!=D.charAt(0)&&(D=Graph.decompress(D),mxLog.debug("See console for uncompressed XML"),console.log("xml",D));var C=mxUtils.parseXml(D),G=c.getPagesForNode(C.documentElement,"mxGraphModel");if(null!=G&&0<G.length)try{var N=
-c.getHashValueForPages(G);mxLog.debug("Checksum: ",N)}catch(E){mxLog.debug("Error: ",E.message)}else mxLog.debug("No pages found for checksum");var I=C.getElementsByTagName("root");for(D=0;D<I.length;D++)B(I[D]);mxLog.show()}catch(E){c.handleError(E),null!=window.console&&console.error(E)}});c.showDialog(u.container,620,460,!0,!0);u.init()}));var z=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var u=new TextareaDialog(c,"Diff/Sync:","",function(D){var B=c.getCurrentFile();
+function(F){function H(T){if(null==K[T]){if(K[T]=!0,null!=J[T]){for(;0<J[T].length;){var P=J[T].pop();H(P)}delete J[T]}}else mxLog.debug(R+": Visited: "+T)}var R=F.parentNode.id,W=F.childNodes;F={};for(var J={},V=null,U={},X=0;X<W.length;X++){var t=W[X];if(null!=t.id&&0<t.id.length)if(null==F[t.id]){F[t.id]=t.id;var E=t.getAttribute("parent");null==E?null!=V?mxLog.debug(R+": Multiple roots: "+t.id):V=t.id:(null==J[E]&&(J[E]=[]),J[E].push(t.id))}else U[t.id]=t.id}W=Object.keys(U);0<W.length?(W=R+": "+
+W.length+" Duplicates: "+W.join(", "),mxLog.debug(W+" (see console)")):mxLog.debug(R+": Checked");var K={};null==V?mxLog.debug(R+": No root"):(H(V),Object.keys(K).length!=Object.keys(F).length&&(mxLog.debug(R+": Invalid tree: (see console)"),console.log(R+": Invalid tree",J)))};"<"!=D.charAt(0)&&(D=Graph.decompress(D),mxLog.debug("See console for uncompressed XML"),console.log("xml",D));var C=mxUtils.parseXml(D),G=c.getPagesForNode(C.documentElement,"mxGraphModel");if(null!=G&&0<G.length)try{var N=
+c.getHashValueForPages(G);mxLog.debug("Checksum: ",N)}catch(F){mxLog.debug("Error: ",F.message)}else mxLog.debug("No pages found for checksum");var I=C.getElementsByTagName("root");for(D=0;D<I.length;D++)B(I[D]);mxLog.show()}catch(F){c.handleError(F),null!=window.console&&console.error(F)}});c.showDialog(u.container,620,460,!0,!0);u.init()}));var z=null;c.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=c.pages){var u=new TextareaDialog(c,"Diff/Sync:","",function(D){var B=c.getCurrentFile();
if(0<D.length&&null!=B)try{var C=JSON.parse(D);B.patch([C],null,!0);c.hideDialog()}catch(G){c.handleError(G)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(D,B){z=c.getPagesForXml(c.getFileData(!0));u.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(z)}],["Diff",function(D,B){try{u.textarea.value=JSON.stringify(c.diffPages(z,c.pages),null,2)}catch(C){c.handleError(C)}}]]);null==z?(z=c.getPagesForXml(c.getFileData(!0)),u.textarea.value=
"Snapshot created "+(new Date).toLocaleString()+" Checksum "+c.getHashValueForPages(z)):u.textarea.value=JSON.stringify(c.diffPages(z,c.pages),null,2);c.showDialog(u.container,620,460,!0,!0);u.init()}else c.alert("No pages")}));c.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var u=c.getCurrentFile();console.log("editorUi",c,"file",u);if(null!=u&&u.isRealtime()){console.log("Checksum ownPages",c.getHashValueForPages(u.ownPages));console.log("Checksum theirPages",c.getHashValueForPages(u.theirPages));
console.log("diff ownPages/theirPages",c.diffPages(u.ownPages,u.theirPages));var D=u.getShadowPages();null!=D&&(console.log("Checksum shadowPages",c.getHashValueForPages(D)),console.log("diff shadowPages/ownPages",c.diffPages(D,u.ownPages)),console.log("diff ownPages/shadowPages",c.diffPages(u.ownPages,D)),console.log("diff theirPages/shadowPages",c.diffPages(u.theirPages,D)));null!=u.sync&&null!=u.sync.snapshot&&(console.log("Checksum snapshot",c.getHashValueForPages(u.sync.snapshot)),console.log("diff ownPages/snapshot",
c.diffPages(u.ownPages,u.sync.snapshot)),console.log("diff theirPages/snapshot",c.diffPages(u.theirPages,u.sync.snapshot)),null!=c.pages&&console.log("diff snapshot/actualPages",c.diffPages(u.sync.snapshot,c.pages)));null!=c.pages&&(console.log("diff ownPages/actualPages",c.diffPages(u.ownPages,c.pages)),console.log("diff theirPages/actualPages",c.diffPages(u.theirPages,c.pages)))}null!=u&&console.log("Shadow pages",[c.getXmlForPages(u.getShadowPages())]);null!=c.pages&&console.log("Checksum actualPages",
c.getHashValueForPages(c.pages))}));c.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",c);var u=c.getCurrentFile();null!=u&&u.isRealtime()&&null!=u.shadowPages&&(console.log("patching actualPages to shadowPages",u.patch([c.diffPages(u.shadowPages,c.pages)])),u.ownPages=c.clonePages(c.pages),u.theirPages=c.clonePages(c.pages),u.shadowPages=c.clonePages(c.pages),null!=u.sync&&(u.sync.snapshot=c.clonePages(c.pages)))}));c.actions.addAction("testOptimize",mxUtils.bind(this,
function(){m.model.beginUpdate();try{var u=m.model.cells,D=0,B=[],C=[],G;for(G in u){var N=u[G],I=m.getCurrentCellStyle(N)[mxConstants.STYLE_IMAGE];null!=I&&"data:"==I.substring(0,5)&&(null==B[I]&&(B[I]=(B[I]||0)+1,D++),C.push(N))}m.setCellStyles(mxConstants.STYLE_IMAGE,null,C);console.log("Removed",D,"image(s) from",C.length,"cell(s): ",[C,B])}finally{m.model.endUpdate()}}));c.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(c,m.getModel())}));c.actions.addAction("testXmlImageExport",
-mxUtils.bind(this,function(){var u=new mxImageExport,D=m.getGraphBounds(),B=m.view.scale,C=mxUtils.createXmlDocument(),G=C.createElement("output");C.appendChild(G);C=new mxXmlCanvas2D(G);C.translate(Math.floor((1-D.x)/B),Math.floor((1-D.y)/B));C.scale(1/B);var N=0,I=C.save;C.save=function(){N++;I.apply(this,arguments)};var E=C.restore;C.restore=function(){N--;E.apply(this,arguments)};var H=u.drawShape;u.drawShape=function(R){mxLog.debug("entering shape",R,N);H.apply(this,arguments);mxLog.debug("leaving shape",
+mxUtils.bind(this,function(){var u=new mxImageExport,D=m.getGraphBounds(),B=m.view.scale,C=mxUtils.createXmlDocument(),G=C.createElement("output");C.appendChild(G);C=new mxXmlCanvas2D(G);C.translate(Math.floor((1-D.x)/B),Math.floor((1-D.y)/B));C.scale(1/B);var N=0,I=C.save;C.save=function(){N++;I.apply(this,arguments)};var F=C.restore;C.restore=function(){N--;F.apply(this,arguments)};var H=u.drawShape;u.drawShape=function(R){mxLog.debug("entering shape",R,N);H.apply(this,arguments);mxLog.debug("leaving shape",
R,N)};u.drawState(m.getView().getState(m.model.root),C);mxLog.show();mxLog.debug(mxUtils.getXml(G));mxLog.debug("stateCounter",N)}));c.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(u,D){this.addMenuItems(u,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),
D)})))}c.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!c.isOffline()?c.showDialog((new MoreShapesDialog(c,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):c.showDialog((new MoreShapesDialog(c,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});c.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(u){m.isEnabled()&&(u=new mxCell("",new mxGeometry(0,0,120,120),c.defaultCustomShapeStyle),u.vertex=!0,u=new EditShapeDialog(c,
-u,mxResources.get("editShape")+":",630,400),c.showDialog(u.container,640,480,!0,!1),u.init())})).isEnabled=n;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(u){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",u,function(D,B,C,G,N,I,E,H,R,W,J){c.createHtml(D,B,C,G,N,I,E,H,R,W,J,mxUtils.bind(this,function(V,
-U){var X=new EmbedDialog(c,V+"\n"+U,null,null,function(){var t=window.open(),F=t.document;if(null!=F){"CSS1Compat"===document.compatMode&&F.writeln("<!DOCTYPE html>");F.writeln("<html>");F.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');F.writeln("<body>");F.writeln(V);var K=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;K&&F.writeln(U);F.writeln("</body>");F.writeln("</html>");F.close();if(!K){var T=t.document.createElement("div");
-T.marginLeft="26px";T.marginTop="26px";mxUtils.write(T,mxResources.get("updatingDocument"));K=t.document.createElement("img");K.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");K.style.marginLeft="6px";T.appendChild(K);t.document.body.insertBefore(T,t.document.body.firstChild);window.setTimeout(function(){var P=document.createElement("script");P.type="text/javascript";P.src=/<script.*?src="(.*?)"/.exec(U)[1];F.body.appendChild(P);T.parentNode.removeChild(T)},
+u,mxResources.get("editShape")+":",630,400),c.showDialog(u.container,640,480,!0,!1),u.init())})).isEnabled=n;c.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(u){c.spinner.stop();c.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",u,function(D,B,C,G,N,I,F,H,R,W,J){c.createHtml(D,B,C,G,N,I,F,H,R,W,J,mxUtils.bind(this,function(V,
+U){var X=new EmbedDialog(c,V+"\n"+U,null,null,function(){var t=window.open(),E=t.document;if(null!=E){"CSS1Compat"===document.compatMode&&E.writeln("<!DOCTYPE html>");E.writeln("<html>");E.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');E.writeln("<body>");E.writeln(V);var K=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;K&&E.writeln(U);E.writeln("</body>");E.writeln("</html>");E.close();if(!K){var T=t.document.createElement("div");
+T.marginLeft="26px";T.marginTop="26px";mxUtils.write(T,mxResources.get("updatingDocument"));K=t.document.createElement("img");K.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");K.style.marginLeft="6px";T.appendChild(K);t.document.body.insertBefore(T,t.document.body.firstChild);window.setTimeout(function(){var P=document.createElement("script");P.type="text/javascript";P.src=/<script.*?src="(.*?)"/.exec(U)[1];E.body.appendChild(P);T.parentNode.removeChild(T)},
20)}}else c.handleError({message:mxResources.get("errorUpdatingPreview")})});c.showDialog(X.container,450,240,!0,!0);X.init()}))})})}));c.actions.put("liveImage",new Action("Live image...",function(){var u=c.getCurrentFile();null!=u&&c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(D){c.spinner.stop();null!=D?(D=new EmbedDialog(c,'<img src="'+(u.constructor!=DriveFile?D:"https://drive.google.com/uc?id="+u.getId())+'"/>'),c.showDialog(D.container,
450,240,!0,!0),D.init()):c.handleError({message:mxResources.get("invalidPublicUrl")})})}));c.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){c.showEmbedImageDialog(function(u,D,B,C,G,N){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedImage(u,D,B,C,G,N,function(I){c.spinner.stop();I=new EmbedDialog(c,I);c.showDialog(I.container,450,240,!0,!0);I.init()},function(I){c.spinner.stop();c.handleError(I)})},mxResources.get("image"),mxResources.get("retina"),
c.isExportToCanvas())}));c.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){c.showEmbedImageDialog(function(u,D,B,C,G,N){c.spinner.spin(document.body,mxResources.get("loading"))&&c.createEmbedSvg(u,D,B,C,G,N,function(I){c.spinner.stop();I=new EmbedDialog(c,I);c.showDialog(I.container,450,240,!0,!0);I.init()},function(I){c.spinner.stop();c.handleError(I)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));
-c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var u=m.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(u.height/m.view.scale)+2,function(D,B,C,G,N,I,E,H,R){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(W){c.spinner.stop();var J=[];R&&J.push("tags=%7B%7D");W=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+E+";height:"+H+';" src="'+c.createLink(D,B,C,G,N,I,W,null,
+c.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var u=m.getGraphBounds();c.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(u.height/m.view.scale)+2,function(D,B,C,G,N,I,F,H,R){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(W){c.spinner.stop();var J=[];R&&J.push("tags=%7B%7D");W=new EmbedDialog(c,'<iframe frameborder="0" style="width:'+F+";height:"+H+';" src="'+c.createLink(D,B,C,G,N,I,W,null,
J)+'"></iframe>');c.showDialog(W.container,450,240,!0,!0);W.init()})},!0)}));c.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var u=document.createElement("div");u.style.position="absolute";u.style.bottom="30px";u.style.textAlign="center";u.style.width="100%";u.style.left="0px";var D=document.createElement("a");D.setAttribute("href","javascript:void(0);");D.setAttribute("target","_blank");D.style.cursor="pointer";mxUtils.write(D,mxResources.get("getNotionChromeExtension"));
-u.appendChild(D);mxEvent.addListener(D,"click",function(B){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(B)});c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(B,C,G,N,I,E,H,R,W){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(J){c.spinner.stop();var V=["border=0"];W&&V.push("tags=%7B%7D");J=new EmbedDialog(c,c.createLink(B,C,G,N,I,E,J,null,V,!0));
-c.showDialog(J.container,450,240,!0,!0);J.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",u)}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(u,D,B,C,G,N,I,E,H){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(R){c.spinner.stop();var W=[];H&&W.push("tags=%7B%7D");R=new EmbedDialog(c,c.createLink(u,D,B,C,G,N,R,null,W));c.showDialog(R.container,450,240,
+u.appendChild(D);mxEvent.addListener(D,"click",function(B){c.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(B)});c.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(B,C,G,N,I,F,H,R,W){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(J){c.spinner.stop();var V=["border=0"];W&&V.push("tags=%7B%7D");J=new EmbedDialog(c,c.createLink(B,C,G,N,I,F,J,null,V,!0));
+c.showDialog(J.container,450,240,!0,!0);J.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",u)}));c.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){c.showPublishLinkDialog(null,null,null,null,function(u,D,B,C,G,N,I,F,H){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),function(R){c.spinner.stop();var W=[];H&&W.push("tags=%7B%7D");R=new EmbedDialog(c,c.createLink(u,D,B,C,G,N,R,null,W));c.showDialog(R.container,450,240,
!0,!0);R.init()})})}));c.actions.addAction("microsoftOffice...",function(){c.openLink("https://office.draw.io")});c.actions.addAction("googleDocs...",function(){c.openLink("http://docsaddon.draw.io")});c.actions.addAction("googleSlides...",function(){c.openLink("https://slidesaddon.draw.io")});c.actions.addAction("googleSheets...",function(){c.openLink("https://sheetsaddon.draw.io")});c.actions.addAction("googleSites...",function(){c.spinner.spin(document.body,mxResources.get("loading"))&&c.getPublicUrl(c.getCurrentFile(),
function(u){c.spinner.stop();u=new GoogleSitesDialog(c,u);c.showDialog(u.container,420,256,!0,!0);u.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)l=c.actions.addAction("scratchpad",function(){c.toggleScratchpad()}),l.setToggleAction(!0),l.setSelectedCallback(function(){return null!=c.scratchpad}),"0"!=urlParams.plugins&&c.actions.addAction("plugins...",function(){c.showDialog((new PluginsDialog(c)).container,380,240,!0,!1)});l=c.actions.addAction("search",function(){var u=c.sidebar.isEntryVisible("search");
c.sidebar.showPalette("search",!u);isLocalStorage&&(mxSettings.settings.search=!u,mxSettings.save())});l.label=mxResources.get("searchShapes");l.setToggleAction(!0);l.setSelectedCallback(function(){return c.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(c.actions.get("save").funct=function(u){m.isEditing()&&m.stopEditing();var D="0"!=urlParams.pages||null!=c.pages&&1<c.pages.length?c.getFileData(!0):mxUtils.getXml(c.editor.getGraphXml());if("json"==urlParams.proto){var B=c.createLoadMessage("save");
B.xml=D;u&&(B.exit=!0);D=JSON.stringify(B)}(window.opener||window.parent).postMessage(D,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(c.editor.modified=!1,c.editor.setStatus(""));u=c.getCurrentFile();null==u||u.constructor==EmbedFile||u.constructor==LocalFile&&null==u.mode||c.saveFile()},c.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?c.sendEmbeddedSvgExport():c.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),
c.actions.addAction("exit",function(){if("1"==urlParams.embedInline)c.sendEmbeddedSvgExport();else{var u=function(){c.editor.modified=!1;var D="json"==urlParams.proto?JSON.stringify({event:"exit",modified:c.editor.modified}):"";(window.opener||window.parent).postMessage(D,"*")};c.editor.modified?c.confirm(mxResources.get("allChangesLost"),null,u,mxResources.get("cancel"),mxResources.get("discardChanges")):u()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(u,D){c.isExportToCanvas()?(this.addMenuItems(u,
["exportPng"],D),c.jpgSupported&&this.addMenuItems(u,["exportJpg"],D)):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(u,["exportPng","exportJpg"],D);this.addMenuItems(u,["exportSvg","-"],D);c.isOffline()||c.printPdfExport?this.addMenuItems(u,["exportPdf"],D):c.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(u,["exportPdf"],D);mxClient.IS_IE||"undefined"===typeof VsdxExport&&c.isOffline()||this.addMenuItems(u,["exportVsdx"],D);this.addMenuItems(u,["-",
-"exportHtml","exportXml","exportUrl"],D);c.isOffline()||(u.addSeparator(D),this.addMenuItem(u,"export",D).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(u,D){function B(N){N.pickFile(function(I){c.spinner.spin(document.body,mxResources.get("loading"))&&N.getFile(I,function(E){var H="data:image/"==E.getData().substring(0,11)?G(E.getTitle()):"text/xml";/\.svg$/i.test(E.getTitle())&&!c.editor.isDataSvg(E.getData())&&(E.setData(Editor.createSvgDataUri(E.getData())),
-H="image/svg+xml");C(E.getData(),H,E.getTitle())},function(E){c.handleError(E,null!=E?mxResources.get("errorLoadingFile"):null)},N==c.drive)},!0)}var C=mxUtils.bind(this,function(N,I,E){var H=m.view,R=m.getGraphBounds(),W=m.snap(Math.ceil(Math.max(0,R.x/H.scale-H.translate.x)+4*m.gridSize)),J=m.snap(Math.ceil(Math.max(0,(R.y+R.height)/H.scale-H.translate.y)+4*m.gridSize));"data:image/"==N.substring(0,11)?c.loadImage(N,mxUtils.bind(this,function(V){var U=!0,X=mxUtils.bind(this,function(){c.resizeImage(V,
-N,mxUtils.bind(this,function(t,F,K){t=U?Math.min(1,Math.min(c.maxImageSize/F,c.maxImageSize/K)):1;c.importFile(N,I,W,J,Math.round(F*t),Math.round(K*t),E,function(T){c.spinner.stop();m.setSelectionCells(T);m.scrollCellToVisible(m.getSelectionCell())})}),U)});N.length>c.resampleThreshold?c.confirmImageResize(function(t){U=t;X()}):X()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(N,I,W,J,0,0,E,function(V){c.spinner.stop();m.setSelectionCells(V);
+"exportHtml","exportXml","exportUrl"],D);c.isOffline()||(u.addSeparator(D),this.addMenuItem(u,"export",D).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(u,D){function B(N){N.pickFile(function(I){c.spinner.spin(document.body,mxResources.get("loading"))&&N.getFile(I,function(F){var H="data:image/"==F.getData().substring(0,11)?G(F.getTitle()):"text/xml";/\.svg$/i.test(F.getTitle())&&!c.editor.isDataSvg(F.getData())&&(F.setData(Editor.createSvgDataUri(F.getData())),
+H="image/svg+xml");C(F.getData(),H,F.getTitle())},function(F){c.handleError(F,null!=F?mxResources.get("errorLoadingFile"):null)},N==c.drive)},!0)}var C=mxUtils.bind(this,function(N,I,F){var H=m.view,R=m.getGraphBounds(),W=m.snap(Math.ceil(Math.max(0,R.x/H.scale-H.translate.x)+4*m.gridSize)),J=m.snap(Math.ceil(Math.max(0,(R.y+R.height)/H.scale-H.translate.y)+4*m.gridSize));"data:image/"==N.substring(0,11)?c.loadImage(N,mxUtils.bind(this,function(V){var U=!0,X=mxUtils.bind(this,function(){c.resizeImage(V,
+N,mxUtils.bind(this,function(t,E,K){t=U?Math.min(1,Math.min(c.maxImageSize/E,c.maxImageSize/K)):1;c.importFile(N,I,W,J,Math.round(E*t),Math.round(K*t),F,function(T){c.spinner.stop();m.setSelectionCells(T);m.scrollCellToVisible(m.getSelectionCell())})}),U)});N.length>c.resampleThreshold?c.confirmImageResize(function(t){U=t;X()}):X()}),mxUtils.bind(this,function(){c.handleError({message:mxResources.get("cannotOpenFile")})})):c.importFile(N,I,W,J,0,0,F,function(V){c.spinner.stop();m.setSelectionCells(V);
m.scrollCellToVisible(m.getSelectionCell())})}),G=mxUtils.bind(this,function(N){var I="text/xml";/\.png$/i.test(N)?I="image/png":/\.jpe?g$/i.test(N)?I="image/jpg":/\.gif$/i.test(N)?I="image/gif":/\.pdf$/i.test(N)&&(I="application/pdf");return I});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=c.drive?u.addItem(mxResources.get("googleDrive")+"...",null,function(){B(c.drive)},D):v&&"function"===typeof window.DriveClient&&u.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
"...)",null,function(){},D,null,!1));null!=c.oneDrive?u.addItem(mxResources.get("oneDrive")+"...",null,function(){B(c.oneDrive)},D):g&&"function"===typeof window.OneDriveClient&&u.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);null!=c.dropbox?u.addItem(mxResources.get("dropbox")+"...",null,function(){B(c.dropbox)},D):d&&"function"===typeof window.DropboxClient&&u.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,
function(){},D,null,!1);u.addSeparator(D);null!=c.gitHub&&u.addItem(mxResources.get("github")+"...",null,function(){B(c.gitHub)},D);null!=c.gitLab&&u.addItem(mxResources.get("gitlab")+"...",null,function(){B(c.gitLab)},D);null!=c.trello?u.addItem(mxResources.get("trello")+"...",null,function(){B(c.trello)},D):k&&"function"===typeof window.TrelloClient&&u.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},D,null,!1);u.addSeparator(D);isLocalStorage&&"0"!=urlParams.browser&&
-u.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},D);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},D);c.isOffline()||(u.addSeparator(D),u.addItem(mxResources.get("url")+"...",null,function(){var N=new FilenameDialog(c,"",mxResources.get("import"),function(I){if(null!=I&&0<I.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var E=/(\.png)($|\?)/i.test(I)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+
-"?url="+encodeURIComponent(I),function(H){C(H,E,I)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==E)}},mxResources.get("url"));c.showDialog(N.container,300,80,!0,!0);N.init()},D))}))).isEnabled=n;this.put("theme",new Menu(mxUtils.bind(this,function(u,D){var B="1"==urlParams.sketch?"sketch":mxSettings.getUi(),C=u.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");c.alert(mxResources.get("restartForChangeRequired"))},D);"kennedy"!=
+u.addItem(mxResources.get("browser")+"...",null,function(){c.importLocalFile(!1)},D);"1"!=urlParams.noDevice&&u.addItem(mxResources.get("device")+"...",null,function(){c.importLocalFile(!0)},D);c.isOffline()||(u.addSeparator(D),u.addItem(mxResources.get("url")+"...",null,function(){var N=new FilenameDialog(c,"",mxResources.get("import"),function(I){if(null!=I&&0<I.length&&c.spinner.spin(document.body,mxResources.get("loading"))){var F=/(\.png)($|\?)/i.test(I)?"image/png":"text/xml";c.editor.loadUrl(PROXY_URL+
+"?url="+encodeURIComponent(I),function(H){C(H,F,I)},function(){c.spinner.stop();c.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==F)}},mxResources.get("url"));c.showDialog(N.container,300,80,!0,!0);N.init()},D))}))).isEnabled=n;this.put("theme",new Menu(mxUtils.bind(this,function(u,D){var B="1"==urlParams.sketch?"sketch":mxSettings.getUi(),C=u.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");c.alert(mxResources.get("restartForChangeRequired"))},D);"kennedy"!=
B&&"atlas"!=B&&"dark"!=B&&"min"!=B&&"sketch"!=B&&u.addCheckmark(C,Editor.checkmarkImage);u.addSeparator(D);C=u.addItem(mxResources.get("default"),null,function(){mxSettings.setUi("kennedy");c.alert(mxResources.get("restartForChangeRequired"))},D);"kennedy"==B&&u.addCheckmark(C,Editor.checkmarkImage);C=u.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");c.alert(mxResources.get("restartForChangeRequired"))},D);"min"==B&&u.addCheckmark(C,Editor.checkmarkImage);C=u.addItem(mxResources.get("atlas"),
null,function(){mxSettings.setUi("atlas");c.alert(mxResources.get("restartForChangeRequired"))},D);"atlas"==B&&u.addCheckmark(C,Editor.checkmarkImage);if("dark"==B||!mxClient.IS_IE&&!mxClient.IS_IE11)C=u.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");c.alert(mxResources.get("restartForChangeRequired"))},D),"dark"==B&&u.addCheckmark(C,Editor.checkmarkImage);u.addSeparator(D);C=u.addItem(mxResources.get("sketch"),null,function(){mxSettings.setUi("sketch");c.alert(mxResources.get("restartForChangeRequired"))},
D);"sketch"==B&&u.addCheckmark(C,Editor.checkmarkImage)})));l=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var u=this.editorUi.getCurrentFile();if(null!=u)if(u.constructor==LocalFile&&null!=u.fileHandle)c.showSaveFilePicker(mxUtils.bind(c,function(B,C){u.invalidFileHandle=null;u.fileHandle=B;u.title=C.name;u.desc=C;c.save(C.name)}),null,c.createFileSystemOptions(u.getTitle()));else{var D=null!=u.getTitle()?u.getTitle():this.editorUi.defaultFilename;D=new FilenameDialog(this.editorUi,
@@ -12959,24 +12959,24 @@ EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/
c.actions.addAction("drafts...",function(){var u=new FilenameDialog(c,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(D){D=parseInt(D);0<=D&&(EditorUi.draftSaveDelay=1E3*D,EditorUi.enableDrafts=0<D,mxSettings.setDraftSaveDelay(D),mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);c.showDialog(u.container,320,80,!0,!0);u.init()})}this.put("extras",new Menu(mxUtils.bind(this,function(u,D){"1"==urlParams.noLangIcon&&(this.addSubmenu("language",
u,D),u.addSeparator(D));"1"!=urlParams.embed&&(this.addSubmenu("theme",u,D),u.addSeparator(D));if("undefined"!==typeof MathJax){var B=this.addMenuItem(u,"mathematicalTypesetting",D);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(u,["spellCheck","autoBkp","drafts"],D);this.addMenuItems(u,["copyConnect","collapseExpand","-"],D);"1"!=urlParams.embed&&(B=c.getCurrentFile(),
null!=B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()&&this.addMenuItems(u,["showRemoteCursors","shareCursor"],D),this.addMenuItems(u,["autosave"],D));u.addSeparator(D);!c.isOfflineApp()&&isLocalStorage&&this.addMenuItem(u,"plugins",D);this.addMenuItems(u,["-","editDiagram"],D);Graph.translateDiagram&&this.addMenuItems(u,["diagramLanguage"]);u.addSeparator(D);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(u,["showStartScreen"],D);this.addMenuItems(u,["configuration"],
-D);u.addSeparator(D);"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",function(){function C(N){return{id:N.id,isExt:!0,url:N.downloadUrl,title:N.title,imgUrl:N.thumbnailLink,changedBy:N.lastModifyingUserName,lastModifiedOn:N.modifiedDate}}var G=new TemplatesDialog(c,function(N){console.log(arguments)},null,null,null,"user",function(N,I,E){var H=new Date;H.setDate(H.getDate()-7);c.drive.listFiles(null,H,E?!0:!1,function(R){for(var W=[],J=0;J<R.items.length;J++)W.push(C(R.items[J]));N(W)},
-I)},function(N,I,E,H){c.drive.listFiles(N,null,H?!0:!1,function(R){for(var W=[],J=0;J<R.items.length;J++)W.push(C(R.items[J]));I(W)},E)},function(N,I,E){c.drive.getFile(N.id,function(H){I(H.data)},E)},null,function(N){N({Test:[]},1)},!0,!1);c.showDialog(G.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(u,"templates",D))})));this.put("file",new Menu(mxUtils.bind(this,function(u,D){if("1"==urlParams.embed)this.addSubmenu("importFrom",u,D),this.addSubmenu("exportAs",
+D);u.addSeparator(D);"1"==urlParams.newTempDlg&&(c.actions.addAction("templates",function(){function C(N){return{id:N.id,isExt:!0,url:N.downloadUrl,title:N.title,imgUrl:N.thumbnailLink,changedBy:N.lastModifyingUserName,lastModifiedOn:N.modifiedDate}}var G=new TemplatesDialog(c,function(N){console.log(arguments)},null,null,null,"user",function(N,I,F){var H=new Date;H.setDate(H.getDate()-7);c.drive.listFiles(null,H,F?!0:!1,function(R){for(var W=[],J=0;J<R.items.length;J++)W.push(C(R.items[J]));N(W)},
+I)},function(N,I,F,H){c.drive.listFiles(N,null,H?!0:!1,function(R){for(var W=[],J=0;J<R.items.length;J++)W.push(C(R.items[J]));I(W)},F)},function(N,I,F){c.drive.getFile(N.id,function(H){I(H.data)},F)},null,function(N){N({Test:[]},1)},!0,!1);c.showDialog(G.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(u,"templates",D))})));this.put("file",new Menu(mxUtils.bind(this,function(u,D){if("1"==urlParams.embed)this.addSubmenu("importFrom",u,D),this.addSubmenu("exportAs",
u,D),this.addSubmenu("embed",u,D),"1"==urlParams.libraries&&(this.addMenuItems(u,["-"],D),this.addSubmenu("newLibrary",u,D),this.addSubmenu("openLibraryFrom",u,D)),c.isRevisionHistorySupported()&&this.addMenuItems(u,["-","revisionHistory"],D),this.addMenuItems(u,["-","pageSetup","print","-","rename"],D),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(u,["saveAndExit"],D):(this.addMenuItems(u,["save"],D),"1"==urlParams.saveAndExit&&this.addMenuItems(u,
["saveAndExit"],D))),"1"!=urlParams.noExitBtn&&this.addMenuItems(u,["exit"],D);else{var B=this.editorUi.getCurrentFile();if(null!=B&&B.constructor==DriveFile){B.isRestricted()&&this.addMenuItems(u,["exportOptionsDisabled"],D);this.addMenuItems(u,["save","-","share"],D);var C=this.addMenuItem(u,"synchronize",D);(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(C,"https://www.diagrams.net/doc/faq/synchronize");u.addSeparator(D)}else this.addMenuItems(u,["new"],D);this.addSubmenu("openFrom",
u,D);isLocalStorage&&this.addSubmenu("openRecent",u,D);null!=B&&B.constructor==DriveFile?this.addMenuItems(u,["new","-","rename","makeCopy","moveToFolder"],D):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==B||B.constructor==LocalFile&&null==B.fileHandle||(u.addSeparator(D),C=this.addMenuItem(u,"synchronize",D),(!c.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(C,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(u,["-","save","saveAs","-"],D),
mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=c.getServiceName()||c.isOfflineApp()||null==B||this.addMenuItems(u,["share","-"],D),this.addMenuItems(u,["rename"],D),c.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(u,["upload"],D):(this.addMenuItems(u,["makeCopy"],D),null!=B&&B.constructor==OneDriveFile&&this.addMenuItems(u,["moveToFolder"],D)));u.addSeparator(D);this.addSubmenu("importFrom",u,D);this.addSubmenu("exportAs",u,D);u.addSeparator(D);
this.addSubmenu("embed",u,D);this.addSubmenu("publish",u,D);u.addSeparator(D);this.addSubmenu("newLibrary",u,D);this.addSubmenu("openLibraryFrom",u,D);c.isRevisionHistorySupported()&&this.addMenuItems(u,["-","revisionHistory"],D);null!=B&&null!=c.fileNode&&"1"!=urlParams.embedInline&&(C=null!=B.getTitle()?B.getTitle():c.defaultFilename,(B.constructor==DriveFile&&null!=B.sync&&B.sync.isConnected()||!/(\.html)$/i.test(C)&&!/(\.svg)$/i.test(C))&&this.addMenuItems(u,["-","properties"]));this.addMenuItems(u,
["-","pageSetup"],D);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(u,["print"],D);this.addMenuItems(u,["-","close"])}})));f.prototype.execute=function(){var u=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var D=u.extFonts,B=0;null!=D&&B<D.length;B++){var C=document.getElementById("extFont_"+D[B].name);
-null!=C&&C.parentNode.removeChild(C)}u.extFonts=[];for(B=0;null!=this.previousExtFonts&&B<this.previousExtFonts.length;B++)this.ui.editor.graph.addExtFont(this.previousExtFonts[B].name,this.previousExtFonts[B].url);this.previousExtFonts=D};this.put("fontFamily",new Menu(mxUtils.bind(this,function(u,D){for(var B=mxUtils.bind(this,function(J,V,U,X,t){var F=c.editor.graph;X=this.styleChange(u,X||J,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],
-"1"!=urlParams["ext-fonts"]?[J,null!=V?encodeURIComponent(V):null,null]:[J],null,D,function(){"1"!=urlParams["ext-fonts"]?F.setFont(J,V):(document.execCommand("fontname",!1,J),F.addExtFont(J,V));c.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[J,null!=V?encodeURIComponent(V):null,null]:[J],"cells",[F.cellEditor.getEditingCell()]))},function(){F.updateLabelElements(F.getSelectionCells(),
-function(K){K.removeAttribute("face");K.style.fontFamily=null;"PRE"==K.nodeName&&F.replaceElement(K,"div")});"1"==urlParams["ext-fonts"]&&F.addExtFont(J,V)});U&&(U=document.createElement("span"),U.className="geSprite geSprite-delete",U.style.cursor="pointer",U.style.display="inline-block",X.firstChild.nextSibling.nextSibling.appendChild(U),mxEvent.addListener(U,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(K){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[J.toLowerCase()];
+null!=C&&C.parentNode.removeChild(C)}u.extFonts=[];for(B=0;null!=this.previousExtFonts&&B<this.previousExtFonts.length;B++)this.ui.editor.graph.addExtFont(this.previousExtFonts[B].name,this.previousExtFonts[B].url);this.previousExtFonts=D};this.put("fontFamily",new Menu(mxUtils.bind(this,function(u,D){for(var B=mxUtils.bind(this,function(J,V,U,X,t){var E=c.editor.graph;X=this.styleChange(u,X||J,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],
+"1"!=urlParams["ext-fonts"]?[J,null!=V?encodeURIComponent(V):null,null]:[J],null,D,function(){"1"!=urlParams["ext-fonts"]?E.setFont(J,V):(document.execCommand("fontname",!1,J),E.addExtFont(J,V));c.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[J,null!=V?encodeURIComponent(V):null,null]:[J],"cells",[E.cellEditor.getEditingCell()]))},function(){E.updateLabelElements(E.getSelectionCells(),
+function(K){K.removeAttribute("face");K.style.fontFamily=null;"PRE"==K.nodeName&&E.replaceElement(K,"div")});"1"==urlParams["ext-fonts"]&&E.addExtFont(J,V)});U&&(U=document.createElement("span"),U.className="geSprite geSprite-delete",U.style.cursor="pointer",U.style.display="inline-block",X.firstChild.nextSibling.nextSibling.appendChild(U),mxEvent.addListener(U,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(K){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[J.toLowerCase()];
for(var T=0;T<this.customFonts.length;T++)if(this.customFonts[T].name==J&&this.customFonts[T].url==V){this.customFonts.splice(T,1);c.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var P=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=P&&0<P.length)for(T=0;T<P.length;T++)if(P[T].name==J){P.splice(T,1);break}var Q=mxUtils.clone(this.customFonts);for(T=0;T<Q.length;T++)if(Q[T].name==J){Q.splice(T,1);break}T=new f(this.editorUi,P,Q);this.editorUi.editor.graph.model.execute(T)}this.editorUi.hideCurrentMenu();
mxEvent.consume(K)})));Graph.addFont(J,V);X.firstChild.nextSibling.style.fontFamily=J;null!=t&&X.setAttribute("title",t)}),C={},G=0;G<this.defaultFonts.length;G++){var N=this.defaultFonts[G];"string"===typeof N?B(N):null!=N.fontFamily&&null!=N.fontUrl&&(C[encodeURIComponent(N.fontFamily)+"@"+encodeURIComponent(N.fontUrl)]=!0,B(N.fontFamily,N.fontUrl))}u.addSeparator(D);if("1"!=urlParams["ext-fonts"]){N=function(J){var V=encodeURIComponent(J.name)+(null==J.url?"":"@"+encodeURIComponent(J.url));if(!C[V]){for(var U=
-J.name,X=0;null!=E[U.toLowerCase()];)U=J.name+" ("+ ++X+")";null==I[V]&&(H.push({name:J.name,url:J.url,label:U,title:J.url}),E[U.toLowerCase()]=J,I[V]=J)}};var I={},E={},H=[];for(G=0;G<this.customFonts.length;G++)N(this.customFonts[G]);for(var R in Graph.recentCustomFonts)N(Graph.recentCustomFonts[R]);H.sort(function(J,V){return J.label<V.label?-1:J.label>V.label?1:0});if(0<H.length){for(G=0;G<H.length;G++)B(H[G].name,H[G].url,!0,H[G].label,H[G].url);u.addSeparator(D)}u.addItem(mxResources.get("reset"),
+J.name,X=0;null!=F[U.toLowerCase()];)U=J.name+" ("+ ++X+")";null==I[V]&&(H.push({name:J.name,url:J.url,label:U,title:J.url}),F[U.toLowerCase()]=J,I[V]=J)}};var I={},F={},H=[];for(G=0;G<this.customFonts.length;G++)N(this.customFonts[G]);for(var R in Graph.recentCustomFonts)N(Graph.recentCustomFonts[R]);H.sort(function(J,V){return J.label<V.label?-1:J.label>V.label?1:0});if(0<H.length){for(G=0;G<H.length;G++)B(H[G].name,H[G].url,!0,H[G].label,H[G].url);u.addSeparator(D)}u.addItem(mxResources.get("reset"),
null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];c.fireEvent(new mxEventObject("customFontsChanged"))}),D);u.addSeparator(D)}else{R=this.editorUi.editor.graph.extFonts;if(null!=R&&0<R.length){N={};var W=!1;for(G=0;G<this.customFonts.length;G++)N[this.customFonts[G].name]=!0;for(G=0;G<R.length;G++)N[R[G].name]||(this.customFonts.push(R[G]),W=!0);W&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(G=
0;G<this.customFonts.length;G++)R=this.customFonts[G].name,N=this.customFonts[G].url,B(R,N,!0),this.editorUi.editor.graph.addExtFont(R,N,!0);u.addSeparator(D);u.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var J=new f(this.editorUi,[],[]);c.editor.graph.model.execute(J)}),D);u.addSeparator(D)}}u.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var J=this.editorUi.editor.graph,V=J.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],U=
"s",X=null;if("1"!=urlParams["ext-fonts"]&&J.isEditing()){var t=J.getSelectedEditingElement();null!=t&&(t=mxUtils.getCurrentStyle(t),null!=t&&(V=Graph.stripQuotes(t.fontFamily),X=Graph.getFontUrl(V,null),null!=X&&(Graph.isGoogleFontUrl(X)?(X=null,U="g"):U="w")))}else t=J.getView().getState(J.getSelectionCell()),null!=t&&(V=t.style[mxConstants.STYLE_FONTFAMILY]||V,"1"!=urlParams["ext-fonts"]?(t=t.style.fontSource,null!=t&&(t=decodeURIComponent(t),Graph.isGoogleFontUrl(t)?U="g":(U="w",X=t))):(U=t.style.FType||
-U,"w"==U&&(X=this.editorUi.editor.graph.extFonts,t=null,null!=X&&(t=X.find(function(K){return K.name==V})),X=null!=t?t.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=X&&X.substring(0,PROXY_URL.length)==PROXY_URL&&(X=decodeURIComponent(X.substr((PROXY_URL+"?url=").length)));var F=null;document.activeElement==J.cellEditor.textarea&&(F=J.cellEditor.saveSelection());U=new FontDialog(this.editorUi,V,X,U,mxUtils.bind(this,function(K,T,P){null!=F&&(J.cellEditor.restoreSelection(F),F=null);
+U,"w"==U&&(X=this.editorUi.editor.graph.extFonts,t=null,null!=X&&(t=X.find(function(K){return K.name==V})),X=null!=t?t.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=X&&X.substring(0,PROXY_URL.length)==PROXY_URL&&(X=decodeURIComponent(X.substr((PROXY_URL+"?url=").length)));var E=null;document.activeElement==J.cellEditor.textarea&&(E=J.cellEditor.saveSelection());U=new FontDialog(this.editorUi,V,X,U,mxUtils.bind(this,function(K,T,P){null!=E&&(J.cellEditor.restoreSelection(E),E=null);
if(null!=K&&0<K.length)if("1"!=urlParams["ext-fonts"]&&J.isEditing())J.setFont(K,T);else{J.getModel().beginUpdate();try{J.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(J.setCellStyles(mxConstants.STYLE_FONTFAMILY,K),J.setCellStyles("fontSource",null!=T?encodeURIComponent(T):null),J.setCellStyles("FType",null)):(J.setCellStyles(mxConstants.STYLE_FONTFAMILY,K),"s"!=P&&(J.setCellStyles("FType",P),0==T.indexOf("http://")&&(T=PROXY_URL+"?url="+encodeURIComponent(T)),this.editorUi.editor.graph.addExtFont(K,
T)));P=!0;for(var Q=0;Q<this.customFonts.length;Q++)if(this.customFonts[Q].name==K){P=!1;break}P&&(this.customFonts.push({name:K,url:T}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{J.getModel().endUpdate()}}}));this.editorUi.showDialog(U.container,380,Editor.enableWebFonts?250:180,!0,!0);U.init()}),D,null,!0)})))}})();function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,f){this.ui=b;this.page=e;this.previous=this.name=f}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
@@ -13053,12 +13053,12 @@ function(c,m){this.model.beginUpdate();try{var n=[];this.traverse(m,!0,mxUtils.b
m,n,v,d,g),mxUtils.bind(this,function(k){return this.isTreeEdge(k)}))};Graph.prototype.getIncomingTreeEdges=function(c,m){return this.getTreeEdges(c,m,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(c,m){return this.getTreeEdges(c,m,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function c(H){return z.isVertex(H)&&n(H)}function m(H){var R=
!1;null!=H&&(R="1"==y.getCurrentCellStyle(H).treeMoving);return R}function n(H){var R=!1;null!=H&&(H=z.getParent(H),R=y.view.getState(H),R="tree"==(null!=R?R.style:y.getCellStyle(H)).containerType);return R}function v(H){var R=!1;null!=H&&(H=z.getParent(H),R=y.view.getState(H),y.view.getState(H),R=null!=(null!=R?R.style:y.getCellStyle(H)).childLayout);return R}function d(H){H=y.view.getState(H);if(null!=H){var R=y.getIncomingTreeEdges(H.cell);if(0<R.length&&(R=y.view.getState(R[0]),null!=R&&(R=R.absolutePoints,
null!=R&&0<R.length&&(R=R[R.length-1],null!=R)))){if(R.y==H.y&&Math.abs(R.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_SOUTH;if(R.y==H.y+H.height&&Math.abs(R.x-H.getCenterX())<H.width/2)return mxConstants.DIRECTION_NORTH;if(R.x>H.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function g(H,R){R=null!=R?R:!0;y.model.beginUpdate();try{var W=y.model.getParent(H),J=y.getIncomingTreeEdges(H),V=y.cloneCells([J[0],H]);y.model.setTerminal(V[0],y.model.getTerminal(J[0],
-!0),!0);var U=d(H),X=W.geometry;U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=R?H.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=R?H.geometry.height+10:-V[1].geometry.height-10;y.view.currentRoot!=W&&(V[1].geometry.x-=X.x,V[1].geometry.y-=X.y);var t=y.view.getState(H),F=y.view.scale;if(null!=t){var K=mxRectangle.fromRectangle(t);U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?K.x+=(R?H.geometry.width+10:-V[1].geometry.width-10)*F:K.y+=(R?
-H.geometry.height+10:-V[1].geometry.height-10)*F;var T=y.getOutgoingTreeEdges(y.model.getTerminal(J[0],!0));if(null!=T){for(var P=U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH,Q=X=J=0;Q<T.length;Q++){var S=y.model.getTerminal(T[Q],!1);if(U==d(S)){var Y=y.view.getState(S);S!=H&&null!=Y&&(P&&R!=Y.getCenterX()<t.getCenterX()||!P&&R!=Y.getCenterY()<t.getCenterY())&&mxUtils.intersects(K,Y)&&(J=10+Math.max(J,(Math.min(K.x+K.width,Y.x+Y.width)-Math.max(K.x,Y.x))/F),X=10+Math.max(X,(Math.min(K.y+
-K.height,Y.y+Y.height)-Math.max(K.y,Y.y))/F))}}P?X=0:J=0;for(Q=0;Q<T.length;Q++)if(S=y.model.getTerminal(T[Q],!1),U==d(S)&&(Y=y.view.getState(S),S!=H&&null!=Y&&(P&&R!=Y.getCenterX()<t.getCenterX()||!P&&R!=Y.getCenterY()<t.getCenterY()))){var ca=[];y.traverse(Y.cell,!0,function(da,Z){var ha=null!=Z&&y.isTreeEdge(Z);ha&&ca.push(Z);(null==Z||ha)&&ca.push(da);return null==Z||ha});y.moveCells(ca,(R?1:-1)*J,(R?1:-1)*X)}}}return y.addCells(V,W)}finally{y.model.endUpdate()}}function k(H){y.model.beginUpdate();
-try{var R=d(H),W=y.getIncomingTreeEdges(H),J=y.cloneCells([W[0],H]);y.model.setTerminal(W[0],J[1],!1);y.model.setTerminal(J[0],J[1],!0);y.model.setTerminal(J[0],H,!1);var V=y.model.getParent(H),U=V.geometry,X=[];y.view.currentRoot!=V&&(J[1].geometry.x-=U.x,J[1].geometry.y-=U.y);y.traverse(H,!0,function(K,T){var P=null!=T&&y.isTreeEdge(T);P&&X.push(T);(null==T||P)&&X.push(K);return null==T||P});var t=H.geometry.width+40,F=H.geometry.height+40;R==mxConstants.DIRECTION_SOUTH?t=0:R==mxConstants.DIRECTION_NORTH?
-(t=0,F=-F):R==mxConstants.DIRECTION_WEST?(t=-t,F=0):R==mxConstants.DIRECTION_EAST&&(F=0);y.moveCells(X,t,F);return y.addCells(J,V)}finally{y.model.endUpdate()}}function l(H,R){y.model.beginUpdate();try{var W=y.model.getParent(H),J=y.getIncomingTreeEdges(H),V=d(H);0==J.length&&(J=[y.createEdge(W,null,"",null,null,y.createCurrentEdgeStyle())],V=R);var U=y.cloneCells([J[0],H]);y.model.setTerminal(U[0],H,!0);if(null==y.model.getTerminal(U[0],!1)){y.model.setTerminal(U[0],U[1],!1);var X=y.getCellStyle(U[1]).newEdgeStyle;
-if(null!=X)try{var t=JSON.parse(X),F;for(F in t)y.setCellStyles(F,t[F],[U[0]]),"edgeStyle"==F&&"elbowEdgeStyle"==t[F]&&y.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[U[0]])}catch(Y){}}J=y.getOutgoingTreeEdges(H);var K=W.geometry;R=[];y.view.currentRoot==W&&(K=new mxRectangle);for(X=0;X<J.length;X++){var T=y.model.getTerminal(J[X],!1);null!=T&&R.push(T)}var P=y.view.getBounds(R),Q=y.view.translate,S=y.view.scale;V==mxConstants.DIRECTION_SOUTH?
+!0),!0);var U=d(H),X=W.geometry;U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=R?H.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=R?H.geometry.height+10:-V[1].geometry.height-10;y.view.currentRoot!=W&&(V[1].geometry.x-=X.x,V[1].geometry.y-=X.y);var t=y.view.getState(H),E=y.view.scale;if(null!=t){var K=mxRectangle.fromRectangle(t);U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?K.x+=(R?H.geometry.width+10:-V[1].geometry.width-10)*E:K.y+=(R?
+H.geometry.height+10:-V[1].geometry.height-10)*E;var T=y.getOutgoingTreeEdges(y.model.getTerminal(J[0],!0));if(null!=T){for(var P=U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH,Q=X=J=0;Q<T.length;Q++){var S=y.model.getTerminal(T[Q],!1);if(U==d(S)){var Y=y.view.getState(S);S!=H&&null!=Y&&(P&&R!=Y.getCenterX()<t.getCenterX()||!P&&R!=Y.getCenterY()<t.getCenterY())&&mxUtils.intersects(K,Y)&&(J=10+Math.max(J,(Math.min(K.x+K.width,Y.x+Y.width)-Math.max(K.x,Y.x))/E),X=10+Math.max(X,(Math.min(K.y+
+K.height,Y.y+Y.height)-Math.max(K.y,Y.y))/E))}}P?X=0:J=0;for(Q=0;Q<T.length;Q++)if(S=y.model.getTerminal(T[Q],!1),U==d(S)&&(Y=y.view.getState(S),S!=H&&null!=Y&&(P&&R!=Y.getCenterX()<t.getCenterX()||!P&&R!=Y.getCenterY()<t.getCenterY()))){var ba=[];y.traverse(Y.cell,!0,function(da,Z){var ja=null!=Z&&y.isTreeEdge(Z);ja&&ba.push(Z);(null==Z||ja)&&ba.push(da);return null==Z||ja});y.moveCells(ba,(R?1:-1)*J,(R?1:-1)*X)}}}return y.addCells(V,W)}finally{y.model.endUpdate()}}function k(H){y.model.beginUpdate();
+try{var R=d(H),W=y.getIncomingTreeEdges(H),J=y.cloneCells([W[0],H]);y.model.setTerminal(W[0],J[1],!1);y.model.setTerminal(J[0],J[1],!0);y.model.setTerminal(J[0],H,!1);var V=y.model.getParent(H),U=V.geometry,X=[];y.view.currentRoot!=V&&(J[1].geometry.x-=U.x,J[1].geometry.y-=U.y);y.traverse(H,!0,function(K,T){var P=null!=T&&y.isTreeEdge(T);P&&X.push(T);(null==T||P)&&X.push(K);return null==T||P});var t=H.geometry.width+40,E=H.geometry.height+40;R==mxConstants.DIRECTION_SOUTH?t=0:R==mxConstants.DIRECTION_NORTH?
+(t=0,E=-E):R==mxConstants.DIRECTION_WEST?(t=-t,E=0):R==mxConstants.DIRECTION_EAST&&(E=0);y.moveCells(X,t,E);return y.addCells(J,V)}finally{y.model.endUpdate()}}function l(H,R){y.model.beginUpdate();try{var W=y.model.getParent(H),J=y.getIncomingTreeEdges(H),V=d(H);0==J.length&&(J=[y.createEdge(W,null,"",null,null,y.createCurrentEdgeStyle())],V=R);var U=y.cloneCells([J[0],H]);y.model.setTerminal(U[0],H,!0);if(null==y.model.getTerminal(U[0],!1)){y.model.setTerminal(U[0],U[1],!1);var X=y.getCellStyle(U[1]).newEdgeStyle;
+if(null!=X)try{var t=JSON.parse(X),E;for(E in t)y.setCellStyles(E,t[E],[U[0]]),"edgeStyle"==E&&"elbowEdgeStyle"==t[E]&&y.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[U[0]])}catch(Y){}}J=y.getOutgoingTreeEdges(H);var K=W.geometry;R=[];y.view.currentRoot==W&&(K=new mxRectangle);for(X=0;X<J.length;X++){var T=y.model.getTerminal(J[X],!1);null!=T&&R.push(T)}var P=y.view.getBounds(R),Q=y.view.translate,S=y.view.scale;V==mxConstants.DIRECTION_SOUTH?
(U[1].geometry.x=null==P?H.geometry.x+(H.geometry.width-U[1].geometry.width)/2:(P.x+P.width)/S-Q.x-K.x+10,U[1].geometry.y+=U[1].geometry.height-K.y+40):V==mxConstants.DIRECTION_NORTH?(U[1].geometry.x=null==P?H.geometry.x+(H.geometry.width-U[1].geometry.width)/2:(P.x+P.width)/S-Q.x+-K.x+10,U[1].geometry.y-=U[1].geometry.height+K.y+40):(U[1].geometry.x=V==mxConstants.DIRECTION_WEST?U[1].geometry.x-(U[1].geometry.width+K.x+40):U[1].geometry.x+(U[1].geometry.width-K.x+40),U[1].geometry.y=null==P?H.geometry.y+
(H.geometry.height-U[1].geometry.height)/2:(P.y+P.height)/S-Q.y+-K.y+10);return y.addCells(U,W)}finally{y.model.endUpdate()}}function p(H,R,W){H=y.getOutgoingTreeEdges(H);W=y.view.getState(W);var J=[];if(null!=W&&null!=H){for(var V=0;V<H.length;V++){var U=y.view.getState(y.model.getTerminal(H[V],!1));null!=U&&(!R&&Math.min(U.x+U.width,W.x+W.width)>=Math.max(U.x,W.x)||R&&Math.min(U.y+U.height,W.y+W.height)>=Math.max(U.y,W.y))&&J.push(U)}J.sort(function(X,t){return R?X.x+X.width-t.x-t.width:X.y+X.height-
t.y-t.height})}return J}function q(H,R){var W=d(H),J=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST;(W==mxConstants.DIRECTION_EAST||W==mxConstants.DIRECTION_WEST)==J&&W!=R?x.actions.get("selectParent").funct():W==R?(R=y.getOutgoingTreeEdges(H),null!=R&&0<R.length&&y.setSelectionCell(y.model.getTerminal(R[0],!1))):(W=y.getIncomingTreeEdges(H),null!=W&&0<W.length&&(J=p(y.model.getTerminal(W[0],!0),J,H),H=y.view.getState(H),null!=H&&(H=mxUtils.indexOf(J,H),0<=H&&(H+=R==mxConstants.DIRECTION_NORTH||
@@ -13066,19 +13066,19 @@ R==mxConstants.DIRECTION_WEST?-1:1,0<=H&&H<=J.length-1&&y.setSelectionCell(J[H].
0<y.getIncomingTreeEdges(R).length&&this.addMenuItems(H,["selectSiblings","selectParent"],null,W)):0<y.model.getEdgeCount(R)&&this.addMenuItems(H,["selectConnections"],null,W)}};x.actions.addAction("selectChildren",function(){if(y.isEnabled()&&1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getOutgoingTreeEdges(H);if(null!=H){for(var R=[],W=0;W<H.length;W++)R.push(y.model.getTerminal(H[W],!1));y.setSelectionCells(R)}}},null,null,"Alt+Shift+X");x.actions.addAction("selectSiblings",function(){if(y.isEnabled()&&
1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getIncomingTreeEdges(H);if(null!=H&&0<H.length&&(H=y.getOutgoingTreeEdges(y.model.getTerminal(H[0],!0)),null!=H)){for(var R=[],W=0;W<H.length;W++)R.push(y.model.getTerminal(H[W],!1));y.setSelectionCells(R)}}},null,null,"Alt+Shift+S");x.actions.addAction("selectParent",function(){if(y.isEnabled()&&1==y.getSelectionCount()){var H=y.getSelectionCell();H=y.getIncomingTreeEdges(H);null!=H&&0<H.length&&y.setSelectionCell(y.model.getTerminal(H[0],
!0))}},null,null,"Alt+Shift+P");x.actions.addAction("selectDescendants",function(H,R){H=y.getSelectionCell();if(y.isEnabled()&&y.model.isVertex(H)){if(null!=R&&mxEvent.isAltDown(R))y.setSelectionCells(y.model.getTreeEdges(H,null==R||!mxEvent.isShiftDown(R),null==R||!mxEvent.isControlDown(R)));else{var W=[];y.traverse(H,!0,function(J,V){var U=null!=V&&y.isTreeEdge(V);U&&W.push(V);null!=V&&!U||null!=R&&mxEvent.isShiftDown(R)||W.push(J);return null==V||U})}y.setSelectionCells(W)}},null,null,"Alt+Shift+D");
-var L=y.removeCells;y.removeCells=function(H,R){R=null!=R?R:!0;null==H&&(H=this.getDeletableCells(this.getSelectionCells()));R&&(H=this.getDeletableCells(this.addAllEdges(H)));for(var W=[],J=0;J<H.length;J++){var V=H[J];z.isEdge(V)&&n(V)&&(W.push(V),V=z.getTerminal(V,!1));if(c(V)){var U=[];y.traverse(V,!0,function(X,t){var F=null!=t&&y.isTreeEdge(t);F&&U.push(t);(null==t||F)&&U.push(X);return null==t||F});0<U.length&&(W=W.concat(U),V=y.getIncomingTreeEdges(H[J]),H=H.concat(V))}else null!=V&&W.push(H[J])}H=
+var L=y.removeCells;y.removeCells=function(H,R){R=null!=R?R:!0;null==H&&(H=this.getDeletableCells(this.getSelectionCells()));R&&(H=this.getDeletableCells(this.addAllEdges(H)));for(var W=[],J=0;J<H.length;J++){var V=H[J];z.isEdge(V)&&n(V)&&(W.push(V),V=z.getTerminal(V,!1));if(c(V)){var U=[];y.traverse(V,!0,function(X,t){var E=null!=t&&y.isTreeEdge(t);E&&U.push(t);(null==t||E)&&U.push(X);return null==t||E});0<U.length&&(W=W.concat(U),V=y.getIncomingTreeEdges(H[J]),H=H.concat(V))}else null!=V&&W.push(H[J])}H=
W;return L.apply(this,arguments)};x.hoverIcons.getStateAt=function(H,R,W){return c(H.cell)?null:this.graph.view.getState(this.graph.getCellAt(R,W))};var O=y.duplicateCells;y.duplicateCells=function(H,R){H=null!=H?H:this.getSelectionCells();for(var W=H.slice(0),J=0;J<W.length;J++){var V=y.view.getState(W[J]);if(null!=V&&c(V.cell)){var U=y.getIncomingTreeEdges(V.cell);for(V=0;V<U.length;V++)mxUtils.remove(U[V],H)}}this.model.beginUpdate();try{var X=O.call(this,H,R);if(X.length==H.length)for(J=0;J<H.length;J++)if(c(H[J])){var t=
-y.getIncomingTreeEdges(X[J]);U=y.getIncomingTreeEdges(H[J]);if(0==t.length&&0<U.length){var F=this.cloneCell(U[0]);this.addEdge(F,y.getDefaultParent(),this.model.getTerminal(U[0],!0),X[J])}}}finally{this.model.endUpdate()}return X};var M=y.moveCells;y.moveCells=function(H,R,W,J,V,U,X){var t=null;this.model.beginUpdate();try{var F=V,K=this.getCurrentCellStyle(V);if(null!=H&&c(V)&&"1"==mxUtils.getValue(K,"treeFolding","0")){for(var T=0;T<H.length;T++)if(c(H[T])||y.model.isEdge(H[T])&&null==y.model.getTerminal(H[T],
-!0)){V=y.model.getParent(H[T]);break}if(null!=F&&V!=F&&null!=this.view.getState(H[0])){var P=y.getIncomingTreeEdges(H[0]);if(0<P.length){var Q=y.view.getState(y.model.getTerminal(P[0],!0));if(null!=Q){var S=y.view.getState(F);null!=S&&(R=(S.getCenterX()-Q.getCenterX())/y.view.scale,W=(S.getCenterY()-Q.getCenterY())/y.view.scale)}}}}t=M.apply(this,arguments);if(null!=t&&null!=H&&t.length==H.length)for(T=0;T<t.length;T++)if(this.model.isEdge(t[T]))c(F)&&0>mxUtils.indexOf(t,this.model.getTerminal(t[T],
-!0))&&this.model.setTerminal(t[T],F,!0);else if(c(H[T])&&(P=y.getIncomingTreeEdges(H[T]),0<P.length))if(!J)c(F)&&0>mxUtils.indexOf(H,this.model.getTerminal(P[0],!0))&&this.model.setTerminal(P[0],F,!0);else if(0==y.getIncomingTreeEdges(t[T]).length){K=F;if(null==K||K==y.model.getParent(H[T]))K=y.model.getTerminal(P[0],!0);J=this.cloneCell(P[0]);this.addEdge(J,y.getDefaultParent(),K,t[T])}}finally{this.model.endUpdate()}return t};if(null!=x.sidebar){var u=x.sidebar.dropAndConnect;x.sidebar.dropAndConnect=
+y.getIncomingTreeEdges(X[J]);U=y.getIncomingTreeEdges(H[J]);if(0==t.length&&0<U.length){var E=this.cloneCell(U[0]);this.addEdge(E,y.getDefaultParent(),this.model.getTerminal(U[0],!0),X[J])}}}finally{this.model.endUpdate()}return X};var M=y.moveCells;y.moveCells=function(H,R,W,J,V,U,X){var t=null;this.model.beginUpdate();try{var E=V,K=this.getCurrentCellStyle(V);if(null!=H&&c(V)&&"1"==mxUtils.getValue(K,"treeFolding","0")){for(var T=0;T<H.length;T++)if(c(H[T])||y.model.isEdge(H[T])&&null==y.model.getTerminal(H[T],
+!0)){V=y.model.getParent(H[T]);break}if(null!=E&&V!=E&&null!=this.view.getState(H[0])){var P=y.getIncomingTreeEdges(H[0]);if(0<P.length){var Q=y.view.getState(y.model.getTerminal(P[0],!0));if(null!=Q){var S=y.view.getState(E);null!=S&&(R=(S.getCenterX()-Q.getCenterX())/y.view.scale,W=(S.getCenterY()-Q.getCenterY())/y.view.scale)}}}}t=M.apply(this,arguments);if(null!=t&&null!=H&&t.length==H.length)for(T=0;T<t.length;T++)if(this.model.isEdge(t[T]))c(E)&&0>mxUtils.indexOf(t,this.model.getTerminal(t[T],
+!0))&&this.model.setTerminal(t[T],E,!0);else if(c(H[T])&&(P=y.getIncomingTreeEdges(H[T]),0<P.length))if(!J)c(E)&&0>mxUtils.indexOf(H,this.model.getTerminal(P[0],!0))&&this.model.setTerminal(P[0],E,!0);else if(0==y.getIncomingTreeEdges(t[T]).length){K=E;if(null==K||K==y.model.getParent(H[T]))K=y.model.getTerminal(P[0],!0);J=this.cloneCell(P[0]);this.addEdge(J,y.getDefaultParent(),K,t[T])}}finally{this.model.endUpdate()}return t};if(null!=x.sidebar){var u=x.sidebar.dropAndConnect;x.sidebar.dropAndConnect=
function(H,R,W,J){var V=y.model,U=null;V.beginUpdate();try{if(U=u.apply(this,arguments),c(H))for(var X=0;X<U.length;X++)if(V.isEdge(U[X])&&null==V.getTerminal(U[X],!0)){V.setTerminal(U[X],H,!0);var t=y.getCellGeometry(U[X]);t.points=null;null!=t.getTerminalPoint(!0)&&t.setTerminalPoint(null,!0)}}finally{V.endUpdate()}return U}}var D={88:x.actions.get("selectChildren"),84:x.actions.get("selectSubtree"),80:x.actions.get("selectParent"),83:x.actions.get("selectSiblings")},B=x.onKeyDown;x.onKeyDown=function(H){try{if(y.isEnabled()&&
!y.isEditing()&&c(y.getSelectionCell())&&1==y.getSelectionCount()){var R=null;0<y.getIncomingTreeEdges(y.getSelectionCell()).length&&(9==H.which?R=mxEvent.isShiftDown(H)?k(y.getSelectionCell()):l(y.getSelectionCell()):13==H.which&&(R=g(y.getSelectionCell(),!mxEvent.isShiftDown(H))));if(null!=R&&0<R.length)1==R.length&&y.model.isEdge(R[0])?y.setSelectionCell(y.model.getTerminal(R[0],!1)):y.setSelectionCell(R[R.length-1]),null!=x.hoverIcons&&x.hoverIcons.update(y.view.getState(y.getSelectionCell())),
y.startEditingAtCell(y.getSelectionCell()),mxEvent.consume(H);else if(mxEvent.isAltDown(H)&&mxEvent.isShiftDown(H)){var W=D[H.keyCode];null!=W&&(W.funct(H),mxEvent.consume(H))}else 37==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(H)):38==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(H)):39==H.keyCode?(q(y.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(H)):40==H.keyCode&&(q(y.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(H))}}catch(J){x.handleError(J)}mxEvent.isConsumed(H)||B.apply(this,arguments)};var C=y.connectVertex;y.connectVertex=function(H,R,W,J,V,U,X){var t=y.getIncomingTreeEdges(H);if(c(H)){var F=d(H),K=F==mxConstants.DIRECTION_EAST||F==mxConstants.DIRECTION_WEST,T=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST;return F==R||0==t.length?l(H,R):K==T?k(H):g(H,R!=mxConstants.DIRECTION_NORTH&&R!=mxConstants.DIRECTION_WEST)}return C.apply(this,arguments)};y.getSubtree=function(H){var R=
+mxEvent.consume(H))}}catch(J){x.handleError(J)}mxEvent.isConsumed(H)||B.apply(this,arguments)};var C=y.connectVertex;y.connectVertex=function(H,R,W,J,V,U,X){var t=y.getIncomingTreeEdges(H);if(c(H)){var E=d(H),K=E==mxConstants.DIRECTION_EAST||E==mxConstants.DIRECTION_WEST,T=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST;return E==R||0==t.length?l(H,R):K==T?k(H):g(H,R!=mxConstants.DIRECTION_NORTH&&R!=mxConstants.DIRECTION_WEST)}return C.apply(this,arguments)};y.getSubtree=function(H){var R=
[H];!m(H)&&!c(H)||v(H)||y.traverse(H,!0,function(W,J){var V=null!=J&&y.isTreeEdge(J);V&&0>mxUtils.indexOf(R,J)&&R.push(J);(null==J||V)&&0>mxUtils.indexOf(R,W)&&R.push(W);return null==J||V});return R};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(m(this.state.cell)||c(this.state.cell))&&!v(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(H){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(H),mxEvent.getClientY(H),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(H);
this.graph.isMouseDown=!0;x.hoverIcons.reset();mxEvent.consume(H)})))};var N=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){N.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var I=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(H){I.apply(this,
-arguments);null!=this.moveHandle&&(this.moveHandle.style.display=H?"":"none")};var E=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(H,R){E.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),m=this.graph;return c.concat([this.addEntry("tree container",
+arguments);null!=this.moveHandle&&(this.moveHandle.style.display=H?"":"none")};var F=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(H,R){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var f=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var c=f.apply(this,arguments),m=this.graph;return c.concat([this.addEntry("tree container",
function(){var n=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");n.vertex=!0;var v=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');v.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");g.geometry.relative=!0;g.edge=!0;v.insertEdge(g,!0);d.insertEdge(g,!1);n.insert(g);n.insert(v);n.insert(d);return sb.createVertexTemplateFromCells([n],n.geometry.width,n.geometry.height,n.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var n=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
n.vertex=!0;var v=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');v.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
@@ -13096,17 +13096,17 @@ l.geometry.relative=!0;l.edge=!0;v.insertEdge(l,!0);k.insertEdge(l,!1);n.insert(
v.geometry.setTerminalPoint(new mxPoint(0,0),!0);v.geometry.relative=!0;v.edge=!0;n.insertEdge(v,!1);return sb.createVertexTemplateFromCells([n,v],n.geometry.width,n.geometry.height,n.value)}),this.addEntry("tree sub sections",function(){var n=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");n.vertex=!0;var v=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
v.geometry.setTerminalPoint(new mxPoint(110,-40),!0);v.geometry.relative=!0;v.edge=!0;n.insertEdge(v,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var g=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");g.geometry.setTerminalPoint(new mxPoint(110,-40),!0);g.geometry.relative=
!0;g.edge=!0;d.insertEdge(g,!1);return sb.createVertexTemplateFromCells([v,g,n,d],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(B,C){if(EditorUi.windowed){var G=B.editor.graph;G.popupMenuHandler.hideMenu();if(null==B.formatWindow){C="1"==urlParams.sketch?Math.max(10,B.diagramContainer.clientWidth-241):Math.max(10,B.diagramContainer.clientWidth-248);var N="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;G="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,G.container.clientHeight-10);B.formatWindow=new n(B,mxResources.get("format"),C,N,240,G,function(E){var H=
-B.createFormat(E);H.init();B.addListener("darkModeChanged",mxUtils.bind(this,function(){H.refresh()}));return H});B.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){B.formatWindow.window.fit()}));B.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else B.formatWindow.window.setVisible(null!=C?C:!B.formatWindow.window.isVisible())}else{if(null==B.formatElt){B.formatElt=m();var I=B.createFormat(B.formatElt);I.init();B.formatElt.style.border="none";B.formatElt.style.width=
-"240px";B.formatElt.style.borderLeft="1px solid gray";B.formatElt.style.right="0px";B.addListener("darkModeChanged",mxUtils.bind(this,function(){I.refresh()}))}G=B.diagramContainer.parentNode;null!=B.formatElt.parentNode?(B.formatElt.parentNode.removeChild(B.formatElt),G.style.right="0px"):(G.parentNode.appendChild(B.formatElt),G.style.right=B.formatElt.style.width)}}function e(B,C){function G(H,R){var W=B.menus.get(H);H=E.addMenu(R,mxUtils.bind(this,function(){W.funct.apply(this,arguments)}));H.style.cssText=
+EditorUi.initMinimalTheme=function(){function b(B,C){if(EditorUi.windowed){var G=B.editor.graph;G.popupMenuHandler.hideMenu();if(null==B.formatWindow){C="1"==urlParams.sketch?Math.max(10,B.diagramContainer.clientWidth-241):Math.max(10,B.diagramContainer.clientWidth-248);var N="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;G="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,G.container.clientHeight-10);B.formatWindow=new n(B,mxResources.get("format"),C,N,240,G,function(F){var H=
+B.createFormat(F);H.init();B.addListener("darkModeChanged",mxUtils.bind(this,function(){H.refresh()}));return H});B.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){B.formatWindow.window.fit()}));B.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else B.formatWindow.window.setVisible(null!=C?C:!B.formatWindow.window.isVisible())}else{if(null==B.formatElt){B.formatElt=m();var I=B.createFormat(B.formatElt);I.init();B.formatElt.style.border="none";B.formatElt.style.width=
+"240px";B.formatElt.style.borderLeft="1px solid gray";B.formatElt.style.right="0px";B.addListener("darkModeChanged",mxUtils.bind(this,function(){I.refresh()}))}G=B.diagramContainer.parentNode;null!=B.formatElt.parentNode?(B.formatElt.parentNode.removeChild(B.formatElt),G.style.right="0px"):(G.parentNode.appendChild(B.formatElt),G.style.right=B.formatElt.style.width)}}function e(B,C){function G(H,R){var W=B.menus.get(H);H=F.addMenu(R,mxUtils.bind(this,function(){W.funct.apply(this,arguments)}));H.style.cssText=
"position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";H.className="geTitle";C.appendChild(H);return H}var N=document.createElement("div");N.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";N.className="geTitle";var I=document.createElement("span");I.style.fontSize="18px";I.style.marginRight="5px";
-I.innerHTML="+";N.appendChild(I);mxUtils.write(N,mxResources.get("moreShapes"));C.appendChild(N);mxEvent.addListener(N,"click",function(){B.actions.get("shapes").funct()});var E=new Menubar(B,C);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?N.style.bottom="0":null!=B.actions.get("newLibrary")?(N=document.createElement("div"),N.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
+I.innerHTML="+";N.appendChild(I);mxUtils.write(N,mxResources.get("moreShapes"));C.appendChild(N);mxEvent.addListener(N,"click",function(){B.actions.get("shapes").funct()});var F=new Menubar(B,C);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?N.style.bottom="0":null!=B.actions.get("newLibrary")?(N=document.createElement("div"),N.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
N.className="geTitle",I=document.createElement("span"),I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("newLibrary")),N.appendChild(I),C.appendChild(N),mxEvent.addListener(N,"click",B.actions.get("newLibrary").funct),N=document.createElement("div"),N.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",N.className="geTitle",I=document.createElement("span"),
I.style.cssText="position:relative;top:6px;",mxUtils.write(I,mxResources.get("openLibrary")),N.appendChild(I),C.appendChild(N),mxEvent.addListener(N,"click",B.actions.get("openLibrary").funct)):(N=G("newLibrary",mxResources.get("newLibrary")),N.style.boxSizing="border-box",N.style.paddingRight="6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="0",N=G("openLibraryFrom",mxResources.get("openLibraryFrom")),N.style.borderLeft="1px solid lightgray",N.style.boxSizing="border-box",N.style.paddingRight=
"6px",N.style.paddingLeft="6px",N.style.height="32px",N.style.left="50%");C.appendChild(B.sidebar.container);C.style.overflow="hidden"}function f(B,C){if(EditorUi.windowed){var G=B.editor.graph;G.popupMenuHandler.hideMenu();if(null==B.sidebarWindow){C=Math.min(G.container.clientWidth-10,218);var N="1"==urlParams.embedInline?650:Math.min(G.container.clientHeight-40,650);B.sidebarWindow=new n(B,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&
"1"!=urlParams.embedInline?Math.max(30,(G.container.clientHeight-N)/2):56,C-6,N-6,function(I){e(B,I)});B.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){B.sidebarWindow.window.fit()}));B.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);B.sidebarWindow.window.setVisible(!0);B.getLocalData("sidebar",function(I){B.sidebar.showEntries(I,null,!0)});B.restoreLibraries()}else B.sidebarWindow.window.setVisible(null!=C?C:!B.sidebarWindow.window.isVisible())}else null==
B.sidebarElt&&(B.sidebarElt=m(),e(B,B.sidebarElt),B.sidebarElt.style.border="none",B.sidebarElt.style.width="210px",B.sidebarElt.style.borderRight="1px solid gray"),G=B.diagramContainer.parentNode,null!=B.sidebarElt.parentNode?(B.sidebarElt.parentNode.removeChild(B.sidebarElt),G.style.left="0px"):(G.parentNode.appendChild(B.sidebarElt),G.style.left=B.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=
-null;else{var c=0;try{c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(B){}var m=function(){var B=document.createElement("div");B.className="geSidebarContainer";B.style.position="absolute";B.style.width="100%";B.style.height="100%";B.style.border="1px solid whiteSmoke";B.style.overflowX="hidden";B.style.overflowY="auto";return B},n=function(B,C,G,N,I,E,H){var R=m();H(R);this.window=new mxWindow(C,R,G,N,I,E,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+null;else{var c=0;try{c=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(B){}var m=function(){var B=document.createElement("div");B.className="geSidebarContainer";B.style.position="absolute";B.style.width="100%";B.style.height="100%";B.style.border="1px solid whiteSmoke";B.style.overflowX="hidden";B.style.overflowY="auto";return B},n=function(B,C,G,N,I,F,H){var R=m();H(R);this.window=new mxWindow(C,R,G,N,I,F,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(W,J){var V=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,U=this.table.firstChild.firstChild.firstChild;W=Math.max(0,Math.min(W,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-U.clientWidth-2));J=Math.max(0,Math.min(J,V-U.clientHeight-2));this.getX()==W&&this.getY()==J||mxWindow.prototype.setLocation.apply(this,
arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(W){null==W&&(W=window.event);return null!=W&&B.isSelectionAllowed(W)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
@@ -13141,7 +13141,7 @@ null,G)};var z=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMen
function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),
this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=
null);A.apply(this,arguments)};var L=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(B){L.apply(this,arguments);if(B){var C=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=C&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=C||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
-null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var O=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(B){B=O.apply(this,arguments);var C=this.editorUi,G=C.editor.graph;if(G.isEnabled()&&"1"==urlParams.sketch){var N=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(I,E){C.setSketchMode(!Editor.sketchMode);null!=E&&mxEvent.isShiftDown(E)||G.updateCellStyles({sketch:I?
+null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var O=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(B){B=O.apply(this,arguments);var C=this.editorUi,G=C.editor.graph;if(G.isEnabled()&&"1"==urlParams.sketch){var N=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(I,F){C.setSketchMode(!Editor.sketchMode);null!=F&&mxEvent.isShiftDown(F)||G.updateCellStyles({sketch:I?
"1":null},G.getVerticesAndEdges())},{install:function(I){this.listener=function(){I(Editor.sketchMode)};C.addListener("sketchModeChanged",this.listener)},destroy:function(){C.removeListener(this.listener)}});B.appendChild(N)}return B};var M=Menus.prototype.init;Menus.prototype.init=function(){M.apply(this,arguments);var B=this.editorUi,C=B.editor.graph;B.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";B.actions.get("createShape").label=mxResources.get("shape")+"...";B.actions.get("outline").label=
mxResources.get("outline")+"...";B.actions.get("layers").label=mxResources.get("layers")+"...";B.actions.get("tags").label=mxResources.get("tags")+"...";B.actions.get("comments").label=mxResources.get("comments")+"...";var G=B.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(J){B.setDarkMode(!Editor.darkMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.isDarkMode()});G=B.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(J){B.setSketchMode(!Editor.sketchMode)}));
G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.sketchMode});G=B.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(J){B.setPagesVisible(!Editor.pagesVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.pagesVisible});B.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){C.popupMenuHandler.hideMenu();B.showImportCsvDialog()}));B.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var J=
@@ -13156,77 +13156,77 @@ J,V),J.addSeparator(V),null!=U&&(U.constructor==DriveFile&&B.menus.addMenuItems(
["-","comments"],V);B.menus.addMenuItems(J,"- findReplace outline layers tags - pageSetup".split(" "),V);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||B.menus.addMenuItems(J,["print"],V);"1"!=urlParams.sketch&&null!=U&&null!=B.fileNode&&"1"!=urlParams.embedInline&&(U=null!=U.getTitle()?U.getTitle():B.defaultFilename,/(\.html)$/i.test(U)||/(\.svg)$/i.test(U)||this.addMenuItems(J,["-","properties"]));J.addSeparator(V);B.menus.addSubmenu("help",J,V);"1"==urlParams.embed||B.mode==
App.MODE_ATLAS?("1"!=urlParams.noExitBtn||B.mode==App.MODE_ATLAS)&&B.menus.addMenuItems(J,["-","exit"],V):"1"!=urlParams.noFileMenu&&B.menus.addMenuItems(J,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(J,V){var U=B.getCurrentFile();null!=U&&U.constructor==DriveFile?B.menus.addMenuItems(J,["save","makeCopy","-","rename","moveToFolder"],V):(B.menus.addMenuItems(J,["save","saveAs","-","rename"],V),B.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&
this.addMenuItems(J,["upload"],V):B.menus.addMenuItems(J,["makeCopy"],V));B.menus.addMenuItems(J,["-","autosave"],V);null!=U&&U.isRevisionHistorySupported()&&B.menus.addMenuItems(J,["-","revisionHistory"],V)})));var I=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(J,V){I.funct(J,V);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||B.menus.addMenuItems(J,["publishLink"],V);B.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(J.addSeparator(V),B.menus.addSubmenu("embed",J,V))})));
-var E=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(J,V){B.menus.addInsertTableCellItem(J,V)})));if("1"==urlParams.sketch){var H=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(J,V){H.funct(J,V);this.addMenuItems(J,["-","pageScale","-","ruler"],V)})))}this.put("extras",new Menu(mxUtils.bind(this,function(J,V){null!=E&&B.menus.addSubmenu("language",J,V);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&B.mode!=App.MODE_ATLAS&&B.menus.addSubmenu("theme",
+var F=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(J,V){B.menus.addInsertTableCellItem(J,V)})));if("1"==urlParams.sketch){var H=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(J,V){H.funct(J,V);this.addMenuItems(J,["-","pageScale","-","ruler"],V)})))}this.put("extras",new Menu(mxUtils.bind(this,function(J,V){null!=F&&B.menus.addSubmenu("language",J,V);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&B.mode!=App.MODE_ATLAS&&B.menus.addSubmenu("theme",
J,V);B.menus.addSubmenu("units",J,V);J.addSeparator(V);"1"!=urlParams.sketch&&B.menus.addMenuItems(J,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),V);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&B.mode!=App.MODE_ATLAS&&B.menus.addMenuItems(J,["-","showStartScreen","search","scratchpad"],V);J.addSeparator(V);"1"==urlParams.sketch?B.menus.addMenuItems(J,"configuration - copyConnect collapseExpand tooltips -".split(" "),
V):(B.mode!=App.MODE_ATLAS&&B.menus.addMenuItem(J,"configuration",V),!B.isOfflineApp()&&isLocalStorage&&B.mode!=App.MODE_ATLAS&&B.menus.addMenuItem(J,"plugins",V));var U=B.getCurrentFile();null!=U&&U.isRealtimeEnabled()&&U.isRealtimeSupported()&&this.addMenuItems(J,["-","showRemoteCursors","shareCursor","-"],V);J.addSeparator(V);B.mode!=App.MODE_ATLAS&&this.addMenuItems(J,["fullscreen"],V);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(J,["toggleDarkMode"],
V);J.addSeparator(V)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(J,V){B.menus.addMenuItems(J,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),V)})));mxUtils.bind(this,function(){var J=this.get("insert"),V=J.funct;J.funct=function(U,X){"1"==urlParams.sketch?(B.insertTemplateEnabled&&!B.isOffline()&&B.menus.addMenuItems(U,["insertTemplate"],X),B.menus.addMenuItems(U,["insertImage","insertLink","-"],X),B.menus.addSubmenu("insertAdvanced",
U,X,mxResources.get("advanced")),B.menus.addSubmenu("layout",U,X)):(V.apply(this,arguments),B.menus.addSubmenu("table",U,X))}})();var R="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),W=function(J,V,U,X){J.addItem(U,null,mxUtils.bind(this,function(){var t=new CreateGraphDialog(B,U,X);B.showDialog(t.container,620,420,!0,!1);t.init()}),V)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(J,V){for(var U=0;U<R.length;U++)"-"==R[U]?J.addSeparator(V):
W(J,V,mxResources.get(R[U])+"...",R[U])})))};EditorUi.prototype.installFormatToolbar=function(B){var C=this.editor.graph,G=document.createElement("div");G.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";C.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(N,I){0<C.getSelectionCount()?(B.appendChild(G),G.innerHTML="Selected: "+
C.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var u=!1;EditorUi.prototype.initFormatWindow=function(){if(!u&&null!=this.formatWindow){u=!0;this.formatWindow.window.setClosable(!1);var B=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){B.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width=
-"240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(C){mxEvent.getSource(C)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){function B(ba,ea,na){var la=E.menus.get(ba),ma=J.addMenu(mxResources.get(ba),mxUtils.bind(this,function(){la.funct.apply(this,arguments)}),W);ma.className=
-"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ma.style.display="inline-block";ma.style.boxSizing="border-box";ma.style.top="6px";ma.style.marginRight="6px";ma.style.height="30px";ma.style.paddingTop="6px";ma.style.paddingBottom="6px";ma.style.cursor="pointer";ma.setAttribute("title",mxResources.get(ba));E.menus.menuCreated(la,ma,"geMenuItem");null!=na?(ma.style.backgroundImage="url("+na+")",ma.style.backgroundPosition="center center",ma.style.backgroundRepeat="no-repeat",ma.style.backgroundSize=
-"24px 24px",ma.style.width="34px",ma.innerHTML=""):ea||(ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ma.style.backgroundPosition="right 6px center",ma.style.backgroundRepeat="no-repeat",ma.style.paddingRight="22px");return ma}function C(ba,ea,na,la,ma,ta){var ia=document.createElement("a");ia.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ia.style.display="inline-block";ia.style.boxSizing="border-box";ia.style.height="30px";ia.style.padding="6px";ia.style.position=
-"relative";ia.style.verticalAlign="top";ia.style.top="0px";"1"==urlParams.sketch&&(ia.style.borderStyle="none",ia.style.boxShadow="none",ia.style.padding="6px",ia.style.margin="0px");null!=E.statusContainer?R.insertBefore(ia,E.statusContainer):R.appendChild(ia);null!=ta?(ia.style.backgroundImage="url("+ta+")",ia.style.backgroundPosition="center center",ia.style.backgroundRepeat="no-repeat",ia.style.backgroundSize="24px 24px",ia.style.width="34px"):mxUtils.write(ia,ba);mxEvent.addListener(ia,mxClient.IS_POINTER?
-"pointerdown":"mousedown",mxUtils.bind(this,function(Na){Na.preventDefault()}));mxEvent.addListener(ia,"click",function(Na){"disabled"!=ia.getAttribute("disabled")&&ea(Na);mxEvent.consume(Na)});null==na&&(ia.style.marginRight="4px");null!=la&&ia.setAttribute("title",la);null!=ma&&(ba=function(){ma.isEnabled()?(ia.removeAttribute("disabled"),ia.style.cursor="pointer"):(ia.setAttribute("disabled","disabled"),ia.style.cursor="default")},ma.addListener("stateChanged",ba),H.addListener("enabledChanged",
-ba),ba());return ia}function G(ba,ea,na){na=document.createElement("div");na.className="geMenuItem";na.style.display="inline-block";na.style.verticalAlign="top";na.style.marginRight="6px";na.style.padding="0 4px 0 4px";na.style.height="30px";na.style.position="relative";na.style.top="0px";"1"==urlParams.sketch&&(na.style.boxShadow="none");for(var la=0;la<ba.length;la++)null!=ba[la]&&("1"==urlParams.sketch&&(ba[la].style.padding="10px 8px",ba[la].style.width="30px"),ba[la].style.margin="0px",ba[la].style.boxShadow=
-"none",na.appendChild(ba[la]));null!=ea&&mxUtils.setOpacity(na,ea);null!=E.statusContainer&&"1"!=urlParams.sketch?R.insertBefore(na,E.statusContainer):R.appendChild(na);return na}function N(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(P.style.left=58>T.offsetTop-T.offsetHeight/2?"70px":"10px");else{for(var ba=R.firstChild;null!=ba;){var ea=ba.nextSibling;"geMenuItem"!=ba.className&&"geItem"!=ba.className||ba.parentNode.removeChild(ba);ba=ea}W=R.firstChild;c=window.innerWidth||document.documentElement.clientWidth||
-document.body.clientWidth;ba=1E3>c||"1"==urlParams.sketch;var na=null;ba||(na=B("diagram"));ea=ba?B("diagram",null,Editor.drawLogoImage):null;null!=ea&&(na=ea);G([na,C(mxResources.get("shapes"),E.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),E.actions.get("image"),ba?Editor.shapesImage:null),C(mxResources.get("format"),E.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+E.actions.get("formatPanel").shortcut+")",E.actions.get("image"),ba?Editor.formatImage:null)],
-ba?60:null);ea=B("insert",!0,ba?F:null);G([ea,C(mxResources.get("delete"),E.actions.get("delete").funct,null,mxResources.get("delete"),E.actions.get("delete"),ba?Editor.trashImage:null)],ba?60:null);411<=c&&(G([Oa,Ga],60),520<=c&&G([ra,640<=c?C("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Da,Editor.zoomInImage):null,640<=c?C("",oa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",oa,Editor.zoomOutImage):null],60))}null!=na&&(mxEvent.disableContextMenu(na),mxEvent.addGestureListeners(na,
-mxUtils.bind(this,function(la){(mxEvent.isShiftDown(la)||mxEvent.isAltDown(la)||mxEvent.isMetaDown(la)||mxEvent.isControlDown(la)||mxEvent.isPopupTrigger(la))&&E.appIconClicked(la)}),null,null));ea=E.menus.get("language");null!=ea&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.sketch?(null==wa&&(ea=J.addMenu("",ea.funct),ea.setAttribute("title",mxResources.get("language")),ea.className="geToolbarButton",ea.style.backgroundImage="url("+Editor.globeImage+")",ea.style.backgroundPosition=
-"center center",ea.style.backgroundRepeat="no-repeat",ea.style.backgroundSize="24px 24px",ea.style.position="absolute",ea.style.height="24px",ea.style.width="24px",ea.style.zIndex="1",ea.style.right="8px",ea.style.cursor="pointer",ea.style.top="1"==urlParams.embed?"12px":"11px",R.appendChild(ea),wa=ea),E.buttonContainer.style.paddingRight="34px"):(E.buttonContainer.style.paddingRight="4px",null!=wa&&(wa.parentNode.removeChild(wa),wa=null))}D.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=
+"240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(C){mxEvent.getSource(C)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){function B(aa,ca,na){var la=F.menus.get(aa),qa=J.addMenu(mxResources.get(aa),mxUtils.bind(this,function(){la.funct.apply(this,arguments)}),W);qa.className=
+"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";qa.style.display="inline-block";qa.style.boxSizing="border-box";qa.style.top="6px";qa.style.marginRight="6px";qa.style.height="30px";qa.style.paddingTop="6px";qa.style.paddingBottom="6px";qa.style.cursor="pointer";qa.setAttribute("title",mxResources.get(aa));F.menus.menuCreated(la,qa,"geMenuItem");null!=na?(qa.style.backgroundImage="url("+na+")",qa.style.backgroundPosition="center center",qa.style.backgroundRepeat="no-repeat",qa.style.backgroundSize=
+"24px 24px",qa.style.width="34px",qa.innerHTML=""):ca||(qa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",qa.style.backgroundPosition="right 6px center",qa.style.backgroundRepeat="no-repeat",qa.style.paddingRight="22px");return qa}function C(aa,ca,na,la,qa,ta){var ka=document.createElement("a");ka.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ka.style.display="inline-block";ka.style.boxSizing="border-box";ka.style.height="30px";ka.style.padding="6px";ka.style.position=
+"relative";ka.style.verticalAlign="top";ka.style.top="0px";"1"==urlParams.sketch&&(ka.style.borderStyle="none",ka.style.boxShadow="none",ka.style.padding="6px",ka.style.margin="0px");null!=F.statusContainer?R.insertBefore(ka,F.statusContainer):R.appendChild(ka);null!=ta?(ka.style.backgroundImage="url("+ta+")",ka.style.backgroundPosition="center center",ka.style.backgroundRepeat="no-repeat",ka.style.backgroundSize="24px 24px",ka.style.width="34px"):mxUtils.write(ka,aa);mxEvent.addListener(ka,mxClient.IS_POINTER?
+"pointerdown":"mousedown",mxUtils.bind(this,function(Ja){Ja.preventDefault()}));mxEvent.addListener(ka,"click",function(Ja){"disabled"!=ka.getAttribute("disabled")&&ca(Ja);mxEvent.consume(Ja)});null==na&&(ka.style.marginRight="4px");null!=la&&ka.setAttribute("title",la);null!=qa&&(aa=function(){qa.isEnabled()?(ka.removeAttribute("disabled"),ka.style.cursor="pointer"):(ka.setAttribute("disabled","disabled"),ka.style.cursor="default")},qa.addListener("stateChanged",aa),H.addListener("enabledChanged",
+aa),aa());return ka}function G(aa,ca,na){na=document.createElement("div");na.className="geMenuItem";na.style.display="inline-block";na.style.verticalAlign="top";na.style.marginRight="6px";na.style.padding="0 4px 0 4px";na.style.height="30px";na.style.position="relative";na.style.top="0px";"1"==urlParams.sketch&&(na.style.boxShadow="none");for(var la=0;la<aa.length;la++)null!=aa[la]&&("1"==urlParams.sketch&&(aa[la].style.padding="10px 8px",aa[la].style.width="30px"),aa[la].style.margin="0px",aa[la].style.boxShadow=
+"none",na.appendChild(aa[la]));null!=ca&&mxUtils.setOpacity(na,ca);null!=F.statusContainer&&"1"!=urlParams.sketch?R.insertBefore(na,F.statusContainer):R.appendChild(na);return na}function N(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(P.style.left=58>T.offsetTop-T.offsetHeight/2?"70px":"10px");else{for(var aa=R.firstChild;null!=aa;){var ca=aa.nextSibling;"geMenuItem"!=aa.className&&"geItem"!=aa.className||aa.parentNode.removeChild(aa);aa=ca}W=R.firstChild;c=window.innerWidth||document.documentElement.clientWidth||
+document.body.clientWidth;aa=1E3>c||"1"==urlParams.sketch;var na=null;aa||(na=B("diagram"));ca=aa?B("diagram",null,Editor.drawLogoImage):null;null!=ca&&(na=ca);G([na,C(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),aa?Editor.shapesImage:null),C(mxResources.get("format"),F.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+F.actions.get("formatPanel").shortcut+")",F.actions.get("image"),aa?Editor.formatImage:null)],
+aa?60:null);ca=B("insert",!0,aa?E:null);G([ca,C(mxResources.get("delete"),F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),aa?Editor.trashImage:null)],aa?60:null);411<=c&&(G([Ka,Fa],60),520<=c&&G([sa,640<=c?C("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Da,Editor.zoomInImage):null,640<=c?C("",Ca.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Ca,Editor.zoomOutImage):null],60))}null!=na&&(mxEvent.disableContextMenu(na),mxEvent.addGestureListeners(na,
+mxUtils.bind(this,function(la){(mxEvent.isShiftDown(la)||mxEvent.isAltDown(la)||mxEvent.isMetaDown(la)||mxEvent.isControlDown(la)||mxEvent.isPopupTrigger(la))&&F.appIconClicked(la)}),null,null));ca=F.menus.get("language");null!=ca&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=c&&"1"!=urlParams.sketch?(null==wa&&(ca=J.addMenu("",ca.funct),ca.setAttribute("title",mxResources.get("language")),ca.className="geToolbarButton",ca.style.backgroundImage="url("+Editor.globeImage+")",ca.style.backgroundPosition=
+"center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.position="absolute",ca.style.height="24px",ca.style.width="24px",ca.style.zIndex="1",ca.style.right="8px",ca.style.cursor="pointer",ca.style.top="1"==urlParams.embed?"12px":"11px",R.appendChild(ca),wa=ca),F.buttonContainer.style.paddingRight="34px"):(F.buttonContainer.style.paddingRight="4px",null!=wa&&(wa.parentNode.removeChild(wa),wa=null))}D.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=
urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);var I=document.createElement("div");I.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";I.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(I);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&
(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=c||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])f(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));
-var E=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==E.embedViewport)mxUtils.fit(this.div);else{var ba=parseInt(this.div.offsetLeft),ea=parseInt(this.div.offsetWidth),na=E.embedViewport.x+E.embedViewport.width,la=parseInt(this.div.offsetTop),ma=parseInt(this.div.offsetHeight),ta=E.embedViewport.y+E.embedViewport.height;this.div.style.left=Math.max(E.embedViewport.x,Math.min(ba,na-ea))+"px";this.div.style.top=Math.max(E.embedViewport.y,Math.min(la,ta-ma))+"px";this.div.style.height=
-Math.min(E.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(E.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),I=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>c||708>I)?this.formatWindow.window.toggleMinimized():
-this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));E=this;var H=E.editor.graph;E.toolbar=this.createToolbar(E.createDiv("geToolbar"));E.defaultLibraryName=mxResources.get("untitledLibrary");var R=document.createElement("div");R.className="geMenubarContainer";var W=null,J=new Menubar(E,R);E.statusContainer=E.createStatusContainer();E.statusContainer.style.position="relative";E.statusContainer.style.maxWidth="";E.statusContainer.style.marginTop="7px";E.statusContainer.style.marginLeft=
-"6px";E.statusContainer.style.color="gray";E.statusContainer.style.cursor="default";var V=E.hideCurrentMenu;E.hideCurrentMenu=function(){V.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var U=E.descriptorChanged;E.descriptorChanged=function(){U.apply(this,arguments);var ba=E.getCurrentFile();if(null!=ba&&null!=ba.getTitle()){var ea=ba.getMode();"google"==ea?ea="googleDrive":"github"==ea?ea="gitHub":"gitlab"==ea?ea="gitLab":"onedrive"==ea&&(ea="oneDrive");ea=mxResources.get(ea);
-R.setAttribute("title",ba.getTitle()+(null!=ea?" ("+ea+")":""))}else R.removeAttribute("title")};E.setStatusText(E.editor.getStatus());R.appendChild(E.statusContainer);E.buttonContainer=document.createElement("div");E.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";R.appendChild(E.buttonContainer);E.menubarContainer=E.buttonContainer;E.tabContainer=document.createElement("div");E.tabContainer.className=
-"geTabContainer";E.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";I=E.diagramContainer.parentNode;var X=document.createElement("div");X.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";E.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){X.style.top="20px";E.titlebar=document.createElement("div");E.titlebar.style.cssText=
-"position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var t=document.createElement("div");t.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";E.titlebar.appendChild(t);I.appendChild(E.titlebar)}t=E.menus.get("viewZoom");var F="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,K="1"==urlParams.sketch?document.createElement("div"):
-null,T="1"==urlParams.sketch?document.createElement("div"):null,P="1"==urlParams.sketch?document.createElement("div"):null,Q=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();H.refresh();H.view.validateBackground()});E.addListener("darkModeChanged",Q);E.addListener("sketchModeChanged",Q);var S=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)P.style.left="10px",P.style.top="10px",T.style.left="10px",T.style.top="60px",K.style.top="10px",K.style.right="12px",K.style.left=
-"",E.diagramContainer.setAttribute("data-bounds",E.diagramContainer.style.top+" "+E.diagramContainer.style.left+" "+E.diagramContainer.style.width+" "+E.diagramContainer.style.height),E.diagramContainer.style.top="0px",E.diagramContainer.style.left="0px",E.diagramContainer.style.bottom="0px",E.diagramContainer.style.right="0px",E.diagramContainer.style.width="",E.diagramContainer.style.height="";else{var ba=E.diagramContainer.getAttribute("data-bounds");if(null!=ba){E.diagramContainer.style.background=
-"transparent";E.diagramContainer.removeAttribute("data-bounds");var ea=H.getGraphBounds();ba=ba.split(" ");E.diagramContainer.style.top=ba[0];E.diagramContainer.style.left=ba[1];E.diagramContainer.style.width=ea.width+50+"px";E.diagramContainer.style.height=ea.height+46+"px";E.diagramContainer.style.bottom="";E.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:E.diagramContainer.getBoundingClientRect()}),"*");E.refresh()}P.style.left=E.diagramContainer.offsetLeft+
-"px";P.style.top=E.diagramContainer.offsetTop-P.offsetHeight-4+"px";T.style.display="";T.style.left=E.diagramContainer.offsetLeft-T.offsetWidth-4+"px";T.style.top=E.diagramContainer.offsetTop+"px";K.style.left=E.diagramContainer.offsetLeft+E.diagramContainer.offsetWidth-K.offsetWidth+"px";K.style.top=P.style.top;K.style.right="";E.bottomResizer.style.left=E.diagramContainer.offsetLeft+(E.diagramContainer.offsetWidth-E.bottomResizer.offsetWidth)/2+"px";E.bottomResizer.style.top=E.diagramContainer.offsetTop+
-E.diagramContainer.offsetHeight-E.bottomResizer.offsetHeight/2-1+"px";E.rightResizer.style.left=E.diagramContainer.offsetLeft+E.diagramContainer.offsetWidth-E.rightResizer.offsetWidth/2-1+"px";E.rightResizer.style.top=E.diagramContainer.offsetTop+(E.diagramContainer.offsetHeight-E.bottomResizer.offsetHeight)/2+"px"}E.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";E.rightResizer.style.visibility=E.bottomResizer.style.visibility;R.style.display="none";P.style.visibility="";K.style.visibility=
-""}),Y=mxUtils.bind(this,function(){Fa.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";S()});Q=mxUtils.bind(this,function(){Y();b(E,!0);E.initFormatWindow();var ba=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ba.x+ba.width+4,ba.y)});E.addListener("inlineFullscreenChanged",Y);E.addListener("editInlineStart",
-Q);"1"==urlParams.embedInline&&E.addListener("darkModeChanged",Q);E.addListener("editInlineStop",mxUtils.bind(this,function(ba){E.diagramContainer.style.width="10px";E.diagramContainer.style.height="10px";E.diagramContainer.style.border="";E.bottomResizer.style.visibility="hidden";E.rightResizer.style.visibility="hidden";P.style.visibility="hidden";K.style.visibility="hidden";T.style.display="none"}));if(null!=E.hoverIcons){var ca=E.hoverIcons.update;E.hoverIcons.update=function(){H.freehand.isDrawing()||
-ca.apply(this,arguments)}}if(null!=H.freehand){var da=H.freehand.createStyle;H.freehand.createStyle=function(ba){return da.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){T.className="geToolbarContainer";K.className="geToolbarContainer";P.className="geToolbarContainer";R.className="geToolbarContainer";E.picker=T;var Z=!1;"1"!=urlParams.embed&&"atlassian"!=E.getServiceName()&&(mxEvent.addListener(R,"mouseenter",function(){E.statusContainer.style.display="inline-block"}),mxEvent.addListener(R,
-"mouseleave",function(){Z||(E.statusContainer.style.display="none")}));var ha=mxUtils.bind(this,function(ba){null!=E.notificationBtn&&(null!=ba?E.notificationBtn.setAttribute("title",ba):E.notificationBtn.removeAttribute("title"))});R.style.visibility=20>R.clientWidth?"hidden":"";E.editor.addListener("statusChanged",mxUtils.bind(this,function(){E.setStatusText(E.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=E.getServiceName())if(E.statusContainer.style.display="inline-block",Z=!0,1==E.statusContainer.children.length&&
-""==E.editor.getStatus())R.style.visibility="hidden";else{if(0==E.statusContainer.children.length||1==E.statusContainer.children.length&&"function"===typeof E.statusContainer.firstChild.getAttribute&&null==E.statusContainer.firstChild.getAttribute("class")){var ba=null!=E.statusContainer.firstChild&&"function"===typeof E.statusContainer.firstChild.getAttribute?E.statusContainer.firstChild.getAttribute("title"):E.editor.getStatus();ha(ba);var ea=E.getCurrentFile();ea=null!=ea?ea.savingStatusKey:DrawioFile.prototype.savingStatusKey;
-ba==mxResources.get(ea)+"..."?(E.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ea))+'..."src="'+Editor.tailSpin+'">',E.statusContainer.style.display="inline-block",Z=!0):6<E.buttonContainer.clientWidth&&(E.statusContainer.style.display="none",Z=!1)}else E.statusContainer.style.display="inline-block",ha(null),Z=!0;R.style.visibility=20>R.clientWidth&&!Z?"hidden":""}}));fa=B("diagram",null,Editor.menuImage);fa.style.boxShadow="none";fa.style.padding="6px";fa.style.margin=
-"0px";P.appendChild(fa);mxEvent.disableContextMenu(fa);mxEvent.addGestureListeners(fa,mxUtils.bind(this,function(ba){(mxEvent.isShiftDown(ba)||mxEvent.isAltDown(ba)||mxEvent.isMetaDown(ba)||mxEvent.isControlDown(ba)||mxEvent.isPopupTrigger(ba))&&this.appIconClicked(ba)}),null,null);E.statusContainer.style.position="";E.statusContainer.style.display="none";E.statusContainer.style.margin="0px";E.statusContainer.style.padding="6px 0px";E.statusContainer.style.maxWidth=Math.min(c-240,280)+"px";E.statusContainer.style.display=
-"inline-block";E.statusContainer.style.textOverflow="ellipsis";E.buttonContainer.style.position="";E.buttonContainer.style.paddingRight="0px";E.buttonContainer.style.display="inline-block";var aa=document.createElement("a");aa.style.padding="0px";aa.style.boxShadow="none";aa.className="geMenuItem";aa.style.display="inline-block";aa.style.width="40px";aa.style.height="12px";aa.style.marginBottom="-2px";aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";aa.style.backgroundPosition=
-"top center";aa.style.backgroundRepeat="no-repeat";aa.setAttribute("title","Minimize");var ua=!1,ka=mxUtils.bind(this,function(){T.innerHTML="";if(!ua){var ba=function(la,ma,ta){la=C("",la.funct,null,ma,la,ta);la.style.width="40px";la.style.opacity="0.7";return ea(la,null,"pointer")},ea=function(la,ma,ta){null!=ma&&la.setAttribute("title",ma);la.style.cursor=null!=ta?ta:"default";la.style.margin="2px 0px";T.appendChild(la);mxUtils.br(T);return la};ea(E.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",
-60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");ea(E.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note"),!0,!1,null,!0),mxResources.get("note"));ea(E.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",
-160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");ea(E.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var la=new mxCell("",new mxGeometry(0,0,H.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");la.geometry.setTerminalPoint(new mxPoint(0,0),!0);la.geometry.setTerminalPoint(new mxPoint(la.geometry.width,
-0),!1);la.geometry.points=[];la.geometry.relative=!0;la.edge=!0;ea(E.sidebar.createEdgeTemplateFromCells([la],la.geometry.width,la.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));la=la.clone();la.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";la.geometry.width=H.defaultEdgeLength+20;la.geometry.setTerminalPoint(new mxPoint(0,20),!0);la.geometry.setTerminalPoint(new mxPoint(la.geometry.width,20),!1);la=
-ea(E.sidebar.createEdgeTemplateFromCells([la],la.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));la.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");la.style.paddingBottom="14px";la.style.marginBottom="14px"})();ba(E.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var na=E.actions.get("toggleShapes");ba(na,mxResources.get("shapes")+" ("+na.shortcut+")",F);fa=B("table",null,Editor.calendarImage);fa.style.boxShadow=
-"none";fa.style.opacity="0.7";fa.style.padding="6px";fa.style.margin="0px";fa.style.width="37px";ea(fa,null,"pointer");fa=B("insert",null,Editor.plusImage);fa.style.boxShadow="none";fa.style.opacity="0.7";fa.style.padding="6px";fa.style.margin="0px";fa.style.width="37px";ea(fa,null,"pointer")}"1"!=urlParams.embedInline&&T.appendChild(aa)});mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){ua?(mxUtils.setPrefixedStyle(T.style,"transform","translate(0, -50%)"),T.style.padding="8px 6px 4px",
-T.style.top="50%",T.style.bottom="",T.style.height="",aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",aa.style.width="40px",aa.style.height="12px",aa.setAttribute("title","Minimize"),ua=!1,ka()):(T.innerHTML="",T.appendChild(aa),mxUtils.setPrefixedStyle(T.style,"transform","translate(0, 0)"),T.style.top="",T.style.bottom="12px",T.style.padding="0px",T.style.height="24px",aa.style.height="24px",aa.style.backgroundImage="url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("insert")),
-aa.style.width="24px",ua=!0)}));ka();E.addListener("darkModeChanged",ka);E.addListener("sketchModeChanged",ka)}else E.editor.addListener("statusChanged",mxUtils.bind(this,function(){E.setStatusText(E.editor.getStatus())}));if(null!=t){var Ca=function(ba){mxEvent.isShiftDown(ba)?(E.hideCurrentMenu(),E.actions.get("smartFit").funct(),mxEvent.consume(ba)):mxEvent.isAltDown(ba)&&(E.hideCurrentMenu(),E.actions.get("customZoom").funct(),mxEvent.consume(ba))},Da=E.actions.get("zoomIn"),oa=E.actions.get("zoomOut"),
-Ba=E.actions.get("resetView");Q=E.actions.get("fullscreen");var Aa=E.actions.get("undo"),Ha=E.actions.get("redo"),Oa=C("",Aa.funct,null,mxResources.get("undo")+" ("+Aa.shortcut+")",Aa,Editor.undoImage),Ga=C("",Ha.funct,null,mxResources.get("redo")+" ("+Ha.shortcut+")",Ha,Editor.redoImage),Fa=C("",Q.funct,null,mxResources.get("fullscreen"),Q,Editor.fullscreenImage);if(null!=K){Ba=function(){qa.style.display=null!=E.pages&&("0"!=urlParams.pages||1<E.pages.length||Editor.pagesVisible)?"inline-block":
-"none"};var Ea=function(){qa.innerHTML="";if(null!=E.currentPage){mxUtils.write(qa,E.currentPage.getName());var ba=null!=E.pages?E.pages.length:1,ea=E.getPageIndex(E.currentPage);ea=null!=ea?ea+1:1;var na=E.currentPage.getId();qa.setAttribute("title",E.currentPage.getName()+" ("+ea+"/"+ba+")"+(null!=na?" ["+na+"]":""))}};Fa.parentNode.removeChild(Fa);var Ka=E.actions.get("delete"),za=C("",Ka.funct,null,mxResources.get("delete"),Ka,Editor.trashImage);za.style.opacity="0.1";P.appendChild(za);Ka.addListener("stateChanged",
-function(){za.style.opacity=Ka.enabled?"":"0.1"});var ya=function(){Oa.style.display=0<E.editor.undoManager.history.length||H.isEditing()?"inline-block":"none";Ga.style.display=Oa.style.display;Oa.style.opacity=Aa.enabled?"":"0.1";Ga.style.opacity=Ha.enabled?"":"0.1"};P.appendChild(Oa);P.appendChild(Ga);Aa.addListener("stateChanged",ya);Ha.addListener("stateChanged",ya);ya();var qa=this.createPageMenuTab(!1,!0);qa.style.display="none";qa.style.position="";qa.style.marginLeft="";qa.style.top="";qa.style.left=
-"";qa.style.height="100%";qa.style.lineHeight="";qa.style.borderStyle="none";qa.style.padding="3px 0";qa.style.margin="0px";qa.style.background="";qa.style.border="";qa.style.boxShadow="none";qa.style.verticalAlign="top";qa.style.width="auto";qa.style.maxWidth="160px";qa.style.position="relative";qa.style.padding="6px";qa.style.textOverflow="ellipsis";qa.style.opacity="0.8";K.appendChild(qa);E.editor.addListener("pagesPatched",Ea);E.editor.addListener("pageSelected",Ea);E.editor.addListener("pageRenamed",
-Ea);E.editor.addListener("fileLoaded",Ea);Ea();E.addListener("fileDescriptorChanged",Ba);E.addListener("pagesVisibleChanged",Ba);E.editor.addListener("pagesPatched",Ba);Ba();Ba=C("",oa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",oa,Editor.zoomOutImage);K.appendChild(Ba);var fa=J.addMenu("100%",t.funct);fa.setAttribute("title",mxResources.get("zoom"));fa.innerHTML="100%";fa.style.display="inline-block";fa.style.color="inherit";fa.style.cursor="pointer";fa.style.textAlign=
-"center";fa.style.whiteSpace="nowrap";fa.style.paddingRight="10px";fa.style.textDecoration="none";fa.style.verticalAlign="top";fa.style.padding="6px 0";fa.style.fontSize="14px";fa.style.width="40px";fa.style.opacity="0.4";K.appendChild(fa);t=C("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Da,Editor.zoomInImage);K.appendChild(t);Q.visible&&(K.appendChild(Fa),mxEvent.addListener(document,"fullscreenchange",function(){Fa.style.backgroundImage="url("+(null!=document.fullscreenElement?
-Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(t=E.actions.get("exit"),K.appendChild(C("",t.funct,null,mxResources.get("exit"),t,Editor.closeImage)));E.tabContainer.style.visibility="hidden";R.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";P.style.cssText=
+var F=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==F.embedViewport)mxUtils.fit(this.div);else{var aa=parseInt(this.div.offsetLeft),ca=parseInt(this.div.offsetWidth),na=F.embedViewport.x+F.embedViewport.width,la=parseInt(this.div.offsetTop),qa=parseInt(this.div.offsetHeight),ta=F.embedViewport.y+F.embedViewport.height;this.div.style.left=Math.max(F.embedViewport.x,Math.min(aa,na-ca))+"px";this.div.style.top=Math.max(F.embedViewport.y,Math.min(la,ta-qa))+"px";this.div.style.height=
+Math.min(F.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(F.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),I=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>c||708>I)?this.formatWindow.window.toggleMinimized():
+this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));F=this;var H=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var R=document.createElement("div");R.className="geMenubarContainer";var W=null,J=new Menubar(F,R);F.statusContainer=F.createStatusContainer();F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.marginTop="7px";F.statusContainer.style.marginLeft=
+"6px";F.statusContainer.style.color="gray";F.statusContainer.style.cursor="default";var V=F.hideCurrentMenu;F.hideCurrentMenu=function(){V.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var U=F.descriptorChanged;F.descriptorChanged=function(){U.apply(this,arguments);var aa=F.getCurrentFile();if(null!=aa&&null!=aa.getTitle()){var ca=aa.getMode();"google"==ca?ca="googleDrive":"github"==ca?ca="gitHub":"gitlab"==ca?ca="gitLab":"onedrive"==ca&&(ca="oneDrive");ca=mxResources.get(ca);
+R.setAttribute("title",aa.getTitle()+(null!=ca?" ("+ca+")":""))}else R.removeAttribute("title")};F.setStatusText(F.editor.getStatus());R.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";R.appendChild(F.buttonContainer);F.menubarContainer=F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className=
+"geTabContainer";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";I=F.diagramContainer.parentNode;var X=document.createElement("div");X.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){X.style.top="20px";F.titlebar=document.createElement("div");F.titlebar.style.cssText=
+"position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var t=document.createElement("div");t.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";F.titlebar.appendChild(t);I.appendChild(F.titlebar)}t=F.menus.get("viewZoom");var E="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,K="1"==urlParams.sketch?document.createElement("div"):
+null,T="1"==urlParams.sketch?document.createElement("div"):null,P="1"==urlParams.sketch?document.createElement("div"):null,Q=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();H.refresh();H.view.validateBackground()});F.addListener("darkModeChanged",Q);F.addListener("sketchModeChanged",Q);var S=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)P.style.left="10px",P.style.top="10px",T.style.left="10px",T.style.top="60px",K.style.top="10px",K.style.right="12px",K.style.left=
+"",F.diagramContainer.setAttribute("data-bounds",F.diagramContainer.style.top+" "+F.diagramContainer.style.left+" "+F.diagramContainer.style.width+" "+F.diagramContainer.style.height),F.diagramContainer.style.top="0px",F.diagramContainer.style.left="0px",F.diagramContainer.style.bottom="0px",F.diagramContainer.style.right="0px",F.diagramContainer.style.width="",F.diagramContainer.style.height="";else{var aa=F.diagramContainer.getAttribute("data-bounds");if(null!=aa){F.diagramContainer.style.background=
+"transparent";F.diagramContainer.removeAttribute("data-bounds");var ca=H.getGraphBounds();aa=aa.split(" ");F.diagramContainer.style.top=aa[0];F.diagramContainer.style.left=aa[1];F.diagramContainer.style.width=ca.width+50+"px";F.diagramContainer.style.height=ca.height+46+"px";F.diagramContainer.style.bottom="";F.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:F.diagramContainer.getBoundingClientRect()}),"*");F.refresh()}P.style.left=F.diagramContainer.offsetLeft+
+"px";P.style.top=F.diagramContainer.offsetTop-P.offsetHeight-4+"px";T.style.display="";T.style.left=F.diagramContainer.offsetLeft-T.offsetWidth-4+"px";T.style.top=F.diagramContainer.offsetTop+"px";K.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-K.offsetWidth+"px";K.style.top=P.style.top;K.style.right="";F.bottomResizer.style.left=F.diagramContainer.offsetLeft+(F.diagramContainer.offsetWidth-F.bottomResizer.offsetWidth)/2+"px";F.bottomResizer.style.top=F.diagramContainer.offsetTop+
+F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight/2-1+"px";F.rightResizer.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-F.rightResizer.offsetWidth/2-1+"px";F.rightResizer.style.top=F.diagramContainer.offsetTop+(F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight)/2+"px"}F.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";F.rightResizer.style.visibility=F.bottomResizer.style.visibility;R.style.display="none";P.style.visibility="";K.style.visibility=
+""}),Y=mxUtils.bind(this,function(){Ha.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";S()});Q=mxUtils.bind(this,function(){Y();b(F,!0);F.initFormatWindow();var aa=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(aa.x+aa.width+4,aa.y)});F.addListener("inlineFullscreenChanged",Y);F.addListener("editInlineStart",
+Q);"1"==urlParams.embedInline&&F.addListener("darkModeChanged",Q);F.addListener("editInlineStop",mxUtils.bind(this,function(aa){F.diagramContainer.style.width="10px";F.diagramContainer.style.height="10px";F.diagramContainer.style.border="";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";P.style.visibility="hidden";K.style.visibility="hidden";T.style.display="none"}));if(null!=F.hoverIcons){var ba=F.hoverIcons.update;F.hoverIcons.update=function(){H.freehand.isDrawing()||
+ba.apply(this,arguments)}}if(null!=H.freehand){var da=H.freehand.createStyle;H.freehand.createStyle=function(aa){return da.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){T.className="geToolbarContainer";K.className="geToolbarContainer";P.className="geToolbarContainer";R.className="geToolbarContainer";F.picker=T;var Z=!1;"1"!=urlParams.embed&&"atlassian"!=F.getServiceName()&&(mxEvent.addListener(R,"mouseenter",function(){F.statusContainer.style.display="inline-block"}),mxEvent.addListener(R,
+"mouseleave",function(){Z||(F.statusContainer.style.display="none")}));var ja=mxUtils.bind(this,function(aa){null!=F.notificationBtn&&(null!=aa?F.notificationBtn.setAttribute("title",aa):F.notificationBtn.removeAttribute("title"))});R.style.visibility=20>R.clientWidth?"hidden":"";F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=F.getServiceName())if(F.statusContainer.style.display="inline-block",Z=!0,1==F.statusContainer.children.length&&
+""==F.editor.getStatus())R.style.visibility="hidden";else{if(0==F.statusContainer.children.length||1==F.statusContainer.children.length&&"function"===typeof F.statusContainer.firstChild.getAttribute&&null==F.statusContainer.firstChild.getAttribute("class")){var aa=null!=F.statusContainer.firstChild&&"function"===typeof F.statusContainer.firstChild.getAttribute?F.statusContainer.firstChild.getAttribute("title"):F.editor.getStatus();ja(aa);var ca=F.getCurrentFile();ca=null!=ca?ca.savingStatusKey:DrawioFile.prototype.savingStatusKey;
+aa==mxResources.get(ca)+"..."?(F.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ca))+'..."src="'+Editor.tailSpin+'">',F.statusContainer.style.display="inline-block",Z=!0):6<F.buttonContainer.clientWidth&&(F.statusContainer.style.display="none",Z=!1)}else F.statusContainer.style.display="inline-block",ja(null),Z=!0;R.style.visibility=20>R.clientWidth&&!Z?"hidden":""}}));fa=B("diagram",null,Editor.menuImage);fa.style.boxShadow="none";fa.style.padding="6px";fa.style.margin=
+"0px";P.appendChild(fa);mxEvent.disableContextMenu(fa);mxEvent.addGestureListeners(fa,mxUtils.bind(this,function(aa){(mxEvent.isShiftDown(aa)||mxEvent.isAltDown(aa)||mxEvent.isMetaDown(aa)||mxEvent.isControlDown(aa)||mxEvent.isPopupTrigger(aa))&&this.appIconClicked(aa)}),null,null);F.statusContainer.style.position="";F.statusContainer.style.display="none";F.statusContainer.style.margin="0px";F.statusContainer.style.padding="6px 0px";F.statusContainer.style.maxWidth=Math.min(c-240,280)+"px";F.statusContainer.style.display=
+"inline-block";F.statusContainer.style.textOverflow="ellipsis";F.buttonContainer.style.position="";F.buttonContainer.style.paddingRight="0px";F.buttonContainer.style.display="inline-block";var ea=document.createElement("a");ea.style.padding="0px";ea.style.boxShadow="none";ea.className="geMenuItem";ea.style.display="inline-block";ea.style.width="40px";ea.style.height="12px";ea.style.marginBottom="-2px";ea.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";ea.style.backgroundPosition=
+"top center";ea.style.backgroundRepeat="no-repeat";ea.setAttribute("title","Minimize");var ha=!1,ma=mxUtils.bind(this,function(){T.innerHTML="";if(!ha){var aa=function(la,qa,ta){la=C("",la.funct,null,qa,la,ta);la.style.width="40px";la.style.opacity="0.7";return ca(la,null,"pointer")},ca=function(la,qa,ta){null!=qa&&la.setAttribute("title",qa);la.style.cursor=null!=ta?ta:"default";la.style.margin="2px 0px";T.appendChild(la);mxUtils.br(T);return la};ca(F.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",
+60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");ca(F.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note"),!0,!1,null,!0),mxResources.get("note"));ca(F.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",
+160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");ca(F.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var la=new mxCell("",new mxGeometry(0,0,H.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");la.geometry.setTerminalPoint(new mxPoint(0,0),!0);la.geometry.setTerminalPoint(new mxPoint(la.geometry.width,
+0),!1);la.geometry.points=[];la.geometry.relative=!0;la.edge=!0;ca(F.sidebar.createEdgeTemplateFromCells([la],la.geometry.width,la.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));la=la.clone();la.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";la.geometry.width=H.defaultEdgeLength+20;la.geometry.setTerminalPoint(new mxPoint(0,20),!0);la.geometry.setTerminalPoint(new mxPoint(la.geometry.width,20),!1);la=
+ca(F.sidebar.createEdgeTemplateFromCells([la],la.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));la.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");la.style.paddingBottom="14px";la.style.marginBottom="14px"})();aa(F.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var na=F.actions.get("toggleShapes");aa(na,mxResources.get("shapes")+" ("+na.shortcut+")",E);fa=B("table",null,Editor.calendarImage);fa.style.boxShadow=
+"none";fa.style.opacity="0.7";fa.style.padding="6px";fa.style.margin="0px";fa.style.width="37px";ca(fa,null,"pointer");fa=B("insert",null,Editor.plusImage);fa.style.boxShadow="none";fa.style.opacity="0.7";fa.style.padding="6px";fa.style.margin="0px";fa.style.width="37px";ca(fa,null,"pointer")}"1"!=urlParams.embedInline&&T.appendChild(ea)});mxEvent.addListener(ea,"click",mxUtils.bind(this,function(){ha?(mxUtils.setPrefixedStyle(T.style,"transform","translate(0, -50%)"),T.style.padding="8px 6px 4px",
+T.style.top="50%",T.style.bottom="",T.style.height="",ea.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ea.style.width="40px",ea.style.height="12px",ea.setAttribute("title","Minimize"),ha=!1,ma()):(T.innerHTML="",T.appendChild(ea),mxUtils.setPrefixedStyle(T.style,"transform","translate(0, 0)"),T.style.top="",T.style.bottom="12px",T.style.padding="0px",T.style.height="24px",ea.style.height="24px",ea.style.backgroundImage="url("+Editor.plusImage+")",ea.setAttribute("title",mxResources.get("insert")),
+ea.style.width="24px",ha=!0)}));ma();F.addListener("darkModeChanged",ma);F.addListener("sketchModeChanged",ma)}else F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));if(null!=t){var Aa=function(aa){mxEvent.isShiftDown(aa)?(F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(aa)):mxEvent.isAltDown(aa)&&(F.hideCurrentMenu(),F.actions.get("customZoom").funct(),mxEvent.consume(aa))},Da=F.actions.get("zoomIn"),Ca=F.actions.get("zoomOut"),
+pa=F.actions.get("resetView");Q=F.actions.get("fullscreen");var Ba=F.actions.get("undo"),Ea=F.actions.get("redo"),Ka=C("",Ba.funct,null,mxResources.get("undo")+" ("+Ba.shortcut+")",Ba,Editor.undoImage),Fa=C("",Ea.funct,null,mxResources.get("redo")+" ("+Ea.shortcut+")",Ea,Editor.redoImage),Ha=C("",Q.funct,null,mxResources.get("fullscreen"),Q,Editor.fullscreenImage);if(null!=K){pa=function(){oa.style.display=null!=F.pages&&("0"!=urlParams.pages||1<F.pages.length||Editor.pagesVisible)?"inline-block":
+"none"};var Ia=function(){oa.innerHTML="";if(null!=F.currentPage){mxUtils.write(oa,F.currentPage.getName());var aa=null!=F.pages?F.pages.length:1,ca=F.getPageIndex(F.currentPage);ca=null!=ca?ca+1:1;var na=F.currentPage.getId();oa.setAttribute("title",F.currentPage.getName()+" ("+ca+"/"+aa+")"+(null!=na?" ["+na+"]":""))}};Ha.parentNode.removeChild(Ha);var Ma=F.actions.get("delete"),za=C("",Ma.funct,null,mxResources.get("delete"),Ma,Editor.trashImage);za.style.opacity="0.1";P.appendChild(za);Ma.addListener("stateChanged",
+function(){za.style.opacity=Ma.enabled?"":"0.1"});var ya=function(){Ka.style.display=0<F.editor.undoManager.history.length||H.isEditing()?"inline-block":"none";Fa.style.display=Ka.style.display;Ka.style.opacity=Ba.enabled?"":"0.1";Fa.style.opacity=Ea.enabled?"":"0.1"};P.appendChild(Ka);P.appendChild(Fa);Ba.addListener("stateChanged",ya);Ea.addListener("stateChanged",ya);ya();var oa=this.createPageMenuTab(!1,!0);oa.style.display="none";oa.style.position="";oa.style.marginLeft="";oa.style.top="";oa.style.left=
+"";oa.style.height="100%";oa.style.lineHeight="";oa.style.borderStyle="none";oa.style.padding="3px 0";oa.style.margin="0px";oa.style.background="";oa.style.border="";oa.style.boxShadow="none";oa.style.verticalAlign="top";oa.style.width="auto";oa.style.maxWidth="160px";oa.style.position="relative";oa.style.padding="6px";oa.style.textOverflow="ellipsis";oa.style.opacity="0.8";K.appendChild(oa);F.editor.addListener("pagesPatched",Ia);F.editor.addListener("pageSelected",Ia);F.editor.addListener("pageRenamed",
+Ia);F.editor.addListener("fileLoaded",Ia);Ia();F.addListener("fileDescriptorChanged",pa);F.addListener("pagesVisibleChanged",pa);F.editor.addListener("pagesPatched",pa);pa();pa=C("",Ca.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Ca,Editor.zoomOutImage);K.appendChild(pa);var fa=J.addMenu("100%",t.funct);fa.setAttribute("title",mxResources.get("zoom"));fa.innerHTML="100%";fa.style.display="inline-block";fa.style.color="inherit";fa.style.cursor="pointer";fa.style.textAlign=
+"center";fa.style.whiteSpace="nowrap";fa.style.paddingRight="10px";fa.style.textDecoration="none";fa.style.verticalAlign="top";fa.style.padding="6px 0";fa.style.fontSize="14px";fa.style.width="40px";fa.style.opacity="0.4";K.appendChild(fa);t=C("",Da.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Da,Editor.zoomInImage);K.appendChild(t);Q.visible&&(K.appendChild(Ha),mxEvent.addListener(document,"fullscreenchange",function(){Ha.style.backgroundImage="url("+(null!=document.fullscreenElement?
+Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(t=F.actions.get("exit"),K.appendChild(C("",t.funct,null,mxResources.get("exit"),t,Editor.closeImage)));F.tabContainer.style.visibility="hidden";R.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";P.style.cssText=
"position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";K.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";X.appendChild(P);X.appendChild(K);T.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(T.style.touchAction="none");X.appendChild(T);window.setTimeout(function(){mxUtils.setPrefixedStyle(T.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(X)}else{var ra=C("",Ca,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ba,Editor.zoomFitImage);R.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";fa=J.addMenu("100%",
-t.funct);fa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");fa.style.whiteSpace="nowrap";fa.style.paddingRight="10px";fa.style.textDecoration="none";fa.style.textDecoration="none";fa.style.overflow="hidden";fa.style.visibility="hidden";fa.style.textAlign="center";fa.style.cursor="pointer";fa.style.height=parseInt(E.tabContainerHeight)-1+"px";fa.style.lineHeight=parseInt(E.tabContainerHeight)+1+"px";fa.style.position="absolute";fa.style.display="block";fa.style.fontSize="12px";fa.style.width=
-"59px";fa.style.right="0px";fa.style.bottom="0px";fa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";fa.style.backgroundPosition="right 6px center";fa.style.backgroundRepeat="no-repeat";X.appendChild(fa)}(function(ba){mxEvent.addListener(ba,"click",Ca);var ea=mxUtils.bind(this,function(){ba.innerHTML="";mxUtils.write(ba,Math.round(100*E.editor.graph.view.scale)+"%")});E.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ea);E.editor.addListener("resetGraphView",ea);E.editor.addListener("pageSelected",
-ea)})(fa);var xa=E.setGraphEnabled;E.setGraphEnabled=function(){xa.apply(this,arguments);null!=this.tabContainer&&(fa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==K?this.tabContainerHeight+"px":"0px")}}X.appendChild(R);X.appendChild(E.diagramContainer);I.appendChild(X);E.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&b(this,!0);null==K&&X.appendChild(E.tabContainer);
-var wa=null;N();mxEvent.addListener(window,"resize",function(){N();null!=E.sidebarWindow&&E.sidebarWindow.window.fit();null!=E.formatWindow&&E.formatWindow.window.fit();null!=E.actions.outlineWindow&&E.actions.outlineWindow.window.fit();null!=E.actions.layersWindow&&E.actions.layersWindow.window.fit();null!=E.menus.tagsWindow&&E.menus.tagsWindow.window.fit();null!=E.menus.findWindow&&E.menus.findWindow.window.fit();null!=E.menus.findReplaceWindow&&E.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";T.style.transform="";mxEvent.addGestureListeners(E.diagramContainer.parentNode,function(ba){mxEvent.getSource(ba)==E.diagramContainer.parentNode&&(E.embedExitPoint=new mxPoint(mxEvent.getClientX(ba),mxEvent.getClientY(ba)),E.sendEmbeddedSvgExport())});I=document.createElement("div");I.style.position="absolute";I.style.width="10px";I.style.height="10px";I.style.borderRadius="5px";I.style.border="1px solid gray";I.style.background="#ffffff";I.style.cursor=
-"row-resize";E.diagramContainer.parentNode.appendChild(I);E.bottomResizer=I;var sa=null,va=null,ja=null,pa=null;mxEvent.addGestureListeners(I,function(ba){pa=parseInt(E.diagramContainer.style.height);va=mxEvent.getClientY(ba);H.popupMenuHandler.hideMenu();mxEvent.consume(ba)});I=I.cloneNode(!1);I.style.cursor="col-resize";E.diagramContainer.parentNode.appendChild(I);E.rightResizer=I;mxEvent.addGestureListeners(I,function(ba){ja=parseInt(E.diagramContainer.style.width);sa=mxEvent.getClientX(ba);H.popupMenuHandler.hideMenu();
-mxEvent.consume(ba)});mxEvent.addGestureListeners(document.body,null,function(ba){var ea=!1;null!=sa&&(E.diagramContainer.style.width=Math.max(20,ja+mxEvent.getClientX(ba)-sa)+"px",ea=!0);null!=va&&(E.diagramContainer.style.height=Math.max(20,pa+mxEvent.getClientY(ba)-va)+"px",ea=!0);ea&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:E.diagramContainer.getBoundingClientRect()}),"*"),S(),E.refresh())},function(ba){null==sa&&null==
-va||mxEvent.consume(ba);va=sa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";E.bottomResizer.style.visibility="hidden";E.rightResizer.style.visibility="hidden";P.style.visibility="hidden";K.style.visibility="hidden";T.style.display="none"}"1"==urlParams.prefetchFonts&&E.editor.loadFonts()}}};
+mxClient.IS_POINTER&&(T.style.touchAction="none");X.appendChild(T);window.setTimeout(function(){mxUtils.setPrefixedStyle(T.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(X)}else{var sa=C("",Aa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",pa,Editor.zoomFitImage);R.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";fa=J.addMenu("100%",
+t.funct);fa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");fa.style.whiteSpace="nowrap";fa.style.paddingRight="10px";fa.style.textDecoration="none";fa.style.textDecoration="none";fa.style.overflow="hidden";fa.style.visibility="hidden";fa.style.textAlign="center";fa.style.cursor="pointer";fa.style.height=parseInt(F.tabContainerHeight)-1+"px";fa.style.lineHeight=parseInt(F.tabContainerHeight)+1+"px";fa.style.position="absolute";fa.style.display="block";fa.style.fontSize="12px";fa.style.width=
+"59px";fa.style.right="0px";fa.style.bottom="0px";fa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";fa.style.backgroundPosition="right 6px center";fa.style.backgroundRepeat="no-repeat";X.appendChild(fa)}(function(aa){mxEvent.addListener(aa,"click",Aa);var ca=mxUtils.bind(this,function(){aa.innerHTML="";mxUtils.write(aa,Math.round(100*F.editor.graph.view.scale)+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ca);F.editor.addListener("resetGraphView",ca);F.editor.addListener("pageSelected",
+ca)})(fa);var xa=F.setGraphEnabled;F.setGraphEnabled=function(){xa.apply(this,arguments);null!=this.tabContainer&&(fa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==K?this.tabContainerHeight+"px":"0px")}}X.appendChild(R);X.appendChild(F.diagramContainer);I.appendChild(X);F.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=c)&&"1"!=urlParams.embedInline&&b(this,!0);null==K&&X.appendChild(F.tabContainer);
+var wa=null;N();mxEvent.addListener(window,"resize",function(){N();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.menus.findReplaceWindow.window.fit()});if("1"==
+urlParams.embedInline){document.body.style.cursor="text";T.style.transform="";mxEvent.addGestureListeners(F.diagramContainer.parentNode,function(aa){mxEvent.getSource(aa)==F.diagramContainer.parentNode&&(F.embedExitPoint=new mxPoint(mxEvent.getClientX(aa),mxEvent.getClientY(aa)),F.sendEmbeddedSvgExport())});I=document.createElement("div");I.style.position="absolute";I.style.width="10px";I.style.height="10px";I.style.borderRadius="5px";I.style.border="1px solid gray";I.style.background="#ffffff";I.style.cursor=
+"row-resize";F.diagramContainer.parentNode.appendChild(I);F.bottomResizer=I;var ua=null,va=null,ia=null,ra=null;mxEvent.addGestureListeners(I,function(aa){ra=parseInt(F.diagramContainer.style.height);va=mxEvent.getClientY(aa);H.popupMenuHandler.hideMenu();mxEvent.consume(aa)});I=I.cloneNode(!1);I.style.cursor="col-resize";F.diagramContainer.parentNode.appendChild(I);F.rightResizer=I;mxEvent.addGestureListeners(I,function(aa){ia=parseInt(F.diagramContainer.style.width);ua=mxEvent.getClientX(aa);H.popupMenuHandler.hideMenu();
+mxEvent.consume(aa)});mxEvent.addGestureListeners(document.body,null,function(aa){var ca=!1;null!=ua&&(F.diagramContainer.style.width=Math.max(20,ia+mxEvent.getClientX(aa)-ua)+"px",ca=!0);null!=va&&(F.diagramContainer.style.height=Math.max(20,ra+mxEvent.getClientY(aa)-va)+"px",ca=!0);ca&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:F.diagramContainer.getBoundingClientRect()}),"*"),S(),F.refresh())},function(aa){null==ua&&null==
+va||mxEvent.consume(aa);va=ua=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";P.style.visibility="hidden";K.style.visibility="hidden";T.style.display="none"}"1"==urlParams.prefetchFonts&&F.editor.loadFonts()}}};
(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(c,m,n,v){var d=m.y,g=m.x,k=!1,l=!1;if(null!=this.states&&null!=c&&null!=m){var p=this,q=new mxCellState,x=this.graph.getView().scale,y=Math.max(2,this.getGuideTolerance()/2);q.x=c.x+g;q.y=c.y+d;q.width=c.width;q.height=c.height;for(var z=[],A=[],L=0;L<this.states.length;L++){var O=this.states[L];O instanceof mxCellState&&(v||!this.graph.isCellSelected(O.cell))&&((q.x>=O.x&&q.x<=O.x+O.width||O.x>=q.x&&O.x<=q.x+q.width)&&(q.y>
-O.y+O.height+4||q.y+q.height+4<O.y)?z.push(O):(q.y>=O.y&&q.y<=O.y+O.height||O.y>=q.y&&O.y<=q.y+q.height)&&(q.x>O.x+O.width+4||q.x+q.width+4<O.x)&&A.push(O))}var M=0,u=0,D=O=0,B=0,C=0,G=0,N=0,I=5*x;if(1<z.length){z.push(q);z.sort(function(W,J){return W.y-J.y});var E=!1;L=q==z[0];x=q==z[z.length-1];if(!L&&!x)for(L=1;L<z.length-1;L++)if(q==z[L]){x=z[L-1];L=z[L+1];O=u=D=(L.y-x.y-x.height-q.height)/2;break}for(L=0;L<z.length-1;L++){x=z[L];var H=z[L+1],R=q==x||q==H;H=H.y-x.y-x.height;E|=q==x;if(0==u&&0==
-M)u=H,M=1;else if(Math.abs(u-H)<=(R||1==L&&E?y:0))M+=1;else if(1<M&&E){z=z.slice(0,L+1);break}else if(3<=z.length-L&&!E)M=0,O=u=0!=D?D:0,z.splice(0,0==L?1:L),L=-1;else break;0!=O||R||(u=O=H)}3==z.length&&z[1]==q&&(O=0)}if(1<A.length){A.push(q);A.sort(function(W,J){return W.x-J.x});E=!1;L=q==A[0];x=q==A[A.length-1];if(!L&&!x)for(L=1;L<A.length-1;L++)if(q==A[L]){x=A[L-1];L=A[L+1];G=C=N=(L.x-x.x-x.width-q.width)/2;break}for(L=0;L<A.length-1;L++){x=A[L];H=A[L+1];R=q==x||q==H;H=H.x-x.x-x.width;E|=q==x;
-if(0==C&&0==B)C=H,B=1;else if(Math.abs(C-H)<=(R||1==L&&E?y:0))B+=1;else if(1<B&&E){A=A.slice(0,L+1);break}else if(3<=A.length-L&&!E)B=0,G=C=0!=N?N:0,A.splice(0,0==L?1:L),L=-1;else break;0!=G||R||(C=G=H)}3==A.length&&A[1]==q&&(G=0)}y=function(W,J,V,U){var X=[];if(U){U=I;var t=0}else U=0,t=I;X.push(new mxPoint(W.x-U,W.y-t));X.push(new mxPoint(W.x+U,W.y+t));X.push(W);X.push(J);X.push(new mxPoint(J.x-U,J.y-t));X.push(new mxPoint(J.x+U,J.y+t));if(null!=V)return V.points=X,V;W=new mxPolyline(X,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);W.dialect=mxConstants.DIALECT_SVG;W.pointerEvents=!1;W.init(p.graph.getView().getOverlayPane());return W};C=function(W,J){if(W&&null!=p.guidesArrHor)for(W=0;W<p.guidesArrHor.length;W++)p.guidesArrHor[W].node.style.visibility="hidden";if(J&&null!=p.guidesArrVer)for(W=0;W<p.guidesArrVer.length;W++)p.guidesArrVer[W].node.style.visibility="hidden"};if(1<B&&B==A.length-1){B=[];N=p.guidesArrHor;k=[];g=0;L=A[0]==q?1:0;E=A[L].y+A[L].height;if(0<G)for(L=0;L<A.length-1;L++)x=
-A[L],H=A[L+1],q==x?(g=H.x-x.width-G,k.push(new mxPoint(g+x.width+I,E)),k.push(new mxPoint(H.x-I,E))):q==H?(k.push(new mxPoint(x.x+x.width+I,E)),g=x.x+x.width+G,k.push(new mxPoint(g-I,E))):(k.push(new mxPoint(x.x+x.width+I,E)),k.push(new mxPoint(H.x-I,E)));else x=A[0],L=A[2],g=x.x+x.width+(L.x-x.x-x.width-q.width)/2,k.push(new mxPoint(x.x+x.width+I,E)),k.push(new mxPoint(g-I,E)),k.push(new mxPoint(g+q.width+I,E)),k.push(new mxPoint(L.x-I,E));for(L=0;L<k.length;L+=2)A=k[L],G=k[L+1],A=y(A,G,null!=N?
+O.y+O.height+4||q.y+q.height+4<O.y)?z.push(O):(q.y>=O.y&&q.y<=O.y+O.height||O.y>=q.y&&O.y<=q.y+q.height)&&(q.x>O.x+O.width+4||q.x+q.width+4<O.x)&&A.push(O))}var M=0,u=0,D=O=0,B=0,C=0,G=0,N=0,I=5*x;if(1<z.length){z.push(q);z.sort(function(W,J){return W.y-J.y});var F=!1;L=q==z[0];x=q==z[z.length-1];if(!L&&!x)for(L=1;L<z.length-1;L++)if(q==z[L]){x=z[L-1];L=z[L+1];O=u=D=(L.y-x.y-x.height-q.height)/2;break}for(L=0;L<z.length-1;L++){x=z[L];var H=z[L+1],R=q==x||q==H;H=H.y-x.y-x.height;F|=q==x;if(0==u&&0==
+M)u=H,M=1;else if(Math.abs(u-H)<=(R||1==L&&F?y:0))M+=1;else if(1<M&&F){z=z.slice(0,L+1);break}else if(3<=z.length-L&&!F)M=0,O=u=0!=D?D:0,z.splice(0,0==L?1:L),L=-1;else break;0!=O||R||(u=O=H)}3==z.length&&z[1]==q&&(O=0)}if(1<A.length){A.push(q);A.sort(function(W,J){return W.x-J.x});F=!1;L=q==A[0];x=q==A[A.length-1];if(!L&&!x)for(L=1;L<A.length-1;L++)if(q==A[L]){x=A[L-1];L=A[L+1];G=C=N=(L.x-x.x-x.width-q.width)/2;break}for(L=0;L<A.length-1;L++){x=A[L];H=A[L+1];R=q==x||q==H;H=H.x-x.x-x.width;F|=q==x;
+if(0==C&&0==B)C=H,B=1;else if(Math.abs(C-H)<=(R||1==L&&F?y:0))B+=1;else if(1<B&&F){A=A.slice(0,L+1);break}else if(3<=A.length-L&&!F)B=0,G=C=0!=N?N:0,A.splice(0,0==L?1:L),L=-1;else break;0!=G||R||(C=G=H)}3==A.length&&A[1]==q&&(G=0)}y=function(W,J,V,U){var X=[];if(U){U=I;var t=0}else U=0,t=I;X.push(new mxPoint(W.x-U,W.y-t));X.push(new mxPoint(W.x+U,W.y+t));X.push(W);X.push(J);X.push(new mxPoint(J.x-U,J.y-t));X.push(new mxPoint(J.x+U,J.y+t));if(null!=V)return V.points=X,V;W=new mxPolyline(X,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);W.dialect=mxConstants.DIALECT_SVG;W.pointerEvents=!1;W.init(p.graph.getView().getOverlayPane());return W};C=function(W,J){if(W&&null!=p.guidesArrHor)for(W=0;W<p.guidesArrHor.length;W++)p.guidesArrHor[W].node.style.visibility="hidden";if(J&&null!=p.guidesArrVer)for(W=0;W<p.guidesArrVer.length;W++)p.guidesArrVer[W].node.style.visibility="hidden"};if(1<B&&B==A.length-1){B=[];N=p.guidesArrHor;k=[];g=0;L=A[0]==q?1:0;F=A[L].y+A[L].height;if(0<G)for(L=0;L<A.length-1;L++)x=
+A[L],H=A[L+1],q==x?(g=H.x-x.width-G,k.push(new mxPoint(g+x.width+I,F)),k.push(new mxPoint(H.x-I,F))):q==H?(k.push(new mxPoint(x.x+x.width+I,F)),g=x.x+x.width+G,k.push(new mxPoint(g-I,F))):(k.push(new mxPoint(x.x+x.width+I,F)),k.push(new mxPoint(H.x-I,F)));else x=A[0],L=A[2],g=x.x+x.width+(L.x-x.x-x.width-q.width)/2,k.push(new mxPoint(x.x+x.width+I,F)),k.push(new mxPoint(g-I,F)),k.push(new mxPoint(g+q.width+I,F)),k.push(new mxPoint(L.x-I,F));for(L=0;L<k.length;L+=2)A=k[L],G=k[L+1],A=y(A,G,null!=N?
N[L/2]:null),A.node.style.visibility="visible",A.redraw(),B.push(A);for(L=k.length/2;null!=N&&L<N.length;L++)N[L].destroy();p.guidesArrHor=B;g-=c.x;k=!0}else C(!0);if(1<M&&M==z.length-1){B=[];N=p.guidesArrVer;l=[];d=0;L=z[0]==q?1:0;M=z[L].x+z[L].width;if(0<O)for(L=0;L<z.length-1;L++)x=z[L],H=z[L+1],q==x?(d=H.y-x.height-O,l.push(new mxPoint(M,d+x.height+I)),l.push(new mxPoint(M,H.y-I))):q==H?(l.push(new mxPoint(M,x.y+x.height+I)),d=x.y+x.height+O,l.push(new mxPoint(M,d-I))):(l.push(new mxPoint(M,x.y+
x.height+I)),l.push(new mxPoint(M,H.y-I)));else x=z[0],L=z[2],d=x.y+x.height+(L.y-x.y-x.height-q.height)/2,l.push(new mxPoint(M,x.y+x.height+I)),l.push(new mxPoint(M,d-I)),l.push(new mxPoint(M,d+q.height+I)),l.push(new mxPoint(M,L.y-I));for(L=0;L<l.length;L+=2)A=l[L],G=l[L+1],A=y(A,G,null!=N?N[L/2]:null,!0),A.node.style.visibility="visible",A.redraw(),B.push(A);for(L=l.length/2;null!=N&&L<N.length;L++)N[L].destroy();p.guidesArrVer=B;d-=c.y;l=!0}else C(!1,!0)}if(k||l)return q=new mxPoint(g,d),z=b.call(this,
c,q,n,v),k&&!l?q.y=z.y:l&&!k&&(q.x=z.x),z.y!=q.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),z.x!=q.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),q;C(!0,!0);return b.apply(this,arguments)};var e=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(c){e.call(this,c);var m=this.guidesArrVer,n=this.guidesArrHor;if(null!=m)for(var v=0;v<m.length;v++)m[v].node.style.visibility=c?"visible":"hidden";if(null!=
@@ -13235,12 +13235,12 @@ d=window.cancelAnimationFrame||window.mozCancelAnimationFrame,g=this.RULER_THICK
{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};p.style.background=l.bkgClr;p.style[f?"borderRight":"borderBottom"]="0.5px solid "+l.strokeClr;p.style.borderLeft="0.5px solid "+l.strokeClr});this.updateStyle();document.body.appendChild(p);mxEvent.disableContextMenu(p);this.editorUiRefresh=b.refresh;b.refresh=
function(M){k.editorUiRefresh.apply(b,arguments);m()};m();var q=document.createElement("canvas");q.width=p.offsetWidth;q.height=p.offsetHeight;p.style.overflow="hidden";q.style.position="relative";p.appendChild(q);var x=q.getContext("2d");this.ui=b;var y=b.editor.graph;this.graph=y;this.container=p;this.canvas=q;var z=function(M,u,D,B,C){M=Math.round(M);u=Math.round(u);D=Math.round(D);B=Math.round(B);x.beginPath();x.moveTo(M+.5,u+.5);x.lineTo(D+.5,B+.5);x.stroke();C&&(f?(x.save(),x.translate(M,u),
x.rotate(-Math.PI/2),x.fillText(C,0,0),x.restore()):x.fillText(C,M,u))},A=function(){x.clearRect(0,0,q.width,q.height);x.beginPath();x.lineWidth=.7;x.strokeStyle=l.strokeClr;x.setLineDash([]);x.font="9px Arial";x.textAlign="center";var M=y.view.scale,u=y.view.getBackgroundPageBounds(),D=y.view.translate,B=y.pageVisible;D=B?g+(f?u.y-y.container.scrollTop:u.x-y.container.scrollLeft):g+(f?D.y*M-y.container.scrollTop:D.x*M-y.container.scrollLeft);var C=0;B&&(C=y.getPageLayout(),C=f?C.y*y.pageFormat.height:
-C.x*y.pageFormat.width);var G;switch(k.unit){case mxConstants.POINTS:var N=G=10;var I=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;N=mxConstants.PIXELS_PER_MM;I=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:G=20;N=mxConstants.PIXELS_PER_MM;I=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=M||4<=M?8:16,N=mxConstants.PIXELS_PER_INCH/G,I=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var E=N;2<=M?E=N/(2*Math.floor(M/2)):.5>=M&&(E=N*Math.floor(1/M/2)*(k.unit==
-mxConstants.MILLIMETERS?2:1));N=null;u=B?Math.min(D+(f?u.height:u.width),f?q.height:q.width):f?q.height:q.width;if(B)if(x.fillStyle=l.outBkgClr,f){var H=D-g;0<H&&x.fillRect(0,g,g,H);u<q.height&&x.fillRect(0,u,g,q.height)}else H=D-g,0<H&&x.fillRect(g,0,H,g),u<q.width&&x.fillRect(u,0,q.width,g);x.fillStyle=l.fontClr;for(B=B?D:D%(E*M);B<=u;B+=E*M)if(H=Math.round((B-D)/M/E),!(B<g||H==N)){N=H;var R=null;0==H%G&&(R=k.formatText(C+H*E)+"");f?z(g-I[Math.abs(H)%G],B,g,B,R):z(B,g-I[Math.abs(H)%G],B,g,R)}x.lineWidth=
+C.x*y.pageFormat.width);var G;switch(k.unit){case mxConstants.POINTS:var N=G=10;var I=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;N=mxConstants.PIXELS_PER_MM;I=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:G=20;N=mxConstants.PIXELS_PER_MM;I=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=M||4<=M?8:16,N=mxConstants.PIXELS_PER_INCH/G,I=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var F=N;2<=M?F=N/(2*Math.floor(M/2)):.5>=M&&(F=N*Math.floor(1/M/2)*(k.unit==
+mxConstants.MILLIMETERS?2:1));N=null;u=B?Math.min(D+(f?u.height:u.width),f?q.height:q.width):f?q.height:q.width;if(B)if(x.fillStyle=l.outBkgClr,f){var H=D-g;0<H&&x.fillRect(0,g,g,H);u<q.height&&x.fillRect(0,u,g,q.height)}else H=D-g,0<H&&x.fillRect(g,0,H,g),u<q.width&&x.fillRect(u,0,q.width,g);x.fillStyle=l.fontClr;for(B=B?D:D%(F*M);B<=u;B+=F*M)if(H=Math.round((B-D)/M/F),!(B<g||H==N)){N=H;var R=null;0==H%G&&(R=k.formatText(C+H*F)+"");f?z(g-I[Math.abs(H)%G],B,g,B,R):z(B,g-I[Math.abs(H)%G],B,g,R)}x.lineWidth=
1;z(f?0:g,f?g:0,g,g);x.fillStyle=l.cornerClr;x.fillRect(0,0,g,g)},L=-1,O=function(){null!=v?(null!=d&&d(L),L=v(A)):A()};this.drawRuler=O;this.sizeListener=e=n(function(){var M=y.container;f?(M=M.offsetHeight+g,q.height!=M&&(q.height=M,p.style.height=M+"px",O())):(M=M.offsetWidth+g,q.width!=M&&(q.width=M,p.style.width=M+"px",O()))},10);this.pageListener=function(){O()};this.scrollListener=c=n(function(){var M=f?y.container.scrollTop:y.container.scrollLeft;k.lastScroll!=M&&(k.lastScroll=M,O())},10);
this.unitListener=function(M,u){k.setUnit(u.getProperty("unit"))};y.addListener(mxEvent.SIZE,e);y.container.addEventListener("scroll",c);y.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(M){l=M;p.style.background=l.bkgClr;A()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(M,u,D,B){if(f&&4<M.height||
-!f&&4<M.width){if(null!=k.guidePart)try{x.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),x.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),x.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3)}catch(U){}var C=k.origGuideMove.apply(this,arguments);try{x.lineWidth=.5;x.strokeStyle=l.guideClr;x.setLineDash([2]);if(f){var G=M.y+C.y+g-this.graph.container.scrollTop;var N=0;var I=G+M.height/2;var E=g/2;var H=G+M.height;var R=0;var W=x.getImageData(N,G-1,g,
-3);z(N,G,g,G);G--;var J=x.getImageData(E,I-1,g,3);z(E,I,g,I);I--;var V=x.getImageData(R,H-1,g,3);z(R,H,g,H);H--}else G=0,N=M.x+C.x+g-this.graph.container.scrollLeft,I=g/2,E=N+M.width/2,H=0,R=N+M.width,W=x.getImageData(N-1,G,3,g),z(N,G,N,g),N--,J=x.getImageData(E-1,I,3,g),z(E,I,E,g),E--,V=x.getImageData(R-1,H,3,g),z(R,H,R,g),R--;if(null==k.guidePart||k.guidePart.x1!=N||k.guidePart.y1!=G)k.guidePart={imgData1:W,x1:N,y1:G,imgData2:J,x2:E,y2:I,imgData3:V,x3:R,y3:H}}catch(U){}}else C=k.origGuideMove.apply(this,
+!f&&4<M.width){if(null!=k.guidePart)try{x.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),x.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),x.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3)}catch(U){}var C=k.origGuideMove.apply(this,arguments);try{x.lineWidth=.5;x.strokeStyle=l.guideClr;x.setLineDash([2]);if(f){var G=M.y+C.y+g-this.graph.container.scrollTop;var N=0;var I=G+M.height/2;var F=g/2;var H=G+M.height;var R=0;var W=x.getImageData(N,G-1,g,
+3);z(N,G,g,G);G--;var J=x.getImageData(F,I-1,g,3);z(F,I,g,I);I--;var V=x.getImageData(R,H-1,g,3);z(R,H,g,H);H--}else G=0,N=M.x+C.x+g-this.graph.container.scrollLeft,I=g/2,F=N+M.width/2,H=0,R=N+M.width,W=x.getImageData(N-1,G,3,g),z(N,G,N,g),N--,J=x.getImageData(F-1,I,3,g),z(F,I,F,g),F--,V=x.getImageData(R-1,H,3,g),z(R,H,R,g),R--;if(null==k.guidePart||k.guidePart.x1!=N||k.guidePart.y1!=G)k.guidePart={imgData1:W,x1:N,y1:G,imgData2:J,x2:F,y2:I,imgData3:V,x3:R,y3:H}}catch(U){}}else C=k.origGuideMove.apply(this,
arguments);return C};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var M=k.origGuideDestroy.apply(this,arguments);if(null!=k.guidePart)try{x.putImageData(k.guidePart.imgData1,k.guidePart.x1,k.guidePart.y1),x.putImageData(k.guidePart.imgData2,k.guidePart.x2,k.guidePart.y2),x.putImageData(k.guidePart.imgData3,k.guidePart.x3,k.guidePart.y3),k.guidePart=null}catch(u){}return M}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
@@ -13250,31 +13250,31 @@ function(n){m=null!=b.currentMenu;mxEvent.consume(n)}),null,mxUtils.bind(this,fu
!0;v.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(v,arguments);b.resetCurrentMenu();v.destroy()});var d=mxEvent.getClientX(n),g=mxEvent.getClientY(n);v.popup(d,g,null,n);b.setCurrentMenu(v,c)}mxEvent.consume(n)}}))});e(this.hRuler.container);e(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var e=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=e){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var f=mxFreehand.prototype.NORMAL_SMOOTHING,c=null,m=[],n,v=[],d,g=!1,k=!0,l=!0,p=!0,q=!0,x=[],y=!1,z=!0,A=!1,L={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},O=!1;this.setClosedPath=function(I){g=I};this.setAutoClose=function(I){k=I};this.setAutoInsert=
function(I){l=I};this.setAutoScroll=function(I){p=I};this.setOpenFill=function(I){q=I};this.setStopClickEnabled=function(I){z=I};this.setSelectInserted=function(I){A=I};this.setSmoothing=function(I){f=I};this.setPerfectFreehandMode=function(I){O=I};this.setBrushSize=function(I){L.size=I};this.getBrushSize=function(){return L.size};var M=function(I){y=I;b.getRubberband().setEnabled(!I);b.graphHandler.setSelectEnabled(!I);b.graphHandler.setMoveEnabled(!I);b.container.style.cursor=I?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};
-this.startDrawing=function(){M(!0)};this.isDrawing=function(){return y};var u=mxUtils.bind(this,function(I){if(c){var E=d.length,H=z&&0<v.length&&null!=d&&2>d.length;H||v.push.apply(v,d);d=[];v.push(null);m.push(c);c=null;(H||l)&&this.stopDrawing();l&&2<=E&&this.startDrawing();mxEvent.consume(I)}}),D=new mxCell;D.edge=!0;var B=function(){var I=b.getCurrentCellStyle(D);I=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(I,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==
-I&&(I=b.shapeForegroundColor);return I};this.createStyle=function(I){var E=";fillColor=none;";O&&(E=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+I+E};this.stopDrawing=function(){if(0<m.length){if(O){for(var I=[],E=0;E<v.length;E++)null!=v[E]&&I.push([v[E].x,v[E].y]);I=PerfectFreehand.getStroke(I,L);v=[];for(E=0;E<I.length;E++)v.push({x:I[E][0],y:I[E][1]});v.push(null)}I=v[0].x;var H=v[0].x,R=v[0].y,W=v[0].y;for(E=1;E<v.length;E++)null!=v[E]&&(I=Math.max(I,v[E].x),H=Math.min(H,v[E].x),R=Math.max(R,
-v[E].y),W=Math.min(W,v[E].y));I-=H;R-=W;if(0<I&&0<R){var J=100/I,V=100/R;v.map(function(K){if(null==K)return K;K.x=(K.x-H)*J;K.y=(K.y-W)*V;return K});var U='<shape strokewidth="inherit"><foreground>',X=0;for(E=0;E<v.length;E++){var t=v[E];if(null==t){t=!1;X=v[X];var F=v[E-1];!g&&k&&(t=X.x-F.x,F=X.y-F.y,t=Math.sqrt(t*t+F*F)<=b.tolerance);if(g||t)U+='<line x="'+X.x.toFixed(2)+'" y="'+X.y.toFixed(2)+'"/>';U+="</path>"+(q||g||t?"<fillstroke/>":"<stroke/>");X=E+1}else U=E==X?U+('<path><move x="'+t.x.toFixed(2)+
-'" y="'+t.y.toFixed(2)+'"/>'):U+('<line x="'+t.x.toFixed(2)+'" y="'+t.y.toFixed(2)+'"/>')}U+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){E=this.createStyle("stencil("+Graph.compress(U)+")");U=b.view.scale;X=b.view.translate;E=new mxCell("",new mxGeometry(H/U-X.x,W/U-X.y,I/U,R/U),E);E.vertex=1;b.model.beginUpdate();try{E=b.addCell(E),b.fireEvent(new mxEventObject("cellsInserted","cells",[E])),b.fireEvent(new mxEventObject("freehandInserted","cell",E))}finally{b.model.endUpdate()}A&&
-b.setSelectionCells([E])}}for(E=0;E<m.length;E++)m[E].parentNode.removeChild(m[E]);c=null;m=[];v=[]}M(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,E){I=E.getProperty("eventName");E=E.getProperty("event");I==mxEvent.MOUSE_MOVE&&y&&(null!=E.sourceState&&E.sourceState.setCursor("crosshair"),E.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(I,E){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(I=E.getEvent(),y&&!mxEvent.isPopupTrigger(I)&&!mxEvent.isMultiTouchEvent(I))){var H=
+this.startDrawing=function(){M(!0)};this.isDrawing=function(){return y};var u=mxUtils.bind(this,function(I){if(c){var F=d.length,H=z&&0<v.length&&null!=d&&2>d.length;H||v.push.apply(v,d);d=[];v.push(null);m.push(c);c=null;(H||l)&&this.stopDrawing();l&&2<=F&&this.startDrawing();mxEvent.consume(I)}}),D=new mxCell;D.edge=!0;var B=function(){var I=b.getCurrentCellStyle(D);I=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(I,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==
+I&&(I=b.shapeForegroundColor);return I};this.createStyle=function(I){var F=";fillColor=none;";O&&(F=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+I+F};this.stopDrawing=function(){if(0<m.length){if(O){for(var I=[],F=0;F<v.length;F++)null!=v[F]&&I.push([v[F].x,v[F].y]);I=PerfectFreehand.getStroke(I,L);v=[];for(F=0;F<I.length;F++)v.push({x:I[F][0],y:I[F][1]});v.push(null)}I=v[0].x;var H=v[0].x,R=v[0].y,W=v[0].y;for(F=1;F<v.length;F++)null!=v[F]&&(I=Math.max(I,v[F].x),H=Math.min(H,v[F].x),R=Math.max(R,
+v[F].y),W=Math.min(W,v[F].y));I-=H;R-=W;if(0<I&&0<R){var J=100/I,V=100/R;v.map(function(K){if(null==K)return K;K.x=(K.x-H)*J;K.y=(K.y-W)*V;return K});var U='<shape strokewidth="inherit"><foreground>',X=0;for(F=0;F<v.length;F++){var t=v[F];if(null==t){t=!1;X=v[X];var E=v[F-1];!g&&k&&(t=X.x-E.x,E=X.y-E.y,t=Math.sqrt(t*t+E*E)<=b.tolerance);if(g||t)U+='<line x="'+X.x.toFixed(2)+'" y="'+X.y.toFixed(2)+'"/>';U+="</path>"+(q||g||t?"<fillstroke/>":"<stroke/>");X=F+1}else U=F==X?U+('<path><move x="'+t.x.toFixed(2)+
+'" y="'+t.y.toFixed(2)+'"/>'):U+('<line x="'+t.x.toFixed(2)+'" y="'+t.y.toFixed(2)+'"/>')}U+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){F=this.createStyle("stencil("+Graph.compress(U)+")");U=b.view.scale;X=b.view.translate;F=new mxCell("",new mxGeometry(H/U-X.x,W/U-X.y,I/U,R/U),F);F.vertex=1;b.model.beginUpdate();try{F=b.addCell(F),b.fireEvent(new mxEventObject("cellsInserted","cells",[F])),b.fireEvent(new mxEventObject("freehandInserted","cell",F))}finally{b.model.endUpdate()}A&&
+b.setSelectionCells([F])}}for(F=0;F<m.length;F++)m[F].parentNode.removeChild(m[F]);c=null;m=[];v=[]}M(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,F){I=F.getProperty("eventName");F=F.getProperty("event");I==mxEvent.MOUSE_MOVE&&y&&(null!=F.sourceState&&F.sourceState.setCursor("crosshair"),F.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(I,F){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(I=F.getEvent(),y&&!mxEvent.isPopupTrigger(I)&&!mxEvent.isMultiTouchEvent(I))){var H=
parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);H=Math.max(1,H*b.view.scale);var R=B();c=document.createElementNS("http://www.w3.org/2000/svg","path");c.setAttribute("fill",O?R:"none");c.setAttribute("stroke",R);c.setAttribute("stroke-width",H);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(R=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",R=R.split(" ").map(function(W){return parseFloat(W)*H}).join(" "),c.setAttribute("stroke-dasharray",R));x=[];I=C(I);G(I);
-n="M"+I.x+" "+I.y;v.push(I);d=[];c.setAttribute("d",O?PerfectFreehand.getSvgPathFromStroke([[I.x,I.y]],L):n);e.appendChild(c);E.consume()}}),mouseMove:mxUtils.bind(this,function(I,E){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){I=E.getEvent();I=C(I);G(I);var H=N(0);if(H)if(v.push(H),O){var R=[];for(H=0;H<v.length;H++)R.push([v[H].x,v[H].y]);d=[];for(var W=2;W<x.length;W+=2)H=N(W),R.push([H.x,H.y]),d.push(H);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(R,L))}else{n+=" L"+
-H.x+" "+H.y;R="";d=[];for(W=2;W<x.length;W+=2)H=N(W),R+=" L"+H.x+" "+H.y,d.push(H);c.setAttribute("d",n+R)}p&&(H=b.view.translate,b.scrollRectToVisible((new mxRectangle(I.x-H.x,I.y-H.y)).grow(20)));E.consume()}}),mouseUp:mxUtils.bind(this,function(I,E){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(u(E.getEvent()),E.consume())})});var C=function(I){return mxUtils.convertPoint(b.container,mxEvent.getClientX(I),mxEvent.getClientY(I))},G=function(I){for(x.push(I);x.length>f;)x.shift()},N=
-function(I){var E=x.length;if(1===E%2||E>=f){var H=0,R=0,W,J=0;for(W=I;W<E;W++)J++,I=x[W],H+=I.x,R+=I.y;return{x:H/J,y:R/J}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(J,V){if(!N){var U=e.file.getCurrentUser();if(G&&null!=U&&null!=U.email&&(V=JSON.stringify({from:u,id:z,type:J,sessionId:e.clientId,userId:U.id,username:U.displayName,data:V,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION}),I&&"cursor"!=J&&EditorUi.debug("P2PCollab: sending to socket server",[V]),z++,J=!I&&("cursor"==J||"selectionChange"==J),C&&!J&&W("message",V),J))for(p2pId in B)B[p2pId].send(V)}}function m(J){if(b.shareCursorPosition&&!l.isMouseDown){var V=
+n="M"+I.x+" "+I.y;v.push(I);d=[];c.setAttribute("d",O?PerfectFreehand.getSvgPathFromStroke([[I.x,I.y]],L):n);e.appendChild(c);F.consume()}}),mouseMove:mxUtils.bind(this,function(I,F){if(c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){I=F.getEvent();I=C(I);G(I);var H=N(0);if(H)if(v.push(H),O){var R=[];for(H=0;H<v.length;H++)R.push([v[H].x,v[H].y]);d=[];for(var W=2;W<x.length;W+=2)H=N(W),R.push([H.x,H.y]),d.push(H);c.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(R,L))}else{n+=" L"+
+H.x+" "+H.y;R="";d=[];for(W=2;W<x.length;W+=2)H=N(W),R+=" L"+H.x+" "+H.y,d.push(H);c.setAttribute("d",n+R)}p&&(H=b.view.translate,b.scrollRectToVisible((new mxRectangle(I.x-H.x,I.y-H.y)).grow(20)));F.consume()}}),mouseUp:mxUtils.bind(this,function(I,F){c&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(u(F.getEvent()),F.consume())})});var C=function(I){return mxUtils.convertPoint(b.container,mxEvent.getClientX(I),mxEvent.getClientY(I))},G=function(I){for(x.push(I);x.length>f;)x.shift()},N=
+function(I){var F=x.length;if(1===F%2||F>=f){var H=0,R=0,W,J=0;for(W=I;W<F;W++)J++,I=x[W],H+=I.x,R+=I.y;return{x:H/J,y:R/J}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;function P2PCollab(b,e,f){function c(J,V){if(!N){var U=e.file.getCurrentUser();if(G&&null!=U&&null!=U.email&&(V=JSON.stringify({from:u,id:z,type:J,sessionId:e.clientId,userId:U.id,username:U.displayName,data:V,protocol:DrawioFileSync.PROTOCOL,editor:EditorUi.VERSION}),I&&"cursor"!=J&&EditorUi.debug("P2PCollab: sending to socket server",[V]),z++,J=!I&&("cursor"==J||"selectionChange"==J),C&&!J&&W("message",V),J))for(p2pId in B)B[p2pId].send(V)}}function m(J){if(b.shareCursorPosition&&!l.isMouseDown){var V=
mxUtils.getOffset(l.container),U=l.view.translate,X=l.view.scale,t=null!=b.currentPage?b.currentPage.getId():null;c("cursor",{pageId:t,x:Math.round((J.getX()-V.x+l.container.scrollLeft)/X-U.x),y:Math.round((J.getY()-V.y+l.container.scrollTop)/X-U.y)})}}function n(J,V){var U=null!=b.currentPage?b.currentPage.getId():null;if(null!=J&&null!=J.cursor&&null!=J.lastCursor)if(null!=J.lastCursor.hide||!b.isShowRemoteCursors()||null!=J.lastCursor.pageId&&J.lastCursor.pageId!=U)J.cursor.style.display="none";
-else{U=function(){var P=Math.max(l.container.scrollLeft,Math.min(l.container.scrollLeft+l.container.clientWidth-J.cursor.clientWidth,F)),Q=Math.max(l.container.scrollTop-22,Math.min(l.container.scrollTop+l.container.clientHeight-J.cursor.clientHeight,K));T.style.opacity=P!=F||Q!=K?0:1;J.cursor.style.left=P+"px";J.cursor.style.top=Q+"px";J.cursor.style.display=""};var X=l.view.translate,t=l.view.scale,F=(X.x+J.lastCursor.x)*t+8,K=(X.y+J.lastCursor.y)*t-12,T=J.cursor.getElementsByTagName("img")[0];
-V?(mxUtils.setPrefixedStyle(J.cursor.style,"transition","all 600ms ease-out"),mxUtils.setPrefixedStyle(T.style,"transition","all 600ms ease-out"),window.setTimeout(U,0)):(mxUtils.setPrefixedStyle(J.cursor.style,"transition",null),mxUtils.setPrefixedStyle(T.style,"transition",null),U())}}function v(J,V){function U(){if(null==y[t]){var Y=M[t];null==Y&&(Y=p%x.length,M[t]=Y,p++);var ca=x[Y];Y=11<Y?"black":"white";y[t]={cursor:document.createElement("div"),color:ca,selection:{}};L[V]=t;F=y[t].cursor;F.style.pointerEvents=
-"none";F.style.position="absolute";F.style.display="none";F.style.opacity="0.9";F.style.zIndex=5E3;var da=document.createElement("img");mxUtils.setPrefixedStyle(da.style,"transform","rotate(-45deg)translateX(-14px)");da.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+ca+'" fill="'+ca+'"/>').src);da.style.width="10px";F.appendChild(da);da=document.createElement("div");da.style.backgroundColor=ca;da.style.color=Y;da.style.fontSize="9pt";da.style.padding=
-"3px 7px";da.style.marginTop="8px";da.style.borderRadius="10px";da.style.maxWidth="100px";da.style.overflow="hidden";da.style.textOverflow="ellipsis";da.style.whiteSpace="nowrap";mxUtils.write(da,X);F.appendChild(da);b.diagramContainer.appendChild(F)}else F=y[t].cursor;K=y[t].selection}if(!N){J=JSON.parse(J);I&&"cursor"!=J.type&&EditorUi.debug("P2PCollab: msg received",[J]);if(null!=V){if(J.from==u||A[J.from]>=J.id){EditorUi.debug("P2PCollab: Dropped Message",J,u,A[J.from]);return}A[J.from]=J.id}var X=
-J.username?J.username:"Anonymous",t=J.sessionId,F,K;null!=y[t]&&(clearTimeout(y[t].inactiveTO),y[t].inactiveTO=setTimeout(function(){g(null,t)},12E4));var T=J.data;switch(J.type){case "cursor":U();y[t].lastCursor=T;n(y[t],!0);break;case "diff":try{J=e.stringToObject(decodeURIComponent(T.patch)),e.receiveRemoteChanges(J.d)}catch(Y){EditorUi.debug("P2PCollab: Diff msg error",Y)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var P=null!=b.currentPage?b.currentPage.getId():null;if(null==
+else{U=function(){var P=Math.max(l.container.scrollLeft,Math.min(l.container.scrollLeft+l.container.clientWidth-J.cursor.clientWidth,E)),Q=Math.max(l.container.scrollTop-22,Math.min(l.container.scrollTop+l.container.clientHeight-J.cursor.clientHeight,K));T.style.opacity=P!=E||Q!=K?0:1;J.cursor.style.left=P+"px";J.cursor.style.top=Q+"px";J.cursor.style.display=""};var X=l.view.translate,t=l.view.scale,E=(X.x+J.lastCursor.x)*t+8,K=(X.y+J.lastCursor.y)*t-12,T=J.cursor.getElementsByTagName("img")[0];
+V?(mxUtils.setPrefixedStyle(J.cursor.style,"transition","all 600ms ease-out"),mxUtils.setPrefixedStyle(T.style,"transition","all 600ms ease-out"),window.setTimeout(U,0)):(mxUtils.setPrefixedStyle(J.cursor.style,"transition",null),mxUtils.setPrefixedStyle(T.style,"transition",null),U())}}function v(J,V){function U(){if(null==y[t]){var Y=M[t];null==Y&&(Y=p%x.length,M[t]=Y,p++);var ba=x[Y];Y=11<Y?"black":"white";y[t]={cursor:document.createElement("div"),color:ba,selection:{}};L[V]=t;E=y[t].cursor;E.style.pointerEvents=
+"none";E.style.position="absolute";E.style.display="none";E.style.opacity="0.9";E.style.zIndex=5E3;var da=document.createElement("img");mxUtils.setPrefixedStyle(da.style,"transform","rotate(-45deg)translateX(-14px)");da.setAttribute("src",Graph.createSvgImage(8,12,'<path d="M 4 0 L 8 12 L 4 10 L 0 12 Z" stroke="'+ba+'" fill="'+ba+'"/>').src);da.style.width="10px";E.appendChild(da);da=document.createElement("div");da.style.backgroundColor=ba;da.style.color=Y;da.style.fontSize="9pt";da.style.padding=
+"3px 7px";da.style.marginTop="8px";da.style.borderRadius="10px";da.style.maxWidth="100px";da.style.overflow="hidden";da.style.textOverflow="ellipsis";da.style.whiteSpace="nowrap";mxUtils.write(da,X);E.appendChild(da);b.diagramContainer.appendChild(E)}else E=y[t].cursor;K=y[t].selection}if(!N){J=JSON.parse(J);I&&"cursor"!=J.type&&EditorUi.debug("P2PCollab: msg received",[J]);if(null!=V){if(J.from==u||A[J.from]>=J.id){EditorUi.debug("P2PCollab: Dropped Message",J,u,A[J.from]);return}A[J.from]=J.id}var X=
+J.username?J.username:"Anonymous",t=J.sessionId,E,K;null!=y[t]&&(clearTimeout(y[t].inactiveTO),y[t].inactiveTO=setTimeout(function(){g(null,t)},12E4));var T=J.data;switch(J.type){case "cursor":U();y[t].lastCursor=T;n(y[t],!0);break;case "diff":try{J=e.stringToObject(decodeURIComponent(T.patch)),e.receiveRemoteChanges(J.d)}catch(Y){EditorUi.debug("P2PCollab: Diff msg error",Y)}break;case "selectionChange":if("0"!=urlParams["remote-selection"]){var P=null!=b.currentPage?b.currentPage.getId():null;if(null==
P||null!=T.pageId&&T.pageId==P){U();for(P=0;P<T.removed.length;P++){var Q=T.removed[P];if(null!=Q){var S=K[Q];delete K[Q];null!=S&&S.destroy()}}for(P=0;P<T.added.length;P++)Q=T.added[P],null!=Q&&(S=l.model.getCell(Q),null!=S&&(K[Q]=l.highlightCell(S,y[t].color,6E4,70,3)))}}}e.file.fireEvent(new mxEventObject("realtimeMessage","message",J))}}function d(J,V){if(!I&&SimplePeer.WEBRTC_SUPPORT){var U=new SimplePeer({initiator:V,config:{iceServers:[{urls:"stun:54.89.235.160:3478"}]}});U.on("signal",function(X){W("sendSignal",
{to:J,from:u,signal:X})});U.on("error",function(X){delete D[J];EditorUi.debug("P2PCollab: p2p socket error",X);!N&&V&&U.destroyed&&O[J]&&(EditorUi.debug("P2PCollab: p2p socket reconnecting",J),d(J,!0))});U.on("connect",function(){delete D[J];null==B[J]||B[J].destroyed?(B[J]=U,O[J]=!0,EditorUi.debug("P2PCollab: p2p socket connected",J)):(U.noP2PMapDel=!0,U.destroy(),EditorUi.debug("P2PCollab: p2p socket duplicate",J))});U.on("close",function(){U.noP2PMapDel||(EditorUi.debug("P2PCollab: p2p socket closed",
J),k(L[J]),delete B[J])});U.on("data",v);return D[J]=U}}function g(J,V){k(V||L[J]);null!=J&&(delete L[J],O[J]=!1)}function k(J){var V=y[J];if(null!=V){var U=V.selection,X;for(X in U)null!=U[X]&&U[X].destroy();null!=V.cursor&&null!=V.cursor.parentNode&&V.cursor.parentNode.removeChild(V.cursor);clearTimeout(V.inactiveTO);delete y[J]}}var l=b.editor.graph,p=0,q=null,x="#e6194b #3cb44b #4363d8 #f58231 #911eb4 #f032e6 #469990 #9A6324 #800000 #808000 #000075 #a9a9a9 #ffe119 #42d4f4 #bfef45 #fabed4 #dcbeff #fffac8 #aaffc3 #ffd8b1".split(" "),
-y={},z=1,A={},L={},O={},M={},u,D={},B={},C=!0,G=!1,N=!1,I="0"!=urlParams["no-p2p"],E=!1,H=0,R=null,W=mxUtils.bind(this,function(J,V){if(!N)try{null!=q?(q.send(JSON.stringify({action:J,msg:V})),I||EditorUi.debug("P2PCollab: sending to socket server",[J],[V])):this.joinFile(!0)}catch(U){R=U,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,U)}});this.sendMessage=c;this.sendDiff=function(J){this.sendMessage("diff",{patch:J})};this.getState=
-function(){return null!=q?q.readyState:3};this.getLastError=function(){return R};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(J,V){},mouseMove:function(J,V){var U,X=-1;return function(){clearTimeout(U);var t=this,F=arguments,K=function(){U=null;X=Date.now();J.apply(t,F)};Date.now()-X>V?K():U=setTimeout(K,V)}}(function(J,V){m(V)},200),mouseUp:function(J,V){m(V)}};l.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||
+y={},z=1,A={},L={},O={},M={},u,D={},B={},C=!0,G=!1,N=!1,I="0"!=urlParams["no-p2p"],F=!1,H=0,R=null,W=mxUtils.bind(this,function(J,V){if(!N)try{null!=q?(q.send(JSON.stringify({action:J,msg:V})),I||EditorUi.debug("P2PCollab: sending to socket server",[J],[V])):this.joinFile(!0)}catch(U){R=U,e.file.fireEvent(new mxEventObject("realtimeStateChanged")),EditorUi.debug("P2PCollab:","sendReply error",arguments,U)}});this.sendMessage=c;this.sendDiff=function(J){this.sendMessage("diff",{patch:J})};this.getState=
+function(){return null!=q?q.readyState:3};this.getLastError=function(){return R};this.mouseListeners={startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(J,V){},mouseMove:function(J,V){var U,X=-1;return function(){clearTimeout(U);var t=this,E=arguments,K=function(){U=null;X=Date.now();J.apply(t,E)};Date.now()-X>V?K():U=setTimeout(K,V)}}(function(J,V){m(V)},200),mouseUp:function(J,V){m(V)}};l.addMouseListener(this.mouseListeners);this.shareCursorPositionListener=function(){b.isShareCursorPosition()||
c("cursor",{hide:!0})};b.addListener("shareCursorPositionChanged",this.shareCursorPositionListener);this.selectionChangeListener=function(J,V){J=function(t){return null!=t?t.id:null};var U=null!=b.currentPage?b.currentPage.getId():null,X=V.getProperty("added");V=V.getProperty("removed");c("selectionChange",{pageId:U,removed:X?X.map(J):[],added:V?V.map(J):[]})};l.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionChangeListener);this.cursorHandler=mxUtils.bind(this,function(){for(var J in y)n(y[J])});
-mxEvent.addListener(l.container,"scroll",this.cursorHandler);l.getView().addListener(mxEvent.SCALE,this.cursorHandler);l.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);l.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(J){if(!N)try{E&&(EditorUi.debug("P2PCollab: joinInProgress on",E),R="busy");E=++H;try{null!=q&&(EditorUi.debug("P2PCollab: force closing socket on",
-q.joinId),q.close(1E3),q=null)}catch(X){EditorUi.debug("P2PCollab: closing socket error",X)}var V=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);V.addEventListener("open",function(X){q=V;q.joinId=E;E=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",q.joinId);J&&e.scheduleCleanup()});V.addEventListener("message",mxUtils.bind(this,function(X){I||EditorUi.debug("P2PCollab: msg received",[X]);var t=JSON.parse(X.data);I&&"message"!=t.action&&EditorUi.debug("P2PCollab: msg received",
+mxEvent.addListener(l.container,"scroll",this.cursorHandler);l.getView().addListener(mxEvent.SCALE,this.cursorHandler);l.getView().addListener(mxEvent.TRANSLATE,this.cursorHandler);l.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.cursorHandler);b.addListener("showRemoteCursorsChanged",this.cursorHandler);b.editor.addListener("pageSelected",this.cursorHandler);this.joinFile=function(J){if(!N)try{F&&(EditorUi.debug("P2PCollab: joinInProgress on",F),R="busy");F=++H;try{null!=q&&(EditorUi.debug("P2PCollab: force closing socket on",
+q.joinId),q.close(1E3),q=null)}catch(X){EditorUi.debug("P2PCollab: closing socket error",X)}var V=new WebSocket(window.RT_WEBSOCKET_URL+"?id="+f);V.addEventListener("open",function(X){q=V;q.joinId=F;F=!1;e.file.fireEvent(new mxEventObject("realtimeStateChanged"));EditorUi.debug("P2PCollab: open socket",q.joinId);J&&e.scheduleCleanup()});V.addEventListener("message",mxUtils.bind(this,function(X){I||EditorUi.debug("P2PCollab: msg received",[X]);var t=JSON.parse(X.data);I&&"message"!=t.action&&EditorUi.debug("P2PCollab: msg received",
[X]);switch(t.action){case "message":v(t.msg,t.from);break;case "clientsList":X=t.msg;u=X.cId;G=!0;for(t=0;t<X.list.length;t++)d(X.list[t],!0);break;case "signal":X=t.msg;I||(D[X.from]?t=D[X.from]:(t=d(X.from,!1),C=!0),t.signal(X.signal));break;case "newClient":C=!0;break;case "clientLeft":g(t.msg);break;case "sendSignalFailed":X=t.msg,EditorUi.debug("P2PCollab: signal failed (socket not found on server)",X),delete D[X.to],O[X.to]=!1}}));var U=!1;V.addEventListener("close",mxUtils.bind(this,function(X){EditorUi.debug("P2PCollab: WebSocket closed",
-V.joinId,"reconnecting",X.code,X.reason);EditorUi.debug("P2PCollab: closing socket on",V.joinId);N||1E3==X.code||H!=V.joinId||(E==H&&(EditorUi.debug("P2PCollab: joinInProgress in close on",V.joinId),E=!1),U||(EditorUi.debug("P2PCollab: calling rejoin on",V.joinId),U=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));V.addEventListener("error",mxUtils.bind(this,function(X){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",X);EditorUi.debug("P2PCollab: error socket on",
-V.joinId);N||H!=V.joinId||(E==H&&(EditorUi.debug("P2PCollab: joinInProgress in error on",V.joinId),E=!1),U||(EditorUi.debug("P2PCollab: calling rejoin on",V.joinId),U=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(X){R=X,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!N){EditorUi.debug("P2PCollab: destroyed");N=!0;for(sessionId in y)k(sessionId);null!=
+V.joinId,"reconnecting",X.code,X.reason);EditorUi.debug("P2PCollab: closing socket on",V.joinId);N||1E3==X.code||H!=V.joinId||(F==H&&(EditorUi.debug("P2PCollab: joinInProgress in close on",V.joinId),F=!1),U||(EditorUi.debug("P2PCollab: calling rejoin on",V.joinId),U=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));V.addEventListener("error",mxUtils.bind(this,function(X){EditorUi.debug("P2PCollab: WebSocket error, reconnecting",X);EditorUi.debug("P2PCollab: error socket on",
+V.joinId);N||H!=V.joinId||(F==H&&(EditorUi.debug("P2PCollab: joinInProgress in error on",V.joinId),F=!1),U||(EditorUi.debug("P2PCollab: calling rejoin on",V.joinId),U=!0,this.joinFile(!0)));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}));e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}catch(X){R=X,e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}};this.destroy=function(){if(!N){EditorUi.debug("P2PCollab: destroyed");N=!0;for(sessionId in y)k(sessionId);null!=
this.mouseListeners&&l.removeMouseListener(this.mouseListeners);null!=this.selectionChangeListener&&l.getSelectionModel().removeListener(this.selectionChangeListener);null!=this.shareCursorPositionListener&&b.removeListener(this.shareCursorPositionListener);null!=this.cursorHandler&&(mxEvent.removeListener(l.container,"scroll",this.cursorHandler),l.getView().removeListener(mxEvent.SCALE,this.cursorHandler),l.getView().removeListener(mxEvent.TRANSLATE,this.cursorHandler),l.getView().removeListener(mxEvent.SCALE_AND_TRANSLATE,
this.cursorHandler),b.editor.removeListener("pageSelected",this.cursorHandler),b.removeListener(this.cursorHandler));null!=q&&(q.close(1E3),q=null);for(var J in B)null!=B[J]&&B[J].destroy();e.file.fireEvent(new mxEventObject("realtimeStateChanged"))}}};
diff --git a/src/main/webapp/js/diagramly/Editor.js b/src/main/webapp/js/diagramly/Editor.js
index 3df7b5bb..c30147e3 100644
--- a/src/main/webapp/js/diagramly/Editor.js
+++ b/src/main/webapp/js/diagramly/Editor.js
@@ -689,6 +689,10 @@
'#\n' +
'# height: auto\n' +
'#\n' +
+ '## Collapsed state for vertices. Possible values are true or false. Default is false.\n' +
+ '#\n' +
+ '# collapsed: false\n' +
+ '#\n' +
'## Padding for autosize. Default is 0.\n' +
'#\n' +
'# padding: -12\n' +
diff --git a/src/main/webapp/js/diagramly/EditorUi.js b/src/main/webapp/js/diagramly/EditorUi.js
index fc47c191..189a02e8 100644
--- a/src/main/webapp/js/diagramly/EditorUi.js
+++ b/src/main/webapp/js/diagramly/EditorUi.js
@@ -13314,6 +13314,7 @@
var namespace = '';
var width = 'auto';
var height = 'auto';
+ var collapsed = false;
var left = null;
var top = null;
var edgespacing = 40;
@@ -13440,6 +13441,10 @@
{
height = value;
}
+ else if (key == 'collapsed' && value != '-')
+ {
+ collapsed = value == 'true';
+ }
else if (key == 'left' && value.length > 0)
{
left = value;
@@ -13560,44 +13565,59 @@
cell = graph.model.getCell(id);
}
- var exists = cell != null;
var newCell = new mxCell(label, new mxGeometry(x0, y,
0, 0), style || 'whiteSpace=wrap;html=1;');
- newCell.vertex = true;
+ newCell.collapsed = collapsed;
+ newCell.vertex = true;
newCell.id = id;
-
- var targetCell = (cell != null) ? cell : newCell;
+
+ if (cell != null)
+ {
+ graph.model.setCollapsed(cell, collapsed);
+ }
for (var j = 0; j < values.length; j++)
{
- graph.setAttributeForCell(targetCell, attribs[j], values[j]);
+ graph.setAttributeForCell(newCell, attribs[j], values[j]);
+
+ if (cell != null)
+ {
+ graph.setAttributeForCell(cell, attribs[j], values[j]);
+ }
}
if (labelname != null && labels != null)
{
- var tempLabel = labels[targetCell.getAttribute(labelname)];
+ var tempLabel = labels[newCell.getAttribute(labelname)];
if (tempLabel != null)
{
- graph.labelChanged(targetCell, tempLabel);
+ graph.labelChanged(newCell, tempLabel);
+
+ if (cell != null)
+ {
+ graph.cellLabelChanged(cell, tempLabel);
+ }
}
}
if (stylename != null && styles != null)
{
- var tempStyle = styles[targetCell.getAttribute(stylename)];
+ var tempStyle = styles[newCell.getAttribute(stylename)];
if (tempStyle != null)
{
- targetCell.style = tempStyle;
+ newCell.style = tempStyle;
}
}
- graph.setAttributeForCell(targetCell, 'placeholders', '1');
- targetCell.style = graph.replacePlaceholders(targetCell, targetCell.style, vars);
+ graph.setAttributeForCell(newCell, 'placeholders', '1');
+ newCell.style = graph.replacePlaceholders(newCell, newCell.style, vars);
- if (exists)
+ if (cell != null)
{
+ graph.model.setStyle(cell, newCell.style);
+
if (mxUtils.indexOf(cells, cell) < 0)
{
cells.push(cell);
@@ -13610,6 +13630,7 @@
graph.fireEvent(new mxEventObject('cellsInserted', 'cells', [newCell]));
}
+ var exists = cell != null;
cell = newCell;
if (!exists)
diff --git a/src/main/webapp/js/diagramly/ElectronApp.js b/src/main/webapp/js/diagramly/ElectronApp.js
index 48ea3a13..4b426919 100644
--- a/src/main/webapp/js/diagramly/ElectronApp.js
+++ b/src/main/webapp/js/diagramly/ElectronApp.js
@@ -310,25 +310,19 @@ mxStencilRegistry.allowEval = false;
var editorUi = this;
var graph = this.editor.graph;
- window.__emt_isModified = function()
+ electron.registerMsgListener('isModified', () =>
{
- if (editorUi.getCurrentFile())
- {
- return editorUi.getCurrentFile().isModified()
- }
+ const currentFile = editorUi.getCurrentFile();
+ let reply = {isModified: false, draftPath: null};
- return false
- };
-
- window.__emt_removeDraft = function()
- {
- var currentFile = editorUi.getCurrentFile();
-
- if (currentFile != null && EditorUi.enableDrafts)
+ if (currentFile != null)
{
- currentFile.removeDraft();
+ reply.isModified = currentFile.isModified();
+ reply.draftPath = EditorUi.enableDrafts && currentFile.fileObject? currentFile.fileObject.draftFileName : null;
}
- };
+
+ electron.sendMessage('isModified-result', reply);
+ });
// Adds support for libraries
this.actions.addAction('newLibrary...', mxUtils.bind(this, function()
diff --git a/src/main/webapp/js/extensions.min.js b/src/main/webapp/js/extensions.min.js
index 794fc0ed..548b1f48 100644
--- a/src/main/webapp/js/extensions.min.js
+++ b/src/main/webapp/js/extensions.min.js
@@ -1729,42 +1729,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
*/
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JSZip=e()}}(function(){return function s(a,o,h){function u(r,e){if(!o[r]){if(!a[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(l)return l(r,!0);var n=new Error("Cannot find module '"+r+"'");throw n.code="MODULE_NOT_FOUND",n}var i=o[r]={exports:{}};a[r][0].call(i.exports,function(e){var t=a[r][1][e];return u(t||e)},i,i.exports,s,a,o,h)}return o[r].exports}for(var l="function"==typeof require&&require,e=0;e<h.length;e++)u(h[e]);return u}({1:[function(e,t,r){"use strict";var d=e("./utils"),c=e("./support"),p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(e){for(var t,r,n,i,s,a,o,h=[],u=0,l=e.length,f=l,c="string"!==d.getTypeOf(e);u<e.length;)f=l-u,n=c?(t=e[u++],r=u<l?e[u++]:0,u<l?e[u++]:0):(t=e.charCodeAt(u++),r=u<l?e.charCodeAt(u++):0,u<l?e.charCodeAt(u++):0),i=t>>2,s=(3&t)<<4|r>>4,a=1<f?(15&r)<<2|n>>6:64,o=2<f?63&n:64,h.push(p.charAt(i)+p.charAt(s)+p.charAt(a)+p.charAt(o));return h.join("")},r.decode=function(e){var t,r,n,i,s,a,o=0,h=0,u="data:";if(e.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var l,f=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===p.charAt(64)&&f--,e.charAt(e.length-2)===p.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(l=c.uint8array?new Uint8Array(0|f):new Array(0|f);o<e.length;)t=p.indexOf(e.charAt(o++))<<2|(i=p.indexOf(e.charAt(o++)))>>4,r=(15&i)<<4|(s=p.indexOf(e.charAt(o++)))>>2,n=(3&s)<<6|(a=p.indexOf(e.charAt(o++))),l[h++]=t,64!==s&&(l[h++]=r),64!==a&&(l[h++]=n);return l}},{"./support":30,"./utils":32}],2:[function(e,t,r){"use strict";var n=e("./external"),i=e("./stream/DataWorker"),s=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function o(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}o.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(e,t,r){return e.pipe(new s).pipe(new a("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){"use strict";var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(e){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){"use strict";var n=e("./utils");var o=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a<s;a++)e=e>>>8^i[255&(e^t[a])];return-1^e}(0|t,e,e.length,0):function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a<s;a++)e=e>>>8^i[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){"use strict";var n=null;n="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),s=e("./utils"),a=e("./stream/GenericWorker"),o=n?"uint8array":"array";function h(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",s.inherits(h,a),h.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,e.data),!1)},h.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(e){return new h("Deflate",e)},r.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){"use strict";function A(e,t){var r,n="";for(r=0;r<t;r++)n+=String.fromCharCode(255&e),e>>>=8;return n}function n(e,t,r,n,i,s){var a,o,h=e.file,u=e.compression,l=s!==O.utf8encode,f=I.transformTo("string",s(h.name)),c=I.transformTo("string",O.utf8encode(h.name)),d=h.comment,p=I.transformTo("string",s(d)),m=I.transformTo("string",O.utf8encode(d)),_=c.length!==h.name.length,g=m.length!==d.length,b="",v="",y="",w=h.dir,k=h.date,x={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(x.crc32=e.crc32,x.compressedSize=e.compressedSize,x.uncompressedSize=e.uncompressedSize);var S=0;t&&(S|=8),l||!_&&!g||(S|=2048);var z=0,C=0;w&&(z|=16),"UNIX"===i?(C=798,z|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(h.unixPermissions,w)):(C=20,z|=function(e){return 63&(e||0)}(h.dosPermissions)),a=k.getUTCHours(),a<<=6,a|=k.getUTCMinutes(),a<<=5,a|=k.getUTCSeconds()/2,o=k.getUTCFullYear()-1980,o<<=4,o|=k.getUTCMonth()+1,o<<=5,o|=k.getUTCDate(),_&&(v=A(1,1)+A(B(f),4)+c,b+="up"+A(v.length,2)+v),g&&(y=A(1,1)+A(B(p),4)+m,b+="uc"+A(y.length,2)+y);var E="";return E+="\n\0",E+=A(S,2),E+=u.magic,E+=A(a,2),E+=A(o,2),E+=A(x.crc32,4),E+=A(x.compressedSize,4),E+=A(x.uncompressedSize,4),E+=A(f.length,2),E+=A(b.length,2),{fileRecord:R.LOCAL_FILE_HEADER+E+f+b,dirRecord:R.CENTRAL_FILE_HEADER+A(C,2)+E+A(p.length,2)+"\0\0\0\0"+A(z,4)+A(n,4)+f+b+p}}var I=e("../utils"),i=e("../stream/GenericWorker"),O=e("../utf8"),B=e("../crc32"),R=e("../signature");function s(e,t,r,n){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}I.inherits(s,i),s.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},s.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=n(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},s.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=n(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return R.DATA_DESCRIPTOR+A(e.crc32,4)+A(e.compressedSize,4)+A(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},s.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,n=function(e,t,r,n,i){var s=I.transformTo("string",i(n));return R.CENTRAL_DIRECTORY_END+"\0\0\0\0"+A(e,2)+A(e,2)+A(t,4)+A(r,4)+A(s.length,2)+s}(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})},s.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},s.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(e){t.error(e)}),this},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},s.prototype.error=function(e){var t=this._sources;if(!i.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch(e){}return!0},s.prototype.lock=function(){i.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=s},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){"use strict";var u=e("../compressions"),n=e("./ZipFileWorker");r.generateWorker=function(e,a,t){var o=new n(a.streamFiles,t,a.platform,a.encodeFileName),h=0;try{e.forEach(function(e,t){h++;var r=function(e,t){var r=e||t,n=u[r];if(!n)throw new Error(r+" is not a valid compression method !");return n}(t.options.compression,a.compression),n=t.options.compressionOptions||a.compressionOptions||{},i=t.dir,s=t.date;t._compressWorker(r,n).withStreamInfo("file",{name:e,dir:i,date:s,comment:t.comment||"",unixPermissions:t.unixPermissions,dosPermissions:t.dosPermissions}).pipe(o)}),o.entriesCount=h}catch(e){o.error(e)}return o}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(n.prototype=e("./object")).loadAsync=e("./load"),n.support=e("./support"),n.defaults=e("./defaults"),n.version="3.10.0",n.loadAsync=function(e,t){return(new n).loadAsync(e,t)},n.external=e("./external"),t.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,r){"use strict";var u=e("./utils"),i=e("./external"),n=e("./utf8"),s=e("./zipEntries"),a=e("./stream/Crc32Probe"),l=e("./nodejsUtils");function f(n){return new i.Promise(function(e,t){var r=n.decompressed.getContentWorker().pipe(new a);r.on("error",function(e){t(e)}).on("end",function(){r.streamInfo.crc32!==n.decompressed.crc32?t(new Error("Corrupted zip : CRC32 mismatch")):e()}).resume()})}t.exports=function(e,o){var h=this;return o=u.extend(o||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n.utf8decode}),l.isNode&&l.isStream(e)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):u.prepareContent("the loaded zip file",e,!0,o.optimizedBinaryString,o.base64).then(function(e){var t=new s(o);return t.load(e),t}).then(function(e){var t=[i.Promise.resolve(e)],r=e.files;if(o.checkCRC32)for(var n=0;n<r.length;n++)t.push(f(r[n]));return i.Promise.all(t)}).then(function(e){for(var t=e.shift(),r=t.files,n=0;n<r.length;n++){var i=r[n],s=i.fileNameStr,a=u.resolve(i.fileNameStr);h.file(a,i.decompressed,{binary:!0,optimizedBinaryString:!0,date:i.date,dir:i.dir,comment:i.fileCommentStr.length?i.fileCommentStr:null,unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions,createFolders:o.createFolders}),i.dir||(h.file(a).unsafeOriginalName=s)}return t.zipComment.length&&(h.comment=t.zipComment),h})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,r){"use strict";var n=e("../utils"),i=e("../stream/GenericWorker");function s(e,t){i.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}n.inherits(s,i),s.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",function(e){t.push({data:e,meta:{percent:0}})}).on("error",function(e){t.isPaused?this.generatedError=e:t.error(e)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})},s.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,r){"use strict";var i=e("readable-stream").Readable;function n(e,t,r){i.call(this,t),this._helper=e;var n=this;e.on("data",function(e,t){n.push(e)||n._helper.pause(),r&&r(t)}).on("error",function(e){n.emit("error",e)}).on("end",function(){n.push(null)})}e("../utils").inherits(n,i),n.prototype._read=function(){this._helper.resume()},t.exports=n},{"../utils":32,"readable-stream":16}],14:[function(e,t,r){"use strict";t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,r){"use strict";function s(e,t,r){var n,i=u.getTypeOf(t),s=u.extend(r||{},f);s.date=s.date||new Date,null!==s.compression&&(s.compression=s.compression.toUpperCase()),"string"==typeof s.unixPermissions&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(e=g(e)),s.createFolders&&(n=_(e))&&b.call(this,n,!0);var a="string"===i&&!1===s.binary&&!1===s.base64;r&&void 0!==r.binary||(s.binary=!a),(t instanceof c&&0===t.uncompressedSize||s.dir||!t||0===t.length)&&(s.base64=!1,s.binary=!0,t="",s.compression="STORE",i="string");var o=null;o=t instanceof c||t instanceof l?t:p.isNode&&p.isStream(t)?new m(e,t):u.prepareContent(e,t,s.binary,s.optimizedBinaryString,s.base64);var h=new d(e,o,s);this.files[e]=h}var i=e("./utf8"),u=e("./utils"),l=e("./stream/GenericWorker"),a=e("./stream/StreamHelper"),f=e("./defaults"),c=e("./compressedObject"),d=e("./zipObject"),o=e("./generate"),p=e("./nodejsUtils"),m=e("./nodejs/NodejsStreamInputAdapter"),_=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},g=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},b=function(e,t){return t=void 0!==t?t:f.createFolders,e=g(e),this.files[e]||s.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function h(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var n={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,n)},filter:function(r){var n=[];return this.forEach(function(e,t){r(e,t)&&n.push(t)}),n},file:function(e,t,r){if(1!==arguments.length)return e=this.root+e,s.call(this,e,t,r),this;if(h(e)){var n=e;return this.filter(function(e,t){return!t.dir&&n.test(e)})}var i=this.files[this.root+e];return i&&!i.dir?i:null},folder:function(r){if(!r)return this;if(h(r))return this.filter(function(e,t){return t.dir&&r.test(e)});var e=this.root+r,t=b.call(this,e),n=this.clone();return n.root=t.name,n},remove:function(r){r=this.root+r;var e=this.files[r];if(e||("/"!==r.slice(-1)&&(r+="/"),e=this.files[r]),e&&!e.dir)delete this.files[r];else for(var t=this.filter(function(e,t){return t.name.slice(0,r.length)===r}),n=0;n<t.length;n++)delete this.files[t[n].name];return this},generate:function(e){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if((r=u.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");u.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var n=r.comment||this.comment||"";t=o.generateWorker(this,r,n)}catch(e){(t=new l("error")).error(e)}return new a(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=n},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,r){t.exports=e("stream")},{stream:void 0}],17:[function(e,t,r){"use strict";var n=e("./DataReader");function i(e){n.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===t&&this.data[s+1]===r&&this.data[s+2]===n&&this.data[s+3]===i)return s-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),s=this.readData(4);return t===s[0]&&r===s[1]&&n===s[2]&&i===s[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],18:[function(e,t,r){"use strict";var n=e("../utils");function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(e){},readInt:function(e){var t,r=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,r){"use strict";var n=e("./Uint8ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){"use strict";var n=e("./DataReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){"use strict";var n=e("./ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){"use strict";var n=e("../utils"),i=e("../support"),s=e("./ArrayReader"),a=e("./StringReader"),o=e("./NodeBufferReader"),h=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new o(e):i.uint8array?new h(n.transformTo("uint8array",e)):new s(n.transformTo("array",e)):new a(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,r){"use strict";var n=e("./GenericWorker"),i=e("../utils");function s(e){n.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(s,n),s.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){"use strict";var n=e("./GenericWorker"),i=e("../crc32");function s(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(s,n),s.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(s,i),s.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}n.inherits(s,i),s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){"use strict";function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.end()}),e.on("error",function(e){t.error(e)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=n},{}],29:[function(e,t,r){"use strict";var h=e("../utils"),i=e("./ConvertWorker"),s=e("./GenericWorker"),u=e("../base64"),n=e("../support"),a=e("../external"),o=null;if(n.nodestream)try{o=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function l(e,o){return new a.Promise(function(t,r){var n=[],i=e._internalType,s=e._outputType,a=e._mimeType;e.on("data",function(e,t){n.push(e),o&&o(t)}).on("error",function(e){n=[],r(e)}).on("end",function(){try{var e=function(e,t,r){switch(e){case"blob":return h.newBlob(h.transformTo("arraybuffer",t),r);case"base64":return u.encode(t);default:return h.transformTo(e,t)}}(s,function(e,t){var r,n=0,i=null,s=0;for(r=0;r<t.length;r++)s+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(i=new Uint8Array(s),r=0;r<t.length;r++)i.set(t[r],n),n+=t[r].length;return i;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(i,n),a);t(e)}catch(e){r(e)}n=[]}).resume()})}function f(e,t,r){var n=t;switch(t){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string"}try{this._internalType=n,this._outputType=t,this._mimeType=r,h.checkSupport(n),this._worker=e.pipe(new i(n)),e.lock()}catch(e){this._worker=new s("error"),this._worker.error(e)}}f.prototype={accumulate:function(e){return l(this,e)},on:function(e,t){var r=this;return"data"===e?this._worker.on(e,function(e){t.call(r,e.data,e.meta)}):this._worker.on(e,function(){h.delay(t,arguments,r)}),this},resume:function(){return h.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(h.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new o(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=f},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,r){"use strict";if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof Buffer,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var n=new ArrayBuffer(0);try{r.blob=0===new Blob([n],{type:"application/zip"}).size}catch(e){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(n),r.blob=0===i.getBlob("application/zip").size}catch(e){r.blob=!1}}}try{r.nodestream=!!e("readable-stream").Readable}catch(e){r.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,s){"use strict";for(var o=e("./utils"),h=e("./support"),r=e("./nodejsUtils"),n=e("./stream/GenericWorker"),u=new Array(256),i=0;i<256;i++)u[i]=252<=i?6:248<=i?5:240<=i?4:224<=i?3:192<=i?2:1;u[254]=u[254]=1;function a(){n.call(this,"utf-8 decode"),this.leftOver=null}function l(){n.call(this,"utf-8 encode")}s.utf8encode=function(e){return h.nodebuffer?r.newBufferFrom(e,"utf-8"):function(e){var t,r,n,i,s,a=e.length,o=0;for(i=0;i<a;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),o+=r<128?1:r<2048?2:r<65536?3:4;for(t=h.uint8array?new Uint8Array(o):new Array(o),i=s=0;s<o;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t}(e)},s.utf8decode=function(e){return h.nodebuffer?o.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,n,i,s=e.length,a=new Array(2*s);for(t=r=0;t<s;)if((n=e[t++])<128)a[r++]=n;else if(4<(i=u[n]))a[r++]=65533,t+=i-1;else{for(n&=2===i?31:3===i?15:7;1<i&&t<s;)n=n<<6|63&e[t++],i--;1<i?a[r++]=65533:n<65536?a[r++]=n:(n-=65536,a[r++]=55296|n>>10&1023,a[r++]=56320|1023&n)}return a.length!==r&&(a.subarray?a=a.subarray(0,r):a.length=r),o.applyFromCharCode(a)}(e=o.transformTo(h.uint8array?"uint8array":"array",e))},o.inherits(a,n),a.prototype.processChunk=function(e){var t=o.transformTo(h.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(h.uint8array){var r=t;(t=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),t.set(r,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var n=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t}(t),i=t;n!==t.length&&(h.uint8array?(i=t.subarray(0,n),this.leftOver=t.subarray(n,t.length)):(i=t.slice(0,n),this.leftOver=t.slice(n,t.length))),this.push({data:s.utf8decode(i),meta:e.meta})},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=a,o.inherits(l,n),l.prototype.processChunk=function(e){this.push({data:s.utf8encode(e.data),meta:e.meta})},s.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,a){"use strict";var o=e("./support"),h=e("./base64"),r=e("./nodejsUtils"),u=e("./external");function n(e){return e}function l(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}e("setimmediate"),a.newBlob=function(t,r){a.checkSupport("blob");try{return new Blob([t],{type:r})}catch(e){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(t),n.getBlob(r)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var i={stringifyByChunk:function(e,t,r){var n=[],i=0,s=e.length;if(s<=r)return String.fromCharCode.apply(null,e);for(;i<s;)"array"===t||"nodebuffer"===t?n.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+r,s)))):n.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+r,s)))),i+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return o.nodebuffer&&1===String.fromCharCode.apply(null,r.allocBuffer(1)).length}catch(e){return!1}}()}};function s(e){var t=65536,r=a.getTypeOf(e),n=!0;if("uint8array"===r?n=i.applyCanBeUsed.uint8array:"nodebuffer"===r&&(n=i.applyCanBeUsed.nodebuffer),n)for(;1<t;)try{return i.stringifyByChunk(e,r,t)}catch(e){t=Math.floor(t/2)}return i.stringifyByChar(e)}function f(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}a.applyFromCharCode=s;var c={};c.string={string:n,array:function(e){return l(e,new Array(e.length))},arraybuffer:function(e){return c.string.uint8array(e).buffer},uint8array:function(e){return l(e,new Uint8Array(e.length))},nodebuffer:function(e){return l(e,r.allocBuffer(e.length))}},c.array={string:s,array:n,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return r.newBufferFrom(e)}},c.arraybuffer={string:function(e){return s(new Uint8Array(e))},array:function(e){return f(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:n,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return r.newBufferFrom(new Uint8Array(e))}},c.uint8array={string:s,array:function(e){return f(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:n,nodebuffer:function(e){return r.newBufferFrom(e)}},c.nodebuffer={string:s,array:function(e){return f(e,new Array(e.length))},arraybuffer:function(e){return c.nodebuffer.uint8array(e).buffer},uint8array:function(e){return f(e,new Uint8Array(e.length))},nodebuffer:n},a.transformTo=function(e,t){if(t=t||"",!e)return t;a.checkSupport(e);var r=a.getTypeOf(t);return c[r][e](t)},a.resolve=function(e){for(var t=e.split("/"),r=[],n=0;n<t.length;n++){var i=t[n];"."===i||""===i&&0!==n&&n!==t.length-1||(".."===i?r.pop():r.push(i))}return r.join("/")},a.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":o.nodebuffer&&r.isBuffer(e)?"nodebuffer":o.uint8array&&e instanceof Uint8Array?"uint8array":o.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},a.checkSupport=function(e){if(!o[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},a.MAX_VALUE_16BITS=65535,a.MAX_VALUE_32BITS=-1,a.pretty=function(e){var t,r,n="";for(r=0;r<(e||"").length;r++)n+="\\x"+((t=e.charCodeAt(r))<16?"0":"")+t.toString(16).toUpperCase();return n},a.delay=function(e,t,r){setImmediate(function(){e.apply(r||null,t||[])})},a.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r},a.extend=function(){var e,t,r={};for(e=0;e<arguments.length;e++)for(t in arguments[e])arguments[e].hasOwnProperty(t)&&void 0===r[t]&&(r[t]=arguments[e][t]);return r},a.prepareContent=function(r,e,n,i,s){return u.Promise.resolve(e).then(function(n){return o.blob&&(n instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(n)))&&"undefined"!=typeof FileReader?new u.Promise(function(t,r){var e=new FileReader;e.onload=function(e){t(e.target.result)},e.onerror=function(e){r(e.target.error)},e.readAsArrayBuffer(n)}):n}).then(function(e){var t=a.getTypeOf(e);return t?("arraybuffer"===t?e=a.transformTo("uint8array",e):"string"===t&&(s?e=h.decode(e):n&&!0!==i&&(e=function(e){return l(e,o.uint8array?new Uint8Array(e.length):new Array(e.length))}(e))),e):u.Promise.reject(new Error("Can't read the data of '"+r+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,r){"use strict";var n=e("./reader/readerFor"),i=e("./utils"),s=e("./signature"),a=e("./zipEntry"),o=(e("./utf8"),e("./support"));function h(e){this.files=[],this.loadOptions=e}h.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(t)+", expected "+i.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4)===t;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=o.uint8array?"uint8array":"array",r=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,r,n=this.zip64EndOfCentralSize-44;0<n;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(e=new a({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(e<0)throw!this.isSignature(0,s.LOCAL_FILE_HEADER)?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory");this.reader.setIndex(e);var t=e;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=t-r;if(0<n)this.isSignature(t,s.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=h},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){"use strict";var n=e("./reader/readerFor"),s=e("./utils"),i=e("./compressedObject"),a=e("./crc32"),o=e("./utf8"),h=e("./compressions"),u=e("./support");function l(e,t){this.options=e,this.loadOptions=t}l.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in h)if(h.hasOwnProperty(t)&&h[t].magic===e)return h[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new i(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=n(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<i;)t=e.readInt(2),r=e.readInt(2),n=e.readData(r),this.extraFields[t]={id:t,length:r,value:n};e.setIndex(i)},handleUTF8:function(){var e=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=o.utf8decode(this.fileName),this.fileCommentStr=o.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var r=s.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var i=s.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=n(e.value);return 1!==t.readInt(1)?null:a(this.fileName)!==t.readInt(4)?null:o.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=n(e.value);return 1!==t.readInt(1)?null:a(this.fileComment)!==t.readInt(4)?null:o.utf8decode(t.readData(e.length-5))}return null}},t.exports=l},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,r){"use strict";function n(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var s=e("./stream/StreamHelper"),i=e("./stream/DataWorker"),a=e("./utf8"),o=e("./compressedObject"),h=e("./stream/GenericWorker");n.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var n="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var i=!this._dataBinary;i&&!n&&(t=t.pipe(new a.Utf8EncodeWorker)),!i&&n&&(t=t.pipe(new a.Utf8DecodeWorker))}catch(e){(t=new h("error")).error(e)}return new s(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof o&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new a.Utf8EncodeWorker)),o.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof o?this._data.getContentWorker():this._data instanceof h?this._data:new i(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<u.length;f++)n.prototype[u[f]]=l;t.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,l,t){(function(t){"use strict";var r,n,e=t.MutationObserver||t.WebKitMutationObserver;if(e){var i=0,s=new e(u),a=t.document.createTextNode("");s.observe(a,{characterData:!0}),r=function(){a.data=i=++i%2}}else if(t.setImmediate||void 0===t.MessageChannel)r="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){u(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(u,0)};else{var o=new t.MessageChannel;o.port1.onmessage=u,r=function(){o.port2.postMessage(0)}}var h=[];function u(){var e,t;n=!0;for(var r=h.length;r;){for(t=h,h=[],e=-1;++e<r;)t[e]();r=h.length}n=!1}l.exports=function(e){1!==h.push(e)||n||r()}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,r){"use strict";var i=e("immediate");function u(){}var l={},s=["REJECTED"],a=["FULFILLED"],n=["PENDING"];function o(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=n,this.queue=[],this.outcome=void 0,e!==u&&d(this,e)}function h(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function f(t,r,n){i(function(){var e;try{e=r(n)}catch(e){return l.reject(t,e)}e===t?l.reject(t,new TypeError("Cannot resolve promise with itself")):l.resolve(t,e)})}function c(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function d(t,e){var r=!1;function n(e){r||(r=!0,l.reject(t,e))}function i(e){r||(r=!0,l.resolve(t,e))}var s=p(function(){e(i,n)});"error"===s.status&&n(s.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}(t.exports=o).prototype.finally=function(t){if("function"!=typeof t)return this;var r=this.constructor;return this.then(function(e){return r.resolve(t()).then(function(){return e})},function(e){return r.resolve(t()).then(function(){throw e})})},o.prototype.catch=function(e){return this.then(null,e)},o.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var r=new this.constructor(u);this.state!==n?f(r,this.state===a?e:t,this.outcome):this.queue.push(new h(r,e,t));return r},h.prototype.callFulfilled=function(e){l.resolve(this.promise,e)},h.prototype.otherCallFulfilled=function(e){f(this.promise,this.onFulfilled,e)},h.prototype.callRejected=function(e){l.reject(this.promise,e)},h.prototype.otherCallRejected=function(e){f(this.promise,this.onRejected,e)},l.resolve=function(e,t){var r=p(c,t);if("error"===r.status)return l.reject(e,r.value);var n=r.value;if(n)d(e,n);else{e.state=a,e.outcome=t;for(var i=-1,s=e.queue.length;++i<s;)e.queue[i].callFulfilled(t)}return e},l.reject=function(e,t){e.state=s,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},o.resolve=function(e){if(e instanceof this)return e;return l.resolve(new this(u),e)},o.reject=function(e){var t=new this(u);return l.reject(t,e)},o.all=function(e){var r=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,i=!1;if(!n)return this.resolve([]);var s=new Array(n),a=0,t=-1,o=new this(u);for(;++t<n;)h(e[t],t);return o;function h(e,t){r.resolve(e).then(function(e){s[t]=e,++a!==n||i||(i=!0,l.resolve(o,s))},function(e){i||(i=!0,l.reject(o,e))})}},o.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);var i=-1,s=new this(u);for(;++i<r;)a=e[i],t.resolve(a).then(function(e){n||(n=!0,l.resolve(s,e))},function(e){n||(n=!0,l.reject(s,e))});var a;return s}},{immediate:36}],38:[function(e,t,r){"use strict";var n={};(0,e("./lib/utils/common").assign)(n,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=n},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,r){"use strict";var a=e("./zlib/deflate"),o=e("./utils/common"),h=e("./utils/strings"),i=e("./zlib/messages"),s=e("./zlib/zstream"),u=Object.prototype.toString,l=0,f=-1,c=0,d=8;function p(e){if(!(this instanceof p))return new p(e);this.options=o.assign({level:f,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:c,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=a.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==l)throw new Error(i[r]);if(t.header&&a.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(n="string"==typeof t.dictionary?h.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=a.deflateSetDictionary(this.strm,n))!==l)throw new Error(i[r]);this._dict_set=!0}}function n(e,t){var r=new p(t);if(r.push(e,!0),r.err)throw r.msg||i[r.err];return r.result}p.prototype.push=function(e,t){var r,n,i=this.strm,s=this.options.chunkSize;if(this.ended)return!1;n=t===~~t?t:!0===t?4:0,"string"==typeof e?i.input=h.string2buf(e):"[object ArrayBuffer]"===u.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new o.Buf8(s),i.next_out=0,i.avail_out=s),1!==(r=a.deflate(i,n))&&r!==l)return this.onEnd(r),!(this.ended=!0);0!==i.avail_out&&(0!==i.avail_in||4!==n&&2!==n)||("string"===this.options.to?this.onData(h.buf2binstring(o.shrinkBuf(i.output,i.next_out))):this.onData(o.shrinkBuf(i.output,i.next_out)))}while((0<i.avail_in||0===i.avail_out)&&1!==r);return 4===n?(r=a.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===l):2!==n||(this.onEnd(l),!(i.avail_out=0))},p.prototype.onData=function(e){this.chunks.push(e)},p.prototype.onEnd=function(e){e===l&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Deflate=p,r.deflate=n,r.deflateRaw=function(e,t){return(t=t||{}).raw=!0,n(e,t)},r.gzip=function(e,t){return(t=t||{}).gzip=!0,n(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,r){"use strict";var c=e("./zlib/inflate"),d=e("./utils/common"),p=e("./utils/strings"),m=e("./zlib/constants"),n=e("./zlib/messages"),i=e("./zlib/zstream"),s=e("./zlib/gzheader"),_=Object.prototype.toString;function a(e){if(!(this instanceof a))return new a(e);this.options=d.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new i,this.strm.avail_out=0;var r=c.inflateInit2(this.strm,t.windowBits);if(r!==m.Z_OK)throw new Error(n[r]);this.header=new s,c.inflateGetHeader(this.strm,this.header)}function o(e,t){var r=new a(t);if(r.push(e,!0),r.err)throw r.msg||n[r.err];return r.result}a.prototype.push=function(e,t){var r,n,i,s,a,o,h=this.strm,u=this.options.chunkSize,l=this.options.dictionary,f=!1;if(this.ended)return!1;n=t===~~t?t:!0===t?m.Z_FINISH:m.Z_NO_FLUSH,"string"==typeof e?h.input=p.binstring2buf(e):"[object ArrayBuffer]"===_.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new d.Buf8(u),h.next_out=0,h.avail_out=u),(r=c.inflate(h,m.Z_NO_FLUSH))===m.Z_NEED_DICT&&l&&(o="string"==typeof l?p.string2buf(l):"[object ArrayBuffer]"===_.call(l)?new Uint8Array(l):l,r=c.inflateSetDictionary(this.strm,o)),r===m.Z_BUF_ERROR&&!0===f&&(r=m.Z_OK,f=!1),r!==m.Z_STREAM_END&&r!==m.Z_OK)return this.onEnd(r),!(this.ended=!0);h.next_out&&(0!==h.avail_out&&r!==m.Z_STREAM_END&&(0!==h.avail_in||n!==m.Z_FINISH&&n!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(i=p.utf8border(h.output,h.next_out),s=h.next_out-i,a=p.buf2string(h.output,i),h.next_out=s,h.avail_out=u-s,s&&d.arraySet(h.output,h.output,i,s,0),this.onData(a)):this.onData(d.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(f=!0)}while((0<h.avail_in||0===h.avail_out)&&r!==m.Z_STREAM_END);return r===m.Z_STREAM_END&&(n=m.Z_FINISH),n===m.Z_FINISH?(r=c.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===m.Z_OK):n!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),!(h.avail_out=0))},a.prototype.onData=function(e){this.chunks.push(e)},a.prototype.onEnd=function(e){e===m.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=d.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=a,r.inflate=o,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,o(e,t)},r.ungzip=o},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var s=0;s<n;s++)e[i+s]=t[r+s]},flattenChunks:function(e){var t,r,n,i,s,a;for(t=n=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),t=i=0,r=e.length;t<r;t++)s=e[t],a.set(s,i),i+=s.length;return a}},s={arraySet:function(e,t,r,n,i){for(var s=0;s<n;s++)e[i+s]=t[r+s]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,s))},r.setTyped(n)},{}],42:[function(e,t,r){"use strict";var h=e("./common"),i=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){s=!1}for(var u=new h.Buf8(256),n=0;n<256;n++)u[n]=252<=n?6:248<=n?5:240<=n?4:224<=n?3:192<=n?2:1;function l(e,t){if(t<65537&&(e.subarray&&s||!e.subarray&&i))return String.fromCharCode.apply(null,h.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}u[254]=u[254]=1,r.string2buf=function(e){var t,r,n,i,s,a=e.length,o=0;for(i=0;i<a;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),o+=r<128?1:r<2048?2:r<65536?3:4;for(t=new h.Buf8(o),i=s=0;s<o;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t},r.buf2binstring=function(e){return l(e,e.length)},r.binstring2buf=function(e){for(var t=new h.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,n,i,s,a=t||e.length,o=new Array(2*a);for(r=n=0;r<a;)if((i=e[r++])<128)o[n++]=i;else if(4<(s=u[i]))o[n++]=65533,r+=s-1;else{for(i&=2===s?31:3===s?15:7;1<s&&r<a;)i=i<<6|63&e[r++],s--;1<s?o[n++]=65533:i<65536?o[n++]=i:(i-=65536,o[n++]=55296|i>>10&1023,o[n++]=56320|1023&i)}return l(o,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){for(var i=65535&e|0,s=e>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3<r?2e3:r;s=s+(i=i+t[n++]|0)|0,--a;);i%=65521,s%=65521}return i|s<<16|0}},{}],44:[function(e,t,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,r){"use strict";var o=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a<s;a++)e=e>>>8^i[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,r){"use strict";var h,c=e("../utils/common"),u=e("./trees"),d=e("./adler32"),p=e("./crc32"),n=e("./messages"),l=0,f=4,m=0,_=-2,g=-1,b=4,i=2,v=8,y=9,s=286,a=30,o=19,w=2*s+1,k=15,x=3,S=258,z=S+x+1,C=42,E=113,A=1,I=2,O=3,B=4;function R(e,t){return e.msg=n[t],t}function T(e){return(e<<1)-(4<e?9:0)}function D(e){for(var t=e.length;0<=--t;)e[t]=0}function F(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(c.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function N(e,t){u._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function U(e,t){e.pending_buf[e.pending++]=t}function P(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function L(e,t){var r,n,i=e.max_chain_length,s=e.strstart,a=e.prev_length,o=e.nice_match,h=e.strstart>e.w_size-z?e.strstart-(e.w_size-z):0,u=e.window,l=e.w_mask,f=e.prev,c=e.strstart+S,d=u[s+a-1],p=u[s+a];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do{if(u[(r=t)+a]===p&&u[r+a-1]===d&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&s<c);if(n=S-(c-s),s=c-S,a<n){if(e.match_start=t,o<=(a=n))break;d=u[s+a-1],p=u[s+a]}}}while((t=f[t&l])>h&&0!=--i);return a<=e.lookahead?a:e.lookahead}function j(e){var t,r,n,i,s,a,o,h,u,l,f=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-z)){for(c.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=r=e.hash_size;n=e.head[--t],e.head[t]=f<=n?n-f:0,--r;);for(t=r=f;n=e.prev[--t],e.prev[t]=f<=n?n-f:0,--r;);i+=f}if(0===e.strm.avail_in)break;if(a=e.strm,o=e.window,h=e.strstart+e.lookahead,u=i,l=void 0,l=a.avail_in,u<l&&(l=u),r=0===l?0:(a.avail_in-=l,c.arraySet(o,a.input,a.next_in,l,h),1===a.state.wrap?a.adler=d(a.adler,o,l,h):2===a.state.wrap&&(a.adler=p(a.adler,o,l,h)),a.next_in+=l,a.total_in+=l,l),e.lookahead+=r,e.lookahead+e.insert>=x)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+x-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<x)););}while(e.lookahead<z&&0!==e.strm.avail_in)}function Z(e,t){for(var r,n;;){if(e.lookahead<z){if(j(e),e.lookahead<z&&t===l)return A;if(0===e.lookahead)break}if(r=0,e.lookahead>=x&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-z&&(e.match_length=L(e,r)),e.match_length>=x)if(n=u._tr_tally(e,e.strstart-e.match_start,e.match_length-x),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=x){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=e.strstart<x-1?e.strstart:x-1,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}function W(e,t){for(var r,n,i;;){if(e.lookahead<z){if(j(e),e.lookahead<z&&t===l)return A;if(0===e.lookahead)break}if(r=0,e.lookahead>=x&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=x-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-z&&(e.match_length=L(e,r),e.match_length<=5&&(1===e.strategy||e.match_length===x&&4096<e.strstart-e.match_start)&&(e.match_length=x-1)),e.prev_length>=x&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-x,n=u._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-x),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=x-1,e.strstart++,n&&(N(e,!1),0===e.strm.avail_out))return A}else if(e.match_available){if((n=u._tr_tally(e,0,e.window[e.strstart-1]))&&N(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return A}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=u._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<x-1?e.strstart:x-1,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}function M(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function H(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=v,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new c.Buf16(2*w),this.dyn_dtree=new c.Buf16(2*(2*a+1)),this.bl_tree=new c.Buf16(2*(2*o+1)),D(this.dyn_ltree),D(this.dyn_dtree),D(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new c.Buf16(k+1),this.heap=new c.Buf16(2*s+1),D(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new c.Buf16(2*s+1),D(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function G(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=i,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?C:E,e.adler=2===t.wrap?0:1,t.last_flush=l,u._tr_init(t),m):R(e,_)}function K(e){var t=G(e);return t===m&&function(e){e.window_size=2*e.w_size,D(e.head),e.max_lazy_match=h[e.level].max_lazy,e.good_match=h[e.level].good_length,e.nice_match=h[e.level].nice_length,e.max_chain_length=h[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=x-1,e.match_available=0,e.ins_h=0}(e.state),t}function Y(e,t,r,n,i,s){if(!e)return _;var a=1;if(t===g&&(t=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),i<1||y<i||r!==v||n<8||15<n||t<0||9<t||s<0||b<s)return R(e,_);8===n&&(n=9);var o=new H;return(e.state=o).strm=e,o.wrap=a,o.gzhead=null,o.w_bits=n,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+x-1)/x),o.window=new c.Buf8(2*o.w_size),o.head=new c.Buf16(o.hash_size),o.prev=new c.Buf16(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new c.Buf8(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=t,o.strategy=s,o.method=r,K(e)}h=[new M(0,0,0,0,function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(j(e),0===e.lookahead&&t===l)return A;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,N(e,!1),0===e.strm.avail_out))return A;if(e.strstart-e.block_start>=e.w_size-z&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):(e.strstart>e.block_start&&(N(e,!1),e.strm.avail_out),A)}),new M(4,4,8,4,Z),new M(4,5,16,8,Z),new M(4,6,32,32,Z),new M(4,4,16,16,W),new M(8,16,32,32,W),new M(8,16,128,128,W),new M(8,32,128,256,W),new M(32,128,258,1024,W),new M(32,258,258,4096,W)],r.deflateInit=function(e,t){return Y(e,t,v,15,8,0)},r.deflateInit2=Y,r.deflateReset=K,r.deflateResetKeep=G,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?_:(e.state.gzhead=t,m):_},r.deflate=function(e,t){var r,n,i,s;if(!e||!e.state||5<t||t<0)return e?R(e,_):_;if(n=e.state,!e.output||!e.input&&0!==e.avail_in||666===n.status&&t!==f)return R(e,0===e.avail_out?-5:_);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===C)if(2===n.wrap)e.adler=0,U(n,31),U(n,139),U(n,8),n.gzhead?(U(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),U(n,255&n.gzhead.time),U(n,n.gzhead.time>>8&255),U(n,n.gzhead.time>>16&255),U(n,n.gzhead.time>>24&255),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(U(n,255&n.gzhead.extra.length),U(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=p(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(U(n,0),U(n,0),U(n,0),U(n,0),U(n,0),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,3),n.status=E);else{var a=v+(n.w_bits-8<<4)<<8;a|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(a|=32),a+=31-a%31,n.status=E,P(n,a),0!==n.strstart&&(P(n,e.adler>>>16),P(n,65535&e.adler)),e.adler=1}if(69===n.status)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending!==n.pending_buf_size));)U(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,U(n,s)}while(0!==s);n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,U(n,s)}while(0!==s);n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&F(e),n.pending+2<=n.pending_buf_size&&(U(n,255&e.adler),U(n,e.adler>>8&255),e.adler=0,n.status=E)):n.status=E),0!==n.pending){if(F(e),0===e.avail_out)return n.last_flush=-1,m}else if(0===e.avail_in&&T(t)<=T(r)&&t!==f)return R(e,-5);if(666===n.status&&0!==e.avail_in)return R(e,-5);if(0!==e.avail_in||0!==n.lookahead||t!==l&&666!==n.status){var o=2===n.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(j(e),0===e.lookahead)){if(t===l)return A;break}if(e.match_length=0,r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):3===n.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=S){if(j(e),e.lookahead<=S&&t===l)return A;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=x&&0<e.strstart&&(n=a[i=e.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=e.strstart+S;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<s);e.match_length=S-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=x?(r=u._tr_tally(e,1,e.match_length-x),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):h[n.level].func(n,t);if(o!==O&&o!==B||(n.status=666),o===A||o===O)return 0===e.avail_out&&(n.last_flush=-1),m;if(o===I&&(1===t?u._tr_align(n):5!==t&&(u._tr_stored_block(n,0,0,!1),3===t&&(D(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),F(e),0===e.avail_out))return n.last_flush=-1,m}return t!==f?m:n.wrap<=0?1:(2===n.wrap?(U(n,255&e.adler),U(n,e.adler>>8&255),U(n,e.adler>>16&255),U(n,e.adler>>24&255),U(n,255&e.total_in),U(n,e.total_in>>8&255),U(n,e.total_in>>16&255),U(n,e.total_in>>24&255)):(P(n,e.adler>>>16),P(n,65535&e.adler)),F(e),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?m:1)},r.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==C&&69!==t&&73!==t&&91!==t&&103!==t&&t!==E&&666!==t?R(e,_):(e.state=null,t===E?R(e,-3):m):_},r.deflateSetDictionary=function(e,t){var r,n,i,s,a,o,h,u,l=t.length;if(!e||!e.state)return _;if(2===(s=(r=e.state).wrap)||1===s&&r.status!==C||r.lookahead)return _;for(1===s&&(e.adler=d(e.adler,t,l,0)),r.wrap=0,l>=r.w_size&&(0===s&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new c.Buf8(r.w_size),c.arraySet(u,t,l-r.w_size,r.w_size,0),t=u,l=r.w_size),a=e.avail_in,o=e.next_in,h=e.input,e.avail_in=l,e.next_in=0,e.input=t,j(r);r.lookahead>=x;){for(n=r.strstart,i=r.lookahead-(x-1);r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+x-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++,--i;);r.strstart=n,r.lookahead=x-1,j(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=x-1,r.match_available=0,e.next_in=o,e.input=h,e.avail_in=a,r.wrap=s,m},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,r){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i,s,a,o,h,u,l,f,c,d,p,m,_,g,b,v,y,w,k,x,S,z,C;r=e.state,n=e.next_in,z=e.input,i=n+(e.avail_in-5),s=e.next_out,C=e.output,a=s-(t-e.avail_out),o=s+(e.avail_out-257),h=r.dmax,u=r.wsize,l=r.whave,f=r.wnext,c=r.window,d=r.hold,p=r.bits,m=r.lencode,_=r.distcode,g=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;e:do{p<15&&(d+=z[n++]<<p,p+=8,d+=z[n++]<<p,p+=8),v=m[d&g];t:for(;;){if(d>>>=y=v>>>24,p-=y,0===(y=v>>>16&255))C[s++]=65535&v;else{if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(d&(1<<y)-1)];continue t}if(32&y){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}w=65535&v,(y&=15)&&(p<y&&(d+=z[n++]<<p,p+=8),w+=d&(1<<y)-1,d>>>=y,p-=y),p<15&&(d+=z[n++]<<p,p+=8,d+=z[n++]<<p,p+=8),v=_[d&b];r:for(;;){if(d>>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(d&(1<<y)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(k=65535&v,p<(y&=15)&&(d+=z[n++]<<p,(p+=8)<y&&(d+=z[n++]<<p,p+=8)),h<(k+=d&(1<<y)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=y,p-=y,(y=s-a)<k){if(l<(y=k-y)&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(S=c,(x=0)===f){if(x+=u-y,y<w){for(w-=y;C[s++]=c[x++],--y;);x=s-k,S=C}}else if(f<y){if(x+=u+f-y,(y-=f)<w){for(w-=y;C[s++]=c[x++],--y;);if(x=0,f<w){for(w-=y=f;C[s++]=c[x++],--y;);x=s-k,S=C}}}else if(x+=f-y,y<w){for(w-=y;C[s++]=c[x++],--y;);x=s-k,S=C}for(;2<w;)C[s++]=S[x++],C[s++]=S[x++],C[s++]=S[x++],w-=3;w&&(C[s++]=S[x++],1<w&&(C[s++]=S[x++]))}else{for(x=s-k;C[s++]=C[x++],C[s++]=C[x++],C[s++]=C[x++],2<(w-=3););w&&(C[s++]=C[x++],1<w&&(C[s++]=C[x++]))}break}}break}}while(n<i&&s<o);n-=w=p>>3,d&=(1<<(p-=w<<3))-1,e.next_in=n,e.next_out=s,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=s<o?o-s+257:257-(s-o),r.hold=d,r.bits=p}},{}],49:[function(e,t,r){"use strict";var I=e("../utils/common"),O=e("./adler32"),B=e("./crc32"),R=e("./inffast"),T=e("./inftrees"),D=1,F=2,N=0,U=-2,P=1,n=852,i=592;function L(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function s(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=P,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new I.Buf32(n),t.distcode=t.distdyn=new I.Buf32(i),t.sane=1,t.back=-1,N):U}function o(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,a(e)):U}function h(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?U:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,o(e))):U}function u(e,t){var r,n;return e?(n=new s,(e.state=n).window=null,(r=h(e,t))!==N&&(e.state=null),r):U}var l,f,c=!0;function j(e){if(c){var t;for(l=new I.Buf32(512),f=new I.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(T(D,e.lens,0,288,l,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;T(F,e.lens,0,32,f,0,e.work,{bits:5}),c=!1}e.lencode=l,e.lenbits=9,e.distcode=f,e.distbits=5}function Z(e,t,r,n){var i,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new I.Buf8(s.wsize)),n>=s.wsize?(I.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(n<(i=s.wsize-s.wnext)&&(i=n),I.arraySet(s.window,t,r-n,i,s.wnext),(n-=i)?(I.arraySet(s.window,t,r-n,n,0),s.wnext=n,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0}r.inflateReset=o,r.inflateReset2=h,r.inflateResetKeep=a,r.inflateInit=function(e){return u(e,15)},r.inflateInit2=u,r.inflate=function(e,t){var r,n,i,s,a,o,h,u,l,f,c,d,p,m,_,g,b,v,y,w,k,x,S,z,C=0,E=new I.Buf8(4),A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return U;12===(r=e.state).mode&&(r.mode=13),a=e.next_out,i=e.output,h=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,u=r.hold,l=r.bits,f=o,c=h,x=N;e:for(;;)switch(r.mode){case P:if(0===r.wrap){r.mode=13;break}for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if(2&r.wrap&&35615===u){E[r.check=0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0),l=u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&u)){e.msg="unknown compression method",r.mode=30;break}if(l-=4,k=8+(15&(u>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<k,e.adler=r.check=1,r.mode=512&u?10:12,l=u=0;break;case 2:for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if(r.flags=u,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=u>>8&1),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=3;case 3:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}r.head&&(r.head.time=u),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=B(r.check,E,4,0)),l=u=0,r.mode=4;case 4:for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}r.head&&(r.head.xflags=255&u,r.head.os=u>>8),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=5;case 5:if(1024&r.flags){for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}r.length=u,r.head&&(r.head.extra_len=u),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(o<(d=r.length)&&(d=o),d&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),I.arraySet(r.head.extra,n,s,d,k)),512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,r.length-=d),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===o)break e;for(d=0;k=n[s+d++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k)),k&&d<o;);if(512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,k)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===o)break e;for(d=0;k=n[s+d++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k)),k&&d<o;);if(512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,k)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if(u!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}l=u=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}e.adler=r.check=L(u),l=u=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){u>>>=7&l,l-=7&l,r.mode=27;break}for(;l<3;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}switch(r.last=1&u,l-=1,3&(u>>>=1)){case 0:r.mode=14;break;case 1:if(j(r),r.mode=20,6!==t)break;u>>>=2,l-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if((65535&u)!=(u>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&u,l=u=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(d=r.length){if(o<d&&(d=o),h<d&&(d=h),0===d)break e;I.arraySet(i,n,s,d,a),o-=d,s+=d,h-=d,a+=d,r.length-=d;break}r.mode=12;break;case 17:for(;l<14;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if(r.nlen=257+(31&u),u>>>=5,l-=5,r.ndist=1+(31&u),u>>>=5,l-=5,r.ncode=4+(15&u),u>>>=4,l-=4,286<r.nlen||30<r.ndist){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;l<3;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}r.lens[A[r.have++]]=7&u,u>>>=3,l-=3}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},x=T(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;g=(C=r.lencode[u&(1<<r.lenbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if(b<16)u>>>=_,l-=_,r.lens[r.have++]=b;else{if(16===b){for(z=_+2;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if(u>>>=_,l-=_,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}k=r.lens[r.have-1],d=3+(3&u),u>>>=2,l-=2}else if(17===b){for(z=_+3;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}l-=_,k=0,d=3+(7&(u>>>=_)),u>>>=3,l-=3}else{for(z=_+7;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}l-=_,k=0,d=11+(127&(u>>>=_)),u>>>=7,l-=7}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;d--;)r.lens[r.have++]=k}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,S={bits:r.lenbits},x=T(D,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},x=T(F,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,x){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=o&&258<=h){e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,R(e,c),a=e.next_out,i=e.output,h=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,u=r.hold,l=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;g=(C=r.lencode[u&(1<<r.lenbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if(g&&0==(240&g)){for(v=_,y=g,w=b;g=(C=r.lencode[w+((u&(1<<v+y)-1)>>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}u>>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,r.length=b,0===g){r.mode=26;break}if(32&g){r.back=-1,r.mode=12;break}if(64&g){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&g,r.mode=22;case 22:if(r.extra){for(z=r.extra;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}r.length+=u&(1<<r.extra)-1,u>>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;g=(C=r.distcode[u&(1<<r.distbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if(0==(240&g)){for(v=_,y=g,w=b;g=(C=r.distcode[w+((u&(1<<v+y)-1)>>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}u>>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,64&g){e.msg="invalid distance code",r.mode=30;break}r.offset=b,r.extra=15&g,r.mode=24;case 24:if(r.extra){for(z=r.extra;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}r.offset+=u&(1<<r.extra)-1,u>>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===h)break e;if(d=c-h,r.offset>d){if((d=r.offset-d)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}p=d>r.wnext?(d-=r.wnext,r.wsize-d):r.wnext-d,d>r.length&&(d=r.length),m=r.window}else m=i,p=a-r.offset,d=r.length;for(h<d&&(d=h),h-=d,r.length-=d;i[a++]=m[p++],--d;);0===r.length&&(r.mode=21);break;case 26:if(0===h)break e;i[a++]=r.length,h--,r.mode=21;break;case 27:if(r.wrap){for(;l<32;){if(0===o)break e;o--,u|=n[s++]<<l,l+=8}if(c-=h,e.total_out+=c,r.total+=c,c&&(e.adler=r.check=r.flags?B(r.check,i,c,a-c):O(r.check,i,c,a-c)),c=h,(r.flags?u:L(u))!==r.check){e.msg="incorrect data check",r.mode=30;break}l=u=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;l<32;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if(u!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}l=u=0}r.mode=29;case 29:x=1;break e;case 30:x=-3;break e;case 31:return-4;case 32:default:return U}return e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,(r.wsize||c!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&Z(e,e.output,e.next_out,c-e.avail_out)?(r.mode=31,-4):(f-=e.avail_in,c-=e.avail_out,e.total_in+=f,e.total_out+=c,r.total+=c,r.wrap&&c&&(e.adler=r.check=r.flags?B(r.check,i,c,e.next_out-c):O(r.check,i,c,e.next_out-c)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==f&&0===c||4===t)&&x===N&&(x=-5),x)},r.inflateEnd=function(e){if(!e||!e.state)return U;var t=e.state;return t.window&&(t.window=null),e.state=null,N},r.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?U:((r.head=t).done=!1,N):U},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?U:11===r.mode&&O(1,t,n,0)!==r.check?-3:Z(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,N):U},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,r){"use strict";var D=e("../utils/common"),F=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],N=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],U=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],P=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,n,i,s,a,o){var h,u,l,f,c,d,p,m,_,g=o.bits,b=0,v=0,y=0,w=0,k=0,x=0,S=0,z=0,C=0,E=0,A=null,I=0,O=new D.Buf16(16),B=new D.Buf16(16),R=null,T=0;for(b=0;b<=15;b++)O[b]=0;for(v=0;v<n;v++)O[t[r+v]]++;for(k=g,w=15;1<=w&&0===O[w];w--);if(w<k&&(k=w),0===w)return i[s++]=20971520,i[s++]=20971520,o.bits=1,0;for(y=1;y<w&&0===O[y];y++);for(k<y&&(k=y),b=z=1;b<=15;b++)if(z<<=1,(z-=O[b])<0)return-1;if(0<z&&(0===e||1!==w))return-1;for(B[1]=0,b=1;b<15;b++)B[b+1]=B[b]+O[b];for(v=0;v<n;v++)0!==t[r+v]&&(a[B[t[r+v]]++]=v);if(d=0===e?(A=R=a,19):1===e?(A=F,I-=257,R=N,T-=257,256):(A=U,R=P,-1),b=y,c=s,S=v=E=0,l=-1,f=(C=1<<(x=k))-1,1===e&&852<C||2===e&&592<C)return 1;for(;;){for(p=b-S,_=a[v]<d?(m=0,a[v]):a[v]>d?(m=R[T+a[v]],A[I+a[v]]):(m=96,0),h=1<<b-S,y=u=1<<x;i[c+(E>>S)+(u-=h)]=p<<24|m<<16|_|0,0!==u;);for(h=1<<b-1;E&h;)h>>=1;if(0!==h?(E&=h-1,E+=h):E=0,v++,0==--O[b]){if(b===w)break;b=t[r+a[v]]}if(k<b&&(E&f)!==l){for(0===S&&(S=k),c+=y,z=1<<(x=b-S);x+S<w&&!((z-=O[x+S])<=0);)x++,z<<=1;if(C+=1<<x,1===e&&852<C||2===e&&592<C)return 1;i[l=E&f]=k<<24|x<<16|c-s|0}}return 0!==E&&(i[c+E]=b-S<<24|64<<16|0),o.bits=k,0}},{"../utils/common":41}],51:[function(e,t,r){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,r){"use strict";var i=e("../utils/common"),o=0,h=1;function n(e){for(var t=e.length;0<=--t;)e[t]=0}var s=0,a=29,u=256,l=u+1+a,f=30,c=19,_=2*l+1,g=15,d=16,p=7,m=256,b=16,v=17,y=18,w=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],k=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],z=new Array(2*(l+2));n(z);var C=new Array(2*f);n(C);var E=new Array(512);n(E);var A=new Array(256);n(A);var I=new Array(a);n(I);var O,B,R,T=new Array(f);function D(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function F(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function N(e){return e<256?E[e]:E[256+(e>>>7)]}function U(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function P(e,t,r){e.bi_valid>d-r?(e.bi_buf|=t<<e.bi_valid&65535,U(e,e.bi_buf),e.bi_buf=t>>d-e.bi_valid,e.bi_valid+=r-d):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function L(e,t,r){P(e,r[2*t],r[2*t+1])}function j(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function Z(e,t,r){var n,i,s=new Array(g+1),a=0;for(n=1;n<=g;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=j(s[o]++,o))}}function W(e){var t;for(t=0;t<l;t++)e.dyn_ltree[2*t]=0;for(t=0;t<f;t++)e.dyn_dtree[2*t]=0;for(t=0;t<c;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*m]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function M(e){8<e.bi_valid?U(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function H(e,t,r,n){var i=2*t,s=2*r;return e[i]<e[s]||e[i]===e[s]&&n[t]<=n[r]}function G(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&H(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!H(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function K(e,t,r){var n,i,s,a,o=0;if(0!==e.last_lit)for(;n=e.pending_buf[e.d_buf+2*o]<<8|e.pending_buf[e.d_buf+2*o+1],i=e.pending_buf[e.l_buf+o],o++,0===n?L(e,i,t):(L(e,(s=A[i])+u+1,t),0!==(a=w[s])&&P(e,i-=I[s],a),L(e,s=N(--n),r),0!==(a=k[s])&&P(e,n-=T[s],a)),o<e.last_lit;);L(e,m,t)}function Y(e,t){var r,n,i,s=t.dyn_tree,a=t.stat_desc.static_tree,o=t.stat_desc.has_stree,h=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=_,r=0;r<h;r++)0!==s[2*r]?(e.heap[++e.heap_len]=u=r,e.depth[r]=0):s[2*r+1]=0;for(;e.heap_len<2;)s[2*(i=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[i]=0,e.opt_len--,o&&(e.static_len-=a[2*i+1]);for(t.max_code=u,r=e.heap_len>>1;1<=r;r--)G(e,s,r);for(i=h;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],G(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,s[2*i]=s[2*r]+s[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,s[2*r+1]=s[2*n+1]=i,e.heap[1]=i++,G(e,s,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,s,a,o,h=t.dyn_tree,u=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,c=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(s=0;s<=g;s++)e.bl_count[s]=0;for(h[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<_;r++)p<(s=h[2*h[2*(n=e.heap[r])+1]+1]+1)&&(s=p,m++),h[2*n+1]=s,u<n||(e.bl_count[s]++,a=0,d<=n&&(a=c[n-d]),o=h[2*n],e.opt_len+=o*(s+a),f&&(e.static_len+=o*(l[2*n+1]+a)));if(0!==m){do{for(s=p-1;0===e.bl_count[s];)s--;e.bl_count[s]--,e.bl_count[s+1]+=2,e.bl_count[p]--,m-=2}while(0<m);for(s=p;0!==s;s--)for(n=e.bl_count[s];0!==n;)u<(i=e.heap[--r])||(h[2*i+1]!==s&&(e.opt_len+=(s-h[2*i+1])*h[2*i],h[2*i+1]=s),n--)}}(e,t),Z(s,u,e.bl_count)}function X(e,t,r){var n,i,s=-1,a=t[1],o=0,h=7,u=4;for(0===a&&(h=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=t[2*(n+1)+1],++o<h&&i===a||(o<u?e.bl_tree[2*i]+=o:0!==i?(i!==s&&e.bl_tree[2*i]++,e.bl_tree[2*b]++):o<=10?e.bl_tree[2*v]++:e.bl_tree[2*y]++,s=i,u=(o=0)===a?(h=138,3):i===a?(h=6,3):(h=7,4))}function V(e,t,r){var n,i,s=-1,a=t[1],o=0,h=7,u=4;for(0===a&&(h=138,u=3),n=0;n<=r;n++)if(i=a,a=t[2*(n+1)+1],!(++o<h&&i===a)){if(o<u)for(;L(e,i,e.bl_tree),0!=--o;);else 0!==i?(i!==s&&(L(e,i,e.bl_tree),o--),L(e,b,e.bl_tree),P(e,o-3,2)):o<=10?(L(e,v,e.bl_tree),P(e,o-3,3)):(L(e,y,e.bl_tree),P(e,o-11,7));s=i,u=(o=0)===a?(h=138,3):i===a?(h=6,3):(h=7,4)}}n(T);var q=!1;function J(e,t,r,n){P(e,(s<<1)+(n?1:0),3),function(e,t,r,n){M(e),n&&(U(e,r),U(e,~r)),i.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r,!0)}r._tr_init=function(e){q||(function(){var e,t,r,n,i,s=new Array(g+1);for(n=r=0;n<a-1;n++)for(I[n]=r,e=0;e<1<<w[n];e++)A[r++]=n;for(A[r-1]=n,n=i=0;n<16;n++)for(T[n]=i,e=0;e<1<<k[n];e++)E[i++]=n;for(i>>=7;n<f;n++)for(T[n]=i<<7,e=0;e<1<<k[n]-7;e++)E[256+i++]=n;for(t=0;t<=g;t++)s[t]=0;for(e=0;e<=143;)z[2*e+1]=8,e++,s[8]++;for(;e<=255;)z[2*e+1]=9,e++,s[9]++;for(;e<=279;)z[2*e+1]=7,e++,s[7]++;for(;e<=287;)z[2*e+1]=8,e++,s[8]++;for(Z(z,l+1,s),e=0;e<f;e++)C[2*e+1]=5,C[2*e]=j(e,5);O=new D(z,w,u+1,l,g),B=new D(C,k,0,f,g),R=new D(new Array(0),x,0,c,p)}(),q=!0),e.l_desc=new F(e.dyn_ltree,O),e.d_desc=new F(e.dyn_dtree,B),e.bl_desc=new F(e.bl_tree,R),e.bi_buf=0,e.bi_valid=0,W(e)},r._tr_stored_block=J,r._tr_flush_block=function(e,t,r,n){var i,s,a=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return o;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return h;for(t=32;t<u;t++)if(0!==e.dyn_ltree[2*t])return h;return o}(e)),Y(e,e.l_desc),Y(e,e.d_desc),a=function(e){var t;for(X(e,e.dyn_ltree,e.l_desc.max_code),X(e,e.dyn_dtree,e.d_desc.max_code),Y(e,e.bl_desc),t=c-1;3<=t&&0===e.bl_tree[2*S[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?J(e,t,r,n):4===e.strategy||s===i?(P(e,2+(n?1:0),3),K(e,z,C)):(P(e,4+(n?1:0),3),function(e,t,r,n){var i;for(P(e,t-257,5),P(e,r-1,5),P(e,n-4,4),i=0;i<n;i++)P(e,e.bl_tree[2*S[i]+1],3);V(e,e.dyn_ltree,t-1),V(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),K(e,e.dyn_ltree,e.dyn_dtree)),W(e),n&&M(e)},r._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(A[r]+u+1)]++,e.dyn_dtree[2*N(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){P(e,2,3),L(e,m,z),function(e){16===e.bi_valid?(U(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,r){(function(e){!function(r,n){"use strict";if(!r.setImmediate){var i,s,t,a,o=1,h={},u=!1,l=r.document,e=Object.getPrototypeOf&&Object.getPrototypeOf(r);e=e&&e.setTimeout?e:r,i="[object process]"==={}.toString.call(r.process)?function(e){process.nextTick(function(){c(e)})}:function(){if(r.postMessage&&!r.importScripts){var e=!0,t=r.onmessage;return r.onmessage=function(){e=!1},r.postMessage("","*"),r.onmessage=t,e}}()?(a="setImmediate$"+Math.random()+"$",r.addEventListener?r.addEventListener("message",d,!1):r.attachEvent("onmessage",d),function(e){r.postMessage(a+e,"*")}):r.MessageChannel?((t=new MessageChannel).port1.onmessage=function(e){c(e.data)},function(e){t.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(s=l.documentElement,function(e){var t=l.createElement("script");t.onreadystatechange=function(){c(e),t.onreadystatechange=null,s.removeChild(t),t=null},s.appendChild(t)}):function(e){setTimeout(c,0,e)},e.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var n={callback:e,args:t};return h[o]=n,i(o),o++},e.clearImmediate=f}function f(e){delete h[e]}function c(e){if(u)setTimeout(c,0,e);else{var t=h[e];if(t){u=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{f(e),u=!1}}}}function d(e){e.source===r&&"string"==typeof e.data&&0===e.data.indexOf(a)&&c(+e.data.slice(a.length))}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)});
-Number.isInteger = Number.isInteger || function(value) {
- return typeof value === 'number' &&
- isFinite(value) &&
- Math.floor(value) === value;
-};
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mermaid=e():t.mermaid=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=384)}([function(t,e,n){"use strict";n.r(e);var r=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},i=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return r(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}};var a=i(r),o=a.right,s=a.left,c=o,u=function(t,e){null==e&&(e=l);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return a};function l(t,e){return[t,e]}var h=function(t,e,n){var r,i,a,o,s=t.length,c=e.length,u=new Array(s*c);for(null==n&&(n=l),r=a=0;r<s;++r)for(o=t[r],i=0;i<c;++i,++a)u[a]=n(o,e[i]);return u},f=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,e){var n,r,i=t.length,a=0,o=-1,s=0,c=0;if(null==e)for(;++o<i;)isNaN(n=d(t[o]))||(c+=(r=n-s)*(n-(s+=r/++a)));else for(;++o<i;)isNaN(n=d(e(t[o],o,t)))||(c+=(r=n-s)*(n-(s+=r/++a)));if(a>1)return c/(a-1)},y=function(t,e){var n=p(t,e);return n?Math.sqrt(n):n},g=function(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]},v=Array.prototype,m=v.slice,b=v.map,x=function(t){return function(){return t}},_=function(t){return t},k=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a},w=Math.sqrt(50),E=Math.sqrt(10),T=Math.sqrt(2),C=function(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=S(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return r&&a.reverse(),a};function S(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=w?10:a>=E?5:a>=T?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=w?10:a>=E?5:a>=T?2:1)}function A(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=w?i*=10:a>=E?i*=5:a>=T&&(i*=2),e<t?-i:i}var M=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},O=function(){var t=_,e=g,n=M;function r(r){var i,a,o=r.length,s=new Array(o);for(i=0;i<o;++i)s[i]=t(r[i],i,r);var u=e(s),l=u[0],h=u[1],f=n(s,l,h);Array.isArray(f)||(f=A(l,h,f),f=k(Math.ceil(l/f)*f,h,f));for(var d=f.length;f[0]<=l;)f.shift(),--d;for(;f[d-1]>h;)f.pop(),--d;var p,y=new Array(d+1);for(i=0;i<=d;++i)(p=y[i]=[]).x0=i>0?f[i-1]:l,p.x1=i<d?f[i]:h;for(i=0;i<o;++i)l<=(a=s[i])&&a<=h&&y[c(f,a,0,d)].push(r[i]);return y}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:x(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:x([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?x(m.call(t)):x(t),r):n},r},B=function(t,e,n){if(null==n&&(n=d),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}},N=function(t,e,n){return t=b.call(t,d).sort(r),Math.ceil((n-e)/(2*(B(t,.75)-B(t,.25))*Math.pow(t.length,-1/3)))},D=function(t,e,n){return Math.ceil((n-e)/(3.5*y(t)*Math.pow(t.length,-1/3)))},L=function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r},I=function(t,e){var n,r=t.length,i=r,a=-1,o=0;if(null==e)for(;++a<r;)isNaN(n=d(t[a]))?--i:o+=n;else for(;++a<r;)isNaN(n=d(e(t[a],a,t)))?--i:o+=n;if(i)return o/i},R=function(t,e){var n,i=t.length,a=-1,o=[];if(null==e)for(;++a<i;)isNaN(n=d(t[a]))||o.push(n);else for(;++a<i;)isNaN(n=d(e(t[a],a,t)))||o.push(n);return B(o.sort(r),.5)},F=function(t){for(var e,n,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(n=new Array(o);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n},P=function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&r>n&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&r>n&&(r=n);return r},j=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},Y=function(t,e){if(n=t.length){var n,i,a=0,o=0,s=t[o];for(null==e&&(e=r);++a<n;)(e(i=t[a],s)<0||0!==e(s,s))&&(s=i,o=a);return 0===e(s,s)?o:void 0}},z=function(t,e,n){for(var r,i,a=(null==n?t.length:n)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,r=t[a+e],t[a+e]=t[i+e],t[i+e]=r;return t},U=function(t,e){var n,r=t.length,i=-1,a=0;if(null==e)for(;++i<r;)(n=+t[i])&&(a+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(a+=n);return a},$=function(t){if(!(i=t.length))return[];for(var e=-1,n=P(t,q),r=new Array(n);++e<n;)for(var i,a=-1,o=r[e]=new Array(i);++a<i;)o[a]=t[a][e];return r};function q(t){return t.length}var W=function(){return $(arguments)},V=Array.prototype.slice,H=function(t){return t};function G(t){return"translate("+(t+.5)+",0)"}function X(t){return"translate(0,"+(t+.5)+")"}function Z(t){return function(e){return+t(e)}}function Q(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function K(){return!this.__axis}function J(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,c=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",l=1===t||3===t?G:X;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):H:i,p=Math.max(a,0)+s,y=e.range(),g=+y[0]+.5,v=+y[y.length-1]+.5,m=(e.bandwidth?Q:Z)(e.copy()),b=h.selection?h.selection():h,x=b.selectAll(".domain").data([null]),_=b.selectAll(".tick").data(f,e).order(),k=_.exit(),w=_.enter().append("g").attr("class","tick"),E=_.select("line"),T=_.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(w),E=E.merge(w.append("line").attr("stroke","currentColor").attr(u+"2",c*a)),T=T.merge(w.append("text").attr("fill","currentColor").attr(u,c*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==b&&(x=x.transition(h),_=_.transition(h),E=E.transition(h),T=T.transition(h),k=k.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=m(t))?l(t):this.getAttribute("transform")})),w.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:m(t))}))),k.remove(),x.attr("d",4===t||2==t?o?"M"+c*o+","+g+"H0.5V"+v+"H"+c*o:"M0.5,"+g+"V"+v:o?"M"+g+","+c*o+"V0.5H"+v+"V"+c*o:"M"+g+",0.5H"+v),_.attr("opacity",1).attr("transform",(function(t){return l(m(t))})),E.attr(u+"2",c*a),T.attr(u,c*p).text(d),b.filter(K).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each((function(){this.__axis=m}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=V.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:V.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:V.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=o=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(o=+t,h):o},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function tt(t){return J(1,t)}function et(t){return J(2,t)}function nt(t){return J(3,t)}function rt(t){return J(4,t)}var it={value:function(){}};function at(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ot(r)}function ot(t){this._=t}function st(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function ct(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function ut(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=it,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ot.prototype=at.prototype={constructor:ot,on:function(t,e){var n,r=this._,i=st(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=ut(r[n],t.name,e);else if(null==e)for(n in r)r[n]=ut(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=ct(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ot(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var lt=at;function ht(){}var ft=function(t){return null==t?ht:function(){return this.querySelector(t)}};function dt(){return[]}var pt=function(t){return null==t?dt:function(){return this.querySelectorAll(t)}},yt=function(t){return function(){return this.matches(t)}},gt=function(t){return new Array(t.length)};function vt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}vt.prototype={constructor:vt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function mt(t,e,n,r,i,a){for(var o,s=0,c=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new vt(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function bt(t,e,n,r,i,a,o){var s,c,u,l={},h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(d[s]=u="$"+o.call(c,c.__data__,s,e),u in l?i[s]=c:l[u]=c);for(s=0;s<f;++s)(c=l[u="$"+o.call(t,a[s],s,a)])?(r[s]=c,c.__data__=a[s],l[u]=null):n[s]=new vt(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&l[d[s]]===c&&(i[s]=c)}function xt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var _t="http://www.w3.org/1999/xhtml",kt={svg:"http://www.w3.org/2000/svg",xhtml:_t,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},wt=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),kt.hasOwnProperty(e)?{space:kt[e],local:t}:t};function Et(t){return function(){this.removeAttribute(t)}}function Tt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ct(t,e){return function(){this.setAttribute(t,e)}}function St(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function At(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Mt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var Ot=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function Bt(t){return function(){this.style.removeProperty(t)}}function Nt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Dt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Lt(t,e){return t.style.getPropertyValue(e)||Ot(t).getComputedStyle(t,null).getPropertyValue(e)}function It(t){return function(){delete this[t]}}function Rt(t,e){return function(){this[t]=e}}function Ft(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Pt(t){return t.trim().split(/^|\s+/)}function jt(t){return t.classList||new Yt(t)}function Yt(t){this._node=t,this._names=Pt(t.getAttribute("class")||"")}function zt(t,e){for(var n=jt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Ut(t,e){for(var n=jt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function $t(t){return function(){zt(this,t)}}function qt(t){return function(){Ut(this,t)}}function Wt(t,e){return function(){(e.apply(this,arguments)?zt:Ut)(this,t)}}Yt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Vt(){this.textContent=""}function Ht(t){return function(){this.textContent=t}}function Gt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Xt(){this.innerHTML=""}function Zt(t){return function(){this.innerHTML=t}}function Qt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Kt(){this.nextSibling&&this.parentNode.appendChild(this)}function Jt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function te(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===_t&&e.documentElement.namespaceURI===_t?e.createElement(t):e.createElementNS(n,t)}}function ee(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var ne=function(t){var e=wt(t);return(e.local?ee:te)(e)};function re(){return null}function ie(){var t=this.parentNode;t&&t.removeChild(this)}function ae(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function oe(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}var se={},ce=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(se={mouseenter:"mouseover",mouseleave:"mouseout"}));function ue(t,e,n){return t=le(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function le(t,e,n){return function(r){var i=ce;ce=r;try{t.call(this,this.__data__,e,n)}finally{ce=i}}}function he(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function fe(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function de(t,e,n){var r=se.hasOwnProperty(t.type)?ue:le;return function(i,a,o){var s,c=this.__on,u=r(e,a,o);if(c)for(var l=0,h=c.length;l<h;++l)if((s=c[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=u,s.capture=n),void(s.value=e);this.addEventListener(t.type,u,n),s={type:t.type,name:t.name,value:e,listener:u,capture:n},c?c.push(s):this.__on=[s]}}function pe(t,e,n,r){var i=ce;t.sourceEvent=ce,ce=t;try{return e.apply(n,r)}finally{ce=i}}function ye(t,e,n){var r=Ot(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function ge(t,e){return function(){return ye(this,t,e)}}function ve(t,e){return function(){return ye(this,t,e.apply(this,arguments))}}var me=[null];function be(t,e){this._groups=t,this._parents=e}function xe(){return new be([[document.documentElement]],me)}be.prototype=xe.prototype={constructor:be,select:function(t){"function"!=typeof t&&(t=ft(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,u=r[i]=new Array(c),l=0;l<c;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),u[l]=o);return new be(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=pt(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,u=0;u<c;++u)(o=s[u])&&(r.push(t.call(o,o.__data__,u,s)),i.push(o));return new be(r,i)},filter:function(t){"function"!=typeof t&&(t=yt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new be(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),l=-1,this.each((function(t){p[++l]=t})),p;var n,r=e?bt:mt,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,s=new Array(o),c=new Array(o),u=new Array(o),l=0;l<o;++l){var h=i[l],f=a[l],d=f.length,p=t.call(h,h&&h.__data__,l,i),y=p.length,g=c[l]=new Array(y),v=s[l]=new Array(y);r(h,f,g,v,u[l]=new Array(d),p,e);for(var m,b,x=0,_=0;x<y;++x)if(m=g[x]){for(x>=_&&(_=x+1);!(b=v[_])&&++_<y;);m._next=b||null}}return(s=new be(s,i))._enter=c,s._exit=u,s},enter:function(){return new be(this._enter||this._groups.map(gt),this._parents)},exit:function(){return new be(this._exit||this._groups.map(gt),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new be(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=xt);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,u=i[a]=new Array(c),l=0;l<c;++l)(o=s[l])&&(u[l]=o);u.sort(e)}return new be(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=wt(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Tt:Et:"function"==typeof e?n.local?Mt:At:n.local?St:Ct)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Bt:"function"==typeof e?Dt:Nt)(t,e,null==n?"":n)):Lt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?It:"function"==typeof e?Ft:Rt)(t,e)):this.node()[t]},classed:function(t,e){var n=Pt(t+"");if(arguments.length<2){for(var r=jt(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Wt:e?$t:qt)(n,e))},text:function(t){return arguments.length?this.each(null==t?Vt:("function"==typeof t?Gt:Ht)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Xt:("function"==typeof t?Qt:Zt)(t)):this.node().innerHTML},raise:function(){return this.each(Kt)},lower:function(){return this.each(Jt)},append:function(t){var e="function"==typeof t?t:ne(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ne(t),r=null==e?re:"function"==typeof e?e:ft(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ie)},clone:function(t){return this.select(t?oe:ae)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=he(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?de:fe,null==n&&(n=!1),r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,u=0,l=s.length;u<l;++u)for(r=0,c=s[u];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?ve:ge)(t,e))}};var _e=xe,ke=function(t){return"string"==typeof t?new be([[document.querySelector(t)]],[document.documentElement]):new be([[t]],me)};function we(){ce.stopImmediatePropagation()}var Ee=function(){ce.preventDefault(),ce.stopImmediatePropagation()},Te=function(t){var e=t.document.documentElement,n=ke(t).on("dragstart.drag",Ee,!0);"onselectstart"in e?n.on("selectstart.drag",Ee,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")};function Ce(t,e){var n=t.document.documentElement,r=ke(t).on("dragstart.drag",null);e&&(r.on("click.drag",Ee,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Se=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function Ae(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Me(){}var Oe="\\s*([+-]?\\d+)\\s*",Be="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ne="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",De=/^#([0-9a-f]{3,8})$/,Le=new RegExp("^rgb\\("+[Oe,Oe,Oe]+"\\)$"),Ie=new RegExp("^rgb\\("+[Ne,Ne,Ne]+"\\)$"),Re=new RegExp("^rgba\\("+[Oe,Oe,Oe,Be]+"\\)$"),Fe=new RegExp("^rgba\\("+[Ne,Ne,Ne,Be]+"\\)$"),Pe=new RegExp("^hsl\\("+[Be,Ne,Ne]+"\\)$"),je=new RegExp("^hsla\\("+[Be,Ne,Ne,Be]+"\\)$"),Ye={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ze(){return this.rgb().formatHex()}function Ue(){return this.rgb().formatRgb()}function $e(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=De.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?qe(e):3===n?new Ge(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Ge(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Ge(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Le.exec(t))?new Ge(e[1],e[2],e[3],1):(e=Ie.exec(t))?new Ge(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Re.exec(t))?We(e[1],e[2],e[3],e[4]):(e=Fe.exec(t))?We(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Pe.exec(t))?Ke(e[1],e[2]/100,e[3]/100,1):(e=je.exec(t))?Ke(e[1],e[2]/100,e[3]/100,e[4]):Ye.hasOwnProperty(t)?qe(Ye[t]):"transparent"===t?new Ge(NaN,NaN,NaN,0):null}function qe(t){return new Ge(t>>16&255,t>>8&255,255&t,1)}function We(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ge(t,e,n,r)}function Ve(t){return t instanceof Me||(t=$e(t)),t?new Ge((t=t.rgb()).r,t.g,t.b,t.opacity):new Ge}function He(t,e,n,r){return 1===arguments.length?Ve(t):new Ge(t,e,n,null==r?1:r)}function Ge(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Xe(){return"#"+Qe(this.r)+Qe(this.g)+Qe(this.b)}function Ze(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Qe(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ke(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new en(t,e,n,r)}function Je(t){if(t instanceof en)return new en(t.h,t.s,t.l,t.opacity);if(t instanceof Me||(t=$e(t)),!t)return new en;if(t instanceof en)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new en(o,s,c,t.opacity)}function tn(t,e,n,r){return 1===arguments.length?Je(t):new en(t,e,n,null==r?1:r)}function en(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function nn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function rn(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}Se(Me,$e,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:ze,formatHex:ze,formatHsl:function(){return Je(this).formatHsl()},formatRgb:Ue,toString:Ue}),Se(Ge,He,Ae(Me,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ge(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ge(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Xe,formatHex:Xe,formatRgb:Ze,toString:Ze})),Se(en,tn,Ae(Me,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new en(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new en(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ge(nn(t>=240?t-240:t+120,i,r),nn(t,i,r),nn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var an=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return rn((n-r/e)*e,o,i,a,s)}},on=function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return rn((n-r/e)*e,i,a,o,s)}},sn=function(t){return function(){return t}};function cn(t,e){return function(n){return t+n*e}}function un(t,e){var n=e-t;return n?cn(t,n>180||n<-180?n-360*Math.round(n/360):n):sn(isNaN(t)?e:t)}function ln(t){return 1==(t=+t)?hn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):sn(isNaN(e)?n:e)}}function hn(t,e){var n=e-t;return n?cn(t,n):sn(isNaN(t)?e:t)}var fn=function t(e){var n=ln(e);function r(t,e){var r=n((t=He(t)).r,(e=He(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=hn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function dn(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=He(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}var pn=dn(an),yn=dn(on),gn=function(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}};function vn(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}var mn=function(t,e){return(vn(e)?gn:bn)(t,e)};function bn(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=An(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}var xn=function(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}},_n=function(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}},kn=function(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=An(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}},wn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,En=new RegExp(wn.source,"g");var Tn,Cn,Sn=function(t,e){var n,r,i,a=wn.lastIndex=En.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=wn.exec(t))&&(r=En.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:_n(n,r)})),a=En.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})},An=function(t,e){var n,r=typeof e;return null==e||"boolean"===r?sn(e):("number"===r?_n:"string"===r?(n=$e(e))?(e=n,fn):Sn:e instanceof $e?fn:e instanceof Date?xn:vn(e)?gn:Array.isArray(e)?bn:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?kn:_n)(t,e)},Mn=function(){for(var t,e=ce;t=e.sourceEvent;)e=t;return e},On=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]},Bn=function(t,e,n){arguments.length<3&&(n=e,e=Mn().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return On(t,r);return null},Nn=function(t){var e=Mn();return e.changedTouches&&(e=e.changedTouches[0]),On(t,e)},Dn=0,Ln=0,In=0,Rn=0,Fn=0,Pn=0,jn="object"==typeof performance&&performance.now?performance:Date,Yn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function zn(){return Fn||(Yn(Un),Fn=jn.now()+Pn)}function Un(){Fn=0}function $n(){this._call=this._time=this._next=null}function qn(t,e,n){var r=new $n;return r.restart(t,e,n),r}function Wn(){zn(),++Dn;for(var t,e=Tn;e;)(t=Fn-e._time)>=0&&e._call.call(null,t),e=e._next;--Dn}function Vn(){Fn=(Rn=jn.now())+Pn,Dn=Ln=0;try{Wn()}finally{Dn=0,function(){var t,e,n=Tn,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Tn=e);Cn=t,Gn(r)}(),Fn=0}}function Hn(){var t=jn.now(),e=t-Rn;e>1e3&&(Pn-=e,Rn=t)}function Gn(t){Dn||(Ln&&(Ln=clearTimeout(Ln)),t-Fn>24?(t<1/0&&(Ln=setTimeout(Vn,t-jn.now()-Pn)),In&&(In=clearInterval(In))):(In||(Rn=jn.now(),In=setInterval(Hn,1e3)),Dn=1,Yn(Vn)))}$n.prototype=qn.prototype={constructor:$n,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?zn():+n)+(null==e?0:+e),this._next||Cn===this||(Cn?Cn._next=this:Tn=this,Cn=this),this._call=t,this._time=n,Gn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Gn())}};var Xn=function(t,e,n){var r=new $n;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},Zn=lt("start","end","cancel","interrupt"),Qn=[],Kn=function(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(c){var u,l,h,f;if(1!==n.state)return s();for(u in i)if((f=i[u]).name===n.name){if(3===f.state)return Xn(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+u<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[u])}if(Xn((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,l=-1;u<h;++u)(f=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=qn((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Zn,tween:Qn,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})};function Jn(t,e){var n=er(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function tr(t,e){var n=er(t,e);if(n.state>3)throw new Error("too late; already running");return n}function er(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var nr,rr,ir,ar,or=function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}},sr=180/Math.PI,cr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},ur=function(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*sr,skewX:Math.atan(c)*sr,scaleX:o,scaleY:s}};function lr(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:_n(t,i)},{i:c-2,x:_n(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:_n(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:_n(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:_n(t,n)},{i:s-2,x:_n(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var hr=lr((function(t){return"none"===t?cr:(nr||(nr=document.createElement("DIV"),rr=document.documentElement,ir=document.defaultView),nr.style.transform=t,t=ir.getComputedStyle(rr.appendChild(nr),null).getPropertyValue("transform"),rr.removeChild(nr),t=t.slice(7,-1).split(","),ur(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),fr=lr((function(t){return null==t?cr:(ar||(ar=document.createElementNS("http://www.w3.org/2000/svg","g")),ar.setAttribute("transform",t),(t=ar.transform.baseVal.consolidate())?(t=t.matrix,ur(t.a,t.b,t.c,t.d,t.e,t.f)):cr)}),", ",")",")");function dr(t,e){var n,r;return function(){var i=tr(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function pr(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=tr(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}a.tween=i}}function yr(t,e,n){var r=t._id;return t.each((function(){var t=tr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return er(t,r).value[e]}}var gr=function(t,e){var n;return("number"==typeof e?_n:e instanceof $e?fn:(n=$e(e))?(e=n,fn):Sn)(t,e)};function vr(t){return function(){this.removeAttribute(t)}}function mr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function br(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function xr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function _r(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function kr(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function wr(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Er(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Tr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Er(t,i)),n}return i._value=e,i}function Cr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&wr(t,i)),n}return i._value=e,i}function Sr(t,e){return function(){Jn(this,t).delay=+e.apply(this,arguments)}}function Ar(t,e){return e=+e,function(){Jn(this,t).delay=e}}function Mr(t,e){return function(){tr(this,t).duration=+e.apply(this,arguments)}}function Or(t,e){return e=+e,function(){tr(this,t).duration=e}}function Br(t,e){if("function"!=typeof e)throw new Error;return function(){tr(this,t).ease=e}}function Nr(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Jn:tr;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Dr=_e.prototype.constructor;function Lr(t){return function(){this.style.removeProperty(t)}}function Ir(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Rr(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Ir(t,a,n)),r}return a._value=e,a}function Fr(t){return function(e){this.textContent=t.call(this,e)}}function Pr(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Fr(r)),e}return r._value=t,r}var jr=0;function Yr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function zr(t){return _e().transition(t)}function Ur(){return++jr}var $r=_e.prototype;function qr(t){return t*t*t}function Wr(t){return--t*t*t+1}function Vr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Yr.prototype=zr.prototype={constructor:Yr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ft(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,u=r[o],l=u.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=u[f])&&(c=t.call(s,s.__data__,f,u))&&("__data__"in s&&(c.__data__=s.__data__),h[f]=c,Kn(h[f],e,n,f,h,er(s,n)));return new Yr(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=pt(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,u=r[s],l=u.length,h=0;h<l;++h)if(c=u[h]){for(var f,d=t.call(c,c.__data__,h,u),p=er(c,n),y=0,g=d.length;y<g;++y)(f=d[y])&&Kn(f,e,n,y,d,p);a.push(d),o.push(c)}return new Yr(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=yt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new Yr(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new Yr(o,this._parents,this._name,this._id)},selection:function(){return new Dr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Ur(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)if(o=s[u]){var l=er(o,e);Kn(o,t,n,u,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Yr(r,this._parents,t,n)},call:$r.call,nodes:$r.nodes,node:$r.node,size:$r.size,empty:$r.empty,each:$r.each,on:function(t,e){var n=this._id;return arguments.length<2?er(this.node(),n).on.on(t):this.each(Nr(n,t,e))},attr:function(t,e){var n=wt(t),r="transform"===n?fr:gr;return this.attrTween(t,"function"==typeof e?(n.local?kr:_r)(n,r,yr(this,"attr."+t,e)):null==e?(n.local?mr:vr)(n):(n.local?xr:br)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=wt(t);return this.tween(n,(r.local?Tr:Cr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?hr:gr;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Lt(this,t),o=(this.style.removeProperty(t),Lt(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Lr(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Lt(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=Lt(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,yr(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=tr(this,t),u=c.on,l=null==c.value[o]?a||(a=Lr(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(s,i=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Lt(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Rr(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(yr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Pr(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=er(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?dr:pr)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Sr:Ar)(e,t)):er(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Mr:Or)(e,t)):er(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Br(e,t)):er(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=tr(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e}))}))}};var Hr={time:null,delay:0,duration:250,ease:Vr};function Gr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Hr.time=zn(),Hr;return n}_e.prototype.interrupt=function(t){return this.each((function(){or(this,t)}))},_e.prototype.transition=function(t){var e,n;t instanceof Yr?(e=t._id,t=t._name):(e=Ur(),(n=Hr).time=zn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)(o=s[u])&&Kn(o,t,e,u,s,n||Gr(o,e));return new Yr(r,this._parents,t,e)};var Xr=[null],Zr=function(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+"",i)if((n=i[r]).state>1&&n.name===e)return new Yr([[t]],Xr,e,+r);return null},Qr=function(t){return function(){return t}},Kr=function(t,e,n){this.target=t,this.type=e,this.selection=n};function Jr(){ce.stopImmediatePropagation()}var ti=function(){ce.preventDefault(),ce.stopImmediatePropagation()},ei={name:"drag"},ni={name:"space"},ri={name:"handle"},ii={name:"center"};function ai(t){return[+t[0],+t[1]]}function oi(t){return[ai(t[0]),ai(t[1])]}function si(t){return function(e){return Bn(e,ce.touches,t)}}var ci={name:"x",handles:["w","e"].map(gi),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ui={name:"y",handles:["n","s"].map(gi),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},li={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(gi),input:function(t){return null==t?null:oi(t)},output:function(t){return t}},hi={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},fi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},di={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},pi={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},yi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function gi(t){return{type:t}}function vi(){return!ce.ctrlKey&&!ce.button}function mi(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function bi(){return navigator.maxTouchPoints||"ontouchstart"in this}function xi(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function _i(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function ki(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function wi(){return Ci(ci)}function Ei(){return Ci(ui)}var Ti=function(){return Ci(li)};function Ci(t){var e,n=mi,r=vi,i=bi,a=!0,o=lt("start","brush","end"),s=6;function c(e){var n=e.property("__brush",y).selectAll(".overlay").data([gi("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",hi.overlay).merge(n).each((function(){var t=xi(this).extent;ke(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([gi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",hi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return hi[t.type]})),e.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(i).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function u(){var t=ke(this),e=xi(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(t,e,n){return!n&&t.__brush.emitter||new h(t,e)}function h(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function f(){if((!e||ce.touches)&&r.apply(this,arguments)){var n,i,o,s,c,h,f,d,p,y,g,v=this,m=ce.target.__data__.type,b="selection"===(a&&ce.metaKey?m="overlay":m)?ei:a&&ce.altKey?ii:ri,x=t===ui?null:pi[m],_=t===ci?null:yi[m],k=xi(v),w=k.extent,E=k.selection,T=w[0][0],C=w[0][1],S=w[1][0],A=w[1][1],M=0,O=0,B=x&&_&&a&&ce.shiftKey,N=ce.touches?si(ce.changedTouches[0].identifier):Nn,D=N(v),L=D,I=l(v,arguments,!0).beforestart();"overlay"===m?(E&&(p=!0),k.selection=E=[[n=t===ui?T:D[0],o=t===ci?C:D[1]],[c=t===ui?S:n,f=t===ci?A:o]]):(n=E[0][0],o=E[0][1],c=E[1][0],f=E[1][1]),i=n,s=o,h=c,d=f;var R=ke(v).attr("pointer-events","none"),F=R.selectAll(".overlay").attr("cursor",hi[m]);if(ce.touches)I.moved=j,I.ended=z;else{var P=ke(ce.view).on("mousemove.brush",j,!0).on("mouseup.brush",z,!0);a&&P.on("keydown.brush",U,!0).on("keyup.brush",$,!0),Te(ce.view)}Jr(),or(v),u.call(v),I.start()}function j(){var t=N(v);!B||y||g||(Math.abs(t[0]-L[0])>Math.abs(t[1]-L[1])?g=!0:y=!0),L=t,p=!0,ti(),Y()}function Y(){var t;switch(M=L[0]-D[0],O=L[1]-D[1],b){case ni:case ei:x&&(M=Math.max(T-n,Math.min(S-c,M)),i=n+M,h=c+M),_&&(O=Math.max(C-o,Math.min(A-f,O)),s=o+O,d=f+O);break;case ri:x<0?(M=Math.max(T-n,Math.min(S-n,M)),i=n+M,h=c):x>0&&(M=Math.max(T-c,Math.min(S-c,M)),i=n,h=c+M),_<0?(O=Math.max(C-o,Math.min(A-o,O)),s=o+O,d=f):_>0&&(O=Math.max(C-f,Math.min(A-f,O)),s=o,d=f+O);break;case ii:x&&(i=Math.max(T,Math.min(S,n-M*x)),h=Math.max(T,Math.min(S,c+M*x))),_&&(s=Math.max(C,Math.min(A,o-O*_)),d=Math.max(C,Math.min(A,f+O*_)))}h<i&&(x*=-1,t=n,n=c,c=t,t=i,i=h,h=t,m in fi&&F.attr("cursor",hi[m=fi[m]])),d<s&&(_*=-1,t=o,o=f,f=t,t=s,s=d,d=t,m in di&&F.attr("cursor",hi[m=di[m]])),k.selection&&(E=k.selection),y&&(i=E[0][0],h=E[1][0]),g&&(s=E[0][1],d=E[1][1]),E[0][0]===i&&E[0][1]===s&&E[1][0]===h&&E[1][1]===d||(k.selection=[[i,s],[h,d]],u.call(v),I.brush())}function z(){if(Jr(),ce.touches){if(ce.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else Ce(ce.view,p),P.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);R.attr("pointer-events","all"),F.attr("cursor",hi.overlay),k.selection&&(E=k.selection),_i(E)&&(k.selection=null,u.call(v)),I.end()}function U(){switch(ce.keyCode){case 16:B=x&&_;break;case 18:b===ri&&(x&&(c=h-M*x,n=i+M*x),_&&(f=d-O*_,o=s+O*_),b=ii,Y());break;case 32:b!==ri&&b!==ii||(x<0?c=h-M:x>0&&(n=i-M),_<0?f=d-O:_>0&&(o=s-O),b=ni,F.attr("cursor",hi.selection),Y());break;default:return}ti()}function $(){switch(ce.keyCode){case 16:B&&(y=g=B=!1,Y());break;case 18:b===ii&&(x<0?c=h:x>0&&(n=i),_<0?f=d:_>0&&(o=s),b=ri,Y());break;case 32:b===ni&&(ce.altKey?(x&&(c=h-M*x,n=i+M*x),_&&(f=d-O*_,o=s+O*_),b=ii):(x<0?c=h:x>0&&(n=i),_<0?f=d:_>0&&(o=s),b=ri),F.attr("cursor",hi[m]),Y());break;default:return}ti()}}function d(){l(this,arguments).moved()}function p(){l(this,arguments).ended()}function y(){var e=this.__brush||{selection:null};return e.extent=oi(n.apply(this,arguments)),e.dim=t,e}return c.move=function(e,n){e.selection?e.on("start.brush",(function(){l(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){l(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=l(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=An(a,o);function c(t){r.selection=1===t&&null===o?null:s(t),u.call(e),i.brush()}return null!==a&&null!==o?c:c(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,a=t.input("function"==typeof n?n.apply(e,r):n,i.extent),o=l(e,r).beforestart();or(e),i.selection=null===a?null:a,u.call(e),o.start().brush().end()}))},c.clear=function(t){c.move(t,null)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){pe(new Kr(c,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},c.extent=function(t){return arguments.length?(n="function"==typeof t?t:Qr(oi(t)),c):n},c.filter=function(t){return arguments.length?(r="function"==typeof t?t:Qr(!!t),c):r},c.touchable=function(t){return arguments.length?(i="function"==typeof t?t:Qr(!!t),c):i},c.handleSize=function(t){return arguments.length?(s=+t,c):s},c.keyModifiers=function(t){return arguments.length?(a=!!t,c):a},c.on=function(){var t=o.on.apply(o,arguments);return t===o?c:t},c}var Si=Math.cos,Ai=Math.sin,Mi=Math.PI,Oi=Mi/2,Bi=2*Mi,Ni=Math.max;function Di(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}var Li=function(){var t=0,e=null,n=null,r=null;function i(i){var a,o,s,c,u,l,h=i.length,f=[],d=k(h),p=[],y=[],g=y.groups=new Array(h),v=new Array(h*h);for(a=0,u=-1;++u<h;){for(o=0,l=-1;++l<h;)o+=i[u][l];f.push(o),p.push(k(h)),a+=o}for(e&&d.sort((function(t,n){return e(f[t],f[n])})),n&&p.forEach((function(t,e){t.sort((function(t,r){return n(i[e][t],i[e][r])}))})),c=(a=Ni(0,Bi-t*h)/a)?t:Bi/h,o=0,u=-1;++u<h;){for(s=o,l=-1;++l<h;){var m=d[u],b=p[m][l],x=i[m][b],_=o,w=o+=x*a;v[b*h+m]={index:m,subindex:b,startAngle:_,endAngle:w,value:x}}g[m]={index:m,startAngle:s,endAngle:o,value:f[m]},o+=c}for(u=-1;++u<h;)for(l=u-1;++l<h;){var E=v[l*h+u],T=v[u*h+l];(E.value||T.value)&&y.push(E.value<T.value?{source:T,target:E}:{source:E,target:T})}return r?y.sort(r):y}return i.padAngle=function(e){return arguments.length?(t=Ni(0,e),i):t},i.sortGroups=function(t){return arguments.length?(e=t,i):e},i.sortSubgroups=function(t){return arguments.length?(n=t,i):n},i.sortChords=function(t){return arguments.length?(null==t?r=null:(r=Di(t))._=t,i):r&&r._},i},Ii=Array.prototype.slice,Ri=function(t){return function(){return t}},Fi=Math.PI,Pi=2*Fi,ji=Pi-1e-6;function Yi(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function zi(){return new Yi}Yi.prototype=zi.prototype={constructor:Yi,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,c=r-e,u=a-t,l=o-e,h=u*u+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(l*s-c*u)>1e-6&&i){var f=n-a,d=r-o,p=s*s+c*c,y=f*f+d*d,g=Math.sqrt(p),v=Math.sqrt(h),m=i*Math.tan((Fi-Math.acos((p+h-y)/(2*g*v)))/2),b=m/v,x=m/g;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*u)+","+(e+b*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>u*d)+","+(this._x1=t+x*s)+","+(this._y1=e+x*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),c=t+o,u=e+s,l=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+u:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-u)>1e-6)&&(this._+="L"+c+","+u),n&&(h<0&&(h=h%Pi+Pi),h>ji?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=c)+","+(this._y1=u):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Fi)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Ui=zi;function $i(t){return t.source}function qi(t){return t.target}function Wi(t){return t.radius}function Vi(t){return t.startAngle}function Hi(t){return t.endAngle}var Gi=function(){var t=$i,e=qi,n=Wi,r=Vi,i=Hi,a=null;function o(){var o,s=Ii.call(arguments),c=t.apply(this,s),u=e.apply(this,s),l=+n.apply(this,(s[0]=c,s)),h=r.apply(this,s)-Oi,f=i.apply(this,s)-Oi,d=l*Si(h),p=l*Ai(h),y=+n.apply(this,(s[0]=u,s)),g=r.apply(this,s)-Oi,v=i.apply(this,s)-Oi;if(a||(a=o=Ui()),a.moveTo(d,p),a.arc(0,0,l,h,f),h===g&&f===v||(a.quadraticCurveTo(0,0,y*Si(g),y*Ai(g)),a.arc(0,0,y,g,v)),a.quadraticCurveTo(0,0,d,p),a.closePath(),o)return a=null,o+""||null}return o.radius=function(t){return arguments.length?(n="function"==typeof t?t:Ri(+t),o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Ri(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ri(+t),o):i},o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(t){return arguments.length?(e=t,o):e},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o};function Xi(){}function Zi(t,e){var n=new Xi;if(t instanceof Xi)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}Xi.prototype=Zi.prototype={constructor:Xi,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var Qi=Zi,Ki=function(){var t,e,n,r=[],i=[];function a(n,i,o,s){if(i>=r.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var c,u,l,h=-1,f=n.length,d=r[i++],p=Qi(),y=o();++h<f;)(l=p.get(c=d(u=n[h])+""))?l.push(u):p.set(c,[u]);return p.each((function(t,e){s(y,e,a(t,i,o,s))})),y}return n={object:function(t){return a(t,0,Ji,ta)},map:function(t){return a(t,0,ea,na)},entries:function(t){return function t(n,a){if(++a>r.length)return n;var o,s=i[a-1];return null!=e&&a>=r.length?o=n.entries():(o=[],n.each((function(e,n){o.push({key:n,values:t(e,a)})}))),null!=s?o.sort((function(t,e){return s(t.key,e.key)})):o}(a(t,0,ea,na),0)},key:function(t){return r.push(t),n},sortKeys:function(t){return i[r.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}};function Ji(){return{}}function ta(t,e,n){t[e]=n}function ea(){return Qi()}function na(t,e,n){t.set(e,n)}function ra(){}var ia=Qi.prototype;function aa(t,e){var n=new ra;if(t instanceof ra)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}ra.prototype=aa.prototype={constructor:ra,has:ia.has,add:function(t){return this["$"+(t+="")]=t,this},remove:ia.remove,clear:ia.clear,values:ia.keys,size:ia.size,empty:ia.empty,each:ia.each};var oa=aa,sa=function(t){var e=[];for(var n in t)e.push(n);return e},ca=function(t){var e=[];for(var n in t)e.push(t[n]);return e},ua=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},la=Math.PI/180,ha=180/Math.PI;function fa(t){if(t instanceof ya)return new ya(t.l,t.a,t.b,t.opacity);if(t instanceof wa)return Ea(t);t instanceof Ge||(t=Ve(t));var e,n,r=ba(t.r),i=ba(t.g),a=ba(t.b),o=ga((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=ga((.4360747*r+.3850649*i+.1430804*a)/.96422),n=ga((.0139322*r+.0971045*i+.7141733*a)/.82521)),new ya(116*o-16,500*(e-o),200*(o-n),t.opacity)}function da(t,e){return new ya(t,0,0,null==e?1:e)}function pa(t,e,n,r){return 1===arguments.length?fa(t):new ya(t,e,n,null==r?1:r)}function ya(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function ga(t){return t>6/29*(6/29)*(6/29)?Math.pow(t,1/3):t/(6/29*3*(6/29))+4/29}function va(t){return t>6/29?t*t*t:6/29*3*(6/29)*(t-4/29)}function ma(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ba(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function xa(t){if(t instanceof wa)return new wa(t.h,t.c,t.l,t.opacity);if(t instanceof ya||(t=fa(t)),0===t.a&&0===t.b)return new wa(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*ha;return new wa(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function _a(t,e,n,r){return 1===arguments.length?xa(t):new wa(n,e,t,null==r?1:r)}function ka(t,e,n,r){return 1===arguments.length?xa(t):new wa(t,e,n,null==r?1:r)}function wa(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Ea(t){if(isNaN(t.h))return new ya(t.l,0,0,t.opacity);var e=t.h*la;return new ya(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Se(ya,pa,Ae(Me,{brighter:function(t){return new ya(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new ya(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Ge(ma(3.1338561*(e=.96422*va(e))-1.6168667*(t=1*va(t))-.4906146*(n=.82521*va(n))),ma(-.9787684*e+1.9161415*t+.033454*n),ma(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Se(wa,ka,Ae(Me,{brighter:function(t){return new wa(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new wa(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Ea(this).rgb()}}));var Ta=-.29227,Ca=-1.7884503806,Sa=3.5172982438,Aa=-.6557636667999999;function Ma(t){if(t instanceof Ba)return new Ba(t.h,t.s,t.l,t.opacity);t instanceof Ge||(t=Ve(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Aa*r+Ca*e-Sa*n)/(Aa+Ca-Sa),a=r-i,o=(1.97294*(n-i)-Ta*a)/-.90649,s=Math.sqrt(o*o+a*a)/(1.97294*i*(1-i)),c=s?Math.atan2(o,a)*ha-120:NaN;return new Ba(c<0?c+360:c,s,i,t.opacity)}function Oa(t,e,n,r){return 1===arguments.length?Ma(t):new Ba(t,e,n,null==r?1:r)}function Ba(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Se(Ba,Oa,Ae(Me,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ba(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ba(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*la,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Ge(255*(e+n*(-.14861*r+1.78277*i)),255*(e+n*(Ta*r+-.90649*i)),255*(e+n*(1.97294*r)),this.opacity)}}));var Na=Array.prototype.slice,Da=function(t,e){return t-e},La=function(t){return function(){return t}},Ia=function(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=Ra(t,e[r]))return n;return 0};function Ra(t,e){for(var n=e[0],r=e[1],i=-1,a=0,o=t.length,s=o-1;a<o;s=a++){var c=t[a],u=c[0],l=c[1],h=t[s],f=h[0],d=h[1];if(Fa(c,h,e))return 0;l>r!=d>r&&n<(f-u)*(r-l)/(d-l)+u&&(i=-i)}return i}function Fa(t,e,n){var r,i,a,o;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],a=n[r],o=e[r],i<=a&&a<=o||o<=a&&a<=i)}var Pa=function(){},ja=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]],Ya=function(){var t=1,e=1,n=M,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Da);else{var r=g(t),i=r[0],o=r[1];e=A(i,o,e),e=k(Math.floor(i/e)*e,Math.floor(o/e)*e,e)}return e.map((function(e){return a(t,e)}))}function a(n,i){var a=[],s=[];return function(n,r,i){var a,s,c,u,l,h,f=new Array,d=new Array;a=s=-1,u=n[0]>=r,ja[u<<1].forEach(p);for(;++a<t-1;)c=u,u=n[a+1]>=r,ja[c|u<<1].forEach(p);ja[u<<0].forEach(p);for(;++s<e-1;){for(a=-1,u=n[s*t+t]>=r,l=n[s*t]>=r,ja[u<<1|l<<2].forEach(p);++a<t-1;)c=u,u=n[s*t+t+a+1]>=r,h=l,l=n[s*t+a+1]>=r,ja[c|u<<1|l<<2|h<<3].forEach(p);ja[u|l<<3].forEach(p)}a=-1,l=n[s*t]>=r,ja[l<<2].forEach(p);for(;++a<t-1;)h=l,l=n[s*t+a+1]>=r,ja[l<<2|h<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+a,t[0][1]+s],c=[t[1][0]+a,t[1][1]+s],u=o(r),l=o(c);(e=d[u])?(n=f[l])?(delete d[e.end],delete f[n.start],e===n?(e.ring.push(c),i(e.ring)):f[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete d[e.end],e.ring.push(c),d[e.end=l]=e):(e=f[l])?(n=d[u])?(delete f[e.start],delete d[n.end],e===n?(e.ring.push(c),i(e.ring)):f[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete f[e.start],e.ring.unshift(r),f[e.start=u]=e):f[u]=d[l]={start:u,end:l,ring:[r,c]}}ja[l<<3].forEach(p)}(n,i,(function(t){r(t,n,i),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?a.push([t]):s.push(t)})),s.forEach((function(t){for(var e,n=0,r=a.length;n<r;++n)if(-1!==Ia((e=a[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:i,coordinates:a}}function o(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,i){n.forEach((function(n){var a,o=n[0],s=n[1],c=0|o,u=0|s,l=r[u*t+c];o>0&&o<t&&c===o&&(a=r[u*t+c-1],n[0]=o+(i-a)/(l-a)-.5),s>0&&s<e&&u===s&&(a=r[(u-1)*t+c],n[1]=s+(i-a)/(l-a)-.5)}))}return i.contour=a,i.size=function(n){if(!arguments.length)return[t,e];var r=Math.ceil(n[0]),a=Math.ceil(n[1]);if(!(r>0&&a>0))throw new Error("invalid size");return t=r,e=a,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?La(Na.call(t)):La(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:Pa,i):r===s},i};function za(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<i;++o)for(var s=0,c=0;s<r+n;++s)s<r&&(c+=t.data[s+o*r]),s>=n&&(s>=a&&(c-=t.data[s-a+o*r]),e.data[s-n+o*r]=c/Math.min(s+1,r-1+a-s,a))}function Ua(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<r;++o)for(var s=0,c=0;s<i+n;++s)s<i&&(c+=t.data[o+s*r]),s>=n&&(s>=a&&(c-=t.data[o+(s-a)*r]),e.data[o+(s-n)*r]=c/Math.min(s+1,i-1+a-s,a))}function $a(t){return t[0]}function qa(t){return t[1]}function Wa(){return 1}var Va=function(){var t=$a,e=qa,n=Wa,r=960,i=500,a=20,o=2,s=3*a,c=r+2*s>>o,u=i+2*s>>o,l=La(20);function h(r){var i=new Float32Array(c*u),h=new Float32Array(c*u);r.forEach((function(r,a,l){var h=+t(r,a,l)+s>>o,f=+e(r,a,l)+s>>o,d=+n(r,a,l);h>=0&&h<c&&f>=0&&f<u&&(i[h+f*c]+=d)})),za({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),Ua({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o),za({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),Ua({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o),za({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),Ua({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o);var d=l(i);if(!Array.isArray(d)){var p=L(i);d=A(0,p,d),(d=k(0,Math.floor(p/d)*d,d)).shift()}return Ya().thresholds(d).size([c,u])(i).map(f)}function f(t){return t.value*=Math.pow(2,-2*o),t.coordinates.forEach(d),t}function d(t){t.forEach(p)}function p(t){t.forEach(y)}function y(t){t[0]=t[0]*Math.pow(2,o)-s,t[1]=t[1]*Math.pow(2,o)-s}function g(){return c=r+2*(s=3*a)>>o,u=i+2*s>>o,h}return h.x=function(e){return arguments.length?(t="function"==typeof e?e:La(+e),h):t},h.y=function(t){return arguments.length?(e="function"==typeof t?t:La(+t),h):e},h.weight=function(t){return arguments.length?(n="function"==typeof t?t:La(+t),h):n},h.size=function(t){if(!arguments.length)return[r,i];var e=Math.ceil(t[0]),n=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return r=e,i=n,g()},h.cellSize=function(t){if(!arguments.length)return 1<<o;if(!((t=+t)>=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(t)/Math.LN2),g()},h.thresholds=function(t){return arguments.length?(l="function"==typeof t?t:Array.isArray(t)?La(Na.call(t)):La(t),h):l},h.bandwidth=function(t){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return a=Math.round((Math.sqrt(4*t*t+1)-1)/2),g()},h},Ha=function(t){return function(){return t}};function Ga(t,e,n,r,i,a,o,s,c,u){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=a,this.y=o,this.dx=s,this.dy=c,this._=u}function Xa(){return!ce.ctrlKey&&!ce.button}function Za(){return this.parentNode}function Qa(t){return null==t?{x:ce.x,y:ce.y}:t}function Ka(){return navigator.maxTouchPoints||"ontouchstart"in this}Ga.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Ja=function(){var t,e,n,r,i=Xa,a=Za,o=Qa,s=Ka,c={},u=lt("start","drag","end"),l=0,h=0;function f(t){t.on("mousedown.drag",d).filter(s).on("touchstart.drag",g).on("touchmove.drag",v).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(){if(!r&&i.apply(this,arguments)){var o=b("mouse",a.apply(this,arguments),Nn,this,arguments);o&&(ke(ce.view).on("mousemove.drag",p,!0).on("mouseup.drag",y,!0),Te(ce.view),we(),n=!1,t=ce.clientX,e=ce.clientY,o("start"))}}function p(){if(Ee(),!n){var r=ce.clientX-t,i=ce.clientY-e;n=r*r+i*i>h}c.mouse("drag")}function y(){ke(ce.view).on("mousemove.drag mouseup.drag",null),Ce(ce.view,n),Ee(),c.mouse("end")}function g(){if(i.apply(this,arguments)){var t,e,n=ce.changedTouches,r=a.apply(this,arguments),o=n.length;for(t=0;t<o;++t)(e=b(n[t].identifier,r,Bn,this,arguments))&&(we(),e("start"))}}function v(){var t,e,n=ce.changedTouches,r=n.length;for(t=0;t<r;++t)(e=c[n[t].identifier])&&(Ee(),e("drag"))}function m(){var t,e,n=ce.changedTouches,i=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(e=c[n[t].identifier])&&(we(),e("end"))}function b(t,e,n,r,i){var a,s,h,d=n(e,t),p=u.copy();if(pe(new Ga(f,"beforestart",a,t,l,d[0],d[1],0,0,p),(function(){return null!=(ce.subject=a=o.apply(r,i))&&(s=a.x-d[0]||0,h=a.y-d[1]||0,!0)})))return function o(u){var y,g=d;switch(u){case"start":c[t]=o,y=l++;break;case"end":delete c[t],--l;case"drag":d=n(e,t),y=l}pe(new Ga(f,u,a,t,y,d[0]+s,d[1]+h,d[0]-g[0],d[1]-g[1],p),p.apply,p,[u,r,i])}}return f.filter=function(t){return arguments.length?(i="function"==typeof t?t:Ha(!!t),f):i},f.container=function(t){return arguments.length?(a="function"==typeof t?t:Ha(t),f):a},f.subject=function(t){return arguments.length?(o="function"==typeof t?t:Ha(t),f):o},f.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Ha(!!t),f):s},f.on=function(){var t=u.on.apply(u,arguments);return t===u?f:t},f.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,f):Math.sqrt(h)},f},to={},eo={};function no(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function ro(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function io(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function ao(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+io(-e,6):e>9999?"+"+io(e,6):io(e,4))+"-"+io(t.getUTCMonth()+1,2)+"-"+io(t.getUTCDate(),2)+(a?"T"+io(n,2)+":"+io(r,2)+":"+io(i,2)+"."+io(a,3)+"Z":i?"T"+io(n,2)+":"+io(r,2)+":"+io(i,2)+"Z":r||n?"T"+io(n,2)+":"+io(r,2)+"Z":"")}var oo=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,s=0,c=a<=0,u=!1;function l(){if(c)return eo;if(u)return u=!1,to;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?c=!0:10===(r=t.charCodeAt(o++))?u=!0:13===r&&(u=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))u=!0;else if(13===r)u=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return c=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=l())!==eo;){for(var h=[];r!==to&&r!==eo;)h.push(r),r=l();e&&null==(h=e(h,s++))||i.push(h)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?ao(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=no(t);return function(r,i){return e(n(r),i,t)}}(t,e):no(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=ro(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=ro(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}},so=oo(","),co=so.parse,uo=so.parseRows,lo=so.format,ho=so.formatBody,fo=so.formatRows,po=so.formatRow,yo=so.formatValue,go=oo("\t"),vo=go.parse,mo=go.parseRows,bo=go.format,xo=go.formatBody,_o=go.formatRows,ko=go.formatRow,wo=go.formatValue;function Eo(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;To&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}var To=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function Co(t){return+t}function So(t){return t*t}function Ao(t){return t*(2-t)}function Mo(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var Oo=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),Bo=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),No=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Do=Math.PI,Lo=Do/2;function Io(t){return 1-Math.cos(t*Lo)}function Ro(t){return Math.sin(t*Lo)}function Fo(t){return(1-Math.cos(Do*t))/2}function Po(t){return Math.pow(2,10*t-10)}function jo(t){return 1-Math.pow(2,-10*t)}function Yo(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function zo(t){return 1-Math.sqrt(1-t*t)}function Uo(t){return Math.sqrt(1- --t*t)}function $o(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}function qo(t){return 1-Wo(1-t)}function Wo(t){return(t=+t)<4/11?7.5625*t*t:t<8/11?7.5625*(t-=6/11)*t+.75:t<10/11?7.5625*(t-=9/11)*t+.9375:7.5625*(t-=21/22)*t+63/64}function Vo(t){return((t*=2)<=1?1-Wo(1-t):Wo(t-1)+1)/2}var Ho=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),Go=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),Xo=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),Zo=2*Math.PI,Qo=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Zo);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Zo)},i.period=function(n){return t(e,n)},i}(1,.3),Ko=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Zo);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Zo)},i.period=function(n){return t(e,n)},i}(1,.3),Jo=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Zo);function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Zo)},i.period=function(n){return t(e,n)},i}(1,.3);function ts(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}var es=function(t,e){return fetch(t,e).then(ts)};function ns(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}var rs=function(t,e){return fetch(t,e).then(ns)};function is(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var as=function(t,e){return fetch(t,e).then(is)};function os(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),as(e,n).then((function(e){return t(e,r)}))}}function ss(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=oo(t);return as(e,n).then((function(t){return i.parse(t,r)}))}var cs=os(co),us=os(vo),ls=function(t,e){return new Promise((function(n,r){var i=new Image;for(var a in e)i[a]=e[a];i.onerror=r,i.onload=function(){n(i)},i.src=t}))};function hs(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}var fs=function(t,e){return fetch(t,e).then(hs)};function ds(t){return function(e,n){return as(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}var ps=ds("application/xml"),ys=ds("text/html"),gs=ds("image/svg+xml"),vs=function(t,e){var n;function r(){var r,i,a=n.length,o=0,s=0;for(r=0;r<a;++r)o+=(i=n[r]).x,s+=i.y;for(o=o/a-t,s=s/a-e,r=0;r<a;++r)(i=n[r]).x-=o,i.y-=s}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r},ms=function(t){return function(){return t}},bs=function(){return 1e-6*(Math.random()-.5)};function xs(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,s,c,u,l,h,f,d=t._root,p={data:r},y=t._x0,g=t._y0,v=t._x1,m=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((u=e>=(a=(y+v)/2))?y=a:v=a,(l=n>=(o=(g+m)/2))?g=o:m=o,i=d,!(d=d[h=l<<1|u]))return i[h]=p,t;if(s=+t._x.call(null,d.data),c=+t._y.call(null,d.data),e===s&&n===c)return p.next=d,i?i[h]=p:t._root=p,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(u=e>=(a=(y+v)/2))?y=a:v=a,(l=n>=(o=(g+m)/2))?g=o:m=o}while((h=l<<1|u)==(f=(c>=o)<<1|s>=a));return i[f]=d,i[h]=p,t}var _s=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function ks(t){return t[0]}function ws(t){return t[1]}function Es(t,e,n){var r=new Ts(null==e?ks:e,null==n?ws:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Ts(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Cs(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Ss=Es.prototype=Ts.prototype;function As(t){return t.x+t.vx}function Ms(t){return t.y+t.vy}Ss.copy=function(){var t,e,n=new Ts(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=Cs(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Cs(e));return n},Ss.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return xs(this.cover(e,n),e,n,t)},Ss.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),s=new Array(a),c=1/0,u=1/0,l=-1/0,h=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(o[n]=r,s[n]=i,r<c&&(c=r),r>l&&(l=r),i<u&&(u=i),i>h&&(h=i));if(c>l||u>h)return this;for(this.cover(c,u).cover(l,h),n=0;n<a;++n)xs(this,o[n],s[n],t[n]);return this},Ss.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,c=i-n,u=this._root;n>t||t>=i||r>e||e>=a;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=u,u=o,c*=2,s){case 0:i=n+c,a=r+c;break;case 1:n=i-c,a=r+c;break;case 2:i=n+c,r=a-c;break;case 3:n=i-c,r=a-c}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},Ss.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},Ss.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Ss.find=function(t,e,n){var r,i,a,o,s,c,u,l=this._x0,h=this._y0,f=this._x1,d=this._y1,p=[],y=this._root;for(y&&p.push(new _s(y,l,h,f,d)),null==n?n=1/0:(l=t-n,h=e-n,f=t+n,d=e+n,n*=n);c=p.pop();)if(!(!(y=c.node)||(i=c.x0)>f||(a=c.y0)>d||(o=c.x1)<l||(s=c.y1)<h))if(y.length){var g=(i+o)/2,v=(a+s)/2;p.push(new _s(y[3],g,v,o,s),new _s(y[2],i,v,g,s),new _s(y[1],g,a,o,v),new _s(y[0],i,a,g,v)),(u=(e>=v)<<1|t>=g)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-u],p[p.length-1-u]=c)}else{var m=t-+this._x.call(null,y.data),b=e-+this._y.call(null,y.data),x=m*m+b*b;if(x<n){var _=Math.sqrt(n=x);l=t-_,h=e-_,f=t+_,d=e+_,r=y.data}}return r},Ss.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,s,c,u,l,h,f,d=this._root,p=this._x0,y=this._y0,g=this._x1,v=this._y1;if(!d)return this;if(d.length)for(;;){if((u=a>=(s=(p+g)/2))?p=s:g=s,(l=o>=(c=(y+v)/2))?y=c:v=c,e=d,!(d=d[h=l<<1|u]))return this;if(!d.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,f=h)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[h]=i:delete e[h],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[f]=d:this._root=d),this):(this._root=i,this)},Ss.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Ss.root=function(){return this._root},Ss.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},Ss.visit=function(t){var e,n,r,i,a,o,s=[],c=this._root;for(c&&s.push(new _s(c,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(c=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&c.length){var u=(r+a)/2,l=(i+o)/2;(n=c[3])&&s.push(new _s(n,u,l,a,o)),(n=c[2])&&s.push(new _s(n,r,l,u,o)),(n=c[1])&&s.push(new _s(n,u,i,a,l)),(n=c[0])&&s.push(new _s(n,r,i,u,l))}return this},Ss.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new _s(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,s=e.y0,c=e.x1,u=e.y1,l=(o+c)/2,h=(s+u)/2;(a=i[0])&&n.push(new _s(a,o,s,l,h)),(a=i[1])&&n.push(new _s(a,l,s,c,h)),(a=i[2])&&n.push(new _s(a,o,h,l,u)),(a=i[3])&&n.push(new _s(a,l,h,c,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Ss.x=function(t){return arguments.length?(this._x=t,this):this._x},Ss.y=function(t){return arguments.length?(this._y=t,this):this._y};var Os=function(t){var e,n,r=1,i=1;function a(){for(var t,a,s,c,u,l,h,f=e.length,d=0;d<i;++d)for(a=Es(e,As,Ms).visitAfter(o),t=0;t<f;++t)s=e[t],l=n[s.index],h=l*l,c=s.x+s.vx,u=s.y+s.vy,a.visit(p);function p(t,e,n,i,a){var o=t.data,f=t.r,d=l+f;if(!o)return e>c+d||i<c-d||n>u+d||a<u-d;if(o.index>s.index){var p=c-o.x-o.vx,y=u-o.y-o.vy,g=p*p+y*y;g<d*d&&(0===p&&(g+=(p=bs())*p),0===y&&(g+=(y=bs())*y),g=(d-(g=Math.sqrt(g)))/g*r,s.vx+=(p*=g)*(d=(f*=f)/(h+f)),s.vy+=(y*=g)*d,o.vx-=p*(d=1-d),o.vy-=y*d)}}}function o(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function s(){if(e){var r,i,a=e.length;for(n=new Array(a),r=0;r<a;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=ms(null==t?1:+t)),a.initialize=function(t){e=t,s()},a.iterations=function(t){return arguments.length?(i=+t,a):i},a.strength=function(t){return arguments.length?(r=+t,a):r},a.radius=function(e){return arguments.length?(t="function"==typeof e?e:ms(+e),s(),a):t},a};function Bs(t){return t.index}function Ns(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}var Ds=function(t){var e,n,r,i,a,o=Bs,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},c=ms(30),u=1;function l(r){for(var i=0,o=t.length;i<u;++i)for(var s,c,l,h,f,d,p,y=0;y<o;++y)c=(s=t[y]).source,h=(l=s.target).x+l.vx-c.x-c.vx||bs(),f=l.y+l.vy-c.y-c.vy||bs(),h*=d=((d=Math.sqrt(h*h+f*f))-n[y])/d*r*e[y],f*=d,l.vx-=h*(p=a[y]),l.vy-=f*p,c.vx+=h*(p=1-p),c.vy+=f*p}function h(){if(r){var s,c,u=r.length,l=t.length,h=Qi(r,o);for(s=0,i=new Array(u);s<l;++s)(c=t[s]).index=s,"object"!=typeof c.source&&(c.source=Ns(h,c.source)),"object"!=typeof c.target&&(c.target=Ns(h,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(s=0,a=new Array(l);s<l;++s)c=t[s],a[s]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);e=new Array(l),f(),n=new Array(l),d()}}function f(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+s(t[n],n,t)}function d(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+c(t[e],e,t)}return null==t&&(t=[]),l.initialize=function(t){r=t,h()},l.links=function(e){return arguments.length?(t=e,h(),l):t},l.id=function(t){return arguments.length?(o=t,l):o},l.iterations=function(t){return arguments.length?(u=+t,l):u},l.strength=function(t){return arguments.length?(s="function"==typeof t?t:ms(+t),f(),l):s},l.distance=function(t){return arguments.length?(c="function"==typeof t?t:ms(+t),d(),l):c},l};function Ls(t){return t.x}function Is(t){return t.y}var Rs=Math.PI*(3-Math.sqrt(5)),Fs=function(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=Qi(),c=qn(l),u=lt("tick","end");function l(){h(),u.call("tick",e),n<r&&(c.stop(),u.call("end",e))}function h(r){var c,u,l=t.length;void 0===r&&(r=1);for(var h=0;h<r;++h)for(n+=(a-n)*i,s.each((function(t){t(n)})),c=0;c<l;++c)null==(u=t[c]).fx?u.x+=u.vx*=o:(u.x=u.fx,u.vx=0),null==u.fy?u.y+=u.vy*=o:(u.y=u.fy,u.vy=0);return e}function f(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(n),a=n*Rs;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function d(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),f(),e={tick:h,restart:function(){return c.restart(l),e},stop:function(){return c.stop(),e},nodes:function(n){return arguments.length?(t=n,f(),s.each(d),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(a=+t,e):a},velocityDecay:function(t){return arguments.length?(o=1-t,e):1-o},force:function(t,n){return arguments.length>1?(null==n?s.remove(t):s.set(t,d(n)),e):s.get(t)},find:function(e,n,r){var i,a,o,s,c,u=0,l=t.length;for(null==r?r=1/0:r*=r,u=0;u<l;++u)(o=(i=e-(s=t[u]).x)*i+(a=n-s.y)*a)<r&&(c=s,r=o);return c},on:function(t,n){return arguments.length>1?(u.on(t,n),e):u.on(t)}}},Ps=function(){var t,e,n,r,i=ms(-30),a=1,o=1/0,s=.81;function c(r){var i,a=t.length,o=Es(t,Ls,Is).visitAfter(l);for(n=r,i=0;i<a;++i)e=t[i],o.visit(h)}function u(){if(t){var e,n,a=t.length;for(r=new Array(a),e=0;e<a;++e)n=t[e],r[n.index]=+i(n,e,t)}}function l(t){var e,n,i,a,o,s=0,c=0;if(t.length){for(i=a=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(s+=e.value,c+=n,i+=n*e.x,a+=n*e.y);t.x=i/c,t.y=a/c}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=r[e.data.index]}while(e=e.next)}t.value=s}function h(t,i,c,u){if(!t.value)return!0;var l=t.x-e.x,h=t.y-e.y,f=u-i,d=l*l+h*h;if(f*f/s<d)return d<o&&(0===l&&(d+=(l=bs())*l),0===h&&(d+=(h=bs())*h),d<a&&(d=Math.sqrt(a*d)),e.vx+=l*t.value*n/d,e.vy+=h*t.value*n/d),!0;if(!(t.length||d>=o)){(t.data!==e||t.next)&&(0===l&&(d+=(l=bs())*l),0===h&&(d+=(h=bs())*h),d<a&&(d=Math.sqrt(a*d)));do{t.data!==e&&(f=r[t.data.index]*n/d,e.vx+=l*f,e.vy+=h*f)}while(t=t.next)}}return c.initialize=function(e){t=e,u()},c.strength=function(t){return arguments.length?(i="function"==typeof t?t:ms(+t),u(),c):i},c.distanceMin=function(t){return arguments.length?(a=t*t,c):Math.sqrt(a)},c.distanceMax=function(t){return arguments.length?(o=t*t,c):Math.sqrt(o)},c.theta=function(t){return arguments.length?(s=t*t,c):Math.sqrt(s)},c},js=function(t,e,n){var r,i,a,o=ms(.1);function s(t){for(var o=0,s=r.length;o<s;++o){var c=r[o],u=c.x-e||1e-6,l=c.y-n||1e-6,h=Math.sqrt(u*u+l*l),f=(a[o]-h)*i[o]*t/h;c.vx+=u*f,c.vy+=l*f}}function c(){if(r){var e,n=r.length;for(i=new Array(n),a=new Array(n),e=0;e<n;++e)a[e]=+t(r[e],e,r),i[e]=isNaN(a[e])?0:+o(r[e],e,r)}}return"function"!=typeof t&&(t=ms(+t)),null==e&&(e=0),null==n&&(n=0),s.initialize=function(t){r=t,c()},s.strength=function(t){return arguments.length?(o="function"==typeof t?t:ms(+t),c(),s):o},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:ms(+e),c(),s):t},s.x=function(t){return arguments.length?(e=+t,s):e},s.y=function(t){return arguments.length?(n=+t,s):n},s},Ys=function(t){var e,n,r,i=ms(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vx+=(r[a]-i.x)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=ms(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:ms(+t),o(),a):i},a.x=function(e){return arguments.length?(t="function"==typeof e?e:ms(+e),o(),a):t},a},zs=function(t){var e,n,r,i=ms(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vy+=(r[a]-i.y)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=ms(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:ms(+t),o(),a):i},a.y=function(e){return arguments.length?(t="function"==typeof e?e:ms(+e),o(),a):t},a},Us=function(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]},$s=function(t){return(t=Us(Math.abs(t)))?t[1]:NaN},qs=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ws(t){if(!(e=qs.exec(t)))throw new Error("invalid format: "+t);var e;return new Vs({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Vs(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}Ws.prototype=Vs.prototype,Vs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Hs,Gs,Xs,Zs,Qs=function(t,e){var n=Us(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},Ks={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Qs(100*t,e)},r:Qs,s:function(t,e){var n=Us(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Hs=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Us(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Js=function(t){return t},tc=Array.prototype.map,ec=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],nc=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Js:(e=tc.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(t.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Js:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(tc.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Ws(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,y=t.comma,g=t.precision,v=t.trim,m=t.type;"n"===m?(y=!0,m="g"):Ks[m]||(void 0===g&&(g=12),v=!0,m="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var b="$"===f?i:"#"===f&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",x="$"===f?a:/[%p]/.test(m)?c:"",_=Ks[m],k=/[defgprs%]/.test(m);function w(t){var i,a,c,f=b,w=x;if("c"===m)w=_(t)+w,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?l:_(Math.abs(t),g),v&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),E&&0==+t&&(E=!1),f=(E?"("===h?h:u:"-"===h||"("===h?"":h)+f,w=("s"===m?ec[8+Hs/3]:"")+w+(E&&"("===h?")":""),k)for(i=-1,a=t.length;++i<a;)if(48>(c=t.charCodeAt(i))||c>57){w=(46===c?o+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}y&&!d&&(t=r(t,1/0));var T=f.length+t.length+w.length,C=T<p?new Array(p-T+1).join(e):"";switch(y&&d&&(t=r(C+t,C.length?p-w.length:1/0),C=""),n){case"<":t=f+t+w+C;break;case"=":t=f+C+t+w;break;case"^":t=C.slice(0,T=C.length>>1)+f+t+w+C.slice(T);break;default:t=C+f+t+w}return s(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),w.toString=function(){return t+""},w}return{format:h,formatPrefix:function(t,e){var n=h(((t=Ws(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor($s(e)/3))),i=Math.pow(10,-r),a=ec[8+r/3];return function(t){return n(i*t)+a}}}};function rc(t){return Gs=nc(t),Xs=Gs.format,Zs=Gs.formatPrefix,Gs}rc({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var ic=function(t){return Math.max(0,-$s(Math.abs(t)))},ac=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor($s(e)/3)))-$s(Math.abs(t)))},oc=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,$s(e)-$s(t))+1},sc=function(){return new cc};function cc(){this.reset()}cc.prototype={constructor:cc,reset:function(){this.s=this.t=0},add:function(t){lc(uc,t,this.t),lc(this,uc.s,this.s),this.s?this.t+=uc.t:this.s=uc.t},valueOf:function(){return this.s}};var uc=new cc;function lc(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var hc=Math.PI,fc=hc/2,dc=hc/4,pc=2*hc,yc=180/hc,gc=hc/180,vc=Math.abs,mc=Math.atan,bc=Math.atan2,xc=Math.cos,_c=Math.ceil,kc=Math.exp,wc=(Math.floor,Math.log),Ec=Math.pow,Tc=Math.sin,Cc=Math.sign||function(t){return t>0?1:t<0?-1:0},Sc=Math.sqrt,Ac=Math.tan;function Mc(t){return t>1?0:t<-1?hc:Math.acos(t)}function Oc(t){return t>1?fc:t<-1?-fc:Math.asin(t)}function Bc(t){return(t=Tc(t/2))*t}function Nc(){}function Dc(t,e){t&&Ic.hasOwnProperty(t.type)&&Ic[t.type](t,e)}var Lc={Feature:function(t,e){Dc(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Dc(n[r].geometry,e)}},Ic={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Rc(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Rc(n[r],e,0)},Polygon:function(t,e){Fc(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Fc(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Dc(n[r],e)}};function Rc(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function Fc(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Rc(t[n],e,1);e.polygonEnd()}var Pc,jc,Yc,zc,Uc,$c=function(t,e){t&&Lc.hasOwnProperty(t.type)?Lc[t.type](t,e):Dc(t,e)},qc=sc(),Wc=sc(),Vc={point:Nc,lineStart:Nc,lineEnd:Nc,polygonStart:function(){qc.reset(),Vc.lineStart=Hc,Vc.lineEnd=Gc},polygonEnd:function(){var t=+qc;Wc.add(t<0?pc+t:t),this.lineStart=this.lineEnd=this.point=Nc},sphere:function(){Wc.add(pc)}};function Hc(){Vc.point=Xc}function Gc(){Zc(Pc,jc)}function Xc(t,e){Vc.point=Zc,Pc=t,jc=e,Yc=t*=gc,zc=xc(e=(e*=gc)/2+dc),Uc=Tc(e)}function Zc(t,e){var n=(t*=gc)-Yc,r=n>=0?1:-1,i=r*n,a=xc(e=(e*=gc)/2+dc),o=Tc(e),s=Uc*o,c=zc*a+s*xc(i),u=s*r*Tc(i);qc.add(bc(u,c)),Yc=t,zc=a,Uc=o}var Qc=function(t){return Wc.reset(),$c(t,Vc),2*Wc};function Kc(t){return[bc(t[1],t[0]),Oc(t[2])]}function Jc(t){var e=t[0],n=t[1],r=xc(n);return[r*xc(e),r*Tc(e),Tc(n)]}function tu(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function eu(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function nu(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function ru(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function iu(t){var e=Sc(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var au,ou,su,cu,uu,lu,hu,fu,du,pu,yu=sc(),gu={point:vu,lineStart:bu,lineEnd:xu,polygonStart:function(){gu.point=_u,gu.lineStart=ku,gu.lineEnd=wu,yu.reset(),Vc.polygonStart()},polygonEnd:function(){Vc.polygonEnd(),gu.point=vu,gu.lineStart=bu,gu.lineEnd=xu,qc<0?(au=-(su=180),ou=-(cu=90)):yu>1e-6?cu=90:yu<-1e-6&&(ou=-90),pu[0]=au,pu[1]=su},sphere:function(){au=-(su=180),ou=-(cu=90)}};function vu(t,e){du.push(pu=[au=t,su=t]),e<ou&&(ou=e),e>cu&&(cu=e)}function mu(t,e){var n=Jc([t*gc,e*gc]);if(fu){var r=eu(fu,n),i=eu([r[1],-r[0],0],r);iu(i),i=Kc(i);var a,o=t-uu,s=o>0?1:-1,c=i[0]*yc*s,u=vc(o)>180;u^(s*uu<c&&c<s*t)?(a=i[1]*yc)>cu&&(cu=a):u^(s*uu<(c=(c+360)%360-180)&&c<s*t)?(a=-i[1]*yc)<ou&&(ou=a):(e<ou&&(ou=e),e>cu&&(cu=e)),u?t<uu?Eu(au,t)>Eu(au,su)&&(su=t):Eu(t,su)>Eu(au,su)&&(au=t):su>=au?(t<au&&(au=t),t>su&&(su=t)):t>uu?Eu(au,t)>Eu(au,su)&&(su=t):Eu(t,su)>Eu(au,su)&&(au=t)}else du.push(pu=[au=t,su=t]);e<ou&&(ou=e),e>cu&&(cu=e),fu=n,uu=t}function bu(){gu.point=mu}function xu(){pu[0]=au,pu[1]=su,gu.point=vu,fu=null}function _u(t,e){if(fu){var n=t-uu;yu.add(vc(n)>180?n+(n>0?360:-360):n)}else lu=t,hu=e;Vc.point(t,e),mu(t,e)}function ku(){Vc.lineStart()}function wu(){_u(lu,hu),Vc.lineEnd(),vc(yu)>1e-6&&(au=-(su=180)),pu[0]=au,pu[1]=su,fu=null}function Eu(t,e){return(e-=t)<0?e+360:e}function Tu(t,e){return t[0]-e[0]}function Cu(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var Su,Au,Mu,Ou,Bu,Nu,Du,Lu,Iu,Ru,Fu,Pu,ju,Yu,zu,Uu,$u=function(t){var e,n,r,i,a,o,s;if(cu=su=-(au=ou=1/0),du=[],$c(t,gu),n=du.length){for(du.sort(Tu),e=1,a=[r=du[0]];e<n;++e)Cu(r,(i=du[e])[0])||Cu(r,i[1])?(Eu(r[0],i[1])>Eu(r[0],r[1])&&(r[1]=i[1]),Eu(i[0],r[1])>Eu(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,e=0,r=a[n=a.length-1];e<=n;r=i,++e)i=a[e],(s=Eu(r[1],i[0]))>o&&(o=s,au=i[0],su=r[1])}return du=pu=null,au===1/0||ou===1/0?[[NaN,NaN],[NaN,NaN]]:[[au,ou],[su,cu]]},qu={sphere:Nc,point:Wu,lineStart:Hu,lineEnd:Zu,polygonStart:function(){qu.lineStart=Qu,qu.lineEnd=Ku},polygonEnd:function(){qu.lineStart=Hu,qu.lineEnd=Zu}};function Wu(t,e){t*=gc;var n=xc(e*=gc);Vu(n*xc(t),n*Tc(t),Tc(e))}function Vu(t,e,n){++Su,Mu+=(t-Mu)/Su,Ou+=(e-Ou)/Su,Bu+=(n-Bu)/Su}function Hu(){qu.point=Gu}function Gu(t,e){t*=gc;var n=xc(e*=gc);Yu=n*xc(t),zu=n*Tc(t),Uu=Tc(e),qu.point=Xu,Vu(Yu,zu,Uu)}function Xu(t,e){t*=gc;var n=xc(e*=gc),r=n*xc(t),i=n*Tc(t),a=Tc(e),o=bc(Sc((o=zu*a-Uu*i)*o+(o=Uu*r-Yu*a)*o+(o=Yu*i-zu*r)*o),Yu*r+zu*i+Uu*a);Au+=o,Nu+=o*(Yu+(Yu=r)),Du+=o*(zu+(zu=i)),Lu+=o*(Uu+(Uu=a)),Vu(Yu,zu,Uu)}function Zu(){qu.point=Wu}function Qu(){qu.point=Ju}function Ku(){tl(Pu,ju),qu.point=Wu}function Ju(t,e){Pu=t,ju=e,t*=gc,e*=gc,qu.point=tl;var n=xc(e);Yu=n*xc(t),zu=n*Tc(t),Uu=Tc(e),Vu(Yu,zu,Uu)}function tl(t,e){t*=gc;var n=xc(e*=gc),r=n*xc(t),i=n*Tc(t),a=Tc(e),o=zu*a-Uu*i,s=Uu*r-Yu*a,c=Yu*i-zu*r,u=Sc(o*o+s*s+c*c),l=Oc(u),h=u&&-l/u;Iu+=h*o,Ru+=h*s,Fu+=h*c,Au+=l,Nu+=l*(Yu+(Yu=r)),Du+=l*(zu+(zu=i)),Lu+=l*(Uu+(Uu=a)),Vu(Yu,zu,Uu)}var el=function(t){Su=Au=Mu=Ou=Bu=Nu=Du=Lu=Iu=Ru=Fu=0,$c(t,qu);var e=Iu,n=Ru,r=Fu,i=e*e+n*n+r*r;return i<1e-12&&(e=Nu,n=Du,r=Lu,Au<1e-6&&(e=Mu,n=Ou,r=Bu),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[bc(n,e)*yc,Oc(r/Sc(i))*yc]},nl=function(t){return function(){return t}},rl=function(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n};function il(t,e){return[vc(t)>hc?t+Math.round(-t/pc)*pc:t,e]}function al(t,e,n){return(t%=pc)?e||n?rl(sl(t),cl(e,n)):sl(t):e||n?cl(e,n):il}function ol(t){return function(e,n){return[(e+=t)>hc?e-pc:e<-hc?e+pc:e,n]}}function sl(t){var e=ol(t);return e.invert=ol(-t),e}function cl(t,e){var n=xc(t),r=Tc(t),i=xc(e),a=Tc(e);function o(t,e){var o=xc(e),s=xc(t)*o,c=Tc(t)*o,u=Tc(e),l=u*n+s*r;return[bc(c*i-l*a,s*n-u*r),Oc(l*i+c*a)]}return o.invert=function(t,e){var o=xc(e),s=xc(t)*o,c=Tc(t)*o,u=Tc(e),l=u*i-c*a;return[bc(c*i+u*a,s*n+l*r),Oc(l*n-s*r)]},o}il.invert=il;var ul=function(t){function e(e){return(e=t(e[0]*gc,e[1]*gc))[0]*=yc,e[1]*=yc,e}return t=al(t[0]*gc,t[1]*gc,t.length>2?t[2]*gc:0),e.invert=function(e){return(e=t.invert(e[0]*gc,e[1]*gc))[0]*=yc,e[1]*=yc,e},e};function ll(t,e,n,r,i,a){if(n){var o=xc(e),s=Tc(e),c=r*n;null==i?(i=e+r*pc,a=e-c/2):(i=hl(o,i),a=hl(o,a),(r>0?i<a:i>a)&&(i+=r*pc));for(var u,l=i;r>0?l>a:l<a;l-=c)u=Kc([o,-s*xc(l),-s*Tc(l)]),t.point(u[0],u[1])}}function hl(t,e){(e=Jc(e))[0]-=t,iu(e);var n=Mc(-e[1]);return((-e[2]<0?-n:n)+pc-1e-6)%pc}var fl=function(){var t,e,n=nl([0,0]),r=nl(90),i=nl(6),a={point:function(n,r){t.push(n=e(n,r)),n[0]*=yc,n[1]*=yc}};function o(){var o=n.apply(this,arguments),s=r.apply(this,arguments)*gc,c=i.apply(this,arguments)*gc;return t=[],e=al(-o[0]*gc,-o[1]*gc,0).invert,ll(a,s,c,1),o={type:"Polygon",coordinates:[t]},t=e=null,o}return o.center=function(t){return arguments.length?(n="function"==typeof t?t:nl([+t[0],+t[1]]),o):n},o.radius=function(t){return arguments.length?(r="function"==typeof t?t:nl(+t),o):r},o.precision=function(t){return arguments.length?(i="function"==typeof t?t:nl(+t),o):i},o},dl=function(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:Nc,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},pl=function(t,e){return vc(t[0]-e[0])<1e-6&&vc(t[1]-e[1])<1e-6};function yl(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var gl=function(t,e,n,r,i){var a,o,s=[],c=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(pl(r,o)){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);i.lineEnd()}else s.push(n=new yl(r,t,null,!0)),c.push(n.o=new yl(r,null,n,!1)),s.push(n=new yl(o,t,null,!1)),c.push(n.o=new yl(o,null,n,!0))}})),s.length){for(c.sort(e),vl(s),vl(c),a=0,o=c.length;a<o;++a)c[a].e=n=!n;for(var u,l,h=s[0];;){for(var f=h,d=!0;f.v;)if((f=f.n)===h)return;u=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(a=0,o=u.length;a<o;++a)i.point((l=u[a])[0],l[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(d)for(u=f.p.z,a=u.length-1;a>=0;--a)i.point((l=u[a])[0],l[1]);else r(f.x,f.p.x,-1,i);f=f.p}u=(f=f.o).z,d=!d}while(!f.v);i.lineEnd()}}};function vl(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}var ml=sc();function bl(t){return vc(t[0])<=hc?t[0]:Cc(t[0])*((vc(t[0])+hc)%pc-hc)}var xl=function(t,e){var n=bl(e),r=e[1],i=Tc(r),a=[Tc(n),-xc(n),0],o=0,s=0;ml.reset(),1===i?r=fc+1e-6:-1===i&&(r=-fc-1e-6);for(var c=0,u=t.length;c<u;++c)if(h=(l=t[c]).length)for(var l,h,f=l[h-1],d=bl(f),p=f[1]/2+dc,y=Tc(p),g=xc(p),v=0;v<h;++v,d=b,y=_,g=k,f=m){var m=l[v],b=bl(m),x=m[1]/2+dc,_=Tc(x),k=xc(x),w=b-d,E=w>=0?1:-1,T=E*w,C=T>hc,S=y*_;if(ml.add(bc(S*E*Tc(T),g*k+S*xc(T))),o+=C?w+E*pc:w,C^d>=n^b>=n){var A=eu(Jc(f),Jc(m));iu(A);var M=eu(a,A);iu(M);var O=(C^w>=0?-1:1)*Oc(M[2]);(r>O||r===O&&(A[0]||A[1]))&&(s+=C^w>=0?1:-1)}}return(o<-1e-6||o<1e-6&&ml<-1e-6)^1&s},_l=function(t,e,n,r){return function(i){var a,o,s,c=e(i),u=dl(),l=e(u),h=!1,f={point:d,lineStart:y,lineEnd:g,polygonStart:function(){f.point=v,f.lineStart=m,f.lineEnd=b,o=[],a=[]},polygonEnd:function(){f.point=d,f.lineStart=y,f.lineEnd=g,o=F(o);var t=xl(a,r);o.length?(h||(i.polygonStart(),h=!0),gl(o,wl,t,n,i)):t&&(h||(i.polygonStart(),h=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),h&&(i.polygonEnd(),h=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(e,n){t(e,n)&&i.point(e,n)}function p(t,e){c.point(t,e)}function y(){f.point=p,c.lineStart()}function g(){f.point=d,c.lineEnd()}function v(t,e){s.push([t,e]),l.point(t,e)}function m(){l.lineStart(),s=[]}function b(){v(s[0][0],s[0][1]),l.lineEnd();var t,e,n,r,c=l.clean(),f=u.result(),d=f.length;if(s.pop(),a.push(s),s=null,d)if(1&c){if((e=(n=f[0]).length-1)>0){for(h||(i.polygonStart(),h=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else d>1&&2&c&&f.push(f.pop().concat(f.shift())),o.push(f.filter(kl))}return f}};function kl(t){return t.length>1}function wl(t,e){return((t=t.x)[0]<0?t[1]-fc-1e-6:fc-t[1])-((e=e.x)[0]<0?e[1]-fc-1e-6:fc-e[1])}var El=_l((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?hc:-hc,c=vc(a-n);vc(c-hc)<1e-6?(t.point(n,r=(r+o)/2>0?fc:-fc),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&c>=hc&&(vc(n-i)<1e-6&&(n-=1e-6*i),vc(a-s)<1e-6&&(a-=1e-6*s),r=function(t,e,n,r){var i,a,o=Tc(t-n);return vc(o)>1e-6?mc((Tc(e)*(a=xc(r))*Tc(n)-Tc(r)*(i=xc(e))*Tc(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=a,r=o),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*fc,r.point(-hc,i),r.point(0,i),r.point(hc,i),r.point(hc,0),r.point(hc,-i),r.point(0,-i),r.point(-hc,-i),r.point(-hc,0),r.point(-hc,i);else if(vc(t[0]-e[0])>1e-6){var a=t[0]<e[0]?hc:-hc;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-hc,-fc]);var Tl=function(t){var e=xc(t),n=6*gc,r=e>0,i=vc(e)>1e-6;function a(t,n){return xc(t)*xc(n)>e}function o(t,n,r){var i=[1,0,0],a=eu(Jc(t),Jc(n)),o=tu(a,a),s=a[0],c=o-s*s;if(!c)return!r&&t;var u=e*o/c,l=-e*s/c,h=eu(i,a),f=ru(i,u);nu(f,ru(a,l));var d=h,p=tu(f,d),y=tu(d,d),g=p*p-y*(tu(f,f)-1);if(!(g<0)){var v=Sc(g),m=ru(d,(-p-v)/y);if(nu(m,f),m=Kc(m),!r)return m;var b,x=t[0],_=n[0],k=t[1],w=n[1];_<x&&(b=x,x=_,_=b);var E=_-x,T=vc(E-hc)<1e-6;if(!T&&w<k&&(b=k,k=w,w=b),T||E<1e-6?T?k+w>0^m[1]<(vc(m[0]-x)<1e-6?k:w):k<=m[1]&&m[1]<=w:E>hc^(x<=m[0]&&m[0]<=_)){var C=ru(d,(-p+v)/y);return nu(C,f),[m,Kc(C)]}}}function s(e,n){var i=r?t:hc-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return _l(a,(function(t){var e,n,c,u,l;return{lineStart:function(){u=c=!1,l=1},point:function(h,f){var d,p=[h,f],y=a(h,f),g=r?y?0:s(h,f):y?s(h+(h<0?hc:-hc),f):0;if(!e&&(u=c=y)&&t.lineStart(),y!==c&&(!(d=o(e,p))||pl(e,d)||pl(p,d))&&(p[0]+=1e-6,p[1]+=1e-6,y=a(p[0],p[1])),y!==c)l=0,y?(t.lineStart(),d=o(p,e),t.point(d[0],d[1])):(d=o(e,p),t.point(d[0],d[1]),t.lineEnd()),e=d;else if(i&&e&&r^y){var v;g&n||!(v=o(p,e,!0))||(l=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!y||e&&pl(e,p)||t.point(p[0],p[1]),e=p,c=y,n=g},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return l|(u&&c)<<1}}}),(function(e,r,i,a){ll(a,t,n,i,e,r)}),r?[0,-t]:[-hc,t-hc])};function Cl(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,s,u){var l=0,h=0;if(null==i||(l=o(i,s))!==(h=o(a,s))||c(i,a)<0^s>0)do{u.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+s+4)%4)!==h);else u.point(a[0],a[1])}function o(r,i){return vc(r[0]-t)<1e-6?i>0?0:3:vc(r[0]-n)<1e-6?i>0?2:1:vc(r[1]-e)<1e-6?i>0?1:0:i>0?3:2}function s(t,e){return c(t.x,e.x)}function c(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var c,u,l,h,f,d,p,y,g,v,m,b=o,x=dl(),_={point:k,lineStart:function(){_.point=w,u&&u.push(l=[]);v=!0,g=!1,p=y=NaN},lineEnd:function(){c&&(w(h,f),d&&g&&x.rejoin(),c.push(x.result()));_.point=k,g&&b.lineEnd()},polygonStart:function(){b=x,c=[],u=[],m=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var a,o,s=u[n],c=1,l=s.length,h=s[0],f=h[0],d=h[1];c<l;++c)a=f,o=d,h=s[c],f=h[0],d=h[1],o<=r?d>r&&(f-a)*(r-o)>(d-o)*(t-a)&&++e:d<=r&&(f-a)*(r-o)<(d-o)*(t-a)&&--e;return e}(),n=m&&e,i=(c=F(c)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&gl(c,s,e,a,o),o.polygonEnd());b=o,c=u=l=null}};function k(t,e){i(t,e)&&b.point(t,e)}function w(a,o){var s=i(a,o);if(u&&l.push([a,o]),v)h=a,f=o,d=s,v=!1,s&&(b.lineStart(),b.point(a,o));else if(s&&g)b.point(a,o);else{var c=[p=Math.max(-1e9,Math.min(1e9,p)),y=Math.max(-1e9,Math.min(1e9,y))],x=[a=Math.max(-1e9,Math.min(1e9,a)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,n,r,i,a){var o,s=t[0],c=t[1],u=0,l=1,h=e[0]-s,f=e[1]-c;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<u)return;o<l&&(l=o)}else if(h>0){if(o>l)return;o>u&&(u=o)}if(o=i-s,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>u&&(u=o)}else if(h>0){if(o<u)return;o<l&&(l=o)}if(o=r-c,f||!(o>0)){if(o/=f,f<0){if(o<u)return;o<l&&(l=o)}else if(f>0){if(o>l)return;o>u&&(u=o)}if(o=a-c,f||!(o<0)){if(o/=f,f<0){if(o>l)return;o>u&&(u=o)}else if(f>0){if(o<u)return;o<l&&(l=o)}return u>0&&(t[0]=s+u*h,t[1]=c+u*f),l<1&&(e[0]=s+l*h,e[1]=c+l*f),!0}}}}}(c,x,t,e,n,r)?s&&(b.lineStart(),b.point(a,o),m=!1):(g||(b.lineStart(),b.point(c[0],c[1])),b.point(x[0],x[1]),s||b.lineEnd(),m=!1)}p=a,y=o,g=s}return _}}var Sl,Al,Ml,Ol=function(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=Cl(r,i,a,o)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],a=+s[1][0],o=+s[1][1],t=e=null,n):[[r,i],[a,o]]}}},Bl=sc(),Nl={sphere:Nc,point:Nc,lineStart:function(){Nl.point=Ll,Nl.lineEnd=Dl},lineEnd:Nc,polygonStart:Nc,polygonEnd:Nc};function Dl(){Nl.point=Nl.lineEnd=Nc}function Ll(t,e){Sl=t*=gc,Al=Tc(e*=gc),Ml=xc(e),Nl.point=Il}function Il(t,e){t*=gc;var n=Tc(e*=gc),r=xc(e),i=vc(t-Sl),a=xc(i),o=r*Tc(i),s=Ml*n-Al*r*a,c=Al*n+Ml*r*a;Bl.add(bc(Sc(o*o+s*s),c)),Sl=t,Al=n,Ml=r}var Rl=function(t){return Bl.reset(),$c(t,Nl),+Bl},Fl=[null,null],Pl={type:"LineString",coordinates:Fl},jl=function(t,e){return Fl[0]=t,Fl[1]=e,Rl(Pl)},Yl={Feature:function(t,e){return Ul(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Ul(n[r].geometry,e))return!0;return!1}},zl={Sphere:function(){return!0},Point:function(t,e){return $l(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if($l(n[r],e))return!0;return!1},LineString:function(t,e){return ql(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(ql(n[r],e))return!0;return!1},Polygon:function(t,e){return Wl(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Wl(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Ul(n[r],e))return!0;return!1}};function Ul(t,e){return!(!t||!zl.hasOwnProperty(t.type))&&zl[t.type](t,e)}function $l(t,e){return 0===jl(t,e)}function ql(t,e){for(var n,r,i,a=0,o=t.length;a<o;a++){if(0===(r=jl(t[a],e)))return!0;if(a>0&&(i=jl(t[a],t[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<1e-12*i)return!0;n=r}return!1}function Wl(t,e){return!!xl(t.map(Vl),Hl(e))}function Vl(t){return(t=t.map(Hl)).pop(),t}function Hl(t){return[t[0]*gc,t[1]*gc]}var Gl=function(t,e){return(t&&Yl.hasOwnProperty(t.type)?Yl[t.type]:Ul)(t,e)};function Xl(t,e,n){var r=k(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function Zl(t,e,n){var r=k(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function Ql(){var t,e,n,r,i,a,o,s,c,u,l,h,f=10,d=f,p=90,y=360,g=2.5;function v(){return{type:"MultiLineString",coordinates:m()}}function m(){return k(_c(r/p)*p,n,p).map(l).concat(k(_c(s/y)*y,o,y).map(h)).concat(k(_c(e/f)*f,t,f).filter((function(t){return vc(t%p)>1e-6})).map(c)).concat(k(_c(a/d)*d,i,d).filter((function(t){return vc(t%y)>1e-6})).map(u))}return v.lines=function(){return m().map((function(t){return{type:"LineString",coordinates:t}}))},v.outline=function(){return{type:"Polygon",coordinates:[l(r).concat(h(o).slice(1),l(n).reverse().slice(1),h(s).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),s>o&&(t=s,s=o,o=t),v.precision(g)):[[r,s],[n,o]]},v.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),v.precision(g)):[[e,a],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(p=+t[0],y=+t[1],v):[p,y]},v.stepMinor=function(t){return arguments.length?(f=+t[0],d=+t[1],v):[f,d]},v.precision=function(f){return arguments.length?(g=+f,c=Xl(a,i,90),u=Zl(e,t,g),l=Xl(s,o,90),h=Zl(r,n,g),v):g},v.extentMajor([[-180,1e-6-90],[180,90-1e-6]]).extentMinor([[-180,-80-1e-6],[180,80+1e-6]])}function Kl(){return Ql()()}var Jl,th,eh,nh,rh=function(t,e){var n=t[0]*gc,r=t[1]*gc,i=e[0]*gc,a=e[1]*gc,o=xc(r),s=Tc(r),c=xc(a),u=Tc(a),l=o*xc(n),h=o*Tc(n),f=c*xc(i),d=c*Tc(i),p=2*Oc(Sc(Bc(a-r)+o*c*Bc(i-n))),y=Tc(p),g=p?function(t){var e=Tc(t*=p)/y,n=Tc(p-t)/y,r=n*l+e*f,i=n*h+e*d,a=n*s+e*u;return[bc(i,r)*yc,bc(a,Sc(r*r+i*i))*yc]}:function(){return[n*yc,r*yc]};return g.distance=p,g},ih=function(t){return t},ah=sc(),oh=sc(),sh={point:Nc,lineStart:Nc,lineEnd:Nc,polygonStart:function(){sh.lineStart=ch,sh.lineEnd=hh},polygonEnd:function(){sh.lineStart=sh.lineEnd=sh.point=Nc,ah.add(vc(oh)),oh.reset()},result:function(){var t=ah/2;return ah.reset(),t}};function ch(){sh.point=uh}function uh(t,e){sh.point=lh,Jl=eh=t,th=nh=e}function lh(t,e){oh.add(nh*t-eh*e),eh=t,nh=e}function hh(){lh(Jl,th)}var fh=sh,dh=1/0,ph=dh,yh=-dh,gh=yh;var vh,mh,bh,xh,_h={point:function(t,e){t<dh&&(dh=t);t>yh&&(yh=t);e<ph&&(ph=e);e>gh&&(gh=e)},lineStart:Nc,lineEnd:Nc,polygonStart:Nc,polygonEnd:Nc,result:function(){var t=[[dh,ph],[yh,gh]];return yh=gh=-(ph=dh=1/0),t}},kh=0,wh=0,Eh=0,Th=0,Ch=0,Sh=0,Ah=0,Mh=0,Oh=0,Bh={point:Nh,lineStart:Dh,lineEnd:Rh,polygonStart:function(){Bh.lineStart=Fh,Bh.lineEnd=Ph},polygonEnd:function(){Bh.point=Nh,Bh.lineStart=Dh,Bh.lineEnd=Rh},result:function(){var t=Oh?[Ah/Oh,Mh/Oh]:Sh?[Th/Sh,Ch/Sh]:Eh?[kh/Eh,wh/Eh]:[NaN,NaN];return kh=wh=Eh=Th=Ch=Sh=Ah=Mh=Oh=0,t}};function Nh(t,e){kh+=t,wh+=e,++Eh}function Dh(){Bh.point=Lh}function Lh(t,e){Bh.point=Ih,Nh(bh=t,xh=e)}function Ih(t,e){var n=t-bh,r=e-xh,i=Sc(n*n+r*r);Th+=i*(bh+t)/2,Ch+=i*(xh+e)/2,Sh+=i,Nh(bh=t,xh=e)}function Rh(){Bh.point=Nh}function Fh(){Bh.point=jh}function Ph(){Yh(vh,mh)}function jh(t,e){Bh.point=Yh,Nh(vh=bh=t,mh=xh=e)}function Yh(t,e){var n=t-bh,r=e-xh,i=Sc(n*n+r*r);Th+=i*(bh+t)/2,Ch+=i*(xh+e)/2,Sh+=i,Ah+=(i=xh*t-bh*e)*(bh+t),Mh+=i*(xh+e),Oh+=3*i,Nh(bh=t,xh=e)}var zh=Bh;function Uh(t){this._context=t}Uh.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,pc)}},result:Nc};var $h,qh,Wh,Vh,Hh,Gh=sc(),Xh={point:Nc,lineStart:function(){Xh.point=Zh},lineEnd:function(){$h&&Qh(qh,Wh),Xh.point=Nc},polygonStart:function(){$h=!0},polygonEnd:function(){$h=null},result:function(){var t=+Gh;return Gh.reset(),t}};function Zh(t,e){Xh.point=Qh,qh=Vh=t,Wh=Hh=e}function Qh(t,e){Vh-=t,Hh-=e,Gh.add(Sc(Vh*Vh+Hh*Hh)),Vh=t,Hh=e}var Kh=Xh;function Jh(){this._string=[]}function tf(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Jh.prototype={_radius:4.5,_circle:tf(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=tf(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var ef=function(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),$c(t,n(r))),r.result()}return a.area=function(t){return $c(t,n(fh)),fh.result()},a.measure=function(t){return $c(t,n(Kh)),Kh.result()},a.bounds=function(t){return $c(t,n(_h)),_h.result()},a.centroid=function(t){return $c(t,n(zh)),zh.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,ih):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new Jh):new Uh(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.projection(t).context(e)},nf=function(t){return{stream:rf(t)}};function rf(t){return function(e){var n=new af;for(var r in t)n[r]=t[r];return n.stream=e,n}}function af(){}function of(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),$c(n,t.stream(_h)),e(_h.result()),null!=r&&t.clipExtent(r),t}function sf(t,e,n){return of(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s])}),n)}function cf(t,e,n){return sf(t,[[0,0],e],n)}function uf(t,e,n){return of(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])}),n)}function lf(t,e,n){return of(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])}),n)}af.prototype={constructor:af,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var hf=xc(30*gc),ff=function(t,e){return+e?function(t,e){function n(r,i,a,o,s,c,u,l,h,f,d,p,y,g){var v=u-r,m=l-i,b=v*v+m*m;if(b>4*e&&y--){var x=o+f,_=s+d,k=c+p,w=Sc(x*x+_*_+k*k),E=Oc(k/=w),T=vc(vc(k)-1)<1e-6||vc(a-h)<1e-6?(a+h)/2:bc(_,x),C=t(T,E),S=C[0],A=C[1],M=S-r,O=A-i,B=m*M-v*O;(B*B/b>e||vc((v*M+m*O)/b-.5)>.3||o*f+s*d+c*p<hf)&&(n(r,i,a,o,s,c,S,A,T,x/=w,_/=w,k,y,g),g.point(S,A),n(S,A,T,x,_,k,u,l,h,f,d,p,y,g))}}return function(e){var r,i,a,o,s,c,u,l,h,f,d,p,y={point:g,lineStart:v,lineEnd:b,polygonStart:function(){e.polygonStart(),y.lineStart=x},polygonEnd:function(){e.polygonEnd(),y.lineStart=v}};function g(n,r){n=t(n,r),e.point(n[0],n[1])}function v(){l=NaN,y.point=m,e.lineStart()}function m(r,i){var a=Jc([r,i]),o=t(r,i);n(l,h,u,f,d,p,l=o[0],h=o[1],u=r,f=a[0],d=a[1],p=a[2],16,e),e.point(l,h)}function b(){y.point=g,e.lineEnd()}function x(){v(),y.point=_,y.lineEnd=k}function _(t,e){m(r=t,e),i=l,a=h,o=f,s=d,c=p,y.point=m}function k(){n(l,h,u,f,d,p,i,a,r,o,s,c,16,e),y.lineEnd=b,b()}return y}}(t,e):function(t){return rf({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)};var df=rf({point:function(t,e){this.stream.point(t*gc,e*gc)}});function pf(t,e,n){function r(r,i){return[e+t*r,n-t*i]}return r.invert=function(r,i){return[(r-e)/t,(n-i)/t]},r}function yf(t,e,n,r){var i=xc(r),a=Tc(r),o=i*t,s=a*t,c=i/t,u=a/t,l=(a*n-i*e)/t,h=(a*e+i*n)/t;function f(t,r){return[o*t-s*r+e,n-s*t-o*r]}return f.invert=function(t,e){return[c*t-u*e+l,h-u*t-c*e]},f}function gf(t){return vf((function(){return t}))()}function vf(t){var e,n,r,i,a,o,s,c,u,l,h=150,f=480,d=250,p=0,y=0,g=0,v=0,m=0,b=0,x=null,_=El,k=null,w=ih,E=.5;function T(t){return c(t[0]*gc,t[1]*gc)}function C(t){return(t=c.invert(t[0],t[1]))&&[t[0]*yc,t[1]*yc]}function S(){var t=yf(h,0,0,b).apply(null,e(p,y)),r=(b?yf:pf)(h,f-t[0],d-t[1],b);return n=al(g,v,m),s=rl(e,r),c=rl(n,s),o=ff(s,E),A()}function A(){return u=l=null,T}return T.stream=function(t){return u&&l===t?u:u=df(function(t){return rf({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(_(o(w(l=t)))))},T.preclip=function(t){return arguments.length?(_=t,x=void 0,A()):_},T.postclip=function(t){return arguments.length?(w=t,k=r=i=a=null,A()):w},T.clipAngle=function(t){return arguments.length?(_=+t?Tl(x=t*gc):(x=null,El),A()):x*yc},T.clipExtent=function(t){return arguments.length?(w=null==t?(k=r=i=a=null,ih):Cl(k=+t[0][0],r=+t[0][1],i=+t[1][0],a=+t[1][1]),A()):null==k?null:[[k,r],[i,a]]},T.scale=function(t){return arguments.length?(h=+t,S()):h},T.translate=function(t){return arguments.length?(f=+t[0],d=+t[1],S()):[f,d]},T.center=function(t){return arguments.length?(p=t[0]%360*gc,y=t[1]%360*gc,S()):[p*yc,y*yc]},T.rotate=function(t){return arguments.length?(g=t[0]%360*gc,v=t[1]%360*gc,m=t.length>2?t[2]%360*gc:0,S()):[g*yc,v*yc,m*yc]},T.angle=function(t){return arguments.length?(b=t%360*gc,S()):b*yc},T.precision=function(t){return arguments.length?(o=ff(s,E=t*t),A()):Sc(E)},T.fitExtent=function(t,e){return sf(T,t,e)},T.fitSize=function(t,e){return cf(T,t,e)},T.fitWidth=function(t,e){return uf(T,t,e)},T.fitHeight=function(t,e){return lf(T,t,e)},function(){return e=t.apply(this,arguments),T.invert=e.invert&&C,S()}}function mf(t){var e=0,n=hc/3,r=vf(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*gc,n=t[1]*gc):[e*yc,n*yc]},i}function bf(t,e){var n=Tc(t),r=(n+Tc(e))/2;if(vc(r)<1e-6)return function(t){var e=xc(t);function n(t,n){return[t*e,Tc(n)/e]}return n.invert=function(t,n){return[t/e,Oc(n*e)]},n}(t);var i=1+n*(2*r-n),a=Sc(i)/r;function o(t,e){var n=Sc(i-2*r*Tc(e))/r;return[n*Tc(t*=r),a-n*xc(t)]}return o.invert=function(t,e){var n=a-e;return[bc(t,vc(n))/r*Cc(n),Oc((i-(t*t+n*n)*r*r)/(2*r))]},o}var xf=function(){return mf(bf).scale(155.424).center([0,33.6442])},_f=function(){return xf().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};var kf=function(){var t,e,n,r,i,a,o=_f(),s=xf().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=xf().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){a=[t,e]}};function l(t){var e=t[0],o=t[1];return a=null,n.point(e,o),a||(r.point(e,o),a)||(i.point(e,o),a)}function h(){return t=e=null,l}return l.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(t)},l.stream=function(n){return t&&e===n?t:(r=[o.stream(e=n),s.stream(n),c.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},l.precision=function(t){return arguments.length?(o.precision(t),s.precision(t),c.precision(t),h()):o.precision()},l.scale=function(t){return arguments.length?(o.scale(t),s.scale(.35*t),c.scale(t),l.translate(o.translate())):o.scale()},l.translate=function(t){if(!arguments.length)return o.translate();var e=o.scale(),a=+t[0],l=+t[1];return n=o.translate(t).clipExtent([[a-.455*e,l-.238*e],[a+.455*e,l+.238*e]]).stream(u),r=s.translate([a-.307*e,l+.201*e]).clipExtent([[a-.425*e+1e-6,l+.12*e+1e-6],[a-.214*e-1e-6,l+.234*e-1e-6]]).stream(u),i=c.translate([a-.205*e,l+.212*e]).clipExtent([[a-.214*e+1e-6,l+.166*e+1e-6],[a-.115*e-1e-6,l+.234*e-1e-6]]).stream(u),h()},l.fitExtent=function(t,e){return sf(l,t,e)},l.fitSize=function(t,e){return cf(l,t,e)},l.fitWidth=function(t,e){return uf(l,t,e)},l.fitHeight=function(t,e){return lf(l,t,e)},l.scale(1070)};function wf(t){return function(e,n){var r=xc(e),i=xc(n),a=t(r*i);return[a*i*Tc(e),a*Tc(n)]}}function Ef(t){return function(e,n){var r=Sc(e*e+n*n),i=t(r),a=Tc(i),o=xc(i);return[bc(e*a,r*o),Oc(r&&n*a/r)]}}var Tf=wf((function(t){return Sc(2/(1+t))}));Tf.invert=Ef((function(t){return 2*Oc(t/2)}));var Cf=function(){return gf(Tf).scale(124.75).clipAngle(179.999)},Sf=wf((function(t){return(t=Mc(t))&&t/Tc(t)}));Sf.invert=Ef((function(t){return t}));var Af=function(){return gf(Sf).scale(79.4188).clipAngle(179.999)};function Mf(t,e){return[t,wc(Ac((fc+e)/2))]}Mf.invert=function(t,e){return[t,2*mc(kc(e))-fc]};var Of=function(){return Bf(Mf).scale(961/pc)};function Bf(t){var e,n,r,i=gf(t),a=i.center,o=i.scale,s=i.translate,c=i.clipExtent,u=null;function l(){var a=hc*o(),s=i(ul(i.rotate()).invert([0,0]));return c(null==u?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:t===Mf?[[Math.max(s[0]-a,u),e],[Math.min(s[0]+a,n),r]]:[[u,Math.max(s[1]-a,e)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(t){return arguments.length?(o(t),l()):o()},i.translate=function(t){return arguments.length?(s(t),l()):s()},i.center=function(t){return arguments.length?(a(t),l()):a()},i.clipExtent=function(t){return arguments.length?(null==t?u=e=n=r=null:(u=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),l()):null==u?null:[[u,e],[n,r]]},l()}function Nf(t){return Ac((fc+t)/2)}function Df(t,e){var n=xc(t),r=t===e?Tc(t):wc(n/xc(e))/wc(Nf(e)/Nf(t)),i=n*Ec(Nf(t),r)/r;if(!r)return Mf;function a(t,e){i>0?e<1e-6-fc&&(e=1e-6-fc):e>fc-1e-6&&(e=fc-1e-6);var n=i/Ec(Nf(e),r);return[n*Tc(r*t),i-n*xc(r*t)]}return a.invert=function(t,e){var n=i-e,a=Cc(r)*Sc(t*t+n*n);return[bc(t,vc(n))/r*Cc(n),2*mc(Ec(i/a,1/r))-fc]},a}var Lf=function(){return mf(Df).scale(109.5).parallels([30,30])};function If(t,e){return[t,e]}If.invert=If;var Rf=function(){return gf(If).scale(152.63)};function Ff(t,e){var n=xc(t),r=t===e?Tc(t):(n-xc(e))/(e-t),i=n/r+t;if(vc(r)<1e-6)return If;function a(t,e){var n=i-e,a=r*t;return[n*Tc(a),i-n*xc(a)]}return a.invert=function(t,e){var n=i-e;return[bc(t,vc(n))/r*Cc(n),i-Cc(r)*Sc(t*t+n*n)]},a}var Pf=function(){return mf(Ff).scale(131.154).center([0,13.9389])},jf=1.340264,Yf=-.081106,zf=893e-6,Uf=.003796,$f=Sc(3)/2;function qf(t,e){var n=Oc($f*Tc(e)),r=n*n,i=r*r*r;return[t*xc(n)/($f*(jf+3*Yf*r+i*(7*zf+9*Uf*r))),n*(jf+Yf*r+i*(zf+Uf*r))]}qf.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(jf+Yf*i+a*(zf+Uf*i))-e)/(jf+3*Yf*i+a*(7*zf+9*Uf*i)))*r)*i*i,!(vc(n)<1e-12));++o);return[$f*t*(jf+3*Yf*i+a*(7*zf+9*Uf*i))/xc(r),Oc(Tc(r)/$f)]};var Wf=function(){return gf(qf).scale(177.158)};function Vf(t,e){var n=xc(e),r=xc(t)*n;return[n*Tc(t)/r,Tc(e)/r]}Vf.invert=Ef(mc);var Hf=function(){return gf(Vf).scale(144.049).clipAngle(60)};function Gf(t,e,n,r){return 1===t&&1===e&&0===n&&0===r?ih:rf({point:function(i,a){this.stream.point(i*t+n,a*e+r)}})}var Xf=function(){var t,e,n,r,i,a,o=1,s=0,c=0,u=1,l=1,h=ih,f=null,d=ih;function p(){return r=i=null,a}return a={stream:function(t){return r&&i===t?r:r=h(d(i=t))},postclip:function(r){return arguments.length?(d=r,f=t=e=n=null,p()):d},clipExtent:function(r){return arguments.length?(d=null==r?(f=t=e=n=null,ih):Cl(f=+r[0][0],t=+r[0][1],e=+r[1][0],n=+r[1][1]),p()):null==f?null:[[f,t],[e,n]]},scale:function(t){return arguments.length?(h=Gf((o=+t)*u,o*l,s,c),p()):o},translate:function(t){return arguments.length?(h=Gf(o*u,o*l,s=+t[0],c=+t[1]),p()):[s,c]},reflectX:function(t){return arguments.length?(h=Gf(o*(u=t?-1:1),o*l,s,c),p()):u<0},reflectY:function(t){return arguments.length?(h=Gf(o*u,o*(l=t?-1:1),s,c),p()):l<0},fitExtent:function(t,e){return sf(a,t,e)},fitSize:function(t,e){return cf(a,t,e)},fitWidth:function(t,e){return uf(a,t,e)},fitHeight:function(t,e){return lf(a,t,e)}}};function Zf(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}Zf.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(vc(n)>1e-6&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]};var Qf=function(){return gf(Zf).scale(175.295)};function Kf(t,e){return[xc(e)*Tc(t),Tc(e)]}Kf.invert=Ef(Oc);var Jf=function(){return gf(Kf).scale(249.5).clipAngle(90+1e-6)};function td(t,e){var n=xc(e),r=1+xc(t)*n;return[n*Tc(t)/r,Tc(e)/r]}td.invert=Ef((function(t){return 2*mc(t)}));var ed=function(){return gf(td).scale(250).clipAngle(142)};function nd(t,e){return[wc(Ac((fc+e)/2)),-t]}nd.invert=function(t,e){return[-e,2*mc(kc(t))-fc]};var rd=function(){var t=Bf(nd),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)};function id(t,e){return t.parent===e.parent?1:2}function ad(t,e){return t+e.x}function od(t,e){return Math.max(t,e.y)}var sd=function(){var t=id,e=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(ad,0)/t.length}(n),e.y=function(t){return 1+t.reduce(od,0)}(n)):(e.x=a?o+=t(e,a):0,e.y=0,a=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=s.x-t(s,c)/2,l=c.x+t(c,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(l-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i};function cd(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function ud(t,e){var n,r,i,a,o,s=new dd(t),c=+t.value&&(s.value=t.value),u=[s];for(null==e&&(e=ld);n=u.pop();)if(c&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)u.push(r=n.children[a]=new dd(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(fd)}function ld(t){return t.children}function hd(t){t.data=t.data.data}function fd(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function dd(t){this.data=t,this.depth=this.height=0,this.parent=null}dd.prototype=ud.prototype={constructor:dd,count:function(){return this.eachAfter(cd)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return ud(this).eachBefore(hd)}};var pd=Array.prototype.slice;var yd=function(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(pd.call(t))).length,a=[];r<i;)e=t[r],n&&md(n,e)?++r:(n=xd(a=gd(a,e)),r=0);return n};function gd(t,e){var n,r;if(bd(e,t))return[e];for(n=0;n<t.length;++n)if(vd(e,t[n])&&bd(_d(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(vd(_d(t[n],t[r]),e)&&vd(_d(t[n],e),t[r])&&vd(_d(t[r],e),t[n])&&bd(kd(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function vd(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function md(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function bd(t,e){for(var n=0;n<e.length;++n)if(!md(t,e[n]))return!1;return!0}function xd(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return _d(t[0],t[1]);case 3:return kd(t[0],t[1],t[2])}var e}function _d(t,e){var n=t.x,r=t.y,i=t.r,a=e.x,o=e.y,s=e.r,c=a-n,u=o-r,l=s-i,h=Math.sqrt(c*c+u*u);return{x:(n+a+c/h*l)/2,y:(r+o+u/h*l)/2,r:(h+i+s)/2}}function kd(t,e,n){var r=t.x,i=t.y,a=t.r,o=e.x,s=e.y,c=e.r,u=n.x,l=n.y,h=n.r,f=r-o,d=r-u,p=i-s,y=i-l,g=c-a,v=h-a,m=r*r+i*i-a*a,b=m-o*o-s*s+c*c,x=m-u*u-l*l+h*h,_=d*p-f*y,k=(p*x-y*b)/(2*_)-r,w=(y*g-p*v)/_,E=(d*b-f*x)/(2*_)-i,T=(f*v-d*g)/_,C=w*w+T*T-1,S=2*(a+k*w+E*T),A=k*k+E*E-a*a,M=-(C?(S+Math.sqrt(S*S-4*C*A))/(2*C):A/S);return{x:r+k+w*M,y:i+E+T*M,r:M}}function wd(t,e,n){var r,i,a,o,s=t.x-e.x,c=t.y-e.y,u=s*s+c*c;u?(i=e.r+n.r,i*=i,o=t.r+n.r,i>(o*=o)?(r=(u+o-i)/(2*u),a=Math.sqrt(Math.max(0,o/u-r*r)),n.x=t.x-r*s-a*c,n.y=t.y-r*c+a*s):(r=(u+i-o)/(2*u),a=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*s-a*c,n.y=e.y+r*c+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Ed(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Td(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function Cd(t){this._=t,this.next=null,this.previous=null}function Sd(t){if(!(i=t.length))return 0;var e,n,r,i,a,o,s,c,u,l,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;wd(n,e,r=t[2]),e=new Cd(e),n=new Cd(n),r=new Cd(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){wd(e._,n._,r=t[s]),r=new Cd(r),c=n.next,u=e.previous,l=n._.r,h=e._.r;do{if(l<=h){if(Ed(c._,r._)){n=c,e.next=n,n.previous=e,--s;continue t}l+=c._.r,c=c.next}else{if(Ed(u._,r._)){(e=u).next=n,n.previous=e,--s;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,a=Td(e);(r=r.next)!==n;)(o=Td(r))<a&&(e=r,a=o);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=yd(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}var Ad=function(t){return Sd(t),t};function Md(t){return null==t?null:Od(t)}function Od(t){if("function"!=typeof t)throw new Error;return t}function Bd(){return 0}var Nd=function(t){return function(){return t}};function Dd(t){return Math.sqrt(t.value)}var Ld=function(){var t=null,e=1,n=1,r=Bd;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(Id(t)).eachAfter(Rd(r,.5)).eachBefore(Fd(1)):i.eachBefore(Id(Dd)).eachAfter(Rd(Bd,1)).eachAfter(Rd(r,i.r/Math.min(e,n))).eachBefore(Fd(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=Md(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:Nd(+t),i):r},i};function Id(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Rd(t,e){return function(n){if(r=n.children){var r,i,a,o=r.length,s=t(n)*e||0;if(s)for(i=0;i<o;++i)r[i].r+=s;if(a=Sd(r),s)for(i=0;i<o;++i)r[i].r-=s;n.r=a+s}}}function Fd(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}var Pd=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)},jd=function(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,u=t.value&&(r-e)/t.value;++s<c;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*u},Yd=function(){var t=1,e=1,n=0,r=!1;function i(i){var a=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(r){r.children&&jd(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=s}}(e,a)),r&&i.eachBefore(Pd),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i},zd={depth:-1},Ud={};function $d(t){return t.id}function qd(t){return t.parentId}var Wd=function(){var t=$d,e=qd;function n(n){var r,i,a,o,s,c,u,l=n.length,h=new Array(l),f={};for(i=0;i<l;++i)r=n[i],s=h[i]=new dd(r),null!=(c=t(r,i,n))&&(c+="")&&(f[u="$"+(s.id=c)]=u in f?Ud:s);for(i=0;i<l;++i)if(s=h[i],null!=(c=e(n[i],i,n))&&(c+="")){if(!(o=f["$"+c]))throw new Error("missing: "+c);if(o===Ud)throw new Error("ambiguous: "+c);o.children?o.children.push(s):o.children=[s],s.parent=o}else{if(a)throw new Error("multiple roots");a=s}if(!a)throw new Error("no root");if(a.parent=zd,a.eachBefore((function(t){t.depth=t.parent.depth+1,--l})).eachBefore(fd),a.parent=null,l>0)throw new Error("cycle");return a}return n.id=function(e){return arguments.length?(t=Od(e),n):t},n.parentId=function(t){return arguments.length?(e=Od(t),n):e},n};function Vd(t,e){return t.parent===e.parent?1:2}function Hd(t){var e=t.children;return e?e[0]:t.t}function Gd(t){var e=t.children;return e?e[e.length-1]:t.t}function Xd(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Zd(t,e,n){return t.a.parent===e.parent?t.a:n}function Qd(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}Qd.prototype=Object.create(dd.prototype);var Kd=function(){var t=Vd,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,a,o=new Qd(t,0),s=[o];e=s.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=e.children[i]=new Qd(r[i],i)),n.parent=e;return(o.parent=new Qd(null,0)).children=[o],o}(i);if(c.eachAfter(a),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(s);else{var u=i,l=i,h=i;i.eachBefore((function(t){t.x<u.x&&(u=t),t.x>l.x&&(l=t),t.depth>h.depth&&(h=t)}));var f=u===l?1:t(u,l)/2,d=f-u.x,p=e/(l.x+f+d),y=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*y}))}return i}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,a=e,o=e,s=n,c=a.parent.children[0],u=a.m,l=o.m,h=s.m,f=c.m;s=Gd(s),a=Hd(a),s&&a;)c=Hd(c),(o=Gd(o)).a=e,(i=s.z+h-a.z-u+t(s._,a._))>0&&(Xd(Zd(s,e,r),e,i),u+=i,l+=i),h+=s.m,u+=a.m,f+=c.m,l+=o.m;s&&!Gd(o)&&(o.t=s,o.m+=h-l),a&&!Hd(c)&&(c.t=a,c.m+=u-f,r=e)}return r}(e,i,e.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},Jd=function(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,u=t.value&&(i-n)/t.value;++s<c;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*u},tp=(1+Math.sqrt(5))/2;function ep(t,e,n,r,i,a){for(var o,s,c,u,l,h,f,d,p,y,g,v=[],m=e.children,b=0,x=0,_=m.length,k=e.value;b<_;){c=i-n,u=a-r;do{l=m[x++].value}while(!l&&x<_);for(h=f=l,g=l*l*(y=Math.max(u/c,c/u)/(k*t)),p=Math.max(f/g,g/h);x<_;++x){if(l+=s=m[x].value,s<h&&(h=s),s>f&&(f=s),g=l*l*y,(d=Math.max(f/g,g/h))>p){l-=s;break}p=d}v.push(o={value:l,dice:c<u,children:m.slice(b,x)}),o.dice?jd(o,n,r,i,k?r+=u*l/k:a):Jd(o,n,r,k?n+=c*l/k:i,a),k-=l,b=x}return v}var np=function t(e){function n(t,n,r,i,a){ep(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(tp),rp=function(){var t=np,e=!1,n=1,r=1,i=[0],a=Bd,o=Bd,s=Bd,c=Bd,u=Bd;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Pd),t}function h(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<l&&(l=f=(l+f)/2),e.x0=r,e.y0=l,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=a(e)/2,r+=u(e)-n,l+=o(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=c(e)-n)<l&&(l=f=(l+f)/2),t(e,r,l,h,f))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=Od(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:Nd(+t),l):a},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:Nd(+t),l):o},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Nd(+t),l):s},l.paddingBottom=function(t){return arguments.length?(c="function"==typeof t?t:Nd(+t),l):c},l.paddingLeft=function(t){return arguments.length?(u="function"==typeof t?t:Nd(+t),l):u},l},ip=function(t,e,n,r,i){var a,o,s=t.children,c=s.length,u=new Array(c+1);for(u[0]=o=a=0;a<c;++a)u[a+1]=o+=s[a].value;!function t(e,n,r,i,a,o,c){if(e>=n-1){var l=s[e];return l.x0=i,l.y0=a,l.x1=o,void(l.y1=c)}var h=u[e],f=r/2+h,d=e+1,p=n-1;for(;d<p;){var y=d+p>>>1;u[y]<f?d=y+1:p=y}f-u[d-1]<u[d]-f&&e+1<d&&--d;var g=u[d]-h,v=r-g;if(o-i>c-a){var m=(i*v+o*g)/r;t(e,d,g,i,a,m,c),t(d,n,v,m,a,o,c)}else{var b=(a*v+c*g)/r;t(e,d,g,i,a,o,b),t(d,n,v,i,b,o,c)}}(0,c,t.value,e,n,r,i)},ap=function(t,e,n,r,i){(1&t.depth?Jd:jd)(t,e,n,r,i)},op=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,c,u,l,h=-1,f=o.length,d=t.value;++h<f;){for(c=(s=o[h]).children,u=s.value=0,l=c.length;u<l;++u)s.value+=c[u].value;s.dice?jd(s,n,r,i,r+=(a-r)*s.value/d):Jd(s,n,r,n+=(i-n)*s.value/d,a),d-=s.value}else t._squarify=o=ep(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(tp),sp=function(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}},cp=function(t,e){var n=un(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}},up=function(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}},lp=Math.SQRT2;function hp(t){return((t=Math.exp(t))+1/t)/2}var fp=function(t,e){var n,r,i=t[0],a=t[1],o=t[2],s=e[0],c=e[1],u=e[2],l=s-i,h=c-a,f=l*l+h*h;if(f<1e-12)r=Math.log(u/o)/lp,n=function(t){return[i+t*l,a+t*h,o*Math.exp(lp*t*r)]};else{var d=Math.sqrt(f),p=(u*u-o*o+4*f)/(2*o*2*d),y=(u*u-o*o-4*f)/(2*u*2*d),g=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(y*y+1)-y);r=(v-g)/lp,n=function(t){var e,n=t*r,s=hp(g),c=o/(2*d)*(s*(e=lp*n+g,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(g));return[i+c*l,a+c*h,o*s/hp(lp*n+g)]}}return n.duration=1e3*r,n};function dp(t){return function(e,n){var r=t((e=tn(e)).h,(n=tn(n)).h),i=hn(e.s,n.s),a=hn(e.l,n.l),o=hn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+""}}}var pp=dp(un),yp=dp(hn);function gp(t,e){var n=hn((t=pa(t)).l,(e=pa(e)).l),r=hn(t.a,e.a),i=hn(t.b,e.b),a=hn(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+""}}function vp(t){return function(e,n){var r=t((e=ka(e)).h,(n=ka(n)).h),i=hn(e.c,n.c),a=hn(e.l,n.l),o=hn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}var mp=vp(un),bp=vp(hn);function xp(t){return function e(n){function r(e,r){var i=t((e=Oa(e)).h,(r=Oa(r)).h),a=hn(e.s,r.s),o=hn(e.l,r.l),s=hn(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}var _p=xp(un),kp=xp(hn);function wp(t,e){for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n<r;)a[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return a[e](t-e)}}var Ep=function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n},Tp=function(t){for(var e,n=-1,r=t.length,i=t[r-1],a=0;++n<r;)e=i,i=t[n],a+=e[1]*i[0]-e[0]*i[1];return a/2},Cp=function(t){for(var e,n,r=-1,i=t.length,a=0,o=0,s=t[i-1],c=0;++r<i;)e=s,s=t[r],c+=n=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*n,o+=(e[1]+s[1])*n;return[a/(c*=3),o/c]};function Sp(t,e){return t[0]-e[0]||t[1]-e[1]}function Ap(t){for(var e,n,r,i=t.length,a=[0,1],o=2,s=2;s<i;++s){for(;o>1&&(e=t[a[o-2]],n=t[a[o-1]],r=t[s],(n[0]-e[0])*(r[1]-e[1])-(n[1]-e[1])*(r[0]-e[0])<=0);)--o;a[o++]=s}return a.slice(0,o)}var Mp=function(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(Sp),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var a=Ap(r),o=Ap(i),s=o[0]===a[0],c=o[o.length-1]===a[a.length-1],u=[];for(e=a.length-1;e>=0;--e)u.push(t[r[a[e]][2]]);for(e=+s;e<o.length-c;++e)u.push(t[r[o[e]][2]]);return u},Op=function(t,e){for(var n,r,i=t.length,a=t[i-1],o=e[0],s=e[1],c=a[0],u=a[1],l=!1,h=0;h<i;++h)n=(a=t[h])[0],(r=a[1])>s!=u>s&&o<(c-n)*(s-r)/(u-r)+n&&(l=!l),c=n,u=r;return l},Bp=function(t){for(var e,n,r=-1,i=t.length,a=t[i-1],o=a[0],s=a[1],c=0;++r<i;)e=o,n=s,e-=o=(a=t[r])[0],n-=s=a[1],c+=Math.sqrt(e*e+n*n);return c},Np=function(){return Math.random()},Dp=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(Np),Lp=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(Np),Ip=function t(e){function n(){var t=Lp.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(Np),Rp=function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(Np),Fp=function t(e){function n(t){var n=Rp.source(e)(t);return function(){return n()/t}}return n.source=t,n}(Np),Pp=function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(Np);function jp(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Yp(t,e){switch(arguments.length){case 0:break;case 1:this.interpolator(t);break;default:this.interpolator(e).domain(t)}return this}var zp=Array.prototype,Up=zp.map,$p=zp.slice,qp={name:"implicit"};function Wp(){var t=Qi(),e=[],n=[],r=qp;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==qp)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Qi();for(var r,a,o=-1,s=n.length;++o<s;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=$p.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Wp(e,n).unknown(r)},jp.apply(i,arguments),i}function Vp(){var t,e,n=Wp().unknown(void 0),r=n.domain,i=n.range,a=[0,1],o=!1,s=0,c=0,u=.5;function l(){var n=r().length,l=a[1]<a[0],h=a[l-0],f=a[1-l];t=(f-h)/Math.max(1,n-s+2*c),o&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*u,e=t*(1-s),o&&(h=Math.round(h),e=Math.round(e));var d=k(n).map((function(e){return h+t*e}));return i(l?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),l()):r()},n.range=function(t){return arguments.length?(a=[+t[0],+t[1]],l()):a.slice()},n.rangeRound=function(t){return a=[+t[0],+t[1]],o=!0,l()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,l()):o},n.padding=function(t){return arguments.length?(s=Math.min(1,c=+t),l()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),l()):s},n.paddingOuter=function(t){return arguments.length?(c=+t,l()):c},n.align=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),l()):u},n.copy=function(){return Vp(r(),a).round(o).paddingInner(s).paddingOuter(c).align(u)},jp.apply(l(),arguments)}function Hp(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Hp(e())},t}function Gp(){return Hp(Vp.apply(null,arguments).paddingInner(1))}var Xp=function(t){return+t},Zp=[0,1];function Qp(t){return t}function Kp(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function Jp(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function ty(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=Kp(i,r),a=n(o,a)):(r=Kp(r,i),a=n(a,o)),function(t){return a(r(t))}}function ey(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Kp(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=c(t,e,1,r)-1;return a[n](i[n](e))}}function ny(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function ry(){var t,e,n,r,i,a,o=Zp,s=Zp,c=An,u=Qp;function l(){return r=Math.min(o.length,s.length)>2?ey:ty,i=a=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,c)))(t(u(e)))}return h.invert=function(n){return u(e((a||(a=r(s,o.map(t),_n)))(n)))},h.domain=function(t){return arguments.length?(o=Up.call(t,Xp),u===Qp||(u=Jp(o)),l()):o.slice()},h.range=function(t){return arguments.length?(s=$p.call(t),l()):s.slice()},h.rangeRound=function(t){return s=$p.call(t),c=up,l()},h.clamp=function(t){return arguments.length?(u=t?Jp(o):Qp,h):u!==Qp},h.interpolate=function(t){return arguments.length?(c=t,l()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}function iy(t,e){return ry()(t,e)}var ay=function(t,e,n,r){var i,a=A(t,e,n);switch((r=Ws(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=ac(a,o))||(r.precision=i),Zs(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=oc(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=ic(a))||(r.precision=i-2*("%"===r.type))}return Xs(r)};function oy(t){var e=t.domain;return t.ticks=function(t){var n=e();return C(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return ay(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,s=i[a],c=i[o];return c<s&&(r=s,s=c,c=r,r=a,a=o,o=r),(r=S(s,c,n))>0?r=S(s=Math.floor(s/r)*r,c=Math.ceil(c/r)*r,n):r<0&&(r=S(s=Math.ceil(s*r)/r,c=Math.floor(c*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(c/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(c*r)/r,e(i)),t},t}function sy(){var t=iy(Qp,Qp);return t.copy=function(){return ny(t,sy())},jp.apply(t,arguments),oy(t)}function cy(t){var e;function n(t){return isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Up.call(e,Xp),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return cy(t).unknown(e)},t=arguments.length?Up.call(t,Xp):[0,1],oy(n)}var uy=function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t};function ly(t){return Math.log(t)}function hy(t){return Math.exp(t)}function fy(t){return-Math.log(-t)}function dy(t){return-Math.exp(-t)}function py(t){return isFinite(t)?+("1e"+t):t<0?0:t}function yy(t){return function(e){return-t(-e)}}function gy(t){var e,n,r=t(ly,hy),i=r.domain,a=10;function o(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(a),n=function(t){return 10===t?py:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=yy(e),n=yy(n),t(fy,dy)):t(ly,hy),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),s=o[0],c=o[o.length-1];(r=c<s)&&(f=s,s=c,c=f);var u,l,h,f=e(s),d=e(c),p=null==t?10:+t,y=[];if(!(a%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(l=1,u=n(f);l<a;++l)if(!((h=u*l)<s)){if(h>c)break;y.push(h)}}else for(;f<d;++f)for(l=a-1,u=n(f);l>=1;--l)if(!((h=u*l)<s)){if(h>c)break;y.push(h)}}else y=C(f,d,Math.min(d-f,p)).map(n);return r?y.reverse():y},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=Xs(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(uy(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function vy(){var t=gy(ry()).domain([1,10]);return t.copy=function(){return ny(t,vy()).base(t.base())},jp.apply(t,arguments),t}function my(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function by(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function xy(t){var e=1,n=t(my(e),by(e));return n.constant=function(n){return arguments.length?t(my(e=+n),by(e)):e},oy(n)}function _y(){var t=xy(ry());return t.copy=function(){return ny(t,_y()).constant(t.constant())},jp.apply(t,arguments)}function ky(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function wy(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Ey(t){return t<0?-t*t:t*t}function Ty(t){var e=t(Qp,Qp),n=1;function r(){return 1===n?t(Qp,Qp):.5===n?t(wy,Ey):t(ky(n),ky(1/n))}return e.exponent=function(t){return arguments.length?(n=+t,r()):n},oy(e)}function Cy(){var t=Ty(ry());return t.copy=function(){return ny(t,Cy()).exponent(t.exponent())},jp.apply(t,arguments),t}function Sy(){return Cy.apply(null,arguments).exponent(.5)}function Ay(){var t,e=[],n=[],i=[];function a(){var t=0,r=Math.max(1,n.length);for(i=new Array(r-1);++t<r;)i[t-1]=B(e,t/r);return o}function o(e){return isNaN(e=+e)?t:n[c(i,e)]}return o.invertExtent=function(t){var r=n.indexOf(t);return r<0?[NaN,NaN]:[r>0?i[r-1]:e[0],r<i.length?i[r]:e[e.length-1]]},o.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var n,i=0,o=t.length;i<o;++i)null==(n=t[i])||isNaN(n=+n)||e.push(n);return e.sort(r),a()},o.range=function(t){return arguments.length?(n=$p.call(t),a()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return i.slice()},o.copy=function(){return Ay().domain(e).range(n).unknown(t)},jp.apply(o,arguments)}function My(){var t,e=0,n=1,r=1,i=[.5],a=[0,1];function o(e){return e<=e?a[c(i,e,0,r)]:t}function s(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*e)/(r+1);return o}return o.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],s()):[e,n]},o.range=function(t){return arguments.length?(r=(a=$p.call(t)).length-1,s()):a.slice()},o.invertExtent=function(t){var o=a.indexOf(t);return o<0?[NaN,NaN]:o<1?[e,i[0]]:o>=r?[i[r-1],n]:[i[o-1],i[o]]},o.unknown=function(e){return arguments.length?(t=e,o):o},o.thresholds=function(){return i.slice()},o.copy=function(){return My().domain([e,n]).range(a).unknown(t)},jp.apply(oy(o),arguments)}function Oy(){var t,e=[.5],n=[0,1],r=1;function i(i){return i<=i?n[c(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=$p.call(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=$p.call(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return Oy().domain(e).range(n).unknown(t)},jp.apply(i,arguments)}var By=new Date,Ny=new Date;function Dy(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return Dy((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return By.setTime(+e),Ny.setTime(+r),t(By),t(Ny),Math.floor(n(By,Ny))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Ly=Dy((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Ly.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Dy((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var Iy=Ly,Ry=Ly.range,Fy=Dy((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),Py=Fy,jy=Fy.range;function Yy(t){return Dy((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var zy=Yy(0),Uy=Yy(1),$y=Yy(2),qy=Yy(3),Wy=Yy(4),Vy=Yy(5),Hy=Yy(6),Gy=zy.range,Xy=Uy.range,Zy=$y.range,Qy=qy.range,Ky=Wy.range,Jy=Vy.range,tg=Hy.range,eg=Dy((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),ng=eg,rg=eg.range,ig=Dy((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),ag=ig,og=ig.range,sg=Dy((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),cg=sg,ug=sg.range,lg=Dy((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),hg=lg,fg=lg.range,dg=Dy((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));dg.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Dy((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):dg:null};var pg=dg,yg=dg.range;function gg(t){return Dy((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var vg=gg(0),mg=gg(1),bg=gg(2),xg=gg(3),_g=gg(4),kg=gg(5),wg=gg(6),Eg=vg.range,Tg=mg.range,Cg=bg.range,Sg=xg.range,Ag=_g.range,Mg=kg.range,Og=wg.range,Bg=Dy((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1})),Ng=Bg,Dg=Bg.range,Lg=Dy((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));Lg.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Dy((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var Ig=Lg,Rg=Lg.range;function Fg(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Pg(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function jg(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Yg(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,u=Kg(i),l=Jg(i),h=Kg(a),f=Jg(a),d=Kg(o),p=Jg(o),y=Kg(s),g=Jg(s),v=Kg(c),m=Jg(c),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:xv,e:xv,f:Tv,H:_v,I:kv,j:wv,L:Ev,m:Cv,M:Sv,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:em,s:nm,S:Av,u:Mv,U:Ov,V:Bv,w:Nv,W:Dv,x:null,X:null,y:Lv,Y:Iv,Z:Rv,"%":tm},x={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Fv,e:Fv,f:Uv,H:Pv,I:jv,j:Yv,L:zv,m:$v,M:qv,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:em,s:nm,S:Wv,u:Vv,U:Hv,V:Gv,w:Xv,W:Zv,x:null,X:null,y:Qv,Y:Kv,Z:Jv,"%":tm},_={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=m[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:lv,e:lv,f:gv,H:fv,I:fv,j:hv,L:yv,m:uv,M:dv,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:cv,Q:mv,s:bv,S:pv,u:ev,U:nv,V:rv,w:tv,W:iv,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:ov,Y:av,Z:sv,"%":vv};function k(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===t.charCodeAt(s)&&(o.push(t.slice(c,s)),null!=(i=Vg[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),c=s+1);return o.push(t.slice(c,s)),o.join("")}}function w(t,e){return function(n){var r,i,a=jg(1900,void 0,1);if(E(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(!e||"Z"in a||(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Pg(jg(a.y,0,1))).getUTCDay(),r=i>4||0===i?mg.ceil(r):mg(r),r=Ng.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Fg(jg(a.y,0,1))).getDay(),r=i>4||0===i?Uy.ceil(r):Uy(r),r=ng.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Pg(jg(a.y,0,1)).getUTCDay():Fg(jg(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Pg(a)):Fg(a)}}function E(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o<s;){if(r>=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=_[i in Vg?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(b.x=k(n,b),b.X=k(r,b),b.c=k(e,b),x.x=k(n,x),x.X=k(r,x),x.c=k(e,x),{format:function(t){var e=k(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=w(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=k(t+="",x);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t+="",!0);return e.toString=function(){return t},e}})}var zg,Ug,$g,qg,Wg,Vg={"-":"",_:" ",0:"0"},Hg=/^\s*\d+/,Gg=/^%/,Xg=/[\\^$*+?|[\]().{}]/g;function Zg(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function Qg(t){return t.replace(Xg,"\\$&")}function Kg(t){return new RegExp("^(?:"+t.map(Qg).join("|")+")","i")}function Jg(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function tv(t,e,n){var r=Hg.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function ev(t,e,n){var r=Hg.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function nv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function rv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function iv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function av(t,e,n){var r=Hg.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function ov(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function sv(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function cv(t,e,n){var r=Hg.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function uv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function lv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function hv(t,e,n){var r=Hg.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function fv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function dv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function pv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function yv(t,e,n){var r=Hg.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function gv(t,e,n){var r=Hg.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function vv(t,e,n){var r=Gg.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function mv(t,e,n){var r=Hg.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function bv(t,e,n){var r=Hg.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function xv(t,e){return Zg(t.getDate(),e,2)}function _v(t,e){return Zg(t.getHours(),e,2)}function kv(t,e){return Zg(t.getHours()%12||12,e,2)}function wv(t,e){return Zg(1+ng.count(Iy(t),t),e,3)}function Ev(t,e){return Zg(t.getMilliseconds(),e,3)}function Tv(t,e){return Ev(t,e)+"000"}function Cv(t,e){return Zg(t.getMonth()+1,e,2)}function Sv(t,e){return Zg(t.getMinutes(),e,2)}function Av(t,e){return Zg(t.getSeconds(),e,2)}function Mv(t){var e=t.getDay();return 0===e?7:e}function Ov(t,e){return Zg(zy.count(Iy(t)-1,t),e,2)}function Bv(t,e){var n=t.getDay();return t=n>=4||0===n?Wy(t):Wy.ceil(t),Zg(Wy.count(Iy(t),t)+(4===Iy(t).getDay()),e,2)}function Nv(t){return t.getDay()}function Dv(t,e){return Zg(Uy.count(Iy(t)-1,t),e,2)}function Lv(t,e){return Zg(t.getFullYear()%100,e,2)}function Iv(t,e){return Zg(t.getFullYear()%1e4,e,4)}function Rv(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Zg(e/60|0,"0",2)+Zg(e%60,"0",2)}function Fv(t,e){return Zg(t.getUTCDate(),e,2)}function Pv(t,e){return Zg(t.getUTCHours(),e,2)}function jv(t,e){return Zg(t.getUTCHours()%12||12,e,2)}function Yv(t,e){return Zg(1+Ng.count(Ig(t),t),e,3)}function zv(t,e){return Zg(t.getUTCMilliseconds(),e,3)}function Uv(t,e){return zv(t,e)+"000"}function $v(t,e){return Zg(t.getUTCMonth()+1,e,2)}function qv(t,e){return Zg(t.getUTCMinutes(),e,2)}function Wv(t,e){return Zg(t.getUTCSeconds(),e,2)}function Vv(t){var e=t.getUTCDay();return 0===e?7:e}function Hv(t,e){return Zg(vg.count(Ig(t)-1,t),e,2)}function Gv(t,e){var n=t.getUTCDay();return t=n>=4||0===n?_g(t):_g.ceil(t),Zg(_g.count(Ig(t),t)+(4===Ig(t).getUTCDay()),e,2)}function Xv(t){return t.getUTCDay()}function Zv(t,e){return Zg(mg.count(Ig(t)-1,t),e,2)}function Qv(t,e){return Zg(t.getUTCFullYear()%100,e,2)}function Kv(t,e){return Zg(t.getUTCFullYear()%1e4,e,4)}function Jv(){return"+0000"}function tm(){return"%"}function em(t){return+t}function nm(t){return Math.floor(+t/1e3)}function rm(t){return zg=Yg(t),Ug=zg.format,$g=zg.parse,qg=zg.utcFormat,Wg=zg.utcParse,zg}rm({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function im(t){return new Date(t)}function am(t){return t instanceof Date?+t:+new Date(+t)}function om(t,e,n,r,a,o,s,c,u){var l=iy(Qp,Qp),h=l.invert,f=l.domain,d=u(".%L"),p=u(":%S"),y=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),m=u("%b %d"),b=u("%B"),x=u("%Y"),_=[[s,1,1e3],[s,5,5e3],[s,15,15e3],[s,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[a,1,36e5],[a,3,108e5],[a,6,216e5],[a,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function k(i){return(s(i)<i?d:o(i)<i?p:a(i)<i?y:r(i)<i?g:e(i)<i?n(i)<i?v:m:t(i)<i?b:x)(i)}function w(e,n,r,a){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,s=i((function(t){return t[2]})).right(_,o);s===_.length?(a=A(n/31536e6,r/31536e6,e),e=t):s?(a=(s=_[o/_[s-1][2]<_[s][2]/o?s-1:s])[1],e=s[0]):(a=Math.max(A(n,r,e),1),e=c)}return null==a?e:e.every(a)}return l.invert=function(t){return new Date(h(t))},l.domain=function(t){return arguments.length?f(Up.call(t,am)):f().map(im)},l.ticks=function(t,e){var n,r=f(),i=r[0],a=r[r.length-1],o=a<i;return o&&(n=i,i=a,a=n),n=(n=w(t,i,a,e))?n.range(i,a+1):[],o?n.reverse():n},l.tickFormat=function(t,e){return null==e?k:u(e)},l.nice=function(t,e){var n=f();return(t=w(t,n[0],n[n.length-1],e))?f(uy(n,t)):l},l.copy=function(){return ny(l,om(t,e,n,r,a,o,s,c,u))},l}var sm=function(){return jp.apply(om(Iy,Py,zy,ng,ag,cg,hg,pg,Ug).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},cm=Dy((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),um=cm,lm=cm.range,hm=Dy((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()})),fm=hm,dm=hm.range,pm=Dy((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()})),ym=pm,gm=pm.range,vm=function(){return jp.apply(om(Ig,um,vg,Ng,fm,ym,hg,pg,qg).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)};function mm(){var t,e,n,r,i,a=0,o=1,s=Qp,c=!1;function u(e){return isNaN(e=+e)?i:s(0===n?.5:(e=(r(e)-t)*n,c?Math.max(0,Math.min(1,e)):e))}return u.domain=function(i){return arguments.length?(t=r(a=+i[0]),e=r(o=+i[1]),n=t===e?0:1/(e-t),u):[a,o]},u.clamp=function(t){return arguments.length?(c=!!t,u):c},u.interpolator=function(t){return arguments.length?(s=t,u):s},u.unknown=function(t){return arguments.length?(i=t,u):i},function(i){return r=i,t=i(a),e=i(o),n=t===e?0:1/(e-t),u}}function bm(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function xm(){var t=oy(mm()(Qp));return t.copy=function(){return bm(t,xm())},Yp.apply(t,arguments)}function _m(){var t=gy(mm()).domain([1,10]);return t.copy=function(){return bm(t,_m()).base(t.base())},Yp.apply(t,arguments)}function km(){var t=xy(mm());return t.copy=function(){return bm(t,km()).constant(t.constant())},Yp.apply(t,arguments)}function wm(){var t=Ty(mm());return t.copy=function(){return bm(t,wm()).exponent(t.exponent())},Yp.apply(t,arguments)}function Em(){return wm.apply(null,arguments).exponent(.5)}function Tm(){var t=[],e=Qp;function n(n){if(!isNaN(n=+n))return e((c(t,n)-1)/(t.length-1))}return n.domain=function(e){if(!arguments.length)return t.slice();t=[];for(var i,a=0,o=e.length;a<o;++a)null==(i=e[a])||isNaN(i=+i)||t.push(i);return t.sort(r),n},n.interpolator=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return Tm(e).domain(t)},Yp.apply(n,arguments)}function Cm(){var t,e,n,r,i,a,o,s=0,c=.5,u=1,l=Qp,h=!1;function f(t){return isNaN(t=+t)?o:(t=.5+((t=+a(t))-e)*(t<e?r:i),l(h?Math.max(0,Math.min(1,t)):t))}return f.domain=function(o){return arguments.length?(t=a(s=+o[0]),e=a(c=+o[1]),n=a(u=+o[2]),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),f):[s,c,u]},f.clamp=function(t){return arguments.length?(h=!!t,f):h},f.interpolator=function(t){return arguments.length?(l=t,f):l},f.unknown=function(t){return arguments.length?(o=t,f):o},function(o){return a=o,t=o(s),e=o(c),n=o(u),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),f}}function Sm(){var t=oy(Cm()(Qp));return t.copy=function(){return bm(t,Sm())},Yp.apply(t,arguments)}function Am(){var t=gy(Cm()).domain([.1,1,10]);return t.copy=function(){return bm(t,Am()).base(t.base())},Yp.apply(t,arguments)}function Mm(){var t=xy(Cm());return t.copy=function(){return bm(t,Mm()).constant(t.constant())},Yp.apply(t,arguments)}function Om(){var t=Ty(Cm());return t.copy=function(){return bm(t,Om()).exponent(t.exponent())},Yp.apply(t,arguments)}function Bm(){return Om.apply(null,arguments).exponent(.5)}var Nm=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n},Dm=Nm("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Lm=Nm("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Im=Nm("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Rm=Nm("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Fm=Nm("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Pm=Nm("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),jm=Nm("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Ym=Nm("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),zm=Nm("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Um=Nm("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),$m=function(t){return pn(t[t.length-1])},qm=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Nm),Wm=$m(qm),Vm=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Nm),Hm=$m(Vm),Gm=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Nm),Xm=$m(Gm),Zm=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Nm),Qm=$m(Zm),Km=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Nm),Jm=$m(Km),tb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Nm),eb=$m(tb),nb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Nm),rb=$m(nb),ib=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Nm),ab=$m(ib),ob=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Nm),sb=$m(ob),cb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Nm),ub=$m(cb),lb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Nm),hb=$m(lb),fb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Nm),db=$m(fb),pb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Nm),yb=$m(pb),gb=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Nm),vb=$m(gb),mb=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Nm),bb=$m(mb),xb=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Nm),_b=$m(xb),kb=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Nm),wb=$m(kb),Eb=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Nm),Tb=$m(Eb),Cb=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Nm),Sb=$m(Cb),Ab=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Nm),Mb=$m(Ab),Ob=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Nm),Bb=$m(Ob),Nb=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Nm),Db=$m(Nb),Lb=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Nm),Ib=$m(Lb),Rb=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Nm),Fb=$m(Rb),Pb=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Nm),jb=$m(Pb),Yb=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Nm),zb=$m(Yb),Ub=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Nm),$b=$m(Ub),qb=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},Wb=kp(Oa(300,.5,0),Oa(-240,.5,1)),Vb=kp(Oa(-100,.75,.35),Oa(80,1.5,.8)),Hb=kp(Oa(260,.75,.35),Oa(80,1.5,.8)),Gb=Oa(),Xb=function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Gb.h=360*t-100,Gb.s=1.5-1.5*e,Gb.l=.8-.9*e,Gb+""},Zb=He(),Qb=Math.PI/3,Kb=2*Math.PI/3,Jb=function(t){var e;return t=(.5-t)*Math.PI,Zb.r=255*(e=Math.sin(t))*e,Zb.g=255*(e=Math.sin(t+Qb))*e,Zb.b=255*(e=Math.sin(t+Kb))*e,Zb+""},tx=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"};function ex(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var nx=ex(Nm("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),rx=ex(Nm("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),ix=ex(Nm("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ax=ex(Nm("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),ox=function(t){return ke(ne(t).call(document.documentElement))},sx=0;function cx(){return new ux}function ux(){this._="@"+(++sx).toString(36)}ux.prototype=cx.prototype={constructor:ux,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var lx=function(t){return"string"==typeof t?new be([document.querySelectorAll(t)],[document.documentElement]):new be([null==t?[]:t],me)},hx=function(t,e){null==e&&(e=Mn().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=On(t,e[n]);return i},fx=function(t){return function(){return t}},dx=Math.abs,px=Math.atan2,yx=Math.cos,gx=Math.max,vx=Math.min,mx=Math.sin,bx=Math.sqrt,xx=Math.PI,_x=xx/2,kx=2*xx;function wx(t){return t>1?0:t<-1?xx:Math.acos(t)}function Ex(t){return t>=1?_x:t<=-1?-_x:Math.asin(t)}function Tx(t){return t.innerRadius}function Cx(t){return t.outerRadius}function Sx(t){return t.startAngle}function Ax(t){return t.endAngle}function Mx(t){return t&&t.padAngle}function Ox(t,e,n,r,i,a,o,s){var c=n-t,u=r-e,l=o-i,h=s-a,f=h*c-l*u;if(!(f*f<1e-12))return[t+(f=(l*(e-a)-h*(t-i))/f)*c,e+f*u]}function Bx(t,e,n,r,i,a,o){var s=t-n,c=e-r,u=(o?a:-a)/bx(s*s+c*c),l=u*c,h=-u*s,f=t+l,d=e+h,p=n+l,y=r+h,g=(f+p)/2,v=(d+y)/2,m=p-f,b=y-d,x=m*m+b*b,_=i-a,k=f*y-p*d,w=(b<0?-1:1)*bx(gx(0,_*_*x-k*k)),E=(k*b-m*w)/x,T=(-k*m-b*w)/x,C=(k*b+m*w)/x,S=(-k*m+b*w)/x,A=E-g,M=T-v,O=C-g,B=S-v;return A*A+M*M>O*O+B*B&&(E=C,T=S),{cx:E,cy:T,x01:-l,y01:-h,x11:E*(i/_-1),y11:T*(i/_-1)}}var Nx=function(){var t=Tx,e=Cx,n=fx(0),r=null,i=Sx,a=Ax,o=Mx,s=null;function c(){var c,u,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-_x,d=a.apply(this,arguments)-_x,p=dx(d-f),y=d>f;if(s||(s=c=Ui()),h<l&&(u=h,h=l,l=u),h>1e-12)if(p>kx-1e-12)s.moveTo(h*yx(f),h*mx(f)),s.arc(0,0,h,f,d,!y),l>1e-12&&(s.moveTo(l*yx(d),l*mx(d)),s.arc(0,0,l,d,f,y));else{var g,v,m=f,b=d,x=f,_=d,k=p,w=p,E=o.apply(this,arguments)/2,T=E>1e-12&&(r?+r.apply(this,arguments):bx(l*l+h*h)),C=vx(dx(h-l)/2,+n.apply(this,arguments)),S=C,A=C;if(T>1e-12){var M=Ex(T/l*mx(E)),O=Ex(T/h*mx(E));(k-=2*M)>1e-12?(x+=M*=y?1:-1,_-=M):(k=0,x=_=(f+d)/2),(w-=2*O)>1e-12?(m+=O*=y?1:-1,b-=O):(w=0,m=b=(f+d)/2)}var B=h*yx(m),N=h*mx(m),D=l*yx(_),L=l*mx(_);if(C>1e-12){var I,R=h*yx(b),F=h*mx(b),P=l*yx(x),j=l*mx(x);if(p<xx&&(I=Ox(B,N,P,j,R,F,D,L))){var Y=B-I[0],z=N-I[1],U=R-I[0],$=F-I[1],q=1/mx(wx((Y*U+z*$)/(bx(Y*Y+z*z)*bx(U*U+$*$)))/2),W=bx(I[0]*I[0]+I[1]*I[1]);S=vx(C,(l-W)/(q-1)),A=vx(C,(h-W)/(q+1))}}w>1e-12?A>1e-12?(g=Bx(P,j,B,N,h,A,y),v=Bx(R,F,D,L,h,A,y),s.moveTo(g.cx+g.x01,g.cy+g.y01),A<C?s.arc(g.cx,g.cy,A,px(g.y01,g.x01),px(v.y01,v.x01),!y):(s.arc(g.cx,g.cy,A,px(g.y01,g.x01),px(g.y11,g.x11),!y),s.arc(0,0,h,px(g.cy+g.y11,g.cx+g.x11),px(v.cy+v.y11,v.cx+v.x11),!y),s.arc(v.cx,v.cy,A,px(v.y11,v.x11),px(v.y01,v.x01),!y))):(s.moveTo(B,N),s.arc(0,0,h,m,b,!y)):s.moveTo(B,N),l>1e-12&&k>1e-12?S>1e-12?(g=Bx(D,L,R,F,l,-S,y),v=Bx(B,N,P,j,l,-S,y),s.lineTo(g.cx+g.x01,g.cy+g.y01),S<C?s.arc(g.cx,g.cy,S,px(g.y01,g.x01),px(v.y01,v.x01),!y):(s.arc(g.cx,g.cy,S,px(g.y01,g.x01),px(g.y11,g.x11),!y),s.arc(0,0,l,px(g.cy+g.y11,g.cx+g.x11),px(v.cy+v.y11,v.cx+v.x11),y),s.arc(v.cx,v.cy,S,px(v.y11,v.x11),px(v.y01,v.x01),!y))):s.arc(0,0,l,_,x,y):s.lineTo(D,L)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-xx/2;return[yx(r)*n,mx(r)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:fx(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:fx(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:fx(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:fx(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:fx(+t),c):i},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:fx(+t),c):a},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:fx(+t),c):o},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c};function Dx(t){this._context=t}Dx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var Lx=function(t){return new Dx(t)};function Ix(t){return t[0]}function Rx(t){return t[1]}var Fx=function(){var t=Ix,e=Rx,n=fx(!0),r=null,i=Lx,a=null;function o(o){var s,c,u,l=o.length,h=!1;for(null==r&&(a=i(u=Ui())),s=0;s<=l;++s)!(s<l&&n(c=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(c,s,o),+e(c,s,o));if(u)return a=null,u+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:fx(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:fx(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:fx(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o},Px=function(){var t=Ix,e=null,n=fx(0),r=Rx,i=fx(!0),a=null,o=Lx,s=null;function c(c){var u,l,h,f,d,p=c.length,y=!1,g=new Array(p),v=new Array(p);for(null==a&&(s=o(d=Ui())),u=0;u<=p;++u){if(!(u<p&&i(f=c[u],u,c))===y)if(y=!y)l=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=u-1;h>=l;--h)s.point(g[h],v[h]);s.lineEnd(),s.areaEnd()}y&&(g[u]=+t(f,u,c),v[u]=+n(f,u,c),s.point(e?+e(f,u,c):g[u],r?+r(f,u,c):v[u]))}if(d)return s=null,d+""||null}function u(){return Fx().defined(i).curve(o).context(a)}return c.x=function(n){return arguments.length?(t="function"==typeof n?n:fx(+n),e=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:fx(+e),c):t},c.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:fx(+t),c):e},c.y=function(t){return arguments.length?(n="function"==typeof t?t:fx(+t),r=null,c):n},c.y0=function(t){return arguments.length?(n="function"==typeof t?t:fx(+t),c):n},c.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:fx(+t),c):r},c.lineX0=c.lineY0=function(){return u().x(t).y(n)},c.lineY1=function(){return u().x(t).y(r)},c.lineX1=function(){return u().x(e).y(n)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:fx(!!t),c):i},c.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),c):a},c},jx=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},Yx=function(t){return t},zx=function(){var t=Yx,e=jx,n=null,r=fx(0),i=fx(kx),a=fx(0);function o(o){var s,c,u,l,h,f=o.length,d=0,p=new Array(f),y=new Array(f),g=+r.apply(this,arguments),v=Math.min(kx,Math.max(-kx,i.apply(this,arguments)-g)),m=Math.min(Math.abs(v)/f,a.apply(this,arguments)),b=m*(v<0?-1:1);for(s=0;s<f;++s)(h=y[p[s]=s]=+t(o[s],s,o))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(y[t],y[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),s=0,u=d?(v-f*b)/d:0;s<f;++s,g=l)c=p[s],l=g+((h=y[c])>0?h*u:0)+b,y[c]={data:o[c],index:s,value:h,startAngle:g,endAngle:l,padAngle:m};return y}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:fx(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:fx(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:fx(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:fx(+t),o):a},o},Ux=qx(Lx);function $x(t){this._curve=t}function qx(t){function e(e){return new $x(t(e))}return e._curve=t,e}function Wx(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(qx(t)):e()._curve},t}$x.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var Vx=function(){return Wx(Fx().curve(Ux))},Hx=function(){var t=Px().curve(Ux),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Wx(n())},delete t.lineX0,t.lineEndAngle=function(){return Wx(r())},delete t.lineX1,t.lineInnerRadius=function(){return Wx(i())},delete t.lineY0,t.lineOuterRadius=function(){return Wx(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(qx(t)):e()._curve},t},Gx=function(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]},Xx=Array.prototype.slice;function Zx(t){return t.source}function Qx(t){return t.target}function Kx(t){var e=Zx,n=Qx,r=Ix,i=Rx,a=null;function o(){var o,s=Xx.call(arguments),c=e.apply(this,s),u=n.apply(this,s);if(a||(a=o=Ui()),t(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=u,s)),+i.apply(this,s)),o)return a=null,o+""||null}return o.source=function(t){return arguments.length?(e=t,o):e},o.target=function(t){return arguments.length?(n=t,o):n},o.x=function(t){return arguments.length?(r="function"==typeof t?t:fx(+t),o):r},o.y=function(t){return arguments.length?(i="function"==typeof t?t:fx(+t),o):i},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}function Jx(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function t_(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function e_(t,e,n,r,i){var a=Gx(e,n),o=Gx(e,n=(n+i)/2),s=Gx(r,n),c=Gx(r,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],c[0],c[1])}function n_(){return Kx(Jx)}function r_(){return Kx(t_)}function i_(){var t=Kx(e_);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var a_={draw:function(t,e){var n=Math.sqrt(e/xx);t.moveTo(n,0),t.arc(0,0,n,0,kx)}},o_={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},s_=Math.sqrt(1/3),c_=2*s_,u_={draw:function(t,e){var n=Math.sqrt(e/c_),r=n*s_;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},l_=Math.sin(xx/10)/Math.sin(7*xx/10),h_=Math.sin(kx/10)*l_,f_=-Math.cos(kx/10)*l_,d_={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=h_*n,i=f_*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=kx*a/5,s=Math.cos(o),c=Math.sin(o);t.lineTo(c*n,-s*n),t.lineTo(s*r-c*i,c*r+s*i)}t.closePath()}},p_={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},y_=Math.sqrt(3),g_={draw:function(t,e){var n=-Math.sqrt(e/(3*y_));t.moveTo(0,2*n),t.lineTo(-y_*n,-n),t.lineTo(y_*n,-n),t.closePath()}},v_=Math.sqrt(3)/2,m_=1/Math.sqrt(12),b_=3*(m_/2+1),x_={draw:function(t,e){var n=Math.sqrt(e/b_),r=n/2,i=n*m_,a=r,o=n*m_+n,s=-a,c=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,c),t.lineTo(-.5*r-v_*i,v_*r+-.5*i),t.lineTo(-.5*a-v_*o,v_*a+-.5*o),t.lineTo(-.5*s-v_*c,v_*s+-.5*c),t.lineTo(-.5*r+v_*i,-.5*i-v_*r),t.lineTo(-.5*a+v_*o,-.5*o-v_*a),t.lineTo(-.5*s+v_*c,-.5*c-v_*s),t.closePath()}},__=[a_,o_,u_,p_,d_,g_,x_],k_=function(){var t=fx(a_),e=fx(64),n=null;function r(){var r;if(n||(n=r=Ui()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:fx(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:fx(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r},w_=function(){};function E_(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function T_(t){this._context=t}T_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:E_(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:E_(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var C_=function(t){return new T_(t)};function S_(t){this._context=t}S_.prototype={areaStart:w_,areaEnd:w_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:E_(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var A_=function(t){return new S_(t)};function M_(t){this._context=t}M_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:E_(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var O_=function(t){return new M_(t)};function B_(t,e){this._basis=new T_(t),this._beta=e}B_.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,s=e[n]-a,c=-1;++c<=n;)r=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*e[c]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var N_=function t(e){function n(t){return 1===e?new T_(t):new B_(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function D_(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function L_(t,e){this._context=t,this._k=(1-e)/6}L_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:D_(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:D_(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var I_=function t(e){function n(t){return new L_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function R_(t,e){this._context=t,this._k=(1-e)/6}R_.prototype={areaStart:w_,areaEnd:w_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:D_(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var F_=function t(e){function n(t){return new R_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function P_(t,e){this._context=t,this._k=(1-e)/6}P_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:D_(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var j_=function t(e){function n(t){return new P_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Y_(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>1e-12){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function z_(t,e){this._context=t,this._alpha=e}z_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Y_(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var U_=function t(e){function n(t){return e?new z_(t,e):new L_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function $_(t,e){this._context=t,this._alpha=e}$_.prototype={areaStart:w_,areaEnd:w_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Y_(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var q_=function t(e){function n(t){return e?new $_(t,e):new R_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function W_(t,e){this._context=t,this._alpha=e}W_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Y_(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var V_=function t(e){function n(t){return e?new W_(t,e):new P_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function H_(t){this._context=t}H_.prototype={areaStart:w_,areaEnd:w_,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var G_=function(t){return new H_(t)};function X_(t){return t<0?-1:1}function Z_(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(X_(a)+X_(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Q_(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function K_(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function J_(t){this._context=t}function tk(t){this._context=new ek(t)}function ek(t){this._context=t}function nk(t){return new J_(t)}function rk(t){return new tk(t)}function ik(t){this._context=t}function ak(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}J_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:K_(this,this._t0,Q_(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,K_(this,Q_(this,n=Z_(this,t,e)),n);break;default:K_(this,this._t0,n=Z_(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(tk.prototype=Object.create(J_.prototype)).point=function(t,e){J_.prototype.point.call(this,e,t)},ek.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},ik.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=ak(t),i=ak(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var ok=function(t){return new ik(t)};function sk(t,e){this._context=t,this._t=e}sk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var ck=function(t){return new sk(t,.5)};function uk(t){return new sk(t,0)}function lk(t){return new sk(t,1)}var hk=function(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a<i;++a)for(r=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]},fk=function(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n};function dk(t,e){return t[e]}var pk=function(){var t=fx([]),e=fk,n=hk,r=dk;function i(i){var a,o,s=t.apply(this,arguments),c=i.length,u=s.length,l=new Array(u);for(a=0;a<u;++a){for(var h,f=s[a],d=l[a]=new Array(c),p=0;p<c;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.key=f}for(a=0,o=e(l);a<u;++a)l[o[a]].index=a;return n(l,o),l}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:fx(Xx.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:fx(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?fk:"function"==typeof t?t:fx(Xx.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?hk:t,i):n},i},yk=function(t,e){if((r=t.length)>0){for(var n,r,i,a=0,o=t[0].length;a<o;++a){for(i=n=0;n<r;++n)i+=t[n][a][1]||0;if(i)for(n=0;n<r;++n)t[n][a][1]/=i}hk(t,e)}},gk=function(t,e){if((s=t.length)>0)for(var n,r,i,a,o,s,c=0,u=t[e[0]].length;c<u;++c)for(a=o=0,n=0;n<s;++n)(i=(r=t[e[n]][c])[1]-r[0])>0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)},vk=function(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],a=i.length;r<a;++r){for(var o=0,s=0;o<n;++o)s+=t[o][r][1]||0;i[r][1]+=i[r][0]=-s/2}hk(t,e)}},mk=function(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,a=0,o=1;o<r;++o){for(var s=0,c=0,u=0;s<i;++s){for(var l=t[e[s]],h=l[o][1]||0,f=(h-(l[o-1][1]||0))/2,d=0;d<s;++d){var p=t[e[d]];f+=(p[o][1]||0)-(p[o-1][1]||0)}c+=h,u+=f*h}n[o-1][1]+=n[o-1][0]=a,c&&(a-=u/c)}n[o-1][1]+=n[o-1][0]=a,hk(t,e)}},bk=function(t){var e=t.map(xk);return fk(t).sort((function(t,n){return e[t]-e[n]}))};function xk(t){for(var e,n=-1,r=0,i=t.length,a=-1/0;++n<i;)(e=+t[n][1])>a&&(a=e,r=n);return r}var _k=function(t){var e=t.map(kk);return fk(t).sort((function(t,n){return e[t]-e[n]}))};function kk(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}var wk=function(t){return _k(t).reverse()},Ek=function(t){var e,n,r=t.length,i=t.map(kk),a=bk(t),o=0,s=0,c=[],u=[];for(e=0;e<r;++e)n=a[e],o<s?(o+=i[n],c.push(n)):(s+=i[n],u.push(n));return u.reverse().concat(c)},Tk=function(t){return fk(t).reverse()};var Ck=Date.prototype.toISOString?function(t){return t.toISOString()}:qg("%Y-%m-%dT%H:%M:%S.%LZ");var Sk=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:Wg("%Y-%m-%dT%H:%M:%S.%LZ"),Ak=function(t,e,n){var r=new $n,i=e;return null==e?(r.restart(t,e,n),r):(e=+e,n=null==n?zn():+n,r.restart((function a(o){o+=i,r.restart(a,i+=e,n),t(o)}),e,n),r)},Mk=function(t){return function(){return t}};function Ok(t){return t[0]}function Bk(t){return t[1]}function Nk(){this._=null}function Dk(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Lk(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Ik(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Rk(t){for(;t.L;)t=t.L;return t}Nk.prototype={constructor:Nk,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=Rk(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(Lk(this,n),n=(t=n).U),n.C=!1,r.C=!0,Ik(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(Ik(this,n),n=(t=n).U),n.C=!1,r.C=!0,Lk(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,a=t.L,o=t.R;if(n=a?o?Rk(o):a:o,i?i.L===t?i.L=n:i.R=n:this._=n,a&&o?(r=n.C,n.C=t.C,n.L=a,a.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Lk(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Ik(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Lk(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Ik(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Lk(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Ik(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Fk=Nk;function Pk(t,e,n,r){var i=[null,null],a=cw.push(i)-1;return i.left=t,i.right=e,n&&Yk(i,t,e,n),r&&Yk(i,e,t,r),ow[t.index].halfedges.push(a),ow[e.index].halfedges.push(a),i}function jk(t,e,n){var r=[e,n];return r.left=t,r}function Yk(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function zk(t,e,n,r,i){var a,o=t[0],s=t[1],c=o[0],u=o[1],l=0,h=1,f=s[0]-c,d=s[1]-u;if(a=e-c,f||!(a>0)){if(a/=f,f<0){if(a<l)return;a<h&&(h=a)}else if(f>0){if(a>h)return;a>l&&(l=a)}if(a=r-c,f||!(a<0)){if(a/=f,f<0){if(a>h)return;a>l&&(l=a)}else if(f>0){if(a<l)return;a<h&&(h=a)}if(a=n-u,d||!(a>0)){if(a/=d,d<0){if(a<l)return;a<h&&(h=a)}else if(d>0){if(a>h)return;a>l&&(l=a)}if(a=i-u,d||!(a<0)){if(a/=d,d<0){if(a>h)return;a>l&&(l=a)}else if(d>0){if(a<l)return;a<h&&(h=a)}return!(l>0||h<1)||(l>0&&(t[0]=[c+l*f,u+l*d]),h<1&&(t[1]=[c+h*f,u+h*d]),!0)}}}}}function Uk(t,e,n,r,i){var a=t[1];if(a)return!0;var o,s,c=t[0],u=t.left,l=t.right,h=u[0],f=u[1],d=l[0],p=l[1],y=(h+d)/2,g=(f+p)/2;if(p===f){if(y<e||y>=r)return;if(h>d){if(c){if(c[1]>=i)return}else c=[y,n];a=[y,i]}else{if(c){if(c[1]<n)return}else c=[y,i];a=[y,n]}}else if(s=g-(o=(h-d)/(p-f))*y,o<-1||o>1)if(h>d){if(c){if(c[1]>=i)return}else c=[(n-s)/o,n];a=[(i-s)/o,i]}else{if(c){if(c[1]<n)return}else c=[(i-s)/o,i];a=[(n-s)/o,n]}else if(f<p){if(c){if(c[0]>=r)return}else c=[e,o*e+s];a=[r,o*r+s]}else{if(c){if(c[0]<e)return}else c=[r,o*r+s];a=[e,o*e+s]}return t[0]=c,t[1]=a,!0}function $k(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function qk(t,e){return e[+(e.left!==t.site)]}function Wk(t,e){return e[+(e.left===t.site)]}var Vk,Hk=[];function Gk(){Dk(this),this.x=this.y=this.arc=this.site=this.cy=null}function Xk(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,a=n.site;if(r!==a){var o=i[0],s=i[1],c=r[0]-o,u=r[1]-s,l=a[0]-o,h=a[1]-s,f=2*(c*h-u*l);if(!(f>=-lw)){var d=c*c+u*u,p=l*l+h*h,y=(h*d-u*p)/f,g=(c*p-l*d)/f,v=Hk.pop()||new Gk;v.arc=t,v.site=i,v.x=y+o,v.y=(v.cy=g+s)+Math.sqrt(y*y+g*g),t.circle=v;for(var m=null,b=sw._;b;)if(v.y<b.y||v.y===b.y&&v.x<=b.x){if(!b.L){m=b.P;break}b=b.L}else{if(!b.R){m=b;break}b=b.R}sw.insert(m,v),m||(Vk=v)}}}}function Zk(t){var e=t.circle;e&&(e.P||(Vk=e.N),sw.remove(e),Hk.push(e),Dk(e),t.circle=null)}var Qk=[];function Kk(){Dk(this),this.edge=this.site=this.circle=null}function Jk(t){var e=Qk.pop()||new Kk;return e.site=t,e}function tw(t){Zk(t),aw.remove(t),Qk.push(t),Dk(t)}function ew(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,s=[t];tw(t);for(var c=a;c.circle&&Math.abs(n-c.circle.x)<uw&&Math.abs(r-c.circle.cy)<uw;)a=c.P,s.unshift(c),tw(c),c=a;s.unshift(c),Zk(c);for(var u=o;u.circle&&Math.abs(n-u.circle.x)<uw&&Math.abs(r-u.circle.cy)<uw;)o=u.N,s.push(u),tw(u),u=o;s.push(u),Zk(u);var l,h=s.length;for(l=1;l<h;++l)u=s[l],c=s[l-1],Yk(u.edge,c.site,u.site,i);c=s[0],(u=s[h-1]).edge=Pk(c.site,u.site,null,i),Xk(c),Xk(u)}function nw(t){for(var e,n,r,i,a=t[0],o=t[1],s=aw._;s;)if((r=rw(s,o)-a)>uw)s=s.L;else{if(!((i=a-iw(s,o))>uw)){r>-uw?(e=s.P,n=s):i>-uw?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){ow[t.index]={site:t,halfedges:[]}}(t);var c=Jk(t);if(aw.insert(e,c),e||n){if(e===n)return Zk(e),n=Jk(e.site),aw.insert(c,n),c.edge=n.edge=Pk(e.site,c.site),Xk(e),void Xk(n);if(n){Zk(e),Zk(n);var u=e.site,l=u[0],h=u[1],f=t[0]-l,d=t[1]-h,p=n.site,y=p[0]-l,g=p[1]-h,v=2*(f*g-d*y),m=f*f+d*d,b=y*y+g*g,x=[(g*m-d*b)/v+l,(f*b-y*m)/v+h];Yk(n.edge,u,p,x),c.edge=Pk(u,t,null,x),n.edge=Pk(t,p,null,x),Xk(e),Xk(n)}else c.edge=Pk(e.site,c.site)}}function rw(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var s=(n=o.site)[0],c=n[1],u=c-e;if(!u)return s;var l=s-r,h=1/a-1/u,f=l/u;return h?(-f+Math.sqrt(f*f-2*h*(l*l/(-2*u)-c+u/2+i-a/2)))/h+r:(r+s)/2}function iw(t,e){var n=t.N;if(n)return rw(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var aw,ow,sw,cw,uw=1e-6,lw=1e-12;function hw(t,e){return e[1]-t[1]||e[0]-t[0]}function fw(t,e){var n,r,i,a=t.sort(hw).pop();for(cw=[],ow=new Array(t.length),aw=new Fk,sw=new Fk;;)if(i=Vk,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(nw(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;ew(i.arc)}if(function(){for(var t,e,n,r,i=0,a=ow.length;i<a;++i)if((t=ow[i])&&(r=(e=t.halfedges).length)){var o=new Array(r),s=new Array(r);for(n=0;n<r;++n)o[n]=n,s[n]=$k(t,cw[e[n]]);for(o.sort((function(t,e){return s[e]-s[t]})),n=0;n<r;++n)s[n]=e[o[n]];for(n=0;n<r;++n)e[n]=s[n]}}(),e){var o=+e[0][0],s=+e[0][1],c=+e[1][0],u=+e[1][1];!function(t,e,n,r){for(var i,a=cw.length;a--;)Uk(i=cw[a],t,e,n,r)&&zk(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>uw||Math.abs(i[0][1]-i[1][1])>uw)||delete cw[a]}(o,s,c,u),function(t,e,n,r){var i,a,o,s,c,u,l,h,f,d,p,y,g=ow.length,v=!0;for(i=0;i<g;++i)if(a=ow[i]){for(o=a.site,s=(c=a.halfedges).length;s--;)cw[c[s]]||c.splice(s,1);for(s=0,u=c.length;s<u;)p=(d=Wk(a,cw[c[s]]))[0],y=d[1],h=(l=qk(a,cw[c[++s%u]]))[0],f=l[1],(Math.abs(p-h)>uw||Math.abs(y-f)>uw)&&(c.splice(s,0,cw.push(jk(o,d,Math.abs(p-t)<uw&&r-y>uw?[t,Math.abs(h-t)<uw?f:r]:Math.abs(y-r)<uw&&n-p>uw?[Math.abs(f-r)<uw?h:n,r]:Math.abs(p-n)<uw&&y-e>uw?[n,Math.abs(h-n)<uw?f:e]:Math.abs(y-e)<uw&&p-t>uw?[Math.abs(f-e)<uw?h:t,e]:null))-1),++u);u&&(v=!1)}if(v){var m,b,x,_=1/0;for(i=0,v=null;i<g;++i)(a=ow[i])&&(x=(m=(o=a.site)[0]-t)*m+(b=o[1]-e)*b)<_&&(_=x,v=a);if(v){var k=[t,e],w=[t,r],E=[n,r],T=[n,e];v.halfedges.push(cw.push(jk(o=v.site,k,w))-1,cw.push(jk(o,w,E))-1,cw.push(jk(o,E,T))-1,cw.push(jk(o,T,k))-1)}}for(i=0;i<g;++i)(a=ow[i])&&(a.halfedges.length||delete ow[i])}(o,s,c,u)}this.edges=cw,this.cells=ow,aw=sw=cw=ow=null}fw.prototype={constructor:fw,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return qk(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(a=(i=n.halfedges).length)for(var i,a,o,s,c,u,l=n.site,h=-1,f=e[i[a-1]],d=f.left===l?f.right:f.left;++h<a;)o=d,d=(f=e[i[h]]).left===l?f.right:f.left,o&&d&&r<o.index&&r<d.index&&(c=o,u=d,((s=l)[0]-u[0])*(c[1]-s[1])-(s[0]-c[0])*(u[1]-s[1])<0)&&t.push([l.data,o.data,d.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,a=this,o=a._found||0,s=a.cells.length;!(i=a.cells[o]);)if(++o>=s)return null;var c=t-i.site[0],u=e-i.site[1],l=c*c+u*u;do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var c=t-s[0],u=e-s[1],h=c*c+u*u;h<l&&(l=h,o=s.index)}}))}while(null!==o);return a._found=r,null==n||l<=n*n?i.site:null}};var dw=function(){var t=Ok,e=Bk,n=null;function r(r){return new fw(r.map((function(n,i){var a=[Math.round(t(n,i,r)/uw)*uw,Math.round(e(n,i,r)/uw)*uw];return a.index=i,a.data=n,a})),n)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(e){return arguments.length?(t="function"==typeof e?e:Mk(+e),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:Mk(+t),r):e},r.extent=function(t){return arguments.length?(n=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(t){return arguments.length?(n=null==t?null:[[0,0],[+t[0],+t[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r},pw=function(t){return function(){return t}};function yw(t,e,n){this.target=t,this.type=e,this.transform=n}function gw(t,e,n){this.k=t,this.x=e,this.y=n}gw.prototype={constructor:gw,scale:function(t){return 1===t?this:new gw(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new gw(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var vw=new gw(1,0,0);function mw(t){for(;!t.__zoom;)if(!(t=t.parentNode))return vw;return t.__zoom}function bw(){ce.stopImmediatePropagation()}mw.prototype=gw.prototype;var xw=function(){ce.preventDefault(),ce.stopImmediatePropagation()};function _w(){return!ce.ctrlKey&&!ce.button}function kw(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function ww(){return this.__zoom||vw}function Ew(){return-ce.deltaY*(1===ce.deltaMode?.05:ce.deltaMode?1:.002)}function Tw(){return navigator.maxTouchPoints||"ontouchstart"in this}function Cw(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}var Sw=function(){var t,e,n=_w,r=kw,i=Cw,a=Ew,o=Tw,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,l=fp,h=lt("start","zoom","end"),f=0;function d(t){t.property("__zoom",ww).on("wheel.zoom",x).on("mousedown.zoom",_).on("dblclick.zoom",k).filter(o).on("touchstart.zoom",w).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new gw(e,t.x,t.y)}function y(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new gw(t.k,r,i)}function g(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function v(t,e,n){t.on("start.zoom",(function(){m(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){m(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,a=m(t,i),o=r.apply(t,i),s=null==n?g(o):"function"==typeof n?n.apply(t,i):n,c=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),u=t.__zoom,h="function"==typeof e?e.apply(t,i):e,f=l(u.invert(s).concat(c/u.k),h.invert(s).concat(c/h.k));return function(t){if(1===t)t=h;else{var e=f(t),n=c/e[2];t=new gw(n,s[0]-e[0]*n,s[1]-e[1]*n)}a.zoom(null,t)}}))}function m(t,e,n){return!n&&t.__zooming||new b(t,e)}function b(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function x(){if(n.apply(this,arguments)){var t=m(this,arguments),e=this.__zoom,r=Math.max(s[0],Math.min(s[1],e.k*Math.pow(2,a.apply(this,arguments)))),o=Nn(this);if(t.wheel)t.mouse[0][0]===o[0]&&t.mouse[0][1]===o[1]||(t.mouse[1]=e.invert(t.mouse[0]=o)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[o,e.invert(o)],or(this),t.start()}xw(),t.wheel=setTimeout(u,150),t.zoom("mouse",i(y(p(e,r),t.mouse[0],t.mouse[1]),t.extent,c))}function u(){t.wheel=null,t.end()}}function _(){if(!e&&n.apply(this,arguments)){var t=m(this,arguments,!0),r=ke(ce.view).on("mousemove.zoom",u,!0).on("mouseup.zoom",l,!0),a=Nn(this),o=ce.clientX,s=ce.clientY;Te(ce.view),bw(),t.mouse=[a,this.__zoom.invert(a)],or(this),t.start()}function u(){if(xw(),!t.moved){var e=ce.clientX-o,n=ce.clientY-s;t.moved=e*e+n*n>f}t.zoom("mouse",i(y(t.that.__zoom,t.mouse[0]=Nn(t.that),t.mouse[1]),t.extent,c))}function l(){r.on("mousemove.zoom mouseup.zoom",null),Ce(ce.view,t.moved),xw(),t.end()}}function k(){if(n.apply(this,arguments)){var t=this.__zoom,e=Nn(this),a=t.invert(e),o=t.k*(ce.shiftKey?.5:2),s=i(y(p(t,o),e,a),r.apply(this,arguments),c);xw(),u>0?ke(this).transition().duration(u).call(v,s,e):ke(this).call(d.transform,s)}}function w(){if(n.apply(this,arguments)){var e,r,i,a,o=ce.touches,s=o.length,c=m(this,arguments,ce.changedTouches.length===s);for(bw(),r=0;r<s;++r)i=o[r],a=[a=Bn(this,o,i.identifier),this.__zoom.invert(a),i.identifier],c.touch0?c.touch1||c.touch0[2]===a[2]||(c.touch1=a,c.taps=0):(c.touch0=a,e=!0,c.taps=1+!!t);t&&(t=clearTimeout(t)),e&&(c.taps<2&&(t=setTimeout((function(){t=null}),500)),or(this),c.start())}}function E(){if(this.__zooming){var e,n,r,a,o=m(this,arguments),s=ce.changedTouches,u=s.length;for(xw(),t&&(t=clearTimeout(t)),o.taps=0,e=0;e<u;++e)n=s[e],r=Bn(this,s,n.identifier),o.touch0&&o.touch0[2]===n.identifier?o.touch0[0]=r:o.touch1&&o.touch1[2]===n.identifier&&(o.touch1[0]=r);if(n=o.that.__zoom,o.touch1){var l=o.touch0[0],h=o.touch0[1],f=o.touch1[0],d=o.touch1[1],g=(g=f[0]-l[0])*g+(g=f[1]-l[1])*g,v=(v=d[0]-h[0])*v+(v=d[1]-h[1])*v;n=p(n,Math.sqrt(g/v)),r=[(l[0]+f[0])/2,(l[1]+f[1])/2],a=[(h[0]+d[0])/2,(h[1]+d[1])/2]}else{if(!o.touch0)return;r=o.touch0[0],a=o.touch0[1]}o.zoom("touch",i(y(n,r,a),o.extent,c))}}function T(){if(this.__zooming){var t,n,r=m(this,arguments),i=ce.changedTouches,a=i.length;for(bw(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),500),t=0;t<a;++t)n=i[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),2===r.taps){var o=ke(this).on("dblclick.zoom");o&&o.apply(this,arguments)}}}return d.transform=function(t,e,n){var r=t.selection?t.selection():t;r.property("__zoom",ww),t!==r?v(t,e,n):r.interrupt().each((function(){m(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},d.scaleBy=function(t,e,n){d.scaleTo(t,(function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n}),n)},d.scaleTo=function(t,e,n){d.transform(t,(function(){var t=r.apply(this,arguments),a=this.__zoom,o=null==n?g(t):"function"==typeof n?n.apply(this,arguments):n,s=a.invert(o),u="function"==typeof e?e.apply(this,arguments):e;return i(y(p(a,u),o,s),t,c)}),n)},d.translateBy=function(t,e,n){d.transform(t,(function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),c)}))},d.translateTo=function(t,e,n,a){d.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,s=null==a?g(t):"function"==typeof a?a.apply(this,arguments):a;return i(vw.translate(s[0],s[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)}),a)},b.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){pe(new yw(d,t,this.that.__zoom),h.apply,h,[t,this.that,this.args])}},d.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:pw(+t),d):a},d.filter=function(t){return arguments.length?(n="function"==typeof t?t:pw(!!t),d):n},d.touchable=function(t){return arguments.length?(o="function"==typeof t?t:pw(!!t),d):o},d.extent=function(t){return arguments.length?(r="function"==typeof t?t:pw([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),d):r},d.scaleExtent=function(t){return arguments.length?(s[0]=+t[0],s[1]=+t[1],d):[s[0],s[1]]},d.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],d):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},d.constrain=function(t){return arguments.length?(i=t,d):i},d.duration=function(t){return arguments.length?(u=+t,d):u},d.interpolate=function(t){return arguments.length?(l=t,d):l},d.on=function(){var t=h.on.apply(h,arguments);return t===h?d:t},d.clickDistance=function(t){return arguments.length?(f=(t=+t)*t,d):Math.sqrt(f)},d};n.d(e,"version",(function(){return"5.15.0"})),n.d(e,"bisect",(function(){return c})),n.d(e,"bisectRight",(function(){return o})),n.d(e,"bisectLeft",(function(){return s})),n.d(e,"ascending",(function(){return r})),n.d(e,"bisector",(function(){return i})),n.d(e,"cross",(function(){return h})),n.d(e,"descending",(function(){return f})),n.d(e,"deviation",(function(){return y})),n.d(e,"extent",(function(){return g})),n.d(e,"histogram",(function(){return O})),n.d(e,"thresholdFreedmanDiaconis",(function(){return N})),n.d(e,"thresholdScott",(function(){return D})),n.d(e,"thresholdSturges",(function(){return M})),n.d(e,"max",(function(){return L})),n.d(e,"mean",(function(){return I})),n.d(e,"median",(function(){return R})),n.d(e,"merge",(function(){return F})),n.d(e,"min",(function(){return P})),n.d(e,"pairs",(function(){return u})),n.d(e,"permute",(function(){return j})),n.d(e,"quantile",(function(){return B})),n.d(e,"range",(function(){return k})),n.d(e,"scan",(function(){return Y})),n.d(e,"shuffle",(function(){return z})),n.d(e,"sum",(function(){return U})),n.d(e,"ticks",(function(){return C})),n.d(e,"tickIncrement",(function(){return S})),n.d(e,"tickStep",(function(){return A})),n.d(e,"transpose",(function(){return $})),n.d(e,"variance",(function(){return p})),n.d(e,"zip",(function(){return W})),n.d(e,"axisTop",(function(){return tt})),n.d(e,"axisRight",(function(){return et})),n.d(e,"axisBottom",(function(){return nt})),n.d(e,"axisLeft",(function(){return rt})),n.d(e,"brush",(function(){return Ti})),n.d(e,"brushX",(function(){return wi})),n.d(e,"brushY",(function(){return Ei})),n.d(e,"brushSelection",(function(){return ki})),n.d(e,"chord",(function(){return Li})),n.d(e,"ribbon",(function(){return Gi})),n.d(e,"nest",(function(){return Ki})),n.d(e,"set",(function(){return oa})),n.d(e,"map",(function(){return Qi})),n.d(e,"keys",(function(){return sa})),n.d(e,"values",(function(){return ca})),n.d(e,"entries",(function(){return ua})),n.d(e,"color",(function(){return $e})),n.d(e,"rgb",(function(){return He})),n.d(e,"hsl",(function(){return tn})),n.d(e,"lab",(function(){return pa})),n.d(e,"hcl",(function(){return ka})),n.d(e,"lch",(function(){return _a})),n.d(e,"gray",(function(){return da})),n.d(e,"cubehelix",(function(){return Oa})),n.d(e,"contours",(function(){return Ya})),n.d(e,"contourDensity",(function(){return Va})),n.d(e,"dispatch",(function(){return lt})),n.d(e,"drag",(function(){return Ja})),n.d(e,"dragDisable",(function(){return Te})),n.d(e,"dragEnable",(function(){return Ce})),n.d(e,"dsvFormat",(function(){return oo})),n.d(e,"csvParse",(function(){return co})),n.d(e,"csvParseRows",(function(){return uo})),n.d(e,"csvFormat",(function(){return lo})),n.d(e,"csvFormatBody",(function(){return ho})),n.d(e,"csvFormatRows",(function(){return fo})),n.d(e,"csvFormatRow",(function(){return po})),n.d(e,"csvFormatValue",(function(){return yo})),n.d(e,"tsvParse",(function(){return vo})),n.d(e,"tsvParseRows",(function(){return mo})),n.d(e,"tsvFormat",(function(){return bo})),n.d(e,"tsvFormatBody",(function(){return xo})),n.d(e,"tsvFormatRows",(function(){return _o})),n.d(e,"tsvFormatRow",(function(){return ko})),n.d(e,"tsvFormatValue",(function(){return wo})),n.d(e,"autoType",(function(){return Eo})),n.d(e,"easeLinear",(function(){return Co})),n.d(e,"easeQuad",(function(){return Mo})),n.d(e,"easeQuadIn",(function(){return So})),n.d(e,"easeQuadOut",(function(){return Ao})),n.d(e,"easeQuadInOut",(function(){return Mo})),n.d(e,"easeCubic",(function(){return Vr})),n.d(e,"easeCubicIn",(function(){return qr})),n.d(e,"easeCubicOut",(function(){return Wr})),n.d(e,"easeCubicInOut",(function(){return Vr})),n.d(e,"easePoly",(function(){return No})),n.d(e,"easePolyIn",(function(){return Oo})),n.d(e,"easePolyOut",(function(){return Bo})),n.d(e,"easePolyInOut",(function(){return No})),n.d(e,"easeSin",(function(){return Fo})),n.d(e,"easeSinIn",(function(){return Io})),n.d(e,"easeSinOut",(function(){return Ro})),n.d(e,"easeSinInOut",(function(){return Fo})),n.d(e,"easeExp",(function(){return Yo})),n.d(e,"easeExpIn",(function(){return Po})),n.d(e,"easeExpOut",(function(){return jo})),n.d(e,"easeExpInOut",(function(){return Yo})),n.d(e,"easeCircle",(function(){return $o})),n.d(e,"easeCircleIn",(function(){return zo})),n.d(e,"easeCircleOut",(function(){return Uo})),n.d(e,"easeCircleInOut",(function(){return $o})),n.d(e,"easeBounce",(function(){return Wo})),n.d(e,"easeBounceIn",(function(){return qo})),n.d(e,"easeBounceOut",(function(){return Wo})),n.d(e,"easeBounceInOut",(function(){return Vo})),n.d(e,"easeBack",(function(){return Xo})),n.d(e,"easeBackIn",(function(){return Ho})),n.d(e,"easeBackOut",(function(){return Go})),n.d(e,"easeBackInOut",(function(){return Xo})),n.d(e,"easeElastic",(function(){return Ko})),n.d(e,"easeElasticIn",(function(){return Qo})),n.d(e,"easeElasticOut",(function(){return Ko})),n.d(e,"easeElasticInOut",(function(){return Jo})),n.d(e,"blob",(function(){return es})),n.d(e,"buffer",(function(){return rs})),n.d(e,"dsv",(function(){return ss})),n.d(e,"csv",(function(){return cs})),n.d(e,"tsv",(function(){return us})),n.d(e,"image",(function(){return ls})),n.d(e,"json",(function(){return fs})),n.d(e,"text",(function(){return as})),n.d(e,"xml",(function(){return ps})),n.d(e,"html",(function(){return ys})),n.d(e,"svg",(function(){return gs})),n.d(e,"forceCenter",(function(){return vs})),n.d(e,"forceCollide",(function(){return Os})),n.d(e,"forceLink",(function(){return Ds})),n.d(e,"forceManyBody",(function(){return Ps})),n.d(e,"forceRadial",(function(){return js})),n.d(e,"forceSimulation",(function(){return Fs})),n.d(e,"forceX",(function(){return Ys})),n.d(e,"forceY",(function(){return zs})),n.d(e,"formatDefaultLocale",(function(){return rc})),n.d(e,"format",(function(){return Xs})),n.d(e,"formatPrefix",(function(){return Zs})),n.d(e,"formatLocale",(function(){return nc})),n.d(e,"formatSpecifier",(function(){return Ws})),n.d(e,"FormatSpecifier",(function(){return Vs})),n.d(e,"precisionFixed",(function(){return ic})),n.d(e,"precisionPrefix",(function(){return ac})),n.d(e,"precisionRound",(function(){return oc})),n.d(e,"geoArea",(function(){return Qc})),n.d(e,"geoBounds",(function(){return $u})),n.d(e,"geoCentroid",(function(){return el})),n.d(e,"geoCircle",(function(){return fl})),n.d(e,"geoClipAntimeridian",(function(){return El})),n.d(e,"geoClipCircle",(function(){return Tl})),n.d(e,"geoClipExtent",(function(){return Ol})),n.d(e,"geoClipRectangle",(function(){return Cl})),n.d(e,"geoContains",(function(){return Gl})),n.d(e,"geoDistance",(function(){return jl})),n.d(e,"geoGraticule",(function(){return Ql})),n.d(e,"geoGraticule10",(function(){return Kl})),n.d(e,"geoInterpolate",(function(){return rh})),n.d(e,"geoLength",(function(){return Rl})),n.d(e,"geoPath",(function(){return ef})),n.d(e,"geoAlbers",(function(){return _f})),n.d(e,"geoAlbersUsa",(function(){return kf})),n.d(e,"geoAzimuthalEqualArea",(function(){return Cf})),n.d(e,"geoAzimuthalEqualAreaRaw",(function(){return Tf})),n.d(e,"geoAzimuthalEquidistant",(function(){return Af})),n.d(e,"geoAzimuthalEquidistantRaw",(function(){return Sf})),n.d(e,"geoConicConformal",(function(){return Lf})),n.d(e,"geoConicConformalRaw",(function(){return Df})),n.d(e,"geoConicEqualArea",(function(){return xf})),n.d(e,"geoConicEqualAreaRaw",(function(){return bf})),n.d(e,"geoConicEquidistant",(function(){return Pf})),n.d(e,"geoConicEquidistantRaw",(function(){return Ff})),n.d(e,"geoEqualEarth",(function(){return Wf})),n.d(e,"geoEqualEarthRaw",(function(){return qf})),n.d(e,"geoEquirectangular",(function(){return Rf})),n.d(e,"geoEquirectangularRaw",(function(){return If})),n.d(e,"geoGnomonic",(function(){return Hf})),n.d(e,"geoGnomonicRaw",(function(){return Vf})),n.d(e,"geoIdentity",(function(){return Xf})),n.d(e,"geoProjection",(function(){return gf})),n.d(e,"geoProjectionMutator",(function(){return vf})),n.d(e,"geoMercator",(function(){return Of})),n.d(e,"geoMercatorRaw",(function(){return Mf})),n.d(e,"geoNaturalEarth1",(function(){return Qf})),n.d(e,"geoNaturalEarth1Raw",(function(){return Zf})),n.d(e,"geoOrthographic",(function(){return Jf})),n.d(e,"geoOrthographicRaw",(function(){return Kf})),n.d(e,"geoStereographic",(function(){return ed})),n.d(e,"geoStereographicRaw",(function(){return td})),n.d(e,"geoTransverseMercator",(function(){return rd})),n.d(e,"geoTransverseMercatorRaw",(function(){return nd})),n.d(e,"geoRotation",(function(){return ul})),n.d(e,"geoStream",(function(){return $c})),n.d(e,"geoTransform",(function(){return nf})),n.d(e,"cluster",(function(){return sd})),n.d(e,"hierarchy",(function(){return ud})),n.d(e,"pack",(function(){return Ld})),n.d(e,"packSiblings",(function(){return Ad})),n.d(e,"packEnclose",(function(){return yd})),n.d(e,"partition",(function(){return Yd})),n.d(e,"stratify",(function(){return Wd})),n.d(e,"tree",(function(){return Kd})),n.d(e,"treemap",(function(){return rp})),n.d(e,"treemapBinary",(function(){return ip})),n.d(e,"treemapDice",(function(){return jd})),n.d(e,"treemapSlice",(function(){return Jd})),n.d(e,"treemapSliceDice",(function(){return ap})),n.d(e,"treemapSquarify",(function(){return np})),n.d(e,"treemapResquarify",(function(){return op})),n.d(e,"interpolate",(function(){return An})),n.d(e,"interpolateArray",(function(){return mn})),n.d(e,"interpolateBasis",(function(){return an})),n.d(e,"interpolateBasisClosed",(function(){return on})),n.d(e,"interpolateDate",(function(){return xn})),n.d(e,"interpolateDiscrete",(function(){return sp})),n.d(e,"interpolateHue",(function(){return cp})),n.d(e,"interpolateNumber",(function(){return _n})),n.d(e,"interpolateNumberArray",(function(){return gn})),n.d(e,"interpolateObject",(function(){return kn})),n.d(e,"interpolateRound",(function(){return up})),n.d(e,"interpolateString",(function(){return Sn})),n.d(e,"interpolateTransformCss",(function(){return hr})),n.d(e,"interpolateTransformSvg",(function(){return fr})),n.d(e,"interpolateZoom",(function(){return fp})),n.d(e,"interpolateRgb",(function(){return fn})),n.d(e,"interpolateRgbBasis",(function(){return pn})),n.d(e,"interpolateRgbBasisClosed",(function(){return yn})),n.d(e,"interpolateHsl",(function(){return pp})),n.d(e,"interpolateHslLong",(function(){return yp})),n.d(e,"interpolateLab",(function(){return gp})),n.d(e,"interpolateHcl",(function(){return mp})),n.d(e,"interpolateHclLong",(function(){return bp})),n.d(e,"interpolateCubehelix",(function(){return _p})),n.d(e,"interpolateCubehelixLong",(function(){return kp})),n.d(e,"piecewise",(function(){return wp})),n.d(e,"quantize",(function(){return Ep})),n.d(e,"path",(function(){return Ui})),n.d(e,"polygonArea",(function(){return Tp})),n.d(e,"polygonCentroid",(function(){return Cp})),n.d(e,"polygonHull",(function(){return Mp})),n.d(e,"polygonContains",(function(){return Op})),n.d(e,"polygonLength",(function(){return Bp})),n.d(e,"quadtree",(function(){return Es})),n.d(e,"randomUniform",(function(){return Dp})),n.d(e,"randomNormal",(function(){return Lp})),n.d(e,"randomLogNormal",(function(){return Ip})),n.d(e,"randomBates",(function(){return Fp})),n.d(e,"randomIrwinHall",(function(){return Rp})),n.d(e,"randomExponential",(function(){return Pp})),n.d(e,"scaleBand",(function(){return Vp})),n.d(e,"scalePoint",(function(){return Gp})),n.d(e,"scaleIdentity",(function(){return cy})),n.d(e,"scaleLinear",(function(){return sy})),n.d(e,"scaleLog",(function(){return vy})),n.d(e,"scaleSymlog",(function(){return _y})),n.d(e,"scaleOrdinal",(function(){return Wp})),n.d(e,"scaleImplicit",(function(){return qp})),n.d(e,"scalePow",(function(){return Cy})),n.d(e,"scaleSqrt",(function(){return Sy})),n.d(e,"scaleQuantile",(function(){return Ay})),n.d(e,"scaleQuantize",(function(){return My})),n.d(e,"scaleThreshold",(function(){return Oy})),n.d(e,"scaleTime",(function(){return sm})),n.d(e,"scaleUtc",(function(){return vm})),n.d(e,"scaleSequential",(function(){return xm})),n.d(e,"scaleSequentialLog",(function(){return _m})),n.d(e,"scaleSequentialPow",(function(){return wm})),n.d(e,"scaleSequentialSqrt",(function(){return Em})),n.d(e,"scaleSequentialSymlog",(function(){return km})),n.d(e,"scaleSequentialQuantile",(function(){return Tm})),n.d(e,"scaleDiverging",(function(){return Sm})),n.d(e,"scaleDivergingLog",(function(){return Am})),n.d(e,"scaleDivergingPow",(function(){return Om})),n.d(e,"scaleDivergingSqrt",(function(){return Bm})),n.d(e,"scaleDivergingSymlog",(function(){return Mm})),n.d(e,"tickFormat",(function(){return ay})),n.d(e,"schemeCategory10",(function(){return Dm})),n.d(e,"schemeAccent",(function(){return Lm})),n.d(e,"schemeDark2",(function(){return Im})),n.d(e,"schemePaired",(function(){return Rm})),n.d(e,"schemePastel1",(function(){return Fm})),n.d(e,"schemePastel2",(function(){return Pm})),n.d(e,"schemeSet1",(function(){return jm})),n.d(e,"schemeSet2",(function(){return Ym})),n.d(e,"schemeSet3",(function(){return zm})),n.d(e,"schemeTableau10",(function(){return Um})),n.d(e,"interpolateBrBG",(function(){return Wm})),n.d(e,"schemeBrBG",(function(){return qm})),n.d(e,"interpolatePRGn",(function(){return Hm})),n.d(e,"schemePRGn",(function(){return Vm})),n.d(e,"interpolatePiYG",(function(){return Xm})),n.d(e,"schemePiYG",(function(){return Gm})),n.d(e,"interpolatePuOr",(function(){return Qm})),n.d(e,"schemePuOr",(function(){return Zm})),n.d(e,"interpolateRdBu",(function(){return Jm})),n.d(e,"schemeRdBu",(function(){return Km})),n.d(e,"interpolateRdGy",(function(){return eb})),n.d(e,"schemeRdGy",(function(){return tb})),n.d(e,"interpolateRdYlBu",(function(){return rb})),n.d(e,"schemeRdYlBu",(function(){return nb})),n.d(e,"interpolateRdYlGn",(function(){return ab})),n.d(e,"schemeRdYlGn",(function(){return ib})),n.d(e,"interpolateSpectral",(function(){return sb})),n.d(e,"schemeSpectral",(function(){return ob})),n.d(e,"interpolateBuGn",(function(){return ub})),n.d(e,"schemeBuGn",(function(){return cb})),n.d(e,"interpolateBuPu",(function(){return hb})),n.d(e,"schemeBuPu",(function(){return lb})),n.d(e,"interpolateGnBu",(function(){return db})),n.d(e,"schemeGnBu",(function(){return fb})),n.d(e,"interpolateOrRd",(function(){return yb})),n.d(e,"schemeOrRd",(function(){return pb})),n.d(e,"interpolatePuBuGn",(function(){return vb})),n.d(e,"schemePuBuGn",(function(){return gb})),n.d(e,"interpolatePuBu",(function(){return bb})),n.d(e,"schemePuBu",(function(){return mb})),n.d(e,"interpolatePuRd",(function(){return _b})),n.d(e,"schemePuRd",(function(){return xb})),n.d(e,"interpolateRdPu",(function(){return wb})),n.d(e,"schemeRdPu",(function(){return kb})),n.d(e,"interpolateYlGnBu",(function(){return Tb})),n.d(e,"schemeYlGnBu",(function(){return Eb})),n.d(e,"interpolateYlGn",(function(){return Sb})),n.d(e,"schemeYlGn",(function(){return Cb})),n.d(e,"interpolateYlOrBr",(function(){return Mb})),n.d(e,"schemeYlOrBr",(function(){return Ab})),n.d(e,"interpolateYlOrRd",(function(){return Bb})),n.d(e,"schemeYlOrRd",(function(){return Ob})),n.d(e,"interpolateBlues",(function(){return Db})),n.d(e,"schemeBlues",(function(){return Nb})),n.d(e,"interpolateGreens",(function(){return Ib})),n.d(e,"schemeGreens",(function(){return Lb})),n.d(e,"interpolateGreys",(function(){return Fb})),n.d(e,"schemeGreys",(function(){return Rb})),n.d(e,"interpolatePurples",(function(){return jb})),n.d(e,"schemePurples",(function(){return Pb})),n.d(e,"interpolateReds",(function(){return zb})),n.d(e,"schemeReds",(function(){return Yb})),n.d(e,"interpolateOranges",(function(){return $b})),n.d(e,"schemeOranges",(function(){return Ub})),n.d(e,"interpolateCividis",(function(){return qb})),n.d(e,"interpolateCubehelixDefault",(function(){return Wb})),n.d(e,"interpolateRainbow",(function(){return Xb})),n.d(e,"interpolateWarm",(function(){return Vb})),n.d(e,"interpolateCool",(function(){return Hb})),n.d(e,"interpolateSinebow",(function(){return Jb})),n.d(e,"interpolateTurbo",(function(){return tx})),n.d(e,"interpolateViridis",(function(){return nx})),n.d(e,"interpolateMagma",(function(){return rx})),n.d(e,"interpolateInferno",(function(){return ix})),n.d(e,"interpolatePlasma",(function(){return ax})),n.d(e,"create",(function(){return ox})),n.d(e,"creator",(function(){return ne})),n.d(e,"local",(function(){return cx})),n.d(e,"matcher",(function(){return yt})),n.d(e,"mouse",(function(){return Nn})),n.d(e,"namespace",(function(){return wt})),n.d(e,"namespaces",(function(){return kt})),n.d(e,"clientPoint",(function(){return On})),n.d(e,"select",(function(){return ke})),n.d(e,"selectAll",(function(){return lx})),n.d(e,"selection",(function(){return _e})),n.d(e,"selector",(function(){return ft})),n.d(e,"selectorAll",(function(){return pt})),n.d(e,"style",(function(){return Lt})),n.d(e,"touch",(function(){return Bn})),n.d(e,"touches",(function(){return hx})),n.d(e,"window",(function(){return Ot})),n.d(e,"event",(function(){return ce})),n.d(e,"customEvent",(function(){return pe})),n.d(e,"arc",(function(){return Nx})),n.d(e,"area",(function(){return Px})),n.d(e,"line",(function(){return Fx})),n.d(e,"pie",(function(){return zx})),n.d(e,"areaRadial",(function(){return Hx})),n.d(e,"radialArea",(function(){return Hx})),n.d(e,"lineRadial",(function(){return Vx})),n.d(e,"radialLine",(function(){return Vx})),n.d(e,"pointRadial",(function(){return Gx})),n.d(e,"linkHorizontal",(function(){return n_})),n.d(e,"linkVertical",(function(){return r_})),n.d(e,"linkRadial",(function(){return i_})),n.d(e,"symbol",(function(){return k_})),n.d(e,"symbols",(function(){return __})),n.d(e,"symbolCircle",(function(){return a_})),n.d(e,"symbolCross",(function(){return o_})),n.d(e,"symbolDiamond",(function(){return u_})),n.d(e,"symbolSquare",(function(){return p_})),n.d(e,"symbolStar",(function(){return d_})),n.d(e,"symbolTriangle",(function(){return g_})),n.d(e,"symbolWye",(function(){return x_})),n.d(e,"curveBasisClosed",(function(){return A_})),n.d(e,"curveBasisOpen",(function(){return O_})),n.d(e,"curveBasis",(function(){return C_})),n.d(e,"curveBundle",(function(){return N_})),n.d(e,"curveCardinalClosed",(function(){return F_})),n.d(e,"curveCardinalOpen",(function(){return j_})),n.d(e,"curveCardinal",(function(){return I_})),n.d(e,"curveCatmullRomClosed",(function(){return q_})),n.d(e,"curveCatmullRomOpen",(function(){return V_})),n.d(e,"curveCatmullRom",(function(){return U_})),n.d(e,"curveLinearClosed",(function(){return G_})),n.d(e,"curveLinear",(function(){return Lx})),n.d(e,"curveMonotoneX",(function(){return nk})),n.d(e,"curveMonotoneY",(function(){return rk})),n.d(e,"curveNatural",(function(){return ok})),n.d(e,"curveStep",(function(){return ck})),n.d(e,"curveStepAfter",(function(){return lk})),n.d(e,"curveStepBefore",(function(){return uk})),n.d(e,"stack",(function(){return pk})),n.d(e,"stackOffsetExpand",(function(){return yk})),n.d(e,"stackOffsetDiverging",(function(){return gk})),n.d(e,"stackOffsetNone",(function(){return hk})),n.d(e,"stackOffsetSilhouette",(function(){return vk})),n.d(e,"stackOffsetWiggle",(function(){return mk})),n.d(e,"stackOrderAppearance",(function(){return bk})),n.d(e,"stackOrderAscending",(function(){return _k})),n.d(e,"stackOrderDescending",(function(){return wk})),n.d(e,"stackOrderInsideOut",(function(){return Ek})),n.d(e,"stackOrderNone",(function(){return fk})),n.d(e,"stackOrderReverse",(function(){return Tk})),n.d(e,"timeInterval",(function(){return Dy})),n.d(e,"timeMillisecond",(function(){return pg})),n.d(e,"timeMilliseconds",(function(){return yg})),n.d(e,"utcMillisecond",(function(){return pg})),n.d(e,"utcMilliseconds",(function(){return yg})),n.d(e,"timeSecond",(function(){return hg})),n.d(e,"timeSeconds",(function(){return fg})),n.d(e,"utcSecond",(function(){return hg})),n.d(e,"utcSeconds",(function(){return fg})),n.d(e,"timeMinute",(function(){return cg})),n.d(e,"timeMinutes",(function(){return ug})),n.d(e,"timeHour",(function(){return ag})),n.d(e,"timeHours",(function(){return og})),n.d(e,"timeDay",(function(){return ng})),n.d(e,"timeDays",(function(){return rg})),n.d(e,"timeWeek",(function(){return zy})),n.d(e,"timeWeeks",(function(){return Gy})),n.d(e,"timeSunday",(function(){return zy})),n.d(e,"timeSundays",(function(){return Gy})),n.d(e,"timeMonday",(function(){return Uy})),n.d(e,"timeMondays",(function(){return Xy})),n.d(e,"timeTuesday",(function(){return $y})),n.d(e,"timeTuesdays",(function(){return Zy})),n.d(e,"timeWednesday",(function(){return qy})),n.d(e,"timeWednesdays",(function(){return Qy})),n.d(e,"timeThursday",(function(){return Wy})),n.d(e,"timeThursdays",(function(){return Ky})),n.d(e,"timeFriday",(function(){return Vy})),n.d(e,"timeFridays",(function(){return Jy})),n.d(e,"timeSaturday",(function(){return Hy})),n.d(e,"timeSaturdays",(function(){return tg})),n.d(e,"timeMonth",(function(){return Py})),n.d(e,"timeMonths",(function(){return jy})),n.d(e,"timeYear",(function(){return Iy})),n.d(e,"timeYears",(function(){return Ry})),n.d(e,"utcMinute",(function(){return ym})),n.d(e,"utcMinutes",(function(){return gm})),n.d(e,"utcHour",(function(){return fm})),n.d(e,"utcHours",(function(){return dm})),n.d(e,"utcDay",(function(){return Ng})),n.d(e,"utcDays",(function(){return Dg})),n.d(e,"utcWeek",(function(){return vg})),n.d(e,"utcWeeks",(function(){return Eg})),n.d(e,"utcSunday",(function(){return vg})),n.d(e,"utcSundays",(function(){return Eg})),n.d(e,"utcMonday",(function(){return mg})),n.d(e,"utcMondays",(function(){return Tg})),n.d(e,"utcTuesday",(function(){return bg})),n.d(e,"utcTuesdays",(function(){return Cg})),n.d(e,"utcWednesday",(function(){return xg})),n.d(e,"utcWednesdays",(function(){return Sg})),n.d(e,"utcThursday",(function(){return _g})),n.d(e,"utcThursdays",(function(){return Ag})),n.d(e,"utcFriday",(function(){return kg})),n.d(e,"utcFridays",(function(){return Mg})),n.d(e,"utcSaturday",(function(){return wg})),n.d(e,"utcSaturdays",(function(){return Og})),n.d(e,"utcMonth",(function(){return um})),n.d(e,"utcMonths",(function(){return lm})),n.d(e,"utcYear",(function(){return Ig})),n.d(e,"utcYears",(function(){return Rg})),n.d(e,"timeFormatDefaultLocale",(function(){return rm})),n.d(e,"timeFormat",(function(){return Ug})),n.d(e,"timeParse",(function(){return $g})),n.d(e,"utcFormat",(function(){return qg})),n.d(e,"utcParse",(function(){return Wg})),n.d(e,"timeFormatLocale",(function(){return Yg})),n.d(e,"isoFormat",(function(){return Ck})),n.d(e,"isoParse",(function(){return Sk})),n.d(e,"now",(function(){return zn})),n.d(e,"timer",(function(){return qn})),n.d(e,"timerFlush",(function(){return Wn})),n.d(e,"timeout",(function(){return Xn})),n.d(e,"interval",(function(){return Ak})),n.d(e,"transition",(function(){return zr})),n.d(e,"active",(function(){return Zr})),n.d(e,"interrupt",(function(){return or})),n.d(e,"voronoi",(function(){return dw})),n.d(e,"zoom",(function(){return Sw})),n.d(e,"zoomTransform",(function(){return mw})),n.d(e,"zoomIdentity",(function(){return vw}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(n(172))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,18],u=[1,20],l=[1,21],h=[1,22],f=[1,24],d=[1,25],p=[1,26],y=[1,27],g=[1,28],v=[1,29],m=[1,32],b=[1,33],x=[1,36],_=[1,4,5,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,58],k=[1,44],w=[4,5,16,21,22,23,25,27,28,29,30,31,33,37,48,58],E=[4,5,16,21,22,23,25,27,28,29,30,31,33,36,37,48,58],T=[4,5,16,21,22,23,25,27,28,29,30,31,33,35,37,48,58],C=[46,47,48],S=[1,4,5,7,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,58],A={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,":":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,signal:20,autonumber:21,activate:22,deactivate:23,note_statement:24,title:25,text2:26,loop:27,end:28,rect:29,opt:30,alt:31,else_sections:32,par:33,par_sections:34,and:35,else:36,note:37,placement:38,over:39,actor_pair:40,spaceList:41,",":42,left_of:43,right_of:44,signaltype:45,"+":46,"-":47,ACTOR:48,SOLID_OPEN_ARROW:49,DOTTED_OPEN_ARROW:50,SOLID_ARROW:51,DOTTED_ARROW:52,SOLID_CROSS:53,DOTTED_CROSS:54,SOLID_POINT:55,DOTTED_POINT:56,TXT:57,open_directive:58,type_directive:59,arg_directive:60,close_directive:61,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",21:"autonumber",22:"activate",23:"deactivate",25:"title",27:"loop",28:"end",29:"rect",30:"opt",31:"alt",33:"par",35:"and",36:"else",37:"note",39:"over",42:",",43:"left_of",44:"right_of",46:"+",47:"-",48:"ACTOR",49:"SOLID_OPEN_ARROW",50:"DOTTED_OPEN_ARROW",51:"SOLID_ARROW",52:"DOTTED_ARROW",53:"SOLID_CROSS",54:"DOTTED_CROSS",55:"SOLID_POINT",56:"DOTTED_POINT",57:"TXT",58:"open_directive",59:"type_directive",60:"arg_directive",61:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,2],[10,1],[10,3],[10,3],[10,2],[10,3],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[34,1],[34,4],[32,1],[32,4],[24,4],[24,4],[41,2],[41,1],[40,3],[40,1],[38,1],[38,1],[20,5],[20,5],[20,4],[17,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[26,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.apply(a[s]),a[s];case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:this.$=[];break;case 12:a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 13:this.$=a[s-1];break;case 15:r.enableSequenceNumbers();break;case 16:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]};break;case 17:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1]};break;case 19:this.$=[{type:"setTitle",text:a[s-1]}];break;case 20:a[s-1].unshift({type:"loopStart",loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:"loopEnd",loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 21:a[s-1].unshift({type:"rectStart",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:"rectEnd",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 22:a[s-1].unshift({type:"optStart",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:"optEnd",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 23:a[s-1].unshift({type:"altStart",altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 24:a[s-1].unshift({type:"parStart",parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 27:this.$=a[s-3].concat([{type:"and",parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 29:this.$=a[s-3].concat([{type:"else",altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 30:this.$=[a[s-1],{type:"addNote",placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 31:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 34:this.$=[a[s-2],a[s]];break;case 35:this.$=a[s];break;case 36:this.$=r.PLACEMENT.LEFTOF;break;case 37:this.$=r.PLACEMENT.RIGHTOF;break;case 38:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]}];break;case 39:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4]}];break;case 40:this.$=[a[s-3],a[s-1],{type:"addMessage",from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 41:this.$={type:"addActor",actor:a[s]};break;case 42:this.$=r.LINETYPE.SOLID_OPEN;break;case 43:this.$=r.LINETYPE.DOTTED_OPEN;break;case 44:this.$=r.LINETYPE.SOLID;break;case 45:this.$=r.LINETYPE.DOTTED;break;case 46:this.$=r.LINETYPE.SOLID_CROSS;break;case 47:this.$=r.LINETYPE.DOTTED_CROSS;break;case 48:this.$=r.LINETYPE.SOLID_POINT;break;case 49:this.$=r.LINETYPE.DOTTED_POINT;break;case 50:this.$=r.parseMessage(a[s].trim().substring(1));break;case 51:r.parseDirective("%%{","open_directive");break;case 52:r.parseDirective(a[s],"type_directive");break;case 53:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 54:r.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:e,5:n,6:4,7:r,11:6,58:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,11:6,58:i},{3:9,4:e,5:n,6:4,7:r,11:6,58:i},{3:10,4:e,5:n,6:4,7:r,11:6,58:i},t([1,4,5,16,21,22,23,25,27,29,30,31,33,37,48,58],a,{8:11}),{12:12,59:[1,13]},{59:[2,51]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,29:p,30:y,31:g,33:v,37:m,48:b,58:i},{13:34,14:[1,35],61:x},t([14,61],[2,52]),t(_,[2,6]),{6:30,10:37,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,29:p,30:y,31:g,33:v,37:m,48:b,58:i},t(_,[2,8]),t(_,[2,9]),{17:38,48:b},{5:[1,39]},t(_,[2,15]),{17:40,48:b},{17:41,48:b},{5:[1,42]},{26:43,57:k},{19:[1,45]},{19:[1,46]},{19:[1,47]},{19:[1,48]},{19:[1,49]},t(_,[2,25]),{45:50,49:[1,51],50:[1,52],51:[1,53],52:[1,54],53:[1,55],54:[1,56],55:[1,57],56:[1,58]},{38:59,39:[1,60],43:[1,61],44:[1,62]},t([5,18,42,49,50,51,52,53,54,55,56,57],[2,41]),{5:[1,63]},{15:64,60:[1,65]},{5:[2,54]},t(_,[2,7]),{5:[1,67],18:[1,66]},t(_,[2,14]),{5:[1,68]},{5:[1,69]},t(_,[2,18]),{5:[1,70]},{5:[2,50]},t(w,a,{8:71}),t(w,a,{8:72}),t(w,a,{8:73}),t(E,a,{32:74,8:75}),t(T,a,{34:76,8:77}),{17:80,46:[1,78],47:[1,79],48:b},t(C,[2,42]),t(C,[2,43]),t(C,[2,44]),t(C,[2,45]),t(C,[2,46]),t(C,[2,47]),t(C,[2,48]),t(C,[2,49]),{17:81,48:b},{17:83,40:82,48:b},{48:[2,36]},{48:[2,37]},t(S,[2,10]),{13:84,61:x},{61:[2,53]},{19:[1,85]},t(_,[2,13]),t(_,[2,16]),t(_,[2,17]),t(_,[2,19]),{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[1,86],29:p,30:y,31:g,33:v,37:m,48:b,58:i},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[1,87],29:p,30:y,31:g,33:v,37:m,48:b,58:i},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[1,88],29:p,30:y,31:g,33:v,37:m,48:b,58:i},{28:[1,89]},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[2,28],29:p,30:y,31:g,33:v,36:[1,90],37:m,48:b,58:i},{28:[1,91]},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[2,26],29:p,30:y,31:g,33:v,35:[1,92],37:m,48:b,58:i},{17:93,48:b},{17:94,48:b},{26:95,57:k},{26:96,57:k},{26:97,57:k},{42:[1,98],57:[2,35]},{5:[1,99]},{5:[1,100]},t(_,[2,20]),t(_,[2,21]),t(_,[2,22]),t(_,[2,23]),{19:[1,101]},t(_,[2,24]),{19:[1,102]},{26:103,57:k},{26:104,57:k},{5:[2,40]},{5:[2,30]},{5:[2,31]},{17:105,48:b},t(S,[2,11]),t(_,[2,12]),t(E,a,{8:75,32:106}),t(T,a,{8:77,34:107}),{5:[2,38]},{5:[2,39]},{57:[2,34]},{28:[2,29]},{28:[2,27]}],defaultActions:{7:[2,51],8:[2,1],9:[2,2],10:[2,3],36:[2,54],44:[2,50],61:[2,36],62:[2,37],65:[2,53],95:[2,40],96:[2,30],97:[2,31],103:[2,38],104:[2,39],105:[2,34],106:[2,29],107:[2,27]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},M={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),58;case 1:return this.begin("type_directive"),59;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),61;case 4:return 60;case 5:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return this.begin("ID"),16;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),48;case 13:return this.popState(),this.popState(),this.begin("LINE"),18;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),27;case 16:return this.begin("LINE"),29;case 17:return this.begin("LINE"),30;case 18:return this.begin("LINE"),31;case 19:return this.begin("LINE"),36;case 20:return this.begin("LINE"),33;case 21:return this.begin("LINE"),35;case 22:return this.popState(),19;case 23:return 28;case 24:return 43;case 25:return 44;case 26:return 39;case 27:return 37;case 28:return this.begin("ID"),22;case 29:return this.begin("ID"),23;case 30:return 25;case 31:return 7;case 32:return 21;case 33:return 42;case 34:return 5;case 35:return e.yytext=e.yytext.trim(),48;case 36:return 51;case 37:return 52;case 38:return 49;case 39:return 50;case 40:return 53;case 41:return 54;case 42:return 55;case 43:return 56;case 44:return 57;case 45:return 46;case 46:return 47;case 47:return 5;case 48:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:participant\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,12],inclusive:!1},ALIAS:{rules:[7,8,13,14],inclusive:!1},LINE:{rules:[7,8,22],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}};function O(){this.yy={}}return A.lexer=M,O.prototype=A,A.Parser=O,new O}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){var r=n(199);t.exports={Graph:r.Graph,json:n(302),alg:n(303),version:r.version}},function(t,e,n){var r;try{r={cloneDeep:n(314),constant:n(87),defaults:n(155),each:n(88),filter:n(129),find:n(315),flatten:n(157),forEach:n(127),forIn:n(320),has:n(94),isUndefined:n(140),last:n(321),map:n(141),mapValues:n(322),max:n(323),merge:n(325),min:n(330),minBy:n(331),now:n(332),pick:n(162),range:n(163),reduce:n(143),sortBy:n(339),uniqueId:n(164),values:n(148),zipObject:n(344)}}catch(t){}r||(r=window._),t.exports=r},function(t,e){var n=Array.isArray;t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){
-/**
- * @license
- * Copyright (c) 2012-2013 Chris Pettitt
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-t.exports={graphlib:n(312),dagre:n(154),intersect:n(369),render:n(371),util:n(14),version:n(383)}},function(t,e,n){"use strict";var r=n(4),i=n(20).Graph;function a(t,e,n,i){var a;do{a=r.uniqueId(i)}while(t.hasNode(a));return n.dummy=e,t.setNode(a,n),a}function o(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}t.exports={addDummyNode:a,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=u*o/s,r=u):(o<0&&(c=-c),n=c,r=c*s/o);return{x:i+n,y:a+r}},buildLayerMatrix:function(t){var e=r.map(r.range(o(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),a=i.rank;r.isUndefined(a)||(e[a][i.order]=n)})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,a=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%a!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return a(t,"border",i,e)},maxRank:o,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},function(t,e,n){t.exports={graphlib:n(20),layout:n(313),debug:n(367),util:{time:n(8).time,notime:n(8).notime},version:n(368)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(173),i=n(174),a=n(175),o={channel:r.default,lang:i.default,unit:a.default};e.default=o},function(t,e){var n,r,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(t){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var c,u=[],l=!1,h=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(f);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function y(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new p(t,e)),1!==u.length||l||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){var r;try{r={clone:n(200),constant:n(87),each:n(88),filter:n(129),has:n(94),isArray:n(5),isEmpty:n(277),isFunction:n(38),isUndefined:n(140),keys:n(30),map:n(141),reduce:n(143),size:n(280),transform:n(286),union:n(287),values:n(148)}}catch(t){}r||(r=window._),t.exports=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(44);t.exports={isSubgraph:function(t,e){return!!t.children(e).length},edgeToId:function(t){return a(t.v)+":"+a(t.w)+":"+a(t.name)},applyStyle:function(t,e){e&&t.attr("style",e)},applyClass:function(t,e,n){e&&t.attr("class",e).attr("class",n+" "+t.attr("class"))},applyTransition:function(t,e){var n=e.graph();if(r.isPlainObject(n)){var i=n.transition;if(r.isFunction(i))return i(t)}return t}};var i=/:/g;function a(t){return t?String(t).replace(i,"\\:"):""}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,7],n=[1,6],r=[1,14],i=[1,25],a=[1,28],o=[1,26],s=[1,27],c=[1,29],u=[1,30],l=[1,31],h=[1,32],f=[1,35],d=[1,36],p=[1,37],y=[1,38],g=[10,19],v=[1,50],m=[1,51],b=[1,52],x=[1,53],_=[1,54],k=[1,55],w=[10,19,26,33,34,42,45,46,47,48,49,50,55,57],E=[10,19,24,26,33,34,38,42,45,46,47,48,49,50,55,57,72,73,74,75],T=[10,13,17,19],C=[42,72,73,74,75],S=[42,49,50,72,73,74,75],A=[42,45,46,47,48,72,73,74,75],M=[10,19,26],O=[1,87],B={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,graphConfig:6,openDirective:7,typeDirective:8,closeDirective:9,NEWLINE:10,":":11,argDirective:12,open_directive:13,type_directive:14,arg_directive:15,close_directive:16,CLASS_DIAGRAM:17,statements:18,EOF:19,statement:20,className:21,alphaNumToken:22,classLiteralName:23,GENERICTYPE:24,relationStatement:25,LABEL:26,classStatement:27,methodStatement:28,annotationStatement:29,clickStatement:30,cssClassStatement:31,CLASS:32,STYLE_SEPARATOR:33,STRUCT_START:34,members:35,STRUCT_STOP:36,ANNOTATION_START:37,ANNOTATION_END:38,MEMBER:39,SEPARATOR:40,relation:41,STR:42,relationType:43,lineType:44,AGGREGATION:45,EXTENSION:46,COMPOSITION:47,DEPENDENCY:48,LINE:49,DOTTED_LINE:50,CALLBACK:51,LINK:52,LINK_TARGET:53,CLICK:54,CALLBACK_NAME:55,CALLBACK_ARGS:56,HREF:57,CSSCLASS:58,commentToken:59,textToken:60,graphCodeTokens:61,textNoTagsToken:62,TAGSTART:63,TAGEND:64,"==":65,"--":66,PCT:67,DEFAULT:68,SPACE:69,MINUS:70,keywords:71,UNICODE_TEXT:72,NUM:73,ALPHA:74,BQUOTE_STR:75,$accept:0,$end:1},terminals_:{2:"error",10:"NEWLINE",11:":",13:"open_directive",14:"type_directive",15:"arg_directive",16:"close_directive",17:"CLASS_DIAGRAM",19:"EOF",24:"GENERICTYPE",26:"LABEL",32:"CLASS",33:"STYLE_SEPARATOR",34:"STRUCT_START",36:"STRUCT_STOP",37:"ANNOTATION_START",38:"ANNOTATION_END",39:"MEMBER",40:"SEPARATOR",42:"STR",45:"AGGREGATION",46:"EXTENSION",47:"COMPOSITION",48:"DEPENDENCY",49:"LINE",50:"DOTTED_LINE",51:"CALLBACK",52:"LINK",53:"LINK_TARGET",54:"CLICK",55:"CALLBACK_NAME",56:"CALLBACK_ARGS",57:"HREF",58:"CSSCLASS",61:"graphCodeTokens",63:"TAGSTART",64:"TAGEND",65:"==",66:"--",67:"PCT",68:"DEFAULT",69:"SPACE",70:"MINUS",71:"keywords",72:"UNICODE_TEXT",73:"NUM",74:"ALPHA",75:"BQUOTE_STR"},productions_:[0,[3,1],[3,2],[4,1],[5,4],[5,6],[7,1],[8,1],[12,1],[9,1],[6,4],[18,1],[18,2],[18,3],[21,1],[21,1],[21,2],[21,2],[21,2],[20,1],[20,2],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[27,2],[27,4],[27,5],[27,7],[29,4],[35,1],[35,2],[28,1],[28,2],[28,1],[28,1],[25,3],[25,4],[25,4],[25,5],[41,3],[41,2],[41,2],[41,1],[43,1],[43,1],[43,1],[43,1],[44,1],[44,1],[30,3],[30,4],[30,3],[30,4],[30,4],[30,5],[30,3],[30,4],[30,4],[30,5],[30,3],[30,4],[30,4],[30,5],[31,3],[59,1],[59,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[62,1],[62,1],[62,1],[62,1],[22,1],[22,1],[22,1],[23,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:r.parseDirective("%%{","open_directive");break;case 7:r.parseDirective(a[s],"type_directive");break;case 8:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 9:r.parseDirective("}%%","close_directive","class");break;case 14:case 15:this.$=a[s];break;case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+"~"+a[s];break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 27:r.addClass(a[s]);break;case 28:r.addClass(a[s-2]),r.setCssClass(a[s-2],a[s]);break;case 29:r.addClass(a[s-3]),r.addMembers(a[s-3],a[s-1]);break;case 30:r.addClass(a[s-5]),r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 31:r.addAnnotation(a[s],a[s-2]);break;case 32:this.$=[a[s]];break;case 33:a[s].push(a[s-1]),this.$=a[s];break;case 34:break;case 35:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 36:case 37:break;case 38:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 39:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:"none"};break;case 40:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:"none",relationTitle2:a[s-1]};break;case 41:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 42:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 43:this.$={type1:"none",type2:a[s],lineType:a[s-1]};break;case 44:this.$={type1:a[s-1],type2:"none",lineType:a[s]};break;case 45:this.$={type1:"none",type2:"none",lineType:a[s]};break;case 46:this.$=r.relationType.AGGREGATION;break;case 47:this.$=r.relationType.EXTENSION;break;case 48:this.$=r.relationType.COMPOSITION;break;case 49:this.$=r.relationType.DEPENDENCY;break;case 50:this.$=r.lineType.LINE;break;case 51:this.$=r.lineType.DOTTED_LINE;break;case 52:case 58:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 53:case 59:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 54:case 62:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 55:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 56:case 64:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 57:case 65:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 60:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 61:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 63:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 66:r.setCssClass(a[s-1],a[s])}},table:[{3:1,4:2,5:3,6:4,7:5,13:e,17:n},{1:[3]},{1:[2,1]},{3:8,4:2,5:3,6:4,7:5,13:e,17:n},{1:[2,3]},{8:9,14:[1,10]},{10:[1,11]},{14:[2,6]},{1:[2,2]},{9:12,11:[1,13],16:r},t([11,16],[2,7]),{5:23,7:5,13:e,18:15,20:16,21:24,22:33,23:34,25:17,27:18,28:19,29:20,30:21,31:22,32:i,37:a,39:o,40:s,51:c,52:u,54:l,58:h,72:f,73:d,74:p,75:y},{10:[1,39]},{12:40,15:[1,41]},{10:[2,9]},{19:[1,42]},{10:[1,43],19:[2,11]},t(g,[2,19],{26:[1,44]}),t(g,[2,21]),t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),t(g,[2,26]),t(g,[2,34],{41:45,43:48,44:49,26:[1,47],42:[1,46],45:v,46:m,47:b,48:x,49:_,50:k}),{21:56,22:33,23:34,72:f,73:d,74:p,75:y},t(g,[2,36]),t(g,[2,37]),{22:57,72:f,73:d,74:p},{21:58,22:33,23:34,72:f,73:d,74:p,75:y},{21:59,22:33,23:34,72:f,73:d,74:p,75:y},{21:60,22:33,23:34,72:f,73:d,74:p,75:y},{42:[1,61]},t(w,[2,14],{22:33,23:34,21:62,24:[1,63],72:f,73:d,74:p,75:y}),t(w,[2,15],{24:[1,64]}),t(E,[2,80]),t(E,[2,81]),t(E,[2,82]),t([10,19,24,26,33,34,42,45,46,47,48,49,50,55,57],[2,83]),t(T,[2,4]),{9:65,16:r},{16:[2,8]},{1:[2,10]},{5:23,7:5,13:e,18:66,19:[2,12],20:16,21:24,22:33,23:34,25:17,27:18,28:19,29:20,30:21,31:22,32:i,37:a,39:o,40:s,51:c,52:u,54:l,58:h,72:f,73:d,74:p,75:y},t(g,[2,20]),{21:67,22:33,23:34,42:[1,68],72:f,73:d,74:p,75:y},{41:69,43:48,44:49,45:v,46:m,47:b,48:x,49:_,50:k},t(g,[2,35]),{44:70,49:_,50:k},t(C,[2,45],{43:71,45:v,46:m,47:b,48:x}),t(S,[2,46]),t(S,[2,47]),t(S,[2,48]),t(S,[2,49]),t(A,[2,50]),t(A,[2,51]),t(g,[2,27],{33:[1,72],34:[1,73]}),{38:[1,74]},{42:[1,75]},{42:[1,76]},{55:[1,77],57:[1,78]},{22:79,72:f,73:d,74:p},t(w,[2,16]),t(w,[2,17]),t(w,[2,18]),{10:[1,80]},{19:[2,13]},t(M,[2,38]),{21:81,22:33,23:34,72:f,73:d,74:p,75:y},{21:82,22:33,23:34,42:[1,83],72:f,73:d,74:p,75:y},t(C,[2,44],{43:84,45:v,46:m,47:b,48:x}),t(C,[2,43]),{22:85,72:f,73:d,74:p},{35:86,39:O},{21:88,22:33,23:34,72:f,73:d,74:p,75:y},t(g,[2,52],{42:[1,89]}),t(g,[2,54],{42:[1,91],53:[1,90]}),t(g,[2,58],{42:[1,92],56:[1,93]}),t(g,[2,62],{42:[1,95],53:[1,94]}),t(g,[2,66]),t(T,[2,5]),t(M,[2,40]),t(M,[2,39]),{21:96,22:33,23:34,72:f,73:d,74:p,75:y},t(C,[2,42]),t(g,[2,28],{34:[1,97]}),{36:[1,98]},{35:99,36:[2,32],39:O},t(g,[2,31]),t(g,[2,53]),t(g,[2,55]),t(g,[2,56],{53:[1,100]}),t(g,[2,59]),t(g,[2,60],{42:[1,101]}),t(g,[2,63]),t(g,[2,64],{53:[1,102]}),t(M,[2,41]),{35:103,39:O},t(g,[2,29]),{36:[2,33]},t(g,[2,57]),t(g,[2,61]),t(g,[2,65]),{36:[1,104]},t(g,[2,30])],defaultActions:{2:[2,1],4:[2,3],7:[2,6],8:[2,2],14:[2,9],41:[2,8],42:[2,10],66:[2,13],99:[2,33]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},N={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),13;case 1:return this.begin("type_directive"),14;case 2:return this.popState(),this.begin("arg_directive"),11;case 3:return this.popState(),this.popState(),16;case 4:return 15;case 5:case 6:break;case 7:return 10;case 8:break;case 9:case 10:return 17;case 11:return this.begin("struct"),34;case 12:return"EOF_IN_STRUCT";case 13:return"OPEN_IN_STRUCT";case 14:return this.popState(),36;case 15:break;case 16:return"MEMBER";case 17:return 32;case 18:return 58;case 19:return 51;case 20:return 52;case 21:return 54;case 22:return 37;case 23:return 38;case 24:this.begin("generic");break;case 25:this.popState();break;case 26:return"GENERICTYPE";case 27:this.begin("string");break;case 28:this.popState();break;case 29:return"STR";case 30:this.begin("bqstring");break;case 31:this.popState();break;case 32:return"BQUOTE_STR";case 33:this.begin("href");break;case 34:this.popState();break;case 35:return 57;case 36:this.begin("callback_name");break;case 37:this.popState();break;case 38:this.popState(),this.begin("callback_args");break;case 39:return 55;case 40:this.popState();break;case 41:return 56;case 42:case 43:case 44:case 45:return 53;case 46:case 47:return 46;case 48:case 49:return 48;case 50:return 47;case 51:return 45;case 52:return 49;case 53:return 50;case 54:return 26;case 55:return 33;case 56:return 70;case 57:return"DOT";case 58:return"PLUS";case 59:return 67;case 60:case 61:return"EQUALS";case 62:return 74;case 63:return"PUNCTUATION";case 64:return 73;case 65:return 72;case 66:return 69;case 67:return 19}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callback_args:{rules:[40,41],inclusive:!1},callback_name:{rules:[37,38,39],inclusive:!1},href:{rules:[34,35],inclusive:!1},struct:{rules:[12,13,14,15,16],inclusive:!1},generic:{rules:[25,26],inclusive:!1},bqstring:{rules:[31,32],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,17,18,19,20,21,22,23,24,27,30,33,36,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};function D(){this.yy={}}return B.lexer=N,D.prototype=B,B.Parser=D,new D}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(76),i=n(99),a=n(179),o=n(180),s=n(181),c={format:{keyword:a.default,hex:i.default,rgb:o.default,rgba:o.default,hsl:s.default,hsla:s.default},parse:function(t){if("string"!=typeof t)return t;var e=i.default.parse(t)||o.default.parse(t)||s.default.parse(t)||a.default.parse(t);if(e)return e;throw new Error('Unsupported color format: "'+t+'"')},stringify:function(t){return!t.changed&&t.color?t.color:t.type.is(r.TYPE.HSL)||void 0===t.data.r?s.default.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?o.default.stringify(t):i.default.stringify(t)}};e.default=c},function(t,e){},function(t,e,n){(function(t){function n(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}e.resolve=function(){for(var e="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(e=o+"/"+e,i="/"===o.charAt(0))}return(i?"/":"")+(e=n(r(e.split("/"),(function(t){return!!t})),!i).join("/"))||"."},e.normalize=function(t){var a=e.isAbsolute(t),o="/"===i(t,-1);return(t=n(r(t.split("/"),(function(t){return!!t})),!a).join("/"))||a||(t="."),t&&o&&(t+="/"),(a?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,n){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var i=r(t.split("/")),a=r(n.split("/")),o=Math.min(i.length,a.length),s=o,c=0;c<o;c++)if(i[c]!==a[c]){s=c;break}var u=[];for(c=s;c<i.length;c++)u.push("..");return(u=u.concat(a.slice(s))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,r=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":t.slice(0,r)},e.basename=function(t,e){var n=function(t){"string"!=typeof t&&(t+="");var e,n=0,r=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){n=e+1;break}}else-1===r&&(i=!1,r=e+1);return-1===r?"":t.slice(n,r)}(t);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,n=0,r=-1,i=!0,a=0,o=t.length-1;o>=0;--o){var s=t.charCodeAt(o);if(47!==s)-1===r&&(i=!1,r=o+1),46===s?-1===e?e=o:1!==a&&(a=1):-1!==e&&(a=-1);else if(!i){n=o+1;break}}return-1===e||-1===r||0===a||1===a&&e===r-1&&e===n+1?"":t.slice(e,r)};var i="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,n(11))},function(t,e,n){var r=n(110),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();t.exports=a},function(t,e,n){var r;try{r=n(3)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,19],u=[1,20],l=[1,21],h=[1,22],f=[1,30],d=[1,23],p=[1,24],y=[1,25],g=[1,26],v=[1,27],m=[1,32],b=[1,33],x=[1,34],_=[1,35],k=[1,31],w=[1,38],E=[1,4,5,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],T=[1,4,5,12,13,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],C=[1,4,5,7,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],S=[4,5,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],A={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,idStatement:11,DESCR:12,"--\x3e":13,HIDE_EMPTY:14,scale:15,WIDTH:16,COMPOSIT_STATE:17,STRUCT_START:18,STRUCT_STOP:19,STATE_DESCR:20,AS:21,ID:22,FORK:23,JOIN:24,CHOICE:25,CONCURRENT:26,note:27,notePosition:28,NOTE_TEXT:29,direction:30,openDirective:31,typeDirective:32,closeDirective:33,":":34,argDirective:35,direction_tb:36,direction_bt:37,direction_rl:38,direction_lr:39,eol:40,";":41,EDGE_STATE:42,left_of:43,right_of:44,open_directive:45,type_directive:46,arg_directive:47,close_directive:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",12:"DESCR",13:"--\x3e",14:"HIDE_EMPTY",15:"scale",16:"WIDTH",17:"COMPOSIT_STATE",18:"STRUCT_START",19:"STRUCT_STOP",20:"STATE_DESCR",21:"AS",22:"ID",23:"FORK",24:"JOIN",25:"CHOICE",26:"CONCURRENT",27:"note",29:"NOTE_TEXT",34:":",36:"direction_tb",37:"direction_bt",38:"direction_rl",39:"direction_lr",41:";",42:"EDGE_STATE",43:"left_of",44:"right_of",45:"open_directive",46:"type_directive",47:"arg_directive",48:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[6,3],[6,5],[30,1],[30,1],[30,1],[30,1],[40,1],[40,1],[11,1],[11,1],[28,1],[28,1],[31,1],[32,1],[35,1],[33,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.setRootDoc(a[s]),a[s];case 5:this.$=[];break;case 6:"nl"!=a[s]&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 7:case 8:this.$=a[s];break;case 9:this.$="nl";break;case 10:this.$={stmt:"state",id:a[s],type:"default",description:""};break;case 11:this.$={stmt:"state",id:a[s-1],type:"default",description:r.trimColon(a[s])};break;case 12:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-2],type:"default",description:""},state2:{stmt:"state",id:a[s],type:"default",description:""}};break;case 13:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-3],type:"default",description:""},state2:{stmt:"state",id:a[s-1],type:"default",description:""},description:a[s].substr(1).trim()};break;case 17:this.$={stmt:"state",id:a[s-3],type:"default",description:"",doc:a[s-1]};break;case 18:var c=a[s],u=a[s-2].trim();if(a[s].match(":")){var l=a[s].split(":");c=l[0],u=[u,l[1]]}this.$={stmt:"state",id:c,type:"default",description:u};break;case 19:this.$={stmt:"state",id:a[s-3],type:"default",description:a[s-5],doc:a[s-1]};break;case 20:this.$={stmt:"state",id:a[s],type:"fork"};break;case 21:this.$={stmt:"state",id:a[s],type:"join"};break;case 22:this.$={stmt:"state",id:a[s],type:"choice"};break;case 23:this.$={stmt:"state",id:r.getDividerId(),type:"divider"};break;case 24:this.$={stmt:"state",id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 30:r.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 31:r.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 32:r.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 33:r.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 36:case 37:this.$=a[s];break;case 40:r.parseDirective("%%{","open_directive");break;case 41:r.parseDirective(a[s],"type_directive");break;case 42:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 43:r.parseDirective("}%%","close_directive","state")}},table:[{3:1,4:e,5:n,6:4,7:r,31:6,45:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,31:6,45:i},{3:9,4:e,5:n,6:4,7:r,31:6,45:i},{3:10,4:e,5:n,6:4,7:r,31:6,45:i},t([1,4,5,14,15,17,20,22,23,24,25,26,27,36,37,38,39,42,45],a,{8:11}),{32:12,46:[1,13]},{46:[2,40]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:u,17:l,20:h,22:f,23:d,24:p,25:y,26:g,27:v,30:29,31:6,36:m,37:b,38:x,39:_,42:k,45:i},{33:36,34:[1,37],48:w},t([34,48],[2,41]),t(E,[2,6]),{6:28,10:39,11:18,14:c,15:u,17:l,20:h,22:f,23:d,24:p,25:y,26:g,27:v,30:29,31:6,36:m,37:b,38:x,39:_,42:k,45:i},t(E,[2,8]),t(E,[2,9]),t(E,[2,10],{12:[1,40],13:[1,41]}),t(E,[2,14]),{16:[1,42]},t(E,[2,16],{18:[1,43]}),{21:[1,44]},t(E,[2,20]),t(E,[2,21]),t(E,[2,22]),t(E,[2,23]),{28:45,29:[1,46],43:[1,47],44:[1,48]},t(E,[2,26]),t(E,[2,27]),t(T,[2,36]),t(T,[2,37]),t(E,[2,30]),t(E,[2,31]),t(E,[2,32]),t(E,[2,33]),t(C,[2,28]),{35:49,47:[1,50]},t(C,[2,43]),t(E,[2,7]),t(E,[2,11]),{11:51,22:f,42:k},t(E,[2,15]),t(S,a,{8:52}),{22:[1,53]},{22:[1,54]},{21:[1,55]},{22:[2,38]},{22:[2,39]},{33:56,48:w},{48:[2,42]},t(E,[2,12],{12:[1,57]}),{4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:u,17:l,19:[1,58],20:h,22:f,23:d,24:p,25:y,26:g,27:v,30:29,31:6,36:m,37:b,38:x,39:_,42:k,45:i},t(E,[2,18],{18:[1,59]}),{29:[1,60]},{22:[1,61]},t(C,[2,29]),t(E,[2,13]),t(E,[2,17]),t(S,a,{8:62}),t(E,[2,24]),t(E,[2,25]),{4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:u,17:l,19:[1,63],20:h,22:f,23:d,24:p,25:y,26:g,27:v,30:29,31:6,36:m,37:b,38:x,39:_,42:k,45:i},t(E,[2,19])],defaultActions:{7:[2,40],8:[2,1],9:[2,2],10:[2,3],47:[2,38],48:[2,39],50:[2,42]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},M={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 36;case 1:return 37;case 2:return 38;case 3:return 39;case 4:return this.begin("open_directive"),45;case 5:return this.begin("type_directive"),46;case 6:return this.popState(),this.begin("arg_directive"),34;case 7:return this.popState(),this.popState(),48;case 8:return 47;case 9:case 10:break;case 11:return 5;case 12:case 13:case 14:case 15:break;case 16:return this.pushState("SCALE"),15;case 17:return 16;case 18:this.popState();break;case 19:this.pushState("STATE");break;case 20:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 21:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 22:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),25;case 23:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 24:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 25:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),25;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:this.begin("STATE_STRING");break;case 31:return this.popState(),this.pushState("STATE_ID"),"AS";case 32:return this.popState(),"ID";case 33:this.popState();break;case 34:return"STATE_DESCR";case 35:return 17;case 36:this.popState();break;case 37:return this.popState(),this.pushState("struct"),18;case 38:return this.popState(),19;case 39:break;case 40:return this.begin("NOTE"),27;case 41:return this.popState(),this.pushState("NOTE_ID"),43;case 42:return this.popState(),this.pushState("NOTE_ID"),44;case 43:this.popState(),this.pushState("FLOATING_NOTE");break;case 44:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 45:break;case 46:return"NOTE_TEXT";case 47:return this.popState(),"ID";case 48:return this.popState(),this.pushState("NOTE_TEXT"),22;case 49:return this.popState(),e.yytext=e.yytext.substr(2).trim(),29;case 50:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),29;case 51:case 52:return 7;case 53:return 14;case 54:return 42;case 55:return 22;case 56:return e.yytext=e.yytext.trim(),12;case 57:return 13;case 58:return 26;case 59:return 5;case 60:return"INVALID"}},rules:[/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[13,14],inclusive:!1},close_directive:{rules:[13,14],inclusive:!1},arg_directive:{rules:[7,8,13,14],inclusive:!1},type_directive:{rules:[6,7,13,14],inclusive:!1},open_directive:{rules:[5,13,14],inclusive:!1},struct:{rules:[13,14,19,26,27,28,29,38,39,40,54,55,56,57,58],inclusive:!1},FLOATING_NOTE_ID:{rules:[47],inclusive:!1},FLOATING_NOTE:{rules:[44,45,46],inclusive:!1},NOTE_TEXT:{rules:[49,50],inclusive:!1},NOTE_ID:{rules:[48],inclusive:!1},NOTE:{rules:[41,42,43],inclusive:!1},SCALE:{rules:[17,18],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[32],inclusive:!1},STATE_STRING:{rules:[33,34],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[13,14,20,21,22,23,24,25,30,31,35,36,37],inclusive:!1},ID:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,12,14,15,16,19,37,40,51,52,53,54,55,56,57,59,60],inclusive:!0}}};function O(){this.yy={}}return A.lexer=M,O.prototype=A,A.Parser=O,new O}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t){t.exports=function(){"use strict";var e,r;function i(){return e.apply(null,arguments)}function a(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return void 0===t}function c(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function u(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function l(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function f(t,e){for(var n in e)h(e,n)&&(t[n]=e[n]);return h(e,"toString")&&(t.toString=e.toString),h(e,"valueOf")&&(t.valueOf=e.valueOf),t}function d(t,e,n,r){return be(t,e,n,r,!0).utc()}function p(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function y(t){if(null==t._isValid){var e=p(t),n=r.call(e.parsedDateParts,(function(t){return null!=t})),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i}return t._isValid}function g(t){var e=d(NaN);return null!=t?f(p(e),t):p(e).userInvalidated=!0,e}r=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};var v=i.momentProperties=[];function m(t,e){var n,r,i;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=p(e)),s(e._locale)||(t._locale=e._locale),0<v.length)for(n=0;n<v.length;n++)s(i=e[r=v[n]])||(t[r]=i);return t}var b=!1;function x(t){m(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,i.updateOffset(this),b=!1)}function _(t){return t instanceof x||null!=t&&null!=t._isAMomentObject}function k(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function w(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=k(e)),n}function E(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&&w(t[r])!==w(e[r]))&&o++;return o+a}function T(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function C(t,e){var n=!0;return f((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var r,a=[],o=0;o<arguments.length;o++){if(r="","object"==typeof arguments[o]){for(var s in r+="\n["+o+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[o];a.push(r)}T(t+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var S,A={};function M(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),A[t]||(T(e),A[t]=!0)}function O(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function B(t,e){var n,r=f({},t);for(n in e)h(e,n)&&(o(t[n])&&o(e[n])?(r[n]={},f(r[n],t[n]),f(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)h(t,n)&&!h(e,n)&&o(t[n])&&(r[n]=f({},r[n]));return r}function N(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,S=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)h(t,e)&&n.push(e);return n};var D={};function L(t,e){var n=t.toLowerCase();D[n]=D[n+"s"]=D[e]=t}function I(t){return"string"==typeof t?D[t]||D[t.toLowerCase()]:void 0}function R(t){var e,n,r={};for(n in t)h(t,n)&&(e=I(n))&&(r[e]=t[n]);return r}var F={};function P(t,e){F[t]=e}function j(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(0<=t?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Y=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,U={},$={};function q(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&($[t]=i),e&&($[e[0]]=function(){return j(i.apply(this,arguments),e[1],e[2])}),n&&($[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function W(t,e){return t.isValid()?(e=V(e,t.localeData()),U[e]=U[e]||function(t){var e,n,r,i=t.match(Y);for(e=0,n=i.length;e<n;e++)$[i[e]]?i[e]=$[i[e]]:i[e]=(r=i[e]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(e){var r,a="";for(r=0;r<n;r++)a+=O(i[r])?i[r].call(e,t):i[r];return a}}(e),U[e](t)):t.localeData().invalidDate()}function V(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for(z.lastIndex=0;0<=n&&z.test(t);)t=t.replace(z,r),z.lastIndex=0,n-=1;return t}var H=/\d/,G=/\d\d/,X=/\d{3}/,Z=/\d{4}/,Q=/[+-]?\d{6}/,K=/\d\d?/,J=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,et=/\d{1,3}/,nt=/\d{1,4}/,rt=/[+-]?\d{1,6}/,it=/\d+/,at=/[+-]?\d+/,ot=/Z|[+-]\d\d:?\d\d/gi,st=/Z|[+-]\d\d(?::?\d\d)?/gi,ct=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut={};function lt(t,e,n){ut[t]=O(e)?e:function(t,r){return t&&n?n:e}}function ht(t,e){return h(ut,t)?ut[t](e._strict,e._locale):new RegExp(ft(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,r,i){return e||n||r||i}))))}function ft(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var dt={};function pt(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),c(e)&&(r=function(t,n){n[e]=w(t)}),n=0;n<t.length;n++)dt[t[n]]=r}function yt(t,e){pt(t,(function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)}))}function gt(t){return vt(t)?366:365}function vt(t){return t%4==0&&t%100!=0||t%400==0}q("Y",0,0,(function(){var t=this.year();return t<=9999?""+t:"+"+t})),q(0,["YY",2],0,(function(){return this.year()%100})),q(0,["YYYY",4],0,"year"),q(0,["YYYYY",5],0,"year"),q(0,["YYYYYY",6,!0],0,"year"),L("year","y"),P("year",1),lt("Y",at),lt("YY",K,G),lt("YYYY",nt,Z),lt("YYYYY",rt,Q),lt("YYYYYY",rt,Q),pt(["YYYYY","YYYYYY"],0),pt("YYYY",(function(t,e){e[0]=2===t.length?i.parseTwoDigitYear(t):w(t)})),pt("YY",(function(t,e){e[0]=i.parseTwoDigitYear(t)})),pt("Y",(function(t,e){e[0]=parseInt(t,10)})),i.parseTwoDigitYear=function(t){return w(t)+(68<w(t)?1900:2e3)};var mt,bt=xt("FullYear",!0);function xt(t,e){return function(n){return null!=n?(kt(this,t,n),i.updateOffset(this,e),this):_t(this,t)}}function _t(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function kt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&vt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),wt(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function wt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=(e%12+12)%12;return t+=(e-n)/12,1===n?vt(t)?29:28:31-n%7%2}mt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},q("M",["MM",2],"Mo",(function(){return this.month()+1})),q("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),q("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),L("month","M"),P("month",8),lt("M",K),lt("MM",K,G),lt("MMM",(function(t,e){return e.monthsShortRegex(t)})),lt("MMMM",(function(t,e){return e.monthsRegex(t)})),pt(["M","MM"],(function(t,e){e[1]=w(t)-1})),pt(["MMM","MMMM"],(function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[1]=i:p(n).invalidMonth=t}));var Et=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Tt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ct="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function St(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=w(e);else if(!c(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),wt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function At(t){return null!=t?(St(this,t),i.updateOffset(this,!0),this):_t(this,"Month")}var Mt=ct,Ot=ct;function Bt(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],a=[];for(e=0;e<12;e++)n=d([2e3,e]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(t),i.sort(t),a.sort(t),e=0;e<12;e++)r[e]=ft(r[e]),i[e]=ft(i[e]);for(e=0;e<24;e++)a[e]=ft(a[e]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Nt(t){var e;if(t<100&&0<=t){var n=Array.prototype.slice.call(arguments);n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function Dt(t,e,n){var r=7+e-n;return-(7+Nt(t,0,r).getUTCDay()-e)%7+r-1}function Lt(t,e,n,r,i){var a,o,s=1+7*(e-1)+(7+n-r)%7+Dt(t,r,i);return o=s<=0?gt(a=t-1)+s:s>gt(t)?(a=t+1,s-gt(t)):(a=t,s),{year:a,dayOfYear:o}}function It(t,e,n){var r,i,a=Dt(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+Rt(i=t.year()-1,e,n):o>Rt(t.year(),e,n)?(r=o-Rt(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function Rt(t,e,n){var r=Dt(t,e,n),i=Dt(t+1,e,n);return(gt(t)-r+i)/7}function Ft(t,e){return t.slice(e,7).concat(t.slice(0,e))}q("w",["ww",2],"wo","week"),q("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),P("week",5),P("isoWeek",5),lt("w",K),lt("ww",K,G),lt("W",K),lt("WW",K,G),yt(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=w(t)})),q("d",0,"do","day"),q("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),q("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),q("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),q("e",0,0,"weekday"),q("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),P("day",11),P("weekday",11),P("isoWeekday",11),lt("d",K),lt("e",K),lt("E",K),lt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),lt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),lt("dddd",(function(t,e){return e.weekdaysRegex(t)})),yt(["dd","ddd","dddd"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:p(n).invalidWeekday=t})),yt(["d","e","E"],(function(t,e,n,r){e[r]=w(t)}));var Pt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),jt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Yt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zt=ct,Ut=ct,$t=ct;function qt(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],c=[],u=[];for(e=0;e<7;e++)n=d([2e3,1]).day(e),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),a=this.weekdays(n,""),o.push(r),s.push(i),c.push(a),u.push(r),u.push(i),u.push(a);for(o.sort(t),s.sort(t),c.sort(t),u.sort(t),e=0;e<7;e++)s[e]=ft(s[e]),c[e]=ft(c[e]),u[e]=ft(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Wt(){return this.hours()%12||12}function Vt(t,e){q(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Ht(t,e){return e._meridiemParse}q("H",["HH",2],0,"hour"),q("h",["hh",2],0,Wt),q("k",["kk",2],0,(function(){return this.hours()||24})),q("hmm",0,0,(function(){return""+Wt.apply(this)+j(this.minutes(),2)})),q("hmmss",0,0,(function(){return""+Wt.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)})),q("Hmm",0,0,(function(){return""+this.hours()+j(this.minutes(),2)})),q("Hmmss",0,0,(function(){return""+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)})),Vt("a",!0),Vt("A",!1),L("hour","h"),P("hour",13),lt("a",Ht),lt("A",Ht),lt("H",K),lt("h",K),lt("k",K),lt("HH",K,G),lt("hh",K,G),lt("kk",K,G),lt("hmm",J),lt("hmmss",tt),lt("Hmm",J),lt("Hmmss",tt),pt(["H","HH"],3),pt(["k","kk"],(function(t,e,n){var r=w(t);e[3]=24===r?0:r})),pt(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),pt(["h","hh"],(function(t,e,n){e[3]=w(t),p(n).bigHour=!0})),pt("hmm",(function(t,e,n){var r=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r)),p(n).bigHour=!0})),pt("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r,2)),e[5]=w(t.substr(i)),p(n).bigHour=!0})),pt("Hmm",(function(t,e,n){var r=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r))})),pt("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r,2)),e[5]=w(t.substr(i))}));var Gt,Xt=xt("Hours",!0),Zt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Tt,monthsShort:Ct,week:{dow:0,doy:6},weekdays:Pt,weekdaysMin:Yt,weekdaysShort:jt,meridiemParse:/[ap]\.?m?\.?/i},Qt={},Kt={};function Jt(t){return t?t.toLowerCase().replace("_","-"):t}function te(e){var r=null;if(!Qt[e]&&void 0!==t&&t&&t.exports)try{r=Gt._abbr,n(198)("./"+e),ee(r)}catch(e){}return Qt[e]}function ee(t,e){var n;return t&&((n=s(e)?re(t):ne(t,e))?Gt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Gt._abbr}function ne(t,e){if(null===e)return delete Qt[t],null;var n,r=Zt;if(e.abbr=t,null!=Qt[t])M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Qt[t]._config;else if(null!=e.parentLocale)if(null!=Qt[e.parentLocale])r=Qt[e.parentLocale]._config;else{if(null==(n=te(e.parentLocale)))return Kt[e.parentLocale]||(Kt[e.parentLocale]=[]),Kt[e.parentLocale].push({name:t,config:e}),null;r=n._config}return Qt[t]=new N(B(r,e)),Kt[t]&&Kt[t].forEach((function(t){ne(t.name,t.config)})),ee(t),Qt[t]}function re(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Gt;if(!a(t)){if(e=te(t))return e;t=[t]}return function(t){for(var e,n,r,i,a=0;a<t.length;){for(e=(i=Jt(t[a]).split("-")).length,n=(n=Jt(t[a+1]))?n.split("-"):null;0<e;){if(r=te(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&E(i,n,!0)>=e-1)break;e--}a++}return Gt}(t)}function ie(t){var e,n=t._a;return n&&-2===p(t).overflow&&(e=n[1]<0||11<n[1]?1:n[2]<1||n[2]>wt(n[0],n[1])?2:n[3]<0||24<n[3]||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||59<n[4]?4:n[5]<0||59<n[5]?5:n[6]<0||999<n[6]?6:-1,p(t)._overflowDayOfYear&&(e<0||2<e)&&(e=2),p(t)._overflowWeeks&&-1===e&&(e=7),p(t)._overflowWeekday&&-1===e&&(e=8),p(t).overflow=e),t}function ae(t,e,n){return null!=t?t:null!=e?e:n}function oe(t){var e,n,r,a,o,s=[];if(!t._d){var c,u;for(c=t,u=new Date(i.now()),r=c._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,n,r,i,a,o,s,c;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)a=1,o=4,n=ae(e.GG,t._a[0],It(xe(),1,4).year),r=ae(e.W,1),((i=ae(e.E,1))<1||7<i)&&(c=!0);else{a=t._locale._week.dow,o=t._locale._week.doy;var u=It(xe(),a,o);n=ae(e.gg,t._a[0],u.year),r=ae(e.w,u.week),null!=e.d?((i=e.d)<0||6<i)&&(c=!0):null!=e.e?(i=e.e+a,(e.e<0||6<e.e)&&(c=!0)):i=a}r<1||r>Rt(n,a,o)?p(t)._overflowWeeks=!0:null!=c?p(t)._overflowWeekday=!0:(s=Lt(n,r,i,a,o),t._a[0]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=ae(t._a[0],r[0]),(t._dayOfYear>gt(o)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),n=Nt(o,0,t._dayOfYear),t._a[1]=n.getUTCMonth(),t._a[2]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=r[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Nt:function(t,e,n,r,i,a,o){var s;return t<100&&0<=t?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,a,o),s}).apply(null,s),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(p(t).weekdayMismatch=!0)}}var se=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ce=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ue=/Z|[+-]\d\d(?::?\d\d)?/,le=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],he=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],fe=/^\/?Date\((\-?\d+)/i;function de(t){var e,n,r,i,a,o,s=t._i,c=se.exec(s)||ce.exec(s);if(c){for(p(t).iso=!0,e=0,n=le.length;e<n;e++)if(le[e][1].exec(c[1])){i=le[e][0],r=!1!==le[e][2];break}if(null==i)return void(t._isValid=!1);if(c[3]){for(e=0,n=he.length;e<n;e++)if(he[e][1].exec(c[3])){a=(c[2]||" ")+he[e][0];break}if(null==a)return void(t._isValid=!1)}if(!r&&null!=a)return void(t._isValid=!1);if(c[4]){if(!ue.exec(c[4]))return void(t._isValid=!1);o="Z"}t._f=i+(a||"")+(o||""),ve(t)}else t._isValid=!1}var pe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,ye={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ge(t){var e,n,r,i=pe.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(i){var a=function(t,e,n,r,i,a){var o=[function(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}(t),Ct.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}(i[4],i[3],i[2],i[5],i[6],i[7]);if(n=a,r=t,(e=i[1])&&jt.indexOf(e)!==new Date(n[0],n[1],n[2]).getDay()&&(p(r).weekdayMismatch=!0,!(r._isValid=!1)))return;t._a=a,t._tzm=function(t,e,n){if(t)return ye[t];if(e)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(i[8],i[9],i[10]),t._d=Nt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),p(t).rfc2822=!0}else t._isValid=!1}function ve(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],p(t).empty=!0;var e,n,r,a,o,s,c,u,l=""+t._i,f=l.length,d=0;for(r=V(t._f,t._locale).match(Y)||[],e=0;e<r.length;e++)a=r[e],(n=(l.match(ht(a,t))||[])[0])&&(0<(o=l.substr(0,l.indexOf(n))).length&&p(t).unusedInput.push(o),l=l.slice(l.indexOf(n)+n.length),d+=n.length),$[a]?(n?p(t).empty=!1:p(t).unusedTokens.push(a),s=a,u=t,null!=(c=n)&&h(dt,s)&&dt[s](c,u._a,u,s)):t._strict&&!n&&p(t).unusedTokens.push(a);p(t).charsLeftOver=f-d,0<l.length&&p(t).unusedInput.push(l),t._a[3]<=12&&!0===p(t).bigHour&&0<t._a[3]&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[3]=function(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):(null!=t.isPM&&((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0)),e)}(t._locale,t._a[3],t._meridiem),oe(t),ie(t)}else ge(t);else de(t)}function me(t){var e,n,r,h,d=t._i,v=t._f;return t._locale=t._locale||re(t._l),null===d||void 0===v&&""===d?g({nullInput:!0}):("string"==typeof d&&(t._i=d=t._locale.preparse(d)),_(d)?new x(ie(d)):(u(d)?t._d=d:a(v)?function(t){var e,n,r,i,a;if(0===t._f.length)return p(t).invalidFormat=!0,t._d=new Date(NaN);for(i=0;i<t._f.length;i++)a=0,e=m({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],ve(e),y(e)&&(a+=p(e).charsLeftOver,a+=10*p(e).unusedTokens.length,p(e).score=a,(null==r||a<r)&&(r=a,n=e));f(t,n||e)}(t):v?ve(t):s(n=(e=t)._i)?e._d=new Date(i.now()):u(n)?e._d=new Date(n.valueOf()):"string"==typeof n?(r=e,null===(h=fe.exec(r._i))?(de(r),!1===r._isValid&&(delete r._isValid,ge(r),!1===r._isValid&&(delete r._isValid,i.createFromInputFallback(r)))):r._d=new Date(+h[1])):a(n)?(e._a=l(n.slice(0),(function(t){return parseInt(t,10)})),oe(e)):o(n)?function(t){if(!t._d){var e=R(t._i);t._a=l([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),oe(t)}}(e):c(n)?e._d=new Date(n):i.createFromInputFallback(e),y(t)||(t._d=null),t))}function be(t,e,n,r,i){var s,c={};return!0!==n&&!1!==n||(r=n,n=void 0),(o(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||a(t)&&0===t.length)&&(t=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=i,c._l=n,c._i=t,c._f=e,c._strict=r,(s=new x(ie(me(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function xe(t,e,n,r){return be(t,e,n,r,!1)}i.createFromInputFallback=C("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var _e=C("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=xe.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:g()})),ke=C("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=xe.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:g()}));function we(t,e){var n,r;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return xe();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}var Ee=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Te(t){var e=R(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,c=e.minute||0,u=e.second||0,l=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===mt.call(Ee,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,r=0;r<Ee.length;++r)if(t[Ee[r]]){if(n)return!1;parseFloat(t[Ee[r]])!==w(t[Ee[r]])&&(n=!0)}return!0}(e),this._milliseconds=+l+1e3*u+6e4*c+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=re(),this._bubble()}function Ce(t){return t instanceof Te}function Se(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Ae(t,e){q(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+j(~~(t/60),2)+e+j(~~t%60,2)}))}Ae("Z",":"),Ae("ZZ",""),lt("Z",st),lt("ZZ",st),pt(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=Oe(st,t)}));var Me=/([\+\-]|\d\d)/gi;function Oe(t,e){var n=(e||"").match(t);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Me)||["-",0,0],i=60*r[1]+w(r[2]);return 0===i?0:"+"===r[0]?i:-i}function Be(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(_(t)||u(t)?t.valueOf():xe(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):xe(t).local()}function Ne(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function De(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Le=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ie=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Re(t,e){var n,r,i,a=t,o=null;return Ce(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:c(t)?(a={},e?a[e]=t:a.milliseconds=t):(o=Le.exec(t))?(n="-"===o[1]?-1:1,a={y:0,d:w(o[2])*n,h:w(o[3])*n,m:w(o[4])*n,s:w(o[5])*n,ms:w(Se(1e3*o[6]))*n}):(o=Ie.exec(t))?(n="-"===o[1]?-1:1,a={y:Fe(o[2],n),M:Fe(o[3],n),w:Fe(o[4],n),d:Fe(o[5],n),h:Fe(o[6],n),m:Fe(o[7],n),s:Fe(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=function(t,e){var n;return t.isValid()&&e.isValid()?(e=Be(e,t),t.isBefore(e)?n=Pe(t,e):((n=Pe(e,t)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}(xe(a.from),xe(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new Te(a),Ce(t)&&h(t,"_locale")&&(r._locale=t._locale),r}function Fe(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Pe(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function je(t,e){return function(n,r){var i;return null===r||isNaN(+r)||(M(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Ye(this,Re(n="string"==typeof n?+n:n,r),t),this}}function Ye(t,e,n,r){var a=e._milliseconds,o=Se(e._days),s=Se(e._months);t.isValid()&&(r=null==r||r,s&&St(t,_t(t,"Month")+s*n),o&&kt(t,"Date",_t(t,"Date")+o*n),a&&t._d.setTime(t._d.valueOf()+a*n),r&&i.updateOffset(t,o||s))}Re.fn=Te.prototype,Re.invalid=function(){return Re(NaN)};var ze=je(1,"add"),Ue=je(-1,"subtract");function $e(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,"months");return-(n+(e-r<0?(e-r)/(r-t.clone().add(n-1,"months")):(e-r)/(t.clone().add(n+1,"months")-r)))||0}function qe(t){var e;return void 0===t?this._locale._abbr:(null!=(e=re(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var We=C("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function Ve(){return this._locale}var He=126227808e5;function Ge(t,e){return(t%e+e)%e}function Xe(t,e,n){return t<100&&0<=t?new Date(t+400,e,n)-He:new Date(t,e,n).valueOf()}function Ze(t,e,n){return t<100&&0<=t?Date.UTC(t+400,e,n)-He:Date.UTC(t,e,n)}function Qe(t,e){q(0,[t,t.length],0,e)}function Ke(t,e,n,r,i){var a;return null==t?It(this,r,i).year:((a=Rt(t,r,i))<e&&(e=a),function(t,e,n,r,i){var a=Lt(t,e,n,r,i),o=Nt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,t,e,n,r,i))}q(0,["gg",2],0,(function(){return this.weekYear()%100})),q(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Qe("gggg","weekYear"),Qe("ggggg","weekYear"),Qe("GGGG","isoWeekYear"),Qe("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),P("weekYear",1),P("isoWeekYear",1),lt("G",at),lt("g",at),lt("GG",K,G),lt("gg",K,G),lt("GGGG",nt,Z),lt("gggg",nt,Z),lt("GGGGG",rt,Q),lt("ggggg",rt,Q),yt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,r){e[r.substr(0,2)]=w(t)})),yt(["gg","GG"],(function(t,e,n,r){e[r]=i.parseTwoDigitYear(t)})),q("Q",0,"Qo","quarter"),L("quarter","Q"),P("quarter",7),lt("Q",H),pt("Q",(function(t,e){e[1]=3*(w(t)-1)})),q("D",["DD",2],"Do","date"),L("date","D"),P("date",9),lt("D",K),lt("DD",K,G),lt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),pt(["D","DD"],2),pt("Do",(function(t,e){e[2]=w(t.match(K)[0])}));var Je=xt("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),P("dayOfYear",4),lt("DDD",et),lt("DDDD",X),pt(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=w(t)})),q("m",["mm",2],0,"minute"),L("minute","m"),P("minute",14),lt("m",K),lt("mm",K,G),pt(["m","mm"],4);var tn=xt("Minutes",!1);q("s",["ss",2],0,"second"),L("second","s"),P("second",15),lt("s",K),lt("ss",K,G),pt(["s","ss"],5);var en,nn=xt("Seconds",!1);for(q("S",0,0,(function(){return~~(this.millisecond()/100)})),q(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),q(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),q(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),q(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),q(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),q(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),L("millisecond","ms"),P("millisecond",16),lt("S",et,H),lt("SS",et,G),lt("SSS",et,X),en="SSSS";en.length<=9;en+="S")lt(en,it);function rn(t,e){e[6]=w(1e3*("0."+t))}for(en="S";en.length<=9;en+="S")pt(en,rn);var an=xt("Milliseconds",!1);q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");var on=x.prototype;function sn(t){return t}on.add=ze,on.calendar=function(t,e){var n=t||xe(),r=Be(n,this).startOf("day"),a=i.calendarFormat(this,r)||"sameElse",o=e&&(O(e[a])?e[a].call(this,n):e[a]);return this.format(o||this.localeData().calendar(a,this,xe(n)))},on.clone=function(){return new x(this)},on.diff=function(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=Be(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=I(e)){case"year":a=$e(this,r)/12;break;case"month":a=$e(this,r);break;case"quarter":a=$e(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:k(a)},on.endOf=function(t){var e;if(void 0===(t=I(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-Ge(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-Ge(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-Ge(e,1e3)-1}return this._d.setTime(e),i.updateOffset(this,!0),this},on.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=W(this,t);return this.localeData().postformat(e)},on.from=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||xe(t).isValid())?Re({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.fromNow=function(t){return this.from(xe(),t)},on.to=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||xe(t).isValid())?Re({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.toNow=function(t){return this.to(xe(),t)},on.get=function(t){return O(this[t=I(t)])?this[t]():this},on.invalidAt=function(){return p(this).overflow},on.isAfter=function(t,e){var n=_(t)?t:xe(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},on.isBefore=function(t,e){var n=_(t)?t:xe(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},on.isBetween=function(t,e,n,r){var i=_(t)?t:xe(t),a=_(e)?e:xe(e);return!!(this.isValid()&&i.isValid()&&a.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))},on.isSame=function(t,e){var n,r=_(t)?t:xe(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},on.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},on.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},on.isValid=function(){return y(this)},on.lang=We,on.locale=qe,on.localeData=Ve,on.max=ke,on.min=_e,on.parsingFlags=function(){return f({},p(this))},on.set=function(t,e){if("object"==typeof t)for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:F[n]});return e.sort((function(t,e){return t.priority-e.priority})),e}(t=R(t)),r=0;r<n.length;r++)this[n[r].unit](t[n[r].unit]);else if(O(this[t=I(t)]))return this[t](e);return this},on.startOf=function(t){var e;if(void 0===(t=I(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Ge(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=Ge(e,6e4);break;case"second":e=this._d.valueOf(),e-=Ge(e,1e3)}return this._d.setTime(e),i.updateOffset(this,!0),this},on.subtract=Ue,on.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},on.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},on.toDate=function(){return new Date(this.valueOf())},on.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||9999<n.year()?W(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(n,"Z")):W(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},on.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=e+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},on.toJSON=function(){return this.isValid()?this.toISOString():null},on.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},on.unix=function(){return Math.floor(this.valueOf()/1e3)},on.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},on.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},on.year=bt,on.isLeapYear=function(){return vt(this.year())},on.weekYear=function(t){return Ke.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},on.isoWeekYear=function(t){return Ke.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},on.quarter=on.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},on.month=At,on.daysInMonth=function(){return wt(this.year(),this.month())},on.week=on.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},on.isoWeek=on.isoWeeks=function(t){var e=It(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},on.weeksInYear=function(){var t=this.localeData()._week;return Rt(this.year(),t.dow,t.doy)},on.isoWeeksInYear=function(){return Rt(this.year(),1,4)},on.date=Je,on.day=on.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,n,r=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,n=this.localeData(),t="string"!=typeof e?e:isNaN(e)?"number"==typeof(e=n.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-r,"d")):r},on.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},on.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null==t)return this.day()||7;var e,n,r=(e=t,n=this.localeData(),"string"==typeof e?n.weekdaysParse(e)%7||7:isNaN(e)?null:e);return this.day(this.day()%7?r:r-7)},on.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},on.hour=on.hours=Xt,on.minute=on.minutes=tn,on.second=on.seconds=nn,on.millisecond=on.milliseconds=an,on.utcOffset=function(t,e,n){var r,a=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null==t)return this._isUTC?a:Ne(this);if("string"==typeof t){if(null===(t=Oe(st,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(r=Ne(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==t&&(!e||this._changeInProgress?Ye(this,Re(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this},on.utc=function(t){return this.utcOffset(0,t)},on.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ne(this),"m")),this},on.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Oe(ot,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},on.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?xe(t).utcOffset():0,(this.utcOffset()-t)%60==0)},on.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},on.isLocal=function(){return!!this.isValid()&&!this._isUTC},on.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},on.isUtc=De,on.isUTC=De,on.zoneAbbr=function(){return this._isUTC?"UTC":""},on.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},on.dates=C("dates accessor is deprecated. Use date instead.",Je),on.months=C("months accessor is deprecated. Use month instead",At),on.years=C("years accessor is deprecated. Use year instead",bt),on.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),on.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(m(t,this),(t=me(t))._a){var e=t._isUTC?d(t._a):xe(t._a);this._isDSTShifted=this.isValid()&&0<E(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted}));var cn=N.prototype;function un(t,e,n,r){var i=re(),a=d().set(r,e);return i[n](a,t)}function ln(t,e,n){if(c(t)&&(e=t,t=void 0),t=t||"",null!=e)return un(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=un(t,r,n,"month");return i}function hn(t,e,n,r){"boolean"==typeof t?c(e)&&(n=e,e=void 0):(e=t,t=!1,c(n=e)&&(n=e,e=void 0)),e=e||"";var i,a=re(),o=t?a._week.dow:0;if(null!=n)return un(e,(n+o)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=un(e,(i+o)%7,r,"day");return s}cn.calendar=function(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return O(r)?r.call(e,n):r},cn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},cn.invalidDate=function(){return this._invalidDate},cn.ordinal=function(t){return this._ordinal.replace("%d",t)},cn.preparse=sn,cn.postformat=sn,cn.relativeTime=function(t,e,n,r){var i=this._relativeTime[n];return O(i)?i(t,e,n,r):i.replace(/%d/i,t)},cn.pastFuture=function(t,e){var n=this._relativeTime[0<t?"future":"past"];return O(n)?n(e):n.replace(/%s/i,e)},cn.set=function(t){var e,n;for(n in t)O(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},cn.months=function(t,e){return t?a(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Et).test(e)?"format":"standalone"][t.month()]:a(this._months)?this._months:this._months.standalone},cn.monthsShort=function(t,e){return t?a(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Et.test(e)?"format":"standalone"][t.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},cn.monthsParse=function(t,e,n){var r,i,a;if(this._monthsParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=d([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=mt.call(this._shortMonthsParse,o))?i:null:-1!==(i=mt.call(this._longMonthsParse,o))?i:null:"MMM"===e?-1!==(i=mt.call(this._shortMonthsParse,o))?i:-1!==(i=mt.call(this._longMonthsParse,o))?i:null:-1!==(i=mt.call(this._longMonthsParse,o))?i:-1!==(i=mt.call(this._shortMonthsParse,o))?i:null}.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=d([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},cn.monthsRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||Bt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=Ot),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},cn.monthsShortRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||Bt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Mt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},cn.week=function(t){return It(t,this._week.dow,this._week.doy).week},cn.firstDayOfYear=function(){return this._week.doy},cn.firstDayOfWeek=function(){return this._week.dow},cn.weekdays=function(t,e){var n=a(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Ft(n,this._week.dow):t?n[t.day()]:n},cn.weekdaysMin=function(t){return!0===t?Ft(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},cn.weekdaysShort=function(t){return!0===t?Ft(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},cn.weekdaysParse=function(t,e,n){var r,i,a;if(this._weekdaysParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=d([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=mt.call(this._weekdaysParse,o))?i:null:"ddd"===e?-1!==(i=mt.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=mt.call(this._minWeekdaysParse,o))?i:null:"dddd"===e?-1!==(i=mt.call(this._weekdaysParse,o))?i:-1!==(i=mt.call(this._shortWeekdaysParse,o))?i:-1!==(i=mt.call(this._minWeekdaysParse,o))?i:null:"ddd"===e?-1!==(i=mt.call(this._shortWeekdaysParse,o))?i:-1!==(i=mt.call(this._weekdaysParse,o))?i:-1!==(i=mt.call(this._minWeekdaysParse,o))?i:null:-1!==(i=mt.call(this._minWeekdaysParse,o))?i:-1!==(i=mt.call(this._weekdaysParse,o))?i:-1!==(i=mt.call(this._shortWeekdaysParse,o))?i:null}.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=d([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}},cn.weekdaysRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=zt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},cn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ut),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},cn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$t),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},cn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},cn.meridiem=function(t,e,n){return 11<t?n?"pm":"PM":n?"am":"AM"},ee("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===w(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=C("moment.lang is deprecated. Use moment.locale instead.",ee),i.langData=C("moment.langData is deprecated. Use moment.localeData instead.",re);var fn=Math.abs;function dn(t,e,n,r){var i=Re(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function pn(t){return t<0?Math.floor(t):Math.ceil(t)}function yn(t){return 4800*t/146097}function gn(t){return 146097*t/4800}function vn(t){return function(){return this.as(t)}}var mn=vn("ms"),bn=vn("s"),xn=vn("m"),_n=vn("h"),kn=vn("d"),wn=vn("w"),En=vn("M"),Tn=vn("Q"),Cn=vn("y");function Sn(t){return function(){return this.isValid()?this._data[t]:NaN}}var An=Sn("milliseconds"),Mn=Sn("seconds"),On=Sn("minutes"),Bn=Sn("hours"),Nn=Sn("days"),Dn=Sn("months"),Ln=Sn("years"),In=Math.round,Rn={ss:44,s:45,m:45,h:22,d:26,M:11},Fn=Math.abs;function Pn(t){return(0<t)-(t<0)||+t}function jn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=Fn(this._milliseconds)/1e3,r=Fn(this._days),i=Fn(this._months);e=k((t=k(n/60))/60),n%=60,t%=60;var a=k(i/12),o=i%=12,s=r,c=e,u=t,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var f=h<0?"-":"",d=Pn(this._months)!==Pn(h)?"-":"",p=Pn(this._days)!==Pn(h)?"-":"",y=Pn(this._milliseconds)!==Pn(h)?"-":"";return f+"P"+(a?d+a+"Y":"")+(o?d+o+"M":"")+(s?p+s+"D":"")+(c||u||l?"T":"")+(c?y+c+"H":"")+(u?y+u+"M":"")+(l?y+l+"S":"")}var Yn=Te.prototype;return Yn.isValid=function(){return this._isValid},Yn.abs=function(){var t=this._data;return this._milliseconds=fn(this._milliseconds),this._days=fn(this._days),this._months=fn(this._months),t.milliseconds=fn(t.milliseconds),t.seconds=fn(t.seconds),t.minutes=fn(t.minutes),t.hours=fn(t.hours),t.months=fn(t.months),t.years=fn(t.years),this},Yn.add=function(t,e){return dn(this,t,e,1)},Yn.subtract=function(t,e){return dn(this,t,e,-1)},Yn.as=function(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=I(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+yn(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(gn(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}},Yn.asMilliseconds=mn,Yn.asSeconds=bn,Yn.asMinutes=xn,Yn.asHours=_n,Yn.asDays=kn,Yn.asWeeks=wn,Yn.asMonths=En,Yn.asQuarters=Tn,Yn.asYears=Cn,Yn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},Yn._bubble=function(){var t,e,n,r,i,a=this._milliseconds,o=this._days,s=this._months,c=this._data;return 0<=a&&0<=o&&0<=s||a<=0&&o<=0&&s<=0||(a+=864e5*pn(gn(s)+o),s=o=0),c.milliseconds=a%1e3,t=k(a/1e3),c.seconds=t%60,e=k(t/60),c.minutes=e%60,n=k(e/60),c.hours=n%24,s+=i=k(yn(o+=k(n/24))),o-=pn(gn(i)),r=k(s/12),s%=12,c.days=o,c.months=s,c.years=r,this},Yn.clone=function(){return Re(this)},Yn.get=function(t){return t=I(t),this.isValid()?this[t+"s"]():NaN},Yn.milliseconds=An,Yn.seconds=Mn,Yn.minutes=On,Yn.hours=Bn,Yn.days=Nn,Yn.weeks=function(){return k(this.days()/7)},Yn.months=Dn,Yn.years=Ln,Yn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,n,r,i,a,o,s,c,u,l,h=this.localeData(),f=(e=!t,n=h,r=Re(this).abs(),i=In(r.as("s")),a=In(r.as("m")),o=In(r.as("h")),s=In(r.as("d")),c=In(r.as("M")),u=In(r.as("y")),(l=i<=Rn.ss&&["s",i]||i<Rn.s&&["ss",i]||a<=1&&["m"]||a<Rn.m&&["mm",a]||o<=1&&["h"]||o<Rn.h&&["hh",o]||s<=1&&["d"]||s<Rn.d&&["dd",s]||c<=1&&["M"]||c<Rn.M&&["MM",c]||u<=1&&["y"]||["yy",u])[2]=e,l[3]=0<+this,l[4]=n,function(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}.apply(null,l));return t&&(f=h.pastFuture(+this,f)),h.postformat(f)},Yn.toISOString=jn,Yn.toString=jn,Yn.toJSON=jn,Yn.locale=qe,Yn.localeData=Ve,Yn.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",jn),Yn.lang=We,q("X",0,0,"unix"),q("x",0,0,"valueOf"),lt("x",at),lt("X",/[+-]?\d+(\.\d{1,3})?/),pt("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))})),pt("x",(function(t,e,n){n._d=new Date(w(t))})),i.version="2.24.0",e=xe,i.fn=on,i.min=function(){return we("isBefore",[].slice.call(arguments,0))},i.max=function(){return we("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=d,i.unix=function(t){return xe(1e3*t)},i.months=function(t,e){return ln(t,e,"months")},i.isDate=u,i.locale=ee,i.invalid=g,i.duration=Re,i.isMoment=_,i.weekdays=function(t,e,n){return hn(t,e,n,"weekdays")},i.parseZone=function(){return xe.apply(null,arguments).parseZone()},i.localeData=re,i.isDuration=Ce,i.monthsShort=function(t,e){return ln(t,e,"monthsShort")},i.weekdaysMin=function(t,e,n){return hn(t,e,n,"weekdaysMin")},i.defineLocale=ne,i.updateLocale=function(t,e){if(null!=e){var n,r,i=Zt;null!=(r=te(t))&&(i=r._config),(n=new N(e=B(i,e))).parentLocale=Qt[t],Qt[t]=n,ee(t)}else null!=Qt[t]&&(null!=Qt[t].parentLocale?Qt[t]=Qt[t].parentLocale:null!=Qt[t]&&delete Qt[t]);return Qt[t]},i.locales=function(){return S(Qt)},i.weekdaysShort=function(t,e,n){return hn(t,e,n,"weekdaysShort")},i.normalizeUnits=I,i.relativeTimeRounding=function(t){return void 0===t?In:"function"==typeof t&&(In=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==Rn[t]&&(void 0===e?Rn[t]:(Rn[t]=e,"s"===t&&(Rn.ss=e-1),!0))},i.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=on,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}).call(this,n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,5],r=[7,9,11,12,13,14,15,16,17,18,19,21,28,33],i=[1,15],a=[1,16],o=[1,17],s=[1,18],c=[1,19],u=[1,20],l=[1,21],h=[1,22],f=[1,24],d=[1,26],p=[1,29],y=[5,7,9,11,12,13,14,15,16,17,18,19,21,28,33],g={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,excludes:16,todayMarker:17,title:18,section:19,clickStatement:20,taskTxt:21,taskData:22,openDirective:23,typeDirective:24,closeDirective:25,":":26,argDirective:27,click:28,callbackname:29,callbackargs:30,href:31,clickStatementDebug:32,open_directive:33,type_directive:34,arg_directive:35,close_directive:36,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"excludes",17:"todayMarker",18:"title",19:"section",21:"taskTxt",22:"taskData",26:":",28:"click",29:"callbackname",30:"callbackargs",31:"href",33:"open_directive",34:"type_directive",35:"arg_directive",36:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[20,2],[20,3],[20,3],[20,4],[20,3],[20,4],[20,2],[32,2],[32,3],[32,3],[32,4],[32,3],[32,4],[32,2],[23,1],[24,1],[27,1],[25,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 2:return a[s-1];case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 9:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 10:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 11:r.TopAxis(),this.$=a[s].substr(8);break;case 12:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 13:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 14:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 15:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 16:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s-1],a[s]),this.$="task";break;case 22:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 23:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 24:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 25:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 26:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 27:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 28:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 29:case 35:this.$=a[s-1]+" "+a[s];break;case 30:case 31:case 33:this.$=a[s-2]+" "+a[s-1]+" "+a[s];break;case 32:case 34:this.$=a[s-3]+" "+a[s-2]+" "+a[s-1]+" "+a[s];break;case 36:r.parseDirective("%%{","open_directive");break;case 37:r.parseDirective(a[s],"type_directive");break;case 38:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 39:r.parseDirective("}%%","close_directive","gantt")}},table:[{3:1,4:2,5:e,23:4,33:n},{1:[3]},{3:6,4:2,5:e,23:4,33:n},t(r,[2,3],{6:7}),{24:8,34:[1,9]},{34:[2,36]},{1:[2,1]},{4:25,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:i,13:a,14:o,15:s,16:c,17:u,18:l,19:h,20:23,21:f,23:4,28:d,33:n},{25:27,26:[1,28],36:p},t([26,36],[2,37]),t(r,[2,8],{1:[2,2]}),t(r,[2,4]),{4:25,10:30,12:i,13:a,14:o,15:s,16:c,17:u,18:l,19:h,20:23,21:f,23:4,28:d,33:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),t(r,[2,17]),{22:[1,31]},t(r,[2,19]),{29:[1,32],31:[1,33]},{11:[1,34]},{27:35,35:[1,36]},{11:[2,39]},t(r,[2,5]),t(r,[2,18]),t(r,[2,22],{30:[1,37],31:[1,38]}),t(r,[2,28],{29:[1,39]}),t(y,[2,20]),{25:40,36:p},{36:[2,38]},t(r,[2,23],{31:[1,41]}),t(r,[2,24]),t(r,[2,26],{30:[1,42]}),{11:[1,43]},t(r,[2,25]),t(r,[2,27]),t(y,[2,21])],defaultActions:{5:[2,36],6:[2,1],29:[2,39],36:[2,38]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},v={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),33;case 1:return this.begin("type_directive"),34;case 2:return this.popState(),this.begin("arg_directive"),26;case 3:return this.popState(),this.popState(),36;case 4:return 35;case 5:case 6:case 7:break;case 8:return 11;case 9:case 10:case 11:break;case 12:this.begin("href");break;case 13:this.popState();break;case 14:return 31;case 15:this.begin("callbackname");break;case 16:this.popState();break;case 17:this.popState(),this.begin("callbackargs");break;case 18:return 29;case 19:this.popState();break;case 20:return 30;case 21:this.begin("click");break;case 22:this.popState();break;case 23:return 28;case 24:return 5;case 25:return 12;case 26:return 13;case 27:return 14;case 28:return 15;case 29:return 16;case 30:return 17;case 31:return"date";case 32:return 18;case 33:return 19;case 34:return 21;case 35:return 22;case 36:return 26;case 37:return 7;case 38:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[19,20],inclusive:!1},callbackname:{rules:[16,17,18],inclusive:!1},href:{rules:[13,14],inclusive:!1},click:{rules:[22,23],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,15,21,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],inclusive:!0}}};function m(){this.yy={}}return g.lexer=v,m.prototype=g,g.Parser=m,new m}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){var r=n(38),i=n(81);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e,n){var r=n(257),i=n(267),a=n(35),o=n(5),s=n(274);t.exports=function(t){return"function"==typeof t?t:null==t?a:"object"==typeof t?o(t)?i(t[0],t[1]):r(t):s(t)}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,9],n=[1,7],r=[1,6],i=[1,8],a=[1,20,21,22,23,38,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],o=[2,10],s=[1,20],c=[1,21],u=[1,22],l=[1,23],h=[1,30],f=[1,54],d=[1,32],p=[1,33],y=[1,34],g=[1,35],v=[1,36],m=[1,48],b=[1,43],x=[1,45],_=[1,40],k=[1,44],w=[1,47],E=[1,51],T=[1,52],C=[1,53],S=[1,42],A=[1,46],M=[1,49],O=[1,50],B=[1,41],N=[1,57],D=[1,62],L=[1,20,21,22,23,38,42,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],I=[1,66],R=[1,65],F=[1,67],P=[20,21,23,69,70],j=[1,88],Y=[1,93],z=[1,90],U=[1,95],$=[1,98],q=[1,96],W=[1,97],V=[1,91],H=[1,103],G=[1,102],X=[1,92],Z=[1,94],Q=[1,99],K=[1,100],J=[1,101],tt=[1,104],et=[20,21,22,23,69,70],nt=[20,21,22,23,47,69,70],rt=[20,21,22,23,40,46,47,49,51,53,55,57,59,61,62,64,69,70,80,94,95,98,99,100,102,103,109,110,111,112,113,114],it=[20,21,23],at=[20,21,23,46,69,70,80,94,95,98,99,100,102,103,109,110,111,112,113,114],ot=[1,12,20,21,22,23,24,38,42,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],st=[46,80,94,95,98,99,100,102,103,109,110,111,112,113,114],ct=[1,136],ut=[1,144],lt=[1,145],ht=[1,146],ft=[1,147],dt=[1,131],pt=[1,132],yt=[1,128],gt=[1,139],vt=[1,140],mt=[1,141],bt=[1,142],xt=[1,143],_t=[1,148],kt=[1,149],wt=[1,134],Et=[1,137],Tt=[1,133],Ct=[1,130],St=[20,21,22,23,38,42,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],At=[1,152],Mt=[20,21,22,23,26,46,80,94,95,98,99,100,102,103,109,110,111,112,113,114],Ot=[20,21,22,23,24,26,38,40,41,42,46,50,52,54,56,58,60,61,63,65,69,70,71,75,76,77,78,79,80,81,84,94,95,98,99,100,102,103,104,105,109,110,111,112,113,114],Bt=[12,21,22,24],Nt=[22,95],Dt=[1,233],Lt=[1,237],It=[1,234],Rt=[1,231],Ft=[1,228],Pt=[1,229],jt=[1,230],Yt=[1,232],zt=[1,235],Ut=[1,236],$t=[1,238],qt=[1,255],Wt=[20,21,23,95],Vt=[20,21,22,23,75,91,94,95,98,99,100,101,102,103,104],Ht={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,link:43,node:44,vertex:45,AMP:46,STYLE_SEPARATOR:47,idString:48,PS:49,PE:50,"(-":51,"-)":52,STADIUMSTART:53,STADIUMEND:54,SUBROUTINESTART:55,SUBROUTINEEND:56,CYLINDERSTART:57,CYLINDEREND:58,DIAMOND_START:59,DIAMOND_STOP:60,TAGEND:61,TRAPSTART:62,TRAPEND:63,INVTRAPSTART:64,INVTRAPEND:65,linkStatement:66,arrowText:67,TESTSTR:68,START_LINK:69,LINK:70,PIPE:71,textToken:72,STR:73,keywords:74,STYLE:75,LINKSTYLE:76,CLASSDEF:77,CLASS:78,CLICK:79,DOWN:80,UP:81,textNoTags:82,textNoTagsToken:83,DEFAULT:84,stylesOpt:85,alphaNum:86,CALLBACKNAME:87,CALLBACKARGS:88,HREF:89,LINK_TARGET:90,HEX:91,numList:92,INTERPOLATE:93,NUM:94,COMMA:95,style:96,styleComponent:97,ALPHA:98,COLON:99,MINUS:100,UNIT:101,BRKT:102,DOT:103,PCT:104,TAGSTART:105,alphaNumToken:106,idStringToken:107,alphaNumStatement:108,PUNCTUATION:109,UNICODE_TEXT:110,PLUS:111,EQUALS:112,MULT:113,UNDERSCORE:114,graphCodeTokens:115,ARROW_CROSS:116,ARROW_POINT:117,ARROW_CIRCLE:118,ARROW_OPEN:119,QUOTE:120,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",46:"AMP",47:"STYLE_SEPARATOR",49:"PS",50:"PE",51:"(-",52:"-)",53:"STADIUMSTART",54:"STADIUMEND",55:"SUBROUTINESTART",56:"SUBROUTINEEND",57:"CYLINDERSTART",58:"CYLINDEREND",59:"DIAMOND_START",60:"DIAMOND_STOP",61:"TAGEND",62:"TRAPSTART",63:"TRAPEND",64:"INVTRAPSTART",65:"INVTRAPEND",68:"TESTSTR",69:"START_LINK",70:"LINK",71:"PIPE",73:"STR",75:"STYLE",76:"LINKSTYLE",77:"CLASSDEF",78:"CLASS",79:"CLICK",80:"DOWN",81:"UP",84:"DEFAULT",87:"CALLBACKNAME",88:"CALLBACKARGS",89:"HREF",90:"LINK_TARGET",91:"HEX",93:"INTERPOLATE",94:"NUM",95:"COMMA",98:"ALPHA",99:"COLON",100:"MINUS",101:"UNIT",102:"BRKT",103:"DOT",104:"PCT",105:"TAGSTART",109:"PUNCTUATION",110:"UNICODE_TEXT",111:"PLUS",112:"EQUALS",113:"MULT",114:"UNDERSCORE",116:"ARROW_CROSS",117:"ARROW_POINT",118:"ARROW_CIRCLE",119:"ARROW_OPEN",120:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[44,1],[44,5],[44,3],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[43,2],[43,3],[43,3],[43,1],[43,3],[66,1],[67,3],[39,1],[39,2],[39,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[82,1],[82,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[92,1],[92,3],[85,1],[85,3],[96,1],[96,2],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[83,1],[83,1],[83,1],[83,1],[48,1],[48,2],[86,1],[86,2],[108,1],[108,1],[108,1],[108,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.parseDirective("%%{","open_directive");break;case 6:r.parseDirective(a[s],"type_directive");break;case 7:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 8:r.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:a[s]!==[]&&a[s-1].push(a[s]),this.$=a[s-1];break;case 12:case 76:case 78:case 90:case 146:case 148:case 149:this.$=a[s];break;case 19:r.setDirection("TB"),this.$="TB";break;case 20:r.setDirection(a[s-1]),this.$=a[s-1];break;case 35:this.$=a[s-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 42:this.$=r.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 43:this.$=r.addSubGraph(void 0,a[s-1],void 0);break;case 47:r.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 48:r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 49:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 50:this.$={stmt:a[s],nodes:a[s]};break;case 51:this.$=[a[s]];break;case 52:this.$=a[s-4].concat(a[s]);break;case 53:this.$=[a[s-2]],r.setClass(a[s-2],a[s]);break;case 54:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"square");break;case 55:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"circle");break;case 56:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"ellipse");break;case 57:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"stadium");break;case 58:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"subroutine");break;case 59:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"cylinder");break;case 60:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"round");break;case 61:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"diamond");break;case 62:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"hexagon");break;case 63:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"odd");break;case 64:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"trapezoid");break;case 65:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"inv_trapezoid");break;case 66:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_right");break;case 67:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_left");break;case 68:this.$=a[s],r.addVertex(a[s]);break;case 69:a[s-1].text=a[s],this.$=a[s-1];break;case 70:case 71:a[s-2].text=a[s-1],this.$=a[s-2];break;case 72:this.$=a[s];break;case 73:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1]};break;case 74:c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 75:this.$=a[s-1];break;case 77:case 91:case 147:this.$=a[s-1]+""+a[s];break;case 92:case 93:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 94:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 95:case 103:this.$=a[s-1],r.setClickEvent(a[s-1],a[s]);break;case 96:case 104:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 97:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 98:this.$=a[s-4],r.setClickEvent(a[s-4],a[s-3],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 99:case 105:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 100:case 106:this.$=a[s-3],r.setLink(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 101:case 107:this.$=a[s-3],r.setLink(a[s-3],a[s-2],a[s]);break;case 102:case 108:this.$=a[s-5],r.setLink(a[s-5],a[s-4],a[s]),r.setTooltip(a[s-5],a[s-2]);break;case 109:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 110:case 112:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 111:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 113:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 114:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 115:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 116:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 117:case 119:this.$=[a[s]];break;case 118:case 120:a[s-2].push(a[s]),this.$=a[s-2];break;case 122:this.$=a[s-1]+a[s];break;case 144:this.$=a[s];break;case 145:this.$=a[s-1]+""+a[s];break;case 150:this.$="v";break;case 151:this.$="-"}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},t(a,o,{17:11}),{7:12,13:[1,13]},{16:14,21:n,22:r,24:i},{16:15,21:n,22:r,24:i},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,44:31,45:37,46:f,48:38,75:d,76:p,77:y,78:g,79:v,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},{8:55,10:[1,56],15:N},t([10,15],[2,6]),t(a,[2,17]),t(a,[2,18]),t(a,[2,19]),{20:[1,59],21:[1,60],22:D,27:58,30:61},t(L,[2,11]),t(L,[2,12]),t(L,[2,13]),t(L,[2,14]),t(L,[2,15]),t(L,[2,16]),{9:63,20:I,21:R,23:F,43:64,66:68,69:[1,69],70:[1,70]},{9:71,20:I,21:R,23:F},{9:72,20:I,21:R,23:F},{9:73,20:I,21:R,23:F},{9:74,20:I,21:R,23:F},{9:75,20:I,21:R,23:F},{9:77,20:I,21:R,22:[1,76],23:F},t(P,[2,50],{30:78,22:D}),{22:[1,79]},{22:[1,80]},{22:[1,81]},{22:[1,82]},{26:j,46:Y,73:[1,86],80:z,86:85,87:[1,83],89:[1,84],94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(et,[2,51],{47:[1,105]}),t(nt,[2,68],{107:116,40:[1,106],46:f,49:[1,107],51:[1,108],53:[1,109],55:[1,110],57:[1,111],59:[1,112],61:[1,113],62:[1,114],64:[1,115],80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,109:C,110:S,111:A,112:M,113:O,114:B}),t(rt,[2,144]),t(rt,[2,165]),t(rt,[2,166]),t(rt,[2,167]),t(rt,[2,168]),t(rt,[2,169]),t(rt,[2,170]),t(rt,[2,171]),t(rt,[2,172]),t(rt,[2,173]),t(rt,[2,174]),t(rt,[2,175]),t(rt,[2,176]),t(rt,[2,177]),t(rt,[2,178]),t(rt,[2,179]),{9:117,20:I,21:R,23:F},{11:118,14:[1,119]},t(it,[2,8]),t(a,[2,20]),t(a,[2,26]),t(a,[2,27]),{21:[1,120]},t(at,[2,34],{30:121,22:D}),t(L,[2,35]),{44:122,45:37,46:f,48:38,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},t(ot,[2,44]),t(ot,[2,45]),t(ot,[2,46]),t(st,[2,72],{67:123,68:[1,124],71:[1,125]}),{22:ct,24:ut,26:lt,38:ht,39:126,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t([46,68,71,80,94,95,98,99,100,102,103,109,110,111,112,113,114],[2,74]),t(L,[2,36]),t(L,[2,37]),t(L,[2,38]),t(L,[2,39]),t(L,[2,40]),{22:ct,24:ut,26:lt,38:ht,39:150,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(St,o,{17:151}),t(P,[2,49],{46:At}),{26:j,46:Y,80:z,86:153,91:[1,154],94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},{84:[1,155],92:156,94:[1,157]},{26:j,46:Y,80:z,84:[1,158],86:159,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},{26:j,46:Y,80:z,86:160,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(it,[2,95],{22:[1,161],88:[1,162]}),t(it,[2,99],{22:[1,163]}),t(it,[2,103],{106:89,108:165,22:[1,164],26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,109:X,110:Z,111:Q,112:K,113:J,114:tt}),t(it,[2,105],{22:[1,166]}),t(Mt,[2,146]),t(Mt,[2,148]),t(Mt,[2,149]),t(Mt,[2,150]),t(Mt,[2,151]),t(Ot,[2,152]),t(Ot,[2,153]),t(Ot,[2,154]),t(Ot,[2,155]),t(Ot,[2,156]),t(Ot,[2,157]),t(Ot,[2,158]),t(Ot,[2,159]),t(Ot,[2,160]),t(Ot,[2,161]),t(Ot,[2,162]),t(Ot,[2,163]),t(Ot,[2,164]),{46:f,48:167,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},{22:ct,24:ut,26:lt,38:ht,39:168,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:170,42:ft,46:Y,49:[1,169],61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:171,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:172,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:173,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:174,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:175,42:ft,46:Y,59:[1,176],61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:177,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:178,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:179,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(rt,[2,145]),t(Bt,[2,3]),{8:180,15:N},{15:[2,7]},t(a,[2,28]),t(at,[2,33]),t(P,[2,47],{30:181,22:D}),t(st,[2,69],{22:[1,182]}),{22:[1,183]},{22:ct,24:ut,26:lt,38:ht,39:184,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,61:dt,69:pt,70:[1,185],72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(Ot,[2,76]),t(Ot,[2,78]),t(Ot,[2,134]),t(Ot,[2,135]),t(Ot,[2,136]),t(Ot,[2,137]),t(Ot,[2,138]),t(Ot,[2,139]),t(Ot,[2,140]),t(Ot,[2,141]),t(Ot,[2,142]),t(Ot,[2,143]),t(Ot,[2,79]),t(Ot,[2,80]),t(Ot,[2,81]),t(Ot,[2,82]),t(Ot,[2,83]),t(Ot,[2,84]),t(Ot,[2,85]),t(Ot,[2,86]),t(Ot,[2,87]),t(Ot,[2,88]),t(Ot,[2,89]),{9:188,20:I,21:R,22:ct,23:F,24:ut,26:lt,38:ht,40:[1,187],42:ft,46:Y,61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,189],44:31,45:37,46:f,48:38,75:d,76:p,77:y,78:g,79:v,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},{22:D,30:190},{22:[1,191],26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:165,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:[1,192]},{22:[1,193]},{22:[1,194],95:[1,195]},t(Nt,[2,117]),{22:[1,196]},{22:[1,197],26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:165,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:[1,198],26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:165,109:X,110:Z,111:Q,112:K,113:J,114:tt},{73:[1,199]},t(it,[2,97],{22:[1,200]}),{73:[1,201],90:[1,202]},{73:[1,203]},t(Mt,[2,147]),{73:[1,204],90:[1,205]},t(et,[2,53],{107:116,46:f,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,109:C,110:S,111:A,112:M,113:O,114:B}),{22:ct,24:ut,26:lt,38:ht,41:[1,206],42:ft,46:Y,61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:207,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,50:[1,208],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,52:[1,209],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,54:[1,210],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,56:[1,211],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,58:[1,212],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,60:[1,213],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:214,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,41:[1,215],42:ft,46:Y,61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,61:dt,63:[1,216],65:[1,217],69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,61:dt,63:[1,219],65:[1,218],69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{9:220,20:I,21:R,23:F},t(P,[2,48],{46:At}),t(st,[2,71]),t(st,[2,70]),{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,61:dt,69:pt,71:[1,221],72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(st,[2,73]),t(Ot,[2,77]),{22:ct,24:ut,26:lt,38:ht,39:222,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(St,o,{17:223}),t(L,[2,43]),{45:224,46:f,48:38,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},{22:Dt,75:Lt,85:225,91:It,94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{22:Dt,75:Lt,85:239,91:It,94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{22:Dt,75:Lt,85:240,91:It,93:[1,241],94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{22:Dt,75:Lt,85:242,91:It,93:[1,243],94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{94:[1,244]},{22:Dt,75:Lt,85:245,91:It,94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{22:Dt,75:Lt,85:246,91:It,94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{26:j,46:Y,80:z,86:247,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(it,[2,96]),{73:[1,248]},t(it,[2,100],{22:[1,249]}),t(it,[2,101]),t(it,[2,104]),t(it,[2,106],{22:[1,250]}),t(it,[2,107]),t(nt,[2,54]),{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,50:[1,251],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(nt,[2,60]),t(nt,[2,56]),t(nt,[2,57]),t(nt,[2,58]),t(nt,[2,59]),t(nt,[2,61]),{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,60:[1,252],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(nt,[2,63]),t(nt,[2,64]),t(nt,[2,66]),t(nt,[2,65]),t(nt,[2,67]),t(Bt,[2,4]),t([22,46,80,94,95,98,99,100,102,103,109,110,111,112,113,114],[2,75]),{22:ct,24:ut,26:lt,38:ht,41:[1,253],42:ft,46:Y,61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,254],44:31,45:37,46:f,48:38,75:d,76:p,77:y,78:g,79:v,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},t(et,[2,52]),t(it,[2,109],{95:qt}),t(Wt,[2,119],{97:256,22:Dt,75:Lt,91:It,94:Rt,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t}),t(Vt,[2,121]),t(Vt,[2,123]),t(Vt,[2,124]),t(Vt,[2,125]),t(Vt,[2,126]),t(Vt,[2,127]),t(Vt,[2,128]),t(Vt,[2,129]),t(Vt,[2,130]),t(Vt,[2,131]),t(Vt,[2,132]),t(Vt,[2,133]),t(it,[2,110],{95:qt}),t(it,[2,111],{95:qt}),{22:[1,257]},t(it,[2,112],{95:qt}),{22:[1,258]},t(Nt,[2,118]),t(it,[2,92],{95:qt}),t(it,[2,93],{95:qt}),t(it,[2,94],{106:89,108:165,26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,109:X,110:Z,111:Q,112:K,113:J,114:tt}),t(it,[2,98]),{90:[1,259]},{90:[1,260]},{50:[1,261]},{60:[1,262]},{9:263,20:I,21:R,23:F},t(L,[2,42]),{22:Dt,75:Lt,91:It,94:Rt,96:264,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},t(Vt,[2,122]),{26:j,46:Y,80:z,86:265,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},{26:j,46:Y,80:z,86:266,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(it,[2,102]),t(it,[2,108]),t(nt,[2,55]),t(nt,[2,62]),t(St,o,{17:267}),t(Wt,[2,120],{97:256,22:Dt,75:Lt,91:It,94:Rt,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t}),t(it,[2,115],{106:89,108:165,22:[1,268],26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,109:X,110:Z,111:Q,112:K,113:J,114:tt}),t(it,[2,116],{106:89,108:165,22:[1,269],26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,109:X,110:Z,111:Q,112:K,113:J,114:tt}),{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,270],44:31,45:37,46:f,48:38,75:d,76:p,77:y,78:g,79:v,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},{22:Dt,75:Lt,85:271,91:It,94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{22:Dt,75:Lt,85:272,91:It,94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},t(L,[2,41]),t(it,[2,113],{95:qt}),t(it,[2,114],{95:qt})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],119:[2,7]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},Gt={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:case 6:break;case 7:this.begin("string");break;case 8:this.popState();break;case 9:return"STR";case 10:return 75;case 11:return 84;case 12:return 76;case 13:return 93;case 14:return 77;case 15:return 78;case 16:this.begin("href");break;case 17:this.popState();break;case 18:return 89;case 19:this.begin("callbackname");break;case 20:this.popState();break;case 21:this.popState(),this.begin("callbackargs");break;case 22:return 87;case 23:this.popState();break;case 24:return 88;case 25:this.begin("click");break;case 26:this.popState();break;case 27:return 79;case 28:case 29:return t.lex.firstGraph()&&this.begin("dir"),24;case 30:return 38;case 31:return 42;case 32:case 33:case 34:case 35:return 90;case 36:return this.popState(),25;case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:return this.popState(),26;case 47:return 94;case 48:return 102;case 49:return 47;case 50:return 99;case 51:return 46;case 52:return 20;case 53:return 95;case 54:return 113;case 55:case 56:case 57:return 70;case 58:case 59:case 60:return 69;case 61:return 51;case 62:return 52;case 63:return 53;case 64:return 54;case 65:return 55;case 66:return 56;case 67:return 57;case 68:return 58;case 69:return 100;case 70:return 103;case 71:return 114;case 72:return 111;case 73:return 104;case 74:case 75:return 112;case 76:return 105;case 77:return 61;case 78:return 81;case 79:return"SEP";case 80:return 80;case 81:return 98;case 82:return 63;case 83:return 62;case 84:return 65;case 85:return 64;case 86:return 109;case 87:return 110;case 88:return 71;case 89:return 49;case 90:return 50;case 91:return 40;case 92:return 41;case 93:return 59;case 94:return 60;case 95:return 120;case 96:return 21;case 97:return 22;case 98:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\()/,/^(?:\)\])/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_\/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[23,24],inclusive:!1},callbackname:{rules:[20,21,22],inclusive:!1},href:{rules:[17,18],inclusive:!1},click:{rules:[26,27],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[36,37,38,39,40,41,42,43,44,45,46],inclusive:!1},string:{rules:[8,9],inclusive:!1},INITIAL:{rules:[0,5,6,7,10,11,12,13,14,15,16,19,25,28,29,30,31,32,33,34,35,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98],inclusive:!0}}};function Xt(){this.yy={}}return Ht.lexer=Gt,Xt.prototype=Ht,Ht.Parser=Xt,new Xt}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,17,18,19,21],i=[1,15],a=[1,16],o=[1,17],s=[1,21],c=[4,6,9,11,17,18,19,21],u={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,section:18,taskName:19,taskData:20,open_directive:21,type_directive:22,arg_directive:23,close_directive:24,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"section",19:"taskName",20:"taskData",21:"open_directive",22:"type_directive",23:"arg_directive",24:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 11:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$="task";break;case 15:r.parseDirective("%%{","open_directive");break;case 16:r.parseDirective(a[s],"type_directive");break;case 17:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 18:r.parseDirective("}%%","close_directive","journey")}},table:[{3:1,4:e,7:3,12:4,21:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,21:n},{13:8,22:[1,9]},{22:[2,15]},{6:[1,10],7:18,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:a,19:o,21:n},{1:[2,2]},{14:19,15:[1,20],24:s},t([15,24],[2,16]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:18,10:22,12:4,17:i,18:a,19:o,21:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,12]),{20:[1,23]},t(r,[2,14]),{11:[1,24]},{16:25,23:[1,26]},{11:[2,18]},t(r,[2,5]),t(r,[2,13]),t(c,[2,9]),{14:27,24:s},{24:[2,17]},{11:[1,28]},t(c,[2,10])],defaultActions:{5:[2,15],7:[2,2],21:[2,18],26:[2,17]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},l={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),21;case 1:return this.begin("type_directive"),22;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),24;case 4:return 23;case 5:case 6:break;case 7:return 11;case 8:case 9:break;case 10:return 4;case 11:return 17;case 12:return 18;case 13:return 19;case 14:return 20;case 15:return 15;case 16:return 6;case 17:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}}};function h(){this.yy={}}return u.lexer=l,h.prototype=u,u.Parser=h,new h}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(16);e.default=function(t,e){return r.default.lang.round(i.default.parse(t)[e])}},function(t,e,n){var r=n(113),i=n(83),a=n(25);t.exports=function(t){return a(t)?r(t):i(t)}},function(t,e,n){var r;if(!r)try{r=n(0)}catch(t){}r||(r=window.d3),t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(16);e.default=function(t,e,n){var a=i.default.parse(t),o=a[e],s=r.default.channel.clamp[e](o+n);return o!==s&&(a[e]=s),i.default.stringify(a)}},function(t,e,n){var r=n(211),i=n(217);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(39),i=n(213),a=n(214),o=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?i(t):a(t)}},function(t,e){t.exports=function(t){return t}},function(t){t.exports=JSON.parse('{"name":"mermaid","version":"8.9.3","description":"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.","main":"dist/mermaid.core.js","keywords":["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],"scripts":{"build:development":"webpack --progress --colors","build:production":"yarn build:development -p --config webpack.config.prod.babel.js","build":"yarn build:development && yarn build:production","postbuild":"documentation build src/mermaidAPI.js src/config.js src/defaultConfig.js --shallow -f md --markdown-toc false > docs/Setup.md","build:watch":"yarn build --watch","minify":"minify ./dist/mermaid.js > ./dist/mermaid.min.js","release":"yarn build","lint":"eslint src","e2e:depr":"yarn lint && jest e2e --config e2e/jest.config.js","cypress":"percy exec -- cypress run","e2e":"start-server-and-test dev http://localhost:9000/ cypress","e2e-upd":"yarn lint && jest e2e -u --config e2e/jest.config.js","dev":"webpack-dev-server --config webpack.config.e2e.js","test":"yarn lint && jest src/.*","test:watch":"jest --watch src","prepublishOnly":"yarn build && yarn test","prepare":"yarn build"},"repository":{"type":"git","url":"https://github.com/knsv/mermaid"},"author":"Knut Sveidqvist","license":"MIT","standard":{"ignore":["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],"globals":["page"]},"dependencies":{"@braintree/sanitize-url":"^3.1.0","d3":"^5.7.0","dagre":"^0.8.4","dagre-d3":"^0.6.4","entity-decode":"^2.0.2","graphlib":"^2.1.7","he":"^1.2.0","khroma":"^1.1.0","minify":"^4.1.1","moment-mini":"^2.22.1","stylis":"^3.5.2"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.8.4","@babel/register":"^7.0.0","@percy/cypress":"*","babel-core":"7.0.0-bridge.0","babel-eslint":"^10.1.0","babel-jest":"^24.9.0","babel-loader":"^8.0.4","coveralls":"^3.0.2","css-loader":"^2.0.1","css-to-string-loader":"^0.1.3","cypress":"4.0.1","documentation":"^12.0.1","eslint":"^6.3.0","eslint-config-prettier":"^6.3.0","eslint-plugin-prettier":"^3.1.0","husky":"^1.2.1","identity-obj-proxy":"^3.0.0","jest":"^24.9.0","jison":"^0.4.18","moment":"^2.23.0","node-sass":"^5.0.0","prettier":"^1.18.2","puppeteer":"^1.17.0","sass-loader":"^7.1.0","start-server-and-test":"^1.10.6","terser-webpack-plugin":"^2.2.2","webpack":"^4.41.2","webpack-bundle-analyzer":"^3.7.0","webpack-cli":"^3.1.2","webpack-dev-server":"^3.4.1","webpack-node-externals":"^1.7.2","yarn-upgrade-all":"^0.5.0"},"files":["dist"],"yarn-upgrade-all":{"ignore":["babel-core"]},"sideEffects":["**/*.css","**/*.scss"],"husky":{"hooks":{"pre-push":"yarn test"}}}')},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(34),i=n(13);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(19).Symbol;t.exports=r},function(t,e,n){(function(t){var r=n(19),i=n(233),a=e&&!e.nodeType&&e,o=a&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===a?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||i;t.exports=c}).call(this,n(6)(t))},function(t,e,n){var r=n(113),i=n(237),a=n(25);t.exports=function(t){return a(t)?r(t,!0):i(t)}},function(t,e,n){var r=n(242),i=n(78),a=n(243),o=n(122),s=n(244),c=n(34),u=n(111),l=u(r),h=u(i),f=u(a),d=u(o),p=u(s),y=c;(r&&"[object DataView]"!=y(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=y(new i)||a&&"[object Promise]"!=y(a.resolve())||o&&"[object Set]"!=y(new o)||s&&"[object WeakMap]"!=y(new s))&&(y=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,r=n?u(n):"";if(r)switch(r){case l:return"[object DataView]";case h:return"[object Map]";case f:return"[object Promise]";case d:return"[object Set]";case p:return"[object WeakMap]"}return e}),t.exports=y},function(t,e,n){var r=n(34),i=n(21);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,e,n){var r;try{r={defaults:n(155),each:n(88),isFunction:n(38),isPlainObject:n(159),pick:n(162),has:n(94),range:n(163),uniqueId:n(164)}}catch(t){}r||(r=window._),t.exports=r},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,5],r=[1,17],i=[2,10],a=[1,21],o=[1,22],s=[1,23],c=[1,24],u=[1,25],l=[1,26],h=[1,19],f=[1,27],d=[1,28],p=[1,31],y=[66,67],g=[5,8,14,35,36,37,38,39,40,48,55,57,66,67],v=[5,6,8,14,35,36,37,38,39,40,48,66,67],m=[1,51],b=[1,52],x=[1,53],_=[1,54],k=[1,55],w=[1,56],E=[1,57],T=[57,58],C=[1,69],S=[1,65],A=[1,66],M=[1,67],O=[1,68],B=[1,70],N=[1,74],D=[1,75],L=[1,72],I=[1,73],R=[5,8,14,35,36,37,38,39,40,48,66,67],F={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,open_directive:14,type_directive:15,arg_directive:16,close_directive:17,requirementDef:18,elementDef:19,relationshipDef:20,requirementType:21,requirementName:22,STRUCT_START:23,requirementBody:24,ID:25,COLONSEP:26,id:27,TEXT:28,text:29,RISK:30,riskLevel:31,VERIFYMTHD:32,verifyType:33,STRUCT_STOP:34,REQUIREMENT:35,FUNCTIONAL_REQUIREMENT:36,INTERFACE_REQUIREMENT:37,PERFORMANCE_REQUIREMENT:38,PHYSICAL_REQUIREMENT:39,DESIGN_CONSTRAINT:40,LOW_RISK:41,MED_RISK:42,HIGH_RISK:43,VERIFY_ANALYSIS:44,VERIFY_DEMONSTRATION:45,VERIFY_INSPECTION:46,VERIFY_TEST:47,ELEMENT:48,elementName:49,elementBody:50,TYPE:51,type:52,DOCREF:53,ref:54,END_ARROW_L:55,relationship:56,LINE:57,END_ARROW_R:58,CONTAINS:59,COPIES:60,DERIVES:61,SATISFIES:62,VERIFIES:63,REFINES:64,TRACES:65,unqString:66,qString:67,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"open_directive",15:"type_directive",16:"arg_directive",17:"close_directive",23:"STRUCT_START",25:"ID",26:"COLONSEP",28:"TEXT",30:"RISK",32:"VERIFYMTHD",34:"STRUCT_STOP",35:"REQUIREMENT",36:"FUNCTIONAL_REQUIREMENT",37:"INTERFACE_REQUIREMENT",38:"PERFORMANCE_REQUIREMENT",39:"PHYSICAL_REQUIREMENT",40:"DESIGN_CONSTRAINT",41:"LOW_RISK",42:"MED_RISK",43:"HIGH_RISK",44:"VERIFY_ANALYSIS",45:"VERIFY_DEMONSTRATION",46:"VERIFY_INSPECTION",47:"VERIFY_TEST",48:"ELEMENT",51:"TYPE",53:"DOCREF",55:"END_ARROW_L",57:"LINE",58:"END_ARROW_R",59:"CONTAINS",60:"COPIES",61:"DERIVES",62:"SATISFIES",63:"VERIFIES",64:"REFINES",65:"TRACES",66:"unqString",67:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[18,5],[24,5],[24,5],[24,5],[24,5],[24,2],[24,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[31,1],[31,1],[31,1],[33,1],[33,1],[33,1],[33,1],[19,5],[50,5],[50,5],[50,2],[50,1],[20,5],[20,5],[56,1],[56,1],[56,1],[56,1],[56,1],[56,1],[56,1],[22,1],[22,1],[27,1],[27,1],[29,1],[29,1],[49,1],[49,1],[52,1],[52,1],[54,1],[54,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:r.parseDirective("%%{","open_directive");break;case 7:r.parseDirective(a[s],"type_directive");break;case 8:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 9:r.parseDirective("}%%","close_directive","pie");break;case 10:this.$=[];break;case 16:r.addRequirement(a[s-3],a[s-4]);break;case 17:r.setNewReqId(a[s-2]);break;case 18:r.setNewReqText(a[s-2]);break;case 19:r.setNewReqRisk(a[s-2]);break;case 20:r.setNewReqVerifyMethod(a[s-2]);break;case 23:this.$=r.RequirementType.REQUIREMENT;break;case 24:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 25:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 26:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 27:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 28:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 29:this.$=r.RiskLevel.LOW_RISK;break;case 30:this.$=r.RiskLevel.MED_RISK;break;case 31:this.$=r.RiskLevel.HIGH_RISK;break;case 32:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 33:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 34:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 35:this.$=r.VerifyType.VERIFY_TEST;break;case 36:r.addElement(a[s-3]);break;case 37:r.setNewElementType(a[s-2]);break;case 38:r.setNewElementDocRef(a[s-2]);break;case 41:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 42:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 43:this.$=r.Relationships.CONTAINS;break;case 44:this.$=r.Relationships.COPIES;break;case 45:this.$=r.Relationships.DERIVES;break;case 46:this.$=r.Relationships.SATISFIES;break;case 47:this.$=r.Relationships.VERIFIES;break;case 48:this.$=r.Relationships.REFINES;break;case 49:this.$=r.Relationships.TRACES}},table:[{3:1,4:2,6:e,9:4,14:n},{1:[3]},{3:7,4:2,5:[1,6],6:e,9:4,14:n},{5:[1,8]},{10:9,15:[1,10]},{15:[2,6]},{3:11,4:2,6:e,9:4,14:n},{1:[2,2]},{4:16,5:r,7:12,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:u,40:l,48:h,66:f,67:d},{11:29,12:[1,30],17:p},t([12,17],[2,7]),{1:[2,1]},{8:[1,32]},{4:16,5:r,7:33,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:u,40:l,48:h,66:f,67:d},{4:16,5:r,7:34,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:u,40:l,48:h,66:f,67:d},{4:16,5:r,7:35,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:u,40:l,48:h,66:f,67:d},{4:16,5:r,7:36,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:u,40:l,48:h,66:f,67:d},{4:16,5:r,7:37,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:u,40:l,48:h,66:f,67:d},{22:38,66:[1,39],67:[1,40]},{49:41,66:[1,42],67:[1,43]},{55:[1,44],57:[1,45]},t(y,[2,23]),t(y,[2,24]),t(y,[2,25]),t(y,[2,26]),t(y,[2,27]),t(y,[2,28]),t(g,[2,52]),t(g,[2,53]),t(v,[2,4]),{13:46,16:[1,47]},t(v,[2,9]),{1:[2,3]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{23:[1,48]},{23:[2,50]},{23:[2,51]},{23:[1,49]},{23:[2,56]},{23:[2,57]},{56:50,59:m,60:b,61:x,62:_,63:k,64:w,65:E},{56:58,59:m,60:b,61:x,62:_,63:k,64:w,65:E},{11:59,17:p},{17:[2,8]},{5:[1,60]},{5:[1,61]},{57:[1,62]},t(T,[2,43]),t(T,[2,44]),t(T,[2,45]),t(T,[2,46]),t(T,[2,47]),t(T,[2,48]),t(T,[2,49]),{58:[1,63]},t(v,[2,5]),{5:C,24:64,25:S,28:A,30:M,32:O,34:B},{5:N,34:D,50:71,51:L,53:I},{27:76,66:f,67:d},{27:77,66:f,67:d},t(R,[2,16]),{26:[1,78]},{26:[1,79]},{26:[1,80]},{26:[1,81]},{5:C,24:82,25:S,28:A,30:M,32:O,34:B},t(R,[2,22]),t(R,[2,36]),{26:[1,83]},{26:[1,84]},{5:N,34:D,50:85,51:L,53:I},t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),{27:86,66:f,67:d},{29:87,66:[1,88],67:[1,89]},{31:90,41:[1,91],42:[1,92],43:[1,93]},{33:94,44:[1,95],45:[1,96],46:[1,97],47:[1,98]},t(R,[2,21]),{52:99,66:[1,100],67:[1,101]},{54:102,66:[1,103],67:[1,104]},t(R,[2,39]),{5:[1,105]},{5:[1,106]},{5:[2,54]},{5:[2,55]},{5:[1,107]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[1,108]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[2,35]},{5:[1,109]},{5:[2,58]},{5:[2,59]},{5:[1,110]},{5:[2,60]},{5:[2,61]},{5:C,24:111,25:S,28:A,30:M,32:O,34:B},{5:C,24:112,25:S,28:A,30:M,32:O,34:B},{5:C,24:113,25:S,28:A,30:M,32:O,34:B},{5:C,24:114,25:S,28:A,30:M,32:O,34:B},{5:N,34:D,50:115,51:L,53:I},{5:N,34:D,50:116,51:L,53:I},t(R,[2,17]),t(R,[2,18]),t(R,[2,19]),t(R,[2,20]),t(R,[2,37]),t(R,[2,38])],defaultActions:{5:[2,6],7:[2,2],11:[2,1],32:[2,3],33:[2,11],34:[2,12],35:[2,13],36:[2,14],37:[2,15],39:[2,50],40:[2,51],42:[2,56],43:[2,57],47:[2,8],88:[2,54],89:[2,55],91:[2,29],92:[2,30],93:[2,31],95:[2,32],96:[2,33],97:[2,34],98:[2,35],100:[2,58],101:[2,59],103:[2,60],104:[2,61]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},P={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),14;case 1:return this.begin("type_directive"),15;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),17;case 4:return 16;case 5:return 5;case 6:case 7:case 8:break;case 9:return 8;case 10:return 6;case 11:return 23;case 12:return 34;case 13:return 26;case 14:return 25;case 15:return 28;case 16:return 30;case 17:return 32;case 18:return 35;case 19:return 36;case 20:return 37;case 21:return 38;case 22:return 39;case 23:return 40;case 24:return 41;case 25:return 42;case 26:return 43;case 27:return 44;case 28:return 45;case 29:return 46;case 30:return 47;case 31:return 48;case 32:return 59;case 33:return 60;case 34:return 61;case 35:return 62;case 36:return 63;case 37:return 64;case 38:return 65;case 39:return 51;case 40:return 53;case 41:return 55;case 42:return 58;case 43:return 57;case 44:this.begin("string");break;case 45:this.popState();break;case 46:return"qString";case 47:return e.yytext=e.yytext.trim(),66}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[45,46],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,47],inclusive:!0}}};function j(){this.yy={}}return F.lexer=P,j.prototype=F,F.Parser=j,new j}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=new(n(176).default)({r:0,g:0,b:0,a:0},"transparent");e.default=r},function(t,e,n){var r=n(59),i=n(60);t.exports=function(t,e,n,a){var o=!n;n||(n={});for(var s=-1,c=e.length;++s<c;){var u=e[s],l=a?a(n[u],t[u],u,n,t):void 0;void 0===l&&(l=t[u]),o?i(n,u,l):r(n,u,l)}return n}},function(t,e,n){var r=n(232),i=n(21),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return i(t)&&o.call(t,"callee")&&!s.call(t,"callee")};t.exports=c},function(t,e,n){var r=n(234),i=n(62),a=n(82),o=a&&a.isTypedArray,s=o?i(o):r;t.exports=s},function(t,e,n){var r=n(43);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(14);t.exports=function(t,e){var n=t.append("foreignObject").attr("width","100000"),a=n.append("xhtml:div");a.attr("xmlns","http://www.w3.org/1999/xhtml");var o=e.label;switch(r(o)){case"function":a.insert(o);break;case"object":a.insert((function(){return o}));break;default:a.html(o)}i.applyStyle(a,e.labelStyle),a.style("display","inline-block"),a.style("white-space","nowrap");var s=a.node().getBoundingClientRect();return n.attr("width",s.width).attr("height",s.height),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(46),a=n(16),o=n(53);e.default=function(t,e,n,s){if(void 0===n&&(n=0),void 0===s&&(s=1),"number"!=typeof t)return o.default(t,{a:e});var c=i.default.set({r:r.default.channel.clamp.r(t),g:r.default.channel.clamp.g(e),b:r.default.channel.clamp.b(n),a:r.default.channel.clamp.a(s)});return a.default.stringify(c)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(16);e.default=function(t,e){var n=i.default.parse(t);for(var a in e)n[a]=r.default.channel.clamp[a](e[a]);return i.default.stringify(n)}},function(t,e,n){var r=n(55),i=n(206),a=n(207),o=n(208),s=n(209),c=n(210);function u(t){var e=this.__data__=new r(t);this.size=e.size}u.prototype.clear=i,u.prototype.delete=a,u.prototype.get=o,u.prototype.has=s,u.prototype.set=c,t.exports=u},function(t,e,n){var r=n(201),i=n(202),a=n(203),o=n(204),s=n(205);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},function(t,e,n){var r=n(37);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(33)(Object,"create");t.exports=r},function(t,e,n){var r=n(226);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(60),i=n(37),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var o=t[e];a.call(t,e)&&i(o,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(112);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(114)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(89),i=n(255)(r);t.exports=i},function(t,e,n){var r=n(5),i=n(93),a=n(269),o=n(136);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:a(o(t))}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},function(t,e,n){var r=n(35),i=n(144),a=n(145);t.exports=function(t,e){return a(i(t,e,r),t+"")}},function(t,e,n){var r=n(37),i=n(25),a=n(61),o=n(13);t.exports=function(t,e,n){if(!o(n))return!1;var s=typeof e;return!!("number"==s?i(n)&&a(e,n.length):"string"==s&&e in n)&&r(n[e],t)}},function(t,e,n){"use strict";var r=n(4);t.exports={longestPath:function(t){var e={};r.forEach(t.sources(),(function n(i){var a=t.node(i);if(r.has(e,i))return a.rank;e[i]=!0;var o=r.min(r.map(t.outEdges(i),(function(e){return n(e.w)-t.edge(e).minlen})));return o!==Number.POSITIVE_INFINITY&&null!=o||(o=0),a.rank=o}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},function(t,e,n){"use strict";var r=/^(%20|\s)*(javascript|data)/im,i=/[^\x20-\x7E]/gim,a=/^([^:]+):/gm,o=[".","/"];t.exports={sanitizeUrl:function(t){if(!t)return"about:blank";var e,n,s=t.replace(i,"").trim();return function(t){return o.indexOf(t[0])>-1}(s)?s:(n=s.match(a))?(e=n[0],r.test(e)?"about:blank":s):"about:blank"}}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[2,3],n=[1,7],r=[7,12,15,17,19,20,21],i=[7,11,12,15,17,19,20,21],a=[2,20],o=[1,32],s={trace:function(){},yy:{},symbols_:{error:2,start:3,GG:4,":":5,document:6,EOF:7,DIR:8,options:9,body:10,OPT:11,NL:12,line:13,statement:14,COMMIT:15,commit_arg:16,BRANCH:17,ID:18,CHECKOUT:19,MERGE:20,RESET:21,reset_arg:22,STR:23,HEAD:24,reset_parents:25,CARET:26,$accept:0,$end:1},terminals_:{2:"error",4:"GG",5:":",7:"EOF",8:"DIR",11:"OPT",12:"NL",15:"COMMIT",17:"BRANCH",18:"ID",19:"CHECKOUT",20:"MERGE",21:"RESET",23:"STR",24:"HEAD",26:"CARET"},productions_:[0,[3,4],[3,5],[6,0],[6,2],[9,2],[9,1],[10,0],[10,2],[13,2],[13,1],[14,2],[14,2],[14,2],[14,2],[14,2],[16,0],[16,1],[22,2],[22,2],[25,0],[25,2]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:return r.setDirection(a[s-3]),a[s-1];case 4:r.setOptions(a[s-1]),this.$=a[s];break;case 5:a[s-1]+=a[s],this.$=a[s-1];break;case 7:this.$=[];break;case 8:a[s-1].push(a[s]),this.$=a[s-1];break;case 9:this.$=a[s-1];break;case 11:r.commit(a[s]);break;case 12:r.branch(a[s]);break;case 13:r.checkout(a[s]);break;case 14:r.merge(a[s]);break;case 15:r.reset(a[s]);break;case 16:this.$="";break;case 17:this.$=a[s];break;case 18:this.$=a[s-1]+":"+a[s];break;case 19:this.$=a[s-1]+":"+r.count,r.count=0;break;case 20:r.count=0;break;case 21:r.count+=1}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:e,9:6,12:n},{5:[1,8]},{7:[1,9]},t(r,[2,7],{10:10,11:[1,11]}),t(i,[2,6]),{6:12,7:e,9:6,12:n},{1:[2,1]},{7:[2,4],12:[1,15],13:13,14:14,15:[1,16],17:[1,17],19:[1,18],20:[1,19],21:[1,20]},t(i,[2,5]),{7:[1,21]},t(r,[2,8]),{12:[1,22]},t(r,[2,10]),{12:[2,16],16:23,23:[1,24]},{18:[1,25]},{18:[1,26]},{18:[1,27]},{18:[1,30],22:28,24:[1,29]},{1:[2,2]},t(r,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:a,25:31,26:o},{12:a,25:33,26:o},{12:[2,18]},{12:a,25:34,26:o},{12:[2,19]},{12:[2,21]}],defaultActions:{9:[2,1],21:[2,2],23:[2,11],24:[2,17],25:[2,12],26:[2,13],27:[2,14],28:[2,15],31:[2,18],33:[2,19],34:[2,21]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},c={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 12;case 1:case 2:case 3:break;case 4:return 4;case 5:return 15;case 6:return 17;case 7:return 20;case 8:return 21;case 9:return 19;case 10:case 11:return 8;case 12:return 5;case 13:return 26;case 14:this.begin("options");break;case 15:this.popState();break;case 16:return 11;case 17:this.begin("string");break;case 18:this.popState();break;case 19:return 23;case 20:return 18;case 21:return 7}},rules:[/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:branch\b)/i,/^(?:merge\b)/i,/^(?:reset\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:end\r?\n)/i,/^(?:[^\n]+\r?\n)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[a-zA-Z][-_\.a-zA-Z0-9]*[-_a-zA-Z0-9])/i,/^(?:$)/i],conditions:{options:{rules:[15,16],inclusive:!1},string:{rules:[18,19],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,21],inclusive:!0}}};function u(){this.yy={}}return s.lexer=c,u.prototype=s,s.Parser=u,new u}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,9,10],n={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,r,i,a,o){a.length;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function i(){this.yy={}}return n.lexer=r,i.prototype=n,n.Parser=i,new i}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,4],n=[1,5],r=[1,6],i=[1,7],a=[1,9],o=[1,11,13,20,21,22,23],s=[2,5],c=[1,6,11,13,20,21,22,23],u=[20,21,22],l=[2,8],h=[1,18],f=[1,19],d=[1,24],p=[6,20,21,22,23],y={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,openDirective:15,typeDirective:16,closeDirective:17,":":18,argDirective:19,NEWLINE:20,";":21,EOF:22,open_directive:23,type_directive:24,arg_directive:25,close_directive:26,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",18:":",20:"NEWLINE",21:";",22:"EOF",23:"open_directive",24:"type_directive",25:"arg_directive",26:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[15,1],[16,1],[19,1],[17,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.setShowData(!0);break;case 7:this.$=a[s-1];break;case 9:r.addSection(a[s-1],r.cleanupValue(a[s]));break;case 10:this.$=a[s].trim(),r.setTitle(this.$);break;case 17:r.parseDirective("%%{","open_directive");break;case 18:r.parseDirective(a[s],"type_directive");break;case 19:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 20:r.parseDirective("}%%","close_directive","pie")}},table:[{3:1,4:2,5:3,6:e,15:8,20:n,21:r,22:i,23:a},{1:[3]},{3:10,4:2,5:3,6:e,15:8,20:n,21:r,22:i,23:a},{3:11,4:2,5:3,6:e,15:8,20:n,21:r,22:i,23:a},t(o,s,{7:12,8:[1,13]}),t(c,[2,14]),t(c,[2,15]),t(c,[2,16]),{16:14,24:[1,15]},{24:[2,17]},{1:[2,1]},{1:[2,2]},t(u,l,{15:8,9:16,10:17,5:20,1:[2,3],11:h,13:f,23:a}),t(o,s,{7:21}),{17:22,18:[1,23],26:d},t([18,26],[2,18]),t(o,[2,6]),{4:25,20:n,21:r,22:i},{12:[1,26]},{14:[1,27]},t(u,[2,11]),t(u,l,{15:8,9:16,10:17,5:20,1:[2,4],11:h,13:f,23:a}),t(p,[2,12]),{19:28,25:[1,29]},t(p,[2,20]),t(o,[2,7]),t(u,[2,9]),t(u,[2,10]),{17:30,26:d},{26:[2,19]},t(p,[2,13])],defaultActions:{9:[2,17],10:[2,1],11:[2,2],29:[2,19]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},g={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),23;case 1:return this.begin("type_directive"),24;case 2:return this.popState(),this.begin("arg_directive"),18;case 3:return this.popState(),this.popState(),26;case 4:return 25;case 5:case 6:break;case 7:return 20;case 8:case 9:break;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:this.begin("string");break;case 13:this.popState();break;case 14:return"txt";case 15:return 6;case 16:return 8;case 17:return"value";case 18:return 22}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,15,16,17,18],inclusive:!0}}};function v(){this.yy={}}return y.lexer=g,v.prototype=y,y.Parser=v,new v}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,23,37],i=[1,17],a=[1,20],o=[1,25],s=[1,26],c=[1,27],u=[1,28],l=[1,37],h=[23,34,35],f=[4,6,9,11,23,37],d=[30,31,32,33],p=[22,27],y={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,ALPHANUM:23,attribute:24,attributeType:25,attributeName:26,ATTRIBUTE_WORD:27,cardinality:28,relType:29,ZERO_OR_ONE:30,ZERO_OR_MORE:31,ONE_OR_MORE:32,ONLY_ONE:33,NON_IDENTIFYING:34,IDENTIFYING:35,WORD:36,open_directive:37,type_directive:38,arg_directive:39,close_directive:40,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"ALPHANUM",27:"ATTRIBUTE_WORD",30:"ZERO_OR_ONE",31:"ZERO_OR_MORE",32:"ONE_OR_MORE",33:"ONLY_ONE",34:"NON_IDENTIFYING",35:"IDENTIFYING",36:"WORD",37:"open_directive",38:"type_directive",39:"arg_directive",40:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[17,1],[21,1],[21,2],[24,2],[25,1],[26,1],[18,3],[28,1],[28,1],[28,1],[28,1],[29,1],[29,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 12:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 13:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s]);break;case 16:this.$=a[s];break;case 17:this.$=[a[s]];break;case 18:a[s].push(a[s-1]),this.$=a[s];break;case 19:this.$={attributeType:a[s-1],attributeName:a[s]};break;case 20:case 21:this.$=a[s];break;case 22:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 23:this.$=r.Cardinality.ZERO_OR_ONE;break;case 24:this.$=r.Cardinality.ZERO_OR_MORE;break;case 25:this.$=r.Cardinality.ONE_OR_MORE;break;case 26:this.$=r.Cardinality.ONLY_ONE;break;case 27:this.$=r.Identification.NON_IDENTIFYING;break;case 28:this.$=r.Identification.IDENTIFYING;break;case 29:this.$=a[s].replace(/"/g,"");break;case 30:this.$=a[s];break;case 31:r.parseDirective("%%{","open_directive");break;case 32:r.parseDirective(a[s],"type_directive");break;case 33:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 34:r.parseDirective("}%%","close_directive","er")}},table:[{3:1,4:e,7:3,12:4,37:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,37:n},{13:8,38:[1,9]},{38:[2,31]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:i,37:n},{1:[2,2]},{14:18,15:[1,19],40:a},t([15,40],[2,32]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:15,10:21,12:4,17:16,23:i,37:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,15],{18:22,28:24,20:[1,23],30:o,31:s,32:c,33:u}),t([6,9,11,15,20,23,30,31,32,33,37],[2,16]),{11:[1,29]},{16:30,39:[1,31]},{11:[2,34]},t(r,[2,5]),{17:32,23:i},{21:33,22:[1,34],24:35,25:36,27:l},{29:38,34:[1,39],35:[1,40]},t(h,[2,23]),t(h,[2,24]),t(h,[2,25]),t(h,[2,26]),t(f,[2,9]),{14:41,40:a},{40:[2,33]},{15:[1,42]},{22:[1,43]},t(r,[2,14]),{21:44,22:[2,17],24:35,25:36,27:l},{26:45,27:[1,46]},{27:[2,20]},{28:47,30:o,31:s,32:c,33:u},t(d,[2,27]),t(d,[2,28]),{11:[1,48]},{19:49,23:[1,51],36:[1,50]},t(r,[2,13]),{22:[2,18]},t(p,[2,19]),t(p,[2,21]),{23:[2,22]},t(f,[2,10]),t(r,[2,12]),t(r,[2,29]),t(r,[2,30])],defaultActions:{5:[2,31],7:[2,2],20:[2,34],31:[2,33],37:[2,20],44:[2,18],47:[2,22]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},g={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),37;case 1:return this.begin("type_directive"),38;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),40;case 4:return 39;case 5:case 6:break;case 7:return 11;case 8:break;case 9:return 9;case 10:return 36;case 11:return 4;case 12:return this.begin("block"),20;case 13:break;case 14:return 27;case 15:break;case 16:return this.popState(),22;case 17:return e.yytext[0];case 18:return 30;case 19:return 31;case 20:return 32;case 21:return 33;case 22:return 30;case 23:return 31;case 24:return 32;case 25:return 34;case 26:return 35;case 27:case 28:return 34;case 29:return 23;case 30:return e.yytext[0];case 31:return 6}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\|o\b)/i,/^(?:\}o\b)/i,/^(?:\}\|)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},block:{rules:[13,14,15,16,17],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,18,19,20,21,22,23,24,25,26,27,28,29,30,31],inclusive:!0}}};function v(){this.yy={}}return y.lexer=g,v.prototype=y,y.Parser=v,new v}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.ALL=0]="ALL",t[t.RGB=1]="RGB",t[t.HSL=2]="HSL"}(r||(r={})),e.TYPE=r},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(12);t.exports=a;function a(t){this._isDirected=!i.has(t,"directed")||t.directed,this._isMultigraph=!!i.has(t,"multigraph")&&t.multigraph,this._isCompound=!!i.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=i.constant(void 0),this._defaultEdgeLabelFn=i.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function o(t,e){t[e]?t[e]++:t[e]=1}function s(t,e){--t[e]||delete t[e]}function c(t,e,n,r){var a=""+e,o=""+n;if(!t&&a>o){var s=a;a=o,o=s}return a+""+o+""+(i.isUndefined(r)?"\0":r)}function u(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function l(t,e){return c(t,e.v,e.w,e.name)}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(t){return this._label=t,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(t){return i.isFunction(t)||(t=i.constant(t)),this._defaultNodeLabelFn=t,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return i.keys(this._nodes)},a.prototype.sources=function(){var t=this;return i.filter(this.nodes(),(function(e){return i.isEmpty(t._in[e])}))},a.prototype.sinks=function(){var t=this;return i.filter(this.nodes(),(function(e){return i.isEmpty(t._out[e])}))},a.prototype.setNodes=function(t,e){var n=arguments,r=this;return i.each(t,(function(t){n.length>1?r.setNode(t,e):r.setNode(t)})),this},a.prototype.setNode=function(t,e){return i.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]="\0",this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},a.prototype.node=function(t){return this._nodes[t]},a.prototype.hasNode=function(t){return i.has(this._nodes,t)},a.prototype.removeNode=function(t){var e=this;if(i.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],i.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),i.each(i.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],i.each(i.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},a.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(i.isUndefined(e))e="\0";else{for(var n=e+="";!i.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},a.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},a.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if("\0"!==e)return e}},a.prototype.children=function(t){if(i.isUndefined(t)&&(t="\0"),this._isCompound){var e=this._children[t];if(e)return i.keys(e)}else{if("\0"===t)return this.nodes();if(this.hasNode(t))return[]}},a.prototype.predecessors=function(t){var e=this._preds[t];if(e)return i.keys(e)},a.prototype.successors=function(t){var e=this._sucs[t];if(e)return i.keys(e)},a.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return i.union(e,this.successors(t))},a.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},a.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;i.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),i.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var r={};return this._isCompound&&i.each(e.nodes(),(function(t){e.setParent(t,function t(i){var a=n.parent(i);return void 0===a||e.hasNode(a)?(r[i]=a,a):a in r?r[a]:t(a)}(t))})),e},a.prototype.setDefaultEdgeLabel=function(t){return i.isFunction(t)||(t=i.constant(t)),this._defaultEdgeLabelFn=t,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return i.values(this._edgeObjs)},a.prototype.setPath=function(t,e){var n=this,r=arguments;return i.reduce(t,(function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i})),this},a.prototype.setEdge=function(){var t,e,n,a,s=!1,l=arguments[0];"object"===r(l)&&null!==l&&"v"in l?(t=l.v,e=l.w,n=l.name,2===arguments.length&&(a=arguments[1],s=!0)):(t=l,e=arguments[1],n=arguments[3],arguments.length>2&&(a=arguments[2],s=!0)),t=""+t,e=""+e,i.isUndefined(n)||(n=""+n);var h=c(this._isDirected,t,e,n);if(i.has(this._edgeLabels,h))return s&&(this._edgeLabels[h]=a),this;if(!i.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[h]=s?a:this._defaultEdgeLabelFn(t,e,n);var f=u(this._isDirected,t,e,n);return t=f.v,e=f.w,Object.freeze(f),this._edgeObjs[h]=f,o(this._preds[e],t),o(this._sucs[t],e),this._in[e][h]=f,this._out[t][h]=f,this._edgeCount++,this},a.prototype.edge=function(t,e,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return this._edgeLabels[r]},a.prototype.hasEdge=function(t,e,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return i.has(this._edgeLabels,r)},a.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[e],t),s(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},a.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var r=i.values(n);return e?i.filter(r,(function(t){return t.v===e})):r}},a.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var r=i.values(n);return e?i.filter(r,(function(t){return t.w===e})):r}},a.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},function(t,e,n){var r=n(33)(n(19),"Map");t.exports=r},function(t,e,n){var r=n(218),i=n(225),a=n(227),o=n(228),s=n(229);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){(function(t){var r=n(110),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i&&r.process,s=function(){try{var t=a&&a.require&&a.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=s}).call(this,n(6)(t))},function(t,e,n){var r=n(63),i=n(235),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){var r=n(117),i=n(118),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(t){return null==t?[]:(t=Object(t),r(o(t),(function(e){return a.call(t,e)})))}:i;t.exports=s},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},function(t,e,n){var r=n(123);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e,n){t.exports=n(127)},function(t,e,n){var r=n(90),i=n(30);t.exports=function(t,e){return t&&r(t,e,i)}},function(t,e,n){var r=n(254)();t.exports=r},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},function(t,e,n){var r=n(66),i=n(50);t.exports=function(t,e){for(var n=0,a=(e=r(e,t)).length;null!=t&&n<a;)t=t[i(e[n++])];return n&&n==a?t:void 0}},function(t,e,n){var r=n(5),i=n(43),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||(o.test(t)||!a.test(t)||null!=e&&t in Object(e))}},function(t,e,n){var r=n(276),i=n(138);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e,n){var r=n(85),i=n(288);t.exports=function t(e,n,a,o,s){var c=-1,u=e.length;for(a||(a=i),s||(s=[]);++c<u;){var l=e[c];n>0&&a(l)?n>1?t(l,n-1,a,o,s):r(s,l):o||(s[s.length]=l)}return s}},function(t,e,n){var r=n(43);t.exports=function(t,e,n){for(var i=-1,a=t.length;++i<a;){var o=t[i],s=e(o);if(null!=s&&(void 0===c?s==s&&!r(s):n(s,c)))var c=s,u=o}return u}},function(t,e){t.exports=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),u=Math.abs(e*n*o/c);r.x<i&&(u=-u);var l=Math.abs(e*n*s/c);r.y<a&&(l=-l);return{x:i+u,y:a+l}}},function(t,e,n){var r=n(373),i=n(51),a=n(374);t.exports=function(t,e,n){var o=e.label,s=t.append("g");"svg"===e.labelType?a(s,e):"string"!=typeof o||"html"===e.labelType?i(s,e):r(s,e);var c,u=s.node().getBBox();switch(n){case"top":c=-e.height/2;break;case"bottom":c=e.height/2-u.height;break;default:c=-u.height/2}return s.attr("transform","translate("+-u.width/2+","+c+")"),s}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(46),a=n(178),o={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:function(t){if(35===t.charCodeAt(0)){var e=t.match(o.re);if(e){var n=e[1],r=parseInt(n,16),a=n.length,s=a%4==0,c=a>4,u=c?1:17,l=c?8:4,h=s?0:-1,f=c?255:15;return i.default.set({r:(r>>l*(h+3)&f)*u,g:(r>>l*(h+2)&f)*u,b:(r>>l*(h+1)&f)*u,a:s?(r&f)*u/255:1},t)}}},stringify:function(t){return t.a<1?"#"+a.DEC2HEX[Math.round(t.r)]+a.DEC2HEX[Math.round(t.g)]+a.DEC2HEX[Math.round(t.b)]+r.default.unit.frac2hex(t.a):"#"+a.DEC2HEX[Math.round(t.r)]+a.DEC2HEX[Math.round(t.g)]+a.DEC2HEX[Math.round(t.b)]}};e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(46),a=n(16);e.default=function(t,e,n,o){void 0===o&&(o=1);var s=i.default.set({h:r.default.channel.clamp.h(t),s:r.default.channel.clamp.s(e),l:r.default.channel.clamp.l(n),a:r.default.channel.clamp.a(o)});return a.default.stringify(s)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"a")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(16);e.default=function(t){var e=i.default.parse(t),n=e.r,a=e.g,o=e.b,s=.2126*r.default.channel.toLinear(n)+.7152*r.default.channel.toLinear(a)+.0722*r.default.channel.toLinear(o);return r.default.lang.round(s)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(102);e.default=function(t){return r.default(t)>=.5}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"a",e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"a",-e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(16),i=n(53);e.default=function(t,e){var n=r.default.parse(t),a={};for(var o in e)e[o]&&(a[o]=n[o]+e[o]);return i.default(t,a)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(16),i=n(52);e.default=function(t,e,n){void 0===n&&(n=50);var a=r.default.parse(t),o=a.r,s=a.g,c=a.b,u=a.a,l=r.default.parse(e),h=l.r,f=l.g,d=l.b,p=l.a,y=n/100,g=2*y-1,v=u-p,m=((g*v==-1?g:(g+v)/(1+g*v))+1)/2,b=1-m,x=o*m+h*b,_=s*m+f*b,k=c*m+d*b,w=u*y+p*(1-y);return i.default(x,_,k,w)}},function(t,e){},function(t,e,n){var r=n(54),i=n(80),a=n(59),o=n(230),s=n(236),c=n(115),u=n(116),l=n(239),h=n(240),f=n(120),d=n(241),p=n(42),y=n(245),g=n(246),v=n(125),m=n(5),b=n(40),x=n(250),_=n(13),k=n(252),w=n(30),E={};E["[object Arguments]"]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E["[object Object]"]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E["[object Function]"]=E["[object WeakMap]"]=!1,t.exports=function t(e,n,T,C,S,A){var M,O=1&n,B=2&n,N=4&n;if(T&&(M=S?T(e,C,S,A):T(e)),void 0!==M)return M;if(!_(e))return e;var D=m(e);if(D){if(M=y(e),!O)return u(e,M)}else{var L=p(e),I="[object Function]"==L||"[object GeneratorFunction]"==L;if(b(e))return c(e,O);if("[object Object]"==L||"[object Arguments]"==L||I&&!S){if(M=B||I?{}:v(e),!O)return B?h(e,s(M,e)):l(e,o(M,e))}else{if(!E[L])return S?e:{};M=g(e,L,O)}}A||(A=new r);var R=A.get(e);if(R)return R;A.set(e,M),k(e)?e.forEach((function(r){M.add(t(r,n,T,r,e,A))})):x(e)&&e.forEach((function(r,i){M.set(i,t(r,n,T,i,e,A))}));var F=N?B?d:f:B?keysIn:w,P=D?void 0:F(e);return i(P||e,(function(r,i){P&&(r=e[i=r]),a(M,i,t(r,n,T,i,e,A))})),M}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(212))},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var r=n(33),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,n){var r=n(231),i=n(48),a=n(5),o=n(40),s=n(61),c=n(49),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=a(t),l=!n&&i(t),h=!n&&!l&&o(t),f=!n&&!l&&!h&&c(t),d=n||l||h||f,p=d?r(t.length,String):[],y=p.length;for(var g in t)!e&&!u.call(t,g)||d&&("length"==g||h&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,y))||p.push(g);return p}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){(function(t){var r=n(19),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(6)(t))},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(85),i=n(64),a=n(84),o=n(118),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,a(t)),t=i(t);return e}:o;t.exports=s},function(t,e,n){var r=n(121),i=n(84),a=n(30);t.exports=function(t){return r(t,a,i)}},function(t,e,n){var r=n(85),i=n(5);t.exports=function(t,e,n){var a=e(t);return i(t)?a:r(a,n(t))}},function(t,e,n){var r=n(33)(n(19),"Set");t.exports=r},function(t,e,n){var r=n(19).Uint8Array;t.exports=r},function(t,e,n){var r=n(86);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){var r=n(126),i=n(64),a=n(63);t.exports=function(t){return"function"!=typeof t.constructor||a(t)?{}:r(i(t))}},function(t,e,n){var r=n(13),i=Object.create,a=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=a},function(t,e,n){var r=n(80),i=n(65),a=n(128),o=n(5);t.exports=function(t,e){return(o(t)?r:i)(t,a(e))}},function(t,e,n){var r=n(35);t.exports=function(t){return"function"==typeof t?t:r}},function(t,e,n){var r=n(117),i=n(256),a=n(26),o=n(5);t.exports=function(t,e){return(o(t)?r:i)(t,a(e,3))}},function(t,e,n){var r=n(259),i=n(21);t.exports=function t(e,n,a,o,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,a,o,t,s))}},function(t,e,n){var r=n(132),i=n(262),a=n(133);t.exports=function(t,e,n,o,s,c){var u=1&n,l=t.length,h=e.length;if(l!=h&&!(u&&h>l))return!1;var f=c.get(t);if(f&&c.get(e))return f==e;var d=-1,p=!0,y=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++d<l;){var g=t[d],v=e[d];if(o)var m=u?o(v,g,d,e,t,c):o(g,v,d,t,e,c);if(void 0!==m){if(m)continue;p=!1;break}if(y){if(!i(e,(function(t,e){if(!a(y,e)&&(g===t||s(g,t,n,o,c)))return y.push(e)}))){p=!1;break}}else if(g!==v&&!s(g,v,n,o,c)){p=!1;break}}return c.delete(t),c.delete(e),p}},function(t,e,n){var r=n(79),i=n(260),a=n(261);function o(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}o.prototype.add=o.prototype.push=i,o.prototype.has=a,t.exports=o},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(13);t.exports=function(t){return t==t&&!r(t)}},function(t,e){t.exports=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}},function(t,e,n){var r=n(272);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(273),i=n(138);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e,n){var r=n(66),i=n(48),a=n(5),o=n(61),s=n(81),c=n(50);t.exports=function(t,e,n){for(var u=-1,l=(e=r(e,t)).length,h=!1;++u<l;){var f=c(e[u]);if(!(h=null!=t&&n(t,f)))break;t=t[f]}return h||++u!=l?h:!!(l=null==t?0:t.length)&&s(l)&&o(f,l)&&(a(t)||i(t))}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e){t.exports=function(t){return void 0===t}},function(t,e,n){var r=n(67),i=n(26),a=n(142),o=n(5);t.exports=function(t,e){return(o(t)?r:a)(t,i(e,3))}},function(t,e,n){var r=n(65),i=n(25);t.exports=function(t,e){var n=-1,a=i(t)?Array(t.length):[];return r(t,(function(t,r,i){a[++n]=e(t,r,i)})),a}},function(t,e,n){var r=n(278),i=n(65),a=n(26),o=n(279),s=n(5);t.exports=function(t,e,n){var c=s(t)?r:o,u=arguments.length<3;return c(t,a(e,4),n,u,i)}},function(t,e,n){var r=n(289),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var a=arguments,o=-1,s=i(a.length-e,0),c=Array(s);++o<s;)c[o]=a[e+o];o=-1;for(var u=Array(e+1);++o<e;)u[o]=a[o];return u[e]=n(c),r(t,this,u)}}},function(t,e,n){var r=n(290),i=n(291)(r);t.exports=i},function(t,e){t.exports=function(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}},function(t,e,n){var r=n(25),i=n(21);t.exports=function(t){return i(t)&&r(t)}},function(t,e,n){var r=n(300),i=n(30);t.exports=function(t){return null==t?[]:r(t,i(t))}},function(t,e,n){var r=n(12),i=n(150);t.exports=function(t,e,n,r){return function(t,e,n,r){var a,o,s={},c=new i,u=function(t){var e=t.v!==a?t.v:t.w,r=s[e],i=n(t),u=o.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);u<r.distance&&(r.distance=u,r.predecessor=a,c.decrease(e,u))};t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;s[t]={distance:n},c.add(t,n)}));for(;c.size()>0&&(a=c.removeMin(),(o=s[a]).distance!==Number.POSITIVE_INFINITY);)r(a).forEach(u);return s}(t,String(e),n||a,r||function(e){return t.outEdges(e)})};var a=r.constant(1)},function(t,e,n){var r=n(12);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,a=i.length;return n[t]=a,i.push({key:t,priority:e}),this._decrease(a),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},i.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e},i.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,i=n[t],a=n[e];n[t]=a,n[e]=i,r[a.key]=t,r[i.key]=e}},function(t,e,n){var r=n(12);t.exports=function(t){var e=0,n=[],i={},a=[];return t.nodes().forEach((function(o){r.has(i,o)||function o(s){var c=i[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach((function(t){r.has(i,t)?i[t].onStack&&(c.lowlink=Math.min(c.lowlink,i[t].index)):(o(t),c.lowlink=Math.min(c.lowlink,i[t].lowlink))})),c.lowlink===c.index){var u,l=[];do{u=n.pop(),i[u].onStack=!1,l.push(u)}while(s!==u);a.push(l)}}(o)})),a}},function(t,e,n){var r=n(12);function i(t){var e={},n={},i=[];if(r.each(t.sinks(),(function o(s){if(r.has(n,s))throw new a;r.has(e,s)||(n[s]=!0,e[s]=!0,r.each(t.predecessors(s),o),delete n[s],i.push(s))})),r.size(e)!==t.nodeCount())throw new a;return i}function a(){}t.exports=i,i.CycleException=a,a.prototype=new Error},function(t,e,n){var r=n(12);t.exports=function(t,e,n){r.isArray(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],o={};return r.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);!function t(e,n,i,a,o,s){r.has(a,n)||(a[n]=!0,i||s.push(n),r.each(o(n),(function(n){t(e,n,i,a,o,s)})),i&&s.push(n))}(t,e,"post"===n,o,i,a)})),a}},function(t,e,n){var r;try{r=n(9)}catch(t){}r||(r=window.dagre),t.exports=r},function(t,e,n){var r=n(68),i=n(37),a=n(69),o=n(41),s=Object.prototype,c=s.hasOwnProperty,u=r((function(t,e){t=Object(t);var n=-1,r=e.length,u=r>2?e[2]:void 0;for(u&&a(e[0],e[1],u)&&(r=1);++n<r;)for(var l=e[n],h=o(l),f=-1,d=h.length;++f<d;){var p=h[f],y=t[p];(void 0===y||i(y,s[p])&&!c.call(t,p))&&(t[p]=l[p])}return t}));t.exports=u},function(t,e,n){var r=n(319);t.exports=function(t){return t?(t=r(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},function(t,e,n){var r=n(95);t.exports=function(t){return(null==t?0:t.length)?r(t,1):[]}},function(t,e,n){var r=n(60),i=n(37);t.exports=function(t,e,n){(void 0===n||i(t[e],n))&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(34),i=n(64),a=n(21),o=Function.prototype,s=Object.prototype,c=o.toString,u=s.hasOwnProperty,l=c.call(Object);t.exports=function(t){if(!a(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=u.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},function(t,e){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},function(t,e){t.exports=function(t,e){return t<e}},function(t,e,n){var r=n(333),i=n(336)((function(t,e){return null==t?{}:r(t,e)}));t.exports=i},function(t,e,n){var r=n(337)();t.exports=r},function(t,e,n){var r=n(136),i=0;t.exports=function(t){var e=++i;return r(t)+e}},function(t,e,n){"use strict";var r=n(4),i=n(20).Graph,a=n(70).slack;function o(t,e){return r.forEach(t.nodes(),(function n(i){r.forEach(e.nodeEdges(i),(function(r){var o=r.v,s=i===o?r.w:o;t.hasNode(s)||a(e,r)||(t.setNode(s,{}),t.setEdge(i,s,{}),n(s))}))})),t.nodeCount()}function s(t,e){return r.minBy(e.edges(),(function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return a(e,n)}))}function c(t,e,n){r.forEach(t.nodes(),(function(t){e.node(t).rank+=n}))}t.exports=function(t){var e,n,r=new i({directed:!1}),u=t.nodes()[0],l=t.nodeCount();r.setNode(u,{});for(;o(r,t)<l;)e=s(r,t),n=r.hasNode(e.v)?a(t,e):-a(t,e),c(r,t,n);return r}},function(t,e){t.exports=function(t,e){return t.intersect(e)}},function(t,e,n){var r=n(97);t.exports=function(t,e,n){return r(t,e,e,n)}},function(t,e,n){var r=n(370);t.exports=function(t,e,n){var i=t.x,a=t.y,o=[],s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;e.forEach((function(t){s=Math.min(s,t.x),c=Math.min(c,t.y)}));for(var u=i-t.width/2-s,l=a-t.height/2-c,h=0;h<e.length;h++){var f=e[h],d=e[h<e.length-1?h+1:0],p=r(t,n,{x:u+f.x,y:l+f.y},{x:u+d.x,y:l+d.y});p&&o.push(p)}if(!o.length)return console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t;o.length>1&&o.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}));return o[0]}},function(t,e){t.exports=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=0===s?0:u*o/s,r=u):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o);return{x:i+n,y:a+r}}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(n){"object"===r(e)&&void 0!==t?t.exports=n(null):"function"==typeof define&&define.amd?define(n(null)):window.stylis=n(null)}((function t(e){"use strict";var n=/^\0+/g,i=/[\0\r\f]/g,a=/: */g,o=/zoo|gra/,s=/([,: ])(transform)/g,c=/,+\s*(?![^(]*[)])/g,u=/ +\s*(?![^(]*[)])/g,l=/ *[\0] */g,h=/,\r+?/g,f=/([\t\r\n ])*\f?&/g,d=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,p=/\W+/g,y=/@(k\w+)\s*(\S*)\s*/,g=/::(place)/g,v=/:(read-only)/g,m=/\s+(?=[{\];=:>])/g,b=/([[}=:>])\s+/g,x=/(\{[^{]+?);(?=\})/g,_=/\s{2,}/g,k=/([^\(])(:+) */g,w=/[svh]\w+-[tblr]{2}/,E=/\(\s*(.*)\s*\)/g,T=/([\s\S]*?);/g,C=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,A=/stretch|:\s*\w+\-(?:conte|avail)/,M=/([^-])(image-set\()/,O="-webkit-",B="-moz-",N="-ms-",D=1,L=1,I=0,R=1,F=1,P=1,j=0,Y=0,z=0,U=[],$=[],q=0,W=null,V=0,H=1,G="",X="",Z="";function Q(t,e,r,a,o){for(var s,c,u=0,h=0,f=0,d=0,p=0,m=0,b=0,x=0,_=0,w=0,T=0,C=0,S=0,A=0,M=0,B=0,N=0,j=0,$=0,W=r.length,J=W-1,at="",ot="",st="",ct="",ut="",lt="";M<W;){if(b=r.charCodeAt(M),M===J&&h+d+f+u!==0&&(0!==h&&(b=47===h?10:47),d=f=u=0,W++,J++),h+d+f+u===0){if(M===J&&(B>0&&(ot=ot.replace(i,"")),ot.trim().length>0)){switch(b){case 32:case 9:case 59:case 13:case 10:break;default:ot+=r.charAt(M)}b=59}if(1===N)switch(b){case 123:case 125:case 59:case 34:case 39:case 40:case 41:case 44:N=0;case 9:case 13:case 10:case 32:break;default:for(N=0,$=M,p=b,M--,b=59;$<W;)switch(r.charCodeAt($++)){case 10:case 13:case 59:++M,b=p,$=W;break;case 58:B>0&&(++M,b=p);case 123:$=W}}switch(b){case 123:for(p=(ot=ot.trim()).charCodeAt(0),T=1,$=++M;M<W;){switch(b=r.charCodeAt(M)){case 123:T++;break;case 125:T--;break;case 47:switch(m=r.charCodeAt(M+1)){case 42:case 47:M=it(m,M,J,r)}break;case 91:b++;case 40:b++;case 34:case 39:for(;M++<J&&r.charCodeAt(M)!==b;);}if(0===T)break;M++}switch(st=r.substring($,M),0===p&&(p=(ot=ot.replace(n,"").trim()).charCodeAt(0)),p){case 64:switch(B>0&&(ot=ot.replace(i,"")),m=ot.charCodeAt(1)){case 100:case 109:case 115:case 45:s=e;break;default:s=U}if($=(st=Q(e,s,st,m,o+1)).length,z>0&&0===$&&($=ot.length),q>0&&(c=rt(3,st,s=K(U,ot,j),e,L,D,$,m,o,a),ot=s.join(""),void 0!==c&&0===($=(st=c.trim()).length)&&(m=0,st="")),$>0)switch(m){case 115:ot=ot.replace(E,nt);case 100:case 109:case 45:st=ot+"{"+st+"}";break;case 107:st=(ot=ot.replace(y,"$1 $2"+(H>0?G:"")))+"{"+st+"}",st=1===F||2===F&&et("@"+st,3)?"@"+O+st+"@"+st:"@"+st;break;default:st=ot+st,112===a&&(ct+=st,st="")}else st="";break;default:st=Q(e,K(e,ot,j),st,a,o+1)}ut+=st,C=0,N=0,A=0,B=0,j=0,S=0,ot="",st="",b=r.charCodeAt(++M);break;case 125:case 59:if(($=(ot=(B>0?ot.replace(i,""):ot).trim()).length)>1)switch(0===A&&(45===(p=ot.charCodeAt(0))||p>96&&p<123)&&($=(ot=ot.replace(" ",":")).length),q>0&&void 0!==(c=rt(1,ot,e,t,L,D,ct.length,a,o,a))&&0===($=(ot=c.trim()).length)&&(ot="\0\0"),p=ot.charCodeAt(0),m=ot.charCodeAt(1),p){case 0:break;case 64:if(105===m||99===m){lt+=ot+r.charAt(M);break}default:if(58===ot.charCodeAt($-1))break;ct+=tt(ot,p,m,ot.charCodeAt(2))}C=0,N=0,A=0,B=0,j=0,ot="",b=r.charCodeAt(++M)}}switch(b){case 13:case 10:if(h+d+f+u+Y===0)switch(w){case 41:case 39:case 34:case 64:case 126:case 62:case 42:case 43:case 47:case 45:case 58:case 44:case 59:case 123:case 125:break;default:A>0&&(N=1)}47===h?h=0:R+C===0&&107!==a&&ot.length>0&&(B=1,ot+="\0"),q*V>0&&rt(0,ot,e,t,L,D,ct.length,a,o,a),D=1,L++;break;case 59:case 125:if(h+d+f+u===0){D++;break}default:switch(D++,at=r.charAt(M),b){case 9:case 32:if(d+u+h===0)switch(x){case 44:case 58:case 9:case 32:at="";break;default:32!==b&&(at=" ")}break;case 0:at="\\0";break;case 12:at="\\f";break;case 11:at="\\v";break;case 38:d+h+u===0&&R>0&&(j=1,B=1,at="\f"+at);break;case 108:if(d+h+u+I===0&&A>0)switch(M-A){case 2:112===x&&58===r.charCodeAt(M-3)&&(I=x);case 8:111===_&&(I=_)}break;case 58:d+h+u===0&&(A=M);break;case 44:h+f+d+u===0&&(B=1,at+="\r");break;case 34:case 39:0===h&&(d=d===b?0:0===d?b:d);break;case 91:d+h+f===0&&u++;break;case 93:d+h+f===0&&u--;break;case 41:d+h+u===0&&f--;break;case 40:if(d+h+u===0){if(0===C)switch(2*x+3*_){case 533:break;default:T=0,C=1}f++}break;case 64:h+f+d+u+A+S===0&&(S=1);break;case 42:case 47:if(d+u+f>0)break;switch(h){case 0:switch(2*b+3*r.charCodeAt(M+1)){case 235:h=47;break;case 220:$=M,h=42}break;case 42:47===b&&42===x&&$+2!==M&&(33===r.charCodeAt($+2)&&(ct+=r.substring($,M+1)),at="",h=0)}}if(0===h){if(R+d+u+S===0&&107!==a&&59!==b)switch(b){case 44:case 126:case 62:case 43:case 41:case 40:if(0===C){switch(x){case 9:case 32:case 10:case 13:at+="\0";break;default:at="\0"+at+(44===b?"":"\0")}B=1}else switch(b){case 40:A+7===M&&108===x&&(A=0),C=++T;break;case 41:0==(C=--T)&&(B=1,at+="\0")}break;case 9:case 32:switch(x){case 0:case 123:case 125:case 59:case 44:case 12:case 9:case 32:case 10:case 13:break;default:0===C&&(B=1,at+="\0")}}ot+=at,32!==b&&9!==b&&(w=b)}}_=x,x=b,M++}if($=ct.length,z>0&&0===$&&0===ut.length&&0===e[0].length==!1&&(109!==a||1===e.length&&(R>0?X:Z)===e[0])&&($=e.join(",").length+2),$>0){if(s=0===R&&107!==a?function(t){for(var e,n,r=0,a=t.length,o=Array(a);r<a;++r){for(var s=t[r].split(l),c="",u=0,h=0,f=0,d=0,p=s.length;u<p;++u)if(!(0===(h=(n=s[u]).length)&&p>1)){if(f=c.charCodeAt(c.length-1),d=n.charCodeAt(0),e="",0!==u)switch(f){case 42:case 126:case 62:case 43:case 32:case 40:break;default:e=" "}switch(d){case 38:n=e+X;case 126:case 62:case 43:case 32:case 41:case 40:break;case 91:n=e+n+X;break;case 58:switch(2*n.charCodeAt(1)+3*n.charCodeAt(2)){case 530:if(P>0){n=e+n.substring(8,h-1);break}default:(u<1||s[u-1].length<1)&&(n=e+X+n)}break;case 44:e="";default:n=h>1&&n.indexOf(":")>0?e+n.replace(k,"$1"+X+"$2"):e+n+X}c+=n}o[r]=c.replace(i,"").trim()}return o}(e):e,q>0&&void 0!==(c=rt(2,ct,s,t,L,D,$,a,o,a))&&0===(ct=c).length)return lt+ct+ut;if(ct=s.join(",")+"{"+ct+"}",F*I!=0){switch(2!==F||et(ct,2)||(I=0),I){case 111:ct=ct.replace(v,":-moz-$1")+ct;break;case 112:ct=ct.replace(g,"::-webkit-input-$1")+ct.replace(g,"::-moz-$1")+ct.replace(g,":-ms-input-$1")+ct}I=0}}return lt+ct+ut}function K(t,e,n){var r=e.trim().split(h),i=r,a=r.length,o=t.length;switch(o){case 0:case 1:for(var s=0,c=0===o?"":t[0]+" ";s<a;++s)i[s]=J(c,i[s],n,o).trim();break;default:s=0;var u=0;for(i=[];s<a;++s)for(var l=0;l<o;++l)i[u++]=J(t[l]+" ",r[s],n,o).trim()}return i}function J(t,e,n,r){var i=e,a=i.charCodeAt(0);switch(a<33&&(a=(i=i.trim()).charCodeAt(0)),a){case 38:switch(R+r){case 0:case 1:if(0===t.trim().length)break;default:return i.replace(f,"$1"+t.trim())}break;case 58:switch(i.charCodeAt(1)){case 103:if(P>0&&R>0)return i.replace(d,"$1").replace(f,"$1"+Z);break;default:return t.trim()+i.replace(f,"$1"+t.trim())}default:if(n*R>0&&i.indexOf("\f")>0)return i.replace(f,(58===t.charCodeAt(0)?"":"$1")+t.trim())}return t+i}function tt(t,e,n,r){var i,l=0,h=t+";",f=2*e+3*n+4*r;if(944===f)return function(t){var e=t.length,n=t.indexOf(":",9)+1,r=t.substring(0,n).trim(),i=t.substring(n,e-1).trim();switch(t.charCodeAt(9)*H){case 0:break;case 45:if(110!==t.charCodeAt(10))break;default:var a=i.split((i="",c)),o=0;for(n=0,e=a.length;o<e;n=0,++o){for(var s=a[o],l=s.split(u);s=l[n];){var h=s.charCodeAt(0);if(1===H&&(h>64&&h<90||h>96&&h<123||95===h||45===h&&45!==s.charCodeAt(1)))switch(isNaN(parseFloat(s))+(-1!==s.indexOf("("))){case 1:switch(s){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:s+=G}}l[n++]=s}i+=(0===o?"":",")+l.join(" ")}}return i=r+i+";",1===F||2===F&&et(i,1)?O+i+i:i}(h);if(0===F||2===F&&!et(h,1))return h;switch(f){case 1015:return 97===h.charCodeAt(10)?O+h+h:h;case 951:return 116===h.charCodeAt(3)?O+h+h:h;case 963:return 110===h.charCodeAt(5)?O+h+h:h;case 1009:if(100!==h.charCodeAt(4))break;case 969:case 942:return O+h+h;case 978:return O+h+B+h+h;case 1019:case 983:return O+h+B+h+N+h+h;case 883:return 45===h.charCodeAt(8)?O+h+h:h.indexOf("image-set(",11)>0?h.replace(M,"$1-webkit-$2")+h:h;case 932:if(45===h.charCodeAt(4))switch(h.charCodeAt(5)){case 103:return O+"box-"+h.replace("-grow","")+O+h+N+h.replace("grow","positive")+h;case 115:return O+h+N+h.replace("shrink","negative")+h;case 98:return O+h+N+h.replace("basis","preferred-size")+h}return O+h+N+h+h;case 964:return O+h+N+"flex-"+h+h;case 1023:if(99!==h.charCodeAt(8))break;return i=h.substring(h.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),O+"box-pack"+i+O+h+N+"flex-pack"+i+h;case 1005:return o.test(h)?h.replace(a,":"+O)+h.replace(a,":"+B)+h:h;case 1e3:switch(l=(i=h.substring(13).trim()).indexOf("-")+1,i.charCodeAt(0)+i.charCodeAt(l)){case 226:i=h.replace(w,"tb");break;case 232:i=h.replace(w,"tb-rl");break;case 220:i=h.replace(w,"lr");break;default:return h}return O+h+N+i+h;case 1017:if(-1===h.indexOf("sticky",9))return h;case 975:switch(l=(h=t).length-10,f=(i=(33===h.charCodeAt(l)?h.substring(0,l):h).substring(t.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|i.charCodeAt(7))){case 203:if(i.charCodeAt(8)<111)break;case 115:h=h.replace(i,O+i)+";"+h;break;case 207:case 102:h=h.replace(i,O+(f>102?"inline-":"")+"box")+";"+h.replace(i,O+i)+";"+h.replace(i,N+i+"box")+";"+h}return h+";";case 938:if(45===h.charCodeAt(5))switch(h.charCodeAt(6)){case 105:return i=h.replace("-items",""),O+h+O+"box-"+i+N+"flex-"+i+h;case 115:return O+h+N+"flex-item-"+h.replace(C,"")+h;default:return O+h+N+"flex-line-pack"+h.replace("align-content","").replace(C,"")+h}break;case 973:case 989:if(45!==h.charCodeAt(3)||122===h.charCodeAt(4))break;case 931:case 953:if(!0===A.test(t))return 115===(i=t.substring(t.indexOf(":")+1)).charCodeAt(0)?tt(t.replace("stretch","fill-available"),e,n,r).replace(":fill-available",":stretch"):h.replace(i,O+i)+h.replace(i,B+i.replace("fill-",""))+h;break;case 962:if(h=O+h+(102===h.charCodeAt(5)?N+h:"")+h,n+r===211&&105===h.charCodeAt(13)&&h.indexOf("transform",10)>0)return h.substring(0,h.indexOf(";",27)+1).replace(s,"$1-webkit-$2")+h}return h}function et(t,e){var n=t.indexOf(1===e?":":"{"),r=t.substring(0,3!==e?n:10),i=t.substring(n+1,t.length-1);return W(2!==e?r:r.replace(S,"$1"),i,e)}function nt(t,e){var n=tt(e,e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2));return n!==e+";"?n.replace(T," or ($1)").substring(4):"("+e+")"}function rt(t,e,n,r,i,a,o,s,c,u){for(var l,h=0,f=e;h<q;++h)switch(l=$[h].call(ot,t,f,n,r,i,a,o,s,c,u)){case void 0:case!1:case!0:case null:break;default:f=l}if(f!==e)return f}function it(t,e,n,r){for(var i=e+1;i<n;++i)switch(r.charCodeAt(i)){case 47:if(42===t&&42===r.charCodeAt(i-1)&&e+2!==i)return i+1;break;case 10:if(47===t)return i+1}return i}function at(t){for(var e in t){var n=t[e];switch(e){case"keyframe":H=0|n;break;case"global":P=0|n;break;case"cascade":R=0|n;break;case"compress":j=0|n;break;case"semicolon":Y=0|n;break;case"preserve":z=0|n;break;case"prefix":W=null,n?"function"!=typeof n?F=1:(F=2,W=n):F=0}}return at}function ot(e,n){if(void 0!==this&&this.constructor===ot)return t(e);var r=e,a=r.charCodeAt(0);a<33&&(a=(r=r.trim()).charCodeAt(0)),H>0&&(G=r.replace(p,91===a?"":"-")),a=1,1===R?Z=r:X=r;var o,s=[Z];q>0&&void 0!==(o=rt(-1,n,s,s,L,D,0,0,0,0))&&"string"==typeof o&&(n=o);var c=Q(U,s,n,0,0);return q>0&&void 0!==(o=rt(-2,c,s,s,L,D,c.length,0,0,0))&&"string"!=typeof(c=o)&&(a=0),G="",Z="",X="",I=0,L=1,D=1,j*a==0?c:function(t){return t.replace(i,"").replace(m,"").replace(b,"$1").replace(x,"$1").replace(_," ")}(c)}return ot.use=function t(e){switch(e){case void 0:case null:q=$.length=0;break;default:if("function"==typeof e)$[q++]=e;else if("object"===r(e))for(var n=0,i=e.length;n<i;++n)t(e[n]);else V=0|!!e}return t},ot.set=at,void 0!==e&&at(e),ot}))},function(t,e){t.exports=function(t,e){return t.intersect(e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(52);e.hex=r.default;var i=n(52);e.rgb=i.default;var a=n(52);e.rgba=a.default;var o=n(100);e.hsl=o.default;var s=n(100);e.hsla=s.default;var c=n(29);e.channel=c.default;var u=n(182);e.red=u.default;var l=n(183);e.green=l.default;var h=n(184);e.blue=h.default;var f=n(185);e.hue=f.default;var d=n(186);e.saturation=d.default;var p=n(187);e.lightness=p.default;var y=n(101);e.alpha=y.default;var g=n(101);e.opacity=g.default;var v=n(102);e.luminance=v.default;var m=n(188);e.isDark=m.default;var b=n(103);e.isLight=b.default;var x=n(189);e.isValid=x.default;var _=n(190);e.saturate=_.default;var k=n(191);e.desaturate=k.default;var w=n(192);e.lighten=w.default;var E=n(193);e.darken=E.default;var T=n(104);e.opacify=T.default;var C=n(104);e.fadeIn=C.default;var S=n(105);e.transparentize=S.default;var A=n(105);e.fadeOut=A.default;var M=n(194);e.complement=M.default;var O=n(195);e.grayscale=O.default;var B=n(106);e.adjust=B.default;var N=n(53);e.change=N.default;var D=n(196);e.invert=D.default;var L=n(107);e.mix=L.default;var I=n(197);e.scale=I.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:function(t){return t>=255?255:t<0?0:t},g:function(t){return t>=255?255:t<0?0:t},b:function(t){return t>=255?255:t<0?0:t},h:function(t){return t%360},s:function(t){return t>=100?100:t<0?0:t},l:function(t){return t>=100?100:t<0?0:t},a:function(t){return t>=1?1:t<0?0:t}},toLinear:function(t){var e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:function(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t},hsl2rgb:function(t,e){var n=t.h,i=t.s,a=t.l;if(100===i)return 2.55*a;n/=360,i/=100;var o=(a/=100)<.5?a*(1+i):a+i-a*i,s=2*a-o;switch(e){case"r":return 255*r.hue2rgb(s,o,n+1/3);case"g":return 255*r.hue2rgb(s,o,n);case"b":return 255*r.hue2rgb(s,o,n-1/3)}},rgb2hsl:function(t,e){var n=t.r,r=t.g,i=t.b;n/=255,r/=255,i/=255;var a=Math.max(n,r,i),o=Math.min(n,r,i),s=(a+o)/2;if("l"===e)return 100*s;if(a===o)return 0;var c=a-o;if("s"===e)return 100*(s>.5?c/(2-a-o):c/(a+o));switch(a){case n:return 60*((r-i)/c+(r<i?6:0));case r:return 60*((i-n)/c+2);case i:return 60*((n-r)/c+4);default:return-1}}};e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={round:function(t){return Math.round(1e10*t)/1e10}};e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={frac2hex:function(t){var e=Math.round(255*t).toString(16);return e.length>1?e:"0"+e},dec2hex:function(t){var e=Math.round(t).toString(16);return e.length>1?e:"0"+e}};e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(76),a=n(177),o=function(){function t(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a.default}return t.prototype.set=function(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=i.TYPE.ALL,this},t.prototype._ensureHSL=function(){void 0===this.data.h&&(this.data.h=r.default.channel.rgb2hsl(this.data,"h")),void 0===this.data.s&&(this.data.s=r.default.channel.rgb2hsl(this.data,"s")),void 0===this.data.l&&(this.data.l=r.default.channel.rgb2hsl(this.data,"l"))},t.prototype._ensureRGB=function(){void 0===this.data.r&&(this.data.r=r.default.channel.hsl2rgb(this.data,"r")),void 0===this.data.g&&(this.data.g=r.default.channel.hsl2rgb(this.data,"g")),void 0===this.data.b&&(this.data.b=r.default.channel.hsl2rgb(this.data,"b"))},Object.defineProperty(t.prototype,"r",{get:function(){return this.type.is(i.TYPE.HSL)||void 0===this.data.r?(this._ensureHSL(),r.default.channel.hsl2rgb(this.data,"r")):this.data.r},set:function(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.r=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"g",{get:function(){return this.type.is(i.TYPE.HSL)||void 0===this.data.g?(this._ensureHSL(),r.default.channel.hsl2rgb(this.data,"g")):this.data.g},set:function(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.g=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){return this.type.is(i.TYPE.HSL)||void 0===this.data.b?(this._ensureHSL(),r.default.channel.hsl2rgb(this.data,"b")):this.data.b},set:function(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.b=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"h",{get:function(){return this.type.is(i.TYPE.RGB)||void 0===this.data.h?(this._ensureRGB(),r.default.channel.rgb2hsl(this.data,"h")):this.data.h},set:function(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.h=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"s",{get:function(){return this.type.is(i.TYPE.RGB)||void 0===this.data.s?(this._ensureRGB(),r.default.channel.rgb2hsl(this.data,"s")):this.data.s},set:function(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.s=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"l",{get:function(){return this.type.is(i.TYPE.RGB)||void 0===this.data.l?(this._ensureRGB(),r.default.channel.rgb2hsl(this.data,"l")):this.data.l},set:function(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.l=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"a",{get:function(){return this.data.a},set:function(t){this.changed=!0,this.data.a=t},enumerable:!0,configurable:!0}),t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(76),i=function(){function t(){this.type=r.TYPE.ALL}return t.prototype.get=function(){return this.type},t.prototype.set=function(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t},t.prototype.reset=function(){this.type=r.TYPE.ALL},t.prototype.is=function(t){return this.type===t},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i={};e.DEC2HEX=i;for(var a=0;a<=255;a++)i[a]=r.default.unit.dec2hex(a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(99),i={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:function(t){t=t.toLowerCase();var e=i.colors[t];if(e)return r.default.parse(e)},stringify:function(t){var e=r.default.stringify(t);for(var n in i.colors)if(i.colors[n]===e)return n}};e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(46),a={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:function(t){var e=t.charCodeAt(0);if(114===e||82===e){var n=t.match(a.re);if(n){var o=n[1],s=n[2],c=n[3],u=n[4],l=n[5],h=n[6],f=n[7],d=n[8];return i.default.set({r:r.default.channel.clamp.r(s?2.55*parseFloat(o):parseFloat(o)),g:r.default.channel.clamp.g(u?2.55*parseFloat(c):parseFloat(c)),b:r.default.channel.clamp.b(h?2.55*parseFloat(l):parseFloat(l)),a:f?r.default.channel.clamp.a(d?parseFloat(f)/100:parseFloat(f)):1},t)}}},stringify:function(t){return t.a<1?"rgba("+r.default.lang.round(t.r)+", "+r.default.lang.round(t.g)+", "+r.default.lang.round(t.b)+", "+r.default.lang.round(t.a)+")":"rgb("+r.default.lang.round(t.r)+", "+r.default.lang.round(t.g)+", "+r.default.lang.round(t.b)+")"}};e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(46),a={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:function(t){var e=t.match(a.hueRe);if(e){var n=e[1];switch(e[2]){case"grad":return r.default.channel.clamp.h(.9*parseFloat(n));case"rad":return r.default.channel.clamp.h(180*parseFloat(n)/Math.PI);case"turn":return r.default.channel.clamp.h(360*parseFloat(n))}}return r.default.channel.clamp.h(parseFloat(t))},parse:function(t){var e=t.charCodeAt(0);if(104===e||72===e){var n=t.match(a.re);if(n){var o=n[1],s=n[2],c=n[3],u=n[4],l=n[5];return i.default.set({h:a._hue2deg(o),s:r.default.channel.clamp.s(parseFloat(s)),l:r.default.channel.clamp.l(parseFloat(c)),a:u?r.default.channel.clamp.a(l?parseFloat(u)/100:parseFloat(u)):1},t)}}},stringify:function(t){return t.a<1?"hsla("+r.default.lang.round(t.h)+", "+r.default.lang.round(t.s)+"%, "+r.default.lang.round(t.l)+"%, "+t.a+")":"hsl("+r.default.lang.round(t.h)+", "+r.default.lang.round(t.s)+"%, "+r.default.lang.round(t.l)+"%)"}};e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"r")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"g")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"b")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"h")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"s")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"l")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(103);e.default=function(t){return!r.default(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(16);e.default=function(t){try{return r.default.parse(t),!0}catch(t){return!1}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"s",e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"s",-e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"l",e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"l",-e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t){return r.default(t,"h",180)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(53);e.default=function(t){return r.default(t,{s:0})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(16),i=n(107);e.default=function(t,e){void 0===e&&(e=100);var n=r.default.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,i.default(n,t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(16),a=n(106);e.default=function(t,e){var n,o,s,c=i.default.parse(t),u={};for(var l in e)u[l]=(n=c[l],o=e[l],s=r.default.channel.max[l],o>0?(s-n)*o/100:n*o/100);return a.default(t,u)}},function(t,e,n){var r={"./locale":108,"./locale.js":108};function i(t){var e=a(t);return n(e)}function a(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=a,t.exports=i,i.id=198},function(t,e,n){t.exports={Graph:n(77),version:n(301)}},function(t,e,n){var r=n(109);t.exports=function(t){return r(t,4)}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(56),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():i.call(e,n,1),--this.size,!0)}},function(t,e,n){var r=n(56);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(56);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(56);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(55);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(55),i=n(78),a=n(79);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new a(o)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(38),i=n(215),a=n(13),o=n(111),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,h=u.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||i(t))&&(r(t)?f:s).test(o(t))}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(39),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=a.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=o.call(t);return r&&(e?t[s]=n:delete t[s]),i}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r,i=n(216),a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!a&&a in t}},function(t,e,n){var r=n(19)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(219),i=n(55),a=n(78);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},function(t,e,n){var r=n(220),i=n(221),a=n(222),o=n(223),s=n(224);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},function(t,e,n){var r=n(57);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(57),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(57),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},function(t,e,n){var r=n(57);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,n){var r=n(58);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(58);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(58);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(58);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},function(t,e,n){var r=n(47),i=n(30);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(34),i=n(21);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(34),i=n(81),a=n(21),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,t.exports=function(t){return a(t)&&i(t.length)&&!!o[r(t)]}},function(t,e,n){var r=n(114)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(47),i=n(41);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e,n){var r=n(13),i=n(63),a=n(238),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return a(t);var e=i(t),n=[];for(var s in t)("constructor"!=s||!e&&o.call(t,s))&&n.push(s);return n}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){var r=n(47),i=n(84);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(47),i=n(119);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(121),i=n(119),a=n(41);t.exports=function(t){return r(t,a,i)}},function(t,e,n){var r=n(33)(n(19),"DataView");t.exports=r},function(t,e,n){var r=n(33)(n(19),"Promise");t.exports=r},function(t,e,n){var r=n(33)(n(19),"WeakMap");t.exports=r},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&n.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},function(t,e,n){var r=n(86),i=n(247),a=n(248),o=n(249),s=n(124);t.exports=function(t,e,n){var c=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return i(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(t,n);case"[object Map]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return a(t);case"[object Set]":return new c;case"[object Symbol]":return o(t)}}},function(t,e,n){var r=n(86);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},function(t,e){var n=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,n){var r=n(39),i=r?r.prototype:void 0,a=i?i.valueOf:void 0;t.exports=function(t){return a?Object(a.call(t)):{}}},function(t,e,n){var r=n(251),i=n(62),a=n(82),o=a&&a.isMap,s=o?i(o):r;t.exports=s},function(t,e,n){var r=n(42),i=n(21);t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},function(t,e,n){var r=n(253),i=n(62),a=n(82),o=a&&a.isSet,s=o?i(o):r;t.exports=s},function(t,e,n){var r=n(42),i=n(21);t.exports=function(t){return i(t)&&"[object Set]"==r(t)}},function(t,e){t.exports=function(t){return function(e,n,r){for(var i=-1,a=Object(e),o=r(e),s=o.length;s--;){var c=o[t?s:++i];if(!1===n(a[c],c,a))break}return e}}},function(t,e,n){var r=n(25);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var a=n.length,o=e?a:-1,s=Object(n);(e?o--:++o<a)&&!1!==i(s[o],o,s););return n}}},function(t,e,n){var r=n(65);t.exports=function(t,e){var n=[];return r(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}},function(t,e,n){var r=n(258),i=n(266),a=n(135);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?a(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(54),i=n(130);t.exports=function(t,e,n,a){var o=n.length,s=o,c=!a;if(null==t)return!s;for(t=Object(t);o--;){var u=n[o];if(c&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<s;){var l=(u=n[o])[0],h=t[l],f=u[1];if(c&&u[2]){if(void 0===h&&!(l in t))return!1}else{var d=new r;if(a)var p=a(h,f,l,t,e,d);if(!(void 0===p?i(f,h,3,a,d):p))return!1}}return!0}},function(t,e,n){var r=n(54),i=n(131),a=n(263),o=n(265),s=n(42),c=n(5),u=n(40),l=n(49),h="[object Object]",f=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,d,p,y){var g=c(t),v=c(e),m=g?"[object Array]":s(t),b=v?"[object Array]":s(e),x=(m="[object Arguments]"==m?h:m)==h,_=(b="[object Arguments]"==b?h:b)==h,k=m==b;if(k&&u(t)){if(!u(e))return!1;g=!0,x=!1}if(k&&!x)return y||(y=new r),g||l(t)?i(t,e,n,d,p,y):a(t,e,m,n,d,p,y);if(!(1&n)){var w=x&&f.call(t,"__wrapped__"),E=_&&f.call(e,"__wrapped__");if(w||E){var T=w?t.value():t,C=E?e.value():e;return y||(y=new r),p(T,C,n,d,y)}}return!!k&&(y||(y=new r),o(t,e,n,d,p,y))}},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e,n){var r=n(39),i=n(123),a=n(37),o=n(131),s=n(264),c=n(91),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;t.exports=function(t,e,n,r,u,h,f){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!h(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=s;case"[object Set]":var p=1&r;if(d||(d=c),t.size!=e.size&&!p)return!1;var y=f.get(t);if(y)return y==e;r|=2,f.set(t,e);var g=o(d(t),d(e),r,u,h,f);return f.delete(t),g;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},function(t,e,n){var r=n(120),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,a,o,s){var c=1&n,u=r(t),l=u.length;if(l!=r(e).length&&!c)return!1;for(var h=l;h--;){var f=u[h];if(!(c?f in e:i.call(e,f)))return!1}var d=s.get(t);if(d&&s.get(e))return d==e;var p=!0;s.set(t,e),s.set(e,t);for(var y=c;++h<l;){var g=t[f=u[h]],v=e[f];if(a)var m=c?a(v,g,f,e,t,s):a(g,v,f,t,e,s);if(!(void 0===m?g===v||o(g,v,n,a,s):m)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){var b=t.constructor,x=e.constructor;b!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x)&&(p=!1)}return s.delete(t),s.delete(e),p}},function(t,e,n){var r=n(134),i=n(30);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var a=e[n],o=t[a];e[n]=[a,o,r(o)]}return e}},function(t,e,n){var r=n(130),i=n(268),a=n(137),o=n(93),s=n(134),c=n(135),u=n(50);t.exports=function(t,e){return o(t)&&s(e)?c(u(t),e):function(n){var o=i(n,t);return void 0===o&&o===e?a(n,t):r(e,o,3)}}},function(t,e,n){var r=n(92);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},function(t,e,n){var r=n(270),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(a,"$1"):n||t)})),e}));t.exports=o},function(t,e,n){var r=n(271);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},function(t,e,n){var r=n(79);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},function(t,e,n){var r=n(39),i=n(67),a=n(5),o=n(43),s=r?r.prototype:void 0,c=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(a(e))return i(e,t)+"";if(o(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,n){var r=n(139),i=n(275),a=n(93),o=n(50);t.exports=function(t){return a(t)?r(o(t)):i(t)}},function(t,e,n){var r=n(92);t.exports=function(t){return function(e){return r(e,t)}}},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&n.call(t,e)}},function(t,e,n){var r=n(83),i=n(42),a=n(48),o=n(5),s=n(25),c=n(40),u=n(63),l=n(49),h=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(o(t)||"string"==typeof t||"function"==typeof t.splice||c(t)||l(t)||a(t)))return!t.length;var e=i(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(u(t))return!r(t).length;for(var n in t)if(h.call(t,n))return!1;return!0}},function(t,e){t.exports=function(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}},function(t,e){t.exports=function(t,e,n,r,i){return i(t,(function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)})),n}},function(t,e,n){var r=n(83),i=n(42),a=n(25),o=n(281),s=n(282);t.exports=function(t){if(null==t)return 0;if(a(t))return o(t)?s(t):t.length;var e=i(t);return"[object Map]"==e||"[object Set]"==e?t.size:r(t).length}},function(t,e,n){var r=n(34),i=n(5),a=n(21);t.exports=function(t){return"string"==typeof t||!i(t)&&a(t)&&"[object String]"==r(t)}},function(t,e,n){var r=n(283),i=n(284),a=n(285);t.exports=function(t){return i(t)?a(t):r(t)}},function(t,e,n){var r=n(139)("length");t.exports=r},function(t,e){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return n.test(t)}},function(t,e){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",a="[^\\ud800-\\udfff]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+r+"|"+i+")"+"?",u="[\\ufe0e\\ufe0f]?"+c+("(?:\\u200d(?:"+[a,o,s].join("|")+")[\\ufe0e\\ufe0f]?"+c+")*"),l="(?:"+[a+r+"?",r,o,s,n].join("|")+")",h=RegExp(i+"(?="+i+")|"+l+u,"g");t.exports=function(t){for(var e=h.lastIndex=0;h.test(t);)++e;return e}},function(t,e,n){var r=n(80),i=n(126),a=n(89),o=n(26),s=n(64),c=n(5),u=n(40),l=n(38),h=n(13),f=n(49);t.exports=function(t,e,n){var d=c(t),p=d||u(t)||f(t);if(e=o(e,4),null==n){var y=t&&t.constructor;n=p?d?new y:[]:h(t)&&l(y)?i(s(t)):{}}return(p?r:a)(t,(function(t,r,i){return e(n,t,r,i)})),n}},function(t,e,n){var r=n(95),i=n(68),a=n(292),o=n(147),s=i((function(t){return a(r(t,1,o,!0))}));t.exports=s},function(t,e,n){var r=n(39),i=n(48),a=n(5),o=r?r.isConcatSpreadable:void 0;t.exports=function(t){return a(t)||i(t)||!!(o&&t&&t[o])}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(87),i=n(112),a=n(35),o=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:a;t.exports=o},function(t,e){var n=Date.now;t.exports=function(t){var e=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(132),i=n(293),a=n(297),o=n(133),s=n(298),c=n(91);t.exports=function(t,e,n){var u=-1,l=i,h=t.length,f=!0,d=[],p=d;if(n)f=!1,l=a;else if(h>=200){var y=e?null:s(t);if(y)return c(y);f=!1,l=o,p=new r}else p=e?[]:d;t:for(;++u<h;){var g=t[u],v=e?e(g):g;if(g=n||0!==g?g:0,f&&v==v){for(var m=p.length;m--;)if(p[m]===v)continue t;e&&p.push(v),d.push(g)}else l(p,v,n)||(p!==d&&p.push(v),d.push(g))}return d}},function(t,e,n){var r=n(294);t.exports=function(t,e){return!!(null==t?0:t.length)&&r(t,e,0)>-1}},function(t,e,n){var r=n(146),i=n(295),a=n(296);t.exports=function(t,e,n){return e==e?a(t,e,n):r(t,i,n)}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},function(t,e,n){var r=n(122),i=n(299),a=n(91),o=r&&1/a(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=o},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(67);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},function(t,e){t.exports="2.1.8"},function(t,e,n){var r=n(12),i=n(77);function a(t){return r.map(t.nodes(),(function(e){var n=t.node(e),i=t.parent(e),a={v:e};return r.isUndefined(n)||(a.value=n),r.isUndefined(i)||(a.parent=i),a}))}function o(t){return r.map(t.edges(),(function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:a(t),edges:o(t)};r.isUndefined(t.graph())||(e.value=r.clone(t.graph()));return e},read:function(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),r.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},function(t,e,n){t.exports={components:n(304),dijkstra:n(149),dijkstraAll:n(305),findCycles:n(306),floydWarshall:n(307),isAcyclic:n(308),postorder:n(309),preorder:n(310),prim:n(311),tarjan:n(151),topsort:n(152)}},function(t,e,n){var r=n(12);t.exports=function(t){var e,n={},i=[];function a(i){r.has(n,i)||(n[i]=!0,e.push(i),r.each(t.successors(i),a),r.each(t.predecessors(i),a))}return r.each(t.nodes(),(function(t){e=[],a(t),e.length&&i.push(e)})),i}},function(t,e,n){var r=n(149),i=n(12);t.exports=function(t,e,n){return i.transform(t.nodes(),(function(i,a){i[a]=r(t,a,e,n)}),{})}},function(t,e,n){var r=n(12),i=n(151);t.exports=function(t){return r.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},function(t,e,n){var r=n(12);t.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,a=e(n);r[t][i]={distance:a,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var a=r[n];i.forEach((function(n){var r=a[t],i=e[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)}))}))})),r}(t,e||i,n||function(e){return t.outEdges(e)})};var i=r.constant(1)},function(t,e,n){var r=n(152);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},function(t,e,n){var r=n(153);t.exports=function(t,e){return r(t,e,"post")}},function(t,e,n){var r=n(153);t.exports=function(t,e){return r(t,e,"pre")}},function(t,e,n){var r=n(12),i=n(77),a=n(150);t.exports=function(t,e){var n,o=new i,s={},c=new a;function u(t){var r=t.v===n?t.w:t.v,i=c.priority(r);if(void 0!==i){var a=e(t);a<i&&(s[r]=n,c.decrease(r,a))}}if(0===t.nodeCount())return o;r.each(t.nodes(),(function(t){c.add(t,Number.POSITIVE_INFINITY),o.setNode(t)})),c.decrease(t.nodes()[0],0);var l=!1;for(;c.size()>0;){if(n=c.removeMin(),r.has(s,n))o.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(n).forEach(u)}return o}},function(t,e,n){var r;try{r=n(3)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,e,n){"use strict";var r=n(4),i=n(346),a=n(349),o=n(350),s=n(8).normalizeRanks,c=n(352),u=n(8).removeEmptyRanks,l=n(353),h=n(354),f=n(355),d=n(356),p=n(365),y=n(8),g=n(20).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?y.time:y.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new g({multigraph:!0,compound:!0}),n=C(t.graph());return e.setGraph(r.merge({},m,T(n,v),r.pick(n,b))),r.forEach(t.nodes(),(function(n){var i=C(t.node(n));e.setNode(n,r.defaults(T(i,x),_)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=C(t.edge(n));e.setEdge(n,r.merge({},w,T(i,k),r.pick(i,E)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){i.run(t)})),e(" nestingGraph.run",(function(){l.run(t)})),e(" rank",(function(){o(y.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};y.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){u(t)})),e(" nestingGraph.cleanup",(function(){l.cleanup(t)})),e(" normalizeRanks",(function(){s(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){a.run(t)})),e(" parentDummyChains",(function(){c(t)})),e(" addBorderSegments",(function(){h(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=y.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var a=t.node(e);a.order=i+n,r.forEach(a.selfEdges,(function(e){y.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:a.rank,order:i+ ++n,e:e.e,label:e.label},"_se")})),delete a.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){f.adjust(t)})),e(" position",(function(){p(t)})),e(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),a=t.node(n.borderBottom),o=t.node(r.last(n.borderLeft)),s=t.node(r.last(n.borderRight));n.width=Math.abs(s.x-o.x),n.height=Math.abs(a.y-i.y),n.x=o.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){a.undo(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){f.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),s=o.marginx||0,c=o.marginy||0;function u(t){var r=t.x,o=t.y,s=t.width,c=t.height;e=Math.min(e,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}r.forEach(t.nodes(),(function(e){u(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&u(n)})),e-=s,i-=c,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i})),r.forEach(t.edges(),(function(n){var a=t.edge(n);r.forEach(a.points,(function(t){t.x-=e,t.y-=i})),r.has(a,"x")&&(a.x-=e),r.has(a,"y")&&(a.y-=i)})),o.width=n-e+s,o.height=a-i+c}(t)})),e(" assignNodeIntersects",(function(){!function(t){r.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=a),i.points.unshift(y.intersectRect(a,n)),i.points.push(y.intersectRect(o,r))}))}(t)})),e(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){i.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(t.edges(),(function(n){var i=t.edge(n),a=e.edge(n);i.points=a.points,r.has(a,"x")&&(i.x=a.x,i.y=a.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};var v=["nodesep","edgesep","ranksep","marginx","marginy"],m={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],x=["width","height"],_={width:0,height:0},k=["minlen","weight","width","height","labeloffset"],w={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},E=["labelpos"];function T(t,e){return r.mapValues(r.pick(t,e),Number)}function C(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},function(t,e,n){var r=n(109);t.exports=function(t){return r(t,5)}},function(t,e,n){var r=n(316)(n(317));t.exports=r},function(t,e,n){var r=n(26),i=n(25),a=n(30);t.exports=function(t){return function(e,n,o){var s=Object(e);if(!i(e)){var c=r(n,3);e=a(e),n=function(t){return c(s[t],t,s)}}var u=t(e,n,o);return u>-1?s[c?e[u]:u]:void 0}}},function(t,e,n){var r=n(146),i=n(26),a=n(318),o=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var c=null==n?0:a(n);return c<0&&(c=o(s+c,0)),r(t,i(e,3),c)}},function(t,e,n){var r=n(156);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},function(t,e,n){var r=n(13),i=n(43),a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(a,"");var n=s.test(t);return n||c.test(t)?u(t.slice(2),n?2:8):o.test(t)?NaN:+t}},function(t,e,n){var r=n(90),i=n(128),a=n(41);t.exports=function(t,e){return null==t?t:r(t,i(e),a)}},function(t,e){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},function(t,e,n){var r=n(60),i=n(89),a=n(26);t.exports=function(t,e){var n={};return e=a(e,3),i(t,(function(t,i,a){r(n,i,e(t,i,a))})),n}},function(t,e,n){var r=n(96),i=n(324),a=n(35);t.exports=function(t){return t&&t.length?r(t,a,i):void 0}},function(t,e){t.exports=function(t,e){return t>e}},function(t,e,n){var r=n(326),i=n(329)((function(t,e,n){r(t,e,n)}));t.exports=i},function(t,e,n){var r=n(54),i=n(158),a=n(90),o=n(327),s=n(13),c=n(41),u=n(160);t.exports=function t(e,n,l,h,f){e!==n&&a(n,(function(a,c){if(f||(f=new r),s(a))o(e,n,c,l,t,h,f);else{var d=h?h(u(e,c),a,c+"",e,n,f):void 0;void 0===d&&(d=a),i(e,c,d)}}),c)}},function(t,e,n){var r=n(158),i=n(115),a=n(124),o=n(116),s=n(125),c=n(48),u=n(5),l=n(147),h=n(40),f=n(38),d=n(13),p=n(159),y=n(49),g=n(160),v=n(328);t.exports=function(t,e,n,m,b,x,_){var k=g(t,n),w=g(e,n),E=_.get(w);if(E)r(t,n,E);else{var T=x?x(k,w,n+"",t,e,_):void 0,C=void 0===T;if(C){var S=u(w),A=!S&&h(w),M=!S&&!A&&y(w);T=w,S||A||M?u(k)?T=k:l(k)?T=o(k):A?(C=!1,T=i(w,!0)):M?(C=!1,T=a(w,!0)):T=[]:p(w)||c(w)?(T=k,c(k)?T=v(k):d(k)&&!f(k)||(T=s(w))):C=!1}C&&(_.set(w,T),b(T,w,m,x,_),_.delete(w)),r(t,n,T)}}},function(t,e,n){var r=n(47),i=n(41);t.exports=function(t){return r(t,i(t))}},function(t,e,n){var r=n(68),i=n(69);t.exports=function(t){return r((function(e,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&i(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++r<a;){var c=n[r];c&&t(e,c,r,o)}return e}))}},function(t,e,n){var r=n(96),i=n(161),a=n(35);t.exports=function(t){return t&&t.length?r(t,a,i):void 0}},function(t,e,n){var r=n(96),i=n(26),a=n(161);t.exports=function(t,e){return t&&t.length?r(t,i(e,2),a):void 0}},function(t,e,n){var r=n(19);t.exports=function(){return r.Date.now()}},function(t,e,n){var r=n(334),i=n(137);t.exports=function(t,e){return r(t,e,(function(e,n){return i(t,n)}))}},function(t,e,n){var r=n(92),i=n(335),a=n(66);t.exports=function(t,e,n){for(var o=-1,s=e.length,c={};++o<s;){var u=e[o],l=r(t,u);n(l,u)&&i(c,a(u,t),l)}return c}},function(t,e,n){var r=n(59),i=n(66),a=n(61),o=n(13),s=n(50);t.exports=function(t,e,n,c){if(!o(t))return t;for(var u=-1,l=(e=i(e,t)).length,h=l-1,f=t;null!=f&&++u<l;){var d=s(e[u]),p=n;if(u!=h){var y=f[d];void 0===(p=c?c(y,d,f):void 0)&&(p=o(y)?y:a(e[u+1])?[]:{})}r(f,d,p),f=f[d]}return t}},function(t,e,n){var r=n(157),i=n(144),a=n(145);t.exports=function(t){return a(i(t,void 0,r),t+"")}},function(t,e,n){var r=n(338),i=n(69),a=n(156);t.exports=function(t){return function(e,n,o){return o&&"number"!=typeof o&&i(e,n,o)&&(n=o=void 0),e=a(e),void 0===n?(n=e,e=0):n=a(n),o=void 0===o?e<n?1:-1:a(o),r(e,n,o,t)}}},function(t,e){var n=Math.ceil,r=Math.max;t.exports=function(t,e,i,a){for(var o=-1,s=r(n((e-t)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=t,t+=i;return c}},function(t,e,n){var r=n(95),i=n(340),a=n(68),o=n(69),s=a((function(t,e){if(null==t)return[];var n=e.length;return n>1&&o(t,e[0],e[1])?e=[]:n>2&&o(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=s},function(t,e,n){var r=n(67),i=n(26),a=n(142),o=n(341),s=n(62),c=n(342),u=n(35);t.exports=function(t,e,n){var l=-1;e=r(e.length?e:[u],s(i));var h=a(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++l,value:t}}));return o(h,(function(t,e){return c(t,e,n)}))}},function(t,e){t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},function(t,e,n){var r=n(343);t.exports=function(t,e,n){for(var i=-1,a=t.criteria,o=e.criteria,s=a.length,c=n.length;++i<s;){var u=r(a[i],o[i]);if(u)return i>=c?u:u*("desc"==n[i]?-1:1)}return t.index-e.index}},function(t,e,n){var r=n(43);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,a=t==t,o=r(t),s=void 0!==e,c=null===e,u=e==e,l=r(e);if(!c&&!l&&!o&&t>e||o&&s&&u&&!c&&!l||i&&s&&u||!n&&u||!a)return 1;if(!i&&!o&&!l&&t<e||l&&n&&a&&!i&&!o||c&&n&&a||!s&&a||!u)return-1}return 0}},function(t,e,n){var r=n(59),i=n(345);t.exports=function(t,e){return i(t||[],e||[],r)}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=t.length,a=e.length,o={};++r<i;){var s=r<a?e[r]:void 0;n(o,t[r],s)}return o}},function(t,e,n){"use strict";var r=n(4),i=n(347);t.exports={run:function(t){var e="greedy"===t.graph().acyclicer?i(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},i={};function a(o){r.has(i,o)||(i[o]=!0,n[o]=!0,r.forEach(t.outEdges(o),(function(t){r.has(n,t.w)?e.push(t):a(t.w)})),delete n[o])}return r.forEach(t.nodes(),a),e}(t);r.forEach(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.uniqueId("rev"))}))},undo:function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}}},function(t,e,n){var r=n(4),i=n(20).Graph,a=n(348);t.exports=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new i,o=0,s=0;r.forEach(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),r.forEach(t.edges(),(function(t){var r=n.edge(t.v,t.w)||0,i=e(t),a=r+i;n.setEdge(t.v,t.w,a),s=Math.max(s,n.node(t.v).out+=i),o=Math.max(o,n.node(t.w).in+=i)}));var u=r.range(s+o+3).map((function(){return new a})),l=o+1;return r.forEach(n.nodes(),(function(t){c(u,l,n.node(t))})),{graph:n,buckets:u,zeroIdx:l}}(t,e||o),u=function(t,e,n){var r,i=[],a=e[e.length-1],o=e[0];for(;t.nodeCount();){for(;r=o.dequeue();)s(t,e,n,r);for(;r=a.dequeue();)s(t,e,n,r);if(t.nodeCount())for(var c=e.length-2;c>0;--c)if(r=e[c].dequeue()){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(u,(function(e){return t.outEdges(e.v,e.w)})),!0)};var o=r.constant(1);function s(t,e,n,i,a){var o=a?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),s=t.node(r.v);a&&o.push({v:r.v,w:r.w}),s.out-=i,c(e,n,s)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),a=r.w,o=t.node(a);o.in-=i,c(e,n,o)})),t.removeNode(i.v),o}function c(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},function(t,e){function n(){var t={};t._next=t._prev=t,this._sentinel=t}function r(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=n,n.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return r(e),e},n.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&r(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},n.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,i)),n=n._prev;return"["+t.join(", ")+"]"}},function(t,e,n){"use strict";var r=n(4),i=n(8);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,a,o=e.v,s=t.node(o).rank,c=e.w,u=t.node(c).rank,l=e.name,h=t.edge(e),f=h.labelRank;if(u===s+1)return;for(t.removeEdge(e),a=0,++s;s<u;++a,++s)h.points=[],r={width:0,height:0,edgeLabel:h,edgeObj:e,rank:s},n=i.addDummyNode(t,"edge",r,"_d"),s===f&&(r.width=h.width,r.height=h.height,r.dummy="edge-label",r.labelpos=h.labelpos),t.setEdge(o,n,{weight:h.weight},l),0===a&&t.graph().dummyChains.push(n),o=n;t.setEdge(o,c,{weight:h.weight},l)}(t,e)}))},undo:function(t){r.forEach(t.graph().dummyChains,(function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}}},function(t,e,n){"use strict";var r=n(70).longestPath,i=n(165),a=n(351);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":s(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":o(t);break;default:s(t)}};var o=r;function s(t){a(t)}},function(t,e,n){"use strict";var r=n(4),i=n(165),a=n(70).slack,o=n(70).longestPath,s=n(20).alg.preorder,c=n(20).alg.postorder,u=n(8).simplify;function l(t){t=u(t),o(t);var e,n=i(t);for(d(n),h(n,t);e=y(n);)v(n,t,e,g(n,t,e))}function h(t,e){var n=c(t,t.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=f(t,e,n)}(t,e,n)}))}function f(t,e,n){var i=t.node(n).parent,a=!0,o=e.edge(n,i),s=0;return o||(a=!1,o=e.edge(i,n)),s=o.weight,r.forEach(e.nodeEdges(n),(function(r){var o,c,u=r.v===n,l=u?r.w:r.v;if(l!==i){var h=u===a,f=e.edge(r).weight;if(s+=h?f:-f,o=n,c=l,t.hasEdge(o,c)){var d=t.edge(n,l).cutvalue;s+=h?-d:d}}})),s}function d(t,e){arguments.length<2&&(e=t.nodes()[0]),p(t,{},1,e)}function p(t,e,n,i,a){var o=n,s=t.node(i);return e[i]=!0,r.forEach(t.neighbors(i),(function(a){r.has(e,a)||(n=p(t,e,n,a,i))})),s.low=o,s.lim=n++,a?s.parent=a:delete s.parent,n}function y(t){return r.find(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function g(t,e,n){var i=n.v,o=n.w;e.hasEdge(i,o)||(i=n.w,o=n.v);var s=t.node(i),c=t.node(o),u=s,l=!1;s.lim>c.lim&&(u=c,l=!0);var h=r.filter(e.edges(),(function(e){return l===m(t,t.node(e.v),u)&&l!==m(t,t.node(e.w),u)}));return r.minBy(h,(function(t){return a(e,t)}))}function v(t,e,n,i){var a=n.v,o=n.w;t.removeEdge(a,o),t.setEdge(i.v,i.w,{}),d(t),h(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=s(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)}))}(t,e)}function m(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=l,l.initLowLimValues=d,l.initCutValues=h,l.calcCutValue=f,l.leaveEdge=y,l.enterEdge=g,l.exchangeEdges=v},function(t,e,n){var r=n(4);t.exports=function(t){var e=function(t){var e={},n=0;function i(a){var o=n;r.forEach(t.children(a),i),e[a]={low:o,lim:n++}}return r.forEach(t.children(),i),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,a=function(t,e,n,r){var i,a,o=[],s=[],c=Math.min(e[n].low,e[r].low),u=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),o.push(i)}while(i&&(e[i].low>c||u>e[i].lim));a=i,i=r;for(;(i=t.parent(i))!==a;)s.push(i);return{path:o.concat(s.reverse()),lca:a}}(t,e,i.v,i.w),o=a.path,s=a.lca,c=0,u=o[c],l=!0;n!==i.w;){if(r=t.node(n),l){for(;(u=o[c])!==s&&t.node(u).maxRank<r.rank;)c++;u===s&&(l=!1)}if(!l){for(;c<o.length-1&&t.node(u=o[c+1]).minRank<=r.rank;)c++;u=o[c]}t.setParent(n,u),n=t.successors(n)[0]}}))}},function(t,e,n){var r=n(4),i=n(8);t.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};return r.forEach(t.children(),(function(n){!function n(i,a){var o=t.children(i);o&&o.length&&r.forEach(o,(function(t){n(t,a+1)}));e[i]=a}(n,1)})),e}(t),a=r.max(r.values(n))-1,o=2*a+1;t.graph().nestingRoot=e,r.forEach(t.edges(),(function(e){t.edge(e).minlen*=o}));var s=function(t){return r.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;r.forEach(t.children(),(function(c){!function t(e,n,a,o,s,c,u){var l=e.children(u);if(!l.length)return void(u!==n&&e.setEdge(n,u,{weight:0,minlen:a}));var h=i.addBorderNode(e,"_bt"),f=i.addBorderNode(e,"_bb"),d=e.node(u);e.setParent(h,u),d.borderTop=h,e.setParent(f,u),d.borderBottom=f,r.forEach(l,(function(r){t(e,n,a,o,s,c,r);var i=e.node(r),l=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,p=i.borderTop?o:2*o,y=l!==d?1:s-c[u]+1;e.setEdge(h,l,{weight:p,minlen:y,nestingEdge:!0}),e.setEdge(d,f,{weight:p,minlen:y,nestingEdge:!0})})),e.parent(u)||e.setEdge(n,h,{weight:0,minlen:s+c[u]})}(t,e,o,s,a,n,c)})),t.graph().nodeRankFactor=o},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},function(t,e,n){var r=n(4),i=n(8);function a(t,e,n,r,a,o){var s={width:0,height:0,rank:o,borderType:e},c=a[e][o-1],u=i.addDummyNode(t,"border",s,n);a[e][o]=u,t.setParent(u,r),c&&t.setEdge(c,u,{weight:1})}t.exports=function(t){r.forEach(t.children(),(function e(n){var i=t.children(n),o=t.node(n);if(i.length&&r.forEach(i,e),r.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var s=o.minRank,c=o.maxRank+1;s<c;++s)a(t,"borderLeft","_bl",n,o,s),a(t,"borderRight","_br",n,o,s)}}))}},function(t,e,n){"use strict";var r=n(4);function i(t){r.forEach(t.nodes(),(function(e){a(t.node(e))})),r.forEach(t.edges(),(function(e){a(t.edge(e))}))}function a(t){var e=t.width;t.width=t.height,t.height=e}function o(t){t.y=-t.y}function s(t){var e=t.x;t.x=t.y,t.y=e}t.exports={adjust:function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||i(t)},undo:function(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){r.forEach(t.nodes(),(function(e){o(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,o),r.has(n,"y")&&o(n)}))}(t);"lr"!==e&&"rl"!==e||(!function(t){r.forEach(t.nodes(),(function(e){s(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,s),r.has(n,"x")&&s(n)}))}(t),i(t))}}},function(t,e,n){"use strict";var r=n(4),i=n(357),a=n(358),o=n(359),s=n(363),c=n(364),u=n(20).Graph,l=n(8);function h(t,e,n){return r.map(e,(function(e){return s(t,e,n)}))}function f(t,e){var n=new u;r.forEach(t,(function(t){var i=t.graph().root,a=o(t,i,n,e);r.forEach(a.vs,(function(e,n){t.node(e).order=n})),c(t,n,a.vs)}))}function d(t,e){r.forEach(e,(function(e){r.forEach(e,(function(e,n){t.node(e).order=n}))}))}t.exports=function(t){var e=l.maxRank(t),n=h(t,r.range(1,e+1),"inEdges"),o=h(t,r.range(e-1,-1,-1),"outEdges"),s=i(t);d(t,s);for(var c,u=Number.POSITIVE_INFINITY,p=0,y=0;y<4;++p,++y){f(p%2?n:o,p%4>=2),s=l.buildLayerMatrix(t);var g=a(t,s);g<u&&(y=0,c=r.cloneDeep(s),u=g)}d(t,c)}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t){var e={},n=r.filter(t.nodes(),(function(e){return!t.children(e).length})),i=r.max(r.map(n,(function(e){return t.node(e).rank}))),a=r.map(r.range(i+1),(function(){return[]}));var o=r.sortBy(n,(function(e){return t.node(e).rank}));return r.forEach(o,(function n(i){if(r.has(e,i))return;e[i]=!0;var o=t.node(i);a[o.rank].push(i),r.forEach(t.successors(i),n)})),a}},function(t,e,n){"use strict";var r=n(4);function i(t,e,n){for(var i=r.zipObject(n,r.map(n,(function(t,e){return e}))),a=r.flatten(r.map(e,(function(e){return r.sortBy(r.map(t.outEdges(e),(function(e){return{pos:i[e.w],weight:t.edge(e).weight}})),"pos")})),!0),o=1;o<n.length;)o<<=1;var s=2*o-1;o-=1;var c=r.map(new Array(s),(function(){return 0})),u=0;return r.forEach(a.forEach((function(t){var e=t.pos+o;c[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=c[e+1]),c[e=e-1>>1]+=t.weight;u+=t.weight*n}))),u}t.exports=function(t,e){for(var n=0,r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n}},function(t,e,n){var r=n(4),i=n(360),a=n(361),o=n(362);t.exports=function t(e,n,s,c){var u=e.children(n),l=e.node(n),h=l?l.borderLeft:void 0,f=l?l.borderRight:void 0,d={};h&&(u=r.filter(u,(function(t){return t!==h&&t!==f})));var p=i(e,u);r.forEach(p,(function(n){if(e.children(n.v).length){var i=t(e,n.v,s,c);d[n.v]=i,r.has(i,"barycenter")&&(a=n,o=i,r.isUndefined(a.barycenter)?(a.barycenter=o.barycenter,a.weight=o.weight):(a.barycenter=(a.barycenter*a.weight+o.barycenter*o.weight)/(a.weight+o.weight),a.weight+=o.weight))}var a,o}));var y=a(p,s);!function(t,e){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(y,d);var g=o(y,c);if(h&&(g.vs=r.flatten([h,g.vs,f],!0),e.predecessors(h).length)){var v=e.node(e.predecessors(h)[0]),m=e.node(e.predecessors(f)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+v.order+m.order)/(g.weight+2),g.weight+=2}return g}},function(t,e,n){var r=n(4);t.exports=function(t,e){return r.map(e,(function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,(function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}}))}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t,e){var n={};return r.forEach(t,(function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};r.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)})),r.forEach(e.edges(),(function(t){var e=n[t.v],i=n[t.w];r.isUndefined(e)||r.isUndefined(i)||(i.indegree++,e.out.push(n[t.w]))})),function(t){var e=[];function n(t){return function(e){e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&function(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var a=t.pop();e.push(a),r.forEach(a.in.reverse(),n(a)),r.forEach(a.out,i(a))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(t){return!t.indegree})))}},function(t,e,n){var r=n(4),i=n(8);function a(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){var n=i.partition(t,(function(t){return r.has(t,"barycenter")})),o=n.lhs,s=r.sortBy(n.rhs,(function(t){return-t.i})),c=[],u=0,l=0,h=0;o.sort((f=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:f?e.i-t.i:t.i-e.i})),h=a(c,s,h),r.forEach(o,(function(t){h+=t.vs.length,c.push(t.vs),u+=t.barycenter*t.weight,l+=t.weight,h=a(c,s,h)}));var f;var d={vs:r.flatten(c,!0)};l&&(d.barycenter=u/l,d.weight=l);return d}},function(t,e,n){var r=n(4),i=n(20).Graph;t.exports=function(t,e,n){var a=function(t){var e;for(;t.hasNode(e=r.uniqueId("_root")););return e}(t),o=new i({compound:!0}).setGraph({root:a}).setDefaultNodeLabel((function(e){return t.node(e)}));return r.forEach(t.nodes(),(function(i){var s=t.node(i),c=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(o.setNode(i),o.setParent(i,c||a),r.forEach(t[n](i),(function(e){var n=e.v===i?e.w:e.v,a=o.edge(n,i),s=r.isUndefined(a)?0:a.weight;o.setEdge(n,i,{weight:t.edge(e).weight+s})})),r.has(s,"minRank")&&o.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))})),o}},function(t,e,n){var r=n(4);t.exports=function(t,e,n){var i,a={};r.forEach(n,(function(n){for(var r,o,s=t.parent(n);s;){if((r=t.parent(s))?(o=a[r],a[r]=s):(o=i,i=s),o&&o!==s)return void e.setEdge(o,s);s=r}}))}},function(t,e,n){"use strict";var r=n(4),i=n(8),a=n(366).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,a=0;r.forEach(e,(function(e){var i=r.max(r.map(e,(function(e){return t.node(e).height})));r.forEach(e,(function(e){t.node(e).y=a+i/2})),a+=i+n}))})(t=i.asNonCompoundGraph(t)),r.forEach(a(t),(function(e,n){t.node(n).x=e}))}},function(t,e,n){"use strict";var r=n(4),i=n(20).Graph,a=n(8);function o(t,e){var n={};return r.reduce(e,(function(e,i){var a=0,o=0,s=e.length,u=r.last(i);return r.forEach(i,(function(e,l){var h=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),f=h?t.node(h).order:s;(h||e===u)&&(r.forEach(i.slice(o,l+1),(function(e){r.forEach(t.predecessors(e),(function(r){var i=t.node(r),o=i.order;!(o<a||f<o)||i.dummy&&t.node(e).dummy||c(n,r,e)}))})),o=l+1,a=f)})),i})),n}function s(t,e){var n={};function i(e,i,a,o,s){var u;r.forEach(r.range(i,a),(function(i){u=e[i],t.node(u).dummy&&r.forEach(t.predecessors(u),(function(e){var r=t.node(e);r.dummy&&(r.order<o||r.order>s)&&c(n,e,u)}))}))}return r.reduce(e,(function(e,n){var a,o=-1,s=0;return r.forEach(n,(function(r,c){if("border"===t.node(r).dummy){var u=t.predecessors(r);u.length&&(a=t.node(u[0]).order,i(n,s,c,o,a),s=c,o=a)}i(n,s,n.length,a,e.length)})),n})),n}function c(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function u(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function l(t,e,n,i){var a={},o={},s={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){a[t]=t,o[t]=t,s[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var c=i(t);if(c.length)for(var l=((c=r.sortBy(c,(function(t){return s[t]}))).length-1)/2,h=Math.floor(l),f=Math.ceil(l);h<=f;++h){var d=c[h];o[t]===t&&e<s[d]&&!u(n,t,d)&&(o[d]=t,o[t]=a[t]=a[d],e=s[d])}}))})),{root:a,align:o}}function h(t,e,n,a,o){var s={},c=function(t,e,n,a){var o=new i,s=t.graph(),c=function(t,e,n){return function(i,a,o){var s,c=i.node(a),u=i.node(o),l=0;if(l+=c.width/2,r.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=-c.width/2;break;case"r":s=c.width/2}if(s&&(l+=n?s:-s),s=0,l+=(c.dummy?e:t)/2,l+=(u.dummy?e:t)/2,l+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=u.width/2;break;case"r":s=-u.width/2}return s&&(l+=n?s:-s),s=0,l}}(s.nodesep,s.edgesep,a);return r.forEach(e,(function(e){var i;r.forEach(e,(function(e){var r=n[e];if(o.setNode(r),i){var a=n[i],s=o.edge(a,r);o.setEdge(a,r,Math.max(c(t,e,i),s||0))}i=e}))})),o}(t,e,n,o),u=o?"borderLeft":"borderRight";function l(t,e){for(var n=c.nodes(),r=n.pop(),i={};r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return l((function(t){s[t]=c.inEdges(t).reduce((function(t,e){return Math.max(t,s[e.v]+c.edge(e))}),0)}),c.predecessors.bind(c)),l((function(e){var n=c.outEdges(e).reduce((function(t,e){return Math.min(t,s[e.w]-c.edge(e))}),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(s[e]=Math.max(s[e],n))}),c.successors.bind(c)),r.forEach(a,(function(t){s[t]=s[n[t]]})),s}function f(t,e){return r.minBy(r.values(e),(function(e){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return r.forIn(e,(function(e,r){var a=function(t,e){return t.node(e).width}(t,r)/2;n=Math.max(e+a,n),i=Math.min(e-a,i)})),n-i}))}function d(t,e){var n=r.values(e),i=r.min(n),a=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(o){var s,c=n+o,u=t[c];if(u!==e){var l=r.values(u);(s="l"===o?i-r.min(l):a-r.max(l))&&(t[c]=r.mapValues(u,(function(t){return t+s})))}}))}))}function p(t,e){return r.mapValues(t.ul,(function(n,i){if(e)return t[e.toLowerCase()][i];var a=r.sortBy(r.map(t,i));return(a[1]+a[2])/2}))}t.exports={positionX:function(t){var e,n=a.buildLayerMatrix(t),i=r.merge(o(t,n),s(t,n)),c={};r.forEach(["u","d"],(function(a){e="u"===a?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(e=r.map(e,(function(t){return r.values(t).reverse()})));var o=("u"===a?t.predecessors:t.successors).bind(t),s=l(t,e,i,o),u=h(t,e,s.root,s.align,"r"===n);"r"===n&&(u=r.mapValues(u,(function(t){return-t}))),c[a+n]=u}))}));var u=f(t,c);return d(c,u),p(c,t.graph().align)},findType1Conflicts:o,findType2Conflicts:s,addConflict:c,hasConflict:u,verticalAlignment:l,horizontalCompaction:h,alignCoordinates:d,findSmallestWidthAlignment:f,balance:p}},function(t,e,n){var r=n(4),i=n(8),a=n(20).Graph;t.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),(function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),r.forEach(t.edges(),(function(t){n.setEdge(t.v,t.w,{},t.name)})),r.forEach(e,(function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,(function(t,e){return n.setEdge(t,e,{style:"invis"}),e}))})),n}}},function(t,e){t.exports="0.8.5"},function(t,e,n){t.exports={node:n(166),circle:n(167),ellipse:n(97),polygon:n(168),rect:n(169)}},function(t,e){function n(t,e){return t*e>0}t.exports=function(t,e,r,i){var a,o,s,c,u,l,h,f,d,p,y,g,v;if(a=e.y-t.y,s=t.x-e.x,u=e.x*t.y-t.x*e.y,d=a*r.x+s*r.y+u,p=a*i.x+s*i.y+u,0!==d&&0!==p&&n(d,p))return;if(o=i.y-r.y,c=r.x-i.x,l=i.x*r.y-r.x*i.y,h=o*t.x+c*t.y+l,f=o*e.x+c*e.y+l,0!==h&&0!==f&&n(h,f))return;if(0===(y=a*c-o*s))return;return g=Math.abs(y/2),{x:(v=s*l-c*u)<0?(v-g)/y:(v+g)/y,y:(v=o*u-a*l)<0?(v-g)/y:(v+g)/y}}},function(t,e,n){var r=n(44),i=n(31),a=n(154).layout;t.exports=function(){var t=n(372),e=n(375),i=n(376),u=n(377),l=n(378),h=n(379),f=n(380),d=n(381),p=n(382),y=function(n,y){!function(t){t.nodes().forEach((function(e){var n=t.node(e);r.has(n,"label")||t.children(e).length||(n.label=e),r.has(n,"paddingX")&&r.defaults(n,{paddingLeft:n.paddingX,paddingRight:n.paddingX}),r.has(n,"paddingY")&&r.defaults(n,{paddingTop:n.paddingY,paddingBottom:n.paddingY}),r.has(n,"padding")&&r.defaults(n,{paddingLeft:n.padding,paddingRight:n.padding,paddingTop:n.padding,paddingBottom:n.padding}),r.defaults(n,o),r.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],(function(t){n[t]=Number(n[t])})),r.has(n,"width")&&(n._prevWidth=n.width),r.has(n,"height")&&(n._prevHeight=n.height)})),t.edges().forEach((function(e){var n=t.edge(e);r.has(n,"label")||(n.label=""),r.defaults(n,s)}))}(y);var g=c(n,"output"),v=c(g,"clusters"),m=c(g,"edgePaths"),b=i(c(g,"edgeLabels"),y),x=t(c(g,"nodes"),y,d);a(y),l(x,y),h(b,y),u(m,y,p);var _=e(v,y);f(_,y),function(t){r.each(t.nodes(),(function(e){var n=t.node(e);r.has(n,"_prevWidth")?n.width=n._prevWidth:delete n.width,r.has(n,"_prevHeight")?n.height=n._prevHeight:delete n.height,delete n._prevWidth,delete n._prevHeight}))}(y)};return y.createNodes=function(e){return arguments.length?(t=e,y):t},y.createClusters=function(t){return arguments.length?(e=t,y):e},y.createEdgeLabels=function(t){return arguments.length?(i=t,y):i},y.createEdgePaths=function(t){return arguments.length?(u=t,y):u},y.shapes=function(t){return arguments.length?(d=t,y):d},y.arrows=function(t){return arguments.length?(p=t,y):p},y};var o={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},s={arrowhead:"normal",curve:i.curveLinear};function c(t,e){var n=t.select("g."+e);return n.empty()&&(n=t.append("g").attr("class",e)),n}},function(t,e,n){"use strict";var r=n(44),i=n(98),a=n(14),o=n(31);t.exports=function(t,e,n){var s,c=e.nodes().filter((function(t){return!a.isSubgraph(e,t)})),u=t.selectAll("g.node").data(c,(function(t){return t})).classed("update",!0);u.exit().remove(),u.enter().append("g").attr("class","node").style("opacity",0),(u=t.selectAll("g.node")).each((function(t){var s=e.node(t),c=o.select(this);a.applyClass(c,s.class,(c.classed("update")?"update ":"")+"node"),c.select("g.label").remove();var u=c.append("g").attr("class","label"),l=i(u,s),h=n[s.shape],f=r.pick(l.node().getBBox(),"width","height");s.elem=this,s.id&&c.attr("id",s.id),s.labelId&&u.attr("id",s.labelId),r.has(s,"width")&&(f.width=s.width),r.has(s,"height")&&(f.height=s.height),f.width+=s.paddingLeft+s.paddingRight,f.height+=s.paddingTop+s.paddingBottom,u.attr("transform","translate("+(s.paddingLeft-s.paddingRight)/2+","+(s.paddingTop-s.paddingBottom)/2+")");var d=o.select(this);d.select(".label-container").remove();var p=h(d,f,s).classed("label-container",!0);a.applyStyle(p,s.style);var y=p.node().getBBox();s.width=y.width,s.height=y.height})),s=u.exit?u.exit():u.selectAll(null);return a.applyTransition(s,e).style("opacity",0).remove(),u}},function(t,e,n){var r=n(14);t.exports=function(t,e){for(var n=t.append("text"),i=function(t){for(var e,n="",r=!1,i=0;i<t.length;++i)if(e=t[i],r){switch(e){case"n":n+="\n";break;default:n+=e}r=!1}else"\\"===e?r=!0:n+=e;return n}(e.label).split("\n"),a=0;a<i.length;a++)n.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(i[a]);return r.applyStyle(n,e.labelStyle),n}},function(t,e,n){var r=n(14);t.exports=function(t,e){var n=t;return n.node().appendChild(e.label),r.applyStyle(n,e.labelStyle),n}},function(t,e,n){var r=n(14),i=n(31),a=n(98);t.exports=function(t,e){var n,o=e.nodes().filter((function(t){return r.isSubgraph(e,t)})),s=t.selectAll("g.cluster").data(o,(function(t){return t}));s.selectAll("*").remove(),s.enter().append("g").attr("class","cluster").attr("id",(function(t){return e.node(t).id})).style("opacity",0),s=t.selectAll("g.cluster"),r.applyTransition(s,e).style("opacity",1),s.each((function(t){var n=e.node(t),r=i.select(this);i.select(this).append("rect");var o=r.append("g").attr("class","label");a(o,n,n.clusterLabelPos)})),s.selectAll("rect").each((function(t){var n=e.node(t),a=i.select(this);r.applyStyle(a,n.style)})),n=s.exit?s.exit():s.selectAll(null);return r.applyTransition(n,e).style("opacity",0).remove(),s}},function(t,e,n){"use strict";var r=n(44),i=n(98),a=n(14),o=n(31);t.exports=function(t,e){var n,s=t.selectAll("g.edgeLabel").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0);s.exit().remove(),s.enter().append("g").classed("edgeLabel",!0).style("opacity",0),(s=t.selectAll("g.edgeLabel")).each((function(t){var n=o.select(this);n.select(".label").remove();var a=e.edge(t),s=i(n,e.edge(t),0,0).classed("label",!0),c=s.node().getBBox();a.labelId&&s.attr("id",a.labelId),r.has(a,"width")||(a.width=c.width),r.has(a,"height")||(a.height=c.height)})),n=s.exit?s.exit():s.selectAll(null);return a.applyTransition(n,e).style("opacity",0).remove(),s}},function(t,e,n){"use strict";var r=n(44),i=n(166),a=n(14),o=n(31);function s(t,e){var n=(o.line||o.svg.line)().x((function(t){return t.x})).y((function(t){return t.y}));return(n.curve||n.interpolate)(t.curve),n(e)}t.exports=function(t,e,n){var c=t.selectAll("g.edgePath").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0),u=function(t,e){var n=t.enter().append("g").attr("class","edgePath").style("opacity",0);return n.append("path").attr("class","path").attr("d",(function(t){var n=e.edge(t),i=e.node(t.v).elem;return s(n,r.range(n.points.length).map((function(){return e=(t=i).getBBox(),{x:(n=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2)).e,y:n.f};var t,e,n})))})),n.append("defs"),n}(c,e);!function(t,e){var n=t.exit();a.applyTransition(n,e).style("opacity",0).remove()}(c,e);var l=void 0!==c.merge?c.merge(u):c;return a.applyTransition(l,e).style("opacity",1),l.each((function(t){var n=o.select(this),r=e.edge(t);r.elem=this,r.id&&n.attr("id",r.id),a.applyClass(n,r.class,(n.classed("update")?"update ":"")+"edgePath")})),l.selectAll("path.path").each((function(t){var n=e.edge(t);n.arrowheadId=r.uniqueId("arrowhead");var c=o.select(this).attr("marker-end",(function(){return"url("+(t=location.href,e=n.arrowheadId,t.split("#")[0]+"#"+e)+")";var t,e})).style("fill","none");a.applyTransition(c,e).attr("d",(function(t){return function(t,e){var n=t.edge(e),r=t.node(e.v),a=t.node(e.w),o=n.points.slice(1,n.points.length-1);return o.unshift(i(r,o[0])),o.push(i(a,o[o.length-1])),s(n,o)}(e,t)})),a.applyStyle(c,n.style)})),l.selectAll("defs *").remove(),l.selectAll("defs").each((function(t){var r=e.edge(t);(0,n[r.arrowhead])(o.select(this),r.arrowheadId,r,"arrowhead")})),l}},function(t,e,n){"use strict";var r=n(14),i=n(31);t.exports=function(t,e){function n(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},function(t,e,n){"use strict";var r=n(14),i=n(31),a=n(44);t.exports=function(t,e){function n(t){var n=e.edge(t);return a.has(n,"x")?"translate("+n.x+","+n.y+")":""}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},function(t,e,n){"use strict";var r=n(14),i=n(31);t.exports=function(t,e){var n=t.filter((function(){return!i.select(this).classed("update")}));function a(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}n.attr("transform",a),r.applyTransition(t,e).style("opacity",1).attr("transform",a),r.applyTransition(n.selectAll("rect"),e).attr("width",(function(t){return e.node(t).width})).attr("height",(function(t){return e.node(t).height})).attr("x",(function(t){return-e.node(t).width/2})).attr("y",(function(t){return-e.node(t).height/2}))}},function(t,e,n){"use strict";var r=n(169),i=n(97),a=n(167),o=n(168);t.exports={rect:function(t,e,n){var i=t.insert("rect",":first-child").attr("rx",n.rx).attr("ry",n.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return n.intersect=function(t){return r(n,t)},i},ellipse:function(t,e,n){var r=e.width/2,a=e.height/2,o=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",r).attr("ry",a);return n.intersect=function(t){return i(n,r,a,t)},o},circle:function(t,e,n){var r=Math.max(e.width,e.height)/2,i=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",r);return n.intersect=function(t){return a(n,r,t)},i},diamond:function(t,e,n){var r=e.width*Math.SQRT2/2,i=e.height*Math.SQRT2/2,a=[{x:0,y:-i},{x:-r,y:0},{x:0,y:i},{x:r,y:0}],s=t.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" "));return n.intersect=function(t){return o(n,a,t)},s}}},function(t,e,n){var r=n(14);function i(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])}t.exports={default:i,normal:i,vee:function(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])},undirected:function(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])}}},function(t,e){t.exports="0.6.4"},function(t,e,n){"use strict";var r;function i(t){return r=r||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),r.innerHTML=t,unescape(r.textContent)}n.r(e);var a=n(23),o=n.n(a),s={debug:1,info:2,warn:3,error:4,fatal:5},c={debug:function(){},info:function(){},warn:function(){},error:function(){},fatal:function(){}},u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"fatal";isNaN(t)&&(t=t.toLowerCase(),void 0!==s[t]&&(t=s[t])),c.trace=function(){},c.debug=function(){},c.info=function(){},c.warn=function(){},c.error=function(){},c.fatal=function(){},t<=s.fatal&&(c.fatal=console.error?console.error.bind(console,l("FATAL"),"color: orange"):console.log.bind(console,"",l("FATAL"))),t<=s.error&&(c.error=console.error?console.error.bind(console,l("ERROR"),"color: orange"):console.log.bind(console,"",l("ERROR"))),t<=s.warn&&(c.warn=console.warn?console.warn.bind(console,l("WARN"),"color: orange"):console.log.bind(console,"",l("WARN"))),t<=s.info&&(c.info=console.info?console.info.bind(console,l("INFO"),"color: lightblue"):console.log.bind(console,"",l("INFO"))),t<=s.debug&&(c.debug=console.debug?console.debug.bind(console,l("DEBUG"),"color: lightgreen"):console.log.bind(console,"",l("DEBUG")))},l=function(t){var e=o()().format("ss.SSS");return"%c".concat(e," : ").concat(t," : ")},h=n(0),f=n(170),d=n.n(f),p=n(36),y=n(71),g=function(t){for(var e="",n=0;n>=0;){if(!((n=t.indexOf("<script"))>=0)){e+=t,n=-1;break}e+=t.substr(0,n),(n=(t=t.substr(n+1)).indexOf("<\/script>"))>=0&&(n+=9,t=t.substr(n))}return e},v=/<br\s*\/?>/gi,m=function(t){return t.replace(v,"#br#")},b=function(t){return t.replace(/#br#/g,"<br/>")},x={getRows:function(t){if(!t)return 1;var e=m(t);return(e=e.replace(/\\n/g,"#br#")).split("#br#")},sanitizeText:function(t,e){var n=t,r=!0;if(!e.flowchart||!1!==e.flowchart.htmlLabels&&"false"!==e.flowchart.htmlLabels||(r=!1),r){var i=e.securityLevel;"antiscript"===i?n=g(n):"loose"!==i&&(n=(n=(n=m(n)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),n=b(n))}return n},hasBreaks:function(t){return/<br\s*[/]?>/gi.test(t)},splitBreaks:function(t){return t.split(/<br\s*[/]?>/gi)},lineBreakRegex:v,removeScript:g,getUrl:function(t){var e="";return t&&(e=(e=(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e}};function _(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function k(t){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function w(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var E={curveBasis:h.curveBasis,curveBasisClosed:h.curveBasisClosed,curveBasisOpen:h.curveBasisOpen,curveLinear:h.curveLinear,curveLinearClosed:h.curveLinearClosed,curveMonotoneX:h.curveMonotoneX,curveMonotoneY:h.curveMonotoneY,curveNatural:h.curveNatural,curveStep:h.curveStep,curveStepAfter:h.curveStepAfter,curveStepBefore:h.curveStepBefore},T=/[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,C=/\s*(?:(?:(\w+)(?=:):|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,S=/\s*%%.*\n/gm,A=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var n=new RegExp("[%]{2}(?![{]".concat(C.source,")(?=[}][%]{2}).*\n"),"ig");t=t.trim().replace(n,"").replace(/'/gm,'"'),c.debug("Detecting diagram directive".concat(null!==e?" type:"+e:""," based on the text:").concat(t));for(var r,i=[];null!==(r=T.exec(t));)if(r.index===T.lastIndex&&T.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){var a=r[1]?r[1]:r[2],o=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:a,args:o})}return 0===i.length&&i.push({type:t,args:null}),1===i.length?i[0]:i}catch(n){return c.error("ERROR: ".concat(n.message," - Unable to parse directive\n ").concat(null!==e?" type:"+e:""," based on the text:").concat(t)),{type:null,args:null}}},M=function(t,e){return t=t.replace(T,"").replace(S,"\n"),c.debug("Detecting diagram type based on the text "+t),t.match(/^\s*sequenceDiagram/)?"sequence":t.match(/^\s*gantt/)?"gantt":t.match(/^\s*classDiagram-v2/)?"classDiagram":t.match(/^\s*classDiagram/)?e&&e.class&&"dagre-wrapper"===e.class.defaultRenderer?"classDiagram":"class":t.match(/^\s*stateDiagram-v2/)?"stateDiagram":t.match(/^\s*stateDiagram/)?e&&e.class&&"dagre-wrapper"===e.state.defaultRenderer?"stateDiagram":"state":t.match(/^\s*gitGraph/)?"git":t.match(/^\s*flowchart/)?"flowchart-v2":t.match(/^\s*info/)?"info":t.match(/^\s*pie/)?"pie":t.match(/^\s*erDiagram/)?"er":t.match(/^\s*journey/)?"journey":t.match(/^\s*requirement/)||t.match(/^\s*requirementDiagram/)?"requirement":e&&e.flowchart&&"dagre-wrapper"===e.flowchart.defaultRenderer?"flowchart-v2":"flowchart"},O=function(t,e){var n={};return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=e?e.apply(void 0,i):i[0];if(o in n)return n[o];var s=t.apply(void 0,i);return n[o]=s,s}},B=function(t,e){if(!t)return e;var n="curve".concat(t.charAt(0).toUpperCase()+t.slice(1));return E[n]||e},N=function(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0},D=function(t){for(var e="",n="",r=0;r<t.length;r++)void 0!==t[r]&&(t[r].startsWith("color:")||t[r].startsWith("text-align:")?n=n+t[r]+";":e=e+t[r]+";");return{style:e,labelStyle:n}},L=0,I=function(){return L++,"id-"+Math.random().toString(36).substr(2,12)+"-"+L};var R=function(t){return function(t){for(var e="",n="0123456789abcdef".length,r=0;r<t;r++)e+="0123456789abcdef".charAt(Math.floor(Math.random()*n));return e}(t.length)},F=function t(e,n,r){var i=Object.assign({depth:2,clobber:!1},r),a=i.depth,o=i.clobber;return Array.isArray(n)&&!Array.isArray(e)?(n.forEach((function(n){return t(e,n,r)})),e):Array.isArray(n)&&Array.isArray(e)?(n.forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),e):void 0===e||a<=0?null!=e&&"object"===k(e)&&"object"===k(n)?Object.assign(e,n):n:(void 0!==n&&"object"===k(e)&&"object"===k(n)&&Object.keys(n).forEach((function(r){"object"!==k(n[r])||void 0!==e[r]&&"object"!==k(e[r])?(o||"object"!==k(e[r])&&"object"!==k(n[r]))&&(e[r]=n[r]):(void 0===e[r]&&(e[r]=Array.isArray(n[r])?[]:{}),e[r]=t(e[r],n[r],{depth:a-1,clobber:o}))})),e)},P=function(t,e){var n=e.text.replace(x.lineBreakRegex," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.style("text-anchor",e.anchor),r.style("font-family",e.fontFamily),r.style("font-size",e.fontSize),r.style("font-weight",e.fontWeight),r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.attr("fill",e.fill),i.text(n),r},j=O((function(t,e,n){if(!t)return t;if(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},n),x.lineBreakRegex.test(t))return t;var r=t.split(" "),i=[],a="";return r.forEach((function(t,o){var s=z("".concat(t," "),n),c=z(a,n);if(s>e){var u=Y(t,e,"-",n),l=u.hyphenatedStrings,h=u.remainingWord;i.push.apply(i,[a].concat(w(l))),a=h}else c+s>=e?(i.push(a),a=t):a=[a,t].filter(Boolean).join(" ");o+1===r.length&&i.push(a)})),i.filter((function(t){return""!==t})).join(n.joinWith)}),(function(t,e,n){return"".concat(t,"-").concat(e,"-").concat(n.fontSize,"-").concat(n.fontWeight,"-").concat(n.fontFamily,"-").concat(n.joinWith)})),Y=O((function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);var i=t.split(""),a=[],o="";return i.forEach((function(t,s){var c="".concat(o).concat(t);if(z(c,r)>=e){var u=s+1,l=i.length===u,h="".concat(c).concat(n);a.push(l?c:h),o=""}else o=c})),{hyphenatedStrings:a,remainingWord:o}}),(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;return"".concat(t,"-").concat(e,"-").concat(n,"-").concat(r.fontSize,"-").concat(r.fontWeight,"-").concat(r.fontFamily)})),z=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),U(t,e).width},U=O((function(t,e){var n=e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),r=n.fontSize,i=n.fontFamily,a=n.fontWeight;if(!t)return{width:0,height:0};var o=["sans-serif",i],s=t.split(x.lineBreakRegex),c=[],u=Object(h.select)("body");if(!u.remove)return{width:0,height:0,lineHeight:0};for(var l=u.append("svg"),f=0,d=o;f<d.length;f++){var p=d[f],y=0,g={width:0,height:0,lineHeight:0},v=!0,m=!1,b=void 0;try{for(var _,k=s[Symbol.iterator]();!(v=(_=k.next()).done);v=!0){var w=_.value,E={x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0};E.text=w;var T=P(l,E).style("font-size",r).style("font-weight",a).style("font-family",p),C=(T._groups||T)[0][0].getBBox();g.width=Math.round(Math.max(g.width,C.width)),y=Math.round(C.height),g.height+=y,g.lineHeight=Math.round(Math.max(g.lineHeight,y))}}catch(t){m=!0,b=t}finally{try{v||null==k.return||k.return()}finally{if(m)throw b}}c.push(g)}return l.remove(),c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]}),(function(t,e){return"".concat(t,"-").concat(e.fontSize,"-").concat(e.fontWeight,"-").concat(e.fontFamily)})),$=function(t,e,n){var r=new Map;return r.set("height",t),n?(r.set("width","100%"),r.set("style","max-width: ".concat(e,"px;"))):r.set("width",e),r},q=function(t,e,n,r){!function(t,e){var n=!0,r=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;t.attr(s[0],s[1])}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}}(t,$(e,n,r))},W={assignWithDepth:F,wrapLabel:j,calculateTextHeight:function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),U(t,e).height},calculateTextWidth:z,calculateTextDimensions:U,calculateSvgSizeAttrs:$,configureSvgSize:q,detectInit:function(t,e){var n=A(t,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){var i=n.map((function(t){return t.args}));r=F(r,w(i))}else r=n.args;if(r){var a=M(t,e);["config"].forEach((function(t){void 0!==r[t]&&("flowchart-v2"===a&&(a="flowchart"),r[a]=r[t],delete r[t])}))}return r},detectDirective:A,detectType:M,isSubstringInArray:function(t,e){for(var n=0;n<e.length;n++)if(e[n].match(t))return n;return-1},interpolateToCurve:B,calcLabelPosition:function(t){return function(t){var e,n=0;t.forEach((function(t){n+=N(t,e),e=t}));var r=n/2,i=void 0;return e=void 0,t.forEach((function(t){if(e&&!i){var n=N(t,e);if(n<r)r-=n;else{var a=r/n;a<=0&&(i=e),a>=1&&(i={x:t.x,y:t.y}),a>0&&a<1&&(i={x:(1-a)*e.x+a*t.x,y:(1-a)*e.y+a*t.y})}}e=t})),i}(t)},calcCardinalityPosition:function(t,e,n){var r;c.info("our points",e),e[0]!==n&&(e=e.reverse()),e.forEach((function(t){N(t,r),r=t}));var i,a=25;r=void 0,e.forEach((function(t){if(r&&!i){var e=N(t,r);if(e<a)a-=e;else{var n=a/e;n<=0&&(i=r),n>=1&&(i={x:t.x,y:t.y}),n>0&&n<1&&(i={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));var o=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),u={x:0,y:0};return u.x=Math.sin(s)*o+(e[0].x+i.x)/2,u.y=-Math.cos(s)*o+(e[0].y+i.y)/2,u},calcTerminalLabelPosition:function(t,e,n){var r,i=JSON.parse(JSON.stringify(n));c.info("our points",i),"start_left"!==e&&"start_right"!==e&&(i=i.reverse()),i.forEach((function(t){N(t,r),r=t}));var a,o=25;r=void 0,i.forEach((function(t){if(r&&!a){var e=N(t,r);if(e<o)o-=e;else{var n=o/e;n<=0&&(a=r),n>=1&&(a={x:t.x,y:t.y}),n>0&&n<1&&(a={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));var s=10,u=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return l.x=Math.sin(u)*s+(i[0].x+a.x)/2,l.y=-Math.cos(u)*s+(i[0].y+a.y)/2,"start_left"===e&&(l.x=Math.sin(u+Math.PI)*s+(i[0].x+a.x)/2,l.y=-Math.cos(u+Math.PI)*s+(i[0].y+a.y)/2),"end_right"===e&&(l.x=Math.sin(u-Math.PI)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(u-Math.PI)*s+(i[0].y+a.y)/2-5),"end_left"===e&&(l.x=Math.sin(u)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(u)*s+(i[0].y+a.y)/2-5),l},formatUrl:function(t,e){var n=t.trim();if(n)return"loose"!==e.securityLevel?Object(y.sanitizeUrl)(n):n},getStylesFromArray:D,generateId:I,random:R,memoize:O,runFunc:function(t){for(var e,n=t.split("."),r=n.length-1,i=n[r],a=window,o=0;o<r;o++)if(!(a=a[n[o]]))return;for(var s=arguments.length,c=new Array(s>1?s-1:0),u=1;u<s;u++)c[u-1]=arguments[u];(e=a)[i].apply(e,c)},initIdGeneratior:function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.deterministic=e,this.seed=n,this.count=n?n.length:0}var e,n,r;return e=t,(n=[{key:"next",value:function(){return this.deterministic?this.count++:Date.now()}}])&&_(e.prototype,n),r&&_(e,r),t}()},V=n(1),H=function(t,e){return e?Object(V.adjust)(t,{s:-40,l:10}):Object(V.adjust)(t,{s:-40,l:-10})};function G(t){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function X(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Z=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.darkMode=!1,this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#ddd":"#333"),this.secondaryColor=this.secondaryColor||Object(V.adjust)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Object(V.adjust)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||H(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||H(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||H(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Object(V.invert)(this.tertiaryColor),this.lineColor=this.lineColor||Object(V.invert)(this.background),this.textColor=this.textColor||this.primaryTextColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Object(V.darken)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Object(V.darken)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Object(V.invert)(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Object(V.lighten)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Object(V.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Object(V.adjust)(this.primaryColor,{l:-10}),this.pie5=this.pie5||Object(V.adjust)(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Object(V.adjust)(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Object(V.adjust)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Object(V.adjust)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Object(V.adjust)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Object(V.adjust)(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Object(V.adjust)(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Object(V.adjust)(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Object(V.darken)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===G(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&X(e.prototype,n),r&&X(e,r),t}();function Q(t){return(Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function K(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var J=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Object(V.lighten)(this.primaryColor,16),this.tertiaryColor=Object(V.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=H(this.primaryColor,this.darkMode),this.secondaryBorderColor=H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=H(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(V.invert)(this.primaryColor),this.secondaryTextColor=Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=Object(V.invert)(this.tertiaryColor),this.lineColor=Object(V.invert)(this.background),this.textColor=Object(V.invert)(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Object(V.lighten)(Object(V.invert)("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=Object(V.rgba)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Object(V.darken)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=Object(V.rgba)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Object(V.rgba)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){this.secondBkg=Object(V.lighten)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=Object(V.lighten)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=Object(V.lighten)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(V.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||"#0b0000",this.pie2=this.pie2||"#4d1037",this.pie3=this.pie3||"#3f5258",this.pie4=this.pie4||"#4f2f1b",this.pie5=this.pie5||"#6e0a0a",this.pie6=this.pie6||"#3b0048",this.pie7=this.pie7||"#995a01",this.pie8=this.pie8||"#154706",this.pie9=this.pie9||"#161722",this.pie10=this.pie10||"#00296f",this.pie11=this.pie11||"#01629c",this.pie12=this.pie12||"#010029",this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Object(V.darken)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===Q(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&K(e.prototype,n),r&&K(e,r),t}();function tt(t){return(tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function et(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var nt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Object(V.adjust)(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Object(V.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=H(this.primaryColor,this.darkMode),this.secondaryBorderColor=H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=H(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(V.invert)(this.primaryColor),this.secondaryTextColor=Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=Object(V.invert)(this.tertiaryColor),this.lineColor=Object(V.invert)(this.background),this.textColor=Object(V.invert)(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=Object(V.rgba)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=Object(V.lighten)(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(V.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||Object(V.adjust)(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||Object(V.adjust)(this.primaryColor,{l:-10}),this.pie5=this.pie5||Object(V.adjust)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Object(V.adjust)(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||Object(V.adjust)(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||Object(V.adjust)(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||Object(V.adjust)(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||Object(V.adjust)(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||Object(V.adjust)(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||Object(V.adjust)(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===tt(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&et(e.prototype,n),r&&et(e,r),t}();function rt(t){return(rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function it(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var at=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=Object(V.lighten)("#cde498",10),this.primaryBorderColor=H(this.primaryColor,this.darkMode),this.secondaryBorderColor=H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=H(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(V.invert)(this.primaryColor),this.secondaryTextColor=Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=Object(V.invert)(this.primaryColor),this.lineColor=Object(V.invert)(this.background),this.textColor=Object(V.invert)(this.background),this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=Object(V.darken)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(V.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Object(V.adjust)(this.primaryColor,{l:-30}),this.pie5=this.pie5||Object(V.adjust)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Object(V.adjust)(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||Object(V.adjust)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Object(V.adjust)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Object(V.adjust)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Object(V.adjust)(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||Object(V.adjust)(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||Object(V.adjust)(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===rt(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&it(e.prototype,n),r&&it(e,r),t}();function ot(t){return(ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function st(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var ct=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Object(V.lighten)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Object(V.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=H(this.primaryColor,this.darkMode),this.secondaryBorderColor=H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=H(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(V.invert)(this.primaryColor),this.secondaryTextColor=Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=Object(V.invert)(this.tertiaryColor),this.lineColor=Object(V.invert)(this.background),this.textColor=Object(V.invert)(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){this.secondBkg=Object(V.lighten)(this.contrast,55),this.border2=this.contrast,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=Object(V.lighten)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.sectionBkgColor=Object(V.lighten)(this.contrast,30),this.sectionBkgColor2=Object(V.lighten)(this.contrast,30),this.taskBorderColor=Object(V.darken)(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=Object(V.lighten)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Object(V.darken)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(V.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||"#F4F4F4",this.pie2=this.pie2||"#555",this.pie3=this.pie3||"#BBB",this.pie4=this.pie4||"#777",this.pie5=this.pie5||"#999",this.pie6=this.pie6||"#DDD",this.pie7=this.pie7||"#FFF",this.pie8=this.pie8||"#DDD",this.pie9=this.pie9||"#BBB",this.pie10=this.pie10||"#999",this.pie11=this.pie11||"#777",this.pie12=this.pie12||"#555",this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===ot(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&st(e.prototype,n),r&&st(e,r),t}(),ut={base:{getThemeVariables:function(t){var e=new Z;return e.calculate(t),e}},dark:{getThemeVariables:function(t){var e=new J;return e.calculate(t),e}},default:{getThemeVariables:function(t){var e=new nt;return e.calculate(t),e}},forest:{getThemeVariables:function(t){var e=new at;return e.calculate(t),e}},neutral:{getThemeVariables:function(t){var e=new ct;return e.calculate(t),e}}},lt={theme:"default",themeVariables:ut.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-d3"},sequence:{activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open-Sans", "sans-serif"',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open-Sans", "sans-serif"',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{arrowMarkerAbsolute:!1,useMaxWidth:!0,defaultRenderer:"dagre-d3"},git:{arrowMarkerAbsolute:!1,useWidth:void 0,useMaxWidth:!0},state:{dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,useMaxWidth:!0,defaultRenderer:"dagre-d3"},er:{diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20}};lt.class.arrowMarkerAbsolute=lt.arrowMarkerAbsolute,lt.git.arrowMarkerAbsolute=lt.arrowMarkerAbsolute;var ht=lt;function ft(t){return(ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var dt,pt=Object.freeze(ht),yt=F({},pt),gt=[],vt=F({},pt),mt=function(t,e){for(var n=F({},t),r={},i=0;i<e.length;i++){var a=e[i];_t(a),r=F(r,a)}if(n=F(n,r),r.theme){var o=F({},dt),s=F(o.themeVariables||{},r.themeVariables);n.themeVariables=ut[n.theme].getThemeVariables(s)}return vt=n,n},bt=function(){return F({},yt)},xt=function(){return F({},vt)},_t=function t(e){Object.keys(yt.secure).forEach((function(t){void 0!==e[yt.secure[t]]&&(c.debug("Denied attempt to modify a secure key ".concat(yt.secure[t]),e[yt.secure[t]]),delete e[yt.secure[t]])})),Object.keys(e).forEach((function(t){0===t.indexOf("__")&&delete e[t]})),Object.keys(e).forEach((function(n){"string"==typeof e[n]&&(e[n].indexOf("<")>-1||e[n].indexOf(">")>-1||e[n].indexOf("url(data:")>-1)&&delete e[n],"object"===ft(e[n])&&t(e[n])}))},kt=function(t){t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),gt.push(t),mt(yt,gt)},wt=function(){mt(yt,gt=[])};function Et(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Tt=[],Ct={},St=0,At=[],Mt=function(t){var e="",n=t;if(t.indexOf("~")>0){var r=t.split("~");n=r[0],e=r[1]}return{className:n,type:e}},Ot=function(t){var e=Mt(t);void 0===Ct[e.className]&&(Ct[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:"classid-"+e.className+"-"+St},St++)},Bt=function(t){for(var e=Object.keys(Ct),n=0;n<e.length;n++)if(Ct[e[n]].id===t)return Ct[e[n]].domId},Nt=function(t,e){var n=Mt(t).className,r=Ct[n];if("string"==typeof e){var i=e.trim();i.startsWith("<<")&&i.endsWith(">>")?r.annotations.push(i.substring(2,i.length-2)):i.indexOf(")")>0?r.methods.push(i):i&&r.members.push(i)}},Dt=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n="classid-"+n),void 0!==Ct[n]&&Ct[n].cssClasses.push(e)}))},Lt=function(t,e,n){var r=xt(),i=t,a=Bt(i);if("loose"===r.securityLevel&&void 0!==e&&void 0!==Ct[i]){var o=[];if("string"==typeof n){o=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var s=0;s<o.length;s++){var c=o[s].trim();'"'===c.charAt(0)&&'"'===c.charAt(c.length-1)&&(c=c.substr(1,c.length-2)),o[s]=c}}0===o.length&&o.push(a),At.push((function(){var t=document.querySelector('[id="'.concat(a,'"]'));null!==t&&t.addEventListener("click",(function(){W.runFunc.apply(W,[e].concat(Et(o)))}),!1)}))}},It={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},Rt=function(t){var e=Object(h.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(h.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(h.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(h.select)(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(h.select)(this).classed("hover",!1)}))};At.push(Rt);var Ft={parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().class},addClass:Ot,bindFunctions:function(t){At.forEach((function(e){e(t)}))},clear:function(){Tt=[],Ct={},(At=[]).push(Rt)},getClass:function(t){return Ct[t]},getClasses:function(){return Ct},addAnnotation:function(t,e){var n=Mt(t).className;Ct[n].annotations.push(e)},getRelations:function(){return Tt},addRelation:function(t){c.debug("Adding relation: "+JSON.stringify(t)),Ot(t.id1),Ot(t.id2),t.id1=Mt(t.id1).className,t.id2=Mt(t.id2).className,Tt.push(t)},addMember:Nt,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((function(e){return Nt(t,e)})))},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(1).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:It,setClickEvent:function(t,e,n){t.split(",").forEach((function(t){Lt(t,e,n),Ct[t].haveCallback=!0})),Dt(t,"clickable")},setCssClass:Dt,setLink:function(t,e,n){var r=xt();t.split(",").forEach((function(t){var i=t;t[0].match(/\d/)&&(i="classid-"+i),void 0!==Ct[i]&&(Ct[i].link=W.formatUrl(e,r),Ct[i].linkTarget="string"==typeof n?n:"_blank")})),Dt(t,"clickable")},setTooltip:function(t,e){var n=xt();t.split(",").forEach((function(t){void 0!==e&&(Ct[t].tooltip=x.sanitizeText(e,n))}))},lookUpDomId:Bt},Pt=n(9),jt=n.n(Pt),Yt=n(3),zt=n.n(Yt),Ut=n(15),$t=n.n(Ut),qt=0,Wt=function(t){var e=t.match(/(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+)/),n=t.match(/^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/);return e&&!n?Vt(e):n?Ht(n):Gt(t)},Vt=function(t){var e="";try{e=(t[1]?t[1].trim():"")+(t[2]?t[2].trim():"")+(t[3]?Zt(t[3].trim()):"")+" "+(t[4]?t[4].trim():"")}catch(n){e=t}return{displayText:e,cssStyle:""}},Ht=function(t){var e="",n="";try{var r=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",a=t[3]?Zt(t[3].trim()):"",o=t[4]?t[4].trim():"";n=r+i+"("+a+")"+(t[5]?" : "+Zt(t[5]).trim():""),e=Qt(o)}catch(e){n=t}return{displayText:n,cssStyle:e}},Gt=function(t){var e="",n="",r="",i=t.indexOf("("),a=t.indexOf(")");if(i>1&&a>i&&a<=t.length){var o="",s="",c=t.substring(0,1);c.match(/\w/)?s=t.substring(0,i).trim():(c.match(/\+|-|~|#/)&&(o=c),s=t.substring(1,i).trim());var u=t.substring(i+1,a),l=t.substring(a+1,1);n=Qt(l),e=o+s+"("+Zt(u.trim())+")",a<"".length&&""!==(r=t.substring(a+2).trim())&&(r=" : "+Zt(r))}else e=Zt(t);return{displayText:e,cssStyle:n}},Xt=function(t,e,n,r){var i=Wt(e),a=t.append("tspan").attr("x",r.padding).text(i.displayText);""!==i.cssStyle&&a.attr("style",i.cssStyle),n||a.attr("dy",r.textHeight)},Zt=function t(e){var n=e;return-1!=e.indexOf("~")?t(n=(n=n.replace("~","<")).replace("~",">")):n},Qt=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},Kt=function(t,e,n){c.info("Rendering class "+e);var r,i=e.id,a={id:i,label:e.id,width:0,height:0},o=t.append("g").attr("id",Bt(i)).attr("class","classGroup");r=e.link?o.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",n.textHeight+n.padding).attr("x",0):o.append("text").attr("y",n.textHeight+n.padding).attr("x",0);var s=!0;e.annotations.forEach((function(t){var e=r.append("tspan").text("«"+t+"»");s||e.attr("dy",n.textHeight),s=!1}));var u=e.id;void 0!==e.type&&""!==e.type&&(u+="<"+e.type+">");var l=r.append("tspan").text(u).attr("class","title");s||l.attr("dy",n.textHeight);var h=r.node().getBBox().height,f=o.append("line").attr("x1",0).attr("y1",n.padding+h+n.dividerMargin/2).attr("y2",n.padding+h+n.dividerMargin/2),d=o.append("text").attr("x",n.padding).attr("y",h+n.dividerMargin+n.textHeight).attr("fill","white").attr("class","classText");s=!0,e.members.forEach((function(t){Xt(d,t,s,n),s=!1}));var p=d.node().getBBox(),y=o.append("line").attr("x1",0).attr("y1",n.padding+h+n.dividerMargin+p.height).attr("y2",n.padding+h+n.dividerMargin+p.height),g=o.append("text").attr("x",n.padding).attr("y",h+2*n.dividerMargin+p.height+n.textHeight).attr("fill","white").attr("class","classText");s=!0,e.methods.forEach((function(t){Xt(g,t,s,n),s=!1}));var v=o.node().getBBox(),m=" ";e.cssClasses.length>0&&(m+=e.cssClasses.join(" "));var b=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",v.width+2*n.padding).attr("height",v.height+n.padding+.5*n.dividerMargin).attr("class",m).node().getBBox().width;return r.node().childNodes.forEach((function(t){t.setAttribute("x",(b-t.getBBox().width)/2)})),e.tooltip&&r.insert("title").text(e.tooltip),f.attr("x2",b),y.attr("x2",b),a.width=b,a.height=v.height+n.padding+.5*n.dividerMargin,a},Jt=function(t,e,n,r){var i=function(t){switch(t){case It.AGGREGATION:return"aggregation";case It.EXTENSION:return"extension";case It.COMPOSITION:return"composition";case It.DEPENDENCY:return"dependency"}};e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var a,o,s=e.points,u=Object(h.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(h.curveBasis),l=t.append("path").attr("d",u(s)).attr("id","edge"+qt).attr("class","relation"),f="";r.arrowMarkerAbsolute&&(f=(f=(f=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),1==n.relation.lineType&&l.attr("class","relation dashed-line"),"none"!==n.relation.type1&&l.attr("marker-start","url("+f+"#"+i(n.relation.type1)+"Start)"),"none"!==n.relation.type2&&l.attr("marker-end","url("+f+"#"+i(n.relation.type2)+"End)");var d,p,y,g,v=e.points.length,m=W.calcLabelPosition(e.points);if(a=m.x,o=m.y,v%2!=0&&v>1){var b=W.calcCardinalityPosition("none"!==n.relation.type1,e.points,e.points[0]),x=W.calcCardinalityPosition("none"!==n.relation.type2,e.points,e.points[v-1]);c.debug("cardinality_1_point "+JSON.stringify(b)),c.debug("cardinality_2_point "+JSON.stringify(x)),d=b.x,p=b.y,y=x.x,g=x.y}if(void 0!==n.title){var _=t.append("g").attr("class","classLabel"),k=_.append("text").attr("class","label").attr("x",a).attr("y",o).attr("fill","red").attr("text-anchor","middle").text(n.title);window.label=k;var w=k.node().getBBox();_.insert("rect",":first-child").attr("class","box").attr("x",w.x-r.padding/2).attr("y",w.y-r.padding/2).attr("width",w.width+r.padding).attr("height",w.height+r.padding)}(c.info("Rendering relation "+JSON.stringify(n)),void 0!==n.relationTitle1&&"none"!==n.relationTitle1)&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",d).attr("y",p).attr("fill","black").attr("font-size","6").text(n.relationTitle1);void 0!==n.relationTitle2&&"none"!==n.relationTitle2&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",y).attr("y",g).attr("fill","black").attr("font-size","6").text(n.relationTitle2);qt++};Ut.parser.yy=Ft;var te={},ee={dividerMargin:10,padding:5,textHeight:10},ne=function(t){for(var e=Object.keys(te),n=0;n<e.length;n++)if(te[e[n]].label===t)return e[n]},re=function(t){Object.keys(t).forEach((function(e){ee[e]=t[e]}))},ie=function(t,e){te={},Ut.parser.yy.clear(),Ut.parser.parse(t),c.info("Rendering diagram "+t);var n,r=Object(h.select)("[id='".concat(e,"']"));r.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),(n=r).append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),n.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),n.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");var i=new zt.a.Graph({multigraph:!0});i.setGraph({isMultiGraph:!0}),i.setDefaultEdgeLabel((function(){return{}}));for(var a=Ft.getClasses(),o=Object.keys(a),s=0;s<o.length;s++){var u=a[o[s]],l=Kt(r,u,ee);te[l.id]=l,i.setNode(l.id,l),c.info("Org height: "+l.height)}Ft.getRelations().forEach((function(t){c.info("tjoho"+ne(t.id1)+ne(t.id2)+JSON.stringify(t)),i.setEdge(ne(t.id1),ne(t.id2),{relation:t},t.title||"DEFAULT")})),jt.a.layout(i),i.nodes().forEach((function(t){void 0!==t&&void 0!==i.node(t)&&(c.debug("Node "+t+": "+JSON.stringify(i.node(t))),Object(h.select)("#"+Bt(t)).attr("transform","translate("+(i.node(t).x-i.node(t).width/2)+","+(i.node(t).y-i.node(t).height/2)+" )"))})),i.edges().forEach((function(t){void 0!==t&&void 0!==i.edge(t)&&(c.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(i.edge(t))),Jt(r,i.edge(t),i.edge(t).relation,ee))}));var f=r.node().getBBox(),d=f.width+40,p=f.height+40;q(r,p,d,ee.useMaxWidth);var y="".concat(f.x-20," ").concat(f.y-20," ").concat(d," ").concat(p);c.debug("viewBox ".concat(y)),r.attr("viewBox",y)},ae={extension:function(t,e,n){c.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:function(t,e){t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:function(t,e){t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:function(t,e){t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},point:function(t,e){t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:function(t,e){t.append("marker").attr("id",e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:function(t,e){t.append("marker").attr("id",e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:function(t,e){t.append("defs").append("marker").attr("id",e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}},oe=function(t,e,n,r){e.forEach((function(e){ae[e](t,n,r)}))};function se(t){return(se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ce=function(t,e,n,r){var i=t||"";if("object"===se(i)&&(i=i[0]),xt().flowchart.htmlLabels)return i=i.replace(/\\n|\n/g,"<br />"),c.info("vertexText"+i),function(t){var e,n,r=Object(h.select)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),i=r.append("xhtml:div"),a=t.label,o=t.isNode?"nodeLabel":"edgeLabel";return i.html('<span class="'+o+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+a+"</span>"),e=i,(n=t.labelStyle)&&e.attr("style",n),i.style("display","inline-block"),i.style("white-space","nowrap"),i.attr("xmlns","http://www.w3.org/1999/xhtml"),r.node()}({isNode:r,label:i.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")})),labelStyle:e.replace("fill:","color:")});var a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));var o=[];o="string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[];for(var s=0;s<o.length;s++){var u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),n?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=o[s].trim(),a.appendChild(u)}return a},ue=function(t,e,n,r){var i;i=n||"node default";var a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=a.insert("g").attr("class","label").attr("style",e.labelStyle),s=o.node().appendChild(ce(e.labelText,e.labelStyle,!1,r)),c=s.getBBox();if(xt().flowchart.htmlLabels){var u=s.children[0],l=Object(h.select)(s);c=u.getBoundingClientRect(),l.attr("width",c.width),l.attr("height",c.height)}var f=e.padding/2;return o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),{shapeSvg:a,bbox:c,halfPadding:f,label:o}},le=function(t,e){var n=e.node().getBBox();t.width=n.width,t.height=n.height};function he(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}var fe={},de={},pe={},ye=function(t,e){return c.trace("In isDecendant",e," ",t," = ",de[e].indexOf(t)>=0),de[e].indexOf(t)>=0},ge=function t(e,n,r,i){c.warn("Copying children of ",e,"root",i,"data",n.node(e),i);var a=n.children(e)||[];e!==i&&a.push(e),c.warn("Copying (nodes) clusterId",e,"nodes",a),a.forEach((function(a){if(n.children(a).length>0)t(a,n,r,i);else{var o=n.node(a);c.info("cp ",a," to ",i," with parent ",e),r.setNode(a,o),i!==n.parent(a)&&(c.warn("Setting parent",a,n.parent(a)),r.setParent(a,n.parent(a))),e!==i&&a!==e?(c.debug("Setting parent",a,e),r.setParent(a,e)):(c.info("In copy ",e,"root",i,"data",n.node(e),i),c.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));var s=n.edges(a);c.debug("Copying Edges",s),s.forEach((function(t){c.info("Edge",t);var a=n.edge(t.v,t.w,t.name);c.info("Edge data",a,i);try{!function(t,e){return c.info("Decendants of ",e," is ",de[e]),c.info("Edge is ",t),t.v!==e&&(t.w!==e&&(de[e]?(c.info("Here "),de[e].indexOf(t.v)>=0||(!!ye(t.v,e)||(!!ye(t.w,e)||de[e].indexOf(t.w)>=0))):(c.debug("Tilt, ",e,",not in decendants"),!1)))}(t,i)?c.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",i," clusterId:",e):(c.info("Copying as ",t.v,t.w,a,t.name),r.setEdge(t.v,t.w,a,t.name),c.info("newGraph edges ",r.edges(),r.edge(r.edges()[0])))}catch(t){c.error(t)}}))}c.debug("Removing node",a),n.removeNode(a)}))},ve=function t(e,n){c.trace("Searching",e);var r=n.children(e);if(c.trace("Searching children of id ",e,r),r.length<1)return c.trace("This is a valid node",e),e;for(var i=0;i<r.length;i++){var a=t(r[i],n);if(a)return c.trace("Found replacement for",e," => ",a),a}},me=function(t){return fe[t]&&fe[t].externalConnections&&fe[t]?fe[t].id:t},be=function(t,e){!t||e>10?c.debug("Opting out, no graph "):(c.debug("Opting in, graph "),t.nodes().forEach((function(e){t.children(e).length>0&&(c.warn("Cluster identified",e," Replacement id in edges: ",ve(e,t)),de[e]=function t(e,n){for(var r=n.children(e),i=[].concat(r),a=0;a<r.length;a++)pe[r[a]]=e,i=i.concat(t(r[a],n));return i}(e,t),fe[e]={id:ve(e,t),clusterData:t.node(e)})})),t.nodes().forEach((function(e){var n=t.children(e),r=t.edges();n.length>0?(c.debug("Cluster identified",e,de),r.forEach((function(t){t.v!==e&&t.w!==e&&(ye(t.v,e)^ye(t.w,e)&&(c.warn("Edge: ",t," leaves cluster ",e),c.warn("Decendants of XXX ",e,": ",de[e]),fe[e].externalConnections=!0))}))):c.debug("Not a cluster ",e,de)})),t.edges().forEach((function(e){var n=t.edge(e);c.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),c.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));var r=e.v,i=e.w;c.warn("Fix XXX",fe,"ids:",e.v,e.w,"Translateing: ",fe[e.v]," --- ",fe[e.w]),(fe[e.v]||fe[e.w])&&(c.warn("Fixing and trixing - removing XXX",e.v,e.w,e.name),r=me(e.v),i=me(e.w),t.removeEdge(e.v,e.w,e.name),r!==e.v&&(n.fromCluster=e.v),i!==e.w&&(n.toCluster=e.w),c.warn("Fix Replacing with XXX",r,i,e.name),t.setEdge(r,i,n,e.name))})),c.warn("Adjusted Graph",zt.a.json.write(t)),xe(t,0),c.trace(fe))},xe=function t(e,n){if(c.warn("extractor - ",n,zt.a.json.write(e),e.children("D")),n>10)c.error("Bailing out");else{for(var r=e.nodes(),i=!1,a=0;a<r.length;a++){var o=r[a],s=e.children(o);i=i||s.length>0}if(i){c.debug("Nodes = ",r,n);for(var u=0;u<r.length;u++){var l=r[u];if(c.debug("Extracting node",l,fe,fe[l]&&!fe[l].externalConnections,!e.parent(l),e.node(l),e.children("D")," Depth ",n),fe[l])if(!fe[l].externalConnections&&e.children(l)&&e.children(l).length>0){c.warn("Cluster without external connections, without a parent and with children",l,n);var h="TB"===e.graph().rankdir?"LR":"TB";fe[l]&&fe[l].clusterData&&fe[l].clusterData.dir&&(h=fe[l].clusterData.dir,c.warn("Fixing dir",fe[l].clusterData.dir,h));var f=new zt.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:h,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));c.warn("Old graph before copy",zt.a.json.write(e)),ge(l,e,f,l),e.setNode(l,{clusterNode:!0,id:l,clusterData:fe[l].clusterData,labelText:fe[l].labelText,graph:f}),c.warn("New graph after copy node: (",l,")",zt.a.json.write(f)),c.debug("Old graph after copy",zt.a.json.write(e))}else c.warn("Cluster ** ",l," **not meeting the criteria !externalConnections:",!fe[l].externalConnections," no parent: ",!e.parent(l)," children ",e.children(l)&&e.children(l).length>0,e.children("D"),n),c.debug(fe);else c.debug("Not a cluster",l,n)}r=e.nodes(),c.warn("New list of nodes",r);for(var d=0;d<r.length;d++){var p=r[d],y=e.node(p);c.warn(" Now next level",p,y),y.clusterNode&&t(y.graph,n+1)}}else c.debug("Done, no node has children",e.nodes())}},_e=function(t){return function t(e,n){if(0===n.length)return[];var r=Object.assign(n);return n.forEach((function(n){var i=e.children(n),a=t(e,i);r=r.concat(a)})),r}(t,t.children())},ke=n(171);var we=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),u=Math.abs(e*n*o/c);r.x<i&&(u=-u);var l=Math.abs(e*n*s/c);return r.y<a&&(l=-l),{x:i+u,y:a+l}};var Ee=function(t,e,n){return we(t,e,e,n)};function Te(t,e){return t*e>0}var Ce=function(t,e,n,r){var i,a,o,s,c,u,l,h,f,d,p,y,g;if(i=e.y-t.y,o=t.x-e.x,c=e.x*t.y-t.x*e.y,f=i*n.x+o*n.y+c,d=i*r.x+o*r.y+c,!(0!==f&&0!==d&&Te(f,d)||(a=r.y-n.y,s=n.x-r.x,u=r.x*n.y-n.x*r.y,l=a*t.x+s*t.y+u,h=a*e.x+s*e.y+u,0!==l&&0!==h&&Te(l,h)||0==(p=i*s-a*o))))return y=Math.abs(p/2),{x:(g=o*u-s*c)<0?(g-y)/p:(g+y)/p,y:(g=a*c-i*u)<0?(g-y)/p:(g+y)/p}},Se=function(t,e,n){var r=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)})):(o=Math.min(o,e.x),s=Math.min(s,e.y));for(var c=r-t.width/2-o,u=i-t.height/2-s,l=0;l<e.length;l++){var h=e[l],f=e[l<e.length-1?l+1:0],d=Ce(t,n,{x:c+h.x,y:u+h.y},{x:c+f.x,y:u+f.y});d&&a.push(d)}if(!a.length)return t;a.length>1&&a.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}));return a[0]};var Ae=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;return Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=0===s?0:u*o/s,r=u):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o),{x:i+n,y:a+r}},Me={node:n.n(ke).a,circle:Ee,ellipse:we,polygon:Se,rect:Ae};function Oe(t){return(Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Be=function(t,e,n){var r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,a=10;"LR"===n&&(i=10,a=70);var o=r.append("rect").style("stroke","black").style("fill","black").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return le(e,o),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Me.rect(e,t)},r},Ne={question:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding+(i.height+e.padding),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];c.info("Question main (Circle)");var s=he(r,a,a,o);return s.attr("style",e.style),le(e,s),e.intersect=function(t){return c.warn("Intersect called"),Me.polygon(e,o,t)},r},rect:function(t,e){var n=ue(t,e,"node "+e.classes,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;c.trace("Classes = ",e.classes);var o=r.insert("rect",":first-child");return o.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),le(e,o),e.intersect=function(t){return Me.rect(e,t)},r},rectWithTitle:function(t,e){var n;n=e.classes?"node "+e.classes:"node default";var r=t.insert("g").attr("class",n).attr("id",e.domId||e.id),i=r.insert("rect",":first-child"),a=r.insert("line"),o=r.insert("g").attr("class","label"),s=e.labelText.flat?e.labelText.flat():e.labelText,u="";u="object"===Oe(s)?s[0]:s,c.info("Label text abc79",u,s,"object"===Oe(s));var l,f=o.node().appendChild(ce(u,e.labelStyle,!0,!0));if(xt().flowchart.htmlLabels){var d=f.children[0],p=Object(h.select)(f);l=d.getBoundingClientRect(),p.attr("width",l.width),p.attr("height",l.height)}c.info("Text 2",s);var y=s.slice(1,s.length),g=f.getBBox(),v=o.node().appendChild(ce(y.join?y.join("<br/>"):y,e.labelStyle,!0,!0));if(xt().flowchart.htmlLabels){var m=v.children[0],b=Object(h.select)(v);l=m.getBoundingClientRect(),b.attr("width",l.width),b.attr("height",l.height)}var x=e.padding/2;return Object(h.select)(v).attr("transform","translate( "+(l.width>g.width?0:(g.width-l.width)/2)+", "+(g.height+x+5)+")"),Object(h.select)(f).attr("transform","translate( "+(l.width<g.width?0:-(g.width-l.width)/2)+", 0)"),l=o.node().getBBox(),o.attr("transform","translate("+-l.width/2+", "+(-l.height/2-x+3)+")"),i.attr("class","outer title-state").attr("x",-l.width/2-x).attr("y",-l.height/2-x).attr("width",l.width+e.padding).attr("height",l.height+e.padding),a.attr("class","divider").attr("x1",-l.width/2-x).attr("x2",l.width/2+x).attr("y1",-l.height/2-x+g.height+x).attr("y2",-l.height/2-x+g.height+x),le(e,i),e.intersect=function(t){return Me.rect(e,t)},r},choice:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}],i=n.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" "));return i.attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return Me.circle(e,14,t)},n},circle:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding,o=r.insert("circle",":first-child");return o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),c.info("Circle main"),le(e,o),e.intersect=function(t){return c.info("Circle intersect",e,i.width/2+a,t),Me.circle(e,i.width/2+a,t)},r},stadium:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.height+e.padding,o=i.width+a/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",a/2).attr("ry",a/2).attr("x",-o/2).attr("y",-a/2).attr("width",o).attr("height",a);return le(e,s),e.intersect=function(t){return Me.rect(e,t)},r},hexagon:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.height+e.padding,o=a/4,s=i.width+2*o+e.padding,c=[{x:o,y:0},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}],u=he(r,s,a,c);return u.attr("style",e.style),le(e,u),e.intersect=function(t){return Me.polygon(e,c,t)},r},rect_left_inv_arrow:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-o/2,y:0},{x:a,y:0},{x:a,y:-o},{x:-o/2,y:-o},{x:0,y:-o/2}];return he(r,a,o,s).attr("style",e.style),e.width=a+o,e.height=o,e.intersect=function(t){return Me.polygon(e,s,t)},r},lean_right:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-2*o/6,y:0},{x:a-o/6,y:0},{x:a+2*o/6,y:-o},{x:o/6,y:-o}],c=he(r,a,o,s);return c.attr("style",e.style),le(e,c),e.intersect=function(t){return Me.polygon(e,s,t)},r},lean_left:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:2*o/6,y:0},{x:a+o/6,y:0},{x:a-2*o/6,y:-o},{x:-o/6,y:-o}],c=he(r,a,o,s);return c.attr("style",e.style),le(e,c),e.intersect=function(t){return Me.polygon(e,s,t)},r},trapezoid:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-2*o/6,y:0},{x:a+2*o/6,y:0},{x:a-o/6,y:-o},{x:o/6,y:-o}],c=he(r,a,o,s);return c.attr("style",e.style),le(e,c),e.intersect=function(t){return Me.polygon(e,s,t)},r},inv_trapezoid:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:o/6,y:0},{x:a-o/6,y:0},{x:a+2*o/6,y:-o},{x:-2*o/6,y:-o}],c=he(r,a,o,s);return c.attr("style",e.style),le(e,c),e.intersect=function(t){return Me.polygon(e,s,t)},r},rect_right_inv_arrow:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:0,y:0},{x:a+o/2,y:0},{x:a,y:-o/2},{x:a+o/2,y:-o},{x:0,y:-o}],c=he(r,a,o,s);return c.attr("style",e.style),le(e,c),e.intersect=function(t){return Me.polygon(e,s,t)},r},cylinder:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=a/2,s=o/(2.5+a/50),c=i.height+s+e.padding,u="M 0,"+s+" a "+o+","+s+" 0,0,0 "+a+" 0 a "+o+","+s+" 0,0,0 "+-a+" 0 l 0,"+c+" a "+o+","+s+" 0,0,0 "+a+" 0 l 0,"+-c,l=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",u).attr("transform","translate("+-a/2+","+-(c/2+s)+")");return le(e,l),e.intersect=function(t){var n=Me.rect(e,t),r=n.x-e.x;if(0!=o&&(Math.abs(r)<e.width/2||Math.abs(r)==e.width/2&&Math.abs(n.y-e.y)>e.height/2-s)){var i=s*s*(1-r*r/(o*o));0!=i&&(i=Math.sqrt(i)),i=s-i,t.y-e.y>0&&(i=-i),n.y+=i}return n},r},start:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),le(e,r),e.intersect=function(t){return Me.circle(e,7,t)},n},end:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child"),i=n.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),le(e,i),e.intersect=function(t){return Me.circle(e,7,t)},n},note:function(t,e){var n=ue(t,e,"node "+e.classes,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;c.info("Classes = ",e.classes);var o=r.insert("rect",":first-child");return o.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),le(e,o),e.intersect=function(t){return Me.rect(e,t)},r},subroutine:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:0,y:0},{x:a,y:0},{x:a,y:-o},{x:0,y:-o},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-o},{x:-8,y:-o},{x:-8,y:0}],c=he(r,a,o,s);return c.attr("style",e.style),le(e,c),e.intersect=function(t){return Me.polygon(e,s,t)},r},fork:Be,join:Be,class_box:function(t,e){var n,r=e.padding/2;n=e.classes?"node "+e.classes:"node default";var i=t.insert("g").attr("class",n).attr("id",e.domId||e.id),a=i.insert("rect",":first-child"),o=i.insert("line"),s=i.insert("line"),c=0,u=4,l=i.insert("g").attr("class","label"),f=0,d=e.classData.annotations&&e.classData.annotations[0],p=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",y=l.node().appendChild(ce(p,e.labelStyle,!0,!0)),g=y.getBBox();if(xt().flowchart.htmlLabels){var v=y.children[0],m=Object(h.select)(y);g=v.getBoundingClientRect(),m.attr("width",g.width),m.attr("height",g.height)}e.classData.annotations[0]&&(u+=g.height+4,c+=g.width);var b=e.classData.id;void 0!==e.classData.type&&""!==e.classData.type&&(b+="<"+e.classData.type+">");var x=l.node().appendChild(ce(b,e.labelStyle,!0,!0));Object(h.select)(x).attr("class","classTitle");var _=x.getBBox();if(xt().flowchart.htmlLabels){var k=x.children[0],w=Object(h.select)(x);_=k.getBoundingClientRect(),w.attr("width",_.width),w.attr("height",_.height)}u+=_.height+4,_.width>c&&(c=_.width);var E=[];e.classData.members.forEach((function(t){var n=Wt(t).displayText,r=l.node().appendChild(ce(n,e.labelStyle,!0,!0)),i=r.getBBox();if(xt().flowchart.htmlLabels){var a=r.children[0],o=Object(h.select)(r);i=a.getBoundingClientRect(),o.attr("width",i.width),o.attr("height",i.height)}i.width>c&&(c=i.width),u+=i.height+4,E.push(r)})),u+=8;var T=[];if(e.classData.methods.forEach((function(t){var n=Wt(t).displayText,r=l.node().appendChild(ce(n,e.labelStyle,!0,!0)),i=r.getBBox();if(xt().flowchart.htmlLabels){var a=r.children[0],o=Object(h.select)(r);i=a.getBoundingClientRect(),o.attr("width",i.width),o.attr("height",i.height)}i.width>c&&(c=i.width),u+=i.height+4,T.push(r)})),u+=8,d){var C=(c-g.width)/2;Object(h.select)(y).attr("transform","translate( "+(-1*c/2+C)+", "+-1*u/2+")"),f=g.height+4}var S=(c-_.width)/2;return Object(h.select)(x).attr("transform","translate( "+(-1*c/2+S)+", "+(-1*u/2+f)+")"),f+=_.height+4,o.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-u/2-r+8+f).attr("y2",-u/2-r+8+f),f+=8,E.forEach((function(t){Object(h.select)(t).attr("transform","translate( "+-c/2+", "+(-1*u/2+f+4)+")"),f+=_.height+4})),f+=8,s.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-u/2-r+8+f).attr("y2",-u/2-r+8+f),f+=8,T.forEach((function(t){Object(h.select)(t).attr("transform","translate( "+-c/2+", "+(-1*u/2+f)+")"),f+=_.height+4})),a.attr("class","outer title-state").attr("x",-c/2-r).attr("y",-u/2-r).attr("width",c+e.padding).attr("height",u+e.padding),le(e,a),e.intersect=function(t){return Me.rect(e,t)},i}},De={},Le=function(t){var e=De[t.id];c.trace("Transforming node",t,"translate("+(t.x-t.width/2-5)+", "+(t.y-t.height/2-5)+")");t.clusterNode?e.attr("transform","translate("+(t.x-t.width/2-8)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")")},Ie={rect:function(t,e){c.trace("Creating subgraph rect for ",e.id,e);var n=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),a=i.node().appendChild(ce(e.labelText,e.labelStyle,void 0,!0)),o=a.getBBox();if(xt().flowchart.htmlLabels){var s=a.children[0],u=Object(h.select)(a);o=s.getBoundingClientRect(),u.attr("width",o.width),u.attr("height",o.height)}var l=0*e.padding,f=l/2;c.trace("Data ",e,JSON.stringify(e)),r.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-f).attr("y",e.y-e.height/2-f).attr("width",e.width+l).attr("height",e.height+l),i.attr("transform","translate("+(e.x-o.width/2)+", "+(e.y-e.height/2+e.padding/3)+")");var d=r.node().getBBox();return e.width=d.width,e.height=d.height,e.intersect=function(t){return Ae(e,t)},n},roundedWithTitle:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),a=n.append("rect"),o=i.node().appendChild(ce(e.labelText,e.labelStyle,void 0,!0)),s=o.getBBox();if(xt().flowchart.htmlLabels){var c=o.children[0],u=Object(h.select)(o);s=c.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}s=o.getBBox();var l=0*e.padding,f=l/2,d=e.width>s.width?e.width:s.width+e.padding;r.attr("class","outer").attr("x",e.x-d/2-f).attr("y",e.y-e.height/2-f).attr("width",d+l).attr("height",e.height+l),a.attr("class","inner").attr("x",e.x-d/2-f).attr("y",e.y-e.height/2-f+s.height-1).attr("width",d+l).attr("height",e.height+l-s.height-3),i.attr("transform","translate("+(e.x-s.width/2)+", "+(e.y-e.height/2-e.padding/3+(xt().flowchart.htmlLabels?5:3))+")");var p=r.node().getBBox();return e.width=p.width,e.height=p.height,e.intersect=function(t){return Ae(e,t)},n},noteGroup:function(t,e){var n=t.insert("g").attr("class","note-cluster").attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return Ae(e,t)},n},divider:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("class","divider").attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2).attr("width",e.width+i).attr("height",e.height+i);var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return Ae(e,t)},n}},Re={},Fe={},Pe={},je=function(t,e){c.warn("abc88 cutPathAtIntersect",t,e);var n=[],r=t[0],i=!1;return t.forEach((function(t){if(c.info("abc88 checking point",t,e),function(t,e){var n=t.x,r=t.y,i=Math.abs(e.x-n),a=Math.abs(e.y-r),o=t.width/2,s=t.height/2;return i>=o||a>=s}(e,t)||i)c.warn("abc88 outside",t,r),r=t,i||n.push(t);else{var a=function(t,e,n){c.warn("intersection calc abc89:\n outsidePoint: ".concat(JSON.stringify(e),"\n insidePoint : ").concat(JSON.stringify(n),"\n node : x:").concat(t.x," y:").concat(t.y," w:").concat(t.width," h:").concat(t.height));var r=t.x,i=t.y,a=Math.abs(r-n.x),o=t.width/2,s=n.x<e.x?o-a:o+a,u=t.height/2,l=Math.abs(e.y-n.y),h=Math.abs(e.x-n.x);if(Math.abs(i-e.y)*o>Math.abs(r-e.x)*u){var f=n.y<e.y?e.y-u-i:i-u-e.y;s=h*f/l;var d={x:n.x<e.x?n.x+s:n.x-h+s,y:n.y<e.y?n.y+l-f:n.y-l+f};return 0===s&&(d.x=e.x,d.y=e.y),0===h&&(d.x=e.x),0===l&&(d.y=e.y),c.warn("abc89 topp/bott calc, Q ".concat(l,", q ").concat(f,", R ").concat(h,", r ").concat(s),d),d}var p=l*(s=n.x<e.x?e.x-o-r:r-o-e.x)/h,y=n.x<e.x?n.x+h-s:n.x-h+s,g=n.y<e.y?n.y+p:n.y-p;return c.warn("sides calc abc89, Q ".concat(l,", q ").concat(p,", R ").concat(h,", r ").concat(s),{_x:y,_y:g}),0===s&&(y=e.x,g=e.y),0===h&&(y=e.x),0===l&&(g=e.y),{x:y,y:g}}(e,r,t);c.warn("abc88 inside",t,r,a),c.warn("abc88 intersection",a);var o=!1;n.forEach((function(t){o=o||t.x===a.x&&t.y===a.y})),n.find((function(t){return t.x===a.x&&t.y===a.y}))?c.warn("abc88 no intersect",a,n):n.push(a),i=!0}})),c.warn("abc88 returning points",n),n},Ye=function t(e,n,r,i){c.info("Graph in recursive render: XXX",zt.a.json.write(n),i);var a=n.graph().rankdir;c.trace("Dir in recursive render - dir:",a);var o=e.insert("g").attr("class","root");n.nodes()?c.info("Recursive render XXX",n.nodes()):c.info("No nodes found for",n),n.edges().length>0&&c.trace("Recursive edges",n.edge(n.edges()[0]));var s=o.insert("g").attr("class","clusters"),u=o.insert("g").attr("class","edgePaths"),l=o.insert("g").attr("class","edgeLabels"),f=o.insert("g").attr("class","nodes");return n.nodes().forEach((function(e){var o=n.node(e);if(void 0!==i){var s=JSON.parse(JSON.stringify(i.clusterData));c.info("Setting data for cluster XXX (",e,") ",s,i),n.setNode(i.id,s),n.parent(e)||(c.trace("Setting parent",e,i.id),n.setParent(e,i.id,s))}if(c.info("(Insert) Node XXX"+e+": "+JSON.stringify(n.node(e))),o&&o.clusterNode){c.info("Cluster identified",e,o,n.node(e));var u=t(f,o.graph,r,n.node(e));le(o,u),function(t,e){De[e.id]=t}(u,o),c.warn("Recursive render complete",u,o)}else n.children(e).length>0?(c.info("Cluster - the non recursive path XXX",e,o.id,o,n),c.info(ve(o.id,n)),fe[o.id]={id:ve(o.id,n),node:o}):(c.info("Node - the non recursive path",e,o.id,o),function(t,e,n){var r,i;e.link?(r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget||"_blank"),i=Ne[e.shape](r,e,n)):r=i=Ne[e.shape](t,e,n),e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),De[e.id]=r,e.haveCallback&&De[e.id].attr("class",De[e.id].attr("class")+" clickable")}(f,n.node(e),a))})),n.edges().forEach((function(t){var e=n.edge(t.v,t.w,t.name);c.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),c.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(n.edge(t))),c.info("Fix",fe,"ids:",t.v,t.w,"Translateing: ",fe[t.v],fe[t.w]),function(t,e){var n=ce(e.label,e.labelStyle),r=t.insert("g").attr("class","edgeLabel"),i=r.insert("g").attr("class","label");i.node().appendChild(n);var a=n.getBBox();if(xt().flowchart.htmlLabels){var o=n.children[0],s=Object(h.select)(n);a=o.getBoundingClientRect(),s.attr("width",a.width),s.attr("height",a.height)}if(i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),Fe[e.id]=r,e.width=a.width,e.height=a.height,e.startLabelLeft){var c=ce(e.startLabelLeft,e.labelStyle),u=t.insert("g").attr("class","edgeTerminals"),l=u.insert("g").attr("class","inner");l.node().appendChild(c);var f=c.getBBox();l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Pe[e.id]||(Pe[e.id]={}),Pe[e.id].startLeft=u}if(e.startLabelRight){var d=ce(e.startLabelRight,e.labelStyle),p=t.insert("g").attr("class","edgeTerminals"),y=p.insert("g").attr("class","inner");p.node().appendChild(d),y.node().appendChild(d);var g=d.getBBox();y.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),Pe[e.id]||(Pe[e.id]={}),Pe[e.id].startRight=p}if(e.endLabelLeft){var v=ce(e.endLabelLeft,e.labelStyle),m=t.insert("g").attr("class","edgeTerminals"),b=m.insert("g").attr("class","inner");b.node().appendChild(v);var x=v.getBBox();b.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"),m.node().appendChild(v),Pe[e.id]||(Pe[e.id]={}),Pe[e.id].endLeft=m}if(e.endLabelRight){var _=ce(e.endLabelRight,e.labelStyle),k=t.insert("g").attr("class","edgeTerminals"),w=k.insert("g").attr("class","inner");w.node().appendChild(_);var E=_.getBBox();w.attr("transform","translate("+-E.width/2+", "+-E.height/2+")"),k.node().appendChild(_),Pe[e.id]||(Pe[e.id]={}),Pe[e.id].endRight=k}}(l,e)})),n.edges().forEach((function(t){c.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))})),c.info("#############################################"),c.info("### Layout ###"),c.info("#############################################"),c.info(n),jt.a.layout(n),c.info("Graph after layout:",zt.a.json.write(n)),_e(n).forEach((function(t){var e=n.node(t);c.info("Position "+t+": "+JSON.stringify(n.node(t))),c.info("Position "+t+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e&&e.clusterNode?Le(e):n.children(t).length>0?(!function(t,e){c.trace("Inserting cluster");var n=e.shape||"rect";Re[e.id]=Ie[n](t,e)}(s,e),fe[e.id].node=e):Le(e)})),n.edges().forEach((function(t){var e=n.edge(t);c.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e),e),function(t,e){c.info("Moving label abc78 ",t.id,t.label,Fe[t.id]);var n=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){var r=Fe[t.id],i=t.x,a=t.y;if(n){var o=W.calcLabelPosition(n);c.info("Moving label from (",i,",",a,") to (",o.x,",",o.y,") abc78")}r.attr("transform","translate("+i+", "+a+")")}if(t.startLabelLeft){var s=Pe[t.id].startLeft,u=t.x,l=t.y;if(n){var h=W.calcTerminalLabelPosition(0,"start_left",n);u=h.x,l=h.y}s.attr("transform","translate("+u+", "+l+")")}if(t.startLabelRight){var f=Pe[t.id].startRight,d=t.x,p=t.y;if(n){var y=W.calcTerminalLabelPosition(0,"start_right",n);d=y.x,p=y.y}f.attr("transform","translate("+d+", "+p+")")}if(t.endLabelLeft){var g=Pe[t.id].endLeft,v=t.x,m=t.y;if(n){var b=W.calcTerminalLabelPosition(0,"end_left",n);v=b.x,m=b.y}g.attr("transform","translate("+v+", "+m+")")}if(t.endLabelRight){var x=Pe[t.id].endRight,_=t.x,k=t.y;if(n){var w=W.calcTerminalLabelPosition(0,"end_right",n);_=w.x,k=w.y}x.attr("transform","translate("+_+", "+k+")")}}(e,function(t,e,n,r,i,a){var o=n.points,s=!1,u=a.node(e.v),l=a.node(e.w);c.info("abc88 InsertEdge: ",n),l.intersect&&u.intersect&&((o=o.slice(1,n.points.length-1)).unshift(u.intersect(o[0])),c.info("Last point",o[o.length-1],l,l.intersect(o[o.length-1])),o.push(l.intersect(o[o.length-1]))),n.toCluster&&(c.info("to cluster abc88",r[n.toCluster]),o=je(n.points,r[n.toCluster].node),s=!0),n.fromCluster&&(c.info("from cluster abc88",r[n.fromCluster]),o=je(o.reverse(),r[n.fromCluster].node).reverse(),s=!0);var f,d=o.filter((function(t){return!Number.isNaN(t.y)}));f=("graph"===i||"flowchart"===i)&&n.curve||h.curveBasis;var p,y=Object(h.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(f);switch(n.thickness){case"normal":p="edge-thickness-normal";break;case"thick":p="edge-thickness-thick";break;default:p=""}switch(n.pattern){case"solid":p+=" edge-pattern-solid";break;case"dotted":p+=" edge-pattern-dotted";break;case"dashed":p+=" edge-pattern-dashed"}var g=t.append("path").attr("d",y(d)).attr("id",n.id).attr("class"," "+p+(n.classes?" "+n.classes:"")).attr("style",n.style),v="";switch(xt().state.arrowMarkerAbsolute&&(v=(v=(v=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),c.info("arrowTypeStart",n.arrowTypeStart),c.info("arrowTypeEnd",n.arrowTypeEnd),n.arrowTypeStart){case"arrow_cross":g.attr("marker-start","url("+v+"#"+i+"-crossStart)");break;case"arrow_point":g.attr("marker-start","url("+v+"#"+i+"-pointStart)");break;case"arrow_barb":g.attr("marker-start","url("+v+"#"+i+"-barbStart)");break;case"arrow_circle":g.attr("marker-start","url("+v+"#"+i+"-circleStart)");break;case"aggregation":g.attr("marker-start","url("+v+"#"+i+"-aggregationStart)");break;case"extension":g.attr("marker-start","url("+v+"#"+i+"-extensionStart)");break;case"composition":g.attr("marker-start","url("+v+"#"+i+"-compositionStart)");break;case"dependency":g.attr("marker-start","url("+v+"#"+i+"-dependencyStart)")}switch(n.arrowTypeEnd){case"arrow_cross":g.attr("marker-end","url("+v+"#"+i+"-crossEnd)");break;case"arrow_point":g.attr("marker-end","url("+v+"#"+i+"-pointEnd)");break;case"arrow_barb":g.attr("marker-end","url("+v+"#"+i+"-barbEnd)");break;case"arrow_circle":g.attr("marker-end","url("+v+"#"+i+"-circleEnd)");break;case"aggregation":g.attr("marker-end","url("+v+"#"+i+"-aggregationEnd)");break;case"extension":g.attr("marker-end","url("+v+"#"+i+"-extensionEnd)");break;case"composition":g.attr("marker-end","url("+v+"#"+i+"-compositionEnd)");break;case"dependency":g.attr("marker-end","url("+v+"#"+i+"-dependencyEnd)")}var m={};return s&&(m.updatedPath=o),m.originalPath=n.points,m}(u,t,e,fe,r,n))})),o},ze=function(t,e,n,r,i){oe(t,n,r,i),De={},Fe={},Pe={},Re={},de={},pe={},fe={},c.warn("Graph at first:",zt.a.json.write(e)),be(e),c.warn("Graph after:",zt.a.json.write(e)),Ye(t,e,r)};Ut.parser.yy=Ft;var Ue={dividerMargin:10,padding:5,textHeight:10},$e=function(t){Object.keys(t).forEach((function(e){Ue[e]=t[e]}))},qe=function(t,e){c.info("Drawing class"),Ft.clear(),Ut.parser.parse(t);var n=xt().flowchart;c.info("config:",n);var r=n.nodeSpacing||50,i=n.rankSpacing||50,a=new zt.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:"TD",nodesep:r,ranksep:i,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),o=Ft.getClasses(),s=Ft.getRelations();c.info(s),function(t,e){var n=Object.keys(t);c.info("keys:",n),c.info(t),n.forEach((function(n){var r=t[n],i="";r.cssClasses.length>0&&(i=i+" "+r.cssClasses.join(" "));var a={labelStyle:""},o=void 0!==r.text?r.text:r.id,s="";switch(r.type){case"class":s="class_box";break;default:s="class_box"}e.setNode(r.id,{labelStyle:a.labelStyle,shape:s,labelText:o,classData:r,rx:0,ry:0,class:i,style:a.style,id:r.id,domId:r.domId,haveCallback:r.haveCallback,link:r.link,width:"group"===r.type?500:void 0,type:r.type,padding:xt().flowchart.padding}),c.info("setNode",{labelStyle:a.labelStyle,shape:s,labelText:o,rx:0,ry:0,class:i,style:a.style,id:r.id,width:"group"===r.type?500:void 0,type:r.type,padding:xt().flowchart.padding})}))}(o,a),function(t,e){var n=0;t.forEach((function(r){n++;var i={classes:"relation"};i.pattern=1==r.relation.lineType?"dashed":"solid",i.id="id"+n,"arrow_open"===r.type?i.arrowhead="none":i.arrowhead="normal",c.info(i,r),i.startLabelRight="none"===r.relationTitle1?"":r.relationTitle1,i.endLabelLeft="none"===r.relationTitle2?"":r.relationTitle2,i.arrowTypeStart=We(r.relation.type1),i.arrowTypeEnd=We(r.relation.type2);var a="",o="";if(void 0!==r.style){var s=D(r.style);a=s.style,o=s.labelStyle}else a="fill:none";i.style=a,i.labelStyle=o,void 0!==r.interpolate?i.curve=B(r.interpolate,h.curveLinear):void 0!==t.defaultInterpolate?i.curve=B(t.defaultInterpolate,h.curveLinear):i.curve=B(Ue.curve,h.curveLinear),r.text=r.title,void 0===r.text?void 0!==r.style&&(i.arrowheadStyle="fill: #333"):(i.arrowheadStyle="fill: #333",i.labelpos="c",xt().flowchart.htmlLabels,i.labelType="text",i.label=r.text.replace(x.lineBreakRegex,"\n"),void 0===r.style&&(i.style=i.style||"stroke: #333; stroke-width: 1.5px;fill:none"),i.labelStyle=i.labelStyle.replace("color:","fill:")),e.setEdge(r.id1,r.id2,i,n)}))}(s,a);var u=Object(h.select)('[id="'.concat(e,'"]'));u.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var l=Object(h.select)("#"+e+" g");ze(l,a,["aggregation","extension","composition","dependency"],"classDiagram",e);var f=u.node().getBBox(),d=f.width+16,p=f.height+16;if(c.debug("new ViewBox 0 0 ".concat(d," ").concat(p),"translate(".concat(8-a._label.marginx,", ").concat(8-a._label.marginy,")")),q(u,p,d,n.useMaxWidth),u.attr("viewBox","0 0 ".concat(d," ").concat(p)),u.select("g").attr("transform","translate(".concat(8-a._label.marginx,", ").concat(8-f.y,")")),!n.htmlLabels)for(var y=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),g=0;g<y.length;g++){var v=y[g],m=v.getBBox(),b=document.createElementNS("http://www.w3.org/2000/svg","rect");b.setAttribute("rx",0),b.setAttribute("ry",0),b.setAttribute("width",m.width),b.setAttribute("height",m.height),b.setAttribute("style","fill:#e8e8e8;"),v.insertBefore(b,v.firstChild)}};function We(t){var e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;default:e="none"}return e}var Ve={},He=[],Ge="",Xe=function(t){return void 0===Ve[t]&&(Ve[t]={attributes:[]},c.info("Added new entity :",t)),Ve[t]},Ze={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().er},addEntity:Xe,addAttributes:function(t,e){var n,r=Xe(t);for(n=e.length-1;n>=0;n--)r.attributes.push(e[n]),c.debug("Added attribute ",e[n].attributeName)},getEntities:function(){return Ve},addRelationship:function(t,e,n,r){var i={entityA:t,roleA:e,entityB:n,relSpec:r};He.push(i),c.debug("Added new relationship :",i)},getRelationships:function(){return He},clear:function(){Ve={},He=[],Ge=""},setTitle:function(t){Ge=t},getTitle:function(){return Ge}},Qe=n(75),Ke=n.n(Qe),Je={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"},tn=Je,en=function(t,e){var n;t.append("defs").append("marker").attr("id",Je.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",Je.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",Je.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",Je.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",Je.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",Je.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),(n=t.append("defs").append("marker").attr("id",Je.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(n=t.append("defs").append("marker").attr("id",Je.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},nn={},rn=function(t,e,n){var r;return Object.keys(e).forEach((function(i){var a=t.append("g").attr("id",i);r=void 0===r?i:r;var o="entity-"+i,s=a.append("text").attr("class","er entityLabel").attr("id",o).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("style","font-family: "+xt().fontFamily+"; font-size: "+nn.fontSize+"px").text(i),c=function(t,e,n){var r=nn.entityPadding/3,i=nn.entityPadding/3,a=.85*nn.fontSize,o=e.node().getBBox(),s=[],c=0,u=0,l=o.height+2*r,h=1;n.forEach((function(n){var i="".concat(e.node().id,"-attr-").concat(h),o=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-type")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+xt().fontFamily+"; font-size: "+a+"px").text(n.attributeType),f=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-name")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+xt().fontFamily+"; font-size: "+a+"px").text(n.attributeName);s.push({tn:o,nn:f});var d=o.node().getBBox(),p=f.node().getBBox();c=Math.max(c,d.width),u=Math.max(u,p.width),l+=Math.max(d.height,p.height)+2*r,h+=1}));var f={width:Math.max(nn.minEntityWidth,Math.max(o.width+2*nn.entityPadding,c+u+4*i)),height:n.length>0?l:Math.max(nn.minEntityHeight,o.height+2*nn.entityPadding)},d=Math.max(0,f.width-(c+u)-4*i);if(n.length>0){e.attr("transform","translate("+f.width/2+","+(r+o.height/2)+")");var p=o.height+2*r,y="attributeBoxOdd";s.forEach((function(e){var n=p+r+Math.max(e.tn.node().getBBox().height,e.nn.node().getBBox().height)/2;e.tn.attr("transform","translate("+i+","+n+")");var a=t.insert("rect","#"+e.tn.node().id).attr("class","er ".concat(y)).attr("fill",nn.fill).attr("fill-opacity","100%").attr("stroke",nn.stroke).attr("x",0).attr("y",p).attr("width",c+2*i+d/2).attr("height",e.tn.node().getBBox().height+2*r);e.nn.attr("transform","translate("+(parseFloat(a.attr("width"))+i)+","+n+")"),t.insert("rect","#"+e.nn.node().id).attr("class","er ".concat(y)).attr("fill",nn.fill).attr("fill-opacity","100%").attr("stroke",nn.stroke).attr("x","".concat(a.attr("x")+a.attr("width"))).attr("y",p).attr("width",u+2*i+d/2).attr("height",e.nn.node().getBBox().height+2*r),p+=Math.max(e.tn.node().getBBox().height,e.nn.node().getBBox().height)+2*r,y="attributeBoxOdd"==y?"attributeBoxEven":"attributeBoxOdd"}))}else f.height=Math.max(nn.minEntityHeight,l),e.attr("transform","translate("+f.width/2+","+f.height/2+")");return f}(a,s,e[i].attributes),u=c.width,l=c.height,h=a.insert("rect","#"+o).attr("class","er entityBox").attr("fill",nn.fill).attr("fill-opacity","100%").attr("stroke",nn.stroke).attr("x",0).attr("y",0).attr("width",u).attr("height",l).node().getBBox();n.setNode(i,{width:h.width,height:h.height,shape:"rect",id:i})})),r},an=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},on=0,sn=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)nn[e[n]]=t[e[n]]},cn=function(t,e){c.info("Drawing ER diagram"),Ze.clear();var n=Ke.a.parser;n.yy=Ze;try{n.parse(t)}catch(t){c.debug("Parsing failed")}var r,i=Object(h.select)("[id='".concat(e,"']"));en(i,nn),r=new zt.a.Graph({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:nn.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));var a,o,s=rn(i,Ze.getEntities(),r),u=function(t,e){return t.forEach((function(t){e.setEdge(t.entityA,t.entityB,{relationship:t},an(t))})),t}(Ze.getRelationships(),r);jt.a.layout(r),a=i,(o=r).nodes().forEach((function(t){void 0!==t&&void 0!==o.node(t)&&a.select("#"+t).attr("transform","translate("+(o.node(t).x-o.node(t).width/2)+","+(o.node(t).y-o.node(t).height/2)+" )")})),u.forEach((function(t){!function(t,e,n,r){on++;var i=n.edge(e.entityA,e.entityB,an(e)),a=Object(h.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(h.curveBasis),o=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",a(i.points)).attr("stroke",nn.stroke).attr("fill","none");e.relSpec.relType===Ze.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");var s="";switch(nn.arrowMarkerAbsolute&&(s=(s=(s=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e.relSpec.cardA){case Ze.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+s+"#"+tn.ZERO_OR_ONE_END+")");break;case Ze.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+s+"#"+tn.ZERO_OR_MORE_END+")");break;case Ze.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+s+"#"+tn.ONE_OR_MORE_END+")");break;case Ze.Cardinality.ONLY_ONE:o.attr("marker-end","url("+s+"#"+tn.ONLY_ONE_END+")")}switch(e.relSpec.cardB){case Ze.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+s+"#"+tn.ZERO_OR_ONE_START+")");break;case Ze.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+s+"#"+tn.ZERO_OR_MORE_START+")");break;case Ze.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+s+"#"+tn.ONE_OR_MORE_START+")");break;case Ze.Cardinality.ONLY_ONE:o.attr("marker-start","url("+s+"#"+tn.ONLY_ONE_START+")")}var c=o.node().getTotalLength(),u=o.node().getPointAtLength(.5*c),l="rel"+on,f=t.append("text").attr("class","er relationshipLabel").attr("id",l).attr("x",u.x).attr("y",u.y).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("style","font-family: "+xt().fontFamily+"; font-size: "+nn.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+l).attr("class","er relationshipLabelBox").attr("x",u.x-f.width/2).attr("y",u.y-f.height/2).attr("width",f.width).attr("height",f.height).attr("fill","white").attr("fill-opacity","85%")}(i,t,r,s)}));var l=nn.diagramPadding,f=i.node().getBBox(),d=f.width+2*l,p=f.height+2*l;q(i,p,d,nn.useMaxWidth),i.attr("viewBox","".concat(f.x-l," ").concat(f.y-l," ").concat(d," ").concat(p))};function un(t){return(un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ln(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var hn,fn,dn=0,pn=xt(),yn={},gn=[],vn=[],mn=[],bn={},xn={},_n=0,kn=!0,wn=[],En=function(t){for(var e=Object.keys(yn),n=0;n<e.length;n++)if(yn[e[n]].id===t)return yn[e[n]].domId;return t},Tn=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:""};void 0!==(r=n.text)&&(i.text=x.sanitizeText(r.trim(),pn),'"'===i.text[0]&&'"'===i.text[i.text.length-1]&&(i.text=i.text.substring(1,i.text.length-1))),void 0!==n&&(i.type=n.type,i.stroke=n.stroke,i.length=n.length),gn.push(i)},Cn=function(t,e){t.split(",").forEach((function(t){var n=t;void 0!==yn[n]&&yn[n].classes.push(e),void 0!==bn[n]&&bn[n].classes.push(e)}))},Sn=function(t){var e=Object(h.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(h.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(h.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(h.select)(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(h.select)(this).classed("hover",!1)}))};wn.push(Sn);var An=function(t){for(var e=0;e<mn.length;e++)if(mn[e].id===t)return e;return-1},Mn=-1,On=[],Bn=function(t,e){var n=!1;return t.forEach((function(t){t.nodes.indexOf(e)>=0&&(n=!0)})),n},Nn=function(t,e){var n=[];return t.nodes.forEach((function(r,i){Bn(e,r)||n.push(t.nodes[i])})),{nodes:n}},Dn={parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},defaultConfig:function(){return pt.flowchart},addVertex:function(t,e,n,r,i){var a,o=t;void 0!==o&&0!==o.trim().length&&(void 0===yn[o]&&(yn[o]={id:o,domId:"flowchart-"+o+"-"+dn,styles:[],classes:[]}),dn++,void 0!==e?(pn=xt(),'"'===(a=x.sanitizeText(e.trim(),pn))[0]&&'"'===a[a.length-1]&&(a=a.substring(1,a.length-1)),yn[o].text=a):void 0===yn[o].text&&(yn[o].text=t),void 0!==n&&(yn[o].type=n),null!=r&&r.forEach((function(t){yn[o].styles.push(t)})),null!=i&&i.forEach((function(t){yn[o].classes.push(t)})))},lookUpDomId:En,addLink:function(t,e,n,r){var i,a;for(i=0;i<t.length;i++)for(a=0;a<e.length;a++)Tn(t[i],e[a],n,r)},updateLinkInterpolate:function(t,e){t.forEach((function(t){"default"===t?gn.defaultInterpolate=e:gn[t].interpolate=e}))},updateLink:function(t,e){t.forEach((function(t){"default"===t?gn.defaultStyle=e:(-1===W.isSubstringInArray("fill",e)&&e.push("fill:none"),gn[t].style=e)}))},addClass:function(t,e){void 0===vn[t]&&(vn[t]={id:t,styles:[],textStyles:[]}),null!=e&&e.forEach((function(e){if(e.match("color")){var n=e.replace("fill","bgFill").replace("color","fill");vn[t].textStyles.push(n)}vn[t].styles.push(e)}))},setDirection:function(t){(hn=t).match(/.*</)&&(hn="RL"),hn.match(/.*\^/)&&(hn="BT"),hn.match(/.*>/)&&(hn="LR"),hn.match(/.*v/)&&(hn="TB")},setClass:Cn,setTooltip:function(t,e){t.split(",").forEach((function(t){void 0!==e&&(xn["gen-1"===fn?En(t):t]=x.sanitizeText(e,pn))}))},getTooltip:function(t){return xn[t]},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){var r=En(t);if("loose"===xt().securityLevel&&void 0!==e){var i=[];if("string"==typeof n){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var a=0;a<i.length;a++){var o=i[a].trim();'"'===o.charAt(0)&&'"'===o.charAt(o.length-1)&&(o=o.substr(1,o.length-2)),i[a]=o}}0===i.length&&i.push(t),void 0!==yn[t]&&(yn[t].haveCallback=!0,wn.push((function(){var t=document.querySelector('[id="'.concat(r,'"]'));null!==t&&t.addEventListener("click",(function(){W.runFunc.apply(W,[e].concat(ln(i)))}),!1)})))}}(t,e,n)})),Cn(t,"clickable")},setLink:function(t,e,n){t.split(",").forEach((function(t){void 0!==yn[t]&&(yn[t].link=W.formatUrl(e,pn),yn[t].linkTarget=n)})),Cn(t,"clickable")},bindFunctions:function(t){wn.forEach((function(e){e(t)}))},getDirection:function(){return hn.trim()},getVertices:function(){return yn},getEdges:function(){return gn},getClasses:function(){return vn},clear:function(t){yn={},vn={},gn=[],(wn=[]).push(Sn),mn=[],bn={},_n=0,xn=[],kn=!0,fn=t||"gen-1"},setGen:function(t){fn=t||"gen-1"},defaultStyle:function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},addSubGraph:function(t,e,n){var r=t.trim(),i=n;t===n&&n.match(/\s/)&&(r=void 0);var a,o,s,u=[];if(a=u.concat.apply(u,e),o={boolean:{},number:{},string:{}},s=[],u=a.filter((function(t){var e=un(t);return""!==t.trim()&&(e in o?!o[e].hasOwnProperty(t)&&(o[e][t]=!0):!(s.indexOf(t)>=0)&&s.push(t))})),"gen-1"===fn){c.warn("LOOKING UP");for(var l=0;l<u.length;l++)u[l]=En(u[l])}r=r||"subGraph"+_n,i=i||"",i=x.sanitizeText(i,pn),_n+=1;var h={id:r,nodes:u,title:i.trim(),classes:[]};return c.info("Adding",h.id,h.nodes),h.nodes=Nn(h,mn).nodes,mn.push(h),bn[r]=h,r},getDepthFirstPos:function(t){return On[t]},indexNodes:function(){Mn=-1,mn.length>0&&function t(e,n){var r=mn[n].nodes;if(!((Mn+=1)>2e3)){if(On[Mn]=n,mn[n].id===e)return{result:!0,count:0};for(var i=0,a=1;i<r.length;){var o=An(r[i]);if(o>=0){var s=t(e,o);if(s.result)return{result:!0,count:a+s.count};a+=s.count}i+=1}return{result:!1,count:a}}}("none",mn.length-1)},getSubGraphs:function(){return mn},destructLink:function(t,e){var n,r=function(t){var e=t.trim(),n=e.slice(0,-1),r="arrow_open";switch(e.slice(-1)){case"x":r="arrow_cross","x"===e[0]&&(r="double_"+r,n=n.slice(1));break;case">":r="arrow_point","<"===e[0]&&(r="double_"+r,n=n.slice(1));break;case"o":r="arrow_circle","o"===e[0]&&(r="double_"+r,n=n.slice(1))}var i="normal",a=n.length-1;"="===n[0]&&(i="thick");var o=function(t,e){for(var n=e.length,r=0,i=0;i<n;++i)e[i]===t&&++r;return r}(".",n);return o&&(i="dotted",a=o),{type:r,stroke:i,length:a}}(t);if(e){if((n=function(t){var e=t.trim(),n="arrow_open";switch(e[0]){case"<":n="arrow_point",e=e.slice(1);break;case"x":n="arrow_cross",e=e.slice(1);break;case"o":n="arrow_circle",e=e.slice(1)}var r="normal";return-1!==e.indexOf("=")&&(r="thick"),-1!==e.indexOf(".")&&(r="dotted"),{type:n,stroke:r}}(e)).stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===n.type)n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return"double_arrow"===n.type&&(n.type="double_arrow_point"),n.length=r.length,n}return r},lex:{firstGraph:function(){return!!kn&&(kn=!1,!0)}},exists:Bn,makeUniq:Nn},Ln=n(27),In=n.n(Ln),Rn=n(7),Fn=n.n(Rn),Pn=n(51),jn=n.n(Pn);function Yn(t,e,n){var r=.9*(e.width+e.height),i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],a=Qn(t,r,r,i);return n.intersect=function(t){return Fn.a.intersect.polygon(n,i,t)},a}function zn(t,e,n){var r=e.height,i=r/4,a=e.width+2*i,o=[{x:i,y:0},{x:a-i,y:0},{x:a,y:-r/2},{x:a-i,y:-r},{x:i,y:-r},{x:0,y:-r/2}],s=Qn(t,a,r,o);return n.intersect=function(t){return Fn.a.intersect.polygon(n,o,t)},s}function Un(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function $n(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:i/6,y:-i}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function qn(t,e,n){var r=e.width,i=e.height,a=[{x:2*i/6,y:0},{x:r+i/6,y:0},{x:r-2*i/6,y:-i},{x:-i/6,y:-i}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function Wn(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r+2*i/6,y:0},{x:r-i/6,y:-i},{x:i/6,y:-i}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function Vn(t,e,n){var r=e.width,i=e.height,a=[{x:i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:-2*i/6,y:-i}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function Hn(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function Gn(t,e,n){var r=e.height,i=e.width+r/4,a=t.insert("rect",":first-child").attr("rx",r/2).attr("ry",r/2).attr("x",-i/2).attr("y",-r/2).attr("width",i).attr("height",r);return n.intersect=function(t){return Fn.a.intersect.rect(n,t)},a}function Xn(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r,y:0},{x:r,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:r+8,y:0},{x:r+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function Zn(t,e,n){var r=e.width,i=r/2,a=i/(2.5+r/50),o=e.height+a,s="M 0,"+a+" a "+i+","+a+" 0,0,0 "+r+" 0 a "+i+","+a+" 0,0,0 "+-r+" 0 l 0,"+o+" a "+i+","+a+" 0,0,0 "+r+" 0 l 0,"+-o,c=t.attr("label-offset-y",a).insert("path",":first-child").attr("d",s).attr("transform","translate("+-r/2+","+-(o/2+a)+")");return n.intersect=function(t){var e=Fn.a.intersect.rect(n,t),r=e.x-n.x;if(0!=i&&(Math.abs(r)<n.width/2||Math.abs(r)==n.width/2&&Math.abs(e.y-n.y)>n.height/2-a)){var o=a*a*(1-r*r/(i*i));0!=o&&(o=Math.sqrt(o)),o=a-o,t.y-n.y>0&&(o=-o),e.y+=o}return e},c}function Qn(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("transform","translate("+-e/2+","+n/2+")")}var Kn={addToRender:function(t){t.shapes().question=Yn,t.shapes().hexagon=zn,t.shapes().stadium=Gn,t.shapes().subroutine=Xn,t.shapes().cylinder=Zn,t.shapes().rect_left_inv_arrow=Un,t.shapes().lean_right=$n,t.shapes().lean_left=qn,t.shapes().trapezoid=Wn,t.shapes().inv_trapezoid=Vn,t.shapes().rect_right_inv_arrow=Hn},addToRenderV2:function(t){t({question:Yn}),t({hexagon:zn}),t({stadium:Gn}),t({subroutine:Xn}),t({cylinder:Zn}),t({rect_left_inv_arrow:Un}),t({lean_right:$n}),t({lean_left:qn}),t({trapezoid:Wn}),t({inv_trapezoid:Vn}),t({rect_right_inv_arrow:Hn})}},Jn={},tr=function(t,e,n){var r=Object(h.select)('[id="'.concat(n,'"]'));Object.keys(t).forEach((function(n){var i=t[n],a="default";i.classes.length>0&&(a=i.classes.join(" "));var o,s=D(i.styles),u=void 0!==i.text?i.text:i.id;if(xt().flowchart.htmlLabels){var l={label:u.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(o=jn()(r,l).node()).parentNode.removeChild(o)}else{var h=document.createElementNS("http://www.w3.org/2000/svg","text");h.setAttribute("style",s.labelStyle.replace("color:","fill:"));for(var f=u.split(x.lineBreakRegex),d=0;d<f.length;d++){var p=document.createElementNS("http://www.w3.org/2000/svg","tspan");p.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),p.setAttribute("dy","1em"),p.setAttribute("x","1"),p.textContent=f[d],h.appendChild(p)}o=h}var y=0,g="";switch(i.type){case"round":y=5,g="rect";break;case"square":g="rect";break;case"diamond":g="question";break;case"hexagon":g="hexagon";break;case"odd":g="rect_left_inv_arrow";break;case"lean_right":g="lean_right";break;case"lean_left":g="lean_left";break;case"trapezoid":g="trapezoid";break;case"inv_trapezoid":g="inv_trapezoid";break;case"odd_right":g="rect_left_inv_arrow";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"stadium":g="stadium";break;case"subroutine":g="subroutine";break;case"cylinder":g="cylinder";break;case"group":g="rect";break;default:g="rect"}c.warn("Adding node",i.id,i.domId),e.setNode(Dn.lookUpDomId(i.id),{labelType:"svg",labelStyle:s.labelStyle,shape:g,label:o,rx:y,ry:y,class:a,style:s.style,id:Dn.lookUpDomId(i.id)})}))},er=function(t,e){var n,r,i=0;if(void 0!==t.defaultStyle){var a=D(t.defaultStyle);n=a.style,r=a.labelStyle}t.forEach((function(a){i++;var o="L-"+a.start+"-"+a.end,s="LS-"+a.start,c="LE-"+a.end,u={};"arrow_open"===a.type?u.arrowhead="none":u.arrowhead="normal";var l="",f="";if(void 0!==a.style){var d=D(a.style);l=d.style,f=d.labelStyle}else switch(a.stroke){case"normal":l="fill:none",void 0!==n&&(l=n),void 0!==r&&(f=r);break;case"dotted":l="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":l=" stroke-width: 3.5px;fill:none"}u.style=l,u.labelStyle=f,void 0!==a.interpolate?u.curve=B(a.interpolate,h.curveLinear):void 0!==t.defaultInterpolate?u.curve=B(t.defaultInterpolate,h.curveLinear):u.curve=B(Jn.curve,h.curveLinear),void 0===a.text?void 0!==a.style&&(u.arrowheadStyle="fill: #333"):(u.arrowheadStyle="fill: #333",u.labelpos="c",xt().flowchart.htmlLabels?(u.labelType="html",u.label='<span id="L-'.concat(o,'" class="edgeLabel L-').concat(s,"' L-").concat(c,'">').concat(a.text.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")})),"</span>")):(u.labelType="text",u.label=a.text.replace(x.lineBreakRegex,"\n"),void 0===a.style&&(u.style=u.style||"stroke: #333; stroke-width: 1.5px;fill:none"),u.labelStyle=u.labelStyle.replace("color:","fill:"))),u.id=o,u.class=s+" "+c,u.minlen=a.length||1,e.setEdge(Dn.lookUpDomId(a.start),Dn.lookUpDomId(a.end),u,i)}))},nr=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)Jn[e[n]]=t[e[n]]},rr=function(t){c.info("Extracting classes"),Dn.clear();try{var e=In.a.parser;return e.yy=Dn,e.parse(t),Dn.getClasses()}catch(t){return}},ir=function(t,e){c.info("Drawing flowchart"),Dn.clear(),Dn.setGen("gen-1");var n=In.a.parser;n.yy=Dn,n.parse(t);var r=Dn.getDirection();void 0===r&&(r="TD");for(var i,a=xt().flowchart,o=a.nodeSpacing||50,s=a.rankSpacing||50,u=new zt.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:o,ranksep:s,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),l=Dn.getSubGraphs(),f=l.length-1;f>=0;f--)i=l[f],Dn.addVertex(i.id,i.title,"group",void 0,i.classes);var d=Dn.getVertices();c.warn("Get vertices",d);var p=Dn.getEdges(),y=0;for(y=l.length-1;y>=0;y--){i=l[y],Object(h.selectAll)("cluster").append("text");for(var g=0;g<i.nodes.length;g++)c.warn("Setting subgraph",i.nodes[g],Dn.lookUpDomId(i.nodes[g]),Dn.lookUpDomId(i.id)),u.setParent(Dn.lookUpDomId(i.nodes[g]),Dn.lookUpDomId(i.id))}tr(d,u,e),er(p,u);var v=new(0,Fn.a.render);Kn.addToRender(v),v.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");Fn.a.util.applyStyle(i,n[r+"Style"])},v.arrows().normal=function(t,e){t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};var m=Object(h.select)('[id="'.concat(e,'"]'));m.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),c.warn(u);var b=Object(h.select)("#"+e+" g");v(b,u),b.selectAll("g.node").attr("title",(function(){return Dn.getTooltip(this.id)}));var x=a.diagramPadding,_=m.node().getBBox(),k=_.width+2*x,w=_.height+2*x;q(m,w,k,a.useMaxWidth);var E="".concat(_.x-x," ").concat(_.y-x," ").concat(k," ").concat(w);for(c.debug("viewBox ".concat(E)),m.attr("viewBox",E),Dn.indexNodes("subGraph"+y),y=0;y<l.length;y++)if("undefined"!==(i=l[y]).title){var T=document.querySelectorAll("#"+e+' [id="'+Dn.lookUpDomId(i.id)+'"] rect'),C=document.querySelectorAll("#"+e+' [id="'+Dn.lookUpDomId(i.id)+'"]'),S=T[0].x.baseVal.value,A=T[0].y.baseVal.value,M=T[0].width.baseVal.value,O=Object(h.select)(C[0]).select(".label");O.attr("transform","translate(".concat(S+M/2,", ").concat(A+14,")")),O.attr("id",e+"Text");for(var B=0;B<i.classes.length;B++)C[0].classList.add(i.classes[B])}a.htmlLabels;for(var N=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),D=0;D<N.length;D++){var L=N[D],I=L.getBBox(),R=document.createElementNS("http://www.w3.org/2000/svg","rect");R.setAttribute("rx",0),R.setAttribute("ry",0),R.setAttribute("width",I.width),R.setAttribute("height",I.height),L.insertBefore(R,L.firstChild)}Object.keys(d).forEach((function(t){var n=d[t];if(n.link){var r=Object(h.select)("#"+e+' [id="'+Dn.lookUpDomId(t)+'"]');if(r){var i=document.createElementNS("http://www.w3.org/2000/svg","a");i.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),i.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),i.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),n.linkTarget&&i.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);var a=r.insert((function(){return i}),":first-child"),o=r.select(".label-container");o&&a.append((function(){return o.node()}));var s=r.select(".label");s&&a.append((function(){return s.node()}))}}}))},ar={},or=function(t,e,n){var r=Object(h.select)('[id="'.concat(n,'"]'));Object.keys(t).forEach((function(n){var i=t[n],a="default";i.classes.length>0&&(a=i.classes.join(" "));var o,s=D(i.styles),u=void 0!==i.text?i.text:i.id;if(xt().flowchart.htmlLabels){var l={label:u.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(o=jn()(r,l).node()).parentNode.removeChild(o)}else{var h=document.createElementNS("http://www.w3.org/2000/svg","text");h.setAttribute("style",s.labelStyle.replace("color:","fill:"));for(var f=u.split(x.lineBreakRegex),d=0;d<f.length;d++){var p=document.createElementNS("http://www.w3.org/2000/svg","tspan");p.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),p.setAttribute("dy","1em"),p.setAttribute("x","1"),p.textContent=f[d],h.appendChild(p)}o=h}var y=0,g="";switch(i.type){case"round":y=5,g="rect";break;case"square":g="rect";break;case"diamond":g="question";break;case"hexagon":g="hexagon";break;case"odd":g="rect_left_inv_arrow";break;case"lean_right":g="lean_right";break;case"lean_left":g="lean_left";break;case"trapezoid":g="trapezoid";break;case"inv_trapezoid":g="inv_trapezoid";break;case"odd_right":g="rect_left_inv_arrow";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"stadium":g="stadium";break;case"subroutine":g="subroutine";break;case"cylinder":g="cylinder";break;case"group":g="rect";break;default:g="rect"}e.setNode(i.id,{labelStyle:s.labelStyle,shape:g,labelText:u,rx:y,ry:y,class:a,style:s.style,id:i.id,link:i.link,linkTarget:i.linkTarget,tooltip:Dn.getTooltip(i.id)||"",domId:Dn.lookUpDomId(i.id),haveCallback:i.haveCallback,width:"group"===i.type?500:void 0,type:i.type,padding:xt().flowchart.padding}),c.info("setNode",{labelStyle:s.labelStyle,shape:g,labelText:u,rx:y,ry:y,class:a,style:s.style,id:i.id,domId:Dn.lookUpDomId(i.id),width:"group"===i.type?500:void 0,type:i.type,padding:xt().flowchart.padding})}))},sr=function(t,e){c.info("abc78 edges = ",t);var n,r,i=0,a={};if(void 0!==t.defaultStyle){var o=D(t.defaultStyle);n=o.style,r=o.labelStyle}t.forEach((function(o){i++;var s="L-"+o.start+"-"+o.end;void 0===a[s]?(a[s]=0,c.info("abc78 new entry",s,a[s])):(a[s]++,c.info("abc78 new entry",s,a[s]));var u=s+"-"+a[s];c.info("abc78 new link id to be used is",s,u,a[s]);var l="LS-"+o.start,f="LE-"+o.end,d={style:"",labelStyle:""};switch(d.minlen=o.length||1,"arrow_open"===o.type?d.arrowhead="none":d.arrowhead="normal",d.arrowTypeStart="arrow_open",d.arrowTypeEnd="arrow_open",o.type){case"double_arrow_cross":d.arrowTypeStart="arrow_cross";case"arrow_cross":d.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":d.arrowTypeStart="arrow_point";case"arrow_point":d.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":d.arrowTypeStart="arrow_circle";case"arrow_circle":d.arrowTypeEnd="arrow_circle"}var p="",y="";switch(o.stroke){case"normal":p="fill:none;",void 0!==n&&(p=n),void 0!==r&&(y=r),d.thickness="normal",d.pattern="solid";break;case"dotted":d.thickness="normal",d.pattern="dotted",d.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":d.thickness="thick",d.pattern="solid",d.style="stroke-width: 3.5px;fill:none;"}if(void 0!==o.style){var g=D(o.style);p=g.style,y=g.labelStyle}d.style=d.style+=p,d.labelStyle=d.labelStyle+=y,void 0!==o.interpolate?d.curve=B(o.interpolate,h.curveLinear):void 0!==t.defaultInterpolate?d.curve=B(t.defaultInterpolate,h.curveLinear):d.curve=B(ar.curve,h.curveLinear),void 0===o.text?void 0!==o.style&&(d.arrowheadStyle="fill: #333"):(d.arrowheadStyle="fill: #333",d.labelpos="c"),d.labelType="text",d.label=o.text.replace(x.lineBreakRegex,"\n"),void 0===o.style&&(d.style=d.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),d.labelStyle=d.labelStyle.replace("color:","fill:"),d.id=u,d.classes="flowchart-link "+l+" "+f,e.setEdge(o.start,o.end,d,i)}))},cr=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)ar[e[n]]=t[e[n]]},ur=function(t,e){c.info("Drawing flowchart"),Dn.clear(),Dn.setGen("gen-2");var n=In.a.parser;n.yy=Dn,n.parse(t);var r=Dn.getDirection();void 0===r&&(r="TD");var i,a=xt().flowchart,o=a.nodeSpacing||50,s=a.rankSpacing||50,u=new zt.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:o,ranksep:s,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),l=Dn.getSubGraphs();c.info("Subgraphs - ",l);for(var f=l.length-1;f>=0;f--)i=l[f],c.info("Subgraph - ",i),Dn.addVertex(i.id,i.title,"group",void 0,i.classes);var d=Dn.getVertices(),p=Dn.getEdges();c.info(p);var y=0;for(y=l.length-1;y>=0;y--){i=l[y],Object(h.selectAll)("cluster").append("text");for(var g=0;g<i.nodes.length;g++)c.info("Setting up subgraphs",i.nodes[g],i.id),u.setParent(i.nodes[g],i.id)}or(d,u,e),sr(p,u);var v=Object(h.select)('[id="'.concat(e,'"]'));v.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var m=Object(h.select)("#"+e+" g");ze(m,u,["point","circle","cross"],"flowchart",e);var b=a.diagramPadding,x=v.node().getBBox(),_=x.width+2*b,k=x.height+2*b;if(c.debug("new ViewBox 0 0 ".concat(_," ").concat(k),"translate(".concat(b-u._label.marginx,", ").concat(b-u._label.marginy,")")),q(v,k,_,a.useMaxWidth),v.attr("viewBox","0 0 ".concat(_," ").concat(k)),v.select("g").attr("transform","translate(".concat(b-u._label.marginx,", ").concat(b-x.y,")")),Dn.indexNodes("subGraph"+y),!a.htmlLabels)for(var w=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),E=0;E<w.length;E++){var T=w[E],C=T.getBBox(),S=document.createElementNS("http://www.w3.org/2000/svg","rect");S.setAttribute("rx",0),S.setAttribute("ry",0),S.setAttribute("width",C.width),S.setAttribute("height",C.height),T.insertBefore(S,T.firstChild)}Object.keys(d).forEach((function(t){var n=d[t];if(n.link){var r=Object(h.select)("#"+e+' [id="'+t+'"]');if(r){var i=document.createElementNS("http://www.w3.org/2000/svg","a");i.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),i.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),i.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),n.linkTarget&&i.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);var a=r.insert((function(){return i}),":first-child"),o=r.select(".label-container");o&&a.append((function(){return o.node()}));var s=r.select(".label");s&&a.append((function(){return s.node()}))}}}))};function lr(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var hr,fr,dr="",pr="",yr="",gr=[],vr="",mr=[],br=[],xr="",_r=["active","done","crit","milestone"],kr=[],wr=!1,Er=!1,Tr=0,Cr=function(t,e,n){return t.isoWeekday()>=6&&n.indexOf("weekends")>=0||(n.indexOf(t.format("dddd").toLowerCase())>=0||n.indexOf(t.format(e.trim()))>=0)},Sr=function(t,e,n){if(n.length&&!t.manualEndTime){var r=o()(t.startTime,e,!0);r.add(1,"d");var i=o()(t.endTime,e,!0),a=Ar(r,i,e,n);t.endTime=i.toDate(),t.renderEndTime=a}},Ar=function(t,e,n,r){for(var i=!1,a=null;t<=e;)i||(a=e.toDate()),(i=Cr(t,n,r))&&e.add(1,"d"),t.add(1,"d");return a},Mr=function(t,e,n){n=n.trim();var r=/^after\s+([\d\w- ]+)/.exec(n.trim());if(null!==r){var i=null;if(r[1].split(" ").forEach((function(t){var e=Rr(t);void 0!==e&&(i?e.endTime>i.endTime&&(i=e):i=e)})),i)return i.endTime;var a=new Date;return a.setHours(0,0,0,0),a}var s=o()(n,e.trim(),!0);return s.isValid()?s.toDate():(c.debug("Invalid date:"+n),c.debug("With date format:"+e.trim()),new Date)},Or=function(t,e){if(null!==t)switch(t[2]){case"s":e.add(t[1],"seconds");break;case"m":e.add(t[1],"minutes");break;case"h":e.add(t[1],"hours");break;case"d":e.add(t[1],"days");break;case"w":e.add(t[1],"weeks")}return e.toDate()},Br=function(t,e,n,r){r=r||!1,n=n.trim();var i=o()(n,e.trim(),!0);return i.isValid()?(r&&i.add(1,"d"),i.toDate()):Or(/^([\d]+)([wdhms])/.exec(n.trim()),o()(t))},Nr=0,Dr=function(t){return void 0===t?"task"+(Nr+=1):t},Lr=[],Ir={},Rr=function(t){var e=Ir[t];return Lr[e]},Fr=function(){for(var t=function(t){var e=Lr[t],n="";switch(Lr[t].raw.startTime.type){case"prevTaskEnd":var r=Rr(e.prevTaskId);e.startTime=r.endTime;break;case"getStartDate":(n=Mr(0,dr,Lr[t].raw.startTime.startData))&&(Lr[t].startTime=n)}return Lr[t].startTime&&(Lr[t].endTime=Br(Lr[t].startTime,dr,Lr[t].raw.endTime.data,wr),Lr[t].endTime&&(Lr[t].processed=!0,Lr[t].manualEndTime=o()(Lr[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Sr(Lr[t],dr,gr))),Lr[t].processed},e=!0,n=0;n<Lr.length;n++)t(n),e=e&&Lr[n].processed;return e},Pr=function(t,e){t.split(",").forEach((function(t){var n=Rr(t);void 0!==n&&n.classes.push(e)}))},jr=function(t,e){kr.push((function(){var n=document.querySelector('[id="'.concat(t,'"]'));null!==n&&n.addEventListener("click",(function(){e()}))})),kr.push((function(){var n=document.querySelector('[id="'.concat(t,'-text"]'));null!==n&&n.addEventListener("click",(function(){e()}))}))},Yr={parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().gantt},clear:function(){mr=[],br=[],xr="",kr=[],vr="",Nr=0,hr=void 0,fr=void 0,Lr=[],dr="",pr="",yr="",gr=[],wr=!1,Er=!1,Tr=0},setDateFormat:function(t){dr=t},getDateFormat:function(){return dr},enableInclusiveEndDates:function(){wr=!0},endDatesAreInclusive:function(){return wr},enableTopAxis:function(){Er=!0},topAxisEnabled:function(){return Er},setAxisFormat:function(t){pr=t},getAxisFormat:function(){return pr},setTodayMarker:function(t){yr=t},getTodayMarker:function(){return yr},setTitle:function(t){vr=t},getTitle:function(){return vr},addSection:function(t){xr=t,mr.push(t)},getSections:function(){return mr},getTasks:function(){for(var t=Fr(),e=0;!t&&e<10;)t=Fr(),e++;return br=Lr},addTask:function(t,e){var n={section:xr,type:xr,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};zr(n,r,_r);for(var i=0;i<n.length;i++)n[i]=n[i].trim();switch(n.length){case 1:r.id=Dr(),r.startTime={type:"prevTaskEnd",id:t},r.endTime={data:n[0]};break;case 2:r.id=Dr(),r.startTime={type:"getStartDate",startData:n[0]},r.endTime={data:n[1]};break;case 3:r.id=Dr(n[0]),r.startTime={type:"getStartDate",startData:n[1]},r.endTime={data:n[2]}}return r}(fr,e);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=fr,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.order=Tr,Tr++;var i=Lr.push(n);fr=n.id,Ir[n.id]=i-1},findTaskById:Rr,addTaskOrg:function(t,e){var n={section:xr,type:xr,description:t,task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};zr(n,r,_r);for(var i=0;i<n.length;i++)n[i]=n[i].trim();var a="";switch(n.length){case 1:r.id=Dr(),r.startTime=t.endTime,a=n[0];break;case 2:r.id=Dr(),r.startTime=Mr(0,dr,n[0]),a=n[1];break;case 3:r.id=Dr(n[0]),r.startTime=Mr(0,dr,n[1]),a=n[2]}return a&&(r.endTime=Br(r.startTime,dr,a,wr),r.manualEndTime=o()(a,"YYYY-MM-DD",!0).isValid(),Sr(r,dr,gr)),r}(hr,e);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,hr=n,br.push(n)},setExcludes:function(t){gr=t.toLowerCase().split(/[\s,]+/)},getExcludes:function(){return gr},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){if("loose"===xt().securityLevel&&void 0!==e){var r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var i=0;i<r.length;i++){var a=r[i].trim();'"'===a.charAt(0)&&'"'===a.charAt(a.length-1)&&(a=a.substr(1,a.length-2)),r[i]=a}}0===r.length&&r.push(t),void 0!==Rr(t)&&jr(t,(function(){W.runFunc.apply(W,[e].concat(lr(r)))}))}}(t,e,n)})),Pr(t,"clickable")},setLink:function(t,e){var n=e;"loose"!==xt().securityLevel&&(n=Object(y.sanitizeUrl)(e)),t.split(",").forEach((function(t){void 0!==Rr(t)&&jr(t,(function(){window.open(n,"_self")}))})),Pr(t,"clickable")},bindFunctions:function(t){kr.forEach((function(e){e(t)}))},durationToDate:Or};function zr(t,e,n){for(var r=!0;r;)r=!1,n.forEach((function(n){var i=new RegExp("^\\s*"+n+"\\s*$");t[0].match(i)&&(e[n]=!0,t.shift(1),r=!0)}))}var Ur=n(24),$r=n.n(Ur);Ur.parser.yy=Yr;var qr,Wr=function(){},Vr=function(t,e){var n=xt().gantt;Ur.parser.yy.clear(),Ur.parser.parse(t);var r=document.getElementById(e);void 0===(qr=r.parentElement.offsetWidth)&&(qr=1200),void 0!==n.useWidth&&(qr=n.useWidth);var i=Ur.parser.yy.getTasks(),a=i.length*(n.barHeight+n.barGap)+2*n.topPadding;r.setAttribute("viewBox","0 0 "+qr+" "+a);for(var o=Object(h.select)('[id="'.concat(e,'"]')),s=Object(h.scaleTime)().domain([Object(h.min)(i,(function(t){return t.startTime})),Object(h.max)(i,(function(t){return t.endTime}))]).rangeRound([0,qr-n.leftPadding-n.rightPadding]),c=[],u=0;u<i.length;u++)c.push(i[u].type);var l=c;function f(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}c=function(t){for(var e={},n=[],r=0,i=t.length;r<i;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}(c),i.sort((function(t,e){var n=t.startTime,r=e.startTime,i=0;return n>r?i=1:n<r&&(i=-1),i})),function(t,e,r){var i=n.barHeight,a=i+n.barGap,u=n.topPadding,d=n.leftPadding;Object(h.scaleLinear)().domain([0,c.length]).range(["#00B9FA","#F95002"]).interpolate(h.interpolateHcl);(function(t,e,r,i){var a=Object(h.axisBottom)(s).tickSize(-i+e+n.gridLineStartPadding).tickFormat(Object(h.timeFormat)(Ur.parser.yy.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));if(o.append("g").attr("class","grid").attr("transform","translate("+t+", "+(i-50)+")").call(a).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),Yr.topAxisEnabled()||n.topAxis){var c=Object(h.axisTop)(s).tickSize(-i+e+n.gridLineStartPadding).tickFormat(Object(h.timeFormat)(Ur.parser.yy.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));o.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(c).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}})(d,u,0,r),function(t,e,r,i,a,u,l){o.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",(function(t,n){return t.order*e+r-2})).attr("width",(function(){return l-n.rightPadding/2})).attr("height",e).attr("class",(function(t){for(var e=0;e<c.length;e++)if(t.type===c[e])return"section section"+e%n.numberSectionStyles;return"section section0"}));var h=o.append("g").selectAll("rect").data(t).enter();h.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?s(t.startTime)+i+.5*(s(t.endTime)-s(t.startTime))-.5*a:s(t.startTime)+i})).attr("y",(function(t,n){return t.order*e+r})).attr("width",(function(t){return t.milestone?a:s(t.renderEndTime||t.endTime)-s(t.startTime)})).attr("height",a).attr("transform-origin",(function(t,n){return n=t.order,(s(t.startTime)+i+.5*(s(t.endTime)-s(t.startTime))).toString()+"px "+(n*e+r+.5*a).toString()+"px"})).attr("class",(function(t){var e="";t.classes.length>0&&(e=t.classes.join(" "));for(var r=0,i=0;i<c.length;i++)t.type===c[i]&&(r=i%n.numberSectionStyles);var a="";return t.active?t.crit?a+=" activeCrit":a=" active":t.done?a=t.crit?" doneCrit":" done":t.crit&&(a+=" crit"),0===a.length&&(a=" task"),t.milestone&&(a=" milestone "+a),a+=r,"task"+(a+=" "+e)})),h.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",n.fontSize).attr("x",(function(t){var e=s(t.startTime),r=s(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(s(t.endTime)-s(t.startTime))-.5*a),t.milestone&&(r=e+a);var o=this.getBBox().width;return o>r-e?r+o+1.5*n.leftPadding>l?e+i-5:r+i+5:(r-e)/2+e+i})).attr("y",(function(t,i){return t.order*e+n.barHeight/2+(n.fontSize/2-2)+r})).attr("text-height",a).attr("class",(function(t){var e=s(t.startTime),r=s(t.endTime);t.milestone&&(r=e+a);var i=this.getBBox().width,o="";t.classes.length>0&&(o=t.classes.join(" "));for(var u=0,h=0;h<c.length;h++)t.type===c[h]&&(u=h%n.numberSectionStyles);var f="";return t.active&&(f=t.crit?"activeCritText"+u:"activeText"+u),t.done?f=t.crit?f+" doneCritText"+u:f+" doneText"+u:t.crit&&(f=f+" critText"+u),t.milestone&&(f+=" milestoneText"),i>r-e?r+i+1.5*n.leftPadding>l?o+" taskTextOutsideLeft taskTextOutside"+u+" "+f:o+" taskTextOutsideRight taskTextOutside"+u+" "+f+" width-"+i:o+" taskText taskText"+u+" "+f+" width-"+i}))}(t,a,u,d,i,0,e),function(t,e){for(var r=[],i=0,a=0;a<c.length;a++)r[a]=[c[a],(s=c[a],u=l,f(u)[s]||0)];var s,u;o.append("g").selectAll("text").data(r).enter().append((function(t){var e=t[0].split(x.lineBreakRegex),n=-(e.length-1)/2,r=document.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("dy",n+"em");for(var i=0;i<e.length;i++){var a=document.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttribute("alignment-baseline","central"),a.setAttribute("x","10"),i>0&&a.setAttribute("dy","1em"),a.textContent=e[i],r.appendChild(a)}return r})).attr("x",10).attr("y",(function(n,a){if(!(a>0))return n[1]*t/2+e;for(var o=0;o<a;o++)return i+=r[a-1][1],n[1]*t/2+i*t+e})).attr("font-size",n.sectionFontSize).attr("font-size",n.sectionFontSize).attr("class",(function(t){for(var e=0;e<c.length;e++)if(t[0]===c[e])return"sectionTitle sectionTitle"+e%n.numberSectionStyles;return"sectionTitle"}))}(a,u),function(t,e,r,i){var a=Yr.getTodayMarker();if("off"===a)return;var c=o.append("g").attr("class","today"),u=new Date,l=c.append("line");l.attr("x1",s(u)+t).attr("x2",s(u)+t).attr("y1",n.titleTopMargin).attr("y2",i-n.titleTopMargin).attr("class","today"),""!==a&&l.attr("style",a.replace(/,/g,";"))}(d,0,0,r)}(i,qr,a),q(o,a,qr,n.useMaxWidth),o.append("text").text(Ur.parser.yy.getTitle()).attr("x",qr/2).attr("y",n.titleTopMargin).attr("class","titleText")},Hr={},Gr=null,Xr={master:Gr},Zr="master",Qr="LR",Kr=0;function Jr(){return R({length:7})}function ti(t,e){for(c.debug("Entering isfastforwardable:",t.id,e.id);t.seq<=e.seq&&t!==e&&null!=e.parent;){if(Array.isArray(e.parent))return c.debug("In merge commit:",e.parent),ti(t,Hr[e.parent[0]])||ti(t,Hr[e.parent[1]]);e=Hr[e.parent]}return c.debug(t.id,e.id),t.id===e.id}var ei={};function ni(t,e,n){var r=t.indexOf(e);-1===r?t.push(n):t.splice(r,1,n)}function ri(t){var e=t.reduce((function(t,e){return t.seq>e.seq?t:e}),t[0]),n="";t.forEach((function(t){n+=t===e?"\t*":"\t|"}));var r,i,a,o=[n,e.id,e.seq];for(var s in Xr)Xr[s]===e.id&&o.push(s);if(c.debug(o.join(" ")),Array.isArray(e.parent)){var u=Hr[e.parent[0]];ni(t,e,u),t.push(Hr[e.parent[1]])}else{if(null==e.parent)return;var l=Hr[e.parent];ni(t,e,l)}r=t,i=function(t){return t.id},a=Object.create(null),ri(t=r.reduce((function(t,e){var n=i(e);return a[n]||(a[n]=!0,t.push(e)),t}),[]))}var ii,ai=function(){var t=Object.keys(Hr).map((function(t){return Hr[t]}));return t.forEach((function(t){c.debug(t.id)})),t.sort((function(t,e){return e.seq-t.seq})),t},oi={setDirection:function(t){Qr=t},setOptions:function(t){c.debug("options str",t),t=(t=t&&t.trim())||"{}";try{ei=JSON.parse(t)}catch(t){c.error("error while parsing gitGraph options",t.message)}},getOptions:function(){return ei},commit:function(t){var e={id:Jr(),message:t,seq:Kr++,parent:null==Gr?null:Gr.id};Gr=e,Hr[e.id]=e,Xr[Zr]=e.id,c.debug("in pushCommit "+e.id)},branch:function(t){Xr[t]=null!=Gr?Gr.id:null,c.debug("in createBranch")},merge:function(t){var e=Hr[Xr[Zr]],n=Hr[Xr[t]];if(function(t,e){return t.seq>e.seq&&ti(e,t)}(e,n))c.debug("Already merged");else{if(ti(e,n))Xr[Zr]=Xr[t],Gr=Hr[Xr[Zr]];else{var r={id:Jr(),message:"merged branch "+t+" into "+Zr,seq:Kr++,parent:[null==Gr?null:Gr.id,Xr[t]]};Gr=r,Hr[r.id]=r,Xr[Zr]=r.id}c.debug(Xr),c.debug("in mergeBranch")}},checkout:function(t){c.debug("in checkout");var e=Xr[Zr=t];Gr=Hr[e]},reset:function(t){c.debug("in reset",t);var e=t.split(":")[0],n=parseInt(t.split(":")[1]),r="HEAD"===e?Gr:Hr[Xr[e]];for(c.debug(r,n);n>0;)if(n--,!(r=Hr[r.parent])){var i="Critical error - unique parent commit not found during reset";throw c.error(i),i}Gr=r,Xr[Zr]=r.id},prettyPrint:function(){c.debug(Hr),ri([ai()[0]])},clear:function(){Hr={},Xr={master:Gr=null},Zr="master",Kr=0},getBranchesAsObjArray:function(){var t=[];for(var e in Xr)t.push({name:e,commit:Hr[Xr[e]]});return t},getBranches:function(){return Xr},getCommits:function(){return Hr},getCommitsArray:ai,getCurrentBranch:function(){return Zr},getDirection:function(){return Qr},getHead:function(){return Gr}},si=n(72),ci=n.n(si),ui={},li={nodeSpacing:150,nodeFillColor:"yellow",nodeStrokeWidth:2,nodeStrokeColor:"grey",lineStrokeWidth:4,branchOffset:50,lineColor:"grey",leftMargin:50,branchColors:["#442f74","#983351","#609732","#AA9A39"],nodeRadius:10,nodeLabel:{width:75,height:100,x:-25,y:0}},hi={};function fi(t,e,n,r){var i=B(r,h.curveBasis),a=li.branchColors[n%li.branchColors.length],o=Object(h.line)().x((function(t){return Math.round(t.x)})).y((function(t){return Math.round(t.y)})).curve(i);t.append("svg:path").attr("d",o(e)).style("stroke",a).style("stroke-width",li.lineStrokeWidth).style("fill","none")}function di(t,e){e=e||t.node().getBBox();var n=t.node().getCTM();return{left:n.e+e.x*n.a,top:n.f+e.y*n.d,width:e.width,height:e.height}}function pi(t,e,n,r,i){c.debug("svgDrawLineForCommits: ",e,n);var a=di(t.select("#node-"+e+" circle")),o=di(t.select("#node-"+n+" circle"));switch(r){case"LR":if(a.left-o.left>li.nodeSpacing){var s={x:a.left-li.nodeSpacing,y:o.top+o.height/2};fi(t,[s,{x:o.left+o.width,y:o.top+o.height/2}],i,"linear"),fi(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-li.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-li.nodeSpacing/2,y:s.y},s],i)}else fi(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-li.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-li.nodeSpacing/2,y:o.top+o.height/2},{x:o.left+o.width,y:o.top+o.height/2}],i);break;case"BT":if(o.top-a.top>li.nodeSpacing){var u={x:o.left+o.width/2,y:a.top+a.height+li.nodeSpacing};fi(t,[u,{x:o.left+o.width/2,y:o.top}],i,"linear"),fi(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+a.height+li.nodeSpacing/2},{x:o.left+o.width/2,y:u.y-li.nodeSpacing/2},u],i)}else fi(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+li.nodeSpacing/2},{x:o.left+o.width/2,y:o.top-li.nodeSpacing/2},{x:o.left+o.width/2,y:o.top}],i)}}function yi(t,e){return t.select(e).node().cloneNode(!0)}function gi(t,e,n,r){var i,a=Object.keys(ui).length;if("string"==typeof e)do{if(i=ui[e],c.debug("in renderCommitHistory",i.id,i.seq),t.select("#node-"+e).size()>0)return;t.append((function(){return yi(t,"#def-commit")})).attr("class","commit").attr("id",(function(){return"node-"+i.id})).attr("transform",(function(){switch(r){case"LR":return"translate("+(i.seq*li.nodeSpacing+li.leftMargin)+", "+ii*li.branchOffset+")";case"BT":return"translate("+(ii*li.branchOffset+li.leftMargin)+", "+(a-i.seq)*li.nodeSpacing+")"}})).attr("fill",li.nodeFillColor).attr("stroke",li.nodeStrokeColor).attr("stroke-width",li.nodeStrokeWidth);var o=void 0;for(var s in n)if(n[s].commit===i){o=n[s];break}o&&(c.debug("found branch ",o.name),t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","branch-label").text(o.name+", ")),t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","commit-id").text(i.id),""!==i.message&&"BT"===r&&t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","commit-msg").text(", "+i.message),e=i.parent}while(e&&ui[e]);Array.isArray(e)&&(c.debug("found merge commmit",e),gi(t,e[0],n,r),ii++,gi(t,e[1],n,r),ii--)}function vi(t,e,n,r){for(r=r||0;e.seq>0&&!e.lineDrawn;)"string"==typeof e.parent?(pi(t,e.id,e.parent,n,r),e.lineDrawn=!0,e=ui[e.parent]):Array.isArray(e.parent)&&(pi(t,e.id,e.parent[0],n,r),pi(t,e.id,e.parent[1],n,r+1),vi(t,ui[e.parent[1]],n,r+1),e.lineDrawn=!0,e=ui[e.parent[0]])}var mi,bi=function(t){hi=t},xi=function(t,e,n){try{var r=ci.a.parser;r.yy=oi,r.yy.clear(),c.debug("in gitgraph renderer",t+"\n","id:",e,n),r.parse(t+"\n"),li=Object.assign(li,hi,oi.getOptions()),c.debug("effective options",li);var i=oi.getDirection();ui=oi.getCommits();var a=oi.getBranchesAsObjArray();"BT"===i&&(li.nodeLabel.x=a.length*li.branchOffset,li.nodeLabel.width="100%",li.nodeLabel.y=-2*li.nodeRadius);var o=Object(h.select)('[id="'.concat(e,'"]'));for(var s in function(t){t.append("defs").append("g").attr("id","def-commit").append("circle").attr("r",li.nodeRadius).attr("cx",0).attr("cy",0),t.select("#def-commit").append("foreignObject").attr("width",li.nodeLabel.width).attr("height",li.nodeLabel.height).attr("x",li.nodeLabel.x).attr("y",li.nodeLabel.y).attr("class","node-label").attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").append("p").html("")}(o),ii=1,a){var u=a[s];gi(o,u.commit.id,a,i),vi(o,u.commit,i),ii++}o.attr("height",(function(){return"BT"===i?Object.keys(ui).length*li.nodeSpacing:(a.length+1)*li.branchOffset}))}catch(t){c.error("Error while rendering gitgraph"),c.error(t.message)}},_i="",ki=!1,wi={setMessage:function(t){c.debug("Setting message to: "+t),_i=t},getMessage:function(){return _i},setInfo:function(t){ki=t},getInfo:function(){return ki}},Ei=n(73),Ti=n.n(Ei),Ci={},Si=function(t){Object.keys(t).forEach((function(e){Ci[e]=t[e]}))},Ai=function(t,e,n){try{var r=Ti.a.parser;r.yy=wi,c.debug("Renering info diagram\n"+t),r.parse(t),c.debug("Parsed info diagram");var i=Object(h.select)("#"+e);i.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+n),i.attr("height",100),i.attr("width",400)}catch(t){c.error("Error while rendering info diagram"),c.error(t.message)}},Mi=n(74),Oi=n.n(Mi),Bi={},Ni="",Di=!1,Li={parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().pie},addSection:function(t,e){void 0===Bi[t]&&(Bi[t]=e,c.debug("Added new section :",t))},getSections:function(){return Bi},cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){Bi={},Ni="",Di=!1},setTitle:function(t){Ni=t},getTitle:function(){return Ni},setShowData:function(t){Di=t},getShowData:function(){return Di}},Ii=xt(),Ri=function(t,e){try{Ii=xt();var n=Oi.a.parser;n.yy=Li,c.debug("Rendering info diagram\n"+t),n.yy.clear(),n.parse(t),c.debug("Parsed info diagram");var r=document.getElementById(e);void 0===(mi=r.parentElement.offsetWidth)&&(mi=1200),void 0!==Ii.useWidth&&(mi=Ii.useWidth),void 0!==Ii.pie.useWidth&&(mi=Ii.pie.useWidth);var i=Object(h.select)("#"+e);q(i,450,mi,Ii.pie.useMaxWidth),r.setAttribute("viewBox","0 0 "+mi+" 450");var a=Math.min(mi,450)/2-40,o=i.append("g").attr("transform","translate("+mi/2+",225)"),s=Li.getSections(),u=0;Object.keys(s).forEach((function(t){u+=s[t]}));var l=Ii.themeVariables,f=[l.pie1,l.pie2,l.pie3,l.pie4,l.pie5,l.pie6,l.pie7,l.pie8,l.pie9,l.pie10,l.pie11,l.pie12],d=Object(h.scaleOrdinal)().domain(s).range(f),p=Object(h.pie)().value((function(t){return t.value}))(Object(h.entries)(s)),y=Object(h.arc)().innerRadius(0).outerRadius(a);o.selectAll("mySlices").data(p).enter().append("path").attr("d",y).attr("fill",(function(t){return d(t.data.key)})).attr("class","pieCircle"),o.selectAll("mySlices").data(p.filter((function(t){return 0!==t.data.value}))).enter().append("text").text((function(t){return(t.data.value/u*100).toFixed(0)+"%"})).attr("transform",(function(t){return"translate("+y.centroid(t)+")"})).style("text-anchor","middle").attr("class","slice"),o.append("text").text(n.yy.getTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");var g=o.selectAll(".legend").data(d.domain()).enter().append("g").attr("class","legend").attr("transform",(function(t,e){return"translate(216,"+(22*e-22*d.domain().length/2)+")"}));g.append("rect").attr("width",18).attr("height",18).style("fill",d).style("stroke",d),g.data(p.filter((function(t){return 0!==t.data.value}))).append("text").attr("x",22).attr("y",14).text((function(t){return n.yy.getShowData()||Ii.showData||Ii.pie.showData?t.data.key+" ["+t.data.value+"]":t.data.key}))}catch(t){c.error("Error while rendering info diagram"),c.error(t)}},Fi=n(45),Pi=n.n(Fi),ji=[],Yi={},zi={},Ui={},$i={},qi={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().req},addRequirement:function(t,e){return void 0===zi[t]&&(zi[t]={name:t,type:e,id:Yi.id,text:Yi.text,risk:Yi.risk,verifyMethod:Yi.verifyMethod}),Yi={},zi[t]},getRequirements:function(){return zi},setNewReqId:function(t){void 0!==Yi&&(Yi.id=t)},setNewReqText:function(t){void 0!==Yi&&(Yi.text=t)},setNewReqRisk:function(t){void 0!==Yi&&(Yi.risk=t)},setNewReqVerifyMethod:function(t){void 0!==Yi&&(Yi.verifyMethod=t)},addElement:function(t){return void 0===$i[t]&&($i[t]={name:t,type:Ui.type,docRef:Ui.docRef},c.info("Added new requirement: ",t)),Ui={},$i[t]},getElements:function(){return $i},setNewElementType:function(t){void 0!==Ui&&(Ui.type=t)},setNewElementDocRef:function(t){void 0!==Ui&&(Ui.docRef=t)},addRelationship:function(t,e,n){ji.push({type:t,src:e,dst:n})},getRelationships:function(){return ji},clear:function(){ji=[],Yi={},zi={},Ui={},$i={}}},Wi={CONTAINS:"contains",ARROW:"arrow"},Vi=Wi,Hi=function(t,e){var n=t.append("defs").append("marker").attr("id",Wi.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");n.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),n.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),n.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",Wi.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d","M0,0\n L".concat(e.line_height,",").concat(e.line_height/2,"\n M").concat(e.line_height,",").concat(e.line_height/2,"\n L0,").concat(e.line_height)).attr("stroke-width",1)},Gi={},Xi=0,Zi=function(t,e){return t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",Gi.rect_min_width+"px").attr("height",Gi.rect_min_height+"px")},Qi=function(t,e,n){var r=Gi.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",r).attr("y",Gi.rect_padding).attr("dominant-baseline","hanging"),a=0;n.forEach((function(t){0==a?i.append("tspan").attr("text-anchor","middle").attr("x",Gi.rect_min_width/2).attr("dy",0).text(t):i.append("tspan").attr("text-anchor","middle").attr("x",Gi.rect_min_width/2).attr("dy",.75*Gi.line_height).text(t),a++}));var o=1.5*Gi.rect_padding+a*Gi.line_height*.75;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",Gi.rect_min_width).attr("y1",o).attr("y2",o),{titleNode:i,y:o}},Ki=function(t,e,n,r){var i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",Gi.rect_padding).attr("y",r).attr("dominant-baseline","hanging"),a=0,o=[];return n.forEach((function(t){for(var e=t.length;e>30&&a<3;){var n=t.substring(0,30);e=(t=t.substring(30,t.length)).length,o[o.length]=n,a++}if(3==a){var r=o[o.length-1];o[o.length-1]=r.substring(0,r.length-4)+"..."}else o[o.length]=t;a=0})),o.forEach((function(t){i.append("tspan").attr("x",Gi.rect_padding).attr("dy",Gi.line_height).text(t)})),i},Ji=function(t,e,n,r){var i=n.edge(ta(e.src),ta(e.dst)),a=Object(h.line)().x((function(t){return t.x})).y((function(t){return t.y})),o=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",a(i.points)).attr("fill","none");e.type==qi.Relationships.CONTAINS?o.attr("marker-start","url("+x.getUrl(Gi.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+x.getUrl(Gi.arrowMarkerAbsolute)+"#"+Vi.ARROW+"_line_ending)")),function(t,e,n,r){var i=e.node().getTotalLength(),a=e.node().getPointAtLength(.5*i),o="rel"+Xi;Xi++;var s=t.append("text").attr("class","req relationshipLabel").attr("id",o).attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(r).node().getBBox();t.insert("rect","#"+o).attr("class","req reqLabelBox").attr("x",a.x-s.width/2).attr("y",a.y-s.height/2).attr("width",s.width).attr("height",s.height).attr("fill","white").attr("fill-opacity","85%")}(t,o,0,"<<".concat(e.type,">>"))},ta=function(t){return t.replace(/\s/g,"").replace(/\./g,"_")},ea=function(t){if(void 0!==t)for(var e=Object.keys(t),n=0;n<e.length;n++)Gi[e[n]]=t[e[n]]},na=function(t,e){Fi.parser.yy=qi,Fi.parser.yy.clear(),Fi.parser.parse(t);var n=Object(h.select)("[id='".concat(e,"']"));Hi(n,Gi);var r,i,a,o=new zt.a.Graph({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:Gi.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}})),s=qi.getRequirements(),u=qi.getElements(),l=qi.getRelationships();r=s,i=o,a=n,Object.keys(r).forEach((function(t){var e=r[t];t=ta(t),c.info("Added new requirement: ",t);var n=a.append("g").attr("id",t),o=Zi(n,"req-"+t),s=[],u=Qi(n,t+"_title",["<<".concat(e.type,">>"),"".concat(e.name)]);s.push(u.titleNode);var l=Ki(n,t+"_body",["Id: ".concat(e.id),"Text: ".concat(e.text),"Risk: ".concat(e.risk),"Verification: ".concat(e.verifyMethod)],u.y);s.push(l);var h=o.node().getBBox();i.setNode(t,{width:h.width,height:h.height,shape:"rect",id:t})})),function(t,e,n){Object.keys(t).forEach((function(r){var i=t[r],a=ta(r),o=n.append("g").attr("id",a),s="element-"+a,c=Zi(o,s),u=[],l=Qi(o,s+"_title",["<<Element>>","".concat(r)]);u.push(l.titleNode);var h=Ki(o,s+"_body",["Type: ".concat(i.type||"Not Specified"),"Doc Ref: ".concat(i.docRef||"None")],l.y);u.push(h);var f=c.node().getBBox();e.setNode(a,{width:f.width,height:f.height,shape:"rect",id:a})}))}(u,o,n),function(t,e){t.forEach((function(t){var n=ta(t.src),r=ta(t.dst);e.setEdge(n,r,{relationship:t})}))}(l,o),jt.a.layout(o),function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&(t.select("#"+n),t.select("#"+n).attr("transform","translate("+(e.node(n).x-e.node(n).width/2)+","+(e.node(n).y-e.node(n).height/2)+" )"))}))}(n,o),l.forEach((function(t){Ji(n,t,o,e)}));var f=Gi.rect_padding,d=n.node().getBBox(),p=d.width+2*f,y=d.height+2*f;q(n,y,p,Gi.useMaxWidth),n.attr("viewBox","".concat(d.x-f," ").concat(d.y-f," ").concat(p," ").concat(y))},ra=n(2),ia=n.n(ra),aa=void 0,oa={},sa=[],ca=[],ua="",la=!1,ha=!1,fa=!1,da=function(t,e,n){var r=oa[t];r&&e===r.name&&null==n||(null!=n&&null!=n.text||(n={text:e,wrap:null}),oa[t]={name:e,description:n.text,wrap:void 0===n.wrap&&ga()||!!n.wrap,prevActor:aa},aa&&oa[aa]&&(oa[aa].nextActor=t),aa=t)},pa=function(t){var e,n=0;for(e=0;e<sa.length;e++)sa[e].type===va.ACTIVE_START&&sa[e].from.actor===t&&n++,sa[e].type===va.ACTIVE_END&&sa[e].from.actor===t&&n--;return n},ya=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{text:void 0,wrap:void 0},r=arguments.length>3?arguments[3]:void 0;if(r===va.ACTIVE_END){var i=pa(t.actor);if(i<1){var a=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw a.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a}}return sa.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&ga()||!!n.wrap,type:r}),!0},ga=function(){return fa},va={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ma=function(t,e,n){var r={actor:t,placement:e,message:n.text,wrap:void 0===n.wrap&&ga()||!!n.wrap},i=[].concat(t,t);ca.push(r),sa.push({from:i[0],to:i[1],message:n.text,wrap:void 0===n.wrap&&ga()||!!n.wrap,type:va.NOTE,placement:e})},ba=function(t){ua=t.text,la=void 0===t.wrap&&ga()||!!t.wrap},xa={addActor:da,addMessage:function(t,e,n,r){sa.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&ga()||!!n.wrap,answer:r})},addSignal:ya,autoWrap:ga,setWrap:function(t){fa=t},enableSequenceNumbers:function(){ha=!0},showSequenceNumbers:function(){return ha},getMessages:function(){return sa},getActors:function(){return oa},getActor:function(t){return oa[t]},getActorKeys:function(){return Object.keys(oa)},getTitle:function(){return ua},parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().sequence},getTitleWrapped:function(){return la},clear:function(){oa={},sa=[]},parseMessage:function(t){var e=t.trim(),n={text:e.replace(/^[:]?(?:no)?wrap:/,"").trim(),wrap:null!==e.match(/^[:]?wrap:/)||null===e.match(/^[:]?nowrap:/)&&void 0};return c.debug("parseMessage:",n),n},LINETYPE:va,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:ma,setTitle:ba,apply:function t(e){if(e instanceof Array)e.forEach((function(e){t(e)}));else switch(e.type){case"addActor":da(e.actor,e.actor,e.description);break;case"activeStart":case"activeEnd":ya(e.actor,void 0,void 0,e.signalType);break;case"addNote":ma(e.actor,e.placement,e.text);break;case"addMessage":ya(e.from,e.to,e.msg,e.signalType);break;case"loopStart":ya(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":ya(void 0,void 0,void 0,e.signalType);break;case"rectStart":ya(void 0,void 0,e.color,e.signalType);break;case"rectEnd":ya(void 0,void 0,void 0,e.signalType);break;case"optStart":ya(void 0,void 0,e.optText,e.signalType);break;case"optEnd":ya(void 0,void 0,void 0,e.signalType);break;case"altStart":case"else":ya(void 0,void 0,e.altText,e.signalType);break;case"altEnd":ya(void 0,void 0,void 0,e.signalType);break;case"setTitle":ba(e.text);break;case"parStart":case"and":ya(void 0,void 0,e.parText,e.signalType);break;case"parEnd":ya(void 0,void 0,void 0,e.signalType)}}},_a=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},ka=function(t,e){var n=0,r=0,i=e.text.split(x.lineBreakRegex),a=[],o=0,s=function(){return e.y};if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":s=function(){return Math.round(e.y+e.textMargin)};break;case"middle":case"center":s=function(){return Math.round(e.y+(n+r+e.textMargin)/2)};break;case"bottom":case"end":s=function(){return Math.round(e.y+(n+r+2*e.textMargin)-e.textMargin)}}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="text-after-edge",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="text-before-edge",e.alignmentBaseline="middle"}for(var c=0;c<i.length;c++){var u=i[c];void 0!==e.textMargin&&0===e.textMargin&&void 0!==e.fontSize&&(o=c*e.fontSize);var l=t.append("text");if(l.attr("x",e.x),l.attr("y",s()),void 0!==e.anchor&&l.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&l.style("font-family",e.fontFamily),void 0!==e.fontSize&&l.style("font-size",e.fontSize),void 0!==e.fontWeight&&l.style("font-weight",e.fontWeight),void 0!==e.fill&&l.attr("fill",e.fill),void 0!==e.class&&l.attr("class",e.class),void 0!==e.dy?l.attr("dy",e.dy):0!==o&&l.attr("dy",o),e.tspan){var h=l.append("tspan");h.attr("x",e.x),void 0!==e.fill&&h.attr("fill",e.fill),h.text(u)}else l.text(u);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(l._groups||l)[0][0].getBBox().height,n=r),a.push(l)}return a},wa=function(t,e){var n,r,i,a,o,s=t.append("polygon");return s.attr("points",(n=e.x,r=e.y,i=e.width,a=e.height,n+","+r+" "+(n+i)+","+r+" "+(n+i)+","+(r+a-(o=7))+" "+(n+i-1.2*o)+","+(r+a)+" "+n+","+(r+a))),s.attr("class","labelBox"),e.y=e.y+e.height/2,ka(t,e),s},Ea=-1,Ta=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},Ca=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},Sa=function(){function t(t,e,n,i,a,o,s){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c){for(var u=c.actorFontSize,l=c.actorFontFamily,h=c.actorFontWeight,f=t.split(x.lineBreakRegex),d=0;d<f.length;d++){var p=d*u-u*(f.length-1)/2,y=e.append("text").attr("x",n+a/2).attr("y",i).style("text-anchor","middle").style("font-size",u).style("font-weight",h).style("font-family",l);y.append("tspan").attr("x",n+a/2).attr("dy",p).text(f[d]),y.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(y,s)}}function n(t,n,i,a,o,s,c,u){var l=n.append("switch"),h=l.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).append("div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,i,a,o,s,c,u),r(h,c)}function r(t,e){for(var n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),Aa={drawRect:_a,drawText:ka,drawLabel:wa,drawActor:function(t,e,n){var r=e.x+e.width/2,i=t.append("g");0===e.y&&(Ea++,i.append("line").attr("id","actor"+Ea).attr("x1",r).attr("y1",5).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));var a=Ca();a.x=e.x,a.y=e.y,a.fill="#eaeaea",a.width=e.width,a.height=e.height,a.class="actor",a.rx=3,a.ry=3,_a(i,a),Sa(n)(e.description,i,a.x,a.y,a.width,a.height,{class:"actor"},n)},anchorElement:function(t){return t.append("g")},drawActivation:function(t,e,n,r,i){var a=Ca(),o=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=n-e.starty,_a(o,a)},drawLoop:function(t,e,n,r){var i=r.boxMargin,a=r.boxTextMargin,o=r.labelBoxHeight,s=r.labelBoxWidth,c=r.messageFontFamily,u=r.messageFontSize,l=r.messageFontWeight,h=t.append("g"),f=function(t,e,n,r){return h.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("class","loopLine")};f(e.startx,e.starty,e.stopx,e.starty),f(e.stopx,e.starty,e.stopx,e.stopy),f(e.startx,e.stopy,e.stopx,e.stopy),f(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){f(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));var d=Ta();d.text=n,d.x=e.startx,d.y=e.starty,d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.anchor="middle",d.valign="middle",d.tspan=!1,d.width=s||50,d.height=o||20,d.textMargin=a,d.class="labelText",wa(h,d),(d=Ta()).text=e.title,d.x=e.startx+s/2+(e.stopx-e.startx)/2,d.y=e.starty+i+a,d.anchor="middle",d.valign="middle",d.textMargin=a,d.class="loopText",d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.wrap=!0;var p=ka(h,d);return void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,n){if(t.message){d.text=t.message,d.x=e.startx+(e.stopx-e.startx)/2,d.y=e.sections[n].y+i+a,d.class="loopText",d.anchor="middle",d.valign="middle",d.tspan=!1,d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.wrap=e.wrap,p=ka(h,d);var r=Math.round(p.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));e.sections[n].height+=r-(i+a)}})),e.height=Math.round(e.stopy-e.starty),h},drawBackgroundRect:function(t,e){_a(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},insertArrowHead:function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},insertArrowFilledHead:function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},insertSequenceNumber:function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},insertArrowCrossHead:function(t){var e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},getTextObj:Ta,getNoteRect:Ca};ra.parser.yy=xa;var Ma={},Oa={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((function(t){return t.height||0})))+(0===this.loops.length?0:this.loops.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.messages.length?0:this.messages.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.notes.length?0:this.notes.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))},clear:function(){this.actors=[],this.loops=[],this.messages=[],this.notes=[]},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Ia(ra.parser.yy.getConfig())},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i=this,a=0;function o(o){return function(s){a++;var c=i.sequenceItems.length-a+1;i.updateVal(s,"starty",e-c*Ma.boxMargin,Math.min),i.updateVal(s,"stopy",r+c*Ma.boxMargin,Math.max),i.updateVal(Oa.data,"startx",t-c*Ma.boxMargin,Math.min),i.updateVal(Oa.data,"stopx",n+c*Ma.boxMargin,Math.max),"activation"!==o&&(i.updateVal(s,"startx",t-c*Ma.boxMargin,Math.min),i.updateVal(s,"stopx",n+c*Ma.boxMargin,Math.max),i.updateVal(Oa.data,"starty",e-c*Ma.boxMargin,Math.min),i.updateVal(Oa.data,"stopy",r+c*Ma.boxMargin,Math.max))}}this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(Oa.data,"startx",i,Math.min),this.updateVal(Oa.data,"starty",o,Math.min),this.updateVal(Oa.data,"stopx",a,Math.max),this.updateVal(Oa.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},newActivation:function(t,e,n){var r=n[t.from.actor],i=Ra(t.from.actor).length||0,a=r.x+r.width/2+(i-1)*Ma.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Ma.activationWidth,stopy:void 0,actor:t.from.actor,anchored:Aa.anchorElement(e)})},endActivation:function(t){var e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Oa.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},Ba=function(t){return{fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}},Na=function(t){return{fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}},Da=function(t){return{fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}},La=function(t,e,n,r){for(var i=0,a=0,o=0;o<n.length;o++){var s=e[n[o]];s.width=s.width||Ma.width,s.height=Math.max(s.height||Ma.height,Ma.height),s.margin=s.margin||Ma.actorMargin,s.x=i+a,s.y=r,Aa.drawActor(t,s,Ma),Oa.insert(s.x,r,s.x+s.width,s.height),i+=s.width,a+=s.margin,Oa.models.addActor(s)}Oa.bumpVerticalPos(Ma.height)},Ia=function(t){F(Ma,t),t.fontFamily&&(Ma.actorFontFamily=Ma.noteFontFamily=Ma.messageFontFamily=t.fontFamily),t.fontSize&&(Ma.actorFontSize=Ma.noteFontSize=Ma.messageFontSize=t.fontSize),t.fontWeight&&(Ma.actorFontWeight=Ma.noteFontWeight=Ma.messageFontWeight=t.fontWeight)},Ra=function(t){return Oa.activations.filter((function(e){return e.actor===t}))},Fa=function(t,e){var n=e[t],r=Ra(t);return[r.reduce((function(t,e){return Math.min(t,e.startx)}),n.x+n.width/2),r.reduce((function(t,e){return Math.max(t,e.stopx)}),n.x+n.width/2)]};function Pa(t,e,n,r,i){Oa.bumpVerticalPos(n);var a=r;if(e.id&&e.message&&t[e.id]){var o=t[e.id].width,s=Ba(Ma);e.message=W.wrapLabel("[".concat(e.message,"]"),o-2*Ma.wrapPadding,s),e.width=o,e.wrap=!0;var u=W.calculateTextDimensions(e.message,s),l=Math.max(u.height,Ma.labelBoxHeight);a=r+l,c.debug("".concat(l," - ").concat(e.message))}i(e),Oa.bumpVerticalPos(a)}var ja=function(t,e){var n={};return e.forEach((function(e){if(t[e.to]&&t[e.from]){var r=t[e.to];if(e.placement===ra.parser.yy.PLACEMENT.LEFTOF&&!r.prevActor)return;if(e.placement===ra.parser.yy.PLACEMENT.RIGHTOF&&!r.nextActor)return;var i=void 0!==e.placement,a=!i,o=i?Na(Ma):Ba(Ma),s=e.wrap?W.wrapLabel(e.message,Ma.width-2*Ma.wrapPadding,o):e.message,c=W.calculateTextDimensions(s,o).width+2*Ma.wrapPadding;a&&e.from===r.nextActor?n[e.to]=Math.max(n[e.to]||0,c):a&&e.from===r.prevActor?n[e.from]=Math.max(n[e.from]||0,c):a&&e.from===e.to?(n[e.from]=Math.max(n[e.from]||0,c/2),n[e.to]=Math.max(n[e.to]||0,c/2)):e.placement===ra.parser.yy.PLACEMENT.RIGHTOF?n[e.from]=Math.max(n[e.from]||0,c):e.placement===ra.parser.yy.PLACEMENT.LEFTOF?n[r.prevActor]=Math.max(n[r.prevActor]||0,c):e.placement===ra.parser.yy.PLACEMENT.OVER&&(r.prevActor&&(n[r.prevActor]=Math.max(n[r.prevActor]||0,c/2)),r.nextActor&&(n[e.from]=Math.max(n[e.from]||0,c/2)))}})),c.debug("maxMessageWidthPerActor:",n),n},Ya=function(t,e){var n=0;for(var r in Object.keys(t).forEach((function(e){var r=t[e];r.wrap&&(r.description=W.wrapLabel(r.description,Ma.width-2*Ma.wrapPadding,Da(Ma)));var i=W.calculateTextDimensions(r.description,Da(Ma));r.width=r.wrap?Ma.width:Math.max(Ma.width,i.width+2*Ma.wrapPadding),r.height=r.wrap?Math.max(i.height,Ma.height):Ma.height,n=Math.max(n,r.height)})),e){var i=t[r];if(i){var a=t[i.nextActor];if(a){var o=e[r]+Ma.actorMargin-i.width/2-a.width/2;i.margin=Math.max(o,Ma.actorMargin)}}}return Math.max(n,Ma.height)},za=function(t,e){var n,r,i,a={},o=[];return t.forEach((function(t){switch(t.id=W.random({length:10}),t.type){case ra.parser.yy.LINETYPE.LOOP_START:case ra.parser.yy.LINETYPE.ALT_START:case ra.parser.yy.LINETYPE.OPT_START:case ra.parser.yy.LINETYPE.PAR_START:o.push({id:t.id,msg:t.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case ra.parser.yy.LINETYPE.ALT_ELSE:case ra.parser.yy.LINETYPE.PAR_AND:t.message&&(n=o.pop(),a[n.id]=n,a[t.id]=n,o.push(n));break;case ra.parser.yy.LINETYPE.LOOP_END:case ra.parser.yy.LINETYPE.ALT_END:case ra.parser.yy.LINETYPE.OPT_END:case ra.parser.yy.LINETYPE.PAR_END:n=o.pop(),a[n.id]=n;break;case ra.parser.yy.LINETYPE.ACTIVE_START:var s=e[t.from?t.from.actor:t.to.actor],u=Ra(t.from?t.from.actor:t.to.actor).length,l=s.x+s.width/2+(u-1)*Ma.activationWidth/2,h={startx:l,stopx:l+Ma.activationWidth,actor:t.from.actor,enabled:!0};Oa.activations.push(h);break;case ra.parser.yy.LINETYPE.ACTIVE_END:var f=Oa.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);delete Oa.activations.splice(f,1)[0]}void 0!==t.placement?(r=function(t,e){var n=e[t.from].x,r=e[t.to].x,i=t.wrap&&t.message,a=W.calculateTextDimensions(i?W.wrapLabel(t.message,Ma.width,Na(Ma)):t.message,Na(Ma)),o={width:i?Ma.width:Math.max(Ma.width,a.width+2*Ma.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===ra.parser.yy.PLACEMENT.RIGHTOF?(o.width=i?Math.max(Ma.width,a.width):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*Ma.noteMargin),o.startx=n+(e[t.from].width+Ma.actorMargin)/2):t.placement===ra.parser.yy.PLACEMENT.LEFTOF?(o.width=i?Math.max(Ma.width,a.width+2*Ma.noteMargin):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*Ma.noteMargin),o.startx=n-o.width+(e[t.from].width-Ma.actorMargin)/2):t.to===t.from?(a=W.calculateTextDimensions(i?W.wrapLabel(t.message,Math.max(Ma.width,e[t.from].width),Na(Ma)):t.message,Na(Ma)),o.width=i?Math.max(Ma.width,e[t.from].width):Math.max(e[t.from].width,Ma.width,a.width+2*Ma.noteMargin),o.startx=n+(e[t.from].width-o.width)/2):(o.width=Math.abs(n+e[t.from].width/2-(r+e[t.to].width/2))+Ma.actorMargin,o.startx=n<r?n+e[t.from].width/2-Ma.actorMargin/2:r+e[t.to].width/2-Ma.actorMargin/2),i&&(o.message=W.wrapLabel(t.message,o.width-2*Ma.wrapPadding,Na(Ma))),c.debug("NM:[".concat(o.startx,",").concat(o.stopx,",").concat(o.starty,",").concat(o.stopy,":").concat(o.width,",").concat(o.height,"=").concat(t.message,"]")),o}(t,e),t.noteModel=r,o.forEach((function(t){(n=t).from=Math.min(n.from,r.startx),n.to=Math.max(n.to,r.startx+r.width),n.width=Math.max(n.width,Math.abs(n.from-n.to))-Ma.labelBoxWidth}))):(i=function(t,e){var n=!1;if([ra.parser.yy.LINETYPE.SOLID_OPEN,ra.parser.yy.LINETYPE.DOTTED_OPEN,ra.parser.yy.LINETYPE.SOLID,ra.parser.yy.LINETYPE.DOTTED,ra.parser.yy.LINETYPE.SOLID_CROSS,ra.parser.yy.LINETYPE.DOTTED_CROSS,ra.parser.yy.LINETYPE.SOLID_POINT,ra.parser.yy.LINETYPE.DOTTED_POINT].includes(t.type)&&(n=!0),!n)return{};var r=Fa(t.from,e),i=Fa(t.to,e),a=r[0]<=i[0]?1:0,o=r[0]<i[0]?0:1,s=r.concat(i),c=Math.abs(i[o]-r[a]);t.wrap&&t.message&&(t.message=W.wrapLabel(t.message,Math.max(c+2*Ma.wrapPadding,Ma.width),Ba(Ma)));var u=W.calculateTextDimensions(t.message,Ba(Ma));return{width:Math.max(t.wrap?0:u.width+2*Ma.wrapPadding,c+2*Ma.wrapPadding,Ma.width),height:0,startx:r[a],stopx:i[o],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,s),toBounds:Math.max.apply(null,s)}}(t,e),t.msgModel=i,i.startx&&i.stopx&&o.length>0&&o.forEach((function(r){if(n=r,i.startx===i.stopx){var a=e[t.from],o=e[t.to];n.from=Math.min(a.x-i.width/2,a.x-a.width/2,n.from),n.to=Math.max(o.x+i.width/2,o.x+a.width/2,n.to),n.width=Math.max(n.width,Math.abs(n.to-n.from))-Ma.labelBoxWidth}else n.from=Math.min(i.startx,n.from),n.to=Math.max(i.stopx,n.to),n.width=Math.max(n.width,i.width)-Ma.labelBoxWidth})))})),Oa.activations=[],c.debug("Loop type widths:",a),a},Ua={bounds:Oa,drawActors:La,setConf:Ia,draw:function(t,e){Ma=xt().sequence,ra.parser.yy.clear(),ra.parser.yy.setWrap(Ma.wrap),ra.parser.parse(t+"\n"),Oa.init(),c.debug("C:".concat(JSON.stringify(Ma,null,2)));var n=Object(h.select)('[id="'.concat(e,'"]')),r=ra.parser.yy.getActors(),i=ra.parser.yy.getActorKeys(),a=ra.parser.yy.getMessages(),o=ra.parser.yy.getTitle(),s=ja(r,a);Ma.height=Ya(r,s),La(n,r,i,0);var u=za(a,r,s);Aa.insertArrowHead(n),Aa.insertArrowCrossHead(n),Aa.insertArrowFilledHead(n),Aa.insertSequenceNumber(n);var l=1;a.forEach((function(t){var e,i,a;switch(t.type){case ra.parser.yy.LINETYPE.NOTE:i=t.noteModel,function(t,e){Oa.bumpVerticalPos(Ma.boxMargin),e.height=Ma.boxMargin,e.starty=Oa.getVerticalPos();var n=Aa.getNoteRect();n.x=e.startx,n.y=e.starty,n.width=e.width||Ma.width,n.class="note";var r=t.append("g"),i=Aa.drawRect(r,n),a=Aa.getTextObj();a.x=e.startx,a.y=e.starty,a.width=n.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=Ma.noteFontFamily,a.fontSize=Ma.noteFontSize,a.fontWeight=Ma.noteFontWeight,a.anchor=Ma.noteAlign,a.textMargin=Ma.noteMargin,a.valign=Ma.noteAlign;var o=ka(r,a),s=Math.round(o.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));i.attr("height",s+2*Ma.noteMargin),e.height+=s+2*Ma.noteMargin,Oa.bumpVerticalPos(s+2*Ma.noteMargin),e.stopy=e.starty+s+2*Ma.noteMargin,e.stopx=e.startx+n.width,Oa.insert(e.startx,e.starty,e.stopx,e.stopy),Oa.models.addNote(e)}(n,i);break;case ra.parser.yy.LINETYPE.ACTIVE_START:Oa.newActivation(t,n,r);break;case ra.parser.yy.LINETYPE.ACTIVE_END:!function(t,e){var r=Oa.endActivation(t);r.starty+18>e&&(r.starty=e-6,e+=12),Aa.drawActivation(n,r,e,Ma,Ra(t.from.actor).length),Oa.insert(r.startx,e-10,r.stopx,e)}(t,Oa.getVerticalPos());break;case ra.parser.yy.LINETYPE.LOOP_START:Pa(u,t,Ma.boxMargin,Ma.boxMargin+Ma.boxTextMargin,(function(t){return Oa.newLoop(t)}));break;case ra.parser.yy.LINETYPE.LOOP_END:e=Oa.endLoop(),Aa.drawLoop(n,e,"loop",Ma),Oa.bumpVerticalPos(e.stopy-Oa.getVerticalPos()),Oa.models.addLoop(e);break;case ra.parser.yy.LINETYPE.RECT_START:Pa(u,t,Ma.boxMargin,Ma.boxMargin,(function(t){return Oa.newLoop(void 0,t.message)}));break;case ra.parser.yy.LINETYPE.RECT_END:e=Oa.endLoop(),Aa.drawBackgroundRect(n,e),Oa.models.addLoop(e),Oa.bumpVerticalPos(e.stopy-Oa.getVerticalPos());break;case ra.parser.yy.LINETYPE.OPT_START:Pa(u,t,Ma.boxMargin,Ma.boxMargin+Ma.boxTextMargin,(function(t){return Oa.newLoop(t)}));break;case ra.parser.yy.LINETYPE.OPT_END:e=Oa.endLoop(),Aa.drawLoop(n,e,"opt",Ma),Oa.bumpVerticalPos(e.stopy-Oa.getVerticalPos()),Oa.models.addLoop(e);break;case ra.parser.yy.LINETYPE.ALT_START:Pa(u,t,Ma.boxMargin,Ma.boxMargin+Ma.boxTextMargin,(function(t){return Oa.newLoop(t)}));break;case ra.parser.yy.LINETYPE.ALT_ELSE:Pa(u,t,Ma.boxMargin+Ma.boxTextMargin,Ma.boxMargin,(function(t){return Oa.addSectionToLoop(t)}));break;case ra.parser.yy.LINETYPE.ALT_END:e=Oa.endLoop(),Aa.drawLoop(n,e,"alt",Ma),Oa.bumpVerticalPos(e.stopy-Oa.getVerticalPos()),Oa.models.addLoop(e);break;case ra.parser.yy.LINETYPE.PAR_START:Pa(u,t,Ma.boxMargin,Ma.boxMargin+Ma.boxTextMargin,(function(t){return Oa.newLoop(t)}));break;case ra.parser.yy.LINETYPE.PAR_AND:Pa(u,t,Ma.boxMargin+Ma.boxTextMargin,Ma.boxMargin,(function(t){return Oa.addSectionToLoop(t)}));break;case ra.parser.yy.LINETYPE.PAR_END:e=Oa.endLoop(),Aa.drawLoop(n,e,"par",Ma),Oa.bumpVerticalPos(e.stopy-Oa.getVerticalPos()),Oa.models.addLoop(e);break;default:try{(a=t.msgModel).starty=Oa.getVerticalPos(),a.sequenceIndex=l,function(t,e){Oa.bumpVerticalPos(10);var n=e.startx,r=e.stopx,i=e.starty,a=e.message,o=e.type,s=e.sequenceIndex,c=x.splitBreaks(a).length,u=W.calculateTextDimensions(a,Ba(Ma)),l=u.height/c;e.height+=l,Oa.bumpVerticalPos(l);var h=Aa.getTextObj();h.x=n,h.y=i+10,h.width=r-n,h.class="messageText",h.dy="1em",h.text=a,h.fontFamily=Ma.messageFontFamily,h.fontSize=Ma.messageFontSize,h.fontWeight=Ma.messageFontWeight,h.anchor=Ma.messageAlign,h.valign=Ma.messageAlign,h.textMargin=Ma.wrapPadding,h.tspan=!1,ka(t,h);var f,d,p=u.height-10,y=u.width;if(n===r){d=Oa.getVerticalPos()+p,Ma.rightAngles?f=t.append("path").attr("d","M ".concat(n,",").concat(d," H ").concat(n+Math.max(Ma.width/2,y/2)," V ").concat(d+25," H ").concat(n)):(p+=Ma.boxMargin,d=Oa.getVerticalPos()+p,f=t.append("path").attr("d","M "+n+","+d+" C "+(n+60)+","+(d-10)+" "+(n+60)+","+(d+30)+" "+n+","+(d+20))),p+=30;var g=Math.max(y/2,Ma.width/2);Oa.insert(n-g,Oa.getVerticalPos()-10+p,r+g,Oa.getVerticalPos()+30+p)}else p+=Ma.boxMargin,d=Oa.getVerticalPos()+p,(f=t.append("line")).attr("x1",n),f.attr("y1",d),f.attr("x2",r),f.attr("y2",d),Oa.insert(n,d-10,r,d);o===ra.parser.yy.LINETYPE.DOTTED||o===ra.parser.yy.LINETYPE.DOTTED_CROSS||o===ra.parser.yy.LINETYPE.DOTTED_POINT||o===ra.parser.yy.LINETYPE.DOTTED_OPEN?(f.style("stroke-dasharray","3, 3"),f.attr("class","messageLine1")):f.attr("class","messageLine0");var v="";Ma.arrowMarkerAbsolute&&(v=(v=(v=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),f.attr("stroke-width",2),f.attr("stroke","none"),f.style("fill","none"),o!==ra.parser.yy.LINETYPE.SOLID&&o!==ra.parser.yy.LINETYPE.DOTTED||f.attr("marker-end","url("+v+"#arrowhead)"),o!==ra.parser.yy.LINETYPE.SOLID_POINT&&o!==ra.parser.yy.LINETYPE.DOTTED_POINT||f.attr("marker-end","url("+v+"#filled-head)"),o!==ra.parser.yy.LINETYPE.SOLID_CROSS&&o!==ra.parser.yy.LINETYPE.DOTTED_CROSS||f.attr("marker-end","url("+v+"#crosshead)"),(xa.showSequenceNumbers()||Ma.showSequenceNumbers)&&(f.attr("marker-start","url("+v+"#sequencenumber)"),t.append("text").attr("x",n).attr("y",d+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("textLength","16px").attr("class","sequenceNumber").text(s)),Oa.bumpVerticalPos(p),e.height+=p,e.stopy=e.starty+e.height,Oa.insert(e.fromBounds,e.starty,e.toBounds,e.stopy)}(n,a),Oa.models.addMessage(a)}catch(t){c.error("error while drawing message",t)}}[ra.parser.yy.LINETYPE.SOLID_OPEN,ra.parser.yy.LINETYPE.DOTTED_OPEN,ra.parser.yy.LINETYPE.SOLID,ra.parser.yy.LINETYPE.DOTTED,ra.parser.yy.LINETYPE.SOLID_CROSS,ra.parser.yy.LINETYPE.DOTTED_CROSS,ra.parser.yy.LINETYPE.SOLID_POINT,ra.parser.yy.LINETYPE.DOTTED_POINT].includes(t.type)&&l++})),Ma.mirrorActors&&(Oa.bumpVerticalPos(2*Ma.boxMargin),La(n,r,i,Oa.getVerticalPos()));var f=Oa.getBounds().bounds;c.debug("For line height fix Querying: #"+e+" .actor-line"),Object(h.selectAll)("#"+e+" .actor-line").attr("y2",f.stopy);var d=f.stopy-f.starty+2*Ma.diagramMarginY;Ma.mirrorActors&&(d=d-Ma.boxMargin+Ma.bottomMarginAdj);var p=f.stopx-f.startx+2*Ma.diagramMarginX;o&&n.append("text").text(o).attr("x",(f.stopx-f.startx)/2-2*Ma.diagramMarginX).attr("y",-25),q(n,d,p,Ma.useMaxWidth);var y=o?40:0;n.attr("viewBox",f.startx-Ma.diagramMarginX+" -"+(Ma.diagramMarginY+y)+" "+p+" "+(d+y)),c.debug("models:",Oa.models)}},$a=n(22),qa=n.n($a);function Wa(t){return(Wa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Va,Ha=function(t){return JSON.parse(JSON.stringify(t))},Ga=[],Xa={root:{relations:[],states:{},documents:{}}},Za=Xa.root,Qa=0,Ka=function(t,e,n,r,i){void 0===Za.states[t]?Za.states[t]={id:t,descriptions:[],type:e,doc:n,note:i}:(Za.states[t].doc||(Za.states[t].doc=n),Za.states[t].type||(Za.states[t].type=e)),r&&(c.info("Adding state ",t,r),"string"==typeof r&&eo(t,r.trim()),"object"===Wa(r)&&r.forEach((function(e){return eo(t,e.trim())}))),i&&(Za.states[t].note=i)},Ja=function(){Za=(Xa={root:{relations:[],states:{},documents:{}}}).root,Za=Xa.root,Qa=0,0,ro=[]},to=function(t,e,n){var r=t,i=e,a="default",o="default";"[*]"===t&&(r="start"+ ++Qa,a="start"),"[*]"===e&&(i="end"+Qa,o="end"),Ka(r,a),Ka(i,o),Za.relations.push({id1:r,id2:i,title:n})},eo=function(t,e){var n=Za.states[t],r=e;":"===r[0]&&(r=r.substr(1).trim()),n.descriptions.push(r)},no=0,ro=[],io="TB",ao={parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().state},addState:Ka,clear:Ja,getState:function(t){return Za.states[t]},getStates:function(){return Za.states},getRelations:function(){return Za.relations},getClasses:function(){return ro},getDirection:function(){return io},addRelation:to,getDividerId:function(){return"divider-id-"+ ++no},setDirection:function(t){io=t},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:function(){c.info("Documents = ",Xa)},getRootDoc:function(){return Ga},setRootDoc:function(t){c.info("Setting root doc",t),Ga=t},getRootDocV2:function(){return function t(e,n,r){if("relation"===n.stmt)t(e,n.state1,!0),t(e,n.state2,!1);else if("state"===n.stmt&&"[*]"===n.id&&(n.id=r?e.id+"_start":e.id+"_end",n.start=r),n.doc){var i=[],a=0,o=[];for(a=0;a<n.doc.length;a++)if("divider"===n.doc[a].type){var s=Ha(n.doc[a]);s.doc=Ha(o),i.push(s),o=[]}else o.push(n.doc[a]);if(i.length>0&&o.length>0){var c={stmt:"state",id:I(),type:"divider",doc:Ha(o)};i.push(Ha(c)),n.doc=i}n.doc.forEach((function(e){return t(n,e,!0)}))}}({id:"root"},{id:"root",doc:Ga},!0),{id:"root",doc:Ga}},extract:function(t){var e;e=t.doc?t.doc:t,c.info(e),Ja(),c.info("Extract",e),e.forEach((function(t){"state"===t.stmt&&Ka(t.id,t.type,t.doc,t.description,t.note),"relation"===t.stmt&&to(t.state1.id,t.state2.id,t.description)}))},trimColon:function(t){return t&&":"===t[0]?t.substr(1).trim():t.trim()}},oo={},so=function(t,e){oo[t]=e},co=function(t,e){var n=t.append("text").attr("x",2*xt().state.padding).attr("y",xt().state.textHeight+1.3*xt().state.padding).attr("font-size",xt().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),r=n.height,i=t.append("text").attr("x",xt().state.padding).attr("y",r+.4*xt().state.padding+xt().state.dividerMargin+xt().state.textHeight).attr("class","state-description"),a=!0,o=!0;e.descriptions.forEach((function(t){a||(!function(t,e,n){var r=t.append("tspan").attr("x",2*xt().state.padding).text(e);n||r.attr("dy",xt().state.textHeight)}(i,t,o),o=!1),a=!1}));var s=t.append("line").attr("x1",xt().state.padding).attr("y1",xt().state.padding+r+xt().state.dividerMargin/2).attr("y2",xt().state.padding+r+xt().state.dividerMargin/2).attr("class","descr-divider"),c=i.node().getBBox(),u=Math.max(c.width,n.width);return s.attr("x2",u+3*xt().state.padding),t.insert("rect",":first-child").attr("x",xt().state.padding).attr("y",xt().state.padding).attr("width",u+2*xt().state.padding).attr("height",c.height+r+2*xt().state.padding).attr("rx",xt().state.radius),t},uo=function(t,e,n){var r,i=xt().state.padding,a=2*xt().state.padding,o=t.node().getBBox(),s=o.width,c=o.x,u=t.append("text").attr("x",0).attr("y",xt().state.titleShift).attr("font-size",xt().state.fontSize).attr("class","state-title").text(e.id),l=u.node().getBBox().width+a,h=Math.max(l,s);h===s&&(h+=a);var f=t.node().getBBox();e.doc,r=c-i,l>s&&(r=(s-h)/2+i),Math.abs(c-f.x)<i&&l>s&&(r=c-(l-s)/2);var d=1-xt().state.textHeight;return t.insert("rect",":first-child").attr("x",r).attr("y",d).attr("class",n?"alt-composit":"composit").attr("width",h).attr("height",f.height+xt().state.textHeight+xt().state.titleShift+1).attr("rx","0"),u.attr("x",r+i),l<=s&&u.attr("x",c+(h-a)/2-l/2+i),t.insert("rect",":first-child").attr("x",r).attr("y",xt().state.titleShift-xt().state.textHeight-xt().state.padding).attr("width",h).attr("height",3*xt().state.textHeight).attr("rx",xt().state.radius),t.insert("rect",":first-child").attr("x",r).attr("y",xt().state.titleShift-xt().state.textHeight-xt().state.padding).attr("width",h).attr("height",f.height+3+2*xt().state.textHeight).attr("rx",xt().state.radius),t},lo=function(t,e){e.attr("class","state-note");var n=e.append("rect").attr("x",0).attr("y",xt().state.padding),r=function(t,e,n,r){var i=0,a=r.append("text");a.style("text-anchor","start"),a.attr("class","noteText");var o=t.replace(/\r\n/g,"<br/>"),s=(o=o.replace(/\n/g,"<br/>")).split(x.lineBreakRegex),c=1.25*xt().state.noteMargin,u=!0,l=!1,h=void 0;try{for(var f,d=s[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var p=f.value.trim();if(p.length>0){var y=a.append("tspan");if(y.text(p),0===c)c+=y.node().getBBox().height;i+=c,y.attr("x",e+xt().state.noteMargin),y.attr("y",n+i+1.25*xt().state.noteMargin)}}}catch(t){l=!0,h=t}finally{try{u||null==d.return||d.return()}finally{if(l)throw h}}return{textWidth:a.node().getBBox().width,textHeight:i}}(t,0,0,e.append("g")),i=r.textWidth,a=r.textHeight;return n.attr("height",a+2*xt().state.noteMargin),n.attr("width",i+2*xt().state.noteMargin),n},ho=function(t,e){var n=e.id,r={id:n,label:e.id,width:0,height:0},i=t.append("g").attr("id",n).attr("class","stateGroup");"start"===e.type&&function(t){t.append("circle").attr("class","start-state").attr("r",xt().state.sizeUnit).attr("cx",xt().state.padding+xt().state.sizeUnit).attr("cy",xt().state.padding+xt().state.sizeUnit)}(i),"end"===e.type&&function(t){t.append("circle").attr("class","end-state-outer").attr("r",xt().state.sizeUnit+xt().state.miniPadding).attr("cx",xt().state.padding+xt().state.sizeUnit+xt().state.miniPadding).attr("cy",xt().state.padding+xt().state.sizeUnit+xt().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",xt().state.sizeUnit).attr("cx",xt().state.padding+xt().state.sizeUnit+2).attr("cy",xt().state.padding+xt().state.sizeUnit+2)}(i),"fork"!==e.type&&"join"!==e.type||function(t,e){var n=xt().state.forkWidth,r=xt().state.forkHeight;if(e.parentId){var i=n;n=r,r=i}t.append("rect").style("stroke","black").style("fill","black").attr("width",n).attr("height",r).attr("x",xt().state.padding).attr("y",xt().state.padding)}(i,e),"note"===e.type&&lo(e.note.text,i),"divider"===e.type&&function(t){t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",xt().state.textHeight).attr("class","divider").attr("x2",2*xt().state.textHeight).attr("y1",0).attr("y2",0)}(i),"default"===e.type&&0===e.descriptions.length&&function(t,e){var n=t.append("text").attr("x",2*xt().state.padding).attr("y",xt().state.textHeight+2*xt().state.padding).attr("font-size",xt().state.fontSize).attr("class","state-title").text(e.id),r=n.node().getBBox();t.insert("rect",":first-child").attr("x",xt().state.padding).attr("y",xt().state.padding).attr("width",r.width+2*xt().state.padding).attr("height",r.height+2*xt().state.padding).attr("rx",xt().state.radius)}(i,e),"default"===e.type&&e.descriptions.length>0&&co(i,e);var a=i.node().getBBox();return r.width=a.width+2*xt().state.padding,r.height=a.height+2*xt().state.padding,so(n,r),r},fo=0;$a.parser.yy=ao;var po={},yo=function t(e,n,r,i){var a,o=new zt.a.Graph({compound:!0,multigraph:!0}),s=!0;for(a=0;a<e.length;a++)if("relation"===e[a].stmt){s=!1;break}r?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:s?1:Va.edgeLengthFactor,nodeSep:s?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:s?1:Va.edgeLengthFactor,nodeSep:s?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel((function(){return{}})),ao.extract(e);for(var u=ao.getStates(),l=ao.getRelations(),f=Object.keys(u),d=0;d<f.length;d++){var p=u[f[d]];r&&(p.parentId=r);var y=void 0;if(p.doc){var g=n.append("g").attr("id",p.id).attr("class","stateGroup");y=t(p.doc,g,p.id,!i);var v=(g=uo(g,p,i)).node().getBBox();y.width=v.width,y.height=v.height+Va.padding/2,po[p.id]={y:Va.compositTitleSize}}else y=ho(n,p);if(p.note){var m={descriptions:[],id:p.id+"-note",note:p.note,type:"note"},b=ho(n,m);"left of"===p.note.position?(o.setNode(y.id+"-note",b),o.setNode(y.id,y)):(o.setNode(y.id,y),o.setNode(y.id+"-note",b)),o.setParent(y.id,y.id+"-group"),o.setParent(y.id+"-note",y.id+"-group")}else o.setNode(y.id,y)}c.debug("Count=",o.nodeCount(),o);var _=0;l.forEach((function(t){var e;_++,c.debug("Setting edge",t),o.setEdge(t.id1,t.id2,{relation:t,width:(e=t.title,e?e.length*Va.fontSizeFactor:1),height:Va.labelHeight*x.getRows(t.title).length,labelpos:"c"},"id"+_)})),jt.a.layout(o),c.debug("Graph after layout",o.nodes());var k=n.node();o.nodes().forEach((function(t){void 0!==t&&void 0!==o.node(t)?(c.warn("Node "+t+": "+JSON.stringify(o.node(t))),Object(h.select)("#"+k.id+" #"+t).attr("transform","translate("+(o.node(t).x-o.node(t).width/2)+","+(o.node(t).y+(po[t]?po[t].y:0)-o.node(t).height/2)+" )"),Object(h.select)("#"+k.id+" #"+t).attr("data-x-shift",o.node(t).x-o.node(t).width/2),document.querySelectorAll("#"+k.id+" #"+t+" .divider").forEach((function(t){var e=t.parentElement,n=0,r=0;e&&(e.parentElement&&(n=e.parentElement.getBBox().width),r=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(r)&&(r=0)),t.setAttribute("x1",0-r+8),t.setAttribute("x2",n-r-8)}))):c.debug("No Node "+t+": "+JSON.stringify(o.node(t)))}));var w=k.getBBox();o.edges().forEach((function(t){void 0!==t&&void 0!==o.edge(t)&&(c.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(o.edge(t))),function(t,e,n){e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var r=e.points,i=Object(h.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(h.curveBasis),a=t.append("path").attr("d",i(r)).attr("id","edge"+fo).attr("class","transition"),o="";if(xt().state.arrowMarkerAbsolute&&(o=(o=(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),a.attr("marker-end","url("+o+"#"+function(t){switch(t){case ao.relationType.AGGREGATION:return"aggregation";case ao.relationType.EXTENSION:return"extension";case ao.relationType.COMPOSITION:return"composition";case ao.relationType.DEPENDENCY:return"dependency"}}(ao.relationType.DEPENDENCY)+"End)"),void 0!==n.title){for(var s=t.append("g").attr("class","stateLabel"),u=W.calcLabelPosition(e.points),l=u.x,f=u.y,d=x.getRows(n.title),p=0,y=[],g=0,v=0,m=0;m<=d.length;m++){var b=s.append("text").attr("text-anchor","middle").text(d[m]).attr("x",l).attr("y",f+p),_=b.node().getBBox();if(g=Math.max(g,_.width),v=Math.min(v,_.x),c.info(_.x,l,f+p),0===p){var k=b.node().getBBox();p=k.height,c.info("Title height",p,f)}y.push(b)}var w=p*d.length;if(d.length>1){var E=(d.length-1)*p*.5;y.forEach((function(t,e){return t.attr("y",f+e*p-E)})),w=p*d.length}var T=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",l-g/2-xt().state.padding/2).attr("y",f-w/2-xt().state.padding/2-3.5).attr("width",g+xt().state.padding).attr("height",w+xt().state.padding),c.info(T)}fo++}(n,o.edge(t),o.edge(t).relation))})),w=k.getBBox();var E={id:r||"root",label:r||"root",width:0,height:0};return E.width=w.width+2*Va.padding,E.height=w.height+2*Va.padding,c.debug("Doc rendered",E,o),E},go=function(){},vo=function(t,e){Va=xt().state,$a.parser.yy.clear(),$a.parser.parse(t),c.debug("Rendering diagram "+t);var n=Object(h.select)("[id='".concat(e,"']"));n.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z"),new zt.a.Graph({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}}));var r=ao.getRootDoc();yo(r,n,void 0,!1);var i=Va.padding,a=n.node().getBBox(),o=a.width+2*i,s=a.height+2*i;q(n,s,1.75*o,Va.useMaxWidth),n.attr("viewBox","".concat(a.x-Va.padding," ").concat(a.y-Va.padding," ")+o+" "+s)},mo={},bo={},xo=function(t,e,n,r){if("root"!==n.id){var i="rect";!0===n.start&&(i="start"),!1===n.start&&(i="end"),"default"!==n.type&&(i=n.type),bo[n.id]||(bo[n.id]={id:n.id,shape:i,description:n.id,classes:"statediagram-state"}),n.description&&(Array.isArray(bo[n.id].description)?(bo[n.id].shape="rectWithTitle",bo[n.id].description.push(n.description)):bo[n.id].description.length>0?(bo[n.id].shape="rectWithTitle",bo[n.id].description===n.id?bo[n.id].description=[n.description]:bo[n.id].description=[bo[n.id].description,n.description]):(bo[n.id].shape="rect",bo[n.id].description=n.description)),!bo[n.id].type&&n.doc&&(c.info("Setting cluster for ",n.id,wo(n)),bo[n.id].type="group",bo[n.id].dir=wo(n),bo[n.id].shape="divider"===n.type?"divider":"roundedWithTitle",bo[n.id].classes=bo[n.id].classes+" "+(r?"statediagram-cluster statediagram-cluster-alt":"statediagram-cluster"));var a={labelStyle:"",shape:bo[n.id].shape,labelText:bo[n.id].description,classes:bo[n.id].classes,style:"",id:n.id,dir:bo[n.id].dir,domId:"state-"+n.id+"-"+_o,type:bo[n.id].type,padding:15};if(n.note){var o={labelStyle:"",shape:"note",labelText:n.note.text,classes:"statediagram-note",style:"",id:n.id+"----note-"+_o,domId:"state-"+n.id+"----note-"+_o,type:bo[n.id].type,padding:15},s={labelStyle:"",shape:"noteGroup",labelText:n.note.text,classes:bo[n.id].classes,style:"",id:n.id+"----parent",domId:"state-"+n.id+"----parent-"+_o,type:"group",padding:0};_o++,t.setNode(n.id+"----parent",s),t.setNode(o.id,o),t.setNode(n.id,a),t.setParent(n.id,n.id+"----parent"),t.setParent(o.id,n.id+"----parent");var u=n.id,l=o.id;"left of"===n.note.position&&(u=o.id,l=n.id),t.setEdge(u,l,{arrowhead:"none",arrowType:"",style:"fill:none",labelStyle:"",classes:"transition note-edge",arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal"})}else t.setNode(n.id,a)}e&&"root"!==e.id&&(c.trace("Setting node ",n.id," to be child of its parent ",e.id),t.setParent(n.id,e.id)),n.doc&&(c.trace("Adding nodes children "),ko(t,n,n.doc,!r))},_o=0,ko=function(t,e,n,r){c.trace("items",n),n.forEach((function(n){if("state"===n.stmt||"default"===n.stmt)xo(t,e,n,r);else if("relation"===n.stmt){xo(t,e,n.state1,r),xo(t,e,n.state2,r);var i={id:"edge"+_o,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:"fill:none",labelStyle:"",label:n.description,arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal",classes:"transition"},a=n.state1.id,o=n.state2.id;t.setEdge(a,o,i,_o),_o++}}))},wo=function(t,e){var n=e||"TB";if(t.doc)for(var r=0;r<t.doc.length;r++){var i=t.doc[r];"dir"===i.stmt&&(n=i.value)}return n},Eo=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)mo[e[n]]=t[e[n]]},To=function(t,e){c.info("Drawing state diagram (v2)",e),ao.clear(),bo={};var n=qa.a.parser;n.yy=ao,n.parse(t);var r=ao.getDirection();void 0===r&&(r="LR");var i=xt().state,a=i.nodeSpacing||50,o=i.rankSpacing||50;c.info(ao.getRootDocV2()),ao.extract(ao.getRootDocV2()),c.info(ao.getRootDocV2());var s=new zt.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:wo(ao.getRootDocV2()),nodesep:a,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));xo(s,void 0,ao.getRootDocV2(),!0);var u=Object(h.select)('[id="'.concat(e,'"]')),l=Object(h.select)("#"+e+" g");ze(l,s,["barb"],"statediagram",e);var f=u.node().getBBox(),d=f.width+16,p=f.height+16;u.attr("class","statediagram");var y=u.node().getBBox();q(u,p,1.75*d,i.useMaxWidth);var g="".concat(y.x-8," ").concat(y.y-8," ").concat(d," ").concat(p);if(c.debug("viewBox ".concat(g)),u.attr("viewBox",g),!i.htmlLabels)for(var v=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),m=0;m<v.length;m++){var b=v[m],x=b.getBBox(),_=document.createElementNS("http://www.w3.org/2000/svg","rect");_.setAttribute("rx",0),_.setAttribute("ry",0),_.setAttribute("width",x.width),_.setAttribute("height",x.height),b.insertBefore(_,b.firstChild)}};function Co(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var So="",Ao="",Mo=[],Oo=[],Bo=[],No=function(){for(var t=!0,e=0;e<Bo.length;e++)Bo[e].processed,t=t&&Bo[e].processed;return t},Do={parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().journey},clear:function(){Mo.length=0,Oo.length=0,Ao="",So="",Bo.length=0},setTitle:function(t){So=t},getTitle:function(){return So},addSection:function(t){Ao=t,Mo.push(t)},getSections:function(){return Mo},getTasks:function(){for(var t=No(),e=0;!t&&e<100;)t=No(),e++;return Oo.push.apply(Oo,Bo),Oo},addTask:function(t,e){var n=e.substr(1).split(":"),r=0,i=[];1===n.length?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(","));var a=i.map((function(t){return t.trim()})),o={section:Ao,type:Ao,people:a,task:t,score:r};Bo.push(o)},addTaskOrg:function(t){var e={section:Ao,type:Ao,description:t,task:t,classes:[]};Oo.push(e)},getActors:function(){return t=[],Oo.forEach((function(e){e.people&&t.push.apply(t,Co(e.people))})),Co(new Set(t)).sort();var t}},Lo=n(28),Io=n.n(Lo),Ro=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},Fo=function(t,e){var n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},Po=function(t,e){var n=e.text.replace(/<br\s*\/?>/gi," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(n),r},jo=-1,Yo=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},zo=function(){function t(t,e,n,i,a,o,s,c){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("font-color",c).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c,u){for(var l=c.taskFontSize,h=c.taskFontFamily,f=t.split(/<br\s*\/?>/gi),d=0;d<f.length;d++){var p=d*l-l*(f.length-1)/2,y=e.append("text").attr("x",n+a/2).attr("y",i).attr("fill",u).style("text-anchor","middle").style("font-size",l).style("font-family",h);y.append("tspan").attr("x",n+a/2).attr("dy",p).text(f[d]),y.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(y,s)}}function n(t,n,i,a,o,s,c,u){var l=n.append("switch"),h=l.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).attr("position","fixed").append("div").style("display","table").style("height","100%").style("width","100%");h.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,i,a,o,s,c,u),r(h,c)}function r(t,e){for(var n in e)n in e&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),Uo=Fo,$o=function(t,e,n){var r=t.append("g"),i=Yo();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,Ro(r,i),zo(n)(e.text,r,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},n,e.colour)},qo=Po,Wo=function(t,e,n){var r=e.x+n.width/2,i=t.append("g");jo++;var a,o,s;i.append("line").attr("id","task"+jo).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),a=i,o={cx:r,cy:300+30*(5-e.score),score:e.score},a.append("circle").attr("cx",o.cx).attr("cy",o.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),(s=a.append("g")).append("circle").attr("cx",o.cx-5).attr("cy",o.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",o.cx+5).attr("cy",o.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),o.score>3?function(t){var e=Object(h.arc)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+o.cx+","+(o.cy+2)+")")}(s):o.score<3?function(t){var e=Object(h.arc)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+o.cx+","+(o.cy+7)+")")}(s):function(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",o.cx-5).attr("y1",o.cy+7).attr("x2",o.cx+5).attr("y2",o.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}(s);var c=Yo();c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=n.width,c.height=n.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,Ro(i,c);var u=e.x+14;e.people.forEach((function(t){var n=e.actors[t],r={cx:u,cy:e.y,r:7,fill:n,stroke:"#000",title:t};Fo(i,r),u+=10})),zo(n)(e.task,i,c.x,c.y,c.width,c.height,{class:"task"},n,e.colour)},Vo=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")};Lo.parser.yy=Do;var Ho={};var Go=xt().journey,Xo=xt().journey.leftMargin,Zo={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i,a=xt().journey,o=this,s=0;this.sequenceItems.forEach((function(c){s++;var u=o.sequenceItems.length-s+1;o.updateVal(c,"starty",e-u*a.boxMargin,Math.min),o.updateVal(c,"stopy",r+u*a.boxMargin,Math.max),o.updateVal(Zo.data,"startx",t-u*a.boxMargin,Math.min),o.updateVal(Zo.data,"stopx",n+u*a.boxMargin,Math.max),"activation"!==i&&(o.updateVal(c,"startx",t-u*a.boxMargin,Math.min),o.updateVal(c,"stopx",n+u*a.boxMargin,Math.max),o.updateVal(Zo.data,"starty",e-u*a.boxMargin,Math.min),o.updateVal(Zo.data,"stopy",r+u*a.boxMargin,Math.max))}))},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(Zo.data,"startx",i,Math.min),this.updateVal(Zo.data,"starty",o,Math.min),this.updateVal(Zo.data,"stopx",a,Math.max),this.updateVal(Zo.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},Qo=Go.sectionFills,Ko=Go.sectionColours,Jo=function(t,e,n){for(var r=xt().journey,i="",a=n+(2*r.height+r.diagramMarginY),o=0,s="#CCC",c="black",u=0,l=0;l<e.length;l++){var h=e[l];if(i!==h.section){s=Qo[o%Qo.length],u=o%Qo.length,c=Ko[o%Ko.length];var f={x:l*r.taskMargin+l*r.width+Xo,y:50,text:h.section,fill:s,num:u,colour:c};$o(t,f,r),i=h.section,o++}var d=h.people.reduce((function(t,e){return Ho[e]&&(t[e]=Ho[e]),t}),{});h.x=l*r.taskMargin+l*r.width+Xo,h.y=a,h.width=r.diagramMarginX,h.height=r.diagramMarginY,h.colour=c,h.fill=s,h.num=u,h.actors=d,Wo(t,h,r),Zo.insert(h.x,h.y,h.x+h.width+r.taskMargin,450)}},ts=function(t){Object.keys(t).forEach((function(e){Go[e]=t[e]}))},es=function(t,e){var n=xt().journey;Lo.parser.yy.clear(),Lo.parser.parse(t+"\n"),Zo.init();var r=Object(h.select)("#"+e);r.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),Vo(r);var i=Lo.parser.yy.getTasks(),a=Lo.parser.yy.getTitle(),o=Lo.parser.yy.getActors();for(var s in Ho)delete Ho[s];var c=0;o.forEach((function(t){Ho[t]=n.actorColours[c%n.actorColours.length],c++})),function(t){var e=xt().journey,n=60;Object.keys(Ho).forEach((function(r){var i=Ho[r];Uo(t,{cx:20,cy:n,r:7,fill:i,stroke:"#000"});var a={x:40,y:n+7,fill:"#666",text:r,textMargin:5|e.boxTextMargin};qo(t,a),n+=20}))}(r),Zo.insert(0,0,Xo,50*Object.keys(Ho).length),Jo(r,i,0);var u=Zo.getBounds();a&&r.append("text").text(a).attr("x",Xo).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);var l=u.stopy-u.starty+2*n.diagramMarginY,f=Xo+u.stopx+2*n.diagramMarginX;q(r,l,f,n.useMaxWidth),r.append("line").attr("x1",Xo).attr("y1",4*n.height).attr("x2",f-Xo-4).attr("y2",4*n.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");var d=a?70:0;r.attr("viewBox","".concat(u.startx," -25 ").concat(f," ").concat(l+d)),r.attr("preserveAspectRatio","xMinYMin meet"),r.attr("height",l+d+25)},ns={},rs=function(t){Object.keys(t).forEach((function(e){ns[e]=t[e]}))},is=function(t,e){try{c.debug("Renering svg for syntax error\n");var n=Object(h.select)("#"+t),r=n.append("g");r.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),r.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),r.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),r.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),r.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),r.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),r.append("text").attr("class","error-text").attr("x",1240).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),r.append("text").attr("class","error-text").attr("x",1050).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+e),n.attr("height",100),n.attr("width",400),n.attr("viewBox","768 0 512 512")}catch(t){c.error("Error while rendering info diagram"),c.error(t.message)}},as=function(t){return"g.classGroup text {\n fill: ".concat(t.nodeBorder,";\n fill: ").concat(t.classText,";\n stroke: none;\n font-family: ").concat(t.fontFamily,";\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ").concat(t.nodeBorder,";\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.classGroup line {\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ").concat(t.nodeBorder,";\n font-size: 10px;\n}\n\n.relation {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n#compositionStart, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n")},os=function(t){return".label {\n font-family: ".concat(t.fontFamily,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n .cluster-label text {\n fill: ").concat(t.titleColor,";\n }\n .cluster-label span {\n color: ").concat(t.titleColor,";\n }\n\n .label text,span {\n fill: ").concat(t.nodeTextColor||t.textColor,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n background-color: ").concat(t.edgeLabelBackground,";\n fill: ").concat(t.edgeLabelBackground,";\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ").concat(t.clusterBkg,";\n stroke: ").concat(t.clusterBorder,";\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n .cluster span {\n color: ").concat(t.titleColor,";\n }\n // .cluster div {\n // color: ").concat(t.titleColor,";\n // }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ").concat(t.fontFamily,";\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n")},ss=function(t){return"\ndefs #statediagram-barbEnd {\n fill: ".concat(t.transitionColor,";\n stroke: ").concat(t.transitionColor,";\n }\ng.stateGroup text {\n fill: ").concat(t.nodeBorder,";\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ").concat(t.textColor,";\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ").concat(t.stateLabelColor,";\n}\n\ng.stateGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.stateGroup line {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n\n.transition {\n stroke: ").concat(t.transitionColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ").concat(t.background,";\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n\n text {\n fill: ").concat(t.noteTextColor,";\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ").concat(t.labelBackgroundColor,";\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ").concat(t.transitionLabelColor||t.tertiaryTextColor,";\n}\n.label div .edgeLabel {\n color: ").concat(t.transitionLabelColor||t.tertiaryTextColor,";\n}\n\n.stateLabel text {\n fill: ").concat(t.stateLabelColor,";\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ").concat(t.lineColor,";\n stroke: black;\n}\n.node circle.state-end {\n fill: ").concat(t.primaryBorderColor,";\n stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ").concat(t.compositeBackground||t.background,";\n // stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ").concat(t.stateBkg||t.mainBkg,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n stroke-width: 1px;\n}\n.node polygon {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ").concat(t.lineColor,";\n}\n\n.statediagram-cluster rect {\n fill: ").concat(t.compositeTitleBackground,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ").concat(t.stateLabelColor,";\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ").concat(t.compositeBackground||t.background,";\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ").concat(t.altBackground?t.altBackground:"#efefef",";\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ").concat(t.altBackground?t.altBackground:"#efefef",";\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ").concat(t.noteTextColor,";\n}\n\n.statediagram-note .nodeLabel {\n color: ").concat(t.noteTextColor,";\n}\n.statediagram .edgeLabel {\n color: red; // ").concat(t.noteTextColor,";\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ").concat(t.lineColor,";\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n")},cs={flowchart:os,"flowchart-v2":os,sequence:function(t){return".actor {\n stroke: ".concat(t.actorBorder,";\n fill: ").concat(t.actorBkg,";\n }\n\n text.actor > tspan {\n fill: ").concat(t.actorTextColor,";\n stroke: none;\n }\n\n .actor-line {\n stroke: ").concat(t.actorLineColor,";\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ").concat(t.signalColor,";\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.signalColor,";\n }\n\n #arrowhead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .sequenceNumber {\n fill: ").concat(t.sequenceNumberColor,";\n }\n\n #sequencenumber {\n fill: ").concat(t.signalColor,";\n }\n\n #crosshead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .messageText {\n fill: ").concat(t.signalTextColor,";\n stroke: ").concat(t.signalTextColor,";\n }\n\n .labelBox {\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBkgColor,";\n }\n\n .labelText, .labelText > tspan {\n fill: ").concat(t.labelTextColor,";\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ").concat(t.loopTextColor,";\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBorderColor,";\n }\n\n .note {\n //stroke: #decc93;\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n }\n\n .noteText, .noteText > tspan {\n fill: ").concat(t.noteTextColor,";\n stroke: none;\n }\n\n .activation0 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation1 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation2 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n")},gantt:function(t){return'\n .mermaid-main-font {\n font-family: "trebuchet ms", verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: '.concat(t.sectionBkgColor,";\n }\n\n .section2 {\n fill: ").concat(t.sectionBkgColor2,";\n }\n\n .section1,\n .section3 {\n fill: ").concat(t.altSectionBkgColor,";\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle1 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle2 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle3 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle {\n text-anchor: start;\n // font-size: ").concat(t.ganttFontSize,";\n // text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ").concat(t.gridColor,";\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.textColor,";\n }\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ").concat(t.todayLineColor,";\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n // .taskText:not([font-size]) {\n // font-size: ").concat(t.ganttFontSize,";\n // }\n\n .taskTextOutsideRight {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: start;\n // font-size: ").concat(t.ganttFontSize,";\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: end;\n // font-size: ").concat(t.ganttFontSize,";\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ").concat(t.taskTextColor,";\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ").concat(t.taskBkgColor,";\n stroke: ").concat(t.taskBorderColor,";\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ").concat(t.activeTaskBkgColor,";\n stroke: ").concat(t.activeTaskBorderColor,";\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ").concat(t.doneTaskBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.critBkgColor,";\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.activeTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ").concat(t.textColor," ;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n")},classDiagram:as,"classDiagram-v2":as,class:as,stateDiagram:ss,state:ss,git:function(){return"\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n"},info:function(){return""},pie:function(t){return"\n .pieCircle{\n stroke: ".concat(t.pieStrokeColor,";\n stroke-width : ").concat(t.pieStrokeWidth,";\n opacity : ").concat(t.pieOpacity,";\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ").concat(t.pieTitleTextSize,";\n fill: ").concat(t.pieTitleTextColor,";\n font-family: ").concat(t.fontFamily,";\n }\n .slice {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.pieSectionTextColor,";\n font-size:").concat(t.pieSectionTextSize,";\n // fill: white;\n }\n .legend text {\n fill: ").concat(t.pieLegendTextColor,";\n font-family: ").concat(t.fontFamily,";\n font-size: ").concat(t.pieLegendTextSize,";\n }\n")},er:function(t){return"\n .entityBox {\n fill: ".concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n }\n\n .attributeBoxOdd {\n fill: #ffffff;\n stroke: ").concat(t.nodeBorder,";\n }\n\n .attributeBoxEven {\n fill: #f2f2f2;\n stroke: ").concat(t.nodeBorder,";\n }\n\n .relationshipLabelBox {\n fill: ").concat(t.tertiaryColor,";\n opacity: 0.7;\n background-color: ").concat(t.tertiaryColor,";\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ").concat(t.lineColor,";\n }\n")},journey:function(t){return".label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ".concat(t.textColor,";\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ").concat(t.textColor,"\n }\n\n .legend {\n fill: ").concat(t.textColor,";\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ").concat(t.textColor,"\n }\n\n .face {\n fill: #FFF8DC;\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType0):"",";\n }\n .task-type-1, .section-type-1 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType1):"",";\n }\n .task-type-2, .section-type-2 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType2):"",";\n }\n .task-type-3, .section-type-3 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType3):"",";\n }\n .task-type-4, .section-type-4 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType4):"",";\n }\n .task-type-5, .section-type-5 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType5):"",";\n }\n .task-type-6, .section-type-6 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType6):"",";\n }\n .task-type-7, .section-type-7 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType7):"",";\n }\n")},requirement:function(t){return"\n\n marker {\n fill: ".concat(t.relationColor,";\n stroke: ").concat(t.relationColor,";\n }\n\n marker.cross {\n stroke: ").concat(t.lineColor,";\n }\n\n svg {\n font-family: ").concat(t.fontFamily,";\n font-size: ").concat(t.fontSize,";\n }\n\n .reqBox {\n fill: ").concat(t.requirementBackground,";\n fill-opacity: 100%;\n stroke: ").concat(t.requirementBorderColor,";\n stroke-width: ").concat(t.requirementBorderSize,";\n }\n \n .reqTitle, .reqLabel{\n fill: ").concat(t.requirementTextColor,";\n }\n .reqLabelBox {\n fill: ").concat(t.relationLabelBackground,";\n fill-opacity: 100%;\n }\n\n .req-title-line {\n stroke: ").concat(t.requirementBorderColor,";\n stroke-width: ").concat(t.requirementBorderSize,";\n }\n .relationshipLine {\n stroke: ").concat(t.relationColor,";\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ").concat(t.relationLabelColor,";\n }\n\n")}},us=function(t,e,n){return" {\n font-family: ".concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n fill: ").concat(n.textColor,"\n }\n\n /* Classes common for multiple diagrams */\n\n .error-icon {\n fill: ").concat(n.errorBkgColor,";\n }\n .error-text {\n fill: ").concat(n.errorTextColor,";\n stroke: ").concat(n.errorTextColor,";\n }\n\n .edge-thickness-normal {\n stroke-width: 2px;\n }\n .edge-thickness-thick {\n stroke-width: 3.5px\n }\n .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n .marker {\n fill: ").concat(n.lineColor,";\n stroke: ").concat(n.lineColor,";\n }\n .marker.cross {\n stroke: ").concat(n.lineColor,";\n }\n\n svg {\n font-family: ").concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n }\n\n ").concat(cs[t](n),"\n\n ").concat(e,"\n")};function ls(t){return(ls="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var hs={},fs=function(t,e,n){switch(c.debug("Directive type=".concat(e.type," with args:"),e.args),e.type){case"init":case"initialize":["config"].forEach((function(t){void 0!==e.args[t]&&("flowchart-v2"===n&&(n="flowchart"),e.args[n]=e.args[t],delete e.args[t])})),e.args,kt(e.args);break;case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap("wrap"===e.type);break;default:c.warn("Unhandled directive: source: '%%{".concat(e.type,": ").concat(JSON.stringify(e.args?e.args:{}),"}%%"),e)}};function ds(t){bi(t.git),nr(t.flowchart),cr(t.flowchart),void 0!==t.sequenceDiagram&&Ua.setConf(F(t.sequence,t.sequenceDiagram)),Ua.setConf(t.sequence),Wr(t.gantt),re(t.class),go(t.state),Eo(t.state),Si(t.class),sn(t.er),ts(t.journey),ea(t.requirement),rs(t.class)}function ps(){}var ys=Object.freeze({render:function(t,e,n,r){wt();var i=e,a=W.detectInit(i);a&&kt(a);var o=xt();if(e.length>o.maxTextSize&&(i="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa"),void 0!==r)r.innerHTML="",Object(h.select)(r).append("div").attr("id","d"+t).attr("style","font-family: "+o.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g");else{var s=document.getElementById(t);s&&s.remove();var u=document.querySelector("#d"+t);u&&u.remove(),Object(h.select)("body").append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}window.txt=i,i=function(t){var e=t;return e=(e=(e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)}))).replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)}))).replace(/#\w+;/g,(function(t){var e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}))}(i);var l=Object(h.select)("#d"+t).node(),f=W.detectType(i,o),y=l.firstChild,g=y.firstChild,v="";if(void 0!==o.themeCSS&&(v+="\n".concat(o.themeCSS)),void 0!==o.fontFamily&&(v+="\n:root { --mermaid-font-family: ".concat(o.fontFamily,"}")),void 0!==o.altFontFamily&&(v+="\n:root { --mermaid-alt-font-family: ".concat(o.altFontFamily,"}")),"flowchart"===f||"flowchart-v2"===f||"graph"===f){var m=rr(i);for(var b in m)o.htmlLabels||o.flowchart.htmlLabels?(v+="\n.".concat(b," > * { ").concat(m[b].styles.join(" !important; ")," !important; }"),v+="\n.".concat(b," span { ").concat(m[b].styles.join(" !important; ")," !important; }")):(v+="\n.".concat(b," path { ").concat(m[b].styles.join(" !important; ")," !important; }"),v+="\n.".concat(b," rect { ").concat(m[b].styles.join(" !important; ")," !important; }"),v+="\n.".concat(b," polygon { ").concat(m[b].styles.join(" !important; ")," !important; }"),v+="\n.".concat(b," ellipse { ").concat(m[b].styles.join(" !important; ")," !important; }"),v+="\n.".concat(b," circle { ").concat(m[b].styles.join(" !important; ")," !important; }"),m[b].textStyles&&(v+="\n.".concat(b," tspan { ").concat(m[b].textStyles.join(" !important; ")," !important; }")))}var x=(new d.a)("#".concat(t),us(f,v,o.themeVariables)),_=document.createElement("style");_.innerHTML=x,y.insertBefore(_,g);try{switch(f){case"git":o.flowchart.arrowMarkerAbsolute=o.arrowMarkerAbsolute,bi(o.git),xi(i,t,!1);break;case"flowchart":o.flowchart.arrowMarkerAbsolute=o.arrowMarkerAbsolute,nr(o.flowchart),ir(i,t,!1);break;case"flowchart-v2":o.flowchart.arrowMarkerAbsolute=o.arrowMarkerAbsolute,cr(o.flowchart),ur(i,t,!1);break;case"sequence":o.sequence.arrowMarkerAbsolute=o.arrowMarkerAbsolute,o.sequenceDiagram?(Ua.setConf(Object.assign(o.sequence,o.sequenceDiagram)),console.error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.")):Ua.setConf(o.sequence),Ua.draw(i,t);break;case"gantt":o.gantt.arrowMarkerAbsolute=o.arrowMarkerAbsolute,Wr(o.gantt),Vr(i,t);break;case"class":o.class.arrowMarkerAbsolute=o.arrowMarkerAbsolute,re(o.class),ie(i,t);break;case"classDiagram":o.class.arrowMarkerAbsolute=o.arrowMarkerAbsolute,$e(o.class),qe(i,t);break;case"state":o.class.arrowMarkerAbsolute=o.arrowMarkerAbsolute,go(o.state),vo(i,t);break;case"stateDiagram":o.class.arrowMarkerAbsolute=o.arrowMarkerAbsolute,Eo(o.state),To(i,t);break;case"info":o.class.arrowMarkerAbsolute=o.arrowMarkerAbsolute,Si(o.class),Ai(i,t,p.version);break;case"pie":Ri(i,t,p.version);break;case"er":sn(o.er),cn(i,t,p.version);break;case"journey":ts(o.journey),es(i,t,p.version);break;case"requirement":ea(o.requirement),na(i,t,p.version)}}catch(e){throw is(t,p.version),e}Object(h.select)('[id="'.concat(t,'"]')).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");var k=Object(h.select)("#d"+t).node().innerHTML;if(c.debug("cnf.arrowMarkerAbsolute",o.arrowMarkerAbsolute),o.arrowMarkerAbsolute&&"false"!==o.arrowMarkerAbsolute||(k=k.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),k=(k=function(t){var e=t;return e=(e=(e=e.replace(/fl°°/g,(function(){return"&#"}))).replace(/fl°/g,(function(){return"&"}))).replace(/¶ß/g,(function(){return";"}))}(k)).replace(/<br>/g,"<br/>"),void 0!==n)switch(f){case"flowchart":case"flowchart-v2":n(k,Dn.bindFunctions);break;case"gantt":n(k,Yr.bindFunctions);break;case"class":case"classDiagram":n(k,Ft.bindFunctions);break;default:n(k)}else c.debug("CB = undefined!");var w=Object(h.select)("#d"+t).node();return null!==w&&"function"==typeof w.remove&&Object(h.select)("#d"+t).node().remove(),k},parse:function(t){var e=xt(),n=W.detectInit(t,e);n&&c.debug("reinit ",n);var r,i=W.detectType(t,e);switch(c.debug("Type "+i),i){case"git":(r=ci.a).parser.yy=oi;break;case"flowchart":case"flowchart-v2":Dn.clear(),(r=In.a).parser.yy=Dn;break;case"sequence":(r=ia.a).parser.yy=xa;break;case"gantt":(r=$r.a).parser.yy=Yr;break;case"class":case"classDiagram":(r=$t.a).parser.yy=Ft;break;case"state":case"stateDiagram":(r=qa.a).parser.yy=ao;break;case"info":c.debug("info info info"),(r=Ti.a).parser.yy=wi;break;case"pie":c.debug("pie"),(r=Oi.a).parser.yy=Li;break;case"er":c.debug("er"),(r=Ke.a).parser.yy=Ze;break;case"journey":c.debug("Journey"),(r=Io.a).parser.yy=Do;break;case"requirement":case"requirementDiagram":c.debug("RequirementDiagram"),(r=Pi.a).parser.yy=qi}return r.parser.yy.graphType=i,r.parser.yy.parseError=function(t,e){throw{str:t,hash:e}},r.parse(t),r},parseDirective:function(t,e,n,r){try{if(void 0!==e)switch(e=e.trim(),n){case"open_directive":hs={};break;case"type_directive":hs.type=e.toLowerCase();break;case"arg_directive":hs.args=JSON.parse(e);break;case"close_directive":fs(t,hs,r),hs=null}}catch(t){c.error("Error while rendering sequenceDiagram directive: ".concat(e," jison context: ").concat(n)),c.error(t.message)}},initialize:function(t){t&&t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),dt=F({},t),t&&t.theme&&ut[t.theme]?t.themeVariables=ut[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ut.default.getThemeVariables(t.themeVariables));var e="object"===ls(t)?function(t){return yt=F({},pt),yt=F(yt,t),t.theme&&(yt.themeVariables=ut[t.theme].getThemeVariables(t.themeVariables)),vt=mt(yt,gt),yt}(t):bt();ds(e),u(e.logLevel)},reinitialize:ps,getConfig:xt,setConfig:function(t){return F(vt,t),xt()},getSiteConfig:bt,updateSiteConfig:function(t){return yt=F(yt,t),mt(yt,gt),yt},reset:function(){wt()},globalReset:function(){wt(),ds(xt())},defaultConfig:pt});u(xt().logLevel),wt(xt());var gs=ys,vs=function(){ms.startOnLoad?gs.getConfig().startOnLoad&&ms.init():void 0===ms.startOnLoad&&(c.debug("In start, no config"),gs.getConfig().startOnLoad&&ms.init())};"undefined"!=typeof document&&
-/*!
- * Wait for document loaded before starting the execution
- */
-window.addEventListener("load",(function(){vs()}),!1);var ms={startOnLoad:!0,htmlLabels:!0,mermaidAPI:gs,parse:gs.parse,render:gs.render,init:function(){var t,e,n=this,r=gs.getConfig();arguments.length>=2?(
-/*! sequence config was passed as #1 */
-void 0!==arguments[0]&&(ms.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],"function"==typeof arguments[arguments.length-1]?(e=arguments[arguments.length-1],c.debug("Callback function found")):void 0!==r.mermaid&&("function"==typeof r.mermaid.callback?(e=r.mermaid.callback,c.debug("Callback function found")):c.debug("No Callback function found")),t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof window.Node?[t]:t,c.debug("Start On Load before: "+ms.startOnLoad),void 0!==ms.startOnLoad&&(c.debug("Start On Load inner: "+ms.startOnLoad),gs.updateSiteConfig({startOnLoad:ms.startOnLoad})),void 0!==ms.ganttConfig&&gs.updateSiteConfig({gantt:ms.ganttConfig});for(var a,o=new W.initIdGeneratior(r.deterministicIds,r.deterministicIDSeed),s=function(r){var s=t[r];
-/*! Check if previously processed */if(s.getAttribute("data-processed"))return"continue";s.setAttribute("data-processed",!0);var u="mermaid-".concat(o.next());a=i(a=s.innerHTML).trim().replace(/<br\s*\/?>/gi,"<br/>");var l=W.detectInit(a);l&&c.debug("Detected early reinit: ",l);try{gs.render(u,a,(function(t,n){s.innerHTML=t,void 0!==e&&e(u),n&&n(s)}),s)}catch(t){c.warn("Syntax Error rendering"),c.warn(t),n.parseError&&n.parseError(t)}},u=0;u<t.length;u++)s(u)},initialize:function(t){void 0!==t.mermaid&&(void 0!==t.mermaid.startOnLoad&&(ms.startOnLoad=t.mermaid.startOnLoad),void 0!==t.mermaid.htmlLabels&&(ms.htmlLabels=t.mermaid.htmlLabels)),gs.initialize(t)},contentLoaded:vs};e.default=ms}]).default}));
+/*! For license information please see mermaid.min.js.LICENSE.txt */
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mermaid=e():t.mermaid=e()}("undefined"!=typeof self?self:this,(()=>(()=>{var t={1362:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,7],r=[1,8],i=[1,9],a=[1,10],o=[1,13],s=[1,12],c=[1,16,25],u=[1,20],l=[1,31],h=[1,32],f=[1,33],d=[1,35],p=[1,38],g=[1,36],y=[1,37],m=[1,39],v=[1,40],b=[1,41],_=[1,42],x=[1,45],w=[1,46],k=[1,47],T=[1,48],C=[16,25],E=[1,62],S=[1,63],A=[1,64],M=[1,65],N=[1,66],D=[1,67],B=[16,25,32,44,45,53,56,57,58,59,60,61,66,68],L=[16,25,30,32,44,45,49,53,56,57,58,59,60,61,66,68,83,84,85,86],O=[5,8,9,10,11,16,19,23,25],I=[53,83,84,85,86],R=[53,60,61,83,84,85,86],F=[53,56,57,58,59,83,84,85,86],P=[16,25,32],Y=[1,99],j={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statments:5,direction:6,directive:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,statements:24,EOF:25,statement:26,className:27,alphaNumToken:28,classLiteralName:29,GENERICTYPE:30,relationStatement:31,LABEL:32,classStatement:33,methodStatement:34,annotationStatement:35,clickStatement:36,cssClassStatement:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,CLASS:43,STYLE_SEPARATOR:44,STRUCT_START:45,members:46,STRUCT_STOP:47,ANNOTATION_START:48,ANNOTATION_END:49,MEMBER:50,SEPARATOR:51,relation:52,STR:53,relationType:54,lineType:55,AGGREGATION:56,EXTENSION:57,COMPOSITION:58,DEPENDENCY:59,LINE:60,DOTTED_LINE:61,CALLBACK:62,LINK:63,LINK_TARGET:64,CLICK:65,CALLBACK_NAME:66,CALLBACK_ARGS:67,HREF:68,CSSCLASS:69,commentToken:70,textToken:71,graphCodeTokens:72,textNoTagsToken:73,TAGSTART:74,TAGEND:75,"==":76,"--":77,PCT:78,DEFAULT:79,SPACE:80,MINUS:81,keywords:82,UNICODE_TEXT:83,NUM:84,ALPHA:85,BQUOTE_STR:86,$accept:0,$end:1},terminals_:{2:"error",5:"statments",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",25:"EOF",30:"GENERICTYPE",32:"LABEL",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"CLASS",44:"STYLE_SEPARATOR",45:"STRUCT_START",47:"STRUCT_STOP",48:"ANNOTATION_START",49:"ANNOTATION_END",50:"MEMBER",51:"SEPARATOR",53:"STR",56:"AGGREGATION",57:"EXTENSION",58:"COMPOSITION",59:"DEPENDENCY",60:"LINE",61:"DOTTED_LINE",62:"CALLBACK",63:"LINK",64:"LINK_TARGET",65:"CLICK",66:"CALLBACK_NAME",67:"CALLBACK_ARGS",68:"HREF",69:"CSSCLASS",72:"graphCodeTokens",74:"TAGSTART",75:"TAGEND",76:"==",77:"--",78:"PCT",79:"DEFAULT",80:"SPACE",81:"MINUS",82:"keywords",83:"UNICODE_TEXT",84:"NUM",85:"ALPHA",86:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[3,1],[3,2],[6,1],[6,1],[6,1],[6,1],[4,1],[7,4],[7,6],[13,1],[14,1],[18,1],[15,1],[12,4],[24,1],[24,2],[24,3],[27,1],[27,1],[27,2],[27,2],[27,2],[26,1],[26,2],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,2],[26,2],[26,1],[33,2],[33,4],[33,5],[33,7],[35,4],[46,1],[46,2],[34,1],[34,2],[34,1],[34,1],[31,3],[31,4],[31,4],[31,5],[52,3],[52,2],[52,2],[52,1],[54,1],[54,1],[54,1],[54,1],[55,1],[55,1],[36,3],[36,4],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[37,3],[70,1],[70,1],[71,1],[71,1],[71,1],[71,1],[71,1],[71,1],[71,1],[73,1],[73,1],[73,1],[73,1],[28,1],[28,1],[28,1],[29,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.setDirection("TB");break;case 6:r.setDirection("BT");break;case 7:r.setDirection("RL");break;case 8:r.setDirection("LR");break;case 12:r.parseDirective("%%{","open_directive");break;case 13:r.parseDirective(a[s],"type_directive");break;case 14:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 15:r.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=a[s];break;case 22:this.$=a[s-1]+a[s];break;case 23:case 24:this.$=a[s-1]+"~"+a[s];break;case 25:r.addRelation(a[s]);break;case 26:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 34:this.$=a[s].trim(),r.setTitle(this.$);break;case 35:case 36:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 37:r.addClass(a[s]);break;case 38:r.addClass(a[s-2]),r.setCssClass(a[s-2],a[s]);break;case 39:r.addClass(a[s-3]),r.addMembers(a[s-3],a[s-1]);break;case 40:r.addClass(a[s-5]),r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 41:r.addAnnotation(a[s],a[s-2]);break;case 42:this.$=[a[s]];break;case 43:a[s].push(a[s-1]),this.$=a[s];break;case 44:case 46:case 47:break;case 45:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 48:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 49:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:"none"};break;case 50:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:"none",relationTitle2:a[s-1]};break;case 51:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 52:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 53:this.$={type1:"none",type2:a[s],lineType:a[s-1]};break;case 54:this.$={type1:a[s-1],type2:"none",lineType:a[s]};break;case 55:this.$={type1:"none",type2:"none",lineType:a[s]};break;case 56:this.$=r.relationType.AGGREGATION;break;case 57:this.$=r.relationType.EXTENSION;break;case 58:this.$=r.relationType.COMPOSITION;break;case 59:this.$=r.relationType.DEPENDENCY;break;case 60:this.$=r.lineType.LINE;break;case 61:this.$=r.lineType.DOTTED_LINE;break;case 62:case 68:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 63:case 69:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 64:case 72:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 65:case 73:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 66:case 74:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 67:case 75:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 70:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 71:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 76:r.setCssClass(a[s-1],a[s])}},table:[{3:1,4:2,5:e,6:4,7:5,8:n,9:r,10:i,11:a,12:6,13:11,19:o,23:s},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:e,6:4,7:5,8:n,9:r,10:i,11:a,12:6,13:11,19:o,23:s},{1:[2,9]},t(c,[2,5]),t(c,[2,6]),t(c,[2,7]),t(c,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:u},t([17,22],[2,13]),{6:30,7:29,8:n,9:r,10:i,11:a,13:11,19:o,24:21,26:22,27:34,28:43,29:44,31:23,33:24,34:25,35:26,36:27,37:28,38:l,40:h,42:f,43:d,48:p,50:g,51:y,62:m,63:v,65:b,69:_,83:x,84:w,85:k,86:T},{16:[1,49]},{18:50,21:[1,51]},{16:[2,15]},{25:[1,52]},{16:[1,53],25:[2,17]},t(C,[2,25],{32:[1,54]}),t(C,[2,27]),t(C,[2,28]),t(C,[2,29]),t(C,[2,30]),t(C,[2,31]),t(C,[2,32]),t(C,[2,33]),{39:[1,55]},{41:[1,56]},t(C,[2,36]),t(C,[2,44],{52:57,54:60,55:61,32:[1,59],53:[1,58],56:E,57:S,58:A,59:M,60:N,61:D}),{27:68,28:43,29:44,83:x,84:w,85:k,86:T},t(C,[2,46]),t(C,[2,47]),{28:69,83:x,84:w,85:k},{27:70,28:43,29:44,83:x,84:w,85:k,86:T},{27:71,28:43,29:44,83:x,84:w,85:k,86:T},{27:72,28:43,29:44,83:x,84:w,85:k,86:T},{53:[1,73]},t(B,[2,20],{28:43,29:44,27:74,30:[1,75],83:x,84:w,85:k,86:T}),t(B,[2,21],{30:[1,76]}),t(L,[2,90]),t(L,[2,91]),t(L,[2,92]),t([16,25,30,32,44,45,53,56,57,58,59,60,61,66,68],[2,93]),t(O,[2,10]),{15:77,22:u},{22:[2,14]},{1:[2,16]},{6:30,7:29,8:n,9:r,10:i,11:a,13:11,19:o,24:78,25:[2,18],26:22,27:34,28:43,29:44,31:23,33:24,34:25,35:26,36:27,37:28,38:l,40:h,42:f,43:d,48:p,50:g,51:y,62:m,63:v,65:b,69:_,83:x,84:w,85:k,86:T},t(C,[2,26]),t(C,[2,34]),t(C,[2,35]),{27:79,28:43,29:44,53:[1,80],83:x,84:w,85:k,86:T},{52:81,54:60,55:61,56:E,57:S,58:A,59:M,60:N,61:D},t(C,[2,45]),{55:82,60:N,61:D},t(I,[2,55],{54:83,56:E,57:S,58:A,59:M}),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,59]),t(F,[2,60]),t(F,[2,61]),t(C,[2,37],{44:[1,84],45:[1,85]}),{49:[1,86]},{53:[1,87]},{53:[1,88]},{66:[1,89],68:[1,90]},{28:91,83:x,84:w,85:k},t(B,[2,22]),t(B,[2,23]),t(B,[2,24]),{16:[1,92]},{25:[2,19]},t(P,[2,48]),{27:93,28:43,29:44,83:x,84:w,85:k,86:T},{27:94,28:43,29:44,53:[1,95],83:x,84:w,85:k,86:T},t(I,[2,54],{54:96,56:E,57:S,58:A,59:M}),t(I,[2,53]),{28:97,83:x,84:w,85:k},{46:98,50:Y},{27:100,28:43,29:44,83:x,84:w,85:k,86:T},t(C,[2,62],{53:[1,101]}),t(C,[2,64],{53:[1,103],64:[1,102]}),t(C,[2,68],{53:[1,104],67:[1,105]}),t(C,[2,72],{53:[1,107],64:[1,106]}),t(C,[2,76]),t(O,[2,11]),t(P,[2,50]),t(P,[2,49]),{27:108,28:43,29:44,83:x,84:w,85:k,86:T},t(I,[2,52]),t(C,[2,38],{45:[1,109]}),{47:[1,110]},{46:111,47:[2,42],50:Y},t(C,[2,41]),t(C,[2,63]),t(C,[2,65]),t(C,[2,66],{64:[1,112]}),t(C,[2,69]),t(C,[2,70],{53:[1,113]}),t(C,[2,73]),t(C,[2,74],{64:[1,114]}),t(P,[2,51]),{46:115,50:Y},t(C,[2,39]),{47:[2,43]},t(C,[2,67]),t(C,[2,71]),t(C,[2,75]),{47:[1,116]},t(C,[2,40])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],6:[2,9],13:[2,12],14:[2,4],20:[2,15],51:[2,14],52:[2,16],78:[2,19],111:[2,43]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},U={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:case 10:case 19:case 26:break;case 11:return this.begin("acc_title"),38;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),40;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:case 36:case 39:case 42:case 45:case 48:case 51:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 20:case 21:return 23;case 22:return this.begin("struct"),45;case 23:return"EOF_IN_STRUCT";case 24:return"OPEN_IN_STRUCT";case 25:return this.popState(),47;case 27:return"MEMBER";case 28:return 43;case 29:return 69;case 30:return 62;case 31:return 63;case 32:return 65;case 33:return 48;case 34:return 49;case 35:this.begin("generic");break;case 37:return"GENERICTYPE";case 38:this.begin("string");break;case 40:return"STR";case 41:this.begin("bqstring");break;case 43:return"BQUOTE_STR";case 44:this.begin("href");break;case 46:return 68;case 47:this.begin("callback_name");break;case 49:this.popState(),this.begin("callback_args");break;case 50:return 66;case 52:return 67;case 53:case 54:case 55:case 56:return 64;case 57:case 58:return 57;case 59:case 60:return 59;case 61:return 58;case 62:return 56;case 63:return 60;case 64:return 61;case 65:return 32;case 66:return 44;case 67:return 81;case 68:return"DOT";case 69:return"PLUS";case 70:return 78;case 71:case 72:return"EQUALS";case 73:return 85;case 74:return"PUNCTUATION";case 75:return 84;case 76:return 83;case 77:return 80;case 78:return 25}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},callback_args:{rules:[51,52],inclusive:!1},callback_name:{rules:[48,49,50],inclusive:!1},href:{rules:[45,46],inclusive:!1},struct:{rules:[23,24,25,26,27],inclusive:!1},generic:{rules:[36,37],inclusive:!1},bqstring:{rules:[42,43],inclusive:!1},string:{rules:[39,40],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,28,29,30,31,32,33,34,35,38,41,44,47,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78],inclusive:!0}}};function z(){this.yy={}}return j.lexer=U,z.prototype=j,j.Parser=z,new z}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8218).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},5890:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,23,25,27,29,30,48],i=[1,17],a=[1,18],o=[1,19],s=[1,20],c=[1,21],u=[1,24],l=[1,29],h=[1,30],f=[1,31],d=[1,32],p=[1,44],g=[30,45,46],y=[4,6,9,11,23,25,27,29,30,48],m=[41,42,43,44],v=[22,36],b=[1,62],_={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,attribute:31,attributeType:32,attributeName:33,attributeKeyType:34,attributeComment:35,ATTRIBUTE_WORD:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,NON_IDENTIFYING:45,IDENTIFYING:46,WORD:47,open_directive:48,type_directive:49,arg_directive:50,close_directive:51,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",36:"ATTRIBUTE_WORD",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"NON_IDENTIFYING",46:"IDENTIFYING",47:"WORD",48:"open_directive",49:"type_directive",50:"arg_directive",51:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[21,1],[21,2],[31,2],[31,3],[31,3],[31,4],[32,1],[33,1],[34,1],[35,1],[18,3],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 3:case 7:case 8:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:case 20:case 27:case 28:case 29:case 39:this.$=a[s];break;case 12:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 13:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s]);break;case 16:case 17:this.$=a[s].trim(),r.setTitle(this.$);break;case 18:case 19:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 21:this.$=[a[s]];break;case 22:a[s].push(a[s-1]),this.$=a[s];break;case 23:this.$={attributeType:a[s-1],attributeName:a[s]};break;case 24:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeKeyType:a[s]};break;case 25:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeComment:a[s]};break;case 26:this.$={attributeType:a[s-3],attributeName:a[s-2],attributeKeyType:a[s-1],attributeComment:a[s]};break;case 30:case 38:this.$=a[s].replace(/"/g,"");break;case 31:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 32:this.$=r.Cardinality.ZERO_OR_ONE;break;case 33:this.$=r.Cardinality.ZERO_OR_MORE;break;case 34:this.$=r.Cardinality.ONE_OR_MORE;break;case 35:this.$=r.Cardinality.ONLY_ONE;break;case 36:this.$=r.Identification.NON_IDENTIFYING;break;case 37:this.$=r.Identification.IDENTIFYING;break;case 40:r.parseDirective("%%{","open_directive");break;case 41:r.parseDirective(a[s],"type_directive");break;case 42:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 43:r.parseDirective("}%%","close_directive","er")}},table:[{3:1,4:e,7:3,12:4,48:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,48:n},{13:8,49:[1,9]},{49:[2,40]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:i,25:a,27:o,29:s,30:c,48:n},{1:[2,2]},{14:22,15:[1,23],51:u},t([15,51],[2,41]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:15,10:25,12:4,17:16,23:i,25:a,27:o,29:s,30:c,48:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,15],{18:26,39:28,20:[1,27],41:l,42:h,43:f,44:d}),{24:[1,33]},{26:[1,34]},{28:[1,35]},t(r,[2,19]),t([6,9,11,15,20,23,25,27,29,30,41,42,43,44,48],[2,20]),{11:[1,36]},{16:37,50:[1,38]},{11:[2,43]},t(r,[2,5]),{17:39,30:c},{21:40,22:[1,41],31:42,32:43,36:p},{40:45,45:[1,46],46:[1,47]},t(g,[2,32]),t(g,[2,33]),t(g,[2,34]),t(g,[2,35]),t(r,[2,16]),t(r,[2,17]),t(r,[2,18]),t(y,[2,9]),{14:48,51:u},{51:[2,42]},{15:[1,49]},{22:[1,50]},t(r,[2,14]),{21:51,22:[2,21],31:42,32:43,36:p},{33:52,36:[1,53]},{36:[2,27]},{39:54,41:l,42:h,43:f,44:d},t(m,[2,36]),t(m,[2,37]),{11:[1,55]},{19:56,30:[1,58],47:[1,57]},t(r,[2,13]),{22:[2,22]},t(v,[2,23],{34:59,35:60,37:[1,61],38:b}),t([22,36,37,38],[2,28]),{30:[2,31]},t(y,[2,10]),t(r,[2,12]),t(r,[2,38]),t(r,[2,39]),t(v,[2,24],{35:63,38:b}),t(v,[2,25]),t([22,36,38],[2,29]),t(v,[2,30]),t(v,[2,26])],defaultActions:{5:[2,40],7:[2,2],24:[2,43],38:[2,42],44:[2,27],51:[2,22],54:[2,31]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},x={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.begin("open_directive"),48;case 8:return this.begin("type_directive"),49;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),51;case 11:return 50;case 12:case 13:case 15:case 20:case 24:break;case 14:return 11;case 16:return 9;case 17:return 47;case 18:return 4;case 19:return this.begin("block"),20;case 21:return 37;case 22:return 36;case 23:return 38;case 25:return this.popState(),22;case 26:case 39:return e.yytext[0];case 27:case 31:return 41;case 28:case 32:return 42;case 29:case 33:return 43;case 30:return 44;case 34:case 36:case 37:return 45;case 35:return 46;case 38:return 30;case 40:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:(?:PK)|(?:FK))/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\|o\b)/i,/^(?:\}o\b)/i,/^(?:\}\|)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[20,21,22,23,24,25,26],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,27,28,29,30,31,32,33,34,35,36,37,38,39,40],inclusive:!0}}};function w(){this.yy={}}return _.lexer=x,w.prototype=_,_.Parser=w,new w}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8009).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},3602:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,9],n=[1,7],r=[1,6],i=[1,8],a=[1,20,21,22,23,38,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],o=[2,10],s=[1,20],c=[1,21],u=[1,22],l=[1,23],h=[1,30],f=[1,32],d=[1,33],p=[1,34],g=[1,62],y=[1,48],m=[1,52],v=[1,36],b=[1,37],_=[1,38],x=[1,39],w=[1,40],k=[1,56],T=[1,63],C=[1,51],E=[1,53],S=[1,55],A=[1,59],M=[1,60],N=[1,41],D=[1,42],B=[1,43],L=[1,44],O=[1,61],I=[1,50],R=[1,54],F=[1,57],P=[1,58],Y=[1,49],j=[1,66],U=[1,71],z=[1,20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],$=[1,75],q=[1,74],H=[1,76],W=[20,21,23,81,82],V=[1,99],G=[1,104],X=[1,107],Z=[1,108],Q=[1,101],K=[1,106],J=[1,109],tt=[1,102],et=[1,114],nt=[1,113],rt=[1,103],it=[1,105],at=[1,110],ot=[1,111],st=[1,112],ct=[1,115],ut=[20,21,22,23,81,82],lt=[20,21,22,23,53,81,82],ht=[20,21,22,23,40,52,53,55,57,59,61,63,65,66,67,69,71,73,74,76,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],ft=[20,21,23],dt=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],pt=[1,12,20,21,22,23,24,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],gt=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],yt=[1,149],mt=[1,157],vt=[1,158],bt=[1,159],_t=[1,160],xt=[1,144],wt=[1,145],kt=[1,141],Tt=[1,152],Ct=[1,153],Et=[1,154],St=[1,155],At=[1,156],Mt=[1,161],Nt=[1,162],Dt=[1,147],Bt=[1,150],Lt=[1,146],Ot=[1,143],It=[20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Rt=[1,165],Ft=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],Pt=[20,21,22,23,24,26,38,40,41,42,52,56,58,60,62,64,66,67,68,70,72,73,75,77,81,82,86,87,88,89,90,91,92,95,105,106,109,111,112,113,114,122,123,124,125,126,127],Yt=[12,21,22,24],jt=[22,106],Ut=[1,250],zt=[1,245],$t=[1,246],qt=[1,254],Ht=[1,251],Wt=[1,248],Vt=[1,247],Gt=[1,249],Xt=[1,252],Zt=[1,253],Qt=[1,255],Kt=[1,273],Jt=[20,21,23,106],te=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],ee={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,link:49,node:50,vertex:51,AMP:52,STYLE_SEPARATOR:53,idString:54,DOUBLECIRCLESTART:55,DOUBLECIRCLEEND:56,PS:57,PE:58,"(-":59,"-)":60,STADIUMSTART:61,STADIUMEND:62,SUBROUTINESTART:63,SUBROUTINEEND:64,VERTEX_WITH_PROPS_START:65,ALPHA:66,COLON:67,PIPE:68,CYLINDERSTART:69,CYLINDEREND:70,DIAMOND_START:71,DIAMOND_STOP:72,TAGEND:73,TRAPSTART:74,TRAPEND:75,INVTRAPSTART:76,INVTRAPEND:77,linkStatement:78,arrowText:79,TESTSTR:80,START_LINK:81,LINK:82,textToken:83,STR:84,keywords:85,STYLE:86,LINKSTYLE:87,CLASSDEF:88,CLASS:89,CLICK:90,DOWN:91,UP:92,textNoTags:93,textNoTagsToken:94,DEFAULT:95,stylesOpt:96,alphaNum:97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,HEX:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,MINUS:109,UNIT:110,BRKT:111,DOT:112,PCT:113,TAGSTART:114,alphaNumToken:115,idStringToken:116,alphaNumStatement:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,PUNCTUATION:122,UNICODE_TEXT:123,PLUS:124,EQUALS:125,MULT:126,UNDERSCORE:127,graphCodeTokens:128,ARROW_CROSS:129,ARROW_POINT:130,ARROW_CIRCLE:131,ARROW_OPEN:132,QUOTE:133,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",52:"AMP",53:"STYLE_SEPARATOR",55:"DOUBLECIRCLESTART",56:"DOUBLECIRCLEEND",57:"PS",58:"PE",59:"(-",60:"-)",61:"STADIUMSTART",62:"STADIUMEND",63:"SUBROUTINESTART",64:"SUBROUTINEEND",65:"VERTEX_WITH_PROPS_START",66:"ALPHA",67:"COLON",68:"PIPE",69:"CYLINDERSTART",70:"CYLINDEREND",71:"DIAMOND_START",72:"DIAMOND_STOP",73:"TAGEND",74:"TRAPSTART",75:"TRAPEND",76:"INVTRAPSTART",77:"INVTRAPEND",80:"TESTSTR",81:"START_LINK",82:"LINK",84:"STR",86:"STYLE",87:"LINKSTYLE",88:"CLASSDEF",89:"CLASS",90:"CLICK",91:"DOWN",92:"UP",95:"DEFAULT",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"HEX",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"MINUS",110:"UNIT",111:"BRKT",112:"DOT",113:"PCT",114:"TAGSTART",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr",122:"PUNCTUATION",123:"UNICODE_TEXT",124:"PLUS",125:"EQUALS",126:"MULT",127:"UNDERSCORE",129:"ARROW_CROSS",130:"ARROW_POINT",131:"ARROW_CIRCLE",132:"ARROW_OPEN",133:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[50,1],[50,5],[50,3],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,8],[51,4],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,4],[51,4],[51,1],[49,2],[49,3],[49,3],[49,1],[49,3],[78,1],[79,3],[39,1],[39,2],[39,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[93,1],[93,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[103,1],[103,3],[96,1],[96,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[94,1],[94,1],[94,1],[94,1],[54,1],[54,2],[97,1],[97,2],[117,1],[117,1],[117,1],[117,1],[43,1],[43,1],[43,1],[43,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.parseDirective("%%{","open_directive");break;case 6:r.parseDirective(a[s],"type_directive");break;case 7:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 8:r.parseDirective("}%%","close_directive","flowchart");break;case 10:case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 11:a[s]!==[]&&a[s-1].push(a[s]),this.$=a[s-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:case 78:case 150:this.$=a[s];break;case 19:r.setDirection("TB"),this.$="TB";break;case 20:r.setDirection(a[s-1]),this.$=a[s-1];break;case 35:this.$=a[s-1].nodes;break;case 41:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 42:this.$=r.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 43:this.$=r.addSubGraph(void 0,a[s-1],void 0);break;case 45:this.$=a[s].trim(),r.setTitle(this.$);break;case 46:case 47:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 51:r.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 52:r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 53:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 54:this.$={stmt:a[s],nodes:a[s]};break;case 55:case 123:case 125:this.$=[a[s]];break;case 56:this.$=a[s-4].concat(a[s]);break;case 57:this.$=[a[s-2]],r.setClass(a[s-2],a[s]);break;case 58:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"square");break;case 59:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"doublecircle");break;case 60:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"circle");break;case 61:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"ellipse");break;case 62:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"stadium");break;case 63:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"subroutine");break;case 64:this.$=a[s-7],r.addVertex(a[s-7],a[s-1],"rect",void 0,void 0,void 0,Object.fromEntries([[a[s-5],a[s-3]]]));break;case 65:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"cylinder");break;case 66:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"round");break;case 67:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"diamond");break;case 68:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"hexagon");break;case 69:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"odd");break;case 70:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"trapezoid");break;case 71:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"inv_trapezoid");break;case 72:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_right");break;case 73:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_left");break;case 74:this.$=a[s],r.addVertex(a[s]);break;case 75:a[s-1].text=a[s],this.$=a[s-1];break;case 76:case 77:a[s-2].text=a[s-1],this.$=a[s-2];break;case 79:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1]};break;case 80:c=r.destructLink(a[s]),this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 81:this.$=a[s-1];break;case 83:case 97:case 153:case 151:this.$=a[s-1]+""+a[s];break;case 98:case 99:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 100:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 101:case 109:this.$=a[s-1],r.setClickEvent(a[s-1],a[s]);break;case 102:case 110:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 103:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 104:this.$=a[s-4],r.setClickEvent(a[s-4],a[s-3],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 105:case 111:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 106:case 112:this.$=a[s-3],r.setLink(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 107:case 113:this.$=a[s-3],r.setLink(a[s-3],a[s-2],a[s]);break;case 108:case 114:this.$=a[s-5],r.setLink(a[s-5],a[s-4],a[s]),r.setTooltip(a[s-5],a[s-2]);break;case 115:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 116:case 118:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 117:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 119:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 120:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 121:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 122:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 124:case 126:a[s-2].push(a[s]),this.$=a[s-2];break;case 128:this.$=a[s-1]+a[s];break;case 156:this.$="v";break;case 157:this.$="-";break;case 158:this.$={stmt:"dir",value:"TB"};break;case 159:this.$={stmt:"dir",value:"BT"};break;case 160:this.$={stmt:"dir",value:"RL"};break;case 161:this.$={stmt:"dir",value:"LR"}}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},t(a,o,{17:11}),{7:12,13:[1,13]},{16:14,21:n,22:r,24:i},{16:15,21:n,22:r,24:i},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,43:31,44:f,46:d,48:p,50:35,51:45,52:g,54:46,66:y,67:m,86:v,87:b,88:_,89:x,90:w,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,118:N,119:D,120:B,121:L,122:O,123:I,124:R,125:F,126:P,127:Y},{8:64,10:[1,65],15:j},t([10,15],[2,6]),t(a,[2,17]),t(a,[2,18]),t(a,[2,19]),{20:[1,68],21:[1,69],22:U,27:67,30:70},t(z,[2,11]),t(z,[2,12]),t(z,[2,13]),t(z,[2,14]),t(z,[2,15]),t(z,[2,16]),{9:72,20:$,21:q,23:H,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:$,21:q,23:H},{9:81,20:$,21:q,23:H},{9:82,20:$,21:q,23:H},{9:83,20:$,21:q,23:H},{9:84,20:$,21:q,23:H},{9:86,20:$,21:q,22:[1,85],23:H},t(z,[2,44]),{45:[1,87]},{47:[1,88]},t(z,[2,47]),t(W,[2,54],{30:89,22:U}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:V,52:G,66:X,67:Z,84:[1,97],91:Q,97:96,98:[1,94],100:[1,95],105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(z,[2,158]),t(z,[2,159]),t(z,[2,160]),t(z,[2,161]),t(ut,[2,55],{53:[1,116]}),t(lt,[2,74],{116:129,40:[1,117],52:g,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:y,67:m,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:k,95:T,105:C,106:E,109:S,111:A,112:M,122:O,123:I,124:R,125:F,126:P,127:Y}),t(ht,[2,150]),t(ht,[2,175]),t(ht,[2,176]),t(ht,[2,177]),t(ht,[2,178]),t(ht,[2,179]),t(ht,[2,180]),t(ht,[2,181]),t(ht,[2,182]),t(ht,[2,183]),t(ht,[2,184]),t(ht,[2,185]),t(ht,[2,186]),t(ht,[2,187]),t(ht,[2,188]),t(ht,[2,189]),t(ht,[2,190]),{9:130,20:$,21:q,23:H},{11:131,14:[1,132]},t(ft,[2,8]),t(a,[2,20]),t(a,[2,26]),t(a,[2,27]),{21:[1,133]},t(dt,[2,34],{30:134,22:U}),t(z,[2,35]),{50:135,51:45,52:g,54:46,66:y,67:m,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,122:O,123:I,124:R,125:F,126:P,127:Y},t(pt,[2,48]),t(pt,[2,49]),t(pt,[2,50]),t(gt,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:yt,24:mt,26:vt,38:bt,39:139,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),t(z,[2,36]),t(z,[2,37]),t(z,[2,38]),t(z,[2,39]),t(z,[2,40]),{22:yt,24:mt,26:vt,38:bt,39:163,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(It,o,{17:164}),t(z,[2,45]),t(z,[2,46]),t(W,[2,53],{52:Rt}),{26:V,52:G,66:X,67:Z,91:Q,97:166,102:[1,167],105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},{95:[1,168],103:169,105:[1,170]},{26:V,52:G,66:X,67:Z,91:Q,95:[1,171],97:172,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},{26:V,52:G,66:X,67:Z,91:Q,97:173,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(ft,[2,101],{22:[1,174],99:[1,175]}),t(ft,[2,105],{22:[1,176]}),t(ft,[2,109],{115:100,117:178,22:[1,177],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,122:rt,123:it,124:at,125:ot,126:st,127:ct}),t(ft,[2,111],{22:[1,179]}),t(Ft,[2,152]),t(Ft,[2,154]),t(Ft,[2,155]),t(Ft,[2,156]),t(Ft,[2,157]),t(Pt,[2,162]),t(Pt,[2,163]),t(Pt,[2,164]),t(Pt,[2,165]),t(Pt,[2,166]),t(Pt,[2,167]),t(Pt,[2,168]),t(Pt,[2,169]),t(Pt,[2,170]),t(Pt,[2,171]),t(Pt,[2,172]),t(Pt,[2,173]),t(Pt,[2,174]),{52:g,54:180,66:y,67:m,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,122:O,123:I,124:R,125:F,126:P,127:Y},{22:yt,24:mt,26:vt,38:bt,39:181,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:182,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:184,42:_t,52:G,57:[1,183],66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:185,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:186,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:187,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{66:[1,188]},{22:yt,24:mt,26:vt,38:bt,39:189,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:190,42:_t,52:G,66:X,67:Z,71:[1,191],73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:192,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:193,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:194,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(ht,[2,151]),t(Yt,[2,3]),{8:195,15:j},{15:[2,7]},t(a,[2,28]),t(dt,[2,33]),t(W,[2,51],{30:196,22:U}),t(gt,[2,75],{22:[1,197]}),{22:[1,198]},{22:yt,24:mt,26:vt,38:bt,39:199,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,73:xt,81:wt,82:[1,200],83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(Pt,[2,82]),t(Pt,[2,84]),t(Pt,[2,140]),t(Pt,[2,141]),t(Pt,[2,142]),t(Pt,[2,143]),t(Pt,[2,144]),t(Pt,[2,145]),t(Pt,[2,146]),t(Pt,[2,147]),t(Pt,[2,148]),t(Pt,[2,149]),t(Pt,[2,85]),t(Pt,[2,86]),t(Pt,[2,87]),t(Pt,[2,88]),t(Pt,[2,89]),t(Pt,[2,90]),t(Pt,[2,91]),t(Pt,[2,92]),t(Pt,[2,93]),t(Pt,[2,94]),t(Pt,[2,95]),{9:203,20:$,21:q,22:yt,23:H,24:mt,26:vt,38:bt,40:[1,202],42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,204],43:31,44:f,46:d,48:p,50:35,51:45,52:g,54:46,66:y,67:m,86:v,87:b,88:_,89:x,90:w,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,118:N,119:D,120:B,121:L,122:O,123:I,124:R,125:F,126:P,127:Y},{22:U,30:205},{22:[1,206],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,115:100,117:178,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},t(jt,[2,123]),{22:[1,211]},{22:[1,212],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,115:100,117:178,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:[1,213],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,115:100,117:178,122:rt,123:it,124:at,125:ot,126:st,127:ct},{84:[1,214]},t(ft,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},t(Ft,[2,153]),{84:[1,219],101:[1,220]},t(ut,[2,57],{116:129,52:g,66:y,67:m,91:k,95:T,105:C,106:E,109:S,111:A,112:M,122:O,123:I,124:R,125:F,126:P,127:Y}),{22:yt,24:mt,26:vt,38:bt,41:[1,221],42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,56:[1,222],66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:223,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,58:[1,224],66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,60:[1,225],66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,62:[1,226],66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,64:[1,227],66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{67:[1,228]},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,70:[1,229],73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,72:[1,230],73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:231,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,41:[1,232],42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,73:xt,75:[1,233],77:[1,234],81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,73:xt,75:[1,236],77:[1,235],81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{9:237,20:$,21:q,23:H},t(W,[2,52],{52:Rt}),t(gt,[2,77]),t(gt,[2,76]),{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,68:[1,238],73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(gt,[2,79]),t(Pt,[2,83]),{22:yt,24:mt,26:vt,38:bt,39:239,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(It,o,{17:240}),t(z,[2,43]),{51:241,52:g,54:46,66:y,67:m,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,122:O,123:I,124:R,125:F,126:P,127:Y},{22:Ut,66:zt,67:$t,86:qt,96:242,102:Ht,105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Ut,66:zt,67:$t,86:qt,96:256,102:Ht,105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Ut,66:zt,67:$t,86:qt,96:257,102:Ht,104:[1,258],105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Ut,66:zt,67:$t,86:qt,96:259,102:Ht,104:[1,260],105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{105:[1,261]},{22:Ut,66:zt,67:$t,86:qt,96:262,102:Ht,105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Ut,66:zt,67:$t,86:qt,96:263,102:Ht,105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{26:V,52:G,66:X,67:Z,91:Q,97:264,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(ft,[2,102]),{84:[1,265]},t(ft,[2,106],{22:[1,266]}),t(ft,[2,107]),t(ft,[2,110]),t(ft,[2,112],{22:[1,267]}),t(ft,[2,113]),t(lt,[2,58]),t(lt,[2,59]),{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,58:[1,268],66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(lt,[2,66]),t(lt,[2,61]),t(lt,[2,62]),t(lt,[2,63]),{66:[1,269]},t(lt,[2,65]),t(lt,[2,67]),{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,72:[1,270],73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(lt,[2,69]),t(lt,[2,70]),t(lt,[2,72]),t(lt,[2,71]),t(lt,[2,73]),t(Yt,[2,4]),t([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:yt,24:mt,26:vt,38:bt,41:[1,271],42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,272],43:31,44:f,46:d,48:p,50:35,51:45,52:g,54:46,66:y,67:m,86:v,87:b,88:_,89:x,90:w,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,118:N,119:D,120:B,121:L,122:O,123:I,124:R,125:F,126:P,127:Y},t(ut,[2,56]),t(ft,[2,115],{106:Kt}),t(Jt,[2,125],{108:274,22:Ut,66:zt,67:$t,86:qt,102:Ht,105:Wt,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt}),t(te,[2,127]),t(te,[2,129]),t(te,[2,130]),t(te,[2,131]),t(te,[2,132]),t(te,[2,133]),t(te,[2,134]),t(te,[2,135]),t(te,[2,136]),t(te,[2,137]),t(te,[2,138]),t(te,[2,139]),t(ft,[2,116],{106:Kt}),t(ft,[2,117],{106:Kt}),{22:[1,275]},t(ft,[2,118],{106:Kt}),{22:[1,276]},t(jt,[2,124]),t(ft,[2,98],{106:Kt}),t(ft,[2,99],{106:Kt}),t(ft,[2,100],{115:100,117:178,26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,122:rt,123:it,124:at,125:ot,126:st,127:ct}),t(ft,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:$,21:q,23:H},t(z,[2,42]),{22:Ut,66:zt,67:$t,86:qt,102:Ht,105:Wt,107:283,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},t(te,[2,128]),{26:V,52:G,66:X,67:Z,91:Q,97:284,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},{26:V,52:G,66:X,67:Z,91:Q,97:285,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(ft,[2,108]),t(ft,[2,114]),t(lt,[2,60]),{22:yt,24:mt,26:vt,38:bt,39:286,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(lt,[2,68]),t(It,o,{17:287}),t(Jt,[2,126],{108:274,22:Ut,66:zt,67:$t,86:qt,102:Ht,105:Wt,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt}),t(ft,[2,121],{115:100,117:178,22:[1,288],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,122:rt,123:it,124:at,125:ot,126:st,127:ct}),t(ft,[2,122],{115:100,117:178,22:[1,289],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,122:rt,123:it,124:at,125:ot,126:st,127:ct}),{22:yt,24:mt,26:vt,38:bt,41:[1,290],42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,291],43:31,44:f,46:d,48:p,50:35,51:45,52:g,54:46,66:y,67:m,86:v,87:b,88:_,89:x,90:w,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,118:N,119:D,120:B,121:L,122:O,123:I,124:R,125:F,126:P,127:Y},{22:Ut,66:zt,67:$t,86:qt,96:292,102:Ht,105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Ut,66:zt,67:$t,86:qt,96:293,102:Ht,105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},t(lt,[2,64]),t(z,[2,41]),t(ft,[2,119],{106:Kt}),t(ft,[2,120],{106:Kt})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},ne={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:case 6:break;case 7:return this.begin("acc_title"),44;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),46;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:case 15:case 24:case 27:case 30:case 33:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 16:return"STR";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin("href");break;case 25:return 100;case 26:this.begin("callbackname");break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 31:return 99;case 32:this.begin("click");break;case 34:return 90;case 35:case 36:return t.lex.firstGraph()&&this.begin("dir"),24;case 37:return 38;case 38:return 42;case 39:case 40:case 41:case 42:return 101;case 43:return this.popState(),25;case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:return this.popState(),26;case 54:return 118;case 55:return 119;case 56:return 120;case 57:return 121;case 58:return 105;case 59:return 111;case 60:return 53;case 61:return 67;case 62:return 52;case 63:return 20;case 64:return 106;case 65:return 126;case 66:case 67:case 68:return 82;case 69:case 70:case 71:return 81;case 72:return 59;case 73:return 60;case 74:return 61;case 75:return 62;case 76:return 63;case 77:return 64;case 78:return 65;case 79:return 69;case 80:return 70;case 81:return 55;case 82:return 56;case 83:return 109;case 84:return 112;case 85:return 127;case 86:return 124;case 87:return 113;case 88:case 89:return 125;case 90:return 114;case 91:return 73;case 92:return 92;case 93:return"SEP";case 94:return 91;case 95:return 66;case 96:return 75;case 97:return 74;case 98:return 77;case 99:return 76;case 100:return 122;case 101:return 123;case 102:return 68;case 103:return 57;case 104:return 58;case 105:return 40;case 106:return 41;case 107:return 71;case 108:return 72;case 109:return 133;case 110:return 21;case 111:return 22;case 112:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\])/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[30,31],inclusive:!1},callbackname:{rules:[27,28,29],inclusive:!1},href:{rules:[24,25],inclusive:!1},click:{rules:[33,34],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[43,44,45,46,47,48,49,50,51,52,53],inclusive:!1},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,5,6,7,9,11,14,17,18,19,20,21,22,23,26,32,35,36,37,38,39,40,41,42,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112],inclusive:!0}}};function re(){this.yy={}}return ee.lexer=ne,re.prototype=ee,ee.Parser=re,new re}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(5354).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},9959:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,5],r=[7,9,11,12,13,14,15,16,17,18,19,20,22,24,25,27,34,39],i=[1,15],a=[1,16],o=[1,17],s=[1,18],c=[1,19],u=[1,20],l=[1,21],h=[1,22],f=[1,23],d=[1,24],p=[1,25],g=[1,26],y=[1,28],m=[1,30],v=[1,33],b=[5,7,9,11,12,13,14,15,16,17,18,19,20,22,24,25,27,34,39],_={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,excludes:16,includes:17,todayMarker:18,title:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,clickStatement:26,taskTxt:27,taskData:28,openDirective:29,typeDirective:30,closeDirective:31,":":32,argDirective:33,click:34,callbackname:35,callbackargs:36,href:37,clickStatementDebug:38,open_directive:39,type_directive:40,arg_directive:41,close_directive:42,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"excludes",17:"includes",18:"todayMarker",19:"title",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"taskTxt",28:"taskData",32:":",34:"click",35:"callbackname",36:"callbackargs",37:"href",39:"open_directive",40:"type_directive",41:"arg_directive",42:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[26,2],[26,3],[26,3],[26,4],[26,3],[26,4],[26,2],[38,2],[38,3],[38,3],[38,4],[38,3],[38,4],[38,2],[29,1],[30,1],[33,1],[31,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 2:return a[s-1];case 3:case 7:case 8:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 9:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 10:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 11:r.TopAxis(),this.$=a[s].substr(8);break;case 12:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 13:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 14:r.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 15:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 16:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 17:this.$=a[s].trim(),r.setTitle(this.$);break;case 18:case 19:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 20:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 22:r.addTask(a[s-1],a[s]),this.$="task";break;case 26:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 27:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 28:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 29:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 30:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 31:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 32:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 33:case 39:this.$=a[s-1]+" "+a[s];break;case 34:case 35:case 37:this.$=a[s-2]+" "+a[s-1]+" "+a[s];break;case 36:case 38:this.$=a[s-3]+" "+a[s-2]+" "+a[s-1]+" "+a[s];break;case 40:r.parseDirective("%%{","open_directive");break;case 41:r.parseDirective(a[s],"type_directive");break;case 42:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 43:r.parseDirective("}%%","close_directive","gantt")}},table:[{3:1,4:2,5:e,29:4,39:n},{1:[3]},{3:6,4:2,5:e,29:4,39:n},t(r,[2,3],{6:7}),{30:8,40:[1,9]},{40:[2,40]},{1:[2,1]},{4:29,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:i,13:a,14:o,15:s,16:c,17:u,18:l,19:h,20:f,22:d,24:p,25:g,26:27,27:y,29:4,34:m,39:n},{31:31,32:[1,32],42:v},t([32,42],[2,41]),t(r,[2,8],{1:[2,2]}),t(r,[2,4]),{4:29,10:34,12:i,13:a,14:o,15:s,16:c,17:u,18:l,19:h,20:f,22:d,24:p,25:g,26:27,27:y,29:4,34:m,39:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),{21:[1,35]},{23:[1,36]},t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),{28:[1,37]},t(r,[2,23]),{35:[1,38],37:[1,39]},{11:[1,40]},{33:41,41:[1,42]},{11:[2,43]},t(r,[2,5]),t(r,[2,17]),t(r,[2,18]),t(r,[2,22]),t(r,[2,26],{36:[1,43],37:[1,44]}),t(r,[2,32],{35:[1,45]}),t(b,[2,24]),{31:46,42:v},{42:[2,42]},t(r,[2,27],{37:[1,47]}),t(r,[2,28]),t(r,[2,30],{36:[1,48]}),{11:[1,49]},t(r,[2,29]),t(r,[2,31]),t(b,[2,25])],defaultActions:{5:[2,40],6:[2,1],33:[2,43],42:[2,42]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},x={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),39;case 1:return this.begin("type_directive"),40;case 2:return this.popState(),this.begin("arg_directive"),32;case 3:return this.popState(),this.popState(),42;case 4:return 41;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:case 20:case 23:case 26:case 29:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:case 13:case 14:case 16:case 17:case 18:break;case 15:return 11;case 19:this.begin("href");break;case 21:return 37;case 22:this.begin("callbackname");break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 35;case 27:return 36;case 28:this.begin("click");break;case 30:return 34;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 17;case 37:return 16;case 38:return 18;case 39:return"date";case 40:return 19;case 41:return"accDescription";case 42:return 25;case 43:return 27;case 44:return 28;case 45:return 32;case 46:return 7;case 47:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],inclusive:!0}}};function w(){this.yy={}}return _.lexer=x,w.prototype=_,_.Parser=w,new w}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(6878).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},2553:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,4],n=[1,7],r=[1,5],i=[1,9],a=[1,6],o=[2,6],s=[1,16],c=[6,8,14,19,21,23,24,26,28,31,34,47,51],u=[8,14,19,21,23,24,26,28,31,34],l=[8,13,14,19,21,23,24,26,28,31,34],h=[1,26],f=[6,8,14,47,51],d=[8,14,51],p=[1,61],g=[1,62],y=[1,63],m=[8,14,32,38,39,51],v={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,section:24,branchStatement:25,CHECKOUT:26,ID:27,BRANCH:28,ORDER:29,NUM:30,MERGE:31,COMMIT_TAG:32,STR:33,COMMIT:34,commit_arg:35,COMMIT_TYPE:36,commitType:37,COMMIT_ID:38,COMMIT_MSG:39,NORMAL:40,REVERSE:41,HIGHLIGHT:42,openDirective:43,typeDirective:44,closeDirective:45,argDirective:46,open_directive:47,type_directive:48,arg_directive:49,close_directive:50,";":51,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"section",26:"CHECKOUT",27:"ID",28:"BRANCH",29:"ORDER",30:"NUM",31:"MERGE",32:"COMMIT_TAG",33:"STR",34:"COMMIT",36:"COMMIT_TYPE",38:"COMMIT_ID",39:"COMMIT_MSG",40:"NORMAL",41:"REVERSE",42:"HIGHLIGHT",47:"open_directive",48:"type_directive",49:"arg_directive",50:"close_directive",51:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[25,2],[25,4],[18,2],[18,4],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[35,0],[35,1],[37,1],[37,1],[37,1],[5,3],[5,5],[43,1],[44,1],[46,1],[45,1],[4,1],[4,1],[4,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return a[s];case 4:return a[s-1];case 5:return r.setDirection(a[s-3]),a[s-1];case 7:r.setOptions(a[s-1]),this.$=a[s];break;case 8:a[s-1]+=a[s],this.$=a[s-1];break;case 10:this.$=[];break;case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 12:this.$=a[s-1];break;case 16:this.$=a[s].trim(),r.setTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 19:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 21:r.checkout(a[s]);break;case 22:r.branch(a[s]);break;case 23:r.branch(a[s-2],a[s]);break;case 24:r.merge(a[s]);break;case 25:r.merge(a[s-2],a[s]);break;case 26:r.commit(a[s]);break;case 27:r.commit("","",r.commitType.NORMAL,a[s]);break;case 28:r.commit("","",a[s],"");break;case 29:r.commit("","",a[s],a[s-2]);break;case 30:r.commit("","",a[s-2],a[s]);break;case 31:r.commit("",a[s],r.commitType.NORMAL,"");break;case 32:r.commit("",a[s-2],r.commitType.NORMAL,a[s]);break;case 33:r.commit("",a[s],r.commitType.NORMAL,a[s-2]);break;case 34:r.commit("",a[s-2],a[s],"");break;case 35:r.commit("",a[s],a[s-2],"");break;case 36:r.commit("",a[s-4],a[s-2],a[s]);break;case 37:r.commit("",a[s-4],a[s],a[s-2]);break;case 38:r.commit("",a[s-2],a[s-4],a[s]);break;case 39:r.commit("",a[s],a[s-4],a[s-2]);break;case 40:r.commit("",a[s],a[s-2],a[s-4]);break;case 41:r.commit("",a[s-2],a[s],a[s-4]);break;case 42:r.commit(a[s],"",r.commitType.NORMAL,"");break;case 43:r.commit(a[s],"",r.commitType.NORMAL,a[s-2]);break;case 44:r.commit(a[s-2],"",r.commitType.NORMAL,a[s]);break;case 45:r.commit(a[s-2],"",a[s],"");break;case 46:r.commit(a[s],"",a[s-2],"");break;case 47:r.commit(a[s],a[s-2],r.commitType.NORMAL,"");break;case 48:r.commit(a[s-2],a[s],r.commitType.NORMAL,"");break;case 49:r.commit(a[s-4],"",a[s-2],a[s]);break;case 50:r.commit(a[s-4],"",a[s],a[s-2]);break;case 51:r.commit(a[s-2],"",a[s-4],a[s]);break;case 52:r.commit(a[s],"",a[s-4],a[s-2]);break;case 53:r.commit(a[s],"",a[s-2],a[s-4]);break;case 54:r.commit(a[s-2],"",a[s],a[s-4]);break;case 55:r.commit(a[s-4],a[s],a[s-2],"");break;case 56:r.commit(a[s-4],a[s-2],a[s],"");break;case 57:r.commit(a[s-2],a[s],a[s-4],"");break;case 58:r.commit(a[s],a[s-2],a[s-4],"");break;case 59:r.commit(a[s],a[s-4],a[s-2],"");break;case 60:r.commit(a[s-2],a[s-4],a[s],"");break;case 61:r.commit(a[s-4],a[s],r.commitType.NORMAL,a[s-2]);break;case 62:r.commit(a[s-4],a[s-2],r.commitType.NORMAL,a[s]);break;case 63:r.commit(a[s-2],a[s],r.commitType.NORMAL,a[s-4]);break;case 64:r.commit(a[s],a[s-2],r.commitType.NORMAL,a[s-4]);break;case 65:r.commit(a[s],a[s-4],r.commitType.NORMAL,a[s-2]);break;case 66:r.commit(a[s-2],a[s-4],r.commitType.NORMAL,a[s]);break;case 67:r.commit(a[s-6],a[s-4],a[s-2],a[s]);break;case 68:r.commit(a[s-6],a[s-4],a[s],a[s-2]);break;case 69:r.commit(a[s-6],a[s-2],a[s-4],a[s]);break;case 70:r.commit(a[s-6],a[s],a[s-4],a[s-2]);break;case 71:r.commit(a[s-6],a[s-2],a[s],a[s-4]);break;case 72:r.commit(a[s-6],a[s],a[s-2],a[s-4]);break;case 73:r.commit(a[s-4],a[s-6],a[s-2],a[s]);break;case 74:r.commit(a[s-4],a[s-6],a[s],a[s-2]);break;case 75:r.commit(a[s-2],a[s-6],a[s-4],a[s]);break;case 76:r.commit(a[s],a[s-6],a[s-4],a[s-2]);break;case 77:r.commit(a[s-2],a[s-6],a[s],a[s-4]);break;case 78:r.commit(a[s],a[s-6],a[s-2],a[s-4]);break;case 79:r.commit(a[s],a[s-4],a[s-2],a[s-6]);break;case 80:r.commit(a[s-2],a[s-4],a[s],a[s-6]);break;case 81:r.commit(a[s],a[s-2],a[s-4],a[s-6]);break;case 82:r.commit(a[s-2],a[s],a[s-4],a[s-6]);break;case 83:r.commit(a[s-4],a[s-2],a[s],a[s-6]);break;case 84:r.commit(a[s-4],a[s],a[s-2],a[s-6]);break;case 85:r.commit(a[s-2],a[s-4],a[s-6],a[s]);break;case 86:r.commit(a[s],a[s-4],a[s-6],a[s-2]);break;case 87:r.commit(a[s-2],a[s],a[s-6],a[s-4]);break;case 88:r.commit(a[s],a[s-2],a[s-6],a[s-4]);break;case 89:r.commit(a[s-4],a[s-2],a[s-6],a[s]);break;case 90:r.commit(a[s-4],a[s],a[s-6],a[s-2]);break;case 91:this.$="";break;case 92:this.$=a[s];break;case 93:this.$=r.commitType.NORMAL;break;case 94:this.$=r.commitType.REVERSE;break;case 95:this.$=r.commitType.HIGHLIGHT;break;case 98:r.parseDirective("%%{","open_directive");break;case 99:r.parseDirective(a[s],"type_directive");break;case 100:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 101:r.parseDirective("}%%","close_directive","gitGraph")}},table:[{3:1,4:2,5:3,6:e,8:n,14:r,43:8,47:i,51:a},{1:[3]},{3:10,4:2,5:3,6:e,8:n,14:r,43:8,47:i,51:a},{3:11,4:2,5:3,6:e,8:n,14:r,43:8,47:i,51:a},{7:12,8:o,9:[1,13],10:[1,14],11:15,14:s},t(c,[2,102]),t(c,[2,103]),t(c,[2,104]),{44:17,48:[1,18]},{48:[2,98]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:o,11:15,14:s},{9:[1,21]},t(u,[2,10],{12:22,13:[1,23]}),t(l,[2,9]),{9:[1,25],45:24,50:h},t([9,50],[2,99]),{1:[2,3]},{8:[1,27]},{7:28,8:o,11:15,14:s},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:[1,34],21:[1,35],23:[1,36],24:[1,37],25:38,26:[1,39],28:[1,42],31:[1,41],34:[1,40]},t(l,[2,8]),t(f,[2,96]),{46:43,49:[1,44]},t(f,[2,101]),{1:[2,4]},{8:[1,45]},t(u,[2,11]),{4:46,8:n,14:r,51:a},t(u,[2,13]),t(d,[2,14]),t(d,[2,15]),{20:[1,47]},{22:[1,48]},t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),{27:[1,49]},t(d,[2,91],{35:50,32:[1,51],33:[1,55],36:[1,52],38:[1,53],39:[1,54]}),{27:[1,56]},{27:[1,57]},{45:58,50:h},{50:[2,100]},{1:[2,5]},t(u,[2,12]),t(d,[2,16]),t(d,[2,17]),t(d,[2,21]),t(d,[2,26]),{33:[1,59]},{37:60,40:p,41:g,42:y},{33:[1,64]},{33:[1,65]},t(d,[2,92]),t(d,[2,24],{32:[1,66]}),t(d,[2,22],{29:[1,67]}),t(f,[2,97]),t(d,[2,27],{36:[1,68],38:[1,69],39:[1,70]}),t(d,[2,28],{32:[1,71],38:[1,72],39:[1,73]}),t(m,[2,93]),t(m,[2,94]),t(m,[2,95]),t(d,[2,31],{32:[1,74],36:[1,75],39:[1,76]}),t(d,[2,42],{32:[1,77],36:[1,78],38:[1,79]}),{33:[1,80]},{30:[1,81]},{37:82,40:p,41:g,42:y},{33:[1,83]},{33:[1,84]},{33:[1,85]},{33:[1,86]},{33:[1,87]},{33:[1,88]},{37:89,40:p,41:g,42:y},{33:[1,90]},{33:[1,91]},{37:92,40:p,41:g,42:y},{33:[1,93]},t(d,[2,25]),t(d,[2,23]),t(d,[2,29],{38:[1,94],39:[1,95]}),t(d,[2,33],{36:[1,96],39:[1,97]}),t(d,[2,43],{36:[1,98],38:[1,99]}),t(d,[2,30],{38:[1,100],39:[1,101]}),t(d,[2,35],{32:[1,102],39:[1,103]}),t(d,[2,46],{32:[1,104],38:[1,105]}),t(d,[2,32],{36:[1,106],39:[1,107]}),t(d,[2,34],{32:[1,108],39:[1,109]}),t(d,[2,47],{32:[1,111],36:[1,110]}),t(d,[2,44],{36:[1,112],38:[1,113]}),t(d,[2,45],{32:[1,114],38:[1,115]}),t(d,[2,48],{32:[1,117],36:[1,116]}),{33:[1,118]},{33:[1,119]},{37:120,40:p,41:g,42:y},{33:[1,121]},{37:122,40:p,41:g,42:y},{33:[1,123]},{33:[1,124]},{33:[1,125]},{33:[1,126]},{33:[1,127]},{33:[1,128]},{33:[1,129]},{37:130,40:p,41:g,42:y},{33:[1,131]},{33:[1,132]},{33:[1,133]},{37:134,40:p,41:g,42:y},{33:[1,135]},{37:136,40:p,41:g,42:y},{33:[1,137]},{33:[1,138]},{33:[1,139]},{37:140,40:p,41:g,42:y},{33:[1,141]},t(d,[2,40],{39:[1,142]}),t(d,[2,53],{38:[1,143]}),t(d,[2,41],{39:[1,144]}),t(d,[2,64],{36:[1,145]}),t(d,[2,54],{38:[1,146]}),t(d,[2,63],{36:[1,147]}),t(d,[2,39],{39:[1,148]}),t(d,[2,52],{38:[1,149]}),t(d,[2,38],{39:[1,150]}),t(d,[2,58],{32:[1,151]}),t(d,[2,51],{38:[1,152]}),t(d,[2,57],{32:[1,153]}),t(d,[2,37],{39:[1,154]}),t(d,[2,65],{36:[1,155]}),t(d,[2,36],{39:[1,156]}),t(d,[2,59],{32:[1,157]}),t(d,[2,60],{32:[1,158]}),t(d,[2,66],{36:[1,159]}),t(d,[2,50],{38:[1,160]}),t(d,[2,61],{36:[1,161]}),t(d,[2,49],{38:[1,162]}),t(d,[2,55],{32:[1,163]}),t(d,[2,56],{32:[1,164]}),t(d,[2,62],{36:[1,165]}),{33:[1,166]},{33:[1,167]},{33:[1,168]},{37:169,40:p,41:g,42:y},{33:[1,170]},{37:171,40:p,41:g,42:y},{33:[1,172]},{33:[1,173]},{33:[1,174]},{33:[1,175]},{33:[1,176]},{33:[1,177]},{33:[1,178]},{37:179,40:p,41:g,42:y},{33:[1,180]},{33:[1,181]},{33:[1,182]},{37:183,40:p,41:g,42:y},{33:[1,184]},{37:185,40:p,41:g,42:y},{33:[1,186]},{33:[1,187]},{33:[1,188]},{37:189,40:p,41:g,42:y},t(d,[2,81]),t(d,[2,82]),t(d,[2,79]),t(d,[2,80]),t(d,[2,84]),t(d,[2,83]),t(d,[2,88]),t(d,[2,87]),t(d,[2,86]),t(d,[2,85]),t(d,[2,90]),t(d,[2,89]),t(d,[2,78]),t(d,[2,77]),t(d,[2,76]),t(d,[2,75]),t(d,[2,73]),t(d,[2,74]),t(d,[2,72]),t(d,[2,71]),t(d,[2,70]),t(d,[2,69]),t(d,[2,67]),t(d,[2,68])],defaultActions:{9:[2,98],10:[2,1],11:[2,2],19:[2,3],27:[2,4],44:[2,100],45:[2,5]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},b={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),47;case 1:return this.begin("type_directive"),48;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),50;case 4:return 49;case 5:return this.begin("acc_title"),19;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),21;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:case 34:case 37:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:case 14:case 15:break;case 16:return 6;case 17:return 34;case 18:return 38;case 19:return 36;case 20:return 39;case 21:return 40;case 22:return 41;case 23:return 42;case 24:return 32;case 25:return 28;case 26:return 29;case 27:return 31;case 28:return 26;case 29:case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 35:return 13;case 36:this.begin("string");break;case 38:return 33;case 39:return 30;case 40:return 27;case 41:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch\b)/i,/^(?:order:)/i,/^(?:merge\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+)/i,/^(?:[a-zA-Z][-_\./a-zA-Z0-9]*[-_a-zA-Z0-9])/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[34,35],inclusive:!1},string:{rules:[37,38],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,39,40,41],inclusive:!0}}};function _(){this.yy={}}return v.lexer=b,_.prototype=v,v.Parser=_,new _}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8183).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},6765:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,9,10],n={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,r,i,a,o){switch(a.length,i){case 1:return r;case 4:break;case 6:r.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function i(){this.yy={}}return n.lexer=r,i.prototype=n,n.Parser=i,new i}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(1428).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},7062:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,4],n=[1,5],r=[1,6],i=[1,7],a=[1,9],o=[1,11,13,15,17,19,20,26,27,28,29],s=[2,5],c=[1,6,11,13,15,17,19,20,26,27,28,29],u=[26,27,28],l=[2,8],h=[1,18],f=[1,19],d=[1,20],p=[1,21],g=[1,22],y=[1,23],m=[1,28],v=[6,26,27,28,29],b={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.setShowData(!0);break;case 7:this.$=a[s-1];break;case 9:r.addSection(a[s-1],r.cleanupValue(a[s]));break;case 10:this.$=a[s].trim(),r.setPieTitle(this.$);break;case 11:this.$=a[s].trim(),r.setTitle(this.$);break;case 12:case 13:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 14:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 21:r.parseDirective("%%{","open_directive");break;case 22:r.parseDirective(a[s],"type_directive");break;case 23:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 24:r.parseDirective("}%%","close_directive","pie")}},table:[{3:1,4:2,5:3,6:e,21:8,26:n,27:r,28:i,29:a},{1:[3]},{3:10,4:2,5:3,6:e,21:8,26:n,27:r,28:i,29:a},{3:11,4:2,5:3,6:e,21:8,26:n,27:r,28:i,29:a},t(o,s,{7:12,8:[1,13]}),t(c,[2,18]),t(c,[2,19]),t(c,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},t(u,l,{21:8,9:16,10:17,5:24,1:[2,3],11:h,13:f,15:d,17:p,19:g,20:y,29:a}),t(o,s,{7:25}),{23:26,24:[1,27],32:m},t([24,32],[2,22]),t(o,[2,6]),{4:29,26:n,27:r,28:i},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},t(u,[2,13]),t(u,[2,14]),t(u,[2,15]),t(u,l,{21:8,9:16,10:17,5:24,1:[2,4],11:h,13:f,15:d,17:p,19:g,20:y,29:a}),t(v,[2,16]),{25:34,31:[1,35]},t(v,[2,24]),t(o,[2,7]),t(u,[2,9]),t(u,[2,10]),t(u,[2,11]),t(u,[2,12]),{23:36,32:m},{32:[2,23]},t(v,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},_={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:case 6:case 8:case 9:break;case 7:return 26;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:case 20:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}};function x(){this.yy={}}return b.lexer=_,x.prototype=b,b.Parser=x,new x}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(4551).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},3176:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,5],r=[1,6],i=[1,7],a=[1,8],o=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],s=[1,22],c=[2,13],u=[1,26],l=[1,27],h=[1,28],f=[1,29],d=[1,30],p=[1,31],g=[1,24],y=[1,32],m=[1,33],v=[1,36],b=[71,72],_=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],x=[1,56],w=[1,57],k=[1,58],T=[1,59],C=[1,60],E=[1,61],S=[1,62],A=[62,63],M=[1,74],N=[1,70],D=[1,71],B=[1,72],L=[1,73],O=[1,75],I=[1,79],R=[1,80],F=[1,77],P=[1,78],Y=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],j={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",39:"STRUCT_STOP",40:"REQUIREMENT",41:"FUNCTIONAL_REQUIREMENT",42:"INTERFACE_REQUIREMENT",43:"PERFORMANCE_REQUIREMENT",44:"PHYSICAL_REQUIREMENT",45:"DESIGN_CONSTRAINT",46:"LOW_RISK",47:"MED_RISK",48:"HIGH_RISK",49:"VERIFY_ANALYSIS",50:"VERIFY_DEMONSTRATION",51:"VERIFY_INSPECTION",52:"VERIFY_TEST",53:"ELEMENT",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:this.$=a[s].trim(),r.setTitle(this.$);break;case 7:case 8:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 9:r.parseDirective("%%{","open_directive");break;case 10:r.parseDirective(a[s],"type_directive");break;case 11:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 12:r.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:r.addRequirement(a[s-3],a[s-4]);break;case 20:r.setNewReqId(a[s-2]);break;case 21:r.setNewReqText(a[s-2]);break;case 22:r.setNewReqRisk(a[s-2]);break;case 23:r.setNewReqVerifyMethod(a[s-2]);break;case 26:this.$=r.RequirementType.REQUIREMENT;break;case 27:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=r.RiskLevel.LOW_RISK;break;case 33:this.$=r.RiskLevel.MED_RISK;break;case 34:this.$=r.RiskLevel.HIGH_RISK;break;case 35:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=r.VerifyType.VERIFY_TEST;break;case 39:r.addElement(a[s-3]);break;case 40:r.setNewElementType(a[s-2]);break;case 41:r.setNewElementDocRef(a[s-2]);break;case 44:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 45:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 46:this.$=r.Relationships.CONTAINS;break;case 47:this.$=r.Relationships.COPIES;break;case 48:this.$=r.Relationships.DERIVES;break;case 49:this.$=r.Relationships.SATISFIES;break;case 50:this.$=r.Relationships.VERIFIES;break;case 51:this.$=r.Relationships.REFINES;break;case 52:this.$=r.Relationships.TRACES}},table:[{3:1,4:2,6:e,9:4,14:n,16:r,18:i,19:a},{1:[3]},{3:10,4:2,5:[1,9],6:e,9:4,14:n,16:r,18:i,19:a},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},t(o,[2,8]),{20:[2,9]},{3:16,4:2,6:e,9:4,14:n,16:r,18:i,19:a},{1:[2,2]},{4:21,5:s,7:17,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:l,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{11:34,12:[1,35],22:v},t([12,22],[2,10]),t(o,[2,6]),t(o,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:s,7:38,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:l,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{4:21,5:s,7:39,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:l,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{4:21,5:s,7:40,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:l,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{4:21,5:s,7:41,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:l,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{4:21,5:s,7:42,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:l,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},t(b,[2,26]),t(b,[2,27]),t(b,[2,28]),t(b,[2,29]),t(b,[2,30]),t(b,[2,31]),t(_,[2,55]),t(_,[2,56]),t(o,[2,4]),{13:51,21:[1,52]},t(o,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:x,65:w,66:k,67:T,68:C,69:E,70:S},{61:63,64:x,65:w,66:k,67:T,68:C,69:E,70:S},{11:64,22:v},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},t(A,[2,46]),t(A,[2,47]),t(A,[2,48]),t(A,[2,49]),t(A,[2,50]),t(A,[2,51]),t(A,[2,52]),{63:[1,68]},t(o,[2,5]),{5:M,29:69,30:N,33:D,35:B,37:L,39:O},{5:I,39:R,55:76,56:F,58:P},{32:81,71:y,72:m},{32:82,71:y,72:m},t(Y,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:M,29:87,30:N,33:D,35:B,37:L,39:O},t(Y,[2,25]),t(Y,[2,39]),{31:[1,88]},{31:[1,89]},{5:I,39:R,55:90,56:F,58:P},t(Y,[2,43]),t(Y,[2,44]),t(Y,[2,45]),{32:91,71:y,72:m},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},t(Y,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},t(Y,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:M,29:116,30:N,33:D,35:B,37:L,39:O},{5:M,29:117,30:N,33:D,35:B,37:L,39:O},{5:M,29:118,30:N,33:D,35:B,37:L,39:O},{5:M,29:119,30:N,33:D,35:B,37:L,39:O},{5:I,39:R,55:120,56:F,58:P},{5:I,39:R,55:121,56:F,58:P},t(Y,[2,20]),t(Y,[2,21]),t(Y,[2,22]),t(Y,[2,23]),t(Y,[2,40]),t(Y,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},U={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 53:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:case 15:case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 54:return"qString";case 55:return e.yytext=e.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55],inclusive:!0}}};function z(){this.yy={}}return j.lexer=U,z.prototype=j,j.Parser=z,new z}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8800).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},6876:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,18],u=[1,19],l=[1,21],h=[1,22],f=[1,23],d=[1,29],p=[1,30],g=[1,31],y=[1,32],m=[1,33],v=[1,34],b=[1,35],_=[1,36],x=[1,37],w=[1,38],k=[1,41],T=[1,42],C=[1,43],E=[1,44],S=[1,45],A=[1,46],M=[1,49],N=[1,4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,48,49,54,55,56,57,65,75],D=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,49,54,55,56,57,65,75],B=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,48,49,54,55,56,57,65,75],L=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,54,55,56,57,65,75],O=[63,64,65],I=[1,114],R=[1,4,5,7,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,48,49,54,55,56,57,65,75],F={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,":":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,participant_actor:20,signal:21,autonumber:22,NUM:23,off:24,activate:25,deactivate:26,note_statement:27,links_statement:28,link_statement:29,properties_statement:30,details_statement:31,title:32,legacy_title:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,loop:39,end:40,rect:41,opt:42,alt:43,else_sections:44,par:45,par_sections:46,and:47,else:48,note:49,placement:50,text2:51,over:52,actor_pair:53,links:54,link:55,properties:56,details:57,spaceList:58,",":59,left_of:60,right_of:61,signaltype:62,"+":63,"-":64,ACTOR:65,SOLID_OPEN_ARROW:66,DOTTED_OPEN_ARROW:67,SOLID_ARROW:68,DOTTED_ARROW:69,SOLID_CROSS:70,DOTTED_CROSS:71,SOLID_POINT:72,DOTTED_POINT:73,TXT:74,open_directive:75,type_directive:76,arg_directive:77,close_directive:78,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",20:"participant_actor",22:"autonumber",23:"NUM",24:"off",25:"activate",26:"deactivate",32:"title",33:"legacy_title",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",39:"loop",40:"end",41:"rect",42:"opt",43:"alt",45:"par",47:"and",48:"else",49:"note",52:"over",54:"links",55:"link",56:"properties",57:"details",59:",",60:"left_of",61:"right_of",63:"+",64:"-",65:"ACTOR",66:"SOLID_OPEN_ARROW",67:"DOTTED_OPEN_ARROW",68:"SOLID_ARROW",69:"DOTTED_ARROW",70:"SOLID_CROSS",71:"DOTTED_CROSS",72:"SOLID_POINT",73:"DOTTED_POINT",74:"TXT",75:"open_directive",76:"type_directive",77:"arg_directive",78:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,5],[10,3],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[46,1],[46,4],[44,1],[44,4],[27,4],[27,4],[28,3],[29,3],[30,3],[31,3],[58,2],[58,1],[53,3],[53,1],[50,1],[50,1],[21,5],[21,5],[21,4],[17,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[51,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.apply(a[s]),a[s];case 5:case 9:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:case 52:this.$=a[s];break;case 12:a[s-3].type="addParticipant",a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 13:a[s-1].type="addParticipant",this.$=a[s-1];break;case 14:a[s-3].type="addActor",a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 15:a[s-1].type="addActor",this.$=a[s-1];break;case 17:this.$={type:"sequenceIndex",sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]};break;case 22:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1]};break;case 28:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 29:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 30:this.$=a[s].trim(),r.setTitle(this.$);break;case 31:case 32:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 33:a[s-1].unshift({type:"loopStart",loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:"loopEnd",loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 34:a[s-1].unshift({type:"rectStart",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:"rectEnd",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 35:a[s-1].unshift({type:"optStart",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:"optEnd",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:"altStart",altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:"parStart",parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:this.$=a[s-3].concat([{type:"and",parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 42:this.$=a[s-3].concat([{type:"else",altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 43:this.$=[a[s-1],{type:"addNote",placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 44:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 45:this.$=[a[s-1],{type:"addLinks",actor:a[s-1].actor,text:a[s]}];break;case 46:this.$=[a[s-1],{type:"addALink",actor:a[s-1].actor,text:a[s]}];break;case 47:this.$=[a[s-1],{type:"addProperties",actor:a[s-1].actor,text:a[s]}];break;case 48:this.$=[a[s-1],{type:"addDetails",actor:a[s-1].actor,text:a[s]}];break;case 51:this.$=[a[s-2],a[s]];break;case 53:this.$=r.PLACEMENT.LEFTOF;break;case 54:this.$=r.PLACEMENT.RIGHTOF;break;case 55:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]}];break;case 56:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4]}];break;case 57:this.$=[a[s-3],a[s-1],{type:"addMessage",from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 58:this.$={type:"addParticipant",actor:a[s]};break;case 59:this.$=r.LINETYPE.SOLID_OPEN;break;case 60:this.$=r.LINETYPE.DOTTED_OPEN;break;case 61:this.$=r.LINETYPE.SOLID;break;case 62:this.$=r.LINETYPE.DOTTED;break;case 63:this.$=r.LINETYPE.SOLID_CROSS;break;case 64:this.$=r.LINETYPE.DOTTED_CROSS;break;case 65:this.$=r.LINETYPE.SOLID_POINT;break;case 66:this.$=r.LINETYPE.DOTTED_POINT;break;case 67:this.$=r.parseMessage(a[s].trim().substring(1));break;case 68:r.parseDirective("%%{","open_directive");break;case 69:r.parseDirective(a[s],"type_directive");break;case 70:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 71:r.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:e,5:n,6:4,7:r,11:6,75:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,11:6,75:i},{3:9,4:e,5:n,6:4,7:r,11:6,75:i},{3:10,4:e,5:n,6:4,7:r,11:6,75:i},t([1,4,5,16,20,22,25,26,32,33,34,36,38,39,41,42,43,45,49,54,55,56,57,65,75],a,{8:11}),{12:12,76:[1,13]},{76:[2,68]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:39,9:14,10:16,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,41:b,42:_,43:x,45:w,49:k,54:T,55:C,56:E,57:S,65:A,75:i},{13:47,14:[1,48],78:M},t([14,78],[2,69]),t(N,[2,6]),{6:39,10:50,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,41:b,42:_,43:x,45:w,49:k,54:T,55:C,56:E,57:S,65:A,75:i},t(N,[2,8]),t(N,[2,9]),{17:51,65:A},{17:52,65:A},{5:[1,53]},{5:[1,56],23:[1,54],24:[1,55]},{17:57,65:A},{17:58,65:A},{5:[1,59]},{5:[1,60]},{5:[1,61]},{5:[1,62]},{5:[1,63]},t(N,[2,28]),t(N,[2,29]),{35:[1,64]},{37:[1,65]},t(N,[2,32]),{19:[1,66]},{19:[1,67]},{19:[1,68]},{19:[1,69]},{19:[1,70]},t(N,[2,38]),{62:71,66:[1,72],67:[1,73],68:[1,74],69:[1,75],70:[1,76],71:[1,77],72:[1,78],73:[1,79]},{50:80,52:[1,81],60:[1,82],61:[1,83]},{17:84,65:A},{17:85,65:A},{17:86,65:A},{17:87,65:A},t([5,18,59,66,67,68,69,70,71,72,73,74],[2,58]),{5:[1,88]},{15:89,77:[1,90]},{5:[2,71]},t(N,[2,7]),{5:[1,92],18:[1,91]},{5:[1,94],18:[1,93]},t(N,[2,16]),{5:[1,96],23:[1,95]},{5:[1,97]},t(N,[2,20]),{5:[1,98]},{5:[1,99]},t(N,[2,23]),t(N,[2,24]),t(N,[2,25]),t(N,[2,26]),t(N,[2,27]),t(N,[2,30]),t(N,[2,31]),t(D,a,{8:100}),t(D,a,{8:101}),t(D,a,{8:102}),t(B,a,{44:103,8:104}),t(L,a,{46:105,8:106}),{17:109,63:[1,107],64:[1,108],65:A},t(O,[2,59]),t(O,[2,60]),t(O,[2,61]),t(O,[2,62]),t(O,[2,63]),t(O,[2,64]),t(O,[2,65]),t(O,[2,66]),{17:110,65:A},{17:112,53:111,65:A},{65:[2,53]},{65:[2,54]},{51:113,74:I},{51:115,74:I},{51:116,74:I},{51:117,74:I},t(R,[2,10]),{13:118,78:M},{78:[2,70]},{19:[1,119]},t(N,[2,13]),{19:[1,120]},t(N,[2,15]),{5:[1,121]},t(N,[2,18]),t(N,[2,19]),t(N,[2,21]),t(N,[2,22]),{4:o,5:s,6:39,9:14,10:16,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,40:[1,122],41:b,42:_,43:x,45:w,49:k,54:T,55:C,56:E,57:S,65:A,75:i},{4:o,5:s,6:39,9:14,10:16,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,40:[1,123],41:b,42:_,43:x,45:w,49:k,54:T,55:C,56:E,57:S,65:A,75:i},{4:o,5:s,6:39,9:14,10:16,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,40:[1,124],41:b,42:_,43:x,45:w,49:k,54:T,55:C,56:E,57:S,65:A,75:i},{40:[1,125]},{4:o,5:s,6:39,9:14,10:16,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,40:[2,41],41:b,42:_,43:x,45:w,48:[1,126],49:k,54:T,55:C,56:E,57:S,65:A,75:i},{40:[1,127]},{4:o,5:s,6:39,9:14,10:16,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,40:[2,39],41:b,42:_,43:x,45:w,47:[1,128],49:k,54:T,55:C,56:E,57:S,65:A,75:i},{17:129,65:A},{17:130,65:A},{51:131,74:I},{51:132,74:I},{51:133,74:I},{59:[1,134],74:[2,52]},{5:[2,45]},{5:[2,67]},{5:[2,46]},{5:[2,47]},{5:[2,48]},{5:[1,135]},{5:[1,136]},{5:[1,137]},t(N,[2,17]),t(N,[2,33]),t(N,[2,34]),t(N,[2,35]),t(N,[2,36]),{19:[1,138]},t(N,[2,37]),{19:[1,139]},{51:140,74:I},{51:141,74:I},{5:[2,57]},{5:[2,43]},{5:[2,44]},{17:142,65:A},t(R,[2,11]),t(N,[2,12]),t(N,[2,14]),t(B,a,{8:104,44:143}),t(L,a,{8:106,46:144}),{5:[2,55]},{5:[2,56]},{74:[2,51]},{40:[2,42]},{40:[2,40]}],defaultActions:{7:[2,68],8:[2,1],9:[2,2],10:[2,3],49:[2,71],82:[2,53],83:[2,54],90:[2,70],113:[2,45],114:[2,67],115:[2,46],116:[2,47],117:[2,48],131:[2,57],132:[2,43],133:[2,44],140:[2,55],141:[2,56],142:[2,51],143:[2,42],144:[2,40]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},P={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),75;case 1:return this.begin("type_directive"),76;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),78;case 4:return 77;case 5:case 49:case 62:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return 23;case 12:return this.begin("ID"),16;case 13:return this.begin("ID"),20;case 14:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),65;case 15:return this.popState(),this.popState(),this.begin("LINE"),18;case 16:return this.popState(),this.popState(),5;case 17:return this.begin("LINE"),39;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),48;case 22:return this.begin("LINE"),45;case 23:return this.begin("LINE"),47;case 24:return this.popState(),19;case 25:return 40;case 26:return 60;case 27:return 61;case 28:return 54;case 29:return 55;case 30:return 56;case 31:return 57;case 32:return 52;case 33:return 49;case 34:return this.begin("ID"),25;case 35:return this.begin("ID"),26;case 36:return 32;case 37:return 33;case 38:return this.begin("acc_title"),34;case 39:return this.popState(),"acc_title_value";case 40:return this.begin("acc_descr"),36;case 41:return this.popState(),"acc_descr_value";case 42:this.begin("acc_descr_multiline");break;case 43:this.popState();break;case 44:return"acc_descr_multiline_value";case 45:return 7;case 46:return 22;case 47:return 24;case 48:return 59;case 50:return e.yytext=e.yytext.trim(),65;case 51:return 68;case 52:return 69;case 53:return 66;case 54:return 67;case 55:return 70;case 56:return 71;case 57:return 72;case 58:return 73;case 59:return 74;case 60:return 63;case 61:return 64;case 63:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[43,44],inclusive:!1},acc_descr:{rules:[41],inclusive:!1},acc_title:{rules:[39],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,14],inclusive:!1},ALIAS:{rules:[7,8,15,16],inclusive:!1},LINE:{rules:[7,8,24],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,17,18,19,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,40,42,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63],inclusive:!0}}};function Y(){this.yy={}}return F.lexer=P,Y.prototype=F,F.Parser=Y,new Y}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(1993).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},3584:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,19],u=[1,20],l=[1,21],h=[1,22],f=[1,33],d=[1,23],p=[1,24],g=[1,25],y=[1,26],m=[1,27],v=[1,30],b=[1,31],_=[1,32],x=[1,35],w=[1,36],k=[1,37],T=[1,38],C=[1,34],E=[1,41],S=[1,4,5,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],A=[1,4,5,12,13,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],M=[1,4,5,7,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],N=[4,5,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],D={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,idStatement:11,DESCR:12,"--\x3e":13,HIDE_EMPTY:14,scale:15,WIDTH:16,COMPOSIT_STATE:17,STRUCT_START:18,STRUCT_STOP:19,STATE_DESCR:20,AS:21,ID:22,FORK:23,JOIN:24,CHOICE:25,CONCURRENT:26,note:27,notePosition:28,NOTE_TEXT:29,direction:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,openDirective:36,typeDirective:37,closeDirective:38,":":39,argDirective:40,direction_tb:41,direction_bt:42,direction_rl:43,direction_lr:44,eol:45,";":46,EDGE_STATE:47,left_of:48,right_of:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",12:"DESCR",13:"--\x3e",14:"HIDE_EMPTY",15:"scale",16:"WIDTH",17:"COMPOSIT_STATE",18:"STRUCT_START",19:"STRUCT_STOP",20:"STATE_DESCR",21:"AS",22:"ID",23:"FORK",24:"JOIN",25:"CHOICE",26:"CONCURRENT",27:"note",29:"NOTE_TEXT",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",39:":",41:"direction_tb",42:"direction_bt",43:"direction_rl",44:"direction_lr",46:";",47:"EDGE_STATE",48:"left_of",49:"right_of",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[10,2],[10,2],[10,1],[6,3],[6,5],[30,1],[30,1],[30,1],[30,1],[45,1],[45,1],[11,1],[11,1],[28,1],[28,1],[36,1],[37,1],[40,1],[38,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.setRootDoc(a[s]),a[s];case 5:this.$=[];break;case 6:"nl"!=a[s]&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 7:case 8:case 39:case 40:this.$=a[s];break;case 9:this.$="nl";break;case 10:this.$={stmt:"state",id:a[s],type:"default",description:""};break;case 11:this.$={stmt:"state",id:a[s-1],type:"default",description:r.trimColon(a[s])};break;case 12:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-2],type:"default",description:""},state2:{stmt:"state",id:a[s],type:"default",description:""}};break;case 13:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-3],type:"default",description:""},state2:{stmt:"state",id:a[s-1],type:"default",description:""},description:a[s].substr(1).trim()};break;case 17:this.$={stmt:"state",id:a[s-3],type:"default",description:"",doc:a[s-1]};break;case 18:var c=a[s],u=a[s-2].trim();if(a[s].match(":")){var l=a[s].split(":");c=l[0],u=[u,l[1]]}this.$={stmt:"state",id:c,type:"default",description:u};break;case 19:this.$={stmt:"state",id:a[s-3],type:"default",description:a[s-5],doc:a[s-1]};break;case 20:this.$={stmt:"state",id:a[s],type:"fork"};break;case 21:this.$={stmt:"state",id:a[s],type:"join"};break;case 22:this.$={stmt:"state",id:a[s],type:"choice"};break;case 23:this.$={stmt:"state",id:r.getDividerId(),type:"divider"};break;case 24:this.$={stmt:"state",id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 28:this.$=a[s].trim(),r.setTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 33:r.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 34:r.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 35:r.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 36:r.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 43:r.parseDirective("%%{","open_directive");break;case 44:r.parseDirective(a[s],"type_directive");break;case 45:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 46:r.parseDirective("}%%","close_directive","state")}},table:[{3:1,4:e,5:n,6:4,7:r,36:6,50:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,36:6,50:i},{3:9,4:e,5:n,6:4,7:r,36:6,50:i},{3:10,4:e,5:n,6:4,7:r,36:6,50:i},t([1,4,5,14,15,17,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],a,{8:11}),{37:12,51:[1,13]},{51:[2,43]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:u,17:l,20:h,22:f,23:d,24:p,25:g,26:y,27:m,30:29,31:v,33:b,35:_,36:6,41:x,42:w,43:k,44:T,47:C,50:i},{38:39,39:[1,40],53:E},t([39,53],[2,44]),t(S,[2,6]),{6:28,10:42,11:18,14:c,15:u,17:l,20:h,22:f,23:d,24:p,25:g,26:y,27:m,30:29,31:v,33:b,35:_,36:6,41:x,42:w,43:k,44:T,47:C,50:i},t(S,[2,8]),t(S,[2,9]),t(S,[2,10],{12:[1,43],13:[1,44]}),t(S,[2,14]),{16:[1,45]},t(S,[2,16],{18:[1,46]}),{21:[1,47]},t(S,[2,20]),t(S,[2,21]),t(S,[2,22]),t(S,[2,23]),{28:48,29:[1,49],48:[1,50],49:[1,51]},t(S,[2,26]),t(S,[2,27]),{32:[1,52]},{34:[1,53]},t(S,[2,30]),t(A,[2,39]),t(A,[2,40]),t(S,[2,33]),t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(M,[2,31]),{40:54,52:[1,55]},t(M,[2,46]),t(S,[2,7]),t(S,[2,11]),{11:56,22:f,47:C},t(S,[2,15]),t(N,a,{8:57}),{22:[1,58]},{22:[1,59]},{21:[1,60]},{22:[2,41]},{22:[2,42]},t(S,[2,28]),t(S,[2,29]),{38:61,53:E},{53:[2,45]},t(S,[2,12],{12:[1,62]}),{4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:u,17:l,19:[1,63],20:h,22:f,23:d,24:p,25:g,26:y,27:m,30:29,31:v,33:b,35:_,36:6,41:x,42:w,43:k,44:T,47:C,50:i},t(S,[2,18],{18:[1,64]}),{29:[1,65]},{22:[1,66]},t(M,[2,32]),t(S,[2,13]),t(S,[2,17]),t(N,a,{8:67}),t(S,[2,24]),t(S,[2,25]),{4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:u,17:l,19:[1,68],20:h,22:f,23:d,24:p,25:g,26:y,27:m,30:29,31:v,33:b,35:_,36:6,41:x,42:w,43:k,44:T,47:C,50:i},t(S,[2,19])],defaultActions:{7:[2,43],8:[2,1],9:[2,2],10:[2,3],50:[2,41],51:[2,42],55:[2,45]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},B={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:case 33:return 41;case 1:case 34:return 42;case 2:case 35:return 43;case 3:case 36:return 44;case 4:return this.begin("open_directive"),50;case 5:return this.begin("type_directive"),51;case 6:return this.popState(),this.begin("arg_directive"),39;case 7:return this.popState(),this.popState(),53;case 8:return 52;case 9:case 10:case 12:case 13:case 14:case 15:case 46:case 52:break;case 11:case 66:return 5;case 16:return this.pushState("SCALE"),15;case 17:return 16;case 18:case 24:case 40:case 43:this.popState();break;case 19:return this.begin("acc_title"),31;case 20:return this.popState(),"acc_title_value";case 21:return this.begin("acc_descr"),33;case 22:return this.popState(),"acc_descr_value";case 23:this.begin("acc_descr_multiline");break;case 25:return"acc_descr_multiline_value";case 26:this.pushState("STATE");break;case 27:case 30:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 28:case 31:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 29:case 32:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),25;case 37:this.begin("STATE_STRING");break;case 38:return this.popState(),this.pushState("STATE_ID"),"AS";case 39:case 54:return this.popState(),"ID";case 41:return"STATE_DESCR";case 42:return 17;case 44:return this.popState(),this.pushState("struct"),18;case 45:return this.popState(),19;case 47:return this.begin("NOTE"),27;case 48:return this.popState(),this.pushState("NOTE_ID"),48;case 49:return this.popState(),this.pushState("NOTE_ID"),49;case 50:this.popState(),this.pushState("FLOATING_NOTE");break;case 51:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 53:return"NOTE_TEXT";case 55:return this.popState(),this.pushState("NOTE_TEXT"),22;case 56:return this.popState(),e.yytext=e.yytext.substr(2).trim(),29;case 57:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),29;case 58:case 59:return 7;case 60:return 14;case 61:return 47;case 62:return 22;case 63:return e.yytext=e.yytext.trim(),12;case 64:return 13;case 65:return 26;case 67:return"INVALID"}},rules:[/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[13,14],inclusive:!1},close_directive:{rules:[13,14],inclusive:!1},arg_directive:{rules:[7,8,13,14],inclusive:!1},type_directive:{rules:[6,7,13,14],inclusive:!1},open_directive:{rules:[5,13,14],inclusive:!1},struct:{rules:[13,14,26,33,34,35,36,45,46,47,61,62,63,64,65],inclusive:!1},FLOATING_NOTE_ID:{rules:[54],inclusive:!1},FLOATING_NOTE:{rules:[51,52,53],inclusive:!1},NOTE_TEXT:{rules:[56,57],inclusive:!1},NOTE_ID:{rules:[55],inclusive:!1},NOTE:{rules:[48,49,50],inclusive:!1},acc_descr_multiline:{rules:[24,25],inclusive:!1},acc_descr:{rules:[22],inclusive:!1},acc_title:{rules:[20],inclusive:!1},SCALE:{rules:[17,18],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[39],inclusive:!1},STATE_STRING:{rules:[40,41],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[13,14,27,28,29,30,31,32,37,38,42,43,44],inclusive:!1},ID:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,12,14,15,16,19,21,23,26,44,47,58,59,60,61,62,63,64,66,67],inclusive:!0}}};function L(){this.yy={}}return D.lexer=B,L.prototype=D,D.Parser=L,new L}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(3069).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},9763:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,17,18,20,22,23,24,26],i=[1,15],a=[1,16],o=[1,17],s=[1,18],c=[1,19],u=[1,20],l=[1,24],h=[4,6,9,11,17,18,20,22,23,24,26],f={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:case 7:case 8:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 11:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.setTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 16:r.addTask(a[s-1],a[s]),this.$="task";break;case 18:r.parseDirective("%%{","open_directive");break;case 19:r.parseDirective(a[s],"type_directive");break;case 20:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 21:r.parseDirective("}%%","close_directive","journey")}},table:[{3:1,4:e,7:3,12:4,26:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,26:n},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:a,20:o,22:s,23:c,24:u,26:n},{1:[2,2]},{14:22,15:[1,23],29:l},t([15,29],[2,19]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:21,10:25,12:4,17:i,18:a,20:o,22:s,23:c,24:u,26:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),{19:[1,26]},{21:[1,27]},t(r,[2,14]),t(r,[2,15]),{25:[1,28]},t(r,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},t(r,[2,5]),t(r,[2,12]),t(r,[2,13]),t(r,[2,16]),t(h,[2,9]),{14:32,29:l},{29:[2,20]},{11:[1,33]},t(h,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},d={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:case 6:case 8:case 9:break;case 7:return 11;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};function p(){this.yy={}}return f.lexer=d,p.prototype=f,f.Parser=p,new p}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(9143).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},7967:(t,e)=>{"use strict";e.N=void 0;var n=/^([^\w]*)(javascript|data|vbscript)/im,r=/&#(\w+)(^\w|;)?/g,i=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,a=/^([^:]+):/gm,o=[".","/"];e.N=function(t){var e,s=(e=t||"",e.replace(r,(function(t,e){return String.fromCharCode(e)}))).replace(i,"").trim();if(!s)return"about:blank";if(function(t){return o.indexOf(t[0])>-1}(s))return s;var c=s.match(a);if(!c)return s;var u=c[0];return n.test(u)?"about:blank":s}},3841:t=>{t.exports=function(t,e){return t.intersect(e)}},8968:(t,e,n)=>{"use strict";n.d(e,{default:()=>HE});var r=n(1941),i=n.n(r),a={debug:1,info:2,warn:3,error:4,fatal:5},o={debug:function(){},info:function(){},warn:function(){},error:function(){},fatal:function(){}},s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"fatal";isNaN(t)&&(t=t.toLowerCase(),void 0!==a[t]&&(t=a[t])),o.trace=function(){},o.debug=function(){},o.info=function(){},o.warn=function(){},o.error=function(){},o.fatal=function(){},t<=a.fatal&&(o.fatal=console.error?console.error.bind(console,c("FATAL"),"color: orange"):console.log.bind(console,"",c("FATAL"))),t<=a.error&&(o.error=console.error?console.error.bind(console,c("ERROR"),"color: orange"):console.log.bind(console,"",c("ERROR"))),t<=a.warn&&(o.warn=console.warn?console.warn.bind(console,c("WARN"),"color: orange"):console.log.bind(console,"",c("WARN"))),t<=a.info&&(o.info=console.info?console.info.bind(console,c("INFO"),"color: lightblue"):console.log.bind(console,"",c("INFO"))),t<=a.debug&&(o.debug=console.debug?console.debug.bind(console,c("DEBUG"),"color: lightgreen"):console.log.bind(console,"",c("DEBUG")))},c=function(t){var e=i()().format("ss.SSS");return"%c".concat(e," : ").concat(t," : ")};function u(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function l(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function h(t){return t}var f=1e-6;function d(t){return"translate("+t+",0)"}function p(t){return"translate(0,"+t+")"}function g(t){return e=>+t(e)}function y(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function m(){return!this.__axis}function v(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",v=1===t||3===t?d:p;function b(d){var p=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,b=null==i?e.tickFormat?e.tickFormat.apply(e,n):h:i,_=Math.max(a,0)+s,x=e.range(),w=+x[0]+c,k=+x[x.length-1]+c,T=(e.bandwidth?y:g)(e.copy(),c),C=d.selection?d.selection():d,E=C.selectAll(".domain").data([null]),S=C.selectAll(".tick").data(p,e).order(),A=S.exit(),M=S.enter().append("g").attr("class","tick"),N=S.select("line"),D=S.select("text");E=E.merge(E.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge(M),N=N.merge(M.append("line").attr("stroke","currentColor").attr(l+"2",u*a)),D=D.merge(M.append("text").attr("fill","currentColor").attr(l,u*_).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),d!==C&&(E=E.transition(d),S=S.transition(d),N=N.transition(d),D=D.transition(d),A=A.transition(d).attr("opacity",f).attr("transform",(function(t){return isFinite(t=T(t))?v(t+c):this.getAttribute("transform")})),M.attr("opacity",f).attr("transform",(function(t){var e=this.parentNode.__axis;return v((e&&isFinite(e=e(t))?e:T(t))+c)}))),A.remove(),E.attr("d",4===t||2===t?o?"M"+u*o+","+w+"H"+c+"V"+k+"H"+u*o:"M"+c+","+w+"V"+k:o?"M"+w+","+u*o+"V"+c+"H"+k+"V"+u*o:"M"+w+","+c+"H"+k),S.attr("opacity",1).attr("transform",(function(t){return v(T(t)+c)})),N.attr(l+"2",u*a),D.attr(l,u*_).text(b),C.filter(m).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),C.each((function(){this.__axis=T}))}return b.scale=function(t){return arguments.length?(e=t,b):e},b.ticks=function(){return n=Array.from(arguments),b},b.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),b):n.slice()},b.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),b):r&&r.slice()},b.tickFormat=function(t){return arguments.length?(i=t,b):i},b.tickSize=function(t){return arguments.length?(a=o=+t,b):a},b.tickSizeInner=function(t){return arguments.length?(a=+t,b):a},b.tickSizeOuter=function(t){return arguments.length?(o=+t,b):o},b.tickPadding=function(t){return arguments.length?(s=+t,b):s},b.offset=function(t){return arguments.length?(c=+t,b):c},b}function b(){}function _(t){return null==t?b:function(){return this.querySelector(t)}}function x(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function w(){return[]}function k(t){return null==t?w:function(){return this.querySelectorAll(t)}}function T(t){return function(){return this.matches(t)}}function C(t){return function(e){return e.matches(t)}}var E=Array.prototype.find;function S(){return this.firstElementChild}var A=Array.prototype.filter;function M(){return Array.from(this.children)}function N(t){return new Array(t.length)}function D(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function B(t){return function(){return t}}function L(t,e,n,r,i,a){for(var o,s=0,c=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new D(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function O(t,e,n,r,i,a,o){var s,c,u,l=new Map,h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(d[s]=u=o.call(c,c.__data__,s,e)+"",l.has(u)?i[s]=c:l.set(u,c));for(s=0;s<f;++s)u=o.call(t,a[s],s,a)+"",(c=l.get(u))?(r[s]=c,c.__data__=a[s],l.delete(u)):n[s]=new D(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&l.get(d[s])===c&&(i[s]=c)}function I(t){return t.__data__}function R(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function F(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}D.prototype={constructor:D,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var P="http://www.w3.org/1999/xhtml";const Y={svg:"http://www.w3.org/2000/svg",xhtml:P,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function j(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Y.hasOwnProperty(e)?{space:Y[e],local:t}:t}function U(t){return function(){this.removeAttribute(t)}}function z(t){return function(){this.removeAttributeNS(t.space,t.local)}}function $(t,e){return function(){this.setAttribute(t,e)}}function q(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function H(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function W(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function V(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function G(t){return function(){this.style.removeProperty(t)}}function X(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Z(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Q(t,e){return t.style.getPropertyValue(e)||V(t).getComputedStyle(t,null).getPropertyValue(e)}function K(t){return function(){delete this[t]}}function J(t,e){return function(){this[t]=e}}function tt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function et(t){return t.trim().split(/^|\s+/)}function nt(t){return t.classList||new rt(t)}function rt(t){this._node=t,this._names=et(t.getAttribute("class")||"")}function it(t,e){for(var n=nt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function at(t,e){for(var n=nt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function ot(t){return function(){it(this,t)}}function st(t){return function(){at(this,t)}}function ct(t,e){return function(){(e.apply(this,arguments)?it:at)(this,t)}}function ut(){this.textContent=""}function lt(t){return function(){this.textContent=t}}function ht(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ft(){this.innerHTML=""}function dt(t){return function(){this.innerHTML=t}}function pt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function gt(){this.nextSibling&&this.parentNode.appendChild(this)}function yt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mt(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===P&&e.documentElement.namespaceURI===P?e.createElement(t):e.createElementNS(n,t)}}function vt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function bt(t){var e=j(t);return(e.local?vt:mt)(e)}function _t(){return null}function xt(){var t=this.parentNode;t&&t.removeChild(this)}function wt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function kt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Tt(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Ct(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Et(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function St(t,e,n){var r=V(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function At(t,e){return function(){return St(this,t,e)}}function Mt(t,e){return function(){return St(this,t,e.apply(this,arguments))}}rt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Nt=[null];function Dt(t,e){this._groups=t,this._parents=e}function Bt(){return new Dt([[document.documentElement]],Nt)}Dt.prototype=Bt.prototype={constructor:Dt,select:function(t){"function"!=typeof t&&(t=_(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,u=r[i]=new Array(c),l=0;l<c;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),u[l]=o);return new Dt(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return x(t.apply(this,arguments))}}(t):k(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,u=0;u<c;++u)(o=s[u])&&(r.push(t.call(o,o.__data__,u,s)),i.push(o));return new Dt(r,i)},selectChild:function(t){return this.select(null==t?S:function(t){return function(){return E.call(this.children,t)}}("function"==typeof t?t:C(t)))},selectChildren:function(t){return this.selectAll(null==t?M:function(t){return function(){return A.call(this.children,t)}}("function"==typeof t?t:C(t)))},filter:function(t){"function"!=typeof t&&(t=T(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new Dt(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,I);var n=e?O:L,r=this._parents,i=this._groups;"function"!=typeof t&&(t=B(t));for(var a=i.length,o=new Array(a),s=new Array(a),c=new Array(a),u=0;u<a;++u){var l=r[u],h=i[u],f=h.length,d=R(t.call(l,l&&l.__data__,u,r)),p=d.length,g=s[u]=new Array(p),y=o[u]=new Array(p),m=c[u]=new Array(f);n(l,h,g,y,m,d,e);for(var v,b,_=0,x=0;_<p;++_)if(v=g[_]){for(_>=x&&(x=_+1);!(b=y[x])&&++x<p;);v._next=b||null}}return(o=new Dt(o,r))._enter=s,o._exit=c,o},enter:function(){return new Dt(this._enter||this._groups.map(N),this._parents)},exit:function(){return new Dt(this._exit||this._groups.map(N),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),c=0;c<o;++c)for(var u,l=n[c],h=r[c],f=l.length,d=s[c]=new Array(f),p=0;p<f;++p)(u=l[p]||h[p])&&(d[p]=u);for(;c<i;++c)s[c]=n[c];return new Dt(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=F);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,u=i[a]=new Array(c),l=0;l<c;++l)(o=s[l])&&(u[l]=o);u.sort(e)}return new Dt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=j(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?z:U:"function"==typeof e?n.local?W:H:n.local?q:$)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?G:"function"==typeof e?Z:X)(t,e,null==n?"":n)):Q(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?K:"function"==typeof e?tt:J)(t,e)):this.node()[t]},classed:function(t,e){var n=et(t+"");if(arguments.length<2){for(var r=nt(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?ct:e?ot:st)(n,e))},text:function(t){return arguments.length?this.each(null==t?ut:("function"==typeof t?ht:lt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ft:("function"==typeof t?pt:dt)(t)):this.node().innerHTML},raise:function(){return this.each(gt)},lower:function(){return this.each(yt)},append:function(t){var e="function"==typeof t?t:bt(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:bt(t),r=null==e?_t:"function"==typeof e?e:_(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(xt)},clone:function(t){return this.select(t?kt:wt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=Tt(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?Et:Ct,r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,u=0,l=s.length;u<l;++u)for(r=0,c=s[u];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?Mt:At)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};const Lt=Bt;var Ot={value:()=>{}};function It(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Rt(r)}function Rt(t){this._=t}function Ft(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function Pt(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Yt(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Ot,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Rt.prototype=It.prototype={constructor:Rt,on:function(t,e){var n,r=this._,i=Ft(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=Yt(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Yt(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=Pt(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Rt(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};const jt=It;var Ut,zt,$t=0,qt=0,Ht=0,Wt=0,Vt=0,Gt=0,Xt="object"==typeof performance&&performance.now?performance:Date,Zt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Qt(){return Vt||(Zt(Kt),Vt=Xt.now()+Gt)}function Kt(){Vt=0}function Jt(){this._call=this._time=this._next=null}function te(t,e,n){var r=new Jt;return r.restart(t,e,n),r}function ee(){Vt=(Wt=Xt.now())+Gt,$t=qt=0;try{!function(){Qt(),++$t;for(var t,e=Ut;e;)(t=Vt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--$t}()}finally{$t=0,function(){for(var t,e,n=Ut,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Ut=e);zt=t,re(r)}(),Vt=0}}function ne(){var t=Xt.now(),e=t-Wt;e>1e3&&(Gt-=e,Wt=t)}function re(t){$t||(qt&&(qt=clearTimeout(qt)),t-Vt>24?(t<1/0&&(qt=setTimeout(ee,t-Xt.now()-Gt)),Ht&&(Ht=clearInterval(Ht))):(Ht||(Wt=Xt.now(),Ht=setInterval(ne,1e3)),$t=1,Zt(ee)))}function ie(t,e,n){var r=new Jt;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}Jt.prototype=te.prototype={constructor:Jt,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Qt():+n)+(null==e?0:+e),this._next||zt===this||(zt?zt._next=this:Ut=this,zt=this),this._call=t,this._time=n,re()},stop:function(){this._call&&(this._call=null,this._time=1/0,re())}};var ae=jt("start","end","cancel","interrupt"),oe=[];function se(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(c){var u,l,h,f;if(1!==n.state)return s();for(u in i)if((f=i[u]).name===n.name){if(3===f.state)return ie(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+u<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[u])}if(ie((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,l=-1;u<h;++u)(f=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=te((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:ae,tween:oe,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function ce(t,e){var n=le(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function ue(t,e){var n=le(t,e);if(n.state>3)throw new Error("too late; already running");return n}function le(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function he(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var fe,de=180/Math.PI,pe={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ge(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*de,skewX:Math.atan(c)*de,scaleX:o,scaleY:s}}function ye(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:he(t,i)},{i:c-2,x:he(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:he(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:he(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:he(t,n)},{i:s-2,x:he(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var me=ye((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?pe:ge(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),ve=ye((function(t){return null==t?pe:(fe||(fe=document.createElementNS("http://www.w3.org/2000/svg","g")),fe.setAttribute("transform",t),(t=fe.transform.baseVal.consolidate())?ge((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):pe)}),", ",")",")");function be(t,e){var n,r;return function(){var i=ue(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function _e(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=ue(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}a.tween=i}}function xe(t,e,n){var r=t._id;return t.each((function(){var t=ue(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return le(t,r).value[e]}}function we(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ke(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Te(){}var Ce=.7,Ee=1/Ce,Se="\\s*([+-]?\\d+)\\s*",Ae="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Me="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ne=/^#([0-9a-f]{3,8})$/,De=new RegExp("^rgb\\("+[Se,Se,Se]+"\\)$"),Be=new RegExp("^rgb\\("+[Me,Me,Me]+"\\)$"),Le=new RegExp("^rgba\\("+[Se,Se,Se,Ae]+"\\)$"),Oe=new RegExp("^rgba\\("+[Me,Me,Me,Ae]+"\\)$"),Ie=new RegExp("^hsl\\("+[Ae,Me,Me]+"\\)$"),Re=new RegExp("^hsla\\("+[Ae,Me,Me,Ae]+"\\)$"),Fe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Pe(){return this.rgb().formatHex()}function Ye(){return this.rgb().formatRgb()}function je(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ne.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ue(e):3===n?new He(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ze(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ze(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=De.exec(t))?new He(e[1],e[2],e[3],1):(e=Be.exec(t))?new He(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Le.exec(t))?ze(e[1],e[2],e[3],e[4]):(e=Oe.exec(t))?ze(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ie.exec(t))?Xe(e[1],e[2]/100,e[3]/100,1):(e=Re.exec(t))?Xe(e[1],e[2]/100,e[3]/100,e[4]):Fe.hasOwnProperty(t)?Ue(Fe[t]):"transparent"===t?new He(NaN,NaN,NaN,0):null}function Ue(t){return new He(t>>16&255,t>>8&255,255&t,1)}function ze(t,e,n,r){return r<=0&&(t=e=n=NaN),new He(t,e,n,r)}function $e(t){return t instanceof Te||(t=je(t)),t?new He((t=t.rgb()).r,t.g,t.b,t.opacity):new He}function qe(t,e,n,r){return 1===arguments.length?$e(t):new He(t,e,n,null==r?1:r)}function He(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function We(){return"#"+Ge(this.r)+Ge(this.g)+Ge(this.b)}function Ve(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Ge(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Xe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Qe(t,e,n,r)}function Ze(t){if(t instanceof Qe)return new Qe(t.h,t.s,t.l,t.opacity);if(t instanceof Te||(t=je(t)),!t)return new Qe;if(t instanceof Qe)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Qe(o,s,c,t.opacity)}function Qe(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ke(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Je(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}we(Te,je,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Pe,formatHex:Pe,formatHsl:function(){return Ze(this).formatHsl()},formatRgb:Ye,toString:Ye}),we(He,qe,ke(Te,{brighter:function(t){return t=null==t?Ee:Math.pow(Ee,t),new He(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Ce:Math.pow(Ce,t),new He(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:We,formatHex:We,formatRgb:Ve,toString:Ve})),we(Qe,(function(t,e,n,r){return 1===arguments.length?Ze(t):new Qe(t,e,n,null==r?1:r)}),ke(Te,{brighter:function(t){return t=null==t?Ee:Math.pow(Ee,t),new Qe(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Ce:Math.pow(Ce,t),new Qe(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new He(Ke(t>=240?t-240:t+120,i,r),Ke(t,i,r),Ke(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const tn=t=>()=>t;function en(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):tn(isNaN(t)?e:t)}const nn=function t(e){var n=function(t){return 1==(t=+t)?en:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):tn(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=qe(t)).r,(e=qe(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=en(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function rn(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=qe(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}rn((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return Je((n-r/e)*e,o,i,a,s)}})),rn((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return Je((n-r/e)*e,i,a,o,s)}}));var an=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,on=new RegExp(an.source,"g");function sn(t,e){var n,r,i,a=an.lastIndex=on.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=an.exec(t))&&(r=on.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:he(n,r)})),a=on.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function cn(t,e){var n;return("number"==typeof e?he:e instanceof je?nn:(n=je(e))?(e=n,nn):sn)(t,e)}function un(t){return function(){this.removeAttribute(t)}}function ln(t){return function(){this.removeAttributeNS(t.space,t.local)}}function hn(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function fn(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function dn(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function pn(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function gn(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function yn(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function mn(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&yn(t,i)),n}return i._value=e,i}function vn(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&gn(t,i)),n}return i._value=e,i}function bn(t,e){return function(){ce(this,t).delay=+e.apply(this,arguments)}}function _n(t,e){return e=+e,function(){ce(this,t).delay=e}}function xn(t,e){return function(){ue(this,t).duration=+e.apply(this,arguments)}}function wn(t,e){return e=+e,function(){ue(this,t).duration=e}}function kn(t,e){if("function"!=typeof e)throw new Error;return function(){ue(this,t).ease=e}}function Tn(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?ce:ue;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Cn=Lt.prototype.constructor;function En(t){return function(){this.style.removeProperty(t)}}function Sn(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function An(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Sn(t,a,n)),r}return a._value=e,a}function Mn(t){return function(e){this.textContent=t.call(this,e)}}function Nn(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Mn(r)),e}return r._value=t,r}var Dn=0;function Bn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ln(){return++Dn}var On=Lt.prototype;Bn.prototype=function(t){return Lt().transition(t)}.prototype={constructor:Bn,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=_(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,u=r[o],l=u.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=u[f])&&(c=t.call(s,s.__data__,f,u))&&("__data__"in s&&(c.__data__=s.__data__),h[f]=c,se(h[f],e,n,f,h,le(s,n)));return new Bn(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=k(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,u=r[s],l=u.length,h=0;h<l;++h)if(c=u[h]){for(var f,d=t.call(c,c.__data__,h,u),p=le(c,n),g=0,y=d.length;g<y;++g)(f=d[g])&&se(f,e,n,g,d,p);a.push(d),o.push(c)}return new Bn(a,o,e,n)},selectChild:On.selectChild,selectChildren:On.selectChildren,filter:function(t){"function"!=typeof t&&(t=T(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new Bn(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new Bn(o,this._parents,this._name,this._id)},selection:function(){return new Cn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Ln(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)if(o=s[u]){var l=le(o,e);se(o,t,n,u,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Bn(r,this._parents,t,n)},call:On.call,nodes:On.nodes,node:On.node,size:On.size,empty:On.empty,each:On.each,on:function(t,e){var n=this._id;return arguments.length<2?le(this.node(),n).on.on(t):this.each(Tn(n,t,e))},attr:function(t,e){var n=j(t),r="transform"===n?ve:cn;return this.attrTween(t,"function"==typeof e?(n.local?pn:dn)(n,r,xe(this,"attr."+t,e)):null==e?(n.local?ln:un)(n):(n.local?fn:hn)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=j(t);return this.tween(n,(r.local?mn:vn)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?me:cn;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Q(this,t),o=(this.style.removeProperty(t),Q(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,En(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Q(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=Q(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,xe(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=ue(this,t),u=c.on,l=null==c.value[o]?a||(a=En(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(s,i=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Q(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,An(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(xe(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Nn(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=le(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?be:_e)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?bn:_n)(e,t)):le(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?xn:wn)(e,t)):le(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(kn(e,t)):le(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;ue(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=ue(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e})),0===i&&a()}))},[Symbol.iterator]:On[Symbol.iterator]};var In={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Rn(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Lt.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}(this,t)}))},Lt.prototype.transition=function(t){var e,n;t instanceof Bn?(e=t._id,t=t._name):(e=Ln(),(n=In).time=Qt(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)(o=s[u])&&se(o,t,e,u,s,n||Rn(o,e));return new Bn(r,this._parents,t,e)};const{abs:Fn,max:Pn,min:Yn}=Math;function jn(t){return{type:t}}function Un(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function zn(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function $n(){}["w","e"].map(jn),["n","s"].map(jn),["n","w","e","s","nw","ne","sw","se"].map(jn);var qn=.7,Hn=1/qn,Wn="\\s*([+-]?\\d+)\\s*",Vn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Gn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Xn=/^#([0-9a-f]{3,8})$/,Zn=new RegExp("^rgb\\("+[Wn,Wn,Wn]+"\\)$"),Qn=new RegExp("^rgb\\("+[Gn,Gn,Gn]+"\\)$"),Kn=new RegExp("^rgba\\("+[Wn,Wn,Wn,Vn]+"\\)$"),Jn=new RegExp("^rgba\\("+[Gn,Gn,Gn,Vn]+"\\)$"),tr=new RegExp("^hsl\\("+[Vn,Gn,Gn]+"\\)$"),er=new RegExp("^hsla\\("+[Vn,Gn,Gn,Vn]+"\\)$"),nr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function rr(){return this.rgb().formatHex()}function ir(){return this.rgb().formatRgb()}function ar(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Xn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?or(e):3===n?new lr(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?sr(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?sr(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Zn.exec(t))?new lr(e[1],e[2],e[3],1):(e=Qn.exec(t))?new lr(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Kn.exec(t))?sr(e[1],e[2],e[3],e[4]):(e=Jn.exec(t))?sr(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=tr.exec(t))?pr(e[1],e[2]/100,e[3]/100,1):(e=er.exec(t))?pr(e[1],e[2]/100,e[3]/100,e[4]):nr.hasOwnProperty(t)?or(nr[t]):"transparent"===t?new lr(NaN,NaN,NaN,0):null}function or(t){return new lr(t>>16&255,t>>8&255,255&t,1)}function sr(t,e,n,r){return r<=0&&(t=e=n=NaN),new lr(t,e,n,r)}function cr(t){return t instanceof $n||(t=ar(t)),t?new lr((t=t.rgb()).r,t.g,t.b,t.opacity):new lr}function ur(t,e,n,r){return 1===arguments.length?cr(t):new lr(t,e,n,null==r?1:r)}function lr(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function hr(){return"#"+dr(this.r)+dr(this.g)+dr(this.b)}function fr(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function dr(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function pr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new yr(t,e,n,r)}function gr(t){if(t instanceof yr)return new yr(t.h,t.s,t.l,t.opacity);if(t instanceof $n||(t=ar(t)),!t)return new yr;if(t instanceof yr)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new yr(o,s,c,t.opacity)}function yr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function mr(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Un($n,ar,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:rr,formatHex:rr,formatHsl:function(){return gr(this).formatHsl()},formatRgb:ir,toString:ir}),Un(lr,ur,zn($n,{brighter:function(t){return t=null==t?Hn:Math.pow(Hn,t),new lr(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?qn:Math.pow(qn,t),new lr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:hr,formatHex:hr,formatRgb:fr,toString:fr})),Un(yr,(function(t,e,n,r){return 1===arguments.length?gr(t):new yr(t,e,n,null==r?1:r)}),zn($n,{brighter:function(t){return t=null==t?Hn:Math.pow(Hn,t),new yr(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?qn:Math.pow(qn,t),new yr(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new lr(mr(t>=240?t-240:t+120,i,r),mr(t,i,r),mr(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const vr=Math.PI/180,br=180/Math.PI,_r=.96422,xr=.82521,wr=4/29,kr=6/29,Tr=3*kr*kr;function Cr(t){if(t instanceof Er)return new Er(t.l,t.a,t.b,t.opacity);if(t instanceof Lr)return Or(t);t instanceof lr||(t=cr(t));var e,n,r=Nr(t.r),i=Nr(t.g),a=Nr(t.b),o=Sr((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=Sr((.4360747*r+.3850649*i+.1430804*a)/_r),n=Sr((.0139322*r+.0971045*i+.7141733*a)/xr)),new Er(116*o-16,500*(e-o),200*(o-n),t.opacity)}function Er(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Sr(t){return t>.008856451679035631?Math.pow(t,1/3):t/Tr+wr}function Ar(t){return t>kr?t*t*t:Tr*(t-wr)}function Mr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Nr(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Dr(t){if(t instanceof Lr)return new Lr(t.h,t.c,t.l,t.opacity);if(t instanceof Er||(t=Cr(t)),0===t.a&&0===t.b)return new Lr(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*br;return new Lr(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Br(t,e,n,r){return 1===arguments.length?Dr(t):new Lr(t,e,n,null==r?1:r)}function Lr(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Or(t){if(isNaN(t.h))return new Er(t.l,0,0,t.opacity);var e=t.h*vr;return new Er(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Un(Er,(function(t,e,n,r){return 1===arguments.length?Cr(t):new Er(t,e,n,null==r?1:r)}),zn($n,{brighter:function(t){return new Er(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Er(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new lr(Mr(3.1338561*(e=_r*Ar(e))-1.6168667*(t=1*Ar(t))-.4906146*(n=xr*Ar(n))),Mr(-.9787684*e+1.9161415*t+.033454*n),Mr(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Un(Lr,Br,zn($n,{brighter:function(t){return new Lr(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Lr(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Or(this).rgb()}}));const Ir=t=>()=>t;function Rr(t,e){return function(n){return t+n*e}}function Fr(t,e){var n=e-t;return n?Rr(t,n):Ir(isNaN(t)?e:t)}function Pr(t){return function(e,n){var r=t((e=Br(e)).h,(n=Br(n)).h),i=Fr(e.c,n.c),a=Fr(e.l,n.l),o=Fr(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}const Yr=Pr((function(t,e){var n=e-t;return n?Rr(t,n>180||n<-180?n-360*Math.round(n/360):n):Ir(isNaN(t)?e:t)}));Pr(Fr);var jr=Math.sqrt(50),Ur=Math.sqrt(10),zr=Math.sqrt(2);function $r(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=jr?10:a>=Ur?5:a>=zr?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=jr?10:a>=Ur?5:a>=zr?2:1)}function qr(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=jr?i*=10:a>=Ur?i*=5:a>=zr&&(i*=2),e<t?-i:i}function Hr(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Wr(t){let e=t,n=t,r=t;function i(t,e,i=0,a=t.length){if(i<a){if(0!==n(e,e))return a;do{const n=i+a>>>1;r(t[n],e)<0?i=n+1:a=n}while(i<a)}return i}return 2!==t.length&&(e=(e,n)=>t(e)-n,n=Hr,r=(e,n)=>Hr(t(e),n)),{left:i,center:function(t,n,r=0,a=t.length){const o=i(t,n,r,a-1);return o>r&&e(t[o-1],n)>-e(t[o],n)?o-1:o},right:function(t,e,i=0,a=t.length){if(i<a){if(0!==n(e,e))return a;do{const n=i+a>>>1;r(t[n],e)<=0?i=n+1:a=n}while(i<a)}return i}}}const Vr=Wr(Hr),Gr=Vr.right,Xr=(Vr.left,Wr((function(t){return null===t?NaN:+t})).center,Gr);function Zr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Qr(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Kr(){}var Jr=.7,ti=1.4285714285714286,ei="\\s*([+-]?\\d+)\\s*",ni="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ri="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ii=/^#([0-9a-f]{3,8})$/,ai=new RegExp("^rgb\\("+[ei,ei,ei]+"\\)$"),oi=new RegExp("^rgb\\("+[ri,ri,ri]+"\\)$"),si=new RegExp("^rgba\\("+[ei,ei,ei,ni]+"\\)$"),ci=new RegExp("^rgba\\("+[ri,ri,ri,ni]+"\\)$"),ui=new RegExp("^hsl\\("+[ni,ri,ri]+"\\)$"),li=new RegExp("^hsla\\("+[ni,ri,ri,ni]+"\\)$"),hi={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function fi(){return this.rgb().formatHex()}function di(){return this.rgb().formatRgb()}function pi(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ii.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?gi(e):3===n?new bi(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?yi(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?yi(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ai.exec(t))?new bi(e[1],e[2],e[3],1):(e=oi.exec(t))?new bi(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=si.exec(t))?yi(e[1],e[2],e[3],e[4]):(e=ci.exec(t))?yi(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ui.exec(t))?ki(e[1],e[2]/100,e[3]/100,1):(e=li.exec(t))?ki(e[1],e[2]/100,e[3]/100,e[4]):hi.hasOwnProperty(t)?gi(hi[t]):"transparent"===t?new bi(NaN,NaN,NaN,0):null}function gi(t){return new bi(t>>16&255,t>>8&255,255&t,1)}function yi(t,e,n,r){return r<=0&&(t=e=n=NaN),new bi(t,e,n,r)}function mi(t){return t instanceof Kr||(t=pi(t)),t?new bi((t=t.rgb()).r,t.g,t.b,t.opacity):new bi}function vi(t,e,n,r){return 1===arguments.length?mi(t):new bi(t,e,n,null==r?1:r)}function bi(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function _i(){return"#"+wi(this.r)+wi(this.g)+wi(this.b)}function xi(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function wi(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function ki(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ci(t,e,n,r)}function Ti(t){if(t instanceof Ci)return new Ci(t.h,t.s,t.l,t.opacity);if(t instanceof Kr||(t=pi(t)),!t)return new Ci;if(t instanceof Ci)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Ci(o,s,c,t.opacity)}function Ci(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ei(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Si(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}Zr(Kr,pi,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:fi,formatHex:fi,formatHsl:function(){return Ti(this).formatHsl()},formatRgb:di,toString:di}),Zr(bi,vi,Qr(Kr,{brighter:function(t){return t=null==t?ti:Math.pow(ti,t),new bi(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Jr:Math.pow(Jr,t),new bi(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:_i,formatHex:_i,formatRgb:xi,toString:xi})),Zr(Ci,(function(t,e,n,r){return 1===arguments.length?Ti(t):new Ci(t,e,n,null==r?1:r)}),Qr(Kr,{brighter:function(t){return t=null==t?ti:Math.pow(ti,t),new Ci(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Jr:Math.pow(Jr,t),new Ci(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new bi(Ei(t>=240?t-240:t+120,i,r),Ei(t,i,r),Ei(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const Ai=t=>()=>t;function Mi(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Ai(isNaN(t)?e:t)}const Ni=function t(e){var n=function(t){return 1==(t=+t)?Mi:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ai(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=vi(t)).r,(e=vi(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Mi(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function Di(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=vi(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}function Bi(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=ji(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function Li(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Oi(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Ii(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=ji(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}Di((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return Si((n-r/e)*e,o,i,a,s)}})),Di((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return Si((n-r/e)*e,i,a,o,s)}}));var Ri=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fi=new RegExp(Ri.source,"g");function Pi(t,e){var n,r,i,a=Ri.lastIndex=Fi.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=Ri.exec(t))&&(r=Fi.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:Oi(n,r)})),a=Fi.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function Yi(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function ji(t,e){var n,r,i=typeof e;return null==e||"boolean"===i?Ai(e):("number"===i?Oi:"string"===i?(n=pi(e))?(e=n,Ni):Pi:e instanceof pi?Ni:e instanceof Date?Li:(r=e,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(e)?Bi:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Ii:Oi:Yi))(t,e)}function Ui(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function zi(t){return+t}var $i=[0,1];function qi(t){return t}function Hi(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function Wi(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=Hi(i,r),a=n(o,a)):(r=Hi(r,i),a=n(a,o)),function(t){return a(r(t))}}function Vi(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Hi(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=Xr(t,e,1,r)-1;return a[n](i[n](e))}}function Gi(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Xi(){return function(){var t,e,n,r,i,a,o=$i,s=$i,c=ji,u=qi;function l(){var t,e,n,c=Math.min(o.length,s.length);return u!==qi&&(t=o[0],e=o[c-1],t>e&&(n=t,t=e,e=n),u=function(n){return Math.max(t,Math.min(e,n))}),r=c>2?Vi:Wi,i=a=null,h}function h(e){return null==e||isNaN(e=+e)?n:(i||(i=r(o.map(t),s,c)))(t(u(e)))}return h.invert=function(n){return u(e((a||(a=r(s,o.map(t),Oi)))(n)))},h.domain=function(t){return arguments.length?(o=Array.from(t,zi),l()):o.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),l()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),c=Ui,l()},h.clamp=function(t){return arguments.length?(u=!!t||qi,l()):u!==qi},h.interpolate=function(t){return arguments.length?(c=t,l()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}()(qi,qi)}function Zi(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Qi,Ki=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ji(t){if(!(e=Ki.exec(t)))throw new Error("invalid format: "+t);var e;return new ta({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function ta(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function ea(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function na(t){return(t=ea(Math.abs(t)))?t[1]:NaN}function ra(t,e){var n=ea(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Ji.prototype=ta.prototype,ta.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const ia={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>ra(100*t,e),r:ra,s:function(t,e){var n=ea(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Qi=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+ea(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function aa(t){return t}var oa,sa,ca,ua=Array.prototype.map,la=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ha(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=$r(t,e,n))||!isFinite(o))return[];if(o>0){let n=Math.round(t/o),r=Math.round(e/o);for(n*o<t&&++n,r*o>e&&--r,a=new Array(i=r-n+1);++s<i;)a[s]=(n+s)*o}else{o=-o;let n=Math.round(t*o),r=Math.round(e*o);for(n/o<t&&++n,r/o>e&&--r,a=new Array(i=r-n+1);++s<i;)a[s]=(n+s)/o}return r&&a.reverse(),a}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return function(t,e,n,r){var i,a=qr(t,e,n);switch((r=Ji(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(na(e)/3)))-na(Math.abs(t)))}(a,o))||(r.precision=i),ca(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,na(e)-na(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-na(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return sa(r)}(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,a=e(),o=0,s=a.length-1,c=a[o],u=a[s],l=10;for(u<c&&(i=c,c=u,u=i,i=o,o=s,s=i);l-- >0;){if((i=$r(c,u,n))===r)return a[o]=c,a[s]=u,e(a);if(i>0)c=Math.floor(c/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,u=Math.floor(u*i)/i}r=i}return t},t}function fa(){var t=Xi();return t.copy=function(){return Gi(t,fa())},Zi.apply(t,arguments),ha(t)}oa=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?aa:(e=ua.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(t.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?aa:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(ua.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Ji(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,y=t.precision,m=t.trim,v=t.type;"n"===v?(g=!0,v="g"):ia[v]||(void 0===y&&(y=12),m=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var b="$"===f?i:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",_="$"===f?a:/[%p]/.test(v)?c:"",x=ia[v],w=/[defgprs%]/.test(v);function k(t){var i,a,c,f=b,k=_;if("c"===v)k=x(t)+k,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:x(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==h&&(T=!1),f=(T?"("===h?h:u:"-"===h||"("===h?"":h)+f,k=("s"===v?la[8+Qi/3]:"")+k+(T&&"("===h?")":""),w)for(i=-1,a=t.length;++i<a;)if(48>(c=t.charCodeAt(i))||c>57){k=(46===c?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var C=f.length+t.length+k.length,E=C<p?new Array(p-C+1).join(e):"";switch(g&&d&&(t=r(E+t,E.length?p-k.length:1/0),E=""),n){case"<":t=f+t+k+E;break;case"=":t=f+E+t+k;break;case"^":t=E.slice(0,C=E.length>>1)+f+t+k+E.slice(C);break;default:t=E+f+t+k}return s(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=Ji(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(na(e)/3))),i=Math.pow(10,-r),a=la[8+r/3];return function(t){return n(i*t)+a}}}}({thousands:",",grouping:[3],currency:["$",""]}),sa=oa.format,ca=oa.formatPrefix;class da extends Map{constructor(t,e=ga){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(pa(this,t))}has(t){return super.has(pa(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}(this,t))}}function pa({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function ga(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;const ya=Symbol("implicit");function ma(){var t=new da,e=[],n=[],r=ya;function i(i){let a=t.get(i);if(void 0===a){if(r!==ya)return r;t.set(i,a=e.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new da;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return ma(e,n).unknown(r)},Zi.apply(i,arguments),i}const va=1e3,ba=6e4,_a=36e5,xa=864e5,wa=6048e5,ka=31536e6;var Ta=new Date,Ca=new Date;function Ea(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return Ea((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Ta.setTime(+e),Ca.setTime(+r),t(Ta),t(Ca),Math.floor(n(Ta,Ca))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Sa=Ea((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Sa.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Ea((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Sa:null};const Aa=Sa;Sa.range;var Ma=Ea((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*va)}),(function(t,e){return(e-t)/va}),(function(t){return t.getUTCSeconds()}));const Na=Ma;Ma.range;var Da=Ea((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*va)}),(function(t,e){t.setTime(+t+e*ba)}),(function(t,e){return(e-t)/ba}),(function(t){return t.getMinutes()}));const Ba=Da;Da.range;var La=Ea((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*va-t.getMinutes()*ba)}),(function(t,e){t.setTime(+t+e*_a)}),(function(t,e){return(e-t)/_a}),(function(t){return t.getHours()}));const Oa=La;La.range;var Ia=Ea((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ba)/xa),(t=>t.getDate()-1));const Ra=Ia;function Fa(t){return Ea((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ba)/wa}))}Ia.range;var Pa=Fa(0),Ya=Fa(1),ja=Fa(2),Ua=Fa(3),za=Fa(4),$a=Fa(5),qa=Fa(6),Ha=(Pa.range,Ya.range,ja.range,Ua.range,za.range,$a.range,qa.range,Ea((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})));const Wa=Ha;Ha.range;var Va=Ea((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Va.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ea((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};const Ga=Va;Va.range;var Xa=Ea((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*ba)}),(function(t,e){return(e-t)/ba}),(function(t){return t.getUTCMinutes()}));const Za=Xa;Xa.range;var Qa=Ea((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*_a)}),(function(t,e){return(e-t)/_a}),(function(t){return t.getUTCHours()}));const Ka=Qa;Qa.range;var Ja=Ea((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/xa}),(function(t){return t.getUTCDate()-1}));const to=Ja;function eo(t){return Ea((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/wa}))}Ja.range;var no=eo(0),ro=eo(1),io=eo(2),ao=eo(3),oo=eo(4),so=eo(5),co=eo(6),uo=(no.range,ro.range,io.range,ao.range,oo.range,so.range,co.range,Ea((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})));const lo=uo;uo.range;var ho=Ea((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));ho.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ea((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};const fo=ho;function po(t,e,n,r,i,a){const o=[[Na,1,va],[Na,5,5e3],[Na,15,15e3],[Na,30,3e4],[a,1,ba],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,_a],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,xa],[r,2,1728e5],[n,1,wa],[e,1,2592e6],[e,3,7776e6],[t,1,ka]];function s(e,n,r){const i=Math.abs(n-e)/r,a=Wr((([,,t])=>t)).right(o,i);if(a===o.length)return t.every(qr(e/ka,n/ka,r));if(0===a)return Aa.every(Math.max(qr(e,n,r),1));const[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[function(t,e,n){const r=e<t;r&&([t,e]=[e,t]);const i=n&&"function"==typeof n.range?n:s(t,e,n),a=i?i.range(t,+e+1):[];return r?a.reverse():a},s]}ho.range;const[go,yo]=po(fo,lo,no,to,Ka,Za),[mo,vo]=po(Ga,Wa,Pa,Ra,Oa,Ba);function bo(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function _o(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function xo(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var wo,ko,To={"-":"",_:" ",0:"0"},Co=/^\s*\d+/,Eo=/^%/,So=/[\\^$*+?|[\]().{}]/g;function Ao(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function Mo(t){return t.replace(So,"\\$&")}function No(t){return new RegExp("^(?:"+t.map(Mo).join("|")+")","i")}function Do(t){return new Map(t.map(((t,e)=>[t.toLowerCase(),e])))}function Bo(t,e,n){var r=Co.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Lo(t,e,n){var r=Co.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Oo(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Io(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Ro(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Fo(t,e,n){var r=Co.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Po(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Yo(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function jo(t,e,n){var r=Co.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Uo(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function zo(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function $o(t,e,n){var r=Co.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function qo(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ho(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Wo(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Vo(t,e,n){var r=Co.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Go(t,e,n){var r=Co.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xo(t,e,n){var r=Eo.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Zo(t,e,n){var r=Co.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Qo(t,e,n){var r=Co.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Ko(t,e){return Ao(t.getDate(),e,2)}function Jo(t,e){return Ao(t.getHours(),e,2)}function ts(t,e){return Ao(t.getHours()%12||12,e,2)}function es(t,e){return Ao(1+Ra.count(Ga(t),t),e,3)}function ns(t,e){return Ao(t.getMilliseconds(),e,3)}function rs(t,e){return ns(t,e)+"000"}function is(t,e){return Ao(t.getMonth()+1,e,2)}function as(t,e){return Ao(t.getMinutes(),e,2)}function os(t,e){return Ao(t.getSeconds(),e,2)}function ss(t){var e=t.getDay();return 0===e?7:e}function cs(t,e){return Ao(Pa.count(Ga(t)-1,t),e,2)}function us(t){var e=t.getDay();return e>=4||0===e?za(t):za.ceil(t)}function ls(t,e){return t=us(t),Ao(za.count(Ga(t),t)+(4===Ga(t).getDay()),e,2)}function hs(t){return t.getDay()}function fs(t,e){return Ao(Ya.count(Ga(t)-1,t),e,2)}function ds(t,e){return Ao(t.getFullYear()%100,e,2)}function ps(t,e){return Ao((t=us(t)).getFullYear()%100,e,2)}function gs(t,e){return Ao(t.getFullYear()%1e4,e,4)}function ys(t,e){var n=t.getDay();return Ao((t=n>=4||0===n?za(t):za.ceil(t)).getFullYear()%1e4,e,4)}function ms(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Ao(e/60|0,"0",2)+Ao(e%60,"0",2)}function vs(t,e){return Ao(t.getUTCDate(),e,2)}function bs(t,e){return Ao(t.getUTCHours(),e,2)}function _s(t,e){return Ao(t.getUTCHours()%12||12,e,2)}function xs(t,e){return Ao(1+to.count(fo(t),t),e,3)}function ws(t,e){return Ao(t.getUTCMilliseconds(),e,3)}function ks(t,e){return ws(t,e)+"000"}function Ts(t,e){return Ao(t.getUTCMonth()+1,e,2)}function Cs(t,e){return Ao(t.getUTCMinutes(),e,2)}function Es(t,e){return Ao(t.getUTCSeconds(),e,2)}function Ss(t){var e=t.getUTCDay();return 0===e?7:e}function As(t,e){return Ao(no.count(fo(t)-1,t),e,2)}function Ms(t){var e=t.getUTCDay();return e>=4||0===e?oo(t):oo.ceil(t)}function Ns(t,e){return t=Ms(t),Ao(oo.count(fo(t),t)+(4===fo(t).getUTCDay()),e,2)}function Ds(t){return t.getUTCDay()}function Bs(t,e){return Ao(ro.count(fo(t)-1,t),e,2)}function Ls(t,e){return Ao(t.getUTCFullYear()%100,e,2)}function Os(t,e){return Ao((t=Ms(t)).getUTCFullYear()%100,e,2)}function Is(t,e){return Ao(t.getUTCFullYear()%1e4,e,4)}function Rs(t,e){var n=t.getUTCDay();return Ao((t=n>=4||0===n?oo(t):oo.ceil(t)).getUTCFullYear()%1e4,e,4)}function Fs(){return"+0000"}function Ps(){return"%"}function Ys(t){return+t}function js(t){return Math.floor(+t/1e3)}function Us(t){return new Date(t)}function zs(t){return t instanceof Date?+t:+new Date(+t)}function $s(t,e,n,r,i,a,o,s,c,u){var l=Xi(),h=l.invert,f=l.domain,d=u(".%L"),p=u(":%S"),g=u("%I:%M"),y=u("%I %p"),m=u("%a %d"),v=u("%b %d"),b=u("%B"),_=u("%Y");function x(t){return(c(t)<t?d:s(t)<t?p:o(t)<t?g:a(t)<t?y:r(t)<t?i(t)<t?m:v:n(t)<t?b:_)(t)}return l.invert=function(t){return new Date(h(t))},l.domain=function(t){return arguments.length?f(Array.from(t,zs)):f().map(Us)},l.ticks=function(e){var n=f();return t(n[0],n[n.length-1],null==e?10:e)},l.tickFormat=function(t,e){return null==e?x:u(e)},l.nice=function(t){var n=f();return t&&"function"==typeof t.range||(t=e(n[0],n[n.length-1],null==t?10:t)),t?f(function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}(n,t)):l},l.copy=function(){return Gi(l,$s(t,e,n,r,i,a,o,s,c,u))},l}function qs(){}function Hs(t){return null==t?qs:function(){return this.querySelector(t)}}function Ws(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Vs(){return[]}function Gs(t){return null==t?Vs:function(){return this.querySelectorAll(t)}}function Xs(t){return function(){return this.matches(t)}}function Zs(t){return function(e){return e.matches(t)}}wo=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,u=No(i),l=Do(i),h=No(a),f=Do(a),d=No(o),p=Do(o),g=No(s),y=Do(s),m=No(c),v=Do(c),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Ko,e:Ko,f:rs,g:ps,G:ys,H:Jo,I:ts,j:es,L:ns,m:is,M:as,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Ys,s:js,S:os,u:ss,U:cs,V:ls,w:hs,W:fs,x:null,X:null,y:ds,Y:gs,Z:ms,"%":Ps},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:vs,e:vs,f:ks,g:Os,G:Rs,H:bs,I:_s,j:xs,L:ws,m:Ts,M:Cs,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Ys,s:js,S:Es,u:Ss,U:As,V:Ns,w:Ds,W:Bs,x:null,X:null,y:Ls,Y:Is,Z:Fs,"%":Ps},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return T(t,e,n,r)},d:zo,e:zo,f:Go,g:Po,G:Fo,H:qo,I:qo,j:$o,L:Vo,m:Uo,M:Ho,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=l.get(r[0].toLowerCase()),n+r[0].length):-1},q:jo,Q:Zo,s:Qo,S:Wo,u:Lo,U:Oo,V:Io,w:Bo,W:Ro,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:Po,Y:Fo,Z:Yo,"%":Xo};function w(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===t.charCodeAt(s)&&(o.push(t.slice(c,s)),null!=(i=To[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),c=s+1);return o.push(t.slice(c,s)),o.join("")}}function k(t,e){return function(n){var r,i,a=xo(1900,void 0,1);if(T(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=_o(xo(a.y,0,1))).getUTCDay(),r=i>4||0===i?ro.ceil(r):ro(r),r=to.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=bo(xo(a.y,0,1))).getDay(),r=i>4||0===i?Ya.ceil(r):Ya(r),r=Ra.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?_o(xo(a.y,0,1)).getUTCDay():bo(xo(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,_o(a)):bo(a)}}function T(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o<s;){if(r>=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in To?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),{format:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),ko=wo.format,wo.parse,wo.utcFormat,wo.utcParse;var Qs=Array.prototype.find;function Ks(){return this.firstElementChild}var Js=Array.prototype.filter;function tc(){return Array.from(this.children)}function ec(t){return new Array(t.length)}function nc(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function rc(t){return function(){return t}}function ic(t,e,n,r,i,a){for(var o,s=0,c=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new nc(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function ac(t,e,n,r,i,a,o){var s,c,u,l=new Map,h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(d[s]=u=o.call(c,c.__data__,s,e)+"",l.has(u)?i[s]=c:l.set(u,c));for(s=0;s<f;++s)u=o.call(t,a[s],s,a)+"",(c=l.get(u))?(r[s]=c,c.__data__=a[s],l.delete(u)):n[s]=new nc(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&l.get(d[s])===c&&(i[s]=c)}function oc(t){return t.__data__}function sc(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function cc(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}nc.prototype={constructor:nc,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var uc="http://www.w3.org/1999/xhtml";const lc={svg:"http://www.w3.org/2000/svg",xhtml:uc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function hc(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),lc.hasOwnProperty(e)?{space:lc[e],local:t}:t}function fc(t){return function(){this.removeAttribute(t)}}function dc(t){return function(){this.removeAttributeNS(t.space,t.local)}}function pc(t,e){return function(){this.setAttribute(t,e)}}function gc(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function yc(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function mc(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function vc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function bc(t){return function(){this.style.removeProperty(t)}}function _c(t,e,n){return function(){this.style.setProperty(t,e,n)}}function xc(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function wc(t,e){return t.style.getPropertyValue(e)||vc(t).getComputedStyle(t,null).getPropertyValue(e)}function kc(t){return function(){delete this[t]}}function Tc(t,e){return function(){this[t]=e}}function Cc(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Ec(t){return t.trim().split(/^|\s+/)}function Sc(t){return t.classList||new Ac(t)}function Ac(t){this._node=t,this._names=Ec(t.getAttribute("class")||"")}function Mc(t,e){for(var n=Sc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Nc(t,e){for(var n=Sc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Dc(t){return function(){Mc(this,t)}}function Bc(t){return function(){Nc(this,t)}}function Lc(t,e){return function(){(e.apply(this,arguments)?Mc:Nc)(this,t)}}function Oc(){this.textContent=""}function Ic(t){return function(){this.textContent=t}}function Rc(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Fc(){this.innerHTML=""}function Pc(t){return function(){this.innerHTML=t}}function Yc(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function jc(){this.nextSibling&&this.parentNode.appendChild(this)}function Uc(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function zc(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===uc&&e.documentElement.namespaceURI===uc?e.createElement(t):e.createElementNS(n,t)}}function $c(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function qc(t){var e=hc(t);return(e.local?$c:zc)(e)}function Hc(){return null}function Wc(){var t=this.parentNode;t&&t.removeChild(this)}function Vc(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Gc(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Xc(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Zc(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Qc(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function Kc(t,e,n){var r=vc(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Jc(t,e){return function(){return Kc(this,t,e)}}function tu(t,e){return function(){return Kc(this,t,e.apply(this,arguments))}}Ac.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var eu=[null];function nu(t,e){this._groups=t,this._parents=e}function ru(){return new nu([[document.documentElement]],eu)}nu.prototype=ru.prototype={constructor:nu,select:function(t){"function"!=typeof t&&(t=Hs(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,u=r[i]=new Array(c),l=0;l<c;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),u[l]=o);return new nu(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return Ws(t.apply(this,arguments))}}(t):Gs(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,u=0;u<c;++u)(o=s[u])&&(r.push(t.call(o,o.__data__,u,s)),i.push(o));return new nu(r,i)},selectChild:function(t){return this.select(null==t?Ks:function(t){return function(){return Qs.call(this.children,t)}}("function"==typeof t?t:Zs(t)))},selectChildren:function(t){return this.selectAll(null==t?tc:function(t){return function(){return Js.call(this.children,t)}}("function"==typeof t?t:Zs(t)))},filter:function(t){"function"!=typeof t&&(t=Xs(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new nu(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,oc);var n=e?ac:ic,r=this._parents,i=this._groups;"function"!=typeof t&&(t=rc(t));for(var a=i.length,o=new Array(a),s=new Array(a),c=new Array(a),u=0;u<a;++u){var l=r[u],h=i[u],f=h.length,d=sc(t.call(l,l&&l.__data__,u,r)),p=d.length,g=s[u]=new Array(p),y=o[u]=new Array(p),m=c[u]=new Array(f);n(l,h,g,y,m,d,e);for(var v,b,_=0,x=0;_<p;++_)if(v=g[_]){for(_>=x&&(x=_+1);!(b=y[x])&&++x<p;);v._next=b||null}}return(o=new nu(o,r))._enter=s,o._exit=c,o},enter:function(){return new nu(this._enter||this._groups.map(ec),this._parents)},exit:function(){return new nu(this._exit||this._groups.map(ec),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),c=0;c<o;++c)for(var u,l=n[c],h=r[c],f=l.length,d=s[c]=new Array(f),p=0;p<f;++p)(u=l[p]||h[p])&&(d[p]=u);for(;c<i;++c)s[c]=n[c];return new nu(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=cc);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,u=i[a]=new Array(c),l=0;l<c;++l)(o=s[l])&&(u[l]=o);u.sort(e)}return new nu(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=hc(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?dc:fc:"function"==typeof e?n.local?mc:yc:n.local?gc:pc)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?bc:"function"==typeof e?xc:_c)(t,e,null==n?"":n)):wc(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?kc:"function"==typeof e?Cc:Tc)(t,e)):this.node()[t]},classed:function(t,e){var n=Ec(t+"");if(arguments.length<2){for(var r=Sc(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Lc:e?Dc:Bc)(n,e))},text:function(t){return arguments.length?this.each(null==t?Oc:("function"==typeof t?Rc:Ic)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Fc:("function"==typeof t?Yc:Pc)(t)):this.node().innerHTML},raise:function(){return this.each(jc)},lower:function(){return this.each(Uc)},append:function(t){var e="function"==typeof t?t:qc(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:qc(t),r=null==e?Hc:"function"==typeof e?e:Hs(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Wc)},clone:function(t){return this.select(t?Gc:Vc)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=Xc(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?Qc:Zc,r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,u=0,l=s.length;u<l;++u)for(r=0,c=s[u];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?tu:Jc)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};const iu=ru;function au(t){return"string"==typeof t?new nu([[document.querySelector(t)]],[document.documentElement]):new nu([[t]],eu)}function ou(t){return"string"==typeof t?new nu([document.querySelectorAll(t)],[document.documentElement]):new nu([Ws(t)],eu)}const su=Math.PI,cu=2*su,uu=1e-6,lu=cu-uu;function hu(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function fu(){return new hu}hu.prototype=fu.prototype={constructor:hu,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,c=r-e,u=a-t,l=o-e,h=u*u+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>uu)if(Math.abs(l*s-c*u)>uu&&i){var f=n-a,d=r-o,p=s*s+c*c,g=f*f+d*d,y=Math.sqrt(p),m=Math.sqrt(h),v=i*Math.tan((su-Math.acos((p+h-g)/(2*y*m)))/2),b=v/m,_=v/y;Math.abs(b-1)>uu&&(this._+="L"+(t+b*u)+","+(e+b*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>u*d)+","+(this._x1=t+_*s)+","+(this._y1=e+_*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),c=t+o,u=e+s,l=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+u:(Math.abs(this._x1-c)>uu||Math.abs(this._y1-u)>uu)&&(this._+="L"+c+","+u),n&&(h<0&&(h=h%cu+cu),h>lu?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=c)+","+(this._y1=u):h>uu&&(this._+="A"+n+","+n+",0,"+ +(h>=su)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const du=fu;function pu(t){return function(){return t}}var gu=Math.abs,yu=Math.atan2,mu=Math.cos,vu=Math.max,bu=Math.min,_u=Math.sin,xu=Math.sqrt,wu=1e-12,ku=Math.PI,Tu=ku/2,Cu=2*ku;function Eu(t){return t>1?0:t<-1?ku:Math.acos(t)}function Su(t){return t>=1?Tu:t<=-1?-Tu:Math.asin(t)}function Au(t){return t.innerRadius}function Mu(t){return t.outerRadius}function Nu(t){return t.startAngle}function Du(t){return t.endAngle}function Bu(t){return t&&t.padAngle}function Lu(t,e,n,r,i,a,o,s){var c=n-t,u=r-e,l=o-i,h=s-a,f=h*c-l*u;if(!(f*f<wu))return[t+(f=(l*(e-a)-h*(t-i))/f)*c,e+f*u]}function Ou(t,e,n,r,i,a,o){var s=t-n,c=e-r,u=(o?a:-a)/xu(s*s+c*c),l=u*c,h=-u*s,f=t+l,d=e+h,p=n+l,g=r+h,y=(f+p)/2,m=(d+g)/2,v=p-f,b=g-d,_=v*v+b*b,x=i-a,w=f*g-p*d,k=(b<0?-1:1)*xu(vu(0,x*x*_-w*w)),T=(w*b-v*k)/_,C=(-w*v-b*k)/_,E=(w*b+v*k)/_,S=(-w*v+b*k)/_,A=T-y,M=C-m,N=E-y,D=S-m;return A*A+M*M>N*N+D*D&&(T=E,C=S),{cx:T,cy:C,x01:-l,y01:-h,x11:T*(i/x-1),y11:C*(i/x-1)}}function Iu(){var t=Au,e=Mu,n=pu(0),r=null,i=Nu,a=Du,o=Bu,s=null;function c(){var c,u,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-Tu,d=a.apply(this,arguments)-Tu,p=gu(d-f),g=d>f;if(s||(s=c=du()),h<l&&(u=h,h=l,l=u),h>wu)if(p>Cu-wu)s.moveTo(h*mu(f),h*_u(f)),s.arc(0,0,h,f,d,!g),l>wu&&(s.moveTo(l*mu(d),l*_u(d)),s.arc(0,0,l,d,f,g));else{var y,m,v=f,b=d,_=f,x=d,w=p,k=p,T=o.apply(this,arguments)/2,C=T>wu&&(r?+r.apply(this,arguments):xu(l*l+h*h)),E=bu(gu(h-l)/2,+n.apply(this,arguments)),S=E,A=E;if(C>wu){var M=Su(C/l*_u(T)),N=Su(C/h*_u(T));(w-=2*M)>wu?(_+=M*=g?1:-1,x-=M):(w=0,_=x=(f+d)/2),(k-=2*N)>wu?(v+=N*=g?1:-1,b-=N):(k=0,v=b=(f+d)/2)}var D=h*mu(v),B=h*_u(v),L=l*mu(x),O=l*_u(x);if(E>wu){var I,R=h*mu(b),F=h*_u(b),P=l*mu(_),Y=l*_u(_);if(p<ku&&(I=Lu(D,B,P,Y,R,F,L,O))){var j=D-I[0],U=B-I[1],z=R-I[0],$=F-I[1],q=1/_u(Eu((j*z+U*$)/(xu(j*j+U*U)*xu(z*z+$*$)))/2),H=xu(I[0]*I[0]+I[1]*I[1]);S=bu(E,(l-H)/(q-1)),A=bu(E,(h-H)/(q+1))}}k>wu?A>wu?(y=Ou(P,Y,D,B,h,A,g),m=Ou(R,F,L,O,h,A,g),s.moveTo(y.cx+y.x01,y.cy+y.y01),A<E?s.arc(y.cx,y.cy,A,yu(y.y01,y.x01),yu(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,A,yu(y.y01,y.x01),yu(y.y11,y.x11),!g),s.arc(0,0,h,yu(y.cy+y.y11,y.cx+y.x11),yu(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,yu(m.y11,m.x11),yu(m.y01,m.x01),!g))):(s.moveTo(D,B),s.arc(0,0,h,v,b,!g)):s.moveTo(D,B),l>wu&&w>wu?S>wu?(y=Ou(L,O,R,F,l,-S,g),m=Ou(D,B,P,Y,l,-S,g),s.lineTo(y.cx+y.x01,y.cy+y.y01),S<E?s.arc(y.cx,y.cy,S,yu(y.y01,y.x01),yu(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,S,yu(y.y01,y.x01),yu(y.y11,y.x11),!g),s.arc(0,0,l,yu(y.cy+y.y11,y.cx+y.x11),yu(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,S,yu(m.y11,m.x11),yu(m.y01,m.x01),!g))):s.arc(0,0,l,x,_,g):s.lineTo(L,O)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-ku/2;return[mu(r)*n,_u(r)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:pu(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:pu(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:pu(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:pu(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:pu(+t),c):i},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:pu(+t),c):a},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:pu(+t),c):o},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c}function Ru(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Fu(t){this._context=t}function Pu(t){return new Fu(t)}function Yu(t){return t[0]}function ju(t){return t[1]}function Uu(t,e){var n=pu(!0),r=null,i=Pu,a=null;function o(o){var s,c,u,l=(o=Ru(o)).length,h=!1;for(null==r&&(a=i(u=du())),s=0;s<=l;++s)!(s<l&&n(c=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(c,s,o),+e(c,s,o));if(u)return a=null,u+""||null}return t="function"==typeof t?t:void 0===t?Yu:pu(t),e="function"==typeof e?e:void 0===e?ju:pu(e),o.x=function(e){return arguments.length?(t="function"==typeof e?e:pu(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:pu(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:pu(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}function zu(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function $u(t){return t}function qu(){}function Hu(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Wu(t){this._context=t}function Vu(t){return new Wu(t)}function Gu(t){this._context=t}function Xu(t){this._context=t}function Zu(t){this._context=t}function Qu(t){return t<0?-1:1}function Ku(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Qu(a)+Qu(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Ju(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function tl(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function el(t){this._context=t}function nl(t){this._context=new rl(t)}function rl(t){this._context=t}function il(t){this._context=t}function al(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function ol(t,e){this._context=t,this._t=e}Array.prototype.slice,Fu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},Wu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Hu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Hu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Gu.prototype={areaStart:qu,areaEnd:qu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Hu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Xu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Hu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Zu.prototype={areaStart:qu,areaEnd:qu,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},el.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:tl(this,this._t0,Ju(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,tl(this,Ju(this,n=Ku(this,t,e)),n);break;default:tl(this,this._t0,n=Ku(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(nl.prototype=Object.create(el.prototype)).point=function(t,e){el.prototype.point.call(this,e,t)},rl.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},il.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=al(t),i=al(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},ol.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var sl=new Date,cl=new Date;function ul(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return ul((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return sl.setTime(+e),cl.setTime(+r),t(sl),t(cl),Math.floor(n(sl,cl))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}const ll=864e5,hl=6048e5;function fl(t){return ul((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/hl}))}var dl=fl(0),pl=fl(1),gl=fl(2),yl=fl(3),ml=fl(4),vl=fl(5),bl=fl(6),_l=(dl.range,pl.range,gl.range,yl.range,ml.range,vl.range,bl.range,ul((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/ll}),(function(t){return t.getUTCDate()-1})));const xl=_l;function wl(t){return ul((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/hl}))}_l.range;var kl=wl(0),Tl=wl(1),Cl=wl(2),El=wl(3),Sl=wl(4),Al=wl(5),Ml=wl(6),Nl=(kl.range,Tl.range,Cl.range,El.range,Sl.range,Al.range,Ml.range,ul((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/ll),(t=>t.getDate()-1)));const Dl=Nl;Nl.range;var Bl=ul((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Bl.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ul((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};const Ll=Bl;Bl.range;var Ol=ul((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));Ol.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ul((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};const Il=Ol;function Rl(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Fl(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Pl(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Ol.range;var Yl,jl,Ul={"-":"",_:" ",0:"0"},zl=/^\s*\d+/,$l=/^%/,ql=/[\\^$*+?|[\]().{}]/g;function Hl(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function Wl(t){return t.replace(ql,"\\$&")}function Vl(t){return new RegExp("^(?:"+t.map(Wl).join("|")+")","i")}function Gl(t){return new Map(t.map(((t,e)=>[t.toLowerCase(),e])))}function Xl(t,e,n){var r=zl.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Zl(t,e,n){var r=zl.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ql(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Kl(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Jl(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function th(t,e,n){var r=zl.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function eh(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function nh(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function rh(t,e,n){var r=zl.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function ih(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ah(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function oh(t,e,n){var r=zl.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function sh(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ch(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function uh(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function lh(t,e,n){var r=zl.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function hh(t,e,n){var r=zl.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function fh(t,e,n){var r=$l.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function dh(t,e,n){var r=zl.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function ph(t,e,n){var r=zl.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function gh(t,e){return Hl(t.getDate(),e,2)}function yh(t,e){return Hl(t.getHours(),e,2)}function mh(t,e){return Hl(t.getHours()%12||12,e,2)}function vh(t,e){return Hl(1+Dl.count(Ll(t),t),e,3)}function bh(t,e){return Hl(t.getMilliseconds(),e,3)}function _h(t,e){return bh(t,e)+"000"}function xh(t,e){return Hl(t.getMonth()+1,e,2)}function wh(t,e){return Hl(t.getMinutes(),e,2)}function kh(t,e){return Hl(t.getSeconds(),e,2)}function Th(t){var e=t.getDay();return 0===e?7:e}function Ch(t,e){return Hl(kl.count(Ll(t)-1,t),e,2)}function Eh(t){var e=t.getDay();return e>=4||0===e?Sl(t):Sl.ceil(t)}function Sh(t,e){return t=Eh(t),Hl(Sl.count(Ll(t),t)+(4===Ll(t).getDay()),e,2)}function Ah(t){return t.getDay()}function Mh(t,e){return Hl(Tl.count(Ll(t)-1,t),e,2)}function Nh(t,e){return Hl(t.getFullYear()%100,e,2)}function Dh(t,e){return Hl((t=Eh(t)).getFullYear()%100,e,2)}function Bh(t,e){return Hl(t.getFullYear()%1e4,e,4)}function Lh(t,e){var n=t.getDay();return Hl((t=n>=4||0===n?Sl(t):Sl.ceil(t)).getFullYear()%1e4,e,4)}function Oh(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Hl(e/60|0,"0",2)+Hl(e%60,"0",2)}function Ih(t,e){return Hl(t.getUTCDate(),e,2)}function Rh(t,e){return Hl(t.getUTCHours(),e,2)}function Fh(t,e){return Hl(t.getUTCHours()%12||12,e,2)}function Ph(t,e){return Hl(1+xl.count(Il(t),t),e,3)}function Yh(t,e){return Hl(t.getUTCMilliseconds(),e,3)}function jh(t,e){return Yh(t,e)+"000"}function Uh(t,e){return Hl(t.getUTCMonth()+1,e,2)}function zh(t,e){return Hl(t.getUTCMinutes(),e,2)}function $h(t,e){return Hl(t.getUTCSeconds(),e,2)}function qh(t){var e=t.getUTCDay();return 0===e?7:e}function Hh(t,e){return Hl(dl.count(Il(t)-1,t),e,2)}function Wh(t){var e=t.getUTCDay();return e>=4||0===e?ml(t):ml.ceil(t)}function Vh(t,e){return t=Wh(t),Hl(ml.count(Il(t),t)+(4===Il(t).getUTCDay()),e,2)}function Gh(t){return t.getUTCDay()}function Xh(t,e){return Hl(pl.count(Il(t)-1,t),e,2)}function Zh(t,e){return Hl(t.getUTCFullYear()%100,e,2)}function Qh(t,e){return Hl((t=Wh(t)).getUTCFullYear()%100,e,2)}function Kh(t,e){return Hl(t.getUTCFullYear()%1e4,e,4)}function Jh(t,e){var n=t.getUTCDay();return Hl((t=n>=4||0===n?ml(t):ml.ceil(t)).getUTCFullYear()%1e4,e,4)}function tf(){return"+0000"}function ef(){return"%"}function nf(t){return+t}function rf(t){return Math.floor(+t/1e3)}Yl=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,u=Vl(i),l=Gl(i),h=Vl(a),f=Gl(a),d=Vl(o),p=Gl(o),g=Vl(s),y=Gl(s),m=Vl(c),v=Gl(c),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:gh,e:gh,f:_h,g:Dh,G:Lh,H:yh,I:mh,j:vh,L:bh,m:xh,M:wh,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:nf,s:rf,S:kh,u:Th,U:Ch,V:Sh,w:Ah,W:Mh,x:null,X:null,y:Nh,Y:Bh,Z:Oh,"%":ef},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Ih,e:Ih,f:jh,g:Qh,G:Jh,H:Rh,I:Fh,j:Ph,L:Yh,m:Uh,M:zh,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:nf,s:rf,S:$h,u:qh,U:Hh,V:Vh,w:Gh,W:Xh,x:null,X:null,y:Zh,Y:Kh,Z:tf,"%":ef},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return T(t,e,n,r)},d:ah,e:ah,f:hh,g:eh,G:th,H:sh,I:sh,j:oh,L:lh,m:ih,M:ch,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=l.get(r[0].toLowerCase()),n+r[0].length):-1},q:rh,Q:dh,s:ph,S:uh,u:Zl,U:Ql,V:Kl,w:Xl,W:Jl,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:eh,Y:th,Z:nh,"%":fh};function w(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===t.charCodeAt(s)&&(o.push(t.slice(c,s)),null!=(i=Ul[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),c=s+1);return o.push(t.slice(c,s)),o.join("")}}function k(t,e){return function(n){var r,i,a=Pl(1900,void 0,1);if(T(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Fl(Pl(a.y,0,1))).getUTCDay(),r=i>4||0===i?pl.ceil(r):pl(r),r=xl.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Rl(Pl(a.y,0,1))).getDay(),r=i>4||0===i?Tl.ceil(r):Tl(r),r=Dl.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Fl(Pl(a.y,0,1)).getUTCDay():Rl(Pl(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Fl(a)):Rl(a)}}function T(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o<s;){if(r>=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in Ul?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),{format:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),jl=Yl.format,Yl.parse,Yl.utcFormat,Yl.utcParse;var af={value:()=>{}};function of(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new sf(r)}function sf(t){this._=t}function cf(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function uf(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function lf(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=af,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}sf.prototype=of.prototype={constructor:sf,on:function(t,e){var n,r=this._,i=cf(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=lf(r[n],t.name,e);else if(null==e)for(n in r)r[n]=lf(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=uf(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new sf(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};const hf=of;var ff,df,pf=0,gf=0,yf=0,mf=0,vf=0,bf=0,_f="object"==typeof performance&&performance.now?performance:Date,xf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function wf(){return vf||(xf(kf),vf=_f.now()+bf)}function kf(){vf=0}function Tf(){this._call=this._time=this._next=null}function Cf(t,e,n){var r=new Tf;return r.restart(t,e,n),r}function Ef(){vf=(mf=_f.now())+bf,pf=gf=0;try{!function(){wf(),++pf;for(var t,e=ff;e;)(t=vf-e._time)>=0&&e._call.call(void 0,t),e=e._next;--pf}()}finally{pf=0,function(){for(var t,e,n=ff,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:ff=e);df=t,Af(r)}(),vf=0}}function Sf(){var t=_f.now(),e=t-mf;e>1e3&&(bf-=e,mf=t)}function Af(t){pf||(gf&&(gf=clearTimeout(gf)),t-vf>24?(t<1/0&&(gf=setTimeout(Ef,t-_f.now()-bf)),yf&&(yf=clearInterval(yf))):(yf||(mf=_f.now(),yf=setInterval(Sf,1e3)),pf=1,xf(Ef)))}function Mf(t,e,n){var r=new Tf;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}Tf.prototype=Cf.prototype={constructor:Tf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?wf():+n)+(null==e?0:+e),this._next||df===this||(df?df._next=this:ff=this,df=this),this._call=t,this._time=n,Af()},stop:function(){this._call&&(this._call=null,this._time=1/0,Af())}};var Nf=hf("start","end","cancel","interrupt"),Df=[];function Bf(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(c){var u,l,h,f;if(1!==n.state)return s();for(u in i)if((f=i[u]).name===n.name){if(3===f.state)return Mf(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+u<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[u])}if(Mf((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,l=-1;u<h;++u)(f=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Cf((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Nf,tween:Df,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Lf(t,e){var n=If(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Of(t,e){var n=If(t,e);if(n.state>3)throw new Error("too late; already running");return n}function If(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Rf(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Ff,Pf=180/Math.PI,Yf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function jf(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*Pf,skewX:Math.atan(c)*Pf,scaleX:o,scaleY:s}}function Uf(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:Rf(t,i)},{i:c-2,x:Rf(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Rf(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Rf(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Rf(t,n)},{i:s-2,x:Rf(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var zf=Uf((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Yf:jf(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),$f=Uf((function(t){return null==t?Yf:(Ff||(Ff=document.createElementNS("http://www.w3.org/2000/svg","g")),Ff.setAttribute("transform",t),(t=Ff.transform.baseVal.consolidate())?jf((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Yf)}),", ",")",")");function qf(t,e){var n,r;return function(){var i=Of(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function Hf(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=Of(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}a.tween=i}}function Wf(t,e,n){var r=t._id;return t.each((function(){var t=Of(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return If(t,r).value[e]}}function Vf(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}const Gf=function t(e){var n=function(t){return 1==(t=+t)?Fr:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ir(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=ur(t)).r,(e=ur(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Fr(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function Xf(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=ur(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}Xf((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return Vf((n-r/e)*e,o,i,a,s)}})),Xf((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return Vf((n-r/e)*e,i,a,o,s)}}));var Zf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qf=new RegExp(Zf.source,"g");function Kf(t,e){var n,r,i,a=Zf.lastIndex=Qf.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=Zf.exec(t))&&(r=Qf.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:Rf(n,r)})),a=Qf.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function Jf(t,e){var n;return("number"==typeof e?Rf:e instanceof ar?Gf:(n=ar(e))?(e=n,Gf):Kf)(t,e)}function td(t){return function(){this.removeAttribute(t)}}function ed(t){return function(){this.removeAttributeNS(t.space,t.local)}}function nd(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function rd(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function id(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function ad(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function od(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function sd(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function cd(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&sd(t,i)),n}return i._value=e,i}function ud(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&od(t,i)),n}return i._value=e,i}function ld(t,e){return function(){Lf(this,t).delay=+e.apply(this,arguments)}}function hd(t,e){return e=+e,function(){Lf(this,t).delay=e}}function fd(t,e){return function(){Of(this,t).duration=+e.apply(this,arguments)}}function dd(t,e){return e=+e,function(){Of(this,t).duration=e}}function pd(t,e){if("function"!=typeof e)throw new Error;return function(){Of(this,t).ease=e}}function gd(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Lf:Of;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var yd=iu.prototype.constructor;function md(t){return function(){this.style.removeProperty(t)}}function vd(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function bd(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&vd(t,a,n)),r}return a._value=e,a}function _d(t){return function(e){this.textContent=t.call(this,e)}}function xd(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&_d(r)),e}return r._value=t,r}var wd=0;function kd(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Td(){return++wd}var Cd=iu.prototype;kd.prototype=function(t){return iu().transition(t)}.prototype={constructor:kd,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Hs(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,u=r[o],l=u.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=u[f])&&(c=t.call(s,s.__data__,f,u))&&("__data__"in s&&(c.__data__=s.__data__),h[f]=c,Bf(h[f],e,n,f,h,If(s,n)));return new kd(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Gs(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,u=r[s],l=u.length,h=0;h<l;++h)if(c=u[h]){for(var f,d=t.call(c,c.__data__,h,u),p=If(c,n),g=0,y=d.length;g<y;++g)(f=d[g])&&Bf(f,e,n,g,d,p);a.push(d),o.push(c)}return new kd(a,o,e,n)},selectChild:Cd.selectChild,selectChildren:Cd.selectChildren,filter:function(t){"function"!=typeof t&&(t=Xs(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new kd(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new kd(o,this._parents,this._name,this._id)},selection:function(){return new yd(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Td(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)if(o=s[u]){var l=If(o,e);Bf(o,t,n,u,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new kd(r,this._parents,t,n)},call:Cd.call,nodes:Cd.nodes,node:Cd.node,size:Cd.size,empty:Cd.empty,each:Cd.each,on:function(t,e){var n=this._id;return arguments.length<2?If(this.node(),n).on.on(t):this.each(gd(n,t,e))},attr:function(t,e){var n=hc(t),r="transform"===n?$f:Jf;return this.attrTween(t,"function"==typeof e?(n.local?ad:id)(n,r,Wf(this,"attr."+t,e)):null==e?(n.local?ed:td)(n):(n.local?rd:nd)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=hc(t);return this.tween(n,(r.local?cd:ud)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?zf:Jf;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=wc(this,t),o=(this.style.removeProperty(t),wc(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,md(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=wc(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=wc(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,Wf(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=Of(this,t),u=c.on,l=null==c.value[o]?a||(a=md(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(s,i=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=wc(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,bd(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Wf(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,xd(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=If(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?qf:Hf)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ld:hd)(e,t)):If(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?fd:dd)(e,t)):If(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(pd(e,t)):If(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;Of(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=Of(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e})),0===i&&a()}))},[Symbol.iterator]:Cd[Symbol.iterator]};var Ed={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Sd(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Ad(){}function Md(t){return null==t?Ad:function(){return this.querySelector(t)}}function Nd(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Dd(){return[]}function Bd(t){return null==t?Dd:function(){return this.querySelectorAll(t)}}function Ld(t){return function(){return this.matches(t)}}function Od(t){return function(e){return e.matches(t)}}iu.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}(this,t)}))},iu.prototype.transition=function(t){var e,n;t instanceof kd?(e=t._id,t=t._name):(e=Td(),(n=Ed).time=wf(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)(o=s[u])&&Bf(o,t,e,u,s,n||Sd(o,e));return new kd(r,this._parents,t,e)};var Id=Array.prototype.find;function Rd(){return this.firstElementChild}var Fd=Array.prototype.filter;function Pd(){return Array.from(this.children)}function Yd(t){return new Array(t.length)}function jd(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Ud(t){return function(){return t}}function zd(t,e,n,r,i,a){for(var o,s=0,c=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new jd(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function $d(t,e,n,r,i,a,o){var s,c,u,l=new Map,h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(d[s]=u=o.call(c,c.__data__,s,e)+"",l.has(u)?i[s]=c:l.set(u,c));for(s=0;s<f;++s)u=o.call(t,a[s],s,a)+"",(c=l.get(u))?(r[s]=c,c.__data__=a[s],l.delete(u)):n[s]=new jd(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&l.get(d[s])===c&&(i[s]=c)}function qd(t){return t.__data__}function Hd(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Wd(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}jd.prototype={constructor:jd,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Vd="http://www.w3.org/1999/xhtml";const Gd={svg:"http://www.w3.org/2000/svg",xhtml:Vd,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Xd(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Gd.hasOwnProperty(e)?{space:Gd[e],local:t}:t}function Zd(t){return function(){this.removeAttribute(t)}}function Qd(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Kd(t,e){return function(){this.setAttribute(t,e)}}function Jd(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function tp(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function ep(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function np(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function rp(t){return function(){this.style.removeProperty(t)}}function ip(t,e,n){return function(){this.style.setProperty(t,e,n)}}function ap(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function op(t,e){return t.style.getPropertyValue(e)||np(t).getComputedStyle(t,null).getPropertyValue(e)}function sp(t){return function(){delete this[t]}}function cp(t,e){return function(){this[t]=e}}function up(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function lp(t){return t.trim().split(/^|\s+/)}function hp(t){return t.classList||new fp(t)}function fp(t){this._node=t,this._names=lp(t.getAttribute("class")||"")}function dp(t,e){for(var n=hp(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function pp(t,e){for(var n=hp(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function gp(t){return function(){dp(this,t)}}function yp(t){return function(){pp(this,t)}}function mp(t,e){return function(){(e.apply(this,arguments)?dp:pp)(this,t)}}function vp(){this.textContent=""}function bp(t){return function(){this.textContent=t}}function _p(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function xp(){this.innerHTML=""}function wp(t){return function(){this.innerHTML=t}}function kp(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Tp(){this.nextSibling&&this.parentNode.appendChild(this)}function Cp(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ep(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Vd&&e.documentElement.namespaceURI===Vd?e.createElement(t):e.createElementNS(n,t)}}function Sp(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ap(t){var e=Xd(t);return(e.local?Sp:Ep)(e)}function Mp(){return null}function Np(){var t=this.parentNode;t&&t.removeChild(this)}function Dp(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Bp(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Lp(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Op(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Ip(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function Rp(t,e,n){var r=np(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Fp(t,e){return function(){return Rp(this,t,e)}}function Pp(t,e){return function(){return Rp(this,t,e.apply(this,arguments))}}fp.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Yp=[null];function jp(t,e){this._groups=t,this._parents=e}function Up(){return new jp([[document.documentElement]],Yp)}jp.prototype=Up.prototype={constructor:jp,select:function(t){"function"!=typeof t&&(t=Md(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,u=r[i]=new Array(c),l=0;l<c;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),u[l]=o);return new jp(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return Nd(t.apply(this,arguments))}}(t):Bd(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,u=0;u<c;++u)(o=s[u])&&(r.push(t.call(o,o.__data__,u,s)),i.push(o));return new jp(r,i)},selectChild:function(t){return this.select(null==t?Rd:function(t){return function(){return Id.call(this.children,t)}}("function"==typeof t?t:Od(t)))},selectChildren:function(t){return this.selectAll(null==t?Pd:function(t){return function(){return Fd.call(this.children,t)}}("function"==typeof t?t:Od(t)))},filter:function(t){"function"!=typeof t&&(t=Ld(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new jp(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,qd);var n=e?$d:zd,r=this._parents,i=this._groups;"function"!=typeof t&&(t=Ud(t));for(var a=i.length,o=new Array(a),s=new Array(a),c=new Array(a),u=0;u<a;++u){var l=r[u],h=i[u],f=h.length,d=Hd(t.call(l,l&&l.__data__,u,r)),p=d.length,g=s[u]=new Array(p),y=o[u]=new Array(p),m=c[u]=new Array(f);n(l,h,g,y,m,d,e);for(var v,b,_=0,x=0;_<p;++_)if(v=g[_]){for(_>=x&&(x=_+1);!(b=y[x])&&++x<p;);v._next=b||null}}return(o=new jp(o,r))._enter=s,o._exit=c,o},enter:function(){return new jp(this._enter||this._groups.map(Yd),this._parents)},exit:function(){return new jp(this._exit||this._groups.map(Yd),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),c=0;c<o;++c)for(var u,l=n[c],h=r[c],f=l.length,d=s[c]=new Array(f),p=0;p<f;++p)(u=l[p]||h[p])&&(d[p]=u);for(;c<i;++c)s[c]=n[c];return new jp(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Wd);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,u=i[a]=new Array(c),l=0;l<c;++l)(o=s[l])&&(u[l]=o);u.sort(e)}return new jp(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=Xd(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Qd:Zd:"function"==typeof e?n.local?ep:tp:n.local?Jd:Kd)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?rp:"function"==typeof e?ap:ip)(t,e,null==n?"":n)):op(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?sp:"function"==typeof e?up:cp)(t,e)):this.node()[t]},classed:function(t,e){var n=lp(t+"");if(arguments.length<2){for(var r=hp(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?mp:e?gp:yp)(n,e))},text:function(t){return arguments.length?this.each(null==t?vp:("function"==typeof t?_p:bp)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?xp:("function"==typeof t?kp:wp)(t)):this.node().innerHTML},raise:function(){return this.each(Tp)},lower:function(){return this.each(Cp)},append:function(t){var e="function"==typeof t?t:Ap(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Ap(t),r=null==e?Mp:"function"==typeof e?e:Md(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Np)},clone:function(t){return this.select(t?Bp:Dp)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=Lp(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?Ip:Op,r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,u=0,l=s.length;u<l;++u)for(r=0,c=s[u];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?Pp:Fp)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};const zp=Up;var $p={value:()=>{}};function qp(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Hp(r)}function Hp(t){this._=t}function Wp(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function Vp(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Gp(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=$p,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Hp.prototype=qp.prototype={constructor:Hp,on:function(t,e){var n,r=this._,i=Wp(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=Gp(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Gp(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=Vp(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Hp(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};const Xp=qp;var Zp,Qp,Kp=0,Jp=0,tg=0,eg=0,ng=0,rg=0,ig="object"==typeof performance&&performance.now?performance:Date,ag="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function og(){return ng||(ag(sg),ng=ig.now()+rg)}function sg(){ng=0}function cg(){this._call=this._time=this._next=null}function ug(t,e,n){var r=new cg;return r.restart(t,e,n),r}function lg(){ng=(eg=ig.now())+rg,Kp=Jp=0;try{!function(){og(),++Kp;for(var t,e=Zp;e;)(t=ng-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Kp}()}finally{Kp=0,function(){for(var t,e,n=Zp,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Zp=e);Qp=t,fg(r)}(),ng=0}}function hg(){var t=ig.now(),e=t-eg;e>1e3&&(rg-=e,eg=t)}function fg(t){Kp||(Jp&&(Jp=clearTimeout(Jp)),t-ng>24?(t<1/0&&(Jp=setTimeout(lg,t-ig.now()-rg)),tg&&(tg=clearInterval(tg))):(tg||(eg=ig.now(),tg=setInterval(hg,1e3)),Kp=1,ag(lg)))}function dg(t,e,n){var r=new cg;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}cg.prototype=ug.prototype={constructor:cg,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?og():+n)+(null==e?0:+e),this._next||Qp===this||(Qp?Qp._next=this:Zp=this,Qp=this),this._call=t,this._time=n,fg()},stop:function(){this._call&&(this._call=null,this._time=1/0,fg())}};var pg=Xp("start","end","cancel","interrupt"),gg=[];function yg(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(c){var u,l,h,f;if(1!==n.state)return s();for(u in i)if((f=i[u]).name===n.name){if(3===f.state)return dg(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+u<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[u])}if(dg((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,l=-1;u<h;++u)(f=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=ug((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:pg,tween:gg,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function mg(t,e){var n=bg(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function vg(t,e){var n=bg(t,e);if(n.state>3)throw new Error("too late; already running");return n}function bg(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function _g(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var xg,wg=180/Math.PI,kg={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Tg(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*wg,skewX:Math.atan(c)*wg,scaleX:o,scaleY:s}}function Cg(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:_g(t,i)},{i:c-2,x:_g(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:_g(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:_g(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:_g(t,n)},{i:s-2,x:_g(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var Eg=Cg((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?kg:Tg(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Sg=Cg((function(t){return null==t?kg:(xg||(xg=document.createElementNS("http://www.w3.org/2000/svg","g")),xg.setAttribute("transform",t),(t=xg.transform.baseVal.consolidate())?Tg((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):kg)}),", ",")",")");function Ag(t,e){var n,r;return function(){var i=vg(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function Mg(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=vg(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}a.tween=i}}function Ng(t,e,n){var r=t._id;return t.each((function(){var t=vg(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return bg(t,r).value[e]}}function Dg(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Bg(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Lg(){}var Og=.7,Ig=1.4285714285714286,Rg="\\s*([+-]?\\d+)\\s*",Fg="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pg="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yg=/^#([0-9a-f]{3,8})$/,jg=new RegExp("^rgb\\("+[Rg,Rg,Rg]+"\\)$"),Ug=new RegExp("^rgb\\("+[Pg,Pg,Pg]+"\\)$"),zg=new RegExp("^rgba\\("+[Rg,Rg,Rg,Fg]+"\\)$"),$g=new RegExp("^rgba\\("+[Pg,Pg,Pg,Fg]+"\\)$"),qg=new RegExp("^hsl\\("+[Fg,Pg,Pg]+"\\)$"),Hg=new RegExp("^hsla\\("+[Fg,Pg,Pg,Fg]+"\\)$"),Wg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Vg(){return this.rgb().formatHex()}function Gg(){return this.rgb().formatRgb()}function Xg(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Yg.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Zg(e):3===n?new ty(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Qg(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Qg(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=jg.exec(t))?new ty(e[1],e[2],e[3],1):(e=Ug.exec(t))?new ty(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=zg.exec(t))?Qg(e[1],e[2],e[3],e[4]):(e=$g.exec(t))?Qg(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=qg.exec(t))?iy(e[1],e[2]/100,e[3]/100,1):(e=Hg.exec(t))?iy(e[1],e[2]/100,e[3]/100,e[4]):Wg.hasOwnProperty(t)?Zg(Wg[t]):"transparent"===t?new ty(NaN,NaN,NaN,0):null}function Zg(t){return new ty(t>>16&255,t>>8&255,255&t,1)}function Qg(t,e,n,r){return r<=0&&(t=e=n=NaN),new ty(t,e,n,r)}function Kg(t){return t instanceof Lg||(t=Xg(t)),t?new ty((t=t.rgb()).r,t.g,t.b,t.opacity):new ty}function Jg(t,e,n,r){return 1===arguments.length?Kg(t):new ty(t,e,n,null==r?1:r)}function ty(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ey(){return"#"+ry(this.r)+ry(this.g)+ry(this.b)}function ny(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function ry(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function iy(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new oy(t,e,n,r)}function ay(t){if(t instanceof oy)return new oy(t.h,t.s,t.l,t.opacity);if(t instanceof Lg||(t=Xg(t)),!t)return new oy;if(t instanceof oy)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new oy(o,s,c,t.opacity)}function oy(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function sy(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function cy(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}Dg(Lg,Xg,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Vg,formatHex:Vg,formatHsl:function(){return ay(this).formatHsl()},formatRgb:Gg,toString:Gg}),Dg(ty,Jg,Bg(Lg,{brighter:function(t){return t=null==t?Ig:Math.pow(Ig,t),new ty(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Og:Math.pow(Og,t),new ty(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ey,formatHex:ey,formatRgb:ny,toString:ny})),Dg(oy,(function(t,e,n,r){return 1===arguments.length?ay(t):new oy(t,e,n,null==r?1:r)}),Bg(Lg,{brighter:function(t){return t=null==t?Ig:Math.pow(Ig,t),new oy(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Og:Math.pow(Og,t),new oy(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ty(sy(t>=240?t-240:t+120,i,r),sy(t,i,r),sy(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const uy=t=>()=>t;function ly(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):uy(isNaN(t)?e:t)}const hy=function t(e){var n=function(t){return 1==(t=+t)?ly:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):uy(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=Jg(t)).r,(e=Jg(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=ly(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function fy(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=Jg(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}fy((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return cy((n-r/e)*e,o,i,a,s)}})),fy((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return cy((n-r/e)*e,i,a,o,s)}}));var dy=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,py=new RegExp(dy.source,"g");function gy(t,e){var n,r,i,a=dy.lastIndex=py.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=dy.exec(t))&&(r=py.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:_g(n,r)})),a=py.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function yy(t,e){var n;return("number"==typeof e?_g:e instanceof Xg?hy:(n=Xg(e))?(e=n,hy):gy)(t,e)}function my(t){return function(){this.removeAttribute(t)}}function vy(t){return function(){this.removeAttributeNS(t.space,t.local)}}function by(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function _y(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function xy(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function wy(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function ky(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Ty(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Cy(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Ty(t,i)),n}return i._value=e,i}function Ey(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&ky(t,i)),n}return i._value=e,i}function Sy(t,e){return function(){mg(this,t).delay=+e.apply(this,arguments)}}function Ay(t,e){return e=+e,function(){mg(this,t).delay=e}}function My(t,e){return function(){vg(this,t).duration=+e.apply(this,arguments)}}function Ny(t,e){return e=+e,function(){vg(this,t).duration=e}}function Dy(t,e){if("function"!=typeof e)throw new Error;return function(){vg(this,t).ease=e}}function By(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?mg:vg;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Ly=zp.prototype.constructor;function Oy(t){return function(){this.style.removeProperty(t)}}function Iy(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Ry(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Iy(t,a,n)),r}return a._value=e,a}function Fy(t){return function(e){this.textContent=t.call(this,e)}}function Py(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Fy(r)),e}return r._value=t,r}var Yy=0;function jy(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Uy(){return++Yy}var zy=zp.prototype;jy.prototype=function(t){return zp().transition(t)}.prototype={constructor:jy,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Md(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,u=r[o],l=u.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=u[f])&&(c=t.call(s,s.__data__,f,u))&&("__data__"in s&&(c.__data__=s.__data__),h[f]=c,yg(h[f],e,n,f,h,bg(s,n)));return new jy(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Bd(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,u=r[s],l=u.length,h=0;h<l;++h)if(c=u[h]){for(var f,d=t.call(c,c.__data__,h,u),p=bg(c,n),g=0,y=d.length;g<y;++g)(f=d[g])&&yg(f,e,n,g,d,p);a.push(d),o.push(c)}return new jy(a,o,e,n)},selectChild:zy.selectChild,selectChildren:zy.selectChildren,filter:function(t){"function"!=typeof t&&(t=Ld(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new jy(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new jy(o,this._parents,this._name,this._id)},selection:function(){return new Ly(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Uy(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)if(o=s[u]){var l=bg(o,e);yg(o,t,n,u,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new jy(r,this._parents,t,n)},call:zy.call,nodes:zy.nodes,node:zy.node,size:zy.size,empty:zy.empty,each:zy.each,on:function(t,e){var n=this._id;return arguments.length<2?bg(this.node(),n).on.on(t):this.each(By(n,t,e))},attr:function(t,e){var n=Xd(t),r="transform"===n?Sg:yy;return this.attrTween(t,"function"==typeof e?(n.local?wy:xy)(n,r,Ng(this,"attr."+t,e)):null==e?(n.local?vy:my)(n):(n.local?_y:by)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Xd(t);return this.tween(n,(r.local?Cy:Ey)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Eg:yy;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=op(this,t),o=(this.style.removeProperty(t),op(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Oy(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=op(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=op(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,Ng(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=vg(this,t),u=c.on,l=null==c.value[o]?a||(a=Oy(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(s,i=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=op(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Ry(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Ng(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Py(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=bg(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?Ag:Mg)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Sy:Ay)(e,t)):bg(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?My:Ny)(e,t)):bg(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Dy(e,t)):bg(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;vg(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=vg(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e})),0===i&&a()}))},[Symbol.iterator]:zy[Symbol.iterator]};var $y={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function qy(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Hy(t,e,n){this.k=t,this.x=e,this.y=n}zp.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}(this,t)}))},zp.prototype.transition=function(t){var e,n;t instanceof jy?(e=t._id,t=t._name):(e=Uy(),(n=$y).time=og(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)(o=s[u])&&yg(o,t,e,u,s,n||qy(o,e));return new jy(r,this._parents,t,e)},Hy.prototype={constructor:Hy,scale:function(t){return 1===t?this:new Hy(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Hy(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new Hy(1,0,0),Hy.prototype;var Wy="comm",Vy="rule",Gy="decl",Xy=Math.abs,Zy=String.fromCharCode;function Qy(t){return t.trim()}function Ky(t,e,n){return t.replace(e,n)}function Jy(t,e){return t.indexOf(e)}function tm(t,e){return 0|t.charCodeAt(e)}function em(t,e,n){return t.slice(e,n)}function nm(t){return t.length}function rm(t){return t.length}function im(t,e){return e.push(t),t}function am(t,e){for(var n="",r=rm(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function om(t,e,n,r){switch(t.type){case"@import":case Gy:return t.return=t.return||t.value;case Wy:return"";case"@keyframes":return t.return=t.value+"{"+am(t.children,r)+"}";case Vy:t.value=t.props.join(",")}return nm(n=am(t.children,r))?t.return=t.value+"{"+n+"}":""}Object.assign;var sm=1,cm=1,um=0,lm=0,hm=0,fm="";function dm(t,e,n,r,i,a,o){return{value:t,root:e,parent:n,type:r,props:i,children:a,line:sm,column:cm,length:o,return:""}}function pm(){return hm=lm>0?tm(fm,--lm):0,cm--,10===hm&&(cm=1,sm--),hm}function gm(){return hm=lm<um?tm(fm,lm++):0,cm++,10===hm&&(cm=1,sm++),hm}function ym(){return tm(fm,lm)}function mm(){return lm}function vm(t,e){return em(fm,t,e)}function bm(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function _m(t){return Qy(vm(lm-1,km(91===t?t+2:40===t?t+1:t)))}function xm(t){for(;(hm=ym())&&hm<33;)gm();return bm(t)>2||bm(hm)>3?"":" "}function wm(t,e){for(;--e&&gm()&&!(hm<48||hm>102||hm>57&&hm<65||hm>70&&hm<97););return vm(t,mm()+(e<6&&32==ym()&&32==gm()))}function km(t){for(;gm();)switch(hm){case t:return lm;case 34:case 39:34!==t&&39!==t&&km(hm);break;case 40:41===t&&km(t);break;case 92:gm()}return lm}function Tm(t,e){for(;gm()&&t+hm!==57&&(t+hm!==84||47!==ym()););return"/*"+vm(e,lm-1)+"*"+Zy(47===t?t:gm())}function Cm(t){for(;!bm(ym());)gm();return vm(t,lm)}function Em(t){return function(t){return fm="",t}(Sm("",null,null,null,[""],t=function(t){return sm=cm=1,um=nm(fm=t),lm=0,[]}(t),0,[0],t))}function Sm(t,e,n,r,i,a,o,s,c){for(var u=0,l=0,h=o,f=0,d=0,p=0,g=1,y=1,m=1,v=0,b="",_=i,x=a,w=r,k=b;y;)switch(p=v,v=gm()){case 40:if(108!=p&&58==k.charCodeAt(h-1)){-1!=Jy(k+=Ky(_m(v),"&","&\f"),"&\f")&&(m=-1);break}case 34:case 39:case 91:k+=_m(v);break;case 9:case 10:case 13:case 32:k+=xm(p);break;case 92:k+=wm(mm()-1,7);continue;case 47:switch(ym()){case 42:case 47:im(Mm(Tm(gm(),mm()),e,n),c);break;default:k+="/"}break;case 123*g:s[u++]=nm(k)*m;case 125*g:case 59:case 0:switch(v){case 0:case 125:y=0;case 59+l:d>0&&nm(k)-h&&im(d>32?Nm(k+";",r,n,h-1):Nm(Ky(k," ","")+";",r,n,h-2),c);break;case 59:k+=";";default:if(im(w=Am(k,e,n,u,l,i,s,b,_=[],x=[],h),a),123===v)if(0===l)Sm(k,e,w,w,_,a,h,s,x);else switch(f){case 100:case 109:case 115:Sm(t,w,w,r&&im(Am(t,w,w,0,0,i,s,b,i,_=[],h),x),i,x,h,s,r?_:x);break;default:Sm(k,w,w,w,[""],x,0,s,x)}}u=l=d=0,g=m=1,b=k="",h=o;break;case 58:h=1+nm(k),d=p;default:if(g<1)if(123==v)--g;else if(125==v&&0==g++&&125==pm())continue;switch(k+=Zy(v),v*g){case 38:m=l>0?1:(k+="\f",-1);break;case 44:s[u++]=(nm(k)-1)*m,m=1;break;case 64:45===ym()&&(k+=_m(gm())),f=ym(),l=h=nm(b=k+=Cm(mm())),v++;break;case 45:45===p&&2==nm(k)&&(g=0)}}return a}function Am(t,e,n,r,i,a,o,s,c,u,l){for(var h=i-1,f=0===i?a:[""],d=rm(f),p=0,g=0,y=0;p<r;++p)for(var m=0,v=em(t,h+1,h=Xy(g=o[p])),b=t;m<d;++m)(b=Qy(g>0?f[m]+" "+v:Ky(v,/&\f/g,f[m])))&&(c[y++]=b);return dm(t,e,n,0===i?Vy:s,c,u,l)}function Mm(t,e,n){return dm(t,e,n,Wy,Zy(hm),em(t,2,-2),0)}function Nm(t,e,n,r){return dm(t,e,n,Gy,em(t,0,r),em(t,r+1,-1),r)}const Dm="9.1.1";var Bm=n(7967),Lm=n(7856),Om=n.n(Lm),Im=function(t){var e=t.replace(/\\u[\dA-F]{4}/gi,(function(t){return String.fromCharCode(parseInt(t.replace(/\\u/g,""),16))}));return e=(e=(e=e.replace(/\\x([0-9a-f]{2})/gi,(function(t,e){return String.fromCharCode(parseInt(e,16))}))).replace(/\\[\d\d\d]{3}/gi,(function(t){return String.fromCharCode(parseInt(t.replace(/\\/g,""),8))}))).replace(/\\[\d\d\d]{2}/gi,(function(t){return String.fromCharCode(parseInt(t.replace(/\\/g,""),8))}))},Rm=function(t){for(var e="",n=0;n>=0;){if(!((n=t.indexOf("<script"))>=0)){e+=t,n=-1;break}e+=t.substr(0,n),(n=(t=t.substr(n+1)).indexOf("<\/script>"))>=0&&(n+=9,t=t.substr(n))}var r=Im(e);return(r=(r=(r=(r=r.replaceAll(/script>/gi,"#")).replaceAll(/javascript:/gi,"#")).replaceAll(/javascript&colon/gi,"#")).replaceAll(/onerror=/gi,"onerror:")).replaceAll(/<iframe/gi,"")},Fm=function(t,e){var n=t,r=!0;if(!e.flowchart||!1!==e.flowchart.htmlLabels&&"false"!==e.flowchart.htmlLabels||(r=!1),r){var i=e.securityLevel;"antiscript"===i||"strict"===i?n=Rm(n):"loose"!==i&&(n=(n=(n=Um(n)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),n=jm(n))}return n},Pm=function(t,e){return t?e.dompurifyConfig?Om().sanitize(Fm(t,e),e.dompurifyConfig):Om().sanitize(Fm(t,e)):t},Ym=/<br\s*\/?>/gi,jm=function(t){return t.replace(/#br#/g,"<br/>")},Um=function(t){return t.replace(Ym,"#br#")},zm=function(t){return"false"!==t&&!1!==t};const $m={getRows:function(t){if(!t)return 1;var e=Um(t);return(e=e.replace(/\\n/g,"#br#")).split("#br#")},sanitizeText:Pm,sanitizeTextOrArray:function(t,e){return"string"==typeof t?Pm(t,e):t.flat().map((function(t){return Pm(t,e)}))},hasBreaks:function(t){return Ym.test(t)},splitBreaks:function(t){return t.split(Ym)},lineBreakRegex:Ym,removeScript:Rm,getUrl:function(t){var e="";return t&&(e=(e=(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e},evaluate:zm,removeEscapes:Im},qm={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t),hsl2rgb:({h:t,s:e,l:n},r)=>{if(!e)return 2.55*n;t/=360,e/=100;const i=(n/=100)<.5?n*(1+e):n+e-n*e,a=2*n-i;switch(r){case"r":return 255*qm.hue2rgb(a,i,t+1/3);case"g":return 255*qm.hue2rgb(a,i,t);case"b":return 255*qm.hue2rgb(a,i,t-1/3)}},rgb2hsl:({r:t,g:e,b:n},r)=>{t/=255,e/=255,n/=255;const i=Math.max(t,e,n),a=Math.min(t,e,n),o=(i+a)/2;if("l"===r)return 100*o;if(i===a)return 0;const s=i-a;if("s"===r)return 100*(o>.5?s/(2-i-a):s/(i+a));switch(i){case t:return 60*((e-n)/s+(e<n?6:0));case e:return 60*((n-t)/s+2);case n:return 60*((t-e)/s+4);default:return-1}}},Hm={clamp:(t,e,n)=>e>n?Math.min(e,Math.max(n,t)):Math.min(n,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},Wm={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},Vm={channel:qm,lang:Hm,unit:Wm},Gm={};for(let t=0;t<=255;t++)Gm[t]=Vm.unit.dec2hex(t);const Xm=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new class{constructor(){this.type=0}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=0}is(t){return this.type===t}}}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=0,this}_ensureHSL(){const t=this.data,{h:e,s:n,l:r}=t;void 0===e&&(t.h=Vm.channel.rgb2hsl(t,"h")),void 0===n&&(t.s=Vm.channel.rgb2hsl(t,"s")),void 0===r&&(t.l=Vm.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:n,b:r}=t;void 0===e&&(t.r=Vm.channel.hsl2rgb(t,"r")),void 0===n&&(t.g=Vm.channel.hsl2rgb(t,"g")),void 0===r&&(t.b=Vm.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(2)||void 0===e?(this._ensureHSL(),Vm.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(2)||void 0===e?(this._ensureHSL(),Vm.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(2)||void 0===e?(this._ensureHSL(),Vm.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(1)||void 0===e?(this._ensureRGB(),Vm.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(1)||void 0===e?(this._ensureRGB(),Vm.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(1)||void 0===e?(this._ensureRGB(),Vm.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(1),this.changed=!0,this.data.r=t}set g(t){this.type.set(1),this.changed=!0,this.data.g=t}set b(t){this.type.set(1),this.changed=!0,this.data.b=t}set h(t){this.type.set(2),this.changed=!0,this.data.h=t}set s(t){this.type.set(2),this.changed=!0,this.data.s=t}set l(t){this.type.set(2),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent"),Zm={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(Zm.re);if(!e)return;const n=e[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,c=o?8:4,u=a?0:-1,l=o?255:15;return Xm.set({r:(r>>c*(u+3)&l)*s,g:(r>>c*(u+2)&l)*s,b:(r>>c*(u+1)&l)*s,a:a?(r&l)*s/255:1},t)},stringify:t=>{const{r:e,g:n,b:r,a:i}=t;return i<1?`#${Gm[Math.round(e)]}${Gm[Math.round(n)]}${Gm[Math.round(r)]}${Gm[Math.round(255*i)]}`:`#${Gm[Math.round(e)]}${Gm[Math.round(n)]}${Gm[Math.round(r)]}`}},Qm=Zm,Km={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(Km.hueRe);if(e){const[,t,n]=e;switch(n){case"grad":return Vm.channel.clamp.h(.9*parseFloat(t));case"rad":return Vm.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return Vm.channel.clamp.h(360*parseFloat(t))}}return Vm.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const n=t.match(Km.re);if(!n)return;const[,r,i,a,o,s]=n;return Xm.set({h:Km._hue2deg(r),s:Vm.channel.clamp.s(parseFloat(i)),l:Vm.channel.clamp.l(parseFloat(a)),a:o?Vm.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},t)},stringify:t=>{const{h:e,s:n,l:r,a:i}=t;return i<1?`hsla(${Vm.lang.round(e)}, ${Vm.lang.round(n)}%, ${Vm.lang.round(r)}%, ${i})`:`hsl(${Vm.lang.round(e)}, ${Vm.lang.round(n)}%, ${Vm.lang.round(r)}%)`}},Jm=Km,tv={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=tv.colors[t];if(e)return Qm.parse(e)},stringify:t=>{const e=Qm.stringify(t);for(const t in tv.colors)if(tv.colors[t]===e)return t}},ev=tv,nv={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const n=t.match(nv.re);if(!n)return;const[,r,i,a,o,s,c,u,l]=n;return Xm.set({r:Vm.channel.clamp.r(i?2.55*parseFloat(r):parseFloat(r)),g:Vm.channel.clamp.g(o?2.55*parseFloat(a):parseFloat(a)),b:Vm.channel.clamp.b(c?2.55*parseFloat(s):parseFloat(s)),a:u?Vm.channel.clamp.a(l?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:n,b:r,a:i}=t;return i<1?`rgba(${Vm.lang.round(e)}, ${Vm.lang.round(n)}, ${Vm.lang.round(r)}, ${Vm.lang.round(i)})`:`rgb(${Vm.lang.round(e)}, ${Vm.lang.round(n)}, ${Vm.lang.round(r)})`}},rv=nv,iv={format:{keyword:ev,hex:Qm,rgb:rv,rgba:rv,hsl:Jm,hsla:Jm},parse:t=>{if("string"!=typeof t)return t;const e=Qm.parse(t)||rv.parse(t)||Jm.parse(t)||ev.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(2)||void 0===t.data.r?Jm.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?rv.stringify(t):Qm.stringify(t)},av=iv,ov=(t,e)=>{const n=av.parse(t);for(const t in e)n[t]=Vm.channel.clamp[t](e[t]);return av.stringify(n)},sv=(t,e)=>{const n=av.parse(t),r={};for(const t in e)e[t]&&(r[t]=n[t]+e[t]);return ov(t,r)},cv=(t,e,n=0,r=1)=>{if("number"!=typeof t)return ov(t,{a:e});const i=Xm.set({r:Vm.channel.clamp.r(t),g:Vm.channel.clamp.g(e),b:Vm.channel.clamp.b(n),a:Vm.channel.clamp.a(r)});return av.stringify(i)},uv=(t,e=100)=>{const n=av.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,((t,e,n=50)=>{const{r,g:i,b:a,a:o}=av.parse(t),{r:s,g:c,b:u,a:l}=av.parse(e),h=n/100,f=2*h-1,d=o-l,p=((f*d==-1?f:(f+d)/(1+f*d))+1)/2,g=1-p;return cv(r*p+s*g,i*p+c*g,a*p+u*g,o*h+l*(1-h))})(n,t,e)},lv=(t,e,n)=>{const r=av.parse(t),i=r[e],a=Vm.channel.clamp[e](i+n);return i!==a&&(r[e]=a),av.stringify(r)},hv=(t,e)=>lv(t,"l",-e),fv=(t,e)=>lv(t,"l",e);var dv=function(t,e){return sv(t,e?{s:-40,l:10}:{s:-40,l:-10})};function pv(t){return pv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pv(t)}function gv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var yv=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.darkMode=!1,this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}var e,n;return e=t,n=[{key:"updateColors",value:function(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||sv(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||sv(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||dv(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||dv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||dv(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||dv(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||uv(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||uv(this.tertiaryColor),this.lineColor=this.lineColor||uv(this.background),this.textColor=this.textColor||this.primaryTextColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?hv(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||hv(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||uv(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||fv(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||sv(this.primaryColor,{h:64}),this.fillType3=this.fillType3||sv(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||sv(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||sv(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||sv(this.primaryColor,{h:128}),this.fillType7=this.fillType7||sv(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||sv(this.primaryColor,{l:-10}),this.pie5=this.pie5||sv(this.secondaryColor,{l:-10}),this.pie6=this.pie6||sv(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||sv(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||sv(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||sv(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||sv(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||sv(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||sv(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?hv(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||sv(this.primaryColor,{h:-30}),this.git4=this.git4||sv(this.primaryColor,{h:-60}),this.git5=this.git5||sv(this.primaryColor,{h:-90}),this.git6=this.git6||sv(this.primaryColor,{h:60}),this.git7=this.git7||sv(this.primaryColor,{h:120}),this.darkMode?(this.git0=fv(this.git0,25),this.git1=fv(this.git1,25),this.git2=fv(this.git2,25),this.git3=fv(this.git3,25),this.git4=fv(this.git4,25),this.git5=fv(this.git5,25),this.git6=fv(this.git6,25),this.git7=fv(this.git7,25)):(this.git0=hv(this.git0,25),this.git1=hv(this.git1,25),this.git2=hv(this.git2,25),this.git3=hv(this.git3,25),this.git4=hv(this.git4,25),this.git5=hv(this.git5,25),this.git6=hv(this.git6,25),this.git7=hv(this.git7,25)),this.gitInv0=this.gitInv0||uv(this.git0),this.gitInv1=this.gitInv1||uv(this.git1),this.gitInv2=this.gitInv2||uv(this.git2),this.gitInv3=this.gitInv3||uv(this.git3),this.gitInv4=this.gitInv4||uv(this.git4),this.gitInv5=this.gitInv5||uv(this.git5),this.gitInv6=this.gitInv6||uv(this.git6),this.gitInv7=this.gitInv7||uv(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor}},{key:"calculate",value:function(t){var e=this;if("object"===pv(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}],n&&gv(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function mv(t){return mv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mv(t)}function vv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var bv=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=fv(this.primaryColor,16),this.tertiaryColor=sv(this.primaryColor,{h:-160}),this.primaryBorderColor=uv(this.background),this.secondaryBorderColor=dv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dv(this.tertiaryColor,this.darkMode),this.primaryTextColor=uv(this.primaryColor),this.secondaryTextColor=uv(this.secondaryColor),this.tertiaryTextColor=uv(this.tertiaryColor),this.lineColor=uv(this.background),this.textColor=uv(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=fv(uv("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=cv(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=hv("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=cv(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=cv(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}var e,n;return e=t,n=[{key:"updateColors",value:function(){this.secondBkg=fv(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=fv(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=fv(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=sv(this.primaryColor,{h:64}),this.fillType3=sv(this.secondaryColor,{h:64}),this.fillType4=sv(this.primaryColor,{h:-64}),this.fillType5=sv(this.secondaryColor,{h:-64}),this.fillType6=sv(this.primaryColor,{h:128}),this.fillType7=sv(this.secondaryColor,{h:128}),this.pie1=this.pie1||"#0b0000",this.pie2=this.pie2||"#4d1037",this.pie3=this.pie3||"#3f5258",this.pie4=this.pie4||"#4f2f1b",this.pie5=this.pie5||"#6e0a0a",this.pie6=this.pie6||"#3b0048",this.pie7=this.pie7||"#995a01",this.pie8=this.pie8||"#154706",this.pie9=this.pie9||"#161722",this.pie10=this.pie10||"#00296f",this.pie11=this.pie11||"#01629c",this.pie12=this.pie12||"#010029",this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?hv(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=fv(this.secondaryColor,20),this.git1=fv(this.pie2||this.secondaryColor,20),this.git2=fv(this.pie3||this.tertiaryColor,20),this.git3=fv(this.pie4||sv(this.primaryColor,{h:-30}),20),this.git4=fv(this.pie5||sv(this.primaryColor,{h:-60}),20),this.git5=fv(this.pie6||sv(this.primaryColor,{h:-90}),10),this.git6=fv(this.pie7||sv(this.primaryColor,{h:60}),10),this.git7=fv(this.pie8||sv(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||uv(this.git0),this.gitInv1=this.gitInv1||uv(this.git1),this.gitInv2=this.gitInv2||uv(this.git2),this.gitInv3=this.gitInv3||uv(this.git3),this.gitInv4=this.gitInv4||uv(this.git4),this.gitInv5=this.gitInv5||uv(this.git5),this.gitInv6=this.gitInv6||uv(this.git6),this.gitInv7=this.gitInv7||uv(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor}},{key:"calculate",value:function(t){var e=this;if("object"===mv(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}],n&&vv(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function _v(t){return _v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_v(t)}function xv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var wv=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=sv(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=sv(this.primaryColor,{h:-160}),this.primaryBorderColor=dv(this.primaryColor,this.darkMode),this.secondaryBorderColor=dv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dv(this.tertiaryColor,this.darkMode),this.primaryTextColor=uv(this.primaryColor),this.secondaryTextColor=uv(this.secondaryColor),this.tertiaryTextColor=uv(this.tertiaryColor),this.lineColor=uv(this.background),this.textColor=uv(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=cv(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}var e,n;return e=t,n=[{key:"updateColors",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=fv(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=sv(this.primaryColor,{h:64}),this.fillType3=sv(this.secondaryColor,{h:64}),this.fillType4=sv(this.primaryColor,{h:-64}),this.fillType5=sv(this.secondaryColor,{h:-64}),this.fillType6=sv(this.primaryColor,{h:128}),this.fillType7=sv(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||sv(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||sv(this.primaryColor,{l:-10}),this.pie5=this.pie5||sv(this.secondaryColor,{l:-30}),this.pie6=this.pie6||sv(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||sv(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||sv(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||sv(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||sv(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||sv(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||sv(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||sv(this.primaryColor,{h:-30}),this.git4=this.git4||sv(this.primaryColor,{h:-60}),this.git5=this.git5||sv(this.primaryColor,{h:-90}),this.git6=this.git6||sv(this.primaryColor,{h:60}),this.git7=this.git7||sv(this.primaryColor,{h:120}),this.darkMode?(this.git0=fv(this.git0,25),this.git1=fv(this.git1,25),this.git2=fv(this.git2,25),this.git3=fv(this.git3,25),this.git4=fv(this.git4,25),this.git5=fv(this.git5,25),this.git6=fv(this.git6,25),this.git7=fv(this.git7,25)):(this.git0=hv(this.git0,25),this.git1=hv(this.git1,25),this.git2=hv(this.git2,25),this.git3=hv(this.git3,25),this.git4=hv(this.git4,25),this.git5=hv(this.git5,25),this.git6=hv(this.git6,25),this.git7=hv(this.git7,25)),this.gitInv0=this.gitInv0||hv(uv(this.git0),25),this.gitInv1=this.gitInv1||uv(this.git1),this.gitInv2=this.gitInv2||uv(this.git2),this.gitInv3=this.gitInv3||uv(this.git3),this.gitInv4=this.gitInv4||uv(this.git4),this.gitInv5=this.gitInv5||uv(this.git5),this.gitInv6=this.gitInv6||uv(this.git6),this.gitInv7=this.gitInv7||uv(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||uv(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||uv(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor}},{key:"calculate",value:function(t){var e=this;if("object"===_v(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}],n&&xv(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function kv(t){return kv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kv(t)}function Tv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Cv=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=fv("#cde498",10),this.primaryBorderColor=dv(this.primaryColor,this.darkMode),this.secondaryBorderColor=dv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dv(this.tertiaryColor,this.darkMode),this.primaryTextColor=uv(this.primaryColor),this.secondaryTextColor=uv(this.secondaryColor),this.tertiaryTextColor=uv(this.primaryColor),this.lineColor=uv(this.background),this.textColor=uv(this.background),this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,n;return e=t,n=[{key:"updateColors",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=hv(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=sv(this.primaryColor,{h:64}),this.fillType3=sv(this.secondaryColor,{h:64}),this.fillType4=sv(this.primaryColor,{h:-64}),this.fillType5=sv(this.secondaryColor,{h:-64}),this.fillType6=sv(this.primaryColor,{h:128}),this.fillType7=sv(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||sv(this.primaryColor,{l:-30}),this.pie5=this.pie5||sv(this.secondaryColor,{l:-30}),this.pie6=this.pie6||sv(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||sv(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||sv(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||sv(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||sv(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||sv(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||sv(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||sv(this.primaryColor,{h:-30}),this.git4=this.git4||sv(this.primaryColor,{h:-60}),this.git5=this.git5||sv(this.primaryColor,{h:-90}),this.git6=this.git6||sv(this.primaryColor,{h:60}),this.git7=this.git7||sv(this.primaryColor,{h:120}),this.darkMode?(this.git0=fv(this.git0,25),this.git1=fv(this.git1,25),this.git2=fv(this.git2,25),this.git3=fv(this.git3,25),this.git4=fv(this.git4,25),this.git5=fv(this.git5,25),this.git6=fv(this.git6,25),this.git7=fv(this.git7,25)):(this.git0=hv(this.git0,25),this.git1=hv(this.git1,25),this.git2=hv(this.git2,25),this.git3=hv(this.git3,25),this.git4=hv(this.git4,25),this.git5=hv(this.git5,25),this.git6=hv(this.git6,25),this.git7=hv(this.git7,25)),this.gitInv0=this.gitInv0||uv(this.git0),this.gitInv1=this.gitInv1||uv(this.git1),this.gitInv2=this.gitInv2||uv(this.git2),this.gitInv3=this.gitInv3||uv(this.git3),this.gitInv4=this.gitInv4||uv(this.git4),this.gitInv5=this.gitInv5||uv(this.git5),this.gitInv6=this.gitInv6||uv(this.git6),this.gitInv7=this.gitInv7||uv(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor}},{key:"calculate",value:function(t){var e=this;if("object"===kv(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}],n&&Tv(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ev(t){return Ev="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ev(t)}function Sv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Av=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=fv(this.contrast,55),this.background="#ffffff",this.tertiaryColor=sv(this.primaryColor,{h:-160}),this.primaryBorderColor=dv(this.primaryColor,this.darkMode),this.secondaryBorderColor=dv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dv(this.tertiaryColor,this.darkMode),this.primaryTextColor=uv(this.primaryColor),this.secondaryTextColor=uv(this.secondaryColor),this.tertiaryTextColor=uv(this.tertiaryColor),this.lineColor=uv(this.background),this.textColor=uv(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,n;return e=t,n=[{key:"updateColors",value:function(){this.secondBkg=fv(this.contrast,55),this.border2=this.contrast,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=fv(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.sectionBkgColor=fv(this.contrast,30),this.sectionBkgColor2=fv(this.contrast,30),this.taskBorderColor=hv(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=fv(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=hv(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=sv(this.primaryColor,{h:64}),this.fillType3=sv(this.secondaryColor,{h:64}),this.fillType4=sv(this.primaryColor,{h:-64}),this.fillType5=sv(this.secondaryColor,{h:-64}),this.fillType6=sv(this.primaryColor,{h:128}),this.fillType7=sv(this.secondaryColor,{h:128}),this.pie1=this.pie1||"#F4F4F4",this.pie2=this.pie2||"#555",this.pie3=this.pie3||"#BBB",this.pie4=this.pie4||"#777",this.pie5=this.pie5||"#999",this.pie6=this.pie6||"#DDD",this.pie7=this.pie7||"#FFF",this.pie8=this.pie8||"#DDD",this.pie9=this.pie9||"#BBB",this.pie10=this.pie10||"#999",this.pie11=this.pie11||"#777",this.pie12=this.pie12||"#555",this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=hv(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||sv(this.primaryColor,{h:-30}),this.git4=this.pie5||sv(this.primaryColor,{h:-60}),this.git5=this.pie6||sv(this.primaryColor,{h:-90}),this.git6=this.pie7||sv(this.primaryColor,{h:60}),this.git7=this.pie8||sv(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||uv(this.git0),this.gitInv1=this.gitInv1||uv(this.git1),this.gitInv2=this.gitInv2||uv(this.git2),this.gitInv3=this.gitInv3||uv(this.git3),this.gitInv4=this.gitInv4||uv(this.git4),this.gitInv5=this.gitInv5||uv(this.git5),this.gitInv6=this.gitInv6||uv(this.git6),this.gitInv7=this.gitInv7||uv(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor}},{key:"calculate",value:function(t){var e=this;if("object"===Ev(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}],n&&Sv(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Mv={base:{getThemeVariables:function(t){var e=new yv;return e.calculate(t),e}},dark:{getThemeVariables:function(t){var e=new bv;return e.calculate(t),e}},default:{getThemeVariables:function(t){var e=new wv;return e.calculate(t),e}},forest:{getThemeVariables:function(t){var e=new Cv;return e.calculate(t),e}},neutral:{getThemeVariables:function(t){var e=new Av;return e.calculate(t),e}}};function Nv(t){return function(t){if(Array.isArray(t))return Dv(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Dv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dv(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Bv(t){return Bv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bv(t)}var Lv={theme:"default",themeVariables:Mv.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-d3"},sequence:{hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{arrowMarkerAbsolute:!1,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},state:{dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},gitGraph:{diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0}};Lv.class.arrowMarkerAbsolute=Lv.arrowMarkerAbsolute,Lv.gitGraph.arrowMarkerAbsolute=Lv.arrowMarkerAbsolute;var Ov=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.keys(e).reduce((function(r,i){return Array.isArray(e[i])?r:"object"===Bv(e[i])&&null!==e[i]?[].concat(Nv(r),[n+i],Nv(t(e[i],""))):[].concat(Nv(r),[n+i])}),[])}(Lv,"");const Iv=Lv;var Rv=void 0;function Fv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Pv(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Uv(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Yv(t){return Yv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yv(t)}function jv(t){return function(t){if(Array.isArray(t))return zv(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Uv(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Uv(t,e){if(t){if("string"==typeof t)return zv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zv(t,e):void 0}}function zv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var $v,qv={curveBasis:Vu,curveBasisClosed:function(t){return new Gu(t)},curveBasisOpen:function(t){return new Xu(t)},curveLinear:Pu,curveLinearClosed:function(t){return new Zu(t)},curveMonotoneX:function(t){return new el(t)},curveMonotoneY:function(t){return new nl(t)},curveNatural:function(t){return new il(t)},curveStep:function(t){return new ol(t,.5)},curveStepAfter:function(t){return new ol(t,1)},curveStepBefore:function(t){return new ol(t,0)}},Hv=/[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,Wv=/\s*(?:(?:(\w+)(?=:):|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,Vv=/\s*%%.*\n/gm,Gv=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var n=new RegExp("[%]{2}(?![{]".concat(Wv.source,")(?=[}][%]{2}).*\n"),"ig");t=t.trim().replace(n,"").replace(/'/gm,'"'),o.debug("Detecting diagram directive".concat(null!==e?" type:"+e:""," based on the text:").concat(t));for(var r,i=[];null!==(r=Hv.exec(t));)if(r.index===Hv.lastIndex&&Hv.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){var a=r[1]?r[1]:r[2],s=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:a,args:s})}return 0===i.length&&i.push({type:t,args:null}),1===i.length?i[0]:i}catch(n){return o.error("ERROR: ".concat(n.message," - Unable to parse directive\n ").concat(null!==e?" type:"+e:""," based on the text:").concat(t)),{type:null,args:null}}},Xv=function(t,e){return(t=t.replace(Hv,"").replace(Vv,"\n")).match(/^\s*sequenceDiagram/)?"sequence":t.match(/^\s*gantt/)?"gantt":t.match(/^\s*classDiagram-v2/)?"classDiagram":t.match(/^\s*classDiagram/)?e&&e.class&&"dagre-wrapper"===e.class.defaultRenderer?"classDiagram":"class":t.match(/^\s*stateDiagram-v2/)?"stateDiagram":t.match(/^\s*stateDiagram/)?e&&e.class&&"dagre-wrapper"===e.state.defaultRenderer?"stateDiagram":"state":t.match(/^\s*gitGraph/)?"gitGraph":t.match(/^\s*flowchart/)?"flowchart-v2":t.match(/^\s*info/)?"info":t.match(/^\s*pie/)?"pie":t.match(/^\s*erDiagram/)?"er":t.match(/^\s*journey/)?"journey":t.match(/^\s*requirement/)||t.match(/^\s*requirementDiagram/)?"requirement":e&&e.flowchart&&"dagre-wrapper"===e.flowchart.defaultRenderer?"flowchart-v2":"flowchart"},Zv=function(t,e){var n={};return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=e?e.apply(Rv,i):i[0];if(o in n)return n[o];var s=t.apply(void 0,i);return n[o]=s,s}},Qv=function(t,e){if(!t)return e;var n="curve".concat(t.charAt(0).toUpperCase()+t.slice(1));return qv[n]||e},Kv=function(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0},Jv=function(t){for(var e="",n="",r=0;r<t.length;r++)void 0!==t[r]&&(t[r].startsWith("color:")||t[r].startsWith("text-align:")?n=n+t[r]+";":e=e+t[r]+";");return{style:e,labelStyle:n}},tb=0,eb=function(){return tb++,"id-"+Math.random().toString(36).substr(2,12)+"-"+tb},nb=function(t){return function(t){for(var e="",n="0123456789abcdef",r=n.length,i=0;i<t;i++)e+=n.charAt(Math.floor(Math.random()*r));return e}(t.length)},rb=function t(e,n,r){var i=Object.assign({depth:2,clobber:!1},r),a=i.depth,o=i.clobber;return Array.isArray(n)&&!Array.isArray(e)?(n.forEach((function(n){return t(e,n,r)})),e):Array.isArray(n)&&Array.isArray(e)?(n.forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),e):void 0===e||a<=0?null!=e&&"object"===Yv(e)&&"object"===Yv(n)?Object.assign(e,n):n:(void 0!==n&&"object"===Yv(e)&&"object"===Yv(n)&&Object.keys(n).forEach((function(r){"object"!==Yv(n[r])||void 0!==e[r]&&"object"!==Yv(e[r])?(o||"object"!==Yv(e[r])&&"object"!==Yv(n[r]))&&(e[r]=n[r]):(void 0===e[r]&&(e[r]=Array.isArray(n[r])?[]:{}),e[r]=t(e[r],n[r],{depth:a-1,clobber:o}))})),e)},ib=function(t,e){var n=e.text.replace($m.lineBreakRegex," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.style("text-anchor",e.anchor),r.style("font-family",e.fontFamily),r.style("font-size",e.fontSize),r.style("font-weight",e.fontWeight),r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.attr("fill",e.fill),i.text(n),r},ab=Zv((function(t,e,n){if(!t)return t;if(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},n),$m.lineBreakRegex.test(t))return t;var r=t.split(" "),i=[],a="";return r.forEach((function(t,o){var s=sb("".concat(t," "),n),c=sb(a,n);if(s>e){var u=ob(t,e,"-",n),l=u.hyphenatedStrings,h=u.remainingWord;i.push.apply(i,[a].concat(jv(l))),a=h}else c+s>=e?(i.push(a),a=t):a=[a,t].filter(Boolean).join(" ");o+1===r.length&&i.push(a)})),i.filter((function(t){return""!==t})).join(n.joinWith)}),(function(t,e,n){return"".concat(t,"-").concat(e,"-").concat(n.fontSize,"-").concat(n.fontWeight,"-").concat(n.fontFamily,"-").concat(n.joinWith)})),ob=Zv((function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);var i=t.split(""),a=[],o="";return i.forEach((function(t,s){var c="".concat(o).concat(t);if(sb(c,r)>=e){var u=s+1,l=i.length===u,h="".concat(c).concat(n);a.push(l?c:h),o=""}else o=c})),{hyphenatedStrings:a,remainingWord:o}}),(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;return"".concat(t,"-").concat(e,"-").concat(n,"-").concat(r.fontSize,"-").concat(r.fontWeight,"-").concat(r.fontFamily)})),sb=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),cb(t,e).width},cb=Zv((function(t,e){var n=e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),r=n.fontSize,i=n.fontFamily,a=n.fontWeight;if(!t)return{width:0,height:0};var o=["sans-serif",i],s=t.split($m.lineBreakRegex),c=[],u=au("body");if(!u.remove)return{width:0,height:0,lineHeight:0};for(var l=u.append("svg"),h=0,f=o;h<f.length;h++){var d,p=f[h],g=0,y={width:0,height:0,lineHeight:0},m=Pv(s);try{for(m.s();!(d=m.n()).done;){var v=d.value,b={x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0};b.text=v;var _=ib(l,b).style("font-size",r).style("font-weight",a).style("font-family",p),x=(_._groups||_)[0][0].getBBox();y.width=Math.round(Math.max(y.width,x.width)),g=Math.round(x.height),y.height+=g,y.lineHeight=Math.round(Math.max(y.lineHeight,g))}}catch(t){m.e(t)}finally{m.f()}c.push(y)}return l.remove(),c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]}),(function(t,e){return"".concat(t,"-").concat(e.fontSize,"-").concat(e.fontWeight,"-").concat(e.fontFamily)})),ub=function(t,e,n){var r=new Map;return r.set("height",t),n?(r.set("width","100%"),r.set("style","max-width: ".concat(e,"px;"))):r.set("width",e),r},lb=function(t,e,n,r){!function(t,e){var n,r=Pv(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;t.attr(i[0],i[1])}}catch(t){r.e(t)}finally{r.f()}}(t,ub(e,n,r))},hb=function t(e){o.debug("directiveSanitizer called with",e),"object"===Yv(e)&&(e.length?e.forEach((function(e){return t(e)})):Object.keys(e).forEach((function(n){o.debug("Checking key",n),0===n.indexOf("__")&&(o.debug("sanitize deleting __ option",n),delete e[n]),n.indexOf("proto")>=0&&(o.debug("sanitize deleting proto option",n),delete e[n]),n.indexOf("constr")>=0&&(o.debug("sanitize deleting constr option",n),delete e[n]),n.indexOf("themeCSS")>=0&&(o.debug("sanitizing themeCss option"),e[n]=fb(e[n])),Ov.indexOf(n)<0?(o.debug("sanitize deleting option",n),delete e[n]):"object"===Yv(e[n])&&(o.debug("sanitize deleting object",n),t(e[n]))})))},fb=function(t){return(t.match(/\{/g)||[]).length!==(t.match(/\}/g)||[]).length?"{ /* ERROR: Unbalanced CSS */ }":t};const db={assignWithDepth:rb,wrapLabel:ab,calculateTextHeight:function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),cb(t,e).height},calculateTextWidth:sb,calculateTextDimensions:cb,calculateSvgSizeAttrs:ub,configureSvgSize:lb,detectInit:function(t,e){var n=Gv(t,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){var i=n.map((function(t){return t.args}));hb(i),r=rb(r,jv(i))}else r=n.args;if(r){var a=Xv(t,e);["config"].forEach((function(t){void 0!==r[t]&&("flowchart-v2"===a&&(a="flowchart"),r[a]=r[t],delete r[t])}))}return r},detectDirective:Gv,detectType:Xv,isSubstringInArray:function(t,e){for(var n=0;n<e.length;n++)if(e[n].match(t))return n;return-1},interpolateToCurve:Qv,calcLabelPosition:function(t){return function(t){var e,n=0;t.forEach((function(t){n+=Kv(t,e),e=t}));var r=n/2,i=void 0;return e=void 0,t.forEach((function(t){if(e&&!i){var n=Kv(t,e);if(n<r)r-=n;else{var a=r/n;a<=0&&(i=e),a>=1&&(i={x:t.x,y:t.y}),a>0&&a<1&&(i={x:(1-a)*e.x+a*t.x,y:(1-a)*e.y+a*t.y})}}e=t})),i}(t)},calcCardinalityPosition:function(t,e,n){var r;o.info("our points",e),e[0]!==n&&(e=e.reverse()),e.forEach((function(t){Kv(t,r),r=t}));var i,a=25;r=void 0,e.forEach((function(t){if(r&&!i){var e=Kv(t,r);if(e<a)a-=e;else{var n=a/e;n<=0&&(i=r),n>=1&&(i={x:t.x,y:t.y}),n>0&&n<1&&(i={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));var s=t?10:5,c=Math.atan2(e[0].y-i.y,e[0].x-i.x),u={x:0,y:0};return u.x=Math.sin(c)*s+(e[0].x+i.x)/2,u.y=-Math.cos(c)*s+(e[0].y+i.y)/2,u},calcTerminalLabelPosition:function(t,e,n){var r,i=JSON.parse(JSON.stringify(n));o.info("our points",i),"start_left"!==e&&"start_right"!==e&&(i=i.reverse()),i.forEach((function(t){Kv(t,r),r=t}));var a,s=25+t;r=void 0,i.forEach((function(t){if(r&&!a){var e=Kv(t,r);if(e<s)s-=e;else{var n=s/e;n<=0&&(a=r),n>=1&&(a={x:t.x,y:t.y}),n>0&&n<1&&(a={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));var c=10+.5*t,u=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return l.x=Math.sin(u)*c+(i[0].x+a.x)/2,l.y=-Math.cos(u)*c+(i[0].y+a.y)/2,"start_left"===e&&(l.x=Math.sin(u+Math.PI)*c+(i[0].x+a.x)/2,l.y=-Math.cos(u+Math.PI)*c+(i[0].y+a.y)/2),"end_right"===e&&(l.x=Math.sin(u-Math.PI)*c+(i[0].x+a.x)/2-5,l.y=-Math.cos(u-Math.PI)*c+(i[0].y+a.y)/2-5),"end_left"===e&&(l.x=Math.sin(u)*c+(i[0].x+a.x)/2-5,l.y=-Math.cos(u)*c+(i[0].y+a.y)/2-5),l},formatUrl:function(t,e){var n=t.trim();if(n)return"loose"!==e.securityLevel?(0,Bm.N)(n):n},getStylesFromArray:Jv,generateId:eb,random:nb,memoize:Zv,runFunc:function(t){for(var e,n=t.split("."),r=n.length-1,i=n[r],a=window,o=0;o<r;o++)if(!(a=a[n[o]]))return;for(var s=arguments.length,c=new Array(s>1?s-1:0),u=1;u<s;u++)c[u-1]=arguments[u];(e=a)[i].apply(e,c)},entityDecode:function(t){return $v=$v||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),$v.innerHTML=t,unescape($v.textContent)},initIdGeneratior:function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.deterministic=e,this.seed=n,this.count=n?n.length:0}var e,n;return e=t,(n=[{key:"next",value:function(){return this.deterministic?this.count++:Date.now()}}])&&Fv(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),directiveSanitizer:hb,sanitizeCss:fb};function pb(t){return pb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pb(t)}var gb,yb=Object.freeze(Iv),mb=rb({},yb),vb=[],bb=rb({},yb),_b=function(t,e){for(var n=rb({},t),r={},i=0;i<e.length;i++){var a=e[i];kb(a),r=rb(r,a)}if(n=rb(n,r),r.theme&&Mv[r.theme]){var o=rb({},gb),s=rb(o.themeVariables||{},r.themeVariables);n.themeVariables=Mv[n.theme].getThemeVariables(s)}return bb=n,n},xb=function(){return rb({},mb)},wb=function(){return rb({},bb)},kb=function t(e){Object.keys(mb.secure).forEach((function(t){void 0!==e[mb.secure[t]]&&(o.debug("Denied attempt to modify a secure key ".concat(mb.secure[t]),e[mb.secure[t]]),delete e[mb.secure[t]])})),Object.keys(e).forEach((function(t){0===t.indexOf("__")&&delete e[t]})),Object.keys(e).forEach((function(n){"string"==typeof e[n]&&(e[n].indexOf("<")>-1||e[n].indexOf(">")>-1||e[n].indexOf("url(data:")>-1)&&delete e[n],"object"===pb(e[n])&&t(e[n])}))},Tb=function(t){t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),vb.push(t),_b(mb,vb)},Cb=function(){_b(mb,vb=[])},Eb="",Sb="",Ab=function(t){return Pm(t,wb())},Mb=function(){Eb="",Sb=""},Nb=function(t){Eb=Ab(t).replace(/^\s+/g,"")},Db=function(){return Eb},Bb=function(t){Sb=Ab(t).replace(/\n\s+/g,"\n")},Lb=function(){return Sb};function Ob(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ib="classid-",Rb=[],Fb={},Pb=0,Yb=[],jb=function(t){return $m.sanitizeText(t,wb())},Ub=function(t){var e="",n=t;if(t.indexOf("~")>0){var r=t.split("~");n=r[0],e=$m.sanitizeText(r[1],wb())}return{className:n,type:e}},zb=function(t){var e=Ub(t);void 0===Fb[e.className]&&(Fb[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:Ib+e.className+"-"+Pb},Pb++)},$b=function(t){for(var e=Object.keys(Fb),n=0;n<e.length;n++)if(Fb[e[n]].id===t)return Fb[e[n]].domId},qb=function(t,e){console.log(t,e);var n=Ub(t).className,r=Fb[n];if("string"==typeof e){var i=e.trim();i.startsWith("<<")&&i.endsWith(">>")?r.annotations.push(jb(i.substring(2,i.length-2))):i.indexOf(")")>0?r.methods.push(jb(i)):i&&r.members.push(jb(i))}},Hb=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n=Ib+n),void 0!==Fb[n]&&Fb[n].cssClasses.push(e)}))},Wb=function(t,e,n){var r=wb(),i=t,a=$b(i);if("loose"===r.securityLevel&&void 0!==e&&void 0!==Fb[i]){var o=[];if("string"==typeof n){o=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var s=0;s<o.length;s++){var c=o[s].trim();'"'===c.charAt(0)&&'"'===c.charAt(c.length-1)&&(c=c.substr(1,c.length-2)),o[s]=c}}0===o.length&&o.push(a),Yb.push((function(){var t=document.querySelector('[id="'.concat(a,'"]'));null!==t&&t.addEventListener("click",(function(){var t;db.runFunc.apply(db,[e].concat(function(t){if(Array.isArray(t))return Ob(t)}(t=o)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ob(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ob(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))}),!1)}))}},Vb={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},Gb=function(t){var e=au(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=au("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),au(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=au(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),au(this).classed("hover",!1)}))};Yb.push(Gb);var Xb="TB";const Zb={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},setTitle:Nb,getTitle:Db,getAccDescription:Lb,setAccDescription:Bb,getConfig:function(){return wb().class},addClass:zb,bindFunctions:function(t){Yb.forEach((function(e){e(t)}))},clear:function(){Rb=[],Fb={},(Yb=[]).push(Gb),Mb()},getClass:function(t){return Fb[t]},getClasses:function(){return Fb},addAnnotation:function(t,e){var n=Ub(t).className;Fb[n].annotations.push(e)},getRelations:function(){return Rb},addRelation:function(t){o.debug("Adding relation: "+JSON.stringify(t)),zb(t.id1),zb(t.id2),t.id1=Ub(t.id1).className,t.id2=Ub(t.id2).className,t.relationTitle1=$m.sanitizeText(t.relationTitle1.trim(),wb()),t.relationTitle2=$m.sanitizeText(t.relationTitle2.trim(),wb()),Rb.push(t)},getDirection:function(){return Xb},setDirection:function(t){Xb=t},addMember:qb,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((function(e){return qb(t,e)})))},cleanupLabel:function(t){return":"===t.substring(0,1)?$m.sanitizeText(t.substr(1).trim(),wb()):jb(t.trim())},lineType:{LINE:0,DOTTED_LINE:1},relationType:Vb,setClickEvent:function(t,e,n){t.split(",").forEach((function(t){Wb(t,e,n),Fb[t].haveCallback=!0})),Hb(t,"clickable")},setCssClass:Hb,setLink:function(t,e,n){var r=wb();t.split(",").forEach((function(t){var i=t;t[0].match(/\d/)&&(i=Ib+i),void 0!==Fb[i]&&(Fb[i].link=db.formatUrl(e,r),"sandbox"===r.securityLevel?Fb[i].linkTarget="_top":Fb[i].linkTarget="string"==typeof n?jb(n):"_blank")})),Hb(t,"clickable")},setTooltip:function(t,e){var n=wb();t.split(",").forEach((function(t){void 0!==e&&(Fb[t].tooltip=$m.sanitizeText(e,n))}))},lookUpDomId:$b};var Qb=n(681),Kb=n.n(Qb),Jb=n(8282),t_=n.n(Jb),e_=n(1362),n_=n.n(e_),r_=0,i_=function(t){var e=t.match(/^(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+) *(\*|\$)?$/),n=t.match(/^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/);return e&&!n?a_(e):n?o_(n):s_(t)},a_=function(t){var e="",n="";try{var r=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",a=t[3]?u_(t[3].trim()):"",o=t[4]?t[4].trim():"",s=t[5]?t[5].trim():"";n=r+i+a+" "+o,e=l_(s)}catch(e){n=t}return{displayText:n,cssStyle:e}},o_=function(t){var e="",n="";try{var r=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",a=t[3]?u_(t[3].trim()):"",o=t[4]?t[4].trim():"";n=r+i+"("+a+")"+(t[5]?" : "+u_(t[5]).trim():""),e=l_(o)}catch(e){n=t}return{displayText:n,cssStyle:e}},s_=function(t){var e="",n="",r="",i=t.indexOf("("),a=t.indexOf(")");if(i>1&&a>i&&a<=t.length){var o="",s="",c=t.substring(0,1);c.match(/\w/)?s=t.substring(0,i).trim():(c.match(/\+|-|~|#/)&&(o=c),s=t.substring(1,i).trim());var u=t.substring(i+1,a),l=t.substring(a+1,1);n=l_(l),e=o+s+"("+u_(u.trim())+")",a<"".length&&""!==(r=t.substring(a+2).trim())&&(r=" : "+u_(r))}else e=u_(t);return{displayText:e,cssStyle:n}},c_=function(t,e,n,r){var i=i_(e),a=t.append("tspan").attr("x",r.padding).text(i.displayText);""!==i.cssStyle&&a.attr("style",i.cssStyle),n||a.attr("dy",r.textHeight)},u_=function t(e){var n=e;return-1!=e.indexOf("~")?t(n=(n=n.replace("~","<")).replace("~",">")):n},l_=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}};const h_=function(t,e,n){o.info("Rendering class "+e);var r,i=e.id,a={id:i,label:e.id,width:0,height:0},s=t.append("g").attr("id",$b(i)).attr("class","classGroup");r=e.link?s.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",n.textHeight+n.padding).attr("x",0):s.append("text").attr("y",n.textHeight+n.padding).attr("x",0);var c=!0;e.annotations.forEach((function(t){var e=r.append("tspan").text("«"+t+"»");c||e.attr("dy",n.textHeight),c=!1}));var u=e.id;void 0!==e.type&&""!==e.type&&(u+="<"+e.type+">");var l=r.append("tspan").text(u).attr("class","title");c||l.attr("dy",n.textHeight);var h=r.node().getBBox().height,f=s.append("line").attr("x1",0).attr("y1",n.padding+h+n.dividerMargin/2).attr("y2",n.padding+h+n.dividerMargin/2),d=s.append("text").attr("x",n.padding).attr("y",h+n.dividerMargin+n.textHeight).attr("fill","white").attr("class","classText");c=!0,e.members.forEach((function(t){c_(d,t,c,n),c=!1}));var p=d.node().getBBox(),g=s.append("line").attr("x1",0).attr("y1",n.padding+h+n.dividerMargin+p.height).attr("y2",n.padding+h+n.dividerMargin+p.height),y=s.append("text").attr("x",n.padding).attr("y",h+2*n.dividerMargin+p.height+n.textHeight).attr("fill","white").attr("class","classText");c=!0,e.methods.forEach((function(t){c_(y,t,c,n),c=!1}));var m=s.node().getBBox(),v=" ";e.cssClasses.length>0&&(v+=e.cssClasses.join(" "));var b=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",m.width+2*n.padding).attr("height",m.height+n.padding+.5*n.dividerMargin).attr("class",v).node().getBBox().width;return r.node().childNodes.forEach((function(t){t.setAttribute("x",(b-t.getBBox().width)/2)})),e.tooltip&&r.insert("title").text(e.tooltip),f.attr("x2",b),g.attr("x2",b),a.width=b,a.height=m.height+n.padding+.5*n.dividerMargin,a};function f_(t,e,n){if(void 0!==e.insert){var r=t.getTitle(),i=t.getAccDescription();e.attr("role","img").attr("aria-labelledby","chart-title-"+n+" chart-desc-"+n),e.insert("desc",":first-child").attr("id","chart-desc-"+n).text(i),e.insert("title",":first-child").attr("id","chart-title-"+n).text(r)}}e_.parser.yy=Zb;var d_={},p_={dividerMargin:10,padding:5,textHeight:10},g_=function(t){var e=Object.entries(d_).find((function(e){return e[1].label===t}));if(e)return e[0]};const y_=function(t){Object.keys(t).forEach((function(e){p_[e]=t[e]}))},m_=function(t,e){d_={},e_.parser.yy.clear(),e_.parser.parse(t),o.info("Rendering diagram "+t);var n,r=wb().securityLevel;"sandbox"===r&&(n=au("#i"+e));var i,a=au("sandbox"===r?n.nodes()[0].contentDocument.body:"body"),s=("sandbox"===r?n.nodes()[0].contentDocument:document,a.select("[id='".concat(e,"']")));s.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),(i=s).append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),i.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),i.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");var c=new(t_().Graph)({multigraph:!0});c.setGraph({isMultiGraph:!0}),c.setDefaultEdgeLabel((function(){return{}}));for(var u=Zb.getClasses(),l=Object.keys(u),h=0;h<l.length;h++){var f=u[l[h]],d=h_(s,f,p_);d_[d.id]=d,c.setNode(d.id,d),o.info("Org height: "+d.height)}Zb.getRelations().forEach((function(t){o.info("tjoho"+g_(t.id1)+g_(t.id2)+JSON.stringify(t)),c.setEdge(g_(t.id1),g_(t.id2),{relation:t},t.title||"DEFAULT")})),Kb().layout(c),c.nodes().forEach((function(t){void 0!==t&&void 0!==c.node(t)&&(o.debug("Node "+t+": "+JSON.stringify(c.node(t))),a.select("#"+$b(t)).attr("transform","translate("+(c.node(t).x-c.node(t).width/2)+","+(c.node(t).y-c.node(t).height/2)+" )"))})),c.edges().forEach((function(t){void 0!==t&&void 0!==c.edge(t)&&(o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(c.edge(t))),function(t,e,n,r){var i=function(t){switch(t){case Vb.AGGREGATION:return"aggregation";case Vb.EXTENSION:return"extension";case Vb.COMPOSITION:return"composition";case Vb.DEPENDENCY:return"dependency"}};e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var a,s,c=e.points,u=Uu().x((function(t){return t.x})).y((function(t){return t.y})).curve(Vu),l=t.append("path").attr("d",u(c)).attr("id","edge"+r_).attr("class","relation"),h="";r.arrowMarkerAbsolute&&(h=(h=(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),1==n.relation.lineType&&l.attr("class","relation dashed-line"),"none"!==n.relation.type1&&l.attr("marker-start","url("+h+"#"+i(n.relation.type1)+"Start)"),"none"!==n.relation.type2&&l.attr("marker-end","url("+h+"#"+i(n.relation.type2)+"End)");var f,d,p,g,y=e.points.length,m=db.calcLabelPosition(e.points);if(a=m.x,s=m.y,y%2!=0&&y>1){var v=db.calcCardinalityPosition("none"!==n.relation.type1,e.points,e.points[0]),b=db.calcCardinalityPosition("none"!==n.relation.type2,e.points,e.points[y-1]);o.debug("cardinality_1_point "+JSON.stringify(v)),o.debug("cardinality_2_point "+JSON.stringify(b)),f=v.x,d=v.y,p=b.x,g=b.y}if(void 0!==n.title){var _=t.append("g").attr("class","classLabel"),x=_.append("text").attr("class","label").attr("x",a).attr("y",s).attr("fill","red").attr("text-anchor","middle").text(n.title);window.label=x;var w=x.node().getBBox();_.insert("rect",":first-child").attr("class","box").attr("x",w.x-r.padding/2).attr("y",w.y-r.padding/2).attr("width",w.width+r.padding).attr("height",w.height+r.padding)}o.info("Rendering relation "+JSON.stringify(n)),void 0!==n.relationTitle1&&"none"!==n.relationTitle1&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",f).attr("y",d).attr("fill","black").attr("font-size","6").text(n.relationTitle1),void 0!==n.relationTitle2&&"none"!==n.relationTitle2&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",p).attr("y",g).attr("fill","black").attr("font-size","6").text(n.relationTitle2),r_++}(s,c.edge(t),c.edge(t).relation,p_))}));var p=s.node().getBBox(),g=p.width+40,y=p.height+40;lb(s,y,g,p_.useMaxWidth);var m="".concat(p.x-20," ").concat(p.y-20," ").concat(g," ").concat(y);o.debug("viewBox ".concat(m)),s.attr("viewBox",m),f_(e_.parser.yy,s,e)};var v_={extension:function(t,e,n){o.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:function(t,e){t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:function(t,e){t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:function(t,e){t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},point:function(t,e){t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:function(t,e){t.append("marker").attr("id",e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:function(t,e){t.append("marker").attr("id",e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:function(t,e){t.append("defs").append("marker").attr("id",e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}};const b_=function(t,e,n,r){e.forEach((function(e){v_[e](t,n,r)}))};function __(t){return __="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},__(t)}const x_=function(t,e,n,r){var i,a,s,c,u,l,h=t||"";if("object"===__(h)&&(h=h[0]),zm(wb().flowchart.htmlLabels))return h=h.replace(/\\n|\n/g,"<br />"),o.info("vertexText"+h),i={isNode:r,label:h.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")})),labelStyle:e.replace("fill:","color:")},s=au(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),c=s.append("xhtml:div"),u=i.label,l=i.isNode?"nodeLabel":"edgeLabel",c.html('<span class="'+l+'" '+(i.labelStyle?'style="'+i.labelStyle+'"':"")+">"+u+"</span>"),(a=i.labelStyle)&&c.attr("style",a),c.style("display","inline-block"),c.style("white-space","nowrap"),c.attr("xmlns","http://www.w3.org/1999/xhtml"),s.node();var f=document.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("style",e.replace("color:","fill:"));var d=[];d="string"==typeof h?h.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(h)?h:[];for(var p=0;p<d.length;p++){var g=document.createElementNS("http://www.w3.org/2000/svg","tspan");g.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),g.setAttribute("dy","1em"),g.setAttribute("x","0"),n?g.setAttribute("class","title-row"):g.setAttribute("class","row"),g.textContent=d[p].trim(),f.appendChild(g)}return f};var w_=function(t,e,n,r){var i;i=n||"node default";var a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=a.insert("g").attr("class","label").attr("style",e.labelStyle),s="string"==typeof e.labelText?e.labelText:e.labelText[0],c=o.node().appendChild(x_(Pm(FE(s),wb()),e.labelStyle,!1,r)),u=c.getBBox();if(zm(wb().flowchart.htmlLabels)){var l=c.children[0],h=au(c);u=l.getBoundingClientRect(),h.attr("width",u.width),h.attr("height",u.height)}var f=e.padding/2;return o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),{shapeSvg:a,bbox:u,halfPadding:f,label:o}},k_=function(t,e){var n=e.node().getBBox();t.width=n.width,t.height=n.height};function T_(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}var C_={},E_={},S_={},A_=function(t,e){return o.trace("In isDecendant",e," ",t," = ",E_[e].indexOf(t)>=0),E_[e].indexOf(t)>=0},M_=function t(e,n,r,i){o.warn("Copying children of ",e,"root",i,"data",n.node(e),i);var a=n.children(e)||[];e!==i&&a.push(e),o.warn("Copying (nodes) clusterId",e,"nodes",a),a.forEach((function(a){if(n.children(a).length>0)t(a,n,r,i);else{var s=n.node(a);o.info("cp ",a," to ",i," with parent ",e),r.setNode(a,s),i!==n.parent(a)&&(o.warn("Setting parent",a,n.parent(a)),r.setParent(a,n.parent(a))),e!==i&&a!==e?(o.debug("Setting parent",a,e),r.setParent(a,e)):(o.info("In copy ",e,"root",i,"data",n.node(e),i),o.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));var c=n.edges(a);o.debug("Copying Edges",c),c.forEach((function(t){o.info("Edge",t);var a=n.edge(t.v,t.w,t.name);o.info("Edge data",a,i);try{!function(t,e){return o.info("Decendants of ",e," is ",E_[e]),o.info("Edge is ",t),t.v!==e&&t.w!==e&&(E_[e]?(o.info("Here "),E_[e].indexOf(t.v)>=0||!!A_(t.v,e)||!!A_(t.w,e)||E_[e].indexOf(t.w)>=0):(o.debug("Tilt, ",e,",not in decendants"),!1))}(t,i)?o.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",i," clusterId:",e):(o.info("Copying as ",t.v,t.w,a,t.name),r.setEdge(t.v,t.w,a,t.name),o.info("newGraph edges ",r.edges(),r.edge(r.edges()[0])))}catch(t){o.error(t)}}))}o.debug("Removing node",a),n.removeNode(a)}))},N_=function t(e,n){for(var r=n.children(e),i=[].concat(r),a=0;a<r.length;a++)S_[r[a]]=e,i=i.concat(t(r[a],n));return i},D_=function t(e,n){o.trace("Searching",e);var r=n.children(e);if(o.trace("Searching children of id ",e,r),r.length<1)return o.trace("This is a valid node",e),e;for(var i=0;i<r.length;i++){var a=t(r[i],n);if(a)return o.trace("Found replacement for",e," => ",a),a}},B_=function(t){return C_[t]&&C_[t].externalConnections&&C_[t]?C_[t].id:t},L_=function(t,e){!t||e>10?o.debug("Opting out, no graph "):(o.debug("Opting in, graph "),t.nodes().forEach((function(e){t.children(e).length>0&&(o.warn("Cluster identified",e," Replacement id in edges: ",D_(e,t)),E_[e]=N_(e,t),C_[e]={id:D_(e,t),clusterData:t.node(e)})})),t.nodes().forEach((function(e){var n=t.children(e),r=t.edges();n.length>0?(o.debug("Cluster identified",e,E_),r.forEach((function(t){t.v!==e&&t.w!==e&&A_(t.v,e)^A_(t.w,e)&&(o.warn("Edge: ",t," leaves cluster ",e),o.warn("Decendants of XXX ",e,": ",E_[e]),C_[e].externalConnections=!0)}))):o.debug("Not a cluster ",e,E_)})),t.edges().forEach((function(e){var n=t.edge(e);o.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),o.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));var r=e.v,i=e.w;o.warn("Fix XXX",C_,"ids:",e.v,e.w,"Translateing: ",C_[e.v]," --- ",C_[e.w]),(C_[e.v]||C_[e.w])&&(o.warn("Fixing and trixing - removing XXX",e.v,e.w,e.name),r=B_(e.v),i=B_(e.w),t.removeEdge(e.v,e.w,e.name),r!==e.v&&(n.fromCluster=e.v),i!==e.w&&(n.toCluster=e.w),o.warn("Fix Replacing with XXX",r,i,e.name),t.setEdge(r,i,n,e.name))})),o.warn("Adjusted Graph",t_().json.write(t)),O_(t,0),o.trace(C_))},O_=function t(e,n){if(o.warn("extractor - ",n,t_().json.write(e),e.children("D")),n>10)o.error("Bailing out");else{for(var r=e.nodes(),i=!1,a=0;a<r.length;a++){var s=r[a],c=e.children(s);i=i||c.length>0}if(i){o.debug("Nodes = ",r,n);for(var u=0;u<r.length;u++){var l=r[u];if(o.debug("Extracting node",l,C_,C_[l]&&!C_[l].externalConnections,!e.parent(l),e.node(l),e.children("D")," Depth ",n),C_[l])if(!C_[l].externalConnections&&e.children(l)&&e.children(l).length>0){o.warn("Cluster without external connections, without a parent and with children",l,n);var h="TB"===e.graph().rankdir?"LR":"TB";C_[l]&&C_[l].clusterData&&C_[l].clusterData.dir&&(h=C_[l].clusterData.dir,o.warn("Fixing dir",C_[l].clusterData.dir,h));var f=new(t_().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:h,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));o.warn("Old graph before copy",t_().json.write(e)),M_(l,e,f,l),e.setNode(l,{clusterNode:!0,id:l,clusterData:C_[l].clusterData,labelText:C_[l].labelText,graph:f}),o.warn("New graph after copy node: (",l,")",t_().json.write(f)),o.debug("Old graph after copy",t_().json.write(e))}else o.warn("Cluster ** ",l," **not meeting the criteria !externalConnections:",!C_[l].externalConnections," no parent: ",!e.parent(l)," children ",e.children(l)&&e.children(l).length>0,e.children("D"),n),o.debug(C_);else o.debug("Not a cluster",l,n)}r=e.nodes(),o.warn("New list of nodes",r);for(var d=0;d<r.length;d++){var p=r[d],g=e.node(p);o.warn(" Now next level",p,g),g.clusterNode&&t(g.graph,n+1)}}else o.debug("Done, no node has children",e.nodes())}},I_=function t(e,n){if(0===n.length)return[];var r=Object.assign(n);return n.forEach((function(n){var i=e.children(n),a=t(e,i);r=r.concat(a)})),r},R_=function(t){return I_(t,t.children())},F_=n(3841);const P_=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),u=Math.abs(e*n*o/c);r.x<i&&(u=-u);var l=Math.abs(e*n*s/c);return r.y<a&&(l=-l),{x:i+u,y:a+l}};function Y_(t,e){return t*e>0}const j_=function(t,e,n,r){var i,a,o,s,c,u,l,h,f,d,p,g,y;if(i=e.y-t.y,o=t.x-e.x,c=e.x*t.y-t.x*e.y,f=i*n.x+o*n.y+c,d=i*r.x+o*r.y+c,!(0!==f&&0!==d&&Y_(f,d)||(a=r.y-n.y,s=n.x-r.x,u=r.x*n.y-n.x*r.y,l=a*t.x+s*t.y+u,h=a*e.x+s*e.y+u,0!==l&&0!==h&&Y_(l,h)||0==(p=i*s-a*o))))return g=Math.abs(p/2),{x:(y=o*u-s*c)<0?(y-g)/p:(y+g)/p,y:(y=a*c-i*u)<0?(y-g)/p:(y+g)/p}},U_=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;return Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=0===s?0:u*o/s,r=u):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o),{x:i+n,y:a+r}},z_=(n.n(F_)(),function(t,e,n){return P_(t,e,e,n)}),$_=function(t,e,n){var r=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)})):(o=Math.min(o,e.x),s=Math.min(s,e.y));for(var c=r-t.width/2-o,u=i-t.height/2-s,l=0;l<e.length;l++){var h=e[l],f=e[l<e.length-1?l+1:0],d=j_(t,n,{x:c+h.x,y:u+h.y},{x:c+f.x,y:u+f.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1})),a[0]):t},q_=U_;function H_(t){return H_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},H_(t)}var W_=function(t,e,n){var r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,a=10;"LR"===n&&(i=10,a=70);var o=r.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return k_(e,o),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return q_(e,t)},r},V_={question:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding+(i.height+e.padding),s=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];o.info("Question main (Circle)");var c=T_(r,a,a,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return o.warn("Intersect called"),$_(e,s,t)},r},rect:function(t,e){var n=w_(t,e,"node "+e.classes,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;o.trace("Classes = ",e.classes);var s=r.insert("rect",":first-child"),c=i.width+e.padding,u=i.height+e.padding;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",c).attr("height",u),e.props){var l=new Set(Object.keys(e.props));e.props.borders&&(function(t,e,n,r){var i=[],a=function(t){i.push(t),i.push(0)},s=function(t){i.push(0),i.push(t)};e.includes("t")?(o.debug("add top border"),a(n)):s(n),e.includes("r")?(o.debug("add right border"),a(r)):s(r),e.includes("b")?(o.debug("add bottom border"),a(n)):s(n),e.includes("l")?(o.debug("add left border"),a(r)):s(r),t.attr("stroke-dasharray",i.join(" "))}(s,e.props.borders,c,u),l.delete("borders")),l.forEach((function(t){o.warn("Unknown node property ".concat(t))}))}return k_(e,s),e.intersect=function(t){return q_(e,t)},r},rectWithTitle:function(t,e){var n;n=e.classes?"node "+e.classes:"node default";var r,i=t.insert("g").attr("class",n).attr("id",e.domId||e.id),a=i.insert("rect",":first-child"),s=i.insert("line"),c=i.insert("g").attr("class","label"),u=e.labelText.flat?e.labelText.flat():e.labelText;r="object"===H_(u)?u[0]:u,o.info("Label text abc79",r,u,"object"===H_(u));var l=c.node().appendChild(x_(r,e.labelStyle,!0,!0)),h={width:0,height:0};if(zm(wb().flowchart.htmlLabels)){var f=l.children[0],d=au(l);h=f.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}o.info("Text 2",u);var p=u.slice(1,u.length),g=l.getBBox(),y=c.node().appendChild(x_(p.join?p.join("<br/>"):p,e.labelStyle,!0,!0));if(zm(wb().flowchart.htmlLabels)){var m=y.children[0],v=au(y);h=m.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}var b=e.padding/2;return au(y).attr("transform","translate( "+(h.width>g.width?0:(g.width-h.width)/2)+", "+(g.height+b+5)+")"),au(l).attr("transform","translate( "+(h.width<g.width?0:-(g.width-h.width)/2)+", 0)"),h=c.node().getBBox(),c.attr("transform","translate("+-h.width/2+", "+(-h.height/2-b+3)+")"),a.attr("class","outer title-state").attr("x",-h.width/2-b).attr("y",-h.height/2-b).attr("width",h.width+e.padding).attr("height",h.height+e.padding),s.attr("class","divider").attr("x1",-h.width/2-b).attr("x2",h.width/2+b).attr("y1",-h.height/2-b+g.height+b).attr("y2",-h.height/2-b+g.height+b),k_(e,a),e.intersect=function(t){return q_(e,t)},i},choice:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);return n.insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map((function(t){return t.x+","+t.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return z_(e,14,t)},n},circle:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding,s=r.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),o.info("Circle main"),k_(e,s),e.intersect=function(t){return o.info("Circle intersect",e,i.width/2+a,t),z_(e,i.width/2+a,t)},r},doublecircle:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding,s=r.insert("g",":first-child"),c=s.insert("circle"),u=s.insert("circle");return c.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+a+5).attr("width",i.width+e.padding+10).attr("height",i.height+e.padding+10),u.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),o.info("DoubleCircle main"),k_(e,c),e.intersect=function(t){return o.info("DoubleCircle intersect",e,i.width/2+a+5,t),z_(e,i.width/2+a+5,t)},r},stadium:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.height+e.padding,o=i.width+a/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",a/2).attr("ry",a/2).attr("x",-o/2).attr("y",-a/2).attr("width",o).attr("height",a);return k_(e,s),e.intersect=function(t){return q_(e,t)},r},hexagon:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.height+e.padding,o=a/4,s=i.width+2*o+e.padding,c=[{x:o,y:0},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}],u=T_(r,s,a,c);return u.attr("style",e.style),k_(e,u),e.intersect=function(t){return $_(e,c,t)},r},rect_left_inv_arrow:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-o/2,y:0},{x:a,y:0},{x:a,y:-o},{x:-o/2,y:-o},{x:0,y:-o/2}];return T_(r,a,o,s).attr("style",e.style),e.width=a+o,e.height=o,e.intersect=function(t){return $_(e,s,t)},r},lean_right:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-2*o/6,y:0},{x:a-o/6,y:0},{x:a+2*o/6,y:-o},{x:o/6,y:-o}],c=T_(r,a,o,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return $_(e,s,t)},r},lean_left:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:2*o/6,y:0},{x:a+o/6,y:0},{x:a-2*o/6,y:-o},{x:-o/6,y:-o}],c=T_(r,a,o,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return $_(e,s,t)},r},trapezoid:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-2*o/6,y:0},{x:a+2*o/6,y:0},{x:a-o/6,y:-o},{x:o/6,y:-o}],c=T_(r,a,o,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return $_(e,s,t)},r},inv_trapezoid:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:o/6,y:0},{x:a-o/6,y:0},{x:a+2*o/6,y:-o},{x:-2*o/6,y:-o}],c=T_(r,a,o,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return $_(e,s,t)},r},rect_right_inv_arrow:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:0,y:0},{x:a+o/2,y:0},{x:a,y:-o/2},{x:a+o/2,y:-o},{x:0,y:-o}],c=T_(r,a,o,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return $_(e,s,t)},r},cylinder:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=a/2,s=o/(2.5+a/50),c=i.height+s+e.padding,u="M 0,"+s+" a "+o+","+s+" 0,0,0 "+a+" 0 a "+o+","+s+" 0,0,0 "+-a+" 0 l 0,"+c+" a "+o+","+s+" 0,0,0 "+a+" 0 l 0,"+-c,l=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",u).attr("transform","translate("+-a/2+","+-(c/2+s)+")");return k_(e,l),e.intersect=function(t){var n=q_(e,t),r=n.x-e.x;if(0!=o&&(Math.abs(r)<e.width/2||Math.abs(r)==e.width/2&&Math.abs(n.y-e.y)>e.height/2-s)){var i=s*s*(1-r*r/(o*o));0!=i&&(i=Math.sqrt(i)),i=s-i,t.y-e.y>0&&(i=-i),n.y+=i}return n},r},start:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),k_(e,r),e.intersect=function(t){return z_(e,7,t)},n},end:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child"),i=n.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),k_(e,i),e.intersect=function(t){return z_(e,7,t)},n},note:function(t,e){var n=w_(t,e,"node "+e.classes,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;o.info("Classes = ",e.classes);var s=r.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),k_(e,s),e.intersect=function(t){return q_(e,t)},r},subroutine:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:0,y:0},{x:a,y:0},{x:a,y:-o},{x:0,y:-o},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-o},{x:-8,y:-o},{x:-8,y:0}],c=T_(r,a,o,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return $_(e,s,t)},r},fork:W_,join:W_,class_box:function(t,e){var n,r=e.padding/2;n=e.classes?"node "+e.classes:"node default";var i=t.insert("g").attr("class",n).attr("id",e.domId||e.id),a=i.insert("rect",":first-child"),o=i.insert("line"),s=i.insert("line"),c=0,u=4,l=i.insert("g").attr("class","label"),h=0,f=e.classData.annotations&&e.classData.annotations[0],d=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",p=l.node().appendChild(x_(d,e.labelStyle,!0,!0)),g=p.getBBox();if(zm(wb().flowchart.htmlLabels)){var y=p.children[0],m=au(p);g=y.getBoundingClientRect(),m.attr("width",g.width),m.attr("height",g.height)}e.classData.annotations[0]&&(u+=g.height+4,c+=g.width);var v=e.classData.id;void 0!==e.classData.type&&""!==e.classData.type&&(wb().flowchart.htmlLabels?v+="&lt;"+e.classData.type+"&gt;":v+="<"+e.classData.type+">");var b=l.node().appendChild(x_(v,e.labelStyle,!0,!0));au(b).attr("class","classTitle");var _=b.getBBox();if(zm(wb().flowchart.htmlLabels)){var x=b.children[0],w=au(b);_=x.getBoundingClientRect(),w.attr("width",_.width),w.attr("height",_.height)}u+=_.height+4,_.width>c&&(c=_.width);var k=[];e.classData.members.forEach((function(t){var n=i_(t),r=n.displayText;wb().flowchart.htmlLabels&&(r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"));var i=l.node().appendChild(x_(r,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0)),a=i.getBBox();if(zm(wb().flowchart.htmlLabels)){var o=i.children[0],s=au(i);a=o.getBoundingClientRect(),s.attr("width",a.width),s.attr("height",a.height)}a.width>c&&(c=a.width),u+=a.height+4,k.push(i)})),u+=8;var T=[];if(e.classData.methods.forEach((function(t){var n=i_(t),r=n.displayText;wb().flowchart.htmlLabels&&(r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"));var i=l.node().appendChild(x_(r,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0)),a=i.getBBox();if(zm(wb().flowchart.htmlLabels)){var o=i.children[0],s=au(i);a=o.getBoundingClientRect(),s.attr("width",a.width),s.attr("height",a.height)}a.width>c&&(c=a.width),u+=a.height+4,T.push(i)})),u+=8,f){var C=(c-g.width)/2;au(p).attr("transform","translate( "+(-1*c/2+C)+", "+-1*u/2+")"),h=g.height+4}var E=(c-_.width)/2;return au(b).attr("transform","translate( "+(-1*c/2+E)+", "+(-1*u/2+h)+")"),h+=_.height+4,o.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-u/2-r+8+h).attr("y2",-u/2-r+8+h),h+=8,k.forEach((function(t){au(t).attr("transform","translate( "+-c/2+", "+(-1*u/2+h+4)+")"),h+=_.height+4})),h+=8,s.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-u/2-r+8+h).attr("y2",-u/2-r+8+h),h+=8,T.forEach((function(t){au(t).attr("transform","translate( "+-c/2+", "+(-1*u/2+h)+")"),h+=_.height+4})),a.attr("class","outer title-state").attr("x",-c/2-r).attr("y",-u/2-r).attr("width",c+e.padding).attr("height",u+e.padding),k_(e,a),e.intersect=function(t){return q_(e,t)},i}},G_={},X_=function(t){var e=G_[t.id];o.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");var n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},Z_={rect:function(t,e){o.trace("Creating subgraph rect for ",e.id,e);var n=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),a=i.node().appendChild(x_(e.labelText,e.labelStyle,void 0,!0)),s=a.getBBox();if(zm(wb().flowchart.htmlLabels)){var c=a.children[0],u=au(a);s=c.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}var l=0*e.padding,h=l/2,f=e.width<=s.width+l?s.width+l:e.width;e.width<=s.width+l?e.diff=(s.width-e.width)/2:e.diff=-e.padding/2,o.trace("Data ",e,JSON.stringify(e)),r.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-f/2).attr("y",e.y-e.height/2-h).attr("width",f).attr("height",e.height+l),i.attr("transform","translate("+(e.x-s.width/2)+", "+(e.y-e.height/2+e.padding/3)+")");var d=r.node().getBBox();return e.width=d.width,e.height=d.height,e.intersect=function(t){return U_(e,t)},n},roundedWithTitle:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),a=n.append("rect"),o=i.node().appendChild(x_(e.labelText,e.labelStyle,void 0,!0)),s=o.getBBox();if(zm(wb().flowchart.htmlLabels)){var c=o.children[0],u=au(o);s=c.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}s=o.getBBox();var l=0*e.padding,h=l/2,f=e.width<=s.width+e.padding?s.width+e.padding:e.width;e.width<=s.width+e.padding?e.diff=(s.width+0*e.padding-e.width)/2:e.diff=-e.padding/2,r.attr("class","outer").attr("x",e.x-f/2-h).attr("y",e.y-e.height/2-h).attr("width",f+l).attr("height",e.height+l),a.attr("class","inner").attr("x",e.x-f/2-h).attr("y",e.y-e.height/2-h+s.height-1).attr("width",f+l).attr("height",e.height+l-s.height-3),i.attr("transform","translate("+(e.x-s.width/2)+", "+(e.y-e.height/2-e.padding/3+(zm(wb().flowchart.htmlLabels)?5:3))+")");var d=r.node().getBBox();return e.height=d.height,e.intersect=function(t){return U_(e,t)},n},noteGroup:function(t,e){var n=t.insert("g").attr("class","note-cluster").attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return U_(e,t)},n},divider:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("class","divider").attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2).attr("width",e.width+i).attr("height",e.height+i);var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.diff=-e.padding/2,e.intersect=function(t){return U_(e,t)},n}},Q_={},K_={},J_={},tx=function(t,e){var n=x_(e.label,e.labelStyle),r=t.insert("g").attr("class","edgeLabel"),i=r.insert("g").attr("class","label");i.node().appendChild(n);var a,o=n.getBBox();if(zm(wb().flowchart.htmlLabels)){var s=n.children[0],c=au(n);o=s.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}if(i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),K_[e.id]=r,e.width=o.width,e.height=o.height,e.startLabelLeft){var u=x_(e.startLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");a=h.node().appendChild(u);var f=u.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),J_[e.id]||(J_[e.id]={}),J_[e.id].startLeft=l,ex(a,e.startLabelLeft)}if(e.startLabelRight){var d=x_(e.startLabelRight,e.labelStyle),p=t.insert("g").attr("class","edgeTerminals"),g=p.insert("g").attr("class","inner");a=p.node().appendChild(d),g.node().appendChild(d);var y=d.getBBox();g.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),J_[e.id]||(J_[e.id]={}),J_[e.id].startRight=p,ex(a,e.startLabelRight)}if(e.endLabelLeft){var m=x_(e.endLabelLeft,e.labelStyle),v=t.insert("g").attr("class","edgeTerminals"),b=v.insert("g").attr("class","inner");a=b.node().appendChild(m);var _=m.getBBox();b.attr("transform","translate("+-_.width/2+", "+-_.height/2+")"),v.node().appendChild(m),J_[e.id]||(J_[e.id]={}),J_[e.id].endLeft=v,ex(a,e.endLabelLeft)}if(e.endLabelRight){var x=x_(e.endLabelRight,e.labelStyle),w=t.insert("g").attr("class","edgeTerminals"),k=w.insert("g").attr("class","inner");a=k.node().appendChild(x);var T=x.getBBox();k.attr("transform","translate("+-T.width/2+", "+-T.height/2+")"),w.node().appendChild(x),J_[e.id]||(J_[e.id]={}),J_[e.id].endRight=w,ex(a,e.endLabelRight)}};function ex(t,e){wb().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}var nx=function(t,e){o.info("Moving label abc78 ",t.id,t.label,K_[t.id]);var n=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){var r=K_[t.id],i=t.x,a=t.y;if(n){var s=db.calcLabelPosition(n);o.info("Moving label from (",i,",",a,") to (",s.x,",",s.y,") abc78")}r.attr("transform","translate("+i+", "+a+")")}if(t.startLabelLeft){var c=J_[t.id].startLeft,u=t.x,l=t.y;if(n){var h=db.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);u=h.x,l=h.y}c.attr("transform","translate("+u+", "+l+")")}if(t.startLabelRight){var f=J_[t.id].startRight,d=t.x,p=t.y;if(n){var g=db.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);d=g.x,p=g.y}f.attr("transform","translate("+d+", "+p+")")}if(t.endLabelLeft){var y=J_[t.id].endLeft,m=t.x,v=t.y;if(n){var b=db.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);m=b.x,v=b.y}y.attr("transform","translate("+m+", "+v+")")}if(t.endLabelRight){var _=J_[t.id].endRight,x=t.x,w=t.y;if(n){var k=db.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);x=k.x,w=k.y}_.attr("transform","translate("+x+", "+w+")")}},rx=function(t,e){o.warn("abc88 cutPathAtIntersect",t,e);var n=[],r=t[0],i=!1;return t.forEach((function(t){if(o.info("abc88 checking point",t,e),function(t,e){var n=t.x,r=t.y,i=Math.abs(e.x-n),a=Math.abs(e.y-r),o=t.width/2,s=t.height/2;return i>=o||a>=s}(e,t)||i)o.warn("abc88 outside",t,r),r=t,i||n.push(t);else{var a=function(t,e,n){o.warn("intersection calc abc89:\n outsidePoint: ".concat(JSON.stringify(e),"\n insidePoint : ").concat(JSON.stringify(n),"\n node : x:").concat(t.x," y:").concat(t.y," w:").concat(t.width," h:").concat(t.height));var r=t.x,i=t.y,a=Math.abs(r-n.x),s=t.width/2,c=n.x<e.x?s-a:s+a,u=t.height/2,l=Math.abs(e.y-n.y),h=Math.abs(e.x-n.x);if(Math.abs(i-e.y)*s>Math.abs(r-e.x)*u){var f=n.y<e.y?e.y-u-i:i-u-e.y;c=h*f/l;var d={x:n.x<e.x?n.x+c:n.x-h+c,y:n.y<e.y?n.y+l-f:n.y-l+f};return 0===c&&(d.x=e.x,d.y=e.y),0===h&&(d.x=e.x),0===l&&(d.y=e.y),o.warn("abc89 topp/bott calc, Q ".concat(l,", q ").concat(f,", R ").concat(h,", r ").concat(c),d),d}var p=l*(c=n.x<e.x?e.x-s-r:r-s-e.x)/h,g=n.x<e.x?n.x+h-c:n.x-h+c,y=n.y<e.y?n.y+p:n.y-p;return o.warn("sides calc abc89, Q ".concat(l,", q ").concat(p,", R ").concat(h,", r ").concat(c),{_x:g,_y:y}),0===c&&(g=e.x,y=e.y),0===h&&(g=e.x),0===l&&(y=e.y),{x:g,y}}(e,r,t);o.warn("abc88 inside",t,r,a),o.warn("abc88 intersection",a);var s=!1;n.forEach((function(t){s=s||t.x===a.x&&t.y===a.y})),n.find((function(t){return t.x===a.x&&t.y===a.y}))?o.warn("abc88 no intersect",a,n):n.push(a),i=!0}})),o.warn("abc88 returning points",n),n},ix=function t(e,n,r,i){o.info("Graph in recursive render: XXX",t_().json.write(n),i);var a=n.graph().rankdir;o.trace("Dir in recursive render - dir:",a);var s=e.insert("g").attr("class","root");n.nodes()?o.info("Recursive render XXX",n.nodes()):o.info("No nodes found for",n),n.edges().length>0&&o.trace("Recursive edges",n.edge(n.edges()[0]));var c=s.insert("g").attr("class","clusters"),u=s.insert("g").attr("class","edgePaths"),l=s.insert("g").attr("class","edgeLabels"),h=s.insert("g").attr("class","nodes");n.nodes().forEach((function(e){var s=n.node(e);if(void 0!==i){var c=JSON.parse(JSON.stringify(i.clusterData));o.info("Setting data for cluster XXX (",e,") ",c,i),n.setNode(i.id,c),n.parent(e)||(o.trace("Setting parent",e,i.id),n.setParent(e,i.id,c))}if(o.info("(Insert) Node XXX"+e+": "+JSON.stringify(n.node(e))),s&&s.clusterNode){o.info("Cluster identified",e,s.width,n.node(e));var u=t(h,s.graph,r,n.node(e)),l=u.elem;k_(s,l),s.diff=u.diff||0,o.info("Node bounds (abc123)",e,s,s.width,s.x,s.y),function(t,e){G_[e.id]=t}(l,s),o.warn("Recursive render complete ",l,s)}else n.children(e).length>0?(o.info("Cluster - the non recursive path XXX",e,s.id,s,n),o.info(D_(s.id,n)),C_[s.id]={id:D_(s.id,n),node:s}):(o.info("Node - the non recursive path",e,s.id,s),function(t,e,n){var r,i,a;e.link?("sandbox"===wb().securityLevel?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),i=V_[e.shape](r,e,n)):r=i=V_[e.shape](t,e,n),e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),G_[e.id]=r,e.haveCallback&&G_[e.id].attr("class",G_[e.id].attr("class")+" clickable")}(h,n.node(e),a))})),n.edges().forEach((function(t){var e=n.edge(t.v,t.w,t.name);o.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(n.edge(t))),o.info("Fix",C_,"ids:",t.v,t.w,"Translateing: ",C_[t.v],C_[t.w]),tx(l,e)})),n.edges().forEach((function(t){o.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))})),o.info("#############################################"),o.info("### Layout ###"),o.info("#############################################"),o.info(n),Kb().layout(n),o.info("Graph after layout:",t_().json.write(n));var f=0;return R_(n).forEach((function(t){var e=n.node(t);o.info("Position "+t+": "+JSON.stringify(n.node(t))),o.info("Position "+t+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e&&e.clusterNode?X_(e):n.children(t).length>0?(function(t,e){o.trace("Inserting cluster");var n=e.shape||"rect";Q_[e.id]=Z_[n](t,e)}(c,e),C_[e.id].node=e):X_(e)})),n.edges().forEach((function(t){var e=n.edge(t);o.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e),e);var i=function(t,e,n,r,i,a){var s=n.points,c=!1,u=a.node(e.v),l=a.node(e.w);o.info("abc88 InsertEdge: ",n),l.intersect&&u.intersect&&((s=s.slice(1,n.points.length-1)).unshift(u.intersect(s[0])),o.info("Last point",s[s.length-1],l,l.intersect(s[s.length-1])),s.push(l.intersect(s[s.length-1]))),n.toCluster&&(o.info("to cluster abc88",r[n.toCluster]),s=rx(n.points,r[n.toCluster].node),c=!0),n.fromCluster&&(o.info("from cluster abc88",r[n.fromCluster]),s=rx(s.reverse(),r[n.fromCluster].node).reverse(),c=!0);var h,f=s.filter((function(t){return!Number.isNaN(t.y)}));h=("graph"===i||"flowchart"===i)&&n.curve||Vu;var d,p=Uu().x((function(t){return t.x})).y((function(t){return t.y})).curve(h);switch(n.thickness){case"normal":d="edge-thickness-normal";break;case"thick":d="edge-thickness-thick";break;default:d=""}switch(n.pattern){case"solid":d+=" edge-pattern-solid";break;case"dotted":d+=" edge-pattern-dotted";break;case"dashed":d+=" edge-pattern-dashed"}var g=t.append("path").attr("d",p(f)).attr("id",n.id).attr("class"," "+d+(n.classes?" "+n.classes:"")).attr("style",n.style),y="";switch(wb().state.arrowMarkerAbsolute&&(y=(y=(y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),o.info("arrowTypeStart",n.arrowTypeStart),o.info("arrowTypeEnd",n.arrowTypeEnd),n.arrowTypeStart){case"arrow_cross":g.attr("marker-start","url("+y+"#"+i+"-crossStart)");break;case"arrow_point":g.attr("marker-start","url("+y+"#"+i+"-pointStart)");break;case"arrow_barb":g.attr("marker-start","url("+y+"#"+i+"-barbStart)");break;case"arrow_circle":g.attr("marker-start","url("+y+"#"+i+"-circleStart)");break;case"aggregation":g.attr("marker-start","url("+y+"#"+i+"-aggregationStart)");break;case"extension":g.attr("marker-start","url("+y+"#"+i+"-extensionStart)");break;case"composition":g.attr("marker-start","url("+y+"#"+i+"-compositionStart)");break;case"dependency":g.attr("marker-start","url("+y+"#"+i+"-dependencyStart)")}switch(n.arrowTypeEnd){case"arrow_cross":g.attr("marker-end","url("+y+"#"+i+"-crossEnd)");break;case"arrow_point":g.attr("marker-end","url("+y+"#"+i+"-pointEnd)");break;case"arrow_barb":g.attr("marker-end","url("+y+"#"+i+"-barbEnd)");break;case"arrow_circle":g.attr("marker-end","url("+y+"#"+i+"-circleEnd)");break;case"aggregation":g.attr("marker-end","url("+y+"#"+i+"-aggregationEnd)");break;case"extension":g.attr("marker-end","url("+y+"#"+i+"-extensionEnd)");break;case"composition":g.attr("marker-end","url("+y+"#"+i+"-compositionEnd)");break;case"dependency":g.attr("marker-end","url("+y+"#"+i+"-dependencyEnd)")}var m={};return c&&(m.updatedPath=s),m.originalPath=n.points,m}(u,t,e,C_,r,n);nx(e,i)})),n.nodes().forEach((function(t){var e=n.node(t);o.info(t,e.type,e.diff),"group"===e.type&&(f=e.diff)})),{elem:s,diff:f}},ax=function(t,e,n,r,i){b_(t,n,r,i),G_={},K_={},J_={},Q_={},E_={},S_={},C_={},o.warn("Graph at first:",t_().json.write(e)),L_(e),o.warn("Graph after:",t_().json.write(e)),ix(t,e,r)};e_.parser.yy=Zb;var ox={dividerMargin:10,padding:5,textHeight:10};function sx(t){var e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;default:e="none"}return e}var cx={},ux=[],lx=function(t){return void 0===cx[t]&&(cx[t]={attributes:[]},o.info("Added new entity :",t)),cx[t]};const hx={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().er},addEntity:lx,addAttributes:function(t,e){var n,r=lx(t);for(n=e.length-1;n>=0;n--)r.attributes.push(e[n]),o.debug("Added attribute ",e[n].attributeName)},getEntities:function(){return cx},addRelationship:function(t,e,n,r){var i={entityA:t,roleA:e,entityB:n,relSpec:r};ux.push(i),o.debug("Added new relationship :",i)},getRelationships:function(){return ux},clear:function(){cx={},ux=[],Mb()},setTitle:Nb,getTitle:Db,setAccDescription:Bb,getAccDescription:Lb};var fx=n(5890),dx=n.n(fx),px={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"};const gx=px;var yx={},mx=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},vx=0;const bx=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)yx[e[n]]=t[e[n]]},_x=function(t,e){o.info("Drawing ER diagram"),hx.clear();var n=dx().parser;n.yy=hx;var r,i=wb().securityLevel;"sandbox"===i&&(r=au("#i"+e));var a=au("sandbox"===i?r.nodes()[0].contentDocument.body:"body");"sandbox"===i?r.nodes()[0].contentDocument:document;try{n.parse(t)}catch(t){o.debug("Parsing failed")}var s,c=a.select("[id='".concat(e,"']"));(function(t,e){var n;t.append("defs").append("marker").attr("id",px.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",px.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",px.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",px.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",px.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",px.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),(n=t.append("defs").append("marker").attr("id",px.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(n=t.append("defs").append("marker").attr("id",px.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")})(c,yx),s=new(t_().Graph)({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:yx.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));var u=function(t,e,n){var r;return Object.keys(e).forEach((function(i){var a=t.append("g").attr("id",i);r=void 0===r?i:r;var o="entity-"+i,s=a.append("text").attr("class","er entityLabel").attr("id",o).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("style","font-family: "+wb().fontFamily+"; font-size: "+yx.fontSize+"px").text(i),c=function(t,e,n){var r=yx.entityPadding/3,i=yx.entityPadding/3,a=.85*yx.fontSize,o=e.node().getBBox(),s=[],c=!1,u=!1,l=0,h=0,f=0,d=0,p=o.height+2*r,g=1;n.forEach((function(t){void 0!==t.attributeKeyType&&(c=!0),void 0!==t.attributeComment&&(u=!0)})),n.forEach((function(n){var i="".concat(e.node().id,"-attr-").concat(g),o=0,y=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-type")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+wb().fontFamily+"; font-size: "+a+"px").text(n.attributeType),m=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-name")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+wb().fontFamily+"; font-size: "+a+"px").text(n.attributeName),v={};v.tn=y,v.nn=m;var b=y.node().getBBox(),_=m.node().getBBox();if(l=Math.max(l,b.width),h=Math.max(h,_.width),o=Math.max(b.height,_.height),c){var x=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-key")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+wb().fontFamily+"; font-size: "+a+"px").text(n.attributeKeyType||"");v.kn=x;var w=x.node().getBBox();f=Math.max(f,w.width),o=Math.max(o,w.height)}if(u){var k=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-comment")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+wb().fontFamily+"; font-size: "+a+"px").text(n.attributeComment||"");v.cn=k;var T=k.node().getBBox();d=Math.max(d,T.width),o=Math.max(o,T.height)}v.height=o,s.push(v),p+=o+2*r,g+=1}));var y=4;c&&(y+=2),u&&(y+=2);var m=l+h+f+d,v={width:Math.max(yx.minEntityWidth,Math.max(o.width+2*yx.entityPadding,m+i*y)),height:n.length>0?p:Math.max(yx.minEntityHeight,o.height+2*yx.entityPadding)};if(n.length>0){var b=Math.max(0,(v.width-m-i*y)/(y/2));e.attr("transform","translate("+v.width/2+","+(r+o.height/2)+")");var _=o.height+2*r,x="attributeBoxOdd";s.forEach((function(e){var n=_+r+e.height/2;e.tn.attr("transform","translate("+i+","+n+")");var a=t.insert("rect","#"+e.tn.node().id).attr("class","er ".concat(x)).attr("fill",yx.fill).attr("fill-opacity","100%").attr("stroke",yx.stroke).attr("x",0).attr("y",_).attr("width",l+2*i+b).attr("height",e.height+2*r),o=parseFloat(a.attr("x"))+parseFloat(a.attr("width"));e.nn.attr("transform","translate("+(o+i)+","+n+")");var s=t.insert("rect","#"+e.nn.node().id).attr("class","er ".concat(x)).attr("fill",yx.fill).attr("fill-opacity","100%").attr("stroke",yx.stroke).attr("x",o).attr("y",_).attr("width",h+2*i+b).attr("height",e.height+2*r),p=parseFloat(s.attr("x"))+parseFloat(s.attr("width"));if(c){e.kn.attr("transform","translate("+(p+i)+","+n+")");var g=t.insert("rect","#"+e.kn.node().id).attr("class","er ".concat(x)).attr("fill",yx.fill).attr("fill-opacity","100%").attr("stroke",yx.stroke).attr("x",p).attr("y",_).attr("width",f+2*i+b).attr("height",e.height+2*r);p=parseFloat(g.attr("x"))+parseFloat(g.attr("width"))}u&&(e.cn.attr("transform","translate("+(p+i)+","+n+")"),t.insert("rect","#"+e.cn.node().id).attr("class","er ".concat(x)).attr("fill",yx.fill).attr("fill-opacity","100%").attr("stroke",yx.stroke).attr("x",p).attr("y",_).attr("width",d+2*i+b).attr("height",e.height+2*r)),_+=e.height+2*r,x="attributeBoxOdd"==x?"attributeBoxEven":"attributeBoxOdd"}))}else v.height=Math.max(yx.minEntityHeight,p),e.attr("transform","translate("+v.width/2+","+v.height/2+")");return v}(a,s,e[i].attributes),u=c.width,l=c.height,h=a.insert("rect","#"+o).attr("class","er entityBox").attr("fill",yx.fill).attr("fill-opacity","100%").attr("stroke",yx.stroke).attr("x",0).attr("y",0).attr("width",u).attr("height",l).node().getBBox();n.setNode(i,{width:h.width,height:h.height,shape:"rect",id:i})})),r}(c,hx.getEntities(),s),l=function(t,e){return t.forEach((function(t){e.setEdge(t.entityA,t.entityB,{relationship:t},mx(t))})),t}(hx.getRelationships(),s);Kb().layout(s),function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&t.select("#"+n).attr("transform","translate("+(e.node(n).x-e.node(n).width/2)+","+(e.node(n).y-e.node(n).height/2)+" )")}))}(c,s),l.forEach((function(t){!function(t,e,n,r){vx++;var i=n.edge(e.entityA,e.entityB,mx(e)),a=Uu().x((function(t){return t.x})).y((function(t){return t.y})).curve(Vu),o=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",a(i.points)).attr("stroke",yx.stroke).attr("fill","none");e.relSpec.relType===hx.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");var s="";switch(yx.arrowMarkerAbsolute&&(s=(s=(s=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e.relSpec.cardA){case hx.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+s+"#"+gx.ZERO_OR_ONE_END+")");break;case hx.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+s+"#"+gx.ZERO_OR_MORE_END+")");break;case hx.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+s+"#"+gx.ONE_OR_MORE_END+")");break;case hx.Cardinality.ONLY_ONE:o.attr("marker-end","url("+s+"#"+gx.ONLY_ONE_END+")")}switch(e.relSpec.cardB){case hx.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+s+"#"+gx.ZERO_OR_ONE_START+")");break;case hx.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+s+"#"+gx.ZERO_OR_MORE_START+")");break;case hx.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+s+"#"+gx.ONE_OR_MORE_START+")");break;case hx.Cardinality.ONLY_ONE:o.attr("marker-start","url("+s+"#"+gx.ONLY_ONE_START+")")}var c=o.node().getTotalLength(),u=o.node().getPointAtLength(.5*c),l="rel"+vx,h=t.append("text").attr("class","er relationshipLabel").attr("id",l).attr("x",u.x).attr("y",u.y).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("style","font-family: "+wb().fontFamily+"; font-size: "+yx.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+l).attr("class","er relationshipLabelBox").attr("x",u.x-h.width/2).attr("y",u.y-h.height/2).attr("width",h.width).attr("height",h.height).attr("fill","white").attr("fill-opacity","85%")}(c,t,s,u)}));var h=yx.diagramPadding,f=c.node().getBBox(),d=f.width+2*h,p=f.height+2*h;lb(c,p,d,yx.useMaxWidth),c.attr("viewBox","".concat(f.x-h," ").concat(f.y-h," ").concat(d," ").concat(p)),f_(n.yy,c,e)};function xx(t){return xx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xx(t)}function wx(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var kx,Tx,Cx="flowchart-",Ex=0,Sx=wb(),Ax={},Mx=[],Nx=[],Dx=[],Bx={},Lx={},Ox=0,Ix=!0,Rx=[],Fx=function(t){return $m.sanitizeText(t,Sx)},Px=function(t){for(var e=Object.keys(Ax),n=0;n<e.length;n++)if(Ax[e[n]].id===t)return Ax[e[n]].domId;return t},Yx=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:""};void 0!==(r=n.text)&&(i.text=Fx(r.trim()),'"'===i.text[0]&&'"'===i.text[i.text.length-1]&&(i.text=i.text.substring(1,i.text.length-1))),void 0!==n&&(i.type=n.type,i.stroke=n.stroke,i.length=n.length),Mx.push(i)},jx=function(t,e){t.split(",").forEach((function(t){var n=t;void 0!==Ax[n]&&Ax[n].classes.push(e),void 0!==Bx[n]&&Bx[n].classes.push(e)}))},Ux=function(t){var e=au(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=au("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),au(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=au(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),au(this).classed("hover",!1)}))};Rx.push(Ux);var zx=function(t){for(var e=0;e<Dx.length;e++)if(Dx[e].id===t)return e;return-1},$x=-1,qx=[],Hx=function t(e,n){var r=Dx[n].nodes;if(!(($x+=1)>2e3)){if(qx[$x]=n,Dx[n].id===e)return{result:!0,count:0};for(var i=0,a=1;i<r.length;){var o=zx(r[i]);if(o>=0){var s=t(e,o);if(s.result)return{result:!0,count:a+s.count};a+=s.count}i+=1}return{result:!1,count:a}}},Wx=function(t,e){var n=!1;return t.forEach((function(t){t.nodes.indexOf(e)>=0&&(n=!0)})),n},Vx=function(t,e){var n=[];return t.nodes.forEach((function(r,i){Wx(e,r)||n.push(t.nodes[i])})),{nodes:n}};const Gx={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},defaultConfig:function(){return yb.flowchart},setTitle:Nb,getTitle:Db,getAccDescription:Lb,setAccDescription:Bb,addVertex:function(t,e,n,r,i,a){var o,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},c=t;void 0!==c&&0!==c.trim().length&&(void 0===Ax[c]&&(Ax[c]={id:c,domId:Cx+c+"-"+Ex,styles:[],classes:[]}),Ex++,void 0!==e?(Sx=wb(),'"'===(o=Fx(e.trim()))[0]&&'"'===o[o.length-1]&&(o=o.substring(1,o.length-1)),Ax[c].text=o):void 0===Ax[c].text&&(Ax[c].text=t),void 0!==n&&(Ax[c].type=n),null!=r&&r.forEach((function(t){Ax[c].styles.push(t)})),null!=i&&i.forEach((function(t){Ax[c].classes.push(t)})),void 0!==a&&(Ax[c].dir=a),Ax[c].props=s)},lookUpDomId:Px,addLink:function(t,e,n,r){var i,a;for(i=0;i<t.length;i++)for(a=0;a<e.length;a++)Yx(t[i],e[a],n,r)},updateLinkInterpolate:function(t,e){t.forEach((function(t){"default"===t?Mx.defaultInterpolate=e:Mx[t].interpolate=e}))},updateLink:function(t,e){t.forEach((function(t){"default"===t?Mx.defaultStyle=e:(-1===db.isSubstringInArray("fill",e)&&e.push("fill:none"),Mx[t].style=e)}))},addClass:function(t,e){void 0===Nx[t]&&(Nx[t]={id:t,styles:[],textStyles:[]}),null!=e&&e.forEach((function(e){if(e.match("color")){var n=e.replace("fill","bgFill").replace("color","fill");Nx[t].textStyles.push(n)}Nx[t].styles.push(e)}))},setDirection:function(t){(kx=t).match(/.*</)&&(kx="RL"),kx.match(/.*\^/)&&(kx="BT"),kx.match(/.*>/)&&(kx="LR"),kx.match(/.*v/)&&(kx="TB")},setClass:jx,setTooltip:function(t,e){t.split(",").forEach((function(t){void 0!==e&&(Lx["gen-1"===Tx?Px(t):t]=Fx(e))}))},getTooltip:function(t){return Lx[t]},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){var r=Px(t);if("loose"===wb().securityLevel&&void 0!==e){var i=[];if("string"==typeof n){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var a=0;a<i.length;a++){var o=i[a].trim();'"'===o.charAt(0)&&'"'===o.charAt(o.length-1)&&(o=o.substr(1,o.length-2)),i[a]=o}}0===i.length&&i.push(t),void 0!==Ax[t]&&(Ax[t].haveCallback=!0,Rx.push((function(){var t=document.querySelector('[id="'.concat(r,'"]'));null!==t&&t.addEventListener("click",(function(){var t;db.runFunc.apply(db,[e].concat(function(t){if(Array.isArray(t))return wx(t)}(t=i)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return wx(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wx(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))}),!1)})))}}(t,e,n)})),jx(t,"clickable")},setLink:function(t,e,n){t.split(",").forEach((function(t){void 0!==Ax[t]&&(Ax[t].link=db.formatUrl(e,Sx),Ax[t].linkTarget=n)})),jx(t,"clickable")},bindFunctions:function(t){Rx.forEach((function(e){e(t)}))},getDirection:function(){return kx.trim()},getVertices:function(){return Ax},getEdges:function(){return Mx},getClasses:function(){return Nx},clear:function(t){Ax={},Nx={},Mx=[],(Rx=[]).push(Ux),Dx=[],Bx={},Ox=0,Lx=[],Ix=!0,Tx=t||"gen-1",Mb()},setGen:function(t){Tx=t||"gen-1"},defaultStyle:function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},addSubGraph:function(t,e,n){var r=t.trim(),i=n;t===n&&n.match(/\s/)&&(r=void 0);var a=[],s=function(t){var e,n={boolean:{},number:{},string:{}},r=[],i=t.filter((function(t){var i=xx(t);return t.stmt&&"dir"===t.stmt?(e=t.value,!1):""!==t.trim()&&(i in n?!n[i].hasOwnProperty(t)&&(n[i][t]=!0):!(r.indexOf(t)>=0)&&r.push(t))}));return{nodeList:i,dir:e}}(a.concat.apply(a,e)),c=s.nodeList,u=s.dir;if(a=c,"gen-1"===Tx){o.warn("LOOKING UP");for(var l=0;l<a.length;l++)a[l]=Px(a[l])}r=r||"subGraph"+Ox,i=Fx(i=i||""),Ox+=1;var h={id:r,nodes:a,title:i.trim(),classes:[],dir:u};return o.info("Adding",h.id,h.nodes,h.dir),h.nodes=Vx(h,Dx).nodes,Dx.push(h),Bx[r]=h,r},getDepthFirstPos:function(t){return qx[t]},indexNodes:function(){$x=-1,Dx.length>0&&Hx("none",Dx.length-1)},getSubGraphs:function(){return Dx},destructLink:function(t,e){var n,r=function(t){var e=t.trim(),n=e.slice(0,-1),r="arrow_open";switch(e.slice(-1)){case"x":r="arrow_cross","x"===e[0]&&(r="double_"+r,n=n.slice(1));break;case">":r="arrow_point","<"===e[0]&&(r="double_"+r,n=n.slice(1));break;case"o":r="arrow_circle","o"===e[0]&&(r="double_"+r,n=n.slice(1))}var i="normal",a=n.length-1;"="===n[0]&&(i="thick");var o=function(t,e){for(var n=e.length,r=0,i=0;i<n;++i)"."===e[i]&&++r;return r}(0,n);return o&&(i="dotted",a=o),{type:r,stroke:i,length:a}}(t);if(e){if(n=function(t){var e=t.trim(),n="arrow_open";switch(e[0]){case"<":n="arrow_point",e=e.slice(1);break;case"x":n="arrow_cross",e=e.slice(1);break;case"o":n="arrow_circle",e=e.slice(1)}var r="normal";return-1!==e.indexOf("=")&&(r="thick"),-1!==e.indexOf(".")&&(r="dotted"),{type:n,stroke:r}}(e),n.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===n.type)n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return"double_arrow"===n.type&&(n.type="double_arrow_point"),n.length=r.length,n}return r},lex:{firstGraph:function(){return!!Ix&&(Ix=!1,!0)}},exists:Wx,makeUniq:Vx};var Xx=n(3602),Zx=n.n(Xx),Qx=n(4949),Kx=n.n(Qx),Jx=n(8284),tw=n.n(Jx);function ew(t,e,n){var r=.9*(e.width+e.height),i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],a=fw(t,r,r,i);return n.intersect=function(t){return Kx().intersect.polygon(n,i,t)},a}function nw(t,e,n){var r=e.height,i=r/4,a=e.width+2*i,o=[{x:i,y:0},{x:a-i,y:0},{x:a,y:-r/2},{x:a-i,y:-r},{x:i,y:-r},{x:0,y:-r/2}],s=fw(t,a,r,o);return n.intersect=function(t){return Kx().intersect.polygon(n,o,t)},s}function rw(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function iw(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:i/6,y:-i}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function aw(t,e,n){var r=e.width,i=e.height,a=[{x:2*i/6,y:0},{x:r+i/6,y:0},{x:r-2*i/6,y:-i},{x:-i/6,y:-i}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function ow(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r+2*i/6,y:0},{x:r-i/6,y:-i},{x:i/6,y:-i}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function sw(t,e,n){var r=e.width,i=e.height,a=[{x:i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:-2*i/6,y:-i}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function cw(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function uw(t,e,n){var r=e.height,i=e.width+r/4,a=t.insert("rect",":first-child").attr("rx",r/2).attr("ry",r/2).attr("x",-i/2).attr("y",-r/2).attr("width",i).attr("height",r);return n.intersect=function(t){return Kx().intersect.rect(n,t)},a}function lw(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r,y:0},{x:r,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:r+8,y:0},{x:r+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function hw(t,e,n){var r=e.width,i=r/2,a=i/(2.5+r/50),o=e.height+a,s="M 0,"+a+" a "+i+","+a+" 0,0,0 "+r+" 0 a "+i+","+a+" 0,0,0 "+-r+" 0 l 0,"+o+" a "+i+","+a+" 0,0,0 "+r+" 0 l 0,"+-o,c=t.attr("label-offset-y",a).insert("path",":first-child").attr("d",s).attr("transform","translate("+-r/2+","+-(o/2+a)+")");return n.intersect=function(t){var e=Kx().intersect.rect(n,t),r=e.x-n.x;if(0!=i&&(Math.abs(r)<n.width/2||Math.abs(r)==n.width/2&&Math.abs(e.y-n.y)>n.height/2-a)){var o=a*a*(1-r*r/(i*i));0!=o&&(o=Math.sqrt(o)),o=a-o,t.y-n.y>0&&(o=-o),e.y+=o}return e},c}function fw(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("transform","translate("+-e/2+","+n/2+")")}const dw=function(t){t.shapes().question=ew,t.shapes().hexagon=nw,t.shapes().stadium=uw,t.shapes().subroutine=lw,t.shapes().cylinder=hw,t.shapes().rect_left_inv_arrow=rw,t.shapes().lean_right=iw,t.shapes().lean_left=aw,t.shapes().trapezoid=ow,t.shapes().inv_trapezoid=sw,t.shapes().rect_right_inv_arrow=cw};var pw={};const gw=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)pw[e[n]]=t[e[n]]},yw=function(t,e){o.info("Drawing flowchart"),Gx.clear(),Gx.setGen("gen-1");var n=Zx().parser;n.yy=Gx;var r,i=wb().securityLevel;"sandbox"===i&&(r=au("#i"+e));var a=au("sandbox"===i?r.nodes()[0].contentDocument.body:"body"),s="sandbox"===i?r.nodes()[0].contentDocument:document;n.parse(t);var c=Gx.getDirection();void 0===c&&(c="TD");for(var u,l=wb().flowchart,h=l.nodeSpacing||50,f=l.rankSpacing||50,d=new(t_().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:h,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),p=Gx.getSubGraphs(),g=p.length-1;g>=0;g--)u=p[g],Gx.addVertex(u.id,u.title,"group",void 0,u.classes);var y=Gx.getVertices();o.warn("Get vertices",y);var m=Gx.getEdges(),v=0;for(v=p.length-1;v>=0;v--){u=p[v],ou("cluster").append("text");for(var b=0;b<u.nodes.length;b++)o.warn("Setting subgraph",u.nodes[b],Gx.lookUpDomId(u.nodes[b]),Gx.lookUpDomId(u.id)),d.setParent(Gx.lookUpDomId(u.nodes[b]),Gx.lookUpDomId(u.id))}(function(t,e,n,r,i){wb().securityLevel;var a=r?r.select('[id="'.concat(n,'"]')):au('[id="'.concat(n,'"]')),s=i||document;Object.keys(t).forEach((function(n){var r=t[n],i="default";r.classes.length>0&&(i=r.classes.join(" "));var c,u=Jv(r.styles),l=void 0!==r.text?r.text:r.id;if(zm(wb().flowchart.htmlLabels)){var h={label:l.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(c=tw()(a,h).node()).parentNode.removeChild(c)}else{var f=s.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("style",u.labelStyle.replace("color:","fill:"));for(var d=l.split($m.lineBreakRegex),p=0;p<d.length;p++){var g=s.createElementNS("http://www.w3.org/2000/svg","tspan");g.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),g.setAttribute("dy","1em"),g.setAttribute("x","1"),g.textContent=d[p],f.appendChild(g)}c=f}var y=0,m="";switch(r.type){case"round":y=5,m="rect";break;case"square":case"group":default:m="rect";break;case"diamond":m="question";break;case"hexagon":m="hexagon";break;case"odd":case"odd_right":m="rect_left_inv_arrow";break;case"lean_right":m="lean_right";break;case"lean_left":m="lean_left";break;case"trapezoid":m="trapezoid";break;case"inv_trapezoid":m="inv_trapezoid";break;case"circle":m="circle";break;case"ellipse":m="ellipse";break;case"stadium":m="stadium";break;case"subroutine":m="subroutine";break;case"cylinder":m="cylinder"}o.warn("Adding node",r.id,r.domId),e.setNode(Gx.lookUpDomId(r.id),{labelType:"svg",labelStyle:u.labelStyle,shape:m,label:c,rx:y,ry:y,class:i,style:u.style,id:Gx.lookUpDomId(r.id)})}))})(y,d,e,a,s),function(t,e){var n,r,i=0;if(void 0!==t.defaultStyle){var a=Jv(t.defaultStyle);n=a.style,r=a.labelStyle}t.forEach((function(a){i++;var o="L-"+a.start+"-"+a.end,s="LS-"+a.start,c="LE-"+a.end,u={};"arrow_open"===a.type?u.arrowhead="none":u.arrowhead="normal";var l="",h="";if(void 0!==a.style){var f=Jv(a.style);l=f.style,h=f.labelStyle}else switch(a.stroke){case"normal":l="fill:none",void 0!==n&&(l=n),void 0!==r&&(h=r);break;case"dotted":l="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":l=" stroke-width: 3.5px;fill:none"}u.style=l,u.labelStyle=h,void 0!==a.interpolate?u.curve=Qv(a.interpolate,Pu):void 0!==t.defaultInterpolate?u.curve=Qv(t.defaultInterpolate,Pu):u.curve=Qv(pw.curve,Pu),void 0===a.text?void 0!==a.style&&(u.arrowheadStyle="fill: #333"):(u.arrowheadStyle="fill: #333",u.labelpos="c",zm(wb().flowchart.htmlLabels)?(u.labelType="html",u.label='<span id="L-'.concat(o,'" class="edgeLabel L-').concat(s,"' L-").concat(c,'" style="').concat(u.labelStyle,'">').concat(a.text.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")})),"</span>")):(u.labelType="text",u.label=a.text.replace($m.lineBreakRegex,"\n"),void 0===a.style&&(u.style=u.style||"stroke: #333; stroke-width: 1.5px;fill:none"),u.labelStyle=u.labelStyle.replace("color:","fill:"))),u.id=o,u.class=s+" "+c,u.minlen=a.length||1,e.setEdge(Gx.lookUpDomId(a.start),Gx.lookUpDomId(a.end),u,i)}))}(m,d);var _=new(0,Kx().render);dw(_),_.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");Kx().util.applyStyle(i,n[r+"Style"])},_.arrows().normal=function(t,e){t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};var x=a.select('[id="'.concat(e,'"]'));x.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),o.warn(d),f_(n.yy,x,e);var w=a.select("#"+e+" g");_(w,d),w.selectAll("g.node").attr("title",(function(){return Gx.getTooltip(this.id)}));var k=l.diagramPadding,T=x.node().getBBox(),C=T.width+2*k,E=T.height+2*k;lb(x,E,C,l.useMaxWidth);var S="".concat(T.x-k," ").concat(T.y-k," ").concat(C," ").concat(E);for(o.debug("viewBox ".concat(S)),x.attr("viewBox",S),Gx.indexNodes("subGraph"+v),v=0;v<p.length;v++)if("undefined"!==(u=p[v]).title){var A=s.querySelectorAll("#"+e+' [id="'+Gx.lookUpDomId(u.id)+'"] rect'),M=s.querySelectorAll("#"+e+' [id="'+Gx.lookUpDomId(u.id)+'"]'),N=A[0].x.baseVal.value,D=A[0].y.baseVal.value,B=A[0].width.baseVal.value,L=au(M[0]).select(".label");L.attr("transform","translate(".concat(N+B/2,", ").concat(D+14,")")),L.attr("id",e+"Text");for(var O=0;O<u.classes.length;O++)M[0].classList.add(u.classes[O])}zm(l.htmlLabels);for(var I=s.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),R=0;R<I.length;R++){var F=I[R],P=F.getBBox(),Y=s.createElementNS("http://www.w3.org/2000/svg","rect");Y.setAttribute("rx",0),Y.setAttribute("ry",0),Y.setAttribute("width",P.width),Y.setAttribute("height",P.height),F.insertBefore(Y,F.firstChild)}Object.keys(y).forEach((function(t){var n=y[t];if(n.link){var r=a.select("#"+e+' [id="'+Gx.lookUpDomId(t)+'"]');if(r){var o=s.createElementNS("http://www.w3.org/2000/svg","a");o.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),o.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),o.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===i?o.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):n.linkTarget&&o.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);var c=r.insert((function(){return o}),":first-child"),u=r.select(".label-container");u&&c.append((function(){return u.node()}));var l=r.select(".label");l&&c.append((function(){return l.node()}))}}}))};var mw={};const vw=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)mw[e[n]]=t[e[n]]},bw=function(t,e){o.info("Drawing flowchart"),Gx.clear(),Gx.setGen("gen-2");var n=Zx().parser;n.yy=Gx,n.parse(t);var r=Gx.getDirection();void 0===r&&(r="TD");var i,a=wb().flowchart,s=a.nodeSpacing||50,c=a.rankSpacing||50,u=wb().securityLevel;"sandbox"===u&&(i=au("#i"+e));var l,h=au("sandbox"===u?i.nodes()[0].contentDocument.body:"body"),f="sandbox"===u?i.nodes()[0].contentDocument:document,d=new(t_().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:s,ranksep:c,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),p=Gx.getSubGraphs();o.info("Subgraphs - ",p);for(var g=p.length-1;g>=0;g--)l=p[g],o.info("Subgraph - ",l),Gx.addVertex(l.id,l.title,"group",void 0,l.classes,l.dir);var y=Gx.getVertices(),m=Gx.getEdges();o.info(m);var v=0;for(v=p.length-1;v>=0;v--){l=p[v],ou("cluster").append("text");for(var b=0;b<l.nodes.length;b++)o.info("Setting up subgraphs",l.nodes[b],l.id),d.setParent(l.nodes[b],l.id)}(function(t,e,n,r,i){var a=r.select('[id="'.concat(n,'"]'));Object.keys(t).forEach((function(n){var r=t[n],s="default";r.classes.length>0&&(s=r.classes.join(" "));var c,u=Jv(r.styles),l=void 0!==r.text?r.text:r.id;if(zm(wb().flowchart.htmlLabels)){var h={label:l.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(c=tw()(a,h).node()).parentNode.removeChild(c)}else{var f=i.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("style",u.labelStyle.replace("color:","fill:"));for(var d=l.split($m.lineBreakRegex),p=0;p<d.length;p++){var g=i.createElementNS("http://www.w3.org/2000/svg","tspan");g.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),g.setAttribute("dy","1em"),g.setAttribute("x","1"),g.textContent=d[p],f.appendChild(g)}c=f}var y=0,m="";switch(r.type){case"round":y=5,m="rect";break;case"square":case"group":default:m="rect";break;case"diamond":m="question";break;case"hexagon":m="hexagon";break;case"odd":case"odd_right":m="rect_left_inv_arrow";break;case"lean_right":m="lean_right";break;case"lean_left":m="lean_left";break;case"trapezoid":m="trapezoid";break;case"inv_trapezoid":m="inv_trapezoid";break;case"circle":m="circle";break;case"ellipse":m="ellipse";break;case"stadium":m="stadium";break;case"subroutine":m="subroutine";break;case"cylinder":m="cylinder";break;case"doublecircle":m="doublecircle"}e.setNode(r.id,{labelStyle:u.labelStyle,shape:m,labelText:l,rx:y,ry:y,class:s,style:u.style,id:r.id,link:r.link,linkTarget:r.linkTarget,tooltip:Gx.getTooltip(r.id)||"",domId:Gx.lookUpDomId(r.id),haveCallback:r.haveCallback,width:"group"===r.type?500:void 0,dir:r.dir,type:r.type,props:r.props,padding:wb().flowchart.padding}),o.info("setNode",{labelStyle:u.labelStyle,shape:m,labelText:l,rx:y,ry:y,class:s,style:u.style,id:r.id,domId:Gx.lookUpDomId(r.id),width:"group"===r.type?500:void 0,type:r.type,dir:r.dir,props:r.props,padding:wb().flowchart.padding})}))})(y,d,e,h,f),function(t,e){o.info("abc78 edges = ",t);var n,r,i=0,a={};if(void 0!==t.defaultStyle){var s=Jv(t.defaultStyle);n=s.style,r=s.labelStyle}t.forEach((function(s){i++;var c="L-"+s.start+"-"+s.end;void 0===a[c]?(a[c]=0,o.info("abc78 new entry",c,a[c])):(a[c]++,o.info("abc78 new entry",c,a[c]));var u=c+"-"+a[c];o.info("abc78 new link id to be used is",c,u,a[c]);var l="LS-"+s.start,h="LE-"+s.end,f={style:"",labelStyle:""};switch(f.minlen=s.length||1,"arrow_open"===s.type?f.arrowhead="none":f.arrowhead="normal",f.arrowTypeStart="arrow_open",f.arrowTypeEnd="arrow_open",s.type){case"double_arrow_cross":f.arrowTypeStart="arrow_cross";case"arrow_cross":f.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":f.arrowTypeStart="arrow_point";case"arrow_point":f.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":f.arrowTypeStart="arrow_circle";case"arrow_circle":f.arrowTypeEnd="arrow_circle"}var d="",p="";switch(s.stroke){case"normal":d="fill:none;",void 0!==n&&(d=n),void 0!==r&&(p=r),f.thickness="normal",f.pattern="solid";break;case"dotted":f.thickness="normal",f.pattern="dotted",f.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f.thickness="thick",f.pattern="solid",f.style="stroke-width: 3.5px;fill:none;"}if(void 0!==s.style){var g=Jv(s.style);d=g.style,p=g.labelStyle}f.style=f.style+=d,f.labelStyle=f.labelStyle+=p,void 0!==s.interpolate?f.curve=Qv(s.interpolate,Pu):void 0!==t.defaultInterpolate?f.curve=Qv(t.defaultInterpolate,Pu):f.curve=Qv(mw.curve,Pu),void 0===s.text?void 0!==s.style&&(f.arrowheadStyle="fill: #333"):(f.arrowheadStyle="fill: #333",f.labelpos="c"),f.labelType="text",f.label=s.text.replace($m.lineBreakRegex,"\n"),void 0===s.style&&(f.style=f.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),f.labelStyle=f.labelStyle.replace("color:","fill:"),f.id=u,f.classes="flowchart-link "+l+" "+h,e.setEdge(s.start,s.end,f,i)}))}(m,d);var _=h.select('[id="'.concat(e,'"]'));_.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),f_(n.yy,_,e);var x=h.select("#"+e+" g");ax(x,d,["point","circle","cross"],"flowchart",e);var w=a.diagramPadding,k=_.node().getBBox(),T=k.width+2*w,C=k.height+2*w;if(o.debug("new ViewBox 0 0 ".concat(T," ").concat(C),"translate(".concat(w-d._label.marginx,", ").concat(w-d._label.marginy,")")),lb(_,C,T,a.useMaxWidth),_.attr("viewBox","0 0 ".concat(T," ").concat(C)),_.select("g").attr("transform","translate(".concat(w-d._label.marginx,", ").concat(w-k.y,")")),Gx.indexNodes("subGraph"+v),!a.htmlLabels)for(var E=f.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),S=0;S<E.length;S++){var A=E[S],M=A.getBBox(),N=f.createElementNS("http://www.w3.org/2000/svg","rect");N.setAttribute("rx",0),N.setAttribute("ry",0),N.setAttribute("width",M.width),N.setAttribute("height",M.height),A.insertBefore(N,A.firstChild)}Object.keys(y).forEach((function(t){var n=y[t];if(n.link){var r=au("#"+e+' [id="'+t+'"]');if(r){var i=f.createElementNS("http://www.w3.org/2000/svg","a");i.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),i.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),i.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===u?i.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):n.linkTarget&&i.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);var a=r.insert((function(){return i}),":first-child"),o=r.select(".label-container");o&&a.append((function(){return o.node()}));var s=r.select(".label");s&&a.append((function(){return s.node()}))}}}))};function _w(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var xw,ww,kw="",Tw="",Cw="",Ew=[],Sw=[],Aw={},Mw=[],Nw=[],Dw="",Bw=["active","done","crit","milestone"],Lw=[],Ow=!1,Iw=!1,Rw=0,Fw=function(t,e,n,r){return!(r.indexOf(t.format(e.trim()))>=0)&&(t.isoWeekday()>=6&&n.indexOf("weekends")>=0||n.indexOf(t.format("dddd").toLowerCase())>=0||n.indexOf(t.format(e.trim()))>=0)},Pw=function(t,e,n,r){if(n.length&&!t.manualEndTime){var a=i()(t.startTime,e,!0);a.add(1,"d");var o=i()(t.endTime,e,!0),s=Yw(a,o,e,n,r);t.endTime=o.toDate(),t.renderEndTime=s}},Yw=function(t,e,n,r,i){for(var a=!1,o=null;t<=e;)a||(o=e.toDate()),(a=Fw(t,n,r,i))&&e.add(1,"d"),t.add(1,"d");return o},jw=function(t,e,n){n=n.trim();var r=/^after\s+([\d\w- ]+)/.exec(n.trim());if(null!==r){var a=null;if(r[1].split(" ").forEach((function(t){var e=Vw(t);void 0!==e&&(a?e.endTime>a.endTime&&(a=e):a=e)})),a)return a.endTime;var s=new Date;return s.setHours(0,0,0,0),s}var c=i()(n,e.trim(),!0);return c.isValid()?c.toDate():(o.debug("Invalid date:"+n),o.debug("With date format:"+e.trim()),new Date)},Uw=function(t,e){if(null!==t)switch(t[2]){case"s":e.add(t[1],"seconds");break;case"m":e.add(t[1],"minutes");break;case"h":e.add(t[1],"hours");break;case"d":e.add(t[1],"days");break;case"w":e.add(t[1],"weeks")}return e.toDate()},zw=function(t,e,n,r){r=r||!1,n=n.trim();var a=i()(n,e.trim(),!0);return a.isValid()?(r&&a.add(1,"d"),a.toDate()):Uw(/^([\d]+)([wdhms])/.exec(n.trim()),i()(t))},$w=0,qw=function(t){return void 0===t?"task"+($w+=1):t},Hw=[],Ww={},Vw=function(t){var e=Ww[t];return Hw[e]},Gw=function(){for(var t=function(t){var e=Hw[t],n="";switch(Hw[t].raw.startTime.type){case"prevTaskEnd":var r=Vw(e.prevTaskId);e.startTime=r.endTime;break;case"getStartDate":(n=jw(0,kw,Hw[t].raw.startTime.startData))&&(Hw[t].startTime=n)}return Hw[t].startTime&&(Hw[t].endTime=zw(Hw[t].startTime,kw,Hw[t].raw.endTime.data,Ow),Hw[t].endTime&&(Hw[t].processed=!0,Hw[t].manualEndTime=i()(Hw[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Pw(Hw[t],kw,Sw,Ew))),Hw[t].processed},e=!0,n=0;n<Hw.length;n++)t(n),e=e&&Hw[n].processed;return e},Xw=function(t,e){t.split(",").forEach((function(t){var n=Vw(t);void 0!==n&&n.classes.push(e)}))},Zw=function(t,e){Lw.push((function(){var n=document.querySelector('[id="'.concat(t,'"]'));null!==n&&n.addEventListener("click",(function(){e()}))})),Lw.push((function(){var n=document.querySelector('[id="'.concat(t,'-text"]'));null!==n&&n.addEventListener("click",(function(){e()}))}))};const Qw={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().gantt},clear:function(){Mw=[],Nw=[],Dw="",Lw=[],$w=0,xw=void 0,ww=void 0,Hw=[],kw="",Tw="",Cw="",Ew=[],Sw=[],Ow=!1,Iw=!1,Rw=0,Aw={},Mb()},setDateFormat:function(t){kw=t},getDateFormat:function(){return kw},enableInclusiveEndDates:function(){Ow=!0},endDatesAreInclusive:function(){return Ow},enableTopAxis:function(){Iw=!0},topAxisEnabled:function(){return Iw},setAxisFormat:function(t){Tw=t},getAxisFormat:function(){return Tw},setTodayMarker:function(t){Cw=t},getTodayMarker:function(){return Cw},setTitle:Nb,getTitle:Db,setAccDescription:Bb,getAccDescription:Lb,addSection:function(t){Dw=t,Mw.push(t)},getSections:function(){return Mw},getTasks:function(){for(var t=Gw(),e=0;!t&&e<10;)t=Gw(),e++;return Nw=Hw},addTask:function(t,e){var n={section:Dw,type:Dw,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};Kw(n,r,Bw);for(var i=0;i<n.length;i++)n[i]=n[i].trim();switch(n.length){case 1:r.id=qw(),r.startTime={type:"prevTaskEnd",id:t},r.endTime={data:n[0]};break;case 2:r.id=qw(),r.startTime={type:"getStartDate",startData:n[0]},r.endTime={data:n[1]};break;case 3:r.id=qw(n[0]),r.startTime={type:"getStartDate",startData:n[1]},r.endTime={data:n[2]}}return r}(ww,e);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=ww,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.order=Rw,Rw++;var i=Hw.push(n);ww=n.id,Ww[n.id]=i-1},findTaskById:Vw,addTaskOrg:function(t,e){var n={section:Dw,type:Dw,description:t,task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};Kw(n,r,Bw);for(var a=0;a<n.length;a++)n[a]=n[a].trim();var o="";switch(n.length){case 1:r.id=qw(),r.startTime=t.endTime,o=n[0];break;case 2:r.id=qw(),r.startTime=jw(0,kw,n[0]),o=n[1];break;case 3:r.id=qw(n[0]),r.startTime=jw(0,kw,n[1]),o=n[2]}return o&&(r.endTime=zw(r.startTime,kw,o,Ow),r.manualEndTime=i()(o,"YYYY-MM-DD",!0).isValid(),Pw(r,kw,Sw,Ew)),r}(xw,e);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,xw=n,Nw.push(n)},setIncludes:function(t){Ew=t.toLowerCase().split(/[\s,]+/)},getIncludes:function(){return Ew},setExcludes:function(t){Sw=t.toLowerCase().split(/[\s,]+/)},getExcludes:function(){return Sw},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){if("loose"===wb().securityLevel&&void 0!==e){var r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var i=0;i<r.length;i++){var a=r[i].trim();'"'===a.charAt(0)&&'"'===a.charAt(a.length-1)&&(a=a.substr(1,a.length-2)),r[i]=a}}0===r.length&&r.push(t),void 0!==Vw(t)&&Zw(t,(function(){var t;db.runFunc.apply(db,[e].concat(function(t){if(Array.isArray(t))return _w(t)}(t=r)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return _w(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_w(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))}))}}(t,e,n)})),Xw(t,"clickable")},setLink:function(t,e){var n=e;"loose"!==wb().securityLevel&&(n=(0,Bm.N)(e)),t.split(",").forEach((function(t){void 0!==Vw(t)&&(Zw(t,(function(){window.open(n,"_self")})),Aw[t]=n)})),Xw(t,"clickable")},getLinks:function(){return Aw},bindFunctions:function(t){Lw.forEach((function(e){e(t)}))},durationToDate:Uw,isInvalidDate:Fw};function Kw(t,e,n){for(var r=!0;r;)r=!1,n.forEach((function(n){var i=new RegExp("^\\s*"+n+"\\s*$");t[0].match(i)&&(e[n]=!0,t.shift(1),r=!0)}))}var Jw,tk=n(9959),ek=n.n(tk);tk.parser.yy=Qw;const nk=function(t,e){var n=wb().gantt;tk.parser.yy.clear(),tk.parser.parse(t);var r,a=wb().securityLevel;"sandbox"===a&&(r=au("#i"+e));var o=au("sandbox"===a?r.nodes()[0].contentDocument.body:"body"),s="sandbox"===a?r.nodes()[0].contentDocument:document,c=s.getElementById(e);void 0===(Jw=c.parentElement.offsetWidth)&&(Jw=1200),void 0!==n.useWidth&&(Jw=n.useWidth);var h=tk.parser.yy.getTasks(),f=h.length*(n.barHeight+n.barGap)+2*n.topPadding;c.setAttribute("viewBox","0 0 "+Jw+" "+f);for(var d=o.select('[id="'.concat(e,'"]')),p=function(){return Zi.apply($s(mo,vo,Ga,Wa,Pa,Ra,Oa,Ba,Na,ko).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}().domain([l(h,(function(t){return t.startTime})),u(h,(function(t){return t.endTime}))]).rangeRound([0,Jw-n.leftPadding-n.rightPadding]),g=[],y=0;y<h.length;y++)g.push(h[y].type);var m=g;g=function(t){for(var e={},n=[],r=0,i=t.length;r<i;++r)Object.prototype.hasOwnProperty.call(e,t[r])||(e[t[r]]=!0,n.push(t[r]));return n}(g),h.sort((function(t,e){var n=t.startTime,r=e.startTime,i=0;return n>r?i=1:n<r&&(i=-1),i})),function(t,r,a){var o=n.barHeight,c=o+n.barGap,u=n.topPadding,l=n.leftPadding;fa().domain([0,g.length]).range(["#00B9FA","#F95002"]).interpolate(Yr),function(t,e,r,a,o,s,c,u){var l=s.reduce((function(t,e){var n=e.startTime;return t?Math.min(t,n):n}),0),h=s.reduce((function(t,e){var n=e.endTime;return t?Math.max(t,n):n}),0),f=tk.parser.yy.getDateFormat();if(l&&h){for(var g=[],y=null,m=i()(l);m.valueOf()<=h;)tk.parser.yy.isInvalidDate(m,f,c,u)?y?y.end=m.clone():y={start:m.clone(),end:m.clone()}:y&&(g.push(y),y=null),m.add(1,"d");d.append("g").selectAll("rect").data(g).enter().append("rect").attr("id",(function(t){return"exclude-"+t.start.format("YYYY-MM-DD")})).attr("x",(function(t){return p(t.start)+r})).attr("y",n.gridLineStartPadding).attr("width",(function(t){var e=t.end.clone().add(1,"day");return p(e)-p(t.start)})).attr("height",o-e-n.gridLineStartPadding).attr("transform-origin",(function(e,n){return(p(e.start)+r+.5*(p(e.end)-p(e.start))).toString()+"px "+(n*t+.5*o).toString()+"px"})).attr("class","exclude-range")}}(c,u,l,0,a,t,tk.parser.yy.getExcludes(),tk.parser.yy.getIncludes()),function(t,e,r,i){var a,o=(a=p,v(3,a)).tickSize(-i+e+n.gridLineStartPadding).tickFormat(jl(tk.parser.yy.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));if(d.append("g").attr("class","grid").attr("transform","translate("+t+", "+(i-50)+")").call(o).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),Qw.topAxisEnabled()||n.topAxis){var s=function(t){return v(1,t)}(p).tickSize(-i+e+n.gridLineStartPadding).tickFormat(jl(tk.parser.yy.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));d.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(s).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}(l,u,0,a),function(t,r,i,a,o,s,c){d.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",(function(t,e){return t.order*r+i-2})).attr("width",(function(){return c-n.rightPadding/2})).attr("height",r).attr("class",(function(t){for(var e=0;e<g.length;e++)if(t.type===g[e])return"section section"+e%n.numberSectionStyles;return"section section0"}));var u=d.append("g").selectAll("rect").data(t).enter(),l=Qw.getLinks();if(u.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?p(t.startTime)+a+.5*(p(t.endTime)-p(t.startTime))-.5*o:p(t.startTime)+a})).attr("y",(function(t,e){return t.order*r+i})).attr("width",(function(t){return t.milestone?o:p(t.renderEndTime||t.endTime)-p(t.startTime)})).attr("height",o).attr("transform-origin",(function(t,e){return e=t.order,(p(t.startTime)+a+.5*(p(t.endTime)-p(t.startTime))).toString()+"px "+(e*r+i+.5*o).toString()+"px"})).attr("class",(function(t){var e="";t.classes.length>0&&(e=t.classes.join(" "));for(var r=0,i=0;i<g.length;i++)t.type===g[i]&&(r=i%n.numberSectionStyles);var a="";return t.active?t.crit?a+=" activeCrit":a=" active":t.done?a=t.crit?" doneCrit":" done":t.crit&&(a+=" crit"),0===a.length&&(a=" task"),t.milestone&&(a=" milestone "+a),"task"+(a+=r)+" "+e})),u.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",n.fontSize).attr("x",(function(t){var e=p(t.startTime),r=p(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(p(t.endTime)-p(t.startTime))-.5*o),t.milestone&&(r=e+o);var i=this.getBBox().width;return i>r-e?r+i+1.5*n.leftPadding>c?e+a-5:r+a+5:(r-e)/2+e+a})).attr("y",(function(t,e){return t.order*r+n.barHeight/2+(n.fontSize/2-2)+i})).attr("text-height",o).attr("class",(function(t){var e=p(t.startTime),r=p(t.endTime);t.milestone&&(r=e+o);var i=this.getBBox().width,a="";t.classes.length>0&&(a=t.classes.join(" "));for(var s=0,u=0;u<g.length;u++)t.type===g[u]&&(s=u%n.numberSectionStyles);var l="";return t.active&&(l=t.crit?"activeCritText"+s:"activeText"+s),t.done?l=t.crit?l+" doneCritText"+s:l+" doneText"+s:t.crit&&(l=l+" critText"+s),t.milestone&&(l+=" milestoneText"),i>r-e?r+i+1.5*n.leftPadding>c?a+" taskTextOutsideLeft taskTextOutside"+s+" "+l:a+" taskTextOutsideRight taskTextOutside"+s+" "+l+" width-"+i:a+" taskText taskText"+s+" "+l+" width-"+i})),"sandbox"===wb().securityLevel){var h;h=au("#i"+e),au(h.nodes()[0].contentDocument.body);var f=h.nodes()[0].contentDocument;u.filter((function(t){return void 0!==l[t.id]})).each((function(t){var e=f.querySelector("#"+t.id),n=f.querySelector("#"+t.id+"-text"),r=e.parentNode,i=f.createElement("a");i.setAttribute("xlink:href",l[t.id]),i.setAttribute("target","_top"),r.appendChild(i),i.appendChild(e),i.appendChild(n)}))}}(t,c,u,l,o,0,r),function(t,e){for(var r=[],i=0,a=0;a<g.length;a++)r[a]=[g[a],(o=g[a],c=m,function(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}(c)[o]||0)];var o,c;d.append("g").selectAll("text").data(r).enter().append((function(t){var e=t[0].split($m.lineBreakRegex),n=-(e.length-1)/2,r=s.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("dy",n+"em");for(var i=0;i<e.length;i++){var a=s.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttribute("alignment-baseline","central"),a.setAttribute("x","10"),i>0&&a.setAttribute("dy","1em"),a.textContent=e[i],r.appendChild(a)}return r})).attr("x",10).attr("y",(function(n,a){if(!(a>0))return n[1]*t/2+e;for(var o=0;o<a;o++)return i+=r[a-1][1],n[1]*t/2+i*t+e})).attr("font-size",n.sectionFontSize).attr("font-size",n.sectionFontSize).attr("class",(function(t){for(var e=0;e<g.length;e++)if(t[0]===g[e])return"sectionTitle sectionTitle"+e%n.numberSectionStyles;return"sectionTitle"}))}(c,u),function(t,e,r,i){var a=Qw.getTodayMarker();if("off"!==a){var o=d.append("g").attr("class","today"),s=new Date,c=o.append("line");c.attr("x1",p(s)+t).attr("x2",p(s)+t).attr("y1",n.titleTopMargin).attr("y2",i-n.titleTopMargin).attr("class","today"),""!==a&&c.attr("style",a.replace(/,/g,";"))}}(l,0,0,a)}(h,Jw,f),lb(d,f,Jw,n.useMaxWidth),d.append("text").text(tk.parser.yy.getTitle()).attr("x",Jw/2).attr("y",n.titleTopMargin).attr("class","titleText"),f_(tk.parser.yy,d,e)};function rk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ik(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?rk(Object(n),!0).forEach((function(e){ak(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rk(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ak(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ok=wb().gitGraph.mainBranchName,sk=wb().gitGraph.mainBranchOrder,ck={},uk=null,lk={};lk[ok]={name:ok,order:sk};var hk={};hk[ok]=uk;var fk=ok,dk="LR",pk=0;function gk(){return nb({length:7})}var yk={},mk=function(t){if(t=$m.sanitizeText(t,wb()),void 0===hk[t]){var e=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+t+'")');throw e.hash={text:"checkout "+t,token:"checkout "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+t+'"']},e}var n=hk[fk=t];uk=ck[n]};function vk(t,e,n){var r=t.indexOf(e);-1===r?t.push(n):t.splice(r,1,n)}function bk(t){var e=t.reduce((function(t,e){return t.seq>e.seq?t:e}),t[0]),n="";t.forEach((function(t){n+=t===e?"\t*":"\t|"}));var r,i,a,s=[n,e.id,e.seq];for(var c in hk)hk[c]===e.id&&s.push(c);if(o.debug(s.join(" ")),e.parents&&2==e.parents.length){var u=ck[e.parents[0]];vk(t,e,u),t.push(ck[e.parents[1]])}else{if(0==e.parents.length)return;var l=ck[e.parents];vk(t,e,l)}r=t,i=function(t){return t.id},a=Object.create(null),bk(t=r.reduce((function(t,e){var n=i(e);return a[n]||(a[n]=!0,t.push(e)),t}),[]))}var _k=function(){var t=Object.keys(ck).map((function(t){return ck[t]}));return t.forEach((function(t){o.debug(t.id)})),t.sort((function(t,e){return t.seq-e.seq})),t},xk={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3};const wk={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().gitGraph},setDirection:function(t){dk=t},setOptions:function(t){o.debug("options str",t),t=(t=t&&t.trim())||"{}";try{yk=JSON.parse(t)}catch(t){o.error("error while parsing gitGraph options",t.message)}},getOptions:function(){return yk},commit:function(t,e,n,r){o.debug("Entering commit:",t,e,n,r),e=$m.sanitizeText(e,wb()),t=$m.sanitizeText(t,wb()),r=$m.sanitizeText(r,wb());var i={id:e||pk+"-"+gk(),message:t,seq:pk++,type:n||xk.NORMAL,tag:r||"",parents:null==uk?[]:[uk.id],branch:fk};uk=i,ck[i.id]=i,hk[fk]=i.id,o.debug("in pushCommit "+i.id)},branch:function(t,e){if(t=$m.sanitizeText(t,wb()),void 0!==hk[t]){var n=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+t+'")');throw n.hash={text:"branch "+t,token:"branch "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+t+'"']},n}hk[t]=null!=uk?uk.id:null,lk[t]={name:t,order:e?parseInt(e,10):null},mk(t),o.debug("in createBranch")},merge:function(t,e){t=$m.sanitizeText(t,wb());var n=ck[hk[fk]],r=ck[hk[t]];if(fk===t){var i=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw i.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},i}if(void 0===n||!n){var a=new Error('Incorrect usage of "merge". Current branch ('+fk+")has no commits");throw a.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},a}if(void 0===hk[t]){var s=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw s.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+t]},s}if(void 0===r||!r){var c=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw c.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},c}if(n===r){var u=new Error('Incorrect usage of "merge". Both branches have same head');throw u.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},u}var l={id:pk+"-"+gk(),message:"merged branch "+t+" into "+fk,seq:pk++,parents:[null==uk?null:uk.id,hk[t]],branch:fk,type:xk.MERGE,tag:e||""};uk=l,ck[l.id]=l,hk[fk]=l.id,o.debug(hk),o.debug("in mergeBranch")},checkout:mk,prettyPrint:function(){o.debug(ck),bk([_k()[0]])},clear:function(){ck={},uk=null;var t=wb().gitGraph.mainBranchName,e=wb().gitGraph.mainBranchOrder;(hk={})[t]=null,(lk={})[t]={name:t,order:e},fk=t,pk=0,Mb()},getBranchesAsObjArray:function(){return Object.values(lk).map((function(t,e){return null!==t.order?t:ik(ik({},t),{},{order:parseFloat("0.".concat(e),10)})})).sort((function(t,e){return t.order-e.order})).map((function(t){return{name:t.name}}))},getBranches:function(){return hk},getCommits:function(){return ck},getCommitsArray:_k,getCurrentBranch:function(){return fk},getDirection:function(){return dk},getHead:function(){return uk},setTitle:Nb,getTitle:Db,getAccDescription:Lb,setAccDescription:Bb,commitType:xk};var kk=n(2553),Tk=n.n(kk),Ck={},Ek={},Sk={},Ak=[],Mk=0,Nk=function(t,e,n){var r=wb().gitGraph,i=t.append("g").attr("class","commit-bullets"),a=t.append("g").attr("class","commit-labels"),o=0;Object.keys(e).sort((function(t,n){return e[t].seq-e[n].seq})).forEach((function(t,s){var c=e[t],u=Ek[c.branch].pos,l=o+10;if(n){var h;switch(c.type){case 0:default:h="commit-normal";break;case 1:h="commit-reverse";break;case 2:h="commit-highlight";break;case 3:h="commit-merge"}if(2===c.type){var f=i.append("rect");f.attr("x",l-10),f.attr("y",u-10),f.attr("height",20),f.attr("width",20),f.attr("class","commit "+c.id+" commit-highlight"+Ek[c.branch].index+" "+h+"-outer"),i.append("rect").attr("x",l-6).attr("y",u-6).attr("height",12).attr("width",12).attr("class","commit "+c.id+" commit"+Ek[c.branch].index+" "+h+"-inner")}else{var d=i.append("circle");if(d.attr("cx",l),d.attr("cy",u),d.attr("r",3===c.type?9:10),d.attr("class","commit "+c.id+" commit"+Ek[c.branch].index),3===c.type){var p=i.append("circle");p.attr("cx",l),p.attr("cy",u),p.attr("r",6),p.attr("class","commit "+h+" "+c.id+" commit"+Ek[c.branch].index)}1===c.type&&i.append("path").attr("d","M ".concat(l-5,",").concat(u-5,"L").concat(l+5,",").concat(u+5,"M").concat(l-5,",").concat(u+5,"L").concat(l+5,",").concat(u-5)).attr("class","commit "+h+" "+c.id+" commit"+Ek[c.branch].index)}}if(Sk[c.id]={x:o+10,y:u},n){if(3!==c.type&&r.showCommitLabel){var g=a.insert("rect").attr("class","commit-label-bkg"),y=a.append("text").attr("x",o).attr("y",u+25).attr("class","commit-label").text(c.id),m=y.node().getBBox();g.attr("x",o+10-m.width/2-2).attr("y",u+13.5).attr("width",m.width+4).attr("height",m.height+4),y.attr("x",o+10-m.width/2)}if(c.tag){var v=a.insert("polygon"),b=a.append("circle"),_=a.append("text").attr("y",u-16).attr("class","tag-label").text(c.tag),x=_.node().getBBox();_.attr("x",o+10-x.width/2);var w=x.height/2,k=u-19.2;v.attr("class","tag-label-bkg").attr("points","\n ".concat(o-x.width/2-2,",").concat(k+2,"\n ").concat(o-x.width/2-2,",").concat(k-2,"\n ").concat(o+10-x.width/2-4,",").concat(k-w-2,"\n ").concat(o+10+x.width/2+4,",").concat(k-w-2,"\n ").concat(o+10+x.width/2+4,",").concat(k+w+2,"\n ").concat(o+10-x.width/2-4,",").concat(k+w+2)),b.attr("cx",o-x.width/2+2).attr("cy",k).attr("r",1.5).attr("class","tag-hole")}}(o+=50)>Mk&&(Mk=o)}))},Dk=function t(e,n,r){var i=r||0,a=e+Math.abs(e-n)/2;if(i>5)return a;for(var o=!0,s=0;s<Ak.length;s++)Math.abs(Ak[s]-a)<10&&(o=!1);return o?(Ak.push(a),a):t(e,n-Math.abs(e-n)/5,i)};const Bk=function(t,e,n){Ek={},Sk={},Ck={},Mk=0,Ak=[];var r=wb(),i=wb().gitGraph,a=Tk().parser;a.yy=wk,a.yy.clear(),o.debug("in gitgraph renderer",t+"\n","id:",e,n),a.parse(t+"\n"),wk.getDirection(),Ck=wk.getCommits();var s=wk.getBranchesAsObjArray(),c=0;s.forEach((function(t,e){Ek[t.name]={pos:c,index:e},c+=50}));var u=au('[id="'.concat(e,'"]'));f_(a.yy,u,e),Nk(u,Ck,!1),i.showBranches&&function(t,e){wb().gitGraph;var n=t.append("g");e.forEach((function(t,e){var r=Ek[t.name].pos,i=n.append("line");i.attr("x1",0),i.attr("y1",r),i.attr("x2",Mk),i.attr("y2",r),i.attr("class","branch branch"+e),Ak.push(r);var a=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","text"),n=[];n="string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(t)?t:[];for(var r=0;r<n.length;r++){var i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=n[r].trim(),e.appendChild(i)}return e}(t.name),o=n.insert("rect"),s=n.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+e);s.node().appendChild(a);var c=a.getBBox();o.attr("class","branchLabelBkg label"+e).attr("rx",4).attr("ry",4).attr("x",-c.width-4).attr("y",-c.height/2+8).attr("width",c.width+18).attr("height",c.height+4),s.attr("transform","translate("+(-c.width-14)+", "+(r-c.height/2-1)+")"),o.attr("transform","translate(-19, "+(r-c.height/2)+")")}))}(u,s),function(t,e){var n=t.append("g").attr("class","commit-arrows");Object.keys(e).forEach((function(t,r){var i=e[t];i.parents&&i.parents.length>0&&i.parents.forEach((function(t){!function(t,e,n,r){var i=wb(),a=Sk[e.id],o=Sk[n.id],s=function(t,e,n){return Sk[e.id],Sk[t.id],Object.keys(n).filter((function(r){return n[r].branch===e.branch&&n[r].seq>t.seq&&n[r].seq<e.seq})).length>0}(e,n,r);i.arrowMarkerAbsolute&&(window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(").replace(/\)/g,"\\)");var c,u="",l="",h=0,f=0,d=Ek[n.branch].index;if(s){u="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",h=10,f=10,d=Ek[n.branch].index;var p=a.y<o.y?Dk(a.y,o.y):Dk(o.y,a.y);c=a.y<o.y?"M ".concat(a.x," ").concat(a.y," L ").concat(a.x," ").concat(p-h," ").concat(u," ").concat(a.x+f," ").concat(p," L ").concat(o.x-h," ").concat(p," ").concat(l," ").concat(o.x," ").concat(p+f," L ").concat(o.x," ").concat(o.y):"M ".concat(a.x," ").concat(a.y," L ").concat(a.x," ").concat(p+h," ").concat(l," ").concat(a.x+f," ").concat(p," L ").concat(o.x-h," ").concat(p," ").concat(u," ").concat(o.x," ").concat(p-f," L ").concat(o.x," ").concat(o.y)}else a.y<o.y&&(u="A 20 20, 0, 0, 0,",h=20,f=20,d=Ek[n.branch].index,c="M ".concat(a.x," ").concat(a.y," L ").concat(a.x," ").concat(o.y-h," ").concat(u," ").concat(a.x+f," ").concat(o.y," L ").concat(o.x," ").concat(o.y)),a.y>o.y&&(u="A 20 20, 0, 0, 0,",h=20,f=20,d=Ek[e.branch].index,c="M ".concat(a.x," ").concat(a.y," L ").concat(o.x-h," ").concat(a.y," ").concat(u," ").concat(o.x," ").concat(a.y-f," L ").concat(o.x," ").concat(o.y)),a.y===o.y&&(d=Ek[e.branch].index,c="M ".concat(a.x," ").concat(a.y," L ").concat(a.x," ").concat(o.y-h," ").concat(u," ").concat(a.x+f," ").concat(o.y," L ").concat(o.x," ").concat(o.y));t.append("path").attr("d",c).attr("class","arrow arrow"+d)}(n,e[t],i,e)}))}))}(u,Ck),Nk(u,Ck,!0);var l=i.diagramPadding,h=u.node().getBBox(),f=h.width+2*l,d=h.height+2*l;lb(u,d,f,r.useMaxWidth);var p="".concat(h.x-l," ").concat(h.y-l," ").concat(f," ").concat(d);u.attr("viewBox",p)};var Lk="",Ok=!1;const Ik={setMessage:function(t){o.debug("Setting message to: "+t),Lk=t},getMessage:function(){return Lk},setInfo:function(t){Ok=t},getInfo:function(){return Ok}};var Rk=n(6765),Fk=n.n(Rk),Pk={};const Yk=function(t){Object.keys(t).forEach((function(e){Pk[e]=t[e]}))};var jk=n(7062),Uk=n.n(jk),zk={},$k="",qk=!1;const Hk={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().pie},addSection:function(t,e){t=$m.sanitizeText(t,wb()),void 0===zk[t]&&(zk[t]=e,o.debug("Added new section :",t))},getSections:function(){return zk},cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){zk={},$k="",qk=!1,Mb()},setTitle:Nb,getTitle:Db,setPieTitle:function(t){var e=$m.sanitizeText(t,wb());$k=e},getPieTitle:function(){return $k},setShowData:function(t){qk=t},getShowData:function(){return qk},getAccDescription:Lb,setAccDescription:Bb};var Wk,Vk=wb();const Gk=function(t,e){try{Vk=wb();var n=Uk().parser;n.yy=Hk,o.debug("Rendering info diagram\n"+t);var r,i=wb().securityLevel;"sandbox"===i&&(r=au("#i"+e));var a=au("sandbox"===i?r.nodes()[0].contentDocument.body:"body"),s="sandbox"===i?r.nodes()[0].contentDocument:document;n.yy.clear(),n.parse(t),o.debug("Parsed info diagram");var c=s.getElementById(e);void 0===(Wk=c.parentElement.offsetWidth)&&(Wk=1200),void 0!==Vk.useWidth&&(Wk=Vk.useWidth),void 0!==Vk.pie.useWidth&&(Wk=Vk.pie.useWidth);var u=a.select("#"+e);lb(u,450,Wk,Vk.pie.useMaxWidth),f_(n.yy,u,e),c.setAttribute("viewBox","0 0 "+Wk+" 450");var l=Math.min(Wk,450)/2-40,h=u.append("g").attr("transform","translate("+Wk/2+",225)"),f=Hk.getSections(),d=0;Object.keys(f).forEach((function(t){d+=f[t]}));var p=Vk.themeVariables,g=[p.pie1,p.pie2,p.pie3,p.pie4,p.pie5,p.pie6,p.pie7,p.pie8,p.pie9,p.pie10,p.pie11,p.pie12],y=ma().range(g),m=function(){var t=$u,e=zu,n=null,r=pu(0),i=pu(Cu),a=pu(0);function o(o){var s,c,u,l,h,f=(o=Ru(o)).length,d=0,p=new Array(f),g=new Array(f),y=+r.apply(this,arguments),m=Math.min(Cu,Math.max(-Cu,i.apply(this,arguments)-y)),v=Math.min(Math.abs(m)/f,a.apply(this,arguments)),b=v*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(o[s],s,o))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),s=0,u=d?(m-f*b)/d:0;s<f;++s,y=l)c=p[s],l=y+((h=g[c])>0?h*u:0)+b,g[c]={data:o[c],index:s,value:h,startAngle:y,endAngle:l,padAngle:v};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:pu(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:pu(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:pu(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:pu(+t),o):a},o}().value((function(t){return t[1]})),v=m(Object.entries(f)),b=Iu().innerRadius(0).outerRadius(l);h.selectAll("mySlices").data(v).enter().append("path").attr("d",b).attr("fill",(function(t){return y(t.data[0])})).attr("class","pieCircle"),h.selectAll("mySlices").data(v).enter().append("text").text((function(t){return(t.data[1]/d*100).toFixed(0)+"%"})).attr("transform",(function(t){return"translate("+b.centroid(t)+")"})).style("text-anchor","middle").attr("class","slice"),h.append("text").text(n.yy.getPieTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");var _=h.selectAll(".legend").data(y.domain()).enter().append("g").attr("class","legend").attr("transform",(function(t,e){return"translate(216,"+(22*e-22*y.domain().length/2)+")"}));_.append("rect").attr("width",18).attr("height",18).style("fill",y).style("stroke",y),_.data(v).append("text").attr("x",22).attr("y",14).text((function(t){return n.yy.getShowData()||Vk.showData||Vk.pie.showData?t.data[0]+" ["+t.data[1]+"]":t.data[0]}))}catch(t){o.error("Error while rendering info diagram"),o.error(t)}};var Xk=n(3176),Zk=n.n(Xk),Qk=[],Kk={},Jk={},tT={},eT={};const nT={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().req},addRequirement:function(t,e){return void 0===Jk[t]&&(Jk[t]={name:t,type:e,id:Kk.id,text:Kk.text,risk:Kk.risk,verifyMethod:Kk.verifyMethod}),Kk={},Jk[t]},getRequirements:function(){return Jk},setNewReqId:function(t){void 0!==Kk&&(Kk.id=t)},setNewReqText:function(t){void 0!==Kk&&(Kk.text=t)},setNewReqRisk:function(t){void 0!==Kk&&(Kk.risk=t)},setNewReqVerifyMethod:function(t){void 0!==Kk&&(Kk.verifyMethod=t)},setTitle:Nb,getTitle:Db,setAccDescription:Bb,getAccDescription:Lb,addElement:function(t){return void 0===eT[t]&&(eT[t]={name:t,type:tT.type,docRef:tT.docRef},o.info("Added new requirement: ",t)),tT={},eT[t]},getElements:function(){return eT},setNewElementType:function(t){void 0!==tT&&(tT.type=t)},setNewElementDocRef:function(t){void 0!==tT&&(tT.docRef=t)},addRelationship:function(t,e,n){Qk.push({type:t,src:e,dst:n})},getRelationships:function(){return Qk},clear:function(){Qk=[],Kk={},Jk={},tT={},eT={},Mb()}};var rT={CONTAINS:"contains",ARROW:"arrow"};const iT=rT;var aT={},oT=0,sT=function(t,e){return t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",aT.rect_min_width+"px").attr("height",aT.rect_min_height+"px")},cT=function(t,e,n){var r=aT.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",r).attr("y",aT.rect_padding).attr("dominant-baseline","hanging"),a=0;n.forEach((function(t){0==a?i.append("tspan").attr("text-anchor","middle").attr("x",aT.rect_min_width/2).attr("dy",0).text(t):i.append("tspan").attr("text-anchor","middle").attr("x",aT.rect_min_width/2).attr("dy",.75*aT.line_height).text(t),a++}));var o=1.5*aT.rect_padding+a*aT.line_height*.75;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",aT.rect_min_width).attr("y1",o).attr("y2",o),{titleNode:i,y:o}},uT=function(t,e,n,r){var i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",aT.rect_padding).attr("y",r).attr("dominant-baseline","hanging"),a=0,o=[];return n.forEach((function(t){for(var e=t.length;e>30&&a<3;){var n=t.substring(0,30);e=(t=t.substring(30,t.length)).length,o[o.length]=n,a++}if(3==a){var r=o[o.length-1];o[o.length-1]=r.substring(0,r.length-4)+"..."}else o[o.length]=t;a=0})),o.forEach((function(t){i.append("tspan").attr("x",aT.rect_padding).attr("dy",aT.line_height).text(t)})),i},lT=function(t){return t.replace(/\s/g,"").replace(/\./g,"_")};const hT=function(t){if(void 0!==t)for(var e=Object.keys(t),n=0;n<e.length;n++)aT[e[n]]=t[e[n]]},fT=function(t,e){Xk.parser.yy=nT,Xk.parser.yy.clear(),Xk.parser.parse(t);var n,r=wb().securityLevel;"sandbox"===r&&(n=au("#i"+e));var i=au("sandbox"===r?n.nodes()[0].contentDocument.body:"body"),a=("sandbox"===r?n.nodes()[0].contentDocument:document,i.select("[id='".concat(e,"']")));!function(t,e){var n=t.append("defs").append("marker").attr("id",rT.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");n.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),n.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),n.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",rT.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d","M0,0\n L".concat(e.line_height,",").concat(e.line_height/2,"\n M").concat(e.line_height,",").concat(e.line_height/2,"\n L0,").concat(e.line_height)).attr("stroke-width",1)}(a,aT);var s=new(t_().Graph)({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:aT.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}})),c=nT.getRequirements(),u=nT.getElements(),l=nT.getRelationships();!function(t,e,n){Object.keys(t).forEach((function(r){var i=t[r];r=lT(r),o.info("Added new requirement: ",r);var a=n.append("g").attr("id",r),s=sT(a,"req-"+r),c=[],u=cT(a,r+"_title",["<<".concat(i.type,">>"),"".concat(i.name)]);c.push(u.titleNode);var l=uT(a,r+"_body",["Id: ".concat(i.id),"Text: ".concat(i.text),"Risk: ".concat(i.risk),"Verification: ".concat(i.verifyMethod)],u.y);c.push(l);var h=s.node().getBBox();e.setNode(r,{width:h.width,height:h.height,shape:"rect",id:r})}))}(c,s,a),function(t,e,n){Object.keys(t).forEach((function(r){var i=t[r],a=lT(r),o=n.append("g").attr("id",a),s="element-"+a,c=sT(o,s),u=[],l=cT(o,s+"_title",["<<Element>>","".concat(r)]);u.push(l.titleNode);var h=uT(o,s+"_body",["Type: ".concat(i.type||"Not Specified"),"Doc Ref: ".concat(i.docRef||"None")],l.y);u.push(h);var f=c.node().getBBox();e.setNode(a,{width:f.width,height:f.height,shape:"rect",id:a})}))}(u,s,a),function(t,e){t.forEach((function(t){var n=lT(t.src),r=lT(t.dst);e.setEdge(n,r,{relationship:t})}))}(l,s),Kb().layout(s),function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&(t.select("#"+n),t.select("#"+n).attr("transform","translate("+(e.node(n).x-e.node(n).width/2)+","+(e.node(n).y-e.node(n).height/2)+" )"))}))}(a,s),l.forEach((function(t){!function(t,e,n,r){var i=n.edge(lT(e.src),lT(e.dst)),a=Uu().x((function(t){return t.x})).y((function(t){return t.y})),o=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",a(i.points)).attr("fill","none");e.type==nT.Relationships.CONTAINS?o.attr("marker-start","url("+$m.getUrl(aT.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+$m.getUrl(aT.arrowMarkerAbsolute)+"#"+iT.ARROW+"_line_ending)")),function(t,e,n,r){var i=e.node().getTotalLength(),a=e.node().getPointAtLength(.5*i),o="rel"+oT;oT++;var s=t.append("text").attr("class","req relationshipLabel").attr("id",o).attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(r).node().getBBox();t.insert("rect","#"+o).attr("class","req reqLabelBox").attr("x",a.x-s.width/2).attr("y",a.y-s.height/2).attr("width",s.width).attr("height",s.height).attr("fill","white").attr("fill-opacity","85%")}(t,o,0,"<<".concat(e.type,">>"))}(a,t,s,e)}));var h=aT.rect_padding,f=a.node().getBBox(),d=f.width+2*h,p=f.height+2*h;lb(a,p,d,aT.useMaxWidth),a.attr("viewBox","".concat(f.x-h," ").concat(f.y-h," ").concat(d," ").concat(p)),f_(Xk.parser.yy,a,e)};var dT=n(6876),pT=n.n(dT),gT=void 0,yT={},mT=[],vT=[],bT="",_T=!1,xT=!1,wT=function(t,e,n,r){var i=yT[t];i&&e===i.name&&null==n||(null!=n&&null!=n.text||(n={text:e,wrap:null,type:r}),null!=r&&null!=n.text||(n={text:e,wrap:null,type:r}),yT[t]={name:e,description:n.text,wrap:void 0===n.wrap&&ET()||!!n.wrap,prevActor:gT,links:{},properties:{},actorCnt:null,rectData:null,type:r||"participant"},gT&&yT[gT]&&(yT[gT].nextActor=t),gT=t)},kT=function(t){var e,n=0;for(e=0;e<mT.length;e++)mT[e].type===ST.ACTIVE_START&&mT[e].from.actor===t&&n++,mT[e].type===ST.ACTIVE_END&&mT[e].from.actor===t&&n--;return n},TT=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{text:void 0,wrap:void 0},r=arguments.length>3?arguments[3]:void 0;if(r===ST.ACTIVE_END){var i=kT(t.actor);if(i<1){var a=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw a.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a}}return mT.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&ET()||!!n.wrap,type:r}),!0},CT=function(t){return yT[t]},ET=function(){return xT},ST={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26},AT=function(t,e,n){var r={actor:t,placement:e,message:n.text,wrap:void 0===n.wrap&&ET()||!!n.wrap},i=[].concat(t,t);vT.push(r),mT.push({from:i[0],to:i[1],message:n.text,wrap:void 0===n.wrap&&ET()||!!n.wrap,type:ST.NOTE,placement:e})},MT=function(t,e){var n=CT(t);try{var r=Pm(e.text,wb());r=(r=r.replace(/&amp;/g,"&")).replace(/&equals;/g,"="),NT(n,JSON.parse(r))}catch(t){o.error("error while parsing actor link text",t)}};function NT(t,e){if(null==t.links)t.links=e;else for(var n in e)t.links[n]=e[n]}var DT=function(t,e){var n=CT(t);try{var r=Pm(e.text,wb());BT(n,JSON.parse(r))}catch(t){o.error("error while parsing actor properties text",t)}};function BT(t,e){if(null==t.properties)t.properties=e;else for(var n in e)t.properties[n]=e[n]}var LT=function(t,e){var n=CT(t),r=document.getElementById(e.text);try{var i=r.innerHTML,a=JSON.parse(i);a.properties&&BT(n,a.properties),a.links&&NT(n,a.links)}catch(t){o.error("error while parsing actor details text",t)}};const OT={addActor:wT,addMessage:function(t,e,n,r){mT.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&ET()||!!n.wrap,answer:r})},addSignal:TT,addLinks:MT,addDetails:LT,addProperties:DT,autoWrap:ET,setWrap:function(t){xT=t},enableSequenceNumbers:function(){_T=!0},disableSequenceNumbers:function(){_T=!1},showSequenceNumbers:function(){return _T},getMessages:function(){return mT},getActors:function(){return yT},getActor:CT,getActorKeys:function(){return Object.keys(yT)},getActorProperty:function(t,e){if(void 0!==t&&void 0!==t.properties)return t.properties[e]},getTitle:Db,getDiagramTitle:function(){return bT},parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().sequence},clear:function(){yT={},mT=[],_T=!1,bT="",Mb()},parseMessage:function(t){var e=t.trim(),n={text:e.replace(/^[:]?(?:no)?wrap:/,"").trim(),wrap:null!==e.match(/^[:]?wrap:/)||null===e.match(/^[:]?nowrap:/)&&void 0};return o.debug("parseMessage:",n),n},LINETYPE:ST,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:AT,setTitle:Nb,setDiagramTitle:function(t){var e=Pm(t,wb());bT=e},apply:function t(e){if(e instanceof Array)e.forEach((function(e){t(e)}));else switch(e.type){case"sequenceIndex":mT.push({from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case"addParticipant":wT(e.actor,e.actor,e.description,"participant");break;case"addActor":wT(e.actor,e.actor,e.description,"actor");break;case"activeStart":case"activeEnd":TT(e.actor,void 0,void 0,e.signalType);break;case"addNote":AT(e.actor,e.placement,e.text);break;case"addLinks":MT(e.actor,e.text);break;case"addALink":!function(t,e){var n=CT(t);try{var r={},i=Pm(e.text,wb()),a=i.indexOf("@"),s=(i=(i=i.replace(/&amp;/g,"&")).replace(/&equals;/g,"=")).slice(0,a-1).trim(),c=i.slice(a+1).trim();r[s]=c,NT(n,r)}catch(t){o.error("error while parsing actor link text",t)}}(e.actor,e.text);break;case"addProperties":DT(e.actor,e.text);break;case"addDetails":LT(e.actor,e.text);break;case"addMessage":TT(e.from,e.to,e.msg,e.signalType);break;case"loopStart":TT(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":TT(void 0,void 0,void 0,e.signalType);break;case"rectStart":TT(void 0,void 0,e.color,e.signalType);break;case"optStart":TT(void 0,void 0,e.optText,e.signalType);break;case"altStart":case"else":TT(void 0,void 0,e.altText,e.signalType);break;case"setTitle":Nb(e.text);break;case"parStart":case"and":TT(void 0,void 0,e.parText,e.signalType)}},setAccDescription:Bb,getAccDescription:Lb};var IT=[],RT=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},FT=function(t,e){var n;n=function(){var n=document.querySelectorAll(t);0!==n.length&&(n[0].addEventListener("mouseover",(function(){jT("actor"+e+"_popup")})),n[0].addEventListener("mouseout",(function(){UT("actor"+e+"_popup")})))},IT.push(n)},PT=function(t,e,n,r){var i=t.append("image");i.attr("x",e),i.attr("y",n);var a=(0,Bm.N)(r);i.attr("xlink:href",a)},YT=function(t,e,n,r){var i=t.append("use");i.attr("x",e),i.attr("y",n);var a=(0,Bm.N)(r);i.attr("xlink:href","#"+a)},jT=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="block")},UT=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="none")},zT=function(t,e){var n=0,r=0,i=e.text.split($m.lineBreakRegex),a=[],o=0,s=function(){return e.y};if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":s=function(){return Math.round(e.y+e.textMargin)};break;case"middle":case"center":s=function(){return Math.round(e.y+(n+r+e.textMargin)/2)};break;case"bottom":case"end":s=function(){return Math.round(e.y+(n+r+2*e.textMargin)-e.textMargin)}}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="text-after-edge",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="text-before-edge",e.alignmentBaseline="middle"}for(var c=0;c<i.length;c++){var u=i[c];void 0!==e.textMargin&&0===e.textMargin&&void 0!==e.fontSize&&(o=c*e.fontSize);var l=t.append("text");if(l.attr("x",e.x),l.attr("y",s()),void 0!==e.anchor&&l.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&l.style("font-family",e.fontFamily),void 0!==e.fontSize&&l.style("font-size",e.fontSize),void 0!==e.fontWeight&&l.style("font-weight",e.fontWeight),void 0!==e.fill&&l.attr("fill",e.fill),void 0!==e.class&&l.attr("class",e.class),void 0!==e.dy?l.attr("dy",e.dy):0!==o&&l.attr("dy",o),e.tspan){var h=l.append("tspan");h.attr("x",e.x),void 0!==e.fill&&h.attr("fill",e.fill),h.text(u)}else l.text(u);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(l._groups||l)[0][0].getBBox().height,n=r),a.push(l)}return a},$T=function(t,e){var n=t.append("polygon");return n.attr("points",function(t,e,n,r,i){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+r-7)+" "+(t+n-8.4)+","+(e+r)+" "+t+","+(e+r)}(e.x,e.y,e.width,e.height)),n.attr("class","labelBox"),e.y=e.y+e.height/2,zT(t,e),n},qT=-1,HT=function(t,e){t.selectAll&&t.selectAll(".actor-line").attr("class","200").attr("y2",e-55)},WT=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},VT=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},GT=function(){function t(t,e,n,i,a,o,s){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c){for(var u=c.actorFontSize,l=c.actorFontFamily,h=c.actorFontWeight,f=t.split($m.lineBreakRegex),d=0;d<f.length;d++){var p=d*u-u*(f.length-1)/2,g=e.append("text").attr("x",n+a/2).attr("y",i).style("text-anchor","middle").style("font-size",u).style("font-weight",h).style("font-family",l);g.append("tspan").attr("x",n+a/2).attr("dy",p).text(f[d]),g.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(g,s)}}function n(t,n,i,a,o,s,c,u){var l=n.append("switch"),h=l.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,i,a,o,s,c,u),r(h,c)}function r(t,e){for(var n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),XT=function(){function t(t,e,n,i,a,o,s){r(e.append("text").attr("x",n).attr("y",i).style("text-anchor","start").text(t),s)}function e(t,e,n,i,a,o,s,c){for(var u=c.actorFontSize,l=c.actorFontFamily,h=c.actorFontWeight,f=t.split($m.lineBreakRegex),d=0;d<f.length;d++){var p=d*u-u*(f.length-1)/2,g=e.append("text").attr("x",n).attr("y",i).style("text-anchor","start").style("font-size",u).style("font-weight",h).style("font-family",l);g.append("tspan").attr("x",n).attr("dy",p).text(f[d]),g.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(g,s)}}function n(t,n,i,a,o,s,c,u){var l=n.append("switch"),h=l.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,i,a,0,s,c,u),r(h,c)}function r(t,e){for(var n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}();const ZT=RT,QT=function(t,e,n){switch(e.type){case"actor":return function(t,e,n){var r=e.x+e.width/2;0===e.y&&(qT++,t.append("line").attr("id","actor"+qT).attr("x1",r).attr("y1",80).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));var i=t.append("g");i.attr("class","actor-man");var a={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};a.x=e.x,a.y=e.y,a.fill="#eaeaea",a.width=e.width,a.height=e.height,a.class="actor",a.rx=3,a.ry=3,i.append("line").attr("id","actor-man-torso"+qT).attr("x1",r).attr("y1",e.y+25).attr("x2",r).attr("y2",e.y+45),i.append("line").attr("id","actor-man-arms"+qT).attr("x1",r-18).attr("y1",e.y+33).attr("x2",r+18).attr("y2",e.y+33),i.append("line").attr("x1",r-18).attr("y1",e.y+60).attr("x2",r).attr("y2",e.y+45),i.append("line").attr("x1",r).attr("y1",e.y+45).attr("x2",r+16).attr("y2",e.y+60);var o=i.append("circle");o.attr("cx",e.x+e.width/2),o.attr("cy",e.y+10),o.attr("r",15),o.attr("width",e.width),o.attr("height",e.height);var s=i.node().getBBox();return e.height=s.height,GT(n)(e.description,i,a.x,a.y+35,a.width,a.height,{class:"actor"},n),e.height}(t,e,n);case"participant":return function(t,e,n){var r=e.x+e.width/2,i=t.append("g"),a=i;0===e.y&&(qT++,a.append("line").attr("id","actor"+qT).attr("x1",r).attr("y1",5).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),a=i.append("g"),e.actorCnt=qT,null!=e.links&&(a.attr("id","root-"+qT),FT("#root-"+qT,qT)));var o={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0},s="actor";null!=e.properties&&e.properties.class?s=e.properties.class:o.fill="#eaeaea",o.x=e.x,o.y=e.y,o.width=e.width,o.height=e.height,o.class=s,o.rx=3,o.ry=3;var c=RT(a,o);if(e.rectData=o,null!=e.properties&&e.properties.icon){var u=e.properties.icon.trim();"@"===u.charAt(0)?YT(a,o.x+o.width-20,o.y+10,u.substr(1)):PT(a,o.x+o.width-20,o.y+10,u)}GT(n)(e.description,a,o.x,o.y,o.width,o.height,{class:"actor"},n);var l=e.height;if(c.node){var h=c.node().getBBox();e.height=h.height,l=h.height}return l}(t,e,n)}},KT=function(t,e,n,r,i){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};var a=e.links,o=e.actorCnt,s=e.rectData,c="none";i&&(c="block !important");var u=t.append("g");u.attr("id","actor"+o+"_popup"),u.attr("class","actorPopupMenu"),u.attr("display",c),FT("#actor"+o+"_popup",o);var l="";void 0!==s.class&&(l=" "+s.class);var h=s.width>n?s.width:n,f=u.append("rect");if(f.attr("class","actorPopupMenuPanel"+l),f.attr("x",s.x),f.attr("y",s.height),f.attr("fill",s.fill),f.attr("stroke",s.stroke),f.attr("width",h),f.attr("height",s.height),f.attr("rx",s.rx),f.attr("ry",s.ry),null!=a){var d=20;for(var p in a){var g=u.append("a"),y=(0,Bm.N)(a[p]);g.attr("xlink:href",y),g.attr("target","_blank"),XT(r)(p,g,s.x+10,s.height+d,h,20,{class:"actor"},r),d+=30}}return f.attr("height",d),{height:s.height+d,width:h}},JT=function(t){return t.append("g")},tC=function(t,e,n,r,i){var a={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0},o=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=n-e.starty,RT(o,a)},eC=function(t,e,n,r){var i=r.boxMargin,a=r.boxTextMargin,o=r.labelBoxHeight,s=r.labelBoxWidth,c=r.messageFontFamily,u=r.messageFontSize,l=r.messageFontWeight,h=t.append("g"),f=function(t,e,n,r){return h.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("class","loopLine")};f(e.startx,e.starty,e.stopx,e.starty),f(e.stopx,e.starty,e.stopx,e.stopy),f(e.startx,e.stopy,e.stopx,e.stopy),f(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){f(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));var d={x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0};d.text=n,d.x=e.startx,d.y=e.starty,d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.anchor="middle",d.valign="middle",d.tspan=!1,d.width=s||50,d.height=o||20,d.textMargin=a,d.class="labelText",$T(h,d),(d={x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}).text=e.title,d.x=e.startx+s/2+(e.stopx-e.startx)/2,d.y=e.starty+i+a,d.anchor="middle",d.valign="middle",d.textMargin=a,d.class="loopText",d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.wrap=!0;var p=zT(h,d);return void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,n){if(t.message){d.text=t.message,d.x=e.startx+(e.stopx-e.startx)/2,d.y=e.sections[n].y+i+a,d.class="loopText",d.anchor="middle",d.valign="middle",d.tspan=!1,d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.wrap=e.wrap,p=zT(h,d);var r=Math.round(p.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));e.sections[n].height+=r-(i+a)}})),e.height=Math.round(e.stopy-e.starty),h},nC=function(t,e){RT(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},rC=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},iC=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},aC=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},oC=function(t){var e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},sC=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},cC=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},uC=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},lC=WT,hC=VT;Bm.N;dT.parser.yy=OT;var fC={},dC={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((function(t){return t.height||0})))+(0===this.loops.length?0:this.loops.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.messages.length?0:this.messages.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.notes.length?0:this.notes.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))},clear:function(){this.actors=[],this.loops=[],this.messages=[],this.notes=[]},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,bC(dT.parser.yy.getConfig())},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i=this,a=0;function o(o){return function(s){a++;var c=i.sequenceItems.length-a+1;i.updateVal(s,"starty",e-c*fC.boxMargin,Math.min),i.updateVal(s,"stopy",r+c*fC.boxMargin,Math.max),i.updateVal(dC.data,"startx",t-c*fC.boxMargin,Math.min),i.updateVal(dC.data,"stopx",n+c*fC.boxMargin,Math.max),"activation"!==o&&(i.updateVal(s,"startx",t-c*fC.boxMargin,Math.min),i.updateVal(s,"stopx",n+c*fC.boxMargin,Math.max),i.updateVal(dC.data,"starty",e-c*fC.boxMargin,Math.min),i.updateVal(dC.data,"stopy",r+c*fC.boxMargin,Math.max))}}this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(dC.data,"startx",i,Math.min),this.updateVal(dC.data,"starty",o,Math.min),this.updateVal(dC.data,"stopx",a,Math.max),this.updateVal(dC.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},newActivation:function(t,e,n){var r=n[t.from.actor],i=_C(t.from.actor).length||0,a=r.x+r.width/2+(i-1)*fC.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+fC.activationWidth,stopy:void 0,actor:t.from.actor,anchored:JT(e)})},endActivation:function(t){var e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:dC.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},pC=function(t){return{fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}},gC=function(t){return{fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}},yC=function(t){return{fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}},mC=function(t,e,n,r,i,a){if(!0===i.hideUnusedParticipants){var o=new Set;a.forEach((function(t){o.add(t.from),o.add(t.to)})),n=n.filter((function(t){return o.has(t)}))}for(var s=0,c=0,u=0,l=0;l<n.length;l++){var h=e[n[l]];h.width=h.width||fC.width,h.height=Math.max(h.height||fC.height,fC.height),h.margin=h.margin||fC.actorMargin,h.x=s+c,h.y=r;var f=QT(t,h,fC);u=Math.max(u,f),dC.insert(h.x,r,h.x+h.width,h.height),s+=h.width,c+=h.margin,dC.models.addActor(h)}dC.bumpVerticalPos(u)},vC=function(t,e,n,r){for(var i=0,a=0,o=0;o<n.length;o++){var s=e[n[o]],c=kC(s),u=KT(t,s,c,fC,fC.forceMenus,r);u.height>i&&(i=u.height),u.width+s.x>a&&(a=u.width+s.x)}return{maxHeight:i,maxWidth:a}},bC=function(t){rb(fC,t),t.fontFamily&&(fC.actorFontFamily=fC.noteFontFamily=fC.messageFontFamily=t.fontFamily),t.fontSize&&(fC.actorFontSize=fC.noteFontSize=fC.messageFontSize=t.fontSize),t.fontWeight&&(fC.actorFontWeight=fC.noteFontWeight=fC.messageFontWeight=t.fontWeight)},_C=function(t){return dC.activations.filter((function(e){return e.actor===t}))},xC=function(t,e){var n=e[t],r=_C(t);return[r.reduce((function(t,e){return Math.min(t,e.startx)}),n.x+n.width/2),r.reduce((function(t,e){return Math.max(t,e.stopx)}),n.x+n.width/2)]};function wC(t,e,n,r,i){dC.bumpVerticalPos(n);var a=r;if(e.id&&e.message&&t[e.id]){var s=t[e.id].width,c=pC(fC);e.message=db.wrapLabel("[".concat(e.message,"]"),s-2*fC.wrapPadding,c),e.width=s,e.wrap=!0;var u=db.calculateTextDimensions(e.message,c),l=Math.max(u.height,fC.labelBoxHeight);a=r+l,o.debug("".concat(l," - ").concat(e.message))}i(e),dC.bumpVerticalPos(a)}var kC=function(t){var e=0,n=yC(fC);for(var r in t.links){var i=db.calculateTextDimensions(r,n).width+2*fC.wrapPadding+2*fC.boxMargin;e<i&&(e=i)}return e};const TC={bounds:dC,drawActors:mC,drawActorsPopup:vC,setConf:bC,draw:function(t,e){fC=wb().sequence;var n,r=wb().securityLevel;"sandbox"===r&&(n=au("#i"+e));var i=au("sandbox"===r?n.nodes()[0].contentDocument.body:"body"),a="sandbox"===r?n.nodes()[0].contentDocument:document;dT.parser.yy.clear(),dT.parser.yy.setWrap(fC.wrap),dT.parser.parse(t+"\n"),dC.init(),o.debug("C:".concat(JSON.stringify(fC,null,2)));var s="sandbox"===r?i.select('[id="'.concat(e,'"]')):au('[id="'.concat(e,'"]')),c=dT.parser.yy.getActors(),u=dT.parser.yy.getActorKeys(),l=dT.parser.yy.getMessages(),h=dT.parser.yy.getDiagramTitle(),f=function(t,e){var n={};return e.forEach((function(e){if(t[e.to]&&t[e.from]){var r=t[e.to];if(e.placement===dT.parser.yy.PLACEMENT.LEFTOF&&!r.prevActor)return;if(e.placement===dT.parser.yy.PLACEMENT.RIGHTOF&&!r.nextActor)return;var i=void 0!==e.placement,a=!i,o=i?gC(fC):pC(fC),s=e.wrap?db.wrapLabel(e.message,fC.width-2*fC.wrapPadding,o):e.message,c=db.calculateTextDimensions(s,o).width+2*fC.wrapPadding;a&&e.from===r.nextActor?n[e.to]=Math.max(n[e.to]||0,c):a&&e.from===r.prevActor?n[e.from]=Math.max(n[e.from]||0,c):a&&e.from===e.to?(n[e.from]=Math.max(n[e.from]||0,c/2),n[e.to]=Math.max(n[e.to]||0,c/2)):e.placement===dT.parser.yy.PLACEMENT.RIGHTOF?n[e.from]=Math.max(n[e.from]||0,c):e.placement===dT.parser.yy.PLACEMENT.LEFTOF?n[r.prevActor]=Math.max(n[r.prevActor]||0,c):e.placement===dT.parser.yy.PLACEMENT.OVER&&(r.prevActor&&(n[r.prevActor]=Math.max(n[r.prevActor]||0,c/2)),r.nextActor&&(n[e.from]=Math.max(n[e.from]||0,c/2)))}})),o.debug("maxMessageWidthPerActor:",n),n}(c,l);fC.height=function(t,e){var n=0;for(var r in Object.keys(t).forEach((function(e){var r=t[e];r.wrap&&(r.description=db.wrapLabel(r.description,fC.width-2*fC.wrapPadding,yC(fC)));var i=db.calculateTextDimensions(r.description,yC(fC));r.width=r.wrap?fC.width:Math.max(fC.width,i.width+2*fC.wrapPadding),r.height=r.wrap?Math.max(i.height,fC.height):fC.height,n=Math.max(n,r.height)})),e){var i=t[r];if(i){var a=t[i.nextActor];if(a){var o=e[r]+fC.actorMargin-i.width/2-a.width/2;i.margin=Math.max(o,fC.actorMargin)}}}return Math.max(n,fC.height)}(c,f),cC(s),sC(s),uC(s),mC(s,c,u,0,fC,l);var d=function(t,e){var n,r,i,a={},s=[];return t.forEach((function(t){switch(t.id=db.random({length:10}),t.type){case dT.parser.yy.LINETYPE.LOOP_START:case dT.parser.yy.LINETYPE.ALT_START:case dT.parser.yy.LINETYPE.OPT_START:case dT.parser.yy.LINETYPE.PAR_START:s.push({id:t.id,msg:t.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case dT.parser.yy.LINETYPE.ALT_ELSE:case dT.parser.yy.LINETYPE.PAR_AND:t.message&&(n=s.pop(),a[n.id]=n,a[t.id]=n,s.push(n));break;case dT.parser.yy.LINETYPE.LOOP_END:case dT.parser.yy.LINETYPE.ALT_END:case dT.parser.yy.LINETYPE.OPT_END:case dT.parser.yy.LINETYPE.PAR_END:n=s.pop(),a[n.id]=n;break;case dT.parser.yy.LINETYPE.ACTIVE_START:var c=e[t.from?t.from.actor:t.to.actor],u=_C(t.from?t.from.actor:t.to.actor).length,l=c.x+c.width/2+(u-1)*fC.activationWidth/2,h={startx:l,stopx:l+fC.activationWidth,actor:t.from.actor,enabled:!0};dC.activations.push(h);break;case dT.parser.yy.LINETYPE.ACTIVE_END:var f=dC.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);delete dC.activations.splice(f,1)[0]}void 0!==t.placement?(r=function(t,e){var n=e[t.from].x,r=e[t.to].x,i=t.wrap&&t.message,a=db.calculateTextDimensions(i?db.wrapLabel(t.message,fC.width,gC(fC)):t.message,gC(fC)),s={width:i?fC.width:Math.max(fC.width,a.width+2*fC.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===dT.parser.yy.PLACEMENT.RIGHTOF?(s.width=i?Math.max(fC.width,a.width):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*fC.noteMargin),s.startx=n+(e[t.from].width+fC.actorMargin)/2):t.placement===dT.parser.yy.PLACEMENT.LEFTOF?(s.width=i?Math.max(fC.width,a.width+2*fC.noteMargin):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*fC.noteMargin),s.startx=n-s.width+(e[t.from].width-fC.actorMargin)/2):t.to===t.from?(a=db.calculateTextDimensions(i?db.wrapLabel(t.message,Math.max(fC.width,e[t.from].width),gC(fC)):t.message,gC(fC)),s.width=i?Math.max(fC.width,e[t.from].width):Math.max(e[t.from].width,fC.width,a.width+2*fC.noteMargin),s.startx=n+(e[t.from].width-s.width)/2):(s.width=Math.abs(n+e[t.from].width/2-(r+e[t.to].width/2))+fC.actorMargin,s.startx=n<r?n+e[t.from].width/2-fC.actorMargin/2:r+e[t.to].width/2-fC.actorMargin/2),i&&(s.message=db.wrapLabel(t.message,s.width-2*fC.wrapPadding,gC(fC))),o.debug("NM:[".concat(s.startx,",").concat(s.stopx,",").concat(s.starty,",").concat(s.stopy,":").concat(s.width,",").concat(s.height,"=").concat(t.message,"]")),s}(t,e),t.noteModel=r,s.forEach((function(t){(n=t).from=Math.min(n.from,r.startx),n.to=Math.max(n.to,r.startx+r.width),n.width=Math.max(n.width,Math.abs(n.from-n.to))-fC.labelBoxWidth}))):(i=function(t,e){var n=!1;if([dT.parser.yy.LINETYPE.SOLID_OPEN,dT.parser.yy.LINETYPE.DOTTED_OPEN,dT.parser.yy.LINETYPE.SOLID,dT.parser.yy.LINETYPE.DOTTED,dT.parser.yy.LINETYPE.SOLID_CROSS,dT.parser.yy.LINETYPE.DOTTED_CROSS,dT.parser.yy.LINETYPE.SOLID_POINT,dT.parser.yy.LINETYPE.DOTTED_POINT].includes(t.type)&&(n=!0),!n)return{};var r=xC(t.from,e),i=xC(t.to,e),a=r[0]<=i[0]?1:0,o=r[0]<i[0]?0:1,s=r.concat(i),c=Math.abs(i[o]-r[a]);t.wrap&&t.message&&(t.message=db.wrapLabel(t.message,Math.max(c+2*fC.wrapPadding,fC.width),pC(fC)));var u=db.calculateTextDimensions(t.message,pC(fC));return{width:Math.max(t.wrap?0:u.width+2*fC.wrapPadding,c+2*fC.wrapPadding,fC.width),height:0,startx:r[a],stopx:i[o],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,s),toBounds:Math.max.apply(null,s)}}(t,e),t.msgModel=i,i.startx&&i.stopx&&s.length>0&&s.forEach((function(r){if(n=r,i.startx===i.stopx){var a=e[t.from],o=e[t.to];n.from=Math.min(a.x-i.width/2,a.x-a.width/2,n.from),n.to=Math.max(o.x+i.width/2,o.x+a.width/2,n.to),n.width=Math.max(n.width,Math.abs(n.to-n.from))-fC.labelBoxWidth}else n.from=Math.min(i.startx,n.from),n.to=Math.max(i.stopx,n.to),n.width=Math.max(n.width,i.width)-fC.labelBoxWidth})))})),dC.activations=[],o.debug("Loop type widths:",a),a}(l,c);rC(s),oC(s),iC(s),aC(s);var p=1,g=1,y=Array();l.forEach((function(t){var e,n,r;switch(t.type){case dT.parser.yy.LINETYPE.NOTE:n=t.noteModel,function(t,e){dC.bumpVerticalPos(fC.boxMargin),e.height=fC.boxMargin,e.starty=dC.getVerticalPos();var n=hC();n.x=e.startx,n.y=e.starty,n.width=e.width||fC.width,n.class="note";var r=t.append("g"),i=ZT(r,n),a=lC();a.x=e.startx,a.y=e.starty,a.width=n.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=fC.noteFontFamily,a.fontSize=fC.noteFontSize,a.fontWeight=fC.noteFontWeight,a.anchor=fC.noteAlign,a.textMargin=fC.noteMargin,a.valign=fC.noteAlign;var o=zT(r,a),s=Math.round(o.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));i.attr("height",s+2*fC.noteMargin),e.height+=s+2*fC.noteMargin,dC.bumpVerticalPos(s+2*fC.noteMargin),e.stopy=e.starty+s+2*fC.noteMargin,e.stopx=e.startx+n.width,dC.insert(e.startx,e.starty,e.stopx,e.stopy),dC.models.addNote(e)}(s,n);break;case dT.parser.yy.LINETYPE.ACTIVE_START:dC.newActivation(t,s,c);break;case dT.parser.yy.LINETYPE.ACTIVE_END:!function(t,e){var n=dC.endActivation(t);n.starty+18>e&&(n.starty=e-6,e+=12),tC(s,n,e,fC,_C(t.from.actor).length),dC.insert(n.startx,e-10,n.stopx,e)}(t,dC.getVerticalPos());break;case dT.parser.yy.LINETYPE.LOOP_START:wC(d,t,fC.boxMargin,fC.boxMargin+fC.boxTextMargin,(function(t){return dC.newLoop(t)}));break;case dT.parser.yy.LINETYPE.LOOP_END:e=dC.endLoop(),eC(s,e,"loop",fC),dC.bumpVerticalPos(e.stopy-dC.getVerticalPos()),dC.models.addLoop(e);break;case dT.parser.yy.LINETYPE.RECT_START:wC(d,t,fC.boxMargin,fC.boxMargin,(function(t){return dC.newLoop(void 0,t.message)}));break;case dT.parser.yy.LINETYPE.RECT_END:e=dC.endLoop(),nC(s,e),dC.models.addLoop(e),dC.bumpVerticalPos(e.stopy-dC.getVerticalPos());break;case dT.parser.yy.LINETYPE.OPT_START:wC(d,t,fC.boxMargin,fC.boxMargin+fC.boxTextMargin,(function(t){return dC.newLoop(t)}));break;case dT.parser.yy.LINETYPE.OPT_END:e=dC.endLoop(),eC(s,e,"opt",fC),dC.bumpVerticalPos(e.stopy-dC.getVerticalPos()),dC.models.addLoop(e);break;case dT.parser.yy.LINETYPE.ALT_START:wC(d,t,fC.boxMargin,fC.boxMargin+fC.boxTextMargin,(function(t){return dC.newLoop(t)}));break;case dT.parser.yy.LINETYPE.ALT_ELSE:wC(d,t,fC.boxMargin+fC.boxTextMargin,fC.boxMargin,(function(t){return dC.addSectionToLoop(t)}));break;case dT.parser.yy.LINETYPE.ALT_END:e=dC.endLoop(),eC(s,e,"alt",fC),dC.bumpVerticalPos(e.stopy-dC.getVerticalPos()),dC.models.addLoop(e);break;case dT.parser.yy.LINETYPE.PAR_START:wC(d,t,fC.boxMargin,fC.boxMargin+fC.boxTextMargin,(function(t){return dC.newLoop(t)}));break;case dT.parser.yy.LINETYPE.PAR_AND:wC(d,t,fC.boxMargin+fC.boxTextMargin,fC.boxMargin,(function(t){return dC.addSectionToLoop(t)}));break;case dT.parser.yy.LINETYPE.PAR_END:e=dC.endLoop(),eC(s,e,"par",fC),dC.bumpVerticalPos(e.stopy-dC.getVerticalPos()),dC.models.addLoop(e);break;case dT.parser.yy.LINETYPE.AUTONUMBER:p=t.message.start||p,g=t.message.step||g,t.message.visible?dT.parser.yy.enableSequenceNumbers():dT.parser.yy.disableSequenceNumbers();break;default:try{(r=t.msgModel).starty=dC.getVerticalPos(),r.sequenceIndex=p,r.sequenceVisible=dT.parser.yy.showSequenceNumbers();var i=function(t,e){dC.bumpVerticalPos(10);var n,r=e.startx,i=e.stopx,a=e.message,o=$m.splitBreaks(a).length,s=db.calculateTextDimensions(a,pC(fC)),c=s.height/o;e.height+=c,dC.bumpVerticalPos(c);var u=s.height-10,l=s.width;if(r===i){n=dC.getVerticalPos()+u,fC.rightAngles||(u+=fC.boxMargin,n=dC.getVerticalPos()+u),u+=30;var h=Math.max(l/2,fC.width/2);dC.insert(r-h,dC.getVerticalPos()-10+u,i+h,dC.getVerticalPos()+30+u)}else u+=fC.boxMargin,n=dC.getVerticalPos()+u,dC.insert(r,n-10,i,n);return dC.bumpVerticalPos(u),e.height+=u,e.stopy=e.starty+e.height,dC.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),n}(0,r);y.push({messageModel:r,lineStarty:i}),dC.models.addMessage(r)}catch(t){o.error("error while drawing message",t)}}[dT.parser.yy.LINETYPE.SOLID_OPEN,dT.parser.yy.LINETYPE.DOTTED_OPEN,dT.parser.yy.LINETYPE.SOLID,dT.parser.yy.LINETYPE.DOTTED,dT.parser.yy.LINETYPE.SOLID_CROSS,dT.parser.yy.LINETYPE.DOTTED_CROSS,dT.parser.yy.LINETYPE.SOLID_POINT,dT.parser.yy.LINETYPE.DOTTED_POINT].includes(t.type)&&(p+=g)})),y.forEach((function(t){return function(t,e,n){var r=e.startx,i=e.stopx,a=e.starty,o=e.message,s=e.type,c=e.sequenceIndex,u=e.sequenceVisible,l=db.calculateTextDimensions(o,pC(fC)),h=lC();h.x=r,h.y=a+10,h.width=i-r,h.class="messageText",h.dy="1em",h.text=o,h.fontFamily=fC.messageFontFamily,h.fontSize=fC.messageFontSize,h.fontWeight=fC.messageFontWeight,h.anchor=fC.messageAlign,h.valign=fC.messageAlign,h.textMargin=fC.wrapPadding,h.tspan=!1,zT(t,h);var f,d=l.width;r===i?f=fC.rightAngles?t.append("path").attr("d","M ".concat(r,",").concat(n," H ").concat(r+Math.max(fC.width/2,d/2)," V ").concat(n+25," H ").concat(r)):t.append("path").attr("d","M "+r+","+n+" C "+(r+60)+","+(n-10)+" "+(r+60)+","+(n+30)+" "+r+","+(n+20)):((f=t.append("line")).attr("x1",r),f.attr("y1",n),f.attr("x2",i),f.attr("y2",n)),s===dT.parser.yy.LINETYPE.DOTTED||s===dT.parser.yy.LINETYPE.DOTTED_CROSS||s===dT.parser.yy.LINETYPE.DOTTED_POINT||s===dT.parser.yy.LINETYPE.DOTTED_OPEN?(f.style("stroke-dasharray","3, 3"),f.attr("class","messageLine1")):f.attr("class","messageLine0");var p="";fC.arrowMarkerAbsolute&&(p=(p=(p=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),f.attr("stroke-width",2),f.attr("stroke","none"),f.style("fill","none"),s!==dT.parser.yy.LINETYPE.SOLID&&s!==dT.parser.yy.LINETYPE.DOTTED||f.attr("marker-end","url("+p+"#arrowhead)"),s!==dT.parser.yy.LINETYPE.SOLID_POINT&&s!==dT.parser.yy.LINETYPE.DOTTED_POINT||f.attr("marker-end","url("+p+"#filled-head)"),s!==dT.parser.yy.LINETYPE.SOLID_CROSS&&s!==dT.parser.yy.LINETYPE.DOTTED_CROSS||f.attr("marker-end","url("+p+"#crosshead)"),(u||fC.showSequenceNumbers)&&(f.attr("marker-start","url("+p+"#sequencenumber)"),t.append("text").attr("x",r).attr("y",n+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("textLength","16px").attr("class","sequenceNumber").text(c))}(s,t.messageModel,t.lineStarty)})),fC.mirrorActors&&(dC.bumpVerticalPos(2*fC.boxMargin),mC(s,c,u,dC.getVerticalPos(),fC,l),dC.bumpVerticalPos(fC.boxMargin),HT(s,dC.getVerticalPos()));var m=vC(s,c,u,a),v=dC.getBounds().bounds;o.debug("For line height fix Querying: #"+e+" .actor-line"),ou("#"+e+" .actor-line").attr("y2",v.stopy);var b=v.stopy-v.starty;b<m.maxHeight&&(b=m.maxHeight);var _=b+2*fC.diagramMarginY;fC.mirrorActors&&(_=_-fC.boxMargin+fC.bottomMarginAdj);var x=v.stopx-v.startx;x<m.maxWidth&&(x=m.maxWidth);var w=x+2*fC.diagramMarginX;h&&s.append("text").text(h).attr("x",(v.stopx-v.startx)/2-2*fC.diagramMarginX).attr("y",-25),lb(s,_,w,fC.useMaxWidth);var k=h?40:0;s.attr("viewBox",v.startx-fC.diagramMarginX+" -"+(fC.diagramMarginY+k)+" "+w+" "+(_+k)),f_(dT.parser.yy,s,e),o.debug("models:",dC.models)}};var CC=n(3584),EC=n.n(CC);function SC(t){return SC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},SC(t)}var AC=function(t){return JSON.parse(JSON.stringify(t))},MC=[],NC=function t(e,n,r){if("relation"===n.stmt)t(e,n.state1,!0),t(e,n.state2,!1);else if("state"===n.stmt&&"[*]"===n.id&&(n.id=r?e.id+"_start":e.id+"_end",n.start=r),n.doc){var i=[],a=0,o=[];for(a=0;a<n.doc.length;a++)if("divider"===n.doc[a].type){var s=AC(n.doc[a]);s.doc=AC(o),i.push(s),o=[]}else o.push(n.doc[a]);if(i.length>0&&o.length>0){var c={stmt:"state",id:eb(),type:"divider",doc:AC(o)};i.push(AC(c)),n.doc=i}n.doc.forEach((function(e){return t(n,e,!0)}))}},DC={root:{relations:[],states:{},documents:{}}},BC=DC.root,LC=0,OC=function(t,e,n,r,i){void 0===BC.states[t]?BC.states[t]={id:t,descriptions:[],type:e,doc:n,note:i}:(BC.states[t].doc||(BC.states[t].doc=n),BC.states[t].type||(BC.states[t].type=e)),r&&(o.info("Adding state ",t,r),"string"==typeof r&&FC(t,r.trim()),"object"===SC(r)&&r.forEach((function(e){return FC(t,e.trim())}))),i&&(BC.states[t].note=i,BC.states[t].note.text=$m.sanitizeText(BC.states[t].note.text,wb()))},IC=function(){BC=(DC={root:{relations:[],states:{},documents:{}}}).root,BC=DC.root,LC=0,YC=[],Mb()},RC=function(t,e,n){var r=t,i=e,a="default",o="default";"[*]"===t&&(r="start"+ ++LC,a="start"),"[*]"===e&&(i="end"+LC,o="end"),OC(r,a),OC(i,o),BC.relations.push({id1:r,id2:i,title:$m.sanitizeText(n,wb())})},FC=function(t,e){var n=BC.states[t],r=e;":"===r[0]&&(r=r.substr(1).trim()),n.descriptions.push($m.sanitizeText(r,wb()))},PC=0,YC=[],jC="TB";const UC={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().state},addState:OC,clear:IC,getState:function(t){return BC.states[t]},getStates:function(){return BC.states},getRelations:function(){return BC.relations},getClasses:function(){return YC},getDirection:function(){return jC},addRelation:RC,getDividerId:function(){return"divider-id-"+ ++PC},setDirection:function(t){jC=t},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:function(){o.info("Documents = ",DC)},getRootDoc:function(){return MC},setRootDoc:function(t){o.info("Setting root doc",t),MC=t},getRootDocV2:function(){return NC({id:"root"},{id:"root",doc:MC},!0),{id:"root",doc:MC}},extract:function(t){var e;e=t.doc?t.doc:t,o.info(e),IC(),o.info("Extract",e),e.forEach((function(t){"state"===t.stmt&&OC(t.id,t.type,t.doc,t.description,t.note),"relation"===t.stmt&&RC(t.state1.id,t.state2.id,t.description)}))},trimColon:function(t){return t&&":"===t[0]?t.substr(1).trim():t.trim()},getTitle:Db,setTitle:Nb,getAccDescription:Lb,setAccDescription:Bb};var zC={};function $C(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var qC,HC=function(t,e,n){var r,i=wb().state.padding,a=2*wb().state.padding,o=t.node().getBBox(),s=o.width,c=o.x,u=t.append("text").attr("x",0).attr("y",wb().state.titleShift).attr("font-size",wb().state.fontSize).attr("class","state-title").text(e.id),l=u.node().getBBox().width+a,h=Math.max(l,s);h===s&&(h+=a);var f=t.node().getBBox();e.doc,r=c-i,l>s&&(r=(s-h)/2+i),Math.abs(c-f.x)<i&&l>s&&(r=c-(l-s)/2);var d=1-wb().state.textHeight;return t.insert("rect",":first-child").attr("x",r).attr("y",d).attr("class",n?"alt-composit":"composit").attr("width",h).attr("height",f.height+wb().state.textHeight+wb().state.titleShift+1).attr("rx","0"),u.attr("x",r+i),l<=s&&u.attr("x",c+(h-a)/2-l/2+i),t.insert("rect",":first-child").attr("x",r).attr("y",wb().state.titleShift-wb().state.textHeight-wb().state.padding).attr("width",h).attr("height",3*wb().state.textHeight).attr("rx",wb().state.radius),t.insert("rect",":first-child").attr("x",r).attr("y",wb().state.titleShift-wb().state.textHeight-wb().state.padding).attr("width",h).attr("height",f.height+3+2*wb().state.textHeight).attr("rx",wb().state.radius),t},WC=function(t,e){e.attr("class","state-note");var n=e.append("rect").attr("x",0).attr("y",wb().state.padding),r=function(t,e,n,r){var i=0,a=r.append("text");a.style("text-anchor","start"),a.attr("class","noteText");var o,s=t.replace(/\r\n/g,"<br/>"),c=(s=s.replace(/\n/g,"<br/>")).split($m.lineBreakRegex),u=1.25*wb().state.noteMargin,l=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return $C(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$C(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}(c);try{for(l.s();!(o=l.n()).done;){var h=o.value.trim();if(h.length>0){var f=a.append("tspan");f.text(h),0===u&&(u+=f.node().getBBox().height),i+=u,f.attr("x",0+wb().state.noteMargin),f.attr("y",0+i+1.25*wb().state.noteMargin)}}}catch(t){l.e(t)}finally{l.f()}return{textWidth:a.node().getBBox().width,textHeight:i}}(t,0,0,e.append("g")),i=r.textWidth,a=r.textHeight;return n.attr("height",a+2*wb().state.noteMargin),n.attr("width",i+2*wb().state.noteMargin),n},VC=function(t,e){var n=e.id,r={id:n,label:e.id,width:0,height:0},i=t.append("g").attr("id",n).attr("class","stateGroup");"start"===e.type&&function(t){t.append("circle").attr("class","start-state").attr("r",wb().state.sizeUnit).attr("cx",wb().state.padding+wb().state.sizeUnit).attr("cy",wb().state.padding+wb().state.sizeUnit)}(i),"end"===e.type&&function(t){t.append("circle").attr("class","end-state-outer").attr("r",wb().state.sizeUnit+wb().state.miniPadding).attr("cx",wb().state.padding+wb().state.sizeUnit+wb().state.miniPadding).attr("cy",wb().state.padding+wb().state.sizeUnit+wb().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",wb().state.sizeUnit).attr("cx",wb().state.padding+wb().state.sizeUnit+2).attr("cy",wb().state.padding+wb().state.sizeUnit+2)}(i),"fork"!==e.type&&"join"!==e.type||function(t,e){var n=wb().state.forkWidth,r=wb().state.forkHeight;if(e.parentId){var i=n;n=r,r=i}t.append("rect").style("stroke","black").style("fill","black").attr("width",n).attr("height",r).attr("x",wb().state.padding).attr("y",wb().state.padding)}(i,e),"note"===e.type&&WC(e.note.text,i),"divider"===e.type&&function(t){t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",wb().state.textHeight).attr("class","divider").attr("x2",2*wb().state.textHeight).attr("y1",0).attr("y2",0)}(i),"default"===e.type&&0===e.descriptions.length&&function(t,e){var n=t.append("text").attr("x",2*wb().state.padding).attr("y",wb().state.textHeight+2*wb().state.padding).attr("font-size",wb().state.fontSize).attr("class","state-title").text(e.id).node().getBBox();t.insert("rect",":first-child").attr("x",wb().state.padding).attr("y",wb().state.padding).attr("width",n.width+2*wb().state.padding).attr("height",n.height+2*wb().state.padding).attr("rx",wb().state.radius)}(i,e),"default"===e.type&&e.descriptions.length>0&&function(t,e){var n=t.append("text").attr("x",2*wb().state.padding).attr("y",wb().state.textHeight+1.3*wb().state.padding).attr("font-size",wb().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),r=n.height,i=t.append("text").attr("x",wb().state.padding).attr("y",r+.4*wb().state.padding+wb().state.dividerMargin+wb().state.textHeight).attr("class","state-description"),a=!0,o=!0;e.descriptions.forEach((function(t){a||(function(t,e,n){var r=t.append("tspan").attr("x",2*wb().state.padding).text(e);n||r.attr("dy",wb().state.textHeight)}(i,t,o),o=!1),a=!1}));var s=t.append("line").attr("x1",wb().state.padding).attr("y1",wb().state.padding+r+wb().state.dividerMargin/2).attr("y2",wb().state.padding+r+wb().state.dividerMargin/2).attr("class","descr-divider"),c=i.node().getBBox(),u=Math.max(c.width,n.width);s.attr("x2",u+3*wb().state.padding),t.insert("rect",":first-child").attr("x",wb().state.padding).attr("y",wb().state.padding).attr("width",u+2*wb().state.padding).attr("height",c.height+r+2*wb().state.padding).attr("rx",wb().state.radius)}(i,e);var a,o=i.node().getBBox();return r.width=o.width+2*wb().state.padding,r.height=o.height+2*wb().state.padding,a=r,zC[n]=a,r},GC=0;CC.parser.yy=UC;var XC={},ZC=function t(e,n,r,i,a,s){var c,u=new(t_().Graph)({compound:!0,multigraph:!0}),l=!0;for(c=0;c<e.length;c++)if("relation"===e[c].stmt){l=!1;break}r?u.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:l?1:qC.edgeLengthFactor,nodeSep:l?1:50,isMultiGraph:!0}):u.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:l?1:qC.edgeLengthFactor,nodeSep:l?1:50,ranker:"tight-tree",isMultiGraph:!0}),u.setDefaultEdgeLabel((function(){return{}})),UC.extract(e);for(var h=UC.getStates(),f=UC.getRelations(),d=Object.keys(h),p=0;p<d.length;p++){var g=h[d[p]];r&&(g.parentId=r);var y=void 0;if(g.doc){var m=n.append("g").attr("id",g.id).attr("class","stateGroup");y=t(g.doc,m,g.id,!i,a,s);var v=(m=HC(m,g,i)).node().getBBox();y.width=v.width,y.height=v.height+qC.padding/2,XC[g.id]={y:qC.compositTitleSize}}else y=VC(n,g);if(g.note){var b={descriptions:[],id:g.id+"-note",note:g.note,type:"note"},_=VC(n,b);"left of"===g.note.position?(u.setNode(y.id+"-note",_),u.setNode(y.id,y)):(u.setNode(y.id,y),u.setNode(y.id+"-note",_)),u.setParent(y.id,y.id+"-group"),u.setParent(y.id+"-note",y.id+"-group")}else u.setNode(y.id,y)}o.debug("Count=",u.nodeCount(),u);var x=0;f.forEach((function(t){var e;x++,o.debug("Setting edge",t),u.setEdge(t.id1,t.id2,{relation:t,width:(e=t.title,e?e.length*qC.fontSizeFactor:1),height:qC.labelHeight*$m.getRows(t.title).length,labelpos:"c"},"id"+x)})),Kb().layout(u),o.debug("Graph after layout",u.nodes());var w=n.node();u.nodes().forEach((function(t){void 0!==t&&void 0!==u.node(t)?(o.warn("Node "+t+": "+JSON.stringify(u.node(t))),a.select("#"+w.id+" #"+t).attr("transform","translate("+(u.node(t).x-u.node(t).width/2)+","+(u.node(t).y+(XC[t]?XC[t].y:0)-u.node(t).height/2)+" )"),a.select("#"+w.id+" #"+t).attr("data-x-shift",u.node(t).x-u.node(t).width/2),s.querySelectorAll("#"+w.id+" #"+t+" .divider").forEach((function(t){var e=t.parentElement,n=0,r=0;e&&(e.parentElement&&(n=e.parentElement.getBBox().width),r=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(r)&&(r=0)),t.setAttribute("x1",0-r+8),t.setAttribute("x2",n-r-8)}))):o.debug("No Node "+t+": "+JSON.stringify(u.node(t)))}));var k=w.getBBox();u.edges().forEach((function(t){void 0!==t&&void 0!==u.edge(t)&&(o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(u.edge(t))),function(t,e,n){e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var r=e.points,i=Uu().x((function(t){return t.x})).y((function(t){return t.y})).curve(Vu),a=t.append("path").attr("d",i(r)).attr("id","edge"+GC).attr("class","transition"),s="";if(wb().state.arrowMarkerAbsolute&&(s=(s=(s=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),a.attr("marker-end","url("+s+"#"+function(t){switch(t){case UC.relationType.AGGREGATION:return"aggregation";case UC.relationType.EXTENSION:return"extension";case UC.relationType.COMPOSITION:return"composition";case UC.relationType.DEPENDENCY:return"dependency"}}(UC.relationType.DEPENDENCY)+"End)"),void 0!==n.title){for(var c=t.append("g").attr("class","stateLabel"),u=db.calcLabelPosition(e.points),l=u.x,h=u.y,f=$m.getRows(n.title),d=0,p=[],g=0,y=0,m=0;m<=f.length;m++){var v=c.append("text").attr("text-anchor","middle").text(f[m]).attr("x",l).attr("y",h+d),b=v.node().getBBox();if(g=Math.max(g,b.width),y=Math.min(y,b.x),o.info(b.x,l,h+d),0===d){var _=v.node().getBBox();d=_.height,o.info("Title height",d,h)}p.push(v)}var x=d*f.length;if(f.length>1){var w=(f.length-1)*d*.5;p.forEach((function(t,e){return t.attr("y",h+e*d-w)})),x=d*f.length}var k=c.node().getBBox();c.insert("rect",":first-child").attr("class","box").attr("x",l-g/2-wb().state.padding/2).attr("y",h-x/2-wb().state.padding/2-3.5).attr("width",g+wb().state.padding).attr("height",x+wb().state.padding),o.info(k)}GC++}(n,u.edge(t),u.edge(t).relation))})),k=w.getBBox();var T={id:r||"root",label:r||"root",width:0,height:0};return T.width=k.width+2*qC.padding,T.height=k.height+2*qC.padding,o.debug("Doc rendered",T,u),T};const QC=function(t,e){qC=wb().state;var n,r=wb().securityLevel;"sandbox"===r&&(n=au("#i"+e));var i=au("sandbox"===r?n.nodes()[0].contentDocument.body:"body"),a="sandbox"===r?n.nodes()[0].contentDocument:document;CC.parser.yy.clear(),CC.parser.parse(t),o.debug("Rendering diagram "+t);var s=i.select("[id='".concat(e,"']"));s.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z"),new(t_().Graph)({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}}));var c=UC.getRootDoc();ZC(c,s,void 0,!1,i,a);var u=qC.padding,l=s.node().getBBox(),h=l.width+2*u,f=l.height+2*u;lb(s,f,1.75*h,qC.useMaxWidth),s.attr("viewBox","".concat(l.x-qC.padding," ").concat(l.y-qC.padding," ")+h+" "+f),f_(CC.parser.yy,s,e)};var KC={},JC={},tE=function(t,e,n,r){if("root"!==n.id){var i="rect";!0===n.start&&(i="start"),!1===n.start&&(i="end"),"default"!==n.type&&(i=n.type),JC[n.id]||(JC[n.id]={id:n.id,shape:i,description:$m.sanitizeText(n.id,wb()),classes:"statediagram-state"}),n.description&&(Array.isArray(JC[n.id].description)?(JC[n.id].shape="rectWithTitle",JC[n.id].description.push(n.description)):JC[n.id].description.length>0?(JC[n.id].shape="rectWithTitle",JC[n.id].description===n.id?JC[n.id].description=[n.description]:JC[n.id].description=[JC[n.id].description,n.description]):(JC[n.id].shape="rect",JC[n.id].description=n.description),JC[n.id].description=$m.sanitizeTextOrArray(JC[n.id].description,wb())),1===JC[n.id].description.length&&"rectWithTitle"===JC[n.id].shape&&(JC[n.id].shape="rect"),!JC[n.id].type&&n.doc&&(o.info("Setting cluster for ",n.id,rE(n)),JC[n.id].type="group",JC[n.id].dir=rE(n),JC[n.id].shape="divider"===n.type?"divider":"roundedWithTitle",JC[n.id].classes=JC[n.id].classes+" "+(r?"statediagram-cluster statediagram-cluster-alt":"statediagram-cluster"));var a={labelStyle:"",shape:JC[n.id].shape,labelText:JC[n.id].description,classes:JC[n.id].classes,style:"",id:n.id,dir:JC[n.id].dir,domId:"state-"+n.id+"-"+eE,type:JC[n.id].type,padding:15};if(n.note){var s={labelStyle:"",shape:"note",labelText:n.note.text,classes:"statediagram-note",style:"",id:n.id+"----note-"+eE,domId:"state-"+n.id+"----note-"+eE,type:JC[n.id].type,padding:15},c={labelStyle:"",shape:"noteGroup",labelText:n.note.text,classes:JC[n.id].classes,style:"",id:n.id+"----parent",domId:"state-"+n.id+"----parent-"+eE,type:"group",padding:0};eE++,t.setNode(n.id+"----parent",c),t.setNode(s.id,s),t.setNode(n.id,a),t.setParent(n.id,n.id+"----parent"),t.setParent(s.id,n.id+"----parent");var u=n.id,l=s.id;"left of"===n.note.position&&(u=s.id,l=n.id),t.setEdge(u,l,{arrowhead:"none",arrowType:"",style:"fill:none",labelStyle:"",classes:"transition note-edge",arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal"})}else t.setNode(n.id,a)}e&&"root"!==e.id&&(o.trace("Setting node ",n.id," to be child of its parent ",e.id),t.setParent(n.id,e.id)),n.doc&&(o.trace("Adding nodes children "),nE(t,n,n.doc,!r))},eE=0,nE=function(t,e,n,r){o.trace("items",n),n.forEach((function(n){if("state"===n.stmt||"default"===n.stmt)tE(t,e,n,r);else if("relation"===n.stmt){tE(t,e,n.state1,r),tE(t,e,n.state2,r);var i={id:"edge"+eE,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:"fill:none",labelStyle:"",label:$m.sanitizeText(n.description,wb()),arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal",classes:"transition"},a=n.state1.id,o=n.state2.id;t.setEdge(a,o,i,eE),eE++}}))},rE=function(t,e){var n=e||"TB";if(t.doc)for(var r=0;r<t.doc.length;r++){var i=t.doc[r];"dir"===i.stmt&&(n=i.value)}return n};const iE=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)KC[e[n]]=t[e[n]]};function aE(t){return function(t){if(Array.isArray(t))return oE(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return oE(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oE(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oE(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var sE="",cE=[],uE=[],lE=[],hE=function(){for(var t=!0,e=0;e<lE.length;e++)lE[e].processed,t=t&&lE[e].processed;return t};const fE={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().journey},clear:function(){cE.length=0,uE.length=0,sE="",lE.length=0,Mb()},setTitle:Nb,getTitle:Db,setAccDescription:Bb,getAccDescription:Lb,addSection:function(t){sE=t,cE.push(t)},getSections:function(){return cE},getTasks:function(){for(var t=hE(),e=0;!t&&e<100;)t=hE(),e++;return uE.push.apply(uE,lE),uE},addTask:function(t,e){var n=e.substr(1).split(":"),r=0,i=[];1===n.length?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(","));var a=i.map((function(t){return t.trim()})),o={section:sE,type:sE,people:a,task:t,score:r};lE.push(o)},addTaskOrg:function(t){var e={section:sE,type:sE,description:t,task:t,classes:[]};uE.push(e)},getActors:function(){return t=[],uE.forEach((function(e){e.people&&t.push.apply(t,aE(e.people))})),aE(new Set(t)).sort();var t}};var dE=n(9763),pE=n.n(dE),gE=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},yE=function(t,e){var n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},mE=-1,vE=function(){function t(t,e,n,i,a,o,s,c){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("font-color",c).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c,u){for(var l=c.taskFontSize,h=c.taskFontFamily,f=t.split(/<br\s*\/?>/gi),d=0;d<f.length;d++){var p=d*l-l*(f.length-1)/2,g=e.append("text").attr("x",n+a/2).attr("y",i).attr("fill",u).style("text-anchor","middle").style("font-size",l).style("font-family",h);g.append("tspan").attr("x",n+a/2).attr("dy",p).text(f[d]),g.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(g,s)}}function n(t,n,i,a,o,s,c,u){var l=n.append("switch"),h=l.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,i,a,o,s,c,u),r(h,c)}function r(t,e){for(var n in e)n in e&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}();const bE=yE,_E=function(t,e,n){var r=t.append("g"),i={x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0};i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,gE(r,i),vE(n)(e.text,r,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},n,e.colour)},xE=function(t,e){var n=e.text.replace(/<br\s*\/?>/gi," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(n),r},wE=function(t,e,n){var r,i,a,o=e.x+n.width/2,s=t.append("g");mE++,s.append("line").attr("id","task"+mE).attr("x1",o).attr("y1",e.y).attr("x2",o).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),r=s,i={cx:o,cy:300+30*(5-e.score),score:e.score},r.append("circle").attr("cx",i.cx).attr("cy",i.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),(a=r.append("g")).append("circle").attr("cx",i.cx-5).attr("cy",i.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),a.append("circle").attr("cx",i.cx+5).attr("cy",i.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.score>3?function(t){var e=Iu().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+i.cx+","+(i.cy+2)+")")}(a):i.score<3?function(t){var e=Iu().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+i.cx+","+(i.cy+7)+")")}(a):function(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",i.cx-5).attr("y1",i.cy+7).attr("x2",i.cx+5).attr("y2",i.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}(a);var c={x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0};c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=n.width,c.height=n.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,gE(s,c);var u=e.x+14;e.people.forEach((function(t){var n=e.actors[t].color,r={cx:u,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};yE(s,r),u+=10})),vE(n)(e.task,s,c.x,c.y,c.width,c.height,{class:"task"},n,e.colour)};dE.parser.yy=fE;var kE={},TE=wb().journey,CE=wb().journey.leftMargin,EE={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i=wb().journey,a=this,o=0;this.sequenceItems.forEach((function(s){o++;var c=a.sequenceItems.length-o+1;a.updateVal(s,"starty",e-c*i.boxMargin,Math.min),a.updateVal(s,"stopy",r+c*i.boxMargin,Math.max),a.updateVal(EE.data,"startx",t-c*i.boxMargin,Math.min),a.updateVal(EE.data,"stopx",n+c*i.boxMargin,Math.max),a.updateVal(s,"startx",t-c*i.boxMargin,Math.min),a.updateVal(s,"stopx",n+c*i.boxMargin,Math.max),a.updateVal(EE.data,"starty",e-c*i.boxMargin,Math.min),a.updateVal(EE.data,"stopy",r+c*i.boxMargin,Math.max)}))},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(EE.data,"startx",i,Math.min),this.updateVal(EE.data,"starty",o,Math.min),this.updateVal(EE.data,"stopx",a,Math.max),this.updateVal(EE.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},SE=TE.sectionFills,AE=TE.sectionColours;const ME=function(t){Object.keys(t).forEach((function(e){TE[e]=t[e]}))},NE=function(t,e){var n=wb().journey;dE.parser.yy.clear(),dE.parser.parse(t+"\n");var r,i=wb().securityLevel;"sandbox"===i&&(r=au("#i"+e));var a=au("sandbox"===i?r.nodes()[0].contentDocument.body:"body");"sandbox"===i?r.nodes()[0].contentDocument:document,EE.init();var o=a.select("#"+e);o.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),o.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z");var s=dE.parser.yy.getTasks(),c=dE.parser.yy.getTitle(),u=dE.parser.yy.getActors();for(var l in kE)delete kE[l];var h=0;u.forEach((function(t){kE[t]={color:n.actorColours[h%n.actorColours.length],position:h},h++})),function(t){var e=wb().journey,n=60;Object.keys(kE).forEach((function(r){var i=kE[r].color,a={cx:20,cy:n,r:7,fill:i,stroke:"#000",pos:kE[r].position};bE(t,a);var o={x:40,y:n+7,fill:"#666",text:r,textMargin:5|e.boxTextMargin};xE(t,o),n+=20}))}(o),EE.insert(0,0,CE,50*Object.keys(kE).length),function(t,e,n){for(var r=wb().journey,i="",a=n+(2*r.height+r.diagramMarginY),o=0,s="#CCC",c="black",u=0,l=0;l<e.length;l++){var h=e[l];if(i!==h.section){s=SE[o%SE.length],u=o%SE.length,c=AE[o%AE.length];var f={x:l*r.taskMargin+l*r.width+CE,y:50,text:h.section,fill:s,num:u,colour:c};_E(t,f,r),i=h.section,o++}var d=h.people.reduce((function(t,e){return kE[e]&&(t[e]=kE[e]),t}),{});h.x=l*r.taskMargin+l*r.width+CE,h.y=a,h.width=r.diagramMarginX,h.height=r.diagramMarginY,h.colour=c,h.fill=s,h.num=u,h.actors=d,wE(t,h,r),EE.insert(h.x,h.y,h.x+h.width+r.taskMargin,450)}}(o,s,0);var f=EE.getBounds();c&&o.append("text").text(c).attr("x",CE).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);var d=f.stopy-f.starty+2*n.diagramMarginY,p=CE+f.stopx+2*n.diagramMarginX;lb(o,d,p,n.useMaxWidth),o.append("line").attr("x1",CE).attr("y1",4*n.height).attr("x2",p-CE-4).attr("y2",4*n.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");var g=c?70:0;o.attr("viewBox","".concat(f.startx," -25 ").concat(p," ").concat(d+g)),o.attr("preserveAspectRatio","xMinYMin meet"),o.attr("height",d+g+25),f_(dE.parser.yy,o,e)};var DE={};const BE=function(t){return"g.classGroup text {\n fill: ".concat(t.nodeBorder,";\n fill: ").concat(t.classText,";\n stroke: none;\n font-family: ").concat(t.fontFamily,";\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ").concat(t.classText,";\n}\n.edgeLabel .label rect {\n fill: ").concat(t.mainBkg,";\n}\n.label text {\n fill: ").concat(t.classText,";\n}\n.edgeLabel .label span {\n background: ").concat(t.mainBkg,";\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ").concat(t.nodeBorder,";\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.classGroup line {\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ").concat(t.nodeBorder,";\n font-size: 10px;\n}\n\n.relation {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n#compositionStart, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n")},LE=function(t){return".label {\n font-family: ".concat(t.fontFamily,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n .cluster-label text {\n fill: ").concat(t.titleColor,";\n }\n .cluster-label span {\n color: ").concat(t.titleColor,";\n }\n\n .label text,span {\n fill: ").concat(t.nodeTextColor||t.textColor,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n background-color: ").concat(t.edgeLabelBackground,";\n fill: ").concat(t.edgeLabelBackground,";\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ").concat(t.clusterBkg,";\n stroke: ").concat(t.clusterBorder,";\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n .cluster span {\n color: ").concat(t.titleColor,";\n }\n /* .cluster div {\n color: ").concat(t.titleColor,";\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ").concat(t.fontFamily,";\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n")},OE=function(t){return"\ndefs #statediagram-barbEnd {\n fill: ".concat(t.transitionColor,";\n stroke: ").concat(t.transitionColor,";\n }\ng.stateGroup text {\n fill: ").concat(t.nodeBorder,";\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ").concat(t.textColor,";\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ").concat(t.stateLabelColor,";\n}\n\ng.stateGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.stateGroup line {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n\n.transition {\n stroke: ").concat(t.transitionColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ").concat(t.background,";\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n\n text {\n fill: ").concat(t.noteTextColor,";\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ").concat(t.labelBackgroundColor,";\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ").concat(t.transitionLabelColor||t.tertiaryTextColor,";\n}\n.label div .edgeLabel {\n color: ").concat(t.transitionLabelColor||t.tertiaryTextColor,";\n}\n\n.stateLabel text {\n fill: ").concat(t.stateLabelColor,";\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ").concat(t.specialStateColor,";\n stroke: ").concat(t.specialStateColor,";\n}\n\n.node .fork-join {\n fill: ").concat(t.specialStateColor,";\n stroke: ").concat(t.specialStateColor,";\n}\n\n.node circle.state-end {\n fill: ").concat(t.innerEndBackground,";\n stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ").concat(t.compositeBackground||t.background,";\n // stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ").concat(t.stateBkg||t.mainBkg,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n stroke-width: 1px;\n}\n.node polygon {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ").concat(t.lineColor,";\n}\n\n.statediagram-cluster rect {\n fill: ").concat(t.compositeTitleBackground,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ").concat(t.stateLabelColor,";\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ").concat(t.compositeBackground||t.background,";\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ").concat(t.altBackground?t.altBackground:"#efefef",";\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ").concat(t.altBackground?t.altBackground:"#efefef",";\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ").concat(t.noteTextColor,";\n}\n\n.statediagram-note .nodeLabel {\n color: ").concat(t.noteTextColor,";\n}\n.statediagram .edgeLabel {\n color: red; // ").concat(t.noteTextColor,";\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ").concat(t.lineColor,";\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n")};var IE={flowchart:LE,"flowchart-v2":LE,sequence:function(t){return".actor {\n stroke: ".concat(t.actorBorder,";\n fill: ").concat(t.actorBkg,";\n }\n\n text.actor > tspan {\n fill: ").concat(t.actorTextColor,";\n stroke: none;\n }\n\n .actor-line {\n stroke: ").concat(t.actorLineColor,";\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ").concat(t.signalColor,";\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.signalColor,";\n }\n\n #arrowhead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .sequenceNumber {\n fill: ").concat(t.sequenceNumberColor,";\n }\n\n #sequencenumber {\n fill: ").concat(t.signalColor,";\n }\n\n #crosshead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .messageText {\n fill: ").concat(t.signalTextColor,";\n stroke: ").concat(t.signalTextColor,";\n }\n\n .labelBox {\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBkgColor,";\n }\n\n .labelText, .labelText > tspan {\n fill: ").concat(t.labelTextColor,";\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ").concat(t.loopTextColor,";\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBorderColor,";\n }\n\n .note {\n //stroke: #decc93;\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n }\n\n .noteText, .noteText > tspan {\n fill: ").concat(t.noteTextColor,";\n stroke: none;\n }\n\n .activation0 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation1 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation2 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ").concat(t.actorBkg,";\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ").concat(t.actorBorder,";\n fill: ").concat(t.actorBkg,";\n }\n .actor-man circle, line {\n stroke: ").concat(t.actorBorder,";\n fill: ").concat(t.actorBkg,";\n stroke-width: 2px;\n }\n")},gantt:function(t){return'\n .mermaid-main-font {\n font-family: "trebuchet ms", verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n .exclude-range {\n fill: '.concat(t.excludeBkgColor,";\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ").concat(t.sectionBkgColor,";\n }\n\n .section2 {\n fill: ").concat(t.sectionBkgColor2,";\n }\n\n .section1,\n .section3 {\n fill: ").concat(t.altSectionBkgColor,";\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle1 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle2 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle3 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle {\n text-anchor: start;\n // font-size: ").concat(t.ganttFontSize,";\n // text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ").concat(t.gridColor,";\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.textColor,";\n }\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ").concat(t.todayLineColor,";\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n // .taskText:not([font-size]) {\n // font-size: ").concat(t.ganttFontSize,";\n // }\n\n .taskTextOutsideRight {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: start;\n // font-size: ").concat(t.ganttFontSize,";\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: end;\n // font-size: ").concat(t.ganttFontSize,";\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ").concat(t.taskTextColor,";\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ").concat(t.taskBkgColor,";\n stroke: ").concat(t.taskBorderColor,";\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ").concat(t.activeTaskBkgColor,";\n stroke: ").concat(t.activeTaskBorderColor,";\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ").concat(t.doneTaskBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.critBkgColor,";\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.activeTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ").concat(t.textColor," ;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n")},classDiagram:BE,"classDiagram-v2":BE,class:BE,stateDiagram:OE,state:OE,gitGraph:function(t){return"\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ".concat([0,1,2,3,4,5,6,7].map((function(e){return"\n .branch-label".concat(e," { fill: ").concat(t["gitBranchLabel"+e],"; }\n .commit").concat(e," { stroke: ").concat(t["git"+e],"; fill: ").concat(t["git"+e],"; }\n .commit-highlight").concat(e," { stroke: ").concat(t["gitInv"+e],"; fill: ").concat(t["gitInv"+e],"; }\n .label").concat(e," { fill: ").concat(t["git"+e],"; }\n .arrow").concat(e," { stroke: ").concat(t["git"+e],"; }\n ")})).join("\n"),"\n\n .branch {\n stroke-width: 1;\n stroke: ").concat(t.lineColor,";\n stroke-dasharray: 2;\n }\n .commit-label { font-size: 10px; fill: ").concat(t.commitLabelColor,";}\n .commit-label-bkg { font-size: 10px; fill: ").concat(t.commitLabelBackground,"; opacity: 0.5; }\n .tag-label { font-size: 10px; fill: ").concat(t.tagLabelColor,";}\n .tag-label-bkg { fill: ").concat(t.tagLabelBackground,"; stroke: ").concat(t.tagLabelBorder,"; }\n .tag-hole { fill: ").concat(t.textColor,"; }\n\n .commit-merge {\n stroke: ").concat(t.primaryColor,";\n fill: ").concat(t.primaryColor,";\n }\n .commit-reverse {\n stroke: ").concat(t.primaryColor,";\n fill: ").concat(t.primaryColor,";\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ").concat(t.primaryColor,";\n fill: ").concat(t.primaryColor,";\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n }\n")},info:function(){return""},pie:function(t){return"\n .pieCircle{\n stroke: ".concat(t.pieStrokeColor,";\n stroke-width : ").concat(t.pieStrokeWidth,";\n opacity : ").concat(t.pieOpacity,";\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ").concat(t.pieTitleTextSize,";\n fill: ").concat(t.pieTitleTextColor,";\n font-family: ").concat(t.fontFamily,";\n }\n .slice {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.pieSectionTextColor,";\n font-size:").concat(t.pieSectionTextSize,";\n // fill: white;\n }\n .legend text {\n fill: ").concat(t.pieLegendTextColor,";\n font-family: ").concat(t.fontFamily,";\n font-size: ").concat(t.pieLegendTextSize,";\n }\n")},er:function(t){return"\n .entityBox {\n fill: ".concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n }\n\n .attributeBoxOdd {\n fill: #ffffff;\n stroke: ").concat(t.nodeBorder,";\n }\n\n .attributeBoxEven {\n fill: #f2f2f2;\n stroke: ").concat(t.nodeBorder,";\n }\n\n .relationshipLabelBox {\n fill: ").concat(t.tertiaryColor,";\n opacity: 0.7;\n background-color: ").concat(t.tertiaryColor,";\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ").concat(t.lineColor,";\n }\n")},journey:function(t){return".label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ".concat(t.textColor,";\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ").concat(t.textColor,"\n }\n\n .legend {\n fill: ").concat(t.textColor,";\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ").concat(t.textColor,"\n }\n\n .face {\n ").concat(t.faceColor?"fill: ".concat(t.faceColor):"fill: #FFF8DC",";\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType0):"",";\n }\n .task-type-1, .section-type-1 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType1):"",";\n }\n .task-type-2, .section-type-2 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType2):"",";\n }\n .task-type-3, .section-type-3 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType3):"",";\n }\n .task-type-4, .section-type-4 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType4):"",";\n }\n .task-type-5, .section-type-5 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType5):"",";\n }\n .task-type-6, .section-type-6 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType6):"",";\n }\n .task-type-7, .section-type-7 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType7):"",";\n }\n\n .actor-0 {\n ").concat(t.actor0?"fill: ".concat(t.actor0):"",";\n }\n .actor-1 {\n ").concat(t.actor1?"fill: ".concat(t.actor1):"",";\n }\n .actor-2 {\n ").concat(t.actor2?"fill: ".concat(t.actor2):"",";\n }\n .actor-3 {\n ").concat(t.actor3?"fill: ".concat(t.actor3):"",";\n }\n .actor-4 {\n ").concat(t.actor4?"fill: ".concat(t.actor4):"",";\n }\n .actor-5 {\n ").concat(t.actor5?"fill: ".concat(t.actor5):"",";\n }\n\n }\n")},requirement:function(t){return"\n\n marker {\n fill: ".concat(t.relationColor,";\n stroke: ").concat(t.relationColor,";\n }\n\n marker.cross {\n stroke: ").concat(t.lineColor,";\n }\n\n svg {\n font-family: ").concat(t.fontFamily,";\n font-size: ").concat(t.fontSize,";\n }\n\n .reqBox {\n fill: ").concat(t.requirementBackground,";\n fill-opacity: 100%;\n stroke: ").concat(t.requirementBorderColor,";\n stroke-width: ").concat(t.requirementBorderSize,";\n }\n \n .reqTitle, .reqLabel{\n fill: ").concat(t.requirementTextColor,";\n }\n .reqLabelBox {\n fill: ").concat(t.relationLabelBackground,";\n fill-opacity: 100%;\n }\n\n .req-title-line {\n stroke: ").concat(t.requirementBorderColor,";\n stroke-width: ").concat(t.requirementBorderSize,";\n }\n .relationshipLine {\n stroke: ").concat(t.relationColor,";\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ").concat(t.relationLabelColor,";\n }\n\n")}};function RE(t){return RE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},RE(t)}var FE=function(t){var e=t;return(e=(e=e.replace(/fl°°/g,(function(){return"&#"}))).replace(/fl°/g,(function(){return"&"}))).replace(/¶ß/g,(function(){return";"}))},PE={};function YE(t){var e;gw(t.flowchart),vw(t.flowchart),void 0!==t.sequenceDiagram&&TC.setConf(rb(t.sequence,t.sequenceDiagram)),TC.setConf(t.sequence),t.gantt,y_(t.class),t.state,iE(t.state),Yk(t.class),bx(t.er),ME(t.journey),hT(t.requirement),e=t.class,Object.keys(e).forEach((function(t){DE[t]=e[t]}))}var jE=Object.freeze({render:function(t,e,n,r){Cb();var i=e.replace(/\r\n?/g,"\n"),a=db.detectInit(i);a&&(hb(a),Tb(a));var s=wb();o.debug(s),e.length>s.maxTextSize&&(i="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");var c=au("body");if(void 0!==r){if("sandbox"===s.securityLevel){var u=au("body").append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");(c=au(u.nodes()[0].contentDocument.body)).node().style.margin=0}if(r.innerHTML="","sandbox"===s.securityLevel){var l=au(r).append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");(c=au(l.nodes()[0].contentDocument.body)).node().style.margin=0}else c=au(r);c.append("div").attr("id","d"+t).attr("style","font-family: "+s.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}else{var h,f=document.getElementById(t);if(f&&f.remove(),(h="sandbox"!==s.securityLevel?document.querySelector("#d"+t):document.querySelector("#i"+t))&&h.remove(),"sandbox"===s.securityLevel){var d=au("body").append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");(c=au(d.nodes()[0].contentDocument.body)).node().style.margin=0}else c=au("body");c.append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}i=i.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})).replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})).replace(/#\w+;/g,(function(t){var e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}));var p=c.select("#d"+t).node(),g=db.detectType(i,s),y=p.firstChild,m=y.firstChild,v="";if(void 0!==s.themeCSS&&(v+="\n".concat(s.themeCSS)),void 0!==s.fontFamily&&(v+="\n:root { --mermaid-font-family: ".concat(s.fontFamily,"}")),void 0!==s.altFontFamily&&(v+="\n:root { --mermaid-alt-font-family: ".concat(s.altFontFamily,"}")),"flowchart"===g||"flowchart-v2"===g||"graph"===g){var b=function(t){o.info("Extracting classes"),Gx.clear();try{var e=Zx().parser;return e.yy=Gx,e.parse(t),Gx.getClasses()}catch(t){return}}(i),_=s.htmlLabels||s.flowchart.htmlLabels;for(var x in b)_?(v+="\n.".concat(x," > * { ").concat(b[x].styles.join(" !important; ")," !important; }"),v+="\n.".concat(x," span { ").concat(b[x].styles.join(" !important; ")," !important; }")):(v+="\n.".concat(x," path { ").concat(b[x].styles.join(" !important; ")," !important; }"),v+="\n.".concat(x," rect { ").concat(b[x].styles.join(" !important; ")," !important; }"),v+="\n.".concat(x," polygon { ").concat(b[x].styles.join(" !important; ")," !important; }"),v+="\n.".concat(x," ellipse { ").concat(b[x].styles.join(" !important; ")," !important; }"),v+="\n.".concat(x," circle { ").concat(b[x].styles.join(" !important; ")," !important; }"),b[x].textStyles&&(v+="\n.".concat(x," tspan { ").concat(b[x].textStyles.join(" !important; ")," !important; }")))}var w=function(t,e){return am(Em("".concat(t,"{").concat(e,"}")),om)}("#".concat(t),function(t,e,n){return" {\n font-family: ".concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n fill: ").concat(n.textColor,"\n }\n\n /* Classes common for multiple diagrams */\n\n .error-icon {\n fill: ").concat(n.errorBkgColor,";\n }\n .error-text {\n fill: ").concat(n.errorTextColor,";\n stroke: ").concat(n.errorTextColor,";\n }\n\n .edge-thickness-normal {\n stroke-width: 2px;\n }\n .edge-thickness-thick {\n stroke-width: 3.5px\n }\n .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n .marker {\n fill: ").concat(n.lineColor,";\n stroke: ").concat(n.lineColor,";\n }\n .marker.cross {\n stroke: ").concat(n.lineColor,";\n }\n\n svg {\n font-family: ").concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n }\n\n ").concat(IE[t](n),"\n\n ").concat(e,"\n")}(g,v,s.themeVariables)),k=document.createElement("style");k.innerHTML="#".concat(t," ")+w,y.insertBefore(k,m);try{switch(g){case"gitGraph":Bk(i,t,!1);break;case"flowchart":s.flowchart.arrowMarkerAbsolute=s.arrowMarkerAbsolute,gw(s.flowchart),yw(i,t);break;case"flowchart-v2":s.flowchart.arrowMarkerAbsolute=s.arrowMarkerAbsolute,vw(s.flowchart),bw(i,t);break;case"sequence":s.sequence.arrowMarkerAbsolute=s.arrowMarkerAbsolute,s.sequenceDiagram?(TC.setConf(Object.assign(s.sequence,s.sequenceDiagram)),console.error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.")):TC.setConf(s.sequence),TC.draw(i,t);break;case"gantt":s.gantt.arrowMarkerAbsolute=s.arrowMarkerAbsolute,s.gantt,nk(i,t);break;case"class":s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,y_(s.class),m_(i,t);break;case"classDiagram":s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,function(t){Object.keys(t).forEach((function(e){ox[e]=t[e]}))}(s.class),function(t,e){o.info("Drawing class - ",e),Zb.clear(),e_.parser.parse(t);var n=wb().flowchart,r=wb().securityLevel;o.info("config:",n);var i,a=n.nodeSpacing||50,s=n.rankSpacing||50,c=new(t_().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:Zb.getDirection(),nodesep:a,ranksep:s,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),u=Zb.getClasses(),l=Zb.getRelations();o.info(l),function(t,e){var n=Object.keys(t);o.info("keys:",n),o.info(t),n.forEach((function(n){var r=t[n],i="";r.cssClasses.length>0&&(i=i+" "+r.cssClasses.join(" "));var a,s,c={labelStyle:""},u=void 0!==r.text?r.text:r.id;r.type,s="class_box",e.setNode(r.id,{labelStyle:c.labelStyle,shape:s,labelText:(a=u,$m.sanitizeText(a,wb())),classData:r,rx:0,ry:0,class:i,style:c.style,id:r.id,domId:r.domId,haveCallback:r.haveCallback,link:r.link,width:"group"===r.type?500:void 0,type:r.type,padding:wb().flowchart.padding}),o.info("setNode",{labelStyle:c.labelStyle,shape:s,labelText:u,rx:0,ry:0,class:i,style:c.style,id:r.id,width:"group"===r.type?500:void 0,type:r.type,padding:wb().flowchart.padding})}))}(u,c),function(t,e){var n=0;t.forEach((function(r){n++;var i={classes:"relation"};i.pattern=1==r.relation.lineType?"dashed":"solid",i.id="id"+n,"arrow_open"===r.type?i.arrowhead="none":i.arrowhead="normal",o.info(i,r),i.startLabelRight="none"===r.relationTitle1?"":r.relationTitle1,i.endLabelLeft="none"===r.relationTitle2?"":r.relationTitle2,i.arrowTypeStart=sx(r.relation.type1),i.arrowTypeEnd=sx(r.relation.type2);var a="",s="";if(void 0!==r.style){var c=Jv(r.style);a=c.style,s=c.labelStyle}else a="fill:none";i.style=a,i.labelStyle=s,void 0!==r.interpolate?i.curve=Qv(r.interpolate,Pu):void 0!==t.defaultInterpolate?i.curve=Qv(t.defaultInterpolate,Pu):i.curve=Qv(ox.curve,Pu),r.text=r.title,void 0===r.text?void 0!==r.style&&(i.arrowheadStyle="fill: #333"):(i.arrowheadStyle="fill: #333",i.labelpos="c",wb().flowchart.htmlLabels?(i.labelType="html",i.label='<span class="edgeLabel">'+r.text+"</span>"):(i.labelType="text",i.label=r.text.replace($m.lineBreakRegex,"\n"),void 0===r.style&&(i.style=i.style||"stroke: #333; stroke-width: 1.5px;fill:none"),i.labelStyle=i.labelStyle.replace("color:","fill:"))),e.setEdge(r.id1,r.id2,i,n)}))}(l,c),"sandbox"===r&&(i=au("#i"+e));var h=au("sandbox"===r?i.nodes()[0].contentDocument.body:"body"),f=h.select('[id="'.concat(e,'"]'));f.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var d=h.select("#"+e+" g");ax(d,c,["aggregation","extension","composition","dependency"],"classDiagram",e);var p=f.node().getBBox(),g=p.width+16,y=p.height+16;if(o.debug("new ViewBox 0 0 ".concat(g," ").concat(y),"translate(".concat(8-c._label.marginx,", ").concat(8-c._label.marginy,")")),lb(f,y,g,n.useMaxWidth),f.attr("viewBox","0 0 ".concat(g," ").concat(y)),f.select("g").attr("transform","translate(".concat(8-c._label.marginx,", ").concat(8-p.y,")")),!n.htmlLabels)for(var m="sandbox"===r?i.nodes()[0].contentDocument:document,v=m.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),b=0;b<v.length;b++){var _=v[b],x=_.getBBox(),w=m.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("rx",0),w.setAttribute("ry",0),w.setAttribute("width",x.width),w.setAttribute("height",x.height),_.insertBefore(w,_.firstChild)}f_(e_.parser.yy,f,e)}(i,t);break;case"state":s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,s.state,QC(i,t);break;case"stateDiagram":s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,iE(s.state),function(t,e){o.info("Drawing state diagram (v2)",e),UC.clear(),JC={};var n=EC().parser;n.yy=UC,n.parse(t);var r=UC.getDirection();void 0===r&&(r="LR");var i=wb().state,a=i.nodeSpacing||50,s=i.rankSpacing||50,c=wb().securityLevel;o.info(UC.getRootDocV2()),UC.extract(UC.getRootDocV2()),o.info(UC.getRootDocV2());var u,l=new(t_().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:rE(UC.getRootDocV2()),nodesep:a,ranksep:s,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));tE(l,void 0,UC.getRootDocV2(),!0),"sandbox"===c&&(u=au("#i"+e));var h=au("sandbox"===c?u.nodes()[0].contentDocument.body:"body"),f=("sandbox"===c?u.nodes()[0].contentDocument:document,h.select('[id="'.concat(e,'"]'))),d=h.select("#"+e+" g");ax(d,l,["barb"],"statediagram",e);var p=f.node().getBBox(),g=p.width+16,y=p.height+16;f.attr("class","statediagram");var m=f.node().getBBox();lb(f,y,1.75*g,i.useMaxWidth);var v="".concat(m.x-8," ").concat(m.y-8," ").concat(g," ").concat(y);o.debug("viewBox ".concat(v)),f.attr("viewBox",v);for(var b=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),_=0;_<b.length;_++){var x=b[_],w=x.getBBox(),k=document.createElementNS("http://www.w3.org/2000/svg","rect");k.setAttribute("rx",0),k.setAttribute("ry",0),k.setAttribute("width",w.width),k.setAttribute("height",w.height),x.insertBefore(k,x.firstChild)}f_(n.yy,f,e)}(i,t);break;case"info":s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,Yk(s.class),function(t,e,n){try{var r=Fk().parser;r.yy=Ik,o.debug("Renering info diagram\n"+t);var i,a=wb().securityLevel;"sandbox"===a&&(i=au("#i"+e));var s=au("sandbox"===a?i.nodes()[0].contentDocument.body:"body");"sandbox"===a?i.nodes()[0].contentDocument:document,r.parse(t),o.debug("Parsed info diagram");var c=s.select("#"+e);c.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+n),c.attr("height",100),c.attr("width",400)}catch(t){o.error("Error while rendering info diagram"),o.error(t.message)}}(i,t,Dm);break;case"pie":Gk(i,t);break;case"er":bx(s.er),_x(i,t);break;case"journey":ME(s.journey),NE(i,t);break;case"requirement":hT(s.requirement),fT(i,t)}}catch(e){throw function(t,e){try{o.debug("Renering svg for syntax error\n");var n=au("#"+t),r=n.append("g");r.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),r.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),r.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),r.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),r.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),r.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),r.append("text").attr("class","error-text").attr("x",1240).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),r.append("text").attr("class","error-text").attr("x",1050).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+e),n.attr("height",100),n.attr("width",400),n.attr("viewBox","768 0 512 512")}catch(t){o.error("Error while rendering info diagram"),o.error(t.message)}}(t,Dm),e}c.select('[id="'.concat(t,'"]')).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");var T=c.select("#d"+t).node().innerHTML;if(o.debug("cnf.arrowMarkerAbsolute",s.arrowMarkerAbsolute),s.arrowMarkerAbsolute&&"false"!==s.arrowMarkerAbsolute||"sandbox"===s.arrowMarkerAbsolute||(T=T.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),T=(T=FE(T)).replace(/<br>/g,"<br/>"),"sandbox"===s.securityLevel){var C=c.select("#d"+t+" svg").node(),E="100%";C&&(E=C.viewBox.baseVal.height+"px"),T='<iframe style="width:'.concat("100%",";height:").concat(E,';border:0;margin:0;" src="data:text/html;base64,').concat(btoa('<body style="margin:0">'+T+"</body>"),'" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The “iframe” tag is not supported by your browser.\n</iframe>')}else"loose"!==s.securityLevel&&(T=Om().sanitize(T,{ADD_TAGS:["foreignobject"],ADD_ATTR:["dominant-baseline"]}));if(void 0!==n)switch(g){case"flowchart":case"flowchart-v2":n(T,Gx.bindFunctions);break;case"gantt":n(T,Qw.bindFunctions);break;case"class":case"classDiagram":n(T,Zb.bindFunctions);break;default:n(T)}else o.debug("CB = undefined!");IT.forEach((function(t){t()})),IT=[];var S="sandbox"===s.securityLevel?"#i"+t:"#d"+t,A=au(S).node();return null!==A&&"function"==typeof A.remove&&au(S).node().remove(),T},parse:function(t){t+="\n";var e=wb(),n=db.detectInit(t,e);n&&o.info("reinit ",n);var r,i=db.detectType(t,e);switch(o.debug("Type "+i),i){case"gitGraph":wk.clear(),(r=Tk()).parser.yy=wk;break;case"flowchart":case"flowchart-v2":Gx.clear(),(r=Zx()).parser.yy=Gx;break;case"sequence":OT.clear(),(r=pT()).parser.yy=OT;break;case"gantt":(r=ek()).parser.yy=Qw;break;case"class":case"classDiagram":(r=n_()).parser.yy=Zb;break;case"state":case"stateDiagram":(r=EC()).parser.yy=UC;break;case"info":o.debug("info info info"),(r=Fk()).parser.yy=Ik;break;case"pie":o.debug("pie"),(r=Uk()).parser.yy=Hk;break;case"er":o.debug("er"),(r=dx()).parser.yy=hx;break;case"journey":o.debug("Journey"),(r=pE()).parser.yy=fE;break;case"requirement":case"requirementDiagram":o.debug("RequirementDiagram"),(r=Zk()).parser.yy=nT}return r.parser.yy.graphType=i,r.parser.yy.parseError=function(t,e){throw{str:t,hash:e}},r.parse(t),r},parseDirective:function(t,e,n,r){try{if(void 0!==e)switch(e=e.trim(),n){case"open_directive":PE={};break;case"type_directive":PE.type=e.toLowerCase();break;case"arg_directive":PE.args=JSON.parse(e);break;case"close_directive":(function(t,e,n){switch(o.debug("Directive type=".concat(e.type," with args:"),e.args),e.type){case"init":case"initialize":["config"].forEach((function(t){void 0!==e.args[t]&&("flowchart-v2"===n&&(n="flowchart"),e.args[n]=e.args[t],delete e.args[t])})),o.debug("sanitize in handleDirective",e.args),hb(e.args),o.debug("sanitize in handleDirective (done)",e.args),e.args,Tb(e.args);break;case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap("wrap"===e.type);break;case"themeCss":o.warn("themeCss encountered");break;default:o.warn("Unhandled directive: source: '%%{".concat(e.type,": ").concat(JSON.stringify(e.args?e.args:{}),"}%%"),e)}})(t,PE,r),PE=null}}catch(t){o.error("Error while rendering sequenceDiagram directive: ".concat(e," jison context: ").concat(n)),o.error(t.message)}},initialize:function(t){t&&t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),function(t){gb=rb({},t)}(t),t&&t.theme&&Mv[t.theme]?t.themeVariables=Mv[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Mv.default.getThemeVariables(t.themeVariables));var e="object"===RE(t)?function(t){return mb=rb({},yb),mb=rb(mb,t),t.theme&&Mv[t.theme]&&(mb.themeVariables=Mv[t.theme].getThemeVariables(t.themeVariables)),bb=_b(mb,vb),mb}(t):xb();YE(e),s(e.logLevel)},reinitialize:function(){},getConfig:wb,setConfig:function(t){return rb(bb,t),wb()},getSiteConfig:xb,updateSiteConfig:function(t){return mb=rb(mb,t),_b(mb,vb),mb},reset:function(){Cb()},globalReset:function(){Cb(),YE(wb())},defaultConfig:yb});s(wb().logLevel),Cb(wb());const UE=jE;var zE=function(){var t,e,n=UE.getConfig();arguments.length>=2?(void 0!==arguments[0]&&(qE.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],"function"==typeof arguments[arguments.length-1]?(e=arguments[arguments.length-1],o.debug("Callback function found")):void 0!==n.mermaid&&("function"==typeof n.mermaid.callback?(e=n.mermaid.callback,o.debug("Callback function found")):o.debug("No Callback function found")),t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof window.Node?[t]:t,o.debug("Start On Load before: "+qE.startOnLoad),void 0!==qE.startOnLoad&&(o.debug("Start On Load inner: "+qE.startOnLoad),UE.updateSiteConfig({startOnLoad:qE.startOnLoad})),void 0!==qE.ganttConfig&&UE.updateSiteConfig({gantt:qE.ganttConfig});for(var r,i=new db.initIdGeneratior(n.deterministicIds,n.deterministicIDSeed),a=function(n){var a=t[n];if(a.getAttribute("data-processed"))return"continue";a.setAttribute("data-processed",!0);var s="mermaid-".concat(i.next());r=a.innerHTML,r=db.entityDecode(r).trim().replace(/<br\s*\/?>/gi,"<br/>");var c=db.detectInit(r);c&&o.debug("Detected early reinit: ",c),UE.render(s,r,(function(t,n){a.innerHTML=t,void 0!==e&&e(s),n&&n(a)}),a)},s=0;s<t.length;s++)a(s)},$E=function(){qE.startOnLoad?UE.getConfig().startOnLoad&&qE.init():void 0===qE.startOnLoad&&(o.debug("In start, no config"),UE.getConfig().startOnLoad&&qE.init())};"undefined"!=typeof document&&window.addEventListener("load",(function(){$E()}),!1);var qE={startOnLoad:!0,htmlLabels:!0,mermaidAPI:UE,parse:UE.parse,render:UE.render,init:function(){try{zE.apply(void 0,arguments)}catch(t){o.warn("Syntax Error rendering"),o.warn(t),this.parseError&&this.parseError(t)}},initialize:function(t){void 0!==t.mermaid&&(void 0!==t.mermaid.startOnLoad&&(qE.startOnLoad=t.mermaid.startOnLoad),void 0!==t.mermaid.htmlLabels&&(qE.htmlLabels="false"!==t.mermaid.htmlLabels&&!1!==t.mermaid.htmlLabels)),UE.initialize(t)},contentLoaded:$E};const HE=qE},4949:(t,e,n)=>{t.exports={graphlib:n(6614),dagre:n(1463),intersect:n(8114),render:n(5787),util:n(8355),version:n(5689)}},9144:(t,e,n)=>{var r=n(8355);function i(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])}t.exports={default:i,normal:i,vee:function(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])},undirected:function(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])}}},5632:(t,e,n)=>{var r=n(8355),i=n(4322),a=n(1322);t.exports=function(t,e){var n,o=e.nodes().filter((function(t){return r.isSubgraph(e,t)})),s=t.selectAll("g.cluster").data(o,(function(t){return t}));return s.selectAll("*").remove(),s.enter().append("g").attr("class","cluster").attr("id",(function(t){return e.node(t).id})).style("opacity",0),s=t.selectAll("g.cluster"),r.applyTransition(s,e).style("opacity",1),s.each((function(t){var n=e.node(t),r=i.select(this);i.select(this).append("rect");var o=r.append("g").attr("class","label");a(o,n,n.clusterLabelPos)})),s.selectAll("rect").each((function(t){var n=e.node(t),a=i.select(this);r.applyStyle(a,n.style)})),n=s.exit?s.exit():s.selectAll(null),r.applyTransition(n,e).style("opacity",0).remove(),s}},6315:(t,e,n)=>{"use strict";var r=n(1034),i=n(1322),a=n(8355),o=n(4322);t.exports=function(t,e){var n,s=t.selectAll("g.edgeLabel").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0);return s.exit().remove(),s.enter().append("g").classed("edgeLabel",!0).style("opacity",0),(s=t.selectAll("g.edgeLabel")).each((function(t){var n=o.select(this);n.select(".label").remove();var a=e.edge(t),s=i(n,e.edge(t),0,0).classed("label",!0),c=s.node().getBBox();a.labelId&&s.attr("id",a.labelId),r.has(a,"width")||(a.width=c.width),r.has(a,"height")||(a.height=c.height)})),n=s.exit?s.exit():s.selectAll(null),a.applyTransition(n,e).style("opacity",0).remove(),s}},940:(t,e,n)=>{"use strict";var r=n(1034),i=n(3042),a=n(8355),o=n(4322);function s(t,e){var n=(o.line||o.svg.line)().x((function(t){return t.x})).y((function(t){return t.y}));return(n.curve||n.interpolate)(t.curve),n(e)}t.exports=function(t,e,n){var c=t.selectAll("g.edgePath").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0),u=function(t,e){var n=t.enter().append("g").attr("class","edgePath").style("opacity",0);return n.append("path").attr("class","path").attr("d",(function(t){var n=e.edge(t),i=e.node(t.v).elem;return s(n,r.range(n.points.length).map((function(){return e=(t=i).getBBox(),{x:(n=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2)).e,y:n.f};var t,e,n})))})),n.append("defs"),n}(c,e);!function(t,e){var n=t.exit();a.applyTransition(n,e).style("opacity",0).remove()}(c,e);var l=void 0!==c.merge?c.merge(u):c;return a.applyTransition(l,e).style("opacity",1),l.each((function(t){var n=o.select(this),r=e.edge(t);r.elem=this,r.id&&n.attr("id",r.id),a.applyClass(n,r.class,(n.classed("update")?"update ":"")+"edgePath")})),l.selectAll("path.path").each((function(t){var n=e.edge(t);n.arrowheadId=r.uniqueId("arrowhead");var c=o.select(this).attr("marker-end",(function(){return"url("+(t=location.href,e=n.arrowheadId,t.split("#")[0]+"#"+e+")");var t,e})).style("fill","none");a.applyTransition(c,e).attr("d",(function(t){return function(t,e){var n=t.edge(e),r=t.node(e.v),a=t.node(e.w),o=n.points.slice(1,n.points.length-1);return o.unshift(i(r,o[0])),o.push(i(a,o[o.length-1])),s(n,o)}(e,t)})),a.applyStyle(c,n.style)})),l.selectAll("defs *").remove(),l.selectAll("defs").each((function(t){var r=e.edge(t);(0,n[r.arrowhead])(o.select(this),r.arrowheadId,r,"arrowhead")})),l}},607:(t,e,n)=>{"use strict";var r=n(1034),i=n(1322),a=n(8355),o=n(4322);t.exports=function(t,e,n){var s,c=e.nodes().filter((function(t){return!a.isSubgraph(e,t)})),u=t.selectAll("g.node").data(c,(function(t){return t})).classed("update",!0);return u.exit().remove(),u.enter().append("g").attr("class","node").style("opacity",0),(u=t.selectAll("g.node")).each((function(t){var s=e.node(t),c=o.select(this);a.applyClass(c,s.class,(c.classed("update")?"update ":"")+"node"),c.select("g.label").remove();var u=c.append("g").attr("class","label"),l=i(u,s),h=n[s.shape],f=r.pick(l.node().getBBox(),"width","height");s.elem=this,s.id&&c.attr("id",s.id),s.labelId&&u.attr("id",s.labelId),r.has(s,"width")&&(f.width=s.width),r.has(s,"height")&&(f.height=s.height),f.width+=s.paddingLeft+s.paddingRight,f.height+=s.paddingTop+s.paddingBottom,u.attr("transform","translate("+(s.paddingLeft-s.paddingRight)/2+","+(s.paddingTop-s.paddingBottom)/2+")");var d=o.select(this);d.select(".label-container").remove();var p=h(d,f,s).classed("label-container",!0);a.applyStyle(p,s.style);var g=p.node().getBBox();s.width=g.width,s.height=g.height})),s=u.exit?u.exit():u.selectAll(null),a.applyTransition(s,e).style("opacity",0).remove(),u}},4322:(t,e,n)=>{var r;if(!r)try{r=n(7188)}catch(t){}r||(r=window.d3),t.exports=r},1463:(t,e,n)=>{var r;try{r=n(681)}catch(t){}r||(r=window.dagre),t.exports=r},6614:(t,e,n)=>{var r;try{r=n(8282)}catch(t){}r||(r=window.graphlib),t.exports=r},8114:(t,e,n)=>{t.exports={node:n(3042),circle:n(6587),ellipse:n(3260),polygon:n(5337),rect:n(8049)}},6587:(t,e,n)=>{var r=n(3260);t.exports=function(t,e,n){return r(t,e,e,n)}},3260:t=>{t.exports=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),u=Math.abs(e*n*o/c);r.x<i&&(u=-u);var l=Math.abs(e*n*s/c);return r.y<a&&(l=-l),{x:i+u,y:a+l}}},6808:t=>{function e(t,e){return t*e>0}t.exports=function(t,n,r,i){var a,o,s,c,u,l,h,f,d,p,g,y,m;if(!(a=n.y-t.y,s=t.x-n.x,u=n.x*t.y-t.x*n.y,d=a*r.x+s*r.y+u,p=a*i.x+s*i.y+u,0!==d&&0!==p&&e(d,p)||(o=i.y-r.y,c=r.x-i.x,l=i.x*r.y-r.x*i.y,h=o*t.x+c*t.y+l,f=o*n.x+c*n.y+l,0!==h&&0!==f&&e(h,f)||0==(g=a*c-o*s))))return y=Math.abs(g/2),{x:(m=s*l-c*u)<0?(m-y)/g:(m+y)/g,y:(m=o*u-a*l)<0?(m-y)/g:(m+y)/g}}},3042:t=>{t.exports=function(t,e){return t.intersect(e)}},5337:(t,e,n)=>{var r=n(6808);t.exports=function(t,e,n){var i=t.x,a=t.y,o=[],s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;e.forEach((function(t){s=Math.min(s,t.x),c=Math.min(c,t.y)}));for(var u=i-t.width/2-s,l=a-t.height/2-c,h=0;h<e.length;h++){var f=e[h],d=e[h<e.length-1?h+1:0],p=r(t,n,{x:u+f.x,y:l+f.y},{x:u+d.x,y:l+d.y});p&&o.push(p)}return o.length?(o.length>1&&o.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1})),o[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}},8049:t=>{t.exports=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;return Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=0===s?0:u*o/s,r=u):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o),{x:i+n,y:a+r}}},8284:(t,e,n)=>{var r=n(8355);t.exports=function(t,e){var n=t.append("foreignObject").attr("width","100000"),i=n.append("xhtml:div");i.attr("xmlns","http://www.w3.org/1999/xhtml");var a=e.label;switch(typeof a){case"function":i.insert(a);break;case"object":i.insert((function(){return a}));break;default:i.html(a)}r.applyStyle(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var o=i.node().getBoundingClientRect();return n.attr("width",o.width).attr("height",o.height),n}},1322:(t,e,n)=>{var r=n(7318),i=n(8284),a=n(8287);t.exports=function(t,e,n){var o=e.label,s=t.append("g");"svg"===e.labelType?a(s,e):"string"!=typeof o||"html"===e.labelType?i(s,e):r(s,e);var c,u=s.node().getBBox();switch(n){case"top":c=-e.height/2;break;case"bottom":c=e.height/2-u.height;break;default:c=-u.height/2}return s.attr("transform","translate("+-u.width/2+","+c+")"),s}},8287:(t,e,n)=>{var r=n(8355);t.exports=function(t,e){var n=t;return n.node().appendChild(e.label),r.applyStyle(n,e.labelStyle),n}},7318:(t,e,n)=>{var r=n(8355);t.exports=function(t,e){for(var n=t.append("text"),i=function(t){for(var e,n="",r=!1,i=0;i<t.length;++i)e=t[i],r?(n+="n"===e?"\n":e,r=!1):"\\"===e?r=!0:n+=e;return n}(e.label).split("\n"),a=0;a<i.length;a++)n.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(i[a]);return r.applyStyle(n,e.labelStyle),n}},1034:(t,e,n)=>{var r;try{r={defaults:n(1747),each:n(6073),isFunction:n(3560),isPlainObject:n(8630),pick:n(9722),has:n(8721),range:n(6026),uniqueId:n(3955)}}catch(t){}r||(r=window._),t.exports=r},6381:(t,e,n)=>{"use strict";var r=n(8355),i=n(4322);t.exports=function(t,e){var n=t.filter((function(){return!i.select(this).classed("update")}));function a(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}n.attr("transform",a),r.applyTransition(t,e).style("opacity",1).attr("transform",a),r.applyTransition(n.selectAll("rect"),e).attr("width",(function(t){return e.node(t).width})).attr("height",(function(t){return e.node(t).height})).attr("x",(function(t){return-e.node(t).width/2})).attr("y",(function(t){return-e.node(t).height/2}))}},4577:(t,e,n)=>{"use strict";var r=n(8355),i=n(4322),a=n(1034);t.exports=function(t,e){function n(t){var n=e.edge(t);return a.has(n,"x")?"translate("+n.x+","+n.y+")":""}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},4849:(t,e,n)=>{"use strict";var r=n(8355),i=n(4322);t.exports=function(t,e){function n(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},5787:(t,e,n)=>{var r=n(1034),i=n(4322),a=n(1463).layout;t.exports=function(){var t=n(607),e=n(5632),i=n(6315),u=n(940),l=n(4849),h=n(4577),f=n(6381),d=n(4418),p=n(9144),g=function(n,g){!function(t){t.nodes().forEach((function(e){var n=t.node(e);r.has(n,"label")||t.children(e).length||(n.label=e),r.has(n,"paddingX")&&r.defaults(n,{paddingLeft:n.paddingX,paddingRight:n.paddingX}),r.has(n,"paddingY")&&r.defaults(n,{paddingTop:n.paddingY,paddingBottom:n.paddingY}),r.has(n,"padding")&&r.defaults(n,{paddingLeft:n.padding,paddingRight:n.padding,paddingTop:n.padding,paddingBottom:n.padding}),r.defaults(n,o),r.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],(function(t){n[t]=Number(n[t])})),r.has(n,"width")&&(n._prevWidth=n.width),r.has(n,"height")&&(n._prevHeight=n.height)})),t.edges().forEach((function(e){var n=t.edge(e);r.has(n,"label")||(n.label=""),r.defaults(n,s)}))}(g);var y=c(n,"output"),m=c(y,"clusters"),v=c(y,"edgePaths"),b=i(c(y,"edgeLabels"),g),_=t(c(y,"nodes"),g,d);a(g),l(_,g),h(b,g),u(v,g,p);var x=e(m,g);f(x,g),function(t){r.each(t.nodes(),(function(e){var n=t.node(e);r.has(n,"_prevWidth")?n.width=n._prevWidth:delete n.width,r.has(n,"_prevHeight")?n.height=n._prevHeight:delete n.height,delete n._prevWidth,delete n._prevHeight}))}(g)};return g.createNodes=function(e){return arguments.length?(t=e,g):t},g.createClusters=function(t){return arguments.length?(e=t,g):e},g.createEdgeLabels=function(t){return arguments.length?(i=t,g):i},g.createEdgePaths=function(t){return arguments.length?(u=t,g):u},g.shapes=function(t){return arguments.length?(d=t,g):d},g.arrows=function(t){return arguments.length?(p=t,g):p},g};var o={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},s={arrowhead:"normal",curve:i.curveLinear};function c(t,e){var n=t.select("g."+e);return n.empty()&&(n=t.append("g").attr("class",e)),n}},4418:(t,e,n)=>{"use strict";var r=n(8049),i=n(3260),a=n(6587),o=n(5337);t.exports={rect:function(t,e,n){var i=t.insert("rect",":first-child").attr("rx",n.rx).attr("ry",n.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return n.intersect=function(t){return r(n,t)},i},ellipse:function(t,e,n){var r=e.width/2,a=e.height/2,o=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",r).attr("ry",a);return n.intersect=function(t){return i(n,r,a,t)},o},circle:function(t,e,n){var r=Math.max(e.width,e.height)/2,i=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",r);return n.intersect=function(t){return a(n,r,t)},i},diamond:function(t,e,n){var r=e.width*Math.SQRT2/2,i=e.height*Math.SQRT2/2,a=[{x:0,y:-i},{x:-r,y:0},{x:0,y:i},{x:r,y:0}],s=t.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" "));return n.intersect=function(t){return o(n,a,t)},s}}},8355:(t,e,n)=>{var r=n(1034);t.exports={isSubgraph:function(t,e){return!!t.children(e).length},edgeToId:function(t){return a(t.v)+":"+a(t.w)+":"+a(t.name)},applyStyle:function(t,e){e&&t.attr("style",e)},applyClass:function(t,e,n){e&&t.attr("class",e).attr("class",n+" "+t.attr("class"))},applyTransition:function(t,e){var n=e.graph();if(r.isPlainObject(n)){var i=n.transition;if(r.isFunction(i))return i(t)}return t}};var i=/:/g;function a(t){return t?String(t).replace(i,"\\:"):""}},5689:t=>{t.exports="0.6.4"},7188:(t,e,n)=>{"use strict";n.r(e),n.d(e,{FormatSpecifier:()=>uc,active:()=>Jr,arc:()=>fx,area:()=>vx,areaRadial:()=>Sx,ascending:()=>i,autoType:()=>Fo,axisBottom:()=>it,axisLeft:()=>at,axisRight:()=>rt,axisTop:()=>nt,bisect:()=>u,bisectLeft:()=>c,bisectRight:()=>s,bisector:()=>a,blob:()=>ms,brush:()=>Ai,brushSelection:()=>Ci,brushX:()=>Ei,brushY:()=>Si,buffer:()=>bs,chord:()=>Fi,clientPoint:()=>Dn,cluster:()=>Sd,color:()=>Ve,contourDensity:()=>oo,contours:()=>to,create:()=>Y_,creator:()=>ie,cross:()=>f,csv:()=>Ts,csvFormat:()=>To,csvFormatBody:()=>Co,csvFormatRow:()=>So,csvFormatRows:()=>Eo,csvFormatValue:()=>Ao,csvParse:()=>wo,csvParseRows:()=>ko,cubehelix:()=>qa,curveBasis:()=>sw,curveBasisClosed:()=>uw,curveBasisOpen:()=>hw,curveBundle:()=>dw,curveCardinal:()=>yw,curveCardinalClosed:()=>vw,curveCardinalOpen:()=>_w,curveCatmullRom:()=>kw,curveCatmullRomClosed:()=>Cw,curveCatmullRomOpen:()=>Sw,curveLinear:()=>px,curveLinearClosed:()=>Mw,curveMonotoneX:()=>Fw,curveMonotoneY:()=>Pw,curveNatural:()=>Uw,curveStep:()=>$w,curveStepAfter:()=>Hw,curveStepBefore:()=>qw,customEvent:()=>ye,descending:()=>d,deviation:()=>y,dispatch:()=>ft,drag:()=>po,dragDisable:()=>Se,dragEnable:()=>Ae,dsv:()=>ks,dsvFormat:()=>_o,easeBack:()=>hs,easeBackIn:()=>us,easeBackInOut:()=>hs,easeBackOut:()=>ls,easeBounce:()=>os,easeBounceIn:()=>as,easeBounceInOut:()=>ss,easeBounceOut:()=>os,easeCircle:()=>rs,easeCircleIn:()=>es,easeCircleInOut:()=>rs,easeCircleOut:()=>ns,easeCubic:()=>Xr,easeCubicIn:()=>Vr,easeCubicInOut:()=>Xr,easeCubicOut:()=>Gr,easeElastic:()=>ps,easeElasticIn:()=>ds,easeElasticInOut:()=>gs,easeElasticOut:()=>ps,easeExp:()=>ts,easeExpIn:()=>Ko,easeExpInOut:()=>ts,easeExpOut:()=>Jo,easeLinear:()=>Yo,easePoly:()=>Ho,easePolyIn:()=>$o,easePolyInOut:()=>Ho,easePolyOut:()=>qo,easeQuad:()=>zo,easeQuadIn:()=>jo,easeQuadInOut:()=>zo,easeQuadOut:()=>Uo,easeSin:()=>Zo,easeSinIn:()=>Go,easeSinInOut:()=>Zo,easeSinOut:()=>Xo,entries:()=>pa,event:()=>le,extent:()=>m,forceCenter:()=>Ls,forceCollide:()=>Ws,forceLink:()=>Xs,forceManyBody:()=>tc,forceRadial:()=>ec,forceSimulation:()=>Js,forceX:()=>nc,forceY:()=>rc,format:()=>pc,formatDefaultLocale:()=>bc,formatLocale:()=>vc,formatPrefix:()=>gc,formatSpecifier:()=>cc,geoAlbers:()=>zf,geoAlbersUsa:()=>$f,geoArea:()=>gu,geoAzimuthalEqualArea:()=>Vf,geoAzimuthalEqualAreaRaw:()=>Wf,geoAzimuthalEquidistant:()=>Xf,geoAzimuthalEquidistantRaw:()=>Gf,geoBounds:()=>sl,geoCentroid:()=>bl,geoCircle:()=>Nl,geoClipAntimeridian:()=>zl,geoClipCircle:()=>$l,geoClipExtent:()=>Vl,geoClipRectangle:()=>Wl,geoConicConformal:()=>ed,geoConicConformalRaw:()=>td,geoConicEqualArea:()=>Uf,geoConicEqualAreaRaw:()=>jf,geoConicEquidistant:()=>ad,geoConicEquidistantRaw:()=>id,geoContains:()=>ph,geoDistance:()=>ah,geoEqualEarth:()=>fd,geoEqualEarthRaw:()=>hd,geoEquirectangular:()=>rd,geoEquirectangularRaw:()=>nd,geoGnomonic:()=>pd,geoGnomonicRaw:()=>dd,geoGraticule:()=>mh,geoGraticule10:()=>vh,geoIdentity:()=>gd,geoInterpolate:()=>bh,geoLength:()=>nh,geoMercator:()=>Qf,geoMercatorRaw:()=>Zf,geoNaturalEarth1:()=>md,geoNaturalEarth1Raw:()=>yd,geoOrthographic:()=>bd,geoOrthographicRaw:()=>vd,geoPath:()=>kf,geoProjection:()=>Ff,geoProjectionMutator:()=>Pf,geoRotation:()=>Sl,geoStereographic:()=>xd,geoStereographicRaw:()=>_d,geoStream:()=>nu,geoTransform:()=>Tf,geoTransverseMercator:()=>kd,geoTransverseMercatorRaw:()=>wd,gray:()=>ka,hcl:()=>Ba,hierarchy:()=>Md,histogram:()=>D,hsl:()=>an,html:()=>Ds,image:()=>Es,interpolate:()=>Mn,interpolateArray:()=>xn,interpolateBasis:()=>un,interpolateBasisClosed:()=>ln,interpolateBlues:()=>f_,interpolateBrBG:()=>Tb,interpolateBuGn:()=>zb,interpolateBuPu:()=>qb,interpolateCividis:()=>k_,interpolateCool:()=>E_,interpolateCubehelix:()=>Up,interpolateCubehelixDefault:()=>T_,interpolateCubehelixLong:()=>zp,interpolateDate:()=>kn,interpolateDiscrete:()=>Sp,interpolateGnBu:()=>Wb,interpolateGreens:()=>p_,interpolateGreys:()=>y_,interpolateHcl:()=>Pp,interpolateHclLong:()=>Yp,interpolateHsl:()=>Op,interpolateHslLong:()=>Ip,interpolateHue:()=>Ap,interpolateInferno:()=>F_,interpolateLab:()=>Rp,interpolateMagma:()=>R_,interpolateNumber:()=>Tn,interpolateNumberArray:()=>bn,interpolateObject:()=>Cn,interpolateOrRd:()=>Gb,interpolateOranges:()=>w_,interpolatePRGn:()=>Eb,interpolatePiYG:()=>Ab,interpolatePlasma:()=>P_,interpolatePuBu:()=>Kb,interpolatePuBuGn:()=>Zb,interpolatePuOr:()=>Nb,interpolatePuRd:()=>t_,interpolatePurples:()=>v_,interpolateRainbow:()=>A_,interpolateRdBu:()=>Bb,interpolateRdGy:()=>Ob,interpolateRdPu:()=>n_,interpolateRdYlBu:()=>Rb,interpolateRdYlGn:()=>Pb,interpolateReds:()=>__,interpolateRgb:()=>gn,interpolateRgbBasis:()=>mn,interpolateRgbBasisClosed:()=>vn,interpolateRound:()=>Mp,interpolateSinebow:()=>B_,interpolateSpectral:()=>jb,interpolateString:()=>An,interpolateTransformCss:()=>pr,interpolateTransformSvg:()=>gr,interpolateTurbo:()=>L_,interpolateViridis:()=>I_,interpolateWarm:()=>C_,interpolateYlGn:()=>o_,interpolateYlGnBu:()=>i_,interpolateYlOrBr:()=>c_,interpolateYlOrRd:()=>l_,interpolateZoom:()=>Bp,interrupt:()=>ar,interval:()=>fk,isoFormat:()=>uk,isoParse:()=>hk,json:()=>As,keys:()=>fa,lab:()=>Ta,lch:()=>Da,line:()=>mx,lineRadial:()=>Ex,linkHorizontal:()=>Rx,linkRadial:()=>Px,linkVertical:()=>Fx,local:()=>U_,map:()=>na,matcher:()=>mt,max:()=>I,mean:()=>R,median:()=>F,merge:()=>P,min:()=>Y,mouse:()=>Ln,namespace:()=>Ct,namespaces:()=>Tt,nest:()=>ra,now:()=>qn,pack:()=>tp,packEnclose:()=>Id,packSiblings:()=>Gd,pairs:()=>l,partition:()=>op,path:()=>Wi,permute:()=>j,pie:()=>xx,piecewise:()=>$p,pointRadial:()=>Ax,polygonArea:()=>Hp,polygonCentroid:()=>Wp,polygonContains:()=>Qp,polygonHull:()=>Zp,polygonLength:()=>Kp,precisionFixed:()=>_c,precisionPrefix:()=>xc,precisionRound:()=>wc,quadtree:()=>js,quantile:()=>B,quantize:()=>qp,radialArea:()=>Sx,radialLine:()=>Ex,randomBates:()=>ig,randomExponential:()=>ag,randomIrwinHall:()=>rg,randomLogNormal:()=>ng,randomNormal:()=>eg,randomUniform:()=>tg,range:()=>k,rgb:()=>Qe,ribbon:()=>Ki,scaleBand:()=>dg,scaleDiverging:()=>ob,scaleDivergingLog:()=>sb,scaleDivergingPow:()=>ub,scaleDivergingSqrt:()=>lb,scaleDivergingSymlog:()=>cb,scaleIdentity:()=>Mg,scaleImplicit:()=>hg,scaleLinear:()=>Ag,scaleLog:()=>Pg,scaleOrdinal:()=>fg,scalePoint:()=>gg,scalePow:()=>Vg,scaleQuantile:()=>Xg,scaleQuantize:()=>Zg,scaleSequential:()=>Jv,scaleSequentialLog:()=>tb,scaleSequentialPow:()=>nb,scaleSequentialQuantile:()=>ib,scaleSequentialSqrt:()=>rb,scaleSequentialSymlog:()=>eb,scaleSqrt:()=>Gg,scaleSymlog:()=>zg,scaleThreshold:()=>Qg,scaleTime:()=>jv,scaleUtc:()=>Zv,scan:()=>U,schemeAccent:()=>db,schemeBlues:()=>h_,schemeBrBG:()=>kb,schemeBuGn:()=>Ub,schemeBuPu:()=>$b,schemeCategory10:()=>fb,schemeDark2:()=>pb,schemeGnBu:()=>Hb,schemeGreens:()=>d_,schemeGreys:()=>g_,schemeOrRd:()=>Vb,schemeOranges:()=>x_,schemePRGn:()=>Cb,schemePaired:()=>gb,schemePastel1:()=>yb,schemePastel2:()=>mb,schemePiYG:()=>Sb,schemePuBu:()=>Qb,schemePuBuGn:()=>Xb,schemePuOr:()=>Mb,schemePuRd:()=>Jb,schemePurples:()=>m_,schemeRdBu:()=>Db,schemeRdGy:()=>Lb,schemeRdPu:()=>e_,schemeRdYlBu:()=>Ib,schemeRdYlGn:()=>Fb,schemeReds:()=>b_,schemeSet1:()=>vb,schemeSet2:()=>bb,schemeSet3:()=>_b,schemeSpectral:()=>Yb,schemeTableau10:()=>xb,schemeYlGn:()=>a_,schemeYlGnBu:()=>r_,schemeYlOrBr:()=>s_,schemeYlOrRd:()=>u_,select:()=>Te,selectAll:()=>$_,selection:()=>ke,selector:()=>pt,selectorAll:()=>yt,set:()=>ha,shuffle:()=>z,stack:()=>Xw,stackOffsetDiverging:()=>Qw,stackOffsetExpand:()=>Zw,stackOffsetNone:()=>Ww,stackOffsetSilhouette:()=>Kw,stackOffsetWiggle:()=>Jw,stackOrderAppearance:()=>tk,stackOrderAscending:()=>nk,stackOrderDescending:()=>ik,stackOrderInsideOut:()=>ak,stackOrderNone:()=>Vw,stackOrderReverse:()=>ok,stratify:()=>hp,style:()=>Rt,sum:()=>$,svg:()=>Bs,symbol:()=>rw,symbolCircle:()=>Yx,symbolCross:()=>jx,symbolDiamond:()=>$x,symbolSquare:()=>Gx,symbolStar:()=>Vx,symbolTriangle:()=>Zx,symbolWye:()=>ew,symbols:()=>nw,text:()=>xs,thresholdFreedmanDiaconis:()=>L,thresholdScott:()=>O,thresholdSturges:()=>N,tickFormat:()=>Eg,tickIncrement:()=>A,tickStep:()=>M,ticks:()=>S,timeDay:()=>Ay,timeDays:()=>My,timeFormat:()=>pm,timeFormatDefaultLocale:()=>Iv,timeFormatLocale:()=>fm,timeFriday:()=>vy,timeFridays:()=>Cy,timeHour:()=>Dy,timeHours:()=>By,timeInterval:()=>ty,timeMillisecond:()=>jy,timeMilliseconds:()=>Uy,timeMinute:()=>Oy,timeMinutes:()=>Iy,timeMonday:()=>py,timeMondays:()=>xy,timeMonth:()=>ay,timeMonths:()=>oy,timeParse:()=>gm,timeSaturday:()=>by,timeSaturdays:()=>Ey,timeSecond:()=>Fy,timeSeconds:()=>Py,timeSunday:()=>dy,timeSundays:()=>_y,timeThursday:()=>my,timeThursdays:()=>Ty,timeTuesday:()=>gy,timeTuesdays:()=>wy,timeWednesday:()=>yy,timeWednesdays:()=>ky,timeWeek:()=>dy,timeWeeks:()=>_y,timeYear:()=>ny,timeYears:()=>ry,timeout:()=>Kn,timer:()=>Vn,timerFlush:()=>Gn,touch:()=>Bn,touches:()=>q_,transition:()=>qr,transpose:()=>q,tree:()=>vp,treemap:()=>kp,treemapBinary:()=>Tp,treemapDice:()=>ap,treemapResquarify:()=>Ep,treemapSlice:()=>bp,treemapSliceDice:()=>Cp,treemapSquarify:()=>wp,tsv:()=>Cs,tsvFormat:()=>Bo,tsvFormatBody:()=>Lo,tsvFormatRow:()=>Io,tsvFormatRows:()=>Oo,tsvFormatValue:()=>Ro,tsvParse:()=>No,tsvParseRows:()=>Do,utcDay:()=>im,utcDays:()=>am,utcFormat:()=>ym,utcFriday:()=>Gy,utcFridays:()=>em,utcHour:()=>Hv,utcHours:()=>Wv,utcMillisecond:()=>jy,utcMilliseconds:()=>Uy,utcMinute:()=>Gv,utcMinutes:()=>Xv,utcMonday:()=>qy,utcMondays:()=>Qy,utcMonth:()=>zv,utcMonths:()=>$v,utcParse:()=>mm,utcSaturday:()=>Xy,utcSaturdays:()=>nm,utcSecond:()=>Fy,utcSeconds:()=>Py,utcSunday:()=>$y,utcSundays:()=>Zy,utcThursday:()=>Vy,utcThursdays:()=>tm,utcTuesday:()=>Hy,utcTuesdays:()=>Ky,utcWednesday:()=>Wy,utcWednesdays:()=>Jy,utcWeek:()=>$y,utcWeeks:()=>Zy,utcYear:()=>sm,utcYears:()=>cm,values:()=>da,variance:()=>g,version:()=>r,voronoi:()=>Kk,window:()=>Bt,xml:()=>Ns,zip:()=>W,zoom:()=>fT,zoomIdentity:()=>nT,zoomTransform:()=>rT});var r="5.16.0";function i(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function a(t){var e;return 1===t.length&&(e=t,t=function(t,n){return i(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}var o=a(i),s=o.right,c=o.left;const u=s;function l(t,e){null==e&&(e=h);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return a}function h(t,e){return[t,e]}function f(t,e,n){var r,i,a,o,s=t.length,c=e.length,u=new Array(s*c);for(null==n&&(n=h),r=a=0;r<s;++r)for(o=t[r],i=0;i<c;++i,++a)u[a]=n(o,e[i]);return u}function d(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function p(t){return null===t?NaN:+t}function g(t,e){var n,r,i=t.length,a=0,o=-1,s=0,c=0;if(null==e)for(;++o<i;)isNaN(n=p(t[o]))||(c+=(r=n-s)*(n-(s+=r/++a)));else for(;++o<i;)isNaN(n=p(e(t[o],o,t)))||(c+=(r=n-s)*(n-(s+=r/++a)));if(a>1)return c/(a-1)}function y(t,e){var n=g(t,e);return n?Math.sqrt(n):n}function m(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}var v=Array.prototype,b=v.slice,_=v.map;function x(t){return function(){return t}}function w(t){return t}function k(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}var T=Math.sqrt(50),C=Math.sqrt(10),E=Math.sqrt(2);function S(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=A(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return r&&a.reverse(),a}function A(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=T?10:a>=C?5:a>=E?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=T?10:a>=C?5:a>=E?2:1)}function M(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=T?i*=10:a>=C?i*=5:a>=E&&(i*=2),e<t?-i:i}function N(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}function D(){var t=w,e=m,n=N;function r(r){var i,a,o=r.length,s=new Array(o);for(i=0;i<o;++i)s[i]=t(r[i],i,r);var c=e(s),l=c[0],h=c[1],f=n(s,l,h);Array.isArray(f)||(f=M(l,h,f),f=k(Math.ceil(l/f)*f,h,f));for(var d=f.length;f[0]<=l;)f.shift(),--d;for(;f[d-1]>h;)f.pop(),--d;var p,g=new Array(d+1);for(i=0;i<=d;++i)(p=g[i]=[]).x0=i>0?f[i-1]:l,p.x1=i<d?f[i]:h;for(i=0;i<o;++i)l<=(a=s[i])&&a<=h&&g[u(f,a,0,d)].push(r[i]);return g}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:x(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:x([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?x(b.call(t)):x(t),r):n},r}function B(t,e,n){if(null==n&&(n=p),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}}function L(t,e,n){return t=_.call(t,p).sort(i),Math.ceil((n-e)/(2*(B(t,.75)-B(t,.25))*Math.pow(t.length,-1/3)))}function O(t,e,n){return Math.ceil((n-e)/(3.5*y(t)*Math.pow(t.length,-1/3)))}function I(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r}function R(t,e){var n,r=t.length,i=r,a=-1,o=0;if(null==e)for(;++a<r;)isNaN(n=p(t[a]))?--i:o+=n;else for(;++a<r;)isNaN(n=p(e(t[a],a,t)))?--i:o+=n;if(i)return o/i}function F(t,e){var n,r=t.length,a=-1,o=[];if(null==e)for(;++a<r;)isNaN(n=p(t[a]))||o.push(n);else for(;++a<r;)isNaN(n=p(e(t[a],a,t)))||o.push(n);return B(o.sort(i),.5)}function P(t){for(var e,n,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(n=new Array(o);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n}function Y(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&r>n&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&r>n&&(r=n);return r}function j(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r}function U(t,e){if(n=t.length){var n,r,a=0,o=0,s=t[o];for(null==e&&(e=i);++a<n;)(e(r=t[a],s)<0||0!==e(s,s))&&(s=r,o=a);return 0===e(s,s)?o:void 0}}function z(t,e,n){for(var r,i,a=(null==n?t.length:n)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,r=t[a+e],t[a+e]=t[i+e],t[i+e]=r;return t}function $(t,e){var n,r=t.length,i=-1,a=0;if(null==e)for(;++i<r;)(n=+t[i])&&(a+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(a+=n);return a}function q(t){if(!(i=t.length))return[];for(var e=-1,n=Y(t,H),r=new Array(n);++e<n;)for(var i,a=-1,o=r[e]=new Array(i);++a<i;)o[a]=t[a][e];return r}function H(t){return t.length}function W(){return q(arguments)}var V=Array.prototype.slice;function G(t){return t}var X=1e-6;function Z(t){return"translate("+(t+.5)+",0)"}function Q(t){return"translate(0,"+(t+.5)+")"}function K(t){return function(e){return+t(e)}}function J(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function tt(){return!this.__axis}function et(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,c=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",l=1===t||3===t?Z:Q;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):G:i,p=Math.max(a,0)+s,g=e.range(),y=+g[0]+.5,m=+g[g.length-1]+.5,v=(e.bandwidth?J:K)(e.copy()),b=h.selection?h.selection():h,_=b.selectAll(".domain").data([null]),x=b.selectAll(".tick").data(f,e).order(),w=x.exit(),k=x.enter().append("g").attr("class","tick"),T=x.select("line"),C=x.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(k),T=T.merge(k.append("line").attr("stroke","currentColor").attr(u+"2",c*a)),C=C.merge(k.append("text").attr("fill","currentColor").attr(u,c*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==b&&(_=_.transition(h),x=x.transition(h),T=T.transition(h),C=C.transition(h),w=w.transition(h).attr("opacity",X).attr("transform",(function(t){return isFinite(t=v(t))?l(t):this.getAttribute("transform")})),k.attr("opacity",X).attr("transform",(function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:v(t))}))),w.remove(),_.attr("d",4===t||2==t?o?"M"+c*o+","+y+"H0.5V"+m+"H"+c*o:"M0.5,"+y+"V"+m:o?"M"+y+","+c*o+"V0.5H"+m+"V"+c*o:"M"+y+",0.5H"+m),x.attr("opacity",1).attr("transform",(function(t){return l(v(t))})),T.attr(u+"2",c*a),C.attr(u,c*p).text(d),b.filter(tt).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each((function(){this.__axis=v}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=V.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:V.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:V.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=o=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(o=+t,h):o},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function nt(t){return et(1,t)}function rt(t){return et(2,t)}function it(t){return et(3,t)}function at(t){return et(4,t)}var ot={value:function(){}};function st(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ct(r)}function ct(t){this._=t}function ut(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function lt(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function ht(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=ot,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ct.prototype=st.prototype={constructor:ct,on:function(t,e){var n,r=this._,i=ut(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=ht(r[n],t.name,e);else if(null==e)for(n in r)r[n]=ht(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=lt(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ct(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};const ft=st;function dt(){}function pt(t){return null==t?dt:function(){return this.querySelector(t)}}function gt(){return[]}function yt(t){return null==t?gt:function(){return this.querySelectorAll(t)}}function mt(t){return function(){return this.matches(t)}}function vt(t){return new Array(t.length)}function bt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function _t(t,e,n,r,i,a){for(var o,s=0,c=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new bt(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function xt(t,e,n,r,i,a,o){var s,c,u,l={},h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(d[s]=u="$"+o.call(c,c.__data__,s,e),u in l?i[s]=c:l[u]=c);for(s=0;s<f;++s)(c=l[u="$"+o.call(t,a[s],s,a)])?(r[s]=c,c.__data__=a[s],l[u]=null):n[s]=new bt(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&l[d[s]]===c&&(i[s]=c)}function wt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}bt.prototype={constructor:bt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var kt="http://www.w3.org/1999/xhtml";const Tt={svg:"http://www.w3.org/2000/svg",xhtml:kt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ct(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Tt.hasOwnProperty(e)?{space:Tt[e],local:t}:t}function Et(t){return function(){this.removeAttribute(t)}}function St(t){return function(){this.removeAttributeNS(t.space,t.local)}}function At(t,e){return function(){this.setAttribute(t,e)}}function Mt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Nt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Dt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Bt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Lt(t){return function(){this.style.removeProperty(t)}}function Ot(t,e,n){return function(){this.style.setProperty(t,e,n)}}function It(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Rt(t,e){return t.style.getPropertyValue(e)||Bt(t).getComputedStyle(t,null).getPropertyValue(e)}function Ft(t){return function(){delete this[t]}}function Pt(t,e){return function(){this[t]=e}}function Yt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function jt(t){return t.trim().split(/^|\s+/)}function Ut(t){return t.classList||new zt(t)}function zt(t){this._node=t,this._names=jt(t.getAttribute("class")||"")}function $t(t,e){for(var n=Ut(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function qt(t,e){for(var n=Ut(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Ht(t){return function(){$t(this,t)}}function Wt(t){return function(){qt(this,t)}}function Vt(t,e){return function(){(e.apply(this,arguments)?$t:qt)(this,t)}}function Gt(){this.textContent=""}function Xt(t){return function(){this.textContent=t}}function Zt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Qt(){this.innerHTML=""}function Kt(t){return function(){this.innerHTML=t}}function Jt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function te(){this.nextSibling&&this.parentNode.appendChild(this)}function ee(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ne(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===kt&&e.documentElement.namespaceURI===kt?e.createElement(t):e.createElementNS(n,t)}}function re(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ie(t){var e=Ct(t);return(e.local?re:ne)(e)}function ae(){return null}function oe(){var t=this.parentNode;t&&t.removeChild(this)}function se(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ce(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}zt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ue={},le=null;function he(t,e,n){return t=fe(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function fe(t,e,n){return function(r){var i=le;le=r;try{t.call(this,this.__data__,e,n)}finally{le=i}}}function de(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function pe(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function ge(t,e,n){var r=ue.hasOwnProperty(t.type)?he:fe;return function(i,a,o){var s,c=this.__on,u=r(e,a,o);if(c)for(var l=0,h=c.length;l<h;++l)if((s=c[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=u,s.capture=n),void(s.value=e);this.addEventListener(t.type,u,n),s={type:t.type,name:t.name,value:e,listener:u,capture:n},c?c.push(s):this.__on=[s]}}function ye(t,e,n,r){var i=le;t.sourceEvent=le,le=t;try{return e.apply(n,r)}finally{le=i}}function me(t,e,n){var r=Bt(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function ve(t,e){return function(){return me(this,t,e)}}function be(t,e){return function(){return me(this,t,e.apply(this,arguments))}}"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(ue={mouseenter:"mouseover",mouseleave:"mouseout"}));var _e=[null];function xe(t,e){this._groups=t,this._parents=e}function we(){return new xe([[document.documentElement]],_e)}xe.prototype=we.prototype={constructor:xe,select:function(t){"function"!=typeof t&&(t=pt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,u=r[i]=new Array(c),l=0;l<c;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),u[l]=o);return new xe(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=yt(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,u=0;u<c;++u)(o=s[u])&&(r.push(t.call(o,o.__data__,u,s)),i.push(o));return new xe(r,i)},filter:function(t){"function"!=typeof t&&(t=mt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new xe(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),l=-1,this.each((function(t){p[++l]=t})),p;var n,r=e?xt:_t,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,s=new Array(o),c=new Array(o),u=new Array(o),l=0;l<o;++l){var h=i[l],f=a[l],d=f.length,p=t.call(h,h&&h.__data__,l,i),g=p.length,y=c[l]=new Array(g),m=s[l]=new Array(g);r(h,f,y,m,u[l]=new Array(d),p,e);for(var v,b,_=0,x=0;_<g;++_)if(v=y[_]){for(_>=x&&(x=_+1);!(b=m[x])&&++x<g;);v._next=b||null}}return(s=new xe(s,i))._enter=c,s._exit=u,s},enter:function(){return new xe(this._enter||this._groups.map(vt),this._parents)},exit:function(){return new xe(this._exit||this._groups.map(vt),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new xe(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=wt);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,u=i[a]=new Array(c),l=0;l<c;++l)(o=s[l])&&(u[l]=o);u.sort(e)}return new xe(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=Ct(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?St:Et:"function"==typeof e?n.local?Dt:Nt:n.local?Mt:At)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Lt:"function"==typeof e?It:Ot)(t,e,null==n?"":n)):Rt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ft:"function"==typeof e?Yt:Pt)(t,e)):this.node()[t]},classed:function(t,e){var n=jt(t+"");if(arguments.length<2){for(var r=Ut(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Vt:e?Ht:Wt)(n,e))},text:function(t){return arguments.length?this.each(null==t?Gt:("function"==typeof t?Zt:Xt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Qt:("function"==typeof t?Jt:Kt)(t)):this.node().innerHTML},raise:function(){return this.each(te)},lower:function(){return this.each(ee)},append:function(t){var e="function"==typeof t?t:ie(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ie(t),r=null==e?ae:"function"==typeof e?e:pt(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(oe)},clone:function(t){return this.select(t?ce:se)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=de(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?ge:pe,null==n&&(n=!1),r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,u=0,l=s.length;u<l;++u)for(r=0,c=s[u];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?be:ve)(t,e))}};const ke=we;function Te(t){return"string"==typeof t?new xe([[document.querySelector(t)]],[document.documentElement]):new xe([[t]],_e)}function Ce(){le.stopImmediatePropagation()}function Ee(){le.preventDefault(),le.stopImmediatePropagation()}function Se(t){var e=t.document.documentElement,n=Te(t).on("dragstart.drag",Ee,!0);"onselectstart"in e?n.on("selectstart.drag",Ee,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Ae(t,e){var n=t.document.documentElement,r=Te(t).on("dragstart.drag",null);e&&(r.on("click.drag",Ee,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Me(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ne(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function De(){}var Be=.7,Le=1/Be,Oe="\\s*([+-]?\\d+)\\s*",Ie="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fe=/^#([0-9a-f]{3,8})$/,Pe=new RegExp("^rgb\\("+[Oe,Oe,Oe]+"\\)$"),Ye=new RegExp("^rgb\\("+[Re,Re,Re]+"\\)$"),je=new RegExp("^rgba\\("+[Oe,Oe,Oe,Ie]+"\\)$"),Ue=new RegExp("^rgba\\("+[Re,Re,Re,Ie]+"\\)$"),ze=new RegExp("^hsl\\("+[Ie,Re,Re]+"\\)$"),$e=new RegExp("^hsla\\("+[Ie,Re,Re,Ie]+"\\)$"),qe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function He(){return this.rgb().formatHex()}function We(){return this.rgb().formatRgb()}function Ve(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Fe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ge(e):3===n?new Ke(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Xe(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Xe(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Pe.exec(t))?new Ke(e[1],e[2],e[3],1):(e=Ye.exec(t))?new Ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=je.exec(t))?Xe(e[1],e[2],e[3],e[4]):(e=Ue.exec(t))?Xe(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ze.exec(t))?nn(e[1],e[2]/100,e[3]/100,1):(e=$e.exec(t))?nn(e[1],e[2]/100,e[3]/100,e[4]):qe.hasOwnProperty(t)?Ge(qe[t]):"transparent"===t?new Ke(NaN,NaN,NaN,0):null}function Ge(t){return new Ke(t>>16&255,t>>8&255,255&t,1)}function Xe(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ke(t,e,n,r)}function Ze(t){return t instanceof De||(t=Ve(t)),t?new Ke((t=t.rgb()).r,t.g,t.b,t.opacity):new Ke}function Qe(t,e,n,r){return 1===arguments.length?Ze(t):new Ke(t,e,n,null==r?1:r)}function Ke(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Je(){return"#"+en(this.r)+en(this.g)+en(this.b)}function tn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function en(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function nn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new on(t,e,n,r)}function rn(t){if(t instanceof on)return new on(t.h,t.s,t.l,t.opacity);if(t instanceof De||(t=Ve(t)),!t)return new on;if(t instanceof on)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new on(o,s,c,t.opacity)}function an(t,e,n,r){return 1===arguments.length?rn(t):new on(t,e,n,null==r?1:r)}function on(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function sn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function cn(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}function un(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return cn((n-r/e)*e,o,i,a,s)}}function ln(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return cn((n-r/e)*e,i,a,o,s)}}function hn(t){return function(){return t}}function fn(t,e){return function(n){return t+n*e}}function dn(t,e){var n=e-t;return n?fn(t,n>180||n<-180?n-360*Math.round(n/360):n):hn(isNaN(t)?e:t)}function pn(t,e){var n=e-t;return n?fn(t,n):hn(isNaN(t)?e:t)}Me(De,Ve,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:He,formatHex:He,formatHsl:function(){return rn(this).formatHsl()},formatRgb:We,toString:We}),Me(Ke,Qe,Ne(De,{brighter:function(t){return t=null==t?Le:Math.pow(Le,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Be:Math.pow(Be,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Je,formatHex:Je,formatRgb:tn,toString:tn})),Me(on,an,Ne(De,{brighter:function(t){return t=null==t?Le:Math.pow(Le,t),new on(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Be:Math.pow(Be,t),new on(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ke(sn(t>=240?t-240:t+120,i,r),sn(t,i,r),sn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const gn=function t(e){var n=function(t){return 1==(t=+t)?pn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):hn(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=Qe(t)).r,(e=Qe(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=pn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function yn(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=Qe(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}var mn=yn(un),vn=yn(ln);function bn(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function _n(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function xn(t,e){return(_n(e)?bn:wn)(t,e)}function wn(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=Mn(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function kn(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Tn(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Cn(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=Mn(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var En=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Sn=new RegExp(En.source,"g");function An(t,e){var n,r,i,a=En.lastIndex=Sn.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=En.exec(t))&&(r=Sn.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:Tn(n,r)})),a=Sn.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function Mn(t,e){var n,r=typeof e;return null==e||"boolean"===r?hn(e):("number"===r?Tn:"string"===r?(n=Ve(e))?(e=n,gn):An:e instanceof Ve?gn:e instanceof Date?kn:_n(e)?bn:Array.isArray(e)?wn:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Cn:Tn)(t,e)}function Nn(){for(var t,e=le;t=e.sourceEvent;)e=t;return e}function Dn(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}function Bn(t,e,n){arguments.length<3&&(n=e,e=Nn().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return Dn(t,r);return null}function Ln(t){var e=Nn();return e.changedTouches&&(e=e.changedTouches[0]),Dn(t,e)}var On,In,Rn=0,Fn=0,Pn=0,Yn=0,jn=0,Un=0,zn="object"==typeof performance&&performance.now?performance:Date,$n="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function qn(){return jn||($n(Hn),jn=zn.now()+Un)}function Hn(){jn=0}function Wn(){this._call=this._time=this._next=null}function Vn(t,e,n){var r=new Wn;return r.restart(t,e,n),r}function Gn(){qn(),++Rn;for(var t,e=On;e;)(t=jn-e._time)>=0&&e._call.call(null,t),e=e._next;--Rn}function Xn(){jn=(Yn=zn.now())+Un,Rn=Fn=0;try{Gn()}finally{Rn=0,function(){for(var t,e,n=On,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:On=e);In=t,Qn(r)}(),jn=0}}function Zn(){var t=zn.now(),e=t-Yn;e>1e3&&(Un-=e,Yn=t)}function Qn(t){Rn||(Fn&&(Fn=clearTimeout(Fn)),t-jn>24?(t<1/0&&(Fn=setTimeout(Xn,t-zn.now()-Un)),Pn&&(Pn=clearInterval(Pn))):(Pn||(Yn=zn.now(),Pn=setInterval(Zn,1e3)),Rn=1,$n(Xn)))}function Kn(t,e,n){var r=new Wn;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Wn.prototype=Vn.prototype={constructor:Wn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?qn():+n)+(null==e?0:+e),this._next||In===this||(In?In._next=this:On=this,In=this),this._call=t,this._time=n,Qn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qn())}};var Jn=ft("start","end","cancel","interrupt"),tr=[];function er(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(c){var u,l,h,f;if(1!==n.state)return s();for(u in i)if((f=i[u]).name===n.name){if(3===f.state)return Kn(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+u<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[u])}if(Kn((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,l=-1;u<h;++u)(f=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Vn((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Jn,tween:tr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function nr(t,e){var n=ir(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function rr(t,e){var n=ir(t,e);if(n.state>3)throw new Error("too late; already running");return n}function ir(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ar(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}var or,sr,cr,ur,lr=180/Math.PI,hr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fr(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*lr,skewX:Math.atan(c)*lr,scaleX:o,scaleY:s}}function dr(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:Tn(t,i)},{i:c-2,x:Tn(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Tn(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Tn(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Tn(t,n)},{i:s-2,x:Tn(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var pr=dr((function(t){return"none"===t?hr:(or||(or=document.createElement("DIV"),sr=document.documentElement,cr=document.defaultView),or.style.transform=t,t=cr.getComputedStyle(sr.appendChild(or),null).getPropertyValue("transform"),sr.removeChild(or),fr(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),gr=dr((function(t){return null==t?hr:(ur||(ur=document.createElementNS("http://www.w3.org/2000/svg","g")),ur.setAttribute("transform",t),(t=ur.transform.baseVal.consolidate())?fr((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):hr)}),", ",")",")");function yr(t,e){var n,r;return function(){var i=rr(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function mr(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=rr(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}a.tween=i}}function vr(t,e,n){var r=t._id;return t.each((function(){var t=rr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return ir(t,r).value[e]}}function br(t,e){var n;return("number"==typeof e?Tn:e instanceof Ve?gn:(n=Ve(e))?(e=n,gn):An)(t,e)}function _r(t){return function(){this.removeAttribute(t)}}function xr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function wr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function kr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function Tr(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function Cr(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function Er(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Sr(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Ar(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Sr(t,i)),n}return i._value=e,i}function Mr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Er(t,i)),n}return i._value=e,i}function Nr(t,e){return function(){nr(this,t).delay=+e.apply(this,arguments)}}function Dr(t,e){return e=+e,function(){nr(this,t).delay=e}}function Br(t,e){return function(){rr(this,t).duration=+e.apply(this,arguments)}}function Lr(t,e){return e=+e,function(){rr(this,t).duration=e}}function Or(t,e){if("function"!=typeof e)throw new Error;return function(){rr(this,t).ease=e}}function Ir(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?nr:rr;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Rr=ke.prototype.constructor;function Fr(t){return function(){this.style.removeProperty(t)}}function Pr(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Yr(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Pr(t,a,n)),r}return a._value=e,a}function jr(t){return function(e){this.textContent=t.call(this,e)}}function Ur(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&jr(r)),e}return r._value=t,r}var zr=0;function $r(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function qr(t){return ke().transition(t)}function Hr(){return++zr}var Wr=ke.prototype;function Vr(t){return t*t*t}function Gr(t){return--t*t*t+1}function Xr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}$r.prototype=qr.prototype={constructor:$r,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=pt(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,u=r[o],l=u.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=u[f])&&(c=t.call(s,s.__data__,f,u))&&("__data__"in s&&(c.__data__=s.__data__),h[f]=c,er(h[f],e,n,f,h,ir(s,n)));return new $r(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=yt(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,u=r[s],l=u.length,h=0;h<l;++h)if(c=u[h]){for(var f,d=t.call(c,c.__data__,h,u),p=ir(c,n),g=0,y=d.length;g<y;++g)(f=d[g])&&er(f,e,n,g,d,p);a.push(d),o.push(c)}return new $r(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=mt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new $r(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new $r(o,this._parents,this._name,this._id)},selection:function(){return new Rr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Hr(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)if(o=s[u]){var l=ir(o,e);er(o,t,n,u,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new $r(r,this._parents,t,n)},call:Wr.call,nodes:Wr.nodes,node:Wr.node,size:Wr.size,empty:Wr.empty,each:Wr.each,on:function(t,e){var n=this._id;return arguments.length<2?ir(this.node(),n).on.on(t):this.each(Ir(n,t,e))},attr:function(t,e){var n=Ct(t),r="transform"===n?gr:br;return this.attrTween(t,"function"==typeof e?(n.local?Cr:Tr)(n,r,vr(this,"attr."+t,e)):null==e?(n.local?xr:_r)(n):(n.local?kr:wr)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Ct(t);return this.tween(n,(r.local?Ar:Mr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?pr:br;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Rt(this,t),o=(this.style.removeProperty(t),Rt(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Fr(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Rt(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=Rt(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,vr(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=rr(this,t),u=c.on,l=null==c.value[o]?a||(a=Fr(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(s,i=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Rt(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Yr(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(vr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Ur(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=ir(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?yr:mr)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Nr:Dr)(e,t)):ir(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Br:Lr)(e,t)):ir(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Or(e,t)):ir(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=rr(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e}))}))}};var Zr={time:null,delay:0,duration:250,ease:Xr};function Qr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Zr.time=qn(),Zr;return n}ke.prototype.interrupt=function(t){return this.each((function(){ar(this,t)}))},ke.prototype.transition=function(t){var e,n;t instanceof $r?(e=t._id,t=t._name):(e=Hr(),(n=Zr).time=qn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)(o=s[u])&&er(o,t,e,u,s,n||Qr(o,e));return new $r(r,this._parents,t,e)};var Kr=[null];function Jr(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+"",i)if((n=i[r]).state>1&&n.name===e)return new $r([[t]],Kr,e,+r);return null}function ti(t){return function(){return t}}function ei(t,e,n){this.target=t,this.type=e,this.selection=n}function ni(){le.stopImmediatePropagation()}function ri(){le.preventDefault(),le.stopImmediatePropagation()}var ii={name:"drag"},ai={name:"space"},oi={name:"handle"},si={name:"center"};function ci(t){return[+t[0],+t[1]]}function ui(t){return[ci(t[0]),ci(t[1])]}function li(t){return function(e){return Bn(e,le.touches,t)}}var hi={name:"x",handles:["w","e"].map(bi),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},fi={name:"y",handles:["n","s"].map(bi),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},di={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(bi),input:function(t){return null==t?null:ui(t)},output:function(t){return t}},pi={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},gi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},yi={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},mi={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},vi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function bi(t){return{type:t}}function _i(){return!le.ctrlKey&&!le.button}function xi(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function wi(){return navigator.maxTouchPoints||"ontouchstart"in this}function ki(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Ti(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Ci(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function Ei(){return Mi(hi)}function Si(){return Mi(fi)}function Ai(){return Mi(di)}function Mi(t){var e,n=xi,r=_i,i=wi,a=!0,o=ft("start","brush","end"),s=6;function c(e){var n=e.property("__brush",g).selectAll(".overlay").data([bi("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",pi.overlay).merge(n).each((function(){var t=ki(this).extent;Te(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([bi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",pi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return pi[t.type]})),e.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(i).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function u(){var t=Te(this),e=ki(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new h(t,e,n):r}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function f(){if((!e||le.touches)&&r.apply(this,arguments)){var n,i,o,s,c,h,f,d,p,g,y,m=this,v=le.target.__data__.type,b="selection"===(a&&le.metaKey?v="overlay":v)?ii:a&&le.altKey?si:oi,_=t===fi?null:mi[v],x=t===hi?null:vi[v],w=ki(m),k=w.extent,T=w.selection,C=k[0][0],E=k[0][1],S=k[1][0],A=k[1][1],M=0,N=0,D=_&&x&&a&&le.shiftKey,B=le.touches?li(le.changedTouches[0].identifier):Ln,L=B(m),O=L,I=l(m,arguments,!0).beforestart();"overlay"===v?(T&&(p=!0),w.selection=T=[[n=t===fi?C:L[0],o=t===hi?E:L[1]],[c=t===fi?S:n,f=t===hi?A:o]]):(n=T[0][0],o=T[0][1],c=T[1][0],f=T[1][1]),i=n,s=o,h=c,d=f;var R=Te(m).attr("pointer-events","none"),F=R.selectAll(".overlay").attr("cursor",pi[v]);if(le.touches)I.moved=Y,I.ended=U;else{var P=Te(le.view).on("mousemove.brush",Y,!0).on("mouseup.brush",U,!0);a&&P.on("keydown.brush",z,!0).on("keyup.brush",$,!0),Se(le.view)}ni(),ar(m),u.call(m),I.start()}function Y(){var t=B(m);!D||g||y||(Math.abs(t[0]-O[0])>Math.abs(t[1]-O[1])?y=!0:g=!0),O=t,p=!0,ri(),j()}function j(){var t;switch(M=O[0]-L[0],N=O[1]-L[1],b){case ai:case ii:_&&(M=Math.max(C-n,Math.min(S-c,M)),i=n+M,h=c+M),x&&(N=Math.max(E-o,Math.min(A-f,N)),s=o+N,d=f+N);break;case oi:_<0?(M=Math.max(C-n,Math.min(S-n,M)),i=n+M,h=c):_>0&&(M=Math.max(C-c,Math.min(S-c,M)),i=n,h=c+M),x<0?(N=Math.max(E-o,Math.min(A-o,N)),s=o+N,d=f):x>0&&(N=Math.max(E-f,Math.min(A-f,N)),s=o,d=f+N);break;case si:_&&(i=Math.max(C,Math.min(S,n-M*_)),h=Math.max(C,Math.min(S,c+M*_))),x&&(s=Math.max(E,Math.min(A,o-N*x)),d=Math.max(E,Math.min(A,f+N*x)))}h<i&&(_*=-1,t=n,n=c,c=t,t=i,i=h,h=t,v in gi&&F.attr("cursor",pi[v=gi[v]])),d<s&&(x*=-1,t=o,o=f,f=t,t=s,s=d,d=t,v in yi&&F.attr("cursor",pi[v=yi[v]])),w.selection&&(T=w.selection),g&&(i=T[0][0],h=T[1][0]),y&&(s=T[0][1],d=T[1][1]),T[0][0]===i&&T[0][1]===s&&T[1][0]===h&&T[1][1]===d||(w.selection=[[i,s],[h,d]],u.call(m),I.brush())}function U(){if(ni(),le.touches){if(le.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else Ae(le.view,p),P.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);R.attr("pointer-events","all"),F.attr("cursor",pi.overlay),w.selection&&(T=w.selection),Ti(T)&&(w.selection=null,u.call(m)),I.end()}function z(){switch(le.keyCode){case 16:D=_&&x;break;case 18:b===oi&&(_&&(c=h-M*_,n=i+M*_),x&&(f=d-N*x,o=s+N*x),b=si,j());break;case 32:b!==oi&&b!==si||(_<0?c=h-M:_>0&&(n=i-M),x<0?f=d-N:x>0&&(o=s-N),b=ai,F.attr("cursor",pi.selection),j());break;default:return}ri()}function $(){switch(le.keyCode){case 16:D&&(g=y=D=!1,j());break;case 18:b===si&&(_<0?c=h:_>0&&(n=i),x<0?f=d:x>0&&(o=s),b=oi,j());break;case 32:b===ai&&(le.altKey?(_&&(c=h-M*_,n=i+M*_),x&&(f=d-N*x,o=s+N*x),b=si):(_<0?c=h:_>0&&(n=i),x<0?f=d:x>0&&(o=s),b=oi),F.attr("cursor",pi[v]),j());break;default:return}ri()}}function d(){l(this,arguments).moved()}function p(){l(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=ui(n.apply(this,arguments)),e.dim=t,e}return c.move=function(e,n){e.selection?e.on("start.brush",(function(){l(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){l(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=l(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=Mn(a,o);function c(t){r.selection=1===t&&null===o?null:s(t),u.call(e),i.brush()}return null!==a&&null!==o?c:c(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,a=t.input("function"==typeof n?n.apply(e,r):n,i.extent),o=l(e,r).beforestart();ar(e),i.selection=null===a?null:a,u.call(e),o.start().brush().end()}))},c.clear=function(t){c.move(t,null)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){ye(new ei(c,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},c.extent=function(t){return arguments.length?(n="function"==typeof t?t:ti(ui(t)),c):n},c.filter=function(t){return arguments.length?(r="function"==typeof t?t:ti(!!t),c):r},c.touchable=function(t){return arguments.length?(i="function"==typeof t?t:ti(!!t),c):i},c.handleSize=function(t){return arguments.length?(s=+t,c):s},c.keyModifiers=function(t){return arguments.length?(a=!!t,c):a},c.on=function(){var t=o.on.apply(o,arguments);return t===o?c:t},c}var Ni=Math.cos,Di=Math.sin,Bi=Math.PI,Li=Bi/2,Oi=2*Bi,Ii=Math.max;function Ri(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function Fi(){var t=0,e=null,n=null,r=null;function i(i){var a,o,s,c,u,l,h=i.length,f=[],d=k(h),p=[],g=[],y=g.groups=new Array(h),m=new Array(h*h);for(a=0,u=-1;++u<h;){for(o=0,l=-1;++l<h;)o+=i[u][l];f.push(o),p.push(k(h)),a+=o}for(e&&d.sort((function(t,n){return e(f[t],f[n])})),n&&p.forEach((function(t,e){t.sort((function(t,r){return n(i[e][t],i[e][r])}))})),c=(a=Ii(0,Oi-t*h)/a)?t:Oi/h,o=0,u=-1;++u<h;){for(s=o,l=-1;++l<h;){var v=d[u],b=p[v][l],_=i[v][b],x=o,w=o+=_*a;m[b*h+v]={index:v,subindex:b,startAngle:x,endAngle:w,value:_}}y[v]={index:v,startAngle:s,endAngle:o,value:f[v]},o+=c}for(u=-1;++u<h;)for(l=u-1;++l<h;){var T=m[l*h+u],C=m[u*h+l];(T.value||C.value)&&g.push(T.value<C.value?{source:C,target:T}:{source:T,target:C})}return r?g.sort(r):g}return i.padAngle=function(e){return arguments.length?(t=Ii(0,e),i):t},i.sortGroups=function(t){return arguments.length?(e=t,i):e},i.sortSubgroups=function(t){return arguments.length?(n=t,i):n},i.sortChords=function(t){return arguments.length?(null==t?r=null:(r=Ri(t))._=t,i):r&&r._},i}var Pi=Array.prototype.slice;function Yi(t){return function(){return t}}var ji=Math.PI,Ui=2*ji,zi=1e-6,$i=Ui-zi;function qi(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Hi(){return new qi}qi.prototype=Hi.prototype={constructor:qi,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,c=r-e,u=a-t,l=o-e,h=u*u+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>zi)if(Math.abs(l*s-c*u)>zi&&i){var f=n-a,d=r-o,p=s*s+c*c,g=f*f+d*d,y=Math.sqrt(p),m=Math.sqrt(h),v=i*Math.tan((ji-Math.acos((p+h-g)/(2*y*m)))/2),b=v/m,_=v/y;Math.abs(b-1)>zi&&(this._+="L"+(t+b*u)+","+(e+b*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>u*d)+","+(this._x1=t+_*s)+","+(this._y1=e+_*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),c=t+o,u=e+s,l=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+u:(Math.abs(this._x1-c)>zi||Math.abs(this._y1-u)>zi)&&(this._+="L"+c+","+u),n&&(h<0&&(h=h%Ui+Ui),h>$i?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=c)+","+(this._y1=u):h>zi&&(this._+="A"+n+","+n+",0,"+ +(h>=ji)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const Wi=Hi;function Vi(t){return t.source}function Gi(t){return t.target}function Xi(t){return t.radius}function Zi(t){return t.startAngle}function Qi(t){return t.endAngle}function Ki(){var t=Vi,e=Gi,n=Xi,r=Zi,i=Qi,a=null;function o(){var o,s=Pi.call(arguments),c=t.apply(this,s),u=e.apply(this,s),l=+n.apply(this,(s[0]=c,s)),h=r.apply(this,s)-Li,f=i.apply(this,s)-Li,d=l*Ni(h),p=l*Di(h),g=+n.apply(this,(s[0]=u,s)),y=r.apply(this,s)-Li,m=i.apply(this,s)-Li;if(a||(a=o=Wi()),a.moveTo(d,p),a.arc(0,0,l,h,f),h===y&&f===m||(a.quadraticCurveTo(0,0,g*Ni(y),g*Di(y)),a.arc(0,0,g,y,m)),a.quadraticCurveTo(0,0,d,p),a.closePath(),o)return a=null,o+""||null}return o.radius=function(t){return arguments.length?(n="function"==typeof t?t:Yi(+t),o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Yi(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Yi(+t),o):i},o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(t){return arguments.length?(e=t,o):e},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}var Ji="$";function ta(){}function ea(t,e){var n=new ta;if(t instanceof ta)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}ta.prototype=ea.prototype={constructor:ta,has:function(t){return Ji+t in this},get:function(t){return this[Ji+t]},set:function(t,e){return this[Ji+t]=e,this},remove:function(t){var e=Ji+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===Ji&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===Ji&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===Ji&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===Ji&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===Ji&&++t;return t},empty:function(){for(var t in this)if(t[0]===Ji)return!1;return!0},each:function(t){for(var e in this)e[0]===Ji&&t(this[e],e.slice(1),this)}};const na=ea;function ra(){var t,e,n,r=[],i=[];function a(n,i,o,s){if(i>=r.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var c,u,l,h=-1,f=n.length,d=r[i++],p=na(),g=o();++h<f;)(l=p.get(c=d(u=n[h])+""))?l.push(u):p.set(c,[u]);return p.each((function(t,e){s(g,e,a(t,i,o,s))})),g}function o(t,n){if(++n>r.length)return t;var a,s=i[n-1];return null!=e&&n>=r.length?a=t.entries():(a=[],t.each((function(t,e){a.push({key:e,values:o(t,n)})}))),null!=s?a.sort((function(t,e){return s(t.key,e.key)})):a}return n={object:function(t){return a(t,0,ia,aa)},map:function(t){return a(t,0,oa,sa)},entries:function(t){return o(a(t,0,oa,sa),0)},key:function(t){return r.push(t),n},sortKeys:function(t){return i[r.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}}function ia(){return{}}function aa(t,e,n){t[e]=n}function oa(){return na()}function sa(t,e,n){t.set(e,n)}function ca(){}var ua=na.prototype;function la(t,e){var n=new ca;if(t instanceof ca)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}ca.prototype=la.prototype={constructor:ca,has:ua.has,add:function(t){return this[Ji+(t+="")]=t,this},remove:ua.remove,clear:ua.clear,values:ua.keys,size:ua.size,empty:ua.empty,each:ua.each};const ha=la;function fa(t){var e=[];for(var n in t)e.push(n);return e}function da(t){var e=[];for(var n in t)e.push(t[n]);return e}function pa(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e}var ga=Math.PI/180,ya=180/Math.PI,ma=.96422,va=.82521,ba=4/29,_a=6/29,xa=3*_a*_a;function wa(t){if(t instanceof Ca)return new Ca(t.l,t.a,t.b,t.opacity);if(t instanceof La)return Oa(t);t instanceof Ke||(t=Ze(t));var e,n,r=Ma(t.r),i=Ma(t.g),a=Ma(t.b),o=Ea((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=Ea((.4360747*r+.3850649*i+.1430804*a)/ma),n=Ea((.0139322*r+.0971045*i+.7141733*a)/va)),new Ca(116*o-16,500*(e-o),200*(o-n),t.opacity)}function ka(t,e){return new Ca(t,0,0,null==e?1:e)}function Ta(t,e,n,r){return 1===arguments.length?wa(t):new Ca(t,e,n,null==r?1:r)}function Ca(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Ea(t){return t>.008856451679035631?Math.pow(t,1/3):t/xa+ba}function Sa(t){return t>_a?t*t*t:xa*(t-ba)}function Aa(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ma(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Na(t){if(t instanceof La)return new La(t.h,t.c,t.l,t.opacity);if(t instanceof Ca||(t=wa(t)),0===t.a&&0===t.b)return new La(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*ya;return new La(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Da(t,e,n,r){return 1===arguments.length?Na(t):new La(n,e,t,null==r?1:r)}function Ba(t,e,n,r){return 1===arguments.length?Na(t):new La(t,e,n,null==r?1:r)}function La(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Oa(t){if(isNaN(t.h))return new Ca(t.l,0,0,t.opacity);var e=t.h*ga;return new Ca(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Me(Ca,Ta,Ne(De,{brighter:function(t){return new Ca(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Ca(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Ke(Aa(3.1338561*(e=ma*Sa(e))-1.6168667*(t=1*Sa(t))-.4906146*(n=va*Sa(n))),Aa(-.9787684*e+1.9161415*t+.033454*n),Aa(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Me(La,Ba,Ne(De,{brighter:function(t){return new La(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new La(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Oa(this).rgb()}}));var Ia=-.14861,Ra=1.78277,Fa=-.29227,Pa=-.90649,Ya=1.97294,ja=Ya*Pa,Ua=Ya*Ra,za=Ra*Fa-Pa*Ia;function $a(t){if(t instanceof Ha)return new Ha(t.h,t.s,t.l,t.opacity);t instanceof Ke||(t=Ze(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(za*r+ja*e-Ua*n)/(za+ja-Ua),a=r-i,o=(Ya*(n-i)-Fa*a)/Pa,s=Math.sqrt(o*o+a*a)/(Ya*i*(1-i)),c=s?Math.atan2(o,a)*ya-120:NaN;return new Ha(c<0?c+360:c,s,i,t.opacity)}function qa(t,e,n,r){return 1===arguments.length?$a(t):new Ha(t,e,n,null==r?1:r)}function Ha(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Me(Ha,qa,Ne(De,{brighter:function(t){return t=null==t?Le:Math.pow(Le,t),new Ha(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Be:Math.pow(Be,t),new Ha(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*ga,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Ke(255*(e+n*(Ia*r+Ra*i)),255*(e+n*(Fa*r+Pa*i)),255*(e+n*(Ya*r)),this.opacity)}}));var Wa=Array.prototype.slice;function Va(t,e){return t-e}function Ga(t){return function(){return t}}function Xa(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=Za(t,e[r]))return n;return 0}function Za(t,e){for(var n=e[0],r=e[1],i=-1,a=0,o=t.length,s=o-1;a<o;s=a++){var c=t[a],u=c[0],l=c[1],h=t[s],f=h[0],d=h[1];if(Qa(c,h,e))return 0;l>r!=d>r&&n<(f-u)*(r-l)/(d-l)+u&&(i=-i)}return i}function Qa(t,e,n){var r,i,a,o;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],a=n[r],o=e[r],i<=a&&a<=o||o<=a&&a<=i)}function Ka(){}var Ja=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function to(){var t=1,e=1,n=N,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Va);else{var r=m(t),i=r[0],o=r[1];e=M(i,o,e),e=k(Math.floor(i/e)*e,Math.floor(o/e)*e,e)}return e.map((function(e){return a(t,e)}))}function a(n,i){var a=[],s=[];return function(n,r,i){var a,s,c,u,l,h,f=new Array,d=new Array;for(a=s=-1,u=n[0]>=r,Ja[u<<1].forEach(p);++a<t-1;)c=u,u=n[a+1]>=r,Ja[c|u<<1].forEach(p);for(Ja[u<<0].forEach(p);++s<e-1;){for(a=-1,u=n[s*t+t]>=r,l=n[s*t]>=r,Ja[u<<1|l<<2].forEach(p);++a<t-1;)c=u,u=n[s*t+t+a+1]>=r,h=l,l=n[s*t+a+1]>=r,Ja[c|u<<1|l<<2|h<<3].forEach(p);Ja[u|l<<3].forEach(p)}for(a=-1,l=n[s*t]>=r,Ja[l<<2].forEach(p);++a<t-1;)h=l,l=n[s*t+a+1]>=r,Ja[l<<2|h<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+a,t[0][1]+s],c=[t[1][0]+a,t[1][1]+s],u=o(r),l=o(c);(e=d[u])?(n=f[l])?(delete d[e.end],delete f[n.start],e===n?(e.ring.push(c),i(e.ring)):f[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete d[e.end],e.ring.push(c),d[e.end=l]=e):(e=f[l])?(n=d[u])?(delete f[e.start],delete d[n.end],e===n?(e.ring.push(c),i(e.ring)):f[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete f[e.start],e.ring.unshift(r),f[e.start=u]=e):f[u]=d[l]={start:u,end:l,ring:[r,c]}}Ja[l<<3].forEach(p)}(n,i,(function(t){r(t,n,i),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?a.push([t]):s.push(t)})),s.forEach((function(t){for(var e,n=0,r=a.length;n<r;++n)if(-1!==Xa((e=a[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:i,coordinates:a}}function o(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,i){n.forEach((function(n){var a,o=n[0],s=n[1],c=0|o,u=0|s,l=r[u*t+c];o>0&&o<t&&c===o&&(a=r[u*t+c-1],n[0]=o+(i-a)/(l-a)-.5),s>0&&s<e&&u===s&&(a=r[(u-1)*t+c],n[1]=s+(i-a)/(l-a)-.5)}))}return i.contour=a,i.size=function(n){if(!arguments.length)return[t,e];var r=Math.ceil(n[0]),a=Math.ceil(n[1]);if(!(r>0&&a>0))throw new Error("invalid size");return t=r,e=a,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Ga(Wa.call(t)):Ga(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:Ka,i):r===s},i}function eo(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<i;++o)for(var s=0,c=0;s<r+n;++s)s<r&&(c+=t.data[s+o*r]),s>=n&&(s>=a&&(c-=t.data[s-a+o*r]),e.data[s-n+o*r]=c/Math.min(s+1,r-1+a-s,a))}function no(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<r;++o)for(var s=0,c=0;s<i+n;++s)s<i&&(c+=t.data[o+s*r]),s>=n&&(s>=a&&(c-=t.data[o+(s-a)*r]),e.data[o+(s-n)*r]=c/Math.min(s+1,i-1+a-s,a))}function ro(t){return t[0]}function io(t){return t[1]}function ao(){return 1}function oo(){var t=ro,e=io,n=ao,r=960,i=500,a=20,o=2,s=3*a,c=r+2*s>>o,u=i+2*s>>o,l=Ga(20);function h(r){var i=new Float32Array(c*u),h=new Float32Array(c*u);r.forEach((function(r,a,l){var h=+t(r,a,l)+s>>o,f=+e(r,a,l)+s>>o,d=+n(r,a,l);h>=0&&h<c&&f>=0&&f<u&&(i[h+f*c]+=d)})),eo({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),no({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o),eo({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),no({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o),eo({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),no({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o);var d=l(i);if(!Array.isArray(d)){var p=I(i);d=M(0,p,d),(d=k(0,Math.floor(p/d)*d,d)).shift()}return to().thresholds(d).size([c,u])(i).map(f)}function f(t){return t.value*=Math.pow(2,-2*o),t.coordinates.forEach(d),t}function d(t){t.forEach(p)}function p(t){t.forEach(g)}function g(t){t[0]=t[0]*Math.pow(2,o)-s,t[1]=t[1]*Math.pow(2,o)-s}function y(){return c=r+2*(s=3*a)>>o,u=i+2*s>>o,h}return h.x=function(e){return arguments.length?(t="function"==typeof e?e:Ga(+e),h):t},h.y=function(t){return arguments.length?(e="function"==typeof t?t:Ga(+t),h):e},h.weight=function(t){return arguments.length?(n="function"==typeof t?t:Ga(+t),h):n},h.size=function(t){if(!arguments.length)return[r,i];var e=Math.ceil(t[0]),n=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return r=e,i=n,y()},h.cellSize=function(t){if(!arguments.length)return 1<<o;if(!((t=+t)>=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(t)/Math.LN2),y()},h.thresholds=function(t){return arguments.length?(l="function"==typeof t?t:Array.isArray(t)?Ga(Wa.call(t)):Ga(t),h):l},h.bandwidth=function(t){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return a=Math.round((Math.sqrt(4*t*t+1)-1)/2),y()},h}function so(t){return function(){return t}}function co(t,e,n,r,i,a,o,s,c,u){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=a,this.y=o,this.dx=s,this.dy=c,this._=u}function uo(){return!le.ctrlKey&&!le.button}function lo(){return this.parentNode}function ho(t){return null==t?{x:le.x,y:le.y}:t}function fo(){return navigator.maxTouchPoints||"ontouchstart"in this}function po(){var t,e,n,r,i=uo,a=lo,o=ho,s=fo,c={},u=ft("start","drag","end"),l=0,h=0;function f(t){t.on("mousedown.drag",d).filter(s).on("touchstart.drag",y).on("touchmove.drag",m).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(){if(!r&&i.apply(this,arguments)){var o=b("mouse",a.apply(this,arguments),Ln,this,arguments);o&&(Te(le.view).on("mousemove.drag",p,!0).on("mouseup.drag",g,!0),Se(le.view),Ce(),n=!1,t=le.clientX,e=le.clientY,o("start"))}}function p(){if(Ee(),!n){var r=le.clientX-t,i=le.clientY-e;n=r*r+i*i>h}c.mouse("drag")}function g(){Te(le.view).on("mousemove.drag mouseup.drag",null),Ae(le.view,n),Ee(),c.mouse("end")}function y(){if(i.apply(this,arguments)){var t,e,n=le.changedTouches,r=a.apply(this,arguments),o=n.length;for(t=0;t<o;++t)(e=b(n[t].identifier,r,Bn,this,arguments))&&(Ce(),e("start"))}}function m(){var t,e,n=le.changedTouches,r=n.length;for(t=0;t<r;++t)(e=c[n[t].identifier])&&(Ee(),e("drag"))}function v(){var t,e,n=le.changedTouches,i=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(e=c[n[t].identifier])&&(Ce(),e("end"))}function b(t,e,n,r,i){var a,s,h,d=n(e,t),p=u.copy();if(ye(new co(f,"beforestart",a,t,l,d[0],d[1],0,0,p),(function(){return null!=(le.subject=a=o.apply(r,i))&&(s=a.x-d[0]||0,h=a.y-d[1]||0,!0)})))return function o(u){var g,y=d;switch(u){case"start":c[t]=o,g=l++;break;case"end":delete c[t],--l;case"drag":d=n(e,t),g=l}ye(new co(f,u,a,t,g,d[0]+s,d[1]+h,d[0]-y[0],d[1]-y[1],p),p.apply,p,[u,r,i])}}return f.filter=function(t){return arguments.length?(i="function"==typeof t?t:so(!!t),f):i},f.container=function(t){return arguments.length?(a="function"==typeof t?t:so(t),f):a},f.subject=function(t){return arguments.length?(o="function"==typeof t?t:so(t),f):o},f.touchable=function(t){return arguments.length?(s="function"==typeof t?t:so(!!t),f):s},f.on=function(){var t=u.on.apply(u,arguments);return t===u?f:t},f.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,f):Math.sqrt(h)},f}co.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var go={},yo={};function mo(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function vo(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function bo(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function _o(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,s=0,c=a<=0,u=!1;function l(){if(c)return yo;if(u)return u=!1,go;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?c=!0:10===(r=t.charCodeAt(o++))?u=!0:13===r&&(u=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))u=!0;else if(13===r)u=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return c=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=l())!==yo;){for(var h=[];r!==go&&r!==yo;)h.push(r),r=l();e&&null==(h=e(h,s++))||i.push(h)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?function(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":function(t){return t<0?"-"+bo(-t,6):t>9999?"+"+bo(t,6):bo(t,4)}(t.getUTCFullYear())+"-"+bo(t.getUTCMonth()+1,2)+"-"+bo(t.getUTCDate(),2)+(i?"T"+bo(e,2)+":"+bo(n,2)+":"+bo(r,2)+"."+bo(i,3)+"Z":r?"T"+bo(e,2)+":"+bo(n,2)+":"+bo(r,2)+"Z":n||e?"T"+bo(e,2)+":"+bo(n,2)+"Z":"")}(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=mo(t);return function(r,i){return e(n(r),i,t)}}(t,e):mo(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=vo(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=vo(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}var xo=_o(","),wo=xo.parse,ko=xo.parseRows,To=xo.format,Co=xo.formatBody,Eo=xo.formatRows,So=xo.formatRow,Ao=xo.formatValue,Mo=_o("\t"),No=Mo.parse,Do=Mo.parseRows,Bo=Mo.format,Lo=Mo.formatBody,Oo=Mo.formatRows,Io=Mo.formatRow,Ro=Mo.formatValue;function Fo(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;Po&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}var Po=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function Yo(t){return+t}function jo(t){return t*t}function Uo(t){return t*(2-t)}function zo(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var $o=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),qo=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),Ho=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Wo=Math.PI,Vo=Wo/2;function Go(t){return 1==+t?1:1-Math.cos(t*Vo)}function Xo(t){return Math.sin(t*Vo)}function Zo(t){return(1-Math.cos(Wo*t))/2}function Qo(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Ko(t){return Qo(1-+t)}function Jo(t){return 1-Qo(t)}function ts(t){return((t*=2)<=1?Qo(1-t):2-Qo(t-1))/2}function es(t){return 1-Math.sqrt(1-t*t)}function ns(t){return Math.sqrt(1- --t*t)}function rs(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var is=7.5625;function as(t){return 1-os(1-t)}function os(t){return(t=+t)<.36363636363636365?is*t*t:t<.7272727272727273?is*(t-=.5454545454545454)*t+.75:t<.9090909090909091?is*(t-=.8181818181818182)*t+.9375:is*(t-=.9545454545454546)*t+.984375}function ss(t){return((t*=2)<=1?1-os(1-t):os(t-1)+1)/2}var cs=1.70158,us=function t(e){function n(t){return(t=+t)*t*(e*(t-1)+t)}return e=+e,n.overshoot=t,n}(cs),ls=function t(e){function n(t){return--t*t*((t+1)*e+t)+1}return e=+e,n.overshoot=t,n}(cs),hs=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(cs),fs=2*Math.PI,ds=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=fs);function i(t){return e*Qo(- --t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*fs)},i.period=function(n){return t(e,n)},i}(1,.3),ps=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=fs);function i(t){return 1-e*Qo(t=+t)*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*fs)},i.period=function(n){return t(e,n)},i}(1,.3),gs=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=fs);function i(t){return((t=2*t-1)<0?e*Qo(-t)*Math.sin((r-t)/n):2-e*Qo(t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*fs)},i.period=function(n){return t(e,n)},i}(1,.3);function ys(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function ms(t,e){return fetch(t,e).then(ys)}function vs(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function bs(t,e){return fetch(t,e).then(vs)}function _s(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function xs(t,e){return fetch(t,e).then(_s)}function ws(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),xs(e,n).then((function(e){return t(e,r)}))}}function ks(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=_o(t);return xs(e,n).then((function(t){return i.parse(t,r)}))}var Ts=ws(wo),Cs=ws(No);function Es(t,e){return new Promise((function(n,r){var i=new Image;for(var a in e)i[a]=e[a];i.onerror=r,i.onload=function(){n(i)},i.src=t}))}function Ss(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function As(t,e){return fetch(t,e).then(Ss)}function Ms(t){return function(e,n){return xs(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}const Ns=Ms("application/xml");var Ds=Ms("text/html"),Bs=Ms("image/svg+xml");function Ls(t,e){var n;function r(){var r,i,a=n.length,o=0,s=0;for(r=0;r<a;++r)o+=(i=n[r]).x,s+=i.y;for(o=o/a-t,s=s/a-e,r=0;r<a;++r)(i=n[r]).x-=o,i.y-=s}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r}function Os(t){return function(){return t}}function Is(){return 1e-6*(Math.random()-.5)}function Rs(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,s,c,u,l,h,f,d=t._root,p={data:r},g=t._x0,y=t._y0,m=t._x1,v=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((u=e>=(a=(g+m)/2))?g=a:m=a,(l=n>=(o=(y+v)/2))?y=o:v=o,i=d,!(d=d[h=l<<1|u]))return i[h]=p,t;if(s=+t._x.call(null,d.data),c=+t._y.call(null,d.data),e===s&&n===c)return p.next=d,i?i[h]=p:t._root=p,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(u=e>=(a=(g+m)/2))?g=a:m=a,(l=n>=(o=(y+v)/2))?y=o:v=o}while((h=l<<1|u)==(f=(c>=o)<<1|s>=a));return i[f]=d,i[h]=p,t}function Fs(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Ps(t){return t[0]}function Ys(t){return t[1]}function js(t,e,n){var r=new Us(null==e?Ps:e,null==n?Ys:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Us(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function zs(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var $s=js.prototype=Us.prototype;function qs(t){return t.x+t.vx}function Hs(t){return t.y+t.vy}function Ws(t){var e,n,r=1,i=1;function a(){for(var t,a,s,c,u,l,h,f=e.length,d=0;d<i;++d)for(a=js(e,qs,Hs).visitAfter(o),t=0;t<f;++t)s=e[t],l=n[s.index],h=l*l,c=s.x+s.vx,u=s.y+s.vy,a.visit(p);function p(t,e,n,i,a){var o=t.data,f=t.r,d=l+f;if(!o)return e>c+d||i<c-d||n>u+d||a<u-d;if(o.index>s.index){var p=c-o.x-o.vx,g=u-o.y-o.vy,y=p*p+g*g;y<d*d&&(0===p&&(y+=(p=Is())*p),0===g&&(y+=(g=Is())*g),y=(d-(y=Math.sqrt(y)))/y*r,s.vx+=(p*=y)*(d=(f*=f)/(h+f)),s.vy+=(g*=y)*d,o.vx-=p*(d=1-d),o.vy-=g*d)}}}function o(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function s(){if(e){var r,i,a=e.length;for(n=new Array(a),r=0;r<a;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=Os(null==t?1:+t)),a.initialize=function(t){e=t,s()},a.iterations=function(t){return arguments.length?(i=+t,a):i},a.strength=function(t){return arguments.length?(r=+t,a):r},a.radius=function(e){return arguments.length?(t="function"==typeof e?e:Os(+e),s(),a):t},a}function Vs(t){return t.index}function Gs(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function Xs(t){var e,n,r,i,a,o=Vs,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},c=Os(30),u=1;function l(r){for(var i=0,o=t.length;i<u;++i)for(var s,c,l,h,f,d,p,g=0;g<o;++g)c=(s=t[g]).source,h=(l=s.target).x+l.vx-c.x-c.vx||Is(),f=l.y+l.vy-c.y-c.vy||Is(),h*=d=((d=Math.sqrt(h*h+f*f))-n[g])/d*r*e[g],f*=d,l.vx-=h*(p=a[g]),l.vy-=f*p,c.vx+=h*(p=1-p),c.vy+=f*p}function h(){if(r){var s,c,u=r.length,l=t.length,h=na(r,o);for(s=0,i=new Array(u);s<l;++s)(c=t[s]).index=s,"object"!=typeof c.source&&(c.source=Gs(h,c.source)),"object"!=typeof c.target&&(c.target=Gs(h,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(s=0,a=new Array(l);s<l;++s)c=t[s],a[s]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);e=new Array(l),f(),n=new Array(l),d()}}function f(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+s(t[n],n,t)}function d(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+c(t[e],e,t)}return null==t&&(t=[]),l.initialize=function(t){r=t,h()},l.links=function(e){return arguments.length?(t=e,h(),l):t},l.id=function(t){return arguments.length?(o=t,l):o},l.iterations=function(t){return arguments.length?(u=+t,l):u},l.strength=function(t){return arguments.length?(s="function"==typeof t?t:Os(+t),f(),l):s},l.distance=function(t){return arguments.length?(c="function"==typeof t?t:Os(+t),d(),l):c},l}function Zs(t){return t.x}function Qs(t){return t.y}$s.copy=function(){var t,e,n=new Us(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=zs(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=zs(e));return n},$s.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Rs(this.cover(e,n),e,n,t)},$s.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),s=new Array(a),c=1/0,u=1/0,l=-1/0,h=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(o[n]=r,s[n]=i,r<c&&(c=r),r>l&&(l=r),i<u&&(u=i),i>h&&(h=i));if(c>l||u>h)return this;for(this.cover(c,u).cover(l,h),n=0;n<a;++n)Rs(this,o[n],s[n],t[n]);return this},$s.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,c=i-n,u=this._root;n>t||t>=i||r>e||e>=a;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=u,u=o,c*=2,s){case 0:i=n+c,a=r+c;break;case 1:n=i-c,a=r+c;break;case 2:i=n+c,r=a-c;break;case 3:n=i-c,r=a-c}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},$s.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},$s.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},$s.find=function(t,e,n){var r,i,a,o,s,c,u,l=this._x0,h=this._y0,f=this._x1,d=this._y1,p=[],g=this._root;for(g&&p.push(new Fs(g,l,h,f,d)),null==n?n=1/0:(l=t-n,h=e-n,f=t+n,d=e+n,n*=n);c=p.pop();)if(!(!(g=c.node)||(i=c.x0)>f||(a=c.y0)>d||(o=c.x1)<l||(s=c.y1)<h))if(g.length){var y=(i+o)/2,m=(a+s)/2;p.push(new Fs(g[3],y,m,o,s),new Fs(g[2],i,m,y,s),new Fs(g[1],y,a,o,m),new Fs(g[0],i,a,y,m)),(u=(e>=m)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-u],p[p.length-1-u]=c)}else{var v=t-+this._x.call(null,g.data),b=e-+this._y.call(null,g.data),_=v*v+b*b;if(_<n){var x=Math.sqrt(n=_);l=t-x,h=e-x,f=t+x,d=e+x,r=g.data}}return r},$s.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,s,c,u,l,h,f,d=this._root,p=this._x0,g=this._y0,y=this._x1,m=this._y1;if(!d)return this;if(d.length)for(;;){if((u=a>=(s=(p+y)/2))?p=s:y=s,(l=o>=(c=(g+m)/2))?g=c:m=c,e=d,!(d=d[h=l<<1|u]))return this;if(!d.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,f=h)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[h]=i:delete e[h],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[f]=d:this._root=d),this):(this._root=i,this)},$s.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},$s.root=function(){return this._root},$s.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},$s.visit=function(t){var e,n,r,i,a,o,s=[],c=this._root;for(c&&s.push(new Fs(c,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(c=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&c.length){var u=(r+a)/2,l=(i+o)/2;(n=c[3])&&s.push(new Fs(n,u,l,a,o)),(n=c[2])&&s.push(new Fs(n,r,l,u,o)),(n=c[1])&&s.push(new Fs(n,u,i,a,l)),(n=c[0])&&s.push(new Fs(n,r,i,u,l))}return this},$s.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Fs(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,s=e.y0,c=e.x1,u=e.y1,l=(o+c)/2,h=(s+u)/2;(a=i[0])&&n.push(new Fs(a,o,s,l,h)),(a=i[1])&&n.push(new Fs(a,l,s,c,h)),(a=i[2])&&n.push(new Fs(a,o,h,l,u)),(a=i[3])&&n.push(new Fs(a,l,h,c,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},$s.x=function(t){return arguments.length?(this._x=t,this):this._x},$s.y=function(t){return arguments.length?(this._y=t,this):this._y};var Ks=Math.PI*(3-Math.sqrt(5));function Js(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=na(),c=Vn(l),u=ft("tick","end");function l(){h(),u.call("tick",e),n<r&&(c.stop(),u.call("end",e))}function h(r){var c,u,l=t.length;void 0===r&&(r=1);for(var h=0;h<r;++h)for(n+=(a-n)*i,s.each((function(t){t(n)})),c=0;c<l;++c)null==(u=t[c]).fx?u.x+=u.vx*=o:(u.x=u.fx,u.vx=0),null==u.fy?u.y+=u.vy*=o:(u.y=u.fy,u.vy=0);return e}function f(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(n),a=n*Ks;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function d(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),f(),e={tick:h,restart:function(){return c.restart(l),e},stop:function(){return c.stop(),e},nodes:function(n){return arguments.length?(t=n,f(),s.each(d),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(a=+t,e):a},velocityDecay:function(t){return arguments.length?(o=1-t,e):1-o},force:function(t,n){return arguments.length>1?(null==n?s.remove(t):s.set(t,d(n)),e):s.get(t)},find:function(e,n,r){var i,a,o,s,c,u=0,l=t.length;for(null==r?r=1/0:r*=r,u=0;u<l;++u)(o=(i=e-(s=t[u]).x)*i+(a=n-s.y)*a)<r&&(c=s,r=o);return c},on:function(t,n){return arguments.length>1?(u.on(t,n),e):u.on(t)}}}function tc(){var t,e,n,r,i=Os(-30),a=1,o=1/0,s=.81;function c(r){var i,a=t.length,o=js(t,Zs,Qs).visitAfter(l);for(n=r,i=0;i<a;++i)e=t[i],o.visit(h)}function u(){if(t){var e,n,a=t.length;for(r=new Array(a),e=0;e<a;++e)n=t[e],r[n.index]=+i(n,e,t)}}function l(t){var e,n,i,a,o,s=0,c=0;if(t.length){for(i=a=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(s+=e.value,c+=n,i+=n*e.x,a+=n*e.y);t.x=i/c,t.y=a/c}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=r[e.data.index]}while(e=e.next)}t.value=s}function h(t,i,c,u){if(!t.value)return!0;var l=t.x-e.x,h=t.y-e.y,f=u-i,d=l*l+h*h;if(f*f/s<d)return d<o&&(0===l&&(d+=(l=Is())*l),0===h&&(d+=(h=Is())*h),d<a&&(d=Math.sqrt(a*d)),e.vx+=l*t.value*n/d,e.vy+=h*t.value*n/d),!0;if(!(t.length||d>=o)){(t.data!==e||t.next)&&(0===l&&(d+=(l=Is())*l),0===h&&(d+=(h=Is())*h),d<a&&(d=Math.sqrt(a*d)));do{t.data!==e&&(f=r[t.data.index]*n/d,e.vx+=l*f,e.vy+=h*f)}while(t=t.next)}}return c.initialize=function(e){t=e,u()},c.strength=function(t){return arguments.length?(i="function"==typeof t?t:Os(+t),u(),c):i},c.distanceMin=function(t){return arguments.length?(a=t*t,c):Math.sqrt(a)},c.distanceMax=function(t){return arguments.length?(o=t*t,c):Math.sqrt(o)},c.theta=function(t){return arguments.length?(s=t*t,c):Math.sqrt(s)},c}function ec(t,e,n){var r,i,a,o=Os(.1);function s(t){for(var o=0,s=r.length;o<s;++o){var c=r[o],u=c.x-e||1e-6,l=c.y-n||1e-6,h=Math.sqrt(u*u+l*l),f=(a[o]-h)*i[o]*t/h;c.vx+=u*f,c.vy+=l*f}}function c(){if(r){var e,n=r.length;for(i=new Array(n),a=new Array(n),e=0;e<n;++e)a[e]=+t(r[e],e,r),i[e]=isNaN(a[e])?0:+o(r[e],e,r)}}return"function"!=typeof t&&(t=Os(+t)),null==e&&(e=0),null==n&&(n=0),s.initialize=function(t){r=t,c()},s.strength=function(t){return arguments.length?(o="function"==typeof t?t:Os(+t),c(),s):o},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:Os(+e),c(),s):t},s.x=function(t){return arguments.length?(e=+t,s):e},s.y=function(t){return arguments.length?(n=+t,s):n},s}function nc(t){var e,n,r,i=Os(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vx+=(r[a]-i.x)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=Os(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:Os(+t),o(),a):i},a.x=function(e){return arguments.length?(t="function"==typeof e?e:Os(+e),o(),a):t},a}function rc(t){var e,n,r,i=Os(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vy+=(r[a]-i.y)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=Os(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:Os(+t),o(),a):i},a.y=function(e){return arguments.length?(t="function"==typeof e?e:Os(+e),o(),a):t},a}function ic(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function ac(t){return(t=ic(Math.abs(t)))?t[1]:NaN}var oc,sc=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function cc(t){if(!(e=sc.exec(t)))throw new Error("invalid format: "+t);var e;return new uc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function uc(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function lc(t,e){var n=ic(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}cc.prototype=uc.prototype,uc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const hc={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return lc(100*t,e)},r:lc,s:function(t,e){var n=ic(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(oc=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+ic(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function fc(t){return t}var dc,pc,gc,yc=Array.prototype.map,mc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function vc(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?fc:(e=yc.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(t.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?fc:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(yc.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=cc(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,y=t.precision,m=t.trim,v=t.type;"n"===v?(g=!0,v="g"):hc[v]||(void 0===y&&(y=12),m=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var b="$"===f?i:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",_="$"===f?a:/[%p]/.test(v)?c:"",x=hc[v],w=/[defgprs%]/.test(v);function k(t){var i,a,c,f=b,k=_;if("c"===v)k=x(t)+k,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:x(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==h&&(T=!1),f=(T?"("===h?h:u:"-"===h||"("===h?"":h)+f,k=("s"===v?mc[8+oc/3]:"")+k+(T&&"("===h?")":""),w)for(i=-1,a=t.length;++i<a;)if(48>(c=t.charCodeAt(i))||c>57){k=(46===c?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var C=f.length+t.length+k.length,E=C<p?new Array(p-C+1).join(e):"";switch(g&&d&&(t=r(E+t,E.length?p-k.length:1/0),E=""),n){case"<":t=f+t+k+E;break;case"=":t=f+E+t+k;break;case"^":t=E.slice(0,C=E.length>>1)+f+t+k+E.slice(C);break;default:t=E+f+t+k}return s(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=cc(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(ac(e)/3))),i=Math.pow(10,-r),a=mc[8+r/3];return function(t){return n(i*t)+a}}}}function bc(t){return dc=vc(t),pc=dc.format,gc=dc.formatPrefix,dc}function _c(t){return Math.max(0,-ac(Math.abs(t)))}function xc(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ac(e)/3)))-ac(Math.abs(t)))}function wc(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ac(e)-ac(t))+1}function kc(){return new Tc}function Tc(){this.reset()}bc({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Tc.prototype={constructor:Tc,reset:function(){this.s=this.t=0},add:function(t){Ec(Cc,t,this.t),Ec(this,Cc.s,this.s),this.s?this.t+=Cc.t:this.s=Cc.t},valueOf:function(){return this.s}};var Cc=new Tc;function Ec(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var Sc=1e-6,Ac=1e-12,Mc=Math.PI,Nc=Mc/2,Dc=Mc/4,Bc=2*Mc,Lc=180/Mc,Oc=Mc/180,Ic=Math.abs,Rc=Math.atan,Fc=Math.atan2,Pc=Math.cos,Yc=Math.ceil,jc=Math.exp,Uc=(Math.floor,Math.log),zc=Math.pow,$c=Math.sin,qc=Math.sign||function(t){return t>0?1:t<0?-1:0},Hc=Math.sqrt,Wc=Math.tan;function Vc(t){return t>1?0:t<-1?Mc:Math.acos(t)}function Gc(t){return t>1?Nc:t<-1?-Nc:Math.asin(t)}function Xc(t){return(t=$c(t/2))*t}function Zc(){}function Qc(t,e){t&&Jc.hasOwnProperty(t.type)&&Jc[t.type](t,e)}var Kc={Feature:function(t,e){Qc(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Qc(n[r].geometry,e)}},Jc={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){tu(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)tu(n[r],e,0)},Polygon:function(t,e){eu(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)eu(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Qc(n[r],e)}};function tu(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function eu(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)tu(t[n],e,1);e.polygonEnd()}function nu(t,e){t&&Kc.hasOwnProperty(t.type)?Kc[t.type](t,e):Qc(t,e)}var ru,iu,au,ou,su,cu=kc(),uu=kc(),lu={point:Zc,lineStart:Zc,lineEnd:Zc,polygonStart:function(){cu.reset(),lu.lineStart=hu,lu.lineEnd=fu},polygonEnd:function(){var t=+cu;uu.add(t<0?Bc+t:t),this.lineStart=this.lineEnd=this.point=Zc},sphere:function(){uu.add(Bc)}};function hu(){lu.point=du}function fu(){pu(ru,iu)}function du(t,e){lu.point=pu,ru=t,iu=e,au=t*=Oc,ou=Pc(e=(e*=Oc)/2+Dc),su=$c(e)}function pu(t,e){var n=(t*=Oc)-au,r=n>=0?1:-1,i=r*n,a=Pc(e=(e*=Oc)/2+Dc),o=$c(e),s=su*o,c=ou*a+s*Pc(i),u=s*r*$c(i);cu.add(Fc(u,c)),au=t,ou=a,su=o}function gu(t){return uu.reset(),nu(t,lu),2*uu}function yu(t){return[Fc(t[1],t[0]),Gc(t[2])]}function mu(t){var e=t[0],n=t[1],r=Pc(n);return[r*Pc(e),r*$c(e),$c(n)]}function vu(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function bu(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function _u(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function xu(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function wu(t){var e=Hc(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var ku,Tu,Cu,Eu,Su,Au,Mu,Nu,Du,Bu,Lu,Ou,Iu,Ru,Fu,Pu,Yu,ju,Uu,zu,$u,qu,Hu,Wu,Vu,Gu,Xu=kc(),Zu={point:Qu,lineStart:Ju,lineEnd:tl,polygonStart:function(){Zu.point=el,Zu.lineStart=nl,Zu.lineEnd=rl,Xu.reset(),lu.polygonStart()},polygonEnd:function(){lu.polygonEnd(),Zu.point=Qu,Zu.lineStart=Ju,Zu.lineEnd=tl,cu<0?(ku=-(Cu=180),Tu=-(Eu=90)):Xu>Sc?Eu=90:Xu<-1e-6&&(Tu=-90),Bu[0]=ku,Bu[1]=Cu},sphere:function(){ku=-(Cu=180),Tu=-(Eu=90)}};function Qu(t,e){Du.push(Bu=[ku=t,Cu=t]),e<Tu&&(Tu=e),e>Eu&&(Eu=e)}function Ku(t,e){var n=mu([t*Oc,e*Oc]);if(Nu){var r=bu(Nu,n),i=bu([r[1],-r[0],0],r);wu(i),i=yu(i);var a,o=t-Su,s=o>0?1:-1,c=i[0]*Lc*s,u=Ic(o)>180;u^(s*Su<c&&c<s*t)?(a=i[1]*Lc)>Eu&&(Eu=a):u^(s*Su<(c=(c+360)%360-180)&&c<s*t)?(a=-i[1]*Lc)<Tu&&(Tu=a):(e<Tu&&(Tu=e),e>Eu&&(Eu=e)),u?t<Su?il(ku,t)>il(ku,Cu)&&(Cu=t):il(t,Cu)>il(ku,Cu)&&(ku=t):Cu>=ku?(t<ku&&(ku=t),t>Cu&&(Cu=t)):t>Su?il(ku,t)>il(ku,Cu)&&(Cu=t):il(t,Cu)>il(ku,Cu)&&(ku=t)}else Du.push(Bu=[ku=t,Cu=t]);e<Tu&&(Tu=e),e>Eu&&(Eu=e),Nu=n,Su=t}function Ju(){Zu.point=Ku}function tl(){Bu[0]=ku,Bu[1]=Cu,Zu.point=Qu,Nu=null}function el(t,e){if(Nu){var n=t-Su;Xu.add(Ic(n)>180?n+(n>0?360:-360):n)}else Au=t,Mu=e;lu.point(t,e),Ku(t,e)}function nl(){lu.lineStart()}function rl(){el(Au,Mu),lu.lineEnd(),Ic(Xu)>Sc&&(ku=-(Cu=180)),Bu[0]=ku,Bu[1]=Cu,Nu=null}function il(t,e){return(e-=t)<0?e+360:e}function al(t,e){return t[0]-e[0]}function ol(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function sl(t){var e,n,r,i,a,o,s;if(Eu=Cu=-(ku=Tu=1/0),Du=[],nu(t,Zu),n=Du.length){for(Du.sort(al),e=1,a=[r=Du[0]];e<n;++e)ol(r,(i=Du[e])[0])||ol(r,i[1])?(il(r[0],i[1])>il(r[0],r[1])&&(r[1]=i[1]),il(i[0],r[1])>il(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,e=0,r=a[n=a.length-1];e<=n;r=i,++e)i=a[e],(s=il(r[1],i[0]))>o&&(o=s,ku=i[0],Cu=r[1])}return Du=Bu=null,ku===1/0||Tu===1/0?[[NaN,NaN],[NaN,NaN]]:[[ku,Tu],[Cu,Eu]]}var cl={sphere:Zc,point:ul,lineStart:hl,lineEnd:pl,polygonStart:function(){cl.lineStart=gl,cl.lineEnd=yl},polygonEnd:function(){cl.lineStart=hl,cl.lineEnd=pl}};function ul(t,e){t*=Oc;var n=Pc(e*=Oc);ll(n*Pc(t),n*$c(t),$c(e))}function ll(t,e,n){++Lu,Iu+=(t-Iu)/Lu,Ru+=(e-Ru)/Lu,Fu+=(n-Fu)/Lu}function hl(){cl.point=fl}function fl(t,e){t*=Oc;var n=Pc(e*=Oc);Wu=n*Pc(t),Vu=n*$c(t),Gu=$c(e),cl.point=dl,ll(Wu,Vu,Gu)}function dl(t,e){t*=Oc;var n=Pc(e*=Oc),r=n*Pc(t),i=n*$c(t),a=$c(e),o=Fc(Hc((o=Vu*a-Gu*i)*o+(o=Gu*r-Wu*a)*o+(o=Wu*i-Vu*r)*o),Wu*r+Vu*i+Gu*a);Ou+=o,Pu+=o*(Wu+(Wu=r)),Yu+=o*(Vu+(Vu=i)),ju+=o*(Gu+(Gu=a)),ll(Wu,Vu,Gu)}function pl(){cl.point=ul}function gl(){cl.point=ml}function yl(){vl(qu,Hu),cl.point=ul}function ml(t,e){qu=t,Hu=e,t*=Oc,e*=Oc,cl.point=vl;var n=Pc(e);Wu=n*Pc(t),Vu=n*$c(t),Gu=$c(e),ll(Wu,Vu,Gu)}function vl(t,e){t*=Oc;var n=Pc(e*=Oc),r=n*Pc(t),i=n*$c(t),a=$c(e),o=Vu*a-Gu*i,s=Gu*r-Wu*a,c=Wu*i-Vu*r,u=Hc(o*o+s*s+c*c),l=Gc(u),h=u&&-l/u;Uu+=h*o,zu+=h*s,$u+=h*c,Ou+=l,Pu+=l*(Wu+(Wu=r)),Yu+=l*(Vu+(Vu=i)),ju+=l*(Gu+(Gu=a)),ll(Wu,Vu,Gu)}function bl(t){Lu=Ou=Iu=Ru=Fu=Pu=Yu=ju=Uu=zu=$u=0,nu(t,cl);var e=Uu,n=zu,r=$u,i=e*e+n*n+r*r;return i<Ac&&(e=Pu,n=Yu,r=ju,Ou<Sc&&(e=Iu,n=Ru,r=Fu),(i=e*e+n*n+r*r)<Ac)?[NaN,NaN]:[Fc(n,e)*Lc,Gc(r/Hc(i))*Lc]}function _l(t){return function(){return t}}function xl(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function wl(t,e){return[Ic(t)>Mc?t+Math.round(-t/Bc)*Bc:t,e]}function kl(t,e,n){return(t%=Bc)?e||n?xl(Cl(t),El(e,n)):Cl(t):e||n?El(e,n):wl}function Tl(t){return function(e,n){return[(e+=t)>Mc?e-Bc:e<-Mc?e+Bc:e,n]}}function Cl(t){var e=Tl(t);return e.invert=Tl(-t),e}function El(t,e){var n=Pc(t),r=$c(t),i=Pc(e),a=$c(e);function o(t,e){var o=Pc(e),s=Pc(t)*o,c=$c(t)*o,u=$c(e),l=u*n+s*r;return[Fc(c*i-l*a,s*n-u*r),Gc(l*i+c*a)]}return o.invert=function(t,e){var o=Pc(e),s=Pc(t)*o,c=$c(t)*o,u=$c(e),l=u*i-c*a;return[Fc(c*i+u*a,s*n+l*r),Gc(l*n-s*r)]},o}function Sl(t){function e(e){return(e=t(e[0]*Oc,e[1]*Oc))[0]*=Lc,e[1]*=Lc,e}return t=kl(t[0]*Oc,t[1]*Oc,t.length>2?t[2]*Oc:0),e.invert=function(e){return(e=t.invert(e[0]*Oc,e[1]*Oc))[0]*=Lc,e[1]*=Lc,e},e}function Al(t,e,n,r,i,a){if(n){var o=Pc(e),s=$c(e),c=r*n;null==i?(i=e+r*Bc,a=e-c/2):(i=Ml(o,i),a=Ml(o,a),(r>0?i<a:i>a)&&(i+=r*Bc));for(var u,l=i;r>0?l>a:l<a;l-=c)u=yu([o,-s*Pc(l),-s*$c(l)]),t.point(u[0],u[1])}}function Ml(t,e){(e=mu(e))[0]-=t,wu(e);var n=Vc(-e[1]);return((-e[2]<0?-n:n)+Bc-Sc)%Bc}function Nl(){var t,e,n=_l([0,0]),r=_l(90),i=_l(6),a={point:function(n,r){t.push(n=e(n,r)),n[0]*=Lc,n[1]*=Lc}};function o(){var o=n.apply(this,arguments),s=r.apply(this,arguments)*Oc,c=i.apply(this,arguments)*Oc;return t=[],e=kl(-o[0]*Oc,-o[1]*Oc,0).invert,Al(a,s,c,1),o={type:"Polygon",coordinates:[t]},t=e=null,o}return o.center=function(t){return arguments.length?(n="function"==typeof t?t:_l([+t[0],+t[1]]),o):n},o.radius=function(t){return arguments.length?(r="function"==typeof t?t:_l(+t),o):r},o.precision=function(t){return arguments.length?(i="function"==typeof t?t:_l(+t),o):i},o}function Dl(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:Zc,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Bl(t,e){return Ic(t[0]-e[0])<Sc&&Ic(t[1]-e[1])<Sc}function Ll(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Ol(t,e,n,r,i){var a,o,s=[],c=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(Bl(r,o)){if(!r[2]&&!o[2]){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);return void i.lineEnd()}o[0]+=2e-6}s.push(n=new Ll(r,t,null,!0)),c.push(n.o=new Ll(r,null,n,!1)),s.push(n=new Ll(o,t,null,!1)),c.push(n.o=new Ll(o,null,n,!0))}})),s.length){for(c.sort(e),Il(s),Il(c),a=0,o=c.length;a<o;++a)c[a].e=n=!n;for(var u,l,h=s[0];;){for(var f=h,d=!0;f.v;)if((f=f.n)===h)return;u=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(a=0,o=u.length;a<o;++a)i.point((l=u[a])[0],l[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(d)for(u=f.p.z,a=u.length-1;a>=0;--a)i.point((l=u[a])[0],l[1]);else r(f.x,f.p.x,-1,i);f=f.p}u=(f=f.o).z,d=!d}while(!f.v);i.lineEnd()}}}function Il(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}wl.invert=wl;var Rl=kc();function Fl(t){return Ic(t[0])<=Mc?t[0]:qc(t[0])*((Ic(t[0])+Mc)%Bc-Mc)}function Pl(t,e){var n=Fl(e),r=e[1],i=$c(r),a=[$c(n),-Pc(n),0],o=0,s=0;Rl.reset(),1===i?r=Nc+Sc:-1===i&&(r=-Nc-Sc);for(var c=0,u=t.length;c<u;++c)if(h=(l=t[c]).length)for(var l,h,f=l[h-1],d=Fl(f),p=f[1]/2+Dc,g=$c(p),y=Pc(p),m=0;m<h;++m,d=b,g=x,y=w,f=v){var v=l[m],b=Fl(v),_=v[1]/2+Dc,x=$c(_),w=Pc(_),k=b-d,T=k>=0?1:-1,C=T*k,E=C>Mc,S=g*x;if(Rl.add(Fc(S*T*$c(C),y*w+S*Pc(C))),o+=E?k+T*Bc:k,E^d>=n^b>=n){var A=bu(mu(f),mu(v));wu(A);var M=bu(a,A);wu(M);var N=(E^k>=0?-1:1)*Gc(M[2]);(r>N||r===N&&(A[0]||A[1]))&&(s+=E^k>=0?1:-1)}}return(o<-1e-6||o<Sc&&Rl<-1e-6)^1&s}function Yl(t,e,n,r){return function(i){var a,o,s,c=e(i),u=Dl(),l=e(u),h=!1,f={point:d,lineStart:g,lineEnd:y,polygonStart:function(){f.point=m,f.lineStart=v,f.lineEnd=b,o=[],a=[]},polygonEnd:function(){f.point=d,f.lineStart=g,f.lineEnd=y,o=P(o);var t=Pl(a,r);o.length?(h||(i.polygonStart(),h=!0),Ol(o,Ul,t,n,i)):t&&(h||(i.polygonStart(),h=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),h&&(i.polygonEnd(),h=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(e,n){t(e,n)&&i.point(e,n)}function p(t,e){c.point(t,e)}function g(){f.point=p,c.lineStart()}function y(){f.point=d,c.lineEnd()}function m(t,e){s.push([t,e]),l.point(t,e)}function v(){l.lineStart(),s=[]}function b(){m(s[0][0],s[0][1]),l.lineEnd();var t,e,n,r,c=l.clean(),f=u.result(),d=f.length;if(s.pop(),a.push(s),s=null,d)if(1&c){if((e=(n=f[0]).length-1)>0){for(h||(i.polygonStart(),h=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else d>1&&2&c&&f.push(f.pop().concat(f.shift())),o.push(f.filter(jl))}return f}}function jl(t){return t.length>1}function Ul(t,e){return((t=t.x)[0]<0?t[1]-Nc-Sc:Nc-t[1])-((e=e.x)[0]<0?e[1]-Nc-Sc:Nc-e[1])}const zl=Yl((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?Mc:-Mc,c=Ic(a-n);Ic(c-Mc)<Sc?(t.point(n,r=(r+o)/2>0?Nc:-Nc),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&c>=Mc&&(Ic(n-i)<Sc&&(n-=i*Sc),Ic(a-s)<Sc&&(a-=s*Sc),r=function(t,e,n,r){var i,a,o=$c(t-n);return Ic(o)>Sc?Rc(($c(e)*(a=Pc(r))*$c(n)-$c(r)*(i=Pc(e))*$c(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=a,r=o),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*Nc,r.point(-Mc,i),r.point(0,i),r.point(Mc,i),r.point(Mc,0),r.point(Mc,-i),r.point(0,-i),r.point(-Mc,-i),r.point(-Mc,0),r.point(-Mc,i);else if(Ic(t[0]-e[0])>Sc){var a=t[0]<e[0]?Mc:-Mc;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-Mc,-Nc]);function $l(t){var e=Pc(t),n=6*Oc,r=e>0,i=Ic(e)>Sc;function a(t,n){return Pc(t)*Pc(n)>e}function o(t,n,r){var i=[1,0,0],a=bu(mu(t),mu(n)),o=vu(a,a),s=a[0],c=o-s*s;if(!c)return!r&&t;var u=e*o/c,l=-e*s/c,h=bu(i,a),f=xu(i,u);_u(f,xu(a,l));var d=h,p=vu(f,d),g=vu(d,d),y=p*p-g*(vu(f,f)-1);if(!(y<0)){var m=Hc(y),v=xu(d,(-p-m)/g);if(_u(v,f),v=yu(v),!r)return v;var b,_=t[0],x=n[0],w=t[1],k=n[1];x<_&&(b=_,_=x,x=b);var T=x-_,C=Ic(T-Mc)<Sc;if(!C&&k<w&&(b=w,w=k,k=b),C||T<Sc?C?w+k>0^v[1]<(Ic(v[0]-_)<Sc?w:k):w<=v[1]&&v[1]<=k:T>Mc^(_<=v[0]&&v[0]<=x)){var E=xu(d,(-p+m)/g);return _u(E,f),[v,yu(E)]}}}function s(e,n){var i=r?t:Mc-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return Yl(a,(function(t){var e,n,c,u,l;return{lineStart:function(){u=c=!1,l=1},point:function(h,f){var d,p=[h,f],g=a(h,f),y=r?g?0:s(h,f):g?s(h+(h<0?Mc:-Mc),f):0;if(!e&&(u=c=g)&&t.lineStart(),g!==c&&(!(d=o(e,p))||Bl(e,d)||Bl(p,d))&&(p[2]=1),g!==c)l=0,g?(t.lineStart(),d=o(p,e),t.point(d[0],d[1])):(d=o(e,p),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&r^g){var m;y&n||!(m=o(p,e,!0))||(l=0,r?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1],3)))}!g||e&&Bl(e,p)||t.point(p[0],p[1]),e=p,c=g,n=y},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return l|(u&&c)<<1}}}),(function(e,r,i,a){Al(a,t,n,i,e,r)}),r?[0,-t]:[-Mc,t-Mc])}var ql=1e9,Hl=-ql;function Wl(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,s,u){var l=0,h=0;if(null==i||(l=o(i,s))!==(h=o(a,s))||c(i,a)<0^s>0)do{u.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+s+4)%4)!==h);else u.point(a[0],a[1])}function o(r,i){return Ic(r[0]-t)<Sc?i>0?0:3:Ic(r[0]-n)<Sc?i>0?2:1:Ic(r[1]-e)<Sc?i>0?1:0:i>0?3:2}function s(t,e){return c(t.x,e.x)}function c(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var c,u,l,h,f,d,p,g,y,m,v,b=o,_=Dl(),x={point:w,lineStart:function(){x.point=k,u&&u.push(l=[]),m=!0,y=!1,p=g=NaN},lineEnd:function(){c&&(k(h,f),d&&y&&_.rejoin(),c.push(_.result())),x.point=w,y&&b.lineEnd()},polygonStart:function(){b=_,c=[],u=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var a,o,s=u[n],c=1,l=s.length,h=s[0],f=h[0],d=h[1];c<l;++c)a=f,o=d,f=(h=s[c])[0],d=h[1],o<=r?d>r&&(f-a)*(r-o)>(d-o)*(t-a)&&++e:d<=r&&(f-a)*(r-o)<(d-o)*(t-a)&&--e;return e}(),n=v&&e,i=(c=P(c)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&Ol(c,s,e,a,o),o.polygonEnd()),b=o,c=u=l=null}};function w(t,e){i(t,e)&&b.point(t,e)}function k(a,o){var s=i(a,o);if(u&&l.push([a,o]),m)h=a,f=o,d=s,m=!1,s&&(b.lineStart(),b.point(a,o));else if(s&&y)b.point(a,o);else{var c=[p=Math.max(Hl,Math.min(ql,p)),g=Math.max(Hl,Math.min(ql,g))],_=[a=Math.max(Hl,Math.min(ql,a)),o=Math.max(Hl,Math.min(ql,o))];!function(t,e,n,r,i,a){var o,s=t[0],c=t[1],u=0,l=1,h=e[0]-s,f=e[1]-c;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<u)return;o<l&&(l=o)}else if(h>0){if(o>l)return;o>u&&(u=o)}if(o=i-s,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>u&&(u=o)}else if(h>0){if(o<u)return;o<l&&(l=o)}if(o=r-c,f||!(o>0)){if(o/=f,f<0){if(o<u)return;o<l&&(l=o)}else if(f>0){if(o>l)return;o>u&&(u=o)}if(o=a-c,f||!(o<0)){if(o/=f,f<0){if(o>l)return;o>u&&(u=o)}else if(f>0){if(o<u)return;o<l&&(l=o)}return u>0&&(t[0]=s+u*h,t[1]=c+u*f),l<1&&(e[0]=s+l*h,e[1]=c+l*f),!0}}}}}(c,_,t,e,n,r)?s&&(b.lineStart(),b.point(a,o),v=!1):(y||(b.lineStart(),b.point(c[0],c[1])),b.point(_[0],_[1]),s||b.lineEnd(),v=!1)}p=a,g=o,y=s}return x}}function Vl(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=Wl(r,i,a,o)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],a=+s[1][0],o=+s[1][1],t=e=null,n):[[r,i],[a,o]]}}}var Gl,Xl,Zl,Ql=kc(),Kl={sphere:Zc,point:Zc,lineStart:function(){Kl.point=th,Kl.lineEnd=Jl},lineEnd:Zc,polygonStart:Zc,polygonEnd:Zc};function Jl(){Kl.point=Kl.lineEnd=Zc}function th(t,e){Gl=t*=Oc,Xl=$c(e*=Oc),Zl=Pc(e),Kl.point=eh}function eh(t,e){t*=Oc;var n=$c(e*=Oc),r=Pc(e),i=Ic(t-Gl),a=Pc(i),o=r*$c(i),s=Zl*n-Xl*r*a,c=Xl*n+Zl*r*a;Ql.add(Fc(Hc(o*o+s*s),c)),Gl=t,Xl=n,Zl=r}function nh(t){return Ql.reset(),nu(t,Kl),+Ql}var rh=[null,null],ih={type:"LineString",coordinates:rh};function ah(t,e){return rh[0]=t,rh[1]=e,nh(ih)}var oh={Feature:function(t,e){return ch(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(ch(n[r].geometry,e))return!0;return!1}},sh={Sphere:function(){return!0},Point:function(t,e){return uh(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(uh(n[r],e))return!0;return!1},LineString:function(t,e){return lh(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(lh(n[r],e))return!0;return!1},Polygon:function(t,e){return hh(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(hh(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(ch(n[r],e))return!0;return!1}};function ch(t,e){return!(!t||!sh.hasOwnProperty(t.type))&&sh[t.type](t,e)}function uh(t,e){return 0===ah(t,e)}function lh(t,e){for(var n,r,i,a=0,o=t.length;a<o;a++){if(0===(r=ah(t[a],e)))return!0;if(a>0&&(i=ah(t[a],t[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Ac*i)return!0;n=r}return!1}function hh(t,e){return!!Pl(t.map(fh),dh(e))}function fh(t){return(t=t.map(dh)).pop(),t}function dh(t){return[t[0]*Oc,t[1]*Oc]}function ph(t,e){return(t&&oh.hasOwnProperty(t.type)?oh[t.type]:ch)(t,e)}function gh(t,e,n){var r=k(t,e-Sc,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function yh(t,e,n){var r=k(t,e-Sc,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function mh(){var t,e,n,r,i,a,o,s,c,u,l,h,f=10,d=f,p=90,g=360,y=2.5;function m(){return{type:"MultiLineString",coordinates:v()}}function v(){return k(Yc(r/p)*p,n,p).map(l).concat(k(Yc(s/g)*g,o,g).map(h)).concat(k(Yc(e/f)*f,t,f).filter((function(t){return Ic(t%p)>Sc})).map(c)).concat(k(Yc(a/d)*d,i,d).filter((function(t){return Ic(t%g)>Sc})).map(u))}return m.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},m.outline=function(){return{type:"Polygon",coordinates:[l(r).concat(h(o).slice(1),l(n).reverse().slice(1),h(s).reverse().slice(1))]}},m.extent=function(t){return arguments.length?m.extentMajor(t).extentMinor(t):m.extentMinor()},m.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),s>o&&(t=s,s=o,o=t),m.precision(y)):[[r,s],[n,o]]},m.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),m.precision(y)):[[e,a],[t,i]]},m.step=function(t){return arguments.length?m.stepMajor(t).stepMinor(t):m.stepMinor()},m.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],m):[p,g]},m.stepMinor=function(t){return arguments.length?(f=+t[0],d=+t[1],m):[f,d]},m.precision=function(f){return arguments.length?(y=+f,c=gh(a,i,90),u=yh(e,t,y),l=gh(s,o,90),h=yh(r,n,y),m):y},m.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function vh(){return mh()()}function bh(t,e){var n=t[0]*Oc,r=t[1]*Oc,i=e[0]*Oc,a=e[1]*Oc,o=Pc(r),s=$c(r),c=Pc(a),u=$c(a),l=o*Pc(n),h=o*$c(n),f=c*Pc(i),d=c*$c(i),p=2*Gc(Hc(Xc(a-r)+o*c*Xc(i-n))),g=$c(p),y=p?function(t){var e=$c(t*=p)/g,n=$c(p-t)/g,r=n*l+e*f,i=n*h+e*d,a=n*s+e*u;return[Fc(i,r)*Lc,Fc(a,Hc(r*r+i*i))*Lc]}:function(){return[n*Lc,r*Lc]};return y.distance=p,y}function _h(t){return t}var xh,wh,kh,Th,Ch=kc(),Eh=kc(),Sh={point:Zc,lineStart:Zc,lineEnd:Zc,polygonStart:function(){Sh.lineStart=Ah,Sh.lineEnd=Dh},polygonEnd:function(){Sh.lineStart=Sh.lineEnd=Sh.point=Zc,Ch.add(Ic(Eh)),Eh.reset()},result:function(){var t=Ch/2;return Ch.reset(),t}};function Ah(){Sh.point=Mh}function Mh(t,e){Sh.point=Nh,xh=kh=t,wh=Th=e}function Nh(t,e){Eh.add(Th*t-kh*e),kh=t,Th=e}function Dh(){Nh(xh,wh)}const Bh=Sh;var Lh=1/0,Oh=Lh,Ih=-Lh,Rh=Ih,Fh={point:function(t,e){t<Lh&&(Lh=t),t>Ih&&(Ih=t),e<Oh&&(Oh=e),e>Rh&&(Rh=e)},lineStart:Zc,lineEnd:Zc,polygonStart:Zc,polygonEnd:Zc,result:function(){var t=[[Lh,Oh],[Ih,Rh]];return Ih=Rh=-(Oh=Lh=1/0),t}};const Ph=Fh;var Yh,jh,Uh,zh,$h=0,qh=0,Hh=0,Wh=0,Vh=0,Gh=0,Xh=0,Zh=0,Qh=0,Kh={point:Jh,lineStart:tf,lineEnd:rf,polygonStart:function(){Kh.lineStart=af,Kh.lineEnd=of},polygonEnd:function(){Kh.point=Jh,Kh.lineStart=tf,Kh.lineEnd=rf},result:function(){var t=Qh?[Xh/Qh,Zh/Qh]:Gh?[Wh/Gh,Vh/Gh]:Hh?[$h/Hh,qh/Hh]:[NaN,NaN];return $h=qh=Hh=Wh=Vh=Gh=Xh=Zh=Qh=0,t}};function Jh(t,e){$h+=t,qh+=e,++Hh}function tf(){Kh.point=ef}function ef(t,e){Kh.point=nf,Jh(Uh=t,zh=e)}function nf(t,e){var n=t-Uh,r=e-zh,i=Hc(n*n+r*r);Wh+=i*(Uh+t)/2,Vh+=i*(zh+e)/2,Gh+=i,Jh(Uh=t,zh=e)}function rf(){Kh.point=Jh}function af(){Kh.point=sf}function of(){cf(Yh,jh)}function sf(t,e){Kh.point=cf,Jh(Yh=Uh=t,jh=zh=e)}function cf(t,e){var n=t-Uh,r=e-zh,i=Hc(n*n+r*r);Wh+=i*(Uh+t)/2,Vh+=i*(zh+e)/2,Gh+=i,Xh+=(i=zh*t-Uh*e)*(Uh+t),Zh+=i*(zh+e),Qh+=3*i,Jh(Uh=t,zh=e)}const uf=Kh;function lf(t){this._context=t}lf.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Bc)}},result:Zc};var hf,ff,df,pf,gf,yf=kc(),mf={point:Zc,lineStart:function(){mf.point=vf},lineEnd:function(){hf&&bf(ff,df),mf.point=Zc},polygonStart:function(){hf=!0},polygonEnd:function(){hf=null},result:function(){var t=+yf;return yf.reset(),t}};function vf(t,e){mf.point=bf,ff=pf=t,df=gf=e}function bf(t,e){pf-=t,gf-=e,yf.add(Hc(pf*pf+gf*gf)),pf=t,gf=e}const _f=mf;function xf(){this._string=[]}function wf(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function kf(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),nu(t,n(r))),r.result()}return a.area=function(t){return nu(t,n(Bh)),Bh.result()},a.measure=function(t){return nu(t,n(_f)),_f.result()},a.bounds=function(t){return nu(t,n(Ph)),Ph.result()},a.centroid=function(t){return nu(t,n(uf)),uf.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,_h):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new xf):new lf(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.projection(t).context(e)}function Tf(t){return{stream:Cf(t)}}function Cf(t){return function(e){var n=new Ef;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Ef(){}function Sf(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),nu(n,t.stream(Ph)),e(Ph.result()),null!=r&&t.clipExtent(r),t}function Af(t,e,n){return Sf(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s])}),n)}function Mf(t,e,n){return Af(t,[[0,0],e],n)}function Nf(t,e,n){return Sf(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])}),n)}function Df(t,e,n){return Sf(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])}),n)}xf.prototype={_radius:4.5,_circle:wf(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=wf(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},Ef.prototype={constructor:Ef,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Bf=Pc(30*Oc);function Lf(t,e){return+e?function(t,e){function n(r,i,a,o,s,c,u,l,h,f,d,p,g,y){var m=u-r,v=l-i,b=m*m+v*v;if(b>4*e&&g--){var _=o+f,x=s+d,w=c+p,k=Hc(_*_+x*x+w*w),T=Gc(w/=k),C=Ic(Ic(w)-1)<Sc||Ic(a-h)<Sc?(a+h)/2:Fc(x,_),E=t(C,T),S=E[0],A=E[1],M=S-r,N=A-i,D=v*M-m*N;(D*D/b>e||Ic((m*M+v*N)/b-.5)>.3||o*f+s*d+c*p<Bf)&&(n(r,i,a,o,s,c,S,A,C,_/=k,x/=k,w,g,y),y.point(S,A),n(S,A,C,_,x,w,u,l,h,f,d,p,g,y))}}return function(e){var r,i,a,o,s,c,u,l,h,f,d,p,g={point:y,lineStart:m,lineEnd:b,polygonStart:function(){e.polygonStart(),g.lineStart=_},polygonEnd:function(){e.polygonEnd(),g.lineStart=m}};function y(n,r){n=t(n,r),e.point(n[0],n[1])}function m(){l=NaN,g.point=v,e.lineStart()}function v(r,i){var a=mu([r,i]),o=t(r,i);n(l,h,u,f,d,p,l=o[0],h=o[1],u=r,f=a[0],d=a[1],p=a[2],16,e),e.point(l,h)}function b(){g.point=y,e.lineEnd()}function _(){m(),g.point=x,g.lineEnd=w}function x(t,e){v(r=t,e),i=l,a=h,o=f,s=d,c=p,g.point=v}function w(){n(l,h,u,f,d,p,i,a,r,o,s,c,16,e),g.lineEnd=b,b()}return g}}(t,e):function(t){return Cf({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var Of=Cf({point:function(t,e){this.stream.point(t*Oc,e*Oc)}});function If(t,e,n,r,i){function a(a,o){return[e+t*(a*=r),n-t*(o*=i)]}return a.invert=function(a,o){return[(a-e)/t*r,(n-o)/t*i]},a}function Rf(t,e,n,r,i,a){var o=Pc(a),s=$c(a),c=o*t,u=s*t,l=o/t,h=s/t,f=(s*n-o*e)/t,d=(s*e+o*n)/t;function p(t,a){return[c*(t*=r)-u*(a*=i)+e,n-u*t-c*a]}return p.invert=function(t,e){return[r*(l*t-h*e+f),i*(d-h*t-l*e)]},p}function Ff(t){return Pf((function(){return t}))()}function Pf(t){var e,n,r,i,a,o,s,c,u,l,h=150,f=480,d=250,p=0,g=0,y=0,m=0,v=0,b=0,_=1,x=1,w=null,k=zl,T=null,C=_h,E=.5;function S(t){return c(t[0]*Oc,t[1]*Oc)}function A(t){return(t=c.invert(t[0],t[1]))&&[t[0]*Lc,t[1]*Lc]}function M(){var t=Rf(h,0,0,_,x,b).apply(null,e(p,g)),r=(b?Rf:If)(h,f-t[0],d-t[1],_,x,b);return n=kl(y,m,v),s=xl(e,r),c=xl(n,s),o=Lf(s,E),N()}function N(){return u=l=null,S}return S.stream=function(t){return u&&l===t?u:u=Of(function(t){return Cf({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(k(o(C(l=t)))))},S.preclip=function(t){return arguments.length?(k=t,w=void 0,N()):k},S.postclip=function(t){return arguments.length?(C=t,T=r=i=a=null,N()):C},S.clipAngle=function(t){return arguments.length?(k=+t?$l(w=t*Oc):(w=null,zl),N()):w*Lc},S.clipExtent=function(t){return arguments.length?(C=null==t?(T=r=i=a=null,_h):Wl(T=+t[0][0],r=+t[0][1],i=+t[1][0],a=+t[1][1]),N()):null==T?null:[[T,r],[i,a]]},S.scale=function(t){return arguments.length?(h=+t,M()):h},S.translate=function(t){return arguments.length?(f=+t[0],d=+t[1],M()):[f,d]},S.center=function(t){return arguments.length?(p=t[0]%360*Oc,g=t[1]%360*Oc,M()):[p*Lc,g*Lc]},S.rotate=function(t){return arguments.length?(y=t[0]%360*Oc,m=t[1]%360*Oc,v=t.length>2?t[2]%360*Oc:0,M()):[y*Lc,m*Lc,v*Lc]},S.angle=function(t){return arguments.length?(b=t%360*Oc,M()):b*Lc},S.reflectX=function(t){return arguments.length?(_=t?-1:1,M()):_<0},S.reflectY=function(t){return arguments.length?(x=t?-1:1,M()):x<0},S.precision=function(t){return arguments.length?(o=Lf(s,E=t*t),N()):Hc(E)},S.fitExtent=function(t,e){return Af(S,t,e)},S.fitSize=function(t,e){return Mf(S,t,e)},S.fitWidth=function(t,e){return Nf(S,t,e)},S.fitHeight=function(t,e){return Df(S,t,e)},function(){return e=t.apply(this,arguments),S.invert=e.invert&&A,M()}}function Yf(t){var e=0,n=Mc/3,r=Pf(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Oc,n=t[1]*Oc):[e*Lc,n*Lc]},i}function jf(t,e){var n=$c(t),r=(n+$c(e))/2;if(Ic(r)<Sc)return function(t){var e=Pc(t);function n(t,n){return[t*e,$c(n)/e]}return n.invert=function(t,n){return[t/e,Gc(n*e)]},n}(t);var i=1+n*(2*r-n),a=Hc(i)/r;function o(t,e){var n=Hc(i-2*r*$c(e))/r;return[n*$c(t*=r),a-n*Pc(t)]}return o.invert=function(t,e){var n=a-e,o=Fc(t,Ic(n))*qc(n);return n*r<0&&(o-=Mc*qc(t)*qc(n)),[o/r,Gc((i-(t*t+n*n)*r*r)/(2*r))]},o}function Uf(){return Yf(jf).scale(155.424).center([0,33.6442])}function zf(){return Uf().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function $f(){var t,e,n,r,i,a,o=zf(),s=Uf().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=Uf().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){a=[t,e]}};function l(t){var e=t[0],o=t[1];return a=null,n.point(e,o),a||(r.point(e,o),a)||(i.point(e,o),a)}function h(){return t=e=null,l}return l.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(t)},l.stream=function(n){return t&&e===n?t:(r=[o.stream(e=n),s.stream(n),c.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},l.precision=function(t){return arguments.length?(o.precision(t),s.precision(t),c.precision(t),h()):o.precision()},l.scale=function(t){return arguments.length?(o.scale(t),s.scale(.35*t),c.scale(t),l.translate(o.translate())):o.scale()},l.translate=function(t){if(!arguments.length)return o.translate();var e=o.scale(),a=+t[0],l=+t[1];return n=o.translate(t).clipExtent([[a-.455*e,l-.238*e],[a+.455*e,l+.238*e]]).stream(u),r=s.translate([a-.307*e,l+.201*e]).clipExtent([[a-.425*e+Sc,l+.12*e+Sc],[a-.214*e-Sc,l+.234*e-Sc]]).stream(u),i=c.translate([a-.205*e,l+.212*e]).clipExtent([[a-.214*e+Sc,l+.166*e+Sc],[a-.115*e-Sc,l+.234*e-Sc]]).stream(u),h()},l.fitExtent=function(t,e){return Af(l,t,e)},l.fitSize=function(t,e){return Mf(l,t,e)},l.fitWidth=function(t,e){return Nf(l,t,e)},l.fitHeight=function(t,e){return Df(l,t,e)},l.scale(1070)}function qf(t){return function(e,n){var r=Pc(e),i=Pc(n),a=t(r*i);return[a*i*$c(e),a*$c(n)]}}function Hf(t){return function(e,n){var r=Hc(e*e+n*n),i=t(r),a=$c(i),o=Pc(i);return[Fc(e*a,r*o),Gc(r&&n*a/r)]}}var Wf=qf((function(t){return Hc(2/(1+t))}));function Vf(){return Ff(Wf).scale(124.75).clipAngle(179.999)}Wf.invert=Hf((function(t){return 2*Gc(t/2)}));var Gf=qf((function(t){return(t=Vc(t))&&t/$c(t)}));function Xf(){return Ff(Gf).scale(79.4188).clipAngle(179.999)}function Zf(t,e){return[t,Uc(Wc((Nc+e)/2))]}function Qf(){return Kf(Zf).scale(961/Bc)}function Kf(t){var e,n,r,i=Ff(t),a=i.center,o=i.scale,s=i.translate,c=i.clipExtent,u=null;function l(){var a=Mc*o(),s=i(Sl(i.rotate()).invert([0,0]));return c(null==u?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:t===Zf?[[Math.max(s[0]-a,u),e],[Math.min(s[0]+a,n),r]]:[[u,Math.max(s[1]-a,e)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(t){return arguments.length?(o(t),l()):o()},i.translate=function(t){return arguments.length?(s(t),l()):s()},i.center=function(t){return arguments.length?(a(t),l()):a()},i.clipExtent=function(t){return arguments.length?(null==t?u=e=n=r=null:(u=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),l()):null==u?null:[[u,e],[n,r]]},l()}function Jf(t){return Wc((Nc+t)/2)}function td(t,e){var n=Pc(t),r=t===e?$c(t):Uc(n/Pc(e))/Uc(Jf(e)/Jf(t)),i=n*zc(Jf(t),r)/r;if(!r)return Zf;function a(t,e){i>0?e<-Nc+Sc&&(e=-Nc+Sc):e>Nc-Sc&&(e=Nc-Sc);var n=i/zc(Jf(e),r);return[n*$c(r*t),i-n*Pc(r*t)]}return a.invert=function(t,e){var n=i-e,a=qc(r)*Hc(t*t+n*n),o=Fc(t,Ic(n))*qc(n);return n*r<0&&(o-=Mc*qc(t)*qc(n)),[o/r,2*Rc(zc(i/a,1/r))-Nc]},a}function ed(){return Yf(td).scale(109.5).parallels([30,30])}function nd(t,e){return[t,e]}function rd(){return Ff(nd).scale(152.63)}function id(t,e){var n=Pc(t),r=t===e?$c(t):(n-Pc(e))/(e-t),i=n/r+t;if(Ic(r)<Sc)return nd;function a(t,e){var n=i-e,a=r*t;return[n*$c(a),i-n*Pc(a)]}return a.invert=function(t,e){var n=i-e,a=Fc(t,Ic(n))*qc(n);return n*r<0&&(a-=Mc*qc(t)*qc(n)),[a/r,i-qc(r)*Hc(t*t+n*n)]},a}function ad(){return Yf(id).scale(131.154).center([0,13.9389])}Gf.invert=Hf((function(t){return t})),Zf.invert=function(t,e){return[t,2*Rc(jc(e))-Nc]},nd.invert=nd;var od=1.340264,sd=-.081106,cd=893e-6,ud=.003796,ld=Hc(3)/2;function hd(t,e){var n=Gc(ld*$c(e)),r=n*n,i=r*r*r;return[t*Pc(n)/(ld*(od+3*sd*r+i*(7*cd+9*ud*r))),n*(od+sd*r+i*(cd+ud*r))]}function fd(){return Ff(hd).scale(177.158)}function dd(t,e){var n=Pc(e),r=Pc(t)*n;return[n*$c(t)/r,$c(e)/r]}function pd(){return Ff(dd).scale(144.049).clipAngle(60)}function gd(){var t,e,n,r,i,a,o,s=1,c=0,u=0,l=1,h=1,f=0,d=null,p=1,g=1,y=Cf({point:function(t,e){var n=b([t,e]);this.stream.point(n[0],n[1])}}),m=_h;function v(){return p=s*l,g=s*h,a=o=null,b}function b(n){var r=n[0]*p,i=n[1]*g;if(f){var a=i*t-r*e;r=r*t+i*e,i=a}return[r+c,i+u]}return b.invert=function(n){var r=n[0]-c,i=n[1]-u;if(f){var a=i*t+r*e;r=r*t-i*e,i=a}return[r/p,i/g]},b.stream=function(t){return a&&o===t?a:a=y(m(o=t))},b.postclip=function(t){return arguments.length?(m=t,d=n=r=i=null,v()):m},b.clipExtent=function(t){return arguments.length?(m=null==t?(d=n=r=i=null,_h):Wl(d=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),v()):null==d?null:[[d,n],[r,i]]},b.scale=function(t){return arguments.length?(s=+t,v()):s},b.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],v()):[c,u]},b.angle=function(n){return arguments.length?(e=$c(f=n%360*Oc),t=Pc(f),v()):f*Lc},b.reflectX=function(t){return arguments.length?(l=t?-1:1,v()):l<0},b.reflectY=function(t){return arguments.length?(h=t?-1:1,v()):h<0},b.fitExtent=function(t,e){return Af(b,t,e)},b.fitSize=function(t,e){return Mf(b,t,e)},b.fitWidth=function(t,e){return Nf(b,t,e)},b.fitHeight=function(t,e){return Df(b,t,e)},b}function yd(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function md(){return Ff(yd).scale(175.295)}function vd(t,e){return[Pc(e)*$c(t),$c(e)]}function bd(){return Ff(vd).scale(249.5).clipAngle(90.000001)}function _d(t,e){var n=Pc(e),r=1+Pc(t)*n;return[n*$c(t)/r,$c(e)/r]}function xd(){return Ff(_d).scale(250).clipAngle(142)}function wd(t,e){return[Uc(Wc((Nc+e)/2)),-t]}function kd(){var t=Kf(wd),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function Td(t,e){return t.parent===e.parent?1:2}function Cd(t,e){return t+e.x}function Ed(t,e){return Math.max(t,e.y)}function Sd(){var t=Td,e=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(Cd,0)/t.length}(n),e.y=function(t){return 1+t.reduce(Ed,0)}(n)):(e.x=a?o+=t(e,a):0,e.y=0,a=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=s.x-t(s,c)/2,l=c.x+t(c,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(l-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function Ad(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function Md(t,e){var n,r,i,a,o,s=new Ld(t),c=+t.value&&(s.value=t.value),u=[s];for(null==e&&(e=Nd);n=u.pop();)if(c&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)u.push(r=n.children[a]=new Ld(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Bd)}function Nd(t){return t.children}function Dd(t){t.data=t.data.data}function Bd(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Ld(t){this.data=t,this.depth=this.height=0,this.parent=null}hd.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(od+sd*i+a*(cd+ud*i))-e)/(od+3*sd*i+a*(7*cd+9*ud*i)))*r)*i*i,!(Ic(n)<Ac));++o);return[ld*t*(od+3*sd*i+a*(7*cd+9*ud*i))/Pc(r),Gc($c(r)/ld)]},dd.invert=Hf(Rc),yd.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(Ic(n)>Sc&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]},vd.invert=Hf(Gc),_d.invert=Hf((function(t){return 2*Rc(t)})),wd.invert=function(t,e){return[-e,2*Rc(jc(t))-Nc]},Ld.prototype=Md.prototype={constructor:Ld,count:function(){return this.eachAfter(Ad)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return Md(this).eachBefore(Dd)}};var Od=Array.prototype.slice;function Id(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(Od.call(t))).length,a=[];r<i;)e=t[r],n&&Pd(n,e)?++r:(n=jd(a=Rd(a,e)),r=0);return n}function Rd(t,e){var n,r;if(Yd(e,t))return[e];for(n=0;n<t.length;++n)if(Fd(e,t[n])&&Yd(Ud(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(Fd(Ud(t[n],t[r]),e)&&Fd(Ud(t[n],e),t[r])&&Fd(Ud(t[r],e),t[n])&&Yd(zd(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Fd(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function Pd(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Yd(t,e){for(var n=0;n<e.length;++n)if(!Pd(t,e[n]))return!1;return!0}function jd(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return Ud(t[0],t[1]);case 3:return zd(t[0],t[1],t[2])}}function Ud(t,e){var n=t.x,r=t.y,i=t.r,a=e.x,o=e.y,s=e.r,c=a-n,u=o-r,l=s-i,h=Math.sqrt(c*c+u*u);return{x:(n+a+c/h*l)/2,y:(r+o+u/h*l)/2,r:(h+i+s)/2}}function zd(t,e,n){var r=t.x,i=t.y,a=t.r,o=e.x,s=e.y,c=e.r,u=n.x,l=n.y,h=n.r,f=r-o,d=r-u,p=i-s,g=i-l,y=c-a,m=h-a,v=r*r+i*i-a*a,b=v-o*o-s*s+c*c,_=v-u*u-l*l+h*h,x=d*p-f*g,w=(p*_-g*b)/(2*x)-r,k=(g*y-p*m)/x,T=(d*b-f*_)/(2*x)-i,C=(f*m-d*y)/x,E=k*k+C*C-1,S=2*(a+w*k+T*C),A=w*w+T*T-a*a,M=-(E?(S+Math.sqrt(S*S-4*E*A))/(2*E):A/S);return{x:r+w+k*M,y:i+T+C*M,r:M}}function $d(t,e,n){var r,i,a,o,s=t.x-e.x,c=t.y-e.y,u=s*s+c*c;u?(i=e.r+n.r,i*=i,o=t.r+n.r,i>(o*=o)?(r=(u+o-i)/(2*u),a=Math.sqrt(Math.max(0,o/u-r*r)),n.x=t.x-r*s-a*c,n.y=t.y-r*c+a*s):(r=(u+i-o)/(2*u),a=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*s-a*c,n.y=e.y+r*c+a*s)):(n.x=e.x+n.r,n.y=e.y)}function qd(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Hd(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function Wd(t){this._=t,this.next=null,this.previous=null}function Vd(t){if(!(i=t.length))return 0;var e,n,r,i,a,o,s,c,u,l,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;$d(n,e,r=t[2]),e=new Wd(e),n=new Wd(n),r=new Wd(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){$d(e._,n._,r=t[s]),r=new Wd(r),c=n.next,u=e.previous,l=n._.r,h=e._.r;do{if(l<=h){if(qd(c._,r._)){n=c,e.next=n,n.previous=e,--s;continue t}l+=c._.r,c=c.next}else{if(qd(u._,r._)){(e=u).next=n,n.previous=e,--s;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,a=Hd(e);(r=r.next)!==n;)(o=Hd(r))<a&&(e=r,a=o);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=Id(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}function Gd(t){return Vd(t),t}function Xd(t){return null==t?null:Zd(t)}function Zd(t){if("function"!=typeof t)throw new Error;return t}function Qd(){return 0}function Kd(t){return function(){return t}}function Jd(t){return Math.sqrt(t.value)}function tp(){var t=null,e=1,n=1,r=Qd;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(ep(t)).eachAfter(np(r,.5)).eachBefore(rp(1)):i.eachBefore(ep(Jd)).eachAfter(np(Qd,1)).eachAfter(np(r,i.r/Math.min(e,n))).eachBefore(rp(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=Xd(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:Kd(+t),i):r},i}function ep(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function np(t,e){return function(n){if(r=n.children){var r,i,a,o=r.length,s=t(n)*e||0;if(s)for(i=0;i<o;++i)r[i].r+=s;if(a=Vd(r),s)for(i=0;i<o;++i)r[i].r-=s;n.r=a+s}}}function rp(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function ip(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function ap(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,u=t.value&&(r-e)/t.value;++s<c;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*u}function op(){var t=1,e=1,n=0,r=!1;function i(i){var a=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(r){r.children&&ap(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=s}}(e,a)),r&&i.eachBefore(ip),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i}var sp={depth:-1},cp={};function up(t){return t.id}function lp(t){return t.parentId}function hp(){var t=up,e=lp;function n(n){var r,i,a,o,s,c,u,l=n.length,h=new Array(l),f={};for(i=0;i<l;++i)r=n[i],s=h[i]=new Ld(r),null!=(c=t(r,i,n))&&(c+="")&&(f[u="$"+(s.id=c)]=u in f?cp:s);for(i=0;i<l;++i)if(s=h[i],null!=(c=e(n[i],i,n))&&(c+="")){if(!(o=f["$"+c]))throw new Error("missing: "+c);if(o===cp)throw new Error("ambiguous: "+c);o.children?o.children.push(s):o.children=[s],s.parent=o}else{if(a)throw new Error("multiple roots");a=s}if(!a)throw new Error("no root");if(a.parent=sp,a.eachBefore((function(t){t.depth=t.parent.depth+1,--l})).eachBefore(Bd),a.parent=null,l>0)throw new Error("cycle");return a}return n.id=function(e){return arguments.length?(t=Zd(e),n):t},n.parentId=function(t){return arguments.length?(e=Zd(t),n):e},n}function fp(t,e){return t.parent===e.parent?1:2}function dp(t){var e=t.children;return e?e[0]:t.t}function pp(t){var e=t.children;return e?e[e.length-1]:t.t}function gp(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function yp(t,e,n){return t.a.parent===e.parent?t.a:n}function mp(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function vp(){var t=fp,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,a,o=new mp(t,0),s=[o];e=s.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=e.children[i]=new mp(r[i],i)),n.parent=e;return(o.parent=new mp(null,0)).children=[o],o}(i);if(c.eachAfter(a),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(s);else{var u=i,l=i,h=i;i.eachBefore((function(t){t.x<u.x&&(u=t),t.x>l.x&&(l=t),t.depth>h.depth&&(h=t)}));var f=u===l?1:t(u,l)/2,d=f-u.x,p=e/(l.x+f+d),g=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*g}))}return i}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,a=e,o=e,s=n,c=a.parent.children[0],u=a.m,l=o.m,h=s.m,f=c.m;s=pp(s),a=dp(a),s&&a;)c=dp(c),(o=pp(o)).a=e,(i=s.z+h-a.z-u+t(s._,a._))>0&&(gp(yp(s,e,r),e,i),u+=i,l+=i),h+=s.m,u+=a.m,f+=c.m,l+=o.m;s&&!pp(o)&&(o.t=s,o.m+=h-l),a&&!dp(c)&&(c.t=a,c.m+=u-f,r=e)}return r}(e,i,e.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function bp(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,u=t.value&&(i-n)/t.value;++s<c;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*u}mp.prototype=Object.create(Ld.prototype);var _p=(1+Math.sqrt(5))/2;function xp(t,e,n,r,i,a){for(var o,s,c,u,l,h,f,d,p,g,y,m=[],v=e.children,b=0,_=0,x=v.length,w=e.value;b<x;){c=i-n,u=a-r;do{l=v[_++].value}while(!l&&_<x);for(h=f=l,y=l*l*(g=Math.max(u/c,c/u)/(w*t)),p=Math.max(f/y,y/h);_<x;++_){if(l+=s=v[_].value,s<h&&(h=s),s>f&&(f=s),y=l*l*g,(d=Math.max(f/y,y/h))>p){l-=s;break}p=d}m.push(o={value:l,dice:c<u,children:v.slice(b,_)}),o.dice?ap(o,n,r,i,w?r+=u*l/w:a):bp(o,n,r,w?n+=c*l/w:i,a),w-=l,b=_}return m}const wp=function t(e){function n(t,n,r,i,a){xp(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(_p);function kp(){var t=wp,e=!1,n=1,r=1,i=[0],a=Qd,o=Qd,s=Qd,c=Qd,u=Qd;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(ip),t}function h(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<l&&(l=f=(l+f)/2),e.x0=r,e.y0=l,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=a(e)/2,r+=u(e)-n,l+=o(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=c(e)-n)<l&&(l=f=(l+f)/2),t(e,r,l,h,f))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=Zd(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:Kd(+t),l):a},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:Kd(+t),l):o},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Kd(+t),l):s},l.paddingBottom=function(t){return arguments.length?(c="function"==typeof t?t:Kd(+t),l):c},l.paddingLeft=function(t){return arguments.length?(u="function"==typeof t?t:Kd(+t),l):u},l}function Tp(t,e,n,r,i){var a,o,s=t.children,c=s.length,u=new Array(c+1);for(u[0]=o=a=0;a<c;++a)u[a+1]=o+=s[a].value;!function t(e,n,r,i,a,o,c){if(e>=n-1){var l=s[e];return l.x0=i,l.y0=a,l.x1=o,void(l.y1=c)}for(var h=u[e],f=r/2+h,d=e+1,p=n-1;d<p;){var g=d+p>>>1;u[g]<f?d=g+1:p=g}f-u[d-1]<u[d]-f&&e+1<d&&--d;var y=u[d]-h,m=r-y;if(o-i>c-a){var v=(i*m+o*y)/r;t(e,d,y,i,a,v,c),t(d,n,m,v,a,o,c)}else{var b=(a*m+c*y)/r;t(e,d,y,i,a,o,b),t(d,n,m,i,b,o,c)}}(0,c,t.value,e,n,r,i)}function Cp(t,e,n,r,i){(1&t.depth?bp:ap)(t,e,n,r,i)}const Ep=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,c,u,l,h=-1,f=o.length,d=t.value;++h<f;){for(c=(s=o[h]).children,u=s.value=0,l=c.length;u<l;++u)s.value+=c[u].value;s.dice?ap(s,n,r,i,r+=(a-r)*s.value/d):bp(s,n,r,n+=(i-n)*s.value/d,a),d-=s.value}else t._squarify=o=xp(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(_p);function Sp(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function Ap(t,e){var n=dn(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}}function Mp(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Np=Math.SQRT2;function Dp(t){return((t=Math.exp(t))+1/t)/2}function Bp(t,e){var n,r,i=t[0],a=t[1],o=t[2],s=e[0],c=e[1],u=e[2],l=s-i,h=c-a,f=l*l+h*h;if(f<1e-12)r=Math.log(u/o)/Np,n=function(t){return[i+t*l,a+t*h,o*Math.exp(Np*t*r)]};else{var d=Math.sqrt(f),p=(u*u-o*o+4*f)/(2*o*2*d),g=(u*u-o*o-4*f)/(2*u*2*d),y=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(g*g+1)-g);r=(m-y)/Np,n=function(t){var e,n=t*r,s=Dp(y),c=o/(2*d)*(s*(e=Np*n+y,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[i+c*l,a+c*h,o*s/Dp(Np*n+y)]}}return n.duration=1e3*r,n}function Lp(t){return function(e,n){var r=t((e=an(e)).h,(n=an(n)).h),i=pn(e.s,n.s),a=pn(e.l,n.l),o=pn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+""}}}const Op=Lp(dn);var Ip=Lp(pn);function Rp(t,e){var n=pn((t=Ta(t)).l,(e=Ta(e)).l),r=pn(t.a,e.a),i=pn(t.b,e.b),a=pn(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+""}}function Fp(t){return function(e,n){var r=t((e=Ba(e)).h,(n=Ba(n)).h),i=pn(e.c,n.c),a=pn(e.l,n.l),o=pn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}const Pp=Fp(dn);var Yp=Fp(pn);function jp(t){return function e(n){function r(e,r){var i=t((e=qa(e)).h,(r=qa(r)).h),a=pn(e.s,r.s),o=pn(e.l,r.l),s=pn(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}const Up=jp(dn);var zp=jp(pn);function $p(t,e){for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n<r;)a[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return a[e](t-e)}}function qp(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}function Hp(t){for(var e,n=-1,r=t.length,i=t[r-1],a=0;++n<r;)e=i,i=t[n],a+=e[1]*i[0]-e[0]*i[1];return a/2}function Wp(t){for(var e,n,r=-1,i=t.length,a=0,o=0,s=t[i-1],c=0;++r<i;)e=s,s=t[r],c+=n=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*n,o+=(e[1]+s[1])*n;return[a/(c*=3),o/c]}function Vp(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function Gp(t,e){return t[0]-e[0]||t[1]-e[1]}function Xp(t){for(var e=t.length,n=[0,1],r=2,i=2;i<e;++i){for(;r>1&&Vp(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function Zp(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(Gp),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var a=Xp(r),o=Xp(i),s=o[0]===a[0],c=o[o.length-1]===a[a.length-1],u=[];for(e=a.length-1;e>=0;--e)u.push(t[r[a[e]][2]]);for(e=+s;e<o.length-c;++e)u.push(t[r[o[e]][2]]);return u}function Qp(t,e){for(var n,r,i=t.length,a=t[i-1],o=e[0],s=e[1],c=a[0],u=a[1],l=!1,h=0;h<i;++h)n=(a=t[h])[0],(r=a[1])>s!=u>s&&o<(c-n)*(s-r)/(u-r)+n&&(l=!l),c=n,u=r;return l}function Kp(t){for(var e,n,r=-1,i=t.length,a=t[i-1],o=a[0],s=a[1],c=0;++r<i;)e=o,n=s,e-=o=(a=t[r])[0],n-=s=a[1],c+=Math.sqrt(e*e+n*n);return c}function Jp(){return Math.random()}const tg=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(Jp),eg=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(Jp),ng=function t(e){function n(){var t=eg.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(Jp),rg=function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(Jp),ig=function t(e){function n(t){var n=rg.source(e)(t);return function(){return n()/t}}return n.source=t,n}(Jp),ag=function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(Jp);function og(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function sg(t,e){switch(arguments.length){case 0:break;case 1:this.interpolator(t);break;default:this.interpolator(e).domain(t)}return this}var cg=Array.prototype,ug=cg.map,lg=cg.slice,hg={name:"implicit"};function fg(){var t=na(),e=[],n=[],r=hg;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==hg)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=na();for(var r,a,o=-1,s=n.length;++o<s;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=lg.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return fg(e,n).unknown(r)},og.apply(i,arguments),i}function dg(){var t,e,n=fg().unknown(void 0),r=n.domain,i=n.range,a=[0,1],o=!1,s=0,c=0,u=.5;function l(){var n=r().length,l=a[1]<a[0],h=a[l-0],f=a[1-l];t=(f-h)/Math.max(1,n-s+2*c),o&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*u,e=t*(1-s),o&&(h=Math.round(h),e=Math.round(e));var d=k(n).map((function(e){return h+t*e}));return i(l?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),l()):r()},n.range=function(t){return arguments.length?(a=[+t[0],+t[1]],l()):a.slice()},n.rangeRound=function(t){return a=[+t[0],+t[1]],o=!0,l()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,l()):o},n.padding=function(t){return arguments.length?(s=Math.min(1,c=+t),l()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),l()):s},n.paddingOuter=function(t){return arguments.length?(c=+t,l()):c},n.align=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),l()):u},n.copy=function(){return dg(r(),a).round(o).paddingInner(s).paddingOuter(c).align(u)},og.apply(l(),arguments)}function pg(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return pg(e())},t}function gg(){return pg(dg.apply(null,arguments).paddingInner(1))}function yg(t){return+t}var mg=[0,1];function vg(t){return t}function bg(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function _g(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function xg(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=bg(i,r),a=n(o,a)):(r=bg(r,i),a=n(a,o)),function(t){return a(r(t))}}function wg(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=bg(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=u(t,e,1,r)-1;return a[n](i[n](e))}}function kg(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Tg(){var t,e,n,r,i,a,o=mg,s=mg,c=Mn,u=vg;function l(){return r=Math.min(o.length,s.length)>2?wg:xg,i=a=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,c)))(t(u(e)))}return h.invert=function(n){return u(e((a||(a=r(s,o.map(t),Tn)))(n)))},h.domain=function(t){return arguments.length?(o=ug.call(t,yg),u===vg||(u=_g(o)),l()):o.slice()},h.range=function(t){return arguments.length?(s=lg.call(t),l()):s.slice()},h.rangeRound=function(t){return s=lg.call(t),c=Mp,l()},h.clamp=function(t){return arguments.length?(u=t?_g(o):vg,h):u!==vg},h.interpolate=function(t){return arguments.length?(c=t,l()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}function Cg(t,e){return Tg()(t,e)}function Eg(t,e,n,r){var i,a=M(t,e,n);switch((r=cc(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=xc(a,o))||(r.precision=i),gc(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=wc(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=_c(a))||(r.precision=i-2*("%"===r.type))}return pc(r)}function Sg(t){var e=t.domain;return t.ticks=function(t){var n=e();return S(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Eg(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,s=i[a],c=i[o];return c<s&&(r=s,s=c,c=r,r=a,a=o,o=r),(r=A(s,c,n))>0?r=A(s=Math.floor(s/r)*r,c=Math.ceil(c/r)*r,n):r<0&&(r=A(s=Math.ceil(s*r)/r,c=Math.floor(c*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(c/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(c*r)/r,e(i)),t},t}function Ag(){var t=Cg(vg,vg);return t.copy=function(){return kg(t,Ag())},og.apply(t,arguments),Sg(t)}function Mg(t){var e;function n(t){return isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=ug.call(e,yg),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return Mg(t).unknown(e)},t=arguments.length?ug.call(t,yg):[0,1],Sg(n)}function Ng(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function Dg(t){return Math.log(t)}function Bg(t){return Math.exp(t)}function Lg(t){return-Math.log(-t)}function Og(t){return-Math.exp(-t)}function Ig(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Rg(t){return function(e){return-t(-e)}}function Fg(t){var e,n,r=t(Dg,Bg),i=r.domain,a=10;function o(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(a),n=function(t){return 10===t?Ig:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=Rg(e),n=Rg(n),t(Lg,Og)):t(Dg,Bg),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),s=o[0],c=o[o.length-1];(r=c<s)&&(f=s,s=c,c=f);var u,l,h,f=e(s),d=e(c),p=null==t?10:+t,g=[];if(!(a%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(l=1,u=n(f);l<a;++l)if(!((h=u*l)<s)){if(h>c)break;g.push(h)}}else for(;f<d;++f)for(l=a-1,u=n(f);l>=1;--l)if(!((h=u*l)<s)){if(h>c)break;g.push(h)}}else g=S(f,d,Math.min(d-f,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=pc(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(Ng(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function Pg(){var t=Fg(Tg()).domain([1,10]);return t.copy=function(){return kg(t,Pg()).base(t.base())},og.apply(t,arguments),t}function Yg(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function jg(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Ug(t){var e=1,n=t(Yg(e),jg(e));return n.constant=function(n){return arguments.length?t(Yg(e=+n),jg(e)):e},Sg(n)}function zg(){var t=Ug(Tg());return t.copy=function(){return kg(t,zg()).constant(t.constant())},og.apply(t,arguments)}function $g(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function qg(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Hg(t){return t<0?-t*t:t*t}function Wg(t){var e=t(vg,vg),n=1;function r(){return 1===n?t(vg,vg):.5===n?t(qg,Hg):t($g(n),$g(1/n))}return e.exponent=function(t){return arguments.length?(n=+t,r()):n},Sg(e)}function Vg(){var t=Wg(Tg());return t.copy=function(){return kg(t,Vg()).exponent(t.exponent())},og.apply(t,arguments),t}function Gg(){return Vg.apply(null,arguments).exponent(.5)}function Xg(){var t,e=[],n=[],r=[];function a(){var t=0,i=Math.max(1,n.length);for(r=new Array(i-1);++t<i;)r[t-1]=B(e,t/i);return o}function o(e){return isNaN(e=+e)?t:n[u(r,e)]}return o.invertExtent=function(t){var i=n.indexOf(t);return i<0?[NaN,NaN]:[i>0?r[i-1]:e[0],i<r.length?r[i]:e[e.length-1]]},o.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var n,r=0,o=t.length;r<o;++r)null==(n=t[r])||isNaN(n=+n)||e.push(n);return e.sort(i),a()},o.range=function(t){return arguments.length?(n=lg.call(t),a()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return r.slice()},o.copy=function(){return Xg().domain(e).range(n).unknown(t)},og.apply(o,arguments)}function Zg(){var t,e=0,n=1,r=1,i=[.5],a=[0,1];function o(e){return e<=e?a[u(i,e,0,r)]:t}function s(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*e)/(r+1);return o}return o.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],s()):[e,n]},o.range=function(t){return arguments.length?(r=(a=lg.call(t)).length-1,s()):a.slice()},o.invertExtent=function(t){var o=a.indexOf(t);return o<0?[NaN,NaN]:o<1?[e,i[0]]:o>=r?[i[r-1],n]:[i[o-1],i[o]]},o.unknown=function(e){return arguments.length?(t=e,o):o},o.thresholds=function(){return i.slice()},o.copy=function(){return Zg().domain([e,n]).range(a).unknown(t)},og.apply(Sg(o),arguments)}function Qg(){var t,e=[.5],n=[0,1],r=1;function i(i){return i<=i?n[u(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=lg.call(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=lg.call(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return Qg().domain(e).range(n).unknown(t)},og.apply(i,arguments)}var Kg=new Date,Jg=new Date;function ty(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return ty((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Kg.setTime(+e),Jg.setTime(+r),t(Kg),t(Jg),Math.floor(n(Kg,Jg))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var ey=ty((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));ey.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ty((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};const ny=ey;var ry=ey.range,iy=ty((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}));const ay=iy;var oy=iy.range,sy=1e3,cy=6e4,uy=36e5,ly=864e5,hy=6048e5;function fy(t){return ty((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*cy)/hy}))}var dy=fy(0),py=fy(1),gy=fy(2),yy=fy(3),my=fy(4),vy=fy(5),by=fy(6),_y=dy.range,xy=py.range,wy=gy.range,ky=yy.range,Ty=my.range,Cy=vy.range,Ey=by.range,Sy=ty((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*cy)/ly}),(function(t){return t.getDate()-1}));const Ay=Sy;var My=Sy.range,Ny=ty((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*sy-t.getMinutes()*cy)}),(function(t,e){t.setTime(+t+e*uy)}),(function(t,e){return(e-t)/uy}),(function(t){return t.getHours()}));const Dy=Ny;var By=Ny.range,Ly=ty((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*sy)}),(function(t,e){t.setTime(+t+e*cy)}),(function(t,e){return(e-t)/cy}),(function(t){return t.getMinutes()}));const Oy=Ly;var Iy=Ly.range,Ry=ty((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*sy)}),(function(t,e){return(e-t)/sy}),(function(t){return t.getUTCSeconds()}));const Fy=Ry;var Py=Ry.range,Yy=ty((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Yy.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ty((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Yy:null};const jy=Yy;var Uy=Yy.range;function zy(t){return ty((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/hy}))}var $y=zy(0),qy=zy(1),Hy=zy(2),Wy=zy(3),Vy=zy(4),Gy=zy(5),Xy=zy(6),Zy=$y.range,Qy=qy.range,Ky=Hy.range,Jy=Wy.range,tm=Vy.range,em=Gy.range,nm=Xy.range,rm=ty((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/ly}),(function(t){return t.getUTCDate()-1}));const im=rm;var am=rm.range,om=ty((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));om.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ty((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};const sm=om;var cm=om.range;function um(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function lm(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function hm(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function fm(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,u=Tm(i),l=Cm(i),h=Tm(a),f=Cm(a),d=Tm(o),p=Cm(o),g=Tm(s),y=Cm(s),m=Tm(c),v=Cm(c),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Wm,e:Wm,f:Qm,g:cv,G:lv,H:Vm,I:Gm,j:Xm,L:Zm,m:Km,M:Jm,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Lv,s:Ov,S:tv,u:ev,U:nv,V:iv,w:av,W:ov,x:null,X:null,y:sv,Y:uv,Z:hv,"%":Bv},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:fv,e:fv,f:mv,g:Av,G:Nv,H:dv,I:pv,j:gv,L:yv,m:vv,M:bv,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Lv,s:Ov,S:_v,u:xv,U:wv,V:Tv,w:Cv,W:Ev,x:null,X:null,y:Sv,Y:Mv,Z:Dv,"%":Bv},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return T(t,e,n,r)},d:Rm,e:Rm,f:zm,g:Bm,G:Dm,H:Pm,I:Pm,j:Fm,L:Um,m:Im,M:Ym,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:Om,Q:qm,s:Hm,S:jm,u:Sm,U:Am,V:Mm,w:Em,W:Nm,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:Bm,Y:Dm,Z:Lm,"%":$m};function w(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===t.charCodeAt(s)&&(o.push(t.slice(c,s)),null!=(i=vm[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),c=s+1);return o.push(t.slice(c,s)),o.join("")}}function k(t,e){return function(n){var r,i,a=hm(1900,void 0,1);if(T(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=lm(hm(a.y,0,1))).getUTCDay(),r=i>4||0===i?qy.ceil(r):qy(r),r=im.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=um(hm(a.y,0,1))).getDay(),r=i>4||0===i?py.ceil(r):py(r),r=Ay.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?lm(hm(a.y,0,1)).getUTCDay():um(hm(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,lm(a)):um(a)}}function T(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o<s;){if(r>=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in vm?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),{format:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}var dm,pm,gm,ym,mm,vm={"-":"",_:" ",0:"0"},bm=/^\s*\d+/,_m=/^%/,xm=/[\\^$*+?|[\]().{}]/g;function wm(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function km(t){return t.replace(xm,"\\$&")}function Tm(t){return new RegExp("^(?:"+t.map(km).join("|")+")","i")}function Cm(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function Em(t,e,n){var r=bm.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Sm(t,e,n){var r=bm.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Am(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Mm(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Nm(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Dm(t,e,n){var r=bm.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Bm(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Lm(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Om(t,e,n){var r=bm.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Im(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Rm(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Fm(t,e,n){var r=bm.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Pm(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ym(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function jm(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Um(t,e,n){var r=bm.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function zm(t,e,n){var r=bm.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function $m(t,e,n){var r=_m.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function qm(t,e,n){var r=bm.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Hm(t,e,n){var r=bm.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Wm(t,e){return wm(t.getDate(),e,2)}function Vm(t,e){return wm(t.getHours(),e,2)}function Gm(t,e){return wm(t.getHours()%12||12,e,2)}function Xm(t,e){return wm(1+Ay.count(ny(t),t),e,3)}function Zm(t,e){return wm(t.getMilliseconds(),e,3)}function Qm(t,e){return Zm(t,e)+"000"}function Km(t,e){return wm(t.getMonth()+1,e,2)}function Jm(t,e){return wm(t.getMinutes(),e,2)}function tv(t,e){return wm(t.getSeconds(),e,2)}function ev(t){var e=t.getDay();return 0===e?7:e}function nv(t,e){return wm(dy.count(ny(t)-1,t),e,2)}function rv(t){var e=t.getDay();return e>=4||0===e?my(t):my.ceil(t)}function iv(t,e){return t=rv(t),wm(my.count(ny(t),t)+(4===ny(t).getDay()),e,2)}function av(t){return t.getDay()}function ov(t,e){return wm(py.count(ny(t)-1,t),e,2)}function sv(t,e){return wm(t.getFullYear()%100,e,2)}function cv(t,e){return wm((t=rv(t)).getFullYear()%100,e,2)}function uv(t,e){return wm(t.getFullYear()%1e4,e,4)}function lv(t,e){var n=t.getDay();return wm((t=n>=4||0===n?my(t):my.ceil(t)).getFullYear()%1e4,e,4)}function hv(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+wm(e/60|0,"0",2)+wm(e%60,"0",2)}function fv(t,e){return wm(t.getUTCDate(),e,2)}function dv(t,e){return wm(t.getUTCHours(),e,2)}function pv(t,e){return wm(t.getUTCHours()%12||12,e,2)}function gv(t,e){return wm(1+im.count(sm(t),t),e,3)}function yv(t,e){return wm(t.getUTCMilliseconds(),e,3)}function mv(t,e){return yv(t,e)+"000"}function vv(t,e){return wm(t.getUTCMonth()+1,e,2)}function bv(t,e){return wm(t.getUTCMinutes(),e,2)}function _v(t,e){return wm(t.getUTCSeconds(),e,2)}function xv(t){var e=t.getUTCDay();return 0===e?7:e}function wv(t,e){return wm($y.count(sm(t)-1,t),e,2)}function kv(t){var e=t.getUTCDay();return e>=4||0===e?Vy(t):Vy.ceil(t)}function Tv(t,e){return t=kv(t),wm(Vy.count(sm(t),t)+(4===sm(t).getUTCDay()),e,2)}function Cv(t){return t.getUTCDay()}function Ev(t,e){return wm(qy.count(sm(t)-1,t),e,2)}function Sv(t,e){return wm(t.getUTCFullYear()%100,e,2)}function Av(t,e){return wm((t=kv(t)).getUTCFullYear()%100,e,2)}function Mv(t,e){return wm(t.getUTCFullYear()%1e4,e,4)}function Nv(t,e){var n=t.getUTCDay();return wm((t=n>=4||0===n?Vy(t):Vy.ceil(t)).getUTCFullYear()%1e4,e,4)}function Dv(){return"+0000"}function Bv(){return"%"}function Lv(t){return+t}function Ov(t){return Math.floor(+t/1e3)}function Iv(t){return dm=fm(t),pm=dm.format,gm=dm.parse,ym=dm.utcFormat,mm=dm.utcParse,dm}Iv({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Rv=31536e6;function Fv(t){return new Date(t)}function Pv(t){return t instanceof Date?+t:+new Date(+t)}function Yv(t,e,n,r,i,o,s,c,u){var l=Cg(vg,vg),h=l.invert,f=l.domain,d=u(".%L"),p=u(":%S"),g=u("%I:%M"),y=u("%I %p"),m=u("%a %d"),v=u("%b %d"),b=u("%B"),_=u("%Y"),x=[[s,1,1e3],[s,5,5e3],[s,15,15e3],[s,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,Rv]];function w(a){return(s(a)<a?d:o(a)<a?p:i(a)<a?g:r(a)<a?y:e(a)<a?n(a)<a?m:v:t(a)<a?b:_)(a)}function k(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,s=a((function(t){return t[2]})).right(x,o);s===x.length?(i=M(n/Rv,r/Rv,e),e=t):s?(i=(s=x[o/x[s-1][2]<x[s][2]/o?s-1:s])[1],e=s[0]):(i=Math.max(M(n,r,e),1),e=c)}return null==i?e:e.every(i)}return l.invert=function(t){return new Date(h(t))},l.domain=function(t){return arguments.length?f(ug.call(t,Pv)):f().map(Fv)},l.ticks=function(t,e){var n,r=f(),i=r[0],a=r[r.length-1],o=a<i;return o&&(n=i,i=a,a=n),n=(n=k(t,i,a,e))?n.range(i,a+1):[],o?n.reverse():n},l.tickFormat=function(t,e){return null==e?w:u(e)},l.nice=function(t,e){var n=f();return(t=k(t,n[0],n[n.length-1],e))?f(Ng(n,t)):l},l.copy=function(){return kg(l,Yv(t,e,n,r,i,o,s,c,u))},l}function jv(){return og.apply(Yv(ny,ay,dy,Ay,Dy,Oy,Fy,jy,pm).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var Uv=ty((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}));const zv=Uv;var $v=Uv.range,qv=ty((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*uy)}),(function(t,e){return(e-t)/uy}),(function(t){return t.getUTCHours()}));const Hv=qv;var Wv=qv.range,Vv=ty((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*cy)}),(function(t,e){return(e-t)/cy}),(function(t){return t.getUTCMinutes()}));const Gv=Vv;var Xv=Vv.range;function Zv(){return og.apply(Yv(sm,zv,$y,im,Hv,Gv,Fy,jy,ym).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Qv(){var t,e,n,r,i,a=0,o=1,s=vg,c=!1;function u(e){return isNaN(e=+e)?i:s(0===n?.5:(e=(r(e)-t)*n,c?Math.max(0,Math.min(1,e)):e))}return u.domain=function(i){return arguments.length?(t=r(a=+i[0]),e=r(o=+i[1]),n=t===e?0:1/(e-t),u):[a,o]},u.clamp=function(t){return arguments.length?(c=!!t,u):c},u.interpolator=function(t){return arguments.length?(s=t,u):s},u.unknown=function(t){return arguments.length?(i=t,u):i},function(i){return r=i,t=i(a),e=i(o),n=t===e?0:1/(e-t),u}}function Kv(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Jv(){var t=Sg(Qv()(vg));return t.copy=function(){return Kv(t,Jv())},sg.apply(t,arguments)}function tb(){var t=Fg(Qv()).domain([1,10]);return t.copy=function(){return Kv(t,tb()).base(t.base())},sg.apply(t,arguments)}function eb(){var t=Ug(Qv());return t.copy=function(){return Kv(t,eb()).constant(t.constant())},sg.apply(t,arguments)}function nb(){var t=Wg(Qv());return t.copy=function(){return Kv(t,nb()).exponent(t.exponent())},sg.apply(t,arguments)}function rb(){return nb.apply(null,arguments).exponent(.5)}function ib(){var t=[],e=vg;function n(n){if(!isNaN(n=+n))return e((u(t,n)-1)/(t.length-1))}return n.domain=function(e){if(!arguments.length)return t.slice();t=[];for(var r,a=0,o=e.length;a<o;++a)null==(r=e[a])||isNaN(r=+r)||t.push(r);return t.sort(i),n},n.interpolator=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return ib(e).domain(t)},sg.apply(n,arguments)}function ab(){var t,e,n,r,i,a,o,s=0,c=.5,u=1,l=vg,h=!1;function f(t){return isNaN(t=+t)?o:(t=.5+((t=+a(t))-e)*(t<e?r:i),l(h?Math.max(0,Math.min(1,t)):t))}return f.domain=function(o){return arguments.length?(t=a(s=+o[0]),e=a(c=+o[1]),n=a(u=+o[2]),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),f):[s,c,u]},f.clamp=function(t){return arguments.length?(h=!!t,f):h},f.interpolator=function(t){return arguments.length?(l=t,f):l},f.unknown=function(t){return arguments.length?(o=t,f):o},function(o){return a=o,t=o(s),e=o(c),n=o(u),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),f}}function ob(){var t=Sg(ab()(vg));return t.copy=function(){return Kv(t,ob())},sg.apply(t,arguments)}function sb(){var t=Fg(ab()).domain([.1,1,10]);return t.copy=function(){return Kv(t,sb()).base(t.base())},sg.apply(t,arguments)}function cb(){var t=Ug(ab());return t.copy=function(){return Kv(t,cb()).constant(t.constant())},sg.apply(t,arguments)}function ub(){var t=Wg(ab());return t.copy=function(){return Kv(t,ub()).exponent(t.exponent())},sg.apply(t,arguments)}function lb(){return ub.apply(null,arguments).exponent(.5)}function hb(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}const fb=hb("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),db=hb("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),pb=hb("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),gb=hb("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),yb=hb("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),mb=hb("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),vb=hb("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),bb=hb("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),_b=hb("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),xb=hb("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function wb(t){return mn(t[t.length-1])}var kb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(hb);const Tb=wb(kb);var Cb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(hb);const Eb=wb(Cb);var Sb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(hb);const Ab=wb(Sb);var Mb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(hb);const Nb=wb(Mb);var Db=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(hb);const Bb=wb(Db);var Lb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(hb);const Ob=wb(Lb);var Ib=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(hb);const Rb=wb(Ib);var Fb=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(hb);const Pb=wb(Fb);var Yb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(hb);const jb=wb(Yb);var Ub=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(hb);const zb=wb(Ub);var $b=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(hb);const qb=wb($b);var Hb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(hb);const Wb=wb(Hb);var Vb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(hb);const Gb=wb(Vb);var Xb=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(hb);const Zb=wb(Xb);var Qb=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(hb);const Kb=wb(Qb);var Jb=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(hb);const t_=wb(Jb);var e_=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(hb);const n_=wb(e_);var r_=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(hb);const i_=wb(r_);var a_=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(hb);const o_=wb(a_);var s_=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(hb);const c_=wb(s_);var u_=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(hb);const l_=wb(u_);var h_=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(hb);const f_=wb(h_);var d_=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(hb);const p_=wb(d_);var g_=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(hb);const y_=wb(g_);var m_=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(hb);const v_=wb(m_);var b_=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(hb);const __=wb(b_);var x_=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(hb);const w_=wb(x_);function k_(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"}const T_=zp(qa(300,.5,0),qa(-240,.5,1));var C_=zp(qa(-100,.75,.35),qa(80,1.5,.8)),E_=zp(qa(260,.75,.35),qa(80,1.5,.8)),S_=qa();function A_(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return S_.h=360*t-100,S_.s=1.5-1.5*e,S_.l=.8-.9*e,S_+""}var M_=Qe(),N_=Math.PI/3,D_=2*Math.PI/3;function B_(t){var e;return t=(.5-t)*Math.PI,M_.r=255*(e=Math.sin(t))*e,M_.g=255*(e=Math.sin(t+N_))*e,M_.b=255*(e=Math.sin(t+D_))*e,M_+""}function L_(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"}function O_(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const I_=O_(hb("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var R_=O_(hb("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),F_=O_(hb("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),P_=O_(hb("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function Y_(t){return Te(ie(t).call(document.documentElement))}var j_=0;function U_(){return new z_}function z_(){this._="@"+(++j_).toString(36)}function $_(t){return"string"==typeof t?new xe([document.querySelectorAll(t)],[document.documentElement]):new xe([null==t?[]:t],_e)}function q_(t,e){null==e&&(e=Nn().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=Dn(t,e[n]);return i}function H_(t){return function(){return t}}z_.prototype=U_.prototype={constructor:z_,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var W_=Math.abs,V_=Math.atan2,G_=Math.cos,X_=Math.max,Z_=Math.min,Q_=Math.sin,K_=Math.sqrt,J_=1e-12,tx=Math.PI,ex=tx/2,nx=2*tx;function rx(t){return t>1?0:t<-1?tx:Math.acos(t)}function ix(t){return t>=1?ex:t<=-1?-ex:Math.asin(t)}function ax(t){return t.innerRadius}function ox(t){return t.outerRadius}function sx(t){return t.startAngle}function cx(t){return t.endAngle}function ux(t){return t&&t.padAngle}function lx(t,e,n,r,i,a,o,s){var c=n-t,u=r-e,l=o-i,h=s-a,f=h*c-l*u;if(!(f*f<J_))return[t+(f=(l*(e-a)-h*(t-i))/f)*c,e+f*u]}function hx(t,e,n,r,i,a,o){var s=t-n,c=e-r,u=(o?a:-a)/K_(s*s+c*c),l=u*c,h=-u*s,f=t+l,d=e+h,p=n+l,g=r+h,y=(f+p)/2,m=(d+g)/2,v=p-f,b=g-d,_=v*v+b*b,x=i-a,w=f*g-p*d,k=(b<0?-1:1)*K_(X_(0,x*x*_-w*w)),T=(w*b-v*k)/_,C=(-w*v-b*k)/_,E=(w*b+v*k)/_,S=(-w*v+b*k)/_,A=T-y,M=C-m,N=E-y,D=S-m;return A*A+M*M>N*N+D*D&&(T=E,C=S),{cx:T,cy:C,x01:-l,y01:-h,x11:T*(i/x-1),y11:C*(i/x-1)}}function fx(){var t=ax,e=ox,n=H_(0),r=null,i=sx,a=cx,o=ux,s=null;function c(){var c,u,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-ex,d=a.apply(this,arguments)-ex,p=W_(d-f),g=d>f;if(s||(s=c=Wi()),h<l&&(u=h,h=l,l=u),h>J_)if(p>nx-J_)s.moveTo(h*G_(f),h*Q_(f)),s.arc(0,0,h,f,d,!g),l>J_&&(s.moveTo(l*G_(d),l*Q_(d)),s.arc(0,0,l,d,f,g));else{var y,m,v=f,b=d,_=f,x=d,w=p,k=p,T=o.apply(this,arguments)/2,C=T>J_&&(r?+r.apply(this,arguments):K_(l*l+h*h)),E=Z_(W_(h-l)/2,+n.apply(this,arguments)),S=E,A=E;if(C>J_){var M=ix(C/l*Q_(T)),N=ix(C/h*Q_(T));(w-=2*M)>J_?(_+=M*=g?1:-1,x-=M):(w=0,_=x=(f+d)/2),(k-=2*N)>J_?(v+=N*=g?1:-1,b-=N):(k=0,v=b=(f+d)/2)}var D=h*G_(v),B=h*Q_(v),L=l*G_(x),O=l*Q_(x);if(E>J_){var I,R=h*G_(b),F=h*Q_(b),P=l*G_(_),Y=l*Q_(_);if(p<tx&&(I=lx(D,B,P,Y,R,F,L,O))){var j=D-I[0],U=B-I[1],z=R-I[0],$=F-I[1],q=1/Q_(rx((j*z+U*$)/(K_(j*j+U*U)*K_(z*z+$*$)))/2),H=K_(I[0]*I[0]+I[1]*I[1]);S=Z_(E,(l-H)/(q-1)),A=Z_(E,(h-H)/(q+1))}}k>J_?A>J_?(y=hx(P,Y,D,B,h,A,g),m=hx(R,F,L,O,h,A,g),s.moveTo(y.cx+y.x01,y.cy+y.y01),A<E?s.arc(y.cx,y.cy,A,V_(y.y01,y.x01),V_(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,A,V_(y.y01,y.x01),V_(y.y11,y.x11),!g),s.arc(0,0,h,V_(y.cy+y.y11,y.cx+y.x11),V_(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,V_(m.y11,m.x11),V_(m.y01,m.x01),!g))):(s.moveTo(D,B),s.arc(0,0,h,v,b,!g)):s.moveTo(D,B),l>J_&&w>J_?S>J_?(y=hx(L,O,R,F,l,-S,g),m=hx(D,B,P,Y,l,-S,g),s.lineTo(y.cx+y.x01,y.cy+y.y01),S<E?s.arc(y.cx,y.cy,S,V_(y.y01,y.x01),V_(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,S,V_(y.y01,y.x01),V_(y.y11,y.x11),!g),s.arc(0,0,l,V_(y.cy+y.y11,y.cx+y.x11),V_(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,S,V_(m.y11,m.x11),V_(m.y01,m.x01),!g))):s.arc(0,0,l,x,_,g):s.lineTo(L,O)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-tx/2;return[G_(r)*n,Q_(r)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:H_(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:H_(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:H_(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:H_(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:H_(+t),c):i},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:H_(+t),c):a},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:H_(+t),c):o},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c}function dx(t){this._context=t}function px(t){return new dx(t)}function gx(t){return t[0]}function yx(t){return t[1]}function mx(){var t=gx,e=yx,n=H_(!0),r=null,i=px,a=null;function o(o){var s,c,u,l=o.length,h=!1;for(null==r&&(a=i(u=Wi())),s=0;s<=l;++s)!(s<l&&n(c=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(c,s,o),+e(c,s,o));if(u)return a=null,u+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:H_(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:H_(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:H_(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}function vx(){var t=gx,e=null,n=H_(0),r=yx,i=H_(!0),a=null,o=px,s=null;function c(c){var u,l,h,f,d,p=c.length,g=!1,y=new Array(p),m=new Array(p);for(null==a&&(s=o(d=Wi())),u=0;u<=p;++u){if(!(u<p&&i(f=c[u],u,c))===g)if(g=!g)l=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=u-1;h>=l;--h)s.point(y[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(y[u]=+t(f,u,c),m[u]=+n(f,u,c),s.point(e?+e(f,u,c):y[u],r?+r(f,u,c):m[u]))}if(d)return s=null,d+""||null}function u(){return mx().defined(i).curve(o).context(a)}return c.x=function(n){return arguments.length?(t="function"==typeof n?n:H_(+n),e=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:H_(+e),c):t},c.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:H_(+t),c):e},c.y=function(t){return arguments.length?(n="function"==typeof t?t:H_(+t),r=null,c):n},c.y0=function(t){return arguments.length?(n="function"==typeof t?t:H_(+t),c):n},c.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:H_(+t),c):r},c.lineX0=c.lineY0=function(){return u().x(t).y(n)},c.lineY1=function(){return u().x(t).y(r)},c.lineX1=function(){return u().x(e).y(n)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:H_(!!t),c):i},c.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),c):a},c}function bx(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function _x(t){return t}function xx(){var t=_x,e=bx,n=null,r=H_(0),i=H_(nx),a=H_(0);function o(o){var s,c,u,l,h,f=o.length,d=0,p=new Array(f),g=new Array(f),y=+r.apply(this,arguments),m=Math.min(nx,Math.max(-nx,i.apply(this,arguments)-y)),v=Math.min(Math.abs(m)/f,a.apply(this,arguments)),b=v*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(o[s],s,o))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),s=0,u=d?(m-f*b)/d:0;s<f;++s,y=l)c=p[s],l=y+((h=g[c])>0?h*u:0)+b,g[c]={data:o[c],index:s,value:h,startAngle:y,endAngle:l,padAngle:v};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:H_(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:H_(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:H_(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:H_(+t),o):a},o}dx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var wx=Tx(px);function kx(t){this._curve=t}function Tx(t){function e(e){return new kx(t(e))}return e._curve=t,e}function Cx(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(Tx(t)):e()._curve},t}function Ex(){return Cx(mx().curve(wx))}function Sx(){var t=vx().curve(wx),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Cx(n())},delete t.lineX0,t.lineEndAngle=function(){return Cx(r())},delete t.lineX1,t.lineInnerRadius=function(){return Cx(i())},delete t.lineY0,t.lineOuterRadius=function(){return Cx(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(Tx(t)):e()._curve},t}function Ax(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}kx.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var Mx=Array.prototype.slice;function Nx(t){return t.source}function Dx(t){return t.target}function Bx(t){var e=Nx,n=Dx,r=gx,i=yx,a=null;function o(){var o,s=Mx.call(arguments),c=e.apply(this,s),u=n.apply(this,s);if(a||(a=o=Wi()),t(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=u,s)),+i.apply(this,s)),o)return a=null,o+""||null}return o.source=function(t){return arguments.length?(e=t,o):e},o.target=function(t){return arguments.length?(n=t,o):n},o.x=function(t){return arguments.length?(r="function"==typeof t?t:H_(+t),o):r},o.y=function(t){return arguments.length?(i="function"==typeof t?t:H_(+t),o):i},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}function Lx(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function Ox(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function Ix(t,e,n,r,i){var a=Ax(e,n),o=Ax(e,n=(n+i)/2),s=Ax(r,n),c=Ax(r,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],c[0],c[1])}function Rx(){return Bx(Lx)}function Fx(){return Bx(Ox)}function Px(){var t=Bx(Ix);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const Yx={draw:function(t,e){var n=Math.sqrt(e/tx);t.moveTo(n,0),t.arc(0,0,n,0,nx)}},jx={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}};var Ux=Math.sqrt(1/3),zx=2*Ux;const $x={draw:function(t,e){var n=Math.sqrt(e/zx),r=n*Ux;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}};var qx=Math.sin(tx/10)/Math.sin(7*tx/10),Hx=Math.sin(nx/10)*qx,Wx=-Math.cos(nx/10)*qx;const Vx={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=Hx*n,i=Wx*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=nx*a/5,s=Math.cos(o),c=Math.sin(o);t.lineTo(c*n,-s*n),t.lineTo(s*r-c*i,c*r+s*i)}t.closePath()}},Gx={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}};var Xx=Math.sqrt(3);const Zx={draw:function(t,e){var n=-Math.sqrt(e/(3*Xx));t.moveTo(0,2*n),t.lineTo(-Xx*n,-n),t.lineTo(Xx*n,-n),t.closePath()}};var Qx=-.5,Kx=Math.sqrt(3)/2,Jx=1/Math.sqrt(12),tw=3*(Jx/2+1);const ew={draw:function(t,e){var n=Math.sqrt(e/tw),r=n/2,i=n*Jx,a=r,o=n*Jx+n,s=-a,c=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,c),t.lineTo(Qx*r-Kx*i,Kx*r+Qx*i),t.lineTo(Qx*a-Kx*o,Kx*a+Qx*o),t.lineTo(Qx*s-Kx*c,Kx*s+Qx*c),t.lineTo(Qx*r+Kx*i,Qx*i-Kx*r),t.lineTo(Qx*a+Kx*o,Qx*o-Kx*a),t.lineTo(Qx*s+Kx*c,Qx*c-Kx*s),t.closePath()}};var nw=[Yx,jx,$x,Gx,Vx,Zx,ew];function rw(){var t=H_(Yx),e=H_(64),n=null;function r(){var r;if(n||(n=r=Wi()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:H_(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:H_(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r}function iw(){}function aw(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function ow(t){this._context=t}function sw(t){return new ow(t)}function cw(t){this._context=t}function uw(t){return new cw(t)}function lw(t){this._context=t}function hw(t){return new lw(t)}function fw(t,e){this._basis=new ow(t),this._beta=e}ow.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:aw(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:aw(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},cw.prototype={areaStart:iw,areaEnd:iw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:aw(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},lw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:aw(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},fw.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,s=e[n]-a,c=-1;++c<=n;)r=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*e[c]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const dw=function t(e){function n(t){return 1===e?new ow(t):new fw(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function pw(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function gw(t,e){this._context=t,this._k=(1-e)/6}gw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:pw(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:pw(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const yw=function t(e){function n(t){return new gw(t,e)}return n.tension=function(e){return t(+e)},n}(0);function mw(t,e){this._context=t,this._k=(1-e)/6}mw.prototype={areaStart:iw,areaEnd:iw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:pw(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const vw=function t(e){function n(t){return new mw(t,e)}return n.tension=function(e){return t(+e)},n}(0);function bw(t,e){this._context=t,this._k=(1-e)/6}bw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:pw(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const _w=function t(e){function n(t){return new bw(t,e)}return n.tension=function(e){return t(+e)},n}(0);function xw(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>J_){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>J_){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function ww(t,e){this._context=t,this._alpha=e}ww.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:xw(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const kw=function t(e){function n(t){return e?new ww(t,e):new gw(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Tw(t,e){this._context=t,this._alpha=e}Tw.prototype={areaStart:iw,areaEnd:iw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:xw(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Cw=function t(e){function n(t){return e?new Tw(t,e):new mw(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ew(t,e){this._context=t,this._alpha=e}Ew.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:xw(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Sw=function t(e){function n(t){return e?new Ew(t,e):new bw(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Aw(t){this._context=t}function Mw(t){return new Aw(t)}function Nw(t){return t<0?-1:1}function Dw(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Nw(a)+Nw(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Bw(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Lw(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function Ow(t){this._context=t}function Iw(t){this._context=new Rw(t)}function Rw(t){this._context=t}function Fw(t){return new Ow(t)}function Pw(t){return new Iw(t)}function Yw(t){this._context=t}function jw(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function Uw(t){return new Yw(t)}function zw(t,e){this._context=t,this._t=e}function $w(t){return new zw(t,.5)}function qw(t){return new zw(t,0)}function Hw(t){return new zw(t,1)}function Ww(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a<i;++a)for(r=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Vw(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Gw(t,e){return t[e]}function Xw(){var t=H_([]),e=Vw,n=Ww,r=Gw;function i(i){var a,o,s=t.apply(this,arguments),c=i.length,u=s.length,l=new Array(u);for(a=0;a<u;++a){for(var h,f=s[a],d=l[a]=new Array(c),p=0;p<c;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.key=f}for(a=0,o=e(l);a<u;++a)l[o[a]].index=a;return n(l,o),l}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:H_(Mx.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:H_(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?Vw:"function"==typeof t?t:H_(Mx.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?Ww:t,i):n},i}function Zw(t,e){if((r=t.length)>0){for(var n,r,i,a=0,o=t[0].length;a<o;++a){for(i=n=0;n<r;++n)i+=t[n][a][1]||0;if(i)for(n=0;n<r;++n)t[n][a][1]/=i}Ww(t,e)}}function Qw(t,e){if((s=t.length)>0)for(var n,r,i,a,o,s,c=0,u=t[e[0]].length;c<u;++c)for(a=o=0,n=0;n<s;++n)(i=(r=t[e[n]][c])[1]-r[0])>0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)}function Kw(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],a=i.length;r<a;++r){for(var o=0,s=0;o<n;++o)s+=t[o][r][1]||0;i[r][1]+=i[r][0]=-s/2}Ww(t,e)}}function Jw(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,a=0,o=1;o<r;++o){for(var s=0,c=0,u=0;s<i;++s){for(var l=t[e[s]],h=l[o][1]||0,f=(h-(l[o-1][1]||0))/2,d=0;d<s;++d){var p=t[e[d]];f+=(p[o][1]||0)-(p[o-1][1]||0)}c+=h,u+=f*h}n[o-1][1]+=n[o-1][0]=a,c&&(a-=u/c)}n[o-1][1]+=n[o-1][0]=a,Ww(t,e)}}function tk(t){var e=t.map(ek);return Vw(t).sort((function(t,n){return e[t]-e[n]}))}function ek(t){for(var e,n=-1,r=0,i=t.length,a=-1/0;++n<i;)(e=+t[n][1])>a&&(a=e,r=n);return r}function nk(t){var e=t.map(rk);return Vw(t).sort((function(t,n){return e[t]-e[n]}))}function rk(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}function ik(t){return nk(t).reverse()}function ak(t){var e,n,r=t.length,i=t.map(rk),a=tk(t),o=0,s=0,c=[],u=[];for(e=0;e<r;++e)n=a[e],o<s?(o+=i[n],c.push(n)):(s+=i[n],u.push(n));return u.reverse().concat(c)}function ok(t){return Vw(t).reverse()}Aw.prototype={areaStart:iw,areaEnd:iw,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},Ow.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Lw(this,this._t0,Bw(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Lw(this,Bw(this,n=Dw(this,t,e)),n);break;default:Lw(this,this._t0,n=Dw(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Iw.prototype=Object.create(Ow.prototype)).point=function(t,e){Ow.prototype.point.call(this,e,t)},Rw.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},Yw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=jw(t),i=jw(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},zw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var sk="%Y-%m-%dT%H:%M:%S.%LZ",ck=Date.prototype.toISOString?function(t){return t.toISOString()}:ym(sk);const uk=ck;var lk=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:mm(sk);const hk=lk;function fk(t,e,n){var r=new Wn,i=e;return null==e?(r.restart(t,e,n),r):(e=+e,n=null==n?qn():+n,r.restart((function a(o){o+=i,r.restart(a,i+=e,n),t(o)}),e,n),r)}function dk(t){return function(){return t}}function pk(t){return t[0]}function gk(t){return t[1]}function yk(){this._=null}function mk(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function vk(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function bk(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function _k(t){for(;t.L;)t=t.L;return t}yk.prototype={constructor:yk,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=_k(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(vk(this,n),n=(t=n).U),n.C=!1,r.C=!0,bk(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(bk(this,n),n=(t=n).U),n.C=!1,r.C=!0,vk(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,a=t.L,o=t.R;if(n=a?o?_k(o):a:o,i?i.L===t?i.L=n:i.R=n:this._=n,a&&o?(r=n.C,n.C=t.C,n.L=a,a.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,vk(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,bk(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,vk(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,bk(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,vk(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,bk(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};const xk=yk;function wk(t,e,n,r){var i=[null,null],a=Wk.push(i)-1;return i.left=t,i.right=e,n&&Tk(i,t,e,n),r&&Tk(i,e,t,r),qk[t.index].halfedges.push(a),qk[e.index].halfedges.push(a),i}function kk(t,e,n){var r=[e,n];return r.left=t,r}function Tk(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function Ck(t,e,n,r,i){var a,o=t[0],s=t[1],c=o[0],u=o[1],l=0,h=1,f=s[0]-c,d=s[1]-u;if(a=e-c,f||!(a>0)){if(a/=f,f<0){if(a<l)return;a<h&&(h=a)}else if(f>0){if(a>h)return;a>l&&(l=a)}if(a=r-c,f||!(a<0)){if(a/=f,f<0){if(a>h)return;a>l&&(l=a)}else if(f>0){if(a<l)return;a<h&&(h=a)}if(a=n-u,d||!(a>0)){if(a/=d,d<0){if(a<l)return;a<h&&(h=a)}else if(d>0){if(a>h)return;a>l&&(l=a)}if(a=i-u,d||!(a<0)){if(a/=d,d<0){if(a>h)return;a>l&&(l=a)}else if(d>0){if(a<l)return;a<h&&(h=a)}return!(l>0||h<1)||(l>0&&(t[0]=[c+l*f,u+l*d]),h<1&&(t[1]=[c+h*f,u+h*d]),!0)}}}}}function Ek(t,e,n,r,i){var a=t[1];if(a)return!0;var o,s,c=t[0],u=t.left,l=t.right,h=u[0],f=u[1],d=l[0],p=l[1],g=(h+d)/2,y=(f+p)/2;if(p===f){if(g<e||g>=r)return;if(h>d){if(c){if(c[1]>=i)return}else c=[g,n];a=[g,i]}else{if(c){if(c[1]<n)return}else c=[g,i];a=[g,n]}}else if(s=y-(o=(h-d)/(p-f))*g,o<-1||o>1)if(h>d){if(c){if(c[1]>=i)return}else c=[(n-s)/o,n];a=[(i-s)/o,i]}else{if(c){if(c[1]<n)return}else c=[(i-s)/o,i];a=[(n-s)/o,n]}else if(f<p){if(c){if(c[0]>=r)return}else c=[e,o*e+s];a=[r,o*r+s]}else{if(c){if(c[0]<e)return}else c=[r,o*r+s];a=[e,o*e+s]}return t[0]=c,t[1]=a,!0}function Sk(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function Ak(t,e){return e[+(e.left!==t.site)]}function Mk(t,e){return e[+(e.left===t.site)]}var Nk,Dk=[];function Bk(){mk(this),this.x=this.y=this.arc=this.site=this.cy=null}function Lk(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,a=n.site;if(r!==a){var o=i[0],s=i[1],c=r[0]-o,u=r[1]-s,l=a[0]-o,h=a[1]-s,f=2*(c*h-u*l);if(!(f>=-Gk)){var d=c*c+u*u,p=l*l+h*h,g=(h*d-u*p)/f,y=(c*p-l*d)/f,m=Dk.pop()||new Bk;m.arc=t,m.site=i,m.x=g+o,m.y=(m.cy=y+s)+Math.sqrt(g*g+y*y),t.circle=m;for(var v=null,b=Hk._;b;)if(m.y<b.y||m.y===b.y&&m.x<=b.x){if(!b.L){v=b.P;break}b=b.L}else{if(!b.R){v=b;break}b=b.R}Hk.insert(v,m),v||(Nk=m)}}}}function Ok(t){var e=t.circle;e&&(e.P||(Nk=e.N),Hk.remove(e),Dk.push(e),mk(e),t.circle=null)}var Ik=[];function Rk(){mk(this),this.edge=this.site=this.circle=null}function Fk(t){var e=Ik.pop()||new Rk;return e.site=t,e}function Pk(t){Ok(t),$k.remove(t),Ik.push(t),mk(t)}function Yk(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,s=[t];Pk(t);for(var c=a;c.circle&&Math.abs(n-c.circle.x)<Vk&&Math.abs(r-c.circle.cy)<Vk;)a=c.P,s.unshift(c),Pk(c),c=a;s.unshift(c),Ok(c);for(var u=o;u.circle&&Math.abs(n-u.circle.x)<Vk&&Math.abs(r-u.circle.cy)<Vk;)o=u.N,s.push(u),Pk(u),u=o;s.push(u),Ok(u);var l,h=s.length;for(l=1;l<h;++l)u=s[l],c=s[l-1],Tk(u.edge,c.site,u.site,i);c=s[0],(u=s[h-1]).edge=wk(c.site,u.site,null,i),Lk(c),Lk(u)}function jk(t){for(var e,n,r,i,a=t[0],o=t[1],s=$k._;s;)if((r=Uk(s,o)-a)>Vk)s=s.L;else{if(!((i=a-zk(s,o))>Vk)){r>-Vk?(e=s.P,n=s):i>-Vk?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){qk[t.index]={site:t,halfedges:[]}}(t);var c=Fk(t);if($k.insert(e,c),e||n){if(e===n)return Ok(e),n=Fk(e.site),$k.insert(c,n),c.edge=n.edge=wk(e.site,c.site),Lk(e),void Lk(n);if(n){Ok(e),Ok(n);var u=e.site,l=u[0],h=u[1],f=t[0]-l,d=t[1]-h,p=n.site,g=p[0]-l,y=p[1]-h,m=2*(f*y-d*g),v=f*f+d*d,b=g*g+y*y,_=[(y*v-d*b)/m+l,(f*b-g*v)/m+h];Tk(n.edge,u,p,_),c.edge=wk(u,t,null,_),n.edge=wk(t,p,null,_),Lk(e),Lk(n)}else c.edge=wk(e.site,c.site)}}function Uk(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var s=(n=o.site)[0],c=n[1],u=c-e;if(!u)return s;var l=s-r,h=1/a-1/u,f=l/u;return h?(-f+Math.sqrt(f*f-2*h*(l*l/(-2*u)-c+u/2+i-a/2)))/h+r:(r+s)/2}function zk(t,e){var n=t.N;if(n)return Uk(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var $k,qk,Hk,Wk,Vk=1e-6,Gk=1e-12;function Xk(t,e,n){return(t[0]-n[0])*(e[1]-t[1])-(t[0]-e[0])*(n[1]-t[1])}function Zk(t,e){return e[1]-t[1]||e[0]-t[0]}function Qk(t,e){var n,r,i,a=t.sort(Zk).pop();for(Wk=[],qk=new Array(t.length),$k=new xk,Hk=new xk;;)if(i=Nk,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(jk(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;Yk(i.arc)}if(function(){for(var t,e,n,r,i=0,a=qk.length;i<a;++i)if((t=qk[i])&&(r=(e=t.halfedges).length)){var o=new Array(r),s=new Array(r);for(n=0;n<r;++n)o[n]=n,s[n]=Sk(t,Wk[e[n]]);for(o.sort((function(t,e){return s[e]-s[t]})),n=0;n<r;++n)s[n]=e[o[n]];for(n=0;n<r;++n)e[n]=s[n]}}(),e){var o=+e[0][0],s=+e[0][1],c=+e[1][0],u=+e[1][1];!function(t,e,n,r){for(var i,a=Wk.length;a--;)Ek(i=Wk[a],t,e,n,r)&&Ck(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>Vk||Math.abs(i[0][1]-i[1][1])>Vk)||delete Wk[a]}(o,s,c,u),function(t,e,n,r){var i,a,o,s,c,u,l,h,f,d,p,g,y=qk.length,m=!0;for(i=0;i<y;++i)if(a=qk[i]){for(o=a.site,s=(c=a.halfedges).length;s--;)Wk[c[s]]||c.splice(s,1);for(s=0,u=c.length;s<u;)p=(d=Mk(a,Wk[c[s]]))[0],g=d[1],h=(l=Ak(a,Wk[c[++s%u]]))[0],f=l[1],(Math.abs(p-h)>Vk||Math.abs(g-f)>Vk)&&(c.splice(s,0,Wk.push(kk(o,d,Math.abs(p-t)<Vk&&r-g>Vk?[t,Math.abs(h-t)<Vk?f:r]:Math.abs(g-r)<Vk&&n-p>Vk?[Math.abs(f-r)<Vk?h:n,r]:Math.abs(p-n)<Vk&&g-e>Vk?[n,Math.abs(h-n)<Vk?f:e]:Math.abs(g-e)<Vk&&p-t>Vk?[Math.abs(f-e)<Vk?h:t,e]:null))-1),++u);u&&(m=!1)}if(m){var v,b,_,x=1/0;for(i=0,m=null;i<y;++i)(a=qk[i])&&(_=(v=(o=a.site)[0]-t)*v+(b=o[1]-e)*b)<x&&(x=_,m=a);if(m){var w=[t,e],k=[t,r],T=[n,r],C=[n,e];m.halfedges.push(Wk.push(kk(o=m.site,w,k))-1,Wk.push(kk(o,k,T))-1,Wk.push(kk(o,T,C))-1,Wk.push(kk(o,C,w))-1)}}for(i=0;i<y;++i)(a=qk[i])&&(a.halfedges.length||delete qk[i])}(o,s,c,u)}this.edges=Wk,this.cells=qk,$k=Hk=Wk=qk=null}function Kk(){var t=pk,e=gk,n=null;function r(r){return new Qk(r.map((function(n,i){var a=[Math.round(t(n,i,r)/Vk)*Vk,Math.round(e(n,i,r)/Vk)*Vk];return a.index=i,a.data=n,a})),n)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(e){return arguments.length?(t="function"==typeof e?e:dk(+e),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:dk(+t),r):e},r.extent=function(t){return arguments.length?(n=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(t){return arguments.length?(n=null==t?null:[[0,0],[+t[0],+t[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r}function Jk(t){return function(){return t}}function tT(t,e,n){this.target=t,this.type=e,this.transform=n}function eT(t,e,n){this.k=t,this.x=e,this.y=n}Qk.prototype={constructor:Qk,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return Ak(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(a=(i=n.halfedges).length)for(var i,a,o,s=n.site,c=-1,u=e[i[a-1]],l=u.left===s?u.right:u.left;++c<a;)o=l,l=(u=e[i[c]]).left===s?u.right:u.left,o&&l&&r<o.index&&r<l.index&&Xk(s,o,l)<0&&t.push([s.data,o.data,l.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,a=this,o=a._found||0,s=a.cells.length;!(i=a.cells[o]);)if(++o>=s)return null;var c=t-i.site[0],u=e-i.site[1],l=c*c+u*u;do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var c=t-s[0],u=e-s[1],h=c*c+u*u;h<l&&(l=h,o=s.index)}}))}while(null!==o);return a._found=r,null==n||l<=n*n?i.site:null}},eT.prototype={constructor:eT,scale:function(t){return 1===t?this:new eT(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new eT(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var nT=new eT(1,0,0);function rT(t){for(;!t.__zoom;)if(!(t=t.parentNode))return nT;return t.__zoom}function iT(){le.stopImmediatePropagation()}function aT(){le.preventDefault(),le.stopImmediatePropagation()}function oT(){return!le.ctrlKey&&!le.button}function sT(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function cT(){return this.__zoom||nT}function uT(){return-le.deltaY*(1===le.deltaMode?.05:le.deltaMode?1:.002)}function lT(){return navigator.maxTouchPoints||"ontouchstart"in this}function hT(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function fT(){var t,e,n=oT,r=sT,i=hT,a=uT,o=lT,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,l=Bp,h=ft("start","zoom","end"),f=500,d=0;function p(t){t.property("__zoom",cT).on("wheel.zoom",x).on("mousedown.zoom",w).on("dblclick.zoom",k).filter(o).on("touchstart.zoom",T).on("touchmove.zoom",C).on("touchend.zoom touchcancel.zoom",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new eT(e,t.x,t.y)}function y(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new eT(t.k,r,i)}function m(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function v(t,e,n){t.on("start.zoom",(function(){b(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,a=b(t,i),o=r.apply(t,i),s=null==n?m(o):"function"==typeof n?n.apply(t,i):n,c=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),u=t.__zoom,h="function"==typeof e?e.apply(t,i):e,f=l(u.invert(s).concat(c/u.k),h.invert(s).concat(c/h.k));return function(t){if(1===t)t=h;else{var e=f(t),n=c/e[2];t=new eT(n,s[0]-e[0]*n,s[1]-e[1]*n)}a.zoom(null,t)}}))}function b(t,e,n){return!n&&t.__zooming||new _(t,e)}function _(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function x(){if(n.apply(this,arguments)){var t=b(this,arguments),e=this.__zoom,r=Math.max(s[0],Math.min(s[1],e.k*Math.pow(2,a.apply(this,arguments)))),o=Ln(this);if(t.wheel)t.mouse[0][0]===o[0]&&t.mouse[0][1]===o[1]||(t.mouse[1]=e.invert(t.mouse[0]=o)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[o,e.invert(o)],ar(this),t.start()}aT(),t.wheel=setTimeout(u,150),t.zoom("mouse",i(y(g(e,r),t.mouse[0],t.mouse[1]),t.extent,c))}function u(){t.wheel=null,t.end()}}function w(){if(!e&&n.apply(this,arguments)){var t=b(this,arguments,!0),r=Te(le.view).on("mousemove.zoom",u,!0).on("mouseup.zoom",l,!0),a=Ln(this),o=le.clientX,s=le.clientY;Se(le.view),iT(),t.mouse=[a,this.__zoom.invert(a)],ar(this),t.start()}function u(){if(aT(),!t.moved){var e=le.clientX-o,n=le.clientY-s;t.moved=e*e+n*n>d}t.zoom("mouse",i(y(t.that.__zoom,t.mouse[0]=Ln(t.that),t.mouse[1]),t.extent,c))}function l(){r.on("mousemove.zoom mouseup.zoom",null),Ae(le.view,t.moved),aT(),t.end()}}function k(){if(n.apply(this,arguments)){var t=this.__zoom,e=Ln(this),a=t.invert(e),o=t.k*(le.shiftKey?.5:2),s=i(y(g(t,o),e,a),r.apply(this,arguments),c);aT(),u>0?Te(this).transition().duration(u).call(v,s,e):Te(this).call(p.transform,s)}}function T(){if(n.apply(this,arguments)){var e,r,i,a,o=le.touches,s=o.length,c=b(this,arguments,le.changedTouches.length===s);for(iT(),r=0;r<s;++r)a=[a=Bn(this,o,(i=o[r]).identifier),this.__zoom.invert(a),i.identifier],c.touch0?c.touch1||c.touch0[2]===a[2]||(c.touch1=a,c.taps=0):(c.touch0=a,e=!0,c.taps=1+!!t);t&&(t=clearTimeout(t)),e&&(c.taps<2&&(t=setTimeout((function(){t=null}),f)),ar(this),c.start())}}function C(){if(this.__zooming){var e,n,r,a,o=b(this,arguments),s=le.changedTouches,u=s.length;for(aT(),t&&(t=clearTimeout(t)),o.taps=0,e=0;e<u;++e)r=Bn(this,s,(n=s[e]).identifier),o.touch0&&o.touch0[2]===n.identifier?o.touch0[0]=r:o.touch1&&o.touch1[2]===n.identifier&&(o.touch1[0]=r);if(n=o.that.__zoom,o.touch1){var l=o.touch0[0],h=o.touch0[1],f=o.touch1[0],d=o.touch1[1],p=(p=f[0]-l[0])*p+(p=f[1]-l[1])*p,m=(m=d[0]-h[0])*m+(m=d[1]-h[1])*m;n=g(n,Math.sqrt(p/m)),r=[(l[0]+f[0])/2,(l[1]+f[1])/2],a=[(h[0]+d[0])/2,(h[1]+d[1])/2]}else{if(!o.touch0)return;r=o.touch0[0],a=o.touch0[1]}o.zoom("touch",i(y(n,r,a),o.extent,c))}}function E(){if(this.__zooming){var t,n,r=b(this,arguments),i=le.changedTouches,a=i.length;for(iT(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),f),t=0;t<a;++t)n=i[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),2===r.taps){var o=Te(this).on("dblclick.zoom");o&&o.apply(this,arguments)}}}return p.transform=function(t,e,n){var r=t.selection?t.selection():t;r.property("__zoom",cT),t!==r?v(t,e,n):r.interrupt().each((function(){b(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},p.scaleBy=function(t,e,n){p.scaleTo(t,(function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n}),n)},p.scaleTo=function(t,e,n){p.transform(t,(function(){var t=r.apply(this,arguments),a=this.__zoom,o=null==n?m(t):"function"==typeof n?n.apply(this,arguments):n,s=a.invert(o),u="function"==typeof e?e.apply(this,arguments):e;return i(y(g(a,u),o,s),t,c)}),n)},p.translateBy=function(t,e,n){p.transform(t,(function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),c)}))},p.translateTo=function(t,e,n,a){p.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,s=null==a?m(t):"function"==typeof a?a.apply(this,arguments):a;return i(nT.translate(s[0],s[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)}),a)},_.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){ye(new tT(p,t,this.that.__zoom),h.apply,h,[t,this.that,this.args])}},p.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:Jk(+t),p):a},p.filter=function(t){return arguments.length?(n="function"==typeof t?t:Jk(!!t),p):n},p.touchable=function(t){return arguments.length?(o="function"==typeof t?t:Jk(!!t),p):o},p.extent=function(t){return arguments.length?(r="function"==typeof t?t:Jk([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),p):r},p.scaleExtent=function(t){return arguments.length?(s[0]=+t[0],s[1]=+t[1],p):[s[0],s[1]]},p.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],p):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},p.constrain=function(t){return arguments.length?(i=t,p):i},p.duration=function(t){return arguments.length?(u=+t,p):u},p.interpolate=function(t){return arguments.length?(l=t,p):l},p.on=function(){var t=h.on.apply(h,arguments);return t===h?p:t},p.clickDistance=function(t){return arguments.length?(d=(t=+t)*t,p):Math.sqrt(d)},p}rT.prototype=eT.prototype},681:(t,e,n)=>{t.exports={graphlib:n(574),layout:n(8123),debug:n(7570),util:{time:n(1138).time,notime:n(1138).notime},version:n(8177)}},2188:(t,e,n)=>{"use strict";var r=n(8436),i=n(4079);t.exports={run:function(t){var e="greedy"===t.graph().acyclicer?i(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},i={};return r.forEach(t.nodes(),(function a(o){r.has(i,o)||(i[o]=!0,n[o]=!0,r.forEach(t.outEdges(o),(function(t){r.has(n,t.w)?e.push(t):a(t.w)})),delete n[o])})),e}(t);r.forEach(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.uniqueId("rev"))}))},undo:function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}}},1133:(t,e,n)=>{var r=n(8436),i=n(1138);function a(t,e,n,r,a,o){var s={width:0,height:0,rank:o,borderType:e},c=a[e][o-1],u=i.addDummyNode(t,"border",s,n);a[e][o]=u,t.setParent(u,r),c&&t.setEdge(c,u,{weight:1})}t.exports=function(t){r.forEach(t.children(),(function e(n){var i=t.children(n),o=t.node(n);if(i.length&&r.forEach(i,e),r.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var s=o.minRank,c=o.maxRank+1;s<c;++s)a(t,"borderLeft","_bl",n,o,s),a(t,"borderRight","_br",n,o,s)}}))}},3258:(t,e,n)=>{"use strict";var r=n(8436);function i(t){r.forEach(t.nodes(),(function(e){a(t.node(e))})),r.forEach(t.edges(),(function(e){a(t.edge(e))}))}function a(t){var e=t.width;t.width=t.height,t.height=e}function o(t){t.y=-t.y}function s(t){var e=t.x;t.x=t.y,t.y=e}t.exports={adjust:function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||i(t)},undo:function(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){r.forEach(t.nodes(),(function(e){o(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,o),r.has(n,"y")&&o(n)}))}(t),"lr"!==e&&"rl"!==e||(function(t){r.forEach(t.nodes(),(function(e){s(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,s),r.has(n,"x")&&s(n)}))}(t),i(t))}}},7822:t=>{function e(){var t={};t._next=t._prev=t,this._sentinel=t}function n(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function r(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=e,e.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return n(e),e},e.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&n(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},e.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,r)),n=n._prev;return"["+t.join(", ")+"]"}},7570:(t,e,n)=>{var r=n(8436),i=n(1138),a=n(574).Graph;t.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),(function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),r.forEach(t.edges(),(function(t){n.setEdge(t.v,t.w,{},t.name)})),r.forEach(e,(function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,(function(t,e){return n.setEdge(t,e,{style:"invis"}),e}))})),n}}},574:(t,e,n)=>{var r;try{r=n(8282)}catch(t){}r||(r=window.graphlib),t.exports=r},4079:(t,e,n)=>{var r=n(8436),i=n(574).Graph,a=n(7822);t.exports=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new i,o=0,s=0;r.forEach(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),r.forEach(t.edges(),(function(t){var r=n.edge(t.v,t.w)||0,i=e(t),a=r+i;n.setEdge(t.v,t.w,a),s=Math.max(s,n.node(t.v).out+=i),o=Math.max(o,n.node(t.w).in+=i)}));var u=r.range(s+o+3).map((function(){return new a})),l=o+1;return r.forEach(n.nodes(),(function(t){c(u,l,n.node(t))})),{graph:n,buckets:u,zeroIdx:l}}(t,e||o),u=function(t,e,n){for(var r,i=[],a=e[e.length-1],o=e[0];t.nodeCount();){for(;r=o.dequeue();)s(t,e,n,r);for(;r=a.dequeue();)s(t,e,n,r);if(t.nodeCount())for(var c=e.length-2;c>0;--c)if(r=e[c].dequeue()){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(u,(function(e){return t.outEdges(e.v,e.w)})),!0)};var o=r.constant(1);function s(t,e,n,i,a){var o=a?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),s=t.node(r.v);a&&o.push({v:r.v,w:r.w}),s.out-=i,c(e,n,s)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),a=r.w,o=t.node(a);o.in-=i,c(e,n,o)})),t.removeNode(i.v),o}function c(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},8123:(t,e,n)=>{"use strict";var r=n(8436),i=n(2188),a=n(5995),o=n(8093),s=n(1138).normalizeRanks,c=n(4219),u=n(1138).removeEmptyRanks,l=n(2981),h=n(1133),f=n(3258),d=n(3408),p=n(7873),g=n(1138),y=n(574).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?g.time:g.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new y({multigraph:!0,compound:!0}),n=E(t.graph());return e.setGraph(r.merge({},v,C(n,m),r.pick(n,b))),r.forEach(t.nodes(),(function(n){var i=E(t.node(n));e.setNode(n,r.defaults(C(i,_),x)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=E(t.edge(n));e.setEdge(n,r.merge({},k,C(i,w),r.pick(i,T)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){i.run(t)})),e(" nestingGraph.run",(function(){l.run(t)})),e(" rank",(function(){o(g.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e};g.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){u(t)})),e(" nestingGraph.cleanup",(function(){l.cleanup(t)})),e(" normalizeRanks",(function(){s(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){a.run(t)})),e(" parentDummyChains",(function(){c(t)})),e(" addBorderSegments",(function(){h(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=g.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var a=t.node(e);a.order=i+n,r.forEach(a.selfEdges,(function(e){g.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:a.rank,order:i+ ++n,e:e.e,label:e.label},"_se")})),delete a.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){f.adjust(t)})),e(" position",(function(){p(t)})),e(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),a=t.node(n.borderBottom),o=t.node(r.last(n.borderLeft)),s=t.node(r.last(n.borderRight));n.width=Math.abs(s.x-o.x),n.height=Math.abs(a.y-i.y),n.x=o.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){a.undo(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){f.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),s=o.marginx||0,c=o.marginy||0;function u(t){var r=t.x,o=t.y,s=t.width,c=t.height;e=Math.min(e,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}r.forEach(t.nodes(),(function(e){u(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&u(n)})),e-=s,i-=c,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i})),r.forEach(t.edges(),(function(n){var a=t.edge(n);r.forEach(a.points,(function(t){t.x-=e,t.y-=i})),r.has(a,"x")&&(a.x-=e),r.has(a,"y")&&(a.y-=i)})),o.width=n-e+s,o.height=a-i+c}(t)})),e(" assignNodeIntersects",(function(){!function(t){r.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=a),i.points.unshift(g.intersectRect(a,n)),i.points.push(g.intersectRect(o,r))}))}(t)})),e(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){i.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(t.edges(),(function(n){var i=t.edge(n),a=e.edge(n);i.points=a.points,r.has(a,"x")&&(i.x=a.x,i.y=a.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};var m=["nodesep","edgesep","ranksep","marginx","marginy"],v={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],_=["width","height"],x={width:0,height:0},w=["minlen","weight","width","height","labeloffset"],k={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},T=["labelpos"];function C(t,e){return r.mapValues(r.pick(t,e),Number)}function E(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},8436:(t,e,n)=>{var r;try{r={cloneDeep:n(361),constant:n(5703),defaults:n(1747),each:n(6073),filter:n(3105),find:n(3311),flatten:n(5564),forEach:n(4486),forIn:n(2620),has:n(8721),isUndefined:n(2353),last:n(928),map:n(5161),mapValues:n(6604),max:n(6162),merge:n(3857),min:n(3632),minBy:n(2762),now:n(7771),pick:n(9722),range:n(6026),reduce:n(4061),sortBy:n(9734),uniqueId:n(3955),values:n(2628),zipObject:n(7287)}}catch(t){}r||(r=window._),t.exports=r},2981:(t,e,n)=>{var r=n(8436),i=n(1138);function a(t,e,n,o,s,c,u){var l=t.children(u);if(l.length){var h=i.addBorderNode(t,"_bt"),f=i.addBorderNode(t,"_bb"),d=t.node(u);t.setParent(h,u),d.borderTop=h,t.setParent(f,u),d.borderBottom=f,r.forEach(l,(function(r){a(t,e,n,o,s,c,r);var i=t.node(r),l=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,p=i.borderTop?o:2*o,g=l!==d?1:s-c[u]+1;t.setEdge(h,l,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,f,{weight:p,minlen:g,nestingEdge:!0})})),t.parent(u)||t.setEdge(e,h,{weight:0,minlen:s+c[u]})}else u!==e&&t.setEdge(e,u,{weight:0,minlen:n})}t.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};function n(i,a){var o=t.children(i);o&&o.length&&r.forEach(o,(function(t){n(t,a+1)})),e[i]=a}return r.forEach(t.children(),(function(t){n(t,1)})),e}(t),o=r.max(r.values(n))-1,s=2*o+1;t.graph().nestingRoot=e,r.forEach(t.edges(),(function(e){t.edge(e).minlen*=s}));var c=function(t){return r.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;r.forEach(t.children(),(function(r){a(t,e,s,c,o,n,r)})),t.graph().nodeRankFactor=s},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},5995:(t,e,n)=>{"use strict";var r=n(8436),i=n(1138);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,a,o=e.v,s=t.node(o).rank,c=e.w,u=t.node(c).rank,l=e.name,h=t.edge(e),f=h.labelRank;if(u!==s+1){for(t.removeEdge(e),a=0,++s;s<u;++a,++s)h.points=[],r={width:0,height:0,edgeLabel:h,edgeObj:e,rank:s},n=i.addDummyNode(t,"edge",r,"_d"),s===f&&(r.width=h.width,r.height=h.height,r.dummy="edge-label",r.labelpos=h.labelpos),t.setEdge(o,n,{weight:h.weight},l),0===a&&t.graph().dummyChains.push(n),o=n;t.setEdge(o,c,{weight:h.weight},l)}}(t,e)}))},undo:function(t){r.forEach(t.graph().dummyChains,(function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}}},5093:(t,e,n)=>{var r=n(8436);t.exports=function(t,e,n){var i,a={};r.forEach(n,(function(n){for(var r,o,s=t.parent(n);s;){if((r=t.parent(s))?(o=a[r],a[r]=s):(o=i,i=s),o&&o!==s)return void e.setEdge(o,s);s=r}}))}},5439:(t,e,n)=>{var r=n(8436);t.exports=function(t,e){return r.map(e,(function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,(function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}}))}},3128:(t,e,n)=>{var r=n(8436),i=n(574).Graph;t.exports=function(t,e,n){var a=function(t){for(var e;t.hasNode(e=r.uniqueId("_root")););return e}(t),o=new i({compound:!0}).setGraph({root:a}).setDefaultNodeLabel((function(e){return t.node(e)}));return r.forEach(t.nodes(),(function(i){var s=t.node(i),c=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(o.setNode(i),o.setParent(i,c||a),r.forEach(t[n](i),(function(e){var n=e.v===i?e.w:e.v,a=o.edge(n,i),s=r.isUndefined(a)?0:a.weight;o.setEdge(n,i,{weight:t.edge(e).weight+s})})),r.has(s,"minRank")&&o.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))})),o}},6630:(t,e,n)=>{"use strict";var r=n(8436);function i(t,e,n){for(var i=r.zipObject(n,r.map(n,(function(t,e){return e}))),a=r.flatten(r.map(e,(function(e){return r.sortBy(r.map(t.outEdges(e),(function(e){return{pos:i[e.w],weight:t.edge(e).weight}})),"pos")})),!0),o=1;o<n.length;)o<<=1;var s=2*o-1;o-=1;var c=r.map(new Array(s),(function(){return 0})),u=0;return r.forEach(a.forEach((function(t){var e=t.pos+o;c[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=c[e+1]),c[e=e-1>>1]+=t.weight;u+=t.weight*n}))),u}t.exports=function(t,e){for(var n=0,r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n}},3408:(t,e,n)=>{"use strict";var r=n(8436),i=n(2588),a=n(6630),o=n(1026),s=n(3128),c=n(5093),u=n(574).Graph,l=n(1138);function h(t,e,n){return r.map(e,(function(e){return s(t,e,n)}))}function f(t,e){var n=new u;r.forEach(t,(function(t){var i=t.graph().root,a=o(t,i,n,e);r.forEach(a.vs,(function(e,n){t.node(e).order=n})),c(t,n,a.vs)}))}function d(t,e){r.forEach(e,(function(e){r.forEach(e,(function(e,n){t.node(e).order=n}))}))}t.exports=function(t){var e=l.maxRank(t),n=h(t,r.range(1,e+1),"inEdges"),o=h(t,r.range(e-1,-1,-1),"outEdges"),s=i(t);d(t,s);for(var c,u=Number.POSITIVE_INFINITY,p=0,g=0;g<4;++p,++g){f(p%2?n:o,p%4>=2),s=l.buildLayerMatrix(t);var y=a(t,s);y<u&&(g=0,c=r.cloneDeep(s),u=y)}d(t,c)}},2588:(t,e,n)=>{"use strict";var r=n(8436);t.exports=function(t){var e={},n=r.filter(t.nodes(),(function(e){return!t.children(e).length})),i=r.max(r.map(n,(function(e){return t.node(e).rank}))),a=r.map(r.range(i+1),(function(){return[]})),o=r.sortBy(n,(function(e){return t.node(e).rank}));return r.forEach(o,(function n(i){if(!r.has(e,i)){e[i]=!0;var o=t.node(i);a[o.rank].push(i),r.forEach(t.successors(i),n)}})),a}},9567:(t,e,n)=>{"use strict";var r=n(8436);t.exports=function(t,e){var n={};return r.forEach(t,(function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};r.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)})),r.forEach(e.edges(),(function(t){var e=n[t.v],i=n[t.w];r.isUndefined(e)||r.isUndefined(i)||(i.indegree++,e.out.push(n[t.w]))})),function(t){var e=[];function n(t){return function(e){var n,i,a,o;e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&(i=e,a=0,o=0,(n=t).weight&&(a+=n.barycenter*n.weight,o+=n.weight),i.weight&&(a+=i.barycenter*i.weight,o+=i.weight),n.vs=i.vs.concat(n.vs),n.barycenter=a/o,n.weight=o,n.i=Math.min(i.i,n.i),i.merged=!0)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var a=t.pop();e.push(a),r.forEach(a.in.reverse(),n(a)),r.forEach(a.out,i(a))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(t){return!t.indegree})))}},1026:(t,e,n)=>{var r=n(8436),i=n(5439),a=n(9567),o=n(7304);t.exports=function t(e,n,s,c){var u=e.children(n),l=e.node(n),h=l?l.borderLeft:void 0,f=l?l.borderRight:void 0,d={};h&&(u=r.filter(u,(function(t){return t!==h&&t!==f})));var p=i(e,u);r.forEach(p,(function(n){if(e.children(n.v).length){var i=t(e,n.v,s,c);d[n.v]=i,r.has(i,"barycenter")&&(a=n,o=i,r.isUndefined(a.barycenter)?(a.barycenter=o.barycenter,a.weight=o.weight):(a.barycenter=(a.barycenter*a.weight+o.barycenter*o.weight)/(a.weight+o.weight),a.weight+=o.weight))}var a,o}));var g=a(p,s);!function(t,e){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(g,d);var y=o(g,c);if(h&&(y.vs=r.flatten([h,y.vs,f],!0),e.predecessors(h).length)){var m=e.node(e.predecessors(h)[0]),v=e.node(e.predecessors(f)[0]);r.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+m.order+v.order)/(y.weight+2),y.weight+=2}return y}},7304:(t,e,n)=>{var r=n(8436),i=n(1138);function a(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){var n,o=i.partition(t,(function(t){return r.has(t,"barycenter")})),s=o.lhs,c=r.sortBy(o.rhs,(function(t){return-t.i})),u=[],l=0,h=0,f=0;s.sort((n=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:n?e.i-t.i:t.i-e.i})),f=a(u,c,f),r.forEach(s,(function(t){f+=t.vs.length,u.push(t.vs),l+=t.barycenter*t.weight,h+=t.weight,f=a(u,c,f)}));var d={vs:r.flatten(u,!0)};return h&&(d.barycenter=l/h,d.weight=h),d}},4219:(t,e,n)=>{var r=n(8436);t.exports=function(t){var e=function(t){var e={},n=0;return r.forEach(t.children(),(function i(a){var o=n;r.forEach(t.children(a),i),e[a]={low:o,lim:n++}})),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,a=function(t,e,n,r){var i,a,o=[],s=[],c=Math.min(e[n].low,e[r].low),u=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),o.push(i)}while(i&&(e[i].low>c||u>e[i].lim));for(a=i,i=r;(i=t.parent(i))!==a;)s.push(i);return{path:o.concat(s.reverse()),lca:a}}(t,e,i.v,i.w),o=a.path,s=a.lca,c=0,u=o[c],l=!0;n!==i.w;){if(r=t.node(n),l){for(;(u=o[c])!==s&&t.node(u).maxRank<r.rank;)c++;u===s&&(l=!1)}if(!l){for(;c<o.length-1&&t.node(u=o[c+1]).minRank<=r.rank;)c++;u=o[c]}t.setParent(n,u),n=t.successors(n)[0]}}))}},3573:(t,e,n)=>{"use strict";var r=n(8436),i=n(574).Graph,a=n(1138);function o(t,e){var n={};return r.reduce(e,(function(e,i){var a=0,o=0,s=e.length,u=r.last(i);return r.forEach(i,(function(e,l){var h=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),f=h?t.node(h).order:s;(h||e===u)&&(r.forEach(i.slice(o,l+1),(function(e){r.forEach(t.predecessors(e),(function(r){var i=t.node(r),o=i.order;!(o<a||f<o)||i.dummy&&t.node(e).dummy||c(n,r,e)}))})),o=l+1,a=f)})),i})),n}function s(t,e){var n={};function i(e,i,a,o,s){var u;r.forEach(r.range(i,a),(function(i){u=e[i],t.node(u).dummy&&r.forEach(t.predecessors(u),(function(e){var r=t.node(e);r.dummy&&(r.order<o||r.order>s)&&c(n,e,u)}))}))}return r.reduce(e,(function(e,n){var a,o=-1,s=0;return r.forEach(n,(function(r,c){if("border"===t.node(r).dummy){var u=t.predecessors(r);u.length&&(a=t.node(u[0]).order,i(n,s,c,o,a),s=c,o=a)}i(n,s,n.length,a,e.length)})),n})),n}function c(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function u(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function l(t,e,n,i){var a={},o={},s={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){a[t]=t,o[t]=t,s[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var c=i(t);if(c.length){c=r.sortBy(c,(function(t){return s[t]}));for(var l=(c.length-1)/2,h=Math.floor(l),f=Math.ceil(l);h<=f;++h){var d=c[h];o[t]===t&&e<s[d]&&!u(n,t,d)&&(o[d]=t,o[t]=a[t]=a[d],e=s[d])}}}))})),{root:a,align:o}}function h(t,e,n,a,o){var s={},c=function(t,e,n,a){var o=new i,s=t.graph(),c=function(t,e,n){return function(i,a,o){var s,c=i.node(a),u=i.node(o),l=0;if(l+=c.width/2,r.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=-c.width/2;break;case"r":s=c.width/2}if(s&&(l+=n?s:-s),s=0,l+=(c.dummy?e:t)/2,l+=(u.dummy?e:t)/2,l+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=u.width/2;break;case"r":s=-u.width/2}return s&&(l+=n?s:-s),s=0,l}}(s.nodesep,s.edgesep,a);return r.forEach(e,(function(e){var i;r.forEach(e,(function(e){var r=n[e];if(o.setNode(r),i){var a=n[i],s=o.edge(a,r);o.setEdge(a,r,Math.max(c(t,e,i),s||0))}i=e}))})),o}(t,e,n,o),u=o?"borderLeft":"borderRight";function l(t,e){for(var n=c.nodes(),r=n.pop(),i={};r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return l((function(t){s[t]=c.inEdges(t).reduce((function(t,e){return Math.max(t,s[e.v]+c.edge(e))}),0)}),c.predecessors.bind(c)),l((function(e){var n=c.outEdges(e).reduce((function(t,e){return Math.min(t,s[e.w]-c.edge(e))}),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(s[e]=Math.max(s[e],n))}),c.successors.bind(c)),r.forEach(a,(function(t){s[t]=s[n[t]]})),s}function f(t,e){return r.minBy(r.values(e),(function(e){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return r.forIn(e,(function(e,r){var a=function(t,e){return t.node(e).width}(t,r)/2;n=Math.max(e+a,n),i=Math.min(e-a,i)})),n-i}))}function d(t,e){var n=r.values(e),i=r.min(n),a=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(o){var s,c=n+o,u=t[c];if(u!==e){var l=r.values(u);(s="l"===o?i-r.min(l):a-r.max(l))&&(t[c]=r.mapValues(u,(function(t){return t+s})))}}))}))}function p(t,e){return r.mapValues(t.ul,(function(n,i){if(e)return t[e.toLowerCase()][i];var a=r.sortBy(r.map(t,i));return(a[1]+a[2])/2}))}t.exports={positionX:function(t){var e,n=a.buildLayerMatrix(t),i=r.merge(o(t,n),s(t,n)),c={};r.forEach(["u","d"],(function(a){e="u"===a?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(e=r.map(e,(function(t){return r.values(t).reverse()})));var o=("u"===a?t.predecessors:t.successors).bind(t),s=l(0,e,i,o),u=h(t,e,s.root,s.align,"r"===n);"r"===n&&(u=r.mapValues(u,(function(t){return-t}))),c[a+n]=u}))}));var u=f(t,c);return d(c,u),p(c,t.graph().align)},findType1Conflicts:o,findType2Conflicts:s,addConflict:c,hasConflict:u,verticalAlignment:l,horizontalCompaction:h,alignCoordinates:d,findSmallestWidthAlignment:f,balance:p}},7873:(t,e,n)=>{"use strict";var r=n(8436),i=n(1138),a=n(3573).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,a=0;r.forEach(e,(function(e){var i=r.max(r.map(e,(function(e){return t.node(e).height})));r.forEach(e,(function(e){t.node(e).y=a+i/2})),a+=i+n}))})(t=i.asNonCompoundGraph(t)),r.forEach(a(t),(function(e,n){t.node(n).x=e}))}},300:(t,e,n)=>{"use strict";var r=n(8436),i=n(574).Graph,a=n(6681).slack;function o(t,e){return r.forEach(t.nodes(),(function n(i){r.forEach(e.nodeEdges(i),(function(r){var o=r.v,s=i===o?r.w:o;t.hasNode(s)||a(e,r)||(t.setNode(s,{}),t.setEdge(i,s,{}),n(s))}))})),t.nodeCount()}function s(t,e){return r.minBy(e.edges(),(function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return a(e,n)}))}function c(t,e,n){r.forEach(t.nodes(),(function(t){e.node(t).rank+=n}))}t.exports=function(t){var e,n,r=new i({directed:!1}),u=t.nodes()[0],l=t.nodeCount();for(r.setNode(u,{});o(r,t)<l;)e=s(r,t),n=r.hasNode(e.v)?a(t,e):-a(t,e),c(r,t,n);return r}},8093:(t,e,n)=>{"use strict";var r=n(6681).longestPath,i=n(300),a=n(2472);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":default:!function(t){a(t)}(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":o(t)}};var o=r},2472:(t,e,n)=>{"use strict";var r=n(8436),i=n(300),a=n(6681).slack,o=n(6681).longestPath,s=n(574).alg.preorder,c=n(574).alg.postorder,u=n(1138).simplify;function l(t){t=u(t),o(t);var e,n=i(t);for(d(n),h(n,t);e=g(n);)m(n,t,e,y(n,t,e))}function h(t,e){var n=c(t,t.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=f(t,e,n)}(t,e,n)}))}function f(t,e,n){var i=t.node(n).parent,a=!0,o=e.edge(n,i),s=0;return o||(a=!1,o=e.edge(i,n)),s=o.weight,r.forEach(e.nodeEdges(n),(function(r){var o,c,u=r.v===n,l=u?r.w:r.v;if(l!==i){var h=u===a,f=e.edge(r).weight;if(s+=h?f:-f,o=n,c=l,t.hasEdge(o,c)){var d=t.edge(n,l).cutvalue;s+=h?-d:d}}})),s}function d(t,e){arguments.length<2&&(e=t.nodes()[0]),p(t,{},1,e)}function p(t,e,n,i,a){var o=n,s=t.node(i);return e[i]=!0,r.forEach(t.neighbors(i),(function(a){r.has(e,a)||(n=p(t,e,n,a,i))})),s.low=o,s.lim=n++,a?s.parent=a:delete s.parent,n}function g(t){return r.find(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function y(t,e,n){var i=n.v,o=n.w;e.hasEdge(i,o)||(i=n.w,o=n.v);var s=t.node(i),c=t.node(o),u=s,l=!1;s.lim>c.lim&&(u=c,l=!0);var h=r.filter(e.edges(),(function(e){return l===v(0,t.node(e.v),u)&&l!==v(0,t.node(e.w),u)}));return r.minBy(h,(function(t){return a(e,t)}))}function m(t,e,n,i){var a=n.v,o=n.w;t.removeEdge(a,o),t.setEdge(i.v,i.w,{}),d(t),h(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=s(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)}))}(t,e)}function v(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=l,l.initLowLimValues=d,l.initCutValues=h,l.calcCutValue=f,l.leaveEdge=g,l.enterEdge=y,l.exchangeEdges=m},6681:(t,e,n)=>{"use strict";var r=n(8436);t.exports={longestPath:function(t){var e={};r.forEach(t.sources(),(function n(i){var a=t.node(i);if(r.has(e,i))return a.rank;e[i]=!0;var o=r.min(r.map(t.outEdges(i),(function(e){return n(e.w)-t.edge(e).minlen})));return o!==Number.POSITIVE_INFINITY&&null!=o||(o=0),a.rank=o}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},1138:(t,e,n)=>{"use strict";var r=n(8436),i=n(574).Graph;function a(t,e,n,i){var a;do{a=r.uniqueId(i)}while(t.hasNode(a));return n.dummy=e,t.setNode(a,n),a}function o(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}t.exports={addDummyNode:a,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=u*o/s,r=u):(o<0&&(c=-c),n=c,r=c*s/o),{x:i+n,y:a+r}},buildLayerMatrix:function(t){var e=r.map(r.range(o(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),a=i.rank;r.isUndefined(a)||(e[a][i.order]=n)})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,a=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%a!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),a(t,"border",i,e)},maxRank:o,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},8177:t=>{t.exports="0.8.5"},7856:function(t){t.exports=function(){"use strict";var t=Object.hasOwnProperty,e=Object.setPrototypeOf,n=Object.isFrozen,r=Object.getPrototypeOf,i=Object.getOwnPropertyDescriptor,a=Object.freeze,o=Object.seal,s=Object.create,c="undefined"!=typeof Reflect&&Reflect,u=c.apply,l=c.construct;u||(u=function(t,e,n){return t.apply(e,n)}),a||(a=function(t){return t}),o||(o=function(t){return t}),l||(l=function(t,e){return new(Function.prototype.bind.apply(t,[null].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(e))))});var h,f=w(Array.prototype.forEach),d=w(Array.prototype.pop),p=w(Array.prototype.push),g=w(String.prototype.toLowerCase),y=w(String.prototype.match),m=w(String.prototype.replace),v=w(String.prototype.indexOf),b=w(String.prototype.trim),_=w(RegExp.prototype.test),x=(h=TypeError,function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return l(h,e)});function w(t){return function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return u(t,e,r)}}function k(t,r){e&&e(t,null);for(var i=r.length;i--;){var a=r[i];if("string"==typeof a){var o=g(a);o!==a&&(n(r)||(r[i]=o),a=o)}t[a]=!0}return t}function T(e){var n=s(null),r=void 0;for(r in e)u(t,e,[r])&&(n[r]=e[r]);return n}function C(t,e){for(;null!==t;){var n=i(t,e);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}t=r(t)}return function(t){return console.warn("fallback value for",t),null}}var E=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),S=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),A=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),M=a(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),N=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),D=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),B=a(["#text"]),L=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),O=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),I=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),R=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),F=o(/\{\{[\s\S]*|[\s\S]*\}\}/gm),P=o(/<%[\s\S]*|[\s\S]*%>/gm),Y=o(/^data-[\-\w.\u00B7-\uFFFF]/),j=o(/^aria-[\-\w]+$/),U=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),z=o(/^(?:\w+script|data):/i),$=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=o(/^html$/i),H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function W(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var V=function(){return"undefined"==typeof window?null:window},G=function(t,e){if("object"!==(void 0===t?"undefined":H(t))||"function"!=typeof t.createPolicy)return null;var n=null,r="data-tt-policy-suffix";e.currentScript&&e.currentScript.hasAttribute(r)&&(n=e.currentScript.getAttribute(r));var i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:function(t){return t}})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};return function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V(),n=function(e){return t(e)};if(n.version="2.3.6",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;var r=e.document,i=e.document,o=e.DocumentFragment,s=e.HTMLTemplateElement,c=e.Node,u=e.Element,l=e.NodeFilter,h=e.NamedNodeMap,w=void 0===h?e.NamedNodeMap||e.MozNamedAttrMap:h,X=e.HTMLFormElement,Z=e.DOMParser,Q=e.trustedTypes,K=u.prototype,J=C(K,"cloneNode"),tt=C(K,"nextSibling"),et=C(K,"childNodes"),nt=C(K,"parentNode");if("function"==typeof s){var rt=i.createElement("template");rt.content&&rt.content.ownerDocument&&(i=rt.content.ownerDocument)}var it=G(Q,r),at=it?it.createHTML(""):"",ot=i,st=ot.implementation,ct=ot.createNodeIterator,ut=ot.createDocumentFragment,lt=ot.getElementsByTagName,ht=r.importNode,ft={};try{ft=T(i).documentMode?i.documentMode:{}}catch(t){}var dt={};n.isSupported="function"==typeof nt&&st&&void 0!==st.createHTMLDocument&&9!==ft;var pt=F,gt=P,yt=Y,mt=j,vt=z,bt=$,_t=U,xt=null,wt=k({},[].concat(W(E),W(S),W(A),W(N),W(B))),kt=null,Tt=k({},[].concat(W(L),W(O),W(I),W(R))),Ct=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Et=null,St=null,At=!0,Mt=!0,Nt=!1,Dt=!1,Bt=!1,Lt=!1,Ot=!1,It=!1,Rt=!1,Ft=!1,Pt=!0,Yt=!0,jt=!1,Ut={},zt=null,$t=k({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),qt=null,Ht=k({},["audio","video","img","source","image","track"]),Wt=null,Vt=k({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Gt="http://www.w3.org/1998/Math/MathML",Xt="http://www.w3.org/2000/svg",Zt="http://www.w3.org/1999/xhtml",Qt=Zt,Kt=!1,Jt=void 0,te=["application/xhtml+xml","text/html"],ee="text/html",ne=void 0,re=null,ie=i.createElement("form"),ae=function(t){return t instanceof RegExp||t instanceof Function},oe=function(t){re&&re===t||(t&&"object"===(void 0===t?"undefined":H(t))||(t={}),t=T(t),xt="ALLOWED_TAGS"in t?k({},t.ALLOWED_TAGS):wt,kt="ALLOWED_ATTR"in t?k({},t.ALLOWED_ATTR):Tt,Wt="ADD_URI_SAFE_ATTR"in t?k(T(Vt),t.ADD_URI_SAFE_ATTR):Vt,qt="ADD_DATA_URI_TAGS"in t?k(T(Ht),t.ADD_DATA_URI_TAGS):Ht,zt="FORBID_CONTENTS"in t?k({},t.FORBID_CONTENTS):$t,Et="FORBID_TAGS"in t?k({},t.FORBID_TAGS):{},St="FORBID_ATTR"in t?k({},t.FORBID_ATTR):{},Ut="USE_PROFILES"in t&&t.USE_PROFILES,At=!1!==t.ALLOW_ARIA_ATTR,Mt=!1!==t.ALLOW_DATA_ATTR,Nt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Dt=t.SAFE_FOR_TEMPLATES||!1,Bt=t.WHOLE_DOCUMENT||!1,It=t.RETURN_DOM||!1,Rt=t.RETURN_DOM_FRAGMENT||!1,Ft=t.RETURN_TRUSTED_TYPE||!1,Ot=t.FORCE_BODY||!1,Pt=!1!==t.SANITIZE_DOM,Yt=!1!==t.KEEP_CONTENT,jt=t.IN_PLACE||!1,_t=t.ALLOWED_URI_REGEXP||_t,Qt=t.NAMESPACE||Zt,t.CUSTOM_ELEMENT_HANDLING&&ae(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ct.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ae(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ct.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ct.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Jt=Jt=-1===te.indexOf(t.PARSER_MEDIA_TYPE)?ee:t.PARSER_MEDIA_TYPE,ne="application/xhtml+xml"===Jt?function(t){return t}:g,Dt&&(Mt=!1),Rt&&(It=!0),Ut&&(xt=k({},[].concat(W(B))),kt=[],!0===Ut.html&&(k(xt,E),k(kt,L)),!0===Ut.svg&&(k(xt,S),k(kt,O),k(kt,R)),!0===Ut.svgFilters&&(k(xt,A),k(kt,O),k(kt,R)),!0===Ut.mathMl&&(k(xt,N),k(kt,I),k(kt,R))),t.ADD_TAGS&&(xt===wt&&(xt=T(xt)),k(xt,t.ADD_TAGS)),t.ADD_ATTR&&(kt===Tt&&(kt=T(kt)),k(kt,t.ADD_ATTR)),t.ADD_URI_SAFE_ATTR&&k(Wt,t.ADD_URI_SAFE_ATTR),t.FORBID_CONTENTS&&(zt===$t&&(zt=T(zt)),k(zt,t.FORBID_CONTENTS)),Yt&&(xt["#text"]=!0),Bt&&k(xt,["html","head","body"]),xt.table&&(k(xt,["tbody"]),delete Et.tbody),a&&a(t),re=t)},se=k({},["mi","mo","mn","ms","mtext"]),ce=k({},["foreignobject","desc","title","annotation-xml"]),ue=k({},S);k(ue,A),k(ue,M);var le=k({},N);k(le,D);var he=function(t){var e=nt(t);e&&e.tagName||(e={namespaceURI:Zt,tagName:"template"});var n=g(t.tagName),r=g(e.tagName);if(t.namespaceURI===Xt)return e.namespaceURI===Zt?"svg"===n:e.namespaceURI===Gt?"svg"===n&&("annotation-xml"===r||se[r]):Boolean(ue[n]);if(t.namespaceURI===Gt)return e.namespaceURI===Zt?"math"===n:e.namespaceURI===Xt?"math"===n&&ce[r]:Boolean(le[n]);if(t.namespaceURI===Zt){if(e.namespaceURI===Xt&&!ce[r])return!1;if(e.namespaceURI===Gt&&!se[r])return!1;var i=k({},["title","style","font","a","script"]);return!le[n]&&(i[n]||!ue[n])}return!1},fe=function(t){p(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){try{t.outerHTML=at}catch(e){t.remove()}}},de=function(t,e){try{p(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){p(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!kt[t])if(It||Rt)try{fe(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},pe=function(t){var e=void 0,n=void 0;if(Ot)t="<remove></remove>"+t;else{var r=y(t,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===Jt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");var a=it?it.createHTML(t):t;if(Qt===Zt)try{e=(new Z).parseFromString(a,Jt)}catch(t){}if(!e||!e.documentElement){e=st.createDocument(Qt,"template",null);try{e.documentElement.innerHTML=Kt?"":a}catch(t){}}var o=e.body||e.documentElement;return t&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),Qt===Zt?lt.call(e,Bt?"html":"body")[0]:Bt?e.documentElement:o},ge=function(t){return ct.call(t.ownerDocument||t,t,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},ye=function(t){return t instanceof X&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof w)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore)},me=function(t){return"object"===(void 0===c?"undefined":H(c))?t instanceof c:t&&"object"===(void 0===t?"undefined":H(t))&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},ve=function(t,e,r){dt[t]&&f(dt[t],(function(t){t.call(n,e,r,re)}))},be=function(t){var e=void 0;if(ve("beforeSanitizeElements",t,null),ye(t))return fe(t),!0;if(y(t.nodeName,/[\u0080-\uFFFF]/))return fe(t),!0;var r=ne(t.nodeName);if(ve("uponSanitizeElement",t,{tagName:r,allowedTags:xt}),!me(t.firstElementChild)&&(!me(t.content)||!me(t.content.firstElementChild))&&_(/<[/\w]/g,t.innerHTML)&&_(/<[/\w]/g,t.textContent))return fe(t),!0;if("select"===r&&_(/<template/i,t.innerHTML))return fe(t),!0;if(!xt[r]||Et[r]){if(!Et[r]&&xe(r)){if(Ct.tagNameCheck instanceof RegExp&&_(Ct.tagNameCheck,r))return!1;if(Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(r))return!1}if(Yt&&!zt[r]){var i=nt(t)||t.parentNode,a=et(t)||t.childNodes;if(a&&i)for(var o=a.length-1;o>=0;--o)i.insertBefore(J(a[o],!0),tt(t))}return fe(t),!0}return t instanceof u&&!he(t)?(fe(t),!0):"noscript"!==r&&"noembed"!==r||!_(/<\/no(script|embed)/i,t.innerHTML)?(Dt&&3===t.nodeType&&(e=t.textContent,e=m(e,pt," "),e=m(e,gt," "),t.textContent!==e&&(p(n.removed,{element:t.cloneNode()}),t.textContent=e)),ve("afterSanitizeElements",t,null),!1):(fe(t),!0)},_e=function(t,e,n){if(Pt&&("id"===e||"name"===e)&&(n in i||n in ie))return!1;if(Mt&&!St[e]&&_(yt,e));else if(At&&_(mt,e));else if(!kt[e]||St[e]){if(!(xe(t)&&(Ct.tagNameCheck instanceof RegExp&&_(Ct.tagNameCheck,t)||Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(t))&&(Ct.attributeNameCheck instanceof RegExp&&_(Ct.attributeNameCheck,e)||Ct.attributeNameCheck instanceof Function&&Ct.attributeNameCheck(e))||"is"===e&&Ct.allowCustomizedBuiltInElements&&(Ct.tagNameCheck instanceof RegExp&&_(Ct.tagNameCheck,n)||Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(n))))return!1}else if(Wt[e]);else if(_(_t,m(n,bt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==v(n,"data:")||!qt[t])if(Nt&&!_(vt,m(n,bt,"")));else if(n)return!1;return!0},xe=function(t){return t.indexOf("-")>0},we=function(t){var e=void 0,r=void 0,i=void 0,a=void 0;ve("beforeSanitizeAttributes",t,null);var o=t.attributes;if(o){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:kt};for(a=o.length;a--;){var c=e=o[a],u=c.name,l=c.namespaceURI;if(r=b(e.value),i=ne(u),s.attrName=i,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,ve("uponSanitizeAttribute",t,s),r=s.attrValue,!s.forceKeepAttr&&(de(u,t),s.keepAttr))if(_(/\/>/i,r))de(u,t);else{Dt&&(r=m(r,pt," "),r=m(r,gt," "));var h=ne(t.nodeName);if(_e(h,i,r))try{l?t.setAttributeNS(l,u,r):t.setAttribute(u,r),d(n.removed)}catch(t){}}}ve("afterSanitizeAttributes",t,null)}},ke=function t(e){var n=void 0,r=ge(e);for(ve("beforeSanitizeShadowDOM",e,null);n=r.nextNode();)ve("uponSanitizeShadowNode",n,null),be(n)||(n.content instanceof o&&t(n.content),we(n));ve("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(t,i){var a=void 0,s=void 0,u=void 0,l=void 0,h=void 0;if((Kt=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!me(t)){if("function"!=typeof t.toString)throw x("toString is not a function");if("string"!=typeof(t=t.toString()))throw x("dirty is not a string, aborting")}if(!n.isSupported){if("object"===H(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof t)return e.toStaticHTML(t);if(me(t))return e.toStaticHTML(t.outerHTML)}return t}if(Lt||oe(i),n.removed=[],"string"==typeof t&&(jt=!1),jt){if(t.nodeName){var f=ne(t.nodeName);if(!xt[f]||Et[f])throw x("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof c)1===(s=(a=pe("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?a=s:a.appendChild(s);else{if(!It&&!Dt&&!Bt&&-1===t.indexOf("<"))return it&&Ft?it.createHTML(t):t;if(!(a=pe(t)))return It?null:Ft?at:""}a&&Ot&&fe(a.firstChild);for(var d=ge(jt?t:a);u=d.nextNode();)3===u.nodeType&&u===l||be(u)||(u.content instanceof o&&ke(u.content),we(u),l=u);if(l=null,jt)return t;if(It){if(Rt)for(h=ut.call(a.ownerDocument);a.firstChild;)h.appendChild(a.firstChild);else h=a;return kt.shadowroot&&(h=ht.call(r,h,!0)),h}var p=Bt?a.outerHTML:a.innerHTML;return Bt&&xt["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&_(q,a.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+a.ownerDocument.doctype.name+">\n"+p),Dt&&(p=m(p,pt," "),p=m(p,gt," ")),it&&Ft?it.createHTML(p):p},n.setConfig=function(t){oe(t),Lt=!0},n.clearConfig=function(){re=null,Lt=!1},n.isValidAttribute=function(t,e,n){re||oe({});var r=ne(t),i=ne(e);return _e(r,i,n)},n.addHook=function(t,e){"function"==typeof e&&(dt[t]=dt[t]||[],p(dt[t],e))},n.removeHook=function(t){dt[t]&&d(dt[t])},n.removeHooks=function(t){dt[t]&&(dt[t]=[])},n.removeAllHooks=function(){dt={}},n}()}()},8282:(t,e,n)=>{var r=n(2354);t.exports={Graph:r.Graph,json:n(8974),alg:n(2440),version:r.version}},2842:(t,e,n)=>{var r=n(9126);t.exports=function(t){var e,n={},i=[];function a(i){r.has(n,i)||(n[i]=!0,e.push(i),r.each(t.successors(i),a),r.each(t.predecessors(i),a))}return r.each(t.nodes(),(function(t){e=[],a(t),e.length&&i.push(e)})),i}},3984:(t,e,n)=>{var r=n(9126);function i(t,e,n,a,o,s){r.has(a,e)||(a[e]=!0,n||s.push(e),r.each(o(e),(function(e){i(t,e,n,a,o,s)})),n&&s.push(e))}t.exports=function(t,e,n){r.isArray(e)||(e=[e]);var a=(t.isDirected()?t.successors:t.neighbors).bind(t),o=[],s={};return r.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);i(t,e,"post"===n,s,a,o)})),o}},4847:(t,e,n)=>{var r=n(3763),i=n(9126);t.exports=function(t,e,n){return i.transform(t.nodes(),(function(i,a){i[a]=r(t,a,e,n)}),{})}},3763:(t,e,n)=>{var r=n(9126),i=n(9675);t.exports=function(t,e,n,r){return function(t,e,n,r){var a,o,s={},c=new i,u=function(t){var e=t.v!==a?t.v:t.w,r=s[e],i=n(t),u=o.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);u<r.distance&&(r.distance=u,r.predecessor=a,c.decrease(e,u))};for(t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;s[t]={distance:n},c.add(t,n)}));c.size()>0&&(a=c.removeMin(),(o=s[a]).distance!==Number.POSITIVE_INFINITY);)r(a).forEach(u);return s}(t,String(e),n||a,r||function(e){return t.outEdges(e)})};var a=r.constant(1)},9096:(t,e,n)=>{var r=n(9126),i=n(5023);t.exports=function(t){return r.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},8924:(t,e,n)=>{var r=n(9126);t.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,a=e(n);r[t][i]={distance:a,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var a=r[n];i.forEach((function(n){var r=a[t],i=e[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)}))}))})),r}(t,e||i,n||function(e){return t.outEdges(e)})};var i=r.constant(1)},2440:(t,e,n)=>{t.exports={components:n(2842),dijkstra:n(3763),dijkstraAll:n(4847),findCycles:n(9096),floydWarshall:n(8924),isAcyclic:n(2707),postorder:n(8828),preorder:n(2648),prim:n(514),tarjan:n(5023),topsort:n(2166)}},2707:(t,e,n)=>{var r=n(2166);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},8828:(t,e,n)=>{var r=n(3984);t.exports=function(t,e){return r(t,e,"post")}},2648:(t,e,n)=>{var r=n(3984);t.exports=function(t,e){return r(t,e,"pre")}},514:(t,e,n)=>{var r=n(9126),i=n(771),a=n(9675);t.exports=function(t,e){var n,o=new i,s={},c=new a;function u(t){var r=t.v===n?t.w:t.v,i=c.priority(r);if(void 0!==i){var a=e(t);a<i&&(s[r]=n,c.decrease(r,a))}}if(0===t.nodeCount())return o;r.each(t.nodes(),(function(t){c.add(t,Number.POSITIVE_INFINITY),o.setNode(t)})),c.decrease(t.nodes()[0],0);for(var l=!1;c.size()>0;){if(n=c.removeMin(),r.has(s,n))o.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(n).forEach(u)}return o}},5023:(t,e,n)=>{var r=n(9126);t.exports=function(t){var e=0,n=[],i={},a=[];function o(s){var c=i[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach((function(t){r.has(i,t)?i[t].onStack&&(c.lowlink=Math.min(c.lowlink,i[t].index)):(o(t),c.lowlink=Math.min(c.lowlink,i[t].lowlink))})),c.lowlink===c.index){var u,l=[];do{u=n.pop(),i[u].onStack=!1,l.push(u)}while(s!==u);a.push(l)}}return t.nodes().forEach((function(t){r.has(i,t)||o(t)})),a}},2166:(t,e,n)=>{var r=n(9126);function i(t){var e={},n={},i=[];if(r.each(t.sinks(),(function o(s){if(r.has(n,s))throw new a;r.has(e,s)||(n[s]=!0,e[s]=!0,r.each(t.predecessors(s),o),delete n[s],i.push(s))})),r.size(e)!==t.nodeCount())throw new a;return i}function a(){}t.exports=i,i.CycleException=a,a.prototype=new Error},9675:(t,e,n)=>{var r=n(9126);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,a=i.length;return n[t]=a,i.push({key:t,priority:e}),this._decrease(a),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},i.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e},i.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,i=n[t],a=n[e];n[t]=a,n[e]=i,r[a.key]=t,r[i.key]=e}},771:(t,e,n)=>{"use strict";var r=n(9126);t.exports=a;var i="\0";function a(t){this._isDirected=!r.has(t,"directed")||t.directed,this._isMultigraph=!!r.has(t,"multigraph")&&t.multigraph,this._isCompound=!!r.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function o(t,e){t[e]?t[e]++:t[e]=1}function s(t,e){--t[e]||delete t[e]}function c(t,e,n,i){var a=""+e,o=""+n;if(!t&&a>o){var s=a;a=o,o=s}return a+""+o+""+(r.isUndefined(i)?"\0":i)}function u(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function l(t,e){return c(t,e.v,e.w,e.name)}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(t){return this._label=t,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultNodeLabelFn=t,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return r.keys(this._nodes)},a.prototype.sources=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._in[e])}))},a.prototype.sinks=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._out[e])}))},a.prototype.setNodes=function(t,e){var n=arguments,i=this;return r.each(t,(function(t){n.length>1?i.setNode(t,e):i.setNode(t)})),this},a.prototype.setNode=function(t,e){return r.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=i,this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},a.prototype.node=function(t){return this._nodes[t]},a.prototype.hasNode=function(t){return r.has(this._nodes,t)},a.prototype.removeNode=function(t){var e=this;if(r.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],r.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),r.each(r.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],r.each(r.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},a.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(e))e=i;else{for(var n=e+="";!r.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},a.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},a.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==i)return e}},a.prototype.children=function(t){if(r.isUndefined(t)&&(t=i),this._isCompound){var e=this._children[t];if(e)return r.keys(e)}else{if(t===i)return this.nodes();if(this.hasNode(t))return[]}},a.prototype.predecessors=function(t){var e=this._preds[t];if(e)return r.keys(e)},a.prototype.successors=function(t){var e=this._sucs[t];if(e)return r.keys(e)},a.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return r.union(e,this.successors(t))},a.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},a.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),r.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var i={};function a(t){var r=n.parent(t);return void 0===r||e.hasNode(r)?(i[t]=r,r):r in i?i[r]:a(r)}return this._isCompound&&r.each(e.nodes(),(function(t){e.setParent(t,a(t))})),e},a.prototype.setDefaultEdgeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultEdgeLabelFn=t,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return r.values(this._edgeObjs)},a.prototype.setPath=function(t,e){var n=this,i=arguments;return r.reduce(t,(function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r})),this},a.prototype.setEdge=function(){var t,e,n,i,a=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(t=s.v,e=s.w,n=s.name,2===arguments.length&&(i=arguments[1],a=!0)):(t=s,e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),t=""+t,e=""+e,r.isUndefined(n)||(n=""+n);var l=c(this._isDirected,t,e,n);if(r.has(this._edgeLabels,l))return a&&(this._edgeLabels[l]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[l]=a?i:this._defaultEdgeLabelFn(t,e,n);var h=u(this._isDirected,t,e,n);return t=h.v,e=h.w,Object.freeze(h),this._edgeObjs[l]=h,o(this._preds[e],t),o(this._sucs[t],e),this._in[e][l]=h,this._out[t][l]=h,this._edgeCount++,this},a.prototype.edge=function(t,e,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return this._edgeLabels[r]},a.prototype.hasEdge=function(t,e,n){var i=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return r.has(this._edgeLabels,i)},a.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[e],t),s(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},a.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.v===e})):i}},a.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.w===e})):i}},a.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},2354:(t,e,n)=>{t.exports={Graph:n(771),version:n(9631)}},8974:(t,e,n)=>{var r=n(9126),i=n(771);function a(t){return r.map(t.nodes(),(function(e){var n=t.node(e),i=t.parent(e),a={v:e};return r.isUndefined(n)||(a.value=n),r.isUndefined(i)||(a.parent=i),a}))}function o(t){return r.map(t.edges(),(function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:a(t),edges:o(t)};return r.isUndefined(t.graph())||(e.value=r.clone(t.graph())),e},read:function(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),r.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},9126:(t,e,n)=>{var r;try{r={clone:n(6678),constant:n(5703),each:n(6073),filter:n(3105),has:n(8721),isArray:n(1469),isEmpty:n(1609),isFunction:n(3560),isUndefined:n(2353),keys:n(3674),map:n(5161),reduce:n(4061),size:n(4238),transform:n(8718),union:n(3386),values:n(2628)}}catch(t){}r||(r=window._),t.exports=r},9631:t=>{t.exports="2.1.8"},8552:(t,e,n)=>{var r=n(852)(n(5639),"DataView");t.exports=r},1989:(t,e,n)=>{var r=n(1789),i=n(401),a=n(7667),o=n(1327),s=n(1866);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},8407:(t,e,n)=>{var r=n(7040),i=n(4125),a=n(2117),o=n(7518),s=n(4705);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},7071:(t,e,n)=>{var r=n(852)(n(5639),"Map");t.exports=r},3369:(t,e,n)=>{var r=n(4785),i=n(1285),a=n(6e3),o=n(9916),s=n(5265);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},3818:(t,e,n)=>{var r=n(852)(n(5639),"Promise");t.exports=r},8525:(t,e,n)=>{var r=n(852)(n(5639),"Set");t.exports=r},8668:(t,e,n)=>{var r=n(3369),i=n(619),a=n(2385);function o(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}o.prototype.add=o.prototype.push=i,o.prototype.has=a,t.exports=o},6384:(t,e,n)=>{var r=n(8407),i=n(7465),a=n(3779),o=n(7599),s=n(4758),c=n(4309);function u(t){var e=this.__data__=new r(t);this.size=e.size}u.prototype.clear=i,u.prototype.delete=a,u.prototype.get=o,u.prototype.has=s,u.prototype.set=c,t.exports=u},2705:(t,e,n)=>{var r=n(5639).Symbol;t.exports=r},1149:(t,e,n)=>{var r=n(5639).Uint8Array;t.exports=r},577:(t,e,n)=>{var r=n(852)(n(5639),"WeakMap");t.exports=r},6874:t=>{t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},7412:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},4963:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}},7443:(t,e,n)=>{var r=n(2118);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},1196:t=>{t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},4636:(t,e,n)=>{var r=n(2545),i=n(5694),a=n(1469),o=n(4144),s=n(5776),c=n(6719),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=a(t),l=!n&&i(t),h=!n&&!l&&o(t),f=!n&&!l&&!h&&c(t),d=n||l||h||f,p=d?r(t.length,String):[],g=p.length;for(var y in t)!e&&!u.call(t,y)||d&&("length"==y||h&&("offset"==y||"parent"==y)||f&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,g))||p.push(y);return p}},9932:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},2488:t=>{t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},2663:t=>{t.exports=function(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}},2908:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},8983:(t,e,n)=>{var r=n(371)("length");t.exports=r},6556:(t,e,n)=>{var r=n(9465),i=n(7813);t.exports=function(t,e,n){(void 0!==n&&!i(t[e],n)||void 0===n&&!(e in t))&&r(t,e,n)}},4865:(t,e,n)=>{var r=n(9465),i=n(7813),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var o=t[e];a.call(t,e)&&i(o,n)&&(void 0!==n||e in t)||r(t,e,n)}},8470:(t,e,n)=>{var r=n(7813);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},4037:(t,e,n)=>{var r=n(8363),i=n(3674);t.exports=function(t,e){return t&&r(e,i(e),t)}},3886:(t,e,n)=>{var r=n(8363),i=n(1704);t.exports=function(t,e){return t&&r(e,i(e),t)}},9465:(t,e,n)=>{var r=n(8777);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},5990:(t,e,n)=>{var r=n(6384),i=n(7412),a=n(4865),o=n(4037),s=n(3886),c=n(4626),u=n(278),l=n(8805),h=n(1911),f=n(8234),d=n(6904),p=n(4160),g=n(3824),y=n(9148),m=n(8517),v=n(1469),b=n(4144),_=n(6688),x=n(3218),w=n(2928),k=n(3674),T=n(1704),C="[object Arguments]",E="[object Function]",S="[object Object]",A={};A[C]=A["[object Array]"]=A["[object ArrayBuffer]"]=A["[object DataView]"]=A["[object Boolean]"]=A["[object Date]"]=A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Map]"]=A["[object Number]"]=A[S]=A["[object RegExp]"]=A["[object Set]"]=A["[object String]"]=A["[object Symbol]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A["[object Error]"]=A[E]=A["[object WeakMap]"]=!1,t.exports=function t(e,n,M,N,D,B){var L,O=1&n,I=2&n,R=4&n;if(M&&(L=D?M(e,N,D,B):M(e)),void 0!==L)return L;if(!x(e))return e;var F=v(e);if(F){if(L=g(e),!O)return u(e,L)}else{var P=p(e),Y=P==E||"[object GeneratorFunction]"==P;if(b(e))return c(e,O);if(P==S||P==C||Y&&!D){if(L=I||Y?{}:m(e),!O)return I?h(e,s(L,e)):l(e,o(L,e))}else{if(!A[P])return D?e:{};L=y(e,P,O)}}B||(B=new r);var j=B.get(e);if(j)return j;B.set(e,L),w(e)?e.forEach((function(r){L.add(t(r,n,M,r,e,B))})):_(e)&&e.forEach((function(r,i){L.set(i,t(r,n,M,i,e,B))}));var U=F?void 0:(R?I?d:f:I?T:k)(e);return i(U||e,(function(r,i){U&&(r=e[i=r]),a(L,i,t(r,n,M,i,e,B))})),L}},3118:(t,e,n)=>{var r=n(3218),i=Object.create,a=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=a},9881:(t,e,n)=>{var r=n(7816),i=n(9291)(r);t.exports=i},6029:(t,e,n)=>{var r=n(3448);t.exports=function(t,e,n){for(var i=-1,a=t.length;++i<a;){var o=t[i],s=e(o);if(null!=s&&(void 0===c?s==s&&!r(s):n(s,c)))var c=s,u=o}return u}},760:(t,e,n)=>{var r=n(9881);t.exports=function(t,e){var n=[];return r(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}},1848:t=>{t.exports=function(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}},1078:(t,e,n)=>{var r=n(2488),i=n(7285);t.exports=function t(e,n,a,o,s){var c=-1,u=e.length;for(a||(a=i),s||(s=[]);++c<u;){var l=e[c];n>0&&a(l)?n>1?t(l,n-1,a,o,s):r(s,l):o||(s[s.length]=l)}return s}},8483:(t,e,n)=>{var r=n(5063)();t.exports=r},7816:(t,e,n)=>{var r=n(8483),i=n(3674);t.exports=function(t,e){return t&&r(t,e,i)}},7786:(t,e,n)=>{var r=n(1811),i=n(327);t.exports=function(t,e){for(var n=0,a=(e=r(e,t)).length;null!=t&&n<a;)t=t[i(e[n++])];return n&&n==a?t:void 0}},8866:(t,e,n)=>{var r=n(2488),i=n(1469);t.exports=function(t,e,n){var a=e(t);return i(t)?a:r(a,n(t))}},4239:(t,e,n)=>{var r=n(2705),i=n(9607),a=n(2333),o=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?i(t):a(t)}},3325:t=>{t.exports=function(t,e){return t>e}},8565:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&e.call(t,n)}},13:t=>{t.exports=function(t,e){return null!=t&&e in Object(t)}},2118:(t,e,n)=>{var r=n(1848),i=n(2722),a=n(2351);t.exports=function(t,e,n){return e==e?a(t,e,n):r(t,i,n)}},9454:(t,e,n)=>{var r=n(4239),i=n(7005);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},939:(t,e,n)=>{var r=n(2492),i=n(7005);t.exports=function t(e,n,a,o,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,a,o,t,s))}},2492:(t,e,n)=>{var r=n(6384),i=n(7114),a=n(8351),o=n(6096),s=n(4160),c=n(1469),u=n(4144),l=n(6719),h="[object Arguments]",f="[object Array]",d="[object Object]",p=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,g,y,m){var v=c(t),b=c(e),_=v?f:s(t),x=b?f:s(e),w=(_=_==h?d:_)==d,k=(x=x==h?d:x)==d,T=_==x;if(T&&u(t)){if(!u(e))return!1;v=!0,w=!1}if(T&&!w)return m||(m=new r),v||l(t)?i(t,e,n,g,y,m):a(t,e,_,n,g,y,m);if(!(1&n)){var C=w&&p.call(t,"__wrapped__"),E=k&&p.call(e,"__wrapped__");if(C||E){var S=C?t.value():t,A=E?e.value():e;return m||(m=new r),y(S,A,n,g,m)}}return!!T&&(m||(m=new r),o(t,e,n,g,y,m))}},5588:(t,e,n)=>{var r=n(4160),i=n(7005);t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},2958:(t,e,n)=>{var r=n(6384),i=n(939);t.exports=function(t,e,n,a){var o=n.length,s=o,c=!a;if(null==t)return!s;for(t=Object(t);o--;){var u=n[o];if(c&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<s;){var l=(u=n[o])[0],h=t[l],f=u[1];if(c&&u[2]){if(void 0===h&&!(l in t))return!1}else{var d=new r;if(a)var p=a(h,f,l,t,e,d);if(!(void 0===p?i(f,h,3,a,d):p))return!1}}return!0}},2722:t=>{t.exports=function(t){return t!=t}},8458:(t,e,n)=>{var r=n(3560),i=n(5346),a=n(3218),o=n(346),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,h=u.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||i(t))&&(r(t)?f:s).test(o(t))}},9221:(t,e,n)=>{var r=n(4160),i=n(7005);t.exports=function(t){return i(t)&&"[object Set]"==r(t)}},8749:(t,e,n)=>{var r=n(4239),i=n(1780),a=n(7005),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,t.exports=function(t){return a(t)&&i(t.length)&&!!o[r(t)]}},7206:(t,e,n)=>{var r=n(1573),i=n(6432),a=n(6557),o=n(1469),s=n(9601);t.exports=function(t){return"function"==typeof t?t:null==t?a:"object"==typeof t?o(t)?i(t[0],t[1]):r(t):s(t)}},280:(t,e,n)=>{var r=n(5726),i=n(6916),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}},313:(t,e,n)=>{var r=n(3218),i=n(5726),a=n(3498),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return a(t);var e=i(t),n=[];for(var s in t)("constructor"!=s||!e&&o.call(t,s))&&n.push(s);return n}},433:t=>{t.exports=function(t,e){return t<e}},9199:(t,e,n)=>{var r=n(9881),i=n(8612);t.exports=function(t,e){var n=-1,a=i(t)?Array(t.length):[];return r(t,(function(t,r,i){a[++n]=e(t,r,i)})),a}},1573:(t,e,n)=>{var r=n(2958),i=n(1499),a=n(2634);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?a(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},6432:(t,e,n)=>{var r=n(939),i=n(7361),a=n(9095),o=n(5403),s=n(9162),c=n(2634),u=n(327);t.exports=function(t,e){return o(t)&&s(e)?c(u(t),e):function(n){var o=i(n,t);return void 0===o&&o===e?a(n,t):r(e,o,3)}}},2980:(t,e,n)=>{var r=n(6384),i=n(6556),a=n(8483),o=n(9783),s=n(3218),c=n(1704),u=n(6390);t.exports=function t(e,n,l,h,f){e!==n&&a(n,(function(a,c){if(f||(f=new r),s(a))o(e,n,c,l,t,h,f);else{var d=h?h(u(e,c),a,c+"",e,n,f):void 0;void 0===d&&(d=a),i(e,c,d)}}),c)}},9783:(t,e,n)=>{var r=n(6556),i=n(4626),a=n(7133),o=n(278),s=n(8517),c=n(5694),u=n(1469),l=n(9246),h=n(4144),f=n(3560),d=n(3218),p=n(8630),g=n(6719),y=n(6390),m=n(3678);t.exports=function(t,e,n,v,b,_,x){var w=y(t,n),k=y(e,n),T=x.get(k);if(T)r(t,n,T);else{var C=_?_(w,k,n+"",t,e,x):void 0,E=void 0===C;if(E){var S=u(k),A=!S&&h(k),M=!S&&!A&&g(k);C=k,S||A||M?u(w)?C=w:l(w)?C=o(w):A?(E=!1,C=i(k,!0)):M?(E=!1,C=a(k,!0)):C=[]:p(k)||c(k)?(C=w,c(w)?C=m(w):d(w)&&!f(w)||(C=s(k))):E=!1}E&&(x.set(k,C),b(C,k,v,_,x),x.delete(k)),r(t,n,C)}}},9556:(t,e,n)=>{var r=n(9932),i=n(7786),a=n(7206),o=n(9199),s=n(1131),c=n(1717),u=n(5022),l=n(6557),h=n(1469);t.exports=function(t,e,n){e=e.length?r(e,(function(t){return h(t)?function(e){return i(e,1===t.length?t[0]:t)}:t})):[l];var f=-1;e=r(e,c(a));var d=o(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++f,value:t}}));return s(d,(function(t,e){return u(t,e,n)}))}},5970:(t,e,n)=>{var r=n(3012),i=n(9095);t.exports=function(t,e){return r(t,e,(function(e,n){return i(t,n)}))}},3012:(t,e,n)=>{var r=n(7786),i=n(611),a=n(1811);t.exports=function(t,e,n){for(var o=-1,s=e.length,c={};++o<s;){var u=e[o],l=r(t,u);n(l,u)&&i(c,a(u,t),l)}return c}},371:t=>{t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},9152:(t,e,n)=>{var r=n(7786);t.exports=function(t){return function(e){return r(e,t)}}},98:t=>{var e=Math.ceil,n=Math.max;t.exports=function(t,r,i,a){for(var o=-1,s=n(e((r-t)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=t,t+=i;return c}},107:t=>{t.exports=function(t,e,n,r,i){return i(t,(function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)})),n}},5976:(t,e,n)=>{var r=n(6557),i=n(5357),a=n(61);t.exports=function(t,e){return a(i(t,e,r),t+"")}},611:(t,e,n)=>{var r=n(4865),i=n(1811),a=n(5776),o=n(3218),s=n(327);t.exports=function(t,e,n,c){if(!o(t))return t;for(var u=-1,l=(e=i(e,t)).length,h=l-1,f=t;null!=f&&++u<l;){var d=s(e[u]),p=n;if("__proto__"===d||"constructor"===d||"prototype"===d)return t;if(u!=h){var g=f[d];void 0===(p=c?c(g,d,f):void 0)&&(p=o(g)?g:a(e[u+1])?[]:{})}r(f,d,p),f=f[d]}return t}},6560:(t,e,n)=>{var r=n(5703),i=n(8777),a=n(6557),o=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:a;t.exports=o},1131:t=>{t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},2545:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},531:(t,e,n)=>{var r=n(2705),i=n(9932),a=n(1469),o=n(3448),s=r?r.prototype:void 0,c=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(a(e))return i(e,t)+"";if(o(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},7561:(t,e,n)=>{var r=n(7990),i=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(i,""):t}},1717:t=>{t.exports=function(t){return function(e){return t(e)}}},5652:(t,e,n)=>{var r=n(8668),i=n(7443),a=n(1196),o=n(4757),s=n(3593),c=n(1814);t.exports=function(t,e,n){var u=-1,l=i,h=t.length,f=!0,d=[],p=d;if(n)f=!1,l=a;else if(h>=200){var g=e?null:s(t);if(g)return c(g);f=!1,l=o,p=new r}else p=e?[]:d;t:for(;++u<h;){var y=t[u],m=e?e(y):y;if(y=n||0!==y?y:0,f&&m==m){for(var v=p.length;v--;)if(p[v]===m)continue t;e&&p.push(m),d.push(y)}else l(p,m,n)||(p!==d&&p.push(m),d.push(y))}return d}},7415:(t,e,n)=>{var r=n(9932);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},1757:t=>{t.exports=function(t,e,n){for(var r=-1,i=t.length,a=e.length,o={};++r<i;){var s=r<a?e[r]:void 0;n(o,t[r],s)}return o}},4757:t=>{t.exports=function(t,e){return t.has(e)}},4290:(t,e,n)=>{var r=n(6557);t.exports=function(t){return"function"==typeof t?t:r}},1811:(t,e,n)=>{var r=n(1469),i=n(5403),a=n(5514),o=n(9833);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:a(o(t))}},4318:(t,e,n)=>{var r=n(1149);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},4626:(t,e,n)=>{t=n.nmd(t);var r=n(5639),i=e&&!e.nodeType&&e,a=i&&t&&!t.nodeType&&t,o=a&&a.exports===i?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}},7157:(t,e,n)=>{var r=n(4318);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},3147:t=>{var e=/\w*$/;t.exports=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}},419:(t,e,n)=>{var r=n(2705),i=r?r.prototype:void 0,a=i?i.valueOf:void 0;t.exports=function(t){return a?Object(a.call(t)):{}}},7133:(t,e,n)=>{var r=n(4318);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},6393:(t,e,n)=>{var r=n(3448);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,a=t==t,o=r(t),s=void 0!==e,c=null===e,u=e==e,l=r(e);if(!c&&!l&&!o&&t>e||o&&s&&u&&!c&&!l||i&&s&&u||!n&&u||!a)return 1;if(!i&&!o&&!l&&t<e||l&&n&&a&&!i&&!o||c&&n&&a||!s&&a||!u)return-1}return 0}},5022:(t,e,n)=>{var r=n(6393);t.exports=function(t,e,n){for(var i=-1,a=t.criteria,o=e.criteria,s=a.length,c=n.length;++i<s;){var u=r(a[i],o[i]);if(u)return i>=c?u:u*("desc"==n[i]?-1:1)}return t.index-e.index}},278:t=>{t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},8363:(t,e,n)=>{var r=n(4865),i=n(9465);t.exports=function(t,e,n,a){var o=!n;n||(n={});for(var s=-1,c=e.length;++s<c;){var u=e[s],l=a?a(n[u],t[u],u,n,t):void 0;void 0===l&&(l=t[u]),o?i(n,u,l):r(n,u,l)}return n}},8805:(t,e,n)=>{var r=n(8363),i=n(9551);t.exports=function(t,e){return r(t,i(t),e)}},1911:(t,e,n)=>{var r=n(8363),i=n(1442);t.exports=function(t,e){return r(t,i(t),e)}},4429:(t,e,n)=>{var r=n(5639)["__core-js_shared__"];t.exports=r},1750:(t,e,n)=>{var r=n(5976),i=n(6612);t.exports=function(t){return r((function(e,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&i(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++r<a;){var c=n[r];c&&t(e,c,r,o)}return e}))}},9291:(t,e,n)=>{var r=n(8612);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var a=n.length,o=e?a:-1,s=Object(n);(e?o--:++o<a)&&!1!==i(s[o],o,s););return n}}},5063:t=>{t.exports=function(t){return function(e,n,r){for(var i=-1,a=Object(e),o=r(e),s=o.length;s--;){var c=o[t?s:++i];if(!1===n(a[c],c,a))break}return e}}},7740:(t,e,n)=>{var r=n(7206),i=n(8612),a=n(3674);t.exports=function(t){return function(e,n,o){var s=Object(e);if(!i(e)){var c=r(n,3);e=a(e),n=function(t){return c(s[t],t,s)}}var u=t(e,n,o);return u>-1?s[c?e[u]:u]:void 0}}},7445:(t,e,n)=>{var r=n(98),i=n(6612),a=n(8601);t.exports=function(t){return function(e,n,o){return o&&"number"!=typeof o&&i(e,n,o)&&(n=o=void 0),e=a(e),void 0===n?(n=e,e=0):n=a(n),o=void 0===o?e<n?1:-1:a(o),r(e,n,o,t)}}},3593:(t,e,n)=>{var r=n(8525),i=n(308),a=n(1814),o=r&&1/a(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=o},8777:(t,e,n)=>{var r=n(852),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},7114:(t,e,n)=>{var r=n(8668),i=n(2908),a=n(4757);t.exports=function(t,e,n,o,s,c){var u=1&n,l=t.length,h=e.length;if(l!=h&&!(u&&h>l))return!1;var f=c.get(t),d=c.get(e);if(f&&d)return f==e&&d==t;var p=-1,g=!0,y=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++p<l;){var m=t[p],v=e[p];if(o)var b=u?o(v,m,p,e,t,c):o(m,v,p,t,e,c);if(void 0!==b){if(b)continue;g=!1;break}if(y){if(!i(e,(function(t,e){if(!a(y,e)&&(m===t||s(m,t,n,o,c)))return y.push(e)}))){g=!1;break}}else if(m!==v&&!s(m,v,n,o,c)){g=!1;break}}return c.delete(t),c.delete(e),g}},8351:(t,e,n)=>{var r=n(2705),i=n(1149),a=n(7813),o=n(7114),s=n(8776),c=n(1814),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;t.exports=function(t,e,n,r,u,h,f){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!h(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=s;case"[object Set]":var p=1&r;if(d||(d=c),t.size!=e.size&&!p)return!1;var g=f.get(t);if(g)return g==e;r|=2,f.set(t,e);var y=o(d(t),d(e),r,u,h,f);return f.delete(t),y;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},6096:(t,e,n)=>{var r=n(8234),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,a,o,s){var c=1&n,u=r(t),l=u.length;if(l!=r(e).length&&!c)return!1;for(var h=l;h--;){var f=u[h];if(!(c?f in e:i.call(e,f)))return!1}var d=s.get(t),p=s.get(e);if(d&&p)return d==e&&p==t;var g=!0;s.set(t,e),s.set(e,t);for(var y=c;++h<l;){var m=t[f=u[h]],v=e[f];if(a)var b=c?a(v,m,f,e,t,s):a(m,v,f,t,e,s);if(!(void 0===b?m===v||o(m,v,n,a,s):b)){g=!1;break}y||(y="constructor"==f)}if(g&&!y){var _=t.constructor,x=e.constructor;_==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x||(g=!1)}return s.delete(t),s.delete(e),g}},9021:(t,e,n)=>{var r=n(5564),i=n(5357),a=n(61);t.exports=function(t){return a(i(t,void 0,r),t+"")}},1957:(t,e,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},8234:(t,e,n)=>{var r=n(8866),i=n(9551),a=n(3674);t.exports=function(t){return r(t,a,i)}},6904:(t,e,n)=>{var r=n(8866),i=n(1442),a=n(1704);t.exports=function(t){return r(t,a,i)}},5050:(t,e,n)=>{var r=n(7019);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},1499:(t,e,n)=>{var r=n(9162),i=n(3674);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var a=e[n],o=t[a];e[n]=[a,o,r(o)]}return e}},852:(t,e,n)=>{var r=n(8458),i=n(7801);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},5924:(t,e,n)=>{var r=n(5569)(Object.getPrototypeOf,Object);t.exports=r},9607:(t,e,n)=>{var r=n(2705),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=a.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=o.call(t);return r&&(e?t[s]=n:delete t[s]),i}},9551:(t,e,n)=>{var r=n(4963),i=n(479),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(t){return null==t?[]:(t=Object(t),r(o(t),(function(e){return a.call(t,e)})))}:i;t.exports=s},1442:(t,e,n)=>{var r=n(2488),i=n(5924),a=n(9551),o=n(479),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,a(t)),t=i(t);return e}:o;t.exports=s},4160:(t,e,n)=>{var r=n(8552),i=n(7071),a=n(3818),o=n(8525),s=n(577),c=n(4239),u=n(346),l="[object Map]",h="[object Promise]",f="[object Set]",d="[object WeakMap]",p="[object DataView]",g=u(r),y=u(i),m=u(a),v=u(o),b=u(s),_=c;(r&&_(new r(new ArrayBuffer(1)))!=p||i&&_(new i)!=l||a&&_(a.resolve())!=h||o&&_(new o)!=f||s&&_(new s)!=d)&&(_=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,r=n?u(n):"";if(r)switch(r){case g:return p;case y:return l;case m:return h;case v:return f;case b:return d}return e}),t.exports=_},7801:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},222:(t,e,n)=>{var r=n(1811),i=n(5694),a=n(1469),o=n(5776),s=n(1780),c=n(327);t.exports=function(t,e,n){for(var u=-1,l=(e=r(e,t)).length,h=!1;++u<l;){var f=c(e[u]);if(!(h=null!=t&&n(t,f)))break;t=t[f]}return h||++u!=l?h:!!(l=null==t?0:t.length)&&s(l)&&o(f,l)&&(a(t)||i(t))}},2689:t=>{var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return e.test(t)}},1789:(t,e,n)=>{var r=n(4536);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},7667:(t,e,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},1327:(t,e,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},1866:(t,e,n)=>{var r=n(4536);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},3824:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},9148:(t,e,n)=>{var r=n(4318),i=n(7157),a=n(3147),o=n(419),s=n(7133);t.exports=function(t,e,n){var c=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return i(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(t,n);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return a(t);case"[object Symbol]":return o(t)}}},8517:(t,e,n)=>{var r=n(3118),i=n(5924),a=n(5726);t.exports=function(t){return"function"!=typeof t.constructor||a(t)?{}:r(i(t))}},7285:(t,e,n)=>{var r=n(2705),i=n(5694),a=n(1469),o=r?r.isConcatSpreadable:void 0;t.exports=function(t){return a(t)||i(t)||!!(o&&t&&t[o])}},5776:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}},6612:(t,e,n)=>{var r=n(7813),i=n(8612),a=n(5776),o=n(3218);t.exports=function(t,e,n){if(!o(n))return!1;var s=typeof e;return!!("number"==s?i(n)&&a(e,n.length):"string"==s&&e in n)&&r(n[e],t)}},5403:(t,e,n)=>{var r=n(1469),i=n(3448),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||o.test(t)||!a.test(t)||null!=e&&t in Object(e)}},7019:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},5346:(t,e,n)=>{var r,i=n(4429),a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!a&&a in t}},5726:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},9162:(t,e,n)=>{var r=n(3218);t.exports=function(t){return t==t&&!r(t)}},7040:t=>{t.exports=function(){this.__data__=[],this.size=0}},4125:(t,e,n)=>{var r=n(8470),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))}},2117:(t,e,n)=>{var r=n(8470);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},7518:(t,e,n)=>{var r=n(8470);t.exports=function(t){return r(this.__data__,t)>-1}},4705:(t,e,n)=>{var r=n(8470);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},4785:(t,e,n)=>{var r=n(1989),i=n(8407),a=n(7071);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},1285:(t,e,n)=>{var r=n(5050);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},6e3:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).get(t)}},9916:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).has(t)}},5265:(t,e,n)=>{var r=n(5050);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},8776:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},2634:t=>{t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},4523:(t,e,n)=>{var r=n(8306);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},4536:(t,e,n)=>{var r=n(852)(Object,"create");t.exports=r},6916:(t,e,n)=>{var r=n(5569)(Object.keys,Object);t.exports=r},3498:t=>{t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},1167:(t,e,n)=>{t=n.nmd(t);var r=n(1957),i=e&&!e.nodeType&&e,a=i&&t&&!t.nodeType&&t,o=a&&a.exports===i&&r.process,s=function(){try{return a&&a.require&&a.require("util").types||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=s},2333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5569:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},5357:(t,e,n)=>{var r=n(6874),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var a=arguments,o=-1,s=i(a.length-e,0),c=Array(s);++o<s;)c[o]=a[e+o];o=-1;for(var u=Array(e+1);++o<e;)u[o]=a[o];return u[e]=n(c),r(t,this,u)}}},5639:(t,e,n)=>{var r=n(1957),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();t.exports=a},6390:t=>{t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},619:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},2385:t=>{t.exports=function(t){return this.__data__.has(t)}},1814:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},61:(t,e,n)=>{var r=n(6560),i=n(1275)(r);t.exports=i},1275:t=>{var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var i=e(),a=16-(i-r);if(r=i,a>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},7465:(t,e,n)=>{var r=n(8407);t.exports=function(){this.__data__=new r,this.size=0}},3779:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},7599:t=>{t.exports=function(t){return this.__data__.get(t)}},4758:t=>{t.exports=function(t){return this.__data__.has(t)}},4309:(t,e,n)=>{var r=n(8407),i=n(7071),a=n(3369);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new a(o)}return n.set(t,e),this.size=n.size,this}},2351:t=>{t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}},8016:(t,e,n)=>{var r=n(8983),i=n(2689),a=n(1903);t.exports=function(t){return i(t)?a(t):r(t)}},5514:(t,e,n)=>{var r=n(4523),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(a,"$1"):n||t)})),e}));t.exports=o},327:(t,e,n)=>{var r=n(3448);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},346:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},7990:t=>{var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},1903:t=>{var e="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",r="[^\\ud800-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",o="(?:"+e+"|"+n+")?",s="[\\ufe0e\\ufe0f]?",c=s+o+"(?:\\u200d(?:"+[r,i,a].join("|")+")"+s+o+")*",u="(?:"+[r+e+"?",e,i,a,"[\\ud800-\\udfff]"].join("|")+")",l=RegExp(n+"(?="+n+")|"+u+c,"g");t.exports=function(t){for(var e=l.lastIndex=0;l.test(t);)++e;return e}},6678:(t,e,n)=>{var r=n(5990);t.exports=function(t){return r(t,4)}},361:(t,e,n)=>{var r=n(5990);t.exports=function(t){return r(t,5)}},5703:t=>{t.exports=function(t){return function(){return t}}},1747:(t,e,n)=>{var r=n(5976),i=n(7813),a=n(6612),o=n(1704),s=Object.prototype,c=s.hasOwnProperty,u=r((function(t,e){t=Object(t);var n=-1,r=e.length,u=r>2?e[2]:void 0;for(u&&a(e[0],e[1],u)&&(r=1);++n<r;)for(var l=e[n],h=o(l),f=-1,d=h.length;++f<d;){var p=h[f],g=t[p];(void 0===g||i(g,s[p])&&!c.call(t,p))&&(t[p]=l[p])}return t}));t.exports=u},6073:(t,e,n)=>{t.exports=n(4486)},7813:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},3105:(t,e,n)=>{var r=n(4963),i=n(760),a=n(7206),o=n(1469);t.exports=function(t,e){return(o(t)?r:i)(t,a(e,3))}},3311:(t,e,n)=>{var r=n(7740)(n(998));t.exports=r},998:(t,e,n)=>{var r=n(1848),i=n(7206),a=n(554),o=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var c=null==n?0:a(n);return c<0&&(c=o(s+c,0)),r(t,i(e,3),c)}},5564:(t,e,n)=>{var r=n(1078);t.exports=function(t){return null!=t&&t.length?r(t,1):[]}},4486:(t,e,n)=>{var r=n(7412),i=n(9881),a=n(4290),o=n(1469);t.exports=function(t,e){return(o(t)?r:i)(t,a(e))}},2620:(t,e,n)=>{var r=n(8483),i=n(4290),a=n(1704);t.exports=function(t,e){return null==t?t:r(t,i(e),a)}},7361:(t,e,n)=>{var r=n(7786);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},8721:(t,e,n)=>{var r=n(8565),i=n(222);t.exports=function(t,e){return null!=t&&i(t,e,r)}},9095:(t,e,n)=>{var r=n(13),i=n(222);t.exports=function(t,e){return null!=t&&i(t,e,r)}},6557:t=>{t.exports=function(t){return t}},5694:(t,e,n)=>{var r=n(9454),i=n(7005),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return i(t)&&o.call(t,"callee")&&!s.call(t,"callee")};t.exports=c},1469:t=>{var e=Array.isArray;t.exports=e},8612:(t,e,n)=>{var r=n(3560),i=n(1780);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},9246:(t,e,n)=>{var r=n(8612),i=n(7005);t.exports=function(t){return i(t)&&r(t)}},4144:(t,e,n)=>{t=n.nmd(t);var r=n(5639),i=n(5062),a=e&&!e.nodeType&&e,o=a&&t&&!t.nodeType&&t,s=o&&o.exports===a?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||i;t.exports=c},1609:(t,e,n)=>{var r=n(280),i=n(4160),a=n(5694),o=n(1469),s=n(8612),c=n(4144),u=n(5726),l=n(6719),h=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(o(t)||"string"==typeof t||"function"==typeof t.splice||c(t)||l(t)||a(t)))return!t.length;var e=i(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(u(t))return!r(t).length;for(var n in t)if(h.call(t,n))return!1;return!0}},3560:(t,e,n)=>{var r=n(4239),i=n(3218);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1780:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},6688:(t,e,n)=>{var r=n(5588),i=n(1717),a=n(1167),o=a&&a.isMap,s=o?i(o):r;t.exports=s},3218:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},7005:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},8630:(t,e,n)=>{var r=n(4239),i=n(5924),a=n(7005),o=Function.prototype,s=Object.prototype,c=o.toString,u=s.hasOwnProperty,l=c.call(Object);t.exports=function(t){if(!a(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=u.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},2928:(t,e,n)=>{var r=n(9221),i=n(1717),a=n(1167),o=a&&a.isSet,s=o?i(o):r;t.exports=s},7037:(t,e,n)=>{var r=n(4239),i=n(1469),a=n(7005);t.exports=function(t){return"string"==typeof t||!i(t)&&a(t)&&"[object String]"==r(t)}},3448:(t,e,n)=>{var r=n(4239),i=n(7005);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},6719:(t,e,n)=>{var r=n(8749),i=n(1717),a=n(1167),o=a&&a.isTypedArray,s=o?i(o):r;t.exports=s},2353:t=>{t.exports=function(t){return void 0===t}},3674:(t,e,n)=>{var r=n(4636),i=n(280),a=n(8612);t.exports=function(t){return a(t)?r(t):i(t)}},1704:(t,e,n)=>{var r=n(4636),i=n(313),a=n(8612);t.exports=function(t){return a(t)?r(t,!0):i(t)}},928:t=>{t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},5161:(t,e,n)=>{var r=n(9932),i=n(7206),a=n(9199),o=n(1469);t.exports=function(t,e){return(o(t)?r:a)(t,i(e,3))}},6604:(t,e,n)=>{var r=n(9465),i=n(7816),a=n(7206);t.exports=function(t,e){var n={};return e=a(e,3),i(t,(function(t,i,a){r(n,i,e(t,i,a))})),n}},6162:(t,e,n)=>{var r=n(6029),i=n(3325),a=n(6557);t.exports=function(t){return t&&t.length?r(t,a,i):void 0}},8306:(t,e,n)=>{var r=n(3369);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},3857:(t,e,n)=>{var r=n(2980),i=n(1750)((function(t,e,n){r(t,e,n)}));t.exports=i},3632:(t,e,n)=>{var r=n(6029),i=n(433),a=n(6557);t.exports=function(t){return t&&t.length?r(t,a,i):void 0}},2762:(t,e,n)=>{var r=n(6029),i=n(7206),a=n(433);t.exports=function(t,e){return t&&t.length?r(t,i(e,2),a):void 0}},308:t=>{t.exports=function(){}},7771:(t,e,n)=>{var r=n(5639);t.exports=function(){return r.Date.now()}},9722:(t,e,n)=>{var r=n(5970),i=n(9021)((function(t,e){return null==t?{}:r(t,e)}));t.exports=i},9601:(t,e,n)=>{var r=n(371),i=n(9152),a=n(5403),o=n(327);t.exports=function(t){return a(t)?r(o(t)):i(t)}},6026:(t,e,n)=>{var r=n(7445)();t.exports=r},4061:(t,e,n)=>{var r=n(2663),i=n(9881),a=n(7206),o=n(107),s=n(1469);t.exports=function(t,e,n){var c=s(t)?r:o,u=arguments.length<3;return c(t,a(e,4),n,u,i)}},4238:(t,e,n)=>{var r=n(280),i=n(4160),a=n(8612),o=n(7037),s=n(8016);t.exports=function(t){if(null==t)return 0;if(a(t))return o(t)?s(t):t.length;var e=i(t);return"[object Map]"==e||"[object Set]"==e?t.size:r(t).length}},9734:(t,e,n)=>{var r=n(1078),i=n(9556),a=n(5976),o=n(6612),s=a((function(t,e){if(null==t)return[];var n=e.length;return n>1&&o(t,e[0],e[1])?e=[]:n>2&&o(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=s},479:t=>{t.exports=function(){return[]}},5062:t=>{t.exports=function(){return!1}},8601:(t,e,n)=>{var r=n(4841);t.exports=function(t){return t?Infinity===(t=r(t))||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},554:(t,e,n)=>{var r=n(8601);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},4841:(t,e,n)=>{var r=n(7561),i=n(3218),a=n(3448),o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(a(t))return NaN;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=s.test(t);return n||c.test(t)?u(t.slice(2),n?2:8):o.test(t)?NaN:+t}},3678:(t,e,n)=>{var r=n(8363),i=n(1704);t.exports=function(t){return r(t,i(t))}},9833:(t,e,n)=>{var r=n(531);t.exports=function(t){return null==t?"":r(t)}},8718:(t,e,n)=>{var r=n(7412),i=n(3118),a=n(7816),o=n(7206),s=n(5924),c=n(1469),u=n(4144),l=n(3560),h=n(3218),f=n(6719);t.exports=function(t,e,n){var d=c(t),p=d||u(t)||f(t);if(e=o(e,4),null==n){var g=t&&t.constructor;n=p?d?new g:[]:h(t)&&l(g)?i(s(t)):{}}return(p?r:a)(t,(function(t,r,i){return e(n,t,r,i)})),n}},3386:(t,e,n)=>{var r=n(1078),i=n(5976),a=n(5652),o=n(9246),s=i((function(t){return a(r(t,1,o,!0))}));t.exports=s},3955:(t,e,n)=>{var r=n(9833),i=0;t.exports=function(t){var e=++i;return r(t)+e}},2628:(t,e,n)=>{var r=n(7415),i=n(3674);t.exports=function(t){return null==t?[]:r(t,i(t))}},7287:(t,e,n)=>{var r=n(4865),i=n(1757);t.exports=function(t,e){return i(t||[],e||[],r)}},9234:()=>{},1748:(t,e,n)=>{var r={"./locale":9234,"./locale.js":9234};function i(t){var e=a(t);return n(e)}function a(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=a,t.exports=i,i.id=1748},1941:function(t,e,n){(t=n.nmd(t)).exports=function(){"use strict";var e,r;function i(){return e.apply(null,arguments)}function a(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return void 0===t}function c(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function u(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function l(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function f(t,e){for(var n in e)h(e,n)&&(t[n]=e[n]);return h(e,"toString")&&(t.toString=e.toString),h(e,"valueOf")&&(t.valueOf=e.valueOf),t}function d(t,e,n,r){return be(t,e,n,r,!0).utc()}function p(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function g(t){if(null==t._isValid){var e=p(t),n=r.call(e.parsedDateParts,(function(t){return null!=t})),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i}return t._isValid}function y(t){var e=d(NaN);return null!=t?f(p(e),t):p(e).userInvalidated=!0,e}r=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};var m=i.momentProperties=[];function v(t,e){var n,r,i;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=p(e)),s(e._locale)||(t._locale=e._locale),0<m.length)for(n=0;n<m.length;n++)s(i=e[r=m[n]])||(t[r]=i);return t}var b=!1;function _(t){v(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,i.updateOffset(this),b=!1)}function x(t){return t instanceof _||null!=t&&null!=t._isAMomentObject}function w(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function k(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=w(e)),n}function T(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&&k(t[r])!==k(e[r]))&&o++;return o+a}function C(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function E(t,e){var n=!0;return f((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var r,a=[],o=0;o<arguments.length;o++){if(r="","object"==typeof arguments[o]){for(var s in r+="\n["+o+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[o];a.push(r)}C(t+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var S,A={};function M(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),A[t]||(C(e),A[t]=!0)}function N(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function D(t,e){var n,r=f({},t);for(n in e)h(e,n)&&(o(t[n])&&o(e[n])?(r[n]={},f(r[n],t[n]),f(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)h(t,n)&&!h(e,n)&&o(t[n])&&(r[n]=f({},r[n]));return r}function B(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,S=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)h(t,e)&&n.push(e);return n};var L={};function O(t,e){var n=t.toLowerCase();L[n]=L[n+"s"]=L[e]=t}function I(t){return"string"==typeof t?L[t]||L[t.toLowerCase()]:void 0}function R(t){var e,n,r={};for(n in t)h(t,n)&&(e=I(n))&&(r[e]=t[n]);return r}var F={};function P(t,e){F[t]=e}function Y(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(0<=t?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var j=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,U=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,z={},$={};function q(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&($[t]=i),e&&($[e[0]]=function(){return Y(i.apply(this,arguments),e[1],e[2])}),n&&($[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function H(t,e){return t.isValid()?(e=W(e,t.localeData()),z[e]=z[e]||function(t){var e,n,r,i=t.match(j);for(e=0,n=i.length;e<n;e++)$[i[e]]?i[e]=$[i[e]]:i[e]=(r=i[e]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(e){var r,a="";for(r=0;r<n;r++)a+=N(i[r])?i[r].call(e,t):i[r];return a}}(e),z[e](t)):t.localeData().invalidDate()}function W(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for(U.lastIndex=0;0<=n&&U.test(t);)t=t.replace(U,r),U.lastIndex=0,n-=1;return t}var V=/\d/,G=/\d\d/,X=/\d{3}/,Z=/\d{4}/,Q=/[+-]?\d{6}/,K=/\d\d?/,J=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,et=/\d{1,3}/,nt=/\d{1,4}/,rt=/[+-]?\d{1,6}/,it=/\d+/,at=/[+-]?\d+/,ot=/Z|[+-]\d\d:?\d\d/gi,st=/Z|[+-]\d\d(?::?\d\d)?/gi,ct=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut={};function lt(t,e,n){ut[t]=N(e)?e:function(t,r){return t&&n?n:e}}function ht(t,e){return h(ut,t)?ut[t](e._strict,e._locale):new RegExp(ft(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,r,i){return e||n||r||i}))))}function ft(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var dt={};function pt(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),c(e)&&(r=function(t,n){n[e]=k(t)}),n=0;n<t.length;n++)dt[t[n]]=r}function gt(t,e){pt(t,(function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)}))}function yt(t){return mt(t)?366:365}function mt(t){return t%4==0&&t%100!=0||t%400==0}q("Y",0,0,(function(){var t=this.year();return t<=9999?""+t:"+"+t})),q(0,["YY",2],0,(function(){return this.year()%100})),q(0,["YYYY",4],0,"year"),q(0,["YYYYY",5],0,"year"),q(0,["YYYYYY",6,!0],0,"year"),O("year","y"),P("year",1),lt("Y",at),lt("YY",K,G),lt("YYYY",nt,Z),lt("YYYYY",rt,Q),lt("YYYYYY",rt,Q),pt(["YYYYY","YYYYYY"],0),pt("YYYY",(function(t,e){e[0]=2===t.length?i.parseTwoDigitYear(t):k(t)})),pt("YY",(function(t,e){e[0]=i.parseTwoDigitYear(t)})),pt("Y",(function(t,e){e[0]=parseInt(t,10)})),i.parseTwoDigitYear=function(t){return k(t)+(68<k(t)?1900:2e3)};var vt,bt=_t("FullYear",!0);function _t(t,e){return function(n){return null!=n?(wt(this,t,n),i.updateOffset(this,e),this):xt(this,t)}}function xt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function wt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&mt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),kt(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function kt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=(e%12+12)%12;return t+=(e-n)/12,1===n?mt(t)?29:28:31-n%7%2}vt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},q("M",["MM",2],"Mo",(function(){return this.month()+1})),q("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),q("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),O("month","M"),P("month",8),lt("M",K),lt("MM",K,G),lt("MMM",(function(t,e){return e.monthsShortRegex(t)})),lt("MMMM",(function(t,e){return e.monthsRegex(t)})),pt(["M","MM"],(function(t,e){e[1]=k(t)-1})),pt(["MMM","MMMM"],(function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[1]=i:p(n).invalidMonth=t}));var Tt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ct="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Et="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function St(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=k(e);else if(!c(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),kt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function At(t){return null!=t?(St(this,t),i.updateOffset(this,!0),this):xt(this,"Month")}var Mt=ct,Nt=ct;function Dt(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],a=[];for(e=0;e<12;e++)n=d([2e3,e]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(t),i.sort(t),a.sort(t),e=0;e<12;e++)r[e]=ft(r[e]),i[e]=ft(i[e]);for(e=0;e<24;e++)a[e]=ft(a[e]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Bt(t){var e;if(t<100&&0<=t){var n=Array.prototype.slice.call(arguments);n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function Lt(t,e,n){var r=7+e-n;return-(7+Bt(t,0,r).getUTCDay()-e)%7+r-1}function Ot(t,e,n,r,i){var a,o,s=1+7*(e-1)+(7+n-r)%7+Lt(t,r,i);return o=s<=0?yt(a=t-1)+s:s>yt(t)?(a=t+1,s-yt(t)):(a=t,s),{year:a,dayOfYear:o}}function It(t,e,n){var r,i,a=Lt(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+Rt(i=t.year()-1,e,n):o>Rt(t.year(),e,n)?(r=o-Rt(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function Rt(t,e,n){var r=Lt(t,e,n),i=Lt(t+1,e,n);return(yt(t)-r+i)/7}function Ft(t,e){return t.slice(e,7).concat(t.slice(0,e))}q("w",["ww",2],"wo","week"),q("W",["WW",2],"Wo","isoWeek"),O("week","w"),O("isoWeek","W"),P("week",5),P("isoWeek",5),lt("w",K),lt("ww",K,G),lt("W",K),lt("WW",K,G),gt(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=k(t)})),q("d",0,"do","day"),q("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),q("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),q("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),q("e",0,0,"weekday"),q("E",0,0,"isoWeekday"),O("day","d"),O("weekday","e"),O("isoWeekday","E"),P("day",11),P("weekday",11),P("isoWeekday",11),lt("d",K),lt("e",K),lt("E",K),lt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),lt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),lt("dddd",(function(t,e){return e.weekdaysRegex(t)})),gt(["dd","ddd","dddd"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:p(n).invalidWeekday=t})),gt(["d","e","E"],(function(t,e,n,r){e[r]=k(t)}));var Pt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Yt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),jt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ut=ct,zt=ct,$t=ct;function qt(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],c=[],u=[];for(e=0;e<7;e++)n=d([2e3,1]).day(e),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),a=this.weekdays(n,""),o.push(r),s.push(i),c.push(a),u.push(r),u.push(i),u.push(a);for(o.sort(t),s.sort(t),c.sort(t),u.sort(t),e=0;e<7;e++)s[e]=ft(s[e]),c[e]=ft(c[e]),u[e]=ft(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Ht(){return this.hours()%12||12}function Wt(t,e){q(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Vt(t,e){return e._meridiemParse}q("H",["HH",2],0,"hour"),q("h",["hh",2],0,Ht),q("k",["kk",2],0,(function(){return this.hours()||24})),q("hmm",0,0,(function(){return""+Ht.apply(this)+Y(this.minutes(),2)})),q("hmmss",0,0,(function(){return""+Ht.apply(this)+Y(this.minutes(),2)+Y(this.seconds(),2)})),q("Hmm",0,0,(function(){return""+this.hours()+Y(this.minutes(),2)})),q("Hmmss",0,0,(function(){return""+this.hours()+Y(this.minutes(),2)+Y(this.seconds(),2)})),Wt("a",!0),Wt("A",!1),O("hour","h"),P("hour",13),lt("a",Vt),lt("A",Vt),lt("H",K),lt("h",K),lt("k",K),lt("HH",K,G),lt("hh",K,G),lt("kk",K,G),lt("hmm",J),lt("hmmss",tt),lt("Hmm",J),lt("Hmmss",tt),pt(["H","HH"],3),pt(["k","kk"],(function(t,e,n){var r=k(t);e[3]=24===r?0:r})),pt(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),pt(["h","hh"],(function(t,e,n){e[3]=k(t),p(n).bigHour=!0})),pt("hmm",(function(t,e,n){var r=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r)),p(n).bigHour=!0})),pt("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r,2)),e[5]=k(t.substr(i)),p(n).bigHour=!0})),pt("Hmm",(function(t,e,n){var r=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r))})),pt("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r,2)),e[5]=k(t.substr(i))}));var Gt,Xt=_t("Hours",!0),Zt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ct,monthsShort:Et,week:{dow:0,doy:6},weekdays:Pt,weekdaysMin:jt,weekdaysShort:Yt,meridiemParse:/[ap]\.?m?\.?/i},Qt={},Kt={};function Jt(t){return t?t.toLowerCase().replace("_","-"):t}function te(e){var r=null;if(!Qt[e]&&t&&t.exports)try{r=Gt._abbr,n(1748)("./"+e),ee(r)}catch(e){}return Qt[e]}function ee(t,e){var n;return t&&((n=s(e)?re(t):ne(t,e))?Gt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Gt._abbr}function ne(t,e){if(null===e)return delete Qt[t],null;var n,r=Zt;if(e.abbr=t,null!=Qt[t])M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Qt[t]._config;else if(null!=e.parentLocale)if(null!=Qt[e.parentLocale])r=Qt[e.parentLocale]._config;else{if(null==(n=te(e.parentLocale)))return Kt[e.parentLocale]||(Kt[e.parentLocale]=[]),Kt[e.parentLocale].push({name:t,config:e}),null;r=n._config}return Qt[t]=new B(D(r,e)),Kt[t]&&Kt[t].forEach((function(t){ne(t.name,t.config)})),ee(t),Qt[t]}function re(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Gt;if(!a(t)){if(e=te(t))return e;t=[t]}return function(t){for(var e,n,r,i,a=0;a<t.length;){for(e=(i=Jt(t[a]).split("-")).length,n=(n=Jt(t[a+1]))?n.split("-"):null;0<e;){if(r=te(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&T(i,n,!0)>=e-1)break;e--}a++}return Gt}(t)}function ie(t){var e,n=t._a;return n&&-2===p(t).overflow&&(e=n[1]<0||11<n[1]?1:n[2]<1||n[2]>kt(n[0],n[1])?2:n[3]<0||24<n[3]||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||59<n[4]?4:n[5]<0||59<n[5]?5:n[6]<0||999<n[6]?6:-1,p(t)._overflowDayOfYear&&(e<0||2<e)&&(e=2),p(t)._overflowWeeks&&-1===e&&(e=7),p(t)._overflowWeekday&&-1===e&&(e=8),p(t).overflow=e),t}function ae(t,e,n){return null!=t?t:null!=e?e:n}function oe(t){var e,n,r,a,o,s=[];if(!t._d){var c,u;for(c=t,u=new Date(i.now()),r=c._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,n,r,i,a,o,s,c;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)a=1,o=4,n=ae(e.GG,t._a[0],It(_e(),1,4).year),r=ae(e.W,1),((i=ae(e.E,1))<1||7<i)&&(c=!0);else{a=t._locale._week.dow,o=t._locale._week.doy;var u=It(_e(),a,o);n=ae(e.gg,t._a[0],u.year),r=ae(e.w,u.week),null!=e.d?((i=e.d)<0||6<i)&&(c=!0):null!=e.e?(i=e.e+a,(e.e<0||6<e.e)&&(c=!0)):i=a}r<1||r>Rt(n,a,o)?p(t)._overflowWeeks=!0:null!=c?p(t)._overflowWeekday=!0:(s=Ot(n,r,i,a,o),t._a[0]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=ae(t._a[0],r[0]),(t._dayOfYear>yt(o)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),n=Bt(o,0,t._dayOfYear),t._a[1]=n.getUTCMonth(),t._a[2]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=r[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Bt:function(t,e,n,r,i,a,o){var s;return t<100&&0<=t?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,a,o),s}).apply(null,s),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(p(t).weekdayMismatch=!0)}}var se=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ce=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ue=/Z|[+-]\d\d(?::?\d\d)?/,le=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],he=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],fe=/^\/?Date\((\-?\d+)/i;function de(t){var e,n,r,i,a,o,s=t._i,c=se.exec(s)||ce.exec(s);if(c){for(p(t).iso=!0,e=0,n=le.length;e<n;e++)if(le[e][1].exec(c[1])){i=le[e][0],r=!1!==le[e][2];break}if(null==i)return void(t._isValid=!1);if(c[3]){for(e=0,n=he.length;e<n;e++)if(he[e][1].exec(c[3])){a=(c[2]||" ")+he[e][0];break}if(null==a)return void(t._isValid=!1)}if(!r&&null!=a)return void(t._isValid=!1);if(c[4]){if(!ue.exec(c[4]))return void(t._isValid=!1);o="Z"}t._f=i+(a||"")+(o||""),me(t)}else t._isValid=!1}var pe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;var ge={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ye(t){var e,n,r,i=pe.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(i){var a=function(t,e,n,r,i,a){var o=[function(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}(t),Et.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}(i[4],i[3],i[2],i[5],i[6],i[7]);if(n=a,r=t,(e=i[1])&&Yt.indexOf(e)!==new Date(n[0],n[1],n[2]).getDay()&&(p(r).weekdayMismatch=!0,!(r._isValid=!1)))return;t._a=a,t._tzm=function(t,e,n){if(t)return ge[t];if(e)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(i[8],i[9],i[10]),t._d=Bt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),p(t).rfc2822=!0}else t._isValid=!1}function me(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],p(t).empty=!0;var e,n,r,a,o,s,c,u,l=""+t._i,f=l.length,d=0;for(r=W(t._f,t._locale).match(j)||[],e=0;e<r.length;e++)a=r[e],(n=(l.match(ht(a,t))||[])[0])&&(0<(o=l.substr(0,l.indexOf(n))).length&&p(t).unusedInput.push(o),l=l.slice(l.indexOf(n)+n.length),d+=n.length),$[a]?(n?p(t).empty=!1:p(t).unusedTokens.push(a),s=a,u=t,null!=(c=n)&&h(dt,s)&&dt[s](c,u._a,u,s)):t._strict&&!n&&p(t).unusedTokens.push(a);p(t).charsLeftOver=f-d,0<l.length&&p(t).unusedInput.push(l),t._a[3]<=12&&!0===p(t).bigHour&&0<t._a[3]&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[3]=function(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):(null!=t.isPM&&((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0)),e)}(t._locale,t._a[3],t._meridiem),oe(t),ie(t)}else ye(t);else de(t)}function ve(t){var e,n,r,h,d=t._i,m=t._f;return t._locale=t._locale||re(t._l),null===d||void 0===m&&""===d?y({nullInput:!0}):("string"==typeof d&&(t._i=d=t._locale.preparse(d)),x(d)?new _(ie(d)):(u(d)?t._d=d:a(m)?function(t){var e,n,r,i,a;if(0===t._f.length)return p(t).invalidFormat=!0,t._d=new Date(NaN);for(i=0;i<t._f.length;i++)a=0,e=v({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],me(e),g(e)&&(a+=p(e).charsLeftOver,a+=10*p(e).unusedTokens.length,p(e).score=a,(null==r||a<r)&&(r=a,n=e));f(t,n||e)}(t):m?me(t):s(n=(e=t)._i)?e._d=new Date(i.now()):u(n)?e._d=new Date(n.valueOf()):"string"==typeof n?(r=e,null===(h=fe.exec(r._i))?(de(r),!1===r._isValid&&(delete r._isValid,ye(r),!1===r._isValid&&(delete r._isValid,i.createFromInputFallback(r)))):r._d=new Date(+h[1])):a(n)?(e._a=l(n.slice(0),(function(t){return parseInt(t,10)})),oe(e)):o(n)?function(t){if(!t._d){var e=R(t._i);t._a=l([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),oe(t)}}(e):c(n)?e._d=new Date(n):i.createFromInputFallback(e),g(t)||(t._d=null),t))}function be(t,e,n,r,i){var s,c={};return!0!==n&&!1!==n||(r=n,n=void 0),(o(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||a(t)&&0===t.length)&&(t=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=i,c._l=n,c._i=t,c._f=e,c._strict=r,(s=new _(ie(ve(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function _e(t,e,n,r){return be(t,e,n,r,!1)}i.createFromInputFallback=E("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var xe=E("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=_e.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:y()})),we=E("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=_e.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:y()}));function ke(t,e){var n,r;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return _e();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}var Te=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ce(t){var e=R(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,c=e.minute||0,u=e.second||0,l=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===vt.call(Te,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,r=0;r<Te.length;++r)if(t[Te[r]]){if(n)return!1;parseFloat(t[Te[r]])!==k(t[Te[r]])&&(n=!0)}return!0}(e),this._milliseconds=+l+1e3*u+6e4*c+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=re(),this._bubble()}function Ee(t){return t instanceof Ce}function Se(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Ae(t,e){q(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+Y(~~(t/60),2)+e+Y(~~t%60,2)}))}Ae("Z",":"),Ae("ZZ",""),lt("Z",st),lt("ZZ",st),pt(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=Ne(st,t)}));var Me=/([\+\-]|\d\d)/gi;function Ne(t,e){var n=(e||"").match(t);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Me)||["-",0,0],i=60*r[1]+k(r[2]);return 0===i?0:"+"===r[0]?i:-i}function De(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(x(t)||u(t)?t.valueOf():_e(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):_e(t).local()}function Be(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Le(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Oe=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ie=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Re(t,e){var n,r,i,a=t,o=null;return Ee(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:c(t)?(a={},e?a[e]=t:a.milliseconds=t):(o=Oe.exec(t))?(n="-"===o[1]?-1:1,a={y:0,d:k(o[2])*n,h:k(o[3])*n,m:k(o[4])*n,s:k(o[5])*n,ms:k(Se(1e3*o[6]))*n}):(o=Ie.exec(t))?(n="-"===o[1]?-1:1,a={y:Fe(o[2],n),M:Fe(o[3],n),w:Fe(o[4],n),d:Fe(o[5],n),h:Fe(o[6],n),m:Fe(o[7],n),s:Fe(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=function(t,e){var n;return t.isValid()&&e.isValid()?(e=De(e,t),t.isBefore(e)?n=Pe(t,e):((n=Pe(e,t)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}(_e(a.from),_e(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new Ce(a),Ee(t)&&h(t,"_locale")&&(r._locale=t._locale),r}function Fe(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Pe(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Ye(t,e){return function(n,r){var i;return null===r||isNaN(+r)||(M(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),je(this,Re(n="string"==typeof n?+n:n,r),t),this}}function je(t,e,n,r){var a=e._milliseconds,o=Se(e._days),s=Se(e._months);t.isValid()&&(r=null==r||r,s&&St(t,xt(t,"Month")+s*n),o&&wt(t,"Date",xt(t,"Date")+o*n),a&&t._d.setTime(t._d.valueOf()+a*n),r&&i.updateOffset(t,o||s))}Re.fn=Ce.prototype,Re.invalid=function(){return Re(NaN)};var Ue=Ye(1,"add"),ze=Ye(-1,"subtract");function $e(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,"months");return-(n+(e-r<0?(e-r)/(r-t.clone().add(n-1,"months")):(e-r)/(t.clone().add(n+1,"months")-r)))||0}function qe(t){var e;return void 0===t?this._locale._abbr:(null!=(e=re(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var He=E("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function We(){return this._locale}var Ve=126227808e5;function Ge(t,e){return(t%e+e)%e}function Xe(t,e,n){return t<100&&0<=t?new Date(t+400,e,n)-Ve:new Date(t,e,n).valueOf()}function Ze(t,e,n){return t<100&&0<=t?Date.UTC(t+400,e,n)-Ve:Date.UTC(t,e,n)}function Qe(t,e){q(0,[t,t.length],0,e)}function Ke(t,e,n,r,i){var a;return null==t?It(this,r,i).year:((a=Rt(t,r,i))<e&&(e=a),function(t,e,n,r,i){var a=Ot(t,e,n,r,i),o=Bt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,t,e,n,r,i))}q(0,["gg",2],0,(function(){return this.weekYear()%100})),q(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Qe("gggg","weekYear"),Qe("ggggg","weekYear"),Qe("GGGG","isoWeekYear"),Qe("GGGGG","isoWeekYear"),O("weekYear","gg"),O("isoWeekYear","GG"),P("weekYear",1),P("isoWeekYear",1),lt("G",at),lt("g",at),lt("GG",K,G),lt("gg",K,G),lt("GGGG",nt,Z),lt("gggg",nt,Z),lt("GGGGG",rt,Q),lt("ggggg",rt,Q),gt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,r){e[r.substr(0,2)]=k(t)})),gt(["gg","GG"],(function(t,e,n,r){e[r]=i.parseTwoDigitYear(t)})),q("Q",0,"Qo","quarter"),O("quarter","Q"),P("quarter",7),lt("Q",V),pt("Q",(function(t,e){e[1]=3*(k(t)-1)})),q("D",["DD",2],"Do","date"),O("date","D"),P("date",9),lt("D",K),lt("DD",K,G),lt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),pt(["D","DD"],2),pt("Do",(function(t,e){e[2]=k(t.match(K)[0])}));var Je=_t("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear"),O("dayOfYear","DDD"),P("dayOfYear",4),lt("DDD",et),lt("DDDD",X),pt(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=k(t)})),q("m",["mm",2],0,"minute"),O("minute","m"),P("minute",14),lt("m",K),lt("mm",K,G),pt(["m","mm"],4);var tn=_t("Minutes",!1);q("s",["ss",2],0,"second"),O("second","s"),P("second",15),lt("s",K),lt("ss",K,G),pt(["s","ss"],5);var en,nn=_t("Seconds",!1);for(q("S",0,0,(function(){return~~(this.millisecond()/100)})),q(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),q(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),q(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),q(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),q(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),q(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),O("millisecond","ms"),P("millisecond",16),lt("S",et,V),lt("SS",et,G),lt("SSS",et,X),en="SSSS";en.length<=9;en+="S")lt(en,it);function rn(t,e){e[6]=k(1e3*("0."+t))}for(en="S";en.length<=9;en+="S")pt(en,rn);var an=_t("Milliseconds",!1);q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");var on=_.prototype;function sn(t){return t}on.add=Ue,on.calendar=function(t,e){var n=t||_e(),r=De(n,this).startOf("day"),a=i.calendarFormat(this,r)||"sameElse",o=e&&(N(e[a])?e[a].call(this,n):e[a]);return this.format(o||this.localeData().calendar(a,this,_e(n)))},on.clone=function(){return new _(this)},on.diff=function(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=De(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=I(e)){case"year":a=$e(this,r)/12;break;case"month":a=$e(this,r);break;case"quarter":a=$e(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:w(a)},on.endOf=function(t){var e;if(void 0===(t=I(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-Ge(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-Ge(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-Ge(e,1e3)-1}return this._d.setTime(e),i.updateOffset(this,!0),this},on.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=H(this,t);return this.localeData().postformat(e)},on.from=function(t,e){return this.isValid()&&(x(t)&&t.isValid()||_e(t).isValid())?Re({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.fromNow=function(t){return this.from(_e(),t)},on.to=function(t,e){return this.isValid()&&(x(t)&&t.isValid()||_e(t).isValid())?Re({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.toNow=function(t){return this.to(_e(),t)},on.get=function(t){return N(this[t=I(t)])?this[t]():this},on.invalidAt=function(){return p(this).overflow},on.isAfter=function(t,e){var n=x(t)?t:_e(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},on.isBefore=function(t,e){var n=x(t)?t:_e(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},on.isBetween=function(t,e,n,r){var i=x(t)?t:_e(t),a=x(e)?e:_e(e);return!!(this.isValid()&&i.isValid()&&a.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))},on.isSame=function(t,e){var n,r=x(t)?t:_e(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},on.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},on.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},on.isValid=function(){return g(this)},on.lang=He,on.locale=qe,on.localeData=We,on.max=we,on.min=xe,on.parsingFlags=function(){return f({},p(this))},on.set=function(t,e){if("object"==typeof t)for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:F[n]});return e.sort((function(t,e){return t.priority-e.priority})),e}(t=R(t)),r=0;r<n.length;r++)this[n[r].unit](t[n[r].unit]);else if(N(this[t=I(t)]))return this[t](e);return this},on.startOf=function(t){var e;if(void 0===(t=I(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Ge(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=Ge(e,6e4);break;case"second":e=this._d.valueOf(),e-=Ge(e,1e3)}return this._d.setTime(e),i.updateOffset(this,!0),this},on.subtract=ze,on.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},on.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},on.toDate=function(){return new Date(this.valueOf())},on.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||9999<n.year()?H(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):N(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",H(n,"Z")):H(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},on.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=e+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},on.toJSON=function(){return this.isValid()?this.toISOString():null},on.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},on.unix=function(){return Math.floor(this.valueOf()/1e3)},on.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},on.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},on.year=bt,on.isLeapYear=function(){return mt(this.year())},on.weekYear=function(t){return Ke.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},on.isoWeekYear=function(t){return Ke.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},on.quarter=on.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},on.month=At,on.daysInMonth=function(){return kt(this.year(),this.month())},on.week=on.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},on.isoWeek=on.isoWeeks=function(t){var e=It(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},on.weeksInYear=function(){var t=this.localeData()._week;return Rt(this.year(),t.dow,t.doy)},on.isoWeeksInYear=function(){return Rt(this.year(),1,4)},on.date=Je,on.day=on.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,n,r=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,n=this.localeData(),t="string"!=typeof e?e:isNaN(e)?"number"==typeof(e=n.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-r,"d")):r},on.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},on.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null==t)return this.day()||7;var e,n,r=(e=t,n=this.localeData(),"string"==typeof e?n.weekdaysParse(e)%7||7:isNaN(e)?null:e);return this.day(this.day()%7?r:r-7)},on.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},on.hour=on.hours=Xt,on.minute=on.minutes=tn,on.second=on.seconds=nn,on.millisecond=on.milliseconds=an,on.utcOffset=function(t,e,n){var r,a=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null==t)return this._isUTC?a:Be(this);if("string"==typeof t){if(null===(t=Ne(st,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(r=Be(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==t&&(!e||this._changeInProgress?je(this,Re(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this},on.utc=function(t){return this.utcOffset(0,t)},on.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Be(this),"m")),this},on.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Ne(ot,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},on.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?_e(t).utcOffset():0,(this.utcOffset()-t)%60==0)},on.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},on.isLocal=function(){return!!this.isValid()&&!this._isUTC},on.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},on.isUtc=Le,on.isUTC=Le,on.zoneAbbr=function(){return this._isUTC?"UTC":""},on.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},on.dates=E("dates accessor is deprecated. Use date instead.",Je),on.months=E("months accessor is deprecated. Use month instead",At),on.years=E("years accessor is deprecated. Use year instead",bt),on.zone=E("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),on.isDSTShifted=E("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),(t=ve(t))._a){var e=t._isUTC?d(t._a):_e(t._a);this._isDSTShifted=this.isValid()&&0<T(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted}));var cn=B.prototype;function un(t,e,n,r){var i=re(),a=d().set(r,e);return i[n](a,t)}function ln(t,e,n){if(c(t)&&(e=t,t=void 0),t=t||"",null!=e)return un(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=un(t,r,n,"month");return i}function hn(t,e,n,r){"boolean"==typeof t?c(e)&&(n=e,e=void 0):(e=t,t=!1,c(n=e)&&(n=e,e=void 0)),e=e||"";var i,a=re(),o=t?a._week.dow:0;if(null!=n)return un(e,(n+o)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=un(e,(i+o)%7,r,"day");return s}cn.calendar=function(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return N(r)?r.call(e,n):r},cn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},cn.invalidDate=function(){return this._invalidDate},cn.ordinal=function(t){return this._ordinal.replace("%d",t)},cn.preparse=sn,cn.postformat=sn,cn.relativeTime=function(t,e,n,r){var i=this._relativeTime[n];return N(i)?i(t,e,n,r):i.replace(/%d/i,t)},cn.pastFuture=function(t,e){var n=this._relativeTime[0<t?"future":"past"];return N(n)?n(e):n.replace(/%s/i,e)},cn.set=function(t){var e,n;for(n in t)N(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},cn.months=function(t,e){return t?a(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Tt).test(e)?"format":"standalone"][t.month()]:a(this._months)?this._months:this._months.standalone},cn.monthsShort=function(t,e){return t?a(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Tt.test(e)?"format":"standalone"][t.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},cn.monthsParse=function(t,e,n){var r,i,a;if(this._monthsParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=d([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=vt.call(this._shortMonthsParse,o))?i:null:-1!==(i=vt.call(this._longMonthsParse,o))?i:null:"MMM"===e?-1!==(i=vt.call(this._shortMonthsParse,o))||-1!==(i=vt.call(this._longMonthsParse,o))?i:null:-1!==(i=vt.call(this._longMonthsParse,o))||-1!==(i=vt.call(this._shortMonthsParse,o))?i:null}.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=d([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},cn.monthsRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||Dt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=Nt),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},cn.monthsShortRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||Dt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Mt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},cn.week=function(t){return It(t,this._week.dow,this._week.doy).week},cn.firstDayOfYear=function(){return this._week.doy},cn.firstDayOfWeek=function(){return this._week.dow},cn.weekdays=function(t,e){var n=a(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Ft(n,this._week.dow):t?n[t.day()]:n},cn.weekdaysMin=function(t){return!0===t?Ft(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},cn.weekdaysShort=function(t){return!0===t?Ft(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},cn.weekdaysParse=function(t,e,n){var r,i,a;if(this._weekdaysParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=d([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=vt.call(this._weekdaysParse,o))?i:null:"ddd"===e?-1!==(i=vt.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=vt.call(this._minWeekdaysParse,o))?i:null:"dddd"===e?-1!==(i=vt.call(this._weekdaysParse,o))||-1!==(i=vt.call(this._shortWeekdaysParse,o))||-1!==(i=vt.call(this._minWeekdaysParse,o))?i:null:"ddd"===e?-1!==(i=vt.call(this._shortWeekdaysParse,o))||-1!==(i=vt.call(this._weekdaysParse,o))||-1!==(i=vt.call(this._minWeekdaysParse,o))?i:null:-1!==(i=vt.call(this._minWeekdaysParse,o))||-1!==(i=vt.call(this._weekdaysParse,o))||-1!==(i=vt.call(this._shortWeekdaysParse,o))?i:null}.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=d([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}},cn.weekdaysRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=Ut),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},cn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=zt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},cn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$t),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},cn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},cn.meridiem=function(t,e,n){return 11<t?n?"pm":"PM":n?"am":"AM"},ee("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===k(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=E("moment.lang is deprecated. Use moment.locale instead.",ee),i.langData=E("moment.langData is deprecated. Use moment.localeData instead.",re);var fn=Math.abs;function dn(t,e,n,r){var i=Re(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function pn(t){return t<0?Math.floor(t):Math.ceil(t)}function gn(t){return 4800*t/146097}function yn(t){return 146097*t/4800}function mn(t){return function(){return this.as(t)}}var vn=mn("ms"),bn=mn("s"),_n=mn("m"),xn=mn("h"),wn=mn("d"),kn=mn("w"),Tn=mn("M"),Cn=mn("Q"),En=mn("y");function Sn(t){return function(){return this.isValid()?this._data[t]:NaN}}var An=Sn("milliseconds"),Mn=Sn("seconds"),Nn=Sn("minutes"),Dn=Sn("hours"),Bn=Sn("days"),Ln=Sn("months"),On=Sn("years"),In=Math.round,Rn={ss:44,s:45,m:45,h:22,d:26,M:11},Fn=Math.abs;function Pn(t){return(0<t)-(t<0)||+t}function Yn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=Fn(this._milliseconds)/1e3,r=Fn(this._days),i=Fn(this._months);e=w((t=w(n/60))/60),n%=60,t%=60;var a=w(i/12),o=i%=12,s=r,c=e,u=t,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var f=h<0?"-":"",d=Pn(this._months)!==Pn(h)?"-":"",p=Pn(this._days)!==Pn(h)?"-":"",g=Pn(this._milliseconds)!==Pn(h)?"-":"";return f+"P"+(a?d+a+"Y":"")+(o?d+o+"M":"")+(s?p+s+"D":"")+(c||u||l?"T":"")+(c?g+c+"H":"")+(u?g+u+"M":"")+(l?g+l+"S":"")}var jn=Ce.prototype;return jn.isValid=function(){return this._isValid},jn.abs=function(){var t=this._data;return this._milliseconds=fn(this._milliseconds),this._days=fn(this._days),this._months=fn(this._months),t.milliseconds=fn(t.milliseconds),t.seconds=fn(t.seconds),t.minutes=fn(t.minutes),t.hours=fn(t.hours),t.months=fn(t.months),t.years=fn(t.years),this},jn.add=function(t,e){return dn(this,t,e,1)},jn.subtract=function(t,e){return dn(this,t,e,-1)},jn.as=function(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=I(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+gn(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(yn(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}},jn.asMilliseconds=vn,jn.asSeconds=bn,jn.asMinutes=_n,jn.asHours=xn,jn.asDays=wn,jn.asWeeks=kn,jn.asMonths=Tn,jn.asQuarters=Cn,jn.asYears=En,jn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},jn._bubble=function(){var t,e,n,r,i,a=this._milliseconds,o=this._days,s=this._months,c=this._data;return 0<=a&&0<=o&&0<=s||a<=0&&o<=0&&s<=0||(a+=864e5*pn(yn(s)+o),s=o=0),c.milliseconds=a%1e3,t=w(a/1e3),c.seconds=t%60,e=w(t/60),c.minutes=e%60,n=w(e/60),c.hours=n%24,s+=i=w(gn(o+=w(n/24))),o-=pn(yn(i)),r=w(s/12),s%=12,c.days=o,c.months=s,c.years=r,this},jn.clone=function(){return Re(this)},jn.get=function(t){return t=I(t),this.isValid()?this[t+"s"]():NaN},jn.milliseconds=An,jn.seconds=Mn,jn.minutes=Nn,jn.hours=Dn,jn.days=Bn,jn.weeks=function(){return w(this.days()/7)},jn.months=Ln,jn.years=On,jn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,n,r,i,a,o,s,c,u,l,h=this.localeData(),f=(e=!t,n=h,r=Re(this).abs(),i=In(r.as("s")),a=In(r.as("m")),o=In(r.as("h")),s=In(r.as("d")),c=In(r.as("M")),u=In(r.as("y")),(l=i<=Rn.ss&&["s",i]||i<Rn.s&&["ss",i]||a<=1&&["m"]||a<Rn.m&&["mm",a]||o<=1&&["h"]||o<Rn.h&&["hh",o]||s<=1&&["d"]||s<Rn.d&&["dd",s]||c<=1&&["M"]||c<Rn.M&&["MM",c]||u<=1&&["y"]||["yy",u])[2]=e,l[3]=0<+this,l[4]=n,function(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}.apply(null,l));return t&&(f=h.pastFuture(+this,f)),h.postformat(f)},jn.toISOString=Yn,jn.toString=Yn,jn.toJSON=Yn,jn.locale=qe,jn.localeData=We,jn.toIsoString=E("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Yn),jn.lang=He,q("X",0,0,"unix"),q("x",0,0,"valueOf"),lt("x",at),lt("X",/[+-]?\d+(\.\d{1,3})?/),pt("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))})),pt("x",(function(t,e,n){n._d=new Date(k(t))})),i.version="2.24.0",e=_e,i.fn=on,i.min=function(){return ke("isBefore",[].slice.call(arguments,0))},i.max=function(){return ke("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=d,i.unix=function(t){return _e(1e3*t)},i.months=function(t,e){return ln(t,e,"months")},i.isDate=u,i.locale=ee,i.invalid=y,i.duration=Re,i.isMoment=x,i.weekdays=function(t,e,n){return hn(t,e,n,"weekdays")},i.parseZone=function(){return _e.apply(null,arguments).parseZone()},i.localeData=re,i.isDuration=Ee,i.monthsShort=function(t,e){return ln(t,e,"monthsShort")},i.weekdaysMin=function(t,e,n){return hn(t,e,n,"weekdaysMin")},i.defineLocale=ne,i.updateLocale=function(t,e){if(null!=e){var n,r,i=Zt;null!=(r=te(t))&&(i=r._config),(n=new B(e=D(i,e))).parentLocale=Qt[t],Qt[t]=n,ee(t)}else null!=Qt[t]&&(null!=Qt[t].parentLocale?Qt[t]=Qt[t].parentLocale:null!=Qt[t]&&delete Qt[t]);return Qt[t]},i.locales=function(){return S(Qt)},i.weekdaysShort=function(t,e,n){return hn(t,e,n,"weekdaysShort")},i.normalizeUnits=I,i.relativeTimeRounding=function(t){return void 0===t?In:"function"==typeof t&&(In=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==Rn[t]&&(void 0===e?Rn[t]:(Rn[t]=e,"s"===t&&(Rn.ss=e-1),!0))},i.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=on,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()},6470:t=>{"use strict";function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function n(t,e){for(var n,r="",i=0,a=-1,o=0,s=0;s<=t.length;++s){if(s<t.length)n=t.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(a===s-1||1===o);else if(a!==s-1&&2===o){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),a=s,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,a=s,o=0;continue}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+t.slice(a+1,s):r=t.slice(a+1,s),i=s-a-1;a=s,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var t,r="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(void 0===t&&(t=process.cwd()),o=t),e(o),0!==o.length&&(r=o+"/"+r,i=47===o.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(t){if(e(t),0===t.length)return".";var r=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=n(t,!r)).length||r||(t="."),t.length>0&&i&&(t+="/"),r?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,n=0;n<arguments.length;++n){var i=arguments[n];e(i),i.length>0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":r.normalize(t)},relative:function(t,n){if(e(t),e(n),t===n)return"";if((t=r.resolve(t))===(n=r.resolve(n)))return"";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var a=t.length,o=a-i,s=1;s<n.length&&47===n.charCodeAt(s);++s);for(var c=n.length-s,u=o<c?o:c,l=-1,h=0;h<=u;++h){if(h===u){if(c>u){if(47===n.charCodeAt(s+h))return n.slice(s+h+1);if(0===h)return n.slice(s+h)}else o>u&&(47===t.charCodeAt(i+h)?l=h:0===h&&(l=0));break}var f=t.charCodeAt(i+h);if(f!==n.charCodeAt(s+h))break;47===f&&(l=h)}var d="";for(h=i+l+1;h<=a;++h)h!==a&&47!==t.charCodeAt(h)||(0===d.length?d+="..":d+="/..");return d.length>0?d+n.slice(s+l):(s+=l,47===n.charCodeAt(s)&&++s,n.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var n=t.charCodeAt(0),r=47===n,i=-1,a=!0,o=t.length-1;o>=1;--o)if(47===(n=t.charCodeAt(o))){if(!a){i=o;break}}else a=!1;return-1===i?r?"/":".":r&&1===i?"//":t.slice(0,i)},basename:function(t,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');e(t);var r,i=0,a=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return"";var s=n.length-1,c=-1;for(r=t.length-1;r>=0;--r){var u=t.charCodeAt(r);if(47===u){if(!o){i=r+1;break}}else-1===c&&(o=!1,c=r+1),s>=0&&(u===n.charCodeAt(s)?-1==--s&&(a=r):(s=-1,a=c))}return i===a?a=c:-1===a&&(a=t.length),t.slice(i,a)}for(r=t.length-1;r>=0;--r)if(47===t.charCodeAt(r)){if(!o){i=r+1;break}}else-1===a&&(o=!1,a=r+1);return-1===a?"":t.slice(i,a)},extname:function(t){e(t);for(var n=-1,r=0,i=-1,a=!0,o=0,s=t.length-1;s>=0;--s){var c=t.charCodeAt(s);if(47!==c)-1===i&&(a=!1,i=s+1),46===c?-1===n?n=s:1!==o&&(o=1):-1!==n&&(o=-1);else if(!a){r=s+1;break}}return-1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":t.slice(n,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+"/"+r:r}(0,t)},parse:function(t){e(t);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return n;var r,i=t.charCodeAt(0),a=47===i;a?(n.root="/",r=1):r=0;for(var o=-1,s=0,c=-1,u=!0,l=t.length-1,h=0;l>=r;--l)if(47!==(i=t.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===i?-1===o?o=l:1!==h&&(h=1):-1!==o&&(h=-1);else if(!u){s=l+1;break}return-1===o||-1===c||0===h||1===h&&o===c-1&&o===s+1?-1!==c&&(n.base=n.name=0===s&&a?t.slice(1,c):t.slice(s,c)):(0===s&&a?(n.name=t.slice(1,o),n.base=t.slice(1,c)):(n.name=t.slice(s,o),n.base=t.slice(s,c)),n.ext=t.slice(o,c)),s>0?n.dir=t.slice(0,s-1):a&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,t.exports=r},8218:()=>{},8009:()=>{},5354:()=>{},6878:()=>{},8183:()=>{},1428:()=>{},4551:()=>{},8800:()=>{},1993:()=>{},3069:()=>{},9143:()=>{}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var a=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.c=e,n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r=n(n.s=8968);return r.default})()));
+//# sourceMappingURL=mermaid.min.js.map
/**
* @version : 15.6.0 - Bridge.NET
* @author : Object.NET, Inc. http://bridge.net/
diff --git a/src/main/webapp/js/integrate.min.js b/src/main/webapp/js/integrate.min.js
index 7537c807..4cae2fb6 100644
--- a/src/main/webapp/js/integrate.min.js
+++ b/src/main/webapp/js/integrate.min.js
@@ -469,7 +469,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.2.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"19.0.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
@@ -10945,27 +10945,27 @@ DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile
DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,f){this.savingFile?null!=f&&f({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(l){this.sync.cleanup(b,f,l)}),f):this.updateFile(b,f)};
DrawioFile.prototype.updateFile=function(b,f,l,d){null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():this.getLatestVersion(mxUtils.bind(this,function(t){try{null!=l&&l()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[t]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=f&&f():null!=t?this.mergeFile(t,b,f,d):this.reloadFile(b,
f))}catch(u){null!=f&&f(u)}}),f))};
-DrawioFile.prototype.mergeFile=function(b,f,l,d){var t=!0;try{this.stats.fileMerged++;var u=this.getShadowPages(),D=b.getShadowPages();if(null!=D&&0<D.length){var c=[this.ui.diffPages(null!=d?d:u,D)],e=this.ignorePatches(c);this.setShadowPages(D);if(e)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",e);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(u,this.ui.pages):null;d={};e={};var g=this.ui.patchPages(u,c[0]),k=this.ui.getHashValueForPages(g,
-d),m=this.ui.getHashValueForPages(D,e);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",u,"pages",this.ui.pages,"patches",c,"backup",this.backupPatch,"checksum",k,"current",m,"valid",k==m,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=k&&k!=m){var p=this.compressReportData(this.getAnonymizedXmlForPages(D)),v=this.compressReportData(this.getAnonymizedXmlForPages(g)),x=this.ui.hashValue(b.getCurrentEtag()),A=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(l,c,"Shadow Details: "+JSON.stringify(d)+"\nChecksum: "+k+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(e)+"\nFrom: "+x+"\nTo: "+A+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+v,null,"mergeFile");return}if(null!=this.sync){var y=this.sync.patchRealtime(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==y||mxUtils.isEmptyObject(y)||c.push(y)}this.patch(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw t=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
+DrawioFile.prototype.mergeFile=function(b,f,l,d){var t=!0;try{this.stats.fileMerged++;var u=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var c=[this.ui.diffPages(null!=d?d:u,E)],e=this.ignorePatches(c);this.setShadowPages(E);if(e)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",e);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(u,this.ui.pages):null;d={};e={};var g=this.ui.patchPages(u,c[0]),k=this.ui.getHashValueForPages(g,
+d),m=this.ui.getHashValueForPages(E,e);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",u,"pages",this.ui.pages,"patches",c,"backup",this.backupPatch,"checksum",k,"current",m,"valid",k==m,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=k&&k!=m){var p=this.compressReportData(this.getAnonymizedXmlForPages(E)),v=this.compressReportData(this.getAnonymizedXmlForPages(g)),x=this.ui.hashValue(b.getCurrentEtag()),z=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(l,c,"Shadow Details: "+JSON.stringify(d)+"\nChecksum: "+k+"\nCurrent: "+m+"\nCurrent Details: "+JSON.stringify(e)+"\nFrom: "+x+"\nTo: "+z+"\n\nFile Data:\n"+p+"\nPatched Shadow:\n"+v,null,"mergeFile");return}if(null!=this.sync){var y=this.sync.patchRealtime(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==y||mxUtils.isEmptyObject(y)||c.push(y)}this.patch(c,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw t=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=f&&f()}catch(K){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=l&&l(K);try{if(t)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,K);else{var L=this.getCurrentUser(),N=null!=L?L.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),N,K)}}catch(q){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var f=new mxCodec(mxUtils.createXmlDocument()),l=f.document.createElement("mxfile");if(null!=b)for(var d=0;d<b.length;d++){var t=f.encode(new mxGraphModel(b[d].root));"1"!=urlParams.dev&&(t=this.ui.anonymizeNode(t,!0));t.setAttribute("id",b[d].getId());b[d].viewState&&this.ui.editor.graph.saveViewState(b[d].viewState,t,!0);l.appendChild(t)}return mxUtils.getPrettyXml(l)};
DrawioFile.prototype.compressReportData=function(b,f,l){f=null!=f?f:1E4;null!=l&&null!=b&&b.length>l?b=b.substring(0,l)+"[...]":null!=b&&b.length>f&&(b=Graph.compress(b)+"\n");return b};
DrawioFile.prototype.checksumError=function(b,f,l,d,t){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=f)for(b=0;b<f.length;b++)this.ui.anonymizePatch(f[b]);var u=mxUtils.bind(this,function(g){var k=this.compressReportData(JSON.stringify(f,null,2));g=null==g?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(g.data)),
-25E3);this.sendErrorReport("Checksum Error in "+t+" "+this.getHash(),(null!=l?l:"")+"\n\nPatches:\n"+k+(null!=g?"\n\nRemote:\n"+g:""),null,7E4)});null==d?u(null):this.getLatestVersion(mxUtils.bind(this,function(g){null!=g&&g.getCurrentEtag()==d?u(g):u(null)}),function(){})}else{var D=this.getCurrentUser(),c=null!=D?D.id:"unknown",e=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")";EditorUi.logError("Checksum Error in "+t+" "+e,null,this.getMode()+"."+this.getId(),"user_"+c+
+25E3);this.sendErrorReport("Checksum Error in "+t+" "+this.getHash(),(null!=l?l:"")+"\n\nPatches:\n"+k+(null!=g?"\n\nRemote:\n"+g:""),null,7E4)});null==d?u(null):this.getLatestVersion(mxUtils.bind(this,function(g){null!=g&&g.getCurrentEtag()==d?u(g):u(null)}),function(){})}else{var E=this.getCurrentUser(),c=null!=E?E.id:"unknown",e=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")";EditorUi.logError("Checksum Error in "+t+" "+e,null,this.getMode()+"."+this.getId(),"user_"+c+
(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+JSON.stringify(f).length+"-patches_"+f.length+"-size_"+this.getSize());try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+e,action:t,label:"user_"+c+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+JSON.stringify(f).length+"-patches_"+f.length+"-size_"+this.getSize()})}catch(g){}}}catch(g){}};
-DrawioFile.prototype.sendErrorReport=function(b,f,l,d){try{var t=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),u=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),D=this.getCurrentUser(),c=null!=D?this.ui.hashValue(D.id):"unknown",e=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),k=g.lastIndexOf(".");D="xml";0<k&&(D=g.substring(k));var m=null!=l?l.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
-":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+D+")\nUser="+c+e+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
+DrawioFile.prototype.sendErrorReport=function(b,f,l,d){try{var t=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),u=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),c=null!=E?this.ui.hashValue(E.id):"unknown",e=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),k=g.lastIndexOf(".");E="xml";0<k&&(E=g.substring(k));var m=null!=l?l.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+E+")\nUser="+c+e+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=f?"\n\n"+f:
"")+(null!=l?"\n\nError: "+l.message:"")+"\n\nStack:\n"+m+"\n\nShadow:\n"+t+"\n\nData:\n"+u,d)}catch(p){}};
-DrawioFile.prototype.reloadFile=function(b,f){try{this.ui.spinner.stop();var l=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),f);else{var d=this.ui.editor.graph,t=d.getSelectionCells(),u=d.getViewState(),D=
-this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(D,u,t);null!=this.backupPatch&&this.patch([this.backupPatch]);var c=this.ui.getCurrentFile();null!=c&&(c.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),l,mxResources.get("cancel"),mxResources.get("discardChanges")):
+DrawioFile.prototype.reloadFile=function(b,f){try{this.ui.spinner.stop();var l=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),f);else{var d=this.ui.editor.graph,t=d.getSelectionCells(),u=d.getViewState(),E=
+this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(E,u,t);null!=this.backupPatch&&this.patch([this.backupPatch]);var c=this.ui.getCurrentFile();null!=c&&(c.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),l,mxResources.get("cancel"),mxResources.get("discardChanges")):
l()}catch(d){null!=f&&f(d)}};DrawioFile.prototype.mergeLatestVersion=function(b,f,l){this.getLatestVersion(mxUtils.bind(this,function(d){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(d.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(d.getDescriptor());this.descriptorChanged();null!=f&&f()}),l)};
DrawioFile.prototype.copyFile=function(b,f){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var f=!0;if(null!=b)for(var l=0;l<b.length&&f;l++)f=f&&mxUtils.isEmptyObject(b[l]);return f};
-DrawioFile.prototype.patch=function(b,f,l){if(null!=b){var d=this.ui.editor.undoManager,t=d.history.slice(),u=d.indexOfNextAdd,D=this.ui.editor.graph;D.container.style.visibility="hidden";var c=this.changeListenerEnabled;this.changeListenerEnabled=l;var e=D.foldingEnabled,g=D.mathEnabled,k=D.cellRenderer.redraw;D.cellRenderer.redraw=function(m){m.view.graph.isEditing(m.cell)&&(m.view.graph.scrollCellToVisible(m.cell),m.view.graph.cellEditor.resize());k.apply(this,arguments)};D.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{D.container.style.visibility="";D.model.endUpdate();D.cellRenderer.redraw=k;this.changeListenerEnabled=c;l||(d.history=t,d.indexOfNextAdd=u,d.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)g!=D.mathEnabled?
-(this.ui.editor.updateGraphComponents(),D.refresh()):(e!=D.foldingEnabled?D.view.revalidate():D.view.validate(),D.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",f,"undoable",l)}return b};
+DrawioFile.prototype.patch=function(b,f,l){if(null!=b){var d=this.ui.editor.undoManager,t=d.history.slice(),u=d.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var c=this.changeListenerEnabled;this.changeListenerEnabled=l;var e=E.foldingEnabled,g=E.mathEnabled,k=E.cellRenderer.redraw;E.cellRenderer.redraw=function(m){m.view.graph.isEditing(m.cell)&&(m.view.graph.scrollCellToVisible(m.cell),m.view.graph.cellEditor.resize());k.apply(this,arguments)};E.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,f,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=k;this.changeListenerEnabled=c;l||(d.history=t,d.indexOfNextAdd=u,d.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)g!=E.mathEnabled?
+(this.ui.editor.updateGraphComponents(),E.refresh()):(e!=E.foldingEnabled?E.view.revalidate():E.view.validate(),E.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",f,"undoable",l)}return b};
DrawioFile.prototype.save=function(b,f,l,d,t,u){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",d,"overwrite",t,"manual",u,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!t&&this.invalidChecksum)if(null!=l)l({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=f&&f();else if(null!=l)l({message:mxResources.get("readOnly")});
-else throw Error(mxResources.get("readOnly"));}catch(D){if(null!=l)l(D);else throw D;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
+else throw Error(mxResources.get("readOnly"));}catch(E){if(null!=l)l(E);else throw E;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var f=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=f&&(f.viewState=this.ui.editor.graph.getViewState(),f.needsUpdate=!0)}f=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return f};
DrawioFile.prototype.updateFileData=function(){null!=this.sync&&this.sync.sendLocalChanges();this.setData(this.createData());null!=this.sync&&this.sync.fileDataUpdated()};DrawioFile.prototype.isCompressedStorage=function(){return!0};DrawioFile.prototype.isCompressed=function(){var b=null!=this.ui.fileNode?this.ui.fileNode.getAttribute("compressed"):null;return null!=b?"false"!=b:this.isCompressedStorage()&&Editor.compressXml};DrawioFile.prototype.saveAs=function(b,f,l){};
DrawioFile.prototype.saveFile=function(b,f,l,d){};DrawioFile.prototype.getPublicUrl=function(b){b(null)};DrawioFile.prototype.isRestricted=function(){return!1};DrawioFile.prototype.isModified=function(){return this.modified};DrawioFile.prototype.getShadowModified=function(){return this.shadowModified};DrawioFile.prototype.setShadowModified=function(b){this.shadowModified=b};DrawioFile.prototype.setModified=function(b){this.shadowModified=this.modified=b};DrawioFile.prototype.isAutosaveOptional=function(){return!1};
DrawioFile.prototype.isAutosave=function(){return!this.inConflictState&&this.ui.editor.autosave};DrawioFile.prototype.isRenamable=function(){return!1};DrawioFile.prototype.rename=function(b,f,l){};DrawioFile.prototype.isMovable=function(){return!1};DrawioFile.prototype.isTrashed=function(){return!1};DrawioFile.prototype.move=function(b,f,l){};DrawioFile.prototype.share=function(){this.ui.alert(mxResources.get("sharingAvailable"),null,380)};DrawioFile.prototype.getHash=function(){return""};
@@ -11002,435 +11002,435 @@ DrawioFile.prototype.handleFileSuccess=function(b){this.ui.spinner.stop();this.u
!1,this.sync.fileChangedNotify()))):this.ui.editor.setStatus(""))};
DrawioFile.prototype.handleFileError=function(b,f){this.ui.spinner.stop();this.ui.getCurrentFile()==this&&(this.inConflictState?this.handleConflictError(b,f):(this.isModified()&&this.addUnsavedStatus(b),f?this.ui.handleError(b,null!=b?mxResources.get("errorSavingFile"):null):this.isModified()||(b=this.getErrorMessage(b),null!=b&&60<b.length&&(b=b.substring(0,60)+"..."),this.ui.editor.setStatus('<div class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("error"))+(null!=b?" ("+mxUtils.htmlEntities(b)+
")":"")+"</div>"))))};
-DrawioFile.prototype.handleConflictError=function(b,f){var l=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(D){this.handleFileError(D,!0)}),t=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,l,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),u=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
+DrawioFile.prototype.handleConflictError=function(b,f){var l=mxUtils.bind(this,function(){this.handleFileSuccess(!0)}),d=mxUtils.bind(this,function(E){this.handleFileError(E,!0)}),t=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&(this.ui.editor.setStatus(""),this.save(!0,l,d,null,!0,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage))}),u=mxUtils.bind(this,function(){this.ui.spinner.spin(document.body,mxResources.get("updatingDocument"))&&
this.synchronizeFile(mxUtils.bind(this,function(){this.ui.spinner.stop();this.ui.spinner.spin(document.body,mxResources.get(this.savingSpinnerKey))&&this.save(!0,l,d,null,null,this.constructor!=GitHubFile&&this.constructor!=GitLabFile||null==b?null:b.commitMessage)}),d)});"none"==DrawioFile.SYNC?this.showCopyDialog(l,d,t):this.invalidChecksum?this.showRefreshDialog(l,d,this.getErrorMessage(b)):f?this.showConflictDialog(t,u):this.addConflictStatus(mxUtils.bind(this,function(){this.ui.editor.setStatus(mxUtils.htmlEntities(mxResources.get("updatingDocument")));
this.synchronizeFile(l,d)}),this.getErrorMessage(b))};DrawioFile.prototype.getErrorMessage=function(b){var f=null!=b?null!=b.error?b.error.message:b.message:null;null==f&&null!=b&&b.code==App.ERROR_TIMEOUT&&(f=mxResources.get("timeout"));return f};DrawioFile.prototype.isOverdue=function(){return null!=this.ageStart&&Date.now()-this.ageStart.getTime()>=this.ui.warnInterval};
DrawioFile.prototype.fileChanged=function(b){b=null!=b?b:!0;this.lastChanged=new Date;this.setModified(!0);EditorUi.debug("DrawioFile.fileChanged",[this],"autosave",this.isAutosave(),"saving",this.savingFile);this.isAutosave()?(null!=this.savingStatusKey&&this.addAllSavedStatus(mxUtils.htmlEntities(mxResources.get(this.savingStatusKey))+"..."),this.ui.scheduleSanityCheck(),null==this.ageStart&&(this.ageStart=new Date),this.autosave(this.autosaveDelay,this.maxAutosaveDelay,mxUtils.bind(this,function(f){this.ui.stopSanityCheck();
null==this.autosaveThread?(this.handleFileSuccess(!0),this.ageStart=null):this.isModified()&&(this.ui.scheduleSanityCheck(),this.ageStart=this.lastChanged)}),mxUtils.bind(this,function(f){this.handleFileError(f)}))):(this.ageStart=null,this.isAutosaveOptional()&&this.ui.editor.autosave||this.inConflictState||this.addUnsavedStatus());null!=this.sync&&b&&this.sync.localFileChanged()};
DrawioFile.prototype.createSecret=function(b){var f=Editor.guid(32);null==this.sync||this.isOptimisticSync()?b(f):this.sync.createToken(f,mxUtils.bind(this,function(l){b(f,l)}),mxUtils.bind(this,function(){b(f)}))};DrawioFile.prototype.fileSaving=function(){null!=this.sync&&this.sync.fileSaving()};
DrawioFile.prototype.fileSaved=function(b,f,l,d,t){this.lastSaved=new Date;this.ageStart=null;try{this.stats.saved++;this.invalidChecksum=this.inConflictState=!1;var u=this.ui.getPagesForXml(b);null==this.sync||this.isOptimisticSync()?(this.setShadowPages(u),null!=this.sync&&(this.sync.lastModified=this.getLastModifiedDate(),this.sync.resetUpdateStatusThread(),this.isRealtime()&&this.sync.scheduleCleanup()),null!=l&&l()):this.sync.fileSaved(u,f,l,d,t)}catch(e){this.invalidChecksum=this.inConflictState=
-!0;this.descriptorChanged();null!=d&&d(e);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,e);else{var D=this.getCurrentUser(),c=null!=D?D.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),c,e)}}catch(g){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
+!0;this.descriptorChanged();null!=d&&d(e);try{if(this.errorReportsEnabled)this.sendErrorReport("Error in fileSaved",null,e);else{var E=this.getCurrentUser(),c=null!=E?E.id:"unknown";EditorUi.logError("Error in fileSaved",null,this.getMode()+"."+this.getId(),c,e)}}catch(g){}}EditorUi.debug("DrawioFile.fileSaved",[this],"savedData",[b],"inConflictState",this.inConflictState,"invalidChecksum",this.invalidChecksum)};
DrawioFile.prototype.autosave=function(b,f,l,d){null==this.lastAutosave&&(this.lastAutosave=Date.now());b=Date.now()-this.lastAutosave<f?b:0;this.clearAutosave();var t=window.setTimeout(mxUtils.bind(this,function(){this.lastAutosave=null;this.autosaveThread==t&&(this.autosaveThread=null);EditorUi.debug("DrawioFile.autosave",[this],"thread",t,"modified",this.isModified(),"now",this.isAutosaveNow(),"saving",this.savingFile);if(this.isModified()&&this.isAutosaveNow()){var u=this.isAutosaveRevision();
-u&&(this.lastAutosaveRevision=(new Date).getTime());this.save(u,mxUtils.bind(this,function(D){this.autosaveCompleted();null!=l&&l(D)}),mxUtils.bind(this,function(D){null!=d&&d(D)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=l&&l(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",t,"delay",b,"saving",this.savingFile);this.autosaveThread=t};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
+u&&(this.lastAutosaveRevision=(new Date).getTime());this.save(u,mxUtils.bind(this,function(E){this.autosaveCompleted();null!=l&&l(E)}),mxUtils.bind(this,function(E){null!=d&&d(E)}))}else this.isModified()||this.ui.editor.setStatus(""),null!=l&&l(null)}),b);EditorUi.debug("DrawioFile.autosave",[this],"thread",t,"delay",b,"saving",this.savingFile);this.autosaveThread=t};DrawioFile.prototype.isAutosaveNow=function(){return!0};DrawioFile.prototype.autosaveCompleted=function(){};
DrawioFile.prototype.clearAutosave=function(){null!=this.autosaveThread&&(window.clearTimeout(this.autosaveThread),this.autosaveThread=null)};DrawioFile.prototype.isAutosaveRevision=function(){var b=(new Date).getTime();return null==this.lastAutosaveRevision||b-this.lastAutosaveRevision>this.maxAutosaveRevisionDelay};DrawioFile.prototype.descriptorChanged=function(){this.fireEvent(new mxEventObject("descriptorChanged"))};DrawioFile.prototype.contentChanged=function(){this.fireEvent(new mxEventObject("contentChanged"))};
DrawioFile.prototype.close=function(b){this.updateFileData();this.stats.closed++;this.isAutosave()&&this.isModified()&&this.save(this.isAutosaveRevision(),null,null,b);this.destroy()};DrawioFile.prototype.hasSameExtension=function(b,f){if(null!=b&&null!=f){var l=b.lastIndexOf(".");b=0<l?b.substring(l):"";l=f.lastIndexOf(".");return b===(0<l?f.substring(l):"")}return b==f};
DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this.ui.editor.graph.model.removeListener(this.changeListener),this.ui.editor.graph.removeListener(this.changeListener),this.ui.removeListener(this.changeListener),this.changeListener=null)};DrawioFile.prototype.destroy=function(){this.clearAutosave();this.removeListeners();this.stats.destroyed++;null!=this.sync&&(this.sync.destroy(),this.sync=null)};DrawioFile.prototype.commentsSupported=function(){return!1};
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,f){b([])};DrawioFile.prototype.addComment=function(b,f,l){f(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,f){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,f)};LocalFile=function(b,f,l,d,t,u){DrawioFile.call(this,b,f);this.title=l;this.mode=d?null:App.MODE_DEVICE;this.fileHandle=t;this.desc=u};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,f,l){this.saveAs(this.title,f,l)};LocalFile.prototype.saveAs=function(b,f,l){this.saveFile(b,!1,f,l)};LocalFile.prototype.saveAs=function(b,f,l){this.saveFile(b,!1,f,l)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,f){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,f)};
-LocalFile.prototype.saveFile=function(b,f,l,d,t){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;t||this.updateFileData();var u=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var D=this.getData(),c=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()}),e=mxUtils.bind(this,function(g){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var k=mxUtils.bind(this,
+LocalFile.prototype.saveFile=function(b,f,l,d,t){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;t||this.updateFileData();var u=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),c=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()}),e=mxUtils.bind(this,function(g){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var k=mxUtils.bind(this,
function(p){this.savingFile=!1;null!=d&&d({error:p})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(p){this.fileHandle.getFile().then(mxUtils.bind(this,function(v){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[v],"conflict",this.desc.lastModified!=v.lastModified);this.desc.lastModified==v.lastModified?p.write(u?this.ui.base64ToBlob(g,"image/png"):g).then(mxUtils.bind(this,function(){p.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){try{var A=this.desc;this.savingFile=!1;this.desc=x;this.fileSaved(D,A,c,k);this.removeDraft()}catch(y){k(y)}}),k)}),k)}),k):(this.inConflictState=!0,k())}),mxUtils.bind(this,function(v){this.invalidFileHandle=!0;k(v)}))}),k)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(g,b,u?"image/png":"text/xml",u);else if(g.length<MAX_REQUEST_SIZE){var m=b.lastIndexOf(".");m=0<m?b.substring(m+1):"xml";
-(new mxXmlRequest(SAVE_URL,"format="+m+"&xml="+encodeURIComponent(g)+"&filename="+encodeURIComponent(b)+(u?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(g)}));c()}});u?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){e(g)}),d,this.ui.getCurrentFile()!=this?D:null,f.scale,f.border)):e(D)};
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(x){try{var z=this.desc;this.savingFile=!1;this.desc=x;this.fileSaved(E,z,c,k);this.removeDraft()}catch(y){k(y)}}),k)}),k)}),k):(this.inConflictState=!0,k())}),mxUtils.bind(this,function(v){this.invalidFileHandle=!0;k(v)}))}),k)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(g,b,u?"image/png":"text/xml",u);else if(g.length<MAX_REQUEST_SIZE){var m=b.lastIndexOf(".");m=0<m?b.substring(m+1):"xml";
+(new mxXmlRequest(SAVE_URL,"format="+m+"&xml="+encodeURIComponent(g)+"&filename="+encodeURIComponent(b)+(u?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(g)}));c()}});u?(f=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){e(g)}),d,this.ui.getCurrentFile()!=this?E:null,f.scale,f.border)):e(E)};
LocalFile.prototype.rename=function(b,f,l){this.title=b;this.descriptorChanged();null!=f&&f()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};LocalLibrary=function(b,f,l){LocalFile.call(this,b,f,l)};mxUtils.extend(LocalLibrary,LocalFile);LocalLibrary.prototype.getHash=function(){return"F"+this.getTitle()};LocalLibrary.prototype.isAutosave=function(){return!1};LocalLibrary.prototype.saveAs=function(b,f,l){this.saveFile(b,!1,f,l)};LocalLibrary.prototype.updateFileData=function(){};LocalLibrary.prototype.open=function(){};StorageFile=function(b,f,l){DrawioFile.call(this,b,f);this.title=l};mxUtils.extend(StorageFile,DrawioFile);StorageFile.prototype.autosaveDelay=2E3;StorageFile.prototype.maxAutosaveDelay=2E4;StorageFile.prototype.type="F";StorageFile.prototype.getMode=function(){return App.MODE_BROWSER};StorageFile.prototype.isAutosaveOptional=function(){return!0};StorageFile.prototype.getHash=function(){return"L"+encodeURIComponent(this.getTitle())};StorageFile.prototype.getTitle=function(){return this.title};
StorageFile.prototype.isRenamable=function(){return!0};StorageFile.prototype.save=function(b,f,l){this.saveAs(this.getTitle(),f,l)};StorageFile.prototype.saveAs=function(b,f,l){DrawioFile.prototype.save.apply(this,arguments);this.saveFile(b,!1,f,l)};
-StorageFile.insertFile=function(b,f,l,d,t){var u=mxUtils.bind(this,function(D){var c=function(){var e=new StorageFile(b,l,f);e.saveFile(f,!1,function(){d(e)},t)};D?b.confirm(mxResources.get("replaceIt",[f]),c,t):c()});StorageFile.getFileContent(b,f,function(D){u(null!=D)},function(){u(!1)})};StorageFile.getFileContent=function(b,f,l,d){b.getDatabaseItem(f,function(t){l(null!=t?t.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,l):null!=d&&d()}),"files")};
+StorageFile.insertFile=function(b,f,l,d,t){var u=mxUtils.bind(this,function(E){var c=function(){var e=new StorageFile(b,l,f);e.saveFile(f,!1,function(){d(e)},t)};E?b.confirm(mxResources.get("replaceIt",[f]),c,t):c()});StorageFile.getFileContent(b,f,function(E){u(null!=E)},function(){u(!1)})};StorageFile.getFileContent=function(b,f,l,d){b.getDatabaseItem(f,function(t){l(null!=t?t.data:null)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,l):null!=d&&d()}),"files")};
StorageFile.getFileInfo=function(b,f,l,d){b.getDatabaseItem(f,function(t){l(t)},mxUtils.bind(this,function(){null==b.database?b.getLocalData(f,function(t){l(null!=t?{title:f}:null)}):null!=d&&d()}),"filesInfo")};
-StorageFile.prototype.saveFile=function(b,f,l,d){if(this.isEditable()){var t=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var u=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()});this.setShadowModified(!1);var D=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:D.length,lastModified:Date.now(),type:this.type},{title:this.title,data:D}],u,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,
-D,u):null!=d&&d()}),["filesInfo","files"])}catch(c){null!=d&&d(c)}});this.isRenamable()&&"."==b.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(u){this.isRenamable()&&this.getTitle()!=b&&null!=u?this.ui.confirm(mxResources.get("replaceIt",[b]),t,d):t()}),d)}else null!=l&&l()};
+StorageFile.prototype.saveFile=function(b,f,l,d){if(this.isEditable()){var t=mxUtils.bind(this,function(){this.isRenamable()&&(this.title=b);try{var u=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=l&&l()});this.setShadowModified(!1);var E=this.getData();this.ui.setDatabaseItem(null,[{title:this.title,size:E.length,lastModified:Date.now(),type:this.type},{title:this.title,data:E}],u,mxUtils.bind(this,function(){null==this.ui.database?this.ui.setLocalData(this.title,
+E,u):null!=d&&d()}),["filesInfo","files"])}catch(c){null!=d&&d(c)}});this.isRenamable()&&"."==b.charAt(0)&&null!=d?d({message:mxResources.get("invalidName")}):StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(u){this.isRenamable()&&this.getTitle()!=b&&null!=u?this.ui.confirm(mxResources.get("replaceIt",[b]),t,d):t()}),d)}else null!=l&&l()};
StorageFile.prototype.rename=function(b,f,l){var d=this.getTitle();d!=b?StorageFile.getFileInfo(this.ui,b,mxUtils.bind(this,function(t){var u=mxUtils.bind(this,function(){this.title=b;this.hasSameExtension(d,b)||this.setData(this.ui.getFileData());this.saveFile(b,!1,mxUtils.bind(this,function(){this.ui.removeLocalData(d,f)}),l)});null!=t?this.ui.confirm(mxResources.get("replaceIt",[b]),u,l):u()}),l):f()};StorageFile.prototype.open=function(){DrawioFile.prototype.open.apply(this,arguments);this.saveFile(this.getTitle())};
StorageFile.prototype.getLatestVersion=function(b,f){StorageFile.getFileContent(this.ui,this.title,mxUtils.bind(this,function(l){b(new StorageFile(this.ui,l,this.title))}),f)};StorageFile.prototype.destroy=function(){DrawioFile.prototype.destroy.apply(this,arguments);null!=this.storageListener&&(mxEvent.removeListener(window,"storage",this.storageListener),this.storageListener=null)};
-StorageFile.listLocalStorageFiles=function(b){for(var f=[],l=0;l<localStorage.length;l++){var d=localStorage.key(l),t=localStorage.getItem(d);if(0<d.length&&"."!=d.charAt(0)&&0<t.length){var u=(null==b||"F"==b)&&("<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12)),D=(null==b||"L"==b)&&"<mxlibrary>"===t.substring(0,11);(u||D)&&f.push({title:d,type:u?"F":"L",size:t.length,lastModified:Date.now()})}}return f};
+StorageFile.listLocalStorageFiles=function(b){for(var f=[],l=0;l<localStorage.length;l++){var d=localStorage.key(l),t=localStorage.getItem(d);if(0<d.length&&"."!=d.charAt(0)&&0<t.length){var u=(null==b||"F"==b)&&("<mxfile "===t.substring(0,8)||"<?xml"===t.substring(0,5)||"\x3c!--[if IE]>"===t.substring(0,12)),E=(null==b||"L"==b)&&"<mxlibrary>"===t.substring(0,11);(u||E)&&f.push({title:d,type:u?"F":"L",size:t.length,lastModified:Date.now()})}}return f};
StorageFile.migrate=function(b){var f=StorageFile.listLocalStorageFiles();f.push({title:".scratchpad",type:"L"});var l=b.transaction(["files","filesInfo"],"readwrite");b=l.objectStore("files");l=l.objectStore("filesInfo");for(var d=0;d<f.length;d++){var t=f[d],u=localStorage.getItem(t.title);b.add({title:t.title,data:u});l.add(t)}};
-StorageFile.listFiles=function(b,f,l,d){b.getDatabaseItems(function(t){var u=[];if(null!=t)for(var D=0;D<t.length;D++)"."==t[D].title.charAt(0)||null!=f&&t[D].type!=f||u.push(t[D]);l(u)},function(){null==b.database?l(StorageFile.listLocalStorageFiles(f)):null!=d&&d()},"filesInfo")};StorageFile.deleteFile=function(b,f,l,d){b.removeDatabaseItem([f,f],l,function(){null==b.database?(localStorage.removeItem(f),l()):null!=d&&d()},["files","filesInfo"])};StorageLibrary=function(b,f,l){StorageFile.call(this,b,f,l)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,f,l){this.saveFile(b,!1,f,l)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
+StorageFile.listFiles=function(b,f,l,d){b.getDatabaseItems(function(t){var u=[];if(null!=t)for(var E=0;E<t.length;E++)"."==t[E].title.charAt(0)||null!=f&&t[E].type!=f||u.push(t[E]);l(u)},function(){null==b.database?l(StorageFile.listLocalStorageFiles(f)):null!=d&&d()},"filesInfo")};StorageFile.deleteFile=function(b,f,l,d){b.removeDatabaseItem([f,f],l,function(){null==b.database?(localStorage.removeItem(f),l()):null!=d&&d()},["files","filesInfo"])};StorageLibrary=function(b,f,l){StorageFile.call(this,b,f,l)};mxUtils.extend(StorageLibrary,StorageFile);StorageLibrary.prototype.type="L";StorageLibrary.prototype.isAutosave=function(){return!0};StorageLibrary.prototype.saveAs=function(b,f,l){this.saveFile(b,!1,f,l)};StorageLibrary.prototype.getHash=function(){return"L"+encodeURIComponent(this.title)};StorageLibrary.prototype.getTitle=function(){return".scratchpad"==this.title?mxResources.get("scratchpad"):this.title};
StorageLibrary.prototype.isRenamable=function(b,f,l){return".scratchpad"!=this.title};StorageLibrary.prototype.open=function(){};RemoteFile=function(b,f,l){DrawioFile.call(this,b,f);this.title=l;this.mode=null};mxUtils.extend(RemoteFile,DrawioFile);RemoteFile.prototype.isAutosave=function(){return!1};RemoteFile.prototype.getMode=function(){return this.mode};RemoteFile.prototype.getTitle=function(){return this.title};RemoteFile.prototype.isRenamable=function(){return!1};RemoteFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};RemoteLibrary=function(b,f,l){RemoteFile.call(this,b,f,l.title);this.libObj=l};mxUtils.extend(RemoteLibrary,LocalFile);RemoteLibrary.prototype.getHash=function(){return"R"+encodeURIComponent(JSON.stringify([this.libObj.id,this.libObj.title,this.libObj.downloadUrl]))};RemoteLibrary.prototype.isEditable=function(){return!1};RemoteLibrary.prototype.isRenamable=function(){return!1};RemoteLibrary.prototype.isAutosave=function(){return!1};RemoteLibrary.prototype.save=function(b,f,l){};
RemoteLibrary.prototype.saveAs=function(b,f,l){};RemoteLibrary.prototype.updateFileData=function(){};RemoteLibrary.prototype.open=function(){};UrlLibrary=function(b,f,l){StorageFile.call(this,b,f,l);b=l;f=b.lastIndexOf("/");0<=f&&(b=b.substring(f+1));this.fname=b};mxUtils.extend(UrlLibrary,StorageFile);UrlLibrary.prototype.getHash=function(){return"U"+encodeURIComponent(this.title)};UrlLibrary.prototype.getTitle=function(){return this.fname};UrlLibrary.prototype.isAutosave=function(){return!1};UrlLibrary.prototype.isEditable=function(b,f,l){return!1};UrlLibrary.prototype.saveAs=function(b,f,l){};UrlLibrary.prototype.open=function(){};EmbedFile=function(b,f,l){DrawioFile.call(this,b,f);this.desc=l||{};this.mode=App.MODE_EMBED};mxUtils.extend(EmbedFile,DrawioFile);EmbedFile.prototype.getMode=function(){return this.mode};EmbedFile.prototype.getTitle=function(){return this.desc.title||""};/*
mxClient.IS_IOS || */
-var StorageDialog=function(b,f,l){function d(m,p,v,x,A,y){function L(){mxEvent.addListener(N,"click",null!=y?y:function(){v!=App.MODE_GOOGLE||b.isDriveDomain()?v==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(v,!0);f()})):v==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(v,!0);f()}),
-function(B){b.spinner.stop();b.handleError(B)}):(b.setMode(v,!0),f()):window.location.hostname=DriveClient.prototype.newAppHostname})}c++;++D>l&&(mxUtils.br(e),D=1);var N=document.createElement("a");N.style.overflow="hidden";N.style.display="inline-block";N.className="geBaseButton";N.style.boxSizing="border-box";N.style.fontSize="11px";N.style.position="relative";N.style.margin="4px";N.style.marginTop="8px";N.style.marginBottom="0px";N.style.padding="8px 10px 8px 10px";N.style.width="88px";N.style.height=
+var StorageDialog=function(b,f,l){function d(m,p,v,x,z,y){function L(){mxEvent.addListener(N,"click",null!=y?y:function(){v!=App.MODE_GOOGLE||b.isDriveDomain()?v==App.MODE_GOOGLE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.drive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(v,!0);f()})):v==App.MODE_ONEDRIVE&&b.spinner.spin(document.body,mxResources.get("authorizing"))?b.oneDrive.checkToken(mxUtils.bind(this,function(){b.spinner.stop();b.setMode(v,!0);f()}),
+function(B){b.spinner.stop();b.handleError(B)}):(b.setMode(v,!0),f()):window.location.hostname=DriveClient.prototype.newAppHostname})}c++;++E>l&&(mxUtils.br(e),E=1);var N=document.createElement("a");N.style.overflow="hidden";N.style.display="inline-block";N.className="geBaseButton";N.style.boxSizing="border-box";N.style.fontSize="11px";N.style.position="relative";N.style.margin="4px";N.style.marginTop="8px";N.style.marginBottom="0px";N.style.padding="8px 10px 8px 10px";N.style.width="88px";N.style.height=
"100px";N.style.whiteSpace="nowrap";N.setAttribute("title",p);var K=document.createElement("div");K.style.textOverflow="ellipsis";K.style.overflow="hidden";K.style.position="absolute";K.style.bottom="8px";K.style.left="0px";K.style.right="0px";mxUtils.write(K,p);N.appendChild(K);if(null!=m){var q=document.createElement("img");q.setAttribute("src",m);q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.width="60px";q.style.height="60px";q.style.paddingBottom="6px";N.appendChild(q)}else K.style.paddingTop=
-"5px",K.style.whiteSpace="normal",mxClient.IS_IOS?(N.style.padding="0px 10px 20px 10px",N.style.top="6px"):mxClient.IS_FF&&(K.style.paddingTop="0px",K.style.marginTop="-2px");if(null!=A)for(m=0;m<A.length;m++)mxUtils.br(K),mxUtils.write(K,A[m]);if(null!=x&&null==b[x]){q.style.visibility="hidden";mxUtils.setOpacity(K,10);var C=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});C.spin(N);
-var z=window.setTimeout(function(){null==b[x]&&(C.stop(),N.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(B,G){null!=b[x]&&G.getProperty("client")==b[x]&&(window.clearTimeout(z),mxUtils.setOpacity(K,100),q.style.visibility="",C.stop(),L(),"drive"==x&&null!=g.parentNode&&g.parentNode.removeChild(g))}))}else L();e.appendChild(N)}l=null!=l?l:2;var t=document.createElement("div");t.style.textAlign="center";t.style.whiteSpace="nowrap";t.style.paddingTop="0px";t.style.paddingBottom=
-"20px";var u=document.createElement("div");u.style.border="1px solid #d3d3d3";u.style.borderWidth="1px 0px 1px 0px";u.style.padding="10px 0px 20px 0px";var D=0,c=0,e=document.createElement("div");e.style.paddingTop="2px";u.appendChild(e);var g=document.createElement("p"),k=document.createElement("p");k.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");t.appendChild(k);t.appendChild(u);D=0;"function"===typeof window.DriveClient&&
+"5px",K.style.whiteSpace="normal",mxClient.IS_IOS?(N.style.padding="0px 10px 20px 10px",N.style.top="6px"):mxClient.IS_FF&&(K.style.paddingTop="0px",K.style.marginTop="-2px");if(null!=z)for(m=0;m<z.length;m++)mxUtils.br(K),mxUtils.write(K,z[m]);if(null!=x&&null==b[x]){q.style.visibility="hidden";mxUtils.setOpacity(K,10);var C=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});C.spin(N);
+var A=window.setTimeout(function(){null==b[x]&&(C.stop(),N.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(B,G){null!=b[x]&&G.getProperty("client")==b[x]&&(window.clearTimeout(A),mxUtils.setOpacity(K,100),q.style.visibility="",C.stop(),L(),"drive"==x&&null!=g.parentNode&&g.parentNode.removeChild(g))}))}else L();e.appendChild(N)}l=null!=l?l:2;var t=document.createElement("div");t.style.textAlign="center";t.style.whiteSpace="nowrap";t.style.paddingTop="0px";t.style.paddingBottom=
+"20px";var u=document.createElement("div");u.style.border="1px solid #d3d3d3";u.style.borderWidth="1px 0px 1px 0px";u.style.padding="10px 0px 20px 0px";var E=0,c=0,e=document.createElement("div");e.style.paddingTop="2px";u.appendChild(e);var g=document.createElement("p"),k=document.createElement("p");k.style.cssText="font-size:22px;padding:4px 0 16px 0;margin:0;color:gray;";mxUtils.write(k,mxResources.get("saveDiagramsTo")+":");t.appendChild(k);t.appendChild(u);E=0;"function"===typeof window.DriveClient&&
d(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive");"function"===typeof window.OneDriveClient&&d(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,"oneDrive");"1"!=urlParams.noDevice&&d(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);!isLocalStorage||"1"!=urlParams.browser&&"1"!=urlParams.offline||d(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER);"function"===typeof window.DropboxClient&&
d(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox");null!=b.gitHub&&d(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub");null!=b.gitLab&&d(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab");u=document.createElement("span");u.style.position="absolute";u.style.cursor="pointer";u.style.bottom="27px";u.style.color="gray";u.style.userSelect="none";u.style.textAlign="center";u.style.left="50%";mxUtils.setPrefixedStyle(u.style,
"transform","translate(-50%,0)");mxUtils.write(u,mxResources.get("decideLater"));t.appendChild(u);mxEvent.addListener(u,"click",function(){b.hideDialog();var m=Editor.useLocalStorage;b.createFile(b.defaultFilename,null,null,null,null,null,null,!0);Editor.useLocalStorage=m});mxClient.IS_SVG&&isLocalStorage&&"0"!=urlParams.gapi&&(null==document.documentMode||10<=document.documentMode)&&window.setTimeout(function(){null==b.drive&&(g.style.padding="7px",g.style.fontSize="9pt",g.style.marginTop="-14px",
g.innerHTML='<a style="background-color:#dcdcdc;padding:6px;color:black;text-decoration:none;" href="https://desk.draw.io/a/solutions/articles/16000074659" target="_blank"><img border="0" src="'+mxGraph.prototype.warningImage.src+'" align="absmiddle" style="margin-top:-4px"> '+mxResources.get("googleDriveMissingClickHere")+"</a>",t.appendChild(g))},5E3);this.container=t},SplashDialog=function(b){var f=document.createElement("div");f.style.textAlign="center";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp){var l=
b.addLanguageMenu(f,!0);null!=l&&(l.style.bottom="19px")}var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.style.width="32px";d.style.height="32px";d.style.marginRight="8px";d.style.marginTop="-4px";var t=document.createElement("div");t.style.margin="8px 0px 0px 0px";t.style.padding="18px 0px 24px 0px";l="";b.mode==App.MODE_GOOGLE?(d.src=IMAGE_PATH+"/google-drive-logo.svg",l=mxResources.get("googleDrive")):b.mode==App.MODE_DROPBOX?(d.src=IMAGE_PATH+
"/dropbox-logo.svg",l=mxResources.get("dropbox")):b.mode==App.MODE_ONEDRIVE?(d.src=IMAGE_PATH+"/onedrive-logo.svg",l=mxResources.get("oneDrive")):b.mode==App.MODE_GITHUB?(d.src=IMAGE_PATH+"/github-logo.svg",l=mxResources.get("github")):b.mode==App.MODE_GITLAB?(d.src=IMAGE_PATH+"/gitlab-logo.svg",l=mxResources.get("gitlab")):b.mode==App.MODE_BROWSER?(d.src=IMAGE_PATH+"/osa_database.png",l=mxResources.get("browser")):b.mode==App.MODE_TRELLO?(d.src=IMAGE_PATH+"/trello-logo.svg",l=mxResources.get("trello")):
-(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",t.style.paddingBottom="10px",t.style.paddingTop="30px",l=mxResources.get("device"));var u=document.createElement("button");u.className="geBigButton";u.style.marginBottom="8px";u.style.fontSize="18px";u.style.padding="10px";u.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)t.style.padding="42px 0px 10px 0px",u.style.marginBottom="12px";else{t.style.border="1px solid #d3d3d3";t.style.borderWidth="1px 0px 1px 0px";var D=document.createElement("table"),
-c=document.createElement("tbody"),e=document.createElement("tr"),g=document.createElement("td"),k=document.createElement("td");D.setAttribute("align","center");g.appendChild(d);d=document.createElement("div");d.style.fontSize="22px";d.style.paddingBottom="6px";d.style.color="gray";mxUtils.write(d,l);k.style.textAlign="left";k.appendChild(d);e.appendChild(g);e.appendChild(k);c.appendChild(e);D.appendChild(c);f.appendChild(D);l=document.createElement("span");l.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
+(d.src=IMAGE_PATH+"/osa_drive-harddisk.png",t.style.paddingBottom="10px",t.style.paddingTop="30px",l=mxResources.get("device"));var u=document.createElement("button");u.className="geBigButton";u.style.marginBottom="8px";u.style.fontSize="18px";u.style.padding="10px";u.style.width="340px";if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)t.style.padding="42px 0px 10px 0px",u.style.marginBottom="12px";else{t.style.border="1px solid #d3d3d3";t.style.borderWidth="1px 0px 1px 0px";var E=document.createElement("table"),
+c=document.createElement("tbody"),e=document.createElement("tr"),g=document.createElement("td"),k=document.createElement("td");E.setAttribute("align","center");g.appendChild(d);d=document.createElement("div");d.style.fontSize="22px";d.style.paddingBottom="6px";d.style.color="gray";mxUtils.write(d,l);k.style.textAlign="left";k.appendChild(d);e.appendChild(g);e.appendChild(k);c.appendChild(e);E.appendChild(c);f.appendChild(E);l=document.createElement("span");l.style.cssText="position:absolute;cursor:pointer;bottom:27px;color:gray;userSelect:none;text-align:center;left:50%;";
mxUtils.setPrefixedStyle(l.style,"transform","translate(-50%,0)");mxUtils.write(l,mxResources.get("changeStorage"));mxEvent.addListener(l,"click",function(){b.hideDialog(!1);b.setMode(null);b.clearMode();b.showSplash(!0)});f.appendChild(l)}mxUtils.write(u,mxResources.get("createNewDiagram"));mxEvent.addListener(u,"click",function(){b.hideDialog();b.actions.get("new").funct()});t.appendChild(u);mxUtils.br(t);u=document.createElement("button");u.className="geBigButton";u.style.marginBottom="22px";u.style.fontSize=
"18px";u.style.padding="10px";u.style.width="340px";mxUtils.write(u,mxResources.get("openExistingDiagram"));mxEvent.addListener(u,"click",function(){b.actions.get("open").funct()});t.appendChild(u);b.mode==App.MODE_GOOGLE?mxResources.get("googleDrive"):b.mode==App.MODE_DROPBOX?mxResources.get("dropbox"):b.mode==App.MODE_ONEDRIVE?mxResources.get("oneDrive"):b.mode==App.MODE_GITHUB?mxResources.get("github"):b.mode==App.MODE_GITLAB?mxResources.get("gitlab"):b.mode==App.MODE_TRELLO?mxResources.get("trello"):
b.mode==App.MODE_DEVICE?mxResources.get("device"):b.mode==App.MODE_BROWSER&&mxResources.get("browser");if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp)if(l=function(v){u.style.marginBottom="24px";var x=document.createElement("a");x.style.display="inline-block";x.style.color="gray";x.style.cursor="pointer";x.style.marginTop="6px";mxUtils.write(x,mxResources.get("signOut"));u.style.marginBottom="16px";t.style.paddingBottom="18px";mxEvent.addListener(x,"click",function(){b.confirm(mxResources.get("areYouSure"),
-function(){v()})});t.appendChild(x)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var m=b.drive.getUsersList();if(0<m.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");u.style.marginBottom="16px";t.style.paddingBottom="18px";t.appendChild(d);var p=document.createElement("select");p.style.marginLeft="4px";p.style.width="140px";for(l=0;l<m.length;l++)D=document.createElement("option"),mxUtils.write(D,m[l].displayName),D.value=l,p.appendChild(D),
-D=document.createElement("option"),D.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(D,"<"+m[l].email+">"),D.setAttribute("disabled","disabled"),p.appendChild(D);D=document.createElement("option");mxUtils.write(D,mxResources.get("addAccount"));D.value=m.length;p.appendChild(D);mxEvent.addListener(p,"change",function(){var v=p.value,x=m.length!=v;x&&b.drive.setUser(m[v]);b.drive.authorize(x,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(A){b.handleError(A,null,function(){b.hideDialog();
+function(){v()})});t.appendChild(x)},b.mode==App.MODE_GOOGLE&&null!=b.drive){var m=b.drive.getUsersList();if(0<m.length){d=document.createElement("span");d.style.marginTop="6px";mxUtils.write(d,mxResources.get("changeUser")+":");u.style.marginBottom="16px";t.style.paddingBottom="18px";t.appendChild(d);var p=document.createElement("select");p.style.marginLeft="4px";p.style.width="140px";for(l=0;l<m.length;l++)E=document.createElement("option"),mxUtils.write(E,m[l].displayName),E.value=l,p.appendChild(E),
+E=document.createElement("option"),E.innerHTML="&nbsp;&nbsp;&nbsp;",mxUtils.write(E,"<"+m[l].email+">"),E.setAttribute("disabled","disabled"),p.appendChild(E);E=document.createElement("option");mxUtils.write(E,mxResources.get("addAccount"));E.value=m.length;p.appendChild(E);mxEvent.addListener(p,"change",function(){var v=p.value,x=m.length!=v;x&&b.drive.setUser(m[v]);b.drive.authorize(x,function(){b.setMode(App.MODE_GOOGLE);b.hideDialog();b.showSplash()},function(z){b.handleError(z,null,function(){b.hideDialog();
b.showSplash()})},!0)});t.appendChild(p)}else l(function(){b.drive.logout()})}else b.mode!=App.MODE_ONEDRIVE||null==b.oneDrive||b.oneDrive.noLogout?b.mode==App.MODE_GITHUB&&null!=b.gitHub?l(function(){b.gitHub.logout();b.openLink("https://www.github.com/logout")}):b.mode==App.MODE_GITLAB&&null!=b.gitLab?l(function(){b.gitLab.logout();b.openLink(DRAWIO_GITLAB_URL+"/users/sign_out")}):b.mode==App.MODE_TRELLO&&null!=b.trello?b.trello.isAuthorized()&&l(function(){b.trello.logout()}):b.mode==App.MODE_DROPBOX&&
-null!=b.dropbox&&l(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):l(function(){b.oneDrive.logout()});f.appendChild(t);this.container=f},EmbedDialog=function(b,f,l,d,t,u,D,c,e){D=null!=D?D:"Check out the diagram I made using @drawio";d=document.createElement("div");var g=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=u?mxUtils.write(d,u):mxUtils.write(d,mxResources.get(5E5>f.length?g?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);u=document.createElement("div");
+null!=b.dropbox&&l(function(){b.dropbox.logout();b.openLink("https://www.dropbox.com/logout")}):l(function(){b.oneDrive.logout()});f.appendChild(t);this.container=f},EmbedDialog=function(b,f,l,d,t,u,E,c,e){E=null!=E?E:"Check out the diagram I made using @drawio";d=document.createElement("div");var g=/^https?:\/\//.test(f)||/^mailto:\/\//.test(f);null!=u?mxUtils.write(d,u):mxUtils.write(d,mxResources.get(5E5>f.length?g?"link":"mainEmbedNotice":"preview")+":");mxUtils.br(d);u=document.createElement("div");
u.style.position="absolute";u.style.top="30px";u.style.right="30px";u.style.color="gray";mxUtils.write(u,b.formatFileSize(f.length));d.appendChild(u);var k=document.createElement("textarea");k.setAttribute("autocomplete","off");k.setAttribute("autocorrect","off");k.setAttribute("autocapitalize","off");k.setAttribute("spellcheck","false");k.style.fontFamily="monospace";k.style.wordBreak="break-all";k.style.marginTop="10px";k.style.resize="none";k.style.height="150px";k.style.width="440px";k.style.border=
"1px solid gray";k.value=mxResources.get("updatingDocument");d.appendChild(k);mxUtils.br(d);this.init=function(){window.setTimeout(function(){5E5>f.length?(k.value=f,k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)):(k.setAttribute("readonly","true"),k.value=mxResources.get("tooLargeUseDownload"))},0)};u=document.createElement("div");u.style.position="absolute";u.style.bottom="36px";u.style.right="32px";var m=null;!EmbedDialog.showPreviewOption||
mxClient.IS_CHROMEAPP&&!g||navigator.standalone||!(g||mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode))||(m=mxUtils.button(null!=c?c:mxResources.get(5E5>f.length?"preview":"openInNewWindow"),function(){var v=5E5>f.length?k.value:f;if(null!=t)t(v);else if(g)try{var x=b.openLink(v);null!=x&&(null==l||0<l)&&window.setTimeout(mxUtils.bind(this,function(){try{null!=x&&null!=x.location.href&&x.location.href.substring(0,8)!=v.substring(0,8)&&(x.close(),b.handleError({message:mxResources.get("drawingTooLarge")}))}catch(y){}}),
-l||500)}catch(y){b.handleError({message:y.message||mxResources.get("drawingTooLarge")})}else{var A=window.open();A=null!=A?A.document:null;null!=A?(A.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+f+"</body></html>"),A.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),m.className="geBtn",u.appendChild(m));if(!g||7500<f.length)c=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
+l||500)}catch(y){b.handleError({message:y.message||mxResources.get("drawingTooLarge")})}else{var z=window.open();z=null!=z?z.document:null;null!=z?(z.writeln("<html><head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head><body>'+f+"</body></html>"),z.close()):b.handleError({message:mxResources.get("errorUpdatingPreview")})}}),m.className="geBtn",u.appendChild(m));if(!g||7500<f.length)c=mxUtils.button(mxResources.get("download"),function(){b.hideDialog();
b.saveData(null!=e?e:"embed.txt","txt",f,"text/plain")}),c.className="geBtn",u.appendChild(c);if(g&&(!b.isOffline()||mxClient.IS_CHROMEAPP)){if(51200>f.length){var p=mxUtils.button("",function(){try{var v="https://www.facebook.com/sharer.php?p[url]="+encodeURIComponent(k.value);b.openLink(v)}catch(x){b.handleError({message:x.message||mxResources.get("drawingTooLarge")})}});c=document.createElement("img");c.setAttribute("src",Editor.facebookImage);c.setAttribute("width","18");c.setAttribute("height",
-"18");c.setAttribute("border","0");p.appendChild(c);p.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");p.style.verticalAlign="bottom";p.style.paddingTop="4px";p.style.minWidth="46px";p.className="geBtn";u.appendChild(p)}7168>f.length&&(p=mxUtils.button("",function(){try{var v="https://twitter.com/intent/tweet?text="+encodeURIComponent(D)+"&url="+encodeURIComponent(k.value);b.openLink(v)}catch(x){b.handleError({message:x.message||mxResources.get("drawingTooLarge")})}}),
+"18");c.setAttribute("border","0");p.appendChild(c);p.setAttribute("title",mxResources.get("facebook")+" ("+b.formatFileSize(51200)+" max)");p.style.verticalAlign="bottom";p.style.paddingTop="4px";p.style.minWidth="46px";p.className="geBtn";u.appendChild(p)}7168>f.length&&(p=mxUtils.button("",function(){try{var v="https://twitter.com/intent/tweet?text="+encodeURIComponent(E)+"&url="+encodeURIComponent(k.value);b.openLink(v)}catch(x){b.handleError({message:x.message||mxResources.get("drawingTooLarge")})}}),
c=document.createElement("img"),c.setAttribute("src",Editor.tweetImage),c.setAttribute("width","18"),c.setAttribute("height","18"),c.setAttribute("border","0"),c.style.marginBottom="5px",p.appendChild(c),p.setAttribute("title",mxResources.get("twitter")+" ("+b.formatFileSize(7168)+" max)"),p.style.verticalAlign="bottom",p.style.paddingTop="4px",p.style.minWidth="46px",p.className="geBtn",u.appendChild(p))}!b.isOffline()&&5E5>f.length&&(p=mxUtils.button("",function(){try{var v="mailto:?subject="+encodeURIComponent(e||
b.defaultFilename)+"&body="+encodeURIComponent(k.value);b.openLink(v)}catch(x){b.handleError({message:x.message||mxResources.get("drawingTooLarge")})}}),c=document.createElement("img"),c.setAttribute("src",Editor.mailImage),c.setAttribute("width","18"),c.setAttribute("height","18"),c.setAttribute("border","0"),c.style.marginBottom="5px",Editor.isDarkMode()&&(c.style.filter="invert(100%)"),p.appendChild(c),p.style.verticalAlign="bottom",p.style.paddingTop="4px",p.style.minWidth="46px",p.className=
"geBtn",u.appendChild(p));c=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});u.appendChild(c);p=mxUtils.button(mxResources.get("copy"),function(){k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null);document.execCommand("copy");b.alert(mxResources.get("copiedToClipboard"))});5E5>f.length?mxClient.IS_SF||null!=document.documentMode?c.className="geBtn gePrimaryBtn":(u.appendChild(p),p.className="geBtn gePrimaryBtn",
c.className="geBtn"):(u.appendChild(m),c.className="geBtn",m.className="geBtn gePrimaryBtn");d.appendChild(u);this.container=d};EmbedDialog.showPreviewOption=!0;
-var GoogleSitesDialog=function(b,f){function l(){var B=null!=z&&null!=z.getTitle()?z.getTitle():this.defaultFilename;if(q.checked&&""!=p.value){var G="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=B&&(G+="&title="+encodeURIComponent(B));0<C.length&&(G+="&s="+C);""!=v.value&&"0"!=v.value&&(G+="&border="+v.value);""!=m.value&&(G+="&height="+m.value);G+="&pan="+(x.checked?"1":"0");G+="&zoom="+(A.checked?"1":"0");G+="&fit="+(K.checked?"1":"0");
-G+="&resize="+(N.checked?"1":"0");G+="&x0="+Number(k.value);G+="&y0="+e;t.mathEnabled&&(G+="&math=1");L.checked?G+="&edit=_blank":y.checked&&(G+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));g.value=G}else z.constructor==DriveFile||z.constructor==DropboxFile?(G="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?G+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(G+=z.getHash().substring(1),G=z.constructor==DropboxFile?G+"&type=2":G+"&type=1"),null!=
-B&&(G+="&title="+encodeURIComponent(B)),""!=m.value&&(B=parseInt(m.value)+parseInt(k.value),G+="&height="+B),g.value=G):g.value=""}var d=document.createElement("div"),t=b.editor.graph,u=t.getGraphBounds(),D=t.view.scale,c=Math.floor(u.x/D-t.view.translate.x),e=Math.floor(u.y/D-t.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.marginTop="2px";g.style.width="410px";
+var GoogleSitesDialog=function(b,f){function l(){var B=null!=A&&null!=A.getTitle()?A.getTitle():this.defaultFilename;if(q.checked&&""!=p.value){var G="https://www.draw.io/gadget.xml?type=4&diagram="+encodeURIComponent(mxUtils.htmlEntities(p.value));null!=B&&(G+="&title="+encodeURIComponent(B));0<C.length&&(G+="&s="+C);""!=v.value&&"0"!=v.value&&(G+="&border="+v.value);""!=m.value&&(G+="&height="+m.value);G+="&pan="+(x.checked?"1":"0");G+="&zoom="+(z.checked?"1":"0");G+="&fit="+(K.checked?"1":"0");
+G+="&resize="+(N.checked?"1":"0");G+="&x0="+Number(k.value);G+="&y0="+e;t.mathEnabled&&(G+="&math=1");L.checked?G+="&edit=_blank":y.checked&&(G+="&edit="+encodeURIComponent(mxUtils.htmlEntities(window.location.href)));g.value=G}else A.constructor==DriveFile||A.constructor==DropboxFile?(G="https://www.draw.io/gadget.xml?embed=0&diagram=",""!=p.value?G+=encodeURIComponent(mxUtils.htmlEntities(p.value))+"&type=3":(G+=A.getHash().substring(1),G=A.constructor==DropboxFile?G+"&type=2":G+"&type=1"),null!=
+B&&(G+="&title="+encodeURIComponent(B)),""!=m.value&&(B=parseInt(m.value)+parseInt(k.value),G+="&height="+B),g.value=G):g.value=""}var d=document.createElement("div"),t=b.editor.graph,u=t.getGraphBounds(),E=t.view.scale,c=Math.floor(u.x/E-t.view.translate.x),e=Math.floor(u.y/E-t.view.translate.y);mxUtils.write(d,mxResources.get("googleGadget")+":");mxUtils.br(d);var g=document.createElement("input");g.setAttribute("type","text");g.style.marginBottom="8px";g.style.marginTop="2px";g.style.width="410px";
d.appendChild(g);mxUtils.br(d);this.init=function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)};mxUtils.write(d,mxResources.get("top")+":");var k=document.createElement("input");k.setAttribute("type","text");k.setAttribute("size","4");k.style.marginRight="16px";k.style.marginLeft="4px";k.value=c;d.appendChild(k);mxUtils.write(d,mxResources.get("height")+":");var m=document.createElement("input");m.setAttribute("type","text");
-m.setAttribute("size","4");m.style.marginLeft="4px";m.value=Math.ceil(u.height/D);d.appendChild(m);mxUtils.br(d);u=document.createElement("hr");u.setAttribute("size","1");u.style.marginBottom="16px";u.style.marginTop="16px";d.appendChild(u);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";p.value=f||"";d.appendChild(p);
-mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.setAttribute("size","3");v.style.marginBottom="8px";v.style.marginLeft="4px";v.value="0";d.appendChild(v);mxUtils.br(d);var x=document.createElement("input");x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="16px";d.appendChild(x);mxUtils.write(d,mxResources.get("pan")+" ");var A=document.createElement("input");
-A.setAttribute("type","checkbox");A.setAttribute("checked","checked");A.defaultChecked=!0;A.style.marginLeft="8px";d.appendChild(A);mxUtils.write(d,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);d.appendChild(y);mxUtils.write(d,mxResources.get("edit")+" ");var L=document.createElement("input");L.setAttribute("type","checkbox");L.style.marginLeft="8px";d.appendChild(L);mxUtils.write(d,
+m.setAttribute("size","4");m.style.marginLeft="4px";m.value=Math.ceil(u.height/E);d.appendChild(m);mxUtils.br(d);u=document.createElement("hr");u.setAttribute("size","1");u.style.marginBottom="16px";u.style.marginTop="16px";d.appendChild(u);mxUtils.write(d,mxResources.get("publicDiagramUrl")+":");mxUtils.br(d);var p=document.createElement("input");p.setAttribute("type","text");p.setAttribute("size","28");p.style.marginBottom="8px";p.style.marginTop="2px";p.style.width="410px";p.value=f||"";d.appendChild(p);
+mxUtils.br(d);mxUtils.write(d,mxResources.get("borderWidth")+":");var v=document.createElement("input");v.setAttribute("type","text");v.setAttribute("size","3");v.style.marginBottom="8px";v.style.marginLeft="4px";v.value="0";d.appendChild(v);mxUtils.br(d);var x=document.createElement("input");x.setAttribute("type","checkbox");x.setAttribute("checked","checked");x.defaultChecked=!0;x.style.marginLeft="16px";d.appendChild(x);mxUtils.write(d,mxResources.get("pan")+" ");var z=document.createElement("input");
+z.setAttribute("type","checkbox");z.setAttribute("checked","checked");z.defaultChecked=!0;z.style.marginLeft="8px";d.appendChild(z);mxUtils.write(d,mxResources.get("zoom")+" ");var y=document.createElement("input");y.setAttribute("type","checkbox");y.style.marginLeft="8px";y.setAttribute("title",window.location.href);d.appendChild(y);mxUtils.write(d,mxResources.get("edit")+" ");var L=document.createElement("input");L.setAttribute("type","checkbox");L.style.marginLeft="8px";d.appendChild(L);mxUtils.write(d,
mxResources.get("asNew")+" ");mxUtils.br(d);var N=document.createElement("input");N.setAttribute("type","checkbox");N.setAttribute("checked","checked");N.defaultChecked=!0;N.style.marginLeft="16px";d.appendChild(N);mxUtils.write(d,mxResources.get("resize")+" ");var K=document.createElement("input");K.setAttribute("type","checkbox");K.style.marginLeft="8px";d.appendChild(K);mxUtils.write(d,mxResources.get("fit")+" ");var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginLeft=
-"8px";d.appendChild(q);mxUtils.write(d,mxResources.get("embed")+" ");var C=b.getBasenames().join(";"),z=b.getCurrentFile();mxEvent.addListener(x,"change",l);mxEvent.addListener(A,"change",l);mxEvent.addListener(N,"change",l);mxEvent.addListener(K,"change",l);mxEvent.addListener(y,"change",l);mxEvent.addListener(L,"change",l);mxEvent.addListener(q,"change",l);mxEvent.addListener(m,"change",l);mxEvent.addListener(k,"change",l);mxEvent.addListener(v,"change",l);mxEvent.addListener(p,"change",l);l();
+"8px";d.appendChild(q);mxUtils.write(d,mxResources.get("embed")+" ");var C=b.getBasenames().join(";"),A=b.getCurrentFile();mxEvent.addListener(x,"change",l);mxEvent.addListener(z,"change",l);mxEvent.addListener(N,"change",l);mxEvent.addListener(K,"change",l);mxEvent.addListener(y,"change",l);mxEvent.addListener(L,"change",l);mxEvent.addListener(q,"change",l);mxEvent.addListener(m,"change",l);mxEvent.addListener(k,"change",l);mxEvent.addListener(v,"change",l);mxEvent.addListener(p,"change",l);l();
mxEvent.addListener(g,"click",function(){g.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?g.select():document.execCommand("selectAll",!1,null)});f=document.createElement("div");f.style.paddingTop="12px";f.style.textAlign="right";u=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});u.className="geBtn gePrimaryBtn";f.appendChild(u);d.appendChild(f);this.container=d},CreateGraphDialog=function(b,f,l){var d=document.createElement("div");d.style.textAlign="right";this.init=
-function(){var t=document.createElement("div");t.style.position="relative";t.style.border="1px solid gray";t.style.width="100%";t.style.height="360px";t.style.overflow="hidden";t.style.marginBottom="16px";mxEvent.disableContextMenu(t);d.appendChild(t);var u=new Graph(t);u.setCellsCloneable(!0);u.setPanning(!0);u.setAllowDanglingEdges(!1);u.connectionHandler.select=!1;u.view.setTranslate(20,20);u.border=20;u.panningHandler.useLeftButtonForPanning=!0;var D="curved=1;";u.cellRenderer.installCellOverlayListeners=
-function(A,y,L){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(L.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(N){y.fireEvent(new mxEventObject("pointerdown","event",N,"state",A))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(L.node,"touchstart",function(N){y.fireEvent(new mxEventObject("pointerdown","event",N,"state",A))})};u.getAllConnectionConstraints=function(){return null};u.connectionHandler.marker.highlight.keepOnTop=
-!1;u.connectionHandler.createEdgeState=function(A){A=u.createEdge(null,null,null,null,null,D);return new mxCellState(this.graph.view,A,this.graph.getCellStyle(A))};var c=u.getDefaultParent(),e=mxUtils.bind(this,function(A){var y=new mxCellOverlay(this.connectImage,"Add outgoing");y.cursor="hand";y.addListener(mxEvent.CLICK,function(L,N){u.connectionHandler.reset();u.clearSelection();var K=u.getCellGeometry(A),q;m(function(){q=u.insertVertex(c,null,"Entry",K.x,K.y,80,30,"rounded=1;");e(q);u.view.refresh(q);
-u.insertEdge(c,null,"",A,q,D)},function(){u.scrollCellToVisible(q)})});y.addListener("pointerdown",function(L,N){L=N.getProperty("event");N=N.getProperty("state");u.popupMenuHandler.hideMenu();u.stopEditing(!1);var K=mxUtils.convertPoint(u.container,mxEvent.getClientX(L),mxEvent.getClientY(L));u.connectionHandler.start(N,K.x,K.y);u.isMouseDown=!0;u.isMouseTrigger=mxEvent.isMouseEvent(L);mxEvent.consume(L)});u.addCellOverlay(A,y)});u.getModel().beginUpdate();try{var g=u.insertVertex(c,null,"Start",
-0,0,80,30,"ellipse");e(g)}finally{u.getModel().endUpdate()}if("horizontalTree"==l){var k=new mxCompactTreeLayout(u);k.edgeRouting=!1;k.levelDistance=30;D="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==l?(k=new mxCompactTreeLayout(u,!1),k.edgeRouting=!1,k.levelDistance=30,D="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==l?(k=new mxRadialTreeLayout(u,!1),k.edgeRouting=!1,k.levelDistance=80):"verticalFlow"==l?k=new mxHierarchicalLayout(u,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
-l?k=new mxHierarchicalLayout(u,mxConstants.DIRECTION_WEST):"organic"==l?(k=new mxFastOrganicLayout(u,!1),k.forceConstant=80):"circle"==l&&(k=new mxCircleLayout(u));if(null!=k){var m=function(A,y){u.getModel().beginUpdate();try{null!=A&&A(),k.execute(u.getDefaultParent(),g)}catch(L){throw L;}finally{A=new mxMorphing(u),A.addListener(mxEvent.DONE,mxUtils.bind(this,function(){u.getModel().endUpdate();null!=y&&y()})),A.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
-function(A,y,L,N,K){p.apply(this,arguments);m()};u.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);m()};u.connectionHandler.addListener(mxEvent.CONNECT,function(){m()})}var v=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=t.parentNode&&(u.destroy(),t.parentNode.removeChild(t));b.hideDialog()})});v.className="geBtn";b.editor.cancelFirst&&d.appendChild(v);var x=mxUtils.button(mxResources.get("insert"),function(A){u.clearCellOverlays();
-var y=u.getModel().getChildren(u.getDefaultParent());A=mxEvent.isAltDown(A)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(u.getBoundingBoxFromGeometry(y,!0));y=b.editor.graph.importCells(y,A.x,A.y);A=b.editor.graph.view;var L=A.getBounds(y);L.x-=A.translate.x;L.y-=A.translate.y;b.editor.graph.scrollRectToVisible(L);b.editor.graph.setSelectionCells(y);null!=t.parentNode&&(u.destroy(),t.parentNode.removeChild(t));b.hideDialog()});d.appendChild(x);x.className="geBtn gePrimaryBtn";
+function(){var t=document.createElement("div");t.style.position="relative";t.style.border="1px solid gray";t.style.width="100%";t.style.height="360px";t.style.overflow="hidden";t.style.marginBottom="16px";mxEvent.disableContextMenu(t);d.appendChild(t);var u=new Graph(t);u.setCellsCloneable(!0);u.setPanning(!0);u.setAllowDanglingEdges(!1);u.connectionHandler.select=!1;u.view.setTranslate(20,20);u.border=20;u.panningHandler.useLeftButtonForPanning=!0;var E="curved=1;";u.cellRenderer.installCellOverlayListeners=
+function(z,y,L){mxCellRenderer.prototype.installCellOverlayListeners.apply(this,arguments);mxEvent.addListener(L.node,mxClient.IS_POINTER?"pointerdown":"mousedown",function(N){y.fireEvent(new mxEventObject("pointerdown","event",N,"state",z))});!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&mxEvent.addListener(L.node,"touchstart",function(N){y.fireEvent(new mxEventObject("pointerdown","event",N,"state",z))})};u.getAllConnectionConstraints=function(){return null};u.connectionHandler.marker.highlight.keepOnTop=
+!1;u.connectionHandler.createEdgeState=function(z){z=u.createEdge(null,null,null,null,null,E);return new mxCellState(this.graph.view,z,this.graph.getCellStyle(z))};var c=u.getDefaultParent(),e=mxUtils.bind(this,function(z){var y=new mxCellOverlay(this.connectImage,"Add outgoing");y.cursor="hand";y.addListener(mxEvent.CLICK,function(L,N){u.connectionHandler.reset();u.clearSelection();var K=u.getCellGeometry(z),q;m(function(){q=u.insertVertex(c,null,"Entry",K.x,K.y,80,30,"rounded=1;");e(q);u.view.refresh(q);
+u.insertEdge(c,null,"",z,q,E)},function(){u.scrollCellToVisible(q)})});y.addListener("pointerdown",function(L,N){L=N.getProperty("event");N=N.getProperty("state");u.popupMenuHandler.hideMenu();u.stopEditing(!1);var K=mxUtils.convertPoint(u.container,mxEvent.getClientX(L),mxEvent.getClientY(L));u.connectionHandler.start(N,K.x,K.y);u.isMouseDown=!0;u.isMouseTrigger=mxEvent.isMouseEvent(L);mxEvent.consume(L)});u.addCellOverlay(z,y)});u.getModel().beginUpdate();try{var g=u.insertVertex(c,null,"Start",
+0,0,80,30,"ellipse");e(g)}finally{u.getModel().endUpdate()}if("horizontalTree"==l){var k=new mxCompactTreeLayout(u);k.edgeRouting=!1;k.levelDistance=30;E="edgeStyle=elbowEdgeStyle;elbow=horizontal;"}else"verticalTree"==l?(k=new mxCompactTreeLayout(u,!1),k.edgeRouting=!1,k.levelDistance=30,E="edgeStyle=elbowEdgeStyle;elbow=vertical;"):"radialTree"==l?(k=new mxRadialTreeLayout(u,!1),k.edgeRouting=!1,k.levelDistance=80):"verticalFlow"==l?k=new mxHierarchicalLayout(u,mxConstants.DIRECTION_NORTH):"horizontalFlow"==
+l?k=new mxHierarchicalLayout(u,mxConstants.DIRECTION_WEST):"organic"==l?(k=new mxFastOrganicLayout(u,!1),k.forceConstant=80):"circle"==l&&(k=new mxCircleLayout(u));if(null!=k){var m=function(z,y){u.getModel().beginUpdate();try{null!=z&&z(),k.execute(u.getDefaultParent(),g)}catch(L){throw L;}finally{z=new mxMorphing(u),z.addListener(mxEvent.DONE,mxUtils.bind(this,function(){u.getModel().endUpdate();null!=y&&y()})),z.startAnimation()}},p=mxEdgeHandler.prototype.connect;mxEdgeHandler.prototype.connect=
+function(z,y,L,N,K){p.apply(this,arguments);m()};u.resizeCell=function(){mxGraph.prototype.resizeCell.apply(this,arguments);m()};u.connectionHandler.addListener(mxEvent.CONNECT,function(){m()})}var v=mxUtils.button(mxResources.get("close"),function(){b.confirm(mxResources.get("areYouSure"),function(){null!=t.parentNode&&(u.destroy(),t.parentNode.removeChild(t));b.hideDialog()})});v.className="geBtn";b.editor.cancelFirst&&d.appendChild(v);var x=mxUtils.button(mxResources.get("insert"),function(z){u.clearCellOverlays();
+var y=u.getModel().getChildren(u.getDefaultParent());z=mxEvent.isAltDown(z)?b.editor.graph.getFreeInsertPoint():b.editor.graph.getCenterInsertPoint(u.getBoundingBoxFromGeometry(y,!0));y=b.editor.graph.importCells(y,z.x,z.y);z=b.editor.graph.view;var L=z.getBounds(y);L.x-=z.translate.x;L.y-=z.translate.y;b.editor.graph.scrollRectToVisible(L);b.editor.graph.setSelectionCells(y);null!=t.parentNode&&(u.destroy(),t.parentNode.removeChild(t));b.hideDialog()});d.appendChild(x);x.className="geBtn gePrimaryBtn";
b.editor.cancelFirst||d.appendChild(v)};this.container=d};
CreateGraphDialog.prototype.connectImage=new mxImage(mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAYAAACpSkzOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjQ3OTk0QjMyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjQ3OTk0QjQyRDcyMTFFNThGQThGNDVBMjNBMjFDMzkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRjA0N0I2MjJENzExMUU1OEZBOEY0NUEyM0EyMUMzOSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGNDc5OTRCMjJENzIxMUU1OEZBOEY0NUEyM0EyMUMzOSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PjIf+MgAAATlSURBVHjanFZraFxFFD735u4ru3ls0yZG26ShgmJoKK1J2vhIYzBgRdtIURHyw1hQUH9IxIgI2h8iCEUF/1RRlNQYCsYfCTHVhiTtNolpZCEStqSC22xIsrs1bDfu7t37Gs/cO3Ozxs1DBw73zpk555vzmHNGgJ0NYatFgmNLYUHYUoHASMz5ijmgVLmxgfKCUiBxC4ACJAeSG8nb1dVVOTc3dyoSibwWDofPBIPBJzo7O8vpGtvjpDICGztxkciECpF2LS0tvZtOpwNkk5FKpcYXFxffwL1+JuPgllPj8nk1F6RoaGjoKCqZ5ApljZDZO4SMRA0SuG2QUJIQRV8HxMOM9vf3H0ZZH9Nhg20MMl2QkFwjIyNHWlpahtADnuUMwLcRHX5aNSBjCJYEsSSLUeLEbhGe3ytCmQtA1/XY+Pj46dbW1iDuyCJp9BC5ycBj4hoeHq5ra2sbw0Xn1ZgBZ+dVkA1Lc+6p0Ck2p0QS4Ox9EhwpEylYcmBg4LH29vYQLilIOt0u5FhDfevNZDI/u93uw6PLOrwTUtjxrbPYbhD42WgMrF8JmR894ICmCgnQjVe8Xu8pXEkzMJKbuo5oNPomBbm1ZsD7s2kwFA1JZ6QBUXWT1nmGNc/qoMgavDcrQzxjQGFh4aOYIJ0sFAXcEtui4uLiVjr5KpSBVFYDDZVrWUaKRRWSAYeK0fmKykgDXbVoNaPChRuyqdDv97czL5nXxQbq6empQmsaklkDBiNpSwFVrmr2P6UyicD5piI4f8wHh0oEm8/p4h8pyGiEWvVQd3e3nxtjAzU1NR2jP7NRBWQ8GbdEzzJAmc0V3RR4cI8Dvmwuhc8fKUFA0d6/ltHg5p+Kuaejo6OeY0jcNJ/PV00ZS0nFUoZRvvFS1bZFsKHCCQ2Pl8H0chY+C96B6ZUsrCQ1qKtwQVFRURW/QhIXMAzDPAZ6BgOr8tTa8dDxCmiYGApaJbJMxSzV+brE8pdgWkcpY5dbMF1AR9XH8/xu2ilef48bvn92n82ZwHh+8ssqTEXS9p7dHisiiURikd8PbpExNTU1UVNTA3V3Y7lC16n0gpB/NwpNcZjfa7dScC4Qh0kOQCwnlEgi3F/hMVl9fX0zvKrzSk2lfXjRhj0eT/2rvWG4+Pta3oJY7XfC3hInXAv/ldeFLx8shQ+eqQL0UAAz7ylkpej5eNZRVBWL6BU6ef14OYiY1oqyTtmsavr/5koaRucT1pzx+ZpL1+GV5nLutksUgIcmtwTRiuuVZXnU5XId7A2swJkfFsymRWC91hHg1Viw6x23+7vn9sPJ+j20BE1hCXqSWaNSQ8ScbknRZWxub1PGCw/fBV+c3AeijlUbY5bBjEqr9GuYZP4jP41WudGSC6erTRCqdGZm5i1WvXWeDHnbBCZGc2Nj4wBl/hZOwrmBBfgmlID1HmGJutHaF+tKoevp/XCgstDkjo2NtWKLuc6AVN4mNjY+s1XQxoenOoFuDPHGtnRbJj9ej5GvL0dI7+giuRyMk1giazc+DP6vgUDgOJVlOv7R+PJ12QIeL6SyeDz+Kfp8ZrNWjgDTsVjsQ7qXyTjztXJhm9ePxFLfMTg4eG9tbe1RTP9KFFYQfHliYmIS69kCC7jKYmKwxxD5P88tkVkqbPPcIps9t4T/+HjcuJ/s5BFJgf4WYABCtxGuxIZ90gAAAABJRU5ErkJggg==":IMAGE_PATH+
"/handle-connect.png",26,26);
-var BackgroundImageDialog=function(b,f,l){var d=document.createElement("div");d.style.whiteSpace="nowrap";var t=document.createElement("h2");mxUtils.write(t,mxResources.get("backgroundImage"));t.style.marginTop="0px";d.appendChild(t);var u=null!=l&&null!=l.originalSrc;t=!1;var D=document.createElement("input");D.style.cssText="margin-right:8px;margin-bottom:8px;";D.setAttribute("value","url");D.setAttribute("type","radio");D.setAttribute("name","geBackgroundImageDialogOption");var c=document.createElement("input");
+var BackgroundImageDialog=function(b,f,l){var d=document.createElement("div");d.style.whiteSpace="nowrap";var t=document.createElement("h2");mxUtils.write(t,mxResources.get("backgroundImage"));t.style.marginTop="0px";d.appendChild(t);var u=null!=l&&null!=l.originalSrc;t=!1;var E=document.createElement("input");E.style.cssText="margin-right:8px;margin-bottom:8px;";E.setAttribute("value","url");E.setAttribute("type","radio");E.setAttribute("name","geBackgroundImageDialogOption");var c=document.createElement("input");
c.style.cssText="margin-right:8px;margin-bottom:8px;";c.setAttribute("value","url");c.setAttribute("type","radio");c.setAttribute("name","geBackgroundImageDialogOption");var e=document.createElement("input");e.setAttribute("type","text");e.style.marginBottom="8px";e.style.width="360px";e.value=u||null==l?"":l.src;var g=document.createElement("select");g.style.width="360px";if(null!=b.pages)for(var k=0;k<b.pages.length;k++){var m=document.createElement("option");mxUtils.write(m,b.pages[k].getName()||
-mxResources.get("pageWithNumber",[k+1]));m.setAttribute("value","data:page/id,"+b.pages[k].getId());b.pages[k]==b.currentPage&&m.setAttribute("disabled","disabled");null!=l&&l.originalSrc==m.getAttribute("value")&&(m.setAttribute("selected","selected"),t=!0);g.appendChild(m)}u||null!=b.pages&&1!=b.pages.length||(D.style.display="none",c.style.display="none",g.style.display="none");var p=document.createElement("option"),v=!1,x=!1,A=function(q,C){v||null!=q&&x||(c.checked?null!=C&&C(p.selected?null:
-g.value):""==e.value||b.isOffline()?(L.value="",N.value="",null!=C&&C("")):(e.value=mxUtils.trim(e.value),b.loadImage(e.value,function(z){L.value=z.width;N.value=z.height;null!=C&&C(e.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));L.value="";N.value="";null!=C&&C(null)})))},y=mxUtils.bind(this,function(q){b.importFiles(q,0,0,b.maxBackgroundSize,function(C,z,B,G,M,H){e.value=C;A();e.focus()},function(){},function(C){return"image/"==C.type.substring(0,
-6)},function(C){for(var z=0;z<C.length;z++)C[z]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){u?g.focus():e.focus();mxEvent.addListener(g,"focus",function(){D.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});mxEvent.addListener(e,"focus",function(){c.removeAttribute("checked");D.setAttribute("checked","checked");D.checked=!0});if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var q=d.parentNode,C=null;mxEvent.addListener(q,
-"dragleave",function(z){null!=C&&(C.parentNode.removeChild(C),C=null);z.stopPropagation();z.preventDefault()});mxEvent.addListener(q,"dragover",mxUtils.bind(this,function(z){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=b.highlightElement(q));z.stopPropagation();z.preventDefault()}));mxEvent.addListener(q,"drop",mxUtils.bind(this,function(z){null!=C&&(C.parentNode.removeChild(C),C=null);if(0<z.dataTransfer.files.length)y(z.dataTransfer.files);else if(0<=mxUtils.indexOf(z.dataTransfer.types,
-"text/uri-list")){var B=z.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(B)&&(e.value=decodeURIComponent(B),A())}z.stopPropagation();z.preventDefault()}),!1)}};d.appendChild(D);d.appendChild(e);mxUtils.br(d);k=document.createElement("span");k.style.marginLeft="30px";mxUtils.write(k,mxResources.get("width")+":");d.appendChild(k);var L=document.createElement("input");L.setAttribute("type","text");L.style.width="60px";L.style.marginLeft="8px";L.style.marginRight="16px";
-L.value=null==l||u?"":l.width;d.appendChild(L);mxUtils.write(d,mxResources.get("height")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.width="60px";N.style.marginLeft="8px";N.style.marginRight="16px";N.value=null==l||u?"":l.height;d.appendChild(N);mxUtils.br(d);mxUtils.br(d);mxEvent.addListener(e,"change",A);ImageDialog.filePicked=function(q){q.action==google.picker.Action.PICKED&&null!=q.docs[0].thumbnails&&(q=q.docs[0].thumbnails[q.docs[0].thumbnails.length-1],
-null!=q&&(e.value=q.url,A()));e.focus()};d.appendChild(c);d.appendChild(g);mxUtils.br(d);u?(c.setAttribute("checked","checked"),c.checked=!0):(D.setAttribute("checked","checked"),D.checked=!0);!t&&c.checked&&(mxUtils.write(p,mxResources.get("pageNotFound")),p.setAttribute("disabled","disabled"),p.setAttribute("selected","selected"),p.setAttribute("value","pageNotFound"),g.appendChild(p),mxEvent.addListener(g,"change",function(){null==p.parentNode||p.selected||p.parentNode.removeChild(p)}));l=document.createElement("div");
-l.style.marginTop="30px";l.style.textAlign="right";t=mxUtils.button(mxResources.get("cancel"),function(){v=!0;b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&l.appendChild(t);k=mxUtils.button(mxResources.get("reset"),function(){e.value="";L.value="";N.value="";D.checked=!0;v=!1});mxEvent.addGestureListeners(k,function(){v=!0});k.className="geBtn";k.width="100";l.appendChild(k);if(Graph.fileSupport){var K=document.createElement("input");K.setAttribute("multiple","multiple");K.setAttribute("type",
-"file");mxEvent.addListener(K,"change",function(q){null!=K.files&&(y(K.files),K.type="",K.type="file",K.value="")});K.style.display="none";d.appendChild(K);k=mxUtils.button(mxResources.get("open"),function(){K.click()});k.className="geBtn";l.appendChild(k)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();A(null,function(q){f(""!=q&&null!=q?new mxImage(q,L.value,N.value):null,null==q)})});mxEvent.addGestureListeners(applyBtn,function(){x=!0});applyBtn.className="geBtn gePrimaryBtn";
-l.appendChild(applyBtn);b.editor.cancelFirst||l.appendChild(t);d.appendChild(l);this.container=d},ParseDialog=function(b,f,l){function d(v,x,A){var y=v.split("\n");if("plantUmlPng"==x||"plantUmlSvg"==x||"plantUmlTxt"==x){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var L=function(W,O,V,U,X){u=mxEvent.isAltDown(A)?u:N.getCenterInsertPoint(new mxRectangle(0,0,U,X));var n=null;N.getModel().beginUpdate();try{n="txt"==O?b.insertAsPreText(V,u.x,u.y):N.insertVertex(null,null,null,u.x,u.y,
-U,X,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(V)+";"),N.setAttributeForCell(n,"plantUmlData",JSON.stringify({data:W,format:O},null,2))}finally{N.getModel().endUpdate()}null!=n&&(N.setSelectionCell(n),N.scrollCellToVisible(n))},N=b.editor.graph,K="plantUmlTxt"==x?"txt":"plantUmlPng"==x?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
+mxResources.get("pageWithNumber",[k+1]));m.setAttribute("value","data:page/id,"+b.pages[k].getId());b.pages[k]==b.currentPage&&m.setAttribute("disabled","disabled");null!=l&&l.originalSrc==m.getAttribute("value")&&(m.setAttribute("selected","selected"),t=!0);g.appendChild(m)}u||null!=b.pages&&1!=b.pages.length||(E.style.display="none",c.style.display="none",g.style.display="none");var p=document.createElement("option"),v=!1,x=!1,z=function(q,C){v||null!=q&&x||(c.checked?null!=C&&C(p.selected?null:
+g.value):""==e.value||b.isOffline()?(L.value="",N.value="",null!=C&&C("")):(e.value=mxUtils.trim(e.value),b.loadImage(e.value,function(A){L.value=A.width;N.value=A.height;null!=C&&C(e.value)},function(){b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"));L.value="";N.value="";null!=C&&C(null)})))},y=mxUtils.bind(this,function(q){b.importFiles(q,0,0,b.maxBackgroundSize,function(C,A,B,G,M,H){e.value=C;z();e.focus()},function(){},function(C){return"image/"==C.type.substring(0,
+6)},function(C){for(var A=0;A<C.length;A++)C[A]()},!0,b.maxBackgroundBytes,b.maxBackgroundBytes,!0)});this.init=function(){u?g.focus():e.focus();mxEvent.addListener(g,"focus",function(){E.removeAttribute("checked");c.setAttribute("checked","checked");c.checked=!0});mxEvent.addListener(e,"focus",function(){c.removeAttribute("checked");E.setAttribute("checked","checked");E.checked=!0});if(Graph.fileSupport){e.setAttribute("placeholder",mxResources.get("dragImagesHere"));var q=d.parentNode,C=null;mxEvent.addListener(q,
+"dragleave",function(A){null!=C&&(C.parentNode.removeChild(C),C=null);A.stopPropagation();A.preventDefault()});mxEvent.addListener(q,"dragover",mxUtils.bind(this,function(A){null==C&&(!mxClient.IS_IE||10<document.documentMode)&&(C=b.highlightElement(q));A.stopPropagation();A.preventDefault()}));mxEvent.addListener(q,"drop",mxUtils.bind(this,function(A){null!=C&&(C.parentNode.removeChild(C),C=null);if(0<A.dataTransfer.files.length)y(A.dataTransfer.files);else if(0<=mxUtils.indexOf(A.dataTransfer.types,
+"text/uri-list")){var B=A.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(B)&&(e.value=decodeURIComponent(B),z())}A.stopPropagation();A.preventDefault()}),!1)}};d.appendChild(E);d.appendChild(e);mxUtils.br(d);k=document.createElement("span");k.style.marginLeft="30px";mxUtils.write(k,mxResources.get("width")+":");d.appendChild(k);var L=document.createElement("input");L.setAttribute("type","text");L.style.width="60px";L.style.marginLeft="8px";L.style.marginRight="16px";
+L.value=null==l||u?"":l.width;d.appendChild(L);mxUtils.write(d,mxResources.get("height")+":");var N=document.createElement("input");N.setAttribute("type","text");N.style.width="60px";N.style.marginLeft="8px";N.style.marginRight="16px";N.value=null==l||u?"":l.height;d.appendChild(N);mxUtils.br(d);mxUtils.br(d);mxEvent.addListener(e,"change",z);ImageDialog.filePicked=function(q){q.action==google.picker.Action.PICKED&&null!=q.docs[0].thumbnails&&(q=q.docs[0].thumbnails[q.docs[0].thumbnails.length-1],
+null!=q&&(e.value=q.url,z()));e.focus()};d.appendChild(c);d.appendChild(g);mxUtils.br(d);u?(c.setAttribute("checked","checked"),c.checked=!0):(E.setAttribute("checked","checked"),E.checked=!0);!t&&c.checked&&(mxUtils.write(p,mxResources.get("pageNotFound")),p.setAttribute("disabled","disabled"),p.setAttribute("selected","selected"),p.setAttribute("value","pageNotFound"),g.appendChild(p),mxEvent.addListener(g,"change",function(){null==p.parentNode||p.selected||p.parentNode.removeChild(p)}));l=document.createElement("div");
+l.style.marginTop="30px";l.style.textAlign="right";t=mxUtils.button(mxResources.get("cancel"),function(){v=!0;b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&l.appendChild(t);k=mxUtils.button(mxResources.get("reset"),function(){e.value="";L.value="";N.value="";E.checked=!0;v=!1});mxEvent.addGestureListeners(k,function(){v=!0});k.className="geBtn";k.width="100";l.appendChild(k);if(Graph.fileSupport){var K=document.createElement("input");K.setAttribute("multiple","multiple");K.setAttribute("type",
+"file");mxEvent.addListener(K,"change",function(q){null!=K.files&&(y(K.files),K.type="",K.type="file",K.value="")});K.style.display="none";d.appendChild(K);k=mxUtils.button(mxResources.get("open"),function(){K.click()});k.className="geBtn";l.appendChild(k)}applyBtn=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();z(null,function(q){f(""!=q&&null!=q?new mxImage(q,L.value,N.value):null,null==q)})});mxEvent.addGestureListeners(applyBtn,function(){x=!0});applyBtn.className="geBtn gePrimaryBtn";
+l.appendChild(applyBtn);b.editor.cancelFirst||l.appendChild(t);d.appendChild(l);this.container=d},ParseDialog=function(b,f,l){function d(v,x,z){var y=v.split("\n");if("plantUmlPng"==x||"plantUmlSvg"==x||"plantUmlTxt"==x){if(b.spinner.spin(document.body,mxResources.get("inserting"))){var L=function(W,O,V,U,Y){u=mxEvent.isAltDown(z)?u:N.getCenterInsertPoint(new mxRectangle(0,0,U,Y));var n=null;N.getModel().beginUpdate();try{n="txt"==O?b.insertAsPreText(V,u.x,u.y):N.insertVertex(null,null,null,u.x,u.y,
+U,Y,"shape=image;noLabel=1;verticalAlign=top;aspect=fixed;imageAspect=0;image="+b.convertDataUri(V)+";"),N.setAttributeForCell(n,"plantUmlData",JSON.stringify({data:W,format:O},null,2))}finally{N.getModel().endUpdate()}null!=n&&(N.setSelectionCell(n),N.scrollCellToVisible(n))},N=b.editor.graph,K="plantUmlTxt"==x?"txt":"plantUmlPng"==x?"png":"svg";"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml"==
v&&"svg"==K?window.setTimeout(function(){b.spinner.stop();L(v,K,"data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U2NyaXB0VHlwZT0iYXBwbGljYXRpb24vZWNtYXNjcmlwdCIgY29udGVudFN0eWxlVHlwZT0idGV4dC9jc3MiIGhlaWdodD0iMjEycHgiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiIHN0eWxlPSJ3aWR0aDoyOTVweDtoZWlnaHQ6MjEycHg7IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyOTUgMjEyIiB3aWR0aD0iMjk1cHgiIHpvb21BbmRQYW49Im1hZ25pZnkiPjxkZWZzLz48Zz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogNS4wLDUuMDsiIHgxPSIzMSIgeDI9IjMxIiB5MT0iMzQuNDg4MyIgeTI9IjE3MS43MzA1Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDUuMCw1LjA7IiB4MT0iMjY0LjUiIHgyPSIyNjQuNSIgeTE9IjM0LjQ4ODMiIHkyPSIxNzEuNzMwNSIvPjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIzMyIgeD0iMTUiIHk9IjIzLjUzNTIiPkFsaWNlPC90ZXh0PjxyZWN0IGZpbGw9IiNGRUZFQ0UiIGhlaWdodD0iMzAuNDg4MyIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjU7IiB3aWR0aD0iNDciIHg9IjgiIHk9IjE3MC43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTQiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMzMiIHg9IjE1IiB5PSIxOTEuMjY1NiI+QWxpY2U8L3RleHQ+PHJlY3QgZmlsbD0iI0ZFRkVDRSIgaGVpZ2h0PSIzMC40ODgzIiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuNTsiIHdpZHRoPSI0MCIgeD0iMjQ0LjUiIHk9IjMiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjIzLjUzNTIiPkJvYjwvdGV4dD48cmVjdCBmaWxsPSIjRkVGRUNFIiBoZWlnaHQ9IjMwLjQ4ODMiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS41OyIgd2lkdGg9IjQwIiB4PSIyNDQuNSIgeT0iMTcwLjczMDUiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxNCIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIyNiIgeD0iMjUxLjUiIHk9IjE5MS4yNjU2Ij5Cb2I8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSIyNTIuNSw2MS43OTg4LDI2Mi41LDY1Ljc5ODgsMjUyLjUsNjkuNzk4OCwyNTYuNSw2NS43OTg4IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiIHgxPSIzMS41IiB4Mj0iMjU4LjUiIHkxPSI2NS43OTg4IiB5Mj0iNjUuNzk4OCIvPjx0ZXh0IGZpbGw9IiMwMDAwMDAiIGZvbnQtZmFtaWx5PSJzYW5zLXNlcmlmIiBmb250LXNpemU9IjEzIiBsZW5ndGhBZGp1c3Q9InNwYWNpbmdBbmRHbHlwaHMiIHRleHRMZW5ndGg9IjE0NyIgeD0iMzguNSIgeT0iNjEuMDU2NiI+QXV0aGVudGljYXRpb24gUmVxdWVzdDwvdGV4dD48cG9seWdvbiBmaWxsPSIjQTgwMDM2IiBwb2ludHM9IjQyLjUsOTEuMTA5NCwzMi41LDk1LjEwOTQsNDIuNSw5OS4xMDk0LDM4LjUsOTUuMTA5NCIgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7Ii8+PGxpbmUgc3R5bGU9InN0cm9rZTogI0E4MDAzNjsgc3Ryb2tlLXdpZHRoOiAxLjA7IHN0cm9rZS1kYXNoYXJyYXk6IDIuMCwyLjA7IiB4MT0iMzYuNSIgeDI9IjI2My41IiB5MT0iOTUuMTA5NCIgeTI9Ijk1LjEwOTQiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxNTciIHg9IjQ4LjUiIHk9IjkwLjM2NzIiPkF1dGhlbnRpY2F0aW9uIFJlc3BvbnNlPC90ZXh0Pjxwb2x5Z29uIGZpbGw9IiNBODAwMzYiIHBvaW50cz0iMjUyLjUsMTIwLjQxOTksMjYyLjUsMTI0LjQxOTksMjUyLjUsMTI4LjQxOTksMjU2LjUsMTI0LjQxOTkiIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIvPjxsaW5lIHN0eWxlPSJzdHJva2U6ICNBODAwMzY7IHN0cm9rZS13aWR0aDogMS4wOyIgeDE9IjMxLjUiIHgyPSIyNTguNSIgeTE9IjEyNC40MTk5IiB5Mj0iMTI0LjQxOTkiLz48dGV4dCBmaWxsPSIjMDAwMDAwIiBmb250LWZhbWlseT0ic2Fucy1zZXJpZiIgZm9udC1zaXplPSIxMyIgbGVuZ3RoQWRqdXN0PSJzcGFjaW5nQW5kR2x5cGhzIiB0ZXh0TGVuZ3RoPSIxOTkiIHg9IjM4LjUiIHk9IjExOS42Nzc3Ij5Bbm90aGVyIGF1dGhlbnRpY2F0aW9uIFJlcXVlc3Q8L3RleHQ+PHBvbHlnb24gZmlsbD0iI0E4MDAzNiIgcG9pbnRzPSI0Mi41LDE0OS43MzA1LDMyLjUsMTUzLjczMDUsNDIuNSwxNTcuNzMwNSwzOC41LDE1My43MzA1IiBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsiLz48bGluZSBzdHlsZT0ic3Ryb2tlOiAjQTgwMDM2OyBzdHJva2Utd2lkdGg6IDEuMDsgc3Ryb2tlLWRhc2hhcnJheTogMi4wLDIuMDsiIHgxPSIzNi41IiB4Mj0iMjYzLjUiIHkxPSIxNTMuNzMwNSIgeTI9IjE1My43MzA1Ii8+PHRleHQgZmlsbD0iIzAwMDAwMCIgZm9udC1mYW1pbHk9InNhbnMtc2VyaWYiIGZvbnQtc2l6ZT0iMTMiIGxlbmd0aEFkanVzdD0ic3BhY2luZ0FuZEdseXBocyIgdGV4dExlbmd0aD0iMjA5IiB4PSI0OC41IiB5PSIxNDguOTg4MyI+QW5vdGhlciBhdXRoZW50aWNhdGlvbiBSZXNwb25zZTwvdGV4dD48IS0tTUQ1PVs3ZjNlNGQwYzkwMWVmZGJjNTdlYjQ0MjQ5YTNiODE5N10KQHN0YXJ0dW1sDQpza2lucGFyYW0gc2hhZG93aW5nIGZhbHNlDQpBbGljZSAtPiBCb2I6IEF1dGhlbnRpY2F0aW9uIFJlcXVlc3QNCkJvYiAtIC0+IEFsaWNlOiBBdXRoZW50aWNhdGlvbiBSZXNwb25zZQ0KDQpBbGljZSAtPiBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVxdWVzdA0KQWxpY2UgPC0gLSBCb2I6IEFub3RoZXIgYXV0aGVudGljYXRpb24gUmVzcG9uc2UNCkBlbmR1bWwNCgpQbGFudFVNTCB2ZXJzaW9uIDEuMjAyMC4wMihTdW4gTWFyIDAxIDA0OjIyOjA3IENTVCAyMDIwKQooTUlUIHNvdXJjZSBkaXN0cmlidXRpb24pCkphdmEgUnVudGltZTogT3BlbkpESyBSdW50aW1lIEVudmlyb25tZW50CkpWTTogT3BlbkpESyA2NC1CaXQgU2VydmVyIFZNCkphdmEgVmVyc2lvbjogMTIrMzMKT3BlcmF0aW5nIFN5c3RlbTogTWFjIE9TIFgKRGVmYXVsdCBFbmNvZGluZzogVVRGLTgKTGFuZ3VhZ2U6IGVuCkNvdW50cnk6IFVTCi0tPjwvZz48L3N2Zz4=",
-295,212)},200):b.generatePlantUmlImage(v,K,function(W,O,V){b.spinner.stop();L(v,K,W,O,V)},function(W){b.handleError(W)})}}else if("mermaid"==x)b.spinner.spin(document.body,mxResources.get("inserting"))&&(N=b.editor.graph,b.generateMermaidImage(v,K,function(W,O,V){u=mxEvent.isAltDown(A)?u:N.getCenterInsertPoint(new mxRectangle(0,0,O,V));b.spinner.stop();var U=null;N.getModel().beginUpdate();try{U=N.insertVertex(null,null,null,u.x,u.y,O,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
-W+";"),N.setAttributeForCell(U,"mermaidData",JSON.stringify({data:v,config:EditorUi.defaultMermaidConfig},null,2))}finally{N.getModel().endUpdate()}null!=U&&(N.setSelectionCell(U),N.scrollCellToVisible(U))},function(W){b.handleError(W)}));else if("table"==x){x=null;for(var q=[],C=0,z={},B=0;B<y.length;B++){var G=mxUtils.trim(y[B]);if("primary key"==G.substring(0,11).toLowerCase()){var M=G.match(/\((.+)\)/);M&&M[1]&&(z[M[1]]=!0);y.splice(B,1)}else 0<G.toLowerCase().indexOf("primary key")&&(z[G.split(" ")[0]]=
+295,212)},200):b.generatePlantUmlImage(v,K,function(W,O,V){b.spinner.stop();L(v,K,W,O,V)},function(W){b.handleError(W)})}}else if("mermaid"==x)b.spinner.spin(document.body,mxResources.get("inserting"))&&(N=b.editor.graph,b.generateMermaidImage(v,K,function(W,O,V){u=mxEvent.isAltDown(z)?u:N.getCenterInsertPoint(new mxRectangle(0,0,O,V));b.spinner.stop();var U=null;N.getModel().beginUpdate();try{U=N.insertVertex(null,null,null,u.x,u.y,O,V,"shape=image;noLabel=1;verticalAlign=top;imageAspect=1;image="+
+W+";"),N.setAttributeForCell(U,"mermaidData",JSON.stringify({data:v,config:EditorUi.defaultMermaidConfig},null,2))}finally{N.getModel().endUpdate()}null!=U&&(N.setSelectionCell(U),N.scrollCellToVisible(U))},function(W){b.handleError(W)}));else if("table"==x){x=null;for(var q=[],C=0,A={},B=0;B<y.length;B++){var G=mxUtils.trim(y[B]);if("primary key"==G.substring(0,11).toLowerCase()){var M=G.match(/\((.+)\)/);M&&M[1]&&(A[M[1]]=!0);y.splice(B,1)}else 0<G.toLowerCase().indexOf("primary key")&&(A[G.split(" ")[0]]=
!0,y[B]=mxUtils.trim(G.replace(/primary key/i,"")))}for(B=0;B<y.length;B++)if(G=mxUtils.trim(y[B]),"create table"==G.substring(0,12).toLowerCase())G=mxUtils.trim(G.substring(12)),"("==G.charAt(G.length-1)&&(G=mxUtils.trim(G.substring(0,G.length-1))),x=new mxCell(G,new mxGeometry(C,0,160,40),"shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;"),x.vertex=!0,q.push(x),G=b.editor.graph.getPreferredSizeForCell(H),null!=
-G&&(x.geometry.width=G.width+10);else if(null!=x&&")"==G.charAt(0))C+=x.geometry.width+40,x=null;else if("("!=G&&null!=x){G=G.substring(0,","==G.charAt(G.length-1)?G.length-1:G.length);M=z[G.split(" ")[0]];var H=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(M?"1":"0")+";");H.vertex=!0;var F=new mxCell(M?"PK":"",
+G&&(x.geometry.width=G.width+10);else if(null!=x&&")"==G.charAt(0))C+=x.geometry.width+40,x=null;else if("("!=G&&null!=x){G=G.substring(0,","==G.charAt(G.length-1)?G.length-1:G.length);M=A[G.split(" ")[0]];var H=new mxCell("",new mxGeometry(0,0,160,30),"shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom="+(M?"1":"0")+";");H.vertex=!0;var F=new mxCell(M?"PK":"",
new mxGeometry(0,0,30,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;"+(M?"fontStyle=1;":""));F.vertex=!0;H.insert(F);G=new mxCell(G,new mxGeometry(30,0,130,30),"shape=partialRectangle;overflow=hidden;connectable=0;fillColor=none;align=left;top=0;left=0;bottom=0;right=0;spacingLeft=6;"+(M?"fontStyle=5;":""));G.vertex=!0;H.insert(G);G=b.editor.graph.getPreferredSizeForCell(G);null!=G&&x.geometry.width<G.width+30&&(x.geometry.width=Math.min(320,
-Math.max(x.geometry.width,G.width+30)));x.insert(H,M?0:null);x.geometry.height+=30}0<q.length&&(N=b.editor.graph,u=mxEvent.isAltDown(A)?u:N.getCenterInsertPoint(N.getBoundingBoxFromGeometry(q,!0)),N.setSelectionCells(N.importCells(q,u.x,u.y)),N.scrollCellToVisible(N.getSelectionCell()))}else if("list"==x){if(0<y.length){N=b.editor.graph;H=null;q=[];for(B=x=0;B<y.length;B++)";"!=y[B].charAt(0)&&(0==y[B].length?H=null:null==H?(H=new mxCell(y[B],new mxGeometry(x,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
+Math.max(x.geometry.width,G.width+30)));x.insert(H,M?0:null);x.geometry.height+=30}0<q.length&&(N=b.editor.graph,u=mxEvent.isAltDown(z)?u:N.getCenterInsertPoint(N.getBoundingBoxFromGeometry(q,!0)),N.setSelectionCells(N.importCells(q,u.x,u.y)),N.scrollCellToVisible(N.getSelectionCell()))}else if("list"==x){if(0<y.length){N=b.editor.graph;H=null;q=[];for(B=x=0;B<y.length;B++)";"!=y[B].charAt(0)&&(0==y[B].length?H=null:null==H?(H=new mxCell(y[B],new mxGeometry(x,0,160,30),"swimlane;fontStyle=1;childLayout=stackLayout;horizontal=1;startSize=26;horizontalStack=0;resizeParent=1;resizeParentMax=0;resizeLast=0;collapsible=1;marginBottom=0;"),
H.vertex=!0,q.push(H),G=N.getPreferredSizeForCell(H),null!=G&&H.geometry.width<G.width+10&&(H.geometry.width=G.width+10),x+=H.geometry.width+40):"--"==y[B]?(G=new mxCell("",new mxGeometry(0,0,40,8),"line;strokeWidth=1;fillColor=none;align=left;verticalAlign=middle;spacingTop=-1;spacingLeft=3;spacingRight=3;rotatable=0;labelPosition=right;points=[];portConstraint=eastwest;"),G.vertex=!0,H.geometry.height+=G.geometry.height,H.insert(G)):0<y[B].length&&(C=new mxCell(y[B],new mxGeometry(0,0,60,26),"text;strokeColor=none;fillColor=none;align=left;verticalAlign=top;spacingLeft=4;spacingRight=4;overflow=hidden;rotatable=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;"),
-C.vertex=!0,G=N.getPreferredSizeForCell(C),null!=G&&C.geometry.width<G.width&&(C.geometry.width=G.width),H.geometry.width=Math.max(H.geometry.width,C.geometry.width),H.geometry.height+=C.geometry.height,H.insert(C)));if(0<q.length){u=mxEvent.isAltDown(A)?u:N.getCenterInsertPoint(N.getBoundingBoxFromGeometry(q,!0));N.getModel().beginUpdate();try{q=N.importCells(q,u.x,u.y);G=[];for(B=0;B<q.length;B++)G.push(q[B]),G=G.concat(q[B].children);N.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{N.getModel().endUpdate()}N.setSelectionCells(q);
+C.vertex=!0,G=N.getPreferredSizeForCell(C),null!=G&&C.geometry.width<G.width&&(C.geometry.width=G.width),H.geometry.width=Math.max(H.geometry.width,C.geometry.width),H.geometry.height+=C.geometry.height,H.insert(C)));if(0<q.length){u=mxEvent.isAltDown(z)?u:N.getCenterInsertPoint(N.getBoundingBoxFromGeometry(q,!0));N.getModel().beginUpdate();try{q=N.importCells(q,u.x,u.y);G=[];for(B=0;B<q.length;B++)G.push(q[B]),G=G.concat(q[B].children);N.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{N.getModel().endUpdate()}N.setSelectionCells(q);
N.scrollCellToVisible(N.getSelectionCell())}}}else{H=function(W){var O=J[W];null==O&&(O=new mxCell(W,new mxGeometry(0,0,80,30),"whiteSpace=wrap;html=1;"),O.vertex=!0,J[W]=O,q.push(O));return O};var J={};q=[];for(B=0;B<y.length;B++)if(";"!=y[B].charAt(0)){var R=y[B].split("->");2<=R.length&&(M=H(R[0]),F=H(R[R.length-1]),R=new mxCell(2<R.length?R[1]:"",new mxGeometry),R.edge=!0,M.insertEdge(R,!0),F.insertEdge(R,!1),q.push(R))}if(0<q.length){y=document.createElement("div");y.style.visibility="hidden";
document.body.appendChild(y);N=new Graph(y);N.getModel().beginUpdate();try{q=N.importCells(q);for(B=0;B<q.length;B++)N.getModel().isVertex(q[B])&&(G=N.getPreferredSizeForCell(q[B]),q[B].geometry.width=Math.max(q[B].geometry.width,G.width),q[B].geometry.height=Math.max(q[B].geometry.height,G.height));B=!0;"horizontalFlow"==x||"verticalFlow"==x?((new mxHierarchicalLayout(N,"horizontalFlow"==x?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH)).execute(N.getDefaultParent(),q),B=!1):"circle"==x?
-(new mxCircleLayout(N)).execute(N.getDefaultParent()):(C=new mxFastOrganicLayout(N),C.disableEdgeStyle=!1,C.forceConstant=180,C.execute(N.getDefaultParent()));B&&(z=new mxParallelEdgeLayout(N),z.spacing=30,z.execute(N.getDefaultParent()))}finally{N.getModel().endUpdate()}N.clearCellOverlays();G=[];b.editor.graph.getModel().beginUpdate();try{q=N.getModel().getChildren(N.getDefaultParent()),u=mxEvent.isAltDown(A)?u:b.editor.graph.getCenterInsertPoint(N.getBoundingBoxFromGeometry(q,!0)),G=b.editor.graph.importCells(q,
+(new mxCircleLayout(N)).execute(N.getDefaultParent()):(C=new mxFastOrganicLayout(N),C.disableEdgeStyle=!1,C.forceConstant=180,C.execute(N.getDefaultParent()));B&&(A=new mxParallelEdgeLayout(N),A.spacing=30,A.execute(N.getDefaultParent()))}finally{N.getModel().endUpdate()}N.clearCellOverlays();G=[];b.editor.graph.getModel().beginUpdate();try{q=N.getModel().getChildren(N.getDefaultParent()),u=mxEvent.isAltDown(z)?u:b.editor.graph.getCenterInsertPoint(N.getBoundingBoxFromGeometry(q,!0)),G=b.editor.graph.importCells(q,
u.x,u.y),b.editor.graph.fireEvent(new mxEventObject("cellsInserted","cells",G))}finally{b.editor.graph.getModel().endUpdate()}b.editor.graph.setSelectionCells(G);b.editor.graph.scrollCellToVisible(b.editor.graph.getSelectionCell());N.destroy();y.parentNode.removeChild(y)}}}function t(){return"list"==c.value?"Person\n-name: String\n-birthDate: Date\n--\n+getName(): String\n+setName(String): void\n+isBirthday(): boolean\n\nAddress\n-street: String\n-city: String\n-state: String":"mermaid"==c.value?
"graph TD;\n A--\x3eB;\n A--\x3eC;\n B--\x3eD;\n C--\x3eD;":"table"==c.value?"CREATE TABLE Suppliers\n(\nsupplier_id int NOT NULL PRIMARY KEY,\nsupplier_name char(50) NOT NULL,\ncontact_name char(50),\n);\nCREATE TABLE Customers\n(\ncustomer_id int NOT NULL PRIMARY KEY,\ncustomer_name char(50) NOT NULL,\naddress char(50),\ncity char(50),\nstate char(25),\nzip_code char(10)\n);\n":"plantUmlPng"==c.value?"@startuml\nskinparam backgroundcolor transparent\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":
-"plantUmlSvg"==c.value||"plantUmlTxt"==c.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var u=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");f.style.textAlign="right";var D=document.createElement("textarea");D.style.boxSizing="border-box";D.style.resize=
-"none";D.style.width="100%";D.style.height="354px";D.style.marginBottom="16px";var c=document.createElement("select");if("formatSql"==l||"mermaid"==l)c.style.display="none";var e=document.createElement("option");e.setAttribute("value","list");mxUtils.write(e,mxResources.get("list"));"plantUml"!=l&&c.appendChild(e);null!=l&&"fromText"!=l||e.setAttribute("selected","selected");e=document.createElement("option");e.setAttribute("value","table");mxUtils.write(e,mxResources.get("formatSql"));"formatSql"==
+"plantUmlSvg"==c.value||"plantUmlTxt"==c.value?"@startuml\nskinparam shadowing false\nAlice -> Bob: Authentication Request\nBob --\x3e Alice: Authentication Response\n\nAlice -> Bob: Another authentication Request\nAlice <-- Bob: Another authentication Response\n@enduml":";Example:\na->b\nb->edge label->c\nc->a\n"}var u=b.editor.graph.getFreeInsertPoint();f=document.createElement("div");f.style.textAlign="right";var E=document.createElement("textarea");E.style.boxSizing="border-box";E.style.resize=
+"none";E.style.width="100%";E.style.height="354px";E.style.marginBottom="16px";var c=document.createElement("select");if("formatSql"==l||"mermaid"==l)c.style.display="none";var e=document.createElement("option");e.setAttribute("value","list");mxUtils.write(e,mxResources.get("list"));"plantUml"!=l&&c.appendChild(e);null!=l&&"fromText"!=l||e.setAttribute("selected","selected");e=document.createElement("option");e.setAttribute("value","table");mxUtils.write(e,mxResources.get("formatSql"));"formatSql"==
l&&(c.appendChild(e),e.setAttribute("selected","selected"));e=document.createElement("option");e.setAttribute("value","mermaid");mxUtils.write(e,mxResources.get("formatSql"));"mermaid"==l&&(c.appendChild(e),e.setAttribute("selected","selected"));e=document.createElement("option");e.setAttribute("value","diagram");mxUtils.write(e,mxResources.get("diagram"));var g=document.createElement("option");g.setAttribute("value","circle");mxUtils.write(g,mxResources.get("circle"));var k=document.createElement("option");
k.setAttribute("value","horizontalFlow");mxUtils.write(k,mxResources.get("horizontalFlow"));var m=document.createElement("option");m.setAttribute("value","verticalFlow");mxUtils.write(m,mxResources.get("verticalFlow"));"plantUml"!=l&&(c.appendChild(e),c.appendChild(g),c.appendChild(k),c.appendChild(m));e=document.createElement("option");e.setAttribute("value","plantUmlSvg");mxUtils.write(e,mxResources.get("plantUml")+" ("+mxResources.get("formatSvg")+")");"plantUml"==l&&e.setAttribute("selected",
-"selected");g=document.createElement("option");g.setAttribute("value","plantUmlPng");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");k=document.createElement("option");k.setAttribute("value","plantUmlTxt");mxUtils.write(k,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==l&&(c.appendChild(e),c.appendChild(g),c.appendChild(k));var p=t();D.value=p;f.appendChild(D);this.init=function(){D.focus()};
-Graph.fileSupport&&(D.addEventListener("dragover",function(v){v.stopPropagation();v.preventDefault()},!1),D.addEventListener("drop",function(v){v.stopPropagation();v.preventDefault();if(0<v.dataTransfer.files.length){v=v.dataTransfer.files[0];var x=new FileReader;x.onload=function(A){D.value=A.target.result};x.readAsText(v)}},!1));f.appendChild(c);mxEvent.addListener(c,"change",function(){var v=t();if(0==D.value.length||D.value==p)p=v,D.value=p});b.isOffline()||"mermaid"!=l&&"plantUml"!=l||(e=mxUtils.button(mxResources.get("help"),
-function(){b.openLink("mermaid"==l?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),e.className="geBtn",f.appendChild(e));e=mxUtils.button(mxResources.get("close"),function(){D.value==p?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});e.className="geBtn";b.editor.cancelFirst&&f.appendChild(e);g=mxUtils.button(mxResources.get("insert"),function(v){b.hideDialog();d(D.value,c.value,v)});f.appendChild(g);g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
-f.appendChild(e);this.container=f},NewDialog=function(b,f,l,d,t,u,D,c,e,g,k,m,p,v,x,A,y,L){function N(ea){null!=ea&&(Ba=ua=ea?135:140);ea=!0;if(null!=Na)for(;J<Na.length&&(ea||0!=mxUtils.mod(J,30));){var ra=Na[J++];ra=C(ra.url,ra.libs,ra.title,ra.tooltip?ra.tooltip:ra.title,ra.select,ra.imgUrl,ra.info,ra.onClick,ra.preview,ra.noImg,ra.clibs);ea&&ra.click();ea=!1}}function K(){if(Y&&null!=v)l||b.hideDialog(),v(Y,ia,F.value);else if(d)l||b.hideDialog(),d(P,F.value,ca,S);else{var ea=F.value;null!=ea&&
-0<ea.length&&b.pickFolder(b.mode,function(ra){b.createFile(ea,P,null!=S&&0<S.length?S:null,null,function(){b.hideDialog()},null,ra,null,null!=Q&&0<Q.length?Q:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function q(ea,ra,xa,va,qa,ta,ja){null!=T&&(T.style.backgroundColor="transparent",T.style.border="1px solid transparent");W.removeAttribute("disabled");P=ra;S=xa;Q=ta;T=ea;Y=va;ca=ja;ia=qa;T.style.backgroundColor=c;T.style.border=e}function C(ea,ra,xa,va,qa,ta,ja,oa,
-ba,da,na){function ka(La,Ta){null==Ma?(Ja=La,Ja=/^https?:\/\//.test(Ja)&&!b.editor.isCorsEnabledForUrl(Ja)?PROXY_URL+"?url="+encodeURIComponent(Ja):TEMPLATE_PATH+"/"+Ja,mxUtils.get(Ja,mxUtils.bind(this,function(Ua){200<=Ua.getStatus()&&299>=Ua.getStatus()&&(Ma=Ua.getText());Ta(Ma,Ja)}))):Ta(Ma,Ja)}function ma(La,Ta,Ua){if(null!=La&&mxUtils.isAncestorNode(document.body,ha)){La=mxUtils.parseXml(La);La=Editor.parseDiagramNode(La.documentElement);var Za=new mxCodec(La.ownerDocument),Wa=new mxGraphModel;
-Za.decode(La,Wa);La=Wa.root.getChildAt(0).children;b.sidebar.createTooltip(ha,La,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=xa?mxResources.get(xa,null,xa):null,!0,new mxPoint(Ta,Ua),!0,function(){Ya=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;q(ha,null,null,ea,ja,na)},!0,!1)}}function sa(La,Ta){null==ea||Pa||
-b.sidebar.currentElt==ha?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Sa?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Sa.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Sa.naturalWidth+'" height="'+Sa.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",ma(Ta,mxEvent.getClientX(La),mxEvent.getClientY(La))):(b.sidebar.currentElt=
-ha,Pa=!0,ka(ea,function(Ua){Pa&&b.sidebar.currentElt==ha&&ma(Ua,mxEvent.getClientX(La),mxEvent.getClientY(La));Pa=!1})))}var ha=document.createElement("div");ha.className="geTemplate";ha.style.position="relative";ha.style.height=Ba+"px";ha.style.width=ua+"px";var Ma=null,Ja=ea;Editor.isDarkMode()&&(ha.style.filter="invert(100%)");null!=xa?ha.setAttribute("title",mxResources.get(xa,null,xa)):null!=va&&0<va.length&&ha.setAttribute("title",va);var Pa=!1,Sa=null;if(null!=ta){ha.style.display="inline-flex";
-ha.style.justifyContent="center";ha.style.alignItems="center";qa=document.createElement("img");qa.setAttribute("src",ta);qa.setAttribute("alt",va);qa.style.maxWidth=Ba+"px";qa.style.maxHeight=ua+"px";Sa=qa;var Ga=ta.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");ha.appendChild(qa);qa.onerror=function(){this.src!=Ga?this.src=Ga:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(ha,mxUtils.bind(this,function(La){q(ha,null,null,ea,ja,na)}),null,null);mxEvent.addListener(ha,
-"dblclick",function(La){K();mxEvent.consume(La)})}else if(!da&&null!=ea&&0<ea.length){var Ha=function(La){W.setAttribute("disabled","disabled");ha.style.backgroundColor="transparent";ha.style.border="1px solid transparent";R.spin(Z);ka(ea,function(Ta,Ua){R.stop();null!=Ta&&(q(ha,Ta,ra,null,null,na,Ua),La&&K())})};qa=ba||TEMPLATE_PATH+"/"+ea.substring(0,ea.length-4)+".png";ha.style.backgroundImage="url("+qa+")";ha.style.backgroundPosition="center center";ha.style.backgroundRepeat="no-repeat";if(null!=
-xa){va=document.createElement("table");va.setAttribute("width","100%");va.setAttribute("height","100%");va.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";va.style.lineHeight="1.3em";va.style.border="inherit";ta=document.createElement("tbody");ba=document.createElement("tr");da=document.createElement("td");da.setAttribute("align","center");da.setAttribute("valign","middle");var Oa=document.createElement("span");Oa.style.display="inline-block";Oa.style.padding="4px 8px 4px 8px";
-Oa.style.userSelect="none";Oa.style.borderRadius="3px";Oa.style.background="rgba(255,255,255,0.85)";Oa.style.overflow="hidden";Oa.style.textOverflow="ellipsis";Oa.style.maxWidth=Ba-34+"px";mxUtils.write(Oa,mxResources.get(xa,null,xa));da.appendChild(Oa);ba.appendChild(da);ta.appendChild(ba);va.appendChild(ta);ha.appendChild(va)}mxEvent.addGestureListeners(ha,mxUtils.bind(this,function(La){Ha()}),null,null);mxEvent.addListener(ha,"dblclick",function(La){Ha(!0);mxEvent.consume(La)})}else va=document.createElement("table"),
-va.setAttribute("width","100%"),va.setAttribute("height","100%"),va.style.lineHeight="1.3em",ta=document.createElement("tbody"),ba=document.createElement("tr"),da=document.createElement("td"),da.setAttribute("align","center"),da.setAttribute("valign","middle"),Oa=document.createElement("span"),Oa.style.display="inline-block",Oa.style.padding="4px 8px 4px 8px",Oa.style.userSelect="none",Oa.style.borderRadius="3px",Oa.style.background="#ffffff",Oa.style.overflow="hidden",Oa.style.textOverflow="ellipsis",
-Oa.style.maxWidth=Ba-34+"px",mxUtils.write(Oa,mxResources.get(xa,null,xa)),da.appendChild(Oa),ba.appendChild(da),ta.appendChild(ba),va.appendChild(ta),ha.appendChild(va),qa&&q(ha),mxEvent.addGestureListeners(ha,mxUtils.bind(this,function(La){q(ha,null,null,ea,ja)}),null,null),null!=oa?mxEvent.addListener(ha,"click",oa):(mxEvent.addListener(ha,"click",function(La){q(ha,null,null,ea,ja)}),mxEvent.addListener(ha,"dblclick",function(La){K();mxEvent.consume(La)}));if(null!=ea){var Ra=document.createElement("img");
-Ra.setAttribute("src",Sidebar.prototype.searchImage);Ra.setAttribute("title",mxResources.get("preview"));Ra.className="geActiveButton";Ra.style.position="absolute";Ra.style.cursor="default";Ra.style.padding="8px";Ra.style.right="0px";Ra.style.top="0px";ha.appendChild(Ra);var Ya=!1;mxEvent.addGestureListeners(Ra,mxUtils.bind(this,function(La){Ya=b.sidebar.currentElt==ha}),null,null);mxEvent.addListener(Ra,"click",mxUtils.bind(this,function(La){Ya||sa(La,Ra);mxEvent.consume(La)}))}Z.appendChild(ha);
-return ha}function z(){function ea(sa,ha){var Ma=mxResources.get(sa);null==Ma&&(Ma=sa.substring(0,1).toUpperCase()+sa.substring(1));18<Ma.length&&(Ma=Ma.substring(0,18)+"&hellip;");return Ma+" ("+ha.length+")"}function ra(sa,ha,Ma){mxEvent.addListener(ha,"click",function(){Ea!=ha&&(Ea.style.backgroundColor="",Ea=ha,Ea.style.backgroundColor=D,Z.scrollTop=0,Z.innerHTML="",J=0,Na=Ma?Fa[sa][Ma]:Da[sa],V=null,N(!1))})}Ia&&(Ia=!1,mxEvent.addListener(Z,"scroll",function(sa){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&&
-(N(),mxEvent.consume(sa))}));if(0<Qa){var xa=document.createElement("div");xa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(xa,mxResources.get("custom"));za.appendChild(xa);for(var va in Ka){var qa=document.createElement("div"),ta=va;xa=Ka[va];18<ta.length&&(ta=ta.substring(0,18)+"&hellip;");qa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
-qa.setAttribute("title",ta+" ("+xa.length+")");mxUtils.write(qa,qa.getAttribute("title"));null!=g&&(qa.style.padding=g);za.appendChild(qa);(function(sa,ha){mxEvent.addListener(qa,"click",function(){Ea!=ha&&(Ea.style.backgroundColor="",Ea=ha,Ea.style.backgroundColor=D,Z.scrollTop=0,Z.innerHTML="",J=0,Na=Ka[sa],V=null,N(!1))})})(va,qa)}xa=document.createElement("div");xa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(xa,"draw.io");za.appendChild(xa)}for(va in Da){ta=
-Fa[va];var ja=qa=document.createElement(ta?"ul":"div");xa=Da[va];var oa=ea(va,xa);if(null!=ta){var ba=document.createElement("li"),da=document.createElement("div");da.className="geTempTreeCaret";da.setAttribute("title",oa);mxUtils.write(da,oa);ja=da;ba.appendChild(da);oa=document.createElement("ul");oa.className="geTempTreeNested";oa.style.visibility="hidden";for(var na in ta){var ka=document.createElement("li"),ma=ea(na,ta[na]);ka.setAttribute("title",ma);mxUtils.write(ka,ma);ra(va,ka,na);oa.appendChild(ka)}ba.appendChild(oa);
-qa.className="geTempTree";qa.appendChild(ba);(function(sa,ha){mxEvent.addListener(ha,"click",function(){sa.style.visibility="visible";sa.classList.toggle("geTempTreeActive");sa.classList.toggle("geTempTreeNested")&&setTimeout(function(){sa.style.visibility="hidden"},550);ha.classList.toggle("geTempTreeCaret-down")})})(oa,da)}else qa.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
-qa.setAttribute("title",oa),mxUtils.write(qa,oa);null!=g&&(qa.style.padding=g);za.appendChild(qa);null==Ea&&0<xa.length&&(Ea=qa,Ea.style.backgroundColor=D,Na=xa);ra(va,ja)}N(!1)}var B=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);l=null!=l?l:!0;t=null!=t?t:!1;D=null!=D?D:"#ebf2f9";c=null!=c?c:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";e=null!=e?e:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";k=null!=k?k:EditorUi.templateFile;var G=document.createElement("div");
+"selected");g=document.createElement("option");g.setAttribute("value","plantUmlPng");mxUtils.write(g,mxResources.get("plantUml")+" ("+mxResources.get("formatPng")+")");k=document.createElement("option");k.setAttribute("value","plantUmlTxt");mxUtils.write(k,mxResources.get("plantUml")+" ("+mxResources.get("text")+")");EditorUi.enablePlantUml&&Graph.fileSupport&&!b.isOffline()&&"plantUml"==l&&(c.appendChild(e),c.appendChild(g),c.appendChild(k));var p=t();E.value=p;f.appendChild(E);this.init=function(){E.focus()};
+Graph.fileSupport&&(E.addEventListener("dragover",function(v){v.stopPropagation();v.preventDefault()},!1),E.addEventListener("drop",function(v){v.stopPropagation();v.preventDefault();if(0<v.dataTransfer.files.length){v=v.dataTransfer.files[0];var x=new FileReader;x.onload=function(z){E.value=z.target.result};x.readAsText(v)}},!1));f.appendChild(c);mxEvent.addListener(c,"change",function(){var v=t();if(0==E.value.length||E.value==p)p=v,E.value=p});b.isOffline()||"mermaid"!=l&&"plantUml"!=l||(e=mxUtils.button(mxResources.get("help"),
+function(){b.openLink("mermaid"==l?"https://mermaid-js.github.io/mermaid/#/":"https://plantuml.com/")}),e.className="geBtn",f.appendChild(e));e=mxUtils.button(mxResources.get("close"),function(){E.value==p?b.hideDialog():b.confirm(mxResources.get("areYouSure"),function(){b.hideDialog()})});e.className="geBtn";b.editor.cancelFirst&&f.appendChild(e);g=mxUtils.button(mxResources.get("insert"),function(v){b.hideDialog();d(E.value,c.value,v)});f.appendChild(g);g.className="geBtn gePrimaryBtn";b.editor.cancelFirst||
+f.appendChild(e);this.container=f},NewDialog=function(b,f,l,d,t,u,E,c,e,g,k,m,p,v,x,z,y,L){function N(ea){null!=ea&&(Ba=Ha=ea?135:140);ea=!0;if(null!=Pa)for(;J<Pa.length&&(ea||0!=mxUtils.mod(J,30));){var ta=Pa[J++];ta=C(ta.url,ta.libs,ta.title,ta.tooltip?ta.tooltip:ta.title,ta.select,ta.imgUrl,ta.info,ta.onClick,ta.preview,ta.noImg,ta.clibs);ea&&ta.click();ea=!1}}function K(){if(X&&null!=v)l||b.hideDialog(),v(X,ja,F.value);else if(d)l||b.hideDialog(),d(P,F.value,ba,S);else{var ea=F.value;null!=ea&&
+0<ea.length&&b.pickFolder(b.mode,function(ta){b.createFile(ea,P,null!=S&&0<S.length?S:null,null,function(){b.hideDialog()},null,ta,null,null!=Q&&0<Q.length?Q:null)},b.mode!=App.MODE_GOOGLE||null==b.stateArg||null==b.stateArg.folderId)}}function q(ea,ta,xa,wa,ua,va,ha){null!=T&&(T.style.backgroundColor="transparent",T.style.border="1px solid transparent");W.removeAttribute("disabled");P=ta;S=xa;Q=va;T=ea;X=wa;ba=ha;ja=ua;T.style.backgroundColor=c;T.style.border=e}function C(ea,ta,xa,wa,ua,va,ha,qa,
+aa,ca,na){function la(Na,Ta){null==Da?(Ja=Na,Ja=/^https?:\/\//.test(Ja)&&!b.editor.isCorsEnabledForUrl(Ja)?PROXY_URL+"?url="+encodeURIComponent(Ja):TEMPLATE_PATH+"/"+Ja,mxUtils.get(Ja,mxUtils.bind(this,function(Ua){200<=Ua.getStatus()&&299>=Ua.getStatus()&&(Da=Ua.getText());Ta(Da,Ja)}))):Ta(Da,Ja)}function oa(Na,Ta,Ua){if(null!=Na&&mxUtils.isAncestorNode(document.body,ia)){Na=mxUtils.parseXml(Na);Na=Editor.parseDiagramNode(Na.documentElement);var Za=new mxCodec(Na.ownerDocument),Wa=new mxGraphModel;
+Za.decode(Na,Wa);Na=Wa.root.getChildAt(0).children;b.sidebar.createTooltip(ia,Na,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=xa?mxResources.get(xa,null,xa):null,!0,new mxPoint(Ta,Ua),!0,function(){Ya=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display;q(ia,null,null,ea,ha,na)},!0,!1)}}function ra(Na,Ta){null==ea||Sa||
+b.sidebar.currentElt==ia?b.sidebar.hideTooltip():(b.sidebar.hideTooltip(),null!=Ra?(Ta='<mxfile><diagram id="d" name="n">'+Graph.compress('<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="2" value="" style="shape=image;image='+Ra.src+';imageAspect=1;" parent="1" vertex="1"><mxGeometry width="'+Ra.naturalWidth+'" height="'+Ra.naturalHeight+'" as="geometry" /></mxCell></root></mxGraphModel>')+"</diagram></mxfile>",oa(Ta,mxEvent.getClientX(Na),mxEvent.getClientY(Na))):(b.sidebar.currentElt=
+ia,Sa=!0,la(ea,function(Ua){Sa&&b.sidebar.currentElt==ia&&oa(Ua,mxEvent.getClientX(Na),mxEvent.getClientY(Na));Sa=!1})))}var ia=document.createElement("div");ia.className="geTemplate";ia.style.position="relative";ia.style.height=Ba+"px";ia.style.width=Ha+"px";var Da=null,Ja=ea;Editor.isDarkMode()&&(ia.style.filter="invert(100%)");null!=xa?ia.setAttribute("title",mxResources.get(xa,null,xa)):null!=wa&&0<wa.length&&ia.setAttribute("title",wa);var Sa=!1,Ra=null;if(null!=va){ia.style.display="inline-flex";
+ia.style.justifyContent="center";ia.style.alignItems="center";ua=document.createElement("img");ua.setAttribute("src",va);ua.setAttribute("alt",wa);ua.style.maxWidth=Ba+"px";ua.style.maxHeight=Ha+"px";Ra=ua;var Ca=va.replace(".drawio.xml","").replace(".drawio","").replace(".xml","");ia.appendChild(ua);ua.onerror=function(){this.src!=Ca?this.src=Ca:(this.src=Editor.errorImage,this.onerror=null)};mxEvent.addGestureListeners(ia,mxUtils.bind(this,function(Na){q(ia,null,null,ea,ha,na)}),null,null);mxEvent.addListener(ia,
+"dblclick",function(Na){K();mxEvent.consume(Na)})}else if(!ca&&null!=ea&&0<ea.length){var La=function(Na){W.setAttribute("disabled","disabled");ia.style.backgroundColor="transparent";ia.style.border="1px solid transparent";R.spin(Z);la(ea,function(Ta,Ua){R.stop();null!=Ta&&(q(ia,Ta,ta,null,null,na,Ua),Na&&K())})};ua=aa||TEMPLATE_PATH+"/"+ea.substring(0,ea.length-4)+".png";ia.style.backgroundImage="url("+ua+")";ia.style.backgroundPosition="center center";ia.style.backgroundRepeat="no-repeat";if(null!=
+xa){wa=document.createElement("table");wa.setAttribute("width","100%");wa.setAttribute("height","100%");wa.style.background=Editor.isDarkMode()?"transparent":"rgba(255,255,255,0.85)";wa.style.lineHeight="1.3em";wa.style.border="inherit";va=document.createElement("tbody");aa=document.createElement("tr");ca=document.createElement("td");ca.setAttribute("align","center");ca.setAttribute("valign","middle");var Oa=document.createElement("span");Oa.style.display="inline-block";Oa.style.padding="4px 8px 4px 8px";
+Oa.style.userSelect="none";Oa.style.borderRadius="3px";Oa.style.background="rgba(255,255,255,0.85)";Oa.style.overflow="hidden";Oa.style.textOverflow="ellipsis";Oa.style.maxWidth=Ba-34+"px";mxUtils.write(Oa,mxResources.get(xa,null,xa));ca.appendChild(Oa);aa.appendChild(ca);va.appendChild(aa);wa.appendChild(va);ia.appendChild(wa)}mxEvent.addGestureListeners(ia,mxUtils.bind(this,function(Na){La()}),null,null);mxEvent.addListener(ia,"dblclick",function(Na){La(!0);mxEvent.consume(Na)})}else wa=document.createElement("table"),
+wa.setAttribute("width","100%"),wa.setAttribute("height","100%"),wa.style.lineHeight="1.3em",va=document.createElement("tbody"),aa=document.createElement("tr"),ca=document.createElement("td"),ca.setAttribute("align","center"),ca.setAttribute("valign","middle"),Oa=document.createElement("span"),Oa.style.display="inline-block",Oa.style.padding="4px 8px 4px 8px",Oa.style.userSelect="none",Oa.style.borderRadius="3px",Oa.style.background="#ffffff",Oa.style.overflow="hidden",Oa.style.textOverflow="ellipsis",
+Oa.style.maxWidth=Ba-34+"px",mxUtils.write(Oa,mxResources.get(xa,null,xa)),ca.appendChild(Oa),aa.appendChild(ca),va.appendChild(aa),wa.appendChild(va),ia.appendChild(wa),ua&&q(ia),mxEvent.addGestureListeners(ia,mxUtils.bind(this,function(Na){q(ia,null,null,ea,ha)}),null,null),null!=qa?mxEvent.addListener(ia,"click",qa):(mxEvent.addListener(ia,"click",function(Na){q(ia,null,null,ea,ha)}),mxEvent.addListener(ia,"dblclick",function(Na){K();mxEvent.consume(Na)}));if(null!=ea){var Qa=document.createElement("img");
+Qa.setAttribute("src",Sidebar.prototype.searchImage);Qa.setAttribute("title",mxResources.get("preview"));Qa.className="geActiveButton";Qa.style.position="absolute";Qa.style.cursor="default";Qa.style.padding="8px";Qa.style.right="0px";Qa.style.top="0px";ia.appendChild(Qa);var Ya=!1;mxEvent.addGestureListeners(Qa,mxUtils.bind(this,function(Na){Ya=b.sidebar.currentElt==ia}),null,null);mxEvent.addListener(Qa,"click",mxUtils.bind(this,function(Na){Ya||ra(Na,Qa);mxEvent.consume(Na)}))}Z.appendChild(ia);
+return ia}function A(){function ea(ra,ia){var Da=mxResources.get(ra);null==Da&&(Da=ra.substring(0,1).toUpperCase()+ra.substring(1));18<Da.length&&(Da=Da.substring(0,18)+"&hellip;");return Da+" ("+ia.length+")"}function ta(ra,ia,Da){mxEvent.addListener(ia,"click",function(){Ea!=ia&&(Ea.style.backgroundColor="",Ea=ia,Ea.style.backgroundColor=E,Z.scrollTop=0,Z.innerHTML="",J=0,Pa=Da?Ga[ra][Da]:sa[ra],V=null,N(!1))})}Ia&&(Ia=!1,mxEvent.addListener(Z,"scroll",function(ra){Z.scrollTop+Z.clientHeight>=Z.scrollHeight&&
+(N(),mxEvent.consume(ra))}));if(0<Ma){var xa=document.createElement("div");xa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(xa,mxResources.get("custom"));ya.appendChild(xa);for(var wa in Ka){var ua=document.createElement("div"),va=wa;xa=Ka[wa];18<va.length&&(va=va.substring(0,18)+"&hellip;");ua.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;";
+ua.setAttribute("title",va+" ("+xa.length+")");mxUtils.write(ua,ua.getAttribute("title"));null!=g&&(ua.style.padding=g);ya.appendChild(ua);(function(ra,ia){mxEvent.addListener(ua,"click",function(){Ea!=ia&&(Ea.style.backgroundColor="",Ea=ia,Ea.style.backgroundColor=E,Z.scrollTop=0,Z.innerHTML="",J=0,Pa=Ka[ra],V=null,N(!1))})})(wa,ua)}xa=document.createElement("div");xa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;";mxUtils.write(xa,"draw.io");ya.appendChild(xa)}for(wa in sa){va=
+Ga[wa];var ha=ua=document.createElement(va?"ul":"div");xa=sa[wa];var qa=ea(wa,xa);if(null!=va){var aa=document.createElement("li"),ca=document.createElement("div");ca.className="geTempTreeCaret";ca.setAttribute("title",qa);mxUtils.write(ca,qa);ha=ca;aa.appendChild(ca);qa=document.createElement("ul");qa.className="geTempTreeNested";qa.style.visibility="hidden";for(var na in va){var la=document.createElement("li"),oa=ea(na,va[na]);la.setAttribute("title",oa);mxUtils.write(la,oa);ta(wa,la,na);qa.appendChild(la)}aa.appendChild(qa);
+ua.className="geTempTree";ua.appendChild(aa);(function(ra,ia){mxEvent.addListener(ia,"click",function(){ra.style.visibility="visible";ra.classList.toggle("geTempTreeActive");ra.classList.toggle("geTempTreeNested")&&setTimeout(function(){ra.style.visibility="hidden"},550);ia.classList.toggle("geTempTreeCaret-down")})})(qa,ca)}else ua.style.cssText="display:block;cursor:pointer;padding:6px;white-space:nowrap;margin-bottom:-1px;overflow:hidden;text-overflow:ellipsis;user-select:none;transition: all 0.5s;",
+ua.setAttribute("title",qa),mxUtils.write(ua,qa);null!=g&&(ua.style.padding=g);ya.appendChild(ua);null==Ea&&0<xa.length&&(Ea=ua,Ea.style.backgroundColor=E,Pa=xa);ta(wa,ha)}N(!1)}var B=500>(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);l=null!=l?l:!0;t=null!=t?t:!1;E=null!=E?E:"#ebf2f9";c=null!=c?c:Editor.isDarkMode()?"#a2a2a2":"#e6eff8";e=null!=e?e:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";k=null!=k?k:EditorUi.templateFile;var G=document.createElement("div");
G.style.userSelect="none";G.style.height="100%";var M=document.createElement("div");M.style.whiteSpace="nowrap";M.style.height="46px";l&&G.appendChild(M);var H=document.createElement("img");H.setAttribute("border","0");H.setAttribute("align","absmiddle");H.style.width="40px";H.style.height="40px";H.style.marginRight="10px";H.style.paddingBottom="4px";H.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?
IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg":b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";f||B||!l||M.appendChild(H);l&&mxUtils.write(M,(B?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");H=".drawio";
b.mode==App.MODE_GOOGLE&&null!=b.drive?H=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?H=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&&null!=b.oneDrive?H=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?H=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?H=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(H=b.trello.extension);var F=document.createElement("input");F.setAttribute("value",b.defaultFilename+H);F.style.marginLeft="10px";F.style.width=f||
B?"144px":"244px";this.init=function(){l&&(F.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?F.select():document.execCommand("selectAll",!1,null));null!=Z.parentNode&&null!=Z.parentNode.parentNode&&mxEvent.addGestureListeners(Z.parentNode.parentNode,mxUtils.bind(this,function(ea){b.sidebar.hideTooltip()}),null,null)};l&&(M.appendChild(F),L?F.style.width=f||B?"350px":"450px":(null!=b.editor.diagramFileTypes&&(L=FilenameDialog.createFileTypes(b,F,b.editor.diagramFileTypes),L.style.marginLeft=
-"6px",L.style.width=f||B?"80px":"180px",M.appendChild(L)),null!=b.editor.fileExtensions&&(B=FilenameDialog.createTypeHint(b,F,b.editor.fileExtensions),B.style.marginTop="12px",M.appendChild(B))));M=!1;var J=0,R=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),W=mxUtils.button(A||mxResources.get("create"),function(){W.setAttribute("disabled","disabled");K();W.removeAttribute("disabled")});W.className="geBtn gePrimaryBtn";
-if(m||p){var O=[],V=null,U=null,X=null,n=function(ea){W.setAttribute("disabled","disabled");for(var ra=0;ra<O.length;ra++)O[ra].className=ra==ea?"geBtn gePrimaryBtn":"geBtn"};M=!0;A=document.createElement("div");A.style.whiteSpace="nowrap";A.style.height="30px";G.appendChild(A);B=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){za.style.display="";fa.style.display="";Z.style.left="160px";n(0);Z.scrollTop=0;Z.innerHTML="";J=0;V!=Na&&(Na=V,Da=U,Qa=X,za.innerHTML="",z(),V=null)});
-O.push(B);A.appendChild(B);var E=function(ea){za.style.display="none";fa.style.display="none";Z.style.left="30px";n(ea?-1:1);null==V&&(V=Na);Z.scrollTop=0;Z.innerHTML="";R.spin(Z);var ra=function(xa,va,qa){J=0;R.stop();Na=xa;qa=qa||{};var ta=0,ja;for(ja in qa)ta+=qa[ja].length;if(va)Z.innerHTML=va;else if(0==xa.length&&0==ta)Z.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Z.innerHTML="",0<ta){za.style.display="";Z.style.left="160px";za.innerHTML="";
-Qa=0;Da={"draw.io":xa};for(ja in qa)Da[ja]=qa[ja];z()}else N(!0)};ea?p(I.value,ra):m(ra)};m&&(B=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){E()}),A.appendChild(B),O.push(B));if(p){B=document.createElement("span");B.style.marginLeft="10px";B.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");A.appendChild(B);var I=document.createElement("input");I.style.marginRight="10px";I.style.marginLeft="10px";I.style.width="220px";mxEvent.addListener(I,"keypress",function(ea){13==
-ea.keyCode&&E(!0)});A.appendChild(I);B=mxUtils.button(mxResources.get("search"),function(){E(!0)});B.className="geBtn";A.appendChild(B)}n(0)}var S=null,Q=null,P=null,T=null,Y=null,ca=null,ia=null,Z=document.createElement("div");Z.style.border="1px solid #d3d3d3";Z.style.position="absolute";Z.style.left="160px";Z.style.right="34px";A=(l?72:40)+(M?30:0);Z.style.top=A+"px";Z.style.bottom="68px";Z.style.margin="6px 0 0 -1px";Z.style.padding="6px";Z.style.overflow="auto";var fa=document.createElement("div");
-fa.style.cssText="position:absolute;left:30px;width:128px;top:"+A+"px;height:22px;margin-top: 6px;white-space: nowrap";var aa=document.createElement("input");aa.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";aa.setAttribute("placeholder",mxResources.get("search"));aa.setAttribute("type","text");fa.appendChild(aa);var wa=document.createElement("img"),la="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";wa.setAttribute("src",
-la);wa.setAttribute("title",mxResources.get("search"));wa.style.position="relative";wa.style.left="-18px";wa.style.top="1px";wa.style.background="url('"+b.editor.transparentImage+"')";fa.appendChild(wa);mxEvent.addListener(wa,"click",function(){wa.getAttribute("src")==Dialog.prototype.closeImage&&(wa.setAttribute("src",la),wa.setAttribute("title",mxResources.get("search")),aa.value="",null!=Ca&&(Ca.click(),Ca=null));aa.focus()});mxEvent.addListener(aa,"keydown",mxUtils.bind(this,function(ea){if(13==
-ea.keyCode){var ra=aa.value;if(""==ra)null!=Ca&&(Ca.click(),Ca=null);else{if(null==NewDialog.tagsList[k]){var xa={};for(na in Da)for(var va=Da[na],qa=0;qa<va.length;qa++){var ta=va[qa];if(null!=ta.tags)for(var ja=ta.tags.toLowerCase().split(";"),oa=0;oa<ja.length;oa++)null==xa[ja[oa]]&&(xa[ja[oa]]=[]),xa[ja[oa]].push(ta)}NewDialog.tagsList[k]=xa}var ba=ra.toLowerCase().split(" ");xa=NewDialog.tagsList[k];if(0<Qa&&null==xa.__tagsList__){for(na in Ka)for(va=Ka[na],qa=0;qa<va.length;qa++)for(ta=va[qa],
-ja=ta.title.split(" "),ja.push(na),oa=0;oa<ja.length;oa++){var da=ja[oa].toLowerCase();null==xa[da]&&(xa[da]=[]);xa[da].push(ta)}xa.__tagsList__=!0}var na=[];va={};for(qa=ja=0;qa<ba.length;qa++)if(0<ba[qa].length){da=xa[ba[qa]];var ka={};na=[];if(null!=da)for(oa=0;oa<da.length;oa++)ta=da[oa],0==ja==(null==va[ta.url])&&(ka[ta.url]=!0,na.push(ta));va=ka;ja++}Z.scrollTop=0;Z.innerHTML="";J=0;xa=document.createElement("div");xa.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";
-mxUtils.write(xa,mxResources.get(0==na.length?"noResultsFor":"resultsFor",[ra]));Z.appendChild(xa);null!=Ea&&null==Ca&&(Ea.style.backgroundColor="",Ca=Ea,Ea=xa);Na=na;V=null;N(!1)}mxEvent.consume(ea)}}));mxEvent.addListener(aa,"keyup",mxUtils.bind(this,function(ea){""==aa.value?(wa.setAttribute("src",la),wa.setAttribute("title",mxResources.get("search"))):(wa.setAttribute("src",Dialog.prototype.closeImage),wa.setAttribute("title",mxResources.get("reset")))}));A+=23;var za=document.createElement("div");
-za.style.cssText="position:absolute;left:30px;width:128px;top:"+A+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(Z,"scroll",function(){b.sidebar.hideTooltip()});var Ba=140,ua=140,Da={},Fa={},Ka={},Qa=0,Ia=!0,Ea=null,Ca=null;Da.basic=[{title:"blankDiagram",select:!0}];var Na=Da.basic;if(!f){var Aa=function(){mxUtils.get(pa,function(ea){if(!ya){ya=!0;ea=ea.getXml().documentElement.firstChild;for(var ra={};null!=ea;){if("undefined"!==typeof ea.getAttribute)if("clibs"==
-ea.nodeName){for(var xa=ea.getAttribute("name"),va=ea.getElementsByTagName("add"),qa=[],ta=0;ta<va.length;ta++)qa.push(encodeURIComponent(mxUtils.getTextContent(va[ta])));null!=xa&&0<qa.length&&(ra[xa]=qa.join(";"))}else if(qa=ea.getAttribute("url"),null!=qa){va=ea.getAttribute("section");xa=ea.getAttribute("subsection");if(null==va&&(ta=qa.indexOf("/"),va=qa.substring(0,ta),null==xa)){var ja=qa.indexOf("/",ta+1);-1<ja&&(xa=qa.substring(ta+1,ja))}ta=Da[va];null==ta&&(ta=[],Da[va]=ta);qa=ea.getAttribute("clibs");
-null!=ra[qa]&&(qa=ra[qa]);qa={url:ea.getAttribute("url"),libs:ea.getAttribute("libs"),title:ea.getAttribute("title"),tooltip:ea.getAttribute("name")||ea.getAttribute("url"),preview:ea.getAttribute("preview"),clibs:qa,tags:ea.getAttribute("tags")};ta.push(qa);null!=xa&&(ta=Fa[va],null==ta&&(ta={},Fa[va]=ta),va=ta[xa],null==va&&(va=[],ta[xa]=va),va.push(qa))}ea=ea.nextSibling}R.stop();z()}})};G.appendChild(fa);G.appendChild(za);G.appendChild(Z);var ya=!1,pa=k;/^https?:\/\//.test(pa)&&!b.editor.isCorsEnabledForUrl(pa)&&
-(pa=PROXY_URL+"?url="+encodeURIComponent(pa));R.spin(Z);null!=y?y(function(ea,ra){Ka=ea;X=Qa=ra;Aa()},Aa):Aa();U=Da}mxEvent.addListener(F,"keypress",function(ea){b.dialog.container.firstChild==G&&13==ea.keyCode&&K()});y=document.createElement("div");y.style.marginTop=f?"4px":"16px";y.style.textAlign="right";y.style.position="absolute";y.style.left="40px";y.style.bottom="24px";y.style.right="40px";f||b.isOffline()||!l||null!=d||t||(A=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
-A.className="geBtn",y.appendChild(A));A=mxUtils.button(mxResources.get("cancel"),function(){null!=u&&u();b.hideDialog(!0)});A.className="geBtn";!b.editor.cancelFirst||t&&null==u||y.appendChild(A);f||"1"==urlParams.embed||t||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ea=new FilenameDialog(b,"",mxResources.get("create"),function(ra){null!=ra&&0<ra.length&&(ra=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+
-encodeURIComponent(F.value)+"&create="+encodeURIComponent(ra)),null==b.getCurrentFile()?window.location.href=ra:window.openWindow(ra))},mxResources.get("url"));b.showDialog(ea.container,300,80,!0,!0);ea.init()}),f.className="geBtn",y.appendChild(f));Graph.fileSupport&&x&&(x=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ea=document.createElement("input");ea.setAttribute("multiple","multiple");ea.setAttribute("type","file");mxEvent.addListener(ea,"change",function(ra){b.openFiles(ea.files,
-!0);ea.value=""});ea.style.display="none";document.body.appendChild(ea);b.newDlgFileInputElt=ea}b.newDlgFileInputElt.click()}),x.className="geBtn",y.appendChild(x));y.appendChild(W);b.editor.cancelFirst||null!=d||t&&null==u||y.appendChild(A);G.appendChild(y);this.container=G};NewDialog.tagsList={};
-var CreateDialog=function(b,f,l,d,t,u,D,c,e,g,k,m,p,v,x,A,y){function L(M,H,F,J){function R(){mxEvent.addListener(W,"click",function(){var n=F;if(D){var E=q.value,I=E.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>I){n=null!=n?n:G.value;var S="";n==App.MODE_GOOGLE?S=b.drive.extension:n==App.MODE_GITHUB?S=b.gitHub.extension:n==App.MODE_GITLAB?S=b.gitLab.extension:n==App.MODE_TRELLO?S=b.trello.extension:n==App.MODE_DROPBOX?S=b.dropbox.extension:n==App.MODE_ONEDRIVE?S=b.oneDrive.extension:n==App.MODE_DEVICE&&
-(S=".drawio");0<=I&&(E=E.substring(0,I));q.value=E+S}}N(F)})}var W=document.createElement("a");W.style.overflow="hidden";var O=document.createElement("img");O.src=M;O.setAttribute("border","0");O.setAttribute("align","absmiddle");O.style.width="60px";O.style.height="60px";O.style.paddingBottom="6px";W.style.display="inline-block";W.className="geBaseButton";W.style.position="relative";W.style.margin="4px";W.style.padding="8px 8px 10px 8px";W.style.whiteSpace="nowrap";W.appendChild(O);W.style.color=
-"gray";W.style.fontSize="11px";var V=document.createElement("div");W.appendChild(V);mxUtils.write(V,H);if(null!=J&&null==b[J]){O.style.visibility="hidden";mxUtils.setOpacity(V,10);var U=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});U.spin(W);var X=window.setTimeout(function(){null==b[J]&&(U.stop(),W.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[J]&&(window.clearTimeout(X),
-mxUtils.setOpacity(V,100),O.style.visibility="",U.stop(),R())}))}else R();z.appendChild(W);++B==m&&(mxUtils.br(z),B=0)}function N(M){var H=q.value;if(null==M||null!=H&&0<H.length)y&&b.hideDialog(),l(H,M,q)}k="1"==urlParams.noDevice?!1:k;D=null!=D?D:!0;c=null!=c?c:!0;m=null!=m?m:4;y=null!=y?y:!0;u=document.createElement("div");u.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(u);var K=document.createElement("h2");mxUtils.write(K,t||mxResources.get("create"));K.style.marginTop="0px";K.style.marginBottom=
-"24px";u.appendChild(K);mxUtils.write(u,mxResources.get("filename")+":");var q=document.createElement("input");q.setAttribute("value",f);q.style.width="200px";q.style.marginLeft="10px";q.style.marginBottom="20px";q.style.maxWidth="70%";this.init=function(){q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};u.appendChild(q);null!=A&&(null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,q,b.editor.diagramFileTypes),
-t.style.marginLeft="6px",t.style.width="90px",u.appendChild(t)),u.appendChild(FilenameDialog.createTypeHint(b,q,A)));A=null;if("1"!=urlParams.noDevice&&null!=p&&null!=v&&"image/"==v.substring(0,6)&&("image/svg"!=v.substring(0,9)||mxClient.IS_SVG)){q.style.width="160px";t=document.createElement("img");var C=x?p:btoa(unescape(encodeURIComponent(p)));t.setAttribute("src","data:"+v+";base64,"+C);t.style.position="absolute";t.style.top="70px";t.style.right="100px";t.style.maxWidth="120px";t.style.maxHeight=
-"80px";mxUtils.setPrefixedStyle(t.style,"transform","translate(50%,-50%)");u.appendChild(t);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=v||(A=mxUtils.button(mxResources.get("copy"),function(M){M=b.base64ToBlob(C,"image/png");M=new ClipboardItem({"image/png":M,"text/html":new Blob(['<img src="data:'+v+";base64,"+C+'">'],{type:"text/html"})});navigator.clipboard.write([M]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(H){b.handleError(H)}))}),
-A.style.marginTop="6px",A.className="geBtn");e&&Editor.popupsAllowed&&(t.style.cursor="pointer",mxEvent.addGestureListeners(t,null,null,function(M){mxEvent.isPopupTrigger(M)||N("_blank")}))}mxUtils.br(u);var z=document.createElement("div");z.style.textAlign="center";var B=0;z.style.marginTop="6px";u.appendChild(z);var G=document.createElement("select");G.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(p=document.createElement("option"),p.setAttribute("value",
+"6px",L.style.width=f||B?"80px":"180px",M.appendChild(L)),null!=b.editor.fileExtensions&&(B=FilenameDialog.createTypeHint(b,F,b.editor.fileExtensions),B.style.marginTop="12px",M.appendChild(B))));M=!1;var J=0,R=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),W=mxUtils.button(z||mxResources.get("create"),function(){W.setAttribute("disabled","disabled");K();W.removeAttribute("disabled")});W.className="geBtn gePrimaryBtn";
+if(m||p){var O=[],V=null,U=null,Y=null,n=function(ea){W.setAttribute("disabled","disabled");for(var ta=0;ta<O.length;ta++)O[ta].className=ta==ea?"geBtn gePrimaryBtn":"geBtn"};M=!0;z=document.createElement("div");z.style.whiteSpace="nowrap";z.style.height="30px";G.appendChild(z);B=mxUtils.button(mxResources.get("Templates",null,"Templates"),function(){ya.style.display="";ka.style.display="";Z.style.left="160px";n(0);Z.scrollTop=0;Z.innerHTML="";J=0;V!=Pa&&(Pa=V,sa=U,Ma=Y,ya.innerHTML="",A(),V=null)});
+O.push(B);z.appendChild(B);var D=function(ea){ya.style.display="none";ka.style.display="none";Z.style.left="30px";n(ea?-1:1);null==V&&(V=Pa);Z.scrollTop=0;Z.innerHTML="";R.spin(Z);var ta=function(xa,wa,ua){J=0;R.stop();Pa=xa;ua=ua||{};var va=0,ha;for(ha in ua)va+=ua[ha].length;if(wa)Z.innerHTML=wa;else if(0==xa.length&&0==va)Z.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams",null,"No Diagrams Found"));else if(Z.innerHTML="",0<va){ya.style.display="";Z.style.left="160px";ya.innerHTML="";
+Ma=0;sa={"draw.io":xa};for(ha in ua)sa[ha]=ua[ha];A()}else N(!0)};ea?p(I.value,ta):m(ta)};m&&(B=mxUtils.button(mxResources.get("Recent",null,"Recent"),function(){D()}),z.appendChild(B),O.push(B));if(p){B=document.createElement("span");B.style.marginLeft="10px";B.innerHTML=mxUtils.htmlEntities(mxResources.get("search")+":");z.appendChild(B);var I=document.createElement("input");I.style.marginRight="10px";I.style.marginLeft="10px";I.style.width="220px";mxEvent.addListener(I,"keypress",function(ea){13==
+ea.keyCode&&D(!0)});z.appendChild(I);B=mxUtils.button(mxResources.get("search"),function(){D(!0)});B.className="geBtn";z.appendChild(B)}n(0)}var S=null,Q=null,P=null,T=null,X=null,ba=null,ja=null,Z=document.createElement("div");Z.style.border="1px solid #d3d3d3";Z.style.position="absolute";Z.style.left="160px";Z.style.right="34px";z=(l?72:40)+(M?30:0);Z.style.top=z+"px";Z.style.bottom="68px";Z.style.margin="6px 0 0 -1px";Z.style.padding="6px";Z.style.overflow="auto";var ka=document.createElement("div");
+ka.style.cssText="position:absolute;left:30px;width:128px;top:"+z+"px;height:22px;margin-top: 6px;white-space: nowrap";var da=document.createElement("input");da.style.cssText="width:105px;height:16px;border:1px solid #d3d3d3;padding: 3px 20px 3px 3px;font-size: 12px";da.setAttribute("placeholder",mxResources.get("search"));da.setAttribute("type","text");ka.appendChild(da);var fa=document.createElement("img"),ma="undefined"!=typeof Sidebar?Sidebar.prototype.searchImage:IMAGE_PATH+"/search.png";fa.setAttribute("src",
+ma);fa.setAttribute("title",mxResources.get("search"));fa.style.position="relative";fa.style.left="-18px";fa.style.top="1px";fa.style.background="url('"+b.editor.transparentImage+"')";ka.appendChild(fa);mxEvent.addListener(fa,"click",function(){fa.getAttribute("src")==Dialog.prototype.closeImage&&(fa.setAttribute("src",ma),fa.setAttribute("title",mxResources.get("search")),da.value="",null!=Fa&&(Fa.click(),Fa=null));da.focus()});mxEvent.addListener(da,"keydown",mxUtils.bind(this,function(ea){if(13==
+ea.keyCode){var ta=da.value;if(""==ta)null!=Fa&&(Fa.click(),Fa=null);else{if(null==NewDialog.tagsList[k]){var xa={};for(na in sa)for(var wa=sa[na],ua=0;ua<wa.length;ua++){var va=wa[ua];if(null!=va.tags)for(var ha=va.tags.toLowerCase().split(";"),qa=0;qa<ha.length;qa++)null==xa[ha[qa]]&&(xa[ha[qa]]=[]),xa[ha[qa]].push(va)}NewDialog.tagsList[k]=xa}var aa=ta.toLowerCase().split(" ");xa=NewDialog.tagsList[k];if(0<Ma&&null==xa.__tagsList__){for(na in Ka)for(wa=Ka[na],ua=0;ua<wa.length;ua++)for(va=wa[ua],
+ha=va.title.split(" "),ha.push(na),qa=0;qa<ha.length;qa++){var ca=ha[qa].toLowerCase();null==xa[ca]&&(xa[ca]=[]);xa[ca].push(va)}xa.__tagsList__=!0}var na=[];wa={};for(ua=ha=0;ua<aa.length;ua++)if(0<aa[ua].length){ca=xa[aa[ua]];var la={};na=[];if(null!=ca)for(qa=0;qa<ca.length;qa++)va=ca[qa],0==ha==(null==wa[va.url])&&(la[va.url]=!0,na.push(va));wa=la;ha++}Z.scrollTop=0;Z.innerHTML="";J=0;xa=document.createElement("div");xa.style.cssText="border: 1px solid #D3D3D3; padding: 6px; background: #F5F5F5;";
+mxUtils.write(xa,mxResources.get(0==na.length?"noResultsFor":"resultsFor",[ta]));Z.appendChild(xa);null!=Ea&&null==Fa&&(Ea.style.backgroundColor="",Fa=Ea,Ea=xa);Pa=na;V=null;N(!1)}mxEvent.consume(ea)}}));mxEvent.addListener(da,"keyup",mxUtils.bind(this,function(ea){""==da.value?(fa.setAttribute("src",ma),fa.setAttribute("title",mxResources.get("search"))):(fa.setAttribute("src",Dialog.prototype.closeImage),fa.setAttribute("title",mxResources.get("reset")))}));z+=23;var ya=document.createElement("div");
+ya.style.cssText="position:absolute;left:30px;width:128px;top:"+z+"px;bottom:68px;margin-top:6px;overflow:auto;border:1px solid #d3d3d3;";mxEvent.addListener(Z,"scroll",function(){b.sidebar.hideTooltip()});var Ba=140,Ha=140,sa={},Ga={},Ka={},Ma=0,Ia=!0,Ea=null,Fa=null;sa.basic=[{title:"blankDiagram",select:!0}];var Pa=sa.basic;if(!f){var Aa=function(){mxUtils.get(pa,function(ea){if(!za){za=!0;ea=ea.getXml().documentElement.firstChild;for(var ta={};null!=ea;){if("undefined"!==typeof ea.getAttribute)if("clibs"==
+ea.nodeName){for(var xa=ea.getAttribute("name"),wa=ea.getElementsByTagName("add"),ua=[],va=0;va<wa.length;va++)ua.push(encodeURIComponent(mxUtils.getTextContent(wa[va])));null!=xa&&0<ua.length&&(ta[xa]=ua.join(";"))}else if(ua=ea.getAttribute("url"),null!=ua){wa=ea.getAttribute("section");xa=ea.getAttribute("subsection");if(null==wa&&(va=ua.indexOf("/"),wa=ua.substring(0,va),null==xa)){var ha=ua.indexOf("/",va+1);-1<ha&&(xa=ua.substring(va+1,ha))}va=sa[wa];null==va&&(va=[],sa[wa]=va);ua=ea.getAttribute("clibs");
+null!=ta[ua]&&(ua=ta[ua]);ua={url:ea.getAttribute("url"),libs:ea.getAttribute("libs"),title:ea.getAttribute("title"),tooltip:ea.getAttribute("name")||ea.getAttribute("url"),preview:ea.getAttribute("preview"),clibs:ua,tags:ea.getAttribute("tags")};va.push(ua);null!=xa&&(va=Ga[wa],null==va&&(va={},Ga[wa]=va),wa=va[xa],null==wa&&(wa=[],va[xa]=wa),wa.push(ua))}ea=ea.nextSibling}R.stop();A()}})};G.appendChild(ka);G.appendChild(ya);G.appendChild(Z);var za=!1,pa=k;/^https?:\/\//.test(pa)&&!b.editor.isCorsEnabledForUrl(pa)&&
+(pa=PROXY_URL+"?url="+encodeURIComponent(pa));R.spin(Z);null!=y?y(function(ea,ta){Ka=ea;Y=Ma=ta;Aa()},Aa):Aa();U=sa}mxEvent.addListener(F,"keypress",function(ea){b.dialog.container.firstChild==G&&13==ea.keyCode&&K()});y=document.createElement("div");y.style.marginTop=f?"4px":"16px";y.style.textAlign="right";y.style.position="absolute";y.style.left="40px";y.style.bottom="24px";y.style.right="40px";f||b.isOffline()||!l||null!=d||t||(z=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://support.draw.io/display/DO/Creating+and+Opening+Files")}),
+z.className="geBtn",y.appendChild(z));z=mxUtils.button(mxResources.get("cancel"),function(){null!=u&&u();b.hideDialog(!0)});z.className="geBtn";!b.editor.cancelFirst||t&&null==u||y.appendChild(z);f||"1"==urlParams.embed||t||mxClient.IS_ANDROID||mxClient.IS_IOS||"1"==urlParams.noDevice||(f=mxUtils.button(mxResources.get("fromTemplateUrl"),function(){var ea=new FilenameDialog(b,"",mxResources.get("create"),function(ta){null!=ta&&0<ta.length&&(ta=b.getUrl(window.location.pathname+"?mode="+b.mode+"&title="+
+encodeURIComponent(F.value)+"&create="+encodeURIComponent(ta)),null==b.getCurrentFile()?window.location.href=ta:window.openWindow(ta))},mxResources.get("url"));b.showDialog(ea.container,300,80,!0,!0);ea.init()}),f.className="geBtn",y.appendChild(f));Graph.fileSupport&&x&&(x=mxUtils.button(mxResources.get("import"),function(){if(null==b.newDlgFileInputElt){var ea=document.createElement("input");ea.setAttribute("multiple","multiple");ea.setAttribute("type","file");mxEvent.addListener(ea,"change",function(ta){b.openFiles(ea.files,
+!0);ea.value=""});ea.style.display="none";document.body.appendChild(ea);b.newDlgFileInputElt=ea}b.newDlgFileInputElt.click()}),x.className="geBtn",y.appendChild(x));y.appendChild(W);b.editor.cancelFirst||null!=d||t&&null==u||y.appendChild(z);G.appendChild(y);this.container=G};NewDialog.tagsList={};
+var CreateDialog=function(b,f,l,d,t,u,E,c,e,g,k,m,p,v,x,z,y){function L(M,H,F,J){function R(){mxEvent.addListener(W,"click",function(){var n=F;if(E){var D=q.value,I=D.lastIndexOf(".");if(0>f.lastIndexOf(".")&&0>I){n=null!=n?n:G.value;var S="";n==App.MODE_GOOGLE?S=b.drive.extension:n==App.MODE_GITHUB?S=b.gitHub.extension:n==App.MODE_GITLAB?S=b.gitLab.extension:n==App.MODE_TRELLO?S=b.trello.extension:n==App.MODE_DROPBOX?S=b.dropbox.extension:n==App.MODE_ONEDRIVE?S=b.oneDrive.extension:n==App.MODE_DEVICE&&
+(S=".drawio");0<=I&&(D=D.substring(0,I));q.value=D+S}}N(F)})}var W=document.createElement("a");W.style.overflow="hidden";var O=document.createElement("img");O.src=M;O.setAttribute("border","0");O.setAttribute("align","absmiddle");O.style.width="60px";O.style.height="60px";O.style.paddingBottom="6px";W.style.display="inline-block";W.className="geBaseButton";W.style.position="relative";W.style.margin="4px";W.style.padding="8px 8px 10px 8px";W.style.whiteSpace="nowrap";W.appendChild(O);W.style.color=
+"gray";W.style.fontSize="11px";var V=document.createElement("div");W.appendChild(V);mxUtils.write(V,H);if(null!=J&&null==b[J]){O.style.visibility="hidden";mxUtils.setOpacity(V,10);var U=new Spinner({lines:12,length:12,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9});U.spin(W);var Y=window.setTimeout(function(){null==b[J]&&(U.stop(),W.style.display="none")},3E4);b.addListener("clientLoaded",mxUtils.bind(this,function(){null!=b[J]&&(window.clearTimeout(Y),
+mxUtils.setOpacity(V,100),O.style.visibility="",U.stop(),R())}))}else R();A.appendChild(W);++B==m&&(mxUtils.br(A),B=0)}function N(M){var H=q.value;if(null==M||null!=H&&0<H.length)y&&b.hideDialog(),l(H,M,q)}k="1"==urlParams.noDevice?!1:k;E=null!=E?E:!0;c=null!=c?c:!0;m=null!=m?m:4;y=null!=y?y:!0;u=document.createElement("div");u.style.whiteSpace="nowrap";null==d&&b.addLanguageMenu(u);var K=document.createElement("h2");mxUtils.write(K,t||mxResources.get("create"));K.style.marginTop="0px";K.style.marginBottom=
+"24px";u.appendChild(K);mxUtils.write(u,mxResources.get("filename")+":");var q=document.createElement("input");q.setAttribute("value",f);q.style.width="200px";q.style.marginLeft="10px";q.style.marginBottom="20px";q.style.maxWidth="70%";this.init=function(){q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};u.appendChild(q);null!=z&&(null!=b.editor.diagramFileTypes&&(t=FilenameDialog.createFileTypes(b,q,b.editor.diagramFileTypes),
+t.style.marginLeft="6px",t.style.width="90px",u.appendChild(t)),u.appendChild(FilenameDialog.createTypeHint(b,q,z)));z=null;if("1"!=urlParams.noDevice&&null!=p&&null!=v&&"image/"==v.substring(0,6)&&("image/svg"!=v.substring(0,9)||mxClient.IS_SVG)){q.style.width="160px";t=document.createElement("img");var C=x?p:btoa(unescape(encodeURIComponent(p)));t.setAttribute("src","data:"+v+";base64,"+C);t.style.position="absolute";t.style.top="70px";t.style.right="100px";t.style.maxWidth="120px";t.style.maxHeight=
+"80px";mxUtils.setPrefixedStyle(t.style,"transform","translate(50%,-50%)");u.appendChild(t);mxClient.IS_FF||null==navigator.clipboard||"image/png"!=v||(z=mxUtils.button(mxResources.get("copy"),function(M){M=b.base64ToBlob(C,"image/png");M=new ClipboardItem({"image/png":M,"text/html":new Blob(['<img src="data:'+v+";base64,"+C+'">'],{type:"text/html"})});navigator.clipboard.write([M]).then(mxUtils.bind(this,function(){b.alert(mxResources.get("copiedToClipboard"))}))["catch"](mxUtils.bind(this,function(H){b.handleError(H)}))}),
+z.style.marginTop="6px",z.className="geBtn");e&&Editor.popupsAllowed&&(t.style.cursor="pointer",mxEvent.addGestureListeners(t,null,null,function(M){mxEvent.isPopupTrigger(M)||N("_blank")}))}mxUtils.br(u);var A=document.createElement("div");A.style.textAlign="center";var B=0;A.style.marginTop="6px";u.appendChild(A);var G=document.createElement("select");G.style.marginLeft="10px";b.isOfflineApp()||b.isOffline()||("function"===typeof window.DriveClient&&(p=document.createElement("option"),p.setAttribute("value",
App.MODE_GOOGLE),mxUtils.write(p,mxResources.get("googleDrive")),G.appendChild(p),L(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googleDrive"),App.MODE_GOOGLE,"drive")),"function"===typeof window.OneDriveClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_ONEDRIVE),mxUtils.write(p,mxResources.get("oneDrive")),G.appendChild(p),b.mode==App.MODE_ONEDRIVE&&p.setAttribute("selected","selected"),L(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),App.MODE_ONEDRIVE,
"oneDrive")),"function"===typeof window.DropboxClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_DROPBOX),mxUtils.write(p,mxResources.get("dropbox")),G.appendChild(p),b.mode==App.MODE_DROPBOX&&p.setAttribute("selected","selected"),L(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),App.MODE_DROPBOX,"dropbox")),null!=b.gitHub&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITHUB),mxUtils.write(p,mxResources.get("github")),G.appendChild(p),L(IMAGE_PATH+
"/github-logo.svg",mxResources.get("github"),App.MODE_GITHUB,"gitHub")),null!=b.gitLab&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_GITLAB),mxUtils.write(p,mxResources.get("gitlab")),G.appendChild(p),L(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),App.MODE_GITLAB,"gitLab")),"function"===typeof window.TrelloClient&&(p=document.createElement("option"),p.setAttribute("value",App.MODE_TRELLO),mxUtils.write(p,mxResources.get("trello")),G.appendChild(p),L(IMAGE_PATH+"/trello-logo.svg",
mxResources.get("trello"),App.MODE_TRELLO,"trello")));if(!Editor.useLocalStorage||"device"==urlParams.storage||null!=b.getCurrentFile()&&"1"!=urlParams.noDevice)p=document.createElement("option"),p.setAttribute("value",App.MODE_DEVICE),mxUtils.write(p,mxResources.get("device")),G.appendChild(p),b.mode!=App.MODE_DEVICE&&c||p.setAttribute("selected","selected"),k&&L(IMAGE_PATH+"/osa_drive-harddisk.png",mxResources.get("device"),App.MODE_DEVICE);c&&isLocalStorage&&"0"!=urlParams.browser&&(c=document.createElement("option"),
c.setAttribute("value",App.MODE_BROWSER),mxUtils.write(c,mxResources.get("browser")),G.appendChild(c),b.mode==App.MODE_BROWSER&&c.setAttribute("selected","selected"),L(IMAGE_PATH+"/osa_database.png",mxResources.get("browser"),App.MODE_BROWSER));c=document.createElement("div");c.style.marginTop="26px";c.style.textAlign="center";null!=g&&(k=mxUtils.button(mxResources.get("help"),function(){b.openLink(g)}),k.className="geBtn",c.appendChild(k));k=mxUtils.button(mxResources.get(null!=d?"close":"cancel"),
function(){null!=d?d():(b.fileLoaded(null),b.hideDialog(),window.close(),window.location.href=b.getUrl())});k.className="geBtn";b.editor.cancelFirst&&null==d&&c.appendChild(k);null==d&&(p=mxUtils.button(mxResources.get("decideLater"),function(){N(null)}),p.className="geBtn",c.appendChild(p));e&&Editor.popupsAllowed&&(e=mxUtils.button(mxResources.get("openInNewWindow"),function(){N("_blank")}),e.className="geBtn",c.appendChild(e));CreateDialog.showDownloadButton&&(e=mxUtils.button(mxResources.get("download"),
-function(){N("download")}),e.className="geBtn",c.appendChild(e),null!=A&&(e.style.marginTop="6px",c.style.marginTop="6px"));null!=A&&(mxUtils.br(c),c.appendChild(A));b.editor.cancelFirst&&null==d||c.appendChild(k);mxEvent.addListener(q,"keypress",function(M){13==M.keyCode?N(App.MODE_DEVICE):27==M.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});u.appendChild(c);this.container=u};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
-var PopupDialog=function(b,f,l,d,t){t=null!=t?t:!0;var u=document.createElement("div");u.style.textAlign="left";u.style.height="100%";mxUtils.write(u,mxResources.get("fileOpenLocation"));mxUtils.br(u);mxUtils.br(u);var D=mxUtils.button(mxResources.get("openInThisWindow"),function(){t&&b.hideDialog();null!=d&&d()});D.className="geBtn";D.style.marginBottom="8px";D.style.width="280px";u.appendChild(D);mxUtils.br(u);var c=mxUtils.button(mxResources.get("openInNewWindow"),function(){t&&b.hideDialog();
-null!=l&&l();b.openLink(f,null,!0)});c.className="geBtn gePrimaryBtn";c.style.width=D.style.width;u.appendChild(c);mxUtils.br(u);mxUtils.br(u);mxUtils.write(u,mxResources.get("allowPopups"));this.container=u},ImageDialog=function(b,f,l,d,t,u,D,c){function e(){0<m.value.length?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")}u=null!=u?u:!0;var g=b.editor.graph,k=document.createElement("div");mxUtils.write(k,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor=
+function(){N("download")}),e.className="geBtn",c.appendChild(e),null!=z&&(e.style.marginTop="6px",c.style.marginTop="6px"));null!=z&&(mxUtils.br(c),c.appendChild(z));b.editor.cancelFirst&&null==d||c.appendChild(k);mxEvent.addListener(q,"keypress",function(M){13==M.keyCode?N(App.MODE_DEVICE):27==M.keyCode&&(b.fileLoaded(null),b.hideDialog(),window.close())});u.appendChild(c);this.container=u};CreateDialog.showDownloadButton="1"!=urlParams.noDevice;
+var PopupDialog=function(b,f,l,d,t){t=null!=t?t:!0;var u=document.createElement("div");u.style.textAlign="left";u.style.height="100%";mxUtils.write(u,mxResources.get("fileOpenLocation"));mxUtils.br(u);mxUtils.br(u);var E=mxUtils.button(mxResources.get("openInThisWindow"),function(){t&&b.hideDialog();null!=d&&d()});E.className="geBtn";E.style.marginBottom="8px";E.style.width="280px";u.appendChild(E);mxUtils.br(u);var c=mxUtils.button(mxResources.get("openInNewWindow"),function(){t&&b.hideDialog();
+null!=l&&l();b.openLink(f,null,!0)});c.className="geBtn gePrimaryBtn";c.style.width=E.style.width;u.appendChild(c);mxUtils.br(u);mxUtils.br(u);mxUtils.write(u,mxResources.get("allowPopups"));this.container=u},ImageDialog=function(b,f,l,d,t,u,E,c){function e(){0<m.value.length?N.removeAttribute("disabled"):N.setAttribute("disabled","disabled")}u=null!=u?u:!0;var g=b.editor.graph,k=document.createElement("div");mxUtils.write(k,f);f=document.createElement("div");f.className="geTitle";f.style.backgroundColor=
"transparent";f.style.borderColor="transparent";f.style.whiteSpace="nowrap";f.style.textOverflow="clip";f.style.cursor="default";f.style.paddingRight="20px";var m=document.createElement("input");m.setAttribute("value",l);m.setAttribute("type","text");m.setAttribute("spellcheck","false");m.setAttribute("autocorrect","off");m.setAttribute("autocomplete","off");m.setAttribute("autocapitalize","off");m.style.marginTop="6px";m.style.width=(Graph.fileSupport?460:340)-20+"px";m.style.backgroundImage="url('"+
Dialog.prototype.clearImage+"')";m.style.backgroundRepeat="no-repeat";m.style.backgroundPosition="100% 50%";m.style.paddingRight="14px";l=document.createElement("div");l.setAttribute("title",mxResources.get("reset"));l.style.position="relative";l.style.left="-16px";l.style.width="12px";l.style.height="14px";l.style.cursor="pointer";l.style.display="inline-block";l.style.top="3px";l.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(l,"click",function(){m.value="";m.focus()});
-f.appendChild(m);f.appendChild(l);k.appendChild(f);var p=c,v,x,A=function(K,q,C,z){var B="data:"==K.substring(0,5);!b.isOffline()||B&&"undefined"===typeof chrome?0<K.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(K,function(G){b.spinner.stop();b.hideDialog();var M=!1===z?1:null!=q&&null!=C?Math.max(q/G.width,C/G.height):Math.min(1,Math.min(520/G.width,520/G.height));u&&(K=b.convertDataUri(K));d(K,Math.round(Number(G.width)*M),Math.round(Number(G.height)*M),p,v,x)},
-function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(K,null,null,p,v,x)):(K=b.convertDataUri(K),q=null==q?120:q,C=null==C?100:C,b.hideDialog(),d(K,q,C,p,v,x))},y=function(K,q){if(null!=K){var C=t?null:g.getModel().getGeometry(g.getSelectionCell());null!=C?A(K,C.width,C.height,q):A(K,null,null,q)}else b.hideDialog(),d(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder",
+f.appendChild(m);f.appendChild(l);k.appendChild(f);var p=c,v,x,z=function(K,q,C,A){var B="data:"==K.substring(0,5);!b.isOffline()||B&&"undefined"===typeof chrome?0<K.length&&b.spinner.spin(document.body,mxResources.get("inserting"))?b.loadImage(K,function(G){b.spinner.stop();b.hideDialog();var M=!1===A?1:null!=q&&null!=C?Math.max(q/G.width,C/G.height):Math.min(1,Math.min(520/G.width,520/G.height));u&&(K=b.convertDataUri(K));d(K,Math.round(Number(G.width)*M),Math.round(Number(G.height)*M),p,v,x)},
+function(){b.spinner.stop();d(null);b.showError(mxResources.get("error"),mxResources.get("fileNotFound"),mxResources.get("ok"))}):(b.hideDialog(),d(K,null,null,p,v,x)):(K=b.convertDataUri(K),q=null==q?120:q,C=null==C?100:C,b.hideDialog(),d(K,q,C,p,v,x))},y=function(K,q){if(null!=K){var C=t?null:g.getModel().getGeometry(g.getSelectionCell());null!=C?z(K,C.width,C.height,q):z(K,null,null,q)}else b.hideDialog(),d(null)};this.init=function(){m.focus();if(Graph.fileSupport){m.setAttribute("placeholder",
mxResources.get("dragImagesHere"));var K=k.parentNode,q=null;mxEvent.addListener(K,"dragleave",function(C){null!=q&&(q.parentNode.removeChild(q),q=null);C.stopPropagation();C.preventDefault()});mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(C){null==q&&(!mxClient.IS_IE||10<document.documentMode)&&(q=b.highlightElement(K));C.stopPropagation();C.preventDefault()}));mxEvent.addListener(K,"drop",mxUtils.bind(this,function(C){null!=q&&(q.parentNode.removeChild(q),q=null);if(0<C.dataTransfer.files.length)b.importFiles(C.dataTransfer.files,
-0,0,b.maxImageSize,function(B,G,M,H,F,J,R,W){y(B,W)},function(){},function(B){return"image/"==B.type.substring(0,6)},function(B){for(var G=0;G<B.length;G++)B[G]()},!mxEvent.isControlDown(C),null,null,!0);else if(0<=mxUtils.indexOf(C.dataTransfer.types,"text/uri-list")){var z=C.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(z)&&y(decodeURIComponent(z))}C.stopPropagation();C.preventDefault()}),!1)}};c=document.createElement("div");c.style.marginTop="14px";c.style.textAlign=
+0,0,b.maxImageSize,function(B,G,M,H,F,J,R,W){y(B,W)},function(){},function(B){return"image/"==B.type.substring(0,6)},function(B){for(var G=0;G<B.length;G++)B[G]()},!mxEvent.isControlDown(C),null,null,!0);else if(0<=mxUtils.indexOf(C.dataTransfer.types,"text/uri-list")){var A=C.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)($|\?)/i.test(A)&&y(decodeURIComponent(A))}C.stopPropagation();C.preventDefault()}),!1)}};c=document.createElement("div");c.style.marginTop="14px";c.style.textAlign=
"center";l=mxUtils.button(mxResources.get("cancel"),function(){b.spinner.stop();b.hideDialog()});l.className="geBtn";b.editor.cancelFirst&&c.appendChild(l);ImageDialog.filePicked=function(K){K.action==google.picker.Action.PICKED&&null!=K.docs[0].thumbnails&&(K=K.docs[0].thumbnails[K.docs[0].thumbnails.length-1],null!=K&&(m.value=K.url));m.focus()};if(Graph.fileSupport){if(null==b.imgDlgFileInputElt){var L=document.createElement("input");L.setAttribute("multiple","multiple");L.setAttribute("type",
-"file");mxEvent.addListener(L,"change",function(K){null!=L.files&&(b.importFiles(L.files,0,0,b.maxImageSize,function(q,C,z,B,G,M){y(q)},function(){},function(q){return"image/"==q.type.substring(0,6)},function(q){for(var C=0;C<q.length;C++)q[C]()},!0),L.type="",L.type="file",L.value="")});L.style.display="none";document.body.appendChild(L);b.imgDlgFileInputElt=L}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";c.appendChild(f)}mxEvent.addListener(m,
-"keypress",function(K){13==K.keyCode&&y(m.value)});var N=mxUtils.button(mxResources.get("crop"),function(){var K=new CropImageDialog(b,m.value,p,function(q,C,z){p=q;v=C;x=z});b.showDialog(K.container,300,390,!0,!0)});D&&(N.className="geBtn",c.appendChild(N));mxEvent.addListener(m,"change",function(K){p=null;e()});e();D=mxUtils.button(mxResources.get("apply"),function(){y(m.value)});D.className="geBtn gePrimaryBtn";c.appendChild(D);b.editor.cancelFirst||c.appendChild(l);Graph.fileSupport&&(c.style.marginTop=
-"120px",k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",k.style.backgroundPosition="center 65%",k.style.backgroundRepeat="no-repeat",D=document.createElement("div"),D.style.position="absolute",D.style.width="420px",D.style.top="58%",D.style.textAlign="center",D.style.fontSize="18px",D.style.color="#a0c3ff",mxUtils.write(D,mxResources.get("dragImagesHere")),k.appendChild(D));k.appendChild(c);this.container=k},LinkDialog=function(b,f,l,d,t,u,D){function c(K,q,C){C=mxUtils.button("",C);
+"file");mxEvent.addListener(L,"change",function(K){null!=L.files&&(b.importFiles(L.files,0,0,b.maxImageSize,function(q,C,A,B,G,M){y(q)},function(){},function(q){return"image/"==q.type.substring(0,6)},function(q){for(var C=0;C<q.length;C++)q[C]()},!0),L.type="",L.type="file",L.value="")});L.style.display="none";document.body.appendChild(L);b.imgDlgFileInputElt=L}f=mxUtils.button(mxResources.get("open"),function(){b.imgDlgFileInputElt.click()});f.className="geBtn";c.appendChild(f)}mxEvent.addListener(m,
+"keypress",function(K){13==K.keyCode&&y(m.value)});var N=mxUtils.button(mxResources.get("crop"),function(){var K=new CropImageDialog(b,m.value,p,function(q,C,A){p=q;v=C;x=A});b.showDialog(K.container,300,390,!0,!0)});E&&(N.className="geBtn",c.appendChild(N));mxEvent.addListener(m,"change",function(K){p=null;e()});e();E=mxUtils.button(mxResources.get("apply"),function(){y(m.value)});E.className="geBtn gePrimaryBtn";c.appendChild(E);b.editor.cancelFirst||c.appendChild(l);Graph.fileSupport&&(c.style.marginTop=
+"120px",k.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",k.style.backgroundPosition="center 65%",k.style.backgroundRepeat="no-repeat",E=document.createElement("div"),E.style.position="absolute",E.style.width="420px",E.style.top="58%",E.style.textAlign="center",E.style.fontSize="18px",E.style.color="#a0c3ff",mxUtils.write(E,mxResources.get("dragImagesHere")),k.appendChild(E));k.appendChild(c);this.container=k},LinkDialog=function(b,f,l,d,t,u,E){function c(K,q,C){C=mxUtils.button("",C);
C.className="geBtn";C.setAttribute("title",q);q=document.createElement("img");q.style.height="26px";q.style.width="26px";q.setAttribute("src",K);C.style.minWidth="42px";C.style.verticalAlign="middle";C.appendChild(q);N.appendChild(C)}var e=document.createElement("div");e.style.height="100%";mxUtils.write(e,mxResources.get("editLink")+":");var g=document.createElement("div");g.className="geTitle";g.style.backgroundColor="transparent";g.style.borderColor="transparent";g.style.whiteSpace="nowrap";g.style.textOverflow=
"clip";g.style.cursor="default";g.style.paddingRight="20px";var k=document.createElement("input");k.setAttribute("placeholder",mxResources.get("dragUrlsHere"));k.setAttribute("type","text");k.style.marginTop="6px";k.style.width="97%";k.style.boxSizing="border-box";k.style.backgroundImage="url('"+Dialog.prototype.clearImage+"')";k.style.backgroundRepeat="no-repeat";k.style.backgroundPosition="100% 50%";k.style.paddingRight="14px";k.style.marginBottom="4px";var m=document.createElement("div");m.setAttribute("title",
mxResources.get("reset"));m.style.position="relative";m.style.left="-16px";m.style.width="12px";m.style.height="14px";m.style.cursor="pointer";m.style.display="inline-block";m.style.top="3px";m.style.background="url('"+b.editor.transparentImage+"')";mxEvent.addListener(m,"click",function(){k.value="";k.focus()});var p=document.createElement("input");p.style.cssText="margin-right:8px;margin-bottom:8px;";p.setAttribute("value","url");p.setAttribute("type","radio");p.setAttribute("name","geLinkDialogOption");
-var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","url");v.setAttribute("type","radio");v.setAttribute("name","geLinkDialogOption");var x=document.createElement("select");x.style.width="520px";var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.margin="0 6p 0 6px";null!=D&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);D=null!=D?D:"_blank";A.setAttribute("title",D);u&&(k.style.width="340px");if(t&&
-null!=b.pages){null!=f&&Graph.isPageLink(f)?(v.setAttribute("checked","checked"),v.defaultChecked=!0):(k.setAttribute("value",f),p.setAttribute("checked","checked"),p.defaultChecked=!0);g.appendChild(p);g.appendChild(k);g.appendChild(m);u&&(g.appendChild(A),mxUtils.write(g,mxResources.get("openInNewWindow")));mxUtils.br(g);g.appendChild(v);t=!1;for(u=0;u<b.pages.length;u++)m=document.createElement("option"),mxUtils.write(m,b.pages[u].getName()||mxResources.get("pageWithNumber",[u+1])),m.setAttribute("value",
+var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","url");v.setAttribute("type","radio");v.setAttribute("name","geLinkDialogOption");var x=document.createElement("select");x.style.width="520px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.margin="0 6p 0 6px";null!=E&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);E=null!=E?E:"_blank";z.setAttribute("title",E);u&&(k.style.width="340px");if(t&&
+null!=b.pages){null!=f&&Graph.isPageLink(f)?(v.setAttribute("checked","checked"),v.defaultChecked=!0):(k.setAttribute("value",f),p.setAttribute("checked","checked"),p.defaultChecked=!0);g.appendChild(p);g.appendChild(k);g.appendChild(m);u&&(g.appendChild(z),mxUtils.write(g,mxResources.get("openInNewWindow")));mxUtils.br(g);g.appendChild(v);t=!1;for(u=0;u<b.pages.length;u++)m=document.createElement("option"),mxUtils.write(m,b.pages[u].getName()||mxResources.get("pageWithNumber",[u+1])),m.setAttribute("value",
"data:page/id,"+b.pages[u].getId()),f==m.getAttribute("value")&&(m.setAttribute("selected","selected"),t=!0),x.appendChild(m);if(!t&&v.checked){var y=document.createElement("option");mxUtils.write(y,mxResources.get("pageNotFound"));y.setAttribute("disabled","disabled");y.setAttribute("selected","selected");y.setAttribute("value","pageNotFound");x.appendChild(y);mxEvent.addListener(x,"change",function(){null==y.parentNode||y.selected||y.parentNode.removeChild(y)})}g.appendChild(x)}else k.setAttribute("value",
-f),g.appendChild(k),g.appendChild(m);e.appendChild(g);var L=mxUtils.button(l,function(){b.hideDialog();d(v.checked?"pageNotFound"!==x.value?x.value:f:k.value,LinkDialog.selectedDocs,A.checked?D:null)});L.style.verticalAlign="middle";L.className="geBtn gePrimaryBtn";this.init=function(){v.checked?x.focus():(k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(x,"focus",function(){p.removeAttribute("checked");v.setAttribute("checked",
+f),g.appendChild(k),g.appendChild(m);e.appendChild(g);var L=mxUtils.button(l,function(){b.hideDialog();d(v.checked?"pageNotFound"!==x.value?x.value:f:k.value,LinkDialog.selectedDocs,z.checked?E:null)});L.style.verticalAlign="middle";L.className="geBtn gePrimaryBtn";this.init=function(){v.checked?x.focus():(k.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null));mxEvent.addListener(x,"focus",function(){p.removeAttribute("checked");v.setAttribute("checked",
"checked");v.checked=!0});mxEvent.addListener(k,"focus",function(){v.removeAttribute("checked");p.setAttribute("checked","checked");p.checked=!0});if(Graph.fileSupport){var K=e.parentNode,q=null;mxEvent.addListener(K,"dragleave",function(C){null!=q&&(q.parentNode.removeChild(q),q=null);C.stopPropagation();C.preventDefault()});mxEvent.addListener(K,"dragover",mxUtils.bind(this,function(C){null==q&&(!mxClient.IS_IE||10<document.documentMode)&&(q=b.highlightElement(K));C.stopPropagation();C.preventDefault()}));
mxEvent.addListener(K,"drop",mxUtils.bind(this,function(C){null!=q&&(q.parentNode.removeChild(q),q=null);0<=mxUtils.indexOf(C.dataTransfer.types,"text/uri-list")&&(k.value=decodeURIComponent(C.dataTransfer.getData("text/uri-list")),p.setAttribute("checked","checked"),p.checked=!0,L.click());C.stopPropagation();C.preventDefault()}),!1)}};var N=document.createElement("div");N.style.marginTop="18px";N.style.textAlign="center";l=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/custom-links")});
l.style.verticalAlign="middle";l.className="geBtn";N.appendChild(l);b.isOffline()&&!mxClient.IS_CHROMEAPP&&(l.style.display="none");l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});l.style.verticalAlign="middle";l.className="geBtn";b.editor.cancelFirst&&N.appendChild(l);LinkDialog.selectedDocs=null;LinkDialog.filePicked=function(K){if(K.action==google.picker.Action.PICKED){LinkDialog.selectedDocs=K.docs;var q=K.docs[0].url;"application/mxe"==K.docs[0].mimeType||null!=K.docs[0].mimeType&&
"application/vnd.jgraph."==K.docs[0].mimeType.substring(0,23)?q="https://www.draw.io/#G"+K.docs[0].id:"application/vnd.google-apps.folder"==K.docs[0].mimeType&&(q="https://drive.google.com/#folders/"+K.docs[0].id);k.value=q;k.focus()}else LinkDialog.selectedDocs=null;k.focus()};"undefined"!=typeof google&&"undefined"!=typeof google.picker&&null!=b.drive&&c(IMAGE_PATH+"/google-drive-logo.svg",mxResources.get("googlePlus"),function(){b.spinner.spin(document.body,mxResources.get("authorizing"))&&b.drive.checkToken(mxUtils.bind(this,
function(){b.spinner.stop();if(null==b.linkPicker){var K=b.drive.createLinkPicker();b.linkPicker=K.setCallback(function(q){LinkDialog.filePicked(q)}).build()}b.linkPicker.setVisible(!0)}))});"undefined"!=typeof Dropbox&&"undefined"!=typeof Dropbox.choose&&c(IMAGE_PATH+"/dropbox-logo.svg",mxResources.get("dropbox"),function(){Dropbox.choose({linkType:"direct",cancel:function(){},success:function(K){k.value=K[0].link;k.focus()}})});null!=b.oneDrive&&c(IMAGE_PATH+"/onedrive-logo.svg",mxResources.get("oneDrive"),
-function(){b.oneDrive.pickFile(function(K,q){k.value=q.value[0].webUrl;k.focus()},!0)});null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(K){if(null!=K){K=K.split("/");var q=K[0],C=K[1],z=K[2];K=K.slice(3,K.length).join("/");k.value="https://github.com/"+q+"/"+C+"/blob/"+z+"/"+K;k.focus()}})});null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(K){if(null!=K){K=K.split("/");var q=
-K[0],C=K[1],z=K[2];K=K.slice(3,K.length).join("/");k.value=DRAWIO_GITLAB_URL+"/"+q+"/"+C+"/blob/"+z+"/"+K;k.focus()}})});mxEvent.addListener(k,"keypress",function(K){13==K.keyCode&&(b.hideDialog(),d(v.checked?x.value:k.value,LinkDialog.selectedDocs))});N.appendChild(L);b.editor.cancelFirst||N.appendChild(l);e.appendChild(N);this.container=e},FeedbackDialog=function(b,f,l,d){var t=document.createElement("div"),u=document.createElement("div");mxUtils.write(u,mxResources.get("sendYourFeedback"));u.style.fontSize=
-"18px";u.style.marginBottom="18px";t.appendChild(u);u=document.createElement("div");mxUtils.write(u,mxResources.get("yourEmailAddress")+(l?"":" ("+mxResources.get("required")+")"));t.appendChild(u);var D=document.createElement("input");D.setAttribute("type","text");D.style.marginTop="6px";D.style.width="600px";var c=mxUtils.button(mxResources.get("sendMessage"),function(){var m=k.value+(g.checked?"\nDiagram:\n"+(null!=d?d:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
-"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;m.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(D.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=f?f:"Feedback")+
-":\n"+m),function(p){b.spinner.stop();200<=p.getStatus()&&299>=p.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});c.className="geBtn gePrimaryBtn";if(!l){c.setAttribute("disabled","disabled");var e=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(D,
-"change",function(){0<D.value.length&&0<e.test(D.value)?c.removeAttribute("disabled"):c.setAttribute("disabled","disabled")});mxEvent.addListener(D,"keyup",function(){0<D.value.length&&e.test(D.value)?c.removeAttribute("disabled"):c.setAttribute("disabled","disabled")})}t.appendChild(D);this.init=function(){D.focus()};var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;l=document.createElement("p");l.style.marginTop="14px";
+function(){b.oneDrive.pickFile(function(K,q){k.value=q.value[0].webUrl;k.focus()},!0)});null!=b.gitHub&&c(IMAGE_PATH+"/github-logo.svg",mxResources.get("github"),function(){b.gitHub.pickFile(function(K){if(null!=K){K=K.split("/");var q=K[0],C=K[1],A=K[2];K=K.slice(3,K.length).join("/");k.value="https://github.com/"+q+"/"+C+"/blob/"+A+"/"+K;k.focus()}})});null!=b.gitLab&&c(IMAGE_PATH+"/gitlab-logo.svg",mxResources.get("gitlab"),function(){b.gitLab.pickFile(function(K){if(null!=K){K=K.split("/");var q=
+K[0],C=K[1],A=K[2];K=K.slice(3,K.length).join("/");k.value=DRAWIO_GITLAB_URL+"/"+q+"/"+C+"/blob/"+A+"/"+K;k.focus()}})});mxEvent.addListener(k,"keypress",function(K){13==K.keyCode&&(b.hideDialog(),d(v.checked?x.value:k.value,LinkDialog.selectedDocs))});N.appendChild(L);b.editor.cancelFirst||N.appendChild(l);e.appendChild(N);this.container=e},FeedbackDialog=function(b,f,l,d){var t=document.createElement("div"),u=document.createElement("div");mxUtils.write(u,mxResources.get("sendYourFeedback"));u.style.fontSize=
+"18px";u.style.marginBottom="18px";t.appendChild(u);u=document.createElement("div");mxUtils.write(u,mxResources.get("yourEmailAddress")+(l?"":" ("+mxResources.get("required")+")"));t.appendChild(u);var E=document.createElement("input");E.setAttribute("type","text");E.style.marginTop="6px";E.style.width="600px";var c=mxUtils.button(mxResources.get("sendMessage"),function(){var m=k.value+(g.checked?"\nDiagram:\n"+(null!=d?d:mxUtils.getXml(b.getXmlFileData())):"")+"\nuserAgent:\n"+navigator.userAgent+
+"\nappVersion:\n"+navigator.appVersion+"\nappName:\n"+navigator.appName+"\nplatform:\n"+navigator.platform;m.length>FeedbackDialog.maxAttachmentSize?b.alert(mxResources.get("drawingTooLarge")):(b.hideDialog(),b.spinner.spin(document.body)&&mxUtils.post(null!=FeedbackDialog.feedbackUrl?FeedbackDialog.feedbackUrl:"/email","email="+encodeURIComponent(E.value)+"&version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&body="+encodeURIComponent((null!=f?f:"Feedback")+
+":\n"+m),function(p){b.spinner.stop();200<=p.getStatus()&&299>=p.getStatus()?b.alert(mxResources.get("feedbackSent")):b.alert(mxResources.get("errorSendingFeedback"))},function(){b.spinner.stop();b.alert(mxResources.get("errorSendingFeedback"))}))});c.className="geBtn gePrimaryBtn";if(!l){c.setAttribute("disabled","disabled");var e=/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;mxEvent.addListener(E,
+"change",function(){0<E.value.length&&0<e.test(E.value)?c.removeAttribute("disabled"):c.setAttribute("disabled","disabled")});mxEvent.addListener(E,"keyup",function(){0<E.value.length&&e.test(E.value)?c.removeAttribute("disabled"):c.setAttribute("disabled","disabled")})}t.appendChild(E);this.init=function(){E.focus()};var g=document.createElement("input");g.setAttribute("type","checkbox");g.setAttribute("checked","checked");g.defaultChecked=!0;l=document.createElement("p");l.style.marginTop="14px";
l.appendChild(g);u=document.createElement("span");mxUtils.write(u," "+mxResources.get("includeCopyOfMyDiagram"));l.appendChild(u);mxEvent.addListener(u,"click",function(m){g.checked=!g.checked;mxEvent.consume(m)});t.appendChild(l);u=document.createElement("div");mxUtils.write(u,mxResources.get("feedback"));t.appendChild(u);var k=document.createElement("textarea");k.style.resize="none";k.style.width="600px";k.style.height="140px";k.style.marginTop="6px";k.setAttribute("placeholder",mxResources.get("comments"));
t.appendChild(k);l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right";u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";b.editor.cancelFirst?(l.appendChild(u),l.appendChild(c)):(l.appendChild(c),l.appendChild(u));t.appendChild(l);this.container=t};FeedbackDialog.maxAttachmentSize=1E6;
var RevisionDialog=function(b,f,l){var d=document.createElement("div"),t=document.createElement("h3");t.style.marginTop="0px";mxUtils.write(t,mxResources.get("revisionHistory"));d.appendChild(t);t=document.createElement("div");t.style.position="absolute";t.style.overflow="auto";t.style.width="170px";t.style.height="378px";d.appendChild(t);var u=document.createElement("div");u.style.position="absolute";u.style.border="1px solid lightGray";u.style.left="199px";u.style.width="470px";u.style.height="376px";
-u.style.overflow="hidden";var D=document.createElement("div");D.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";u.appendChild(D);mxEvent.disableContextMenu(u);d.appendChild(u);var c=new Graph(u);c.setTooltips(!1);c.setEnabled(!1);c.setPanning(!0);c.panningHandler.ignoreCell=!0;c.panningHandler.useLeftButtonForPanning=!0;c.minFitScale=null;c.maxFitScale=null;c.centerZoom=!0;var e=0,g=null,k=0,m=c.getGlobalVariable;
-c.getGlobalVariable=function(T){return"page"==T&&null!=g&&null!=g[k]?g[k].getAttribute("name"):"pagenumber"==T?k+1:"pagecount"==T?null!=g?g.length:1:m.apply(this,arguments)};c.getLinkForCell=function(){return null};Editor.MathJaxRender&&c.addListener(mxEvent.SIZE,mxUtils.bind(this,function(T,Y){b.editor.graph.mathEnabled&&Editor.MathJaxRender(c.container)}));var p={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,shadow:!1,
-hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},v=new Spinner(p),x=b.getCurrentFile(),A=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),y={};for(p=0;p<A.length;p++)y[A[p].getAttribute("id")]=A[p];var L=null,N=null,K=null,q=null,C=mxUtils.button("",function(){null!=K&&c.zoomIn()});C.className="geSprite geSprite-zoomin";C.setAttribute("title",mxResources.get("zoomIn"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled","disabled");
-mxUtils.setOpacity(C,20);var z=mxUtils.button("",function(){null!=K&&c.zoomOut()});z.className="geSprite geSprite-zoomout";z.setAttribute("title",mxResources.get("zoomOut"));z.style.outline="none";z.style.border="none";z.style.margin="2px";z.setAttribute("disabled","disabled");mxUtils.setOpacity(z,20);var B=mxUtils.button("",function(){null!=K&&(c.maxFitScale=8,c.fit(8),c.center())});B.className="geSprite geSprite-fit";B.setAttribute("title",mxResources.get("fit"));B.style.outline="none";B.style.border=
+u.style.overflow="hidden";var E=document.createElement("div");E.style.cssText="position:absolute;left:0;right:0;top:0;bottom:20px;text-align:center;transform:translate(0,50%);pointer-events:none;";u.appendChild(E);mxEvent.disableContextMenu(u);d.appendChild(u);var c=new Graph(u);c.setTooltips(!1);c.setEnabled(!1);c.setPanning(!0);c.panningHandler.ignoreCell=!0;c.panningHandler.useLeftButtonForPanning=!0;c.minFitScale=null;c.maxFitScale=null;c.centerZoom=!0;var e=0,g=null,k=0,m=c.getGlobalVariable;
+c.getGlobalVariable=function(T){return"page"==T&&null!=g&&null!=g[k]?g[k].getAttribute("name"):"pagenumber"==T?k+1:"pagecount"==T?null!=g?g.length:1:m.apply(this,arguments)};c.getLinkForCell=function(){return null};Editor.MathJaxRender&&c.addListener(mxEvent.SIZE,mxUtils.bind(this,function(T,X){b.editor.graph.mathEnabled&&Editor.MathJaxRender(c.container)}));var p={lines:11,length:15,width:6,radius:10,corners:1,rotate:0,direction:1,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.4,trail:60,shadow:!1,
+hwaccel:!1,className:"spinner",zIndex:2E9,top:"50%",left:"50%"},v=new Spinner(p),x=b.getCurrentFile(),z=b.getXmlFileData(!0,!1,!0).getElementsByTagName("diagram"),y={};for(p=0;p<z.length;p++)y[z[p].getAttribute("id")]=z[p];var L=null,N=null,K=null,q=null,C=mxUtils.button("",function(){null!=K&&c.zoomIn()});C.className="geSprite geSprite-zoomin";C.setAttribute("title",mxResources.get("zoomIn"));C.style.outline="none";C.style.border="none";C.style.margin="2px";C.setAttribute("disabled","disabled");
+mxUtils.setOpacity(C,20);var A=mxUtils.button("",function(){null!=K&&c.zoomOut()});A.className="geSprite geSprite-zoomout";A.setAttribute("title",mxResources.get("zoomOut"));A.style.outline="none";A.style.border="none";A.style.margin="2px";A.setAttribute("disabled","disabled");mxUtils.setOpacity(A,20);var B=mxUtils.button("",function(){null!=K&&(c.maxFitScale=8,c.fit(8),c.center())});B.className="geSprite geSprite-fit";B.setAttribute("title",mxResources.get("fit"));B.style.outline="none";B.style.border=
"none";B.style.margin="2px";B.setAttribute("disabled","disabled");mxUtils.setOpacity(B,20);var G=mxUtils.button("",function(){null!=K&&(c.zoomActual(),c.center())});G.className="geSprite geSprite-actualsize";G.setAttribute("title",mxResources.get("actualSize"));G.style.outline="none";G.style.border="none";G.style.margin="2px";G.setAttribute("disabled","disabled");mxUtils.setOpacity(G,20);var M=mxUtils.button("",function(){});M.className="geSprite geSprite-middle";M.setAttribute("title",mxResources.get("compare"));
-M.style.outline="none";M.style.border="none";M.style.margin="2px";mxUtils.setOpacity(M,60);var H=u.cloneNode(!1);H.style.pointerEvent="none";u.parentNode.appendChild(H);var F=new Graph(H);F.setTooltips(!1);F.setEnabled(!1);F.setPanning(!0);F.panningHandler.ignoreCell=!0;F.panningHandler.useLeftButtonForPanning=!0;F.minFitScale=null;F.maxFitScale=null;F.centerZoom=!0;mxEvent.addGestureListeners(M,function(T){T=y[g[e].getAttribute("id")];mxUtils.setOpacity(M,20);D.innerHTML="";null==T?mxUtils.write(D,
-mxResources.get("pageNotFound")):(J.style.display="none",u.style.display="none",H.style.display="",H.style.backgroundColor=u.style.backgroundColor,T=Editor.parseDiagramNode(T),(new mxCodec(T.ownerDocument)).decode(T,F.getModel()),F.view.scaleAndTranslate(c.view.scale,c.view.translate.x,c.view.translate.y))},null,function(){mxUtils.setOpacity(M,60);D.innerHTML="";"none"==u.style.display&&(J.style.display="",u.style.display="",H.style.display="none")});var J=document.createElement("div");J.style.position=
-"absolute";J.style.textAlign="right";J.style.color="gray";J.style.marginTop="10px";J.style.backgroundColor="transparent";J.style.top="440px";J.style.right="32px";J.style.maxWidth="380px";J.style.cursor="default";var R=mxUtils.button(mxResources.get("download"),function(){if(null!=K){var T=mxUtils.getXml(K.documentElement),Y=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(T,Y,"text/xml"):(T="undefined"===typeof pako?"&xml="+encodeURIComponent(T):"&data="+encodeURIComponent(Graph.compress(T)),
-(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(Y)+"&format=xml"+T)).simulate(document,"_blank"))}});R.className="geBtn";R.setAttribute("disabled","disabled");var W=mxUtils.button(mxResources.get("restore"),function(T){null!=K&&null!=q&&(mxEvent.isShiftDown(T)?null!=K&&(T=b.getPagesForNode(K.documentElement),T=b.diffPages(b.pages,T),T=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(T,null,2),function(Y){if(0<Y.length)try{b.confirm(mxResources.get("areYouSure"),function(){x.patch([JSON.parse(Y)],
-null,!0);b.hideDialog();b.hideDialog()})}catch(ca){b.handleError(ca)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(T.container,620,460,!0,!0),T.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=l?l(q):b.spinner.spin(document.body,mxResources.get("restoring"))&&x.save(!0,function(Y){b.spinner.stop();b.replaceFileData(q);b.hideDialog()},function(Y){b.spinner.stop();b.editor.setStatus("");b.handleError(Y,null!=Y?mxResources.get("errorSavingFile"):null)})}))});
+M.style.outline="none";M.style.border="none";M.style.margin="2px";mxUtils.setOpacity(M,60);var H=u.cloneNode(!1);H.style.pointerEvent="none";u.parentNode.appendChild(H);var F=new Graph(H);F.setTooltips(!1);F.setEnabled(!1);F.setPanning(!0);F.panningHandler.ignoreCell=!0;F.panningHandler.useLeftButtonForPanning=!0;F.minFitScale=null;F.maxFitScale=null;F.centerZoom=!0;mxEvent.addGestureListeners(M,function(T){T=y[g[e].getAttribute("id")];mxUtils.setOpacity(M,20);E.innerHTML="";null==T?mxUtils.write(E,
+mxResources.get("pageNotFound")):(J.style.display="none",u.style.display="none",H.style.display="",H.style.backgroundColor=u.style.backgroundColor,T=Editor.parseDiagramNode(T),(new mxCodec(T.ownerDocument)).decode(T,F.getModel()),F.view.scaleAndTranslate(c.view.scale,c.view.translate.x,c.view.translate.y))},null,function(){mxUtils.setOpacity(M,60);E.innerHTML="";"none"==u.style.display&&(J.style.display="",u.style.display="",H.style.display="none")});var J=document.createElement("div");J.style.position=
+"absolute";J.style.textAlign="right";J.style.color="gray";J.style.marginTop="10px";J.style.backgroundColor="transparent";J.style.top="440px";J.style.right="32px";J.style.maxWidth="380px";J.style.cursor="default";var R=mxUtils.button(mxResources.get("download"),function(){if(null!=K){var T=mxUtils.getXml(K.documentElement),X=b.getBaseFilename()+".drawio";b.isLocalFileSave()?b.saveLocalFile(T,X,"text/xml"):(T="undefined"===typeof pako?"&xml="+encodeURIComponent(T):"&data="+encodeURIComponent(Graph.compress(T)),
+(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(X)+"&format=xml"+T)).simulate(document,"_blank"))}});R.className="geBtn";R.setAttribute("disabled","disabled");var W=mxUtils.button(mxResources.get("restore"),function(T){null!=K&&null!=q&&(mxEvent.isShiftDown(T)?null!=K&&(T=b.getPagesForNode(K.documentElement),T=b.diffPages(b.pages,T),T=new TextareaDialog(b,mxResources.get("compare"),JSON.stringify(T,null,2),function(X){if(0<X.length)try{b.confirm(mxResources.get("areYouSure"),function(){x.patch([JSON.parse(X)],
+null,!0);b.hideDialog();b.hideDialog()})}catch(ba){b.handleError(ba)}},null,null,null,null,null,!0,null,mxResources.get("merge")),b.showDialog(T.container,620,460,!0,!0),T.init()):b.confirm(mxResources.get("areYouSure"),function(){null!=l?l(q):b.spinner.spin(document.body,mxResources.get("restoring"))&&x.save(!0,function(X){b.spinner.stop();b.replaceFileData(q);b.hideDialog()},function(X){b.spinner.stop();b.editor.setStatus("");b.handleError(X,null!=X?mxResources.get("errorSavingFile"):null)})}))});
W.className="geBtn";W.setAttribute("disabled","disabled");W.setAttribute("title","Shift+Click for Diff");var O=document.createElement("select");O.setAttribute("disabled","disabled");O.style.maxWidth="80px";O.style.position="relative";O.style.top="-2px";O.style.verticalAlign="bottom";O.style.marginRight="6px";O.style.display="none";var V=null;mxEvent.addListener(O,"change",function(T){null!=V&&(V(T),mxEvent.consume(T))});var U=mxUtils.button(mxResources.get("edit"),function(){null!=K&&(window.openFile=
-new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(K.documentElement)),b.openLink(b.getUrl(),null,!0))});U.className="geBtn";U.setAttribute("disabled","disabled");null!=l&&(U.style.display="none");var X=mxUtils.button(mxResources.get("show"),function(){null!=N&&b.openLink(N.getUrl(O.selectedIndex))});X.className="geBtn gePrimaryBtn";X.setAttribute("disabled","disabled");null!=l&&(X.style.display="none",W.className="geBtn gePrimaryBtn");A=document.createElement("div");
-A.style.position="absolute";A.style.top="482px";A.style.width="640px";A.style.textAlign="right";var n=document.createElement("div");n.className="geToolbarContainer";n.style.backgroundColor="transparent";n.style.padding="2px";n.style.border="none";n.style.left="199px";n.style.top="442px";var E=null;if(null!=f&&0<f.length){u.style.cursor="move";var I=document.createElement("table");I.style.border="1px solid lightGray";I.style.borderCollapse="collapse";I.style.borderSpacing="0px";I.style.width="100%";
-var S=document.createElement("tbody"),Q=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(e=mxUtils.indexOf(b.pages,b.currentPage));for(p=f.length-1;0<=p;p--){var P=function(T){var Y=new Date(T.modifiedDate),ca=null;if(0<=Y.getTime()){var ia=function(fa){v.stop();D.innerHTML="";var aa=mxUtils.parseXml(fa),wa=b.editor.extractGraphModel(aa.documentElement,!0);if(null!=wa){var la=function(Ba){null!=Ba&&(Ba=za(Editor.parseDiagramNode(Ba)));return Ba},za=function(Ba){var ua=Ba.getAttribute("background");
-if(null==ua||""==ua||ua==mxConstants.NONE)ua=c.defaultPageBackgroundColor;u.style.backgroundColor=ua;(new mxCodec(Ba.ownerDocument)).decode(Ba,c.getModel());c.maxFitScale=1;c.fit(8);c.center();return Ba};O.style.display="none";O.innerHTML="";K=aa;q=fa;g=parseSelectFunction=null;k=0;if("mxfile"==wa.nodeName){aa=wa.getElementsByTagName("diagram");g=[];for(fa=0;fa<aa.length;fa++)g.push(aa[fa]);k=Math.min(e,g.length-1);0<g.length&&la(g[k]);if(1<g.length)for(O.removeAttribute("disabled"),O.style.display=
-"",fa=0;fa<g.length;fa++)aa=document.createElement("option"),mxUtils.write(aa,g[fa].getAttribute("name")||mxResources.get("pageWithNumber",[fa+1])),aa.setAttribute("value",fa),fa==k&&aa.setAttribute("selected","selected"),O.appendChild(aa);V=function(){try{var Ba=parseInt(O.value);k=e=Ba;la(g[Ba])}catch(ua){O.value=e,b.handleError(ua)}}}else za(wa);fa=T.lastModifyingUserName;null!=fa&&20<fa.length&&(fa=fa.substring(0,20)+"...");J.innerHTML="";mxUtils.write(J,(null!=fa?fa+" ":"")+Y.toLocaleDateString()+
-" "+Y.toLocaleTimeString());J.setAttribute("title",ca.getAttribute("title"));C.removeAttribute("disabled");z.removeAttribute("disabled");B.removeAttribute("disabled");G.removeAttribute("disabled");M.removeAttribute("disabled");null!=x&&x.isRestricted()||(b.editor.graph.isEnabled()&&W.removeAttribute("disabled"),R.removeAttribute("disabled"),X.removeAttribute("disabled"),U.removeAttribute("disabled"));mxUtils.setOpacity(C,60);mxUtils.setOpacity(z,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(G,60);
-mxUtils.setOpacity(M,60)}else O.style.display="none",O.innerHTML="",J.innerHTML="",mxUtils.write(J,mxResources.get("errorLoadingFile")),mxUtils.write(D,mxResources.get("errorLoadingFile"))};ca=document.createElement("tr");ca.style.borderBottom="1px solid lightGray";ca.style.fontSize="12px";ca.style.cursor="pointer";var Z=document.createElement("td");Z.style.padding="6px";Z.style.whiteSpace="nowrap";T==f[f.length-1]?mxUtils.write(Z,mxResources.get("current")):Y.toDateString()===Q?mxUtils.write(Z,Y.toLocaleTimeString()):
-mxUtils.write(Z,Y.toLocaleDateString()+" "+Y.toLocaleTimeString());ca.appendChild(Z);ca.setAttribute("title",Y.toLocaleDateString()+" "+Y.toLocaleTimeString()+(null!=T.fileSize?" "+b.formatFileSize(parseInt(T.fileSize)):"")+(null!=T.lastModifyingUserName?" "+T.lastModifyingUserName:""));mxEvent.addListener(ca,"click",function(fa){N!=T&&(v.stop(),null!=L&&(L.style.backgroundColor=""),N=T,L=ca,L.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",q=K=null,J.removeAttribute("title"),J.innerHTML=
-mxUtils.htmlEntities(mxResources.get("loading")+"..."),u.style.backgroundColor=c.defaultPageBackgroundColor,D.innerHTML="",c.getModel().clear(),W.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),z.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"),O.setAttribute("disabled",
-"disabled"),mxUtils.setOpacity(C,20),mxUtils.setOpacity(z,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(M,20),v.spin(u),T.getXml(function(aa){if(N==T)try{ia(aa)}catch(wa){J.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+wa.message)}},function(aa){v.stop();O.style.display="none";O.innerHTML="";J.innerHTML="";mxUtils.write(J,mxResources.get("errorLoadingFile"));mxUtils.write(D,mxResources.get("errorLoadingFile"))}),mxEvent.consume(fa))});mxEvent.addListener(ca,
-"dblclick",function(fa){X.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(fa)},!1);S.appendChild(ca)}return ca}(f[p]);null!=P&&p==f.length-1&&(E=P)}I.appendChild(S);t.appendChild(I)}else null==x||null==b.drive&&x.constructor==window.DriveFile||null==b.dropbox&&x.constructor==window.DropboxFile?(u.style.display="none",n.style.display="none",mxUtils.write(t,mxResources.get("notAvailable"))):(u.style.display="none",n.style.display=
-"none",mxUtils.write(t,mxResources.get("noRevisions")));this.init=function(){null!=E&&E.click()};t=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});t.className="geBtn";n.appendChild(O);n.appendChild(C);n.appendChild(z);n.appendChild(G);n.appendChild(B);n.appendChild(M);b.editor.cancelFirst?(A.appendChild(t),A.appendChild(R),A.appendChild(U),A.appendChild(W),A.appendChild(X)):(A.appendChild(R),A.appendChild(U),A.appendChild(W),A.appendChild(X),A.appendChild(t));d.appendChild(A);
-d.appendChild(n);d.appendChild(J);this.container=d},DraftDialog=function(b,f,l,d,t,u,D,c,e){var g=document.createElement("div"),k=document.createElement("div");k.style.marginTop="0px";k.style.whiteSpace="nowrap";k.style.overflow="auto";k.style.lineHeight="normal";mxUtils.write(k,f);g.appendChild(k);var m=document.createElement("select"),p=mxUtils.bind(this,function(){N=mxUtils.parseXml(e[m.value].data);K=b.editor.extractGraphModel(N.documentElement,!0);q=0;this.init()});if(null!=e){m.style.marginLeft=
-"4px";for(f=0;f<e.length;f++){var v=document.createElement("option");v.setAttribute("value",f);var x=new Date(e[f].created),A=new Date(e[f].modified);mxUtils.write(v,x.toLocaleDateString()+" "+x.toLocaleTimeString()+" - "+(x.toDateString(),A.toDateString(),A.toLocaleDateString())+" "+A.toLocaleTimeString());m.appendChild(v)}k.appendChild(m);mxEvent.addListener(m,"change",p)}null==l&&(l=e[0].data);var y=document.createElement("div");y.style.position="absolute";y.style.border="1px solid lightGray";
-y.style.marginTop="10px";y.style.left="40px";y.style.right="40px";y.style.top="46px";y.style.bottom="74px";y.style.overflow="hidden";mxEvent.disableContextMenu(y);g.appendChild(y);var L=new Graph(y);L.setEnabled(!1);L.setPanning(!0);L.panningHandler.ignoreCell=!0;L.panningHandler.useLeftButtonForPanning=!0;L.minFitScale=null;L.maxFitScale=null;L.centerZoom=!0;var N=mxUtils.parseXml(l),K=b.editor.extractGraphModel(N.documentElement,!0),q=0,C=null,z=L.getGlobalVariable;L.getGlobalVariable=function(G){return"page"==
-G&&null!=C&&null!=C[q]?C[q].getAttribute("name"):"pagenumber"==G?q+1:"pagecount"==G?null!=C?C.length:1:z.apply(this,arguments)};L.getLinkForCell=function(){return null};l=mxUtils.button("",function(){L.zoomIn()});l.className="geSprite geSprite-zoomin";l.setAttribute("title",mxResources.get("zoomIn"));l.style.outline="none";l.style.border="none";l.style.margin="2px";mxUtils.setOpacity(l,60);k=mxUtils.button("",function(){L.zoomOut()});k.className="geSprite geSprite-zoomout";k.setAttribute("title",
+new OpenFile(function(){window.openFile=null}),window.openFile.setData(mxUtils.getXml(K.documentElement)),b.openLink(b.getUrl(),null,!0))});U.className="geBtn";U.setAttribute("disabled","disabled");null!=l&&(U.style.display="none");var Y=mxUtils.button(mxResources.get("show"),function(){null!=N&&b.openLink(N.getUrl(O.selectedIndex))});Y.className="geBtn gePrimaryBtn";Y.setAttribute("disabled","disabled");null!=l&&(Y.style.display="none",W.className="geBtn gePrimaryBtn");z=document.createElement("div");
+z.style.position="absolute";z.style.top="482px";z.style.width="640px";z.style.textAlign="right";var n=document.createElement("div");n.className="geToolbarContainer";n.style.backgroundColor="transparent";n.style.padding="2px";n.style.border="none";n.style.left="199px";n.style.top="442px";var D=null;if(null!=f&&0<f.length){u.style.cursor="move";var I=document.createElement("table");I.style.border="1px solid lightGray";I.style.borderCollapse="collapse";I.style.borderSpacing="0px";I.style.width="100%";
+var S=document.createElement("tbody"),Q=(new Date).toDateString();null!=b.currentPage&&null!=b.pages&&(e=mxUtils.indexOf(b.pages,b.currentPage));for(p=f.length-1;0<=p;p--){var P=function(T){var X=new Date(T.modifiedDate),ba=null;if(0<=X.getTime()){var ja=function(ka){v.stop();E.innerHTML="";var da=mxUtils.parseXml(ka),fa=b.editor.extractGraphModel(da.documentElement,!0);if(null!=fa){var ma=function(Ba){null!=Ba&&(Ba=ya(Editor.parseDiagramNode(Ba)));return Ba},ya=function(Ba){var Ha=Ba.getAttribute("background");
+if(null==Ha||""==Ha||Ha==mxConstants.NONE)Ha=c.defaultPageBackgroundColor;u.style.backgroundColor=Ha;(new mxCodec(Ba.ownerDocument)).decode(Ba,c.getModel());c.maxFitScale=1;c.fit(8);c.center();return Ba};O.style.display="none";O.innerHTML="";K=da;q=ka;g=parseSelectFunction=null;k=0;if("mxfile"==fa.nodeName){da=fa.getElementsByTagName("diagram");g=[];for(ka=0;ka<da.length;ka++)g.push(da[ka]);k=Math.min(e,g.length-1);0<g.length&&ma(g[k]);if(1<g.length)for(O.removeAttribute("disabled"),O.style.display=
+"",ka=0;ka<g.length;ka++)da=document.createElement("option"),mxUtils.write(da,g[ka].getAttribute("name")||mxResources.get("pageWithNumber",[ka+1])),da.setAttribute("value",ka),ka==k&&da.setAttribute("selected","selected"),O.appendChild(da);V=function(){try{var Ba=parseInt(O.value);k=e=Ba;ma(g[Ba])}catch(Ha){O.value=e,b.handleError(Ha)}}}else ya(fa);ka=T.lastModifyingUserName;null!=ka&&20<ka.length&&(ka=ka.substring(0,20)+"...");J.innerHTML="";mxUtils.write(J,(null!=ka?ka+" ":"")+X.toLocaleDateString()+
+" "+X.toLocaleTimeString());J.setAttribute("title",ba.getAttribute("title"));C.removeAttribute("disabled");A.removeAttribute("disabled");B.removeAttribute("disabled");G.removeAttribute("disabled");M.removeAttribute("disabled");null!=x&&x.isRestricted()||(b.editor.graph.isEnabled()&&W.removeAttribute("disabled"),R.removeAttribute("disabled"),Y.removeAttribute("disabled"),U.removeAttribute("disabled"));mxUtils.setOpacity(C,60);mxUtils.setOpacity(A,60);mxUtils.setOpacity(B,60);mxUtils.setOpacity(G,60);
+mxUtils.setOpacity(M,60)}else O.style.display="none",O.innerHTML="",J.innerHTML="",mxUtils.write(J,mxResources.get("errorLoadingFile")),mxUtils.write(E,mxResources.get("errorLoadingFile"))};ba=document.createElement("tr");ba.style.borderBottom="1px solid lightGray";ba.style.fontSize="12px";ba.style.cursor="pointer";var Z=document.createElement("td");Z.style.padding="6px";Z.style.whiteSpace="nowrap";T==f[f.length-1]?mxUtils.write(Z,mxResources.get("current")):X.toDateString()===Q?mxUtils.write(Z,X.toLocaleTimeString()):
+mxUtils.write(Z,X.toLocaleDateString()+" "+X.toLocaleTimeString());ba.appendChild(Z);ba.setAttribute("title",X.toLocaleDateString()+" "+X.toLocaleTimeString()+(null!=T.fileSize?" "+b.formatFileSize(parseInt(T.fileSize)):"")+(null!=T.lastModifyingUserName?" "+T.lastModifyingUserName:""));mxEvent.addListener(ba,"click",function(ka){N!=T&&(v.stop(),null!=L&&(L.style.backgroundColor=""),N=T,L=ba,L.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9",q=K=null,J.removeAttribute("title"),J.innerHTML=
+mxUtils.htmlEntities(mxResources.get("loading")+"..."),u.style.backgroundColor=c.defaultPageBackgroundColor,E.innerHTML="",c.getModel().clear(),W.setAttribute("disabled","disabled"),R.setAttribute("disabled","disabled"),C.setAttribute("disabled","disabled"),A.setAttribute("disabled","disabled"),G.setAttribute("disabled","disabled"),B.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"),Y.setAttribute("disabled","disabled"),O.setAttribute("disabled",
+"disabled"),mxUtils.setOpacity(C,20),mxUtils.setOpacity(A,20),mxUtils.setOpacity(B,20),mxUtils.setOpacity(G,20),mxUtils.setOpacity(M,20),v.spin(u),T.getXml(function(da){if(N==T)try{ja(da)}catch(fa){J.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+": "+fa.message)}},function(da){v.stop();O.style.display="none";O.innerHTML="";J.innerHTML="";mxUtils.write(J,mxResources.get("errorLoadingFile"));mxUtils.write(E,mxResources.get("errorLoadingFile"))}),mxEvent.consume(ka))});mxEvent.addListener(ba,
+"dblclick",function(ka){Y.click();window.getSelection?window.getSelection().removeAllRanges():document.selection&&document.selection.empty();mxEvent.consume(ka)},!1);S.appendChild(ba)}return ba}(f[p]);null!=P&&p==f.length-1&&(D=P)}I.appendChild(S);t.appendChild(I)}else null==x||null==b.drive&&x.constructor==window.DriveFile||null==b.dropbox&&x.constructor==window.DropboxFile?(u.style.display="none",n.style.display="none",mxUtils.write(t,mxResources.get("notAvailable"))):(u.style.display="none",n.style.display=
+"none",mxUtils.write(t,mxResources.get("noRevisions")));this.init=function(){null!=D&&D.click()};t=mxUtils.button(mxResources.get("close"),function(){b.hideDialog()});t.className="geBtn";n.appendChild(O);n.appendChild(C);n.appendChild(A);n.appendChild(G);n.appendChild(B);n.appendChild(M);b.editor.cancelFirst?(z.appendChild(t),z.appendChild(R),z.appendChild(U),z.appendChild(W),z.appendChild(Y)):(z.appendChild(R),z.appendChild(U),z.appendChild(W),z.appendChild(Y),z.appendChild(t));d.appendChild(z);
+d.appendChild(n);d.appendChild(J);this.container=d},DraftDialog=function(b,f,l,d,t,u,E,c,e){var g=document.createElement("div"),k=document.createElement("div");k.style.marginTop="0px";k.style.whiteSpace="nowrap";k.style.overflow="auto";k.style.lineHeight="normal";mxUtils.write(k,f);g.appendChild(k);var m=document.createElement("select"),p=mxUtils.bind(this,function(){N=mxUtils.parseXml(e[m.value].data);K=b.editor.extractGraphModel(N.documentElement,!0);q=0;this.init()});if(null!=e){m.style.marginLeft=
+"4px";for(f=0;f<e.length;f++){var v=document.createElement("option");v.setAttribute("value",f);var x=new Date(e[f].created),z=new Date(e[f].modified);mxUtils.write(v,x.toLocaleDateString()+" "+x.toLocaleTimeString()+" - "+(x.toDateString(),z.toDateString(),z.toLocaleDateString())+" "+z.toLocaleTimeString());m.appendChild(v)}k.appendChild(m);mxEvent.addListener(m,"change",p)}null==l&&(l=e[0].data);var y=document.createElement("div");y.style.position="absolute";y.style.border="1px solid lightGray";
+y.style.marginTop="10px";y.style.left="40px";y.style.right="40px";y.style.top="46px";y.style.bottom="74px";y.style.overflow="hidden";mxEvent.disableContextMenu(y);g.appendChild(y);var L=new Graph(y);L.setEnabled(!1);L.setPanning(!0);L.panningHandler.ignoreCell=!0;L.panningHandler.useLeftButtonForPanning=!0;L.minFitScale=null;L.maxFitScale=null;L.centerZoom=!0;var N=mxUtils.parseXml(l),K=b.editor.extractGraphModel(N.documentElement,!0),q=0,C=null,A=L.getGlobalVariable;L.getGlobalVariable=function(G){return"page"==
+G&&null!=C&&null!=C[q]?C[q].getAttribute("name"):"pagenumber"==G?q+1:"pagecount"==G?null!=C?C.length:1:A.apply(this,arguments)};L.getLinkForCell=function(){return null};l=mxUtils.button("",function(){L.zoomIn()});l.className="geSprite geSprite-zoomin";l.setAttribute("title",mxResources.get("zoomIn"));l.style.outline="none";l.style.border="none";l.style.margin="2px";mxUtils.setOpacity(l,60);k=mxUtils.button("",function(){L.zoomOut()});k.className="geSprite geSprite-zoomout";k.setAttribute("title",
mxResources.get("zoomOut"));k.style.outline="none";k.style.border="none";k.style.margin="2px";mxUtils.setOpacity(k,60);f=mxUtils.button("",function(){L.maxFitScale=8;L.fit(8);L.center()});f.className="geSprite geSprite-fit";f.setAttribute("title",mxResources.get("fit"));f.style.outline="none";f.style.border="none";f.style.margin="2px";mxUtils.setOpacity(f,60);v=mxUtils.button("",function(){L.zoomActual();L.center()});v.className="geSprite geSprite-actualsize";v.setAttribute("title",mxResources.get("actualSize"));
-v.style.outline="none";v.style.border="none";v.style.margin="2px";mxUtils.setOpacity(v,60);D=mxUtils.button(D||mxResources.get("discard"),function(){t.apply(this,[m.value,mxUtils.bind(this,function(){null!=m.parentNode&&(m.options[m.selectedIndex].parentNode.removeChild(m.options[m.selectedIndex]),0<m.options.length?(m.value=m.options[0].value,p()):b.hideDialog(!0))})])});D.className="geBtn";var B=document.createElement("select");B.style.maxWidth="80px";B.style.position="relative";B.style.top="-2px";
-B.style.verticalAlign="bottom";B.style.marginRight="6px";B.style.display="none";u=mxUtils.button(u||mxResources.get("edit"),function(){d.apply(this,[m.value])});u.className="geBtn gePrimaryBtn";x=document.createElement("div");x.style.position="absolute";x.style.bottom="30px";x.style.right="40px";x.style.textAlign="right";A=document.createElement("div");A.className="geToolbarContainer";A.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
+v.style.outline="none";v.style.border="none";v.style.margin="2px";mxUtils.setOpacity(v,60);E=mxUtils.button(E||mxResources.get("discard"),function(){t.apply(this,[m.value,mxUtils.bind(this,function(){null!=m.parentNode&&(m.options[m.selectedIndex].parentNode.removeChild(m.options[m.selectedIndex]),0<m.options.length?(m.value=m.options[0].value,p()):b.hideDialog(!0))})])});E.className="geBtn";var B=document.createElement("select");B.style.maxWidth="80px";B.style.position="relative";B.style.top="-2px";
+B.style.verticalAlign="bottom";B.style.marginRight="6px";B.style.display="none";u=mxUtils.button(u||mxResources.get("edit"),function(){d.apply(this,[m.value])});u.className="geBtn gePrimaryBtn";x=document.createElement("div");x.style.position="absolute";x.style.bottom="30px";x.style.right="40px";x.style.textAlign="right";z=document.createElement("div");z.className="geToolbarContainer";z.style.cssText="box-shadow:none !important;background-color:transparent;padding:2px;border-style:none !important;bottom:30px;";
this.init=function(){function G(J){if(null!=J){var R=J.getAttribute("background");if(null==R||""==R||R==mxConstants.NONE)R=Editor.isDarkMode()?"transparent":"#ffffff";y.style.backgroundColor=R;(new mxCodec(J.ownerDocument)).decode(J,L.getModel());L.maxFitScale=1;L.fit(8);L.center()}return J}function M(J){null!=J&&(J=G(Editor.parseDiagramNode(J)));return J}mxEvent.addListener(B,"change",function(J){q=parseInt(B.value);M(C[q]);mxEvent.consume(J)});if("mxfile"==K.nodeName){var H=K.getElementsByTagName("diagram");
-C=[];for(var F=0;F<H.length;F++)C.push(H[F]);0<C.length&&M(C[q]);B.innerHTML="";if(1<C.length)for(B.style.display="",F=0;F<C.length;F++)H=document.createElement("option"),mxUtils.write(H,C[F].getAttribute("name")||mxResources.get("pageWithNumber",[F+1])),H.setAttribute("value",F),F==q&&H.setAttribute("selected","selected"),B.appendChild(H);else B.style.display="none"}else G(K)};A.appendChild(B);A.appendChild(l);A.appendChild(k);A.appendChild(v);A.appendChild(f);l=mxUtils.button(mxResources.get("cancel"),
-function(){b.hideDialog(!0)});l.className="geBtn";c=null!=c?mxUtils.button(mxResources.get("ignore"),c):null;null!=c&&(c.className="geBtn");b.editor.cancelFirst?(x.appendChild(l),null!=c&&x.appendChild(c),x.appendChild(D),x.appendChild(u)):(x.appendChild(u),x.appendChild(D),null!=c&&x.appendChild(c),x.appendChild(l));g.appendChild(x);g.appendChild(A);this.container=g},FindWindow=function(b,f,l,d,t,u){function D(U,X,n,E){if("object"===typeof X.value&&null!=X.value.attributes){X=X.value.attributes;
-for(var I=0;I<X.length;I++)if("label"!=X[I].nodeName){var S=mxUtils.trim(X[I].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(E&&0<=S.indexOf(n)||!E&&S.substring(0,n.length)===n)||null!=U&&U.test(S))return!0}}return!1}function c(){v&&C.value?(R.removeAttribute("disabled"),W.removeAttribute("disabled")):(R.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"));C.value&&q.value?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")}function e(U,
-X,n){F.innerHTML="";var E=k.model.getDescendants(k.model.getRoot()),I=q.value.toLowerCase(),S=z.checked?new RegExp(I):null,Q=null;A=null;m!=I&&(m=I,p=null,x=!1);var P=null==p;if(0<I.length){if(x){x=!1;for(var T,Y=0;Y<b.pages.length;Y++)if(b.currentPage==b.pages[Y]){T=Y;break}U=(T+1)%b.pages.length;p=null;do x=!1,E=b.pages[U],k=b.createTemporaryGraph(k.getStylesheet()),b.updatePageRoot(E),k.model.setRoot(E.root),U=(U+1)%b.pages.length;while(!e(!0,X,n)&&U!=T);p&&(p=null,n?b.editor.graph.model.execute(new SelectPage(b,
-E)):b.selectPage(E));x=!1;k=b.editor.graph;return e(!0,X,n)}for(Y=0;Y<E.length;Y++){T=k.view.getState(E[Y]);X&&null!=S&&(P=P||T==p);if(null!=T&&null!=T.cell.value&&(P||null==Q)&&(k.model.isVertex(T.cell)||k.model.isEdge(T.cell))){null!=T.style&&"1"==T.style.html?(G.innerHTML=k.sanitizeHtml(k.getLabel(T.cell)),label=mxUtils.extractTextWithWhitespace([G])):label=k.getLabel(T.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var ca=0;X&&u&&null!=S&&T==p&&(label=label.substr(y),
-ca=y);var ia=""==C.value,Z=ia;if(null==S&&(Z&&0<=label.indexOf(I)||!Z&&label.substring(0,I.length)===I||ia&&D(S,T.cell,I,Z))||null!=S&&(S.test(label)||ia&&D(S,T.cell,I,Z)))if(u&&(null!=S?(ia=label.match(S),null!=ia&&0<ia.length&&(A=ia[0].toLowerCase(),y=ca+ia.index+A.length)):(A=I,y=A.length)),P){Q=T;break}else null==Q&&(Q=T)}P=P||T==p}}if(null!=Q){if(Y==E.length&&B.checked)return p=null,x=!0,e(!0,X,n);p=Q;k.scrollCellToVisible(p.cell);k.isEnabled()&&!k.isCellLocked(p.cell)?n||k.getSelectionCell()==
-p.cell&&1==k.getSelectionCount()||k.setSelectionCell(p.cell):k.highlightCell(p.cell)}else{if(!U&&B.checked)return x=!0,e(!0,X,n);k.isEnabled()&&!n&&k.clearSelection()}v=null!=Q;u&&!U&&c();return 0==I.length||null!=Q}var g=b.actions.get("findReplace"),k=b.editor.graph,m=null,p=null,v=!1,x=!1,A=null,y=0,L=1,N=document.createElement("div");N.style.userSelect="none";N.style.overflow="hidden";N.style.padding="10px";N.style.height="100%";var K=u?"260px":"200px",q=document.createElement("input");q.setAttribute("placeholder",
+C=[];for(var F=0;F<H.length;F++)C.push(H[F]);0<C.length&&M(C[q]);B.innerHTML="";if(1<C.length)for(B.style.display="",F=0;F<C.length;F++)H=document.createElement("option"),mxUtils.write(H,C[F].getAttribute("name")||mxResources.get("pageWithNumber",[F+1])),H.setAttribute("value",F),F==q&&H.setAttribute("selected","selected"),B.appendChild(H);else B.style.display="none"}else G(K)};z.appendChild(B);z.appendChild(l);z.appendChild(k);z.appendChild(v);z.appendChild(f);l=mxUtils.button(mxResources.get("cancel"),
+function(){b.hideDialog(!0)});l.className="geBtn";c=null!=c?mxUtils.button(mxResources.get("ignore"),c):null;null!=c&&(c.className="geBtn");b.editor.cancelFirst?(x.appendChild(l),null!=c&&x.appendChild(c),x.appendChild(E),x.appendChild(u)):(x.appendChild(u),x.appendChild(E),null!=c&&x.appendChild(c),x.appendChild(l));g.appendChild(x);g.appendChild(z);this.container=g},FindWindow=function(b,f,l,d,t,u){function E(U,Y,n,D){if("object"===typeof Y.value&&null!=Y.value.attributes){Y=Y.value.attributes;
+for(var I=0;I<Y.length;I++)if("label"!=Y[I].nodeName){var S=mxUtils.trim(Y[I].nodeValue.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();if(null==U&&(D&&0<=S.indexOf(n)||!D&&S.substring(0,n.length)===n)||null!=U&&U.test(S))return!0}}return!1}function c(){v&&C.value?(R.removeAttribute("disabled"),W.removeAttribute("disabled")):(R.setAttribute("disabled","disabled"),W.setAttribute("disabled","disabled"));C.value&&q.value?O.removeAttribute("disabled"):O.setAttribute("disabled","disabled")}function e(U,
+Y,n){F.innerHTML="";var D=k.model.getDescendants(k.model.getRoot()),I=q.value.toLowerCase(),S=A.checked?new RegExp(I):null,Q=null;z=null;m!=I&&(m=I,p=null,x=!1);var P=null==p;if(0<I.length){if(x){x=!1;for(var T,X=0;X<b.pages.length;X++)if(b.currentPage==b.pages[X]){T=X;break}U=(T+1)%b.pages.length;p=null;do x=!1,D=b.pages[U],k=b.createTemporaryGraph(k.getStylesheet()),b.updatePageRoot(D),k.model.setRoot(D.root),U=(U+1)%b.pages.length;while(!e(!0,Y,n)&&U!=T);p&&(p=null,n?b.editor.graph.model.execute(new SelectPage(b,
+D)):b.selectPage(D));x=!1;k=b.editor.graph;return e(!0,Y,n)}for(X=0;X<D.length;X++){T=k.view.getState(D[X]);Y&&null!=S&&(P=P||T==p);if(null!=T&&null!=T.cell.value&&(P||null==Q)&&(k.model.isVertex(T.cell)||k.model.isEdge(T.cell))){null!=T.style&&"1"==T.style.html?(G.innerHTML=k.sanitizeHtml(k.getLabel(T.cell)),label=mxUtils.extractTextWithWhitespace([G])):label=k.getLabel(T.cell);label=mxUtils.trim(label.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")).toLowerCase();var ba=0;Y&&u&&null!=S&&T==p&&(label=label.substr(y),
+ba=y);var ja=""==C.value,Z=ja;if(null==S&&(Z&&0<=label.indexOf(I)||!Z&&label.substring(0,I.length)===I||ja&&E(S,T.cell,I,Z))||null!=S&&(S.test(label)||ja&&E(S,T.cell,I,Z)))if(u&&(null!=S?(ja=label.match(S),null!=ja&&0<ja.length&&(z=ja[0].toLowerCase(),y=ba+ja.index+z.length)):(z=I,y=z.length)),P){Q=T;break}else null==Q&&(Q=T)}P=P||T==p}}if(null!=Q){if(X==D.length&&B.checked)return p=null,x=!0,e(!0,Y,n);p=Q;k.scrollCellToVisible(p.cell);k.isEnabled()&&!k.isCellLocked(p.cell)?n||k.getSelectionCell()==
+p.cell&&1==k.getSelectionCount()||k.setSelectionCell(p.cell):k.highlightCell(p.cell)}else{if(!U&&B.checked)return x=!0,e(!0,Y,n);k.isEnabled()&&!n&&k.clearSelection()}v=null!=Q;u&&!U&&c();return 0==I.length||null!=Q}var g=b.actions.get("findReplace"),k=b.editor.graph,m=null,p=null,v=!1,x=!1,z=null,y=0,L=1,N=document.createElement("div");N.style.userSelect="none";N.style.overflow="hidden";N.style.padding="10px";N.style.height="100%";var K=u?"260px":"200px",q=document.createElement("input");q.setAttribute("placeholder",
mxResources.get("find"));q.setAttribute("type","text");q.style.marginTop="4px";q.style.marginBottom="6px";q.style.width=K;q.style.fontSize="12px";q.style.borderRadius="4px";q.style.padding="6px";N.appendChild(q);mxUtils.br(N);if(u){var C=document.createElement("input");C.setAttribute("placeholder",mxResources.get("replaceWith"));C.setAttribute("type","text");C.style.marginTop="4px";C.style.marginBottom="6px";C.style.width=K;C.style.fontSize="12px";C.style.borderRadius="4px";C.style.padding="6px";
-N.appendChild(C);mxUtils.br(N);mxEvent.addListener(C,"input",c)}var z=document.createElement("input");z.setAttribute("id","geFindWinRegExChck");z.setAttribute("type","checkbox");z.style.marginRight="4px";N.appendChild(z);K=document.createElement("label");K.setAttribute("for","geFindWinRegExChck");N.appendChild(K);mxUtils.write(K,mxResources.get("regularExpression"));N.appendChild(K);K=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");K.style.position="relative";K.style.marginLeft=
+N.appendChild(C);mxUtils.br(N);mxEvent.addListener(C,"input",c)}var A=document.createElement("input");A.setAttribute("id","geFindWinRegExChck");A.setAttribute("type","checkbox");A.style.marginRight="4px";N.appendChild(A);K=document.createElement("label");K.setAttribute("for","geFindWinRegExChck");N.appendChild(K);mxUtils.write(K,mxResources.get("regularExpression"));N.appendChild(K);K=b.menus.createHelpLink("https://www.diagrams.net/doc/faq/find-shapes");K.style.position="relative";K.style.marginLeft=
"6px";K.style.top="-1px";N.appendChild(K);mxUtils.br(N);var B=document.createElement("input");B.setAttribute("id","geFindWinAllPagesChck");B.setAttribute("type","checkbox");B.style.marginRight="4px";N.appendChild(B);K=document.createElement("label");K.setAttribute("for","geFindWinAllPagesChck");N.appendChild(K);mxUtils.write(K,mxResources.get("allPages"));N.appendChild(K);var G=document.createElement("div");mxUtils.br(N);K=document.createElement("div");K.style.left="0px";K.style.right="0px";K.style.marginTop=
"6px";K.style.padding="0 6px 0 6px";K.style.textAlign="center";N.appendChild(K);var M=mxUtils.button(mxResources.get("reset"),function(){F.innerHTML="";q.value="";q.style.backgroundColor="";u&&(C.value="",c());m=p=null;x=!1;q.focus()});M.setAttribute("title",mxResources.get("reset"));M.style.float="none";M.style.width="120px";M.style.marginTop="6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow="ellipsis";M.className="geBtn";u||K.appendChild(M);var H=mxUtils.button(mxResources.get("find"),
-function(){try{q.style.backgroundColor=e()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){b.handleError(U)}});H.setAttribute("title",mxResources.get("find")+" (Enter)");H.style.float="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";K.appendChild(H);var F=document.createElement("div");F.style.marginTop="10px";if(u){var J=function(U,X,n,E,I){if(null==I||"1"!=I.html)return E=U.toLowerCase().indexOf(X,
-E),0>E?U:U.substr(0,E)+n+U.substr(E+X.length);var S=U;X=mxUtils.htmlEntities(X);I=[];var Q=-1;for(U=U.replace(/<br>/ig,"\n");-1<(Q=U.indexOf("<",Q+1));)I.push(Q);Q=U.match(/<[^>]*>/g);U=U.replace(/<[^>]*>/g,"");E=U.toLowerCase().indexOf(X,E);if(0>E)return S;S=E+X.length;n=mxUtils.htmlEntities(n);U=U.substr(0,E)+n+U.substr(S);for(var P=0,T=0;T<I.length;T++){if(I[T]-P<E)U=U.substr(0,I[T])+Q[T]+U.substr(I[T]);else{var Y=I[T]-P<S?E+P:I[T]+(n.length-X.length);U=U.substr(0,Y)+Q[T]+U.substr(Y)}P+=Q[T].length}return U.replace(/\n/g,
-"<br>")},R=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=A&&null!=p&&C.value){var U=p.cell,X=k.getLabel(U);k.isCellEditable(U)&&k.model.setValue(U,J(X,A,C.value,y-A.length,k.getCurrentCellStyle(U)));q.style.backgroundColor=e(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(n){b.handleError(n)}});R.setAttribute("title",mxResources.get("replFind"));R.style.float="none";R.style.width="120px";R.style.marginTop="6px";R.style.marginLeft="8px";R.style.overflow="hidden";R.style.textOverflow=
-"ellipsis";R.className="geBtn gePrimaryBtn";R.setAttribute("disabled","disabled");K.appendChild(R);mxUtils.br(K);var W=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=A&&null!=p&&C.value){var U=p.cell,X=k.getLabel(U);k.model.setValue(U,J(X,A,C.value,y-A.length,k.getCurrentCellStyle(U)));R.setAttribute("disabled","disabled");W.setAttribute("disabled","disabled")}}catch(n){b.handleError(n)}});W.setAttribute("title",mxResources.get("replace"));W.style.float="none";W.style.width="120px";
-W.style.marginTop="6px";W.style.marginLeft="8px";W.style.overflow="hidden";W.style.textOverflow="ellipsis";W.className="geBtn gePrimaryBtn";W.setAttribute("disabled","disabled");K.appendChild(W);var O=mxUtils.button(mxResources.get("replaceAll"),function(){F.innerHTML="";if(C.value){m=null;var U=b.currentPage,X=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;k.getModel().beginUpdate();try{for(var n=0,E={};e(!1,!0,!0)&&100>n;){var I=p.cell,S=k.getLabel(I),Q=E[I.id];if(Q&&Q.replAllMrk==
-L&&Q.replAllPos>=y)break;E[I.id]={replAllMrk:L,replAllPos:y};k.isCellEditable(I)&&(k.model.setValue(I,J(S,A,C.value,y-A.length,k.getCurrentCellStyle(I))),n++)}U!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,U));mxUtils.write(F,mxResources.get("matchesRepl",[n]))}catch(P){b.handleError(P)}finally{k.getModel().endUpdate(),b.editor.graph.setSelectionCells(X),b.editor.graph.rendering=!0}L++}});O.setAttribute("title",mxResources.get("replaceAll"));O.style.float="none";O.style.width="120px";
+function(){try{q.style.backgroundColor=e()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(U){b.handleError(U)}});H.setAttribute("title",mxResources.get("find")+" (Enter)");H.style.float="none";H.style.width="120px";H.style.marginTop="6px";H.style.marginLeft="8px";H.style.overflow="hidden";H.style.textOverflow="ellipsis";H.className="geBtn gePrimaryBtn";K.appendChild(H);var F=document.createElement("div");F.style.marginTop="10px";if(u){var J=function(U,Y,n,D,I){if(null==I||"1"!=I.html)return D=U.toLowerCase().indexOf(Y,
+D),0>D?U:U.substr(0,D)+n+U.substr(D+Y.length);var S=U;Y=mxUtils.htmlEntities(Y);I=[];var Q=-1;for(U=U.replace(/<br>/ig,"\n");-1<(Q=U.indexOf("<",Q+1));)I.push(Q);Q=U.match(/<[^>]*>/g);U=U.replace(/<[^>]*>/g,"");D=U.toLowerCase().indexOf(Y,D);if(0>D)return S;S=D+Y.length;n=mxUtils.htmlEntities(n);U=U.substr(0,D)+n+U.substr(S);for(var P=0,T=0;T<I.length;T++){if(I[T]-P<D)U=U.substr(0,I[T])+Q[T]+U.substr(I[T]);else{var X=I[T]-P<S?D+P:I[T]+(n.length-Y.length);U=U.substr(0,X)+Q[T]+U.substr(X)}P+=Q[T].length}return U.replace(/\n/g,
+"<br>")},R=mxUtils.button(mxResources.get("replFind"),function(){try{if(null!=z&&null!=p&&C.value){var U=p.cell,Y=k.getLabel(U);k.isCellEditable(U)&&k.model.setValue(U,J(Y,z,C.value,y-z.length,k.getCurrentCellStyle(U)));q.style.backgroundColor=e(!1,!0)?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}}catch(n){b.handleError(n)}});R.setAttribute("title",mxResources.get("replFind"));R.style.float="none";R.style.width="120px";R.style.marginTop="6px";R.style.marginLeft="8px";R.style.overflow="hidden";R.style.textOverflow=
+"ellipsis";R.className="geBtn gePrimaryBtn";R.setAttribute("disabled","disabled");K.appendChild(R);mxUtils.br(K);var W=mxUtils.button(mxResources.get("replace"),function(){try{if(null!=z&&null!=p&&C.value){var U=p.cell,Y=k.getLabel(U);k.model.setValue(U,J(Y,z,C.value,y-z.length,k.getCurrentCellStyle(U)));R.setAttribute("disabled","disabled");W.setAttribute("disabled","disabled")}}catch(n){b.handleError(n)}});W.setAttribute("title",mxResources.get("replace"));W.style.float="none";W.style.width="120px";
+W.style.marginTop="6px";W.style.marginLeft="8px";W.style.overflow="hidden";W.style.textOverflow="ellipsis";W.className="geBtn gePrimaryBtn";W.setAttribute("disabled","disabled");K.appendChild(W);var O=mxUtils.button(mxResources.get("replaceAll"),function(){F.innerHTML="";if(C.value){m=null;var U=b.currentPage,Y=b.editor.graph.getSelectionCells();b.editor.graph.rendering=!1;k.getModel().beginUpdate();try{for(var n=0,D={};e(!1,!0,!0)&&100>n;){var I=p.cell,S=k.getLabel(I),Q=D[I.id];if(Q&&Q.replAllMrk==
+L&&Q.replAllPos>=y)break;D[I.id]={replAllMrk:L,replAllPos:y};k.isCellEditable(I)&&(k.model.setValue(I,J(S,z,C.value,y-z.length,k.getCurrentCellStyle(I))),n++)}U!=b.currentPage&&b.editor.graph.model.execute(new SelectPage(b,U));mxUtils.write(F,mxResources.get("matchesRepl",[n]))}catch(P){b.handleError(P)}finally{k.getModel().endUpdate(),b.editor.graph.setSelectionCells(Y),b.editor.graph.rendering=!0}L++}});O.setAttribute("title",mxResources.get("replaceAll"));O.style.float="none";O.style.width="120px";
O.style.marginTop="6px";O.style.marginLeft="8px";O.style.overflow="hidden";O.style.textOverflow="ellipsis";O.className="geBtn gePrimaryBtn";O.setAttribute("disabled","disabled");K.appendChild(O);mxUtils.br(K);K.appendChild(M);M=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){this.window.setVisible(!1)}));M.setAttribute("title",mxResources.get("close"));M.style.float="none";M.style.width="120px";M.style.marginTop="6px";M.style.marginLeft="8px";M.style.overflow="hidden";M.style.textOverflow=
-"ellipsis";M.className="geBtn";K.appendChild(M);mxUtils.br(K);K.appendChild(F)}else M.style.width="90px",H.style.width="90px";mxEvent.addListener(q,"keyup",function(U){if(91==U.keyCode||93==U.keyCode||17==U.keyCode)mxEvent.consume(U);else if(27==U.keyCode)g.funct();else if(m!=q.value.toLowerCase()||13==U.keyCode)try{q.style.backgroundColor=e()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(X){q.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(N,"keydown",function(U){70==
+"ellipsis";M.className="geBtn";K.appendChild(M);mxUtils.br(K);K.appendChild(F)}else M.style.width="90px",H.style.width="90px";mxEvent.addListener(q,"keyup",function(U){if(91==U.keyCode||93==U.keyCode||17==U.keyCode)mxEvent.consume(U);else if(27==U.keyCode)g.funct();else if(m!=q.value.toLowerCase()||13==U.keyCode)try{q.style.backgroundColor=e()?"":Editor.isDarkMode()?"#ff0000":"#ffcfcf"}catch(Y){q.style.backgroundColor=Editor.isDarkMode()?"#ff0000":"#ffcfcf"}});mxEvent.addListener(N,"keydown",function(U){70==
U.keyCode&&b.keyHandler.isControlDown(U)&&!mxEvent.isShiftDown(U)&&(g.funct(),mxEvent.consume(U))});this.window=new mxWindow(mxResources.get("find")+(u?"/"+mxResources.get("replace"):""),N,f,l,d,t,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit();this.window.isVisible()?(q.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():
-document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?B.removeAttribute("disabled"):(B.checked=!1,B.setAttribute("disabled","disabled"))):k.container.focus()}));this.window.setLocation=function(U,X){var n=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;U=Math.max(0,Math.min(U,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));X=Math.max(0,Math.min(X,n-this.table.clientHeight-("1"==
-urlParams.sketch?3:48)));this.getX()==U&&this.getY()==X||mxWindow.prototype.setLocation.apply(this,arguments)};var V=mxUtils.bind(this,function(){var U=this.window.getX(),X=this.window.getY();this.window.setLocation(U,X)});mxEvent.addListener(window,"resize",V);this.destroy=function(){mxEvent.removeListener(window,"resize",V);this.window.destroy()}},FreehandWindow=function(b,f,l,d,t,u){var D=b.editor.graph;b=document.createElement("div");b.style.textAlign="center";b.style.userSelect="none";b.style.overflow=
+document.execCommand("selectAll",!1,null),null!=b.pages&&1<b.pages.length?B.removeAttribute("disabled"):(B.checked=!1,B.setAttribute("disabled","disabled"))):k.container.focus()}));this.window.setLocation=function(U,Y){var n=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;U=Math.max(0,Math.min(U,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));Y=Math.max(0,Math.min(Y,n-this.table.clientHeight-("1"==
+urlParams.sketch?3:48)));this.getX()==U&&this.getY()==Y||mxWindow.prototype.setLocation.apply(this,arguments)};var V=mxUtils.bind(this,function(){var U=this.window.getX(),Y=this.window.getY();this.window.setLocation(U,Y)});mxEvent.addListener(window,"resize",V);this.destroy=function(){mxEvent.removeListener(window,"resize",V);this.window.destroy()}},FreehandWindow=function(b,f,l,d,t,u){var E=b.editor.graph;b=document.createElement("div");b.style.textAlign="center";b.style.userSelect="none";b.style.overflow=
"hidden";b.style.height="100%";if(u){var c=document.createElement("input");c.setAttribute("id","geFreehandBrush");c.setAttribute("type","checkbox");c.style.margin="10px 5px 0px 10px";c.style.float="left";b.appendChild(c);var e=document.createElement("label");e.setAttribute("for","geFreehandBrush");e.style.float="left";e.style.marginTop="10px";b.appendChild(e);mxUtils.write(e,mxResources.get("brush"));b.appendChild(e);mxUtils.br(b);var g=document.createElement("input");g.setAttribute("type","range");
-g.setAttribute("min","2");g.setAttribute("max","30");g.setAttribute("value",D.freehand.getBrushSize());g.style.width="90%";g.style.visibility="hidden";b.appendChild(g);mxUtils.br(b);mxEvent.addListener(c,"change",function(){D.freehand.setPerfectFreehandMode(this.checked);g.style.visibility=this.checked?"visible":"hidden"});mxEvent.addListener(g,"change",function(){D.freehand.setBrushSize(parseInt(this.value))})}var k=mxUtils.button(mxResources.get("startDrawing"),function(){D.freehand.isDrawing()?
-D.freehand.stopDrawing():D.freehand.startDrawing()});k.setAttribute("title",mxResources.get("startDrawing"));k.style.marginTop=u?"5px":"10px";k.style.width="90%";k.style.boxSizing="border-box";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.textAlign="center";k.className="geBtn gePrimaryBtn";b.appendChild(k);this.window=new mxWindow(mxResources.get("freehand"),b,f,l,d,t,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);
-D.addListener("freehandStateChanged",mxUtils.bind(this,function(){k.innerHTML="";mxUtils.write(k,mxResources.get(D.freehand.isDrawing()?"stopDrawing":"startDrawing"));k.setAttribute("title",mxResources.get(D.freehand.isDrawing()?"stopDrawing":"startDrawing"));k.className="geBtn"+(D.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){D.freehand.isDrawing()&&D.freehand.stopDrawing()}));
+g.setAttribute("min","2");g.setAttribute("max","30");g.setAttribute("value",E.freehand.getBrushSize());g.style.width="90%";g.style.visibility="hidden";b.appendChild(g);mxUtils.br(b);mxEvent.addListener(c,"change",function(){E.freehand.setPerfectFreehandMode(this.checked);g.style.visibility=this.checked?"visible":"hidden"});mxEvent.addListener(g,"change",function(){E.freehand.setBrushSize(parseInt(this.value))})}var k=mxUtils.button(mxResources.get("startDrawing"),function(){E.freehand.isDrawing()?
+E.freehand.stopDrawing():E.freehand.startDrawing()});k.setAttribute("title",mxResources.get("startDrawing"));k.style.marginTop=u?"5px":"10px";k.style.width="90%";k.style.boxSizing="border-box";k.style.overflow="hidden";k.style.textOverflow="ellipsis";k.style.textAlign="center";k.className="geBtn gePrimaryBtn";b.appendChild(k);this.window=new mxWindow(mxResources.get("freehand"),b,f,l,d,t,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!1);this.window.setClosable(!0);
+E.addListener("freehandStateChanged",mxUtils.bind(this,function(){k.innerHTML="";mxUtils.write(k,mxResources.get(E.freehand.isDrawing()?"stopDrawing":"startDrawing"));k.setAttribute("title",mxResources.get(E.freehand.isDrawing()?"stopDrawing":"startDrawing"));k.className="geBtn"+(E.freehand.isDrawing()?"":" gePrimaryBtn")}));this.window.addListener("show",mxUtils.bind(this,function(){this.window.fit()}));this.window.addListener("hide",mxUtils.bind(this,function(){E.freehand.isDrawing()&&E.freehand.stopDrawing()}));
this.window.setLocation=function(p,v){var x=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;p=Math.max(0,Math.min(p,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));v=Math.max(0,Math.min(v,x-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==p&&this.getY()==v||mxWindow.prototype.setLocation.apply(this,arguments)};var m=mxUtils.bind(this,function(){var p=this.window.getX(),v=this.window.getY();
-this.window.setLocation(p,v)});mxEvent.addListener(window,"resize",m);this.destroy=function(){mxEvent.removeListener(window,"resize",m);this.window.destroy()}},TagsWindow=function(b,f,l,d,t){var u=b.editor.graph,D=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(g,k){if(u.isEnabled()){var m=new FilenameDialog(b,"",mxResources.get("add"),function(p){b.hideDialog();if(null!=p&&0<p.length){p=p.split(" ");for(var v=[],x=0;x<p.length;x++){var A=
-mxUtils.trim(p[x]);""!=A&&0>mxUtils.indexOf(g,A)&&v.push(A)}0<v.length&&(u.isSelectionEmpty()?k(g.concat(v)):u.addTagsForCells(u.getSelectionCells(),v))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(m.container,300,80,!0,!0);m.init()}}),c=D.div;this.window=new mxWindow(mxResources.get("tags"),c,f,l,d,t,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);
-this.window.addListener("show",mxUtils.bind(this,function(){D.refresh();this.window.fit()}));this.window.setLocation=function(g,k){var m=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;g=Math.max(0,Math.min(g,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));k=Math.max(0,Math.min(k,m-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==g&&this.getY()==k||mxWindow.prototype.setLocation.apply(this,
+this.window.setLocation(p,v)});mxEvent.addListener(window,"resize",m);this.destroy=function(){mxEvent.removeListener(window,"resize",m);this.window.destroy()}},TagsWindow=function(b,f,l,d,t){var u=b.editor.graph,E=b.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return this.window.isVisible()}),null,function(g,k){if(u.isEnabled()){var m=new FilenameDialog(b,"",mxResources.get("add"),function(p){b.hideDialog();if(null!=p&&0<p.length){p=p.split(" ");for(var v=[],x=0;x<p.length;x++){var z=
+mxUtils.trim(p[x]);""!=z&&0>mxUtils.indexOf(g,z)&&v.push(z)}0<v.length&&(u.isSelectionEmpty()?k(g.concat(v)):u.addTagsForCells(u.getSelectionCells(),v))}},mxResources.get("enterValue")+" ("+mxResources.get("tags")+")");b.showDialog(m.container,300,80,!0,!0);m.init()}}),c=E.div;this.window=new mxWindow(mxResources.get("tags"),c,f,l,d,t,!0,!0);this.window.minimumSize=new mxRectangle(0,0,212,120);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);
+this.window.addListener("show",mxUtils.bind(this,function(){E.refresh();this.window.fit()}));this.window.setLocation=function(g,k){var m=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;g=Math.max(0,Math.min(g,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));k=Math.max(0,Math.min(k,m-this.table.clientHeight-("1"==urlParams.sketch?3:48)));this.getX()==g&&this.getY()==k||mxWindow.prototype.setLocation.apply(this,
arguments)};var e=mxUtils.bind(this,function(){var g=this.window.getX(),k=this.window.getY();this.window.setLocation(g,k)});mxEvent.addListener(window,"resize",e);this.destroy=function(){mxEvent.removeListener(window,"resize",e);this.window.destroy()}},AuthDialog=function(b,f,l,d){var t=document.createElement("div");t.style.textAlign="center";var u=document.createElement("p");u.style.fontSize="16pt";u.style.padding="0px";u.style.margin="0px";u.style.color="gray";mxUtils.write(u,mxResources.get("authorizationRequired"));
-var D="Unknown",c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.marginRight="10px";f==b.drive?(D=mxResources.get("googleDrive"),c.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(D=mxResources.get("dropbox"),c.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(D=mxResources.get("oneDrive"),c.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(D=mxResources.get("github"),c.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?
-(D=mxResources.get("gitlab"),c.src=IMAGE_PATH+"/gitlab-logo.svg",c.style.width="32px"):f==b.trello&&(D=mxResources.get("trello"),c.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[D]));var e=document.createElement("input");e.setAttribute("type","checkbox");D=mxUtils.button(mxResources.get("authorize"),function(){d(e.checked)});D.insertBefore(c,D.firstChild);D.style.marginTop="6px";D.className="geBigButton";D.style.fontSize=
-"18px";D.style.padding="14px";t.appendChild(u);t.appendChild(b);t.appendChild(D);l&&(l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(e),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberMe")),l.appendChild(u),t.appendChild(l),e.checked=!0,e.defaultChecked=!0,mxEvent.addListener(u,"click",function(g){e.checked=!e.checked;mxEvent.consume(g)}));this.container=t},MoreShapesDialog=function(b,f,l){l=null!=l?l:b.sidebar.entries;var d=document.createElement("div"),
-t=[];if(null!=b.sidebar.customEntries)for(var u=0;u<b.sidebar.customEntries.length;u++){for(var D=b.sidebar.customEntries[u],c={title:b.getResource(D.title),entries:[]},e=0;e<D.entries.length;e++){var g=D.entries[e];c.entries.push({id:g.id,title:b.getResource(g.title),desc:b.getResource(g.desc),image:g.preview})}t.push(c)}for(u=0;u<l.length;u++)if(null==b.sidebar.enabledLibraries)t.push(l[u]);else{c={title:l[u].title,entries:[]};for(e=0;e<l[u].entries.length;e++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,
-l[u].entries[e].id)&&c.entries.push(l[u].entries[e]);0<c.entries.length&&t.push(c)}l=t;if(f){u=mxUtils.bind(this,function(z){for(var B=0;B<z.length;B++)(function(G){var M=x.cloneNode(!1);M.style.fontWeight="bold";M.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";M.style.padding="6px 0px 6px 20px";mxUtils.write(M,G.title);k.appendChild(M);for(var H=0;H<G.entries.length;H++)(function(F){var J=x.cloneNode(!1);J.style.cursor="pointer";J.style.padding="4px 0px 4px 20px";J.style.whiteSpace=
+var E="Unknown",c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.marginRight="10px";f==b.drive?(E=mxResources.get("googleDrive"),c.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?(E=mxResources.get("dropbox"),c.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(E=mxResources.get("oneDrive"),c.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(E=mxResources.get("github"),c.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?
+(E=mxResources.get("gitlab"),c.src=IMAGE_PATH+"/gitlab-logo.svg",c.style.width="32px"):f==b.trello&&(E=mxResources.get("trello"),c.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizeThisAppIn",[E]));var e=document.createElement("input");e.setAttribute("type","checkbox");E=mxUtils.button(mxResources.get("authorize"),function(){d(e.checked)});E.insertBefore(c,E.firstChild);E.style.marginTop="6px";E.className="geBigButton";E.style.fontSize=
+"18px";E.style.padding="14px";t.appendChild(u);t.appendChild(b);t.appendChild(E);l&&(l=document.createElement("p"),l.style.marginTop="20px",l.appendChild(e),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberMe")),l.appendChild(u),t.appendChild(l),e.checked=!0,e.defaultChecked=!0,mxEvent.addListener(u,"click",function(g){e.checked=!e.checked;mxEvent.consume(g)}));this.container=t},MoreShapesDialog=function(b,f,l){l=null!=l?l:b.sidebar.entries;var d=document.createElement("div"),
+t=[];if(null!=b.sidebar.customEntries)for(var u=0;u<b.sidebar.customEntries.length;u++){for(var E=b.sidebar.customEntries[u],c={title:b.getResource(E.title),entries:[]},e=0;e<E.entries.length;e++){var g=E.entries[e];c.entries.push({id:g.id,title:b.getResource(g.title),desc:b.getResource(g.desc),image:g.preview})}t.push(c)}for(u=0;u<l.length;u++)if(null==b.sidebar.enabledLibraries)t.push(l[u]);else{c={title:l[u].title,entries:[]};for(e=0;e<l[u].entries.length;e++)0<=mxUtils.indexOf(b.sidebar.enabledLibraries,
+l[u].entries[e].id)&&c.entries.push(l[u].entries[e]);0<c.entries.length&&t.push(c)}l=t;if(f){u=mxUtils.bind(this,function(A){for(var B=0;B<A.length;B++)(function(G){var M=x.cloneNode(!1);M.style.fontWeight="bold";M.style.backgroundColor=Editor.isDarkMode()?"#505759":"#e5e5e5";M.style.padding="6px 0px 6px 20px";mxUtils.write(M,G.title);k.appendChild(M);for(var H=0;H<G.entries.length;H++)(function(F){var J=x.cloneNode(!1);J.style.cursor="pointer";J.style.padding="4px 0px 4px 20px";J.style.whiteSpace=
"nowrap";J.style.overflow="hidden";J.style.textOverflow="ellipsis";J.setAttribute("title",F.title+" ("+F.id+")");var R=document.createElement("input");R.setAttribute("type","checkbox");R.checked=b.sidebar.isEntryVisible(F.id);R.defaultChecked=R.checked;J.appendChild(R);mxUtils.write(J," "+F.title);k.appendChild(J);var W=function(O){if(null==O||"INPUT"!=mxEvent.getSource(O).nodeName){m.style.textAlign="center";m.style.padding="0px";m.style.color="";m.innerHTML="";if(null!=F.desc){var V=document.createElement("pre");
V.style.boxSizing="border-box";V.style.fontFamily="inherit";V.style.margin="20px";V.style.right="0px";V.style.textAlign="left";mxUtils.write(V,F.desc);m.appendChild(V)}null!=F.imageCallback?F.imageCallback(m):null!=F.image?m.innerHTML+='<img border="0" src="'+F.image+'"/>':null==F.desc&&(m.style.padding="20px",m.style.color="rgb(179, 179, 179)",mxUtils.write(m,mxResources.get("noPreview")));null!=p&&(p.style.backgroundColor="");p=J;p.style.backgroundColor=Editor.isDarkMode()?"#000000":"#ebf2f9";null!=
-O&&mxEvent.consume(O)}};mxEvent.addListener(J,"click",W);mxEvent.addListener(J,"dblclick",function(O){R.checked=!R.checked;mxEvent.consume(O)});v.push(function(){return R.checked?F.id:null});0==B&&0==H&&W()})(G.entries[H])})(z[B])});e=document.createElement("div");e.className="geDialogTitle";mxUtils.write(e,mxResources.get("shapes"));e.style.position="absolute";e.style.top="0px";e.style.left="0px";e.style.lineHeight="40px";e.style.height="40px";e.style.right="0px";var k=document.createElement("div"),
+O&&mxEvent.consume(O)}};mxEvent.addListener(J,"click",W);mxEvent.addListener(J,"dblclick",function(O){R.checked=!R.checked;mxEvent.consume(O)});v.push(function(){return R.checked?F.id:null});0==B&&0==H&&W()})(G.entries[H])})(A[B])});e=document.createElement("div");e.className="geDialogTitle";mxUtils.write(e,mxResources.get("shapes"));e.style.position="absolute";e.style.top="0px";e.style.left="0px";e.style.lineHeight="40px";e.style.height="40px";e.style.right="0px";var k=document.createElement("div"),
m=document.createElement("div");k.style.position="absolute";k.style.top="40px";k.style.left="0px";k.style.width="202px";k.style.bottom="60px";k.style.overflow="auto";m.style.position="absolute";m.style.left="202px";m.style.right="0px";m.style.top="40px";m.style.bottom="60px";m.style.overflow="auto";m.style.borderLeft="1px solid rgb(211, 211, 211)";m.style.textAlign="center";var p=null,v=[],x=document.createElement("div");x.style.position="relative";x.style.left="0px";x.style.right="0px";u(l);d.style.padding=
-"30px";d.appendChild(e);d.appendChild(k);d.appendChild(m);l=document.createElement("div");l.className="geDialogFooter";l.style.position="absolute";l.style.paddingRight="16px";l.style.color="gray";l.style.left="0px";l.style.right="0px";l.style.bottom="0px";l.style.height="60px";l.style.lineHeight="52px";var A=document.createElement("input");A.setAttribute("type","checkbox");A.style.position="relative";A.style.top="1px";A.checked=b.sidebar.sidebarTitles;A.defaultChecked=A.checked;l.appendChild(A);u=
-document.createElement("span");mxUtils.write(u," "+mxResources.get("labels"));u.style.paddingRight="20px";l.appendChild(u);mxEvent.addListener(u,"click",function(z){A.checked=!A.checked;mxEvent.consume(z)});var y=document.createElement("input");y.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)u=document.createElement("span"),u.style.paddingRight="20px",u.appendChild(y),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),y.style.position="relative",y.style.top="1px",
-y.checked=!0,y.defaultChecked=!0,mxEvent.addListener(u,"click",function(z){mxEvent.getSource(z)!=y&&(y.checked=!y.checked,mxEvent.consume(z))}),l.appendChild(u);u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";e=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var z=[],B=0;B<v.length;B++){var G=v[B].apply(this,arguments);null!=G&&z.push(G)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(B=mxUtils.indexOf(z,".scratchpad"),null!=b.scratchpad!=
-(0<=B&&0<z.splice(B,1).length)&&b.toggleScratchpad(),B=mxUtils.indexOf(z,"search"),mxSettings.settings.search=0<=B&&0<z.splice(B,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),y.checked&&mxSettings.save());b.sidebar.showEntries(z.join(";"),y.checked,!0);b.setSidebarTitles(A.checked,y.checked)});e.className="geBtn gePrimaryBtn"}else{var L=document.createElement("table");u=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";e=document.createElement("tr");
-L.style.width="100%";f=document.createElement("td");t=document.createElement("td");D=document.createElement("td");var N=mxUtils.bind(this,function(z,B,G){var M=document.createElement("input");M.type="checkbox";L.appendChild(M);M.checked=b.sidebar.isEntryVisible(G);var H=document.createElement("span");mxUtils.write(H,B);B=document.createElement("div");B.style.display="block";B.appendChild(M);B.appendChild(H);mxEvent.addListener(H,"click",function(F){M.checked=!M.checked;mxEvent.consume(F)});z.appendChild(B);
-return function(){return M.checked?G:null}});e.appendChild(f);e.appendChild(t);e.appendChild(D);u.appendChild(e);L.appendChild(u);v=[];var K=0;for(u=0;u<l.length;u++)for(e=0;e<l[u].entries.length;e++)K++;var q=[f,t,D],C=0;for(u=0;u<l.length;u++)(function(z){for(var B=0;B<z.entries.length;B++){var G=z.entries[B];v.push(N(q[Math.floor(C/(K/3))],G.title,G.id));C++}})(l[u]);d.appendChild(L);l=document.createElement("div");l.style.marginTop="18px";l.style.textAlign="center";y=document.createElement("input");
-isLocalStorage&&(y.setAttribute("type","checkbox"),y.checked=!0,y.defaultChecked=!0,l.appendChild(y),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),l.appendChild(u),mxEvent.addListener(u,"click",function(z){y.checked=!y.checked;mxEvent.consume(z)}));d.appendChild(l);u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";e=mxUtils.button(mxResources.get("apply"),function(){for(var z=["search"],B=0;B<v.length;B++){var G=
-v[B].apply(this,arguments);null!=G&&z.push(G)}b.sidebar.showEntries(0<z.length?z.join(";"):"",y.checked);b.hideDialog()});e.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right"}b.editor.cancelFirst?(l.appendChild(u),l.appendChild(e)):(l.appendChild(e),l.appendChild(u));d.appendChild(l);this.container=d},PluginsDialog=function(b,f,l,d){function t(){e=!0;if(0==c.length)D.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{D.innerHTML=
-"";for(var x=0;x<c.length;x++){var A=document.createElement("span");A.style.whiteSpace="nowrap";var y=document.createElement("span");y.className="geSprite geSprite-delete";y.style.position="relative";y.style.cursor="pointer";y.style.top="5px";y.style.marginRight="4px";y.style.display="inline-block";A.appendChild(y);mxUtils.write(A,c[x]);D.appendChild(A);mxUtils.br(D);mxEvent.addListener(y,"click",function(L){return function(){b.confirm(mxResources.get("delete")+' "'+c[L]+'"?',function(){null!=l&&
-l(c[L]);c.splice(L,1);t()})}}(x))}}}var u=document.createElement("div"),D=document.createElement("div");D.style.height="180px";D.style.overflow="auto";var c=mxSettings.getPlugins().slice(),e=!1;u.appendChild(D);t();e=!1;var g=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(x){x&&0>mxUtils.indexOf(c,x)&&c.push(x);t()})}:function(){var x=document.createElement("div"),A=document.createElement("span");A.style.marginTop="6px";mxUtils.write(A,mxResources.get("builtinPlugins")+": ");
-x.appendChild(A);var y=document.createElement("select");y.style.width="150px";for(A=0;A<App.publicPlugin.length;A++){var L=document.createElement("option");mxUtils.write(L,App.publicPlugin[A]);L.value=App.publicPlugin[A];y.appendChild(L)}x.appendChild(y);mxUtils.br(x);mxUtils.br(x);A=mxUtils.button(mxResources.get("custom")+"...",function(){var N=new FilenameDialog(b,"",mxResources.get("add"),function(K){b.hideDialog();if(null!=K&&0<K.length){K=K.split(";");for(var q=0;q<K.length;q++){var C=K[q],
-z=App.pluginRegistry[C];null!=z&&(C=z);0<C.length&&0>mxUtils.indexOf(c,C)&&c.push(C)}t()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(N.container,300,80,!0,!0);N.init()});A.className="geBtn";x=new CustomDialog(b,x,mxUtils.bind(this,function(){var N=App.pluginRegistry[y.value];0>mxUtils.indexOf(c,N)&&(c.push(N),t())}),null,null,null,A);b.showDialog(x.container,300,100,!0,!0)});g.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
+"30px";d.appendChild(e);d.appendChild(k);d.appendChild(m);l=document.createElement("div");l.className="geDialogFooter";l.style.position="absolute";l.style.paddingRight="16px";l.style.color="gray";l.style.left="0px";l.style.right="0px";l.style.bottom="0px";l.style.height="60px";l.style.lineHeight="52px";var z=document.createElement("input");z.setAttribute("type","checkbox");z.style.position="relative";z.style.top="1px";z.checked=b.sidebar.sidebarTitles;z.defaultChecked=z.checked;l.appendChild(z);u=
+document.createElement("span");mxUtils.write(u," "+mxResources.get("labels"));u.style.paddingRight="20px";l.appendChild(u);mxEvent.addListener(u,"click",function(A){z.checked=!z.checked;mxEvent.consume(A)});var y=document.createElement("input");y.setAttribute("type","checkbox");if(isLocalStorage||mxClient.IS_CHROMEAPP)u=document.createElement("span"),u.style.paddingRight="20px",u.appendChild(y),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),y.style.position="relative",y.style.top="1px",
+y.checked=!0,y.defaultChecked=!0,mxEvent.addListener(u,"click",function(A){mxEvent.getSource(A)!=y&&(y.checked=!y.checked,mxEvent.consume(A))}),l.appendChild(u);u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";e=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();for(var A=[],B=0;B<v.length;B++){var G=v[B].apply(this,arguments);null!=G&&A.push(G)}"1"==urlParams.sketch&&b.isSettingsEnabled()&&(B=mxUtils.indexOf(A,".scratchpad"),null!=b.scratchpad!=
+(0<=B&&0<A.splice(B,1).length)&&b.toggleScratchpad(),B=mxUtils.indexOf(A,"search"),mxSettings.settings.search=0<=B&&0<A.splice(B,1).length,b.sidebar.showPalette("search",mxSettings.settings.search),y.checked&&mxSettings.save());b.sidebar.showEntries(A.join(";"),y.checked,!0);b.setSidebarTitles(z.checked,y.checked)});e.className="geBtn gePrimaryBtn"}else{var L=document.createElement("table");u=document.createElement("tbody");d.style.height="100%";d.style.overflow="auto";e=document.createElement("tr");
+L.style.width="100%";f=document.createElement("td");t=document.createElement("td");E=document.createElement("td");var N=mxUtils.bind(this,function(A,B,G){var M=document.createElement("input");M.type="checkbox";L.appendChild(M);M.checked=b.sidebar.isEntryVisible(G);var H=document.createElement("span");mxUtils.write(H,B);B=document.createElement("div");B.style.display="block";B.appendChild(M);B.appendChild(H);mxEvent.addListener(H,"click",function(F){M.checked=!M.checked;mxEvent.consume(F)});A.appendChild(B);
+return function(){return M.checked?G:null}});e.appendChild(f);e.appendChild(t);e.appendChild(E);u.appendChild(e);L.appendChild(u);v=[];var K=0;for(u=0;u<l.length;u++)for(e=0;e<l[u].entries.length;e++)K++;var q=[f,t,E],C=0;for(u=0;u<l.length;u++)(function(A){for(var B=0;B<A.entries.length;B++){var G=A.entries[B];v.push(N(q[Math.floor(C/(K/3))],G.title,G.id));C++}})(l[u]);d.appendChild(L);l=document.createElement("div");l.style.marginTop="18px";l.style.textAlign="center";y=document.createElement("input");
+isLocalStorage&&(y.setAttribute("type","checkbox"),y.checked=!0,y.defaultChecked=!0,l.appendChild(y),u=document.createElement("span"),mxUtils.write(u," "+mxResources.get("rememberThisSetting")),l.appendChild(u),mxEvent.addListener(u,"click",function(A){y.checked=!y.checked;mxEvent.consume(A)}));d.appendChild(l);u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});u.className="geBtn";e=mxUtils.button(mxResources.get("apply"),function(){for(var A=["search"],B=0;B<v.length;B++){var G=
+v[B].apply(this,arguments);null!=G&&A.push(G)}b.sidebar.showEntries(0<A.length?A.join(";"):"",y.checked);b.hideDialog()});e.className="geBtn gePrimaryBtn";l=document.createElement("div");l.style.marginTop="26px";l.style.textAlign="right"}b.editor.cancelFirst?(l.appendChild(u),l.appendChild(e)):(l.appendChild(e),l.appendChild(u));d.appendChild(l);this.container=d},PluginsDialog=function(b,f,l,d){function t(){e=!0;if(0==c.length)E.innerHTML=mxUtils.htmlEntities(mxResources.get("noPlugins"));else{E.innerHTML=
+"";for(var x=0;x<c.length;x++){var z=document.createElement("span");z.style.whiteSpace="nowrap";var y=document.createElement("span");y.className="geSprite geSprite-delete";y.style.position="relative";y.style.cursor="pointer";y.style.top="5px";y.style.marginRight="4px";y.style.display="inline-block";z.appendChild(y);mxUtils.write(z,c[x]);E.appendChild(z);mxUtils.br(E);mxEvent.addListener(y,"click",function(L){return function(){b.confirm(mxResources.get("delete")+' "'+c[L]+'"?',function(){null!=l&&
+l(c[L]);c.splice(L,1);t()})}}(x))}}}var u=document.createElement("div"),E=document.createElement("div");E.style.height="180px";E.style.overflow="auto";var c=mxSettings.getPlugins().slice(),e=!1;u.appendChild(E);t();e=!1;var g=mxUtils.button(mxResources.get("add"),null!=f?function(){f(function(x){x&&0>mxUtils.indexOf(c,x)&&c.push(x);t()})}:function(){var x=document.createElement("div"),z=document.createElement("span");z.style.marginTop="6px";mxUtils.write(z,mxResources.get("builtinPlugins")+": ");
+x.appendChild(z);var y=document.createElement("select");y.style.width="150px";for(z=0;z<App.publicPlugin.length;z++){var L=document.createElement("option");mxUtils.write(L,App.publicPlugin[z]);L.value=App.publicPlugin[z];y.appendChild(L)}x.appendChild(y);mxUtils.br(x);mxUtils.br(x);z=mxUtils.button(mxResources.get("custom")+"...",function(){var N=new FilenameDialog(b,"",mxResources.get("add"),function(K){b.hideDialog();if(null!=K&&0<K.length){K=K.split(";");for(var q=0;q<K.length;q++){var C=K[q],
+A=App.pluginRegistry[C];null!=A&&(C=A);0<C.length&&0>mxUtils.indexOf(c,C)&&c.push(C)}t()}},mxResources.get("enterValue")+" ("+mxResources.get("url")+")");b.showDialog(N.container,300,80,!0,!0);N.init()});z.className="geBtn";x=new CustomDialog(b,x,mxUtils.bind(this,function(){var N=App.pluginRegistry[y.value];0>mxUtils.indexOf(c,N)&&(c.push(N),t())}),null,null,null,z);b.showDialog(x.container,300,100,!0,!0)});g.className="geBtn";var k=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});
k.className="geBtn";var m=mxUtils.button(d?mxResources.get("close"):mxResources.get("apply"),function(){e?(mxSettings.setPlugins(c),mxSettings.save(),b.hideDialog(),b.alert(mxResources.get("restartForChangeRequired"))):b.hideDialog()});m.className="geBtn gePrimaryBtn";var p=document.createElement("div");p.style.marginTop="14px";p.style.textAlign="right";var v=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/plugins")});v.className="geBtn";b.isOffline()&&
-!mxClient.IS_CHROMEAPP&&(v.style.display="none");p.appendChild(v);b.editor.cancelFirst?(d||p.appendChild(k),p.appendChild(g),p.appendChild(m)):(p.appendChild(g),p.appendChild(m),d||p.appendChild(k));u.appendChild(p);this.container=u},CropImageDialog=function(b,f,l,d){function t(){var z=y.checked,B=L.checked,G=v.geometry,M=e.width,H=e.height,F=(300-M)/2,J=(300-H)/2;G.x<F?(G.width-=F-G.x,G.x=F):G.x+G.width>F+M&&(G.width=F+M-G.x,G.x=Math.min(G.x,F+M));G.y<J?(G.height-=J-G.y,G.y=J):G.y+G.height>J+H&&
-(G.height=J+H-G.y,G.y=Math.min(G.y,J+H));var R=(G.x-F)/M*100;M=100-(G.x+G.width-F)/M*100;F=(G.y-J)/H*100;G=100-(G.y+G.height-J)/H*100;return"inset("+mxUtils.format(F)+"% "+mxUtils.format(M)+"% "+mxUtils.format(G)+"% "+mxUtils.format(R)+"%"+(z?" round "+p+"%":B?" round 50%":"")+")"}function u(z){null!=k&&(!0!==z&&(k.model.setGeometry(v,m.clone()),p=5,K.value=p),k.model.setStyle(v,x+t()),k.selectAll(),N.style.visibility=y.checked?"visible":"hidden")}var D=document.createElement("div"),c=document.createElement("div");
-c.style.height="300px";c.style.width="300px";c.style.display="inline-flex";c.style.justifyContent="center";c.style.alignItems="center";c.style.position="absolute";var e=document.createElement("img");e.onload=function(){function z(){k.model.setStyle(v,x+t())}k=new Graph(g);k.autoExtend=!1;k.autoScroll=!1;k.setGridEnabled(!1);k.setEnabled(!0);k.setPanning(!1);k.setConnectable(!1);k.getRubberband().setEnabled(!1);k.graphHandler.allowLivePreview=!1;var B=k.createVertexHandler;k.createVertexHandler=function(){var I=
+!mxClient.IS_CHROMEAPP&&(v.style.display="none");p.appendChild(v);b.editor.cancelFirst?(d||p.appendChild(k),p.appendChild(g),p.appendChild(m)):(p.appendChild(g),p.appendChild(m),d||p.appendChild(k));u.appendChild(p);this.container=u},CropImageDialog=function(b,f,l,d){function t(){var A=y.checked,B=L.checked,G=v.geometry,M=e.width,H=e.height,F=(300-M)/2,J=(300-H)/2;G.x<F?(G.width-=F-G.x,G.x=F):G.x+G.width>F+M&&(G.width=F+M-G.x,G.x=Math.min(G.x,F+M));G.y<J?(G.height-=J-G.y,G.y=J):G.y+G.height>J+H&&
+(G.height=J+H-G.y,G.y=Math.min(G.y,J+H));var R=(G.x-F)/M*100;M=100-(G.x+G.width-F)/M*100;F=(G.y-J)/H*100;G=100-(G.y+G.height-J)/H*100;return"inset("+mxUtils.format(F)+"% "+mxUtils.format(M)+"% "+mxUtils.format(G)+"% "+mxUtils.format(R)+"%"+(A?" round "+p+"%":B?" round 50%":"")+")"}function u(A){null!=k&&(!0!==A&&(k.model.setGeometry(v,m.clone()),p=5,K.value=p),k.model.setStyle(v,x+t()),k.selectAll(),N.style.visibility=y.checked?"visible":"hidden")}var E=document.createElement("div"),c=document.createElement("div");
+c.style.height="300px";c.style.width="300px";c.style.display="inline-flex";c.style.justifyContent="center";c.style.alignItems="center";c.style.position="absolute";var e=document.createElement("img");e.onload=function(){function A(){k.model.setStyle(v,x+t())}k=new Graph(g);k.autoExtend=!1;k.autoScroll=!1;k.setGridEnabled(!1);k.setEnabled(!0);k.setPanning(!1);k.setConnectable(!1);k.getRubberband().setEnabled(!1);k.graphHandler.allowLivePreview=!1;var B=k.createVertexHandler;k.createVertexHandler=function(){var I=
B.apply(this,arguments);I.livePreview=!1;return I};if(null!=l)try{if("inset"==l.substring(0,5)){var G=v.geometry,M=e.width,H=e.height,F=(300-M)/2,J=(300-H)/2,R=l.match(/\(([^)]+)\)/)[1].split(/[ ,]+/),W=parseFloat(R[0]),O=parseFloat(R[1]),V=parseFloat(R[2]),U=parseFloat(R[3]);isFinite(W)&&isFinite(O)&&isFinite(V)&&isFinite(U)?(G.x=U/100*M+F,G.y=W/100*H+J,G.width=(100-O)/100*M+F-G.x,G.height=(100-V)/100*H+J-G.y,"round"==R[4]?"50%"==R[5]?L.setAttribute("checked","checked"):(p=parseInt(R[5]),K.value=
-p,y.setAttribute("checked","checked"),N.style.visibility="visible"):A.setAttribute("checked","checked")):l=null}else l=null}catch(I){}v.style=x+(l?l:t());v.vertex=!0;k.addCell(v,null,null,null,null);k.selectAll();k.addListener(mxEvent.CELLS_MOVED,z);k.addListener(mxEvent.CELLS_RESIZED,z);var X=k.graphHandler.mouseUp,n=k.graphHandler.mouseDown;k.graphHandler.mouseUp=function(){X.apply(this,arguments);g.style.backgroundColor="#fff9"};k.graphHandler.mouseDown=function(){n.apply(this,arguments);g.style.backgroundColor=
-""};k.dblClick=function(){};var E=k.getSelectionModel().changeSelection;k.getSelectionModel().changeSelection=function(){E.call(this,[v],[v])}};e.onerror=function(){e.onload=null;e.src=Editor.errorImage};e.setAttribute("src",f);e.style.maxWidth="300px";e.style.maxHeight="300px";c.appendChild(e);D.appendChild(c);var g=document.createElement("div");g.style.width="300px";g.style.height="300px";g.style.overflow="hidden";g.style.backgroundColor="#fff9";D.appendChild(g);var k=null,m=new mxGeometry(100,
-100,100,100),p=5,v=new mxCell("",m.clone(),""),x="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",A=document.createElement("input");A.setAttribute("type","radio");A.setAttribute("id","croppingRect");A.setAttribute("name","croppingShape");A.setAttribute("checked","checked");A.style.margin="5px";D.appendChild(A);f=document.createElement("label");f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));D.appendChild(f);
-var y=document.createElement("input");y.setAttribute("type","radio");y.setAttribute("id","croppingRounded");y.setAttribute("name","croppingShape");y.style.margin="5px";D.appendChild(y);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));D.appendChild(f);var L=document.createElement("input");L.setAttribute("type","radio");L.setAttribute("id","croppingEllipse");L.setAttribute("name","croppingShape");L.style.margin="5px";D.appendChild(L);
-f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));D.appendChild(f);mxEvent.addListener(A,"change",u);mxEvent.addListener(y,"change",u);mxEvent.addListener(L,"change",u);var N=document.createElement("div");N.style.textAlign="center";N.style.visibility="hidden";var K=document.createElement("input");K.setAttribute("type","range");K.setAttribute("min","1");K.setAttribute("max","49");K.setAttribute("value",p);K.setAttribute("title",mxResources.get("arcSize"));
-N.appendChild(K);D.appendChild(N);mxEvent.addListener(K,"change",function(){p=this.value;u(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){d(t(),v.geometry.width,v.geometry.height);b.hideDialog()});c.className="geBtn gePrimaryBtn";var q=mxUtils.button(mxResources.get("reset"),function(){d(null,e.width,e.height);b.hideDialog()});q.className="geBtn";var C=document.createElement("div");C.style.marginTop=
-"10px";C.style.textAlign="right";b.editor.cancelFirst?(C.appendChild(f),C.appendChild(q),C.appendChild(c)):(C.appendChild(q),C.appendChild(c),C.appendChild(f));D.appendChild(C);this.container=D},EditGeometryDialog=function(b,f){var l=b.editor.graph,d=1==f.length?l.getCellGeometry(f[0]):null,t=document.createElement("div"),u=document.createElement("table"),D=document.createElement("tbody"),c=document.createElement("tr"),e=document.createElement("td"),g=document.createElement("td");u.style.paddingLeft=
-"6px";mxUtils.write(e,mxResources.get("relative")+":");var k=document.createElement("input");k.setAttribute("type","checkbox");null!=d&&d.relative&&(k.setAttribute("checked","checked"),k.defaultChecked=!0);this.init=function(){k.focus()};g.appendChild(k);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("left")+":");var m=document.createElement("input");m.setAttribute("type",
-"text");m.style.width="100px";m.value=null!=d?d.x:"";g.appendChild(m);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.y:"";g.appendChild(p);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");
-g=document.createElement("td");mxUtils.write(e,mxResources.get("dx")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=d&&null!=d.offset?d.offset.x:"";g.appendChild(v);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("dy")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";
-x.value=null!=d&&null!=d.offset?d.offset.y:"";g.appendChild(x);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("width")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.width="100px";A.value=null!=d?d.width:"";g.appendChild(A);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=
-document.createElement("td");mxUtils.write(e,mxResources.get("height")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=d?d.height:"";g.appendChild(y);c.appendChild(e);c.appendChild(g);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("rotation")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.width="100px";L.value=
-1==f.length?mxUtils.getValue(l.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(L);c.appendChild(e);c.appendChild(g);D.appendChild(c);u.appendChild(D);t.appendChild(u);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var N=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();l.getModel().beginUpdate();try{for(var K=0;K<f.length;K++){var q=l.getCellGeometry(f[K]);null!=q&&(q=q.clone(),l.isCellMovable(f[K])&&(q.relative=k.checked,
-0<mxUtils.trim(m.value).length&&(q.x=Number(m.value)),0<mxUtils.trim(p.value).length&&(q.y=Number(p.value)),0<mxUtils.trim(v.value).length&&(null==q.offset&&(q.offset=new mxPoint),q.offset.x=Number(v.value)),0<mxUtils.trim(x.value).length&&(null==q.offset&&(q.offset=new mxPoint),q.offset.y=Number(x.value))),l.isCellResizable(f[K])&&(0<mxUtils.trim(A.value).length&&(q.width=Number(A.value)),0<mxUtils.trim(y.value).length&&(q.height=Number(y.value))),l.getModel().setGeometry(f[K],q));0<mxUtils.trim(L.value).length&&
-l.setCellStyles(mxConstants.STYLE_ROTATION,Number(L.value),[f[K]])}}finally{l.getModel().endUpdate()}});N.className="geBtn gePrimaryBtn";mxEvent.addListener(t,"keypress",function(K){13==K.keyCode&&N.click()});u=document.createElement("div");u.style.marginTop="20px";u.style.textAlign="right";b.editor.cancelFirst?(u.appendChild(d),u.appendChild(N)):(u.appendChild(N),u.appendChild(d));t.appendChild(u);this.container=t},LibraryDialog=function(b,f,l,d,t,u){function D(B){for(B=document.elementFromPoint(B.clientX,
-B.clientY);null!=B&&B.parentNode!=v;)B=B.parentNode;var G=null;if(null!=B){var M=v.firstChild;for(G=0;null!=M&&M!=B;)M=M.nextSibling,G++}return G}function c(B,G,M,H,F,J,R,W,O){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==B&&null!=R||null==A[B]){var V=function(){P.innerHTML="";P.style.cursor="pointer";P.style.whiteSpace="nowrap";P.style.textOverflow="ellipsis";mxUtils.write(P,null!=T.title&&0<T.title.length?T.title:mxResources.get("untitled"));P.style.color=null==T.title||0==
-T.title.length?"#d0d0d0":""};v.style.backgroundImage="";x.style.display="none";var U=F,X=J;if(F>b.maxImageSize||J>b.maxImageSize){var n=Math.min(1,Math.min(b.maxImageSize/Math.max(1,F)),b.maxImageSize/Math.max(1,J));F*=n;J*=n}U>X?(X=Math.round(100*X/U),U=100):(U=Math.round(100*U/X),X=100);var E=document.createElement("div");E.setAttribute("draggable","true");E.style.display="inline-block";E.style.position="relative";E.style.padding="0 12px";E.style.cursor="move";mxUtils.setPrefixedStyle(E.style,"transition",
-"transform .1s ease-in-out");if(null!=B){var I=document.createElement("img");I.setAttribute("src",K.convert(B));I.style.width=U+"px";I.style.height=X+"px";I.style.margin="10px";I.style.paddingBottom=Math.floor((100-X)/2)+"px";I.style.paddingLeft=Math.floor((100-U)/2)+"px";E.appendChild(I)}else if(null!=R){var S=b.stringToCells(Graph.decompress(R.xml));0<S.length&&(b.sidebar.createThumb(S,100,100,E,null,!0,!1),E.firstChild.style.display="inline-block",E.firstChild.style.cursor="")}var Q=document.createElement("img");
-Q.setAttribute("src",Editor.closeBlackImage);Q.setAttribute("border","0");Q.setAttribute("title",mxResources.get("delete"));Q.setAttribute("align","top");Q.style.paddingTop="4px";Q.style.position="absolute";Q.style.marginLeft="-12px";Q.style.zIndex="1";Q.style.cursor="pointer";mxEvent.addListener(Q,"dragstart",function(Z){mxEvent.consume(Z)});(function(Z,fa,aa){mxEvent.addListener(Q,"click",function(wa){A[fa]=null;for(var la=0;la<k.length;la++)if(null!=k[la].data&&k[la].data==fa||null!=k[la].xml&&
-null!=aa&&k[la].xml==aa.xml){k.splice(la,1);break}E.parentNode.removeChild(Z);0==k.length&&(v.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",x.style.display="");mxEvent.consume(wa)});mxEvent.addListener(Q,"dblclick",function(wa){mxEvent.consume(wa)})})(E,B,R);E.appendChild(Q);E.style.marginBottom="30px";var P=document.createElement("div");P.style.position="absolute";P.style.boxSizing="border-box";P.style.bottom="-18px";P.style.left="10px";P.style.right="10px";P.style.backgroundColor=
-Editor.isDarkMode()?Editor.darkColor:"#ffffff";P.style.overflow="hidden";P.style.textAlign="center";var T=null;null!=B?(T={data:B,w:F,h:J,title:O},null!=W&&(T.aspect=W),A[B]=I,k.push(T)):null!=R&&(R.aspect="fixed",k.push(R),T=R);mxEvent.addListener(P,"keydown",function(Z){13==Z.keyCode&&null!=N&&(N(),N=null,mxEvent.consume(Z))});V();E.appendChild(P);mxEvent.addListener(P,"mousedown",function(Z){"true"!=P.getAttribute("contentEditable")&&mxEvent.consume(Z)});S=function(Z){if(mxClient.IS_IOS||mxClient.IS_FF||
-!(null==document.documentMode||9<document.documentMode)){var fa=new FilenameDialog(b,T.title||"",mxResources.get("ok"),function(aa){null!=aa&&(T.title=aa,V())},mxResources.get("enterValue"));b.showDialog(fa.container,300,80,!0,!0);fa.init();mxEvent.consume(Z)}else if("true"!=P.getAttribute("contentEditable")){null!=N&&(N(),N=null);if(null==T.title||0==T.title.length)P.innerHTML="";P.style.textOverflow="";P.style.whiteSpace="";P.style.cursor="text";P.style.color="";P.setAttribute("contentEditable",
-"true");mxUtils.setPrefixedStyle(P.style,"user-select","text");P.focus();document.execCommand("selectAll",!1,null);N=function(){P.removeAttribute("contentEditable");P.style.cursor="pointer";T.title=P.innerHTML;V()};mxEvent.consume(Z)}};mxEvent.addListener(P,"click",S);mxEvent.addListener(E,"dblclick",S);v.appendChild(E);mxEvent.addListener(E,"dragstart",function(Z){null==B&&null!=R&&(Q.style.visibility="hidden",P.style.visibility="hidden");mxClient.IS_FF&&null!=R.xml&&Z.dataTransfer.setData("Text",
-R.xml);y=D(Z);mxClient.IS_GC&&(E.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(E.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(E,30);Q.style.visibility="";P.style.visibility=""},0)});mxEvent.addListener(E,"dragend",function(Z){"hidden"==Q.style.visibility&&(Q.style.visibility="",P.style.visibility="");y=null;mxUtils.setOpacity(E,100);mxUtils.setPrefixedStyle(E.style,"transform",null)})}else q||(q=!0,b.handleError({message:mxResources.get("fileExists")}));else{F=
-!1;try{if(U=mxUtils.parseXml(B),"mxlibrary"==U.documentElement.nodeName){X=JSON.parse(mxUtils.getTextContent(U.documentElement));if(null!=X&&0<X.length)for(var Y=0;Y<X.length;Y++)null!=X[Y].xml?c(null,null,0,0,0,0,X[Y]):c(X[Y].data,null,0,0,X[Y].w,X[Y].h,null,"fixed",X[Y].title);F=!0}else if("mxfile"==U.documentElement.nodeName){var ca=U.documentElement.getElementsByTagName("diagram");for(Y=0;Y<ca.length;Y++){X=mxUtils.getTextContent(ca[Y]);S=b.stringToCells(Graph.decompress(X));var ia=b.editor.graph.getBoundingBoxFromGeometry(S);
-c(null,null,0,0,0,0,{xml:X,w:ia.width,h:ia.height})}F=!0}}catch(Z){}F||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function e(B){B.dataTransfer.dropEffect=null!=y?"move":"copy";B.stopPropagation();B.preventDefault()}function g(B){B.stopPropagation();B.preventDefault();q=!1;L=D(B);if(null!=y)null!=L&&L<v.children.length?(k.splice(L>y?L-1:L,0,k.splice(y,1)[0]),v.insertBefore(v.children[y],v.children[L])):(k.push(k.splice(y,1)[0]),v.appendChild(v.children[y]));
+p,y.setAttribute("checked","checked"),N.style.visibility="visible"):z.setAttribute("checked","checked")):l=null}else l=null}catch(I){}v.style=x+(l?l:t());v.vertex=!0;k.addCell(v,null,null,null,null);k.selectAll();k.addListener(mxEvent.CELLS_MOVED,A);k.addListener(mxEvent.CELLS_RESIZED,A);var Y=k.graphHandler.mouseUp,n=k.graphHandler.mouseDown;k.graphHandler.mouseUp=function(){Y.apply(this,arguments);g.style.backgroundColor="#fff9"};k.graphHandler.mouseDown=function(){n.apply(this,arguments);g.style.backgroundColor=
+""};k.dblClick=function(){};var D=k.getSelectionModel().changeSelection;k.getSelectionModel().changeSelection=function(){D.call(this,[v],[v])}};e.onerror=function(){e.onload=null;e.src=Editor.errorImage};e.setAttribute("src",f);e.style.maxWidth="300px";e.style.maxHeight="300px";c.appendChild(e);E.appendChild(c);var g=document.createElement("div");g.style.width="300px";g.style.height="300px";g.style.overflow="hidden";g.style.backgroundColor="#fff9";E.appendChild(g);var k=null,m=new mxGeometry(100,
+100,100,100),p=5,v=new mxCell("",m.clone(),""),x="shape=image;fillColor=none;rotatable=0;cloneable=0;deletable=0;image="+f.replace(";base64","")+";clipPath=",z=document.createElement("input");z.setAttribute("type","radio");z.setAttribute("id","croppingRect");z.setAttribute("name","croppingShape");z.setAttribute("checked","checked");z.style.margin="5px";E.appendChild(z);f=document.createElement("label");f.setAttribute("for","croppingRect");mxUtils.write(f,mxResources.get("rectangle"));E.appendChild(f);
+var y=document.createElement("input");y.setAttribute("type","radio");y.setAttribute("id","croppingRounded");y.setAttribute("name","croppingShape");y.style.margin="5px";E.appendChild(y);f=document.createElement("label");f.setAttribute("for","croppingRounded");mxUtils.write(f,mxResources.get("rounded"));E.appendChild(f);var L=document.createElement("input");L.setAttribute("type","radio");L.setAttribute("id","croppingEllipse");L.setAttribute("name","croppingShape");L.style.margin="5px";E.appendChild(L);
+f=document.createElement("label");f.setAttribute("for","croppingEllipse");mxUtils.write(f,mxResources.get("ellipse"));E.appendChild(f);mxEvent.addListener(z,"change",u);mxEvent.addListener(y,"change",u);mxEvent.addListener(L,"change",u);var N=document.createElement("div");N.style.textAlign="center";N.style.visibility="hidden";var K=document.createElement("input");K.setAttribute("type","range");K.setAttribute("min","1");K.setAttribute("max","49");K.setAttribute("value",p);K.setAttribute("title",mxResources.get("arcSize"));
+N.appendChild(K);E.appendChild(N);mxEvent.addListener(K,"change",function(){p=this.value;u(!0)});f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";c=mxUtils.button(mxResources.get("apply"),function(){d(t(),v.geometry.width,v.geometry.height);b.hideDialog()});c.className="geBtn gePrimaryBtn";var q=mxUtils.button(mxResources.get("reset"),function(){d(null,e.width,e.height);b.hideDialog()});q.className="geBtn";var C=document.createElement("div");C.style.marginTop=
+"10px";C.style.textAlign="right";b.editor.cancelFirst?(C.appendChild(f),C.appendChild(q),C.appendChild(c)):(C.appendChild(q),C.appendChild(c),C.appendChild(f));E.appendChild(C);this.container=E},EditGeometryDialog=function(b,f){var l=b.editor.graph,d=1==f.length?l.getCellGeometry(f[0]):null,t=document.createElement("div"),u=document.createElement("table"),E=document.createElement("tbody"),c=document.createElement("tr"),e=document.createElement("td"),g=document.createElement("td");u.style.paddingLeft=
+"6px";mxUtils.write(e,mxResources.get("relative")+":");var k=document.createElement("input");k.setAttribute("type","checkbox");null!=d&&d.relative&&(k.setAttribute("checked","checked"),k.defaultChecked=!0);this.init=function(){k.focus()};g.appendChild(k);c.appendChild(e);c.appendChild(g);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("left")+":");var m=document.createElement("input");m.setAttribute("type",
+"text");m.style.width="100px";m.value=null!=d?d.x:"";g.appendChild(m);c.appendChild(e);c.appendChild(g);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("top")+":");var p=document.createElement("input");p.setAttribute("type","text");p.style.width="100px";p.value=null!=d?d.y:"";g.appendChild(p);c.appendChild(e);c.appendChild(g);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");
+g=document.createElement("td");mxUtils.write(e,mxResources.get("dx")+":");var v=document.createElement("input");v.setAttribute("type","text");v.style.width="100px";v.value=null!=d&&null!=d.offset?d.offset.x:"";g.appendChild(v);c.appendChild(e);c.appendChild(g);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("dy")+":");var x=document.createElement("input");x.setAttribute("type","text");x.style.width="100px";
+x.value=null!=d&&null!=d.offset?d.offset.y:"";g.appendChild(x);c.appendChild(e);c.appendChild(g);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("width")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.width="100px";z.value=null!=d?d.width:"";g.appendChild(z);c.appendChild(e);c.appendChild(g);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=
+document.createElement("td");mxUtils.write(e,mxResources.get("height")+":");var y=document.createElement("input");y.setAttribute("type","text");y.style.width="100px";y.value=null!=d?d.height:"";g.appendChild(y);c.appendChild(e);c.appendChild(g);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");g=document.createElement("td");mxUtils.write(e,mxResources.get("rotation")+":");var L=document.createElement("input");L.setAttribute("type","text");L.style.width="100px";L.value=
+1==f.length?mxUtils.getValue(l.getCellStyle(f[0]),mxConstants.STYLE_ROTATION,0):"";g.appendChild(L);c.appendChild(e);c.appendChild(g);E.appendChild(c);u.appendChild(E);t.appendChild(u);d=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});d.className="geBtn";var N=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();l.getModel().beginUpdate();try{for(var K=0;K<f.length;K++){var q=l.getCellGeometry(f[K]);null!=q&&(q=q.clone(),l.isCellMovable(f[K])&&(q.relative=k.checked,
+0<mxUtils.trim(m.value).length&&(q.x=Number(m.value)),0<mxUtils.trim(p.value).length&&(q.y=Number(p.value)),0<mxUtils.trim(v.value).length&&(null==q.offset&&(q.offset=new mxPoint),q.offset.x=Number(v.value)),0<mxUtils.trim(x.value).length&&(null==q.offset&&(q.offset=new mxPoint),q.offset.y=Number(x.value))),l.isCellResizable(f[K])&&(0<mxUtils.trim(z.value).length&&(q.width=Number(z.value)),0<mxUtils.trim(y.value).length&&(q.height=Number(y.value))),l.getModel().setGeometry(f[K],q));0<mxUtils.trim(L.value).length&&
+l.setCellStyles(mxConstants.STYLE_ROTATION,Number(L.value),[f[K]])}}finally{l.getModel().endUpdate()}});N.className="geBtn gePrimaryBtn";mxEvent.addListener(t,"keypress",function(K){13==K.keyCode&&N.click()});u=document.createElement("div");u.style.marginTop="20px";u.style.textAlign="right";b.editor.cancelFirst?(u.appendChild(d),u.appendChild(N)):(u.appendChild(N),u.appendChild(d));t.appendChild(u);this.container=t},LibraryDialog=function(b,f,l,d,t,u){function E(B){for(B=document.elementFromPoint(B.clientX,
+B.clientY);null!=B&&B.parentNode!=v;)B=B.parentNode;var G=null;if(null!=B){var M=v.firstChild;for(G=0;null!=M&&M!=B;)M=M.nextSibling,G++}return G}function c(B,G,M,H,F,J,R,W,O){try{if(b.spinner.stop(),null==G||"image/"==G.substring(0,6))if(null==B&&null!=R||null==z[B]){var V=function(){P.innerHTML="";P.style.cursor="pointer";P.style.whiteSpace="nowrap";P.style.textOverflow="ellipsis";mxUtils.write(P,null!=T.title&&0<T.title.length?T.title:mxResources.get("untitled"));P.style.color=null==T.title||0==
+T.title.length?"#d0d0d0":""};v.style.backgroundImage="";x.style.display="none";var U=F,Y=J;if(F>b.maxImageSize||J>b.maxImageSize){var n=Math.min(1,Math.min(b.maxImageSize/Math.max(1,F)),b.maxImageSize/Math.max(1,J));F*=n;J*=n}U>Y?(Y=Math.round(100*Y/U),U=100):(U=Math.round(100*U/Y),Y=100);var D=document.createElement("div");D.setAttribute("draggable","true");D.style.display="inline-block";D.style.position="relative";D.style.padding="0 12px";D.style.cursor="move";mxUtils.setPrefixedStyle(D.style,"transition",
+"transform .1s ease-in-out");if(null!=B){var I=document.createElement("img");I.setAttribute("src",K.convert(B));I.style.width=U+"px";I.style.height=Y+"px";I.style.margin="10px";I.style.paddingBottom=Math.floor((100-Y)/2)+"px";I.style.paddingLeft=Math.floor((100-U)/2)+"px";D.appendChild(I)}else if(null!=R){var S=b.stringToCells(Graph.decompress(R.xml));0<S.length&&(b.sidebar.createThumb(S,100,100,D,null,!0,!1),D.firstChild.style.display="inline-block",D.firstChild.style.cursor="")}var Q=document.createElement("img");
+Q.setAttribute("src",Editor.closeBlackImage);Q.setAttribute("border","0");Q.setAttribute("title",mxResources.get("delete"));Q.setAttribute("align","top");Q.style.paddingTop="4px";Q.style.position="absolute";Q.style.marginLeft="-12px";Q.style.zIndex="1";Q.style.cursor="pointer";mxEvent.addListener(Q,"dragstart",function(Z){mxEvent.consume(Z)});(function(Z,ka,da){mxEvent.addListener(Q,"click",function(fa){z[ka]=null;for(var ma=0;ma<k.length;ma++)if(null!=k[ma].data&&k[ma].data==ka||null!=k[ma].xml&&
+null!=da&&k[ma].xml==da.xml){k.splice(ma,1);break}D.parentNode.removeChild(Z);0==k.length&&(v.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')",x.style.display="");mxEvent.consume(fa)});mxEvent.addListener(Q,"dblclick",function(fa){mxEvent.consume(fa)})})(D,B,R);D.appendChild(Q);D.style.marginBottom="30px";var P=document.createElement("div");P.style.position="absolute";P.style.boxSizing="border-box";P.style.bottom="-18px";P.style.left="10px";P.style.right="10px";P.style.backgroundColor=
+Editor.isDarkMode()?Editor.darkColor:"#ffffff";P.style.overflow="hidden";P.style.textAlign="center";var T=null;null!=B?(T={data:B,w:F,h:J,title:O},null!=W&&(T.aspect=W),z[B]=I,k.push(T)):null!=R&&(R.aspect="fixed",k.push(R),T=R);mxEvent.addListener(P,"keydown",function(Z){13==Z.keyCode&&null!=N&&(N(),N=null,mxEvent.consume(Z))});V();D.appendChild(P);mxEvent.addListener(P,"mousedown",function(Z){"true"!=P.getAttribute("contentEditable")&&mxEvent.consume(Z)});S=function(Z){if(mxClient.IS_IOS||mxClient.IS_FF||
+!(null==document.documentMode||9<document.documentMode)){var ka=new FilenameDialog(b,T.title||"",mxResources.get("ok"),function(da){null!=da&&(T.title=da,V())},mxResources.get("enterValue"));b.showDialog(ka.container,300,80,!0,!0);ka.init();mxEvent.consume(Z)}else if("true"!=P.getAttribute("contentEditable")){null!=N&&(N(),N=null);if(null==T.title||0==T.title.length)P.innerHTML="";P.style.textOverflow="";P.style.whiteSpace="";P.style.cursor="text";P.style.color="";P.setAttribute("contentEditable",
+"true");mxUtils.setPrefixedStyle(P.style,"user-select","text");P.focus();document.execCommand("selectAll",!1,null);N=function(){P.removeAttribute("contentEditable");P.style.cursor="pointer";T.title=P.innerHTML;V()};mxEvent.consume(Z)}};mxEvent.addListener(P,"click",S);mxEvent.addListener(D,"dblclick",S);v.appendChild(D);mxEvent.addListener(D,"dragstart",function(Z){null==B&&null!=R&&(Q.style.visibility="hidden",P.style.visibility="hidden");mxClient.IS_FF&&null!=R.xml&&Z.dataTransfer.setData("Text",
+R.xml);y=E(Z);mxClient.IS_GC&&(D.style.opacity="0.9");window.setTimeout(function(){mxUtils.setPrefixedStyle(D.style,"transform","scale(0.5,0.5)");mxUtils.setOpacity(D,30);Q.style.visibility="";P.style.visibility=""},0)});mxEvent.addListener(D,"dragend",function(Z){"hidden"==Q.style.visibility&&(Q.style.visibility="",P.style.visibility="");y=null;mxUtils.setOpacity(D,100);mxUtils.setPrefixedStyle(D.style,"transform",null)})}else q||(q=!0,b.handleError({message:mxResources.get("fileExists")}));else{F=
+!1;try{if(U=mxUtils.parseXml(B),"mxlibrary"==U.documentElement.nodeName){Y=JSON.parse(mxUtils.getTextContent(U.documentElement));if(null!=Y&&0<Y.length)for(var X=0;X<Y.length;X++)null!=Y[X].xml?c(null,null,0,0,0,0,Y[X]):c(Y[X].data,null,0,0,Y[X].w,Y[X].h,null,"fixed",Y[X].title);F=!0}else if("mxfile"==U.documentElement.nodeName){var ba=U.documentElement.getElementsByTagName("diagram");for(X=0;X<ba.length;X++){Y=mxUtils.getTextContent(ba[X]);S=b.stringToCells(Graph.decompress(Y));var ja=b.editor.graph.getBoundingBoxFromGeometry(S);
+c(null,null,0,0,0,0,{xml:Y,w:ja.width,h:ja.height})}F=!0}}catch(Z){}F||(b.spinner.stop(),b.handleError({message:mxResources.get("errorLoadingFile")}))}}catch(Z){}return null}function e(B){B.dataTransfer.dropEffect=null!=y?"move":"copy";B.stopPropagation();B.preventDefault()}function g(B){B.stopPropagation();B.preventDefault();q=!1;L=E(B);if(null!=y)null!=L&&L<v.children.length?(k.splice(L>y?L-1:L,0,k.splice(y,1)[0]),v.insertBefore(v.children[y],v.children[L])):(k.push(k.splice(y,1)[0]),v.appendChild(v.children[y]));
else if(0<B.dataTransfer.files.length)b.importFiles(B.dataTransfer.files,0,0,b.maxImageSize,C(B));else if(0<=mxUtils.indexOf(B.dataTransfer.types,"text/uri-list")){var G=decodeURIComponent(B.dataTransfer.getData("text/uri-list"));(/(\.jpg)($|\?)/i.test(G)||/(\.png)($|\?)/i.test(G)||/(\.gif)($|\?)/i.test(G)||/(\.svg)($|\?)/i.test(G))&&b.loadImage(G,function(M){c(G,null,0,0,M.width,M.height);v.scrollTop=v.scrollHeight})}B.stopPropagation();B.preventDefault()}var k=[];l=document.createElement("div");
l.style.height="100%";var m=document.createElement("div");m.style.whiteSpace="nowrap";m.style.height="40px";l.appendChild(m);mxUtils.write(m,mxResources.get("filename")+":");null==f&&(f=b.defaultLibraryName+".xml");var p=document.createElement("input");p.setAttribute("value",f);p.style.marginRight="20px";p.style.marginLeft="10px";p.style.width="500px";null==t||t.isRenamable()||p.setAttribute("disabled","true");this.init=function(){if(null==t||t.isRenamable())p.focus(),mxClient.IS_GC||mxClient.IS_FF||
5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null)};m.appendChild(p);var v=document.createElement("div");v.style.borderWidth="1px 0px 1px 0px";v.style.borderColor="#d3d3d3";v.style.borderStyle="solid";v.style.marginTop="6px";v.style.overflow="auto";v.style.height="340px";v.style.backgroundPosition="center center";v.style.backgroundRepeat="no-repeat";0==k.length&&Graph.fileSupport&&(v.style.backgroundImage="url('"+IMAGE_PATH+"/droptarget.png')");var x=document.createElement("div");
-x.style.position="absolute";x.style.width="640px";x.style.top="260px";x.style.textAlign="center";x.style.fontSize="22px";x.style.color="#a0c3ff";mxUtils.write(x,mxResources.get("dragImagesHere"));l.appendChild(x);var A={},y=null,L=null,N=null;f=function(B){"true"!=mxEvent.getSource(B).getAttribute("contentEditable")&&null!=N&&(N(),N=null,mxEvent.consume(B))};mxEvent.addListener(v,"mousedown",f);mxEvent.addListener(v,"pointerdown",f);mxEvent.addListener(v,"touchstart",f);var K=new mxUrlConverter,q=
+x.style.position="absolute";x.style.width="640px";x.style.top="260px";x.style.textAlign="center";x.style.fontSize="22px";x.style.color="#a0c3ff";mxUtils.write(x,mxResources.get("dragImagesHere"));l.appendChild(x);var z={},y=null,L=null,N=null;f=function(B){"true"!=mxEvent.getSource(B).getAttribute("contentEditable")&&null!=N&&(N(),N=null,mxEvent.consume(B))};mxEvent.addListener(v,"mousedown",f);mxEvent.addListener(v,"pointerdown",f);mxEvent.addListener(v,"touchstart",f);var K=new mxUrlConverter,q=
!1;if(null!=d)for(f=0;f<d.length;f++)m=d[f],c(m.data,null,0,0,m.w,m.h,m,m.aspect,m.title);mxEvent.addListener(v,"dragleave",function(B){x.style.cursor="";for(var G=mxEvent.getSource(B);null!=G;){if(G==v||G==x){B.stopPropagation();B.preventDefault();break}G=G.parentNode}});var C=function(B){return function(G,M,H,F,J,R,W,O,V){null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V.name)||/(\.vs(x|sx?))($|\?)/i.test(V.name))?b.importVisio(V,mxUtils.bind(this,function(U){c(U,M,H,F,J,R,W,"fixed",mxEvent.isAltDown(B)?
null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," "))})):null!=V&&(new XMLHttpRequest).upload&&b.isRemoteFileFormat(G,V.name)?b.isExternalDataComms()?b.parseFile(V,mxUtils.bind(this,function(U){4==U.readyState&&(b.spinner.stop(),200<=U.status&&299>=U.status&&(c(U.responseText,M,H,F,J,R,W,"fixed",mxEvent.isAltDown(B)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),v.scrollTop=v.scrollHeight))})):(b.spinner.stop(),b.showError(mxResources.get("error"),mxResources.get("notInOffline"))):
(c(G,M,H,F,J,R,W,"fixed",mxEvent.isAltDown(B)?null:W.substring(0,W.lastIndexOf(".")).replace(/_/g," ")),v.scrollTop=v.scrollHeight)}};mxEvent.addListener(v,"dragover",e);mxEvent.addListener(v,"drop",g);mxEvent.addListener(x,"dragover",e);mxEvent.addListener(x,"drop",g);l.appendChild(v);d=document.createElement("div");d.style.textAlign="right";d.style.marginTop="20px";f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog(!0)});f.setAttribute("id","btnCancel");f.className="geBtn";b.editor.cancelFirst&&
d.appendChild(f);"draw.io"!=b.getServiceName()||null==t||t.constructor!=DriveLibrary&&t.constructor!=GitHubLibrary||(m=mxUtils.button(mxResources.get("link"),function(){b.spinner.spin(document.body,mxResources.get("loading"))&&t.getPublicUrl(function(B){b.spinner.stop();if(null!=B){var G=b.getSearch("create title mode url drive splash state clibs ui".split(" "));G+=(0==G.length?"?":"&")+"splash=0&clibs=U"+encodeURIComponent(B);B=new EmbedDialog(b,window.location.protocol+"//"+window.location.host+
"/"+G,null,null,null,null,"Check out the library I made using @drawio");b.showDialog(B.container,450,240,!0);B.init()}else t.constructor==DriveLibrary?b.showError(mxResources.get("error"),mxResources.get("diagramIsNotPublic"),mxResources.get("share"),mxUtils.bind(this,function(){b.drive.showPermissions(t.getId())}),null,mxResources.get("ok"),mxUtils.bind(this,function(){})):b.handleError({message:mxResources.get("diagramIsNotPublic")})})}),m.className="geBtn",d.appendChild(m));m=mxUtils.button(mxResources.get("export"),
-function(){var B=b.createLibraryDataFromImages(k),G=p.value;/(\.xml)$/i.test(G)||(G+=".xml");b.isLocalFileSave()?b.saveLocalFile(B,G,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(G)+"&format=xml&xml="+encodeURIComponent(B))).simulate(document,"_blank")});m.setAttribute("id","btnDownload");m.className="geBtn";d.appendChild(m);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var z=document.createElement("input");z.setAttribute("multiple","multiple");
-z.setAttribute("type","file");mxEvent.addListener(z,"change",function(B){q=!1;b.importFiles(z.files,0,0,b.maxImageSize,function(G,M,H,F,J,R,W,O,V){null!=z.files&&(C(B)(G,M,H,F,J,R,W,O,V),z.type="",z.type="file",z.value="")});v.scrollTop=v.scrollHeight});z.style.display="none";document.body.appendChild(z);b.libDlgFileInputElt=z}m=mxUtils.button(mxResources.get("import"),function(){null!=N&&(N(),N=null);b.libDlgFileInputElt.click()});m.setAttribute("id","btnAddImage");m.className="geBtn";d.appendChild(m)}m=
+function(){var B=b.createLibraryDataFromImages(k),G=p.value;/(\.xml)$/i.test(G)||(G+=".xml");b.isLocalFileSave()?b.saveLocalFile(B,G,"text/xml",null,null,!0,null,"xml"):(new mxXmlRequest(SAVE_URL,"filename="+encodeURIComponent(G)+"&format=xml&xml="+encodeURIComponent(B))).simulate(document,"_blank")});m.setAttribute("id","btnDownload");m.className="geBtn";d.appendChild(m);if(Graph.fileSupport){if(null==b.libDlgFileInputElt){var A=document.createElement("input");A.setAttribute("multiple","multiple");
+A.setAttribute("type","file");mxEvent.addListener(A,"change",function(B){q=!1;b.importFiles(A.files,0,0,b.maxImageSize,function(G,M,H,F,J,R,W,O,V){null!=A.files&&(C(B)(G,M,H,F,J,R,W,O,V),A.type="",A.type="file",A.value="")});v.scrollTop=v.scrollHeight});A.style.display="none";document.body.appendChild(A);b.libDlgFileInputElt=A}m=mxUtils.button(mxResources.get("import"),function(){null!=N&&(N(),N=null);b.libDlgFileInputElt.click()});m.setAttribute("id","btnAddImage");m.className="geBtn";d.appendChild(m)}m=
mxUtils.button(mxResources.get("addImages"),function(){null!=N&&(N(),N=null);b.showImageDialog(mxResources.get("addImageUrl"),"",function(B,G,M){q=!1;if(null!=B){if("data:image/"==B.substring(0,11)){var H=B.indexOf(",");0<H&&(B=B.substring(0,H)+";base64,"+B.substring(H+1))}c(B,null,0,0,G,M);v.scrollTop=v.scrollHeight}})});m.setAttribute("id","btnAddImageUrl");m.className="geBtn";d.appendChild(m);this.saveBtnClickHandler=function(B,G,M,H){b.saveLibrary(B,G,M,H)};m=mxUtils.button(mxResources.get("save"),
-mxUtils.bind(this,function(){null!=N&&(N(),N=null);this.saveBtnClickHandler(p.value,k,t,u)}));m.setAttribute("id","btnSave");m.className="geBtn gePrimaryBtn";d.appendChild(m);b.editor.cancelFirst||d.appendChild(f);l.appendChild(d);this.container=l},EditShapeDialog=function(b,f,l,d,t){d=null!=d?d:300;t=null!=t?t:120;var u=document.createElement("table"),D=document.createElement("tbody");u.style.cellPadding="4px";var c=document.createElement("tr");var e=document.createElement("td");e.setAttribute("colspan",
-"2");e.style.fontSize="10pt";mxUtils.write(e,l);c.appendChild(e);D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");var g=document.createElement("textarea");g.style.outline="none";g.style.resize="none";g.style.width=d-200+"px";g.style.height=t+"px";this.textarea=g;this.init=function(){g.focus();g.scrollTop=0};e.appendChild(g);c.appendChild(e);e=document.createElement("td");l=document.createElement("div");l.style.position="relative";l.style.border="1px solid gray";l.style.top=
+mxUtils.bind(this,function(){null!=N&&(N(),N=null);this.saveBtnClickHandler(p.value,k,t,u)}));m.setAttribute("id","btnSave");m.className="geBtn gePrimaryBtn";d.appendChild(m);b.editor.cancelFirst||d.appendChild(f);l.appendChild(d);this.container=l},EditShapeDialog=function(b,f,l,d,t){d=null!=d?d:300;t=null!=t?t:120;var u=document.createElement("table"),E=document.createElement("tbody");u.style.cellPadding="4px";var c=document.createElement("tr");var e=document.createElement("td");e.setAttribute("colspan",
+"2");e.style.fontSize="10pt";mxUtils.write(e,l);c.appendChild(e);E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");var g=document.createElement("textarea");g.style.outline="none";g.style.resize="none";g.style.width=d-200+"px";g.style.height=t+"px";this.textarea=g;this.init=function(){g.focus();g.scrollTop=0};e.appendChild(g);c.appendChild(e);e=document.createElement("td");l=document.createElement("div");l.style.position="relative";l.style.border="1px solid gray";l.style.top=
"6px";l.style.width="200px";l.style.height=t+4+"px";l.style.overflow="hidden";l.style.marginBottom="16px";mxEvent.disableContextMenu(l);e.appendChild(l);var k=new Graph(l);k.setEnabled(!1);var m=b.editor.graph.cloneCell(f);k.addCells([m]);l=k.view.getState(m);var p="";null!=l.shape&&null!=l.shape.stencil&&(p=mxUtils.getPrettyXml(l.shape.stencil.desc));mxUtils.write(g,p||"");l=k.getGraphBounds();t=Math.min(160/l.width,(t-40)/l.height);k.view.scaleAndTranslate(t,20/t-l.x,20/t-l.y);c.appendChild(e);
-D.appendChild(c);c=document.createElement("tr");e=document.createElement("td");e.setAttribute("colspan","2");e.style.paddingTop="2px";e.style.whiteSpace="nowrap";e.setAttribute("align","right");b.isOffline()||(t=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),t.className="geBtn",e.appendChild(t));t=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&e.appendChild(t);
-var v=function(x,A,y){var L=g.value,N=mxUtils.parseXml(L);L=mxUtils.getPrettyXml(N.documentElement);N=N.documentElement.getElementsByTagName("parsererror");if(null!=N&&0<N.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(y&&b.hideDialog(),N=!x.model.contains(A),!y||N||L!=p){L=Graph.compress(L);x.getModel().beginUpdate();try{if(N){var K=b.editor.graph.getFreeInsertPoint();A.geometry.x=K.x;A.geometry.y=K.y;x.addCell(A)}x.setCellStyles(mxConstants.STYLE_SHAPE,
-"stencil("+L+")",[A])}catch(q){throw q;}finally{x.getModel().endUpdate()}N&&(x.setSelectionCell(A),x.scrollCellToVisible(A))}};l=mxUtils.button(mxResources.get("preview"),function(){v(k,m,!1)});l.className="geBtn";e.appendChild(l);l=mxUtils.button(mxResources.get("apply"),function(){v(b.editor.graph,f,!0)});l.className="geBtn gePrimaryBtn";e.appendChild(l);b.editor.cancelFirst||e.appendChild(t);c.appendChild(e);D.appendChild(c);u.appendChild(D);this.container=u},CustomDialog=function(b,f,l,d,t,u,
-D,c,e,g,k){var m=document.createElement("div");m.appendChild(f);var p=document.createElement("div");p.style.marginTop="30px";p.style.textAlign="center";null!=D&&p.appendChild(D);b.isOffline()||null==u||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink(u)}),f.className="geBtn",p.appendChild(f));e=mxUtils.button(e||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});e.className="geBtn";c&&(e.style.display="none");b.editor.cancelFirst&&p.appendChild(e);t=mxUtils.button(t||
-mxResources.get("ok"),mxUtils.bind(this,function(){g||b.hideDialog(null,null,this.container);if(null!=l){var v=l();if("string"===typeof v){b.showError(mxResources.get("error"),v);return}}g&&b.hideDialog(null,null,this.container)}));p.appendChild(t);t.className="geBtn gePrimaryBtn";b.editor.cancelFirst||p.appendChild(e);if(null!=k)for(c=0;c<k.length;c++)(function(v,x,A){v=mxUtils.button(v,function(y){x(y)});null!=A&&v.setAttribute("title",A);v.className="geBtn";p.appendChild(v)})(k[c][0],k[c][1],k[c][2]);
-m.appendChild(p);this.cancelBtn=e;this.okButton=t;this.container=m},TemplatesDialog=function(b,f,l,d,t,u,D,c,e,g,k,m,p,v,x){function A(ja){Ia.innerHTML=mxUtils.htmlEntities(ja);Ia.style.display="block";setTimeout(function(){Ia.style.display="none"},4E3)}function y(){null!=X&&(X.style.fontWeight="normal",X.style.textDecoration="none",n=X,X=null)}function L(ja,oa,ba,da,na,ka,ma){if(-1<ja.className.indexOf("geTempDlgRadioBtnActive"))return!1;ja.className+=" geTempDlgRadioBtnActive";O.querySelector(".geTempDlgRadioBtn[data-id="+
-da+"]").className="geTempDlgRadioBtn "+(ma?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");O.querySelector("."+oa).src="/images/"+ba+"-sel.svg";O.querySelector("."+na).src="/images/"+ka+".svg";return!0}function N(ja,oa,ba,da){function na(ha,Ma){null==ma?(ha=/^https?:\/\//.test(ha)&&!b.editor.isCorsEnabledForUrl(ha)?PROXY_URL+"?url="+encodeURIComponent(ha):TEMPLATE_PATH+"/"+ha,mxUtils.get(ha,mxUtils.bind(this,function(Ja){200<=Ja.getStatus()&&299>=Ja.getStatus()&&(ma=Ja.getText());Ma(ma)}))):Ma(ma)}
-function ka(ha,Ma,Ja){if(null!=ha&&mxUtils.isAncestorNode(document.body,oa)&&(ha=mxUtils.parseXml(ha),ha=Editor.extractGraphModel(ha.documentElement,!0),null!=ha)){"mxfile"==ha.nodeName&&(ha=Editor.parseDiagramNode(ha.getElementsByTagName("diagram")[0]));var Pa=new mxCodec(ha.ownerDocument),Sa=new mxGraphModel;Pa.decode(ha,Sa);ha=Sa.root.getChildAt(0).children||[];b.sidebar.createTooltip(oa,ha,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||
-document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ja.title?mxResources.get(ja.title,null,ja.title):null,!0,new mxPoint(Ma,Ja),!0,null,!0);var Ga=document.createElement("div");Ga.className="geTempDlgDialogMask";O.appendChild(Ga);var Ha=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ga&&(O.removeChild(Ga),Ga=null,Ha.apply(this,arguments),b.sidebar.hideTooltip=Ha)};mxEvent.addListener(Ga,"click",function(){b.sidebar.hideTooltip()})}}var ma=null;if(Ca||b.sidebar.currentElt==
-oa)b.sidebar.hideTooltip();else{var sa=function(ha){Ca&&b.sidebar.currentElt==oa&&ka(ha,mxEvent.getClientX(da),mxEvent.getClientY(da));Ca=!1;ba.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=oa;Ca=!0;ba.src="/images/aui-wait.gif";ja.isExt?e(ja,sa,function(){A(mxResources.get("cantLoadPrev"));Ca=!1;ba.src="/images/icon-search.svg"}):na(ja.url,sa)}}function K(ja,oa,ba){if(null!=E){for(var da=E.className.split(" "),na=0;na<da.length;na++)if(-1<da[na].indexOf("Active")){da.splice(na,
-1);break}E.className=da.join(" ")}null!=ja?(E=ja,E.className+=" "+oa,I=ba,Fa.className="geTempDlgCreateBtn"):(I=E=null,Fa.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function q(ja,oa){if(null!=I){var ba=function(sa){ma.isExternal?e(ma,function(ha){da(ha,sa)},na):ma.url?mxUtils.get(TEMPLATE_PATH+"/"+ma.url,mxUtils.bind(this,function(ha){200<=ha.getStatus()&&299>=ha.getStatus()?da(ha.getText(),sa):na()})):da(b.emptyDiagramXml,sa)},da=function(sa,ha){x||b.hideDialog(!0);f(sa,ha,ma,oa)},na=function(){A(mxResources.get("cannotLoad"));
-ka()},ka=function(){I=ma;Fa.className="geTempDlgCreateBtn";oa&&(Ka.className="geTempDlgOpenBtn")},ma=I;I=null;"boolean"!==typeof oa&&(oa=ma.isExternal&&m);1==ja?g(ma.url,ma):oa?(Ka.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ba()):(Fa.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ja=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ja=new FilenameDialog(b,b.defaultFilename+".drawio",
-mxResources.get("ok"),ba,ja,function(sa){var ha=null!=sa&&0<sa.length;return ha&&x?(ba(sa),!1):ha},null,null,null,ka,v?null:[]),b.showDialog(ja.container,350,80,!0,!0),ja.init())}}function C(ja){Fa.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||ja?"create":"copy"));ja=ja?"none":"";m&&(Ka.style.display=ja);for(var oa=O.querySelectorAll(".geTempDlgLinkToDiagram"),ba=0;ba<oa.length;ba++)oa[ba].style.display=ja}function z(ja,oa,ba,da,na){na||(aa.innerHTML="",K(),T=ja,Y=da);var ka=null;if(ba){ka=document.createElement("table");
-ka.className="geTempDlgDiagramsListGrid";var ma=document.createElement("tr"),sa=document.createElement("th");sa.style.width="50%";sa.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));ma.appendChild(sa);sa=document.createElement("th");sa.style.width="25%";sa.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));ma.appendChild(sa);sa=document.createElement("th");sa.style.width="25%";sa.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));ma.appendChild(sa);ka.appendChild(ma);
-aa.appendChild(ka)}for(ma=0;ma<ja.length;ma++){ja[ma].isExternal=!oa;var ha=ja[ma].url,Ma=(sa=mxUtils.htmlEntities(oa?mxResources.get(ja[ma].title,null,ja[ma].title):ja[ma].title))||ja[ma].url,Ja=ja[ma].imgUrl,Pa=mxUtils.htmlEntities(ja[ma].changedBy||""),Sa="";ja[ma].lastModifiedOn&&(Sa=b.timeSince(new Date(ja[ma].lastModifiedOn)),null==Sa&&(Sa=mxResources.get("lessThanAMinute")),Sa=mxUtils.htmlEntities(mxResources.get("timeAgo",[Sa],"{1} ago")));Ja||(Ja=TEMPLATE_PATH+"/"+ha.substring(0,ha.length-
-4)+".png");ha=ba?50:15;null!=sa&&sa.length>ha&&(sa=sa.substring(0,ha)+"&hellip;");if(ba){var Ga=document.createElement("tr");Ja=document.createElement("td");var Ha=document.createElement("img");Ha.src="/images/icon-search.svg";Ha.className="geTempDlgDiagramListPreviewBtn";Ha.setAttribute("title",mxResources.get("preview"));na||Ja.appendChild(Ha);Ma=document.createElement("span");Ma.className="geTempDlgDiagramTitle";Ma.innerHTML=sa;Ja.appendChild(Ma);Ga.appendChild(Ja);Ja=document.createElement("td");
-Ja.innerHTML=Pa;Ga.appendChild(Ja);Ja=document.createElement("td");Ja.innerHTML=Sa;Ga.appendChild(Ja);ka.appendChild(Ga);null==E&&(C(oa),K(Ga,"geTempDlgDiagramsListGridActive",ja[ma]));(function(La,Ta,Ua){mxEvent.addListener(Ga,"click",function(){E!=Ta&&(C(oa),K(Ta,"geTempDlgDiagramsListGridActive",La))});mxEvent.addListener(Ga,"dblclick",q);mxEvent.addListener(Ha,"click",function(Za){N(La,Ta,Ua,Za)})})(ja[ma],Ga,Ha)}else{var Oa=document.createElement("div");Oa.className="geTempDlgDiagramTile";Oa.setAttribute("title",
-Ma);null==E&&(C(oa),K(Oa,"geTempDlgDiagramTileActive",ja[ma]));Pa=document.createElement("div");Pa.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Ra=document.createElement("img");Ra.style.display="none";(function(La,Ta,Ua){Ra.onload=function(){Ta.className="geTempDlgDiagramTileImg";La.style.display=""};Ra.onerror=function(){this.src!=Ua?this.src=Ua:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Ra,Pa,Ja?Ja.replace(".drawio.xml","").replace(".drawio",
-"").replace(".xml",""):"");Ra.src=Ja;Pa.appendChild(Ra);Oa.appendChild(Pa);Pa=document.createElement("div");Pa.className="geTempDlgDiagramTileLbl";Pa.innerHTML=null!=sa?sa:"";Oa.appendChild(Pa);Ha=document.createElement("img");Ha.src="/images/icon-search.svg";Ha.className="geTempDlgDiagramPreviewBtn";Ha.setAttribute("title",mxResources.get("preview"));na||Oa.appendChild(Ha);(function(La,Ta,Ua){mxEvent.addListener(Oa,"click",function(){E!=Ta&&(C(oa),K(Ta,"geTempDlgDiagramTileActive",La))});mxEvent.addListener(Oa,
-"dblclick",q);mxEvent.addListener(Ha,"click",function(Za){N(La,Ta,Ua,Za)})})(ja[ma],Oa,Ha);aa.appendChild(Oa)}}for(var Ya in da)ja=da[Ya],0<ja.length&&(na=document.createElement("div"),na.className="geTempDlgImportCat",na.innerHTML=mxResources.get(Ya,null,Ya),aa.appendChild(na),z(ja,oa,ba,null,!0))}function B(ja,oa){Da.innerHTML="";K();var ba=Math.floor(Da.offsetWidth/150)-1;oa=!oa&&ja.length>ba?ba:ja.length;for(var da=0;da<oa;da++){var na=ja[da];na.isCategory=!0;var ka=document.createElement("div"),
-ma=mxResources.get(na.title);null==ma&&(ma=na.title.substring(0,1).toUpperCase()+na.title.substring(1));ka.className="geTempDlgNewDiagramCatItem";ka.setAttribute("title",ma);ma=mxUtils.htmlEntities(ma);15<ma.length&&(ma=ma.substring(0,15)+"&hellip;");null==E&&(C(!0),K(ka,"geTempDlgNewDiagramCatItemActive",na));var sa=document.createElement("div");sa.className="geTempDlgNewDiagramCatItemImg";var ha=document.createElement("img");ha.src=NEW_DIAGRAM_CATS_PATH+"/"+na.img;sa.appendChild(ha);ka.appendChild(sa);
-sa=document.createElement("div");sa.className="geTempDlgNewDiagramCatItemLbl";sa.innerHTML=ma;ka.appendChild(sa);Da.appendChild(ka);(function(Ma,Ja){mxEvent.addListener(ka,"click",function(){E!=Ja&&(C(!0),K(Ja,"geTempDlgNewDiagramCatItemActive",Ma))});mxEvent.addListener(ka,"dblclick",q)})(na,ka)}ka=document.createElement("div");ka.className="geTempDlgNewDiagramCatItem";ma=mxResources.get("showAllTemps");ka.setAttribute("title",ma);sa=document.createElement("div");sa.className="geTempDlgNewDiagramCatItemImg";
-sa.innerHTML="...";sa.style.fontSize="32px";ka.appendChild(sa);sa=document.createElement("div");sa.className="geTempDlgNewDiagramCatItemLbl";sa.innerHTML=ma;ka.appendChild(sa);Da.appendChild(ka);mxEvent.addListener(ka,"click",function(){function Ma(){var Pa=Ja.querySelector(".geTemplateDrawioCatLink");null!=Pa?Pa.click():setTimeout(Ma,200)}Z=!0;var Ja=O.querySelector(".geTemplatesList");Ja.style.display="block";za.style.width="";Qa.style.display="";Qa.value="";ca=null;Ma()});fa.style.display=ja.length<=
-ba?"none":""}function G(ja,oa,ba){function da(Ra,Ya){var La=mxResources.get(Ra);null==La&&(La=Ra.substring(0,1).toUpperCase()+Ra.substring(1));Ra=La+" ("+Ya.length+")";var Ta=La=mxUtils.htmlEntities(La);15<La.length&&(La=La.substring(0,15)+"&hellip;");return{lbl:La+" ("+Ya.length+")",fullLbl:Ra,lblOnly:Ta}}function na(Ra,Ya,La,Ta,Ua){mxEvent.addListener(La,"click",function(){X!=La&&(null!=X?(X.style.fontWeight="normal",X.style.textDecoration="none"):(ua.style.display="none",Ba.style.minHeight="100%"),
-X=La,X.style.fontWeight="bold",X.style.textDecoration="underline",za.scrollTop=0,V&&(U=!0),wa.innerHTML=Ya,la.style.display="none",z(Ua?oa[Ra]:Ta?pa[Ra][Ta]:ja[Ra],Ua?!1:!0))})}var ka=O.querySelector(".geTemplatesList");if(0<ba){ba=document.createElement("div");ba.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ba,mxResources.get("custom"));ka.appendChild(ba);for(var ma in oa){ba=document.createElement("div");var sa=oa[ma];
-sa=da(ma,sa);ba.className="geTemplateCatLink";ba.setAttribute("title",sa.fullLbl);ba.innerHTML=sa.lbl;ka.appendChild(ba);na(ma,sa.lblOnly,ba,null,!0)}ba=document.createElement("div");ba.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(ba,"draw.io");ka.appendChild(ba)}for(ma in ja){var ha=pa[ma],Ma=ba=document.createElement(ha?"ul":"div");sa=ja[ma];sa=da(ma,sa);if(null!=ha){var Ja=document.createElement("li"),Pa=document.createElement("div");
-Pa.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Pa.style.padding="0";Pa.setAttribute("title",sa.fullLbl);Pa.innerHTML=sa.lbl;Ma=Pa;Ja.appendChild(Pa);var Sa=document.createElement("ul");Sa.className="geTempTreeNested";Sa.style.visibility="hidden";for(var Ga in ha){var Ha=document.createElement("li"),Oa=da(Ga,ha[Ga]);Ha.setAttribute("title",Oa.fullLbl);Ha.innerHTML=Oa.lbl;Ha.className="geTemplateCatLink";Ha.style.padding="0";Ha.style.margin="0";na(ma,Oa.lblOnly,Ha,Ga);Sa.appendChild(Ha)}Ja.appendChild(Sa);
-ba.className="geTempTree";ba.appendChild(Ja);(function(Ra,Ya){mxEvent.addListener(Ya,"click",function(){for(var La=Ra.querySelectorAll("li"),Ta=0;Ta<La.length;Ta++)La[Ta].style.margin="";Ra.style.visibility="visible";Ra.classList.toggle("geTempTreeActive");Ra.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Ua=0;Ua<La.length;Ua++)La[Ua].style.margin="0";Ra.style.visibility="hidden"},250);Ya.classList.toggle("geTempTreeCaret-down")})})(Sa,Pa)}else ba.className="geTemplateCatLink geTemplateDrawioCatLink",
-ba.setAttribute("title",sa.fullLbl),ba.innerHTML=sa.lbl;ka.appendChild(ba);na(ma,sa.lblOnly,Ma)}}function M(){mxUtils.get(d,function(ja){if(!Na){Na=!0;ja=ja.getXml().documentElement.firstChild;for(var oa={};null!=ja;){if("undefined"!==typeof ja.getAttribute)if("clibs"==ja.nodeName){for(var ba=ja.getAttribute("name"),da=ja.getElementsByTagName("add"),na=[],ka=0;ka<da.length;ka++)na.push(encodeURIComponent(mxUtils.getTextContent(da[ka])));null!=ba&&0<na.length&&(oa[ba]=na.join(";"))}else if(na=ja.getAttribute("url"),
-null!=na){da=ja.getAttribute("section");ba=ja.getAttribute("subsection");if(null==da&&(ka=na.indexOf("/"),da=na.substring(0,ka),null==ba)){var ma=na.indexOf("/",ka+1);-1<ma&&(ba=na.substring(ka+1,ma))}ka=ya[da];null==ka&&(xa++,ka=[],ya[da]=ka);na=ja.getAttribute("clibs");null!=oa[na]&&(na=oa[na]);na={url:ja.getAttribute("url"),libs:ja.getAttribute("libs"),title:ja.getAttribute("title")||ja.getAttribute("name"),preview:ja.getAttribute("preview"),clibs:na,tags:ja.getAttribute("tags")};ka.push(na);null!=
-ba&&(ka=pa[da],null==ka&&(ka={},pa[da]=ka),da=ka[ba],null==da&&(da=[],ka[ba]=da),da.push(na))}ja=ja.nextSibling}G(ya,ea,va)}})}function H(ja){D&&(za.scrollTop=0,aa.innerHTML="",Ea.spin(aa),U=!1,V=!0,wa.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ca=null,D(qa,function(){A(mxResources.get("cannotLoad"));qa([])},ja?null:u))}function F(ja){if(""==ja)null!=n&&(n.click(),n=null);else{if(null==TemplatesDialog.tagsList[d]){var oa={};for(Ma in ya)for(var ba=ya[Ma],da=0;da<ba.length;da++){var na=
-ba[da];if(null!=na.tags)for(var ka=na.tags.toLowerCase().split(";"),ma=0;ma<ka.length;ma++)null==oa[ka[ma]]&&(oa[ka[ma]]=[]),oa[ka[ma]].push(na)}TemplatesDialog.tagsList[d]=oa}var sa=ja.toLowerCase().split(" ");oa=TemplatesDialog.tagsList[d];if(0<va&&null==oa.__tagsList__){for(Ma in ea)for(ba=ea[Ma],da=0;da<ba.length;da++)for(na=ba[da],ka=na.title.split(" "),ka.push(Ma),ma=0;ma<ka.length;ma++){var ha=ka[ma].toLowerCase();null==oa[ha]&&(oa[ha]=[]);oa[ha].push(na)}oa.__tagsList__=!0}var Ma=[];ba={};
-for(da=ka=0;da<sa.length;da++)if(0<sa[da].length){ha=oa[sa[da]];var Ja={};Ma=[];if(null!=ha)for(ma=0;ma<ha.length;ma++)na=ha[ma],0==ka==(null==ba[na.url])&&(Ja[na.url]=!0,Ma.push(na));ba=Ja;ka++}0==Ma.length?wa.innerHTML=mxResources.get("noResultsFor",[ja]):z(Ma,!0)}}function J(ja){if(ca!=ja||Q!=ia)y(),za.scrollTop=0,aa.innerHTML="",wa.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(ja)+'"',ta=null,Z?F(ja):c&&(ja?(Ea.spin(aa),U=!1,V=!0,c(ja,qa,function(){A(mxResources.get("searchFailed"));
-qa([])},Q?null:u)):H(Q)),ca=ja,ia=Q}function R(ja){null!=ta&&clearTimeout(ta);13==ja.keyCode?J(Qa.value):ta=setTimeout(function(){J(Qa.value)},1E3)}var W='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(c?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
+E.appendChild(c);c=document.createElement("tr");e=document.createElement("td");e.setAttribute("colspan","2");e.style.paddingTop="2px";e.style.whiteSpace="nowrap";e.setAttribute("align","right");b.isOffline()||(t=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/doc/faq/shape-complex-create-edit")}),t.className="geBtn",e.appendChild(t));t=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});t.className="geBtn";b.editor.cancelFirst&&e.appendChild(t);
+var v=function(x,z,y){var L=g.value,N=mxUtils.parseXml(L);L=mxUtils.getPrettyXml(N.documentElement);N=N.documentElement.getElementsByTagName("parsererror");if(null!=N&&0<N.length)b.showError(mxResources.get("error"),mxResources.get("containsValidationErrors"),mxResources.get("ok"));else if(y&&b.hideDialog(),N=!x.model.contains(z),!y||N||L!=p){L=Graph.compress(L);x.getModel().beginUpdate();try{if(N){var K=b.editor.graph.getFreeInsertPoint();z.geometry.x=K.x;z.geometry.y=K.y;x.addCell(z)}x.setCellStyles(mxConstants.STYLE_SHAPE,
+"stencil("+L+")",[z])}catch(q){throw q;}finally{x.getModel().endUpdate()}N&&(x.setSelectionCell(z),x.scrollCellToVisible(z))}};l=mxUtils.button(mxResources.get("preview"),function(){v(k,m,!1)});l.className="geBtn";e.appendChild(l);l=mxUtils.button(mxResources.get("apply"),function(){v(b.editor.graph,f,!0)});l.className="geBtn gePrimaryBtn";e.appendChild(l);b.editor.cancelFirst||e.appendChild(t);c.appendChild(e);E.appendChild(c);u.appendChild(E);this.container=u},CustomDialog=function(b,f,l,d,t,u,
+E,c,e,g,k){var m=document.createElement("div");m.appendChild(f);var p=document.createElement("div");p.style.marginTop="30px";p.style.textAlign="center";null!=E&&p.appendChild(E);b.isOffline()||null==u||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink(u)}),f.className="geBtn",p.appendChild(f));e=mxUtils.button(e||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d()});e.className="geBtn";c&&(e.style.display="none");b.editor.cancelFirst&&p.appendChild(e);t=mxUtils.button(t||
+mxResources.get("ok"),mxUtils.bind(this,function(){g||b.hideDialog(null,null,this.container);if(null!=l){var v=l();if("string"===typeof v){b.showError(mxResources.get("error"),v);return}}g&&b.hideDialog(null,null,this.container)}));p.appendChild(t);t.className="geBtn gePrimaryBtn";b.editor.cancelFirst||p.appendChild(e);if(null!=k)for(c=0;c<k.length;c++)(function(v,x,z){v=mxUtils.button(v,function(y){x(y)});null!=z&&v.setAttribute("title",z);v.className="geBtn";p.appendChild(v)})(k[c][0],k[c][1],k[c][2]);
+m.appendChild(p);this.cancelBtn=e;this.okButton=t;this.container=m},TemplatesDialog=function(b,f,l,d,t,u,E,c,e,g,k,m,p,v,x){function z(ha){Ia.innerHTML=mxUtils.htmlEntities(ha);Ia.style.display="block";setTimeout(function(){Ia.style.display="none"},4E3)}function y(){null!=Y&&(Y.style.fontWeight="normal",Y.style.textDecoration="none",n=Y,Y=null)}function L(ha,qa,aa,ca,na,la,oa){if(-1<ha.className.indexOf("geTempDlgRadioBtnActive"))return!1;ha.className+=" geTempDlgRadioBtnActive";O.querySelector(".geTempDlgRadioBtn[data-id="+
+ca+"]").className="geTempDlgRadioBtn "+(oa?"geTempDlgRadioBtnLarge":"geTempDlgRadioBtnSmall");O.querySelector("."+qa).src="/images/"+aa+"-sel.svg";O.querySelector("."+na).src="/images/"+la+".svg";return!0}function N(ha,qa,aa,ca){function na(ia,Da){null==oa?(ia=/^https?:\/\//.test(ia)&&!b.editor.isCorsEnabledForUrl(ia)?PROXY_URL+"?url="+encodeURIComponent(ia):TEMPLATE_PATH+"/"+ia,mxUtils.get(ia,mxUtils.bind(this,function(Ja){200<=Ja.getStatus()&&299>=Ja.getStatus()&&(oa=Ja.getText());Da(oa)}))):Da(oa)}
+function la(ia,Da,Ja){if(null!=ia&&mxUtils.isAncestorNode(document.body,qa)&&(ia=mxUtils.parseXml(ia),ia=Editor.extractGraphModel(ia.documentElement,!0),null!=ia)){"mxfile"==ia.nodeName&&(ia=Editor.parseDiagramNode(ia.getElementsByTagName("diagram")[0]));var Sa=new mxCodec(ia.ownerDocument),Ra=new mxGraphModel;Sa.decode(ia,Ra);ia=Ra.root.getChildAt(0).children||[];b.sidebar.createTooltip(qa,ia,Math.min((window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-80,1E3),Math.min((window.innerHeight||
+document.documentElement.clientHeight||document.body.clientHeight)-80,800),null!=ha.title?mxResources.get(ha.title,null,ha.title):null,!0,new mxPoint(Da,Ja),!0,null,!0);var Ca=document.createElement("div");Ca.className="geTempDlgDialogMask";O.appendChild(Ca);var La=b.sidebar.hideTooltip;b.sidebar.hideTooltip=function(){Ca&&(O.removeChild(Ca),Ca=null,La.apply(this,arguments),b.sidebar.hideTooltip=La)};mxEvent.addListener(Ca,"click",function(){b.sidebar.hideTooltip()})}}var oa=null;if(Fa||b.sidebar.currentElt==
+qa)b.sidebar.hideTooltip();else{var ra=function(ia){Fa&&b.sidebar.currentElt==qa&&la(ia,mxEvent.getClientX(ca),mxEvent.getClientY(ca));Fa=!1;aa.src="/images/icon-search.svg"};b.sidebar.hideTooltip();b.sidebar.currentElt=qa;Fa=!0;aa.src="/images/aui-wait.gif";ha.isExt?e(ha,ra,function(){z(mxResources.get("cantLoadPrev"));Fa=!1;aa.src="/images/icon-search.svg"}):na(ha.url,ra)}}function K(ha,qa,aa){if(null!=D){for(var ca=D.className.split(" "),na=0;na<ca.length;na++)if(-1<ca[na].indexOf("Active")){ca.splice(na,
+1);break}D.className=ca.join(" ")}null!=ha?(D=ha,D.className+=" "+qa,I=aa,Ga.className="geTempDlgCreateBtn"):(I=D=null,Ga.className="geTempDlgCreateBtn geTempDlgBtnDisabled")}function q(ha,qa){if(null!=I){var aa=function(ra){oa.isExternal?e(oa,function(ia){ca(ia,ra)},na):oa.url?mxUtils.get(TEMPLATE_PATH+"/"+oa.url,mxUtils.bind(this,function(ia){200<=ia.getStatus()&&299>=ia.getStatus()?ca(ia.getText(),ra):na()})):ca(b.emptyDiagramXml,ra)},ca=function(ra,ia){x||b.hideDialog(!0);f(ra,ia,oa,qa)},na=function(){z(mxResources.get("cannotLoad"));
+la()},la=function(){I=oa;Ga.className="geTempDlgCreateBtn";qa&&(Ka.className="geTempDlgOpenBtn")},oa=I;I=null;"boolean"!==typeof qa&&(qa=oa.isExternal&&m);1==ha?g(oa.url,oa):qa?(Ka.className="geTempDlgOpenBtn geTempDlgBtnDisabled geTempDlgBtnBusy",aa()):(Ga.className="geTempDlgCreateBtn geTempDlgBtnDisabled geTempDlgBtnBusy",ha=null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"),ha=new FilenameDialog(b,b.defaultFilename+".drawio",
+mxResources.get("ok"),aa,ha,function(ra){var ia=null!=ra&&0<ra.length;return ia&&x?(aa(ra),!1):ia},null,null,null,la,v?null:[]),b.showDialog(ha.container,350,80,!0,!0),ha.init())}}function C(ha){Ga.innerHTML=mxUtils.htmlEntities(mxResources.get(Z||ha?"create":"copy"));ha=ha?"none":"";m&&(Ka.style.display=ha);for(var qa=O.querySelectorAll(".geTempDlgLinkToDiagram"),aa=0;aa<qa.length;aa++)qa[aa].style.display=ha}function A(ha,qa,aa,ca,na){na||(da.innerHTML="",K(),T=ha,X=ca);var la=null;if(aa){la=document.createElement("table");
+la.className="geTempDlgDiagramsListGrid";var oa=document.createElement("tr"),ra=document.createElement("th");ra.style.width="50%";ra.innerHTML=mxUtils.htmlEntities(mxResources.get("diagram"));oa.appendChild(ra);ra=document.createElement("th");ra.style.width="25%";ra.innerHTML=mxUtils.htmlEntities(mxResources.get("changedBy"));oa.appendChild(ra);ra=document.createElement("th");ra.style.width="25%";ra.innerHTML=mxUtils.htmlEntities(mxResources.get("lastModifiedOn"));oa.appendChild(ra);la.appendChild(oa);
+da.appendChild(la)}for(oa=0;oa<ha.length;oa++){ha[oa].isExternal=!qa;var ia=ha[oa].url,Da=(ra=mxUtils.htmlEntities(qa?mxResources.get(ha[oa].title,null,ha[oa].title):ha[oa].title))||ha[oa].url,Ja=ha[oa].imgUrl,Sa=mxUtils.htmlEntities(ha[oa].changedBy||""),Ra="";ha[oa].lastModifiedOn&&(Ra=b.timeSince(new Date(ha[oa].lastModifiedOn)),null==Ra&&(Ra=mxResources.get("lessThanAMinute")),Ra=mxUtils.htmlEntities(mxResources.get("timeAgo",[Ra],"{1} ago")));Ja||(Ja=TEMPLATE_PATH+"/"+ia.substring(0,ia.length-
+4)+".png");ia=aa?50:15;null!=ra&&ra.length>ia&&(ra=ra.substring(0,ia)+"&hellip;");if(aa){var Ca=document.createElement("tr");Ja=document.createElement("td");var La=document.createElement("img");La.src="/images/icon-search.svg";La.className="geTempDlgDiagramListPreviewBtn";La.setAttribute("title",mxResources.get("preview"));na||Ja.appendChild(La);Da=document.createElement("span");Da.className="geTempDlgDiagramTitle";Da.innerHTML=ra;Ja.appendChild(Da);Ca.appendChild(Ja);Ja=document.createElement("td");
+Ja.innerHTML=Sa;Ca.appendChild(Ja);Ja=document.createElement("td");Ja.innerHTML=Ra;Ca.appendChild(Ja);la.appendChild(Ca);null==D&&(C(qa),K(Ca,"geTempDlgDiagramsListGridActive",ha[oa]));(function(Na,Ta,Ua){mxEvent.addListener(Ca,"click",function(){D!=Ta&&(C(qa),K(Ta,"geTempDlgDiagramsListGridActive",Na))});mxEvent.addListener(Ca,"dblclick",q);mxEvent.addListener(La,"click",function(Za){N(Na,Ta,Ua,Za)})})(ha[oa],Ca,La)}else{var Oa=document.createElement("div");Oa.className="geTempDlgDiagramTile";Oa.setAttribute("title",
+Da);null==D&&(C(qa),K(Oa,"geTempDlgDiagramTileActive",ha[oa]));Sa=document.createElement("div");Sa.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgLoading";var Qa=document.createElement("img");Qa.style.display="none";(function(Na,Ta,Ua){Qa.onload=function(){Ta.className="geTempDlgDiagramTileImg";Na.style.display=""};Qa.onerror=function(){this.src!=Ua?this.src=Ua:Ta.className="geTempDlgDiagramTileImg geTempDlgDiagramTileImgError"}})(Qa,Sa,Ja?Ja.replace(".drawio.xml","").replace(".drawio",
+"").replace(".xml",""):"");Qa.src=Ja;Sa.appendChild(Qa);Oa.appendChild(Sa);Sa=document.createElement("div");Sa.className="geTempDlgDiagramTileLbl";Sa.innerHTML=null!=ra?ra:"";Oa.appendChild(Sa);La=document.createElement("img");La.src="/images/icon-search.svg";La.className="geTempDlgDiagramPreviewBtn";La.setAttribute("title",mxResources.get("preview"));na||Oa.appendChild(La);(function(Na,Ta,Ua){mxEvent.addListener(Oa,"click",function(){D!=Ta&&(C(qa),K(Ta,"geTempDlgDiagramTileActive",Na))});mxEvent.addListener(Oa,
+"dblclick",q);mxEvent.addListener(La,"click",function(Za){N(Na,Ta,Ua,Za)})})(ha[oa],Oa,La);da.appendChild(Oa)}}for(var Ya in ca)ha=ca[Ya],0<ha.length&&(na=document.createElement("div"),na.className="geTempDlgImportCat",na.innerHTML=mxResources.get(Ya,null,Ya),da.appendChild(na),A(ha,qa,aa,null,!0))}function B(ha,qa){sa.innerHTML="";K();var aa=Math.floor(sa.offsetWidth/150)-1;qa=!qa&&ha.length>aa?aa:ha.length;for(var ca=0;ca<qa;ca++){var na=ha[ca];na.isCategory=!0;var la=document.createElement("div"),
+oa=mxResources.get(na.title);null==oa&&(oa=na.title.substring(0,1).toUpperCase()+na.title.substring(1));la.className="geTempDlgNewDiagramCatItem";la.setAttribute("title",oa);oa=mxUtils.htmlEntities(oa);15<oa.length&&(oa=oa.substring(0,15)+"&hellip;");null==D&&(C(!0),K(la,"geTempDlgNewDiagramCatItemActive",na));var ra=document.createElement("div");ra.className="geTempDlgNewDiagramCatItemImg";var ia=document.createElement("img");ia.src=NEW_DIAGRAM_CATS_PATH+"/"+na.img;ra.appendChild(ia);la.appendChild(ra);
+ra=document.createElement("div");ra.className="geTempDlgNewDiagramCatItemLbl";ra.innerHTML=oa;la.appendChild(ra);sa.appendChild(la);(function(Da,Ja){mxEvent.addListener(la,"click",function(){D!=Ja&&(C(!0),K(Ja,"geTempDlgNewDiagramCatItemActive",Da))});mxEvent.addListener(la,"dblclick",q)})(na,la)}la=document.createElement("div");la.className="geTempDlgNewDiagramCatItem";oa=mxResources.get("showAllTemps");la.setAttribute("title",oa);ra=document.createElement("div");ra.className="geTempDlgNewDiagramCatItemImg";
+ra.innerHTML="...";ra.style.fontSize="32px";la.appendChild(ra);ra=document.createElement("div");ra.className="geTempDlgNewDiagramCatItemLbl";ra.innerHTML=oa;la.appendChild(ra);sa.appendChild(la);mxEvent.addListener(la,"click",function(){function Da(){var Sa=Ja.querySelector(".geTemplateDrawioCatLink");null!=Sa?Sa.click():setTimeout(Da,200)}Z=!0;var Ja=O.querySelector(".geTemplatesList");Ja.style.display="block";ya.style.width="";Ma.style.display="";Ma.value="";ba=null;Da()});ka.style.display=ha.length<=
+aa?"none":""}function G(ha,qa,aa){function ca(Qa,Ya){var Na=mxResources.get(Qa);null==Na&&(Na=Qa.substring(0,1).toUpperCase()+Qa.substring(1));Qa=Na+" ("+Ya.length+")";var Ta=Na=mxUtils.htmlEntities(Na);15<Na.length&&(Na=Na.substring(0,15)+"&hellip;");return{lbl:Na+" ("+Ya.length+")",fullLbl:Qa,lblOnly:Ta}}function na(Qa,Ya,Na,Ta,Ua){mxEvent.addListener(Na,"click",function(){Y!=Na&&(null!=Y?(Y.style.fontWeight="normal",Y.style.textDecoration="none"):(Ha.style.display="none",Ba.style.minHeight="100%"),
+Y=Na,Y.style.fontWeight="bold",Y.style.textDecoration="underline",ya.scrollTop=0,V&&(U=!0),fa.innerHTML=Ya,ma.style.display="none",A(Ua?qa[Qa]:Ta?pa[Qa][Ta]:ha[Qa],Ua?!1:!0))})}var la=O.querySelector(".geTemplatesList");if(0<aa){aa=document.createElement("div");aa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(aa,mxResources.get("custom"));la.appendChild(aa);for(var oa in qa){aa=document.createElement("div");var ra=qa[oa];
+ra=ca(oa,ra);aa.className="geTemplateCatLink";aa.setAttribute("title",ra.fullLbl);aa.innerHTML=ra.lbl;la.appendChild(aa);na(oa,ra.lblOnly,aa,null,!0)}aa=document.createElement("div");aa.style.cssText="font-weight: bold;background: #f9f9f9;padding: 5px 0 5px 0;text-align: center;margin-top: 10px;";mxUtils.write(aa,"draw.io");la.appendChild(aa)}for(oa in ha){var ia=pa[oa],Da=aa=document.createElement(ia?"ul":"div");ra=ha[oa];ra=ca(oa,ra);if(null!=ia){var Ja=document.createElement("li"),Sa=document.createElement("div");
+Sa.className="geTempTreeCaret geTemplateCatLink geTemplateDrawioCatLink";Sa.style.padding="0";Sa.setAttribute("title",ra.fullLbl);Sa.innerHTML=ra.lbl;Da=Sa;Ja.appendChild(Sa);var Ra=document.createElement("ul");Ra.className="geTempTreeNested";Ra.style.visibility="hidden";for(var Ca in ia){var La=document.createElement("li"),Oa=ca(Ca,ia[Ca]);La.setAttribute("title",Oa.fullLbl);La.innerHTML=Oa.lbl;La.className="geTemplateCatLink";La.style.padding="0";La.style.margin="0";na(oa,Oa.lblOnly,La,Ca);Ra.appendChild(La)}Ja.appendChild(Ra);
+aa.className="geTempTree";aa.appendChild(Ja);(function(Qa,Ya){mxEvent.addListener(Ya,"click",function(){for(var Na=Qa.querySelectorAll("li"),Ta=0;Ta<Na.length;Ta++)Na[Ta].style.margin="";Qa.style.visibility="visible";Qa.classList.toggle("geTempTreeActive");Qa.classList.toggle("geTempTreeNested")&&setTimeout(function(){for(var Ua=0;Ua<Na.length;Ua++)Na[Ua].style.margin="0";Qa.style.visibility="hidden"},250);Ya.classList.toggle("geTempTreeCaret-down")})})(Ra,Sa)}else aa.className="geTemplateCatLink geTemplateDrawioCatLink",
+aa.setAttribute("title",ra.fullLbl),aa.innerHTML=ra.lbl;la.appendChild(aa);na(oa,ra.lblOnly,Da)}}function M(){mxUtils.get(d,function(ha){if(!Pa){Pa=!0;ha=ha.getXml().documentElement.firstChild;for(var qa={};null!=ha;){if("undefined"!==typeof ha.getAttribute)if("clibs"==ha.nodeName){for(var aa=ha.getAttribute("name"),ca=ha.getElementsByTagName("add"),na=[],la=0;la<ca.length;la++)na.push(encodeURIComponent(mxUtils.getTextContent(ca[la])));null!=aa&&0<na.length&&(qa[aa]=na.join(";"))}else if(na=ha.getAttribute("url"),
+null!=na){ca=ha.getAttribute("section");aa=ha.getAttribute("subsection");if(null==ca&&(la=na.indexOf("/"),ca=na.substring(0,la),null==aa)){var oa=na.indexOf("/",la+1);-1<oa&&(aa=na.substring(la+1,oa))}la=za[ca];null==la&&(xa++,la=[],za[ca]=la);na=ha.getAttribute("clibs");null!=qa[na]&&(na=qa[na]);na={url:ha.getAttribute("url"),libs:ha.getAttribute("libs"),title:ha.getAttribute("title")||ha.getAttribute("name"),preview:ha.getAttribute("preview"),clibs:na,tags:ha.getAttribute("tags")};la.push(na);null!=
+aa&&(la=pa[ca],null==la&&(la={},pa[ca]=la),ca=la[aa],null==ca&&(ca=[],la[aa]=ca),ca.push(na))}ha=ha.nextSibling}G(za,ea,wa)}})}function H(ha){E&&(ya.scrollTop=0,da.innerHTML="",Ea.spin(da),U=!1,V=!0,fa.innerHTML=mxUtils.htmlEntities(mxResources.get("recentDiag")),ba=null,E(ua,function(){z(mxResources.get("cannotLoad"));ua([])},ha?null:u))}function F(ha){if(""==ha)null!=n&&(n.click(),n=null);else{if(null==TemplatesDialog.tagsList[d]){var qa={};for(Da in za)for(var aa=za[Da],ca=0;ca<aa.length;ca++){var na=
+aa[ca];if(null!=na.tags)for(var la=na.tags.toLowerCase().split(";"),oa=0;oa<la.length;oa++)null==qa[la[oa]]&&(qa[la[oa]]=[]),qa[la[oa]].push(na)}TemplatesDialog.tagsList[d]=qa}var ra=ha.toLowerCase().split(" ");qa=TemplatesDialog.tagsList[d];if(0<wa&&null==qa.__tagsList__){for(Da in ea)for(aa=ea[Da],ca=0;ca<aa.length;ca++)for(na=aa[ca],la=na.title.split(" "),la.push(Da),oa=0;oa<la.length;oa++){var ia=la[oa].toLowerCase();null==qa[ia]&&(qa[ia]=[]);qa[ia].push(na)}qa.__tagsList__=!0}var Da=[];aa={};
+for(ca=la=0;ca<ra.length;ca++)if(0<ra[ca].length){ia=qa[ra[ca]];var Ja={};Da=[];if(null!=ia)for(oa=0;oa<ia.length;oa++)na=ia[oa],0==la==(null==aa[na.url])&&(Ja[na.url]=!0,Da.push(na));aa=Ja;la++}0==Da.length?fa.innerHTML=mxResources.get("noResultsFor",[ha]):A(Da,!0)}}function J(ha){if(ba!=ha||Q!=ja)y(),ya.scrollTop=0,da.innerHTML="",fa.innerHTML=mxUtils.htmlEntities(mxResources.get("searchResults"))+' "'+mxUtils.htmlEntities(ha)+'"',va=null,Z?F(ha):c&&(ha?(Ea.spin(da),U=!1,V=!0,c(ha,ua,function(){z(mxResources.get("searchFailed"));
+ua([])},Q?null:u)):H(Q)),ba=ha,ja=Q}function R(ha){null!=va&&clearTimeout(va);13==ha.keyCode?J(Ma.value):va=setTimeout(function(){J(Ma.value)},1E3)}var W='<div class="geTempDlgHeader"><img src="/images/draw.io-logo.svg" class="geTempDlgHeaderLogo"><input type="search" class="geTempDlgSearchBox" '+(c?"":'style="display: none"')+' placeholder="'+mxResources.get("search")+'"></div><div class="geTemplatesList" style="display: none"><div class="geTempDlgBack">&lt; '+mxResources.get("back")+'</div><div class="geTempDlgHLine"></div><div class="geTemplatesLbl">'+
mxResources.get("templates")+'</div></div><div class="geTempDlgContent" style="width: 100%"><div class="geTempDlgNewDiagramCat"><div class="geTempDlgNewDiagramCatLbl">'+mxResources.get("newDiagram")+'</div><div class="geTempDlgNewDiagramCatList"></div><div class="geTempDlgNewDiagramCatFooter"><div class="geTempDlgShowAllBtn">'+mxResources.get("showMore")+'</div></div></div><div class="geTempDlgDiagramsList"><div class="geTempDlgDiagramsListHeader"><div class="geTempDlgDiagramsListTitle"></div><div class="geTempDlgDiagramsListBtns"><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge" data-id="myDiagramsBtn"><img src="/images/my-diagrams.svg" class="geTempDlgMyDiagramsBtnImg"> <span>'+
mxResources.get("myDiagrams")+'</span></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnLarge geTempDlgRadioBtnActive" data-id="allDiagramsBtn"><img src="/images/all-diagrams-sel.svg" class="geTempDlgAllDiagramsBtnImg"> <span>'+mxResources.get("allDiagrams")+'</span></div><div class="geTempDlgSpacer"> </div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall geTempDlgRadioBtnActive" data-id="tilesBtn"><img src="/images/tiles-sel.svg" class="geTempDlgTilesBtnImg"></div><div class="geTempDlgRadioBtn geTempDlgRadioBtnSmall" data-id="listBtn"><img src="/images/list.svg" class="geTempDlgListBtnImg"></div></div></div><div class="geTempDlgDiagramsTiles"></div></div></div><br style="clear:both;"/><div class="geTempDlgFooter"><div class="geTempDlgErrMsg"></div>'+
(p?'<span class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramHint">'+mxResources.get("linkToDiagramHint")+'</span><button class="geTempDlgLinkToDiagram geTempDlgLinkToDiagramBtn">'+mxResources.get("linkToDiagram")+"</button>":"")+(m?'<div class="geTempDlgOpenBtn">'+mxResources.get("open")+"</div>":"")+'<div class="geTempDlgCreateBtn">'+mxResources.get("create")+'</div><div class="geTempDlgCancelBtn">'+mxResources.get("cancel")+"</div></div>",O=document.createElement("div");O.innerHTML=W;O.className=
-"geTemplateDlg";this.container=O;d=null!=d?d:TEMPLATE_PATH+"/index.xml";t=null!=t?t:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,U=!1,X=null,n=null,E=null,I=null,S=!1,Q=!0,P=!1,T=[],Y=null,ca,ia,Z=!1,fa=O.querySelector(".geTempDlgShowAllBtn"),aa=O.querySelector(".geTempDlgDiagramsTiles"),wa=O.querySelector(".geTempDlgDiagramsListTitle"),la=O.querySelector(".geTempDlgDiagramsListBtns"),za=O.querySelector(".geTempDlgContent"),Ba=O.querySelector(".geTempDlgDiagramsList"),ua=O.querySelector(".geTempDlgNewDiagramCat"),
-Da=O.querySelector(".geTempDlgNewDiagramCatList"),Fa=O.querySelector(".geTempDlgCreateBtn"),Ka=O.querySelector(".geTempDlgOpenBtn"),Qa=O.querySelector(".geTempDlgSearchBox"),Ia=O.querySelector(".geTempDlgErrMsg"),Ea=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(O.querySelector(".geTempDlgBack"),"click",function(){y();Z=!1;O.querySelector(".geTemplatesList").style.display="none";za.style.width=
-"100%";ua.style.display="";Ba.style.minHeight="calc(100% - 280px)";Qa.style.display=c?"":"none";Qa.value="";ca=null;H(Q)});mxEvent.addListener(O.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){L(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(Q=!0,null==ca?H(Q):J(ca))});mxEvent.addListener(O.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){L(this,"geTempDlgMyDiagramsBtnImg",
-"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(Q=!1,null==ca?H(Q):J(ca))});mxEvent.addListener(O.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){L(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(P=!0,z(T,!1,P,Y))});mxEvent.addListener(O.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){L(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(P=!1,z(T,!1,P,Y))});
-var Ca=!1;mxEvent.addListener(fa,"click",function(){S?(ua.style.height="280px",Da.style.height="190px",fa.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),B(ra)):(ua.style.height="440px",Da.style.height="355px",fa.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),B(ra,!0));S=!S});var Na=!1,Aa=!1,ya={},pa={},ea={},ra=[],xa=1,va=0;null!=k?k(function(ja,oa){ea=ja;va=oa;M()},M):M();mxUtils.get(t,function(ja){if(!Aa){Aa=!0;for(ja=ja.getXml().documentElement.firstChild;null!=ja;)"undefined"!==
-typeof ja.getAttribute&&null!=ja.getAttribute("title")&&ra.push({img:ja.getAttribute("img"),libs:ja.getAttribute("libs"),clibs:ja.getAttribute("clibs"),title:ja.getAttribute("title")}),ja=ja.nextSibling;B(ra)}});var qa=function(ja,oa,ba){la.style.display="";Ea.stop();V=!1;if(U)U=!1;else if(oa)aa.innerHTML=oa;else{ba=ba||{};oa=0;for(var da in ba)oa+=ba[da].length;0==ja.length&&0==oa?aa.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):z(ja,!1,P,0==oa?null:ba)}};H(Q);var ta=null;mxEvent.addListener(Qa,
-"keyup",R);mxEvent.addListener(Qa,"search",R);mxEvent.addListener(Qa,"input",R);mxEvent.addListener(Fa,"click",function(ja){q(!1,!1)});m&&mxEvent.addListener(Ka,"click",function(ja){q(!1,!0)});p&&mxEvent.addListener(O.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ja){q(!0)});mxEvent.addListener(O.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=l&&l();x||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
-var BtnDialog=function(b,f,l,d){var t=document.createElement("div");t.style.textAlign="center";var u=document.createElement("p");u.style.fontSize="16pt";u.style.padding="0px";u.style.margin="0px";u.style.color="gray";mxUtils.write(u,mxResources.get("done"));var D="Unknown",c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.marginRight="10px";f==b.drive?(D=mxResources.get("googleDrive"),c.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?
-(D=mxResources.get("dropbox"),c.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(D=mxResources.get("oneDrive"),c.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(D=mxResources.get("github"),c.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(D=mxResources.get("gitlab"),c.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(D=mxResources.get("trello"),c.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[D],"You are now authorized in {1}"));
-l=mxUtils.button(l,d);l.insertBefore(c,l.firstChild);l.style.marginTop="6px";l.className="geBigButton";l.style.fontSize="18px";l.style.padding="14px";t.appendChild(u);t.appendChild(b);t.appendChild(l);this.container=t},FontDialog=function(b,f,l,d,t){function u(K){this.style.border="";13==K.keyCode&&N.click()}var D=document.createElement("table"),c=document.createElement("tbody");D.style.marginTop="8px";var e=document.createElement("tr");var g=document.createElement("td");g.colSpan=2;g.style.whiteSpace=
+"geTemplateDlg";this.container=O;d=null!=d?d:TEMPLATE_PATH+"/index.xml";t=null!=t?t:NEW_DIAGRAM_CATS_PATH+"/index.xml";var V=!1,U=!1,Y=null,n=null,D=null,I=null,S=!1,Q=!0,P=!1,T=[],X=null,ba,ja,Z=!1,ka=O.querySelector(".geTempDlgShowAllBtn"),da=O.querySelector(".geTempDlgDiagramsTiles"),fa=O.querySelector(".geTempDlgDiagramsListTitle"),ma=O.querySelector(".geTempDlgDiagramsListBtns"),ya=O.querySelector(".geTempDlgContent"),Ba=O.querySelector(".geTempDlgDiagramsList"),Ha=O.querySelector(".geTempDlgNewDiagramCat"),
+sa=O.querySelector(".geTempDlgNewDiagramCatList"),Ga=O.querySelector(".geTempDlgCreateBtn"),Ka=O.querySelector(".geTempDlgOpenBtn"),Ma=O.querySelector(".geTempDlgSearchBox"),Ia=O.querySelector(".geTempDlgErrMsg"),Ea=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"50px",zIndex:2E9});mxEvent.addListener(O.querySelector(".geTempDlgBack"),"click",function(){y();Z=!1;O.querySelector(".geTemplatesList").style.display="none";ya.style.width=
+"100%";Ha.style.display="";Ba.style.minHeight="calc(100% - 280px)";Ma.style.display=c?"":"none";Ma.value="";ba=null;H(Q)});mxEvent.addListener(O.querySelector(".geTempDlgRadioBtn[data-id=allDiagramsBtn]"),"click",function(){L(this,"geTempDlgAllDiagramsBtnImg","all-diagrams","myDiagramsBtn","geTempDlgMyDiagramsBtnImg","my-diagrams",!0)&&(Q=!0,null==ba?H(Q):J(ba))});mxEvent.addListener(O.querySelector(".geTempDlgRadioBtn[data-id=myDiagramsBtn]"),"click",function(){L(this,"geTempDlgMyDiagramsBtnImg",
+"my-diagrams","allDiagramsBtn","geTempDlgAllDiagramsBtnImg","all-diagrams",!0)&&(Q=!1,null==ba?H(Q):J(ba))});mxEvent.addListener(O.querySelector(".geTempDlgRadioBtn[data-id=listBtn]"),"click",function(){L(this,"geTempDlgListBtnImg","list","tilesBtn","geTempDlgTilesBtnImg","tiles",!1)&&(P=!0,A(T,!1,P,X))});mxEvent.addListener(O.querySelector(".geTempDlgRadioBtn[data-id=tilesBtn]"),"click",function(){L(this,"geTempDlgTilesBtnImg","tiles","listBtn","geTempDlgListBtnImg","list",!1)&&(P=!1,A(T,!1,P,X))});
+var Fa=!1;mxEvent.addListener(ka,"click",function(){S?(Ha.style.height="280px",sa.style.height="190px",ka.innerHTML=mxUtils.htmlEntities(mxResources.get("showMore")),B(ta)):(Ha.style.height="440px",sa.style.height="355px",ka.innerHTML=mxUtils.htmlEntities(mxResources.get("showLess")),B(ta,!0));S=!S});var Pa=!1,Aa=!1,za={},pa={},ea={},ta=[],xa=1,wa=0;null!=k?k(function(ha,qa){ea=ha;wa=qa;M()},M):M();mxUtils.get(t,function(ha){if(!Aa){Aa=!0;for(ha=ha.getXml().documentElement.firstChild;null!=ha;)"undefined"!==
+typeof ha.getAttribute&&null!=ha.getAttribute("title")&&ta.push({img:ha.getAttribute("img"),libs:ha.getAttribute("libs"),clibs:ha.getAttribute("clibs"),title:ha.getAttribute("title")}),ha=ha.nextSibling;B(ta)}});var ua=function(ha,qa,aa){ma.style.display="";Ea.stop();V=!1;if(U)U=!1;else if(qa)da.innerHTML=qa;else{aa=aa||{};qa=0;for(var ca in aa)qa+=aa[ca].length;0==ha.length&&0==qa?da.innerHTML=mxUtils.htmlEntities(mxResources.get("noDiagrams")):A(ha,!1,P,0==qa?null:aa)}};H(Q);var va=null;mxEvent.addListener(Ma,
+"keyup",R);mxEvent.addListener(Ma,"search",R);mxEvent.addListener(Ma,"input",R);mxEvent.addListener(Ga,"click",function(ha){q(!1,!1)});m&&mxEvent.addListener(Ka,"click",function(ha){q(!1,!0)});p&&mxEvent.addListener(O.querySelector(".geTempDlgLinkToDiagramBtn"),"click",function(ha){q(!0)});mxEvent.addListener(O.querySelector(".geTempDlgCancelBtn"),"click",function(){null!=l&&l();x||b.hideDialog(!0)})};TemplatesDialog.tagsList={};
+var BtnDialog=function(b,f,l,d){var t=document.createElement("div");t.style.textAlign="center";var u=document.createElement("p");u.style.fontSize="16pt";u.style.padding="0px";u.style.margin="0px";u.style.color="gray";mxUtils.write(u,mxResources.get("done"));var E="Unknown",c=document.createElement("img");c.setAttribute("border","0");c.setAttribute("align","absmiddle");c.style.marginRight="10px";f==b.drive?(E=mxResources.get("googleDrive"),c.src=IMAGE_PATH+"/google-drive-logo-white.svg"):f==b.dropbox?
+(E=mxResources.get("dropbox"),c.src=IMAGE_PATH+"/dropbox-logo-white.svg"):f==b.oneDrive?(E=mxResources.get("oneDrive"),c.src=IMAGE_PATH+"/onedrive-logo-white.svg"):f==b.gitHub?(E=mxResources.get("github"),c.src=IMAGE_PATH+"/github-logo-white.svg"):f==b.gitLab?(E=mxResources.get("gitlab"),c.src=IMAGE_PATH+"/gitlab-logo.svg"):f==b.trello&&(E=mxResources.get("trello"),c.src=IMAGE_PATH+"/trello-logo-white.svg");b=document.createElement("p");mxUtils.write(b,mxResources.get("authorizedIn",[E],"You are now authorized in {1}"));
+l=mxUtils.button(l,d);l.insertBefore(c,l.firstChild);l.style.marginTop="6px";l.className="geBigButton";l.style.fontSize="18px";l.style.padding="14px";t.appendChild(u);t.appendChild(b);t.appendChild(l);this.container=t},FontDialog=function(b,f,l,d,t){function u(K){this.style.border="";13==K.keyCode&&N.click()}var E=document.createElement("table"),c=document.createElement("tbody");E.style.marginTop="8px";var e=document.createElement("tr");var g=document.createElement("td");g.colSpan=2;g.style.whiteSpace=
"nowrap";g.style.fontSize="10pt";g.style.fontWeight="bold";var k=document.createElement("input");k.style.cssText="margin-right:8px;margin-bottom:8px;";k.setAttribute("value","sysfonts");k.setAttribute("type","radio");k.setAttribute("name","current-fontdialog");k.setAttribute("id","fontdialog-sysfonts");g.appendChild(k);var m=document.createElement("label");m.setAttribute("for","fontdialog-sysfonts");mxUtils.write(m,mxResources.get("sysFonts",null,"System Fonts"));g.appendChild(m);e.appendChild(g);
c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.width="120px";g.style.paddingLeft="15px";mxUtils.write(g,mxResources.get("fontname",null,"Font Name")+":");e.appendChild(g);var p=document.createElement("input");"s"==d&&p.setAttribute("value",f);p.style.marginLeft="4px";p.style.width="250px";p.className="dlg_fontName_s";g=document.createElement("td");g.appendChild(p);e.appendChild(g);c.appendChild(e);e=document.createElement("tr");
g=document.createElement("td");g.colSpan=2;g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.fontWeight="bold";var v=document.createElement("input");v.style.cssText="margin-right:8px;margin-bottom:8px;";v.setAttribute("value","googlefonts");v.setAttribute("type","radio");v.setAttribute("name","current-fontdialog");v.setAttribute("id","fontdialog-googlefonts");g.appendChild(v);m=document.createElement("label");m.setAttribute("for","fontdialog-googlefonts");mxUtils.write(m,mxResources.get("googleFonts",
null,"Google Fonts"));g.appendChild(m);mxClient.IS_CHROMEAPP||b.isOffline()&&!EditorUi.isElectronApp||(m=b.menus.createHelpLink("https://fonts.google.com/"),m.getElementsByTagName("img")[0].setAttribute("valign","middle"),g.appendChild(m));e.appendChild(g);c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.width="120px";g.style.paddingLeft="15px";mxUtils.write(g,mxResources.get("fontname",null,"Font Name")+":");
-e.appendChild(g);var x=document.createElement("input");"g"==d&&x.setAttribute("value",f);x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontName_g";g=document.createElement("td");g.appendChild(x);e.appendChild(g);c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.colSpan=2;g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.fontWeight="bold";var A=document.createElement("input");A.style.cssText="margin-right:8px;margin-bottom:8px;";A.setAttribute("value",
-"webfonts");A.setAttribute("type","radio");A.setAttribute("name","current-fontdialog");A.setAttribute("id","fontdialog-webfonts");g.appendChild(A);m=document.createElement("label");m.setAttribute("for","fontdialog-webfonts");mxUtils.write(m,mxResources.get("webfonts",null,"Web Fonts"));g.appendChild(m);e.appendChild(g);Editor.enableWebFonts&&c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.width="120px";g.style.paddingLeft=
+e.appendChild(g);var x=document.createElement("input");"g"==d&&x.setAttribute("value",f);x.style.marginLeft="4px";x.style.width="250px";x.className="dlg_fontName_g";g=document.createElement("td");g.appendChild(x);e.appendChild(g);c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.colSpan=2;g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.fontWeight="bold";var z=document.createElement("input");z.style.cssText="margin-right:8px;margin-bottom:8px;";z.setAttribute("value",
+"webfonts");z.setAttribute("type","radio");z.setAttribute("name","current-fontdialog");z.setAttribute("id","fontdialog-webfonts");g.appendChild(z);m=document.createElement("label");m.setAttribute("for","fontdialog-webfonts");mxUtils.write(m,mxResources.get("webfonts",null,"Web Fonts"));g.appendChild(m);e.appendChild(g);Editor.enableWebFonts&&c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";g.style.width="120px";g.style.paddingLeft=
"15px";mxUtils.write(g,mxResources.get("fontname",null,"Font Name")+":");e.appendChild(g);var y=document.createElement("input");"w"==d&&(Editor.enableWebFonts?y.setAttribute("value",f):p.setAttribute("value",f));y.style.marginLeft="4px";y.style.width="250px";y.className="dlg_fontName_w";g=document.createElement("td");g.appendChild(y);e.appendChild(g);Editor.enableWebFonts&&c.appendChild(e);e=document.createElement("tr");g=document.createElement("td");g.style.whiteSpace="nowrap";g.style.fontSize="10pt";
g.style.width="120px";g.style.paddingLeft="15px";mxUtils.write(g,mxResources.get("fontUrl",null,"Font URL")+":");e.appendChild(g);var L=document.createElement("input");L.setAttribute("value",l||"");L.style.marginLeft="4px";L.style.width="250px";L.className="dlg_fontUrl";g=document.createElement("td");g.appendChild(L);e.appendChild(g);Editor.enableWebFonts&&c.appendChild(e);this.init=function(){var K=p;"g"==d?K=x:"w"==d&&Editor.enableWebFonts&&(K=y);K.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?
K.select():document.execCommand("selectAll",!1,null)};e=document.createElement("tr");g=document.createElement("td");g.colSpan=2;g.style.paddingTop="20px";g.style.whiteSpace="nowrap";g.setAttribute("align","right");b.isOffline()||(f=mxUtils.button(mxResources.get("help"),function(){b.openLink("https://www.diagrams.net/blog/external-fonts")}),f.className="geBtn",g.appendChild(f));f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();t()});f.className="geBtn";b.editor.cancelFirst&&g.appendChild(f);
-var N=mxUtils.button(mxResources.get("apply"),function(){if(k.checked){var K=p.value;var q="s"}else if(v.checked){K=x.value;var C=Editor.GOOGLE_FONTS+encodeURIComponent(K).replace(/%20/g,"+");q="g"}else A.checked&&(K=y.value,C=L.value,q="w");var z=C;var B=q,G=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==K||0==K.length?(D.querySelector(".dlg_fontName_"+B).style.border="1px solid red",z=!1):"w"!=B||G.test(z)?z=!0:(D.querySelector(".dlg_fontUrl").style.border=
-"1px solid red",z=!1);z&&(t(K,C,q),b.hideDialog())});N.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",u);mxEvent.addListener(x,"keypress",u);mxEvent.addListener(y,"keypress",u);mxEvent.addListener(L,"keypress",u);mxEvent.addListener(p,"focus",function(){k.setAttribute("checked","checked");k.checked=!0});mxEvent.addListener(x,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(y,"focus",function(){A.setAttribute("checked","checked");A.checked=
-!0});mxEvent.addListener(L,"focus",function(){A.setAttribute("checked","checked");A.checked=!0});g.appendChild(N);b.editor.cancelFirst||g.appendChild(f);e.appendChild(g);c.appendChild(e);D.appendChild(c);this.container=D};
+var N=mxUtils.button(mxResources.get("apply"),function(){if(k.checked){var K=p.value;var q="s"}else if(v.checked){K=x.value;var C=Editor.GOOGLE_FONTS+encodeURIComponent(K).replace(/%20/g,"+");q="g"}else z.checked&&(K=y.value,C=L.value,q="w");var A=C;var B=q,G=/(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;null==K||0==K.length?(E.querySelector(".dlg_fontName_"+B).style.border="1px solid red",A=!1):"w"!=B||G.test(A)?A=!0:(E.querySelector(".dlg_fontUrl").style.border=
+"1px solid red",A=!1);A&&(t(K,C,q),b.hideDialog())});N.className="geBtn gePrimaryBtn";mxEvent.addListener(p,"keypress",u);mxEvent.addListener(x,"keypress",u);mxEvent.addListener(y,"keypress",u);mxEvent.addListener(L,"keypress",u);mxEvent.addListener(p,"focus",function(){k.setAttribute("checked","checked");k.checked=!0});mxEvent.addListener(x,"focus",function(){v.setAttribute("checked","checked");v.checked=!0});mxEvent.addListener(y,"focus",function(){z.setAttribute("checked","checked");z.checked=
+!0});mxEvent.addListener(L,"focus",function(){z.setAttribute("checked","checked");z.checked=!0});g.appendChild(N);b.editor.cancelFirst||g.appendChild(f);e.appendChild(g);c.appendChild(e);E.appendChild(c);this.container=E};
function AspectDialog(b,f,l,d,t){this.aspect={pageId:f||(b.pages?b.pages[0].getId():null),layerIds:l||[]};f=document.createElement("div");var u=document.createElement("h5");u.style.margin="0 0 10px";mxUtils.write(u,mxResources.get("pages"));f.appendChild(u);l=document.createElement("div");l.className="geAspectDlgList";f.appendChild(l);u=document.createElement("h5");u.style.margin="0 0 10px";mxUtils.write(u,mxResources.get("layers"));f.appendChild(u);u=document.createElement("div");u.className="geAspectDlgList";
-f.appendChild(u);this.pagesContainer=l;this.layersContainer=u;this.ui=b;l=document.createElement("div");l.style.marginTop="16px";l.style.textAlign="center";u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=t&&t()});u.className="geBtn";b.editor.cancelFirst&&l.appendChild(u);var D=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));l.appendChild(D);D.className="geBtn gePrimaryBtn";
-b.editor.cancelFirst||l.appendChild(u);D.setAttribute("disabled","disabled");this.okBtn=D;f.appendChild(l);this.container=f}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var f=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(f.getId(),f.getName(),f.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
+f.appendChild(u);this.pagesContainer=l;this.layersContainer=u;this.ui=b;l=document.createElement("div");l.style.marginTop="16px";l.style.textAlign="center";u=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=t&&t()});u.className="geBtn";b.editor.cancelFirst&&l.appendChild(u);var E=mxUtils.button(mxResources.get("ok"),mxUtils.bind(this,function(){b.hideDialog();d({pageId:this.selectedPage,layerIds:Object.keys(this.selectedLayers)})}));l.appendChild(E);E.className="geBtn gePrimaryBtn";
+b.editor.cancelFirst||l.appendChild(u);E.setAttribute("disabled","disabled");this.okBtn=E;f.appendChild(l);this.container=f}AspectDialog.prototype.init=function(){var b=this.ui.getFileData(!0);if(this.ui.pages)for(b=0;b<this.ui.pages.length;b++){var f=this.ui.updatePageRoot(this.ui.pages[b]);this.createPageItem(f.getId(),f.getName(),f.node)}else this.createPageItem("1","Page-1",mxUtils.parseXml(b).documentElement)};
AspectDialog.prototype.createViewer=function(b,f,l,d){mxEvent.disableContextMenu(b);b.style.userSelect="none";var t=new Graph(b);t.setTooltips(!1);t.setEnabled(!1);t.setPanning(!1);t.minFitScale=null;t.maxFitScale=null;t.centerZoom=!0;f="mxGraphModel"==f.nodeName?f:Editor.parseDiagramNode(f);if(null!=f){var u=f.getAttribute("background");if(null==u||""==u||u==mxConstants.NONE)u=null!=d?d:"#ffffff";b.style.backgroundColor=u;d=new mxCodec(f.ownerDocument);b=t.getModel();d.decode(f,b);f=b.getChildCount(b.root);
-d=null==l;for(u=0;u<f;u++){var D=b.getChildAt(b.root,u);b.setVisible(D,d||l==D.id)}t.maxFitScale=1;t.fit(0);t.center()}return t};
+d=null==l;for(u=0;u<f;u++){var E=b.getChildAt(b.root,u);b.setVisible(E,d||l==E.id)}t.maxFitScale=1;t.fit(0);t.center()}return t};
AspectDialog.prototype.createPageItem=function(b,f,l){var d=document.createElement("div");d.className="geAspectDlgListItem";d.setAttribute("data-page-id",b);d.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.pagesContainer.appendChild(d);var t=this.createViewer(d.childNodes[0],l);f=mxUtils.bind(this,function(){null!=this.selectedItem&&(this.selectedItem.className="geAspectDlgListItem");this.selectedItem=d;
-this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerHTML="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var u=t.model;u=u.getChildCells(u.getRoot());for(var D=0;D<u.length;D++)this.createLayerItem(u[D],b,t,l)});mxEvent.addListener(d,"click",f);this.aspect.pageId==b&&f()};
+this.selectedPage=b;d.className+=" geAspectDlgListItemSelected";this.layersContainer.innerHTML="";this.selectedLayers={};this.okBtn.setAttribute("disabled","disabled");var u=t.model;u=u.getChildCells(u.getRoot());for(var E=0;E<u.length;E++)this.createLayerItem(u[E],b,t,l)});mxEvent.addListener(d,"click",f);this.aspect.pageId==b&&f()};
AspectDialog.prototype.createLayerItem=function(b,f,l,d){f=l.convertValueToString(b)||mxResources.get("background")||"Background";var t=document.createElement("div");t.setAttribute("data-layer-id",b.id);t.className="geAspectDlgListItem";t.innerHTML='<div style="max-width: 100%; max-height: 100%;"></div><div class="geAspectDlgListItemText">'+mxUtils.htmlEntities(f)+"</div>";this.layersContainer.appendChild(t);this.createViewer(t.childNodes[0],d,b.id);d=mxUtils.bind(this,function(){0<=t.className.indexOf("geAspectDlgListItemSelected")?
(t.className="geAspectDlgListItem",delete this.selectedLayers[b.id],mxUtils.isEmptyObject(this.selectedLayers)&&this.okBtn.setAttribute("disabled","disabled")):(t.className+=" geAspectDlgListItemSelected",this.selectedLayers[b.id]=!0,this.okBtn.removeAttribute("disabled"))});mxEvent.addListener(t,"click",d);-1!=this.aspect.layerIds.indexOf(b.id)&&d()};
-var FilePropertiesDialog=function(b){var f=document.createElement("table"),l=document.createElement("tbody");f.style.width="100%";f.style.marginTop="8px";var d=b.getCurrentFile();var t=null!=d&&null!=d.getTitle()?d.getTitle():b.defaultFilename;var u=function(){};if(/(\.png)$/i.test(t)){u=1;var D=0;t=b.fileNode;null!=t&&(t.hasAttribute("scale")&&(u=parseFloat(t.getAttribute("scale"))),t.hasAttribute("border")&&(D=parseInt(t.getAttribute("border"))));t=document.createElement("tr");var c=document.createElement("td");
+var FilePropertiesDialog=function(b){var f=document.createElement("table"),l=document.createElement("tbody");f.style.width="100%";f.style.marginTop="8px";var d=b.getCurrentFile();var t=null!=d&&null!=d.getTitle()?d.getTitle():b.defaultFilename;var u=function(){};if(/(\.png)$/i.test(t)){u=1;var E=0;t=b.fileNode;null!=t&&(t.hasAttribute("scale")&&(u=parseFloat(t.getAttribute("scale"))),t.hasAttribute("border")&&(E=parseInt(t.getAttribute("border"))));t=document.createElement("tr");var c=document.createElement("td");
c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";mxUtils.write(c,mxResources.get("zoom")+":");t.appendChild(c);var e=document.createElement("input");e.setAttribute("value",100*u+"%");e.style.marginLeft="4px";e.style.width="180px";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(e);t.appendChild(c);l.appendChild(t);t=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";
-mxUtils.write(c,mxResources.get("borderWidth")+":");t.appendChild(c);var g=document.createElement("input");g.setAttribute("value",D);g.style.marginLeft="4px";g.style.width="180px";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(g);t.appendChild(c);l.appendChild(t);this.init=function(){e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null)};u=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
+mxUtils.write(c,mxResources.get("borderWidth")+":");t.appendChild(c);var g=document.createElement("input");g.setAttribute("value",E);g.style.marginLeft="4px";g.style.width="180px";c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(g);t.appendChild(c);l.appendChild(t);this.init=function(){e.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?e.select():document.execCommand("selectAll",!1,null)};u=function(){null!=b.fileNode&&(b.fileNode.setAttribute("scale",Math.max(0,
parseInt(e.value)/100)),b.fileNode.setAttribute("border",Math.max(0,parseInt(g.value))),null!=d&&d.fileChanged());b.hideDialog()}}else if(!/(\.html)$/i.test(t)&&!/(\.svg)$/i.test(t)){var k=null!=d?d.isCompressed():Editor.compressXml;t=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";c.style.width="120px";mxUtils.write(c,mxResources.get("compressed")+":");t.appendChild(c);var m=document.createElement("input");m.setAttribute("type","checkbox");
k&&(m.setAttribute("checked","checked"),m.defaultChecked=!0);c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(m);t.appendChild(c);l.appendChild(t);this.init=function(){m.focus()};u=function(){null!=b.fileNode&&k!=m.checked&&(b.fileNode.setAttribute("compressed",m.checked?"true":"false"),null!=d&&d.fileChanged());b.hideDialog()}}if(null!=d&&d.isRealtimeOptional()){t=document.createElement("tr");c=document.createElement("td");c.style.whiteSpace="nowrap";c.style.fontSize="10pt";
c.style.width="120px";mxUtils.write(c,mxResources.get("realtimeCollaboration")+":");t.appendChild(c);var p=document.createElement("input");p.setAttribute("type","checkbox");var v=d.isRealtimeEnabled();if(v="disabled"!=b.drive.getCustomProperty(d.desc,"collaboration"))p.setAttribute("checked","checked"),p.defaultChecked=!0;prevApply=u;u=function(){prevApply();b.hideDialog();p.checked!=v&&b.spinner.spin(document.body,mxResources.get("updatingDocument"))&&d.setRealtimeEnabled(p.checked,mxUtils.bind(this,
function(x){b.spinner.stop()}),mxUtils.bind(this,function(x){b.spinner.stop();b.showError(mxResources.get("error"),null!=x&&null!=x.error?x.error.message:mxResources.get("unknownError"),mxResources.get("ok"))}))};this.init=null!=this.init?this.init:function(){p.focus()};c=document.createElement("td");c.style.whiteSpace="nowrap";c.appendChild(p);c.appendChild(b.menus.createHelpLink("https://github.com/jgraph/drawio/discussions/2672"));t.appendChild(c);l.appendChild(t)}this.init=null!=this.init?this.init:
-function(){};u=mxUtils.button(mxResources.get("apply"),u);u.className="geBtn gePrimaryBtn";t=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";c.setAttribute("align","center");D=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});D.className="geBtn";b.editor.cancelFirst&&c.appendChild(D);c.appendChild(u);b.editor.cancelFirst||c.appendChild(D);t.appendChild(c);l.appendChild(t);f.appendChild(l);this.container=
-f},ConnectionPointsDialog=function(b,f){function l(){null!=t&&t.destroy()}var d=document.createElement("div");d.style.userSelect="none";var t=null;this.init=function(){function u(F,J){F=new mxCell("",new mxGeometry(F,J,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");F.vertex=!0;F.cp=!0;return m.addCell(F)}function D(F){F=m.getSelectionCells();m.deleteCells(F)}function c(){var F=parseInt(B.value)||0;F=0>F?0:100<F?100:F;
+function(){};u=mxUtils.button(mxResources.get("apply"),u);u.className="geBtn gePrimaryBtn";t=document.createElement("tr");c=document.createElement("td");c.colSpan=2;c.style.paddingTop="20px";c.style.whiteSpace="nowrap";c.setAttribute("align","center");E=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});E.className="geBtn";b.editor.cancelFirst&&c.appendChild(E);c.appendChild(u);b.editor.cancelFirst||c.appendChild(E);t.appendChild(c);l.appendChild(t);f.appendChild(l);this.container=
+f},ConnectionPointsDialog=function(b,f){function l(){null!=t&&t.destroy()}var d=document.createElement("div");d.style.userSelect="none";var t=null;this.init=function(){function u(F,J){F=new mxCell("",new mxGeometry(F,J,6,6),"shape=mxgraph.basic.x;fillColor=#29b6f2;strokeColor=#29b6f2;points=[];rotatable=0;resizable=0;connectable=0;editable=0;");F.vertex=!0;F.cp=!0;return m.addCell(F)}function E(F){F=m.getSelectionCells();m.deleteCells(F)}function c(){var F=parseInt(B.value)||0;F=0>F?0:100<F?100:F;
B.value=F;var J=parseInt(M.value)||0;J=0>J?0:100<J?100:J;M.value=J;var R=parseInt(G.value)||0,W=parseInt(H.value)||0;F=m.getConnectionPoint(x,new mxConnectionConstraint(new mxPoint(F/100,J/100),!1,null,R,W));J=m.getSelectionCell();if(null!=J){R=J.geometry.clone();W=m.view.scale;var O=m.view.translate;R.x=(F.x-3*W)/W-O.x;R.y=(F.y-3*W)/W-O.y;m.model.setGeometry(J,R)}}function e(F){var J=0,R=0,W=p.geometry,O=mxUtils.format((F.geometry.x+3-W.x)/W.width);F=mxUtils.format((F.geometry.y+3-W.y)/W.height);
-0>O?(J=O*W.width,O=0):1<O&&(J=(O-1)*W.width,O=1);0>F?(R=F*W.height,F=0):1<F&&(R=(F-1)*W.height,F=1);return{x:O,y:F,dx:parseInt(J),dy:parseInt(R)}}function g(){if(1==m.getSelectionCount()){var F=m.getSelectionCell();F=e(F);B.value=100*F.x;M.value=100*F.y;G.value=F.dx;H.value=F.dy;z.style.visibility=""}else z.style.visibility="hidden"}var k=document.createElement("div");k.style.width="350px";k.style.height="350px";k.style.overflow="hidden";k.style.border="1px solid lightGray";k.style.boxSizing="border-box";
+0>O?(J=O*W.width,O=0):1<O&&(J=(O-1)*W.width,O=1);0>F?(R=F*W.height,F=0):1<F&&(R=(F-1)*W.height,F=1);return{x:O,y:F,dx:parseInt(J),dy:parseInt(R)}}function g(){if(1==m.getSelectionCount()){var F=m.getSelectionCell();F=e(F);B.value=100*F.x;M.value=100*F.y;G.value=F.dx;H.value=F.dy;A.style.visibility=""}else A.style.visibility="hidden"}var k=document.createElement("div");k.style.width="350px";k.style.height="350px";k.style.overflow="hidden";k.style.border="1px solid lightGray";k.style.boxSizing="border-box";
mxEvent.disableContextMenu(k);d.appendChild(k);var m=new Graph(k);m.autoExtend=!1;m.autoScroll=!1;m.setGridEnabled(!1);m.setEnabled(!0);m.setPanning(!0);m.setConnectable(!1);m.setTooltips(!1);m.minFitScale=null;m.maxFitScale=null;m.centerZoom=!0;m.maxFitScale=2;k=f.geometry;var p=new mxCell(f.value,new mxGeometry(0,0,k.width,k.height),f.style+";rotatable=0;resizable=0;connectable=0;editable=0;movable=0;");p.vertex=!0;m.addCell(p);m.dblClick=function(F,J){if(null!=J&&J!=p)m.setSelectionCell(J);else{J=
-mxUtils.convertPoint(m.container,mxEvent.getClientX(F),mxEvent.getClientY(F));mxEvent.consume(F);F=m.view.scale;var R=m.view.translate;m.setSelectionCell(u((J.x-3*F)/F-R.x,(J.y-3*F)/F-R.y))}};t=new mxKeyHandler(m);t.bindKey(46,D);t.bindKey(8,D);m.getRubberband().isForceRubberbandEvent=function(F){return 0==F.evt.button&&(null==F.getCell()||F.getCell()==p)};m.panningHandler.isForcePanningEvent=function(F){return 2==F.evt.button};var v=m.isCellSelectable;m.isCellSelectable=function(F){return F==p?!1:
-v.apply(this,arguments)};m.getLinkForCell=function(){return null};var x=m.view.getState(p);k=m.getAllConnectionConstraints(x);for(var A=0;null!=k&&A<k.length;A++){var y=m.getConnectionPoint(x,k[A]);u(y.x-3,y.y-3)}m.fit(8);m.center();A=mxUtils.button("",function(){m.zoomIn()});A.className="geSprite geSprite-zoomin";A.setAttribute("title",mxResources.get("zoomIn"));A.style.position="relative";A.style.outline="none";A.style.border="none";A.style.margin="2px";A.style.cursor="pointer";A.style.top=mxClient.IS_FF?
-"-6px":"0px";mxUtils.setOpacity(A,60);y=mxUtils.button("",function(){m.zoomOut()});y.className="geSprite geSprite-zoomout";y.setAttribute("title",mxResources.get("zoomOut"));y.style.position="relative";y.style.outline="none";y.style.border="none";y.style.margin="2px";y.style.cursor="pointer";y.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(y,60);var L=mxUtils.button("",function(){m.fit(8);m.center()});L.className="geSprite geSprite-fit";L.setAttribute("title",mxResources.get("fit"));L.style.position=
+mxUtils.convertPoint(m.container,mxEvent.getClientX(F),mxEvent.getClientY(F));mxEvent.consume(F);F=m.view.scale;var R=m.view.translate;m.setSelectionCell(u((J.x-3*F)/F-R.x,(J.y-3*F)/F-R.y))}};t=new mxKeyHandler(m);t.bindKey(46,E);t.bindKey(8,E);m.getRubberband().isForceRubberbandEvent=function(F){return 0==F.evt.button&&(null==F.getCell()||F.getCell()==p)};m.panningHandler.isForcePanningEvent=function(F){return 2==F.evt.button};var v=m.isCellSelectable;m.isCellSelectable=function(F){return F==p?!1:
+v.apply(this,arguments)};m.getLinkForCell=function(){return null};var x=m.view.getState(p);k=m.getAllConnectionConstraints(x);for(var z=0;null!=k&&z<k.length;z++){var y=m.getConnectionPoint(x,k[z]);u(y.x-3,y.y-3)}m.fit(8);m.center();z=mxUtils.button("",function(){m.zoomIn()});z.className="geSprite geSprite-zoomin";z.setAttribute("title",mxResources.get("zoomIn"));z.style.position="relative";z.style.outline="none";z.style.border="none";z.style.margin="2px";z.style.cursor="pointer";z.style.top=mxClient.IS_FF?
+"-6px":"0px";mxUtils.setOpacity(z,60);y=mxUtils.button("",function(){m.zoomOut()});y.className="geSprite geSprite-zoomout";y.setAttribute("title",mxResources.get("zoomOut"));y.style.position="relative";y.style.outline="none";y.style.border="none";y.style.margin="2px";y.style.cursor="pointer";y.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(y,60);var L=mxUtils.button("",function(){m.fit(8);m.center()});L.className="geSprite geSprite-fit";L.setAttribute("title",mxResources.get("fit"));L.style.position=
"relative";L.style.outline="none";L.style.border="none";L.style.margin="2px";L.style.cursor="pointer";L.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(L,60);var N=mxUtils.button("",function(){m.zoomActual();m.center()});N.className="geSprite geSprite-actualsize";N.setAttribute("title",mxResources.get("actualSize"));N.style.position="relative";N.style.outline="none";N.style.border="none";N.style.margin="2px";N.style.cursor="pointer";N.style.top=mxClient.IS_FF?"-6px":"0px";mxUtils.setOpacity(N,
-60);var K=mxUtils.button("",D);K.className="geSprite geSprite-delete";K.setAttribute("title",mxResources.get("delete"));K.style.position="relative";K.style.outline="none";K.style.border="none";K.style.margin="2px";K.style.float="right";K.style.cursor="pointer";mxUtils.setOpacity(K,10);k=document.createElement("div");k.appendChild(A);k.appendChild(y);k.appendChild(N);k.appendChild(L);k.appendChild(K);d.appendChild(k);var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min",
-"1");q.setAttribute("value","1");q.style.width="45px";q.style.position="relative";q.style.top=mxClient.IS_FF?"0px":"-4px";q.style.margin="0 4px 0 4px";k.appendChild(q);var C=document.createElement("select");C.style.position="relative";C.style.top=mxClient.IS_FF?"0px":"-4px";y=["left","right","top","bottom"];for(A=0;A<y.length;A++)L=y[A],N=document.createElement("option"),mxUtils.write(N,mxResources.get(L)),N.value=L,C.appendChild(N);k.appendChild(C);A=mxUtils.button(mxResources.get("add"),function(){var F=
-parseInt(q.value);F=1>F?1:100<F?100:F;q.value=F;for(var J=C.value,R=p.geometry,W=[],O=0;O<F;O++){switch(J){case "left":var V=R.x;var U=R.y+(O+1)*R.height/(F+1);break;case "right":V=R.x+R.width;U=R.y+(O+1)*R.height/(F+1);break;case "top":V=R.x+(O+1)*R.width/(F+1);U=R.y;break;case "bottom":V=R.x+(O+1)*R.width/(F+1),U=R.y+R.height}W.push(u(V-3,U-3))}m.setSelectionCells(W)});A.style.position="relative";A.style.marginLeft="8px";A.style.top=mxClient.IS_FF?"0px":"-4px";k.appendChild(A);var z=document.createElement("div");
-z.style.margin="4px 0px 8px 0px";z.style.whiteSpace="nowrap";z.style.height="24px";k=document.createElement("span");mxUtils.write(k,mxResources.get("dx"));z.appendChild(k);var B=document.createElement("input");B.setAttribute("type","number");B.setAttribute("min","0");B.setAttribute("max","100");B.style.width="45px";B.style.margin="0 4px 0 4px";z.appendChild(B);mxUtils.write(z,"%");var G=document.createElement("input");G.setAttribute("type","number");G.style.width="45px";G.style.margin="0 4px 0 4px";
-z.appendChild(G);mxUtils.write(z,"pt");k=document.createElement("span");mxUtils.write(k,mxResources.get("dy"));k.style.marginLeft="12px";z.appendChild(k);var M=document.createElement("input");M.setAttribute("type","number");M.setAttribute("min","0");M.setAttribute("max","100");M.style.width="45px";M.style.margin="0 4px 0 4px";z.appendChild(M);mxUtils.write(z,"%");var H=document.createElement("input");H.setAttribute("type","number");H.style.width="45px";H.style.margin="0 4px 0 4px";z.appendChild(H);
-mxUtils.write(z,"pt");d.appendChild(z);g();m.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<m.getSelectionCount()?mxUtils.setOpacity(K,60):mxUtils.setOpacity(K,10);g()});m.addListener(mxEvent.CELLS_MOVED,g);mxEvent.addListener(B,"change",c);mxEvent.addListener(M,"change",c);mxEvent.addListener(G,"change",c);mxEvent.addListener(H,"change",c);k=mxUtils.button(mxResources.get("cancel"),function(){l();b.hideDialog()});k.className="geBtn";A=mxUtils.button(mxResources.get("apply"),function(){var F=
-m.model.cells,J=[],R=[],W;for(W in F){var O=F[W];O.cp&&R.push(e(O))}R.sort(function(V,U){return V.x!=U.x?V.x-U.x:V.y!=U.y?V.y-U.y:V.dx!=U.dx?V.dx-U.dx:V.dy-U.dy});for(F=0;F<R.length;F++)0<F&&R[F].x==R[F-1].x&&R[F].y==R[F-1].y&&R[F].dx==R[F-1].dx&&R[F].dy==R[F-1].dy||J.push("["+R[F].x+","+R[F].y+",0,"+R[F].dx+","+R[F].dy+"]");b.editor.graph.setCellStyles("points","["+J.join(",")+"]",[f]);l();b.hideDialog()});A.className="geBtn gePrimaryBtn";y=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
-null,[f]);l();b.hideDialog()});y.className="geBtn";L=document.createElement("div");L.style.marginTop="10px";L.style.textAlign="right";b.editor.cancelFirst?(L.appendChild(k),L.appendChild(y),L.appendChild(A)):(L.appendChild(y),L.appendChild(A),L.appendChild(k));d.appendChild(L)};this.destroy=l;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
+60);var K=mxUtils.button("",E);K.className="geSprite geSprite-delete";K.setAttribute("title",mxResources.get("delete"));K.style.position="relative";K.style.outline="none";K.style.border="none";K.style.margin="2px";K.style.float="right";K.style.cursor="pointer";mxUtils.setOpacity(K,10);k=document.createElement("div");k.appendChild(z);k.appendChild(y);k.appendChild(N);k.appendChild(L);k.appendChild(K);d.appendChild(k);var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min",
+"1");q.setAttribute("value","1");q.style.width="45px";q.style.position="relative";q.style.top=mxClient.IS_FF?"0px":"-4px";q.style.margin="0 4px 0 4px";k.appendChild(q);var C=document.createElement("select");C.style.position="relative";C.style.top=mxClient.IS_FF?"0px":"-4px";y=["left","right","top","bottom"];for(z=0;z<y.length;z++)L=y[z],N=document.createElement("option"),mxUtils.write(N,mxResources.get(L)),N.value=L,C.appendChild(N);k.appendChild(C);z=mxUtils.button(mxResources.get("add"),function(){var F=
+parseInt(q.value);F=1>F?1:100<F?100:F;q.value=F;for(var J=C.value,R=p.geometry,W=[],O=0;O<F;O++){switch(J){case "left":var V=R.x;var U=R.y+(O+1)*R.height/(F+1);break;case "right":V=R.x+R.width;U=R.y+(O+1)*R.height/(F+1);break;case "top":V=R.x+(O+1)*R.width/(F+1);U=R.y;break;case "bottom":V=R.x+(O+1)*R.width/(F+1),U=R.y+R.height}W.push(u(V-3,U-3))}m.setSelectionCells(W)});z.style.position="relative";z.style.marginLeft="8px";z.style.top=mxClient.IS_FF?"0px":"-4px";k.appendChild(z);var A=document.createElement("div");
+A.style.margin="4px 0px 8px 0px";A.style.whiteSpace="nowrap";A.style.height="24px";k=document.createElement("span");mxUtils.write(k,mxResources.get("dx"));A.appendChild(k);var B=document.createElement("input");B.setAttribute("type","number");B.setAttribute("min","0");B.setAttribute("max","100");B.style.width="45px";B.style.margin="0 4px 0 4px";A.appendChild(B);mxUtils.write(A,"%");var G=document.createElement("input");G.setAttribute("type","number");G.style.width="45px";G.style.margin="0 4px 0 4px";
+A.appendChild(G);mxUtils.write(A,"pt");k=document.createElement("span");mxUtils.write(k,mxResources.get("dy"));k.style.marginLeft="12px";A.appendChild(k);var M=document.createElement("input");M.setAttribute("type","number");M.setAttribute("min","0");M.setAttribute("max","100");M.style.width="45px";M.style.margin="0 4px 0 4px";A.appendChild(M);mxUtils.write(A,"%");var H=document.createElement("input");H.setAttribute("type","number");H.style.width="45px";H.style.margin="0 4px 0 4px";A.appendChild(H);
+mxUtils.write(A,"pt");d.appendChild(A);g();m.getSelectionModel().addListener(mxEvent.CHANGE,function(){0<m.getSelectionCount()?mxUtils.setOpacity(K,60):mxUtils.setOpacity(K,10);g()});m.addListener(mxEvent.CELLS_MOVED,g);mxEvent.addListener(B,"change",c);mxEvent.addListener(M,"change",c);mxEvent.addListener(G,"change",c);mxEvent.addListener(H,"change",c);k=mxUtils.button(mxResources.get("cancel"),function(){l();b.hideDialog()});k.className="geBtn";z=mxUtils.button(mxResources.get("apply"),function(){var F=
+m.model.cells,J=[],R=[],W;for(W in F){var O=F[W];O.cp&&R.push(e(O))}R.sort(function(V,U){return V.x!=U.x?V.x-U.x:V.y!=U.y?V.y-U.y:V.dx!=U.dx?V.dx-U.dx:V.dy-U.dy});for(F=0;F<R.length;F++)0<F&&R[F].x==R[F-1].x&&R[F].y==R[F-1].y&&R[F].dx==R[F-1].dx&&R[F].dy==R[F-1].dy||J.push("["+R[F].x+","+R[F].y+",0,"+R[F].dx+","+R[F].dy+"]");b.editor.graph.setCellStyles("points","["+J.join(",")+"]",[f]);l();b.hideDialog()});z.className="geBtn gePrimaryBtn";y=mxUtils.button(mxResources.get("reset"),function(){b.editor.graph.setCellStyles("points",
+null,[f]);l();b.hideDialog()});y.className="geBtn";L=document.createElement("div");L.style.marginTop="10px";L.style.textAlign="right";b.editor.cancelFirst?(L.appendChild(k),L.appendChild(y),L.appendChild(z)):(L.appendChild(y),L.appendChild(z),L.appendChild(k));d.appendChild(L)};this.destroy=l;this.container=d};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
{commonStyle:{fontColor:"#46495D",strokeColor:"#788AA3",fillColor:"#B2C9AB"}},{commonStyle:{fontColor:"#5AA9E6",strokeColor:"#FF6392",fillColor:"#FFE45E"}},{commonStyle:{fontColor:"#1D3557",strokeColor:"#457B9D",fillColor:"#A8DADC"},graph:{background:"#F1FAEE"}},{commonStyle:{fontColor:"#393C56",strokeColor:"#E07A5F",fillColor:"#F2CC8F"},graph:{background:"#F4F1DE",gridColor:"#D4D0C0"}},{commonStyle:{fontColor:"#143642",strokeColor:"#0F8B8D",fillColor:"#FAE5C7"},edgeStyle:{strokeColor:"#A8201A"},
graph:{background:"#DAD2D8",gridColor:"#ABA4A9"}},{commonStyle:{fontColor:"#FEFAE0",strokeColor:"#DDA15E",fillColor:"#BC6C25"},graph:{background:"#283618",gridColor:"#48632C"}},{commonStyle:{fontColor:"#E4FDE1",strokeColor:"#028090",fillColor:"#F45B69"},graph:{background:"#114B5F",gridColor:"#0B3240"}},{},{vertexStyle:{strokeColor:"#D0CEE2",fillColor:"#FAD9D5"},edgeStyle:{strokeColor:"#09555B"},commonStyle:{fontColor:"#1A1A1A"}},{vertexStyle:{strokeColor:"#BAC8D3",fillColor:"#09555B",fontColor:"#EEEEEE"},
@@ -11456,56 +11456,56 @@ IMAGE_PATH+"/img-lo-res.png";Editor.cameraImage="data:image/svg+xml;base64,PHN2Z
Editor.tagsImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjE4cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE4cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMjEuNDEsMTEuNDFsLTguODMtOC44M0MxMi4yMSwyLjIxLDExLjcsMiwxMS4xNywySDRDMi45LDIsMiwyLjksMiw0djcuMTdjMCwwLjUzLDAuMjEsMS4wNCwwLjU5LDEuNDFsOC44Myw4LjgzIGMwLjc4LDAuNzgsMi4wNSwwLjc4LDIuODMsMGw3LjE3LTcuMTdDMjIuMiwxMy40NiwyMi4yLDEyLjIsMjEuNDEsMTEuNDF6IE0xMi44MywyMEw0LDExLjE3VjRoNy4xN0wyMCwxMi44M0wxMi44MywyMHoiLz48Y2lyY2xlIGN4PSI2LjUiIGN5PSI2LjUiIHI9IjEuNSIvPjwvZz48L2c+PC9zdmc+";
Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;
-Editor.enableExportUrl=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(n){n.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(n,E){return"1"==mxUtils.getValue(n.style,"enumerate","0")}},
-{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(n,E){return"1"!=mxUtils.getValue(n.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(n,E){return"1"==mxUtils.getValue(n.style,"comic","0")||"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(n,E){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},
-{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(n,E){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(n,E){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(n,E){return"1"==mxUtils.getValue(n.style,
-"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(n,E){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(n,E){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(n,
-E){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(n,E){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(n,E){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",
-type:"int",defVal:-1,isVisible:function(n,E){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(n,E){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+Editor.enableExportUrl=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(n){n.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"enumerate","0")}},
+{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(n,D){return"1"!=mxUtils.getValue(n.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"comic","0")||"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},
+{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,
+"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(n,
+D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",
+type:"int",defVal:-1,isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")&&0<n.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(n,D){return"1"==mxUtils.getValue(n.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",
dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(n){return"orthogonalEdgeStyle"==mxUtils.getValue(n.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",
type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",
dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);
-Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(n,E){E=E.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&E.isTableCell(n.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(n,E){E=E.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&E.isTableCell(n.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(n,
-E){n=E.editorUi.editor.graph.getCellStyle(1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null);return"1"==mxUtils.getValue(n,"resizeLastRow","0")},isVisible:function(n,E){E=E.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&E.isTable(n.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(n,E){n=E.editorUi.editor.graph.getCellStyle(1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null);return"1"==mxUtils.getValue(n,"resizeLast",
-"0")},isVisible:function(n,E){E=E.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&E.isTable(n.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},
+Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(n,D){D=D.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&D.isTableCell(n.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(n,D){D=D.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&D.isTableCell(n.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(n,
+D){n=D.editorUi.editor.graph.getCellStyle(1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null);return"1"==mxUtils.getValue(n,"resizeLastRow","0")},isVisible:function(n,D){D=D.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&D.isTable(n.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(n,D){n=D.editorUi.editor.graph.getCellStyle(1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null);return"1"==mxUtils.getValue(n,"resizeLast",
+"0")},isVisible:function(n,D){D=D.editorUi.editor.graph;return 1==n.vertices.length&&0==n.edges.length&&D.isTable(n.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},
{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},
-{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(n,E){return E.editorUi.editor.graph.isCellConnectable(0<n.vertices.length&&0==n.edges.length?n.vertices[0]:null)},isVisible:function(n,E){return 0<n.vertices.length&&0==n.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
+{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(n,D){return D.editorUi.editor.graph.isCellConnectable(0<n.vertices.length&&0==n.edges.length?n.vertices[0]:null)},isVisible:function(n,D){return 0<n.vertices.length&&0==n.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",
-dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(n,E){return 1==n.vertices.length&&0==n.edges.length}},
-{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(n,E){n=1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null;E=E.editorUi.editor.graph;return null!=n&&(E.isSwimlane(n)||0<E.model.getChildCount(n))},isVisible:function(n,E){return 1==n.vertices.length&&0==n.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(n,E){var I=1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null;E=E.editorUi.editor.graph;return null!=I&&(E.isContainer(I)&&
-"0"!=n.style.collapsible||!E.isContainer(I)&&"1"==n.style.collapsible)},isVisible:function(n,E){return 1==n.vertices.length&&0==n.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(n,E){return 1==n.vertices.length&&0==n.edges.length&&!E.editorUi.editor.graph.isSwimlane(n.vertices[0])&&null==mxUtils.getValue(n.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,
-isVisible:function(n,E){E=E.editorUi.editor.graph.model;return 0<n.vertices.length?E.isVertex(E.getParent(n.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(n,E){n=0<n.vertices.length?
-E.editorUi.editor.graph.getCellGeometry(n.vertices[0]):null;return null!=n&&!n.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",
-type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(n,E){var I=mxUtils.getValue(n.style,mxConstants.STYLE_FILLCOLOR,null);return E.editorUi.editor.graph.isSwimlane(n.vertices[0])||null==I||I==mxConstants.NONE||0==mxUtils.getValue(n.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(n.style,mxConstants.STYLE_OPACITY,100)||null!=n.style.pointerEvents}},{name:"moveCells",
-dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(n,E){return 0<n.vertices.length&&E.editorUi.editor.graph.isContainer(n.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(n){var E=rough.canvas({getContext:function(){return n}});E.draw=function(I){var S=I.sets||[];I=I.options||this.getDefaultOptions();for(var Q=0;Q<S.length;Q++){var P=S[Q];switch(P.type){case "path":null!=I.stroke&&this._drawToContext(n,P,I);break;case "fillPath":this._drawToContext(n,P,I);break;case "fillSketch":this.fillSketch(n,P,I)}}};E.fillSketch=function(I,S,Q){var P=n.state.strokeColor,T=n.state.strokeWidth,Y=n.state.strokeAlpha,ca=n.state.dashed,ia=Q.fillWeight;
-0>ia&&(ia=Q.strokeWidth/2);n.setStrokeAlpha(n.state.fillAlpha);n.setStrokeColor(Q.fill||"");n.setStrokeWidth(ia);n.setDashed(!1);this._drawToContext(I,S,Q);n.setDashed(ca);n.setStrokeWidth(T);n.setStrokeColor(P);n.setStrokeAlpha(Y)};E._drawToContext=function(I,S,Q){I.begin();for(var P=0;P<S.ops.length;P++){var T=S.ops[P],Y=T.data;switch(T.op){case "move":I.moveTo(Y[0],Y[1]);break;case "bcurveTo":I.curveTo(Y[0],Y[1],Y[2],Y[3],Y[4],Y[5]);break;case "lineTo":I.lineTo(Y[0],Y[1])}}I.end();"fillPath"===
-S.type&&Q.filled?I.fill():I.stroke()};return E};(function(){function n(P,T,Y){this.canvas=P;this.rc=T;this.shape=Y;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,n.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,n.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,n.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
+dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(n,D){return 1==n.vertices.length&&0==n.edges.length}},
+{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(n,D){n=1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null;D=D.editorUi.editor.graph;return null!=n&&(D.isSwimlane(n)||0<D.model.getChildCount(n))},isVisible:function(n,D){return 1==n.vertices.length&&0==n.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(n,D){var I=1==n.vertices.length&&0==n.edges.length?n.vertices[0]:null;D=D.editorUi.editor.graph;return null!=I&&(D.isContainer(I)&&
+"0"!=n.style.collapsible||!D.isContainer(I)&&"1"==n.style.collapsible)},isVisible:function(n,D){return 1==n.vertices.length&&0==n.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(n,D){return 1==n.vertices.length&&0==n.edges.length&&!D.editorUi.editor.graph.isSwimlane(n.vertices[0])&&null==mxUtils.getValue(n.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,
+isVisible:function(n,D){D=D.editorUi.editor.graph.model;return 0<n.vertices.length?D.isVertex(D.getParent(n.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(n,D){n=0<n.vertices.length?
+D.editorUi.editor.graph.getCellGeometry(n.vertices[0]):null;return null!=n&&!n.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",
+type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(n,D){var I=mxUtils.getValue(n.style,mxConstants.STYLE_FILLCOLOR,null);return D.editorUi.editor.graph.isSwimlane(n.vertices[0])||null==I||I==mxConstants.NONE||0==mxUtils.getValue(n.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(n.style,mxConstants.STYLE_OPACITY,100)||null!=n.style.pointerEvents}},{name:"moveCells",
+dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(n,D){return 0<n.vertices.length&&D.editorUi.editor.graph.isContainer(n.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(n){var D=rough.canvas({getContext:function(){return n}});D.draw=function(I){var S=I.sets||[];I=I.options||this.getDefaultOptions();for(var Q=0;Q<S.length;Q++){var P=S[Q];switch(P.type){case "path":null!=I.stroke&&this._drawToContext(n,P,I);break;case "fillPath":this._drawToContext(n,P,I);break;case "fillSketch":this.fillSketch(n,P,I)}}};D.fillSketch=function(I,S,Q){var P=n.state.strokeColor,T=n.state.strokeWidth,X=n.state.strokeAlpha,ba=n.state.dashed,ja=Q.fillWeight;
+0>ja&&(ja=Q.strokeWidth/2);n.setStrokeAlpha(n.state.fillAlpha);n.setStrokeColor(Q.fill||"");n.setStrokeWidth(ja);n.setDashed(!1);this._drawToContext(I,S,Q);n.setDashed(ba);n.setStrokeWidth(T);n.setStrokeColor(P);n.setStrokeAlpha(X)};D._drawToContext=function(I,S,Q){I.begin();for(var P=0;P<S.ops.length;P++){var T=S.ops[P],X=T.data;switch(T.op){case "move":I.moveTo(X[0],X[1]);break;case "bcurveTo":I.curveTo(X[0],X[1],X[2],X[3],X[4],X[5]);break;case "lineTo":I.lineTo(X[0],X[1])}}I.end();"fillPath"===
+S.type&&Q.filled?I.fill():I.stroke()};return D};(function(){function n(P,T,X){this.canvas=P;this.rc=T;this.shape=X;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,n.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,n.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,n.prototype.rect);this.originalRoundrect=this.canvas.roundrect;this.canvas.roundrect=
mxUtils.bind(this,n.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,n.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,n.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,n.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,n.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
n.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,n.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,n.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,n.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,n.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,n.prototype.fillAndStroke);
-this.path=[];this.passThrough=!1}n.prototype.moveOp="M";n.prototype.lineOp="L";n.prototype.quadOp="Q";n.prototype.curveOp="C";n.prototype.closeOp="Z";n.prototype.getStyle=function(P,T){var Y=1;if(null!=this.shape.state){var ca=this.shape.state.cell.id;if(null!=ca)for(var ia=0;ia<ca.length;ia++)Y=(Y<<5)-Y+ca.charCodeAt(ia)<<0}Y={strokeWidth:this.canvas.state.strokeWidth,seed:Y,preserveVertices:!0};ca=this.rc.getDefaultOptions();Y.stroke=P?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":
-this.canvas.state.strokeColor:mxConstants.NONE;P=null;(Y.filled=T)?(Y.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,P=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):Y.fill="";Y.bowing=mxUtils.getValue(this.shape.style,"bowing",ca.bowing);Y.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ca.hachureAngle);Y.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ca.curveFitting);Y.roughness=mxUtils.getValue(this.shape.style,
-"jiggle",ca.roughness);Y.simplification=mxUtils.getValue(this.shape.style,"simplification",ca.simplification);Y.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ca.disableMultiStroke);Y.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ca.disableMultiStrokeFill);T=mxUtils.getValue(this.shape.style,"hachureGap",-1);Y.hachureGap="auto"==T?-1:T;Y.dashGap=mxUtils.getValue(this.shape.style,"dashGap",T);Y.dashOffset=mxUtils.getValue(this.shape.style,
-"dashOffset",T);Y.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",T);T=mxUtils.getValue(this.shape.style,"fillWeight",-1);Y.fillWeight="auto"==T?-1:T;T=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==T&&(T=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),T=null!=Y.fill&&(null!=P||null!=T&&Y.fill==T)?"solid":ca.fillStyle);Y.fillStyle=T;return Y};n.prototype.begin=function(){this.passThrough?
+this.path=[];this.passThrough=!1}n.prototype.moveOp="M";n.prototype.lineOp="L";n.prototype.quadOp="Q";n.prototype.curveOp="C";n.prototype.closeOp="Z";n.prototype.getStyle=function(P,T){var X=1;if(null!=this.shape.state){var ba=this.shape.state.cell.id;if(null!=ba)for(var ja=0;ja<ba.length;ja++)X=(X<<5)-X+ba.charCodeAt(ja)<<0}X={strokeWidth:this.canvas.state.strokeWidth,seed:X,preserveVertices:!0};ba=this.rc.getDefaultOptions();X.stroke=P?this.canvas.state.strokeColor===mxConstants.NONE?"transparent":
+this.canvas.state.strokeColor:mxConstants.NONE;P=null;(X.filled=T)?(X.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,P=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):X.fill="";X.bowing=mxUtils.getValue(this.shape.style,"bowing",ba.bowing);X.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",ba.hachureAngle);X.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",ba.curveFitting);X.roughness=mxUtils.getValue(this.shape.style,
+"jiggle",ba.roughness);X.simplification=mxUtils.getValue(this.shape.style,"simplification",ba.simplification);X.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",ba.disableMultiStroke);X.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",ba.disableMultiStrokeFill);T=mxUtils.getValue(this.shape.style,"hachureGap",-1);X.hachureGap="auto"==T?-1:T;X.dashGap=mxUtils.getValue(this.shape.style,"dashGap",T);X.dashOffset=mxUtils.getValue(this.shape.style,
+"dashOffset",T);X.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",T);T=mxUtils.getValue(this.shape.style,"fillWeight",-1);X.fillWeight="auto"==T?-1:T;T=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==T&&(T=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),T=null!=X.fill&&(null!=P||null!=T&&X.fill==T)?"solid":ba.fillStyle);X.fillStyle=T;return X};n.prototype.begin=function(){this.passThrough?
this.originalBegin.apply(this.canvas,arguments):this.path=[]};n.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};n.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var P=2;P<arguments.length;P+=2)this.lastX=arguments[P-1],this.lastY=arguments[P],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};n.prototype.lineTo=function(P,T){this.passThrough?this.originalLineTo.apply(this.canvas,
-arguments):(this.addOp(this.lineOp,P,T),this.lastX=P,this.lastY=T)};n.prototype.moveTo=function(P,T){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,P,T),this.lastX=P,this.lastY=T,this.firstX=P,this.firstY=T)};n.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};n.prototype.quadTo=function(P,T,Y,ca){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,P,
-T,Y,ca),this.lastX=Y,this.lastY=ca)};n.prototype.curveTo=function(P,T,Y,ca,ia,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,P,T,Y,ca,ia,Z),this.lastX=ia,this.lastY=Z)};n.prototype.arcTo=function(P,T,Y,ca,ia,Z,fa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var aa=mxUtils.arcToCurves(this.lastX,this.lastY,P,T,Y,ca,ia,Z,fa);if(null!=aa)for(var wa=0;wa<aa.length;wa+=6)this.curveTo(aa[wa],aa[wa+1],aa[wa+2],aa[wa+3],aa[wa+4],
-aa[wa+5]);this.lastX=Z;this.lastY=fa}};n.prototype.rect=function(P,T,Y,ca){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(P,T,Y,ca,this.getStyle(!0,!0)))};n.prototype.ellipse=function(P,T,Y,ca){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(P+Y/2,T+ca/2,Y,ca,this.getStyle(!0,!0)))};n.prototype.roundrect=function(P,T,Y,ca,ia,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,
-arguments):(this.begin(),this.moveTo(P+ia,T),this.lineTo(P+Y-ia,T),this.quadTo(P+Y,T,P+Y,T+Z),this.lineTo(P+Y,T+ca-Z),this.quadTo(P+Y,T+ca,P+Y-ia,T+ca),this.lineTo(P+ia,T+ca),this.quadTo(P,T+ca,P,T+ca-Z),this.lineTo(P,T+Z),this.quadTo(P,T,P+ia,T))};n.prototype.drawPath=function(P){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),P)}catch(Y){}this.passThrough=!1}else if(null!=this.nextShape){for(var T in P)this.nextShape.options[T]=P[T];P.stroke!=mxConstants.NONE&&null!=
+arguments):(this.addOp(this.lineOp,P,T),this.lastX=P,this.lastY=T)};n.prototype.moveTo=function(P,T){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,P,T),this.lastX=P,this.lastY=T,this.firstX=P,this.firstY=T)};n.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};n.prototype.quadTo=function(P,T,X,ba){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,P,
+T,X,ba),this.lastX=X,this.lastY=ba)};n.prototype.curveTo=function(P,T,X,ba,ja,Z){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,P,T,X,ba,ja,Z),this.lastX=ja,this.lastY=Z)};n.prototype.arcTo=function(P,T,X,ba,ja,Z,ka){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var da=mxUtils.arcToCurves(this.lastX,this.lastY,P,T,X,ba,ja,Z,ka);if(null!=da)for(var fa=0;fa<da.length;fa+=6)this.curveTo(da[fa],da[fa+1],da[fa+2],da[fa+3],da[fa+4],
+da[fa+5]);this.lastX=Z;this.lastY=ka}};n.prototype.rect=function(P,T,X,ba){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(P,T,X,ba,this.getStyle(!0,!0)))};n.prototype.ellipse=function(P,T,X,ba){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(P+X/2,T+ba/2,X,ba,this.getStyle(!0,!0)))};n.prototype.roundrect=function(P,T,X,ba,ja,Z){this.passThrough?this.originalRoundrect.apply(this.canvas,
+arguments):(this.begin(),this.moveTo(P+ja,T),this.lineTo(P+X-ja,T),this.quadTo(P+X,T,P+X,T+Z),this.lineTo(P+X,T+ba-Z),this.quadTo(P+X,T+ba,P+X-ja,T+ba),this.lineTo(P+ja,T+ba),this.quadTo(P,T+ba,P,T+ba-Z),this.lineTo(P,T+Z),this.quadTo(P,T,P+ja,T))};n.prototype.drawPath=function(P){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),P)}catch(X){}this.passThrough=!1}else if(null!=this.nextShape){for(var T in P)this.nextShape.options[T]=P[T];P.stroke!=mxConstants.NONE&&null!=
P.stroke||delete this.nextShape.options.stroke;P.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};n.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};n.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};n.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,
arguments):this.drawPath(this.getStyle(!0,!0))};n.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;
-this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(P){return new n(P,Editor.createRoughCanvas(P),this)};var E=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(P){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?E.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle",
-"rough")?this.createComicCanvas(P):this.createRoughCanvas(P)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(P,T,Y,ca,ia){null!=P.handJiggle&&P.handJiggle.passThrough||I.apply(this,arguments)};var S=mxShape.prototype.paint;mxShape.prototype.paint=function(P){var T=P.addTolerance,Y=!0;null!=this.style&&(Y="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=P.handJiggle&&P.handJiggle.constructor==n&&!this.outline){P.save();
-var ca=this.fill,ia=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,fa=P.setStrokeColor;P.setStrokeColor=function(){};var aa=P.setFillColor;P.setFillColor=function(){};Y||null==ca||(this.configurePointerEvents=function(){});P.handJiggle.passThrough=!0;S.apply(this,arguments);P.handJiggle.passThrough=!1;P.setFillColor=aa;P.setStrokeColor=fa;this.configurePointerEvents=Z;this.stroke=ia;this.fill=ca;P.restore();Y&&null!=ca&&(P.addTolerance=function(){})}S.apply(this,arguments);
-P.addTolerance=T};var Q=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(P,T,Y,ca,ia,Z){null!=P.handJiggle&&P.handJiggle.constructor==n?(P.handJiggle.passThrough=!0,Q.apply(this,arguments),P.handJiggle.passThrough=!1):Q.apply(this,arguments)}})();Editor.fastCompress=function(n){return null==n||0==n.length||"undefined"===typeof pako?n:Graph.arrayBufferToString(pako.deflateRaw(n))};Editor.fastDecompress=function(n){return null==n||0==n.length||"undefined"===typeof pako?
-n:pako.inflateRaw(Graph.stringToArrayBuffer(atob(n)),{to:"string"})};Editor.extractGraphModel=function(n,E,I){if(null!=n&&"undefined"!==typeof pako){var S=n.ownerDocument.getElementsByTagName("div"),Q=[];if(null!=S&&0<S.length)for(var P=0;P<S.length;P++)if("mxgraph"==S[P].getAttribute("class")){Q.push(S[P]);break}0<Q.length&&(S=Q[0].getAttribute("data-mxgraph"),null!=S?(Q=JSON.parse(S),null!=Q&&null!=Q.xml&&(n=mxUtils.parseXml(Q.xml),n=n.documentElement)):(Q=Q[0].getElementsByTagName("div"),0<Q.length&&
-(S=mxUtils.getTextContent(Q[0]),S=Graph.decompress(S,null,I),0<S.length&&(n=mxUtils.parseXml(S),n=n.documentElement))))}if(null!=n&&"svg"==n.nodeName)if(S=n.getAttribute("content"),null!=S&&"<"!=S.charAt(0)&&"%"!=S.charAt(0)&&(S=unescape(window.atob?atob(S):Base64.decode(cont,S))),null!=S&&"%"==S.charAt(0)&&(S=decodeURIComponent(S)),null!=S&&0<S.length)n=mxUtils.parseXml(S).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==n||E||(Q=null,"diagram"==n.nodeName?Q=n:"mxfile"==
-n.nodeName&&(S=n.getElementsByTagName("diagram"),0<S.length&&(Q=S[Math.max(0,Math.min(S.length-1,urlParams.page||0))])),null!=Q&&(n=Editor.parseDiagramNode(Q,I)));null==n||"mxGraphModel"==n.nodeName||E&&"mxfile"==n.nodeName||(n=null);return n};Editor.parseDiagramNode=function(n,E){var I=mxUtils.trim(mxUtils.getTextContent(n)),S=null;0<I.length?(n=Graph.decompress(I,null,E),null!=n&&0<n.length&&(S=mxUtils.parseXml(n).documentElement)):(n=mxUtils.getChildNodes(n),0<n.length&&(S=mxUtils.createXmlDocument(),
-S.appendChild(S.importNode(n[0],!0)),S=S.documentElement));return S};Editor.getDiagramNodeXml=function(n){var E=mxUtils.getTextContent(n),I=null;0<E.length?I=Graph.decompress(E):null!=n.firstChild&&(I=mxUtils.getXml(n.firstChild));return I};Editor.extractGraphModelFromPdf=function(n){n=n.substring(n.indexOf(",")+1);n=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n,!0);if("%PDF-1.7"==n.substring(0,8)){var E=n.indexOf("EmbeddedFile");if(-1<E){var I=n.indexOf("stream",E)+9;if(0<n.substring(E,I).indexOf("application#2Fvnd.jgraph.mxfile"))return E=
-n.indexOf("endstream",I-1),pako.inflateRaw(Graph.stringToArrayBuffer(n.substring(I,E)),{to:"string"})}return null}I=null;E="";for(var S=0,Q=0,P=[],T=null;Q<n.length;){var Y=n.charCodeAt(Q);Q+=1;10!=Y&&(E+=String.fromCharCode(Y));Y=="/Subject (%3Cmxfile".charCodeAt(S)?S++:S=0;if(19==S){var ca=n.indexOf("%3C%2Fmxfile%3E)",Q)+15;Q-=9;if(ca>Q){I=n.substring(Q,ca);break}}10==Y&&("endobj"==E?T=null:"obj"==E.substring(E.length-3,E.length)||"xref"==E||"trailer"==E?(T=[],P[E.split(" ")[0]]=T):null!=T&&T.push(E),
-E="")}null==I&&(I=Editor.extractGraphModelFromXref(P));null!=I&&(I=decodeURIComponent(I.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return I};Editor.extractGraphModelFromXref=function(n){var E=n.trailer,I=null;null!=E&&(E=/.* \/Info (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(E=n[E[1]],null!=E&&(E=/.* \/Subject (\d+) (\d+) R/g.exec(E.join("\n")),null!=E&&0<E.length&&(n=n[E[1]],null!=n&&(n=n.join("\n"),I=n.substring(1,n.length-1))))));return I};Editor.extractParserError=function(n,E){var I=
-null;n=null!=n?n.getElementsByTagName("parsererror"):null;null!=n&&0<n.length&&(I=E||mxResources.get("invalidChars"),E=n[0].getElementsByTagName("div"),0<E.length&&(I=mxUtils.getTextContent(E[0])));return null!=I?mxUtils.trim(I):I};Editor.addRetryToError=function(n,E){null!=n&&(n=null!=n.error?n.error:n,null==n.retry&&(n.retry=E))};Editor.configure=function(n,E){if(null!=n){Editor.config=n;Editor.configVersion=n.version;Menus.prototype.defaultFonts=n.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
+this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(P){return new n(P,Editor.createRoughCanvas(P),this)};var D=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(P){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?D.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle",
+"rough")?this.createComicCanvas(P):this.createRoughCanvas(P)};var I=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(P,T,X,ba,ja){null!=P.handJiggle&&P.handJiggle.passThrough||I.apply(this,arguments)};var S=mxShape.prototype.paint;mxShape.prototype.paint=function(P){var T=P.addTolerance,X=!0;null!=this.style&&(X="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=P.handJiggle&&P.handJiggle.constructor==n&&!this.outline){P.save();
+var ba=this.fill,ja=this.stroke;this.stroke=this.fill=null;var Z=this.configurePointerEvents,ka=P.setStrokeColor;P.setStrokeColor=function(){};var da=P.setFillColor;P.setFillColor=function(){};X||null==ba||(this.configurePointerEvents=function(){});P.handJiggle.passThrough=!0;S.apply(this,arguments);P.handJiggle.passThrough=!1;P.setFillColor=da;P.setStrokeColor=ka;this.configurePointerEvents=Z;this.stroke=ja;this.fill=ba;P.restore();X&&null!=ba&&(P.addTolerance=function(){})}S.apply(this,arguments);
+P.addTolerance=T};var Q=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(P,T,X,ba,ja,Z){null!=P.handJiggle&&P.handJiggle.constructor==n?(P.handJiggle.passThrough=!0,Q.apply(this,arguments),P.handJiggle.passThrough=!1):Q.apply(this,arguments)}})();Editor.fastCompress=function(n){return null==n||0==n.length||"undefined"===typeof pako?n:Graph.arrayBufferToString(pako.deflateRaw(n))};Editor.fastDecompress=function(n){return null==n||0==n.length||"undefined"===typeof pako?
+n:pako.inflateRaw(Graph.stringToArrayBuffer(atob(n)),{to:"string"})};Editor.extractGraphModel=function(n,D,I){if(null!=n&&"undefined"!==typeof pako){var S=n.ownerDocument.getElementsByTagName("div"),Q=[];if(null!=S&&0<S.length)for(var P=0;P<S.length;P++)if("mxgraph"==S[P].getAttribute("class")){Q.push(S[P]);break}0<Q.length&&(S=Q[0].getAttribute("data-mxgraph"),null!=S?(Q=JSON.parse(S),null!=Q&&null!=Q.xml&&(n=mxUtils.parseXml(Q.xml),n=n.documentElement)):(Q=Q[0].getElementsByTagName("div"),0<Q.length&&
+(S=mxUtils.getTextContent(Q[0]),S=Graph.decompress(S,null,I),0<S.length&&(n=mxUtils.parseXml(S),n=n.documentElement))))}if(null!=n&&"svg"==n.nodeName)if(S=n.getAttribute("content"),null!=S&&"<"!=S.charAt(0)&&"%"!=S.charAt(0)&&(S=unescape(window.atob?atob(S):Base64.decode(cont,S))),null!=S&&"%"==S.charAt(0)&&(S=decodeURIComponent(S)),null!=S&&0<S.length)n=mxUtils.parseXml(S).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==n||D||(Q=null,"diagram"==n.nodeName?Q=n:"mxfile"==
+n.nodeName&&(S=n.getElementsByTagName("diagram"),0<S.length&&(Q=S[Math.max(0,Math.min(S.length-1,urlParams.page||0))])),null!=Q&&(n=Editor.parseDiagramNode(Q,I)));null==n||"mxGraphModel"==n.nodeName||D&&"mxfile"==n.nodeName||(n=null);return n};Editor.parseDiagramNode=function(n,D){var I=mxUtils.trim(mxUtils.getTextContent(n)),S=null;0<I.length?(n=Graph.decompress(I,null,D),null!=n&&0<n.length&&(S=mxUtils.parseXml(n).documentElement)):(n=mxUtils.getChildNodes(n),0<n.length&&(S=mxUtils.createXmlDocument(),
+S.appendChild(S.importNode(n[0],!0)),S=S.documentElement));return S};Editor.getDiagramNodeXml=function(n){var D=mxUtils.getTextContent(n),I=null;0<D.length?I=Graph.decompress(D):null!=n.firstChild&&(I=mxUtils.getXml(n.firstChild));return I};Editor.extractGraphModelFromPdf=function(n){n=n.substring(n.indexOf(",")+1);n=window.atob&&!mxClient.IS_SF?atob(n):Base64.decode(n,!0);if("%PDF-1.7"==n.substring(0,8)){var D=n.indexOf("EmbeddedFile");if(-1<D){var I=n.indexOf("stream",D)+9;if(0<n.substring(D,I).indexOf("application#2Fvnd.jgraph.mxfile"))return D=
+n.indexOf("endstream",I-1),pako.inflateRaw(Graph.stringToArrayBuffer(n.substring(I,D)),{to:"string"})}return null}I=null;D="";for(var S=0,Q=0,P=[],T=null;Q<n.length;){var X=n.charCodeAt(Q);Q+=1;10!=X&&(D+=String.fromCharCode(X));X=="/Subject (%3Cmxfile".charCodeAt(S)?S++:S=0;if(19==S){var ba=n.indexOf("%3C%2Fmxfile%3E)",Q)+15;Q-=9;if(ba>Q){I=n.substring(Q,ba);break}}10==X&&("endobj"==D?T=null:"obj"==D.substring(D.length-3,D.length)||"xref"==D||"trailer"==D?(T=[],P[D.split(" ")[0]]=T):null!=T&&T.push(D),
+D="")}null==I&&(I=Editor.extractGraphModelFromXref(P));null!=I&&(I=decodeURIComponent(I.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return I};Editor.extractGraphModelFromXref=function(n){var D=n.trailer,I=null;null!=D&&(D=/.* \/Info (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(D=n[D[1]],null!=D&&(D=/.* \/Subject (\d+) (\d+) R/g.exec(D.join("\n")),null!=D&&0<D.length&&(n=n[D[1]],null!=n&&(n=n.join("\n"),I=n.substring(1,n.length-1))))));return I};Editor.extractParserError=function(n,D){var I=
+null;n=null!=n?n.getElementsByTagName("parsererror"):null;null!=n&&0<n.length&&(I=D||mxResources.get("invalidChars"),D=n[0].getElementsByTagName("div"),0<D.length&&(I=mxUtils.getTextContent(D[0])));return null!=I?mxUtils.trim(I):I};Editor.addRetryToError=function(n,D){null!=n&&(n=null!=n.error?n.error:n,null==n.retry&&(n.retry=D))};Editor.configure=function(n,D){if(null!=n){Editor.config=n;Editor.configVersion=n.version;Menus.prototype.defaultFonts=n.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=
n.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=n.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=n.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=n.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=n.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=n.autosaveDelay||DrawioFile.prototype.autosaveDelay;
n.debug&&(urlParams.test="1");null!=n.templateFile&&(EditorUi.templateFile=n.templateFile);null!=n.styles&&(Array.isArray(n.styles)?Editor.styles=n.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=n.globalVars&&(Editor.globalVars=n.globalVars);null!=n.compressXml&&(Editor.compressXml=n.compressXml);null!=n.includeDiagram&&(Editor.defaultIncludeDiagram=n.includeDiagram);null!=n.simpleLabels&&(Editor.simpleLabels=n.simpleLabels);null!=n.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=
n.oneDriveInlinePicker);null!=n.darkColor&&(Editor.darkColor=n.darkColor);null!=n.lightColor&&(Editor.lightColor=n.lightColor);null!=n.settingsName&&(Editor.configurationKey="."+n.settingsName+"-configuration",Editor.settingsKey="."+n.settingsName+"-config",mxSettings.key=Editor.settingsKey);n.customFonts&&(Menus.prototype.defaultFonts=n.customFonts.concat(Menus.prototype.defaultFonts));n.customPresetColors&&(ColorDialog.prototype.presetColors=n.customPresetColors.concat(ColorDialog.prototype.presetColors));
@@ -11514,53 +11514,53 @@ n.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabl
null!=n.defaultPageVisible&&(Graph.prototype.defaultPageVisible=n.defaultPageVisible);null!=n.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=n.defaultGridEnabled);null!=n.zoomWheel&&(Graph.zoomWheel=n.zoomWheel);null!=n.zoomFactor&&(I=parseFloat(n.zoomFactor),!isNaN(I)&&1<I?Graph.prototype.zoomFactor=I:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=n.gridSteps&&(I=parseInt(n.gridSteps),!isNaN(I)&&0<I?mxGraphView.prototype.gridSteps=I:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));
null!=n.pageFormat&&(I=parseInt(n.pageFormat.width),S=parseInt(n.pageFormat.height),!isNaN(I)&&0<I&&!isNaN(S)&&0<S?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,I,S),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));n.thumbWidth&&(Sidebar.prototype.thumbWidth=n.thumbWidth);n.thumbHeight&&(Sidebar.prototype.thumbHeight=n.thumbHeight);n.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=
n.emptyLibraryXml);n.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=n.emptyDiagramXml);n.sidebarWidth&&(EditorUi.prototype.hsplitPosition=n.sidebarWidth);n.sidebarTitles&&(Sidebar.prototype.sidebarTitles=n.sidebarTitles);n.sidebarTitleSize&&(I=parseInt(n.sidebarTitleSize),!isNaN(I)&&0<I?Sidebar.prototype.sidebarTitleSize=I:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));n.fontCss&&("string"===typeof n.fontCss?Editor.configureFontCss(n.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));
-null!=n.autosaveDelay&&(I=parseInt(n.autosaveDelay),!isNaN(I)&&0<I?DrawioFile.prototype.autosaveDelay=I:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=n.plugins&&!E)for(App.initPluginCallback(),E=0;E<n.plugins.length;E++)mxscript(n.plugins[E]);null!=n.maxImageBytes&&(EditorUi.prototype.maxImageBytes=n.maxImageBytes);null!=n.maxImageSize&&(EditorUi.prototype.maxImageSize=n.maxImageSize);null!=n.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=n.shareCursorPosition);
-null!=n.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=n.showRemoteCursors)}};Editor.configureFontCss=function(n){if(null!=n){Editor.prototype.fontCss=n;var E=document.getElementsByTagName("script")[0];if(null!=E&&null!=E.parentNode){var I=document.createElement("style");I.setAttribute("type","text/css");I.appendChild(document.createTextNode(n));E.parentNode.insertBefore(I,E);n=n.split("url(");for(I=1;I<n.length;I++){var S=n[I].indexOf(")");S=Editor.trimCssUrl(n[I].substring(0,S));var Q=
-document.createElement("link");Q.setAttribute("rel","preload");Q.setAttribute("href",S);Q.setAttribute("as","font");Q.setAttribute("crossorigin","");E.parentNode.insertBefore(Q,E)}}}};Editor.trimCssUrl=function(n){return n.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(n){n=null!=
-n?n:Editor.GUID_LENGTH;for(var E=[],I=0;I<n;I++)E.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return E.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(n){n=null!=n&&"mxlibrary"!=n.nodeName?this.extractGraphModel(n):
-null;if(null!=n){var E=Editor.extractParserError(n,mxResources.get("invalidOrMissingFile"));if(E)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[n],"cause",[E]),Error(mxResources.get("notADiagramFile")+" ("+E+")");if("mxGraphModel"==n.nodeName){E=n.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=E&&""!=E)E!=this.graph.currentStyle&&(I=null!=this.graph.themes?this.graph.themes[E]:mxUtils.load(STYLE_PATH+"/"+E+".xml").getDocumentElement(),null!=I&&(S=new mxCodec(I.ownerDocument),
-S.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=I){var S=new mxCodec(I.ownerDocument);S.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=E;this.graph.mathEnabled="1"==urlParams.math||"1"==n.getAttribute("math");E=n.getAttribute("backgroundImage");null!=E?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(E)):this.graph.setBackgroundImage(null);
-mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==n.getAttribute("shadow"),!1);if(E=n.getAttribute("extFonts"))try{for(E=E.split("|").map(function(Q){Q=Q.split("^");return{name:Q[0],url:Q[1]}}),I=0;I<E.length;I++)this.graph.addExtFont(E[I].name,E[I].url)}catch(Q){console.log("ExtFonts format error: "+
-Q.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(n,E){n=null!=n?n:!0;var I=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",this.graph.currentStyle);var S=this.graph.getBackgroundImageObject(this.graph.backgroundImage,
-E);null!=S&&I.setAttribute("backgroundImage",JSON.stringify(S));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(S=this.graph.extFonts.map(function(Q){return Q.name+"^"+Q.url}),I.setAttribute("extFonts",S.join("|")));return I};Editor.prototype.isDataSvg=function(n){try{var E=mxUtils.parseXml(n).documentElement.getAttribute("content");if(null!=E&&(null!=E&&"<"!=E.charAt(0)&&"%"!=
-E.charAt(0)&&(E=unescape(window.atob?atob(E):Base64.decode(cont,E))),null!=E&&"%"==E.charAt(0)&&(E=decodeURIComponent(E)),null!=E&&0<E.length)){var I=mxUtils.parseXml(E).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(S){}return!1};Editor.prototype.extractGraphModel=function(n,E,I){return Editor.extractGraphModel.apply(this,arguments)};var l=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
+null!=n.autosaveDelay&&(I=parseInt(n.autosaveDelay),!isNaN(I)&&0<I?DrawioFile.prototype.autosaveDelay=I:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=n.plugins&&!D)for(App.initPluginCallback(),D=0;D<n.plugins.length;D++)mxscript(n.plugins[D]);null!=n.maxImageBytes&&(EditorUi.prototype.maxImageBytes=n.maxImageBytes);null!=n.maxImageSize&&(EditorUi.prototype.maxImageSize=n.maxImageSize);null!=n.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=n.shareCursorPosition);
+null!=n.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=n.showRemoteCursors)}};Editor.configureFontCss=function(n){if(null!=n){Editor.prototype.fontCss=n;var D=document.getElementsByTagName("script")[0];if(null!=D&&null!=D.parentNode){var I=document.createElement("style");I.setAttribute("type","text/css");I.appendChild(document.createTextNode(n));D.parentNode.insertBefore(I,D);n=n.split("url(");for(I=1;I<n.length;I++){var S=n[I].indexOf(")");S=Editor.trimCssUrl(n[I].substring(0,S));var Q=
+document.createElement("link");Q.setAttribute("rel","preload");Q.setAttribute("href",S);Q.setAttribute("as","font");Q.setAttribute("crossorigin","");D.parentNode.insertBefore(Q,D)}}}};Editor.trimCssUrl=function(n){return n.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(n){n=null!=
+n?n:Editor.GUID_LENGTH;for(var D=[],I=0;I<n;I++)D.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return D.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(n){n=null!=n&&"mxlibrary"!=n.nodeName?this.extractGraphModel(n):
+null;if(null!=n){var D=Editor.extractParserError(n,mxResources.get("invalidOrMissingFile"));if(D)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[n],"cause",[D]),Error(mxResources.get("notADiagramFile")+" ("+D+")");if("mxGraphModel"==n.nodeName){D=n.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=D&&""!=D)D!=this.graph.currentStyle&&(I=null!=this.graph.themes?this.graph.themes[D]:mxUtils.load(STYLE_PATH+"/"+D+".xml").getDocumentElement(),null!=I&&(S=new mxCodec(I.ownerDocument),
+S.decode(I,this.graph.getStylesheet())));else{var I=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=I){var S=new mxCodec(I.ownerDocument);S.decode(I,this.graph.getStylesheet())}}this.graph.currentStyle=D;this.graph.mathEnabled="1"==urlParams.math||"1"==n.getAttribute("math");D=n.getAttribute("backgroundImage");null!=D?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(D)):this.graph.setBackgroundImage(null);
+mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==n.getAttribute("shadow"),!1);if(D=n.getAttribute("extFonts"))try{for(D=D.split("|").map(function(Q){Q=Q.split("^");return{name:Q[0],url:Q[1]}}),I=0;I<D.length;I++)this.graph.addExtFont(D[I].name,D[I].url)}catch(Q){console.log("ExtFonts format error: "+
+Q.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var f=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(n,D){n=null!=n?n:!0;var I=f.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&I.setAttribute("style",this.graph.currentStyle);var S=this.graph.getBackgroundImageObject(this.graph.backgroundImage,
+D);null!=S&&I.setAttribute("backgroundImage",JSON.stringify(S));I.setAttribute("math",this.graph.mathEnabled?"1":"0");I.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(S=this.graph.extFonts.map(function(Q){return Q.name+"^"+Q.url}),I.setAttribute("extFonts",S.join("|")));return I};Editor.prototype.isDataSvg=function(n){try{var D=mxUtils.parseXml(n).documentElement.getAttribute("content");if(null!=D&&(null!=D&&"<"!=D.charAt(0)&&"%"!=
+D.charAt(0)&&(D=unescape(window.atob?atob(D):Base64.decode(cont,D))),null!=D&&"%"==D.charAt(0)&&(D=decodeURIComponent(D)),null!=D&&0<D.length)){var I=mxUtils.parseXml(D).documentElement;return"mxfile"==I.nodeName||"mxGraphModel"==I.nodeName}}catch(S){}return!1};Editor.prototype.extractGraphModel=function(n,D,I){return Editor.extractGraphModel.apply(this,arguments)};var l=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=
null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();l.apply(this,arguments)};var d=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){d.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?
-!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";Editor.initMath=function(n,E){if("undefined"===typeof window.MathJax){n=(null!=n?n:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full,Safe";Editor.mathJaxQueue=
-[];Editor.doMathJaxRender=function(T){window.setTimeout(function(){"hidden"!=T.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,T])},0)};var I=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";E=null!=E?E:{"HTML-CSS":{availableFonts:[I],imageFont:null},SVG:{font:I,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(E);
+!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";Editor.initMath=function(n,D){if("undefined"===typeof window.MathJax){n=(null!=n?n:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full,Safe";Editor.mathJaxQueue=
+[];Editor.doMathJaxRender=function(T){window.setTimeout(function(){"hidden"!=T.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,T])},0)};var I=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";D=null!=D?D:{"HTML-CSS":{availableFonts:[I],imageFont:null},SVG:{font:I,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(D);
MathJax.Hub.Register.StartupHook("Begin",function(){for(var T=0;T<Editor.mathJaxQueue.length;T++)Editor.doMathJaxRender(Editor.mathJaxQueue[T])})}};Editor.MathJaxRender=function(T){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(T):Editor.mathJaxQueue.push(T)};Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var S=Editor.prototype.init;Editor.prototype.init=function(){S.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(T,
-Y){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};I=document.getElementsByTagName("script");if(null!=I&&0<I.length){var Q=document.createElement("script");Q.setAttribute("type","text/javascript");Q.setAttribute("src",n);I[0].parentNode.appendChild(Q)}try{if(mxClient.IS_GC||mxClient.IS_SF){var P=document.createElement("style");P.type="text/css";P.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(P)}}catch(T){}}};
-Editor.prototype.csvToArray=function(n){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(n))return null;var E=[];n.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(I,S,Q,P){void 0!==S?E.push(S.replace(/\\'/g,"'")):void 0!==Q?E.push(Q.replace(/\\"/g,
-'"')):void 0!==P&&E.push(P);return""});/,\s*$/.test(n)&&E.push("");return E};Editor.prototype.isCorsEnabledForUrl=function(n){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||n.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(n)||"https://raw.githubusercontent.com/"===n.substring(0,34)||"https://fonts.googleapis.com/"===
-n.substring(0,29)||"https://fonts.gstatic.com/"===n.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var n=new mxUrlConverter;n.updateBaseUrl();var E=n.convert,I=this;n.convert=function(S){if(null!=S){var Q="http://"==S.substring(0,7)||"https://"==S.substring(0,8);Q&&!navigator.onLine?S=Editor.svgBrokenImage.src:!Q||S.substring(0,n.baseUrl.length)==n.baseUrl||I.crossOriginImages&&I.isCorsEnabledForUrl(S)?"chrome-extension://"==S.substring(0,19)||mxClient.IS_CHROMEAPP||(S=E.apply(this,
-arguments)):S=PROXY_URL+"?url="+encodeURIComponent(S)}return S};return n};Editor.createSvgDataUri=function(n){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(n)))};Editor.prototype.convertImageToDataUri=function(n,E){try{var I=!0,S=window.setTimeout(mxUtils.bind(this,function(){I=!1;E(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(n))mxUtils.get(n,mxUtils.bind(this,function(P){window.clearTimeout(S);I&&E(Editor.createSvgDataUri(P.getText()))}),function(){window.clearTimeout(S);
-I&&E(Editor.svgBrokenImage.src)});else{var Q=new Image;this.crossOriginImages&&(Q.crossOrigin="anonymous");Q.onload=function(){window.clearTimeout(S);if(I)try{var P=document.createElement("canvas"),T=P.getContext("2d");P.height=Q.height;P.width=Q.width;T.drawImage(Q,0,0);E(P.toDataURL())}catch(Y){E(Editor.svgBrokenImage.src)}};Q.onerror=function(){window.clearTimeout(S);I&&E(Editor.svgBrokenImage.src)};Q.src=n}}catch(P){E(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(n,E,I,
-S){null==S&&(S=this.createImageUrlConverter());var Q=0,P=I||{};I=mxUtils.bind(this,function(T,Y){T=n.getElementsByTagName(T);for(var ca=0;ca<T.length;ca++)mxUtils.bind(this,function(ia){try{if(null!=ia){var Z=S.convert(ia.getAttribute(Y));if(null!=Z&&"data:"!=Z.substring(0,5)){var fa=P[Z];null==fa?(Q++,this.convertImageToDataUri(Z,function(aa){null!=aa&&(P[Z]=aa,ia.setAttribute(Y,aa));Q--;0==Q&&E(n)})):ia.setAttribute(Y,fa)}else null!=Z&&ia.setAttribute(Y,Z)}}catch(aa){}})(T[ca])});I("image","xlink:href");
-I("img","src");0==Q&&E(n)};Editor.base64Encode=function(n){for(var E="",I=0,S=n.length,Q,P,T;I<S;){Q=n.charCodeAt(I++)&255;if(I==S){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&3)<<4);E+="==";break}P=n.charCodeAt(I++);if(I==S){E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&
-3)<<4|(P&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2);E+="=";break}T=n.charCodeAt(I++);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q>>2);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&3)<<4|(P&240)>>4);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2|(T&192)>>6);E+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T&63)}return E};
-Editor.prototype.loadUrl=function(n,E,I,S,Q,P,T,Y){try{var ca=!T&&(S||/(\.png)($|\?)/i.test(n)||/(\.jpe?g)($|\?)/i.test(n)||/(\.gif)($|\?)/i.test(n)||/(\.pdf)($|\?)/i.test(n));Q=null!=Q?Q:!0;var ia=mxUtils.bind(this,function(){mxUtils.get(n,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=E){var fa=Z.getText();if(ca){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();
-fa=Array(Z.length);for(var aa=0;aa<Z.length;aa++)fa[aa]=String.fromCharCode(Z[aa]);fa=fa.join("")}P=null!=P?P:"data:image/png;base64,";fa=P+Editor.base64Encode(fa)}E(fa)}}else null!=I&&(0==Z.getStatus()?I({message:mxResources.get("accessDenied")},Z):I({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=I&&I({message:mxResources.get("error")+" "+Z.getStatus()})},ca,this.timeout,function(){Q&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:ia})},Y)});ia()}catch(Z){null!=I&&I(Z)}};
-Editor.prototype.absoluteCssFonts=function(n){var E=null;if(null!=n){var I=n.split("url(");if(0<I.length){E=[I[0]];n=window.location.pathname;var S=null!=n?n.lastIndexOf("/"):-1;0<=S&&(n=n.substring(0,S+1));S=document.getElementsByTagName("base");var Q=null;null!=S&&0<S.length&&(Q=S[0].getAttribute("href"));for(var P=1;P<I.length;P++)if(S=I[P].indexOf(")"),0<S){var T=Editor.trimCssUrl(I[P].substring(0,S));this.graph.isRelativeUrl(T)&&(T=null!=Q?Q+T:window.location.protocol+"//"+window.location.hostname+
-("/"==T.charAt(0)?"":n)+T);E.push('url("'+T+'"'+I[P].substring(S))}else E.push(I[P])}else E=[n]}return null!=E?E.join(""):null};Editor.prototype.mapFontUrl=function(n,E,I){/^https?:\/\//.test(E)&&!this.isCorsEnabledForUrl(E)&&(E=PROXY_URL+"?url="+encodeURIComponent(E));I(n,E)};Editor.prototype.embedCssFonts=function(n,E){var I=n.split("url("),S=0;null==this.cachedFonts&&(this.cachedFonts={});var Q=mxUtils.bind(this,function(){if(0==S){for(var ca=[I[0]],ia=1;ia<I.length;ia++){var Z=I[ia].indexOf(")");
-ca.push('url("');ca.push(this.cachedFonts[Editor.trimCssUrl(I[ia].substring(0,Z))]);ca.push('"'+I[ia].substring(Z))}E(ca.join(""))}});if(0<I.length){for(n=1;n<I.length;n++){var P=I[n].indexOf(")"),T=null,Y=I[n].indexOf("format(",P);0<Y&&(T=Editor.trimCssUrl(I[n].substring(Y+7,I[n].indexOf(")",Y))));mxUtils.bind(this,function(ca){if(null==this.cachedFonts[ca]){this.cachedFonts[ca]=ca;S++;var ia="application/x-font-ttf";if("svg"==T||/(\.svg)($|\?)/i.test(ca))ia="image/svg+xml";else if("otf"==T||"embedded-opentype"==
-T||/(\.otf)($|\?)/i.test(ca))ia="application/x-font-opentype";else if("woff"==T||/(\.woff)($|\?)/i.test(ca))ia="application/font-woff";else if("woff2"==T||/(\.woff2)($|\?)/i.test(ca))ia="application/font-woff2";else if("eot"==T||/(\.eot)($|\?)/i.test(ca))ia="application/vnd.ms-fontobject";else if("sfnt"==T||/(\.sfnt)($|\?)/i.test(ca))ia="application/font-sfnt";this.mapFontUrl(ia,ca,mxUtils.bind(this,function(Z,fa){this.loadUrl(fa,mxUtils.bind(this,function(aa){this.cachedFonts[ca]=aa;S--;Q()}),mxUtils.bind(this,
-function(aa){S--;Q()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[n].substring(0,P)),T)}Q()}else E(n)};Editor.prototype.loadFonts=function(n){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(E){this.resolvedFontCss=E;null!=n&&n()})):null!=n&&n()};Editor.prototype.createGoogleFontCache=function(){var n={},E;for(E in Graph.fontMapping)Graph.isCssFontUrl(E)&&(n[E]=Graph.fontMapping[E]);return n};Editor.prototype.embedExtFonts=
-function(n){var E=this.graph.getCustomFonts();if(0<E.length){var I=[],S=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var Q=mxUtils.bind(this,function(){0==S&&this.embedCssFonts(I.join(""),n)}),P=0;P<E.length;P++)mxUtils.bind(this,function(T,Y){Graph.isCssFontUrl(Y)?null==this.cachedGoogleFonts[Y]?(S++,this.loadUrl(Y,mxUtils.bind(this,function(ca){this.cachedGoogleFonts[Y]=ca;I.push(ca+"\n");S--;Q()}),mxUtils.bind(this,function(ca){S--;I.push("@import url("+
-Y+");\n");Q()}))):I.push(this.cachedGoogleFonts[Y]+"\n"):I.push('@font-face {font-family: "'+T+'";src: url("'+Y+'")}\n')})(E[P].name,E[P].url);Q()}else n()};Editor.prototype.addMathCss=function(n){n=n.getElementsByTagName("defs");if(null!=n&&0<n.length)for(var E=document.getElementsByTagName("style"),I=0;I<E.length;I++){var S=mxUtils.getTextContent(E[I]);0>S.indexOf("mxPageSelector")&&0<S.indexOf("MathJax")&&n[0].appendChild(E[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(n,E){E=null!=
-E?E:this.absoluteCssFonts(this.fontCss);if(null!=E){var I=n.getElementsByTagName("defs"),S=n.ownerDocument;0==I.length?(I=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"defs"):S.createElement("defs"),null!=n.firstChild?n.insertBefore(I,n.firstChild):n.appendChild(I)):I=I[0];n=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"style"):S.createElement("style");n.setAttribute("type","text/css");mxUtils.setTextContent(n,E);I.appendChild(n)}};Editor.prototype.isExportToCanvas=
-function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(n,E,I){var S=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(S/n,S/E))};Editor.prototype.exportToCanvas=function(n,E,I,S,Q,P,T,Y,ca,ia,Z,fa,aa,wa,la,za,Ba,ua){try{P=null!=P?P:!0;T=null!=T?T:!0;fa=null!=fa?fa:this.graph;aa=null!=aa?aa:0;var Da=ca?null:fa.background;Da==mxConstants.NONE&&(Da=null);null==Da&&(Da=S);null==Da&&0==ca&&(Da=za?this.graph.defaultPageBackgroundColor:"#ffffff");
-this.convertImages(fa.getSvg(null,null,aa,wa,null,T,null,null,null,ia,null,za,Ba,ua),mxUtils.bind(this,function(Fa){try{var Ka=new Image;Ka.onload=mxUtils.bind(this,function(){try{var Ia=function(){mxClient.IS_SF?window.setTimeout(function(){Aa.drawImage(Ka,0,0);n(Ea,Fa)},0):(Aa.drawImage(Ka,0,0),n(Ea,Fa))},Ea=document.createElement("canvas"),Ca=parseInt(Fa.getAttribute("width")),Na=parseInt(Fa.getAttribute("height"));Y=null!=Y?Y:1;null!=E&&(Y=P?Math.min(1,Math.min(3*E/(4*Na),E/Ca)):E/Ca);Y=this.getMaxCanvasScale(Ca,
-Na,Y);Ca=Math.ceil(Y*Ca);Na=Math.ceil(Y*Na);Ea.setAttribute("width",Ca);Ea.setAttribute("height",Na);var Aa=Ea.getContext("2d");null!=Da&&(Aa.beginPath(),Aa.rect(0,0,Ca,Na),Aa.fillStyle=Da,Aa.fill());1!=Y&&Aa.scale(Y,Y);if(la){var ya=fa.view,pa=ya.scale;ya.scale=1;var ea=btoa(unescape(encodeURIComponent(ya.createSvgGrid(ya.gridColor))));ya.scale=pa;ea="data:image/svg+xml;base64,"+ea;var ra=fa.gridSize*ya.gridSteps*Y,xa=fa.getGraphBounds(),va=ya.translate.x*pa,qa=ya.translate.y*pa,ta=va+(xa.x-va)/
-pa-aa,ja=qa+(xa.y-qa)/pa-aa,oa=new Image;oa.onload=function(){try{for(var ba=-Math.round(ra-mxUtils.mod((va-ta)*Y,ra)),da=-Math.round(ra-mxUtils.mod((qa-ja)*Y,ra));ba<Ca;ba+=ra)for(var na=da;na<Na;na+=ra)Aa.drawImage(oa,ba/Y,na/Y);Ia()}catch(ka){null!=Q&&Q(ka)}};oa.onerror=function(ba){null!=Q&&Q(ba)};oa.src=ea}else Ia()}catch(ba){null!=Q&&Q(ba)}});Ka.onerror=function(Ia){null!=Q&&Q(Ia)};ia&&this.graph.addSvgShadow(Fa);this.graph.mathEnabled&&this.addMathCss(Fa);var Qa=mxUtils.bind(this,function(){try{null!=
-this.resolvedFontCss&&this.addFontCss(Fa,this.resolvedFontCss),Ka.src=Editor.createSvgDataUri(mxUtils.getXml(Fa))}catch(Ia){null!=Q&&Q(Ia)}});this.embedExtFonts(mxUtils.bind(this,function(Ia){try{null!=Ia&&this.addFontCss(Fa,Ia),this.loadFonts(Qa)}catch(Ea){null!=Q&&Q(Ea)}}))}catch(Ia){null!=Q&&Q(Ia)}}),I,Z)}catch(Fa){null!=Q&&Q(Fa)}};Editor.crcTable=[];for(var t=0;256>t;t++)for(var u=t,D=0;8>D;D++)u=1==(u&1)?3988292384^u>>>1:u>>>1,Editor.crcTable[t]=u;Editor.updateCRC=function(n,E,I,S){for(var Q=
-0;Q<S;Q++)n=Editor.crcTable[(n^E.charCodeAt(I+Q))&255]^n>>>8;return n};Editor.crc32=function(n){for(var E=-1,I=0;I<n.length;I++)E=E>>>8^Editor.crcTable[(E^n.charCodeAt(I))&255];return(E^-1)>>>0};Editor.writeGraphModelToPng=function(n,E,I,S,Q){function P(Z,fa){var aa=ca;ca+=fa;return Z.substring(aa,ca)}function T(Z){Z=P(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function Y(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}n=n.substring(n.indexOf(",")+
-1);n=window.atob?atob(n):Base64.decode(n,!0);var ca=0;if(P(n,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=Q&&Q();else if(P(n,4),"IHDR"!=P(n,4))null!=Q&&Q();else{P(n,17);Q=n.substring(0,ca);do{var ia=T(n);if("IDAT"==P(n,4)){Q=n.substring(0,ca-8);"pHYs"==E&&"dpi"==I?(I=Math.round(S/.0254),I=Y(I)+Y(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==E?String.fromCharCode(0):"")+S;S=4294967295;S=Editor.updateCRC(S,E,0,4);S=Editor.updateCRC(S,I,0,I.length);Q+=Y(I.length)+
-E+I+Y(S^4294967295);Q+=n.substring(ca-8,n.length);break}Q+=n.substring(ca-8,ca-4+ia);P(n,ia);P(n,4)}while(ia);return"data:image/png;base64,"+(window.btoa?btoa(Q):Base64.encode(Q,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var c=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(n,E){c.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var e=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
-function(){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(n,E){var I=null;null!=n.editor.graph.getModel().getParent(E)?I=E.getId():null!=n.currentPage&&(I=n.currentPage.getId());return I});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var k=Format.prototype.refresh;
+X){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};I=document.getElementsByTagName("script");if(null!=I&&0<I.length){var Q=document.createElement("script");Q.setAttribute("type","text/javascript");Q.setAttribute("src",n);I[0].parentNode.appendChild(Q)}try{if(mxClient.IS_GC||mxClient.IS_SF){var P=document.createElement("style");P.type="text/css";P.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(P)}}catch(T){}}};
+Editor.prototype.csvToArray=function(n){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(n))return null;var D=[];n.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(I,S,Q,P){void 0!==S?D.push(S.replace(/\\'/g,"'")):void 0!==Q?D.push(Q.replace(/\\"/g,
+'"')):void 0!==P&&D.push(P);return""});/,\s*$/.test(n)&&D.push("");return D};Editor.prototype.isCorsEnabledForUrl=function(n){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||n.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(n)||"https://raw.githubusercontent.com/"===n.substring(0,34)||"https://fonts.googleapis.com/"===
+n.substring(0,29)||"https://fonts.gstatic.com/"===n.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var n=new mxUrlConverter;n.updateBaseUrl();var D=n.convert,I=this;n.convert=function(S){if(null!=S){var Q="http://"==S.substring(0,7)||"https://"==S.substring(0,8);Q&&!navigator.onLine?S=Editor.svgBrokenImage.src:!Q||S.substring(0,n.baseUrl.length)==n.baseUrl||I.crossOriginImages&&I.isCorsEnabledForUrl(S)?"chrome-extension://"==S.substring(0,19)||mxClient.IS_CHROMEAPP||(S=D.apply(this,
+arguments)):S=PROXY_URL+"?url="+encodeURIComponent(S)}return S};return n};Editor.createSvgDataUri=function(n){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(n)))};Editor.prototype.convertImageToDataUri=function(n,D){try{var I=!0,S=window.setTimeout(mxUtils.bind(this,function(){I=!1;D(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(n))mxUtils.get(n,mxUtils.bind(this,function(P){window.clearTimeout(S);I&&D(Editor.createSvgDataUri(P.getText()))}),function(){window.clearTimeout(S);
+I&&D(Editor.svgBrokenImage.src)});else{var Q=new Image;this.crossOriginImages&&(Q.crossOrigin="anonymous");Q.onload=function(){window.clearTimeout(S);if(I)try{var P=document.createElement("canvas"),T=P.getContext("2d");P.height=Q.height;P.width=Q.width;T.drawImage(Q,0,0);D(P.toDataURL())}catch(X){D(Editor.svgBrokenImage.src)}};Q.onerror=function(){window.clearTimeout(S);I&&D(Editor.svgBrokenImage.src)};Q.src=n}}catch(P){D(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(n,D,I,
+S){null==S&&(S=this.createImageUrlConverter());var Q=0,P=I||{};I=mxUtils.bind(this,function(T,X){T=n.getElementsByTagName(T);for(var ba=0;ba<T.length;ba++)mxUtils.bind(this,function(ja){try{if(null!=ja){var Z=S.convert(ja.getAttribute(X));if(null!=Z&&"data:"!=Z.substring(0,5)){var ka=P[Z];null==ka?(Q++,this.convertImageToDataUri(Z,function(da){null!=da&&(P[Z]=da,ja.setAttribute(X,da));Q--;0==Q&&D(n)})):ja.setAttribute(X,ka)}else null!=Z&&ja.setAttribute(X,Z)}}catch(da){}})(T[ba])});I("image","xlink:href");
+I("img","src");0==Q&&D(n)};Editor.base64Encode=function(n){for(var D="",I=0,S=n.length,Q,P,T;I<S;){Q=n.charCodeAt(I++)&255;if(I==S){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&3)<<4);D+="==";break}P=n.charCodeAt(I++);if(I==S){D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&
+3)<<4|(P&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2);D+="=";break}T=n.charCodeAt(I++);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q>>2);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&3)<<4|(P&240)>>4);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&15)<<2|(T&192)>>6);D+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T&63)}return D};
+Editor.prototype.loadUrl=function(n,D,I,S,Q,P,T,X){try{var ba=!T&&(S||/(\.png)($|\?)/i.test(n)||/(\.jpe?g)($|\?)/i.test(n)||/(\.gif)($|\?)/i.test(n)||/(\.pdf)($|\?)/i.test(n));Q=null!=Q?Q:!0;var ja=mxUtils.bind(this,function(){mxUtils.get(n,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&&299>=Z.getStatus()){if(null!=D){var ka=Z.getText();if(ba){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();
+ka=Array(Z.length);for(var da=0;da<Z.length;da++)ka[da]=String.fromCharCode(Z[da]);ka=ka.join("")}P=null!=P?P:"data:image/png;base64,";ka=P+Editor.base64Encode(ka)}D(ka)}}else null!=I&&(0==Z.getStatus()?I({message:mxResources.get("accessDenied")},Z):I({message:mxResources.get("error")+" "+Z.getStatus()},Z))}),function(Z){null!=I&&I({message:mxResources.get("error")+" "+Z.getStatus()})},ba,this.timeout,function(){Q&&null!=I&&I({code:App.ERROR_TIMEOUT,retry:ja})},X)});ja()}catch(Z){null!=I&&I(Z)}};
+Editor.prototype.absoluteCssFonts=function(n){var D=null;if(null!=n){var I=n.split("url(");if(0<I.length){D=[I[0]];n=window.location.pathname;var S=null!=n?n.lastIndexOf("/"):-1;0<=S&&(n=n.substring(0,S+1));S=document.getElementsByTagName("base");var Q=null;null!=S&&0<S.length&&(Q=S[0].getAttribute("href"));for(var P=1;P<I.length;P++)if(S=I[P].indexOf(")"),0<S){var T=Editor.trimCssUrl(I[P].substring(0,S));this.graph.isRelativeUrl(T)&&(T=null!=Q?Q+T:window.location.protocol+"//"+window.location.hostname+
+("/"==T.charAt(0)?"":n)+T);D.push('url("'+T+'"'+I[P].substring(S))}else D.push(I[P])}else D=[n]}return null!=D?D.join(""):null};Editor.prototype.mapFontUrl=function(n,D,I){/^https?:\/\//.test(D)&&!this.isCorsEnabledForUrl(D)&&(D=PROXY_URL+"?url="+encodeURIComponent(D));I(n,D)};Editor.prototype.embedCssFonts=function(n,D){var I=n.split("url("),S=0;null==this.cachedFonts&&(this.cachedFonts={});var Q=mxUtils.bind(this,function(){if(0==S){for(var ba=[I[0]],ja=1;ja<I.length;ja++){var Z=I[ja].indexOf(")");
+ba.push('url("');ba.push(this.cachedFonts[Editor.trimCssUrl(I[ja].substring(0,Z))]);ba.push('"'+I[ja].substring(Z))}D(ba.join(""))}});if(0<I.length){for(n=1;n<I.length;n++){var P=I[n].indexOf(")"),T=null,X=I[n].indexOf("format(",P);0<X&&(T=Editor.trimCssUrl(I[n].substring(X+7,I[n].indexOf(")",X))));mxUtils.bind(this,function(ba){if(null==this.cachedFonts[ba]){this.cachedFonts[ba]=ba;S++;var ja="application/x-font-ttf";if("svg"==T||/(\.svg)($|\?)/i.test(ba))ja="image/svg+xml";else if("otf"==T||"embedded-opentype"==
+T||/(\.otf)($|\?)/i.test(ba))ja="application/x-font-opentype";else if("woff"==T||/(\.woff)($|\?)/i.test(ba))ja="application/font-woff";else if("woff2"==T||/(\.woff2)($|\?)/i.test(ba))ja="application/font-woff2";else if("eot"==T||/(\.eot)($|\?)/i.test(ba))ja="application/vnd.ms-fontobject";else if("sfnt"==T||/(\.sfnt)($|\?)/i.test(ba))ja="application/font-sfnt";this.mapFontUrl(ja,ba,mxUtils.bind(this,function(Z,ka){this.loadUrl(ka,mxUtils.bind(this,function(da){this.cachedFonts[ba]=da;S--;Q()}),mxUtils.bind(this,
+function(da){S--;Q()}),!0,null,"data:"+Z+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(I[n].substring(0,P)),T)}Q()}else D(n)};Editor.prototype.loadFonts=function(n){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(D){this.resolvedFontCss=D;null!=n&&n()})):null!=n&&n()};Editor.prototype.createGoogleFontCache=function(){var n={},D;for(D in Graph.fontMapping)Graph.isCssFontUrl(D)&&(n[D]=Graph.fontMapping[D]);return n};Editor.prototype.embedExtFonts=
+function(n){var D=this.graph.getCustomFonts();if(0<D.length){var I=[],S=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var Q=mxUtils.bind(this,function(){0==S&&this.embedCssFonts(I.join(""),n)}),P=0;P<D.length;P++)mxUtils.bind(this,function(T,X){Graph.isCssFontUrl(X)?null==this.cachedGoogleFonts[X]?(S++,this.loadUrl(X,mxUtils.bind(this,function(ba){this.cachedGoogleFonts[X]=ba;I.push(ba+"\n");S--;Q()}),mxUtils.bind(this,function(ba){S--;I.push("@import url("+
+X+");\n");Q()}))):I.push(this.cachedGoogleFonts[X]+"\n"):I.push('@font-face {font-family: "'+T+'";src: url("'+X+'")}\n')})(D[P].name,D[P].url);Q()}else n()};Editor.prototype.addMathCss=function(n){n=n.getElementsByTagName("defs");if(null!=n&&0<n.length)for(var D=document.getElementsByTagName("style"),I=0;I<D.length;I++){var S=mxUtils.getTextContent(D[I]);0>S.indexOf("mxPageSelector")&&0<S.indexOf("MathJax")&&n[0].appendChild(D[I].cloneNode(!0))}};Editor.prototype.addFontCss=function(n,D){D=null!=
+D?D:this.absoluteCssFonts(this.fontCss);if(null!=D){var I=n.getElementsByTagName("defs"),S=n.ownerDocument;0==I.length?(I=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"defs"):S.createElement("defs"),null!=n.firstChild?n.insertBefore(I,n.firstChild):n.appendChild(I)):I=I[0];n=null!=S.createElementNS?S.createElementNS(mxConstants.NS_SVG,"style"):S.createElement("style");n.setAttribute("type","text/css");mxUtils.setTextContent(n,D);I.appendChild(n)}};Editor.prototype.isExportToCanvas=
+function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(n,D,I){var S=mxClient.IS_FF?8192:16384;return Math.min(I,Math.min(S/n,S/D))};Editor.prototype.exportToCanvas=function(n,D,I,S,Q,P,T,X,ba,ja,Z,ka,da,fa,ma,ya,Ba,Ha){try{P=null!=P?P:!0;T=null!=T?T:!0;ka=null!=ka?ka:this.graph;da=null!=da?da:0;var sa=ba?null:ka.background;sa==mxConstants.NONE&&(sa=null);null==sa&&(sa=S);null==sa&&0==ba&&(sa=ya?this.graph.defaultPageBackgroundColor:"#ffffff");
+this.convertImages(ka.getSvg(null,null,da,fa,null,T,null,null,null,ja,null,ya,Ba,Ha),mxUtils.bind(this,function(Ga){try{var Ka=new Image;Ka.onload=mxUtils.bind(this,function(){try{var Ia=function(){mxClient.IS_SF?window.setTimeout(function(){Aa.drawImage(Ka,0,0);n(Ea,Ga)},0):(Aa.drawImage(Ka,0,0),n(Ea,Ga))},Ea=document.createElement("canvas"),Fa=parseInt(Ga.getAttribute("width")),Pa=parseInt(Ga.getAttribute("height"));X=null!=X?X:1;null!=D&&(X=P?Math.min(1,Math.min(3*D/(4*Pa),D/Fa)):D/Fa);X=this.getMaxCanvasScale(Fa,
+Pa,X);Fa=Math.ceil(X*Fa);Pa=Math.ceil(X*Pa);Ea.setAttribute("width",Fa);Ea.setAttribute("height",Pa);var Aa=Ea.getContext("2d");null!=sa&&(Aa.beginPath(),Aa.rect(0,0,Fa,Pa),Aa.fillStyle=sa,Aa.fill());1!=X&&Aa.scale(X,X);if(ma){var za=ka.view,pa=za.scale;za.scale=1;var ea=btoa(unescape(encodeURIComponent(za.createSvgGrid(za.gridColor))));za.scale=pa;ea="data:image/svg+xml;base64,"+ea;var ta=ka.gridSize*za.gridSteps*X,xa=ka.getGraphBounds(),wa=za.translate.x*pa,ua=za.translate.y*pa,va=wa+(xa.x-wa)/
+pa-da,ha=ua+(xa.y-ua)/pa-da,qa=new Image;qa.onload=function(){try{for(var aa=-Math.round(ta-mxUtils.mod((wa-va)*X,ta)),ca=-Math.round(ta-mxUtils.mod((ua-ha)*X,ta));aa<Fa;aa+=ta)for(var na=ca;na<Pa;na+=ta)Aa.drawImage(qa,aa/X,na/X);Ia()}catch(la){null!=Q&&Q(la)}};qa.onerror=function(aa){null!=Q&&Q(aa)};qa.src=ea}else Ia()}catch(aa){null!=Q&&Q(aa)}});Ka.onerror=function(Ia){null!=Q&&Q(Ia)};ja&&this.graph.addSvgShadow(Ga);this.graph.mathEnabled&&this.addMathCss(Ga);var Ma=mxUtils.bind(this,function(){try{null!=
+this.resolvedFontCss&&this.addFontCss(Ga,this.resolvedFontCss),Ka.src=Editor.createSvgDataUri(mxUtils.getXml(Ga))}catch(Ia){null!=Q&&Q(Ia)}});this.embedExtFonts(mxUtils.bind(this,function(Ia){try{null!=Ia&&this.addFontCss(Ga,Ia),this.loadFonts(Ma)}catch(Ea){null!=Q&&Q(Ea)}}))}catch(Ia){null!=Q&&Q(Ia)}}),I,Z)}catch(Ga){null!=Q&&Q(Ga)}};Editor.crcTable=[];for(var t=0;256>t;t++)for(var u=t,E=0;8>E;E++)u=1==(u&1)?3988292384^u>>>1:u>>>1,Editor.crcTable[t]=u;Editor.updateCRC=function(n,D,I,S){for(var Q=
+0;Q<S;Q++)n=Editor.crcTable[(n^D.charCodeAt(I+Q))&255]^n>>>8;return n};Editor.crc32=function(n){for(var D=-1,I=0;I<n.length;I++)D=D>>>8^Editor.crcTable[(D^n.charCodeAt(I))&255];return(D^-1)>>>0};Editor.writeGraphModelToPng=function(n,D,I,S,Q){function P(Z,ka){var da=ba;ba+=ka;return Z.substring(da,ba)}function T(Z){Z=P(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function X(Z){return String.fromCharCode(Z>>24&255,Z>>16&255,Z>>8&255,Z&255)}n=n.substring(n.indexOf(",")+
+1);n=window.atob?atob(n):Base64.decode(n,!0);var ba=0;if(P(n,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=Q&&Q();else if(P(n,4),"IHDR"!=P(n,4))null!=Q&&Q();else{P(n,17);Q=n.substring(0,ba);do{var ja=T(n);if("IDAT"==P(n,4)){Q=n.substring(0,ba-8);"pHYs"==D&&"dpi"==I?(I=Math.round(S/.0254),I=X(I)+X(I)+String.fromCharCode(1)):I=I+String.fromCharCode(0)+("zTXt"==D?String.fromCharCode(0):"")+S;S=4294967295;S=Editor.updateCRC(S,D,0,4);S=Editor.updateCRC(S,I,0,I.length);Q+=X(I.length)+
+D+I+X(S^4294967295);Q+=n.substring(ba-8,n.length);break}Q+=n.substring(ba-8,ba-4+ja);P(n,ja);P(n,4)}while(ja);return"data:image/png;base64,"+(window.btoa?btoa(Q):Base64.encode(Q,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var c=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(n,D){c.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var e=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=
+function(){e.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(n,D){var I=null;null!=n.editor.graph.getModel().getParent(D)?I=D.getId():null!=n.currentPage&&(I=n.currentPage.getId());return I});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var k=Format.prototype.refresh;
Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?k.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var n=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=n&&n.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(n){return!1};var m=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(n){n=m.apply(this,arguments);
-this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var E=this.editorUi,I=E.editor.graph,S=this.createOption(mxResources.get("shadow"),function(){return I.shadowVisible},function(Q){var P=new ChangePageSetup(E);P.ignoreColor=!0;P.ignoreImage=!0;P.shadowVisible=Q;I.model.execute(P)},{install:function(Q){this.listener=function(){Q(I.shadowVisible)};E.addListener("shadowVisibleChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});Editor.enableShadowOption||
-(S.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(S,60));n.appendChild(S)}return n};var p=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(n){n=p.apply(this,arguments);var E=this.editorUi,I=E.editor.graph;if(I.isEnabled()){var S=E.getCurrentFile();if(null!=S&&S.isAutosaveOptional()){var Q=this.createOption(mxResources.get("autosave"),function(){return E.editor.autosave},function(T){E.editor.setAutosave(T);E.editor.autosave&&
-S.isModified()&&S.fileChanged()},{install:function(T){this.listener=function(){T(E.editor.autosave)};E.editor.addListener("autosaveChanged",this.listener)},destroy:function(){E.editor.removeListener(this.listener)}});n.appendChild(Q)}}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){Q=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(T){E.actions.get("mathematicalTypesetting").funct()},{install:function(T){this.listener=
-function(){T(I.mathEnabled)};E.addListener("mathEnabledChanged",this.listener)},destroy:function(){E.removeListener(this.listener)}});Q.style.paddingTop="5px";n.appendChild(Q);var P=E.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");P.style.position="relative";P.style.marginLeft="6px";P.style.top="2px";Q.appendChild(P)}return n};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var D=this.editorUi,I=D.editor.graph,S=this.createOption(mxResources.get("shadow"),function(){return I.shadowVisible},function(Q){var P=new ChangePageSetup(D);P.ignoreColor=!0;P.ignoreImage=!0;P.shadowVisible=Q;I.model.execute(P)},{install:function(Q){this.listener=function(){Q(I.shadowVisible)};D.addListener("shadowVisibleChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});Editor.enableShadowOption||
+(S.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(S,60));n.appendChild(S)}return n};var p=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(n){n=p.apply(this,arguments);var D=this.editorUi,I=D.editor.graph;if(I.isEnabled()){var S=D.getCurrentFile();if(null!=S&&S.isAutosaveOptional()){var Q=this.createOption(mxResources.get("autosave"),function(){return D.editor.autosave},function(T){D.editor.setAutosave(T);D.editor.autosave&&
+S.isModified()&&S.fileChanged()},{install:function(T){this.listener=function(){T(D.editor.autosave)};D.editor.addListener("autosaveChanged",this.listener)},destroy:function(){D.editor.removeListener(this.listener)}});n.appendChild(Q)}}if(this.isMathOptionVisible()&&I.isEnabled()&&"undefined"!==typeof MathJax){Q=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return I.mathEnabled},function(T){D.actions.get("mathematicalTypesetting").funct()},{install:function(T){this.listener=
+function(){T(I.mathEnabled)};D.addListener("mathEnabledChanged",this.listener)},destroy:function(){D.removeListener(this.listener)}});Q.style.paddingTop="5px";n.appendChild(Q);var P=D.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");P.style.position="relative";P.style.marginLeft="6px";P.style.top="2px";Q.appendChild(P)}return n};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=
[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",
type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
@@ -11583,94 +11583,94 @@ defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName
stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
-function(n,E,I){if(null!=E){var S=function(P){if(null!=P)if(I)for(var T=0;T<P.length;T++)E[P[T].name]=P[T];else for(var Y in E){var ca=!1;for(T=0;T<P.length;T++)if(P[T].name==Y&&P[T].type==E[Y].type){ca=!0;break}ca||delete E[Y]}},Q=this.editorUi.editor.graph.view.getState(n);null!=Q&&null!=Q.shape&&(Q.shape.commonCustomPropAdded||(Q.shape.commonCustomPropAdded=!0,Q.shape.customProperties=Q.shape.customProperties||[],Q.cell.vertex?Array.prototype.push.apply(Q.shape.customProperties,Editor.commonVertexProperties):
-Array.prototype.push.apply(Q.shape.customProperties,Editor.commonEdgeProperties)),S(Q.shape.customProperties));n=n.getAttribute("customProperties");if(null!=n)try{S(JSON.parse(n))}catch(P){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var n=this.editorUi.getSelectionState();"image"!=n.style.shape&&!n.containsLabel&&0<n.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var E=
-{},I=n.vertices,S=n.edges,Q=0;Q<I.length;Q++)this.findCommonProperties(I[Q],E,0==Q);for(Q=0;Q<S.length;Q++)this.findCommonProperties(S[Q],E,0==I.length&&0==Q);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(E).length&&this.container.appendChild(this.addProperties(this.createPanel(),E,n))}};var x=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(n){this.addActions(n,["copyStyle","pasteStyle"]);return x.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
-!0;StyleFormatPanel.prototype.addProperties=function(n,E,I){function S(Aa,ya,pa,ea){fa.getModel().beginUpdate();try{var ra=[],xa=[];if(null!=pa.index){for(var va=[],qa=pa.parentRow.nextSibling;qa&&qa.getAttribute("data-pName")==Aa;)va.push(qa.getAttribute("data-pValue")),qa=qa.nextSibling;pa.index<va.length?null!=ea?va.splice(ea,1):va[pa.index]=ya:va.push(ya);null!=pa.size&&va.length>pa.size&&(va=va.slice(0,pa.size));ya=va.join(",");null!=pa.countProperty&&(fa.setCellStyles(pa.countProperty,va.length,
-fa.getSelectionCells()),ra.push(pa.countProperty),xa.push(va.length))}fa.setCellStyles(Aa,ya,fa.getSelectionCells());ra.push(Aa);xa.push(ya);if(null!=pa.dependentProps)for(Aa=0;Aa<pa.dependentProps.length;Aa++){var ta=pa.dependentPropsDefVal[Aa],ja=pa.dependentPropsVals[Aa];if(ja.length>ya)ja=ja.slice(0,ya);else for(var oa=ja.length;oa<ya;oa++)ja.push(ta);ja=ja.join(",");fa.setCellStyles(pa.dependentProps[Aa],ja,fa.getSelectionCells());ra.push(pa.dependentProps[Aa]);xa.push(ja)}if("function"==typeof pa.onChange)pa.onChange(fa,
-ya);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ra,"values",xa,"cells",fa.getSelectionCells()))}finally{fa.getModel().endUpdate()}}function Q(Aa,ya,pa){var ea=mxUtils.getOffset(n,!0),ra=mxUtils.getOffset(Aa,!0);ya.style.position="absolute";ya.style.left=ra.x-ea.x+"px";ya.style.top=ra.y-ea.y+"px";ya.style.width=Aa.offsetWidth+"px";ya.style.height=Aa.offsetHeight-(pa?4:0)+"px";ya.style.zIndex=5}function P(Aa,ya,pa){var ea=document.createElement("div");ea.style.width="32px";ea.style.height=
-"4px";ea.style.margin="2px";ea.style.border="1px solid black";ea.style.background=ya&&"none"!=ya?ya:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(ra){this.editorUi.pickColor(ya,function(xa){ea.style.background="none"==xa?"url('"+Dialog.prototype.noColorImage+"')":xa;S(Aa,xa,pa)});mxEvent.consume(ra)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(ea);return btn}function T(Aa,ya,pa,ea,ra,xa,va){null!=ya&&(ya=ya.split(","),
-aa.push({name:Aa,values:ya,type:pa,defVal:ea,countProperty:ra,parentRow:xa,isDeletable:!0,flipBkg:va}));btn=mxUtils.button("+",mxUtils.bind(Z,function(qa){for(var ta=xa,ja=0;null!=ta.nextSibling;)if(ta.nextSibling.getAttribute("data-pName")==Aa)ta=ta.nextSibling,ja++;else break;var oa={type:pa,parentRow:xa,index:ja,isDeletable:!0,defVal:ea,countProperty:ra};ja=ia(Aa,"",oa,0==ja%2,va);S(Aa,ea,oa);ta.parentNode.insertBefore(ja,ta.nextSibling);mxEvent.consume(qa)}));btn.style.height="16px";btn.style.width=
-"25px";btn.className="geColorBtn";return btn}function Y(Aa,ya,pa,ea,ra,xa,va){if(0<ra){var qa=Array(ra);ya=null!=ya?ya.split(","):[];for(var ta=0;ta<ra;ta++)qa[ta]=null!=ya[ta]?ya[ta]:null!=ea?ea:"";aa.push({name:Aa,values:qa,type:pa,defVal:ea,parentRow:xa,flipBkg:va,size:ra})}return document.createElement("div")}function ca(Aa,ya,pa){var ea=document.createElement("input");ea.type="checkbox";ea.checked="1"==ya;mxEvent.addListener(ea,"change",function(){S(Aa,ea.checked?"1":"0",pa)});return ea}function ia(Aa,
-ya,pa,ea,ra){var xa=pa.dispName,va=pa.type,qa=document.createElement("tr");qa.className="gePropRow"+(ra?"Dark":"")+(ea?"Alt":"")+" gePropNonHeaderRow";qa.setAttribute("data-pName",Aa);qa.setAttribute("data-pValue",ya);ea=!1;null!=pa.index&&(qa.setAttribute("data-index",pa.index),xa=(null!=xa?xa:"")+"["+pa.index+"]",ea=!0);var ta=document.createElement("td");ta.className="gePropRowCell";xa=mxResources.get(xa,null,xa);mxUtils.write(ta,xa);ta.setAttribute("title",xa);ea&&(ta.style.textAlign="right");
-qa.appendChild(ta);ta=document.createElement("td");ta.className="gePropRowCell";if("color"==va)ta.appendChild(P(Aa,ya,pa));else if("bool"==va||"boolean"==va)ta.appendChild(ca(Aa,ya,pa));else if("enum"==va){var ja=pa.enumList;for(ra=0;ra<ja.length;ra++)if(xa=ja[ra],xa.val==ya){mxUtils.write(ta,mxResources.get(xa.dispName,null,xa.dispName));break}mxEvent.addListener(ta,"click",mxUtils.bind(Z,function(){var oa=document.createElement("select");Q(ta,oa);for(var ba=0;ba<ja.length;ba++){var da=ja[ba],na=
-document.createElement("option");na.value=mxUtils.htmlEntities(da.val);mxUtils.write(na,mxResources.get(da.dispName,null,da.dispName));oa.appendChild(na)}oa.value=ya;n.appendChild(oa);mxEvent.addListener(oa,"change",function(){var ka=mxUtils.htmlEntities(oa.value);S(Aa,ka,pa)});oa.focus();mxEvent.addListener(oa,"blur",function(){n.removeChild(oa)})}))}else"dynamicArr"==va?ta.appendChild(T(Aa,ya,pa.subType,pa.subDefVal,pa.countProperty,qa,ra)):"staticArr"==va?ta.appendChild(Y(Aa,ya,pa.subType,pa.subDefVal,
-pa.size,qa,ra)):"readOnly"==va?(ra=document.createElement("input"),ra.setAttribute("readonly",""),ra.value=ya,ra.style.width="96px",ra.style.borderWidth="0px",ta.appendChild(ra)):(ta.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ya)),mxEvent.addListener(ta,"click",mxUtils.bind(Z,function(){function oa(){var da=ba.value;da=0==da.length&&"string"!=va?0:da;pa.allowAuto&&(null!=da.trim&&"auto"==da.trim().toLowerCase()?(da="auto",va="string"):(da=parseFloat(da),da=isNaN(da)?0:da));null!=pa.min&&da<
-pa.min?da=pa.min:null!=pa.max&&da>pa.max&&(da=pa.max);da=encodeURIComponent(("int"==va?parseInt(da):da)+"");S(Aa,da,pa)}var ba=document.createElement("input");Q(ta,ba,!0);ba.value=decodeURIComponent(ya);ba.className="gePropEditor";"int"!=va&&"float"!=va||pa.allowAuto||(ba.type="number",ba.step="int"==va?"1":"any",null!=pa.min&&(ba.min=parseFloat(pa.min)),null!=pa.max&&(ba.max=parseFloat(pa.max)));n.appendChild(ba);mxEvent.addListener(ba,"keypress",function(da){13==da.keyCode&&oa()});ba.focus();mxEvent.addListener(ba,
-"blur",function(){oa()})})));pa.isDeletable&&(ra=mxUtils.button("-",mxUtils.bind(Z,function(oa){S(Aa,"",pa,pa.index);mxEvent.consume(oa)})),ra.style.height="16px",ra.style.width="25px",ra.style.float="right",ra.className="geColorBtn",ta.appendChild(ra));qa.appendChild(ta);return qa}var Z=this,fa=this.editorUi.editor.graph,aa=[];n.style.position="relative";n.style.padding="0";var wa=document.createElement("table");wa.className="geProperties";wa.style.whiteSpace="nowrap";wa.style.width="100%";var la=
-document.createElement("tr");la.className="gePropHeader";var za=document.createElement("th");za.className="gePropHeaderCell";var Ba=document.createElement("img");Ba.src=Sidebar.prototype.expandedImage;Ba.style.verticalAlign="middle";za.appendChild(Ba);mxUtils.write(za,mxResources.get("property"));la.style.cursor="pointer";var ua=function(){var Aa=wa.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){Ba.src=Sidebar.prototype.collapsedImage;var ya="none";for(var pa=n.childNodes.length-
-1;0<=pa;pa--)try{var ea=n.childNodes[pa],ra=ea.nodeName.toUpperCase();"INPUT"!=ra&&"SELECT"!=ra||n.removeChild(ea)}catch(xa){}}else Ba.src=Sidebar.prototype.expandedImage,ya="";for(pa=0;pa<Aa.length;pa++)Aa[pa].style.display=ya};mxEvent.addListener(la,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;ua()});la.appendChild(za);za=document.createElement("th");za.className="gePropHeaderCell";za.innerHTML=mxResources.get("value");la.appendChild(za);wa.appendChild(la);var Da=
-!1,Fa=!1;la=null;1==I.vertices.length&&0==I.edges.length?la=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(la=I.edges[0].id);null!=la&&wa.appendChild(ia("id",mxUtils.htmlEntities(la),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ka in E)if(la=E[Ka],"function"!=typeof la.isVisible||la.isVisible(I,this)){var Qa=null!=I.style[Ka]?mxUtils.htmlEntities(I.style[Ka]+""):null!=la.getDefaultValue?la.getDefaultValue(I,this):la.defVal;if("separator"==la.type)Fa=!Fa;else{if("staticArr"==la.type)la.size=
-parseInt(I.style[la.sizeProperty]||E[la.sizeProperty].defVal)||0;else if(null!=la.dependentProps){var Ia=la.dependentProps,Ea=[],Ca=[];for(za=0;za<Ia.length;za++){var Na=I.style[Ia[za]];Ca.push(E[Ia[za]].subDefVal);Ea.push(null!=Na?Na.split(","):[])}la.dependentPropsDefVal=Ca;la.dependentPropsVals=Ea}wa.appendChild(ia(Ka,Qa,la,Da,Fa));Da=!Da}}for(za=0;za<aa.length;za++)for(la=aa[za],E=la.parentRow,I=0;I<la.values.length;I++)Ka=ia(la.name,la.values[I],{type:la.type,parentRow:la.parentRow,isDeletable:la.isDeletable,
-index:I,defVal:la.defVal,countProperty:la.countProperty,size:la.size},0==I%2,la.flipBkg),E.parentNode.insertBefore(Ka,E.nextSibling),E=Ka;n.appendChild(wa);ua();return n};StyleFormatPanel.prototype.addStyles=function(n){function E(la){mxEvent.addListener(la,"mouseenter",function(){la.style.opacity="1"});mxEvent.addListener(la,"mouseleave",function(){la.style.opacity="0.5"})}var I=this.editorUi,S=I.editor.graph,Q=document.createElement("div");Q.style.whiteSpace="nowrap";Q.style.paddingLeft="24px";
-Q.style.paddingRight="20px";n.style.paddingLeft="16px";n.style.paddingBottom="6px";n.style.position="relative";n.appendChild(Q);var P="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),T=document.createElement("div");T.style.whiteSpace="nowrap";T.style.position="relative";T.style.textAlign="center";T.style.width="210px";for(var Y=[],ca=0;ca<this.defaultColorSchemes.length;ca++){var ia=
-document.createElement("div");ia.style.display="inline-block";ia.style.width="6px";ia.style.height="6px";ia.style.marginLeft="4px";ia.style.marginRight="3px";ia.style.borderRadius="3px";ia.style.cursor="pointer";ia.style.background="transparent";ia.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(la){mxEvent.addListener(ia,"click",mxUtils.bind(this,function(){Z(la)}))})(ca);Y.push(ia);T.appendChild(ia)}var Z=mxUtils.bind(this,function(la){null!=Y[la]&&(null!=this.format.currentScheme&&
-null!=Y[this.format.currentScheme]&&(Y[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=la,fa(this.defaultColorSchemes[this.format.currentScheme]),Y[this.format.currentScheme].style.background="#84d7ff")}),fa=mxUtils.bind(this,function(la){var za=mxUtils.bind(this,function(ua){var Da=mxUtils.button("",mxUtils.bind(this,function(Qa){S.getModel().beginUpdate();try{for(var Ia=I.getSelectionState().cells,Ea=0;Ea<Ia.length;Ea++){for(var Ca=S.getModel().getStyle(Ia[Ea]),
-Na=0;Na<P.length;Na++)Ca=mxUtils.removeStylename(Ca,P[Na]);var Aa=S.getModel().isVertex(Ia[Ea])?S.defaultVertexStyle:S.defaultEdgeStyle;null!=ua?(mxEvent.isShiftDown(Qa)||(Ca=""==ua.fill?mxUtils.setStyle(Ca,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Ca,mxConstants.STYLE_FILLCOLOR,ua.fill||mxUtils.getValue(Aa,mxConstants.STYLE_FILLCOLOR,null)),Ca=mxUtils.setStyle(Ca,mxConstants.STYLE_GRADIENTCOLOR,ua.gradient||mxUtils.getValue(Aa,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Qa)||
-mxClient.IS_MAC&&mxEvent.isMetaDown(Qa)||!S.getModel().isVertex(Ia[Ea])||(Ca=mxUtils.setStyle(Ca,mxConstants.STYLE_FONTCOLOR,ua.font||mxUtils.getValue(Aa,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Qa)||(Ca=""==ua.stroke?mxUtils.setStyle(Ca,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Ca,mxConstants.STYLE_STROKECOLOR,ua.stroke||mxUtils.getValue(Aa,mxConstants.STYLE_STROKECOLOR,null)))):(Ca=mxUtils.setStyle(Ca,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(Aa,mxConstants.STYLE_FILLCOLOR,
-"#ffffff")),Ca=mxUtils.setStyle(Ca,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(Aa,mxConstants.STYLE_STROKECOLOR,"#000000")),Ca=mxUtils.setStyle(Ca,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(Aa,mxConstants.STYLE_GRADIENTCOLOR,null)),S.getModel().isVertex(Ia[Ea])&&(Ca=mxUtils.setStyle(Ca,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(Aa,mxConstants.STYLE_FONTCOLOR,null))));S.getModel().setStyle(Ia[Ea],Ca)}}finally{S.getModel().endUpdate()}}));Da.className="geStyleButton";Da.style.width="36px";
-Da.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Da.style.margin="0px 6px 6px 0px";if(null!=ua){var Fa="1"==urlParams.sketch?"2px solid":"1px solid";null!=ua.gradient?mxClient.IS_IE&&10>document.documentMode?Da.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+ua.fill+"', EndColorStr='"+ua.gradient+"', GradientType=0)":Da.style.backgroundImage="linear-gradient("+ua.fill+" 0px,"+ua.gradient+" 100%)":ua.fill==mxConstants.NONE?Da.style.background="url('"+Dialog.prototype.noColorImage+
-"')":Da.style.backgroundColor=""==ua.fill?mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):ua.fill||mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Da.style.border=ua.stroke==mxConstants.NONE?Fa+" transparent":""==ua.stroke?Fa+" "+mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Fa+" "+(ua.stroke||mxUtils.getValue(S.defaultVertexStyle,
-mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=ua.title&&Da.setAttribute("title",ua.title)}else{Fa=mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ka=mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Da.style.backgroundColor=Fa;Da.style.border="1px solid "+Ka}Da.style.borderRadius="0";Q.appendChild(Da)});Q.innerHTML="";for(var Ba=0;Ba<la.length;Ba++)0<Ba&&0==mxUtils.mod(Ba,4)&&mxUtils.br(Q),za(la[Ba])});
-null==this.format.currentScheme?Z(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):Z(this.format.currentScheme);ca=10>=this.defaultColorSchemes.length?28:8;var aa=document.createElement("div");aa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ca+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var wa=document.createElement("div");wa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ca+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(n.appendChild(aa),n.appendChild(wa));mxEvent.addListener(wa,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));E(aa);E(wa);fa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&n.appendChild(T);return n};StyleFormatPanel.prototype.addEditOps=function(n){var E=this.editorUi.getSelectionState(),I=this.editorUi.editor.graph,S=null;1==E.cells.length&&(S=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(Q){this.editorUi.actions.get("editStyle").funct()})),S.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),S.style.width="210px",S.style.marginBottom="2px",n.appendChild(S));I=1==E.cells.length?I.view.getState(E.cells[0]):null;null!=I&&null!=I.shape&&null!=I.shape.stencil?(E=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(Q){this.editorUi.actions.get("editShape").funct()})),E.setAttribute("title",
-mxResources.get("editShape")),E.style.marginBottom="2px",null==S?E.style.width="210px":(S.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),n.appendChild(E)):E.image&&0<E.cells.length&&(E=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(Q){this.editorUi.actions.get("image").funct()})),E.setAttribute("title",mxResources.get("editImage")),E.style.marginBottom="2px",null==S?E.style.width="210px":(S.style.width="104px",E.style.width="104px",E.style.marginLeft="2px"),
-n.appendChild(E));return n}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(n){return n.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(n){return Graph.isGoogleFontUrl(n)};Graph.createFontElement=function(n,
-E){var I=Graph.fontMapping[E];null==I&&Graph.isCssFontUrl(E)?(n=document.createElement("link"),n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("charset","UTF-8"),n.setAttribute("href",E)):(null==I&&(I='@font-face {\nfont-family: "'+n+'";\nsrc: url("'+E+'");\n}'),n=document.createElement("style"),mxUtils.write(n,I));return n};Graph.addFont=function(n,E,I){if(null!=n&&0<n.length&&null!=E&&0<E.length){var S=n.toLowerCase();if("helvetica"!=S&&"arial"!=n&&"sans-serif"!=
-S){var Q=Graph.customFontElements[S];null!=Q&&Q.url!=E&&(Q.elt.parentNode.removeChild(Q.elt),Q=null);null==Q?(Q=E,"http:"==E.substring(0,5)&&(Q=PROXY_URL+"?url="+encodeURIComponent(E)),Q={name:n,url:E,elt:Graph.createFontElement(n,Q)},Graph.customFontElements[S]=Q,Graph.recentCustomFonts[S]=Q,E=document.getElementsByTagName("head")[0],null!=I&&("link"==Q.elt.nodeName.toLowerCase()?(Q.elt.onload=I,Q.elt.onerror=I):I()),null!=E&&E.appendChild(Q.elt)):null!=I&&I()}else null!=I&&I()}else null!=I&&I();
-return n};Graph.getFontUrl=function(n,E){n=Graph.customFontElements[n.toLowerCase()];null!=n&&(E=n.url);return E};Graph.processFontAttributes=function(n){n=n.getElementsByTagName("*");for(var E=0;E<n.length;E++){var I=n[E].getAttribute("data-font-src");if(null!=I){var S="FONT"==n[E].nodeName?n[E].getAttribute("face"):n[E].style.fontFamily;null!=S&&Graph.addFont(S,I)}}};Graph.processFontStyle=function(n){if(null!=n){var E=mxUtils.getValue(n,"fontSource",null);if(null!=E){var I=mxUtils.getValue(n,mxConstants.STYLE_FONTFAMILY,
-null);null!=I&&Graph.addFont(I,decodeURIComponent(E))}}return n};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var A=Graph.prototype.init;Graph.prototype.init=function(){function n(Q){E=Q}A.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var E=null;mxEvent.addListener(this.container,"mouseenter",n);mxEvent.addListener(this.container,"mousemove",n);mxEvent.addListener(this.container,"mouseleave",function(Q){E=null});this.isMouseInsertPoint=function(){return null!=E};var I=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=E?this.getPointForEvent(E):I.apply(this,arguments)};var S=this.layoutManager.getLayout;this.layoutManager.getLayout=function(Q){var P=this.graph.getCellStyle(Q);if(null!=P&&"rack"==P.childLayout){var T=new mxStackLayout(this.graph,!1);T.gridSize=null!=P.rackUnitSize?parseFloat(P.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;T.marginLeft=P.marginLeft||0;T.marginRight=P.marginRight||0;T.marginTop=P.marginTop||0;T.marginBottom=
-P.marginBottom||0;T.allowGaps=P.allowGaps||0;T.horizontal="1"==mxUtils.getValue(P,"horizontalRack","0");T.resizeParent=!1;T.fill=!0;return T}return S.apply(this,arguments)};this.updateGlobalUrlVariables()};var y=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(n,E){return Graph.processFontStyle(y.apply(this,arguments))};var L=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(n,E,I,S,Q,P,T,Y,ca,ia,Z){L.apply(this,arguments);Graph.processFontAttributes(Z)};
-var N=mxText.prototype.redraw;mxText.prototype.redraw=function(){N.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(n,E,I){function S(){for(var la=T.getSelectionCells(),za=[],Ba=0;Ba<la.length;Ba++)T.isCellVisible(la[Ba])&&za.push(la[Ba]);T.setSelectionCells(za)}function Q(la){T.setHiddenTags(la?[]:Y.slice());S();T.refresh()}function P(la,za){ia.innerHTML="";if(0<la.length){var Ba=document.createElement("table");
-Ba.setAttribute("cellpadding","2");Ba.style.boxSizing="border-box";Ba.style.tableLayout="fixed";Ba.style.width="100%";var ua=document.createElement("tbody");if(null!=la&&0<la.length)for(var Da=0;Da<la.length;Da++)(function(Fa){var Ka=0>mxUtils.indexOf(T.hiddenTags,Fa),Qa=document.createElement("tr"),Ia=document.createElement("td");Ia.style.align="center";Ia.style.width="16px";var Ea=document.createElement("img");Ea.setAttribute("src",Ka?Editor.visibleImage:Editor.hiddenImage);Ea.setAttribute("title",
-mxResources.get(Ka?"hideIt":"show",[Fa]));mxUtils.setOpacity(Ea,Ka?75:25);Ea.style.verticalAlign="middle";Ea.style.cursor="pointer";Ea.style.width="16px";if(E||Editor.isDarkMode())Ea.style.filter="invert(100%)";Ia.appendChild(Ea);mxEvent.addListener(Ea,"click",function(Na){mxEvent.isShiftDown(Na)?Q(0<=mxUtils.indexOf(T.hiddenTags,Fa)):(T.toggleHiddenTag(Fa),S(),T.refresh());mxEvent.consume(Na)});Qa.appendChild(Ia);Ia=document.createElement("td");Ia.style.overflow="hidden";Ia.style.whiteSpace="nowrap";
-Ia.style.textOverflow="ellipsis";Ia.style.verticalAlign="middle";Ia.style.cursor="pointer";Ia.setAttribute("title",Fa);a=document.createElement("a");mxUtils.write(a,Fa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ka?100:40);Ia.appendChild(a);mxEvent.addListener(Ia,"click",function(Na){if(mxEvent.isShiftDown(Na)){Q(!0);var Aa=T.getCellsForTags([Fa],null,null,!0);T.isEnabled()?T.setSelectionCells(Aa):T.highlightCells(Aa)}else if(Ka&&0<T.hiddenTags.length)Q(!0);else{Aa=
-Y.slice();var ya=mxUtils.indexOf(Aa,Fa);Aa.splice(ya,1);T.setHiddenTags(Aa);S();T.refresh()}mxEvent.consume(Na)});Qa.appendChild(Ia);if(T.isEnabled()){Ia=document.createElement("td");Ia.style.verticalAlign="middle";Ia.style.textAlign="center";Ia.style.width="18px";if(null==za){Ia.style.align="center";Ia.style.width="16px";Ea=document.createElement("img");Ea.setAttribute("src",Editor.crossImage);Ea.setAttribute("title",mxResources.get("removeIt",[Fa]));mxUtils.setOpacity(Ea,Ka?75:25);Ea.style.verticalAlign=
-"middle";Ea.style.cursor="pointer";Ea.style.width="16px";if(E||Editor.isDarkMode())Ea.style.filter="invert(100%)";mxEvent.addListener(Ea,"click",function(Na){var Aa=mxUtils.indexOf(Y,Fa);0<=Aa&&Y.splice(Aa,1);T.removeTagsForCells(T.model.getDescendants(T.model.getRoot()),[Fa]);T.refresh();mxEvent.consume(Na)});Ia.appendChild(Ea)}else{var Ca=document.createElement("input");Ca.setAttribute("type","checkbox");Ca.style.margin="0px";Ca.defaultChecked=null!=za&&0<=mxUtils.indexOf(za,Fa);Ca.checked=Ca.defaultChecked;
-Ca.style.background="transparent";Ca.setAttribute("title",mxResources.get(Ca.defaultChecked?"removeIt":"add",[Fa]));mxEvent.addListener(Ca,"change",function(Na){Ca.checked?T.addTagsForCells(T.getSelectionCells(),[Fa]):T.removeTagsForCells(T.getSelectionCells(),[Fa]);mxEvent.consume(Na)});Ia.appendChild(Ca)}Qa.appendChild(Ia)}ua.appendChild(Qa)})(la[Da]);Ba.appendChild(ua);ia.appendChild(Ba)}}var T=this,Y=T.hiddenTags.slice(),ca=document.createElement("div");ca.style.userSelect="none";ca.style.overflow=
-"hidden";ca.style.padding="10px";ca.style.height="100%";var ia=document.createElement("div");ia.style.boxSizing="border-box";ia.style.borderRadius="4px";ia.style.userSelect="none";ia.style.overflow="auto";ia.style.position="absolute";ia.style.left="10px";ia.style.right="10px";ia.style.top="10px";ia.style.border=T.isEnabled()?"1px solid #808080":"none";ia.style.bottom=T.isEnabled()?"48px":"10px";ca.appendChild(ia);var Z=mxUtils.button(mxResources.get("reset"),function(la){T.setHiddenTags([]);mxEvent.isShiftDown(la)||
-(Y=T.hiddenTags.slice());S();T.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var fa=mxUtils.button(mxResources.get("add"),function(){null!=I&&I(Y,function(la){Y=la;aa()})});fa.setAttribute("title",mxResources.get("add"));fa.className="geBtn";fa.style.margin="0";T.addListener(mxEvent.ROOT,function(){Y=T.hiddenTags.slice()});var aa=mxUtils.bind(this,function(la,za){if(n()){la=T.getAllTags();for(za=0;za<la.length;za++)0>mxUtils.indexOf(Y,
-la[za])&&Y.push(la[za]);Y.sort();T.isSelectionEmpty()?P(Y):P(Y,T.getCommonTagsForCells(T.getSelectionCells()))}});T.selectionModel.addListener(mxEvent.CHANGE,aa);T.model.addListener(mxEvent.CHANGE,aa);T.addListener(mxEvent.REFRESH,aa);var wa=document.createElement("div");wa.style.boxSizing="border-box";wa.style.whiteSpace="nowrap";wa.style.position="absolute";wa.style.overflow="hidden";wa.style.bottom="0px";wa.style.height="42px";wa.style.right="10px";wa.style.left="10px";T.isEnabled()&&(wa.appendChild(Z),
-wa.appendChild(fa),ca.appendChild(wa));return{div:ca,refresh:aa}};Graph.prototype.getCustomFonts=function(){var n=this.extFonts;n=null!=n?n.slice():[];for(var E in Graph.customFontElements){var I=Graph.customFontElements[E];n.push({name:I.name,url:I.url})}return n};Graph.prototype.setFont=function(n,E){Graph.addFont(n,E);document.execCommand("fontname",!1,n);if(null!=E){var I=this.cellEditor.textarea.getElementsByTagName("font");E=Graph.getFontUrl(n,E);for(var S=0;S<I.length;S++)I[S].getAttribute("face")==
-n&&I[S].getAttribute("data-font-src")!=E&&I[S].setAttribute("data-font-src",E)}};var K=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return K.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var n=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=n)for(var E in n)this.globalVars[E]=
-n[E]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var q=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(n){var E=q.apply(this,arguments);null==E&&null!=this.globalVars&&(E=this.globalVars[n]);return E};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var n=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(n.ownerDocument)).decode(n)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(n,E,I,S,Q,P,T,Y,ca,ia,Z,fa,aa,wa){var la=null,za=null,Ba=null;fa||null==this.themes||"darkTheme"!=this.defaultThemeName||(la=this.stylesheet,za=this.shapeForegroundColor,Ba=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
-"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var ua=C.apply(this,arguments),Da=this.getCustomFonts();if(Z&&0<Da.length){var Fa=ua.ownerDocument,Ka=null!=Fa.createElementNS?Fa.createElementNS(mxConstants.NS_SVG,"style"):Fa.createElement("style");null!=Fa.setAttributeNS?Ka.setAttributeNS("type","text/css"):Ka.setAttribute("type","text/css");for(var Qa="",Ia="",Ea=0;Ea<Da.length;Ea++){var Ca=Da[Ea].name,Na=Da[Ea].url;Graph.isCssFontUrl(Na)?
-Qa+="@import url("+Na+");\n":Ia+='@font-face {\nfont-family: "'+Ca+'";\nsrc: url("'+Na+'");\n}\n'}Ka.appendChild(Fa.createTextNode(Qa+Ia));ua.getElementsByTagName("defs")[0].appendChild(Ka)}null!=la&&(this.shapeBackgroundColor=Ba,this.shapeForegroundColor=za,this.stylesheet=la,this.refresh());return ua};var z=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var n=z.apply(this,arguments);if(this.mathEnabled){var E=n.drawText;n.drawText=function(I,S){if(null!=I.text&&
-null!=I.text.value&&I.text.checkBounds()&&(mxUtils.isNode(I.text.value)||I.text.dialect==mxConstants.DIALECT_STRICTHTML)){var Q=I.text.getContentNode();if(null!=Q){Q=Q.cloneNode(!0);if(Q.getElementsByTagNameNS)for(var P=Q.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<P.length;)P[0].parentNode.removeChild(P[0]);null!=Q.innerHTML&&(P=I.text.value,I.text.value=Q.innerHTML,E.apply(this,arguments),I.text.value=P)}}else E.apply(this,arguments)}}return n};var B=mxCellRenderer.prototype.destroy;
+function(n,D,I){if(null!=D){var S=function(P){if(null!=P)if(I)for(var T=0;T<P.length;T++)D[P[T].name]=P[T];else for(var X in D){var ba=!1;for(T=0;T<P.length;T++)if(P[T].name==X&&P[T].type==D[X].type){ba=!0;break}ba||delete D[X]}},Q=this.editorUi.editor.graph.view.getState(n);null!=Q&&null!=Q.shape&&(Q.shape.commonCustomPropAdded||(Q.shape.commonCustomPropAdded=!0,Q.shape.customProperties=Q.shape.customProperties||[],Q.cell.vertex?Array.prototype.push.apply(Q.shape.customProperties,Editor.commonVertexProperties):
+Array.prototype.push.apply(Q.shape.customProperties,Editor.commonEdgeProperties)),S(Q.shape.customProperties));n=n.getAttribute("customProperties");if(null!=n)try{S(JSON.parse(n))}catch(P){}}};var v=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var n=this.editorUi.getSelectionState();"image"!=n.style.shape&&!n.containsLabel&&0<n.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));v.apply(this,arguments);if(Editor.enableCustomProperties){for(var D=
+{},I=n.vertices,S=n.edges,Q=0;Q<I.length;Q++)this.findCommonProperties(I[Q],D,0==Q);for(Q=0;Q<S.length;Q++)this.findCommonProperties(S[Q],D,0==I.length&&0==Q);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(D).length&&this.container.appendChild(this.addProperties(this.createPanel(),D,n))}};var x=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(n){this.addActions(n,["copyStyle","pasteStyle"]);return x.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(n,D,I){function S(Aa,za,pa,ea){ka.getModel().beginUpdate();try{var ta=[],xa=[];if(null!=pa.index){for(var wa=[],ua=pa.parentRow.nextSibling;ua&&ua.getAttribute("data-pName")==Aa;)wa.push(ua.getAttribute("data-pValue")),ua=ua.nextSibling;pa.index<wa.length?null!=ea?wa.splice(ea,1):wa[pa.index]=za:wa.push(za);null!=pa.size&&wa.length>pa.size&&(wa=wa.slice(0,pa.size));za=wa.join(",");null!=pa.countProperty&&(ka.setCellStyles(pa.countProperty,wa.length,
+ka.getSelectionCells()),ta.push(pa.countProperty),xa.push(wa.length))}ka.setCellStyles(Aa,za,ka.getSelectionCells());ta.push(Aa);xa.push(za);if(null!=pa.dependentProps)for(Aa=0;Aa<pa.dependentProps.length;Aa++){var va=pa.dependentPropsDefVal[Aa],ha=pa.dependentPropsVals[Aa];if(ha.length>za)ha=ha.slice(0,za);else for(var qa=ha.length;qa<za;qa++)ha.push(va);ha=ha.join(",");ka.setCellStyles(pa.dependentProps[Aa],ha,ka.getSelectionCells());ta.push(pa.dependentProps[Aa]);xa.push(ha)}if("function"==typeof pa.onChange)pa.onChange(ka,
+za);Z.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ta,"values",xa,"cells",ka.getSelectionCells()))}finally{ka.getModel().endUpdate()}}function Q(Aa,za,pa){var ea=mxUtils.getOffset(n,!0),ta=mxUtils.getOffset(Aa,!0);za.style.position="absolute";za.style.left=ta.x-ea.x+"px";za.style.top=ta.y-ea.y+"px";za.style.width=Aa.offsetWidth+"px";za.style.height=Aa.offsetHeight-(pa?4:0)+"px";za.style.zIndex=5}function P(Aa,za,pa){var ea=document.createElement("div");ea.style.width="32px";ea.style.height=
+"4px";ea.style.margin="2px";ea.style.border="1px solid black";ea.style.background=za&&"none"!=za?za:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(Z,function(ta){this.editorUi.pickColor(za,function(xa){ea.style.background="none"==xa?"url('"+Dialog.prototype.noColorImage+"')":xa;S(Aa,xa,pa)});mxEvent.consume(ta)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(ea);return btn}function T(Aa,za,pa,ea,ta,xa,wa){null!=za&&(za=za.split(","),
+da.push({name:Aa,values:za,type:pa,defVal:ea,countProperty:ta,parentRow:xa,isDeletable:!0,flipBkg:wa}));btn=mxUtils.button("+",mxUtils.bind(Z,function(ua){for(var va=xa,ha=0;null!=va.nextSibling;)if(va.nextSibling.getAttribute("data-pName")==Aa)va=va.nextSibling,ha++;else break;var qa={type:pa,parentRow:xa,index:ha,isDeletable:!0,defVal:ea,countProperty:ta};ha=ja(Aa,"",qa,0==ha%2,wa);S(Aa,ea,qa);va.parentNode.insertBefore(ha,va.nextSibling);mxEvent.consume(ua)}));btn.style.height="16px";btn.style.width=
+"25px";btn.className="geColorBtn";return btn}function X(Aa,za,pa,ea,ta,xa,wa){if(0<ta){var ua=Array(ta);za=null!=za?za.split(","):[];for(var va=0;va<ta;va++)ua[va]=null!=za[va]?za[va]:null!=ea?ea:"";da.push({name:Aa,values:ua,type:pa,defVal:ea,parentRow:xa,flipBkg:wa,size:ta})}return document.createElement("div")}function ba(Aa,za,pa){var ea=document.createElement("input");ea.type="checkbox";ea.checked="1"==za;mxEvent.addListener(ea,"change",function(){S(Aa,ea.checked?"1":"0",pa)});return ea}function ja(Aa,
+za,pa,ea,ta){var xa=pa.dispName,wa=pa.type,ua=document.createElement("tr");ua.className="gePropRow"+(ta?"Dark":"")+(ea?"Alt":"")+" gePropNonHeaderRow";ua.setAttribute("data-pName",Aa);ua.setAttribute("data-pValue",za);ea=!1;null!=pa.index&&(ua.setAttribute("data-index",pa.index),xa=(null!=xa?xa:"")+"["+pa.index+"]",ea=!0);var va=document.createElement("td");va.className="gePropRowCell";xa=mxResources.get(xa,null,xa);mxUtils.write(va,xa);va.setAttribute("title",xa);ea&&(va.style.textAlign="right");
+ua.appendChild(va);va=document.createElement("td");va.className="gePropRowCell";if("color"==wa)va.appendChild(P(Aa,za,pa));else if("bool"==wa||"boolean"==wa)va.appendChild(ba(Aa,za,pa));else if("enum"==wa){var ha=pa.enumList;for(ta=0;ta<ha.length;ta++)if(xa=ha[ta],xa.val==za){mxUtils.write(va,mxResources.get(xa.dispName,null,xa.dispName));break}mxEvent.addListener(va,"click",mxUtils.bind(Z,function(){var qa=document.createElement("select");Q(va,qa);for(var aa=0;aa<ha.length;aa++){var ca=ha[aa],na=
+document.createElement("option");na.value=mxUtils.htmlEntities(ca.val);mxUtils.write(na,mxResources.get(ca.dispName,null,ca.dispName));qa.appendChild(na)}qa.value=za;n.appendChild(qa);mxEvent.addListener(qa,"change",function(){var la=mxUtils.htmlEntities(qa.value);S(Aa,la,pa)});qa.focus();mxEvent.addListener(qa,"blur",function(){n.removeChild(qa)})}))}else"dynamicArr"==wa?va.appendChild(T(Aa,za,pa.subType,pa.subDefVal,pa.countProperty,ua,ta)):"staticArr"==wa?va.appendChild(X(Aa,za,pa.subType,pa.subDefVal,
+pa.size,ua,ta)):"readOnly"==wa?(ta=document.createElement("input"),ta.setAttribute("readonly",""),ta.value=za,ta.style.width="96px",ta.style.borderWidth="0px",va.appendChild(ta)):(va.innerHTML=mxUtils.htmlEntities(decodeURIComponent(za)),mxEvent.addListener(va,"click",mxUtils.bind(Z,function(){function qa(){var ca=aa.value;ca=0==ca.length&&"string"!=wa?0:ca;pa.allowAuto&&(null!=ca.trim&&"auto"==ca.trim().toLowerCase()?(ca="auto",wa="string"):(ca=parseFloat(ca),ca=isNaN(ca)?0:ca));null!=pa.min&&ca<
+pa.min?ca=pa.min:null!=pa.max&&ca>pa.max&&(ca=pa.max);ca=encodeURIComponent(("int"==wa?parseInt(ca):ca)+"");S(Aa,ca,pa)}var aa=document.createElement("input");Q(va,aa,!0);aa.value=decodeURIComponent(za);aa.className="gePropEditor";"int"!=wa&&"float"!=wa||pa.allowAuto||(aa.type="number",aa.step="int"==wa?"1":"any",null!=pa.min&&(aa.min=parseFloat(pa.min)),null!=pa.max&&(aa.max=parseFloat(pa.max)));n.appendChild(aa);mxEvent.addListener(aa,"keypress",function(ca){13==ca.keyCode&&qa()});aa.focus();mxEvent.addListener(aa,
+"blur",function(){qa()})})));pa.isDeletable&&(ta=mxUtils.button("-",mxUtils.bind(Z,function(qa){S(Aa,"",pa,pa.index);mxEvent.consume(qa)})),ta.style.height="16px",ta.style.width="25px",ta.style.float="right",ta.className="geColorBtn",va.appendChild(ta));ua.appendChild(va);return ua}var Z=this,ka=this.editorUi.editor.graph,da=[];n.style.position="relative";n.style.padding="0";var fa=document.createElement("table");fa.className="geProperties";fa.style.whiteSpace="nowrap";fa.style.width="100%";var ma=
+document.createElement("tr");ma.className="gePropHeader";var ya=document.createElement("th");ya.className="gePropHeaderCell";var Ba=document.createElement("img");Ba.src=Sidebar.prototype.expandedImage;Ba.style.verticalAlign="middle";ya.appendChild(Ba);mxUtils.write(ya,mxResources.get("property"));ma.style.cursor="pointer";var Ha=function(){var Aa=fa.querySelectorAll(".gePropNonHeaderRow");if(Z.editorUi.propertiesCollapsed){Ba.src=Sidebar.prototype.collapsedImage;var za="none";for(var pa=n.childNodes.length-
+1;0<=pa;pa--)try{var ea=n.childNodes[pa],ta=ea.nodeName.toUpperCase();"INPUT"!=ta&&"SELECT"!=ta||n.removeChild(ea)}catch(xa){}}else Ba.src=Sidebar.prototype.expandedImage,za="";for(pa=0;pa<Aa.length;pa++)Aa[pa].style.display=za};mxEvent.addListener(ma,"click",function(){Z.editorUi.propertiesCollapsed=!Z.editorUi.propertiesCollapsed;Ha()});ma.appendChild(ya);ya=document.createElement("th");ya.className="gePropHeaderCell";ya.innerHTML=mxResources.get("value");ma.appendChild(ya);fa.appendChild(ma);var sa=
+!1,Ga=!1;ma=null;1==I.vertices.length&&0==I.edges.length?ma=I.vertices[0].id:0==I.vertices.length&&1==I.edges.length&&(ma=I.edges[0].id);null!=ma&&fa.appendChild(ja("id",mxUtils.htmlEntities(ma),{dispName:"ID",type:"readOnly"},!0,!1));for(var Ka in D)if(ma=D[Ka],"function"!=typeof ma.isVisible||ma.isVisible(I,this)){var Ma=null!=I.style[Ka]?mxUtils.htmlEntities(I.style[Ka]+""):null!=ma.getDefaultValue?ma.getDefaultValue(I,this):ma.defVal;if("separator"==ma.type)Ga=!Ga;else{if("staticArr"==ma.type)ma.size=
+parseInt(I.style[ma.sizeProperty]||D[ma.sizeProperty].defVal)||0;else if(null!=ma.dependentProps){var Ia=ma.dependentProps,Ea=[],Fa=[];for(ya=0;ya<Ia.length;ya++){var Pa=I.style[Ia[ya]];Fa.push(D[Ia[ya]].subDefVal);Ea.push(null!=Pa?Pa.split(","):[])}ma.dependentPropsDefVal=Fa;ma.dependentPropsVals=Ea}fa.appendChild(ja(Ka,Ma,ma,sa,Ga));sa=!sa}}for(ya=0;ya<da.length;ya++)for(ma=da[ya],D=ma.parentRow,I=0;I<ma.values.length;I++)Ka=ja(ma.name,ma.values[I],{type:ma.type,parentRow:ma.parentRow,isDeletable:ma.isDeletable,
+index:I,defVal:ma.defVal,countProperty:ma.countProperty,size:ma.size},0==I%2,ma.flipBkg),D.parentNode.insertBefore(Ka,D.nextSibling),D=Ka;n.appendChild(fa);Ha();return n};StyleFormatPanel.prototype.addStyles=function(n){function D(ma){mxEvent.addListener(ma,"mouseenter",function(){ma.style.opacity="1"});mxEvent.addListener(ma,"mouseleave",function(){ma.style.opacity="0.5"})}var I=this.editorUi,S=I.editor.graph,Q=document.createElement("div");Q.style.whiteSpace="nowrap";Q.style.paddingLeft="24px";
+Q.style.paddingRight="20px";n.style.paddingLeft="16px";n.style.paddingBottom="6px";n.style.position="relative";n.appendChild(Q);var P="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),T=document.createElement("div");T.style.whiteSpace="nowrap";T.style.position="relative";T.style.textAlign="center";T.style.width="210px";for(var X=[],ba=0;ba<this.defaultColorSchemes.length;ba++){var ja=
+document.createElement("div");ja.style.display="inline-block";ja.style.width="6px";ja.style.height="6px";ja.style.marginLeft="4px";ja.style.marginRight="3px";ja.style.borderRadius="3px";ja.style.cursor="pointer";ja.style.background="transparent";ja.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ma){mxEvent.addListener(ja,"click",mxUtils.bind(this,function(){Z(ma)}))})(ba);X.push(ja);T.appendChild(ja)}var Z=mxUtils.bind(this,function(ma){null!=X[ma]&&(null!=this.format.currentScheme&&
+null!=X[this.format.currentScheme]&&(X[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=ma,ka(this.defaultColorSchemes[this.format.currentScheme]),X[this.format.currentScheme].style.background="#84d7ff")}),ka=mxUtils.bind(this,function(ma){var ya=mxUtils.bind(this,function(Ha){var sa=mxUtils.button("",mxUtils.bind(this,function(Ma){S.getModel().beginUpdate();try{for(var Ia=I.getSelectionState().cells,Ea=0;Ea<Ia.length;Ea++){for(var Fa=S.getModel().getStyle(Ia[Ea]),
+Pa=0;Pa<P.length;Pa++)Fa=mxUtils.removeStylename(Fa,P[Pa]);var Aa=S.getModel().isVertex(Ia[Ea])?S.defaultVertexStyle:S.defaultEdgeStyle;null!=Ha?(mxEvent.isShiftDown(Ma)||(Fa=""==Ha.fill?mxUtils.setStyle(Fa,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(Fa,mxConstants.STYLE_FILLCOLOR,Ha.fill||mxUtils.getValue(Aa,mxConstants.STYLE_FILLCOLOR,null)),Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_GRADIENTCOLOR,Ha.gradient||mxUtils.getValue(Aa,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(Ma)||
+mxClient.IS_MAC&&mxEvent.isMetaDown(Ma)||!S.getModel().isVertex(Ia[Ea])||(Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_FONTCOLOR,Ha.font||mxUtils.getValue(Aa,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(Ma)||(Fa=""==Ha.stroke?mxUtils.setStyle(Fa,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(Fa,mxConstants.STYLE_STROKECOLOR,Ha.stroke||mxUtils.getValue(Aa,mxConstants.STYLE_STROKECOLOR,null)))):(Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(Aa,mxConstants.STYLE_FILLCOLOR,
+"#ffffff")),Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(Aa,mxConstants.STYLE_STROKECOLOR,"#000000")),Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(Aa,mxConstants.STYLE_GRADIENTCOLOR,null)),S.getModel().isVertex(Ia[Ea])&&(Fa=mxUtils.setStyle(Fa,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(Aa,mxConstants.STYLE_FONTCOLOR,null))));S.getModel().setStyle(Ia[Ea],Fa)}}finally{S.getModel().endUpdate()}}));sa.className="geStyleButton";sa.style.width="36px";
+sa.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";sa.style.margin="0px 6px 6px 0px";if(null!=Ha){var Ga="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ha.gradient?mxClient.IS_IE&&10>document.documentMode?sa.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ha.fill+"', EndColorStr='"+Ha.gradient+"', GradientType=0)":sa.style.backgroundImage="linear-gradient("+Ha.fill+" 0px,"+Ha.gradient+" 100%)":Ha.fill==mxConstants.NONE?sa.style.background="url('"+Dialog.prototype.noColorImage+
+"')":sa.style.backgroundColor=""==Ha.fill?mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ha.fill||mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");sa.style.border=Ha.stroke==mxConstants.NONE?Ga+" transparent":""==Ha.stroke?Ga+" "+mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ga+" "+(Ha.stroke||mxUtils.getValue(S.defaultVertexStyle,
+mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ha.title&&sa.setAttribute("title",Ha.title)}else{Ga=mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var Ka=mxUtils.getValue(S.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");sa.style.backgroundColor=Ga;sa.style.border="1px solid "+Ka}sa.style.borderRadius="0";Q.appendChild(sa)});Q.innerHTML="";for(var Ba=0;Ba<ma.length;Ba++)0<Ba&&0==mxUtils.mod(Ba,4)&&mxUtils.br(Q),ya(ma[Ba])});
+null==this.format.currentScheme?Z(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):Z(this.format.currentScheme);ba=10>=this.defaultColorSchemes.length?28:8;var da=document.createElement("div");da.style.cssText="position:absolute;left:10px;top:8px;bottom:"+ba+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(da,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var fa=document.createElement("div");fa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+ba+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(n.appendChild(da),n.appendChild(fa));mxEvent.addListener(fa,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));D(da);D(fa);ka(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&n.appendChild(T);return n};StyleFormatPanel.prototype.addEditOps=function(n){var D=this.editorUi.getSelectionState(),I=this.editorUi.editor.graph,S=null;1==D.cells.length&&(S=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(Q){this.editorUi.actions.get("editStyle").funct()})),S.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),S.style.width="210px",S.style.marginBottom="2px",n.appendChild(S));I=1==D.cells.length?I.view.getState(D.cells[0]):null;null!=I&&null!=I.shape&&null!=I.shape.stencil?(D=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(Q){this.editorUi.actions.get("editShape").funct()})),D.setAttribute("title",
+mxResources.get("editShape")),D.style.marginBottom="2px",null==S?D.style.width="210px":(S.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),n.appendChild(D)):D.image&&0<D.cells.length&&(D=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(Q){this.editorUi.actions.get("image").funct()})),D.setAttribute("title",mxResources.get("editImage")),D.style.marginBottom="2px",null==S?D.style.width="210px":(S.style.width="104px",D.style.width="104px",D.style.marginLeft="2px"),
+n.appendChild(D));return n}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(n){return n.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(n){return Graph.isGoogleFontUrl(n)};Graph.createFontElement=function(n,
+D){var I=Graph.fontMapping[D];null==I&&Graph.isCssFontUrl(D)?(n=document.createElement("link"),n.setAttribute("rel","stylesheet"),n.setAttribute("type","text/css"),n.setAttribute("charset","UTF-8"),n.setAttribute("href",D)):(null==I&&(I='@font-face {\nfont-family: "'+n+'";\nsrc: url("'+D+'");\n}'),n=document.createElement("style"),mxUtils.write(n,I));return n};Graph.addFont=function(n,D,I){if(null!=n&&0<n.length&&null!=D&&0<D.length){var S=n.toLowerCase();if("helvetica"!=S&&"arial"!=n&&"sans-serif"!=
+S){var Q=Graph.customFontElements[S];null!=Q&&Q.url!=D&&(Q.elt.parentNode.removeChild(Q.elt),Q=null);null==Q?(Q=D,"http:"==D.substring(0,5)&&(Q=PROXY_URL+"?url="+encodeURIComponent(D)),Q={name:n,url:D,elt:Graph.createFontElement(n,Q)},Graph.customFontElements[S]=Q,Graph.recentCustomFonts[S]=Q,D=document.getElementsByTagName("head")[0],null!=I&&("link"==Q.elt.nodeName.toLowerCase()?(Q.elt.onload=I,Q.elt.onerror=I):I()),null!=D&&D.appendChild(Q.elt)):null!=I&&I()}else null!=I&&I()}else null!=I&&I();
+return n};Graph.getFontUrl=function(n,D){n=Graph.customFontElements[n.toLowerCase()];null!=n&&(D=n.url);return D};Graph.processFontAttributes=function(n){n=n.getElementsByTagName("*");for(var D=0;D<n.length;D++){var I=n[D].getAttribute("data-font-src");if(null!=I){var S="FONT"==n[D].nodeName?n[D].getAttribute("face"):n[D].style.fontFamily;null!=S&&Graph.addFont(S,I)}}};Graph.processFontStyle=function(n){if(null!=n){var D=mxUtils.getValue(n,"fontSource",null);if(null!=D){var I=mxUtils.getValue(n,mxConstants.STYLE_FONTFAMILY,
+null);null!=I&&Graph.addFont(I,decodeURIComponent(D))}}return n};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var z=Graph.prototype.init;Graph.prototype.init=function(){function n(Q){D=Q}z.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var D=null;mxEvent.addListener(this.container,"mouseenter",n);mxEvent.addListener(this.container,"mousemove",n);mxEvent.addListener(this.container,"mouseleave",function(Q){D=null});this.isMouseInsertPoint=function(){return null!=D};var I=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=D?this.getPointForEvent(D):I.apply(this,arguments)};var S=this.layoutManager.getLayout;this.layoutManager.getLayout=function(Q){var P=this.graph.getCellStyle(Q);if(null!=P&&"rack"==P.childLayout){var T=new mxStackLayout(this.graph,!1);T.gridSize=null!=P.rackUnitSize?parseFloat(P.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;T.marginLeft=P.marginLeft||0;T.marginRight=P.marginRight||0;T.marginTop=P.marginTop||0;T.marginBottom=
+P.marginBottom||0;T.allowGaps=P.allowGaps||0;T.horizontal="1"==mxUtils.getValue(P,"horizontalRack","0");T.resizeParent=!1;T.fill=!0;return T}return S.apply(this,arguments)};this.updateGlobalUrlVariables()};var y=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(n,D){return Graph.processFontStyle(y.apply(this,arguments))};var L=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(n,D,I,S,Q,P,T,X,ba,ja,Z){L.apply(this,arguments);Graph.processFontAttributes(Z)};
+var N=mxText.prototype.redraw;mxText.prototype.redraw=function(){N.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(n,D,I){function S(){for(var ma=T.getSelectionCells(),ya=[],Ba=0;Ba<ma.length;Ba++)T.isCellVisible(ma[Ba])&&ya.push(ma[Ba]);T.setSelectionCells(ya)}function Q(ma){T.setHiddenTags(ma?[]:X.slice());S();T.refresh()}function P(ma,ya){ja.innerHTML="";if(0<ma.length){var Ba=document.createElement("table");
+Ba.setAttribute("cellpadding","2");Ba.style.boxSizing="border-box";Ba.style.tableLayout="fixed";Ba.style.width="100%";var Ha=document.createElement("tbody");if(null!=ma&&0<ma.length)for(var sa=0;sa<ma.length;sa++)(function(Ga){var Ka=0>mxUtils.indexOf(T.hiddenTags,Ga),Ma=document.createElement("tr"),Ia=document.createElement("td");Ia.style.align="center";Ia.style.width="16px";var Ea=document.createElement("img");Ea.setAttribute("src",Ka?Editor.visibleImage:Editor.hiddenImage);Ea.setAttribute("title",
+mxResources.get(Ka?"hideIt":"show",[Ga]));mxUtils.setOpacity(Ea,Ka?75:25);Ea.style.verticalAlign="middle";Ea.style.cursor="pointer";Ea.style.width="16px";if(D||Editor.isDarkMode())Ea.style.filter="invert(100%)";Ia.appendChild(Ea);mxEvent.addListener(Ea,"click",function(Pa){mxEvent.isShiftDown(Pa)?Q(0<=mxUtils.indexOf(T.hiddenTags,Ga)):(T.toggleHiddenTag(Ga),S(),T.refresh());mxEvent.consume(Pa)});Ma.appendChild(Ia);Ia=document.createElement("td");Ia.style.overflow="hidden";Ia.style.whiteSpace="nowrap";
+Ia.style.textOverflow="ellipsis";Ia.style.verticalAlign="middle";Ia.style.cursor="pointer";Ia.setAttribute("title",Ga);a=document.createElement("a");mxUtils.write(a,Ga);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,Ka?100:40);Ia.appendChild(a);mxEvent.addListener(Ia,"click",function(Pa){if(mxEvent.isShiftDown(Pa)){Q(!0);var Aa=T.getCellsForTags([Ga],null,null,!0);T.isEnabled()?T.setSelectionCells(Aa):T.highlightCells(Aa)}else if(Ka&&0<T.hiddenTags.length)Q(!0);else{Aa=
+X.slice();var za=mxUtils.indexOf(Aa,Ga);Aa.splice(za,1);T.setHiddenTags(Aa);S();T.refresh()}mxEvent.consume(Pa)});Ma.appendChild(Ia);if(T.isEnabled()){Ia=document.createElement("td");Ia.style.verticalAlign="middle";Ia.style.textAlign="center";Ia.style.width="18px";if(null==ya){Ia.style.align="center";Ia.style.width="16px";Ea=document.createElement("img");Ea.setAttribute("src",Editor.crossImage);Ea.setAttribute("title",mxResources.get("removeIt",[Ga]));mxUtils.setOpacity(Ea,Ka?75:25);Ea.style.verticalAlign=
+"middle";Ea.style.cursor="pointer";Ea.style.width="16px";if(D||Editor.isDarkMode())Ea.style.filter="invert(100%)";mxEvent.addListener(Ea,"click",function(Pa){var Aa=mxUtils.indexOf(X,Ga);0<=Aa&&X.splice(Aa,1);T.removeTagsForCells(T.model.getDescendants(T.model.getRoot()),[Ga]);T.refresh();mxEvent.consume(Pa)});Ia.appendChild(Ea)}else{var Fa=document.createElement("input");Fa.setAttribute("type","checkbox");Fa.style.margin="0px";Fa.defaultChecked=null!=ya&&0<=mxUtils.indexOf(ya,Ga);Fa.checked=Fa.defaultChecked;
+Fa.style.background="transparent";Fa.setAttribute("title",mxResources.get(Fa.defaultChecked?"removeIt":"add",[Ga]));mxEvent.addListener(Fa,"change",function(Pa){Fa.checked?T.addTagsForCells(T.getSelectionCells(),[Ga]):T.removeTagsForCells(T.getSelectionCells(),[Ga]);mxEvent.consume(Pa)});Ia.appendChild(Fa)}Ma.appendChild(Ia)}Ha.appendChild(Ma)})(ma[sa]);Ba.appendChild(Ha);ja.appendChild(Ba)}}var T=this,X=T.hiddenTags.slice(),ba=document.createElement("div");ba.style.userSelect="none";ba.style.overflow=
+"hidden";ba.style.padding="10px";ba.style.height="100%";var ja=document.createElement("div");ja.style.boxSizing="border-box";ja.style.borderRadius="4px";ja.style.userSelect="none";ja.style.overflow="auto";ja.style.position="absolute";ja.style.left="10px";ja.style.right="10px";ja.style.top="10px";ja.style.border=T.isEnabled()?"1px solid #808080":"none";ja.style.bottom=T.isEnabled()?"48px":"10px";ba.appendChild(ja);var Z=mxUtils.button(mxResources.get("reset"),function(ma){T.setHiddenTags([]);mxEvent.isShiftDown(ma)||
+(X=T.hiddenTags.slice());S();T.refresh()});Z.setAttribute("title",mxResources.get("reset"));Z.className="geBtn";Z.style.margin="0 4px 0 0";var ka=mxUtils.button(mxResources.get("add"),function(){null!=I&&I(X,function(ma){X=ma;da()})});ka.setAttribute("title",mxResources.get("add"));ka.className="geBtn";ka.style.margin="0";T.addListener(mxEvent.ROOT,function(){X=T.hiddenTags.slice()});var da=mxUtils.bind(this,function(ma,ya){if(n()){ma=T.getAllTags();for(ya=0;ya<ma.length;ya++)0>mxUtils.indexOf(X,
+ma[ya])&&X.push(ma[ya]);X.sort();T.isSelectionEmpty()?P(X):P(X,T.getCommonTagsForCells(T.getSelectionCells()))}});T.selectionModel.addListener(mxEvent.CHANGE,da);T.model.addListener(mxEvent.CHANGE,da);T.addListener(mxEvent.REFRESH,da);var fa=document.createElement("div");fa.style.boxSizing="border-box";fa.style.whiteSpace="nowrap";fa.style.position="absolute";fa.style.overflow="hidden";fa.style.bottom="0px";fa.style.height="42px";fa.style.right="10px";fa.style.left="10px";T.isEnabled()&&(fa.appendChild(Z),
+fa.appendChild(ka),ba.appendChild(fa));return{div:ba,refresh:da}};Graph.prototype.getCustomFonts=function(){var n=this.extFonts;n=null!=n?n.slice():[];for(var D in Graph.customFontElements){var I=Graph.customFontElements[D];n.push({name:I.name,url:I.url})}return n};Graph.prototype.setFont=function(n,D){Graph.addFont(n,D);document.execCommand("fontname",!1,n);if(null!=D){var I=this.cellEditor.textarea.getElementsByTagName("font");D=Graph.getFontUrl(n,D);for(var S=0;S<I.length;S++)I[S].getAttribute("face")==
+n&&I[S].getAttribute("data-font-src")!=D&&I[S].setAttribute("data-font-src",D)}};var K=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return K.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var n=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=n)for(var D in n)this.globalVars[D]=
+n[D]}catch(I){null!=window.console&&console.log("Error in vars URL parameter: "+I)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var q=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(n){var D=q.apply(this,arguments);null==D&&null!=this.globalVars&&(D=this.globalVars[n]);return D};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var n=this.themes["default-style2"];this.defaultStylesheet=
+(new mxCodec(n.ownerDocument)).decode(n)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var C=Graph.prototype.getSvg;Graph.prototype.getSvg=function(n,D,I,S,Q,P,T,X,ba,ja,Z,ka,da,fa){var ma=null,ya=null,Ba=null;ka||null==this.themes||"darkTheme"!=this.defaultThemeName||(ma=this.stylesheet,ya=this.shapeForegroundColor,Ba=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
+"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ha=C.apply(this,arguments),sa=this.getCustomFonts();if(Z&&0<sa.length){var Ga=Ha.ownerDocument,Ka=null!=Ga.createElementNS?Ga.createElementNS(mxConstants.NS_SVG,"style"):Ga.createElement("style");null!=Ga.setAttributeNS?Ka.setAttributeNS("type","text/css"):Ka.setAttribute("type","text/css");for(var Ma="",Ia="",Ea=0;Ea<sa.length;Ea++){var Fa=sa[Ea].name,Pa=sa[Ea].url;Graph.isCssFontUrl(Pa)?
+Ma+="@import url("+Pa+");\n":Ia+='@font-face {\nfont-family: "'+Fa+'";\nsrc: url("'+Pa+'");\n}\n'}Ka.appendChild(Ga.createTextNode(Ma+Ia));Ha.getElementsByTagName("defs")[0].appendChild(Ka)}null!=ma&&(this.shapeBackgroundColor=Ba,this.shapeForegroundColor=ya,this.stylesheet=ma,this.refresh());return Ha};var A=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var n=A.apply(this,arguments);if(this.mathEnabled){var D=n.drawText;n.drawText=function(I,S){if(null!=I.text&&
+null!=I.text.value&&I.text.checkBounds()&&(mxUtils.isNode(I.text.value)||I.text.dialect==mxConstants.DIALECT_STRICTHTML)){var Q=I.text.getContentNode();if(null!=Q){Q=Q.cloneNode(!0);if(Q.getElementsByTagNameNS)for(var P=Q.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<P.length;)P[0].parentNode.removeChild(P[0]);null!=Q.innerHTML&&(P=I.text.value,I.text.value=Q.innerHTML,D.apply(this,arguments),I.text.value=P)}}else D.apply(this,arguments)}}return n};var B=mxCellRenderer.prototype.destroy;
mxCellRenderer.prototype.destroy=function(n){B.apply(this,arguments);null!=n.secondLabel&&(n.secondLabel.destroy(),n.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(n){return[n.shape,n.text,n.secondLabel,n.control]};var G=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){G.apply(this,arguments);this.enumerationState=0};var M=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(n){null!=n.shape&&this.redrawEnumerationState(n);
-return M.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(n){n=decodeURIComponent(mxUtils.getValue(n.style,"enumerateValue",""));""==n&&(n=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(n)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(n){var E="1"==mxUtils.getValue(n.style,"enumerate",0);E&&null==n.secondLabel?(n.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,
-mxConstants.ALIGN_BOTTOM),n.secondLabel.size=12,n.secondLabel.state=n,n.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(n,n.secondLabel)):E||null==n.secondLabel||(n.secondLabel.destroy(),n.secondLabel=null);E=n.secondLabel;if(null!=E){var I=n.view.scale,S=this.createEnumerationValue(n);n=this.graph.model.isVertex(n.cell)?new mxRectangle(n.x+n.width-4*I,n.y+4*I,0,0):mxRectangle.fromPoint(n.view.getPoint(n));E.bounds.equals(n)&&E.value==S&&E.scale==I||(E.bounds=
-n,E.value=S,E.scale=I,E.redraw())}};var H=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){H.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var n=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
+return M.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(n){n=decodeURIComponent(mxUtils.getValue(n.style,"enumerateValue",""));""==n&&(n=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(n)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(n){var D="1"==mxUtils.getValue(n.style,"enumerate",0);D&&null==n.secondLabel?(n.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,
+mxConstants.ALIGN_BOTTOM),n.secondLabel.size=12,n.secondLabel.state=n,n.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(n,n.secondLabel)):D||null==n.secondLabel||(n.secondLabel.destroy(),n.secondLabel=null);D=n.secondLabel;if(null!=D){var I=n.view.scale,S=this.createEnumerationValue(n);n=this.graph.model.isVertex(n.cell)?new mxRectangle(n.x+n.width-4*I,n.y+4*I,0,0):mxRectangle.fromPoint(n.view.getPoint(n));D.bounds.equals(n)&&D.value==S&&D.scale==I||(D.bounds=
+n,D.value=S,D.scale=I,D.redraw())}};var H=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){H.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var n=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||
this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",n.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,n.ownerSVGElement))}};var F=Graph.prototype.refresh;Graph.prototype.refresh=function(){F.apply(this,
arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var J=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){J.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(n){"data:action/json,"==n.substring(0,17)&&(n=JSON.parse(n.substring(17)),null!=
-n.actions&&this.executeCustomActions(n.actions))};Graph.prototype.executeCustomActions=function(n,E){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var I=!1,S=0,Q=0,P=mxUtils.bind(this,function(){I||(I=!0,this.model.beginUpdate())}),T=mxUtils.bind(this,
-function(){I&&(I=!1,this.model.endUpdate())}),Y=mxUtils.bind(this,function(){0<S&&S--;0==S&&ca()}),ca=mxUtils.bind(this,function(){if(Q<n.length){var ia=this.stoppingCustomActions,Z=n[Q++],fa=[];if(null!=Z.open)if(T(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||ia||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;Y()}),S++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=Z.wait?parseInt(Z.wait):1E3),T());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(S++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,Y,ia?0:Z.fadeIn.delay));null!=Z.fadeOut&&(S++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,Y,ia?0:Z.fadeOut.delay));null!=Z.wipeIn&&(fa=fa.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,
-!0),!0)));null!=Z.wipeOut&&(fa=fa.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(P(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){P();var aa=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(aa),1);this.setCellsVisible(aa,!0)}null!=Z.hide&&(P(),aa=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(aa),0),this.setCellsVisible(aa,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&&
-(P(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(P(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));aa=[];null!=Z.select&&this.isEnabled()&&(aa=this.getCellsForAction(Z.select),this.setSelectionCells(aa));null!=Z.highlight&&(aa=this.getCellsForAction(Z.highlight),this.highlightCells(aa,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity));
-null!=Z.scroll&&(aa=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<aa.length&&this.scrollCellToVisible(aa[0]);if(null!=Z.tags){aa=[];null!=Z.tags.hidden&&(aa=aa.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var wa=this.getAllTags(),la=0;la<wa.length;la++)0>mxUtils.indexOf(Z.tags.visible,wa[la])&&0>mxUtils.indexOf(aa,wa[la])&&aa.push(wa[la]);this.setHiddenTags(aa);this.refresh()}0<fa.length&&(S++,this.executeAnimations(fa,Y,ia?1:Z.steps,ia?0:Z.delay));
-0==S?ca():T()}else this.stoppingCustomActions=this.executingCustomActions=!1,T(),null!=E&&E()});ca()}};Graph.prototype.doUpdateCustomLinksForCell=function(n,E){var I=this.getLinkForCell(E);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(E,this.updateCustomLink(n,I));if(this.isHtmlLabel(E)){var S=document.createElement("div");S.innerHTML=this.sanitizeHtml(this.getLabel(E));for(var Q=S.getElementsByTagName("a"),P=!1,T=0;T<Q.length;T++)I=Q[T].getAttribute("href"),null!=I&&"data:action/json,"==
-I.substring(0,17)&&(Q[T].setAttribute("href",this.updateCustomLink(n,I)),P=!0);P&&this.labelChanged(E,S.innerHTML)}};Graph.prototype.updateCustomLink=function(n,E){if("data:action/json,"==E.substring(0,17))try{var I=JSON.parse(E.substring(17));null!=I.actions&&(this.updateCustomLinkActions(n,I.actions),E="data:action/json,"+JSON.stringify(I))}catch(S){}return E};Graph.prototype.updateCustomLinkActions=function(n,E){for(var I=0;I<E.length;I++){var S=E[I],Q;for(Q in S)this.updateCustomLinkAction(n,
-S[Q],"cells"),this.updateCustomLinkAction(n,S[Q],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(n,E,I){if(null!=E&&null!=E[I]){for(var S=[],Q=0;Q<E[I].length;Q++)if("*"==E[I][Q])S.push(E[I][Q]);else{var P=n[E[I][Q]];null!=P?""!=P&&S.push(P):S.push(E[I][Q])}E[I]=S}};Graph.prototype.getCellsForAction=function(n,E){E=this.getCellsById(n.cells).concat(this.getCellsForTags(n.tags,null,E));if(null!=n.excludeCells){for(var I=[],S=0;S<E.length;S++)0>n.excludeCells.indexOf(E[S].id)&&I.push(E[S]);
-E=I}return E};Graph.prototype.getCellsById=function(n){var E=[];if(null!=n)for(var I=0;I<n.length;I++)if("*"==n[I]){var S=this.model.getRoot();E=E.concat(this.model.filterDescendants(function(P){return P!=S},S))}else{var Q=this.model.getCell(n[I]);null!=Q&&E.push(Q)}return E};var R=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(n){return R.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(n))};Graph.prototype.setHiddenTags=function(n){this.hiddenTags=n;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
-Graph.prototype.toggleHiddenTag=function(n){var E=mxUtils.indexOf(this.hiddenTags,n);0>E?this.hiddenTags.push(n):0<=E&&this.hiddenTags.splice(E,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(n){if(null==n||0==n.length||0==this.hiddenTags.length)return!1;n=n.split(" ");if(n.length>this.hiddenTags.length)return!1;for(var E=0;E<n.length;E++)if(0>mxUtils.indexOf(this.hiddenTags,n[E]))return!1;return!0};Graph.prototype.getCellsForTags=function(n,E,I,
-S){var Q=[];if(null!=n){E=null!=E?E:this.model.getDescendants(this.model.getRoot());for(var P=0,T={},Y=0;Y<n.length;Y++)0<n[Y].length&&(T[n[Y]]=!0,P++);for(Y=0;Y<E.length;Y++)if(I&&this.model.getParent(E[Y])==this.model.root||this.model.isVertex(E[Y])||this.model.isEdge(E[Y])){var ca=this.getTagsForCell(E[Y]),ia=!1;if(0<ca.length&&(ca=ca.split(" "),ca.length>=n.length)){for(var Z=ia=0;Z<ca.length&&ia<P;Z++)null!=T[ca[Z]]&&ia++;ia=ia==P}ia&&(1!=S||this.isCellVisible(E[Y]))&&Q.push(E[Y])}}return Q};
-Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(n){for(var E=null,I=[],S=0;S<n.length;S++){var Q=this.getTagsForCell(n[S]);I=[];if(0<Q.length){Q=Q.split(" ");for(var P={},T=0;T<Q.length;T++)if(null==E||null!=E[Q[T]])P[Q[T]]=!0,I.push(Q[T]);E=P}else return[]}return I};Graph.prototype.getTagsForCells=function(n){for(var E=[],I={},S=0;S<n.length;S++){var Q=this.getTagsForCell(n[S]);if(0<
-Q.length){Q=Q.split(" ");for(var P=0;P<Q.length;P++)null==I[Q[P]]&&(I[Q[P]]=!0,E.push(Q[P]))}}return E};Graph.prototype.getTagsForCell=function(n){return this.getAttributeForCell(n,"tags","")};Graph.prototype.addTagsForCells=function(n,E){if(0<n.length&&0<E.length){this.model.beginUpdate();try{for(var I=0;I<n.length;I++){for(var S=this.getTagsForCell(n[I]),Q=S.split(" "),P=!1,T=0;T<E.length;T++){var Y=mxUtils.trim(E[T]);""!=Y&&0>mxUtils.indexOf(Q,Y)&&(S=0<S.length?S+" "+Y:Y,P=!0)}P&&this.setAttributeForCell(n[I],
-"tags",S)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(n,E){if(0<n.length&&0<E.length){this.model.beginUpdate();try{for(var I=0;I<n.length;I++){var S=this.getTagsForCell(n[I]);if(0<S.length){for(var Q=S.split(" "),P=!1,T=0;T<E.length;T++){var Y=mxUtils.indexOf(Q,E[T]);0<=Y&&(Q.splice(Y,1),P=!0)}P&&this.setAttributeForCell(n[I],"tags",Q.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(n){this.model.beginUpdate();try{for(var E=0;E<
-n.length;E++)this.model.setVisible(n[E],!this.model.isVisible(n[E]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(n,E){this.model.beginUpdate();try{for(var I=0;I<n.length;I++)this.model.setVisible(n[I],E)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(n,E,I,S){for(var Q=0;Q<n.length;Q++)this.highlightCell(n[Q],E,I,S)};Graph.prototype.highlightCell=function(n,E,I,S,Q){E=null!=E?E:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;n=this.view.getState(n);
-var P=null;null!=n&&(Q=null!=Q?Q:4,Q=Math.max(Q+1,mxUtils.getValue(n.style,mxConstants.STYLE_STROKEWIDTH,1)+Q),P=new mxCellHighlight(this,E,Q,!1),null!=S&&(P.opacity=S),P.highlight(n),window.setTimeout(function(){null!=P.shape&&(mxUtils.setPrefixedStyle(P.shape.node.style,"transition","all 1200ms ease-in-out"),P.shape.node.style.opacity=0);window.setTimeout(function(){P.destroy()},1200)},I));return P};Graph.prototype.addSvgShadow=function(n,E,I,S){I=null!=I?I:!1;S=null!=S?S:!0;var Q=n.ownerDocument,
+n.actions&&this.executeCustomActions(n.actions))};Graph.prototype.executeCustomActions=function(n,D){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var I=!1,S=0,Q=0,P=mxUtils.bind(this,function(){I||(I=!0,this.model.beginUpdate())}),T=mxUtils.bind(this,
+function(){I&&(I=!1,this.model.endUpdate())}),X=mxUtils.bind(this,function(){0<S&&S--;0==S&&ba()}),ba=mxUtils.bind(this,function(){if(Q<n.length){var ja=this.stoppingCustomActions,Z=n[Q++],ka=[];if(null!=Z.open)if(T(),this.isCustomLink(Z.open)){if(!this.customLinkClicked(Z.open))return}else this.openLink(Z.open);null==Z.wait||ja||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;X()}),S++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=Z.wait?parseInt(Z.wait):1E3),T());null!=Z.opacity&&null!=Z.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Z.opacity,!0)),Z.opacity.value);null!=Z.fadeIn&&(S++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeIn,!0)),0,1,X,ja?0:Z.fadeIn.delay));null!=Z.fadeOut&&(S++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Z.fadeOut,!0)),1,0,X,ja?0:Z.fadeOut.delay));null!=Z.wipeIn&&(ka=ka.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeIn,
+!0),!0)));null!=Z.wipeOut&&(ka=ka.concat(this.createWipeAnimations(this.getCellsForAction(Z.wipeOut,!0),!1)));null!=Z.toggle&&(P(),this.toggleCells(this.getCellsForAction(Z.toggle,!0)));if(null!=Z.show){P();var da=this.getCellsForAction(Z.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(da),1);this.setCellsVisible(da,!0)}null!=Z.hide&&(P(),da=this.getCellsForAction(Z.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(da),0),this.setCellsVisible(da,!1));null!=Z.toggleStyle&&null!=Z.toggleStyle.key&&
+(P(),this.toggleCellStyles(Z.toggleStyle.key,null!=Z.toggleStyle.defaultValue?Z.toggleStyle.defaultValue:"0",this.getCellsForAction(Z.toggleStyle,!0)));null!=Z.style&&null!=Z.style.key&&(P(),this.setCellStyles(Z.style.key,Z.style.value,this.getCellsForAction(Z.style,!0)));da=[];null!=Z.select&&this.isEnabled()&&(da=this.getCellsForAction(Z.select),this.setSelectionCells(da));null!=Z.highlight&&(da=this.getCellsForAction(Z.highlight),this.highlightCells(da,Z.highlight.color,Z.highlight.duration,Z.highlight.opacity));
+null!=Z.scroll&&(da=this.getCellsForAction(Z.scroll));null!=Z.viewbox&&this.fitWindow(Z.viewbox,Z.viewbox.border);0<da.length&&this.scrollCellToVisible(da[0]);if(null!=Z.tags){da=[];null!=Z.tags.hidden&&(da=da.concat(Z.tags.hidden));if(null!=Z.tags.visible)for(var fa=this.getAllTags(),ma=0;ma<fa.length;ma++)0>mxUtils.indexOf(Z.tags.visible,fa[ma])&&0>mxUtils.indexOf(da,fa[ma])&&da.push(fa[ma]);this.setHiddenTags(da);this.refresh()}0<ka.length&&(S++,this.executeAnimations(ka,X,ja?1:Z.steps,ja?0:Z.delay));
+0==S?ba():T()}else this.stoppingCustomActions=this.executingCustomActions=!1,T(),null!=D&&D()});ba()}};Graph.prototype.doUpdateCustomLinksForCell=function(n,D){var I=this.getLinkForCell(D);null!=I&&"data:action/json,"==I.substring(0,17)&&this.setLinkForCell(D,this.updateCustomLink(n,I));if(this.isHtmlLabel(D)){var S=document.createElement("div");S.innerHTML=this.sanitizeHtml(this.getLabel(D));for(var Q=S.getElementsByTagName("a"),P=!1,T=0;T<Q.length;T++)I=Q[T].getAttribute("href"),null!=I&&"data:action/json,"==
+I.substring(0,17)&&(Q[T].setAttribute("href",this.updateCustomLink(n,I)),P=!0);P&&this.labelChanged(D,S.innerHTML)}};Graph.prototype.updateCustomLink=function(n,D){if("data:action/json,"==D.substring(0,17))try{var I=JSON.parse(D.substring(17));null!=I.actions&&(this.updateCustomLinkActions(n,I.actions),D="data:action/json,"+JSON.stringify(I))}catch(S){}return D};Graph.prototype.updateCustomLinkActions=function(n,D){for(var I=0;I<D.length;I++){var S=D[I],Q;for(Q in S)this.updateCustomLinkAction(n,
+S[Q],"cells"),this.updateCustomLinkAction(n,S[Q],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(n,D,I){if(null!=D&&null!=D[I]){for(var S=[],Q=0;Q<D[I].length;Q++)if("*"==D[I][Q])S.push(D[I][Q]);else{var P=n[D[I][Q]];null!=P?""!=P&&S.push(P):S.push(D[I][Q])}D[I]=S}};Graph.prototype.getCellsForAction=function(n,D){D=this.getCellsById(n.cells).concat(this.getCellsForTags(n.tags,null,D));if(null!=n.excludeCells){for(var I=[],S=0;S<D.length;S++)0>n.excludeCells.indexOf(D[S].id)&&I.push(D[S]);
+D=I}return D};Graph.prototype.getCellsById=function(n){var D=[];if(null!=n)for(var I=0;I<n.length;I++)if("*"==n[I]){var S=this.model.getRoot();D=D.concat(this.model.filterDescendants(function(P){return P!=S},S))}else{var Q=this.model.getCell(n[I]);null!=Q&&D.push(Q)}return D};var R=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(n){return R.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(n))};Graph.prototype.setHiddenTags=function(n){this.hiddenTags=n;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};
+Graph.prototype.toggleHiddenTag=function(n){var D=mxUtils.indexOf(this.hiddenTags,n);0>D?this.hiddenTags.push(n):0<=D&&this.hiddenTags.splice(D,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(n){if(null==n||0==n.length||0==this.hiddenTags.length)return!1;n=n.split(" ");if(n.length>this.hiddenTags.length)return!1;for(var D=0;D<n.length;D++)if(0>mxUtils.indexOf(this.hiddenTags,n[D]))return!1;return!0};Graph.prototype.getCellsForTags=function(n,D,I,
+S){var Q=[];if(null!=n){D=null!=D?D:this.model.getDescendants(this.model.getRoot());for(var P=0,T={},X=0;X<n.length;X++)0<n[X].length&&(T[n[X]]=!0,P++);for(X=0;X<D.length;X++)if(I&&this.model.getParent(D[X])==this.model.root||this.model.isVertex(D[X])||this.model.isEdge(D[X])){var ba=this.getTagsForCell(D[X]),ja=!1;if(0<ba.length&&(ba=ba.split(" "),ba.length>=n.length)){for(var Z=ja=0;Z<ba.length&&ja<P;Z++)null!=T[ba[Z]]&&ja++;ja=ja==P}ja&&(1!=S||this.isCellVisible(D[X]))&&Q.push(D[X])}}return Q};
+Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(n){for(var D=null,I=[],S=0;S<n.length;S++){var Q=this.getTagsForCell(n[S]);I=[];if(0<Q.length){Q=Q.split(" ");for(var P={},T=0;T<Q.length;T++)if(null==D||null!=D[Q[T]])P[Q[T]]=!0,I.push(Q[T]);D=P}else return[]}return I};Graph.prototype.getTagsForCells=function(n){for(var D=[],I={},S=0;S<n.length;S++){var Q=this.getTagsForCell(n[S]);if(0<
+Q.length){Q=Q.split(" ");for(var P=0;P<Q.length;P++)null==I[Q[P]]&&(I[Q[P]]=!0,D.push(Q[P]))}}return D};Graph.prototype.getTagsForCell=function(n){return this.getAttributeForCell(n,"tags","")};Graph.prototype.addTagsForCells=function(n,D){if(0<n.length&&0<D.length){this.model.beginUpdate();try{for(var I=0;I<n.length;I++){for(var S=this.getTagsForCell(n[I]),Q=S.split(" "),P=!1,T=0;T<D.length;T++){var X=mxUtils.trim(D[T]);""!=X&&0>mxUtils.indexOf(Q,X)&&(S=0<S.length?S+" "+X:X,P=!0)}P&&this.setAttributeForCell(n[I],
+"tags",S)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(n,D){if(0<n.length&&0<D.length){this.model.beginUpdate();try{for(var I=0;I<n.length;I++){var S=this.getTagsForCell(n[I]);if(0<S.length){for(var Q=S.split(" "),P=!1,T=0;T<D.length;T++){var X=mxUtils.indexOf(Q,D[T]);0<=X&&(Q.splice(X,1),P=!0)}P&&this.setAttributeForCell(n[I],"tags",Q.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(n){this.model.beginUpdate();try{for(var D=0;D<
+n.length;D++)this.model.setVisible(n[D],!this.model.isVisible(n[D]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(n,D){this.model.beginUpdate();try{for(var I=0;I<n.length;I++)this.model.setVisible(n[I],D)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(n,D,I,S){for(var Q=0;Q<n.length;Q++)this.highlightCell(n[Q],D,I,S)};Graph.prototype.highlightCell=function(n,D,I,S,Q){D=null!=D?D:mxConstants.DEFAULT_VALID_COLOR;I=null!=I?I:1E3;n=this.view.getState(n);
+var P=null;null!=n&&(Q=null!=Q?Q:4,Q=Math.max(Q+1,mxUtils.getValue(n.style,mxConstants.STYLE_STROKEWIDTH,1)+Q),P=new mxCellHighlight(this,D,Q,!1),null!=S&&(P.opacity=S),P.highlight(n),window.setTimeout(function(){null!=P.shape&&(mxUtils.setPrefixedStyle(P.shape.node.style,"transition","all 1200ms ease-in-out"),P.shape.node.style.opacity=0);window.setTimeout(function(){P.destroy()},1200)},I));return P};Graph.prototype.addSvgShadow=function(n,D,I,S){I=null!=I?I:!1;S=null!=S?S:!0;var Q=n.ownerDocument,
P=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"filter"):Q.createElement("filter");P.setAttribute("id",this.shadowId);var T=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):Q.createElement("feGaussianBlur");T.setAttribute("in","SourceAlpha");T.setAttribute("stdDeviation",this.svgShadowBlur);T.setAttribute("result","blur");P.appendChild(T);T=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feOffset"):Q.createElement("feOffset");T.setAttribute("in",
"blur");T.setAttribute("dx",this.svgShadowSize);T.setAttribute("dy",this.svgShadowSize);T.setAttribute("result","offsetBlur");P.appendChild(T);T=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feFlood"):Q.createElement("feFlood");T.setAttribute("flood-color",this.svgShadowColor);T.setAttribute("flood-opacity",this.svgShadowOpacity);T.setAttribute("result","offsetColor");P.appendChild(T);T=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feComposite"):Q.createElement("feComposite");
T.setAttribute("in","offsetColor");T.setAttribute("in2","offsetBlur");T.setAttribute("operator","in");T.setAttribute("result","offsetBlur");P.appendChild(T);T=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feBlend"):Q.createElement("feBlend");T.setAttribute("in","SourceGraphic");T.setAttribute("in2","offsetBlur");P.appendChild(T);T=n.getElementsByTagName("defs");0==T.length?(Q=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"defs"):Q.createElement("defs"),null!=n.firstChild?
-n.insertBefore(Q,n.firstChild):n.appendChild(Q)):Q=T[0];Q.appendChild(P);I||(E=null!=E?E:n.getElementsByTagName("g")[0],null!=E&&(E.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(n.getAttribute("width")))&&S&&(n.setAttribute("width",parseInt(n.getAttribute("width"))+6),n.setAttribute("height",parseInt(n.getAttribute("height"))+6),E=n.getAttribute("viewBox"),null!=E&&0<E.length&&(E=E.split(" "),3<E.length&&(w=parseFloat(E[2])+6,h=parseFloat(E[3])+6,n.setAttribute("viewBox",E[0]+" "+
-E[1]+" "+w+" "+h))))));return P};Graph.prototype.setShadowVisible=function(n,E){mxClient.IS_SVG&&!mxClient.IS_SF&&(E=null!=E?E:!0,(this.shadowVisible=n)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),E&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var n=this.model.getChildCount(this.model.root),E=0;do var I=this.model.getChildAt(this.model.root,
-E);while(E++<n&&"1"==mxUtils.getValue(this.getCellStyle(I),"locked","0"));null!=I&&this.setDefaultParent(I)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=
+n.insertBefore(Q,n.firstChild):n.appendChild(Q)):Q=T[0];Q.appendChild(P);I||(D=null!=D?D:n.getElementsByTagName("g")[0],null!=D&&(D.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(n.getAttribute("width")))&&S&&(n.setAttribute("width",parseInt(n.getAttribute("width"))+6),n.setAttribute("height",parseInt(n.getAttribute("height"))+6),D=n.getAttribute("viewBox"),null!=D&&0<D.length&&(D=D.split(" "),3<D.length&&(w=parseFloat(D[2])+6,h=parseFloat(D[3])+6,n.setAttribute("viewBox",D[0]+" "+
+D[1]+" "+w+" "+h))))));return P};Graph.prototype.setShadowVisible=function(n,D){mxClient.IS_SVG&&!mxClient.IS_SF&&(D=null!=D?D:!0,(this.shadowVisible=n)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),D&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=function(){if(null==this.defaultParent){var n=this.model.getChildCount(this.model.root),D=0;do var I=this.model.getChildAt(this.model.root,
+D);while(D++<n&&"1"==mxUtils.getValue(this.getCellStyle(I),"locked","0"));null!=I&&this.setDefaultParent(I)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=
[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",
STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];
mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/basic.xml"];mxStencilRegistry.libraries.ios7icons=[STENCIL_PATH+"/ios7/icons.xml"];
@@ -11681,41 +11681,41 @@ mxStencilRegistry.libraries["mockup/misc"]=[SHAPES_PATH+"/mockup/mxMockupMisc.js
"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=
[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",
STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+
-"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(n){var E=null;null!=n&&0<n.length&&("ER"==n.substring(0,2)?E="mxgraph.er":"sysML"==n.substring(0,5)&&(E="mxgraph.sysml"));return E};var W=mxMarker.createMarker;mxMarker.createMarker=function(n,E,I,S,Q,P,T,Y,ca,ia){if(null!=I&&null==mxMarker.markers[I]){var Z=this.getPackageForType(I);null!=
-Z&&mxStencilRegistry.getStencil(Z)}return W.apply(this,arguments)};var O=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(n,E,I,S,Q,P){"1"==mxUtils.getValue(E.style,"lineShape",null)&&n.setFillColor(mxUtils.getValue(E.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return O.apply(this,arguments)};PrintDialog.prototype.create=function(n,E){function I(){aa.value=Math.max(1,Math.min(Y,Math.max(parseInt(aa.value),parseInt(fa.value))));fa.value=Math.max(1,Math.min(Y,Math.min(parseInt(aa.value),
-parseInt(fa.value))))}function S(xa){function va(Ga,Ha,Oa){var Ra=Ga.useCssTransforms,Ya=Ga.currentTranslate,La=Ga.currentScale,Ta=Ga.view.translate,Ua=Ga.view.scale;Ga.useCssTransforms&&(Ga.useCssTransforms=!1,Ga.currentTranslate=new mxPoint(0,0),Ga.currentScale=1,Ga.view.translate=new mxPoint(0,0),Ga.view.scale=1);var Za=Ga.getGraphBounds(),Wa=0,bb=0,Va=ea.get(),ab=1/Ga.pageScale,$a=ua.checked;if($a){ab=parseInt(ya.value);var hb=parseInt(pa.value);ab=Math.min(Va.height*hb/(Za.height/Ga.view.scale),
-Va.width*ab/(Za.width/Ga.view.scale))}else ab=parseInt(Ba.value)/(100*Ga.pageScale),isNaN(ab)&&(qa=1/Ga.pageScale,Ba.value="100 %");Va=mxRectangle.fromRectangle(Va);Va.width=Math.ceil(Va.width*qa);Va.height=Math.ceil(Va.height*qa);ab*=qa;!$a&&Ga.pageVisible?(Za=Ga.getPageLayout(),Wa-=Za.x*Va.width,bb-=Za.y*Va.height):$a=!0;if(null==Ha){Ha=PrintDialog.createPrintPreview(Ga,ab,Va,0,Wa,bb,$a);Ha.pageSelector=!1;Ha.mathEnabled=!1;wa.checked&&(Ha.isCellVisible=function(Xa){return Ga.isCellSelected(Xa)});
-Wa=n.getCurrentFile();null!=Wa&&(Ha.title=Wa.getTitle());var ib=Ha.writeHead;Ha.writeHead=function(Xa){ib.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)Xa.writeln('<style type="text/css">'),Xa.writeln(Editor.mathJaxWebkitCss),Xa.writeln("</style>");mxClient.IS_GC&&(Xa.writeln('<style type="text/css">'),Xa.writeln("@media print {"),Xa.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),Xa.writeln("}"),Xa.writeln("</style>"));null!=n.editor.fontCss&&(Xa.writeln('<style type="text/css">'),
-Xa.writeln(n.editor.fontCss),Xa.writeln("</style>"));for(var db=Ga.getCustomFonts(),cb=0;cb<db.length;cb++){var fb=db[cb].name,eb=db[cb].url;Graph.isCssFontUrl(eb)?Xa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(eb)+'" charset="UTF-8" type="text/css">'):(Xa.writeln('<style type="text/css">'),Xa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fb)+'";\nsrc: url("'+mxUtils.htmlEntities(eb)+'");\n}'),Xa.writeln("</style>"))}};if("undefined"!==typeof MathJax){var jb=Ha.renderPage;
-Ha.renderPage=function(Xa,db,cb,fb,eb,lb){var kb=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!n.editor.useForeignObjectForMath?!0:n.editor.originalNoForeignObject;var gb=jb.apply(this,arguments);mxClient.NO_FO=kb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:gb.className="geDisableMathJax";return gb}}Wa=null;bb=Q.shapeForegroundColor;$a=Q.shapeBackgroundColor;Va=Q.enableFlowAnimation;Q.enableFlowAnimation=!1;null!=Q.themes&&"darkTheme"==Q.defaultThemeName&&(Wa=Q.stylesheet,
-Q.stylesheet=Q.getDefaultStylesheet(),Q.shapeForegroundColor="#000000",Q.shapeBackgroundColor="#ffffff",Q.refresh());Ha.open(null,null,Oa,!0);Q.enableFlowAnimation=Va;null!=Wa&&(Q.shapeForegroundColor=bb,Q.shapeBackgroundColor=$a,Q.stylesheet=Wa,Q.refresh())}else{Va=Ga.background;if(null==Va||""==Va||Va==mxConstants.NONE)Va="#ffffff";Ha.backgroundColor=Va;Ha.autoOrigin=$a;Ha.appendGraph(Ga,ab,Wa,bb,Oa,!0);Oa=Ga.getCustomFonts();if(null!=Ha.wnd)for(Wa=0;Wa<Oa.length;Wa++)bb=Oa[Wa].name,$a=Oa[Wa].url,
-Graph.isCssFontUrl($a)?Ha.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities($a)+'" charset="UTF-8" type="text/css">'):(Ha.wnd.document.writeln('<style type="text/css">'),Ha.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(bb)+'";\nsrc: url("'+mxUtils.htmlEntities($a)+'");\n}'),Ha.wnd.document.writeln("</style>"))}Ra&&(Ga.useCssTransforms=Ra,Ga.currentTranslate=Ya,Ga.currentScale=La,Ga.view.translate=Ta,Ga.view.scale=Ua);return Ha}var qa=parseInt(ra.value)/
-100;isNaN(qa)&&(qa=1,ra.value="100 %");qa*=.75;var ta=null,ja=Q.shapeForegroundColor,oa=Q.shapeBackgroundColor;null!=Q.themes&&"darkTheme"==Q.defaultThemeName&&(ta=Q.stylesheet,Q.stylesheet=Q.getDefaultStylesheet(),Q.shapeForegroundColor="#000000",Q.shapeBackgroundColor="#ffffff",Q.refresh());var ba=fa.value,da=aa.value,na=!ia.checked,ka=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(n,ia.checked,ba,da,ua.checked,ya.value,pa.value,parseInt(Ba.value)/100,parseInt(ra.value)/100,ea.get());
-else{na&&(na=wa.checked||ba==ca&&da==ca);if(!na&&null!=n.pages&&n.pages.length){var ma=0;na=n.pages.length-1;ia.checked||(ma=parseInt(ba)-1,na=parseInt(da)-1);for(var sa=ma;sa<=na;sa++){var ha=n.pages[sa];ba=ha==n.currentPage?Q:null;if(null==ba){ba=n.createTemporaryGraph(Q.stylesheet);ba.shapeForegroundColor=Q.shapeForegroundColor;ba.shapeBackgroundColor=Q.shapeBackgroundColor;da=!0;ma=!1;var Ma=null,Ja=null;null==ha.viewState&&null==ha.root&&n.updatePageRoot(ha);null!=ha.viewState&&(da=ha.viewState.pageVisible,
-ma=ha.viewState.mathEnabled,Ma=ha.viewState.background,Ja=ha.viewState.backgroundImage,ba.extFonts=ha.viewState.extFonts);null!=Ja&&null!=Ja.originalSrc&&(Ja=n.createImageForPageLink(Ja.originalSrc,ha));ba.background=Ma;ba.backgroundImage=null!=Ja?new mxImage(Ja.src,Ja.width,Ja.height,Ja.x,Ja.y):null;ba.pageVisible=da;ba.mathEnabled=ma;var Pa=ba.getGraphBounds;ba.getGraphBounds=function(){var Ga=Pa.apply(this,arguments),Ha=this.backgroundImage;if(null!=Ha&&null!=Ha.width&&null!=Ha.height){var Oa=
-this.view.translate,Ra=this.view.scale;Ga=mxRectangle.fromRectangle(Ga);Ga.add(new mxRectangle((Oa.x+Ha.x)*Ra,(Oa.y+Ha.y)*Ra,Ha.width*Ra,Ha.height*Ra))}return Ga};var Sa=ba.getGlobalVariable;ba.getGlobalVariable=function(Ga){return"page"==Ga?ha.getName():"pagenumber"==Ga?sa+1:"pagecount"==Ga?null!=n.pages?n.pages.length:1:Sa.apply(this,arguments)};document.body.appendChild(ba.container);n.updatePageRoot(ha);ba.model.setRoot(ha.root)}ka=va(ba,ka,sa!=na);ba!=Q&&ba.container.parentNode.removeChild(ba.container)}}else ka=
-va(Q);null==ka?n.handleError({message:mxResources.get("errorUpdatingPreview")}):(ka.mathEnabled&&(na=ka.wnd.document,xa&&(ka.wnd.IMMEDIATE_PRINT=!0),na.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),ka.closeDocument(),!ka.mathEnabled&&xa&&PrintDialog.printPreview(ka));null!=ta&&(Q.shapeForegroundColor=ja,Q.shapeBackgroundColor=oa,Q.stylesheet=ta,Q.refresh())}}var Q=n.editor.graph,P=document.createElement("div"),T=document.createElement("h3");T.style.width=
-"100%";T.style.textAlign="center";T.style.marginTop="0px";mxUtils.write(T,E||mxResources.get("print"));P.appendChild(T);var Y=1,ca=1;T=document.createElement("div");T.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ia=document.createElement("input");ia.style.cssText="margin-right:8px;margin-bottom:8px;";ia.setAttribute("value","all");ia.setAttribute("type","radio");ia.setAttribute("name","pages-printdialog");T.appendChild(ia);E=document.createElement("span");
-mxUtils.write(E,mxResources.get("printAllPages"));T.appendChild(E);mxUtils.br(T);var Z=ia.cloneNode(!0);ia.setAttribute("checked","checked");Z.setAttribute("value","range");T.appendChild(Z);E=document.createElement("span");mxUtils.write(E,mxResources.get("pages")+":");T.appendChild(E);var fa=document.createElement("input");fa.style.cssText="margin:0 8px 0 8px;";fa.setAttribute("value","1");fa.setAttribute("type","number");fa.setAttribute("min","1");fa.style.width="50px";T.appendChild(fa);E=document.createElement("span");
-mxUtils.write(E,mxResources.get("to"));T.appendChild(E);var aa=fa.cloneNode(!0);T.appendChild(aa);mxEvent.addListener(fa,"focus",function(){Z.checked=!0});mxEvent.addListener(aa,"focus",function(){Z.checked=!0});mxEvent.addListener(fa,"change",I);mxEvent.addListener(aa,"change",I);if(null!=n.pages&&(Y=n.pages.length,null!=n.currentPage))for(E=0;E<n.pages.length;E++)if(n.currentPage==n.pages[E]){ca=E+1;fa.value=ca;aa.value=ca;break}fa.setAttribute("max",Y);aa.setAttribute("max",Y);n.isPagesEnabled()?
-1<Y&&(P.appendChild(T),Z.checked=!0):Z.checked=!0;mxUtils.br(T);var wa=document.createElement("input");wa.setAttribute("value","all");wa.setAttribute("type","radio");wa.style.marginRight="8px";Q.isSelectionEmpty()&&wa.setAttribute("disabled","disabled");var la=document.createElement("div");la.style.marginBottom="10px";1==Y?(wa.setAttribute("type","checkbox"),wa.style.marginBottom="12px",la.appendChild(wa)):(wa.setAttribute("name","pages-printdialog"),wa.style.marginBottom="8px",T.appendChild(wa));
-E=document.createElement("span");mxUtils.write(E,mxResources.get("selectionOnly"));wa.parentNode.appendChild(E);1==Y&&mxUtils.br(wa.parentNode);var za=document.createElement("input");za.style.marginRight="8px";za.setAttribute("value","adjust");za.setAttribute("type","radio");za.setAttribute("name","printZoom");la.appendChild(za);E=document.createElement("span");mxUtils.write(E,mxResources.get("adjustTo"));la.appendChild(E);var Ba=document.createElement("input");Ba.style.cssText="margin:0 8px 0 8px;";
-Ba.setAttribute("value","100 %");Ba.style.width="50px";la.appendChild(Ba);mxEvent.addListener(Ba,"focus",function(){za.checked=!0});P.appendChild(la);T=T.cloneNode(!1);var ua=za.cloneNode(!0);ua.setAttribute("value","fit");za.setAttribute("checked","checked");E=document.createElement("div");E.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";E.appendChild(ua);T.appendChild(E);la=document.createElement("table");la.style.display="inline-block";var Da=document.createElement("tbody"),
-Fa=document.createElement("tr"),Ka=Fa.cloneNode(!0),Qa=document.createElement("td"),Ia=Qa.cloneNode(!0),Ea=Qa.cloneNode(!0),Ca=Qa.cloneNode(!0),Na=Qa.cloneNode(!0),Aa=Qa.cloneNode(!0);Qa.style.textAlign="right";Ca.style.textAlign="right";mxUtils.write(Qa,mxResources.get("fitTo"));var ya=document.createElement("input");ya.style.cssText="margin:0 8px 0 8px;";ya.setAttribute("value","1");ya.setAttribute("min","1");ya.setAttribute("type","number");ya.style.width="40px";Ia.appendChild(ya);E=document.createElement("span");
-mxUtils.write(E,mxResources.get("fitToSheetsAcross"));Ea.appendChild(E);mxUtils.write(Ca,mxResources.get("fitToBy"));var pa=ya.cloneNode(!0);Na.appendChild(pa);mxEvent.addListener(ya,"focus",function(){ua.checked=!0});mxEvent.addListener(pa,"focus",function(){ua.checked=!0});E=document.createElement("span");mxUtils.write(E,mxResources.get("fitToSheetsDown"));Aa.appendChild(E);Fa.appendChild(Qa);Fa.appendChild(Ia);Fa.appendChild(Ea);Ka.appendChild(Ca);Ka.appendChild(Na);Ka.appendChild(Aa);Da.appendChild(Fa);
-Da.appendChild(Ka);la.appendChild(Da);T.appendChild(la);P.appendChild(T);T=document.createElement("div");E=document.createElement("div");E.style.fontWeight="bold";E.style.marginBottom="12px";mxUtils.write(E,mxResources.get("paperSize"));T.appendChild(E);E=document.createElement("div");E.style.marginBottom="12px";var ea=PageSetupDialog.addPageFormatPanel(E,"printdialog",n.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);T.appendChild(E);E=document.createElement("span");mxUtils.write(E,
-mxResources.get("pageScale"));T.appendChild(E);var ra=document.createElement("input");ra.style.cssText="margin:0 8px 0 8px;";ra.setAttribute("value","100 %");ra.style.width="60px";T.appendChild(ra);P.appendChild(T);E=document.createElement("div");E.style.cssText="text-align:right;margin:48px 0 0 0;";T=mxUtils.button(mxResources.get("cancel"),function(){n.hideDialog()});T.className="geBtn";n.editor.cancelFirst&&E.appendChild(T);n.isOffline()||(la=mxUtils.button(mxResources.get("help"),function(){Q.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
-la.className="geBtn",E.appendChild(la));PrintDialog.previewEnabled&&(la=mxUtils.button(mxResources.get("preview"),function(){n.hideDialog();S(!1)}),la.className="geBtn",E.appendChild(la));la=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){n.hideDialog();S(!0)});la.className="geBtn gePrimaryBtn";E.appendChild(la);n.editor.cancelFirst||E.appendChild(T);P.appendChild(E);this.container=P};var V=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(n){var D=null;null!=n&&0<n.length&&("ER"==n.substring(0,2)?D="mxgraph.er":"sysML"==n.substring(0,5)&&(D="mxgraph.sysml"));return D};var W=mxMarker.createMarker;mxMarker.createMarker=function(n,D,I,S,Q,P,T,X,ba,ja){if(null!=I&&null==mxMarker.markers[I]){var Z=this.getPackageForType(I);null!=
+Z&&mxStencilRegistry.getStencil(Z)}return W.apply(this,arguments)};var O=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(n,D,I,S,Q,P){"1"==mxUtils.getValue(D.style,"lineShape",null)&&n.setFillColor(mxUtils.getValue(D.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return O.apply(this,arguments)};PrintDialog.prototype.create=function(n,D){function I(){da.value=Math.max(1,Math.min(X,Math.max(parseInt(da.value),parseInt(ka.value))));ka.value=Math.max(1,Math.min(X,Math.min(parseInt(da.value),
+parseInt(ka.value))))}function S(xa){function wa(Ca,La,Oa){var Qa=Ca.useCssTransforms,Ya=Ca.currentTranslate,Na=Ca.currentScale,Ta=Ca.view.translate,Ua=Ca.view.scale;Ca.useCssTransforms&&(Ca.useCssTransforms=!1,Ca.currentTranslate=new mxPoint(0,0),Ca.currentScale=1,Ca.view.translate=new mxPoint(0,0),Ca.view.scale=1);var Za=Ca.getGraphBounds(),Wa=0,bb=0,Va=ea.get(),ab=1/Ca.pageScale,$a=Ha.checked;if($a){ab=parseInt(za.value);var hb=parseInt(pa.value);ab=Math.min(Va.height*hb/(Za.height/Ca.view.scale),
+Va.width*ab/(Za.width/Ca.view.scale))}else ab=parseInt(Ba.value)/(100*Ca.pageScale),isNaN(ab)&&(ua=1/Ca.pageScale,Ba.value="100 %");Va=mxRectangle.fromRectangle(Va);Va.width=Math.ceil(Va.width*ua);Va.height=Math.ceil(Va.height*ua);ab*=ua;!$a&&Ca.pageVisible?(Za=Ca.getPageLayout(),Wa-=Za.x*Va.width,bb-=Za.y*Va.height):$a=!0;if(null==La){La=PrintDialog.createPrintPreview(Ca,ab,Va,0,Wa,bb,$a);La.pageSelector=!1;La.mathEnabled=!1;fa.checked&&(La.isCellVisible=function(Xa){return Ca.isCellSelected(Xa)});
+Wa=n.getCurrentFile();null!=Wa&&(La.title=Wa.getTitle());var ib=La.writeHead;La.writeHead=function(Xa){ib.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)Xa.writeln('<style type="text/css">'),Xa.writeln(Editor.mathJaxWebkitCss),Xa.writeln("</style>");mxClient.IS_GC&&(Xa.writeln('<style type="text/css">'),Xa.writeln("@media print {"),Xa.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),Xa.writeln("}"),Xa.writeln("</style>"));null!=n.editor.fontCss&&(Xa.writeln('<style type="text/css">'),
+Xa.writeln(n.editor.fontCss),Xa.writeln("</style>"));for(var db=Ca.getCustomFonts(),cb=0;cb<db.length;cb++){var fb=db[cb].name,eb=db[cb].url;Graph.isCssFontUrl(eb)?Xa.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(eb)+'" charset="UTF-8" type="text/css">'):(Xa.writeln('<style type="text/css">'),Xa.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(fb)+'";\nsrc: url("'+mxUtils.htmlEntities(eb)+'");\n}'),Xa.writeln("</style>"))}};if("undefined"!==typeof MathJax){var jb=La.renderPage;
+La.renderPage=function(Xa,db,cb,fb,eb,lb){var kb=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!n.editor.useForeignObjectForMath?!0:n.editor.originalNoForeignObject;var gb=jb.apply(this,arguments);mxClient.NO_FO=kb;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:gb.className="geDisableMathJax";return gb}}Wa=null;bb=Q.shapeForegroundColor;$a=Q.shapeBackgroundColor;Va=Q.enableFlowAnimation;Q.enableFlowAnimation=!1;null!=Q.themes&&"darkTheme"==Q.defaultThemeName&&(Wa=Q.stylesheet,
+Q.stylesheet=Q.getDefaultStylesheet(),Q.shapeForegroundColor="#000000",Q.shapeBackgroundColor="#ffffff",Q.refresh());La.open(null,null,Oa,!0);Q.enableFlowAnimation=Va;null!=Wa&&(Q.shapeForegroundColor=bb,Q.shapeBackgroundColor=$a,Q.stylesheet=Wa,Q.refresh())}else{Va=Ca.background;if(null==Va||""==Va||Va==mxConstants.NONE)Va="#ffffff";La.backgroundColor=Va;La.autoOrigin=$a;La.appendGraph(Ca,ab,Wa,bb,Oa,!0);Oa=Ca.getCustomFonts();if(null!=La.wnd)for(Wa=0;Wa<Oa.length;Wa++)bb=Oa[Wa].name,$a=Oa[Wa].url,
+Graph.isCssFontUrl($a)?La.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities($a)+'" charset="UTF-8" type="text/css">'):(La.wnd.document.writeln('<style type="text/css">'),La.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(bb)+'";\nsrc: url("'+mxUtils.htmlEntities($a)+'");\n}'),La.wnd.document.writeln("</style>"))}Qa&&(Ca.useCssTransforms=Qa,Ca.currentTranslate=Ya,Ca.currentScale=Na,Ca.view.translate=Ta,Ca.view.scale=Ua);return La}var ua=parseInt(ta.value)/
+100;isNaN(ua)&&(ua=1,ta.value="100 %");ua*=.75;var va=null,ha=Q.shapeForegroundColor,qa=Q.shapeBackgroundColor;null!=Q.themes&&"darkTheme"==Q.defaultThemeName&&(va=Q.stylesheet,Q.stylesheet=Q.getDefaultStylesheet(),Q.shapeForegroundColor="#000000",Q.shapeBackgroundColor="#ffffff",Q.refresh());var aa=ka.value,ca=da.value,na=!ja.checked,la=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(n,ja.checked,aa,ca,Ha.checked,za.value,pa.value,parseInt(Ba.value)/100,parseInt(ta.value)/100,ea.get());
+else{na&&(na=fa.checked||aa==ba&&ca==ba);if(!na&&null!=n.pages&&n.pages.length){var oa=0;na=n.pages.length-1;ja.checked||(oa=parseInt(aa)-1,na=parseInt(ca)-1);for(var ra=oa;ra<=na;ra++){var ia=n.pages[ra];aa=ia==n.currentPage?Q:null;if(null==aa){aa=n.createTemporaryGraph(Q.stylesheet);aa.shapeForegroundColor=Q.shapeForegroundColor;aa.shapeBackgroundColor=Q.shapeBackgroundColor;ca=!0;oa=!1;var Da=null,Ja=null;null==ia.viewState&&null==ia.root&&n.updatePageRoot(ia);null!=ia.viewState&&(ca=ia.viewState.pageVisible,
+oa=ia.viewState.mathEnabled,Da=ia.viewState.background,Ja=ia.viewState.backgroundImage,aa.extFonts=ia.viewState.extFonts);null!=Ja&&null!=Ja.originalSrc&&(Ja=n.createImageForPageLink(Ja.originalSrc,ia));aa.background=Da;aa.backgroundImage=null!=Ja?new mxImage(Ja.src,Ja.width,Ja.height,Ja.x,Ja.y):null;aa.pageVisible=ca;aa.mathEnabled=oa;var Sa=aa.getGraphBounds;aa.getGraphBounds=function(){var Ca=Sa.apply(this,arguments),La=this.backgroundImage;if(null!=La&&null!=La.width&&null!=La.height){var Oa=
+this.view.translate,Qa=this.view.scale;Ca=mxRectangle.fromRectangle(Ca);Ca.add(new mxRectangle((Oa.x+La.x)*Qa,(Oa.y+La.y)*Qa,La.width*Qa,La.height*Qa))}return Ca};var Ra=aa.getGlobalVariable;aa.getGlobalVariable=function(Ca){return"page"==Ca?ia.getName():"pagenumber"==Ca?ra+1:"pagecount"==Ca?null!=n.pages?n.pages.length:1:Ra.apply(this,arguments)};document.body.appendChild(aa.container);n.updatePageRoot(ia);aa.model.setRoot(ia.root)}la=wa(aa,la,ra!=na);aa!=Q&&aa.container.parentNode.removeChild(aa.container)}}else la=
+wa(Q);null==la?n.handleError({message:mxResources.get("errorUpdatingPreview")}):(la.mathEnabled&&(na=la.wnd.document,xa&&(la.wnd.IMMEDIATE_PRINT=!0),na.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),la.closeDocument(),!la.mathEnabled&&xa&&PrintDialog.printPreview(la));null!=va&&(Q.shapeForegroundColor=ha,Q.shapeBackgroundColor=qa,Q.stylesheet=va,Q.refresh())}}var Q=n.editor.graph,P=document.createElement("div"),T=document.createElement("h3");T.style.width=
+"100%";T.style.textAlign="center";T.style.marginTop="0px";mxUtils.write(T,D||mxResources.get("print"));P.appendChild(T);var X=1,ba=1;T=document.createElement("div");T.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ja=document.createElement("input");ja.style.cssText="margin-right:8px;margin-bottom:8px;";ja.setAttribute("value","all");ja.setAttribute("type","radio");ja.setAttribute("name","pages-printdialog");T.appendChild(ja);D=document.createElement("span");
+mxUtils.write(D,mxResources.get("printAllPages"));T.appendChild(D);mxUtils.br(T);var Z=ja.cloneNode(!0);ja.setAttribute("checked","checked");Z.setAttribute("value","range");T.appendChild(Z);D=document.createElement("span");mxUtils.write(D,mxResources.get("pages")+":");T.appendChild(D);var ka=document.createElement("input");ka.style.cssText="margin:0 8px 0 8px;";ka.setAttribute("value","1");ka.setAttribute("type","number");ka.setAttribute("min","1");ka.style.width="50px";T.appendChild(ka);D=document.createElement("span");
+mxUtils.write(D,mxResources.get("to"));T.appendChild(D);var da=ka.cloneNode(!0);T.appendChild(da);mxEvent.addListener(ka,"focus",function(){Z.checked=!0});mxEvent.addListener(da,"focus",function(){Z.checked=!0});mxEvent.addListener(ka,"change",I);mxEvent.addListener(da,"change",I);if(null!=n.pages&&(X=n.pages.length,null!=n.currentPage))for(D=0;D<n.pages.length;D++)if(n.currentPage==n.pages[D]){ba=D+1;ka.value=ba;da.value=ba;break}ka.setAttribute("max",X);da.setAttribute("max",X);n.isPagesEnabled()?
+1<X&&(P.appendChild(T),Z.checked=!0):Z.checked=!0;mxUtils.br(T);var fa=document.createElement("input");fa.setAttribute("value","all");fa.setAttribute("type","radio");fa.style.marginRight="8px";Q.isSelectionEmpty()&&fa.setAttribute("disabled","disabled");var ma=document.createElement("div");ma.style.marginBottom="10px";1==X?(fa.setAttribute("type","checkbox"),fa.style.marginBottom="12px",ma.appendChild(fa)):(fa.setAttribute("name","pages-printdialog"),fa.style.marginBottom="8px",T.appendChild(fa));
+D=document.createElement("span");mxUtils.write(D,mxResources.get("selectionOnly"));fa.parentNode.appendChild(D);1==X&&mxUtils.br(fa.parentNode);var ya=document.createElement("input");ya.style.marginRight="8px";ya.setAttribute("value","adjust");ya.setAttribute("type","radio");ya.setAttribute("name","printZoom");ma.appendChild(ya);D=document.createElement("span");mxUtils.write(D,mxResources.get("adjustTo"));ma.appendChild(D);var Ba=document.createElement("input");Ba.style.cssText="margin:0 8px 0 8px;";
+Ba.setAttribute("value","100 %");Ba.style.width="50px";ma.appendChild(Ba);mxEvent.addListener(Ba,"focus",function(){ya.checked=!0});P.appendChild(ma);T=T.cloneNode(!1);var Ha=ya.cloneNode(!0);Ha.setAttribute("value","fit");ya.setAttribute("checked","checked");D=document.createElement("div");D.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";D.appendChild(Ha);T.appendChild(D);ma=document.createElement("table");ma.style.display="inline-block";var sa=document.createElement("tbody"),
+Ga=document.createElement("tr"),Ka=Ga.cloneNode(!0),Ma=document.createElement("td"),Ia=Ma.cloneNode(!0),Ea=Ma.cloneNode(!0),Fa=Ma.cloneNode(!0),Pa=Ma.cloneNode(!0),Aa=Ma.cloneNode(!0);Ma.style.textAlign="right";Fa.style.textAlign="right";mxUtils.write(Ma,mxResources.get("fitTo"));var za=document.createElement("input");za.style.cssText="margin:0 8px 0 8px;";za.setAttribute("value","1");za.setAttribute("min","1");za.setAttribute("type","number");za.style.width="40px";Ia.appendChild(za);D=document.createElement("span");
+mxUtils.write(D,mxResources.get("fitToSheetsAcross"));Ea.appendChild(D);mxUtils.write(Fa,mxResources.get("fitToBy"));var pa=za.cloneNode(!0);Pa.appendChild(pa);mxEvent.addListener(za,"focus",function(){Ha.checked=!0});mxEvent.addListener(pa,"focus",function(){Ha.checked=!0});D=document.createElement("span");mxUtils.write(D,mxResources.get("fitToSheetsDown"));Aa.appendChild(D);Ga.appendChild(Ma);Ga.appendChild(Ia);Ga.appendChild(Ea);Ka.appendChild(Fa);Ka.appendChild(Pa);Ka.appendChild(Aa);sa.appendChild(Ga);
+sa.appendChild(Ka);ma.appendChild(sa);T.appendChild(ma);P.appendChild(T);T=document.createElement("div");D=document.createElement("div");D.style.fontWeight="bold";D.style.marginBottom="12px";mxUtils.write(D,mxResources.get("paperSize"));T.appendChild(D);D=document.createElement("div");D.style.marginBottom="12px";var ea=PageSetupDialog.addPageFormatPanel(D,"printdialog",n.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);T.appendChild(D);D=document.createElement("span");mxUtils.write(D,
+mxResources.get("pageScale"));T.appendChild(D);var ta=document.createElement("input");ta.style.cssText="margin:0 8px 0 8px;";ta.setAttribute("value","100 %");ta.style.width="60px";T.appendChild(ta);P.appendChild(T);D=document.createElement("div");D.style.cssText="text-align:right;margin:48px 0 0 0;";T=mxUtils.button(mxResources.get("cancel"),function(){n.hideDialog()});T.className="geBtn";n.editor.cancelFirst&&D.appendChild(T);n.isOffline()||(ma=mxUtils.button(mxResources.get("help"),function(){Q.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
+ma.className="geBtn",D.appendChild(ma));PrintDialog.previewEnabled&&(ma=mxUtils.button(mxResources.get("preview"),function(){n.hideDialog();S(!1)}),ma.className="geBtn",D.appendChild(ma));ma=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){n.hideDialog();S(!0)});ma.className="geBtn gePrimaryBtn";D.appendChild(ma);n.editor.cancelFirst||D.appendChild(T);P.appendChild(D);this.container=P};var V=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var n=this.image;null!=n&&null!=n.src&&Graph.isPageLink(n.src)&&(n={originalSrc:n.src});this.page.viewState.backgroundImage=n}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=
-this.shadowVisible)}}else V.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var U=document.createElement("canvas"),X=new Image;X.onload=function(){try{U.getContext("2d").drawImage(X,
-0,0);var n=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=n&&6<n.length}catch(E){}};X.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}})();
+this.shadowVisible)}}else V.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var U=document.createElement("canvas"),Y=new Image;Y.onload=function(){try{U.getContext("2d").drawImage(Y,
+0,0);var n=U.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=n&&6<n.length}catch(D){}};Y.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(n){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};b.afterDecode=function(f,l,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.2.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="19.0.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(c,e,g,k,m,p,v){p=null!=p?p:0<=c.indexOf("NetworkError")||0<=c.indexOf("SecurityError")||0<=c.indexOf("NS_ERROR_FAILURE")||0<=c.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
"1"!=urlParams.dev)try{if(c!=EditorUi.lastErrorMessage&&(null==c||null==e||-1==c.indexOf("Script error")&&-1==c.indexOf("extension"))&&null!=c&&0>c.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=c;var x=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";m=null!=m?m:Error(c);(new Image).src=x+"/log?severity="+p+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(c)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=k?":colno:"+
-encodeURIComponent(k):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}}catch(A){}try{v||null==window.console||console.error(p,c,e,g,k,m)}catch(A){}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(g){}};EditorUi.sendReport=
+encodeURIComponent(k):"")+(null!=m&&null!=m.stack?"&stack="+encodeURIComponent(m.stack):"")}}catch(z){}try{v||null==window.console||console.error(p,c,e,g,k,m)}catch(z){}};EditorUi.logEvent=function(c){if("1"==urlParams.dev)EditorUi.debug("logEvent",c);else if(EditorUi.enableLogging)try{var e=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=e+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=c?"&data="+encodeURIComponent(JSON.stringify(c)):"")}catch(g){}};EditorUi.sendReport=
function(c,e){if("1"==urlParams.dev)EditorUi.debug("sendReport",c);else if(EditorUi.enableLogging)try{e=null!=e?e:5E4,c.length>e&&(c=c.substring(0,e)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(c))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var c=[(new Date).toISOString()],e=0;e<arguments.length;e++)c.push(arguments[e]);console.log.apply(console,
c)}}catch(g){}};EditorUi.removeChildNodes=function(c){for(;null!=c.firstChild;)c.removeChild(c.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
@@ -11724,9 +11724,9 @@ e.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=m&&6<m.leng
EditorUi.prototype.jpgSupported=null!==k.match("image/jpeg")}catch(m){}})();EditorUi.prototype.openLink=function(c,e,g){return this.editor.graph.openLink(c,e,g)};EditorUi.prototype.showSplash=function(c){};EditorUi.prototype.getLocalData=function(c,e){e(localStorage.getItem(c))};EditorUi.prototype.setLocalData=function(c,e,g){localStorage.setItem(c,e);null!=g&&g()};EditorUi.prototype.removeLocalData=function(c,e){localStorage.removeItem(c);e()};EditorUi.prototype.setShareCursorPosition=function(c){this.shareCursorPosition=
c;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(c){this.showRemoteCursors=c;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(c){this.editor.graph.mathEnabled=c;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=c;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(c){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(c){return this.isOfflineApp()||!navigator.onLine||!c&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(c,e,g){var k=null==c||null==e;g=null!=g?g:24;var m=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),p=m.spin;m.spin=function(x,A){var y=!1;this.active||(p.call(this,x),this.active=!0,null!=A&&(k&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),y=document.createElement("div"),
+EditorUi.prototype.createSpinner=function(c,e,g){var k=null==c||null==e;g=null!=g?g:24;var m=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),p=m.spin;m.spin=function(x,z){var y=!1;this.active||(p.call(this,x),this.active=!0,null!=z&&(k&&(e=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,c=document.body.clientWidth/2-2),y=document.createElement("div"),
y.style.position="absolute",y.style.whiteSpace="nowrap",y.style.background="#4B4243",y.style.color="white",y.style.fontFamily=Editor.defaultHtmlFont,y.style.fontSize="9pt",y.style.padding="6px",y.style.paddingLeft="10px",y.style.paddingRight="10px",y.style.zIndex=2E9,y.style.left=Math.max(0,c)+"px",y.style.top=Math.max(0,e+70)+"px",mxUtils.setPrefixedStyle(y.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(y.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(y.style,
-"boxShadow","2px 2px 3px 0px #ddd"),"..."!=A.substring(A.length-3,A.length)&&"!"!=A.charAt(A.length-1)&&(A+="..."),y.innerHTML=A,x.appendChild(y),m.status=y),this.pause=mxUtils.bind(this,function(){var L=function(){};this.active&&(L=mxUtils.bind(this,function(){this.spin(x,A)}));this.stop();return L}),y=!0);return y};var v=m.stop;m.stop=function(){v.call(this);this.active=!1;null!=m.status&&null!=m.status.parentNode&&m.status.parentNode.removeChild(m.status);m.status=null};m.pause=function(){return function(){}};
+"boxShadow","2px 2px 3px 0px #ddd"),"..."!=z.substring(z.length-3,z.length)&&"!"!=z.charAt(z.length-1)&&(z+="..."),y.innerHTML=z,x.appendChild(y),m.status=y),this.pause=mxUtils.bind(this,function(){var L=function(){};this.active&&(L=mxUtils.bind(this,function(){this.spin(x,z)}));this.stop();return L}),y=!0);return y};var v=m.stop;m.stop=function(){v.call(this);this.active=!1;null!=m.status&&null!=m.status.parentNode&&m.status.parentNode.removeChild(m.status);m.status=null};m.pause=function(){return function(){}};
return m};EditorUi.prototype.isCompatibleString=function(c){try{var e=mxUtils.parseXml(c),g=this.editor.extractGraphModel(e.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(k){}return!1};EditorUi.prototype.isVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&
3==c.charCodeAt(2)&&4==c.charCodeAt(3)||80==c.charCodeAt(0)&&75==c.charCodeAt(1)&&3==c.charCodeAt(2)&&6==c.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(c){return 8<c.length&&(208==c.charCodeAt(0)&&207==c.charCodeAt(1)&&17==c.charCodeAt(2)&&224==c.charCodeAt(3)&&161==c.charCodeAt(4)&&177==c.charCodeAt(5)&&26==c.charCodeAt(6)&&225==c.charCodeAt(7)||60==c.charCodeAt(0)&&63==c.charCodeAt(1)&&120==c.charCodeAt(2)&&109==c.charCodeAt(3)&&108==c.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
EditorUi.prototype.createKeyHandler=function(c){var e=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=e.getFunction,k=this.editor.graph,m=this;e.getFunction=function(p){if(k.isSelectionEmpty()&&null!=m.pages&&0<m.pages.length){var v=m.getSelectedPageIndex();if(mxEvent.isShiftDown(p)){if(37==p.keyCode)return function(){0<v&&m.movePage(v,v-1)};if(38==p.keyCode)return function(){0<v&&m.movePage(v,0)};if(39==p.keyCode)return function(){v<m.pages.length-1&&m.movePage(v,
@@ -11735,11 +11735,11 @@ var f=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGra
p?mxUtils.getXml(p):""}}catch(v){}return e};EditorUi.prototype.validateFileData=function(c){if(null!=c&&0<c.length){var e=c.indexOf('<meta charset="utf-8">');0<=e&&(c=c.slice(0,e)+'<meta charset="utf-8"/>'+c.slice(e+23-1,c.length));c=Graph.zapGremlins(c)}return c};EditorUi.prototype.replaceFileData=function(c){c=this.validateFileData(c);c=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null;var e=null!=c?this.editor.extractGraphModel(c,!0):null;null!=e&&(c=e);if(null!=c){e=this.editor.graph;
e.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,k=c.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<k.length||1==k.length&&k[0].hasAttribute("name")){this.fileNode=c;this.pages=null!=this.pages?this.pages:[];for(var m=k.length-1;0<=m;m--){var p=this.updatePageRoot(new DiagramPage(k[m]));null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[m+1]));e.model.execute(new ChangePage(this,p,0==m?p:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
c.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(c.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),e.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(c),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=g)for(m=0;m<g.length;m++)e.model.execute(new ChangePage(this,g[m],null))}finally{e.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(c,e,g,k,m,p,v,x,A,y,L){e=null!=e?e:this.editor.graph;m=null!=m?m:!1;A=null!=A?A:!0;var N=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var K="_blank";else N=K=k;if(null==c)return"";var q=c;if("mxfile"!=q.nodeName.toLowerCase()){if(L){var C=c.ownerDocument.createElement("diagram");C.setAttribute("id",Editor.guid());C.appendChild(c)}else{C=Graph.zapGremlins(mxUtils.getXml(c));q=Graph.compress(C);if(Graph.decompress(q)!=C)return C;C=c.ownerDocument.createElement("diagram");
+function(c,e,g,k,m,p,v,x,z,y,L){e=null!=e?e:this.editor.graph;m=null!=m?m:!1;z=null!=z?z:!0;var N=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var K="_blank";else N=K=k;if(null==c)return"";var q=c;if("mxfile"!=q.nodeName.toLowerCase()){if(L){var C=c.ownerDocument.createElement("diagram");C.setAttribute("id",Editor.guid());C.appendChild(c)}else{C=Graph.zapGremlins(mxUtils.getXml(c));q=Graph.compress(C);if(Graph.decompress(q)!=C)return C;C=c.ownerDocument.createElement("diagram");
C.setAttribute("id",Editor.guid());mxUtils.setTextContent(C,q)}q=c.ownerDocument.createElement("mxfile");q.appendChild(C)}y?(q=q.cloneNode(!0),q.removeAttribute("modified"),q.removeAttribute("host"),q.removeAttribute("agent"),q.removeAttribute("etag"),q.removeAttribute("userAgent"),q.removeAttribute("version"),q.removeAttribute("editor"),q.removeAttribute("type")):(q.removeAttribute("userAgent"),q.removeAttribute("version"),q.removeAttribute("editor"),q.removeAttribute("pages"),q.removeAttribute("type"),
mxClient.IS_CHROMEAPP?q.setAttribute("host","Chrome"):EditorUi.isElectronApp?q.setAttribute("host","Electron"):q.setAttribute("host",window.location.hostname),q.setAttribute("modified",(new Date).toISOString()),q.setAttribute("agent",navigator.appVersion),q.setAttribute("version",EditorUi.VERSION),q.setAttribute("etag",Editor.guid()),c=null!=g?g.getMode():this.mode,null!=c&&q.setAttribute("type",c),1<q.getElementsByTagName("diagram").length&&null!=this.pages&&q.setAttribute("pages",this.pages.length));
-L=L?mxUtils.getPrettyXml(q):mxUtils.getXml(q);if(!p&&!m&&(v||null!=g&&/(\.html)$/i.test(g.getTitle())))L=this.getHtml2(mxUtils.getXml(q),e,null!=g?g.getTitle():null,K,N);else if(p||!m&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(k=null),L=this.getEmbeddedSvg(L,e,k,null,x,A,N);return L};EditorUi.prototype.getXmlFileData=function(c,e,g,k){c=null!=c?c:!0;e=null!=e?e:!1;g=null!=g?g:!Editor.compressXml;var m=this.editor.getGraphXml(c,k);
-if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(A){var y=A.getElementsByTagName("mxGraphModel");y=0<y.length?y[0]:null;null==y&&g?(y=mxUtils.trim(mxUtils.getTextContent(A)),A=A.cloneNode(!1),0<y.length&&(y=Graph.decompress(y),null!=y&&0<y.length&&A.appendChild(mxUtils.parseXml(y).documentElement))):null==y||g?A=A.cloneNode(!0):(A=A.cloneNode(!1),mxUtils.setTextContent(A,Graph.compressNode(y)));m.appendChild(A)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
+L=L?mxUtils.getPrettyXml(q):mxUtils.getXml(q);if(!p&&!m&&(v||null!=g&&/(\.html)$/i.test(g.getTitle())))L=this.getHtml2(mxUtils.getXml(q),e,null!=g?g.getTitle():null,K,N);else if(p||!m&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(k=null),L=this.getEmbeddedSvg(L,e,k,null,x,z,N);return L};EditorUi.prototype.getXmlFileData=function(c,e,g,k){c=null!=c?c:!0;e=null!=e?e:!1;g=null!=g?g:!Editor.compressXml;var m=this.editor.getGraphXml(c,k);
+if(c&&null!=this.fileNode&&null!=this.currentPage)if(c=function(z){var y=z.getElementsByTagName("mxGraphModel");y=0<y.length?y[0]:null;null==y&&g?(y=mxUtils.trim(mxUtils.getTextContent(z)),z=z.cloneNode(!1),0<y.length&&(y=Graph.decompress(y),null!=y&&0<y.length&&z.appendChild(mxUtils.parseXml(y).documentElement))):null==y||g?z=z.cloneNode(!0):(z=z.cloneNode(!1),mxUtils.setTextContent(z,Graph.compressNode(y)));m.appendChild(z)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
Graph.compressNode(m)),m=this.fileNode.cloneNode(!1),e)c(this.currentPage.node);else for(e=0;e<this.pages.length;e++){var p=this.pages[e],v=p.node;if(p!=this.currentPage)if(p.needsUpdate){var x=new mxCodec(mxUtils.createXmlDocument());x=x.encode(new mxGraphModel(p.root));this.editor.graph.saveViewState(p.viewState,x,null,k);EditorUi.removeChildNodes(v);mxUtils.setTextContent(v,Graph.compressNode(x));delete p.needsUpdate}else k&&(this.updatePageRoot(p),null!=p.viewState.backgroundImage&&(null!=p.viewState.backgroundImage.originalSrc?
p.viewState.backgroundImage=this.createImageForPageLink(p.viewState.backgroundImage.originalSrc,p):Graph.isPageLink(p.viewState.backgroundImage.src)&&(p.viewState.backgroundImage=this.createImageForPageLink(p.viewState.backgroundImage.src,p))),null!=p.viewState.backgroundImage&&null!=p.viewState.backgroundImage.originalSrc&&(x=new mxCodec(mxUtils.createXmlDocument()),x=x.encode(new mxGraphModel(p.root)),this.editor.graph.saveViewState(p.viewState,x,null,k),v=v.cloneNode(!1),mxUtils.setTextContent(v,
Graph.compressNode(x))));c(v)}return m};EditorUi.prototype.anonymizeString=function(c,e){for(var g=[],k=0;k<c.length;k++){var m=c.charAt(k);0<=EditorUi.ignoredAnonymizedChars.indexOf(m)?g.push(m):isNaN(parseInt(m))?m.toLowerCase()!=m?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):m.toUpperCase()!=m?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(m)?g.push(" "):g.push("?"):g.push(e?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=
@@ -11748,10 +11748,10 @@ function(c){if(null!=c[EditorUi.DIFF_INSERT])for(var e=0;e<c[EditorUi.DIFF_INSER
delete c[EditorUi.DIFF_UPDATE][k]}mxUtils.isEmptyObject(c[EditorUi.DIFF_UPDATE])&&delete c[EditorUi.DIFF_UPDATE]}return c};EditorUi.prototype.anonymizeAttributes=function(c,e){if(null!=c.attributes)for(var g=0;g<c.attributes.length;g++)"as"!=c.attributes[g].name&&c.setAttribute(c.attributes[g].name,this.anonymizeString(c.attributes[g].value,e));if(null!=c.childNodes)for(g=0;g<c.childNodes.length;g++)this.anonymizeAttributes(c.childNodes[g],e)};EditorUi.prototype.anonymizeNode=function(c,e){e=c.getElementsByTagName("mxCell");
for(var g=0;g<e.length;g++)null!=e[g].getAttribute("value")&&e[g].setAttribute("value","["+e[g].getAttribute("value").length+"]"),null!=e[g].getAttribute("xmlValue")&&e[g].setAttribute("xmlValue","["+e[g].getAttribute("xmlValue").length+"]"),null!=e[g].getAttribute("style")&&e[g].setAttribute("style","["+e[g].getAttribute("style").length+"]"),null!=e[g].parentNode&&"root"!=e[g].parentNode.nodeName&&null!=e[g].parentNode.parentNode&&(e[g].setAttribute("id",e[g].parentNode.getAttribute("id")),e[g].parentNode.parentNode.replaceChild(e[g],
e[g].parentNode));return c};EditorUi.prototype.synchronizeCurrentFile=function(c){var e=this.getCurrentFile();null!=e&&(e.savingFile?this.handleError({message:mxResources.get("busy")}):!c&&e.invalidChecksum?e.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(e.clearAutosave(),this.editor.setStatus(""),c?e.reloadFile(mxUtils.bind(this,function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)})):e.synchronizeFile(mxUtils.bind(this,
-function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(c,e,g,k,m,p,v,x,A,y,L){m=null!=m?m:!0;p=null!=p?p:!1;var N=this.editor.graph;if(e||!c&&null!=A&&/(\.svg)$/i.test(A.getTitle())){var K=null!=N.themes&&"darkTheme"==N.defaultThemeName;y=!1;if(K||null!=this.pages&&this.currentPage!=this.pages[0]){var q=N.getGlobalVariable;N=this.createTemporaryGraph(K?N.getDefaultStylesheet():N.getStylesheet());
-N.setBackgroundImage=this.editor.graph.setBackgroundImage;N.background=this.editor.graph.background;var C=this.pages[0];this.currentPage==C?N.setBackgroundImage(this.editor.graph.backgroundImage):null!=C.viewState&&null!=C.viewState&&N.setBackgroundImage(C.viewState.backgroundImage);N.getGlobalVariable=function(z){return"page"==z?C.getName():"pagenumber"==z?1:q.apply(this,arguments)};document.body.appendChild(N.container);N.model.setRoot(C.root)}}v=null!=v?v:this.getXmlFileData(m,p,y,L);A=null!=A?
-A:this.getCurrentFile();c=this.createFileData(v,N,A,window.location.href,c,e,g,k,m,x,y);N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);return c};EditorUi.prototype.getHtml=function(c,e,g,k,m,p){p=null!=p?p:!0;var v=null,x=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){v=p?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var A=e.view.scale;p=Math.floor(v.x/A-e.view.translate.x);A=Math.floor(v.y/A-e.view.translate.y);v=e.background;null==m&&(e=this.getBasenames().join(";"),
-0<e.length&&(x=EditorUi.drawHost+"/embed.js?s="+e));c.setAttribute("x0",p);c.setAttribute("y0",A)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=k&&c.setAttribute("edit",k));null!=m&&(m=m.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";k=Graph.compress(c);Graph.decompress(k)!=c&&(k=encodeURIComponent(c));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
+function(){e.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){e.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(c,e,g,k,m,p,v,x,z,y,L){m=null!=m?m:!0;p=null!=p?p:!1;var N=this.editor.graph;if(e||!c&&null!=z&&/(\.svg)$/i.test(z.getTitle())){var K=null!=N.themes&&"darkTheme"==N.defaultThemeName;y=!1;if(K||null!=this.pages&&this.currentPage!=this.pages[0]){var q=N.getGlobalVariable;N=this.createTemporaryGraph(K?N.getDefaultStylesheet():N.getStylesheet());
+N.setBackgroundImage=this.editor.graph.setBackgroundImage;N.background=this.editor.graph.background;var C=this.pages[0];this.currentPage==C?N.setBackgroundImage(this.editor.graph.backgroundImage):null!=C.viewState&&null!=C.viewState&&N.setBackgroundImage(C.viewState.backgroundImage);N.getGlobalVariable=function(A){return"page"==A?C.getName():"pagenumber"==A?1:q.apply(this,arguments)};document.body.appendChild(N.container);N.model.setRoot(C.root)}}v=null!=v?v:this.getXmlFileData(m,p,y,L);z=null!=z?
+z:this.getCurrentFile();c=this.createFileData(v,N,z,window.location.href,c,e,g,k,m,x,y);N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);return c};EditorUi.prototype.getHtml=function(c,e,g,k,m,p){p=null!=p?p:!0;var v=null,x=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=e){v=p?e.getGraphBounds():e.getBoundingBox(e.getSelectionCells());var z=e.view.scale;p=Math.floor(v.x/z-e.view.translate.x);z=Math.floor(v.y/z-e.view.translate.y);v=e.background;null==m&&(e=this.getBasenames().join(";"),
+0<e.length&&(x=EditorUi.drawHost+"/embed.js?s="+e));c.setAttribute("x0",p);c.setAttribute("y0",z)}null!=c&&(c.setAttribute("pan","1"),c.setAttribute("zoom","1"),c.setAttribute("resize","0"),c.setAttribute("fit","0"),c.setAttribute("border","20"),c.setAttribute("links","1"),null!=k&&c.setAttribute("edit",k));null!=m&&(m=m.replace(/&/g,"&amp;"));c=null!=c?Graph.zapGremlins(mxUtils.getXml(c)):"";k=Graph.compress(c);Graph.decompress(k)!=c&&(k=encodeURIComponent(c));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':
"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+m+"'\"/>\n":"")+"</head>\n<body"+(null==m&&null!=v&&v!=mxConstants.NONE?' style="background-color:'+v+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+k+"</div>\n</div>\n"+
(null==m?'<script type="text/javascript" src="'+x+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+m+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(c,e,g,k,m){e=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=m&&(m=m.replace(/&/g,"&amp;"));c={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,resize:!0,
xml:Graph.zapGremlins(c),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(c.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==m?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=m?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==m?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=m?'<meta http-equiv="refresh" content="0;URL=\''+
@@ -11759,19 +11759,19 @@ m+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph"
function(c){c=this.validateFileData(c);this.pages=this.fileNode=this.currentPage=null;var e=null!=c&&0<c.length?mxUtils.parseXml(c).documentElement:null,g=Editor.extractParserError(e,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[c],"node",[e],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");c=null!=e?this.editor.extractGraphModel(e,!0):null;null!=c&&(e=c);if(null!=e&&"mxfile"==e.nodeName&&(c=e.getElementsByTagName("diagram"),
"0"!=urlParams.pages||1<c.length||1==c.length&&c[0].hasAttribute("name"))){g=null;this.fileNode=e;this.pages=[];for(var k=0;k<c.length;k++)null==c[k].getAttribute("id")&&c[k].setAttribute("id",k),e=new DiagramPage(c[k]),null==e.getName()&&e.setName(mxResources.get("pageWithNumber",[k+1])),this.pages.push(e),null!=urlParams["page-id"]&&e.getId()==urlParams["page-id"]&&(g=e);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];e=this.currentPage.node}"0"!=
urlParams.pages&&null==this.fileNode&&null!=e&&(this.fileNode=e.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(e.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(e);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var m=urlParams["layer-ids"].split(" ");e={};for(k=0;k<m.length;k++)e[m[k]]=!0;var p=this.editor.graph.getModel(),
-v=p.getChildren(p.root);for(k=0;k<v.length;k++){var x=v[k];p.setVisible(x,e[x.id]||!1)}}catch(A){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
-0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,g,k,m,p,v,x,A,y,L,N){try{k=null!=k?k:this.editor.graph.isSelectionEmpty();var K=this.getBaseFilename("remoteSvg"==c?!1:!m),q=K+("xml"==c||"pdf"==c&&L?".drawio":"")+"."+c;if("xml"==c){var C=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,k,m,null,null,null,e);this.saveData(q,c,C,"text/xml")}else if("html"==c)C=this.getHtml2(this.getFileData(!0),this.editor.graph,
-K),this.saveData(q,c,C,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==c)q=K+".png";else if("jpeg"==c)q=K+".jpg";else if("remoteSvg"==c){q=K+".svg";c="svg";var z=parseInt(A);"string"===typeof x&&0<x.indexOf("%")&&(x=parseInt(x)/100);if(0<z){var B=this.editor.graph,G=B.getGraphBounds();var M=Math.ceil(G.width*x/B.view.scale+2*z);var H=Math.ceil(G.height*x/B.view.scale+2*z)}}this.saveRequest(q,c,mxUtils.bind(this,function(O,V){try{var U=
-this.editor.graph.pageVisible;0==p&&(this.editor.graph.pageVisible=p);var X=this.createDownloadRequest(O,c,k,V,v,m,x,A,y,L,N,M,H);this.editor.graph.pageVisible=U;return X}catch(n){this.handleError(n)}}))}else{var F=null,J=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});if("svg"==c){var R=this.editor.graph.background;
-if(v||R==mxConstants.NONE)R=null;var W=this.editor.graph.getSvg(R,null,null,null,null,k);g&&this.editor.graph.addSvgShadow(W);this.editor.convertImages(W,mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();J(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else q=K+".svg",F=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();J(O)}),k)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(c,e,g,k,m,p,v,x,A,
-y,L,N,K){var q=this.editor.graph,C=q.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==p?!1:"xmlpng"!=e,null,null,null,!1,"pdf"==e);var z="",B="";if(C.width*C.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};y=y?"1":"0";"pdf"==e&&(null!=L?B="&from="+L.from+"&to="+L.to:0==p&&(B="&allPages=1"));"xmlpng"==e&&(y="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(p=0;p<this.pages.length;p++)if(this.pages[p]==this.currentPage){z=
-"&from="+p;break}p=q.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!m?m||null!=p&&p!=mxConstants.NONE||(p="#ffffff"):p=mxConstants.NONE;m={globalVars:q.getExportVariables()};A&&(m.grid={size:q.gridSize,steps:q.view.gridSteps,color:q.view.gridColor});Graph.translateDiagram&&(m.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+e+z+B+"&bg="+(null!=p?p:mxConstants.NONE)+"&base64="+k+"&embedXml="+y+"&xml="+encodeURIComponent(g)+(null!=c?"&filename="+encodeURIComponent(c):"")+
+v=p.getChildren(p.root);for(k=0;k<v.length;k++){var x=v[k];p.setVisible(x,e[x.id]||!1)}}catch(z){}};EditorUi.prototype.getBaseFilename=function(c){var e=this.getCurrentFile();e=null!=e&&null!=e.getTitle()?e.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(e)||/(\.html)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.png)$/i.test(e))e=e.substring(0,e.lastIndexOf("."));/(\.drawio)$/i.test(e)&&(e=e.substring(0,e.lastIndexOf(".")));!c&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
+0<this.currentPage.getName().length&&(e=e+"-"+this.currentPage.getName());return e};EditorUi.prototype.downloadFile=function(c,e,g,k,m,p,v,x,z,y,L,N){try{k=null!=k?k:this.editor.graph.isSelectionEmpty();var K=this.getBaseFilename("remoteSvg"==c?!1:!m),q=K+("xml"==c||"pdf"==c&&L?".drawio":"")+"."+c;if("xml"==c){var C=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,k,m,null,null,null,e);this.saveData(q,c,C,"text/xml")}else if("html"==c)C=this.getHtml2(this.getFileData(!0),this.editor.graph,
+K),this.saveData(q,c,C,"text/html");else if("svg"!=c&&"xmlsvg"!=c||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==c)q=K+".png";else if("jpeg"==c)q=K+".jpg";else if("remoteSvg"==c){q=K+".svg";c="svg";var A=parseInt(z);"string"===typeof x&&0<x.indexOf("%")&&(x=parseInt(x)/100);if(0<A){var B=this.editor.graph,G=B.getGraphBounds();var M=Math.ceil(G.width*x/B.view.scale+2*A);var H=Math.ceil(G.height*x/B.view.scale+2*A)}}this.saveRequest(q,c,mxUtils.bind(this,function(O,V){try{var U=
+this.editor.graph.pageVisible;0==p&&(this.editor.graph.pageVisible=p);var Y=this.createDownloadRequest(O,c,k,V,v,m,x,z,y,L,N,M,H);this.editor.graph.pageVisible=U;return Y}catch(n){this.handleError(n)}}))}else{var F=null,J=mxUtils.bind(this,function(O){O.length<=MAX_REQUEST_SIZE?this.saveData(q,"svg",O,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});if("svg"==c){var R=this.editor.graph.background;
+if(v||R==mxConstants.NONE)R=null;var W=this.editor.graph.getSvg(R,null,null,null,null,k);g&&this.editor.graph.addSvgShadow(W);this.editor.convertImages(W,mxUtils.bind(this,mxUtils.bind(this,function(O){this.spinner.stop();J(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(O))})))}else q=K+".svg",F=this.getFileData(!1,!0,null,mxUtils.bind(this,function(O){this.spinner.stop();J(O)}),k)}}catch(O){this.handleError(O)}};EditorUi.prototype.createDownloadRequest=function(c,e,g,k,m,p,v,x,z,
+y,L,N,K){var q=this.editor.graph,C=q.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==p?!1:"xmlpng"!=e,null,null,null,!1,"pdf"==e);var A="",B="";if(C.width*C.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};y=y?"1":"0";"pdf"==e&&(null!=L?B="&from="+L.from+"&to="+L.to:0==p&&(B="&allPages=1"));"xmlpng"==e&&(y="1",e="png");if(("xmlpng"==e||"svg"==e)&&null!=this.pages&&null!=this.currentPage)for(p=0;p<this.pages.length;p++)if(this.pages[p]==this.currentPage){A=
+"&from="+p;break}p=q.background;"png"!=e&&"pdf"!=e&&"svg"!=e||!m?m||null!=p&&p!=mxConstants.NONE||(p="#ffffff"):p=mxConstants.NONE;m={globalVars:q.getExportVariables()};z&&(m.grid={size:q.gridSize,steps:q.view.gridSteps,color:q.view.gridColor});Graph.translateDiagram&&(m.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+e+A+B+"&bg="+(null!=p?p:mxConstants.NONE)+"&base64="+k+"&embedXml="+y+"&xml="+encodeURIComponent(g)+(null!=c?"&filename="+encodeURIComponent(c):"")+
"&extras="+encodeURIComponent(JSON.stringify(m))+(null!=v?"&scale="+v:"")+(null!=x?"&border="+x:"")+(N&&isFinite(N)?"&w="+N:"")+(K&&isFinite(K)?"&h="+K:""))};EditorUi.prototype.setMode=function(c,e){this.mode=c};EditorUi.prototype.loadDescriptor=function(c,e,g){var k=window.location.hash,m=mxUtils.bind(this,function(p){var v=null!=c.data?c.data:"";null!=p&&0<p.length&&(0<v.length&&(v+="\n"),v+=p);p=new LocalFile(this,"csv"!=c.format&&0<v.length?v:this.emptyDiagramXml,null!=urlParams.title?decodeURIComponent(urlParams.title):
-this.defaultFilename,!0);p.getHash=function(){return k};this.fileLoaded(p);"csv"==c.format&&this.importCsv(v,mxUtils.bind(this,function(N){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var x=null!=c.interval?parseInt(c.interval):6E4,A=null,y=mxUtils.bind(this,function(){var N=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(K){N===this.currentPage&&(200<=
-K.getStatus()&&300>=K.getStatus()?(this.updateDiagram(K.getText()),L()):this.handleError({message:mxResources.get("error")+" "+K.getStatus()}))}),mxUtils.bind(this,function(K){this.handleError(K)}))}),L=mxUtils.bind(this,function(){window.clearTimeout(A);A=window.setTimeout(y,x)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){L();y()}));L();y()}null!=e&&e()});null!=c.url&&0<c.url.length?this.editor.loadUrl(c.url,mxUtils.bind(this,function(p){m(p)}),mxUtils.bind(this,function(p){null!=
+this.defaultFilename,!0);p.getHash=function(){return k};this.fileLoaded(p);"csv"==c.format&&this.importCsv(v,mxUtils.bind(this,function(N){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=c.update){var x=null!=c.interval?parseInt(c.interval):6E4,z=null,y=mxUtils.bind(this,function(){var N=this.currentPage;mxUtils.post(c.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,function(K){N===this.currentPage&&(200<=
+K.getStatus()&&300>=K.getStatus()?(this.updateDiagram(K.getText()),L()):this.handleError({message:mxResources.get("error")+" "+K.getStatus()}))}),mxUtils.bind(this,function(K){this.handleError(K)}))}),L=mxUtils.bind(this,function(){window.clearTimeout(z);z=window.setTimeout(y,x)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){L();y()}));L();y()}null!=e&&e()});null!=c.url&&0<c.url.length?this.editor.loadUrl(c.url,mxUtils.bind(this,function(p){m(p)}),mxUtils.bind(this,function(p){null!=
g&&g(p)})):m("")};EditorUi.prototype.updateDiagram=function(c){function e(H){var F=new mxCellOverlay(H.image||m.warningImage,H.tooltip,H.align,H.valign,H.offset);F.addListener(mxEvent.CLICK,function(J,R){k.alert(H.tooltip)});return F}var g=null,k=this;if(null!=c&&0<c.length&&(g=mxUtils.parseXml(c),c=null!=g?g.documentElement:null,null!=c&&"updates"==c.nodeName)){var m=this.editor.graph,p=m.getModel();p.beginUpdate();var v=null;try{for(c=c.firstChild;null!=c;){if("update"==c.nodeName){var x=p.getCell(c.getAttribute("id"));
-if(null!=x){try{var A=c.getAttribute("value");if(null!=A){var y=mxUtils.parseXml(A).documentElement;if(null!=y)if("1"==y.getAttribute("replace-value"))p.setValue(x,y);else for(var L=y.attributes,N=0;N<L.length;N++)m.setAttributeForCell(x,L[N].nodeName,0<L[N].nodeValue.length?L[N].nodeValue:null)}}catch(H){null!=window.console&&console.log("Error in value for "+x.id+": "+H)}try{var K=c.getAttribute("style");null!=K&&m.model.setStyle(x,K)}catch(H){null!=window.console&&console.log("Error in style for "+
-x.id+": "+H)}try{var q=c.getAttribute("icon");if(null!=q){var C=0<q.length?JSON.parse(q):null;null!=C&&C.append||m.removeCellOverlays(x);null!=C&&m.addCellOverlay(x,e(C))}}catch(H){null!=window.console&&console.log("Error in icon for "+x.id+": "+H)}try{var z=c.getAttribute("geometry");if(null!=z){z=JSON.parse(z);var B=m.getCellGeometry(x);if(null!=B){B=B.clone();for(key in z){var G=parseFloat(z[key]);"dx"==key?B.x+=G:"dy"==key?B.y+=G:"dw"==key?B.width+=G:"dh"==key?B.height+=G:B[key]=parseFloat(z[key])}m.model.setGeometry(x,
+if(null!=x){try{var z=c.getAttribute("value");if(null!=z){var y=mxUtils.parseXml(z).documentElement;if(null!=y)if("1"==y.getAttribute("replace-value"))p.setValue(x,y);else for(var L=y.attributes,N=0;N<L.length;N++)m.setAttributeForCell(x,L[N].nodeName,0<L[N].nodeValue.length?L[N].nodeValue:null)}}catch(H){null!=window.console&&console.log("Error in value for "+x.id+": "+H)}try{var K=c.getAttribute("style");null!=K&&m.model.setStyle(x,K)}catch(H){null!=window.console&&console.log("Error in style for "+
+x.id+": "+H)}try{var q=c.getAttribute("icon");if(null!=q){var C=0<q.length?JSON.parse(q):null;null!=C&&C.append||m.removeCellOverlays(x);null!=C&&m.addCellOverlay(x,e(C))}}catch(H){null!=window.console&&console.log("Error in icon for "+x.id+": "+H)}try{var A=c.getAttribute("geometry");if(null!=A){A=JSON.parse(A);var B=m.getCellGeometry(x);if(null!=B){B=B.clone();for(key in A){var G=parseFloat(A[key]);"dx"==key?B.x+=G:"dy"==key?B.y+=G:"dw"==key?B.width+=G:"dh"==key?B.height+=G:B[key]=parseFloat(A[key])}m.model.setGeometry(x,
B)}}}catch(H){null!=window.console&&console.log("Error in icon for "+x.id+": "+H)}}}else if("model"==c.nodeName){for(var M=c.firstChild;null!=M&&M.nodeType!=mxConstants.NODETYPE_ELEMENT;)M=M.nextSibling;null!=M&&(new mxCodec(c.firstChild)).decode(M,p)}else if("view"==c.nodeName){if(c.hasAttribute("scale")&&(m.view.scale=parseFloat(c.getAttribute("scale"))),c.hasAttribute("dx")||c.hasAttribute("dy"))m.view.translate=new mxPoint(parseFloat(c.getAttribute("dx")||0),parseFloat(c.getAttribute("dy")||0))}else"fit"==
c.nodeName&&(v=c.hasAttribute("max-scale")?parseFloat(c.getAttribute("max-scale")):1);c=c.nextSibling}}finally{p.endUpdate()}null!=v&&this.chromelessResize&&this.chromelessResize(!0,v)}return g};EditorUi.prototype.getCopyFilename=function(c,e){var g=null!=c&&null!=c.getTitle()?c.getTitle():this.defaultFilename;c="";var k=g.lastIndexOf(".");0<=k&&(c=g.substring(k),g=g.substring(0,k));if(e){e=g;var m=new Date;g=m.getFullYear();k=m.getMonth()+1;var p=m.getDate(),v=m.getHours(),x=m.getMinutes();m=m.getSeconds();
g=e+(" "+(g+"-"+k+"-"+p+"-"+v+"-"+x+"-"+m))}return g=mxResources.get("copyOf",[g])+c};EditorUi.prototype.fileLoaded=function(c,e){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var k=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());this.editor.graph.model.clear();this.editor.undoManager.clear();var m=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);
@@ -11781,29 +11781,29 @@ this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxReso
"1"==urlParams.sketch?"sketch":uiTheme;if(null==p)p="default";else if("sketch"==p||"min"==p)p+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:c.getMode().toUpperCase()+"-OPEN-FILE-"+c.getHash(),action:"size_"+c.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+p})}EditorUi.debug("File.opened",[c]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));if(this.editor.editable&&this.mode==c.getMode()&&c.getMode()!=App.MODE_DEVICE&&null!=
c.getMode())try{this.addRecent({id:c.getHash(),title:c.getTitle(),mode:c.getMode()})}catch(v){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(v){}}catch(v){this.fileLoadedError=v;if(null!=c)try{c.close()}catch(x){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=c?c.getHash():"none"),action:"message_"+v.message,label:"stack_"+v.stack})}catch(x){}c=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,
mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||m():m()});e?c():this.handleError(v,mxResources.get("errorLoadingFile"),c,!0,null,null,!0)}else m();return k};EditorUi.prototype.getHashValueForPages=function(c,e){var g=0,k=new mxGraphModel,m=new mxCodec;null!=e&&(e.byteCount=0,e.attrCount=0,e.eltCount=0,e.nodeCount=0);for(var p=0;p<c.length;p++){this.updatePageRoot(c[p]);var v=c[p].node.cloneNode(!1);v.removeAttribute("name");k.root=c[p].root;
-var x=m.encode(k);this.editor.graph.saveViewState(c[p].viewState,x,!0);x.removeAttribute("pageWidth");x.removeAttribute("pageHeight");v.appendChild(x);null!=e&&(e.eltCount+=v.getElementsByTagName("*").length,e.nodeCount+=v.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(v,function(A,y,L,N){return!N||"mxGeometry"!=A.nodeName&&"mxPoint"!=A.nodeName||"x"!=y&&"y"!=y&&"width"!=y&&"height"!=y?N&&"mxCell"==A.nodeName&&"previous"==y?null:L:Math.round(L)},e)<<0}return g};EditorUi.prototype.hashValue=
+var x=m.encode(k);this.editor.graph.saveViewState(c[p].viewState,x,!0);x.removeAttribute("pageWidth");x.removeAttribute("pageHeight");v.appendChild(x);null!=e&&(e.eltCount+=v.getElementsByTagName("*").length,e.nodeCount+=v.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(v,function(z,y,L,N){return!N||"mxGeometry"!=z.nodeName&&"mxPoint"!=z.nodeName||"x"!=y&&"y"!=y&&"width"!=y&&"height"!=y?N&&"mxCell"==z.nodeName&&"previous"==y?null:L:Math.round(L)},e)<<0}return g};EditorUi.prototype.hashValue=
function(c,e,g){var k=0;if(null!=c&&"object"===typeof c&&"number"===typeof c.nodeType&&"string"===typeof c.nodeName&&"function"===typeof c.getAttribute){null!=c.nodeName&&(k^=this.hashValue(c.nodeName,e,g));if(null!=c.attributes){null!=g&&(g.attrCount+=c.attributes.length);for(var m=0;m<c.attributes.length;m++){var p=c.attributes[m].name,v=null!=e?e(c,p,c.attributes[m].value,!0):c.attributes[m].value;null!=v&&(k^=this.hashValue(p,e,g)+this.hashValue(v,e,g))}}if(null!=c.childNodes)for(m=0;m<c.childNodes.length;m++)k=
(k<<5)-k+this.hashValue(c.childNodes[m],e,g)<<0}else if(null!=c&&"function"!==typeof c){c=String(c);e=0;null!=g&&(g.byteCount+=c.length);for(m=0;m<c.length;m++)e=(e<<5)-e+c.charCodeAt(m)<<0;k^=e}return k};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(c,e,g,k,m,p,v){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&
(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(c){null==c&&(c=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,c,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(c){var e=mxUtils.createXmlDocument(),g=e.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(c));e.appendChild(g);return mxUtils.getXml(e)};EditorUi.prototype.closeLibrary=function(c){null!=c&&(this.removeLibrarySidebar(c.getHash()),
c.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(c.getHash()),".scratchpad"==c.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(c){var e=this.sidebar.palettes[c];if(null!=e){for(var g=0;g<e.length;g++)e[g].parentNode.removeChild(e[g]);delete this.sidebar.palettes[c]}};EditorUi.prototype.repositionLibrary=function(c){var e=this.sidebar.container;if(null==c){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(c=g[g.length-
1].nextSibling)}c=null!=c?c:e.firstChild.nextSibling.nextSibling;g=e.lastChild;var k=g.previousSibling;e.insertBefore(g,c);e.insertBefore(k,g)};EditorUi.prototype.loadLibrary=function(c,e){var g=mxUtils.parseXml(c.getData());if("mxlibrary"==g.documentElement.nodeName){var k=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(c,k,g.documentElement.getAttribute("title"),e)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(c){return""};
EditorUi.prototype.libraryLoaded=function(c,e,g,k){if(null!=this.sidebar){c.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(c.getHash());".scratchpad"==c.title&&(this.scratchpad=c);var m=this.sidebar.palettes[c.getHash()];m=null!=m?m[m.length-1].nextSibling:null;this.removeLibrarySidebar(c.getHash());var p=null,v=mxUtils.bind(this,function(M,H){0==M.length&&c.isEditable()?(null==p&&(p=document.createElement("div"),p.className="geDropTarget",mxUtils.write(p,mxResources.get("dragElementsHere"))),
-H.appendChild(p)):this.addLibraryEntries(M,H)});null!=this.sidebar&&null!=e&&this.sidebar.addEntries(e);null==g&&(g=c.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var x=this.sidebar.addPalette(c.getHash(),g,null!=k?k:!0,mxUtils.bind(this,function(M){v(e,M)}));this.repositionLibrary(m);var A=x.parentNode.previousSibling;k=A.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=c.title&&A.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+k);var y=document.createElement("div");
-y.style.position="absolute";y.style.right="0px";y.style.top="0px";y.style.padding="8px";y.style.backgroundColor="inherit";A.style.position="relative";var L=document.createElement("img");L.setAttribute("src",Editor.crossImage);L.setAttribute("title",mxResources.get("close"));L.setAttribute("valign","absmiddle");L.setAttribute("border","0");L.style.position="relative";L.style.top="2px";L.style.width="14px";L.style.cursor="pointer";L.style.margin="0 3px";Editor.isDarkMode()&&(L.style.filter="invert(100%)");
+H.appendChild(p)):this.addLibraryEntries(M,H)});null!=this.sidebar&&null!=e&&this.sidebar.addEntries(e);null==g&&(g=c.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var x=this.sidebar.addPalette(c.getHash(),g,null!=k?k:!0,mxUtils.bind(this,function(M){v(e,M)}));this.repositionLibrary(m);var z=x.parentNode.previousSibling;k=z.getAttribute("title");null!=k&&0<k.length&&".scratchpad"!=c.title&&z.setAttribute("title",this.getLibraryStorageHint(c)+"\n"+k);var y=document.createElement("div");
+y.style.position="absolute";y.style.right="0px";y.style.top="0px";y.style.padding="8px";y.style.backgroundColor="inherit";z.style.position="relative";var L=document.createElement("img");L.setAttribute("src",Editor.crossImage);L.setAttribute("title",mxResources.get("close"));L.setAttribute("valign","absmiddle");L.setAttribute("border","0");L.style.position="relative";L.style.top="2px";L.style.width="14px";L.style.cursor="pointer";L.style.margin="0 3px";Editor.isDarkMode()&&(L.style.filter="invert(100%)");
var N=null;if(".scratchpad"!=c.title||this.closableScratchpad)y.appendChild(L),mxEvent.addListener(L,"click",mxUtils.bind(this,function(M){if(!mxEvent.isConsumed(M)){var H=mxUtils.bind(this,function(){this.closeLibrary(c)});null!=N?this.confirm(mxResources.get("allChangesLost"),null,H,mxResources.get("cancel"),mxResources.get("discardChanges")):H();mxEvent.consume(M)}}));if(c.isEditable()){var K=this.editor.graph,q=null,C=mxUtils.bind(this,function(M){this.showLibraryDialog(c.getTitle(),x,e,c,c.getMode());
-mxEvent.consume(M)}),z=mxUtils.bind(this,function(M){c.setModified(!0);c.isAutosave()?(null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q),q=L.cloneNode(!1),q.setAttribute("src",Editor.spinImage),q.setAttribute("title",mxResources.get("saving")),q.style.cursor="default",q.style.marginRight="2px",q.style.marginTop="-2px",y.insertBefore(q,y.firstChild),A.style.paddingRight=18*y.childNodes.length+"px",this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=q&&null!=q.parentNode&&(q.parentNode.removeChild(q),
-A.style.paddingRight=18*y.childNodes.length+"px")})):null==N&&(N=L.cloneNode(!1),N.setAttribute("src",Editor.saveImage),N.setAttribute("title",mxResources.get("save")),y.insertBefore(N,y.firstChild),mxEvent.addListener(N,"click",mxUtils.bind(this,function(H){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==N||c.isModified()||(A.style.paddingRight=18*y.childNodes.length+"px",N.parentNode.removeChild(N),N=null)});mxEvent.consume(H)})),A.style.paddingRight=
-18*y.childNodes.length+"px")}),B=mxUtils.bind(this,function(M,H,F,J){M=K.cloneCells(mxUtils.sortCells(K.model.getTopmostCells(M)));for(var R=0;R<M.length;R++){var W=K.getCellGeometry(M[R]);null!=W&&W.translate(-H.x,-H.y)}x.appendChild(this.sidebar.createVertexTemplateFromCells(M,H.width,H.height,J||"",!0,null,!1));M={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(M))),w:H.width,h:H.height};null!=J&&(M.title=J);e.push(M);z(F);null!=p&&null!=p.parentNode&&0<e.length&&(p.parentNode.removeChild(p),
+mxEvent.consume(M)}),A=mxUtils.bind(this,function(M){c.setModified(!0);c.isAutosave()?(null!=q&&null!=q.parentNode&&q.parentNode.removeChild(q),q=L.cloneNode(!1),q.setAttribute("src",Editor.spinImage),q.setAttribute("title",mxResources.get("saving")),q.style.cursor="default",q.style.marginRight="2px",q.style.marginTop="-2px",y.insertBefore(q,y.firstChild),z.style.paddingRight=18*y.childNodes.length+"px",this.saveLibrary(c.getTitle(),e,c,c.getMode(),!0,!0,function(){null!=q&&null!=q.parentNode&&(q.parentNode.removeChild(q),
+z.style.paddingRight=18*y.childNodes.length+"px")})):null==N&&(N=L.cloneNode(!1),N.setAttribute("src",Editor.saveImage),N.setAttribute("title",mxResources.get("save")),y.insertBefore(N,y.firstChild),mxEvent.addListener(N,"click",mxUtils.bind(this,function(H){this.saveLibrary(c.getTitle(),e,c,c.getMode(),c.constructor==LocalLibrary,!0,function(){null==N||c.isModified()||(z.style.paddingRight=18*y.childNodes.length+"px",N.parentNode.removeChild(N),N=null)});mxEvent.consume(H)})),z.style.paddingRight=
+18*y.childNodes.length+"px")}),B=mxUtils.bind(this,function(M,H,F,J){M=K.cloneCells(mxUtils.sortCells(K.model.getTopmostCells(M)));for(var R=0;R<M.length;R++){var W=K.getCellGeometry(M[R]);null!=W&&W.translate(-H.x,-H.y)}x.appendChild(this.sidebar.createVertexTemplateFromCells(M,H.width,H.height,J||"",!0,null,!1));M={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(M))),w:H.width,h:H.height};null!=J&&(M.title=J);e.push(M);A(F);null!=p&&null!=p.parentNode&&0<e.length&&(p.parentNode.removeChild(p),
p=null)}),G=mxUtils.bind(this,function(M){if(K.isSelectionEmpty())K.getRubberband().isActive()?(K.getRubberband().execute(M),K.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var H=K.getSelectionCells(),F=K.view.getBounds(H),J=K.view.scale;F.x/=J;F.y/=J;F.width/=J;F.height/=J;F.x-=K.view.translate.x;F.y-=K.view.translate.y;B(H,F)}mxEvent.consume(M)});mxEvent.addGestureListeners(x,function(){},mxUtils.bind(this,function(M){K.isMouseDown&&
null!=K.panningManager&&null!=K.graphHandler.first&&(K.graphHandler.suspend(),null!=K.graphHandler.hint&&(K.graphHandler.hint.style.visibility="hidden"),x.style.backgroundColor="#f1f3f4",x.style.cursor="copy",K.panningManager.stop(),K.autoScroll=!1,mxEvent.consume(M))}),mxUtils.bind(this,function(M){K.isMouseDown&&null!=K.panningManager&&null!=K.graphHandler&&(x.style.backgroundColor="",x.style.cursor="default",this.sidebar.showTooltips=!0,K.panningManager.stop(),K.graphHandler.reset(),K.isMouseDown=
!1,K.autoScroll=!0,G(M),mxEvent.consume(M))}));mxEvent.addListener(x,"mouseleave",mxUtils.bind(this,function(M){K.isMouseDown&&null!=K.graphHandler.first&&(K.graphHandler.resume(),null!=K.graphHandler.hint&&(K.graphHandler.hint.style.visibility="visible"),x.style.backgroundColor="",x.style.cursor="",K.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(x,"dragover",mxUtils.bind(this,function(M){x.style.backgroundColor="#f1f3f4";M.dataTransfer.dropEffect="copy";x.style.cursor="copy";this.sidebar.hideTooltip();
-M.stopPropagation();M.preventDefault()})),mxEvent.addListener(x,"drop",mxUtils.bind(this,function(M){x.style.cursor="";x.style.backgroundColor="";0<M.dataTransfer.files.length&&this.importFiles(M.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(H,F,J,R,W,O,V,U,X){if(null!=H&&"image/"==F.substring(0,6))H="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(H),H=[new mxCell("",new mxGeometry(0,0,W,O),H)],H[0].vertex=!0,
-B(H,new mxRectangle(0,0,W,O),M,mxEvent.isAltDown(M)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),null!=p&&null!=p.parentNode&&0<e.length&&(p.parentNode.removeChild(p),p=null);else{var n=!1,E=mxUtils.bind(this,function(I,S){null!=I&&"application/pdf"==S&&(S=Editor.extractGraphModelFromPdf(I),null!=S&&0<S.length&&(I=S));if(null!=I)if(I=mxUtils.parseXml(I),"mxlibrary"==I.documentElement.nodeName)try{var Q=JSON.parse(mxUtils.getTextContent(I.documentElement));v(Q,x);e=e.concat(Q);z(M);this.spinner.stop();
-n=!0}catch(ca){}else if("mxfile"==I.documentElement.nodeName)try{var P=I.documentElement.getElementsByTagName("diagram");for(Q=0;Q<P.length;Q++){var T=this.stringToCells(Editor.getDiagramNodeXml(P[Q])),Y=this.editor.graph.getBoundingBoxFromGeometry(T);B(T,new mxRectangle(0,0,Y.width,Y.height),M)}n=!0}catch(ca){null!=window.console&&console.log("error in drop handler:",ca)}n||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=p&&null!=p.parentNode&&0<e.length&&
-(p.parentNode.removeChild(p),p=null)});null!=X&&null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V)||/(\.vs(x|sx?))($|\?)/i.test(V))?this.importVisio(X,function(I){E(I,"text/xml")},null,V):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,V)&&null!=X?this.isExternalDataComms()?this.parseFile(X,mxUtils.bind(this,function(I){4==I.readyState&&(this.spinner.stop(),200<=I.status&&299>=I.status?E(I.responseText,"text/xml"):this.handleError({message:mxResources.get(413==I.status?"drawingTooLarge":"invalidOrMissingFile")},
-mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):E(H,F)}}));M.stopPropagation();M.preventDefault()})),mxEvent.addListener(x,"dragleave",function(M){x.style.cursor="";x.style.backgroundColor="";M.stopPropagation();M.preventDefault()}));L=L.cloneNode(!1);L.setAttribute("src",Editor.editImage);L.setAttribute("title",mxResources.get("edit"));y.insertBefore(L,y.firstChild);mxEvent.addListener(L,"click",C);mxEvent.addListener(x,
+M.stopPropagation();M.preventDefault()})),mxEvent.addListener(x,"drop",mxUtils.bind(this,function(M){x.style.cursor="";x.style.backgroundColor="";0<M.dataTransfer.files.length&&this.importFiles(M.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(H,F,J,R,W,O,V,U,Y){if(null!=H&&"image/"==F.substring(0,6))H="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(H),H=[new mxCell("",new mxGeometry(0,0,W,O),H)],H[0].vertex=!0,
+B(H,new mxRectangle(0,0,W,O),M,mxEvent.isAltDown(M)?null:V.substring(0,V.lastIndexOf(".")).replace(/_/g," ")),null!=p&&null!=p.parentNode&&0<e.length&&(p.parentNode.removeChild(p),p=null);else{var n=!1,D=mxUtils.bind(this,function(I,S){null!=I&&"application/pdf"==S&&(S=Editor.extractGraphModelFromPdf(I),null!=S&&0<S.length&&(I=S));if(null!=I)if(I=mxUtils.parseXml(I),"mxlibrary"==I.documentElement.nodeName)try{var Q=JSON.parse(mxUtils.getTextContent(I.documentElement));v(Q,x);e=e.concat(Q);A(M);this.spinner.stop();
+n=!0}catch(ba){}else if("mxfile"==I.documentElement.nodeName)try{var P=I.documentElement.getElementsByTagName("diagram");for(Q=0;Q<P.length;Q++){var T=this.stringToCells(Editor.getDiagramNodeXml(P[Q])),X=this.editor.graph.getBoundingBoxFromGeometry(T);B(T,new mxRectangle(0,0,X.width,X.height),M)}n=!0}catch(ba){null!=window.console&&console.log("error in drop handler:",ba)}n||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=p&&null!=p.parentNode&&0<e.length&&
+(p.parentNode.removeChild(p),p=null)});null!=Y&&null!=V&&(/(\.v(dx|sdx?))($|\?)/i.test(V)||/(\.vs(x|sx?))($|\?)/i.test(V))?this.importVisio(Y,function(I){D(I,"text/xml")},null,V):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(H,V)&&null!=Y?this.isExternalDataComms()?this.parseFile(Y,mxUtils.bind(this,function(I){4==I.readyState&&(this.spinner.stop(),200<=I.status&&299>=I.status?D(I.responseText,"text/xml"):this.handleError({message:mxResources.get(413==I.status?"drawingTooLarge":"invalidOrMissingFile")},
+mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):D(H,F)}}));M.stopPropagation();M.preventDefault()})),mxEvent.addListener(x,"dragleave",function(M){x.style.cursor="";x.style.backgroundColor="";M.stopPropagation();M.preventDefault()}));L=L.cloneNode(!1);L.setAttribute("src",Editor.editImage);L.setAttribute("title",mxResources.get("edit"));y.insertBefore(L,y.firstChild);mxEvent.addListener(L,"click",C);mxEvent.addListener(x,
"dblclick",function(M){mxEvent.getSource(M)==x&&C(M)});k=L.cloneNode(!1);k.setAttribute("src",Editor.plusImage);k.setAttribute("title",mxResources.get("add"));y.insertBefore(k,y.firstChild);mxEvent.addListener(k,"click",G);this.isOffline()||".scratchpad"!=c.title||null==EditorUi.scratchpadHelpLink||(k=document.createElement("span"),k.setAttribute("title",mxResources.get("help")),k.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(k,"?"),mxEvent.addGestureListeners(k,
-mxUtils.bind(this,function(M){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(M)})),y.insertBefore(k,y.firstChild))}A.appendChild(y);A.style.paddingRight=18*y.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(c,e){for(var g=0;g<c.length;g++){var k=c[g],m=k.data;if(null!=m){m=this.convertDataUri(m);var p="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==k.aspect&&(p+="aspect=fixed;");e.appendChild(this.sidebar.createVertexTemplate(p+
+mxUtils.bind(this,function(M){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(M)})),y.insertBefore(k,y.firstChild))}z.appendChild(y);z.style.paddingRight=18*y.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(c,e){for(var g=0;g<c.length;g++){var k=c[g],m=k.data;if(null!=m){m=this.convertDataUri(m);var p="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==k.aspect&&(p+="aspect=fixed;");e.appendChild(this.sidebar.createVertexTemplate(p+
"image="+m,k.w,k.h,"",k.title||"",!1,null,!0))}else null!=k.xml&&(m=this.stringToCells(Graph.decompress(k.xml)),0<m.length&&e.appendChild(this.sidebar.createVertexTemplateFromCells(m,k.w,k.h,k.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(c){return null!=c?c[mxLanguage]||c.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",
STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName=
"darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource=
@@ -11812,28 +11812,28 @@ startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8
Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);c.init()};EditorUi.prototype.showBackgroundImageDialog=function(c,e){c=null!=c?c:mxUtils.bind(this,function(g,k){k||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});c=new BackgroundImageDialog(this,c,e);this.showDialog(c.container,400,200,!0,!0);c.init()};EditorUi.prototype.showLibraryDialog=function(c,e,g,k,m){c=new LibraryDialog(this,c,e,g,k,m);this.showDialog(c.container,640,440,!0,!1,mxUtils.bind(this,
function(p){p&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));c.init()};var l=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(c){var e=l.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&e.refresh()}));return e};EditorUi.prototype.createSidebarFooterContainer=function(){var c=this.createDiv("geSidebarContainer geSidebarFooter");c.style.position="absolute";c.style.overflow=
"hidden";var e=document.createElement("a");e.className="geTitle";e.style.color="#DF6C0C";e.style.fontWeight="bold";e.style.height="100%";e.style.paddingTop="9px";e.innerHTML="<span>+</span>";var g=e.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(e,mxResources.get("moreShapes")+"...");mxEvent.addListener(e,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(k){k.preventDefault()}));mxEvent.addListener(e,"click",mxUtils.bind(this,
-function(k){this.actions.get("shapes").funct();mxEvent.consume(k)}));c.appendChild(e);return c};EditorUi.prototype.handleError=function(c,e,g,k,m,p,v){var x=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},A=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{v?null!=window.console&&console.error("EditorUi.handleError:",c):EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,
-c.columnNumber,c,"INFO")}catch(q){}if(null!=A||null!=e){v=mxUtils.htmlEntities(mxResources.get("unknownError"));var y=mxResources.get("ok"),L=null;e=null!=e?e:mxResources.get("error");if(null!=A){null!=A.retry&&(y=mxResources.get("cancel"),L=function(){x();A.retry()});if(404==A.code||404==A.status||403==A.code){v=403==A.code?null!=A.message?mxUtils.htmlEntities(A.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=m?m:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=
-this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var N=null!=m?null:null!=p?p:window.location.hash;if(null!=N&&("#G"==N.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==N.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==A.code||404==A.status)){N="#U"==N.substring(0,
+function(k){this.actions.get("shapes").funct();mxEvent.consume(k)}));c.appendChild(e);return c};EditorUi.prototype.handleError=function(c,e,g,k,m,p,v){var x=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},z=null!=c&&null!=c.error?c.error:c;if(null!=c&&("1"==urlParams.test||null!=c.stack)&&null!=c.message)try{v?null!=window.console&&console.error("EditorUi.handleError:",c):EditorUi.logError("Caught: "+(""==c.message&&null!=c.name)?c.name:c.message,c.filename,c.lineNumber,
+c.columnNumber,c,"INFO")}catch(q){}if(null!=z||null!=e){v=mxUtils.htmlEntities(mxResources.get("unknownError"));var y=mxResources.get("ok"),L=null;e=null!=e?e:mxResources.get("error");if(null!=z){null!=z.retry&&(y=mxResources.get("cancel"),L=function(){x();z.retry()});if(404==z.code||404==z.status||403==z.code){v=403==z.code?null!=z.message?mxUtils.htmlEntities(z.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=m?m:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=
+this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var N=null!=m?null:null!=p?p:window.location.hash;if(null!=N&&("#G"==N.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==N.substring(0,45))&&(null!=c&&null!=c.error&&(null!=c.error.errors&&0<c.error.errors.length&&"fileAccess"==c.error.errors[0].reason||null!=c.error.data&&0<c.error.data.length&&"fileAccess"==c.error.data[0].reason)||404==z.code||404==z.status)){N="#U"==N.substring(0,
2)?N.substring(45,N.lastIndexOf("%26ex")):N.substring(2);this.showError(e,v,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+N);this.handleError(c,e,g,k,m)}),L,mxResources.get("changeUser"),mxUtils.bind(this,function(){function q(){G.innerHTML="";for(var M=0;M<C.length;M++){var H=document.createElement("option");mxUtils.write(H,C[M].displayName);H.value=M;G.appendChild(H);H=document.createElement("option");H.innerHTML="&nbsp;&nbsp;&nbsp;";
-mxUtils.write(H,"<"+C[M].email+">");H.setAttribute("disabled","disabled");G.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=C.length;G.appendChild(H)}var C=this.drive.getUsersList(),z=document.createElement("div"),B=document.createElement("span");B.style.marginTop="6px";mxUtils.write(B,mxResources.get("changeUser")+": ");z.appendChild(B);var G=document.createElement("select");G.style.width="200px";q();mxEvent.addListener(G,"change",mxUtils.bind(this,
-function(){var M=G.value,H=C.length!=M;H&&this.drive.setUser(C[M]);this.drive.authorize(H,mxUtils.bind(this,function(){H||(C=this.drive.getUsersList(),q())}),mxUtils.bind(this,function(F){this.handleError(F)}),!0)}));z.appendChild(G);z=new CustomDialog(this,z,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(z.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=A.message?
-v=""==A.message&&null!=A.name?mxUtils.htmlEntities(A.name):mxUtils.htmlEntities(A.message):null!=A.response&&null!=A.response.error?v=mxUtils.htmlEntities(A.response.error):"undefined"!==typeof window.App&&(A.code==App.ERROR_TIMEOUT?v=mxUtils.htmlEntities(mxResources.get("timeout")):A.code==App.ERROR_BUSY?v=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof A&&0<A.length&&(v=mxUtils.htmlEntities(A)))}var K=p=null;null!=A&&null!=A.helpLink?(p=mxResources.get("help"),K=mxUtils.bind(this,
-function(){return this.editor.graph.openLink(A.helpLink)})):null!=A&&null!=A.ownerEmail&&(p=mxResources.get("contactOwner"),v+=mxUtils.htmlEntities(" ("+p+": "+A.ownerEmail+")"),K=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(A.ownerEmail))}));this.showError(e,v,y,g,L,null,null,p,K,null,null,null,k?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(c,e,g){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,g||340,100,!0,!1);
+mxUtils.write(H,"<"+C[M].email+">");H.setAttribute("disabled","disabled");G.appendChild(H)}H=document.createElement("option");mxUtils.write(H,mxResources.get("addAccount"));H.value=C.length;G.appendChild(H)}var C=this.drive.getUsersList(),A=document.createElement("div"),B=document.createElement("span");B.style.marginTop="6px";mxUtils.write(B,mxResources.get("changeUser")+": ");A.appendChild(B);var G=document.createElement("select");G.style.width="200px";q();mxEvent.addListener(G,"change",mxUtils.bind(this,
+function(){var M=G.value,H=C.length!=M;H&&this.drive.setUser(C[M]);this.drive.authorize(H,mxUtils.bind(this,function(){H||(C=this.drive.getUsersList(),q())}),mxUtils.bind(this,function(F){this.handleError(F)}),!0)}));A.appendChild(G);A=new CustomDialog(this,A,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),!0)}));this.showDialog(A.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=z.message?
+v=""==z.message&&null!=z.name?mxUtils.htmlEntities(z.name):mxUtils.htmlEntities(z.message):null!=z.response&&null!=z.response.error?v=mxUtils.htmlEntities(z.response.error):"undefined"!==typeof window.App&&(z.code==App.ERROR_TIMEOUT?v=mxUtils.htmlEntities(mxResources.get("timeout")):z.code==App.ERROR_BUSY?v=mxUtils.htmlEntities(mxResources.get("busy")):"string"===typeof z&&0<z.length&&(v=mxUtils.htmlEntities(z)))}var K=p=null;null!=z&&null!=z.helpLink?(p=mxResources.get("help"),K=mxUtils.bind(this,
+function(){return this.editor.graph.openLink(z.helpLink)})):null!=z&&null!=z.ownerEmail&&(p=mxResources.get("contactOwner"),v+=mxUtils.htmlEntities(" ("+p+": "+z.ownerEmail+")"),K=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(z.ownerEmail))}));this.showError(e,v,y,g,L,null,null,p,K,null,null,null,k?g:null)}else null!=g&&g()};EditorUi.prototype.alert=function(c,e,g){c=new ErrorDialog(this,null,c,mxResources.get("ok"),e);this.showDialog(c.container,g||340,100,!0,!1);
c.init()};EditorUi.prototype.confirm=function(c,e,g,k,m,p){var v=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},x=Math.min(200,28*Math.ceil(c.length/50));c=new ConfirmDialog(this,c,function(){v();null!=e&&e()},function(){v();null!=g&&g()},k,m,null,null,null,null,x);this.showDialog(c.container,340,46+x,!0,p);c.init()};EditorUi.prototype.showBanner=function(c,e,g,k){var m=!1;if(!(this.bannerShowing||this["hideBanner"+c]||isLocalStorage&&null!=mxSettings.settings&&null!=
mxSettings.settings["close"+c])){var p=document.createElement("div");p.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(p.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(p.style,"transition","all 1s ease");p.className="geBtn gePrimaryBtn";
m=document.createElement("img");m.setAttribute("src",IMAGE_PATH+"/logo.png");m.setAttribute("border","0");m.setAttribute("align","absmiddle");m.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";p.appendChild(m);m=document.createElement("img");m.setAttribute("src",Dialog.prototype.closeImage);m.setAttribute("title",mxResources.get(k?"doNotShowAgain":"close"));m.setAttribute("border","0");m.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";
p.appendChild(m);mxUtils.write(p,e);document.body.appendChild(p);this.bannerShowing=!0;e=document.createElement("div");e.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var v=document.createElement("input");v.setAttribute("type","checkbox");v.setAttribute("id","geDoNotShowAgainCheckbox");v.style.marginRight="6px";if(!k){e.appendChild(v);var x=document.createElement("label");x.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(x,mxResources.get("doNotShowAgain"));e.appendChild(x);
-p.style.paddingBottom="30px";p.appendChild(e)}var A=mxUtils.bind(this,function(){null!=p.parentNode&&(p.parentNode.removeChild(p),this.bannerShowing=!1,v.checked||k)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});mxEvent.addListener(m,"click",mxUtils.bind(this,function(L){mxEvent.consume(L);A()}));var y=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
-function(){A()}),1E3)});mxEvent.addListener(p,"click",mxUtils.bind(this,function(L){var N=mxEvent.getSource(L);N!=v&&N!=x?(null!=g&&g(),A(),mxEvent.consume(L)):y()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(y,3E4);m=!0}return m};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
+p.style.paddingBottom="30px";p.appendChild(e)}var z=mxUtils.bind(this,function(){null!=p.parentNode&&(p.parentNode.removeChild(p),this.bannerShowing=!1,v.checked||k)&&(this["hideBanner"+c]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+c]=Date.now(),mxSettings.save()))});mxEvent.addListener(m,"click",mxUtils.bind(this,function(L){mxEvent.consume(L);z()}));var y=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,
+function(){z()}),1E3)});mxEvent.addListener(p,"click",mxUtils.bind(this,function(L){var N=mxEvent.getSource(L);N!=v&&N!=x?(null!=g&&g(),z(),mxEvent.consume(L)):y()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(p.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(y,3E4);m=!0}return m};EditorUi.prototype.setCurrentFile=function(c){null!=c&&(c.opened=new Date);this.currentFile=c};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=
function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(c,e,g,k){c=c.toDataURL("image/"+g);if(null!=c&&6<c.length)null!=e&&(c=Editor.writeGraphModelToPng(c,"tEXt","mxfile",encodeURIComponent(e))),0<k&&(c=Editor.writeGraphModelToPng(c,"pHYs","dpi",k));else throw{message:mxResources.get("unknownError")};return c};EditorUi.prototype.saveCanvas=function(c,e,g,k,m){var p="jpeg"==g?"jpg":g;k=this.getBaseFilename(k)+(null!=e?".drawio":"")+"."+p;c=this.createImageDataUri(c,
e,g,m);this.saveData(k,p,c.substring(c.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(c,e){c=new TextareaDialog(this,c,e,null,null,mxResources.get("close"));this.showDialog(c.container,620,460,
!0,!0,null,null,null,null,!0);c.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(c,e,g,k,m,p){"text/xml"!=g||/(\.drawio)$/i.test(e)||/(\.xml)$/i.test(e)||/(\.svg)$/i.test(e)||/(\.html)$/i.test(e)||(e=e+"."+(null!=p?p:"drawio"));if(window.Blob&&navigator.msSaveOrOpenBlob)c=k?this.base64ToBlob(c,g):new Blob([c],{type:g}),navigator.msSaveOrOpenBlob(c,e);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(c,!0):(g.document.write(c),
g.document.close(),g.document.execCommand("SaveAs",!0,e),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(e+":",c):this.openInNewWindow(c,g,k);else{var v=document.createElement("a");p=(null==navigator.userAgent||0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof v.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var x=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);p=65==(x?parseInt(x[2],10):
-!1)?!1:p}if(p||this.isOffline()){v.href=URL.createObjectURL(k?this.base64ToBlob(c,g):new Blob([c],{type:g}));p?v.download=e:v.setAttribute("target","_blank");document.body.appendChild(v);try{window.setTimeout(function(){URL.revokeObjectURL(v.href)},2E4),v.click(),v.parentNode.removeChild(v)}catch(A){}}else this.createEchoRequest(c,e,g,k,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,g,k,m,p){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=
-g?"&mime="+g:"")+(null!=m?"&format="+m:"")+(null!=p?"&base64="+p:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(k?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var g=c.length,k=Math.ceil(g/1024),m=Array(k),p=0;p<k;++p){for(var v=1024*p,x=Math.min(v+1024,g),A=Array(x-v),y=0;v<x;++y,++v)A[y]=c[v].charCodeAt(0);m[p]=new Uint8Array(A)}return new Blob(m,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,g,k,m,p,v,x){p=null!=p?p:!1;v=null!=v?v:"vsdx"!=
-m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(p);isLocalStorage&&m++;var A=4>=m?2:6<m?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(y,L){try{if("_blank"==L)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(c,g,k);else if(null!=g&&"text/html"==g.substring(0,9)){var N=new EmbedDialog(this,c);this.showDialog(N.container,450,240,!0,!0);N.init()}else{var K=window.open("about:blank");null==K?mxUtils.popup(c,!0):(K.document.write("<pre>"+mxUtils.htmlEntities(c,
-!1)+"</pre>"),K.document.close())}else L==App.MODE_DEVICE||"download"==L?this.doSaveLocalFile(c,y,g,k,null,x):null!=y&&0<y.length&&this.pickFolder(L,mxUtils.bind(this,function(q){try{this.exportFile(c,y,g,k,L,q)}catch(C){this.handleError(C)}}))}catch(q){this.handleError(q)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,p,v,null,1<m,A,c,g,k);p=this.isServices(m)?m>A?390:280:160;this.showDialog(e.container,420,p,!0,!0);e.init()};EditorUi.prototype.openInNewWindow=
+!1)?!1:p}if(p||this.isOffline()){v.href=URL.createObjectURL(k?this.base64ToBlob(c,g):new Blob([c],{type:g}));p?v.download=e:v.setAttribute("target","_blank");document.body.appendChild(v);try{window.setTimeout(function(){URL.revokeObjectURL(v.href)},2E4),v.click(),v.parentNode.removeChild(v)}catch(z){}}else this.createEchoRequest(c,e,g,k,m).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(c,e,g,k,m,p){c="xml="+encodeURIComponent(c);return new mxXmlRequest(SAVE_URL,c+(null!=
+g?"&mime="+g:"")+(null!=m?"&format="+m:"")+(null!=p?"&base64="+p:"")+(null!=e?"&filename="+encodeURIComponent(e):"")+(k?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(c,e){e=e||"";c=atob(c);for(var g=c.length,k=Math.ceil(g/1024),m=Array(k),p=0;p<k;++p){for(var v=1024*p,x=Math.min(v+1024,g),z=Array(x-v),y=0;v<x;++y,++v)z[y]=c[v].charCodeAt(0);m[p]=new Uint8Array(z)}return new Blob(m,{type:e})};EditorUi.prototype.saveLocalFile=function(c,e,g,k,m,p,v,x){p=null!=p?p:!1;v=null!=v?v:"vsdx"!=
+m&&(!mxClient.IS_IOS||!navigator.standalone);m=this.getServiceCount(p);isLocalStorage&&m++;var z=4>=m?2:6<m?4:3;e=new CreateDialog(this,e,mxUtils.bind(this,function(y,L){try{if("_blank"==L)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(c,g,k);else if(null!=g&&"text/html"==g.substring(0,9)){var N=new EmbedDialog(this,c);this.showDialog(N.container,450,240,!0,!0);N.init()}else{var K=window.open("about:blank");null==K?mxUtils.popup(c,!0):(K.document.write("<pre>"+mxUtils.htmlEntities(c,
+!1)+"</pre>"),K.document.close())}else L==App.MODE_DEVICE||"download"==L?this.doSaveLocalFile(c,y,g,k,null,x):null!=y&&0<y.length&&this.pickFolder(L,mxUtils.bind(this,function(q){try{this.exportFile(c,y,g,k,L,q)}catch(C){this.handleError(C)}}))}catch(q){this.handleError(q)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,p,v,null,1<m,z,c,g,k);p=this.isServices(m)?m>z?390:280:160;this.showDialog(e.container,420,p,!0,!0);e.init()};EditorUi.prototype.openInNewWindow=
function(c,e,g){var k=window.open("about:blank");null==k||null==k.document?mxUtils.popup(c,!0):("image/svg+xml"!=e||mxClient.IS_SVG?"image/svg+xml"==e?k.document.write("<html>"+c+"</html>"):(c=g?c:btoa(unescape(encodeURIComponent(c))),k.document.write('<html><img style="max-width:100%;" src="data:'+e+";base64,"+c+'"/></html>')):k.document.write("<html><pre>"+mxUtils.htmlEntities(c,!1)+"</pre></html>"),k.document.close())};var d=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=
function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(c){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var e=c(mxUtils.bind(this,function(k){null==this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position=
"",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow="auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor=
@@ -11844,77 +11844,77 @@ Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListen
this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=c(mxUtils.bind(this,function(k){var m=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",m);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)m.apply(this);
else{this.exportDialog=document.createElement("div");var p=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color=
"#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=p.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";p=mxUtils.getCurrentStyle(this.editor.graph.container);this.exportDialog.style.zIndex=p.zIndex;var v=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});v.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,
-function(x){v.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var A=this.createImageDataUri(x,null,"png");x=document.createElement("img");x.style.maxWidth="140px";x.style.maxHeight="140px";x.style.cursor="pointer";x.style.backgroundColor="white";x.setAttribute("title",mxResources.get("openInNewWindow"));x.setAttribute("border","0");x.setAttribute("src",A);this.exportDialog.appendChild(x);mxEvent.addListener(x,"click",mxUtils.bind(this,
-function(){this.openInNewWindow(A.substring(A.indexOf(",")+1),"image/png",!0);m.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",m);document.body.appendChild(this.exportDialog)}mxEvent.consume(k)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,g,k,m){this.isLocalFileSave()?
-this.saveLocalFile(g,c,k,m,e):this.saveRequest(c,e,mxUtils.bind(this,function(p,v){return this.createEchoRequest(g,p,k,m,e,v)}),g,m,k)};EditorUi.prototype.saveRequest=function(c,e,g,k,m,p,v){v=null!=v?v:!mxClient.IS_IOS||!navigator.standalone;var x=this.getServiceCount(!1);isLocalStorage&&x++;var A=4>=x?2:6<x?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(y,L){if("_blank"==L||null!=y&&0<y.length){var N=g("_blank"==L?null:y,L==App.MODE_DEVICE||"download"==L||null==L||"_blank"==L?"0":"1");
+function(x){v.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var z=this.createImageDataUri(x,null,"png");x=document.createElement("img");x.style.maxWidth="140px";x.style.maxHeight="140px";x.style.cursor="pointer";x.style.backgroundColor="white";x.setAttribute("title",mxResources.get("openInNewWindow"));x.setAttribute("border","0");x.setAttribute("src",z);this.exportDialog.appendChild(x);mxEvent.addListener(x,"click",mxUtils.bind(this,
+function(){this.openInNewWindow(z.substring(z.indexOf(",")+1),"image/png",!0);m.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}),null,null,null,null,null,null,null,Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",m);document.body.appendChild(this.exportDialog)}mxEvent.consume(k)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(c,e,g,k,m){this.isLocalFileSave()?
+this.saveLocalFile(g,c,k,m,e):this.saveRequest(c,e,mxUtils.bind(this,function(p,v){return this.createEchoRequest(g,p,k,m,e,v)}),g,m,k)};EditorUi.prototype.saveRequest=function(c,e,g,k,m,p,v){v=null!=v?v:!mxClient.IS_IOS||!navigator.standalone;var x=this.getServiceCount(!1);isLocalStorage&&x++;var z=4>=x?2:6<x?4:3;c=new CreateDialog(this,c,mxUtils.bind(this,function(y,L){if("_blank"==L||null!=y&&0<y.length){var N=g("_blank"==L?null:y,L==App.MODE_DEVICE||"download"==L||null==L||"_blank"==L?"0":"1");
null!=N&&(L==App.MODE_DEVICE||"download"==L||"_blank"==L?N.simulate(document,"_blank"):this.pickFolder(L,mxUtils.bind(this,function(K){p=null!=p?p:"pdf"==e?"application/pdf":"image/"+e;if(null!=k)try{this.exportFile(k,y,p,!0,L,K)}catch(q){this.handleError(q)}else this.spinner.spin(document.body,mxResources.get("saving"))&&N.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=N.getStatus()&&299>=N.getStatus())try{this.exportFile(N.getText(),y,p,!0,L,K)}catch(q){this.handleError(q)}else this.handleError({message:mxResources.get("errorSavingFile")})}),
-function(q){this.spinner.stop();this.handleError(q)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,v,null,1<x,A,k,p,m);x=this.isServices(x)?4<x?390:280:160;this.showDialog(c.container,420,x,!0,!0);c.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,g,k,m,p){};EditorUi.prototype.pickFolder=function(c,
-e,g){e(null)};EditorUi.prototype.exportSvg=function(c,e,g,k,m,p,v,x,A,y,L,N,K,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var C=this.editor.graph.isSelectionEmpty();g=null!=g?g:C;var z=e?null:this.editor.graph.background;z==mxConstants.NONE&&(z=null);null==z&&0==e&&(z=L?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var B=this.editor.graph.getSvg(z,c,v,x,null,g,null,null,"blank"==y?"_blank":"self"==y?"_top":null,null,!K,L,N);k&&this.editor.graph.addSvgShadow(B);var G=
-this.getBaseFilename()+(m?".drawio":"")+".svg";q=null!=q?q:mxUtils.bind(this,function(F){this.isLocalFileSave()||F.length<=MAX_REQUEST_SIZE?this.saveData(G,"svg",F,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});var M=mxUtils.bind(this,function(F){this.spinner.stop();m&&F.setAttribute("content",this.getFileData(!0,null,null,null,g,A,null,null,null,!1));q(Graph.xmlDeclaration+"\n"+(m?Graph.svgFileComment+
+function(q){this.spinner.stop();this.handleError(q)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,v,null,1<x,z,k,p,m);x=this.isServices(x)?4<x?390:280:160;this.showDialog(c.container,420,x,!0,!0);c.init()};EditorUi.prototype.isServices=function(c){return 1!=c};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(c,e,g,k,m,p){};EditorUi.prototype.pickFolder=function(c,
+e,g){e(null)};EditorUi.prototype.exportSvg=function(c,e,g,k,m,p,v,x,z,y,L,N,K,q){if(this.spinner.spin(document.body,mxResources.get("export")))try{var C=this.editor.graph.isSelectionEmpty();g=null!=g?g:C;var A=e?null:this.editor.graph.background;A==mxConstants.NONE&&(A=null);null==A&&0==e&&(A=L?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var B=this.editor.graph.getSvg(A,c,v,x,null,g,null,null,"blank"==y?"_blank":"self"==y?"_top":null,null,!K,L,N);k&&this.editor.graph.addSvgShadow(B);var G=
+this.getBaseFilename()+(m?".drawio":"")+".svg";q=null!=q?q:mxUtils.bind(this,function(F){this.isLocalFileSave()||F.length<=MAX_REQUEST_SIZE?this.saveData(G,"svg",F,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(F)}))});var M=mxUtils.bind(this,function(F){this.spinner.stop();m&&F.setAttribute("content",this.getFileData(!0,null,null,null,g,z,null,null,null,!1));q(Graph.xmlDeclaration+"\n"+(m?Graph.svgFileComment+
"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(F))});this.editor.graph.mathEnabled&&this.editor.addMathCss(B);var H=mxUtils.bind(this,function(F){p?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(F,M,this.thumbImageCache)):M(F)});K?this.embedFonts(B,H):(this.editor.addFontCss(B),H(B))}catch(F){this.handleError(F)}};EditorUi.prototype.addRadiobox=function(c,e,g,k,m,p,v){return this.addCheckbox(c,g,k,m,p,v,!0,e)};EditorUi.prototype.addCheckbox=function(c,e,g,k,m,p,v,
-x){p=null!=p?p:!0;var A=document.createElement("input");A.style.marginRight="8px";A.style.marginTop="16px";A.setAttribute("type",v?"radio":"checkbox");v="geCheckbox-"+Editor.guid();A.id=v;null!=x&&A.setAttribute("name",x);g&&(A.setAttribute("checked","checked"),A.defaultChecked=!0);k&&A.setAttribute("disabled","disabled");p&&(c.appendChild(A),g=document.createElement("label"),mxUtils.write(g,e),g.setAttribute("for",v),c.appendChild(g),m||mxUtils.br(c));return A};EditorUi.prototype.addEditButton=function(c,
+x){p=null!=p?p:!0;var z=document.createElement("input");z.style.marginRight="8px";z.style.marginTop="16px";z.setAttribute("type",v?"radio":"checkbox");v="geCheckbox-"+Editor.guid();z.id=v;null!=x&&z.setAttribute("name",x);g&&(z.setAttribute("checked","checked"),z.defaultChecked=!0);k&&z.setAttribute("disabled","disabled");p&&(c.appendChild(z),g=document.createElement("label"),mxUtils.write(g,e),g.setAttribute("for",v),c.appendChild(g),m||mxUtils.br(c));return z};EditorUi.prototype.addEditButton=function(c,
e){var g=this.addCheckbox(c,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var k=this.getCurrentFile(),m="";null!=k&&k.getMode()!=App.MODE_DEVICE&&k.getMode()!=App.MODE_BROWSER&&(m=window.location.href);var p=document.createElement("select");p.style.maxWidth="200px";p.style.width="auto";p.style.marginLeft="8px";p.style.marginRight="10px";p.className="geBtn";k=document.createElement("option");k.setAttribute("value","blank");mxUtils.write(k,mxResources.get("makeCopy"));p.appendChild(k);
k=document.createElement("option");k.setAttribute("value","custom");mxUtils.write(k,mxResources.get("custom")+"...");p.appendChild(k);c.appendChild(p);mxEvent.addListener(p,"change",mxUtils.bind(this,function(){if("custom"==p.value){var v=new FilenameDialog(this,m,mxResources.get("ok"),function(x){null!=x?m=x:p.value="blank"},mxResources.get("url"),null,null,null,null,function(){p.value="blank"});this.showDialog(v.container,300,80,!0,!1);v.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,
function(){g.checked&&(null==e||e.checked)?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled")}));mxUtils.br(c);return{getLink:function(){return g.checked?"blank"===p.value?"_blank":m:null},getEditInput:function(){return g},getEditSelect:function(){return p}}};EditorUi.prototype.addLinkSection=function(c,e){function g(){var x=document.createElement("div");x.style.width="100%";x.style.height="100%";x.style.boxSizing="border-box";null!=p&&p!=mxConstants.NONE?(x.style.border="1px solid black",
x.style.backgroundColor=p):(x.style.backgroundPosition="center center",x.style.backgroundRepeat="no-repeat",x.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");v.innerHTML="";v.appendChild(x)}mxUtils.write(c,mxResources.get("links")+":");var k=document.createElement("select");k.style.width="100px";k.style.padding="0px";k.style.marginLeft="8px";k.style.marginRight="10px";k.className="geBtn";var m=document.createElement("option");m.setAttribute("value","auto");mxUtils.write(m,mxResources.get("automatic"));
k.appendChild(m);m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("openInNewWindow"));k.appendChild(m);m=document.createElement("option");m.setAttribute("value","self");mxUtils.write(m,mxResources.get("openInThisWindow"));k.appendChild(m);e&&(e=document.createElement("option"),e.setAttribute("value","frame"),mxUtils.write(e,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),k.appendChild(e));c.appendChild(k);mxUtils.write(c,mxResources.get("borderColor")+
-":");var p="#0000ff",v=null;v=mxUtils.button("",mxUtils.bind(this,function(x){this.pickColor(p||"none",function(A){p=A;g()});mxEvent.consume(x)}));g();v.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";v.style.marginLeft="4px";v.style.height="22px";v.style.width="22px";v.style.position="relative";v.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";v.className="geColorBtn";c.appendChild(v);mxUtils.br(c);return{getColor:function(){return p},getTarget:function(){return k.value},
+":");var p="#0000ff",v=null;v=mxUtils.button("",mxUtils.bind(this,function(x){this.pickColor(p||"none",function(z){p=z;g()});mxEvent.consume(x)}));g();v.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";v.style.marginLeft="4px";v.style.height="22px";v.style.width="22px";v.style.position="relative";v.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";v.className="geColorBtn";c.appendChild(v);mxUtils.br(c);return{getColor:function(){return p},getTarget:function(){return k.value},
focus:function(){k.focus()}}};EditorUi.prototype.createUrlParameters=function(c,e,g,k,m,p,v){v=null!=v?v:[];k&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||v.push("lightbox=1"),"auto"!=c&&v.push("target="+c),null!=e&&e!=mxConstants.NONE&&v.push("highlight="+("#"==e.charAt(0)?e.substring(1):e)),null!=m&&0<m.length&&v.push("edit="+encodeURIComponent(m)),p&&v.push("layers=1"),this.editor.graph.foldingEnabled&&v.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&
-this.currentPage!=this.pages[0]&&v.push("page-id="+this.currentPage.getId());return v};EditorUi.prototype.createLink=function(c,e,g,k,m,p,v,x,A,y){A=this.createUrlParameters(c,e,g,k,m,p,A);c=this.getCurrentFile();e=!0;null!=v?g="#U"+encodeURIComponent(v):(c=this.getCurrentFile(),x||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+c.getHash(),e=!1));e&&
-null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&A.push("title="+encodeURIComponent(c.getTitle()));y&&1<g.length&&(A.push("open="+g.substring(1)),g="");return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<A.length?"?"+A.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,e,g,k,m,p,v,x,A,y,L,N){this.getBasenames();var K={};""!=
-m&&m!=mxConstants.NONE&&(K.highlight=m);"auto"!==k&&(K.target=k);y||(K.lightbox=!1);K.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(K.zoom=g/100);g=[];v&&(g.push("pages"),K.resize=!0,null!=this.pages&&null!=this.currentPage&&(K.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(g.push("zoom"),K.resize=!0);x&&g.push("layers");A&&g.push("tags");0<g.length&&(y&&g.push("lightbox"),K.toolbar=g.join(" "));null!=L&&0<L.length&&(K.edit=L);null!=c?K.url=c:K.xml=this.getFileData(!0,
+this.currentPage!=this.pages[0]&&v.push("page-id="+this.currentPage.getId());return v};EditorUi.prototype.createLink=function(c,e,g,k,m,p,v,x,z,y){z=this.createUrlParameters(c,e,g,k,m,p,z);c=this.getCurrentFile();e=!0;null!=v?g="#U"+encodeURIComponent(v):(c=this.getCurrentFile(),x||null==c||c.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+c.getHash(),e=!1));e&&
+null!=c&&null!=c.getTitle()&&c.getTitle()!=this.defaultFilename&&z.push("title="+encodeURIComponent(c.getTitle()));y&&1<g.length&&(z.push("open="+g.substring(1)),g="");return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<z.length?"?"+z.join("&"):"")+g};EditorUi.prototype.createHtml=function(c,e,g,k,m,p,v,x,z,y,L,N){this.getBasenames();var K={};""!=
+m&&m!=mxConstants.NONE&&(K.highlight=m);"auto"!==k&&(K.target=k);y||(K.lightbox=!1);K.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(K.zoom=g/100);g=[];v&&(g.push("pages"),K.resize=!0,null!=this.pages&&null!=this.currentPage&&(K.page=mxUtils.indexOf(this.pages,this.currentPage)));e&&(g.push("zoom"),K.resize=!0);x&&g.push("layers");z&&g.push("tags");0<g.length&&(y&&g.push("lightbox"),K.toolbar=g.join(" "));null!=L&&0<L.length&&(K.edit=L);null!=c?K.url=c:K.xml=this.getFileData(!0,
null,null,null,null,!v);e='<div class="mxgraph" style="'+(p?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(K))+'"></div>';c=null!=c?"&fetch="+encodeURIComponent(c):"";N(e,'<script type="text/javascript" src="'+(0<c.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+c:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:
EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(c,e,g,k){var m=document.createElement("div");m.style.whiteSpace="nowrap";var p=document.createElement("h3");mxUtils.write(p,mxResources.get("html"));p.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";m.appendChild(p);var v=document.createElement("div");v.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var x=document.createElement("input");
-x.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";x.setAttribute("value","url");x.setAttribute("type","radio");x.setAttribute("name","type-embedhtmldialog");p=x.cloneNode(!0);p.setAttribute("value","copy");v.appendChild(p);var A=document.createElement("span");mxUtils.write(A,mxResources.get("includeCopyOfMyDiagram"));v.appendChild(A);mxUtils.br(v);v.appendChild(x);A=document.createElement("span");mxUtils.write(A,mxResources.get("publicDiagramUrl"));v.appendChild(A);var y=this.getCurrentFile();
-null==g&&null!=y&&y.constructor==window.DriveFile&&(A=document.createElement("a"),A.style.paddingLeft="12px",A.style.color="gray",A.style.cursor="pointer",mxUtils.write(A,mxResources.get("share")),v.appendChild(A),mxEvent.addListener(A,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(y.getId())})));p.setAttribute("checked","checked");null==g&&x.setAttribute("disabled","disabled");m.appendChild(v);var L=this.addLinkSection(m),N=this.addCheckbox(m,mxResources.get("zoom"),
-!0,null,!0);mxUtils.write(m,":");var K=document.createElement("input");K.setAttribute("type","text");K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.style.marginRight="12px";K.value="100%";m.appendChild(K);var q=this.addCheckbox(m,mxResources.get("fit"),!0);v=null!=this.pages&&1<this.pages.length;var C=C=this.addCheckbox(m,mxResources.get("allPages"),v,!v),z=this.addCheckbox(m,mxResources.get("layers"),!0),B=this.addCheckbox(m,mxResources.get("tags"),!0),G=this.addCheckbox(m,
+x.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";x.setAttribute("value","url");x.setAttribute("type","radio");x.setAttribute("name","type-embedhtmldialog");p=x.cloneNode(!0);p.setAttribute("value","copy");v.appendChild(p);var z=document.createElement("span");mxUtils.write(z,mxResources.get("includeCopyOfMyDiagram"));v.appendChild(z);mxUtils.br(v);v.appendChild(x);z=document.createElement("span");mxUtils.write(z,mxResources.get("publicDiagramUrl"));v.appendChild(z);var y=this.getCurrentFile();
+null==g&&null!=y&&y.constructor==window.DriveFile&&(z=document.createElement("a"),z.style.paddingLeft="12px",z.style.color="gray",z.style.cursor="pointer",mxUtils.write(z,mxResources.get("share")),v.appendChild(z),mxEvent.addListener(z,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(y.getId())})));p.setAttribute("checked","checked");null==g&&x.setAttribute("disabled","disabled");m.appendChild(v);var L=this.addLinkSection(m),N=this.addCheckbox(m,mxResources.get("zoom"),
+!0,null,!0);mxUtils.write(m,":");var K=document.createElement("input");K.setAttribute("type","text");K.style.marginRight="16px";K.style.width="60px";K.style.marginLeft="4px";K.style.marginRight="12px";K.value="100%";m.appendChild(K);var q=this.addCheckbox(m,mxResources.get("fit"),!0);v=null!=this.pages&&1<this.pages.length;var C=C=this.addCheckbox(m,mxResources.get("allPages"),v,!v),A=this.addCheckbox(m,mxResources.get("layers"),!0),B=this.addCheckbox(m,mxResources.get("tags"),!0),G=this.addCheckbox(m,
mxResources.get("lightbox"),!0),M=null;v=380;if(EditorUi.enableHtmlEditOption){M=this.addEditButton(m,G);var H=M.getEditInput();H.style.marginBottom="16px";v+=50;mxEvent.addListener(G,"change",function(){G.checked?H.removeAttribute("disabled"):H.setAttribute("disabled","disabled");H.checked&&G.checked?M.getEditSelect().removeAttribute("disabled"):M.getEditSelect().setAttribute("disabled","disabled")})}c=new CustomDialog(this,m,mxUtils.bind(this,function(){k(x.checked?g:null,N.checked,K.value,L.getTarget(),
-L.getColor(),q.checked,C.checked,z.checked,B.checked,G.checked,null!=M?M.getLink():null)}),null,c,e);this.showDialog(c.container,340,v,!0,!0);p.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,g,k,m,p,v,x){var A=document.createElement("div");A.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,c||mxResources.get("link"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";A.appendChild(y);var L=this.getCurrentFile();c=0;if(null==
+L.getColor(),q.checked,C.checked,A.checked,B.checked,G.checked,null!=M?M.getLink():null)}),null,c,e);this.showDialog(c.container,340,v,!0,!0);p.focus()};EditorUi.prototype.showPublishLinkDialog=function(c,e,g,k,m,p,v,x){var z=document.createElement("div");z.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,c||mxResources.get("link"));y.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";z.appendChild(y);var L=this.getCurrentFile();c=0;if(null==
L||L.constructor!=window.DriveFile||e)v=null!=v?v:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{c=80;v=null!=v?v:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";y=document.createElement("div");y.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var N=document.createElement("div");N.style.whiteSpace="normal";mxUtils.write(N,mxResources.get("linkAccountRequired"));y.appendChild(N);N=
-mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(L.getId())}));N.style.marginTop="12px";N.className="geBtn";y.appendChild(N);A.appendChild(y);N=document.createElement("a");N.style.paddingLeft="12px";N.style.color="gray";N.style.fontSize="11px";N.style.cursor="pointer";mxUtils.write(N,mxResources.get("check"));y.appendChild(N);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),
-mxUtils.bind(this,function(J){this.spinner.stop();J=new ErrorDialog(this,null,mxResources.get(null!=J?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(J.container,300,80,!0,!1);J.init()}))}))}var K=null,q=null;if(null!=g||null!=k)c+=30,mxUtils.write(A,mxResources.get("width")+":"),K=document.createElement("input"),K.setAttribute("type","text"),K.style.marginRight="16px",K.style.width="50px",K.style.marginLeft="6px",K.style.marginRight="16px",K.style.marginBottom="10px",
-K.value="100%",A.appendChild(K),mxUtils.write(A,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=k+"px",A.appendChild(q),mxUtils.br(A);var C=this.addLinkSection(A,p);g=null!=this.pages&&1<this.pages.length;var z=null;if(null==L||L.constructor!=window.DriveFile||e)z=this.addCheckbox(A,mxResources.get("allPages"),g,!g);var B=this.addCheckbox(A,mxResources.get("lightbox"),!0,
-null,null,!p),G=this.addEditButton(A,B),M=G.getEditInput();p&&(M.style.marginLeft=B.style.marginLeft,B.style.display="none",c-=20);var H=this.addCheckbox(A,mxResources.get("layers"),!0);H.style.marginLeft=M.style.marginLeft;H.style.marginTop="8px";var F=this.addCheckbox(A,mxResources.get("tags"),!0);F.style.marginLeft=M.style.marginLeft;F.style.marginBottom="16px";F.style.marginTop="16px";mxEvent.addListener(B,"change",function(){B.checked?(H.removeAttribute("disabled"),M.removeAttribute("disabled")):
-(H.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"));M.checked&&B.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,A,mxUtils.bind(this,function(){m(C.getTarget(),C.getColor(),null==z?!0:z.checked,B.checked,G.getLink(),H.checked,null!=K?K.value:null,null!=q?q.value:null,F.checked)}),null,mxResources.get("create"),v,x);this.showDialog(e.container,340,300+c,!0,!0);null!=K?(K.focus(),mxClient.IS_GC||
+mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(L.getId())}));N.style.marginTop="12px";N.className="geBtn";y.appendChild(N);z.appendChild(y);N=document.createElement("a");N.style.paddingLeft="12px";N.style.color="gray";N.style.fontSize="11px";N.style.cursor="pointer";mxUtils.write(N,mxResources.get("check"));y.appendChild(N);mxEvent.addListener(N,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),
+mxUtils.bind(this,function(J){this.spinner.stop();J=new ErrorDialog(this,null,mxResources.get(null!=J?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(J.container,300,80,!0,!1);J.init()}))}))}var K=null,q=null;if(null!=g||null!=k)c+=30,mxUtils.write(z,mxResources.get("width")+":"),K=document.createElement("input"),K.setAttribute("type","text"),K.style.marginRight="16px",K.style.width="50px",K.style.marginLeft="6px",K.style.marginRight="16px",K.style.marginBottom="10px",
+K.value="100%",z.appendChild(K),mxUtils.write(z,mxResources.get("height")+":"),q=document.createElement("input"),q.setAttribute("type","text"),q.style.width="50px",q.style.marginLeft="6px",q.style.marginBottom="10px",q.value=k+"px",z.appendChild(q),mxUtils.br(z);var C=this.addLinkSection(z,p);g=null!=this.pages&&1<this.pages.length;var A=null;if(null==L||L.constructor!=window.DriveFile||e)A=this.addCheckbox(z,mxResources.get("allPages"),g,!g);var B=this.addCheckbox(z,mxResources.get("lightbox"),!0,
+null,null,!p),G=this.addEditButton(z,B),M=G.getEditInput();p&&(M.style.marginLeft=B.style.marginLeft,B.style.display="none",c-=20);var H=this.addCheckbox(z,mxResources.get("layers"),!0);H.style.marginLeft=M.style.marginLeft;H.style.marginTop="8px";var F=this.addCheckbox(z,mxResources.get("tags"),!0);F.style.marginLeft=M.style.marginLeft;F.style.marginBottom="16px";F.style.marginTop="16px";mxEvent.addListener(B,"change",function(){B.checked?(H.removeAttribute("disabled"),M.removeAttribute("disabled")):
+(H.setAttribute("disabled","disabled"),M.setAttribute("disabled","disabled"));M.checked&&B.checked?G.getEditSelect().removeAttribute("disabled"):G.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,z,mxUtils.bind(this,function(){m(C.getTarget(),C.getColor(),null==A?!0:A.checked,B.checked,G.getLink(),H.checked,null!=K?K.value:null,null!=q?q.value:null,F.checked)}),null,mxResources.get("create"),v,x);this.showDialog(e.container,340,300+c,!0,!0);null!=K?(K.focus(),mxClient.IS_GC||
mxClient.IS_FF||5<=document.documentMode?K.select():document.execCommand("selectAll",!1,null)):C.focus()};EditorUi.prototype.showRemoteExportDialog=function(c,e,g,k,m){var p=document.createElement("div");p.style.whiteSpace="nowrap";var v=document.createElement("h3");mxUtils.write(v,mxResources.get("image"));v.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(m?"10":"4")+"px";p.appendChild(v);if(m){mxUtils.write(p,mxResources.get("zoom")+":");var x=document.createElement("input");
-x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.style.marginRight="12px";x.value=this.lastExportZoom||"100%";p.appendChild(x);mxUtils.write(p,mxResources.get("borderWidth")+":");var A=document.createElement("input");A.setAttribute("type","text");A.style.marginRight="16px";A.style.width="60px";A.style.marginLeft="4px";A.value=this.lastExportBorder||"0";p.appendChild(A);mxUtils.br(p)}var y=this.addCheckbox(p,mxResources.get("selectionOnly"),!1,
-this.editor.graph.isSelectionEmpty()),L=k?null:this.addCheckbox(p,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);v=this.editor.graph;var N=k?null:this.addCheckbox(p,mxResources.get("transparentBackground"),v.background==mxConstants.NONE||null==v.background);null!=N&&(N.style.marginBottom="16px");c=new CustomDialog(this,p,mxUtils.bind(this,function(){var K=parseInt(x.value)/100||1,q=parseInt(A.value)||0;g(!y.checked,null!=L?L.checked:!1,null!=N?N.checked:!1,K,q)}),null,c,e);
-this.showDialog(c.container,300,(m?25:0)+(k?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,g,k,m,p,v,x,A){v=null!=v?v:Editor.defaultIncludeDiagram;var y=document.createElement("div");y.style.whiteSpace="nowrap";var L=this.editor.graph,N="jpeg"==x?220:300,K=document.createElement("h3");mxUtils.write(K,c);K.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";y.appendChild(K);mxUtils.write(y,mxResources.get("zoom")+":");var q=document.createElement("input");
-q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";y.appendChild(q);mxUtils.write(y,mxResources.get("borderWidth")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.value=this.lastExportBorder||"0";y.appendChild(C);mxUtils.br(y);var z=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,
+x.setAttribute("type","text");x.style.marginRight="16px";x.style.width="60px";x.style.marginLeft="4px";x.style.marginRight="12px";x.value=this.lastExportZoom||"100%";p.appendChild(x);mxUtils.write(p,mxResources.get("borderWidth")+":");var z=document.createElement("input");z.setAttribute("type","text");z.style.marginRight="16px";z.style.width="60px";z.style.marginLeft="4px";z.value=this.lastExportBorder||"0";p.appendChild(z);mxUtils.br(p)}var y=this.addCheckbox(p,mxResources.get("selectionOnly"),!1,
+this.editor.graph.isSelectionEmpty()),L=k?null:this.addCheckbox(p,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);v=this.editor.graph;var N=k?null:this.addCheckbox(p,mxResources.get("transparentBackground"),v.background==mxConstants.NONE||null==v.background);null!=N&&(N.style.marginBottom="16px");c=new CustomDialog(this,p,mxUtils.bind(this,function(){var K=parseInt(x.value)/100||1,q=parseInt(z.value)||0;g(!y.checked,null!=L?L.checked:!1,null!=N?N.checked:!1,K,q)}),null,c,e);
+this.showDialog(c.container,300,(m?25:0)+(k?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(c,e,g,k,m,p,v,x,z){v=null!=v?v:Editor.defaultIncludeDiagram;var y=document.createElement("div");y.style.whiteSpace="nowrap";var L=this.editor.graph,N="jpeg"==x?220:300,K=document.createElement("h3");mxUtils.write(K,c);K.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";y.appendChild(K);mxUtils.write(y,mxResources.get("zoom")+":");var q=document.createElement("input");
+q.setAttribute("type","text");q.style.marginRight="16px";q.style.width="60px";q.style.marginLeft="4px";q.style.marginRight="12px";q.value=this.lastExportZoom||"100%";y.appendChild(q);mxUtils.write(y,mxResources.get("borderWidth")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.value=this.lastExportBorder||"0";y.appendChild(C);mxUtils.br(y);var A=this.addCheckbox(y,mxResources.get("selectionOnly"),!1,
L.isSelectionEmpty()),B=document.createElement("input");B.style.marginTop="16px";B.style.marginRight="8px";B.style.marginLeft="24px";B.setAttribute("disabled","disabled");B.setAttribute("type","checkbox");var G=document.createElement("select");G.style.marginTop="16px";G.style.marginLeft="8px";c=["selectionOnly","diagram","page"];var M={};for(K=0;K<c.length;K++)if(!L.isSelectionEmpty()||"selectionOnly"!=c[K]){var H=document.createElement("option");mxUtils.write(H,mxResources.get(c[K]));H.setAttribute("value",
-c[K]);G.appendChild(H);M[c[K]]=H}A?(mxUtils.write(y,mxResources.get("size")+":"),y.appendChild(G),mxUtils.br(y),N+=26,mxEvent.addListener(G,"change",function(){"selectionOnly"==G.value&&(z.checked=!0)})):p&&(y.appendChild(B),mxUtils.write(y,mxResources.get("crop")),mxUtils.br(y),N+=30,mxEvent.addListener(z,"change",function(){z.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));L.isSelectionEmpty()?A&&(z.style.display="none",z.nextSibling.style.display="none",z.nextSibling.nextSibling.style.display=
-"none",N-=30):(G.value="diagram",B.setAttribute("checked","checked"),B.defaultChecked=!0,mxEvent.addListener(z,"change",function(){G.value=z.checked?"selectionOnly":"diagram"}));var F=this.addCheckbox(y,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=x),J=null;Editor.isDarkMode()&&(J=this.addCheckbox(y,mxResources.get("dark"),!0),N+=26);var R=this.addCheckbox(y,mxResources.get("shadow"),L.shadowVisible),W=null;if("png"==x||"jpeg"==x)W=this.addCheckbox(y,mxResources.get("grid"),!1,this.isOffline()||
+c[K]);G.appendChild(H);M[c[K]]=H}z?(mxUtils.write(y,mxResources.get("size")+":"),y.appendChild(G),mxUtils.br(y),N+=26,mxEvent.addListener(G,"change",function(){"selectionOnly"==G.value&&(A.checked=!0)})):p&&(y.appendChild(B),mxUtils.write(y,mxResources.get("crop")),mxUtils.br(y),N+=30,mxEvent.addListener(A,"change",function(){A.checked?B.removeAttribute("disabled"):B.setAttribute("disabled","disabled")}));L.isSelectionEmpty()?z&&(A.style.display="none",A.nextSibling.style.display="none",A.nextSibling.nextSibling.style.display=
+"none",N-=30):(G.value="diagram",B.setAttribute("checked","checked"),B.defaultChecked=!0,mxEvent.addListener(A,"change",function(){G.value=A.checked?"selectionOnly":"diagram"}));var F=this.addCheckbox(y,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=x),J=null;Editor.isDarkMode()&&(J=this.addCheckbox(y,mxResources.get("dark"),!0),N+=26);var R=this.addCheckbox(y,mxResources.get("shadow"),L.shadowVisible),W=null;if("png"==x||"jpeg"==x)W=this.addCheckbox(y,mxResources.get("grid"),!1,this.isOffline()||
!this.canvasSupported,!1,!0),N+=30;var O=this.addCheckbox(y,mxResources.get("includeCopyOfMyDiagram"),v,null,null,"jpeg"!=x);O.style.marginBottom="16px";var V=document.createElement("input");V.style.marginBottom="16px";V.style.marginRight="8px";V.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||V.setAttribute("disabled","disabled");var U=document.createElement("select");U.style.maxWidth="260px";U.style.marginLeft="8px";U.style.marginRight="10px";U.style.marginBottom="16px";
U.className="geBtn";p=document.createElement("option");p.setAttribute("value","none");mxUtils.write(p,mxResources.get("noChange"));U.appendChild(p);p=document.createElement("option");p.setAttribute("value","embedFonts");mxUtils.write(p,mxResources.get("embedFonts"));U.appendChild(p);p=document.createElement("option");p.setAttribute("value","lblToSvg");mxUtils.write(p,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||U.appendChild(p);mxEvent.addListener(U,"change",mxUtils.bind(this,
-function(){"lblToSvg"==U.value?(V.checked=!0,V.setAttribute("disabled","disabled"),M.page.style.display="none","page"==G.value&&(G.value="diagram"),R.checked=!1,R.setAttribute("disabled","disabled"),n.style.display="inline-block",X.style.display="none"):"disabled"==V.getAttribute("disabled")&&(V.checked=!1,V.removeAttribute("disabled"),R.removeAttribute("disabled"),M.page.style.display="",n.style.display="none",X.style.display="")}));e&&(y.appendChild(V),mxUtils.write(y,mxResources.get("embedImages")),
-mxUtils.br(y),mxUtils.write(y,mxResources.get("txtSettings")+":"),y.appendChild(U),mxUtils.br(y),N+=60);var X=document.createElement("select");X.style.maxWidth="260px";X.style.marginLeft="8px";X.style.marginRight="10px";X.className="geBtn";e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));X.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));X.appendChild(e);
-e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));X.appendChild(e);var n=document.createElement("div");mxUtils.write(n,mxResources.get("LinksLost"));n.style.margin="7px";n.style.display="none";"svg"==x&&(mxUtils.write(y,mxResources.get("links")+":"),y.appendChild(X),y.appendChild(n),mxUtils.br(y),mxUtils.br(y),N+=50);g=new CustomDialog(this,y,mxUtils.bind(this,function(){this.lastExportBorder=C.value;this.lastExportZoom=q.value;
-m(q.value,F.checked,!z.checked,R.checked,O.checked,V.checked,C.value,B.checked,!1,X.value,null!=W?W.checked:null,null!=J?J.checked:null,G.value,"embedFonts"==U.value,"lblToSvg"==U.value)}),null,g,k);this.showDialog(g.container,340,N,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,g,k,m){var p=document.createElement("div");p.style.whiteSpace="nowrap";
-var v=this.editor.graph;if(null!=e){var x=document.createElement("h3");mxUtils.write(x,e);x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(x)}var A=this.addCheckbox(p,mxResources.get("fit"),!0),y=this.addCheckbox(p,mxResources.get("shadow"),v.shadowVisible&&k,!k),L=this.addCheckbox(p,g),N=this.addCheckbox(p,mxResources.get("lightbox"),!0),K=this.addEditButton(p,N),q=K.getEditInput(),C=1<v.model.getChildCount(v.model.getRoot()),z=this.addCheckbox(p,mxResources.get("layers"),
-C,!C);z.style.marginLeft=q.style.marginLeft;z.style.marginBottom="12px";z.style.marginTop="8px";mxEvent.addListener(N,"change",function(){N.checked?(C&&z.removeAttribute("disabled"),q.removeAttribute("disabled")):(z.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&N.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,p,mxUtils.bind(this,function(){c(A.checked,y.checked,L.checked,
-N.checked,K.getLink(),z.checked)}),null,mxResources.get("embed"),m);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,g,k,m,p,v,x){function A(q){var C=" ",z="";k&&(C=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(null!=L?"&page="+L:"")+(m?"&edit=_blank":"")+(p?"&layers=1":"")+"');}})(this);\"",z+="cursor:pointer;");c&&(z+="max-width:100%;");var B="";g&&(B=' width="'+Math.round(y.width)+'" height="'+Math.round(y.height)+'"');v('<img src="'+q+'"'+B+(""!=z?' style="'+z+'"':"")+C+"/>")}var y=this.editor.graph.getGraphBounds(),L=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(q){var C=k?this.getFileData(!0):null;q=
-this.createImageDataUri(q,C,"png");A(q)}),null,null,null,mxUtils.bind(this,function(q){x({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),y.width*y.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var N="";g&&(N="&w="+Math.round(2*y.width)+"&h="+Math.round(2*y.height));var K=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(k?"1":"0")+N+"&xml="+encodeURIComponent(e));K.send(mxUtils.bind(this,function(){200<=K.getStatus()&&
-299>=K.getStatus()?A("data:image/png;base64,"+K.getText()):x({message:mxResources.get("unknownError")})}))}else x({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,g,k,m,p,v){var x=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),A=x.getElementsByTagName("a");if(null!=A)for(var y=0;y<A.length;y++){var L=A[y].getAttribute("href");null!=L&&"#"==L.charAt(0)&&"_blank"==A[y].getAttribute("target")&&A[y].removeAttribute("target")}k&&
+function(){"lblToSvg"==U.value?(V.checked=!0,V.setAttribute("disabled","disabled"),M.page.style.display="none","page"==G.value&&(G.value="diagram"),R.checked=!1,R.setAttribute("disabled","disabled"),n.style.display="inline-block",Y.style.display="none"):"disabled"==V.getAttribute("disabled")&&(V.checked=!1,V.removeAttribute("disabled"),R.removeAttribute("disabled"),M.page.style.display="",n.style.display="none",Y.style.display="")}));e&&(y.appendChild(V),mxUtils.write(y,mxResources.get("embedImages")),
+mxUtils.br(y),mxUtils.write(y,mxResources.get("txtSettings")+":"),y.appendChild(U),mxUtils.br(y),N+=60);var Y=document.createElement("select");Y.style.maxWidth="260px";Y.style.marginLeft="8px";Y.style.marginRight="10px";Y.className="geBtn";e=document.createElement("option");e.setAttribute("value","auto");mxUtils.write(e,mxResources.get("automatic"));Y.appendChild(e);e=document.createElement("option");e.setAttribute("value","blank");mxUtils.write(e,mxResources.get("openInNewWindow"));Y.appendChild(e);
+e=document.createElement("option");e.setAttribute("value","self");mxUtils.write(e,mxResources.get("openInThisWindow"));Y.appendChild(e);var n=document.createElement("div");mxUtils.write(n,mxResources.get("LinksLost"));n.style.margin="7px";n.style.display="none";"svg"==x&&(mxUtils.write(y,mxResources.get("links")+":"),y.appendChild(Y),y.appendChild(n),mxUtils.br(y),mxUtils.br(y),N+=50);g=new CustomDialog(this,y,mxUtils.bind(this,function(){this.lastExportBorder=C.value;this.lastExportZoom=q.value;
+m(q.value,F.checked,!A.checked,R.checked,O.checked,V.checked,C.value,B.checked,!1,Y.value,null!=W?W.checked:null,null!=J?J.checked:null,G.value,"embedFonts"==U.value,"lblToSvg"==U.value)}),null,g,k);this.showDialog(g.container,340,N,!0,!0,null,null,null,null,!0);q.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?q.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(c,e,g,k,m){var p=document.createElement("div");p.style.whiteSpace="nowrap";
+var v=this.editor.graph;if(null!=e){var x=document.createElement("h3");mxUtils.write(x,e);x.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";p.appendChild(x)}var z=this.addCheckbox(p,mxResources.get("fit"),!0),y=this.addCheckbox(p,mxResources.get("shadow"),v.shadowVisible&&k,!k),L=this.addCheckbox(p,g),N=this.addCheckbox(p,mxResources.get("lightbox"),!0),K=this.addEditButton(p,N),q=K.getEditInput(),C=1<v.model.getChildCount(v.model.getRoot()),A=this.addCheckbox(p,mxResources.get("layers"),
+C,!C);A.style.marginLeft=q.style.marginLeft;A.style.marginBottom="12px";A.style.marginTop="8px";mxEvent.addListener(N,"change",function(){N.checked?(C&&A.removeAttribute("disabled"),q.removeAttribute("disabled")):(A.setAttribute("disabled","disabled"),q.setAttribute("disabled","disabled"));q.checked&&N.checked?K.getEditSelect().removeAttribute("disabled"):K.getEditSelect().setAttribute("disabled","disabled")});e=new CustomDialog(this,p,mxUtils.bind(this,function(){c(z.checked,y.checked,L.checked,
+N.checked,K.getLink(),A.checked)}),null,mxResources.get("embed"),m);this.showDialog(e.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(c,e,g,k,m,p,v,x){function z(q){var C=" ",A="";k&&(C=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
+EditorUi.lightboxHost+"/?client=1"+(null!=L?"&page="+L:"")+(m?"&edit=_blank":"")+(p?"&layers=1":"")+"');}})(this);\"",A+="cursor:pointer;");c&&(A+="max-width:100%;");var B="";g&&(B=' width="'+Math.round(y.width)+'" height="'+Math.round(y.height)+'"');v('<img src="'+q+'"'+B+(""!=A?' style="'+A+'"':"")+C+"/>")}var y=this.editor.graph.getGraphBounds(),L=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(q){var C=k?this.getFileData(!0):null;q=
+this.createImageDataUri(q,C,"png");z(q)}),null,null,null,mxUtils.bind(this,function(q){x({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,e,null,null,Editor.defaultBorder);else if(e=this.getFileData(!0),y.width*y.height<=MAX_AREA&&e.length<=MAX_REQUEST_SIZE){var N="";g&&(N="&w="+Math.round(2*y.width)+"&h="+Math.round(2*y.height));var K=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(k?"1":"0")+N+"&xml="+encodeURIComponent(e));K.send(mxUtils.bind(this,function(){200<=K.getStatus()&&
+299>=K.getStatus()?z("data:image/png;base64,"+K.getText()):x({message:mxResources.get("unknownError")})}))}else x({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(c,e,g,k,m,p,v){var x=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),z=x.getElementsByTagName("a");if(null!=z)for(var y=0;y<z.length;y++){var L=z[y].getAttribute("href");null!=L&&"#"==L.charAt(0)&&"_blank"==z[y].getAttribute("target")&&z[y].removeAttribute("target")}k&&
x.setAttribute("content",this.getFileData(!0));e&&this.editor.graph.addSvgShadow(x);if(g){var N=" ",K="";k&&(N="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(m?"&edit=_blank":"")+(p?"&layers=1":
"")+"');}})(this);\"",K+="cursor:pointer;");c&&(K+="max-width:100%;");this.editor.convertImages(x,mxUtils.bind(this,function(q){v('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(q))+'"'+(""!=K?' style="'+K+'"':"")+N+"/>")}))}else K="",k&&(e=this.getSelectedPageIndex(),x.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
EditorUi.lightboxHost+"/?client=1"+(null!=e?"&page="+e:"")+(m?"&edit=_blank":"")+(p?"&layers=1":"")+"');}}})(this);"),K+="cursor:pointer;"),c&&(c=parseInt(x.getAttribute("width")),m=parseInt(x.getAttribute("height")),x.setAttribute("viewBox","-0.5 -0.5 "+c+" "+m),K+="max-width:100%;max-height:"+m+"px;",x.removeAttribute("height")),""!=K&&x.setAttribute("style",K),this.editor.addFontCss(x),this.editor.graph.mathEnabled&&this.editor.addMathCss(x),v(mxUtils.getXml(x))};EditorUi.prototype.timeSince=function(c){c=
Math.floor((new Date-c)/1E3);var e=Math.floor(c/31536E3);if(1<e)return e+" "+mxResources.get("years");e=Math.floor(c/2592E3);if(1<e)return e+" "+mxResources.get("months");e=Math.floor(c/86400);if(1<e)return e+" "+mxResources.get("days");e=Math.floor(c/3600);if(1<e)return e+" "+mxResources.get("hours");e=Math.floor(c/60);return 1<e?e+" "+mxResources.get("minutes"):1==e?e+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(c,e){if(null!=c){var g=null;if("diagram"==c.nodeName)g=
c;else if("mxfile"==c.nodeName){var k=c.getElementsByTagName("diagram");if(0<k.length){g=k[0];var m=e.getGlobalVariable;e.getGlobalVariable=function(p){return"page"==p?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==p?1:m.apply(this,arguments)}}}null!=g&&(c=Editor.parseDiagramNode(g))}k=this.editor.graph;try{this.editor.graph=e,this.editor.setGraphXml(c)}catch(p){}finally{this.editor.graph=k}return c};EditorUi.prototype.getPngFileProperties=function(c){var e=1,g=0;if(null!=
c){if(c.hasAttribute("scale")){var k=parseFloat(c.getAttribute("scale"));!isNaN(k)&&0<k&&(e=k)}c.hasAttribute("border")&&(k=parseInt(c.getAttribute("border")),!isNaN(k)&&0<k&&(g=k))}return{scale:e,border:g}};EditorUi.prototype.getEmbeddedPng=function(c,e,g,k,m){try{var p=this.editor.graph,v=null!=p.themes&&"darkTheme"==p.defaultThemeName,x=null;if(null!=g&&0<g.length)p=this.createTemporaryGraph(v?p.getDefaultStylesheet():p.getStylesheet()),document.body.appendChild(p.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
-!0),p),x=g;else if(v||null!=this.pages&&this.currentPage!=this.pages[0]){p=this.createTemporaryGraph(v?p.getDefaultStylesheet():p.getStylesheet());var A=p.getGlobalVariable;p.setBackgroundImage=this.editor.graph.setBackgroundImage;var y=this.pages[0];this.currentPage==y?p.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&p.setBackgroundImage(y.viewState.backgroundImage);p.getGlobalVariable=function(L){return"page"==L?y.getName():"pagenumber"==L?1:A.apply(this,
+!0),p),x=g;else if(v||null!=this.pages&&this.currentPage!=this.pages[0]){p=this.createTemporaryGraph(v?p.getDefaultStylesheet():p.getStylesheet());var z=p.getGlobalVariable;p.setBackgroundImage=this.editor.graph.setBackgroundImage;var y=this.pages[0];this.currentPage==y?p.setBackgroundImage(this.editor.graph.backgroundImage):null!=y.viewState&&null!=y.viewState&&p.setBackgroundImage(y.viewState.backgroundImage);p.getGlobalVariable=function(L){return"page"==L?y.getName():"pagenumber"==L?1:z.apply(this,
arguments)};document.body.appendChild(p.container);p.model.setRoot(y.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(L){try{null==x&&(x=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var N=L.toDataURL("image/png");N=Editor.writeGraphModelToPng(N,"tEXt","mxfile",encodeURIComponent(x));c(N.substring(N.lastIndexOf(",")+1));p!=this.editor.graph&&p.container.parentNode.removeChild(p.container)}catch(K){null!=e&&e(K)}}),null,null,null,mxUtils.bind(this,function(L){null!=e&&
-e(L)}),null,null,k,null,p.shadowVisible,null,p,m,null,null,null,"diagram",null)}catch(L){null!=e&&e(L)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,g,k,m,p,v,x,A,y,L,N,K){x=null!=x?x:!0;L=null!=L?L:0;v=null!=A?A:e.background;v==mxConstants.NONE&&(v=null);p=e.getSvg(v,y,L,null,null,p,null,null,null,e.shadowVisible||N,null,K,"diagram");(e.shadowVisible||N)&&e.addSvgShadow(p,null,null,0==L);null!=c&&p.setAttribute("content",c);null!=g&&p.setAttribute("resource",g);var q=mxUtils.bind(this,function(C){C=
-(k?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(C);null!=m&&m(C);return C});e.mathEnabled&&this.editor.addMathCss(p);if(null!=m)this.embedFonts(p,mxUtils.bind(this,function(C){x?this.editor.convertImages(C,mxUtils.bind(this,function(z){q(z)})):q(C)}));else return q(p)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(k){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,k,m,p,v,x,A,y,L,N,K){A=null!=A?A:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var q=this.editor.graph.isSelectionEmpty();g=null!=g?g:q;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(C){this.spinner.stop();try{this.saveCanvas(C,
-m?this.getFileData(!0,null,null,null,g,x):null,A,null==this.pages||0==this.pages.length,L)}catch(z){this.handleError(z)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),null,g,c||1,e,k,null,null,p,v,y,N,K)}catch(C){this.spinner.stop(),this.handleError(C)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,e,g,k,m,p,v){e=null!=e?e:0;g=null!=g?g:0;var x=[];try{var A=
-this.editor.graph;if(null!=c&&0<c.length){A.model.beginUpdate();try{var y=mxUtils.parseXml(c);c={};var L=this.editor.extractGraphModel(y.documentElement,null!=this.pages);if(null!=L&&"mxfile"==L.nodeName&&null!=this.pages){var N=L.getElementsByTagName("diagram");if(1==N.length&&!p){if(L=Editor.parseDiagramNode(N[0]),null!=this.currentPage&&(c[N[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var K=N[0].getAttribute("name");null!=K&&""!=K&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,K))}}else if(0<N.length){p=[];var q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[N[0].getAttribute("id")]=this.pages[0].getId(),L=Editor.parseDiagramNode(N[0]),k=!1,q=1);for(;q<N.length;q++){var C=N[q].getAttribute("id");N[q].removeAttribute("id");var z=this.updatePageRoot(new DiagramPage(N[q]));c[C]=N[q].getAttribute("id");var B=this.pages.length;null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[B+1]));A.model.execute(new ChangePage(this,z,z,B,
-!0));p.push(z)}this.updatePageLinks(c,p)}}if(null!=L&&"mxGraphModel"===L.nodeName){x=A.importGraphModel(L,e,g,k);if(null!=x)for(q=0;q<x.length;q++)this.updatePageLinksForCell(c,x[q]);var G=A.parseBackgroundImage(L.getAttribute("backgroundImage"));if(null!=G&&null!=G.originalSrc){this.updateBackgroundPageLink(c,G);var M=new ChangePageSetup(this,null,G);M.ignoreColor=!0;A.model.execute(M)}}v&&this.insertHandler(x,null,null,A.defaultVertexStyle,A.defaultEdgeStyle,!1,!0)}finally{A.model.endUpdate()}}}catch(H){if(m)throw H;
+e(L)}),null,null,k,null,p.shadowVisible,null,p,m,null,null,null,"diagram",null)}catch(L){null!=e&&e(L)}};EditorUi.prototype.getEmbeddedSvg=function(c,e,g,k,m,p,v,x,z,y,L,N,K){x=null!=x?x:!0;L=null!=L?L:0;v=null!=z?z:e.background;v==mxConstants.NONE&&(v=null);p=e.getSvg(v,y,L,null,null,p,null,null,null,e.shadowVisible||N,null,K,"diagram");(e.shadowVisible||N)&&e.addSvgShadow(p,null,null,0==L);null!=c&&p.setAttribute("content",c);null!=g&&p.setAttribute("resource",g);var q=mxUtils.bind(this,function(C){C=
+(k?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(C);null!=m&&m(C);return C});e.mathEnabled&&this.editor.addMathCss(p);if(null!=m)this.embedFonts(p,mxUtils.bind(this,function(C){x?this.editor.convertImages(C,mxUtils.bind(this,function(A){q(A)})):q(C)}));else return q(p)};EditorUi.prototype.embedFonts=function(c,e){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(c,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(c,g),e(c)}catch(k){e(c)}}))}catch(g){e(c)}}))};EditorUi.prototype.exportImage=function(c,e,g,k,m,p,v,x,z,y,L,N,K){z=null!=z?z:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var q=this.editor.graph.isSelectionEmpty();g=null!=g?g:q;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(C){this.spinner.stop();try{this.saveCanvas(C,
+m?this.getFileData(!0,null,null,null,g,x):null,z,null==this.pages||0==this.pages.length,L)}catch(A){this.handleError(A)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),null,g,c||1,e,k,null,null,p,v,y,N,K)}catch(C){this.spinner.stop(),this.handleError(C)}}};EditorUi.prototype.isCorsEnabledForUrl=function(c){return this.editor.isCorsEnabledForUrl(c)};EditorUi.prototype.importXml=function(c,e,g,k,m,p,v){e=null!=e?e:0;g=null!=g?g:0;var x=[];try{var z=
+this.editor.graph;if(null!=c&&0<c.length){z.model.beginUpdate();try{var y=mxUtils.parseXml(c);c={};var L=this.editor.extractGraphModel(y.documentElement,null!=this.pages);if(null!=L&&"mxfile"==L.nodeName&&null!=this.pages){var N=L.getElementsByTagName("diagram");if(1==N.length&&!p){if(L=Editor.parseDiagramNode(N[0]),null!=this.currentPage&&(c[N[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var K=N[0].getAttribute("name");null!=K&&""!=K&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,K))}}else if(0<N.length){p=[];var q=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(c[N[0].getAttribute("id")]=this.pages[0].getId(),L=Editor.parseDiagramNode(N[0]),k=!1,q=1);for(;q<N.length;q++){var C=N[q].getAttribute("id");N[q].removeAttribute("id");var A=this.updatePageRoot(new DiagramPage(N[q]));c[C]=N[q].getAttribute("id");var B=this.pages.length;null==A.getName()&&A.setName(mxResources.get("pageWithNumber",[B+1]));z.model.execute(new ChangePage(this,A,A,B,
+!0));p.push(A)}this.updatePageLinks(c,p)}}if(null!=L&&"mxGraphModel"===L.nodeName){x=z.importGraphModel(L,e,g,k);if(null!=x)for(q=0;q<x.length;q++)this.updatePageLinksForCell(c,x[q]);var G=z.parseBackgroundImage(L.getAttribute("backgroundImage"));if(null!=G&&null!=G.originalSrc){this.updateBackgroundPageLink(c,G);var M=new ChangePageSetup(this,null,G);M.ignoreColor=!0;z.model.execute(M)}}v&&this.insertHandler(x,null,null,z.defaultVertexStyle,z.defaultEdgeStyle,!1,!0)}finally{z.model.endUpdate()}}}catch(H){if(m)throw H;
this.handleError(H)}return x};EditorUi.prototype.updatePageLinks=function(c,e){for(var g=0;g<e.length;g++)this.updatePageLinksForCell(c,e[g].root),null!=e[g].viewState&&this.updateBackgroundPageLink(c,e[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(c,e){try{if(null!=e&&Graph.isPageLink(e.originalSrc)){var g=c[e.originalSrc.substring(e.originalSrc.indexOf(",")+1)];null!=g&&(e.originalSrc="data:page/id,"+g)}}catch(k){}};EditorUi.prototype.updatePageLinksForCell=
function(c,e){var g=document.createElement("div"),k=this.editor.graph,m=k.getLinkForCell(e);null!=m&&k.setLinkForCell(e,this.updatePageLink(c,m));if(k.isHtmlLabel(e)){g.innerHTML=k.sanitizeHtml(k.getLabel(e));for(var p=g.getElementsByTagName("a"),v=!1,x=0;x<p.length;x++)m=p[x].getAttribute("href"),null!=m&&(p[x].setAttribute("href",this.updatePageLink(c,m)),v=!0);v&&k.labelChanged(e,g.innerHTML)}for(x=0;x<k.model.getChildCount(e);x++)this.updatePageLinksForCell(c,k.model.getChildAt(e,x))};EditorUi.prototype.updatePageLink=
function(c,e){if(Graph.isPageLink(e)){var g=c[e.substring(e.indexOf(",")+1)];e=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==e.substring(0,17))try{var k=JSON.parse(e.substring(17));if(null!=k.actions){for(var m=0;m<k.actions.length;m++){var p=k.actions[m];if(null!=p.open&&Graph.isPageLink(p.open)){var v=p.open.substring(p.open.indexOf(",")+1);g=c[v];null!=g?p.open="data:page/id,"+g:null==this.getPageById(v)&&delete p.open}}e="data:action/json,"+JSON.stringify(k)}}catch(x){}return e};
-EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,g,k,m){k=null!=k?k:c.name;g=null!=g?g:mxUtils.bind(this,function(v){this.handleError(v)});var p=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var v=this.isRemoteVisioFormat(k);try{var x="UNKNOWN-VISIO",A=k.lastIndexOf(".");if(0<=A&&A<k.length)x=k.substring(A+1).toUpperCase();else{var y=k.lastIndexOf("/");0<=
+EditorUi.prototype.isRemoteVisioFormat=function(c){return/(\.v(sd|dx))($|\?)/i.test(c)||/(\.vs(s|x))($|\?)/i.test(c)};EditorUi.prototype.importVisio=function(c,e,g,k,m){k=null!=k?k:c.name;g=null!=g?g:mxUtils.bind(this,function(v){this.handleError(v)});var p=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var v=this.isRemoteVisioFormat(k);try{var x="UNKNOWN-VISIO",z=k.lastIndexOf(".");if(0<=z&&z<k.length)x=k.substring(z+1).toUpperCase();else{var y=k.lastIndexOf("/");0<=
y&&y<k.length&&(k=k.substring(y+1))}EditorUi.logEvent({category:x+"-MS-IMPORT-FILE",action:"filename_"+k,label:v?"remote":"local"})}catch(N){}if(v)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{v=new FormData;v.append("file1",c,k);var L=new XMLHttpRequest;L.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(k)?"?stencil=1":""));L.responseType="blob";this.addRemoteServiceSecurityCheck(L);
null!=m&&L.setRequestHeader("x-convert-custom",m);L.onreadystatechange=mxUtils.bind(this,function(){if(4==L.readyState)if(200<=L.status&&299>=L.status)try{var N=L.response;if("text/xml"==N.type){var K=new FileReader;K.onload=mxUtils.bind(this,function(q){try{e(q.target.result)}catch(C){g({message:mxResources.get("errorLoadingFile")})}});K.readAsText(N)}else this.doImportVisio(N,e,g,k)}catch(q){g(q)}else try{""==L.responseType||"text"==L.responseType?g({message:L.responseText}):(K=new FileReader,K.onload=
function(){g({message:JSON.parse(K.result).Message})},K.readAsText(L.response))}catch(q){g({})}});L.send(v)}else try{this.doImportVisio(c,e,g,k)}catch(N){g(N)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?p():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",p))};EditorUi.prototype.importGraphML=function(c,e,g){g=null!=g?g:mxUtils.bind(this,function(m){this.handleError(m)});
@@ -11923,40 +11923,40 @@ this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handle
JSON.parse(c);e(LucidImporter.importState(m));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+c.length}),null!=window.console&&"1"==urlParams.test){var p=[(new Date).toISOString(),"convertLucidChart",m];null!=m.state&&p.push(JSON.parse(m.state));if(null!=m.svgThumbs)for(var v=0;v<m.svgThumbs.length;v++)p.push(Editor.createSvgDataUri(m.svgThumbs[v]));null!=m.thumb&&p.push(m.thumb);console.log.apply(console,p)}}catch(x){}}catch(x){null!=window.console&&console.error(x),g(x)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(k,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",k)})})})}):mxscript("js/extensions.min.js",k))};EditorUi.prototype.generateMermaidImage=function(c,
e,g,k){var m=this,p=function(){try{this.loadingMermaid=!1,e=null!=e?e:mxUtils.clone(EditorUi.defaultMermaidConfig),e.securityLevel="strict",e.startOnLoad=!1,Editor.isDarkMode()&&(e.theme="dark"),mermaid.mermaidAPI.initialize(e),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),c,function(v){try{if(mxClient.IS_IE||mxClient.IS_IE11)v=v.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var x=mxUtils.parseXml(v).getElementsByTagName("svg");
-if(0<x.length){var A=parseFloat(x[0].getAttribute("width")),y=parseFloat(x[0].getAttribute("height"));if(isNaN(A)||isNaN(y))try{var L=x[0].getAttribute("viewBox").split(/\s+/);A=parseFloat(L[2]);y=parseFloat(L[3])}catch(N){A=A||100,y=y||100}g(m.convertDataUri(Editor.createSvgDataUri(v)),A,y)}else k({message:mxResources.get("invalidInput")})}catch(N){k(N)}})}catch(v){k(v)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?p():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-p):mxscript("js/extensions.min.js",p))};EditorUi.prototype.generatePlantUmlImage=function(c,e,g,k){function m(x,A,y){c1=x>>2;c2=(x&3)<<4|A>>4;c3=(A&15)<<2|y>>6;c4=y&63;r="";r+=p(c1&63);r+=p(c2&63);r+=p(c3&63);return r+=p(c4&63)}function p(x){if(10>x)return String.fromCharCode(48+x);x-=10;if(26>x)return String.fromCharCode(65+x);x-=26;if(26>x)return String.fromCharCode(97+x);x-=26;return 0==x?"-":1==x?"_":"?"}var v=new XMLHttpRequest;v.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":
-PLANT_URL+"/svg/")+function(x){r="";for(i=0;i<x.length;i+=3)r=i+2==x.length?r+m(x.charCodeAt(i),x.charCodeAt(i+1),0):i+1==x.length?r+m(x.charCodeAt(i),0,0):r+m(x.charCodeAt(i),x.charCodeAt(i+1),x.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(v.responseType="blob");v.onload=function(x){if(200<=this.status&&300>this.status)if("txt"==e)g(this.response);else{var A=new FileReader;A.readAsDataURL(this.response);A.onloadend=function(y){var L=new Image;L.onload=
-function(){try{var N=L.width,K=L.height;if(0==N&&0==K){var q=A.result,C=q.indexOf(","),z=decodeURIComponent(escape(atob(q.substring(C+1)))),B=mxUtils.parseXml(z).getElementsByTagName("svg");0<B.length&&(N=parseFloat(B[0].getAttribute("width")),K=parseFloat(B[0].getAttribute("height")))}g(A.result,N,K)}catch(G){k(G)}};L.src=A.result};A.onerror=function(y){k(y)}}else k(x)};v.onerror=function(x){k(x)};v.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var k=this.editor.graph,m=null;k.getModel().beginUpdate();
+if(0<x.length){var z=parseFloat(x[0].getAttribute("width")),y=parseFloat(x[0].getAttribute("height"));if(isNaN(z)||isNaN(y))try{var L=x[0].getAttribute("viewBox").split(/\s+/);z=parseFloat(L[2]);y=parseFloat(L[3])}catch(N){z=z||100,y=y||100}g(m.convertDataUri(Editor.createSvgDataUri(v)),z,y)}else k({message:mxResources.get("invalidInput")})}catch(N){k(N)}})}catch(v){k(v)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?p():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+p):mxscript("js/extensions.min.js",p))};EditorUi.prototype.generatePlantUmlImage=function(c,e,g,k){function m(x,z,y){c1=x>>2;c2=(x&3)<<4|z>>4;c3=(z&15)<<2|y>>6;c4=y&63;r="";r+=p(c1&63);r+=p(c2&63);r+=p(c3&63);return r+=p(c4&63)}function p(x){if(10>x)return String.fromCharCode(48+x);x-=10;if(26>x)return String.fromCharCode(65+x);x-=26;if(26>x)return String.fromCharCode(97+x);x-=26;return 0==x?"-":1==x?"_":"?"}var v=new XMLHttpRequest;v.open("GET",("txt"==e?PLANT_URL+"/txt/":"png"==e?PLANT_URL+"/png/":
+PLANT_URL+"/svg/")+function(x){r="";for(i=0;i<x.length;i+=3)r=i+2==x.length?r+m(x.charCodeAt(i),x.charCodeAt(i+1),0):i+1==x.length?r+m(x.charCodeAt(i),0,0):r+m(x.charCodeAt(i),x.charCodeAt(i+1),x.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(c))),!0);"txt"!=e&&(v.responseType="blob");v.onload=function(x){if(200<=this.status&&300>this.status)if("txt"==e)g(this.response);else{var z=new FileReader;z.readAsDataURL(this.response);z.onloadend=function(y){var L=new Image;L.onload=
+function(){try{var N=L.width,K=L.height;if(0==N&&0==K){var q=z.result,C=q.indexOf(","),A=decodeURIComponent(escape(atob(q.substring(C+1)))),B=mxUtils.parseXml(A).getElementsByTagName("svg");0<B.length&&(N=parseFloat(B[0].getAttribute("width")),K=parseFloat(B[0].getAttribute("height")))}g(z.result,N,K)}catch(G){k(G)}};L.src=z.result};z.onerror=function(y){k(y)}}else k(x)};v.onerror=function(x){k(x)};v.send()};EditorUi.prototype.insertAsPreText=function(c,e,g){var k=this.editor.graph,m=null;k.getModel().beginUpdate();
try{m=k.insertVertex(null,null,"<pre>"+c+"</pre>",e,g,1,1,"text;html=1;align=left;verticalAlign=top;"),k.updateCellSize(m,!0)}finally{k.getModel().endUpdate()}return m};EditorUi.prototype.insertTextAt=function(c,e,g,k,m,p,v,x){p=null!=p?p:!0;v=null!=v?v:!0;if(null!=c)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(c.replace(/\s+/g," "),mxUtils.bind(this,function(K){4==
-K.readyState&&200<=K.status&&299>=K.status&&this.editor.graph.setSelectionCells(this.insertTextAt(K.responseText,e,g,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(m||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var A=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var y=Editor.extractGraphModelFromPdf(c);if(null!=y&&0<y.length)return this.importXml(y,e,g,p,!0,x)}if(Editor.isPngDataUrl(c)&&(y=Editor.extractGraphModelFromPng(c),null!=y&&0<y.length))return this.importXml(y,
-e,g,p,!0,x);if("data:image/svg+xml;"==c.substring(0,19))try{y=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(y=c.substring(c.indexOf(",")+1),y=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y,!0)):y=decodeURIComponent(c.substring(c.indexOf(",")+1));var L=this.importXml(y,e,g,p,!0,x);if(0<L.length)return L}catch(K){}this.loadImage(c,mxUtils.bind(this,function(K){if("data:"==c.substring(0,5))this.resizeImage(K,c,mxUtils.bind(this,function(z,B,G){A.setSelectionCell(A.insertVertex(null,null,
-"",A.snap(e),A.snap(g),B,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(z)+";"))}),v,this.maxImageSize);else{var q=Math.min(1,Math.min(this.maxImageSize/K.width,this.maxImageSize/K.height)),C=Math.round(K.width*q);K=Math.round(K.height*q);A.setSelectionCell(A.insertVertex(null,null,"",A.snap(e),A.snap(g),C,K,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-c+";"))}}),mxUtils.bind(this,function(){var K=null;A.getModel().beginUpdate();try{K=A.insertVertex(A.getDefaultParent(),null,c,A.snap(e),A.snap(g),1,1,"text;"+(k?"html=1;":"")),A.updateCellSize(K),A.fireEvent(new mxEventObject("textInserted","cells",[K]))}finally{A.getModel().endUpdate()}A.setSelectionCell(K)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,g,p,null,x);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
-function(K){this.editor.graph.setSelectionCells(this.importXml(K,e,g,p,null,x))}),mxUtils.bind(this,function(K){this.handleError(K)}));else{A=this.editor.graph;m=null;A.getModel().beginUpdate();try{m=A.insertVertex(A.getDefaultParent(),null,"",A.snap(e),A.snap(g),1,1,"text;whiteSpace=wrap;"+(k?"html=1;":""));A.fireEvent(new mxEventObject("textInserted","cells",[m]));"<"==c.charAt(0)&&c.indexOf(">")==c.length-1&&(c=mxUtils.htmlEntities(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+
-"...");m.value=c;A.updateCellSize(m);if(0<this.maxTextWidth&&m.geometry.width>this.maxTextWidth){var N=A.getPreferredSizeForCell(m,this.maxTextWidth);m.geometry.width=N.width;m.geometry.height=N.height}Graph.isLink(m.value)&&A.setLinkForCell(m,m.value);m.geometry.width+=A.gridSize;m.geometry.height+=A.gridSize}finally{A.getModel().endUpdate()}return[m]}}return[]};EditorUi.prototype.formatFileSize=function(c){var e=-1;do c/=1024,e++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[e]};
+K.readyState&&200<=K.status&&299>=K.status&&this.editor.graph.setSelectionCells(this.insertTextAt(K.responseText,e,g,!0))}));else if("data:"==c.substring(0,5)||!this.isOffline()&&(m||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c))){var z=this.editor.graph;if("data:application/pdf;base64,"==c.substring(0,28)){var y=Editor.extractGraphModelFromPdf(c);if(null!=y&&0<y.length)return this.importXml(y,e,g,p,!0,x)}if(Editor.isPngDataUrl(c)&&(y=Editor.extractGraphModelFromPng(c),null!=y&&0<y.length))return this.importXml(y,
+e,g,p,!0,x);if("data:image/svg+xml;"==c.substring(0,19))try{y=null;"data:image/svg+xml;base64,"==c.substring(0,26)?(y=c.substring(c.indexOf(",")+1),y=window.atob&&!mxClient.IS_SF?atob(y):Base64.decode(y,!0)):y=decodeURIComponent(c.substring(c.indexOf(",")+1));var L=this.importXml(y,e,g,p,!0,x);if(0<L.length)return L}catch(K){}this.loadImage(c,mxUtils.bind(this,function(K){if("data:"==c.substring(0,5))this.resizeImage(K,c,mxUtils.bind(this,function(A,B,G){z.setSelectionCell(z.insertVertex(null,null,
+"",z.snap(e),z.snap(g),B,G,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(A)+";"))}),v,this.maxImageSize);else{var q=Math.min(1,Math.min(this.maxImageSize/K.width,this.maxImageSize/K.height)),C=Math.round(K.width*q);K=Math.round(K.height*q);z.setSelectionCell(z.insertVertex(null,null,"",z.snap(e),z.snap(g),C,K,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+c+";"))}}),mxUtils.bind(this,function(){var K=null;z.getModel().beginUpdate();try{K=z.insertVertex(z.getDefaultParent(),null,c,z.snap(e),z.snap(g),1,1,"text;"+(k?"html=1;":"")),z.updateCellSize(K),z.fireEvent(new mxEventObject("textInserted","cells",[K]))}finally{z.getModel().endUpdate()}z.setSelectionCell(K)}))}else{c=Graph.zapGremlins(mxUtils.trim(c));if(this.isCompatibleString(c))return this.importXml(c,e,g,p,null,x);if(0<c.length)if(this.isLucidChartData(c))this.convertLucidChart(c,mxUtils.bind(this,
+function(K){this.editor.graph.setSelectionCells(this.importXml(K,e,g,p,null,x))}),mxUtils.bind(this,function(K){this.handleError(K)}));else{z=this.editor.graph;m=null;z.getModel().beginUpdate();try{m=z.insertVertex(z.getDefaultParent(),null,"",z.snap(e),z.snap(g),1,1,"text;whiteSpace=wrap;"+(k?"html=1;":""));z.fireEvent(new mxEventObject("textInserted","cells",[m]));"<"==c.charAt(0)&&c.indexOf(">")==c.length-1&&(c=mxUtils.htmlEntities(c));c.length>this.maxTextBytes&&(c=c.substring(0,this.maxTextBytes)+
+"...");m.value=c;z.updateCellSize(m);if(0<this.maxTextWidth&&m.geometry.width>this.maxTextWidth){var N=z.getPreferredSizeForCell(m,this.maxTextWidth);m.geometry.width=N.width;m.geometry.height=N.height}Graph.isLink(m.value)&&z.setLinkForCell(m,m.value);m.geometry.width+=z.gridSize;m.geometry.height+=z.gridSize}finally{z.getModel().endUpdate()}return[m]}}return[]};EditorUi.prototype.formatFileSize=function(c){var e=-1;do c/=1024,e++;while(1024<c);return Math.max(c,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[e]};
EditorUi.prototype.convertDataUri=function(c){if("data:"==c.substring(0,5)){var e=c.indexOf(";");0<e&&(c=c.substring(0,e)+c.substring(c.indexOf(",",e+1)))}return c};EditorUi.prototype.isRemoteFileFormat=function(c,e){return/("contentType":\s*"application\/gliffy\+json")/.test(c)};EditorUi.prototype.isLucidChartData=function(c){return null!=c&&('{"state":"{\\"Properties\\":'==c.substring(0,26)||'{"Properties":'==c.substring(0,14))};EditorUi.prototype.importLocalFile=function(c,e){if(c&&Graph.fileSupport){if(null==
this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(v,x){StorageFile.listFiles(this,
-"F",v,x)});window.openBrowserFile=mxUtils.bind(this,function(v,x,A){StorageFile.getFileContent(this,v,x,A)});window.deleteBrowserFile=mxUtils.bind(this,function(v,x,A){StorageFile.deleteFile(this,v,x,A)});if(!e){var k=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(v){this.hideDialog(v)}));window.openFile.setConsumer(mxUtils.bind(this,function(v,x){null!=x&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(x)?(v=new Blob([v],{type:"application/octet-stream"}),
-this.importVisio(v,mxUtils.bind(this,function(A){this.importXml(A,0,0,!0)}),null,x)):this.editor.graph.setSelectionCells(this.importXml(v,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var m=this.dialog,p=m.close;this.dialog.close=mxUtils.bind(this,function(v){Editor.useLocalStorage=k;p.apply(m,arguments);v&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(c,e,g){var k=this,m=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(p){if(mxUtils.isEmptyObject(p.files))g();else{var v=0,x,A=!1;p.forEach(function(y,L){y=L.name.toLowerCase();"diagram/diagram.xml"==y?(A=!0,L.async("string").then(function(N){0==N.indexOf("<mxfile ")?e(N):g()})):0==y.indexOf("versions/")&&(y=parseInt(y.substr(9)),y>v&&(v=y,x=L))});0<v?x.async("string").then(function(y){(new XMLHttpRequest).upload&&
-k.isRemoteFileFormat(y,c.name)?k.isOffline()?k.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):k.parseFileData(y,mxUtils.bind(this,function(L){4==L.readyState&&(200<=L.status&&299>=L.status?e(L.responseText):g())}),c.name):g()}):A||g()}},function(p){g(p)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.importFile=function(c,e,g,k,m,p,v,x,A,y,L,N){y=null!=
-y?y:!0;var K=!1,q=null,C=mxUtils.bind(this,function(z){var B=null;null!=z&&"<mxlibrary"==z.substring(0,10)?this.loadLibrary(new LocalLibrary(this,z,v)):B=this.importXml(z,g,k,y,null,null!=N?mxEvent.isControlDown(N):null);null!=x&&x(B)});"image"==e.substring(0,5)?(A=!1,"image/png"==e.substring(0,9)&&(e=L?null:this.extractGraphModelFromPng(c),null!=e&&0<e.length&&(q=this.importXml(e,g,k,y,null,null!=N?mxEvent.isControlDown(N):null),A=!0)),A||(e=this.editor.graph,A=c.indexOf(";"),0<A&&(c=c.substring(0,
-A)+c.substring(c.indexOf(",",A+1))),y&&e.isGridEnabled()&&(g=e.snap(g),k=e.snap(k)),q=[e.insertVertex(null,null,"",g,k,m,p,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";")])):/(\.*<graphml )/.test(c)?(K=!0,this.importGraphML(c,C)):null!=A&&null!=v&&(/(\.v(dx|sdx?))($|\?)/i.test(v)||/(\.vs(x|sx?))($|\?)/i.test(v))?(K=!0,this.importVisio(A,C)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,v)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(K=!0,m=mxUtils.bind(this,function(z){4==z.readyState&&(200<=z.status&&299>=z.status?C(z.responseText):null!=x&&x(null))}),null!=c?this.parseFileData(c,m,v):this.parseFile(A,m,v)):0==c.indexOf("PK")&&null!=A?(K=!0,this.importZipFile(A,C,mxUtils.bind(this,function(){q=this.insertTextAt(this.validateFileData(c),g,k,!0,null,y);x(q)}))):/(\.v(sd|dx))($|\?)/i.test(v)||/(\.vs(s|x))($|\?)/i.test(v)||(q=this.insertTextAt(this.validateFileData(c),
-g,k,!0,null,y,null,null!=N?mxEvent.isControlDown(N):null));K||null==x||x(q);return q};EditorUi.prototype.importFiles=function(c,e,g,k,m,p,v,x,A,y,L,N,K){k=null!=k?k:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var q=null!=e&&null!=g,C=!0;e=null!=e?e:0;g=null!=g?g:0;var z=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var B=L||this.resampleThreshold,G=0;G<c.length;G++)if("image/svg"!==c[G].type.substring(0,9)&&"image/"===c[G].type.substring(0,6)&&c[G].size>B){z=!0;break}var M=mxUtils.bind(this,function(){var H=
-this.editor.graph,F=H.gridSize;m=null!=m?m:mxUtils.bind(this,function(U,X,n,E,I,S,Q,P,T){try{return null!=U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,Q)),null):this.importFile(U,X,n,E,I,S,Q,P,T,q,N,K)}catch(Y){return this.handleError(Y),null}});p=null!=p?p:mxUtils.bind(this,function(U){H.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=c.length,R=J,W=[],O=mxUtils.bind(this,function(U,X){W[U]=X;if(0==
---R){this.spinner.stop();if(null!=x)x(W);else{var n=[];H.getModel().beginUpdate();try{for(U=0;U<W.length;U++){var E=W[U]();null!=E&&(n=n.concat(E))}}finally{H.getModel().endUpdate()}}p(n)}}),V=0;V<J;V++)mxUtils.bind(this,function(U){var X=c[U];if(null!=X){var n=new FileReader;n.onload=mxUtils.bind(this,function(E){if(null==v||v(X))if("image/"==X.type.substring(0,6))if("image/svg"==X.type.substring(0,9)){var I=Graph.clipSvgDataUri(E.target.result),S=I.indexOf(",");S=decodeURIComponent(escape(atob(I.substring(S+
-1))));var Q=mxUtils.parseXml(S);S=Q.getElementsByTagName("svg");if(0<S.length){S=S[0];var P=N?null:S.getAttribute("content");null!=P&&"<"!=P.charAt(0)&&"%"!=P.charAt(0)&&(P=unescape(window.atob?atob(P):Base64.decode(P,!0)));null!=P&&"%"==P.charAt(0)&&(P=decodeURIComponent(P));null==P||"<mxfile "!==P.substring(0,8)&&"<mxGraphModel "!==P.substring(0,14)?O(U,mxUtils.bind(this,function(){try{if(null!=Q){var ca=Q.getElementsByTagName("svg");if(0<ca.length){var ia=ca[0],Z=ia.getAttribute("width"),fa=ia.getAttribute("height");
-Z=null!=Z&&"%"!=Z.charAt(Z.length-1)?parseFloat(Z):NaN;fa=null!=fa&&"%"!=fa.charAt(fa.length-1)?parseFloat(fa):NaN;var aa=ia.getAttribute("viewBox");if(null==aa||0==aa.length)ia.setAttribute("viewBox","0 0 "+Z+" "+fa);else if(isNaN(Z)||isNaN(fa)){var wa=aa.split(" ");3<wa.length&&(Z=parseFloat(wa[2]),fa=parseFloat(wa[3]))}I=Editor.createSvgDataUri(mxUtils.getXml(ia));var la=Math.min(1,Math.min(k/Math.max(1,Z)),k/Math.max(1,fa)),za=m(I,X.type,e+U*F,g+U*F,Math.max(1,Math.round(Z*la)),Math.max(1,Math.round(fa*
-la)),X.name);if(isNaN(Z)||isNaN(fa)){var Ba=new Image;Ba.onload=mxUtils.bind(this,function(){Z=Math.max(1,Ba.width);fa=Math.max(1,Ba.height);za[0].geometry.width=Z;za[0].geometry.height=fa;ia.setAttribute("viewBox","0 0 "+Z+" "+fa);I=Editor.createSvgDataUri(mxUtils.getXml(ia));var ua=I.indexOf(";");0<ua&&(I=I.substring(0,ua)+I.substring(I.indexOf(",",ua+1)));H.setCellStyles("image",I,[za[0]])});Ba.src=Editor.createSvgDataUri(mxUtils.getXml(ia))}return za}}}catch(ua){}return null})):O(U,mxUtils.bind(this,
-function(){return m(P,"text/xml",e+U*F,g+U*F,0,0,X.name)}))}else O(U,mxUtils.bind(this,function(){return null}))}else{S=!1;if("image/png"==X.type){var T=N?null:this.extractGraphModelFromPng(E.target.result);if(null!=T&&0<T.length){var Y=new Image;Y.src=E.target.result;O(U,mxUtils.bind(this,function(){return m(T,"text/xml",e+U*F,g+U*F,Y.width,Y.height,X.name)}));S=!0}}S||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
-mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(E.target.result,mxUtils.bind(this,function(ca){this.resizeImage(ca,E.target.result,mxUtils.bind(this,function(ia,Z,fa){O(U,mxUtils.bind(this,function(){if(null!=ia&&ia.length<y){var aa=C&&this.isResampleImageSize(X.size,L)?Math.min(1,Math.min(k/Z,k/fa)):1;return m(ia,X.type,e+U*F,g+U*F,Math.round(Z*aa),Math.round(fa*aa),X.name)}this.handleError({message:mxResources.get("imageTooBig")});
-return null}))}),C,k,L,X.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else I=E.target.result,m(I,X.type,e+U*F,g+U*F,240,160,X.name,function(ca){O(U,function(){return ca})},X)});/(\.v(dx|sdx?))($|\?)/i.test(X.name)||/(\.vs(x|sx?))($|\?)/i.test(X.name)?m(null,X.type,e+U*F,g+U*F,240,160,X.name,function(E){O(U,function(){return E})},X):"image"==X.type.substring(0,5)||"application/pdf"==X.type?n.readAsDataURL(X):n.readAsText(X)}})(V)});if(z){z=
-[];for(G=0;G<c.length;G++)z.push(c[G]);c=z;this.confirmImageResize(function(H){C=H;M()},A)}else M()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},k=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
+"F",v,x)});window.openBrowserFile=mxUtils.bind(this,function(v,x,z){StorageFile.getFileContent(this,v,x,z)});window.deleteBrowserFile=mxUtils.bind(this,function(v,x,z){StorageFile.deleteFile(this,v,x,z)});if(!e){var k=Editor.useLocalStorage;Editor.useLocalStorage=!c}window.openFile=new OpenFile(mxUtils.bind(this,function(v){this.hideDialog(v)}));window.openFile.setConsumer(mxUtils.bind(this,function(v,x){null!=x&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(x)?(v=new Blob([v],{type:"application/octet-stream"}),
+this.importVisio(v,mxUtils.bind(this,function(z){this.importXml(z,0,0,!0)}),null,x)):this.editor.graph.setSelectionCells(this.importXml(v,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!e){var m=this.dialog,p=m.close;this.dialog.close=mxUtils.bind(this,function(v){Editor.useLocalStorage=k;p.apply(m,arguments);v&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(c,e,g){var k=this,m=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(c).then(function(p){if(mxUtils.isEmptyObject(p.files))g();else{var v=0,x,z=!1;p.forEach(function(y,L){y=L.name.toLowerCase();"diagram/diagram.xml"==y?(z=!0,L.async("string").then(function(N){0==N.indexOf("<mxfile ")?e(N):g()})):0==y.indexOf("versions/")&&(y=parseInt(y.substr(9)),y>v&&(v=y,x=L))});0<v?x.async("string").then(function(y){(new XMLHttpRequest).upload&&
+k.isRemoteFileFormat(y,c.name)?k.isOffline()?k.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):k.parseFileData(y,mxUtils.bind(this,function(L){4==L.readyState&&(200<=L.status&&299>=L.status?e(L.responseText):g())}),c.name):g()}):z||g()}},function(p){g(p)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.importFile=function(c,e,g,k,m,p,v,x,z,y,L,N){y=null!=
+y?y:!0;var K=!1,q=null,C=mxUtils.bind(this,function(A){var B=null;null!=A&&"<mxlibrary"==A.substring(0,10)?this.loadLibrary(new LocalLibrary(this,A,v)):B=this.importXml(A,g,k,y,null,null!=N?mxEvent.isControlDown(N):null);null!=x&&x(B)});"image"==e.substring(0,5)?(z=!1,"image/png"==e.substring(0,9)&&(e=L?null:this.extractGraphModelFromPng(c),null!=e&&0<e.length&&(q=this.importXml(e,g,k,y,null,null!=N?mxEvent.isControlDown(N):null),z=!0)),z||(e=this.editor.graph,z=c.indexOf(";"),0<z&&(c=c.substring(0,
+z)+c.substring(c.indexOf(",",z+1))),y&&e.isGridEnabled()&&(g=e.snap(g),k=e.snap(k)),q=[e.insertVertex(null,null,"",g,k,m,p,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+c+";")])):/(\.*<graphml )/.test(c)?(K=!0,this.importGraphML(c,C)):null!=z&&null!=v&&(/(\.v(dx|sdx?))($|\?)/i.test(v)||/(\.vs(x|sx?))($|\?)/i.test(v))?(K=!0,this.importVisio(z,C)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,v)?this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(K=!0,m=mxUtils.bind(this,function(A){4==A.readyState&&(200<=A.status&&299>=A.status?C(A.responseText):null!=x&&x(null))}),null!=c?this.parseFileData(c,m,v):this.parseFile(z,m,v)):0==c.indexOf("PK")&&null!=z?(K=!0,this.importZipFile(z,C,mxUtils.bind(this,function(){q=this.insertTextAt(this.validateFileData(c),g,k,!0,null,y);x(q)}))):/(\.v(sd|dx))($|\?)/i.test(v)||/(\.vs(s|x))($|\?)/i.test(v)||(q=this.insertTextAt(this.validateFileData(c),
+g,k,!0,null,y,null,null!=N?mxEvent.isControlDown(N):null));K||null==x||x(q);return q};EditorUi.prototype.importFiles=function(c,e,g,k,m,p,v,x,z,y,L,N,K){k=null!=k?k:this.maxImageSize;y=null!=y?y:this.maxImageBytes;var q=null!=e&&null!=g,C=!0;e=null!=e?e:0;g=null!=g?g:0;var A=!1;if(!mxClient.IS_CHROMEAPP&&null!=c)for(var B=L||this.resampleThreshold,G=0;G<c.length;G++)if("image/svg"!==c[G].type.substring(0,9)&&"image/"===c[G].type.substring(0,6)&&c[G].size>B){A=!0;break}var M=mxUtils.bind(this,function(){var H=
+this.editor.graph,F=H.gridSize;m=null!=m?m:mxUtils.bind(this,function(U,Y,n,D,I,S,Q,P,T){try{return null!=U&&"<mxlibrary"==U.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,U,Q)),null):this.importFile(U,Y,n,D,I,S,Q,P,T,q,N,K)}catch(X){return this.handleError(X),null}});p=null!=p?p:mxUtils.bind(this,function(U){H.setSelectionCells(U)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=c.length,R=J,W=[],O=mxUtils.bind(this,function(U,Y){W[U]=Y;if(0==
+--R){this.spinner.stop();if(null!=x)x(W);else{var n=[];H.getModel().beginUpdate();try{for(U=0;U<W.length;U++){var D=W[U]();null!=D&&(n=n.concat(D))}}finally{H.getModel().endUpdate()}}p(n)}}),V=0;V<J;V++)mxUtils.bind(this,function(U){var Y=c[U];if(null!=Y){var n=new FileReader;n.onload=mxUtils.bind(this,function(D){if(null==v||v(Y))if("image/"==Y.type.substring(0,6))if("image/svg"==Y.type.substring(0,9)){var I=Graph.clipSvgDataUri(D.target.result),S=I.indexOf(",");S=decodeURIComponent(escape(atob(I.substring(S+
+1))));var Q=mxUtils.parseXml(S);S=Q.getElementsByTagName("svg");if(0<S.length){S=S[0];var P=N?null:S.getAttribute("content");null!=P&&"<"!=P.charAt(0)&&"%"!=P.charAt(0)&&(P=unescape(window.atob?atob(P):Base64.decode(P,!0)));null!=P&&"%"==P.charAt(0)&&(P=decodeURIComponent(P));null==P||"<mxfile "!==P.substring(0,8)&&"<mxGraphModel "!==P.substring(0,14)?O(U,mxUtils.bind(this,function(){try{if(null!=Q){var ba=Q.getElementsByTagName("svg");if(0<ba.length){var ja=ba[0],Z=ja.getAttribute("width"),ka=ja.getAttribute("height");
+Z=null!=Z&&"%"!=Z.charAt(Z.length-1)?parseFloat(Z):NaN;ka=null!=ka&&"%"!=ka.charAt(ka.length-1)?parseFloat(ka):NaN;var da=ja.getAttribute("viewBox");if(null==da||0==da.length)ja.setAttribute("viewBox","0 0 "+Z+" "+ka);else if(isNaN(Z)||isNaN(ka)){var fa=da.split(" ");3<fa.length&&(Z=parseFloat(fa[2]),ka=parseFloat(fa[3]))}I=Editor.createSvgDataUri(mxUtils.getXml(ja));var ma=Math.min(1,Math.min(k/Math.max(1,Z)),k/Math.max(1,ka)),ya=m(I,Y.type,e+U*F,g+U*F,Math.max(1,Math.round(Z*ma)),Math.max(1,Math.round(ka*
+ma)),Y.name);if(isNaN(Z)||isNaN(ka)){var Ba=new Image;Ba.onload=mxUtils.bind(this,function(){Z=Math.max(1,Ba.width);ka=Math.max(1,Ba.height);ya[0].geometry.width=Z;ya[0].geometry.height=ka;ja.setAttribute("viewBox","0 0 "+Z+" "+ka);I=Editor.createSvgDataUri(mxUtils.getXml(ja));var Ha=I.indexOf(";");0<Ha&&(I=I.substring(0,Ha)+I.substring(I.indexOf(",",Ha+1)));H.setCellStyles("image",I,[ya[0]])});Ba.src=Editor.createSvgDataUri(mxUtils.getXml(ja))}return ya}}}catch(Ha){}return null})):O(U,mxUtils.bind(this,
+function(){return m(P,"text/xml",e+U*F,g+U*F,0,0,Y.name)}))}else O(U,mxUtils.bind(this,function(){return null}))}else{S=!1;if("image/png"==Y.type){var T=N?null:this.extractGraphModelFromPng(D.target.result);if(null!=T&&0<T.length){var X=new Image;X.src=D.target.result;O(U,mxUtils.bind(this,function(){return m(T,"text/xml",e+U*F,g+U*F,X.width,X.height,Y.name)}));S=!0}}S||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),
+mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(D.target.result,mxUtils.bind(this,function(ba){this.resizeImage(ba,D.target.result,mxUtils.bind(this,function(ja,Z,ka){O(U,mxUtils.bind(this,function(){if(null!=ja&&ja.length<y){var da=C&&this.isResampleImageSize(Y.size,L)?Math.min(1,Math.min(k/Z,k/ka)):1;return m(ja,Y.type,e+U*F,g+U*F,Math.round(Z*da),Math.round(ka*da),Y.name)}this.handleError({message:mxResources.get("imageTooBig")});
+return null}))}),C,k,L,Y.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else I=D.target.result,m(I,Y.type,e+U*F,g+U*F,240,160,Y.name,function(ba){O(U,function(){return ba})},Y)});/(\.v(dx|sdx?))($|\?)/i.test(Y.name)||/(\.vs(x|sx?))($|\?)/i.test(Y.name)?m(null,Y.type,e+U*F,g+U*F,240,160,Y.name,function(D){O(U,function(){return D})},Y):"image"==Y.type.substring(0,5)||"application/pdf"==Y.type?n.readAsDataURL(Y):n.readAsText(Y)}})(V)});if(A){A=
+[];for(G=0;G<c.length;G++)A.push(c[G]);c=A;this.confirmImageResize(function(H){C=H;M()},z)}else M()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(c,e){e=null!=e?e:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},k=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():
null,m=function(p,v){if(p||e)mxSettings.setResizeImages(p?v:null),mxSettings.save();g();c(v)};null==k||e?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(p){m(p,!0)},function(p){m(p,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,
!0,!0):m(!1,k)};EditorUi.prototype.parseFile=function(c,e,g){g=null!=g?g:c.name;var k=new FileReader;k.onload=mxUtils.bind(this,function(){this.parseFileData(k.result,e,g)});k.readAsText(c)};EditorUi.prototype.parseFileData=function(c,e,g){var k=new XMLHttpRequest;k.open("POST",OPEN_URL);k.setRequestHeader("Content-Type","application/x-www-form-urlencoded");k.onreadystatechange=function(){e(k)};k.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(c));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",
-action:"size_"+file.size})}catch(m){}};EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,g,k,m,p,v){m=null!=m?m:this.maxImageSize;var x=Math.max(1,c.width),A=Math.max(1,c.height);if(k&&this.isResampleImageSize(null!=v?v:e.length,p))try{var y=Math.max(x/m,A/m);if(1<y){var L=Math.round(x/y),N=Math.round(A/y),K=document.createElement("canvas");K.width=L;K.height=N;K.getContext("2d").drawImage(c,0,0,L,N);var q=
-K.toDataURL();if(q.length<e.length){var C=document.createElement("canvas");C.width=L;C.height=N;var z=C.toDataURL();q!==z&&(e=q,x=L,A=N)}}}catch(B){}g(e,x,A)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,g){try{var k=new Image;k.onload=function(){k.width=0<k.width?k.width:120;k.height=0<k.height?k.height:120;e(k)};null!=g&&(k.onerror=g);k.src=c}catch(m){if(null!=g)g(m);else throw m;}};EditorUi.prototype.getDefaultSketchMode=
+action:"size_"+file.size})}catch(m){}};EditorUi.prototype.isResampleImageSize=function(c,e){e=null!=e?e:this.resampleThreshold;return c>e};EditorUi.prototype.resizeImage=function(c,e,g,k,m,p,v){m=null!=m?m:this.maxImageSize;var x=Math.max(1,c.width),z=Math.max(1,c.height);if(k&&this.isResampleImageSize(null!=v?v:e.length,p))try{var y=Math.max(x/m,z/m);if(1<y){var L=Math.round(x/y),N=Math.round(z/y),K=document.createElement("canvas");K.width=L;K.height=N;K.getContext("2d").drawImage(c,0,0,L,N);var q=
+K.toDataURL();if(q.length<e.length){var C=document.createElement("canvas");C.width=L;C.height=N;var A=C.toDataURL();q!==A&&(e=q,x=L,z=N)}}}catch(B){}g(e,x,z)};EditorUi.prototype.extractGraphModelFromPng=function(c){return Editor.extractGraphModelFromPng(c)};EditorUi.prototype.loadImage=function(c,e,g){try{var k=new Image;k.onload=function(){k.width=0<k.width?k.width:120;k.height=0<k.height?k.height:120;e(k)};null!=g&&(k.onerror=g);k.src=c}catch(m){if(null!=g)g(m);else throw m;}};EditorUi.prototype.getDefaultSketchMode=
function(){var c="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:c)};var t=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=
mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var c=this,e=this.editor.graph;Editor.isDarkMode()&&(e.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(e.panningHandler.isPanningTrigger=function(B){var G=B.getEvent();return null==B.getState()&&!mxEvent.isMouseEvent(G)&&!e.freehand.isDrawing()||mxEvent.isPopupTrigger(G)&&(null==B.getState()||mxEvent.isControlDown(G)||mxEvent.isShiftDown(G))});e.cellEditor.editPlantUmlData=function(B,
G,M){var H=JSON.parse(M);G=new TextareaDialog(c,mxResources.get("plantUml")+":",H.data,function(F){null!=F&&c.spinner.spin(document.body,mxResources.get("inserting"))&&c.generatePlantUmlImage(F,H.format,function(J,R,W){c.spinner.stop();e.getModel().beginUpdate();try{if("txt"==H.format)e.labelChanged(B,"<pre>"+J+"</pre>"),e.updateCellSize(B,!0);else{e.setCellStyles("image",c.convertDataUri(J),[B]);var O=e.model.getGeometry(B);null!=O&&(O=O.clone(),O.width=R,O.height=W,e.cellsResized([B],[O],!1))}e.setAttributeForCell(B,
@@ -11967,7 +11967,7 @@ arguments);null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src}
mxUtils.bind(this,function(B,G){B=null!=e.backgroundImage?e.backgroundImage.originalSrc:null;if(null!=B){var M=B.indexOf(",");if(0<M)for(B=B.substring(M+1),G=G.getProperty("patches"),M=0;M<G.length;M++)if(null!=G[M][EditorUi.DIFF_UPDATE]&&null!=G[M][EditorUi.DIFF_UPDATE][B]||null!=G[M][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(G[M][EditorUi.DIFF_REMOVE],B)){e.refreshBackgroundImage();break}}}));var p=e.getBackgroundImageObject;e.getBackgroundImageObject=function(B,G){var M=p.apply(this,arguments);
if(null!=M&&null!=M.originalSrc)if(!G)M={src:M.originalSrc};else if(G&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var H=this.stylesheet,F=this.shapeForegroundColor,J=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";M=c.createImageForPageLink(M.originalSrc);this.shapeBackgroundColor=J;this.shapeForegroundColor=F;this.stylesheet=H}return M};var v=this.clearDefaultStyle;this.clearDefaultStyle=function(){v.apply(this,
arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var x=c.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(B){B=null!=B?B:"";"1"==urlParams.dev&&(B+=(0<B.length?"&":"?")+"dev=1");return x.apply(this,arguments)};
-var A=e.addClickHandler;e.addClickHandler=function(B,G,M){var H=G;G=function(F,J){if(null==J){var R=mxEvent.getSource(F);"a"==R.nodeName.toLowerCase()&&(J=R.getAttribute("href"))}null!=J&&e.isCustomLink(J)&&(mxEvent.isTouchEvent(F)||!mxEvent.isPopupTrigger(F))&&e.customLinkClicked(J)&&mxEvent.consume(F);null!=H&&H(F,J)};A.call(this,B,G,M)};t.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var y=Menus.prototype.addPopupMenuEditItems;
+var z=e.addClickHandler;e.addClickHandler=function(B,G,M){var H=G;G=function(F,J){if(null==J){var R=mxEvent.getSource(F);"a"==R.nodeName.toLowerCase()&&(J=R.getAttribute("href"))}null!=J&&e.isCustomLink(J)&&(mxEvent.isTouchEvent(F)||!mxEvent.isPopupTrigger(F))&&e.customLinkClicked(J)&&mxEvent.consume(F);null!=H&&H(F,J)};z.call(this,B,G,M)};t.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(e.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var y=Menus.prototype.addPopupMenuEditItems;
this.menus.addPopupMenuEditItems=function(B,G,M){c.editor.graph.isSelectionEmpty()?y.apply(this,arguments):c.menus.addMenuItems(B,"delete - cut copy copyAsImage - duplicate".split(" "),null,M)}}c.actions.get("print").funct=function(){c.showDialog((new PrintDialog(c)).container,360,null!=c.pages&&1<c.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var L=e.getExportVariables;e.getExportVariables=function(){var B=L.apply(this,arguments),G=c.getCurrentFile();null!=
G&&(B.filename=G.getTitle());B.pagecount=null!=c.pages?c.pages.length:1;B.page=null!=c.currentPage?c.currentPage.getName():"";B.pagenumber=null!=c.pages&&null!=c.currentPage?mxUtils.indexOf(c.pages,c.currentPage)+1:1;return B};var N=e.getGlobalVariable;e.getGlobalVariable=function(B){var G=c.getCurrentFile();return"filename"==B&&null!=G?G.getTitle():"page"==B&&null!=c.currentPage?c.currentPage.getName():"pagenumber"==B?null!=c.currentPage&&null!=c.pages?mxUtils.indexOf(c.pages,c.currentPage)+1:1:
"pagecount"==B?null!=c.pages?c.pages.length:1:N.apply(this,arguments)};var K=e.labelLinkClicked;e.labelLinkClicked=function(B,G,M){var H=G.getAttribute("href");if(null==H||!e.isCustomLink(H)||!mxEvent.isTouchEvent(M)&&mxEvent.isPopupTrigger(M))K.apply(this,arguments);else{if(!e.isEnabled()||null!=B&&e.isCellLocked(B.cell))e.customLinkClicked(H),e.getRubberband().reset();mxEvent.consume(M)}};this.editor.getOrCreateFilename=function(){var B=c.defaultFilename,G=c.getCurrentFile();null!=G&&(B=null!=G.getTitle()?
@@ -11978,15 +11978,15 @@ H.preventDefault()}),mxEvent.addListener(G,"dragover",mxUtils.bind(this,function
!1,H.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(H.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,H.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(H.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,H.dataTransfer.getData("text/plain"));H.stopPropagation();H.preventDefault()})))}));this.isSettingsEnabled()&&(q=this.editor.graph.view,q.setUnit(mxSettings.getUnit()),q.addListener("unitChanged",function(B,G){mxSettings.setUnit(G.getProperty("unit"));
mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,q.unit),this.refresh());if("1"==urlParams.styledev){q=document.getElementById("geFooter");null!=q&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left=
"2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),q.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(B,G){0<this.editor.graph.getSelectionCount()?(B=this.editor.graph.getSelectionCell(),
-B=this.editor.graph.getModel().getStyle(B),this.styleInput.value=B||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var C=this.isSelectionAllowed;this.isSelectionAllowed=function(B){return mxEvent.getSource(B)==this.styleInput?!0:C.apply(this,arguments)}}q=document.getElementById("geInfo");null!=q&&q.parentNode.removeChild(q);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var z=null;mxEvent.addListener(e.container,"dragleave",function(B){e.isEnabled()&&
-(null!=z&&(z.parentNode.removeChild(z),z=null),B.stopPropagation(),B.preventDefault())});mxEvent.addListener(e.container,"dragover",mxUtils.bind(this,function(B){null==z&&(!mxClient.IS_IE||10<document.documentMode)&&(z=this.highlightElement(e.container));null!=this.sidebar&&this.sidebar.hideTooltip();B.stopPropagation();B.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(B){null!=z&&(z.parentNode.removeChild(z),z=null);if(e.isEnabled()){var G=mxUtils.convertPoint(e.container,
+B=this.editor.graph.getModel().getStyle(B),this.styleInput.value=B||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var C=this.isSelectionAllowed;this.isSelectionAllowed=function(B){return mxEvent.getSource(B)==this.styleInput?!0:C.apply(this,arguments)}}q=document.getElementById("geInfo");null!=q&&q.parentNode.removeChild(q);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var A=null;mxEvent.addListener(e.container,"dragleave",function(B){e.isEnabled()&&
+(null!=A&&(A.parentNode.removeChild(A),A=null),B.stopPropagation(),B.preventDefault())});mxEvent.addListener(e.container,"dragover",mxUtils.bind(this,function(B){null==A&&(!mxClient.IS_IE||10<document.documentMode)&&(A=this.highlightElement(e.container));null!=this.sidebar&&this.sidebar.hideTooltip();B.stopPropagation();B.preventDefault()}));mxEvent.addListener(e.container,"drop",mxUtils.bind(this,function(B){null!=A&&(A.parentNode.removeChild(A),A=null);if(e.isEnabled()){var G=mxUtils.convertPoint(e.container,
mxEvent.getClientX(B),mxEvent.getClientY(B)),M=B.dataTransfer.files,H=e.view.translate,F=e.view.scale,J=G.x/F-H.x,R=G.y/F-H.y;if(0<M.length)G=1==M.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===M[0].type.substring(0,9)||"image/"!==M[0].type.substring(0,6)||/(\.drawio.png)$/i.test(M[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(B)||G)?(!mxEvent.isShiftDown(B)&&G&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(M,!0)):(mxEvent.isAltDown(B)&&(R=J=null),this.importFiles(M,
J,R,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(B),null,null,mxEvent.isShiftDown(B),B));else{mxEvent.isAltDown(B)&&(R=J=0);var W=0<=mxUtils.indexOf(B.dataTransfer.types,"text/uri-list")?B.dataTransfer.getData("text/uri-list"):null;M=this.extractGraphModelFromEvent(B,null!=this.pages);if(null!=M)e.setSelectionCells(this.importXml(M,J,R,!0));else if(0<=mxUtils.indexOf(B.dataTransfer.types,"text/html")){var O=B.dataTransfer.getData("text/html");M=document.createElement("div");M.innerHTML=
-e.sanitizeHtml(O);var V=null;G=M.getElementsByTagName("img");null!=G&&1==G.length?(O=G[0].getAttribute("src"),null==O&&(O=G[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)||(V=!0)):(G=M.getElementsByTagName("a"),null!=G&&1==G.length?O=G[0].getAttribute("href"):(M=M.getElementsByTagName("pre"),null!=M&&1==M.length&&(O=mxUtils.getTextContent(M[0]))));var U=!0,X=mxUtils.bind(this,function(){e.setSelectionCells(this.insertTextAt(O,J,R,!0,V,null,U,mxEvent.isControlDown(B)))});V&&null!=
-O&&O.length>this.resampleThreshold?this.confirmImageResize(function(n){U=n;X()},mxEvent.isControlDown(B)):X()}else null!=W&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)?this.loadImage(decodeURIComponent(W),mxUtils.bind(this,function(n){var E=Math.max(1,n.width);n=Math.max(1,n.height);var I=this.maxImageSize;I=Math.min(1,Math.min(I/Math.max(1,E)),I/Math.max(1,n));e.setSelectionCell(e.insertVertex(null,null,"",J,R,E*I,n*I,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+e.sanitizeHtml(O);var V=null;G=M.getElementsByTagName("img");null!=G&&1==G.length?(O=G[0].getAttribute("src"),null==O&&(O=G[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(O)||(V=!0)):(G=M.getElementsByTagName("a"),null!=G&&1==G.length?O=G[0].getAttribute("href"):(M=M.getElementsByTagName("pre"),null!=M&&1==M.length&&(O=mxUtils.getTextContent(M[0]))));var U=!0,Y=mxUtils.bind(this,function(){e.setSelectionCells(this.insertTextAt(O,J,R,!0,V,null,U,mxEvent.isControlDown(B)))});V&&null!=
+O&&O.length>this.resampleThreshold?this.confirmImageResize(function(n){U=n;Y()},mxEvent.isControlDown(B)):Y()}else null!=W&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(W)?this.loadImage(decodeURIComponent(W),mxUtils.bind(this,function(n){var D=Math.max(1,n.width);n=Math.max(1,n.height);var I=this.maxImageSize;I=Math.min(1,Math.min(I/Math.max(1,D)),I/Math.max(1,n));e.setSelectionCell(e.insertVertex(null,null,"",J,R,D*I,n*I,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
W+";"))}),mxUtils.bind(this,function(n){e.setSelectionCells(this.insertTextAt(W,J,R,!0))})):0<=mxUtils.indexOf(B.dataTransfer.types,"text/plain")&&e.setSelectionCells(this.insertTextAt(B.dataTransfer.getData("text/plain"),J,R,!0))}}B.stopPropagation();B.preventDefault()}),!1)}e.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var c=this.editor.graph;c.container.addEventListener("paste",
-mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var g=e.clipboardData||e.originalEvent.clipboardData,k=!1,m=0;m<g.types.length;m++)if("text/"===g.types[m].substring(0,5)){k=!0;break}if(!k){var p=g.items;for(index in p){var v=p[index];if("file"===v.kind){if(c.isEditing())this.importFiles([v.getAsFile()],0,0,this.maxImageSize,function(A,y,L,N,K,q){c.insertImage(A,K,q)},function(){},function(A){return"image/"==A.type.substring(0,6)},function(A){for(var y=0;y<A.length;y++)A[y]()});else{var x=
-this.editor.graph.getInsertPoint();this.importFiles([v.getAsFile()],x.x,x.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(A){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck",
+mxUtils.bind(this,function(e){if(!mxEvent.isConsumed(e))try{for(var g=e.clipboardData||e.originalEvent.clipboardData,k=!1,m=0;m<g.types.length;m++)if("text/"===g.types[m].substring(0,5)){k=!0;break}if(!k){var p=g.items;for(index in p){var v=p[index];if("file"===v.kind){if(c.isEditing())this.importFiles([v.getAsFile()],0,0,this.maxImageSize,function(z,y,L,N,K,q){c.insertImage(z,K,q)},function(){},function(z){return"image/"==z.type.substring(0,6)},function(z){for(var y=0;y<z.length;y++)z[y]()});else{var x=
+this.editor.graph.getInsertPoint();this.importFiles([v.getAsFile()],x.x,x.y,this.maxImageSize);mxEvent.consume(e)}break}}}}catch(z){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function c(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var e=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck",
"false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var k=!1;this.keyHandler.bindControlKey(88,
null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(p){var v=mxEvent.getSource(p);null==e.container||!e.isEnabled()||e.isMouseDown||e.isEditing()||null!=this.dialog||"INPUT"==v.nodeName||"TEXTAREA"==v.nodeName||224!=p.keyCode&&(mxClient.IS_MAC||17!=p.keyCode)&&(!mxClient.IS_MAC||91!=p.keyCode&&93!=p.keyCode)||k||(g.style.left=e.container.scrollLeft+10+"px",g.style.top=e.container.scrollTop+10+"px",
e.container.appendChild(g),k=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(p){var v=p.keyCode;window.setTimeout(mxUtils.bind(this,function(){!k||224!=v&&17!=v&&91!=v&&93!=v||(k=!1,e.isEditing()||null!=this.dialog||null==e.container||e.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(p){if(e.isEnabled())try{mxClipboard.copy(e),
@@ -12003,14 +12003,14 @@ mxUtils.bind(this,function(c,e){"1"!=urlParams["ext-fonts"]?mxSettings.setCustom
mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(c,e){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);
this.addListener("gridColorChanged",mxUtils.bind(this,function(c,e){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(c,e){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(c,e,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
-this.editor.exportToCanvas(mxUtils.bind(this,function(k,m){try{this.spinner.stop();var p=this.createImageDataUri(k,e,"png"),v=parseInt(m.getAttribute("width")),x=parseInt(m.getAttribute("height"));this.writeImageToClipboard(p,v,x,mxUtils.bind(this,function(A){this.handleError(A)}))}catch(A){this.handleError(A)}}),null,null,null,mxUtils.bind(this,function(k){this.spinner.stop();this.handleError(k)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+this.editor.exportToCanvas(mxUtils.bind(this,function(k,m){try{this.spinner.stop();var p=this.createImageDataUri(k,e,"png"),v=parseInt(m.getAttribute("width")),x=parseInt(m.getAttribute("height"));this.writeImageToClipboard(p,v,x,mxUtils.bind(this,function(z){this.handleError(z)}))}catch(z){this.handleError(z)}}),null,null,null,mxUtils.bind(this,function(k){this.spinner.stop();this.handleError(k)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
null,null,null,10,null,null,!1,null,0<c.length?c:null)}catch(k){this.handleError(k)}};EditorUi.prototype.writeImageToClipboard=function(c,e,g,k){var m=this.base64ToBlob(c.substring(c.indexOf(",")+1),"image/png");c=new ClipboardItem({"image/png":m,"text/html":new Blob(['<img src="'+c+'" width="'+e+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([c])["catch"](k)};EditorUi.prototype.copyCells=function(c,e){var g=this.editor.graph;if(g.isSelectionEmpty())c.innerHTML="";else{var k=
mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),m=mxUtils.getXml(g.encodeCells(k));mxUtils.setTextContent(c,encodeURIComponent(m));e?(g.removeCells(k,!1),g.lastPasteXml=null):(g.lastPasteXml=m,g.pasteCounter=0);c.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var c=null;if(Editor.enableNativeCipboard){var e=this.editor.graph;e.isSelectionEmpty()||(c=mxUtils.sortCells(e.getExportableCells(e.model.getTopmostCells(e.getSelectionCells()))),
e=mxUtils.getXml(e.encodeCells(c)),navigator.clipboard.writeText(e))}return c};EditorUi.prototype.pasteXml=function(c,e,g,k){var m=this.editor.graph,p=null;m.lastPasteXml==c?m.pasteCounter++:(m.lastPasteXml=c,m.pasteCounter=0);var v=m.pasteCounter*m.gridSize;if(g||this.isCompatibleString(c))p=this.importXml(c,v,v),m.setSelectionCells(p);else if(e&&1==m.getSelectionCount()){v=m.getStartEditingCell(m.getSelectionCell(),k);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(c)&&"image"==m.getCurrentCellStyle(v)[mxConstants.STYLE_SHAPE])m.setCellStyles(mxConstants.STYLE_IMAGE,
c,[v]);else{m.model.beginUpdate();try{m.labelChanged(v,c),Graph.isLink(c)&&m.setLinkForCell(v,c)}finally{m.model.endUpdate()}}m.setSelectionCell(v)}else p=m.getInsertPoint(),m.isMouseInsertPoint()&&(v=0,m.lastPasteXml==c&&0<m.pasteCounter&&m.pasteCounter--),p=this.insertTextAt(c,p.x+v,p.y+v,!0),m.setSelectionCells(p);m.isSelectionEmpty()||(m.scrollCellToVisible(m.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(m.view.getState(m.getSelectionCell())));return p};EditorUi.prototype.pasteCells=
-function(c,e,g,k){if(!mxEvent.isConsumed(c)){var m=e,p=!1;if(g&&null!=c.clipboardData&&c.clipboardData.getData){var v=c.clipboardData.getData("text/plain"),x=!1;if(null!=v&&0<v.length&&"%3CmxGraphModel%3E"==v.substring(0,18))try{var A=decodeURIComponent(v);this.isCompatibleString(A)&&(x=!0,v=A)}catch(N){}x=x?null:c.clipboardData.getData("text/html");null!=x&&0<x.length?(m=this.parseHtmlData(x),p="text/plain"!=m.getAttribute("data-type")):null!=v&&0<v.length&&(m=document.createElement("div"),mxUtils.setTextContent(m,
+function(c,e,g,k){if(!mxEvent.isConsumed(c)){var m=e,p=!1;if(g&&null!=c.clipboardData&&c.clipboardData.getData){var v=c.clipboardData.getData("text/plain"),x=!1;if(null!=v&&0<v.length&&"%3CmxGraphModel%3E"==v.substring(0,18))try{var z=decodeURIComponent(v);this.isCompatibleString(z)&&(x=!0,v=z)}catch(N){}x=x?null:c.clipboardData.getData("text/html");null!=x&&0<x.length?(m=this.parseHtmlData(x),p="text/plain"!=m.getAttribute("data-type")):null!=v&&0<v.length&&(m=document.createElement("div"),mxUtils.setTextContent(m,
x))}v=m.getElementsByTagName("span");if(null!=v&&0<v.length&&"application/vnd.lucid.chart.objects"===v[0].getAttribute("data-lucid-type"))g=v[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(N){var K=this.editor.graph;K.lastPasteXml==N?K.pasteCounter++:(K.lastPasteXml=N,K.pasteCounter=0);var q=K.pasteCounter*K.gridSize;K.setSelectionCells(this.importXml(N,q,q));K.scrollCellToVisible(K.getSelectionCell())}),mxUtils.bind(this,function(N){this.handleError(N)})),
-mxEvent.consume(c));else{p=p?m.innerHTML:mxUtils.trim(null==m.innerText?mxUtils.getTextContent(m):m.innerText);x=!1;try{var y=p.lastIndexOf("%3E");0<=y&&y<p.length-3&&(p=p.substring(0,y+3))}catch(N){}try{v=m.getElementsByTagName("span"),(A=null!=v&&0<v.length?mxUtils.trim(decodeURIComponent(v[0].textContent)):decodeURIComponent(p))&&(this.isCompatibleString(A)||0==A.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(x=!0,p=A)}catch(N){}try{if(null!=p&&0<p.length){if(0==p.substring(0,
+mxEvent.consume(c));else{p=p?m.innerHTML:mxUtils.trim(null==m.innerText?mxUtils.getTextContent(m):m.innerText);x=!1;try{var y=p.lastIndexOf("%3E");0<=y&&y<p.length-3&&(p=p.substring(0,y+3))}catch(N){}try{v=m.getElementsByTagName("span"),(z=null!=v&&0<v.length?mxUtils.trim(decodeURIComponent(v[0].textContent)):decodeURIComponent(p))&&(this.isCompatibleString(z)||0==z.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(x=!0,p=z)}catch(N){}try{if(null!=p&&0<p.length){if(0==p.substring(0,
20).replace(/\s/g,"").indexOf('{"isProtected":'))try{"undefined"!==typeof MiroImporter&&(p=(new MiroImporter).importMiroJson(JSON.parse(p)))}catch(N){console.log("Miro import error:",N)}this.pasteXml(p,k,x,c);try{mxEvent.consume(c)}catch(N){}}else if(!g){var L=this.editor.graph;L.lastPasteXml=null;L.pasteCounter=0}}catch(N){this.handleError(N)}}}e.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(c){if(Graph.fileSupport)for(var e=null,g=0;g<c.length;g++)mxEvent.addListener(c[g],"dragleave",
function(k){null!=e&&(e.parentNode.removeChild(e),e=null);k.stopPropagation();k.preventDefault()}),mxEvent.addListener(c[g],"dragover",mxUtils.bind(this,function(k){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==e&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(e=this.highlightElement());k.stopPropagation();k.preventDefault()})),mxEvent.addListener(c[g],"drop",mxUtils.bind(this,function(k){null!=e&&(e.parentNode.removeChild(e),e=null);if(this.editor.graph.isEnabled()||
"1"!=urlParams.embed)if(0<k.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(k.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(k)&&!mxEvent.isShiftDown(k)):this.openFiles(k.dataTransfer.files,!0);else{var m=this.extractGraphModelFromEvent(k);if(null==m){var p=null!=k.dataTransfer?k.dataTransfer:k.clipboardData;null!=p&&(10==document.documentMode||11==document.documentMode?m=p.getData("Text"):(m=null,m=0<=mxUtils.indexOf(p.types,
@@ -12019,7 +12019,7 @@ this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInO
null,!0)}k.stopPropagation();k.preventDefault()}))};EditorUi.prototype.highlightElement=function(c){var e=0,g=0;if(null==c){var k=document.body;var m=document.documentElement;var p=(k.clientWidth||m.clientWidth)-3;k=Math.max(k.clientHeight||0,m.clientHeight)-3}else e=c.offsetTop,g=c.offsetLeft,p=c.clientWidth,k=c.clientHeight;m=document.createElement("div");m.style.zIndex=mxPopupMenu.prototype.zIndex+2;m.style.border="3px dotted rgb(254, 137, 12)";m.style.pointerEvents="none";m.style.position="absolute";
m.style.top=e+"px";m.style.left=g+"px";m.style.width=Math.max(0,p-3)+"px";m.style.height=Math.max(0,k-3)+"px";null!=c&&c.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(m):document.body.appendChild(m);return m};EditorUi.prototype.stringToCells=function(c){c=mxUtils.parseXml(c);var e=this.editor.extractGraphModel(c.documentElement);c=[];if(null!=e){var g=new mxCodec(e.ownerDocument),k=new mxGraphModel;g.decode(e,k);e=k.getChildAt(k.getRoot(),0);for(g=0;g<k.getChildCount(e);g++)c.push(k.getChildAt(e,
g))}return c};EditorUi.prototype.openFileHandle=function(c,e,g,k,m){if(null!=e&&0<e.length){!this.useCanvasForExport&&/(\.png)$/i.test(e)?e=e.substring(0,e.length-4)+".drawio":/(\.pdf)$/i.test(e)&&(e=e.substring(0,e.length-4)+".drawio");var p=mxUtils.bind(this,function(x){e=0<=e.lastIndexOf(".")?e.substring(0,e.lastIndexOf("."))+".drawio":e+".drawio";if("<mxlibrary"==x.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,
-k);try{this.loadLibrary(new LocalLibrary(this,x,e))}catch(A){this.handleError(A,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(x,e,k)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(g,mxUtils.bind(this,function(x){this.spinner.stop();p(x)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(x){this.spinner.stop();p(x)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.isOffline()?
+k);try{this.loadLibrary(new LocalLibrary(this,x,e))}catch(z){this.handleError(z,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(x,e,k)});if(/(\.v(dx|sdx?))($|\?)/i.test(e)||/(\.vs(x|sx?))($|\?)/i.test(e))this.importVisio(g,mxUtils.bind(this,function(x){this.spinner.stop();p(x)}));else if(/(\.*<graphml )/.test(c))this.importGraphML(c,mxUtils.bind(this,function(x){this.spinner.stop();p(x)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,e))this.isOffline()?
(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(x){4==x.readyState&&(this.spinner.stop(),200<=x.status&&299>=x.status?p(x.responseText):this.handleError({message:mxResources.get(413==x.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(c))/(\.json)$/i.test(e)&&(e=e.substring(0,e.length-5)+".drawio"),this.convertLucidChart(c,mxUtils.bind(this,
function(x){this.spinner.stop();this.openLocalFile(x,e,k)}),mxUtils.bind(this,function(x){this.spinner.stop();this.handleError(x)}));else if("<mxlibrary"==c.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,k);try{this.loadLibrary(new LocalLibrary(this,c,g.name))}catch(x){this.handleError(x,mxResources.get("errorLoadingFile"))}}else if(0==c.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(x){this.spinner.stop();
p(x)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(c,e,k)}));else{if("image/png"==g.type.substring(0,9))c=this.extractGraphModelFromPng(c);else if("application/pdf"==g.type){var v=Editor.extractGraphModelFromPdf(c);null!=v&&(m=null,k=!0,c=v)}this.spinner.stop();this.openLocalFile(c,e,k,m,null!=m?g:null)}}};EditorUi.prototype.openFiles=function(c,e){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<c.length;g++)mxUtils.bind(this,function(k){var m=
@@ -12030,89 +12030,89 @@ mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=ne
(g(mxMarker.getPackageForType(m[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(m[mxConstants.STYLE_ENDARROW])));m=k.model.getChildCount(c);for(var p=0;p<m;p++)this.addBasenamesForCell(k.model.getChildAt(c,p),e)};EditorUi.prototype.setGraphEnabled=function(c){this.diagramContainer.style.visibility=c?"":"hidden";this.formatContainer.style.visibility=c?"":"hidden";this.sidebarFooterContainer.style.display=c?"":"none";this.sidebarContainer.style.display=c?"":"none";this.hsplit.style.display=
c?"":"none";this.editor.graph.setEnabled(c);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=c?"":"hidden",this.ruler.vRuler.container.style.visibility=c?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=c?"":"hidden");c||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=
this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var c=!1;this.installMessageHandler(mxUtils.bind(this,function(e,g,k,m){c||(c=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));
-if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,e,{}));this.mode=App.MODE_EMBED;this.setFileData(e);if(m)try{var p=this.editor.graph;p.setGridEnabled(!1);p.pageVisible=!1;var v=p.model.cells,x;for(x in v){var A=v[x];null!=A&&null!=A.style&&(A.style+=";sketch=1;"+(-1==A.style.indexOf("fontFamily=")||-1<A.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
+if(null==e||0==e.length)e=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,e,{}));this.mode=App.MODE_EMBED;this.setFileData(e);if(m)try{var p=this.editor.graph;p.setGridEnabled(!1);p.pageVisible=!1;var v=p.model.cells,x;for(x in v){var z=v[x];null!=z&&null!=z.style&&(z.style+=";sketch=1;"+(-1==z.style.indexOf("fontFamily=")||-1<z.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":
""))}}catch(y){console.log(y)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=k?k:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))}};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?
this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(c,e){null!=c?c.getPublicUrl(e):e(null)};EditorUi.prototype.createLoadMessage=function(c){var e=this.editor.graph;return{event:c,pageVisible:e.pageVisible,translate:e.view.translate,bounds:e.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:e.view.scale,page:e.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(c){var e=this.editor.graph;
e.isEditing()&&e.stopEditing(!e.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var k=e.background;if(null==k||k==mxConstants.NONE)k=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),e,null,!0,mxUtils.bind(this,function(m){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=c?!c:!0,data:Editor.createSvgDataUri(m)}),"*")}),null,null,!0,k,1,this.embedExportBorder)}else c||
-g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,e.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(c){var e=null,g=!1,k=!1,m=null,p=mxUtils.bind(this,function(A,y){this.editor.modified&&"0"!=urlParams.modified?null!=
-urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,p);mxEvent.addListener(window,"message",mxUtils.bind(this,function(A){if(A.source==(window.opener||window.parent)){var y=A.data,L=null,N=mxUtils.bind(this,function(P){if(null!=P&&"function"===typeof P.charAt&&"<"!=P.charAt(0))try{Editor.isPngDataUrl(P)?P=Editor.extractGraphModelFromPng(P):"data:image/svg+xml;base64,"==P.substring(0,
-26)?P=atob(P.substring(26)):"data:image/svg+xml;utf8,"==P.substring(0,24)&&(P=P.substring(24)),null!=P&&("%"==P.charAt(0)?P=decodeURIComponent(P):"<"!=P.charAt(0)&&(P=Graph.decompress(P)))}catch(T){}return P});if("json"==urlParams.proto){var K=!1;try{y=JSON.parse(y),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[A],"data",[y])}catch(P){y=null}try{if(null==y)return;if("dialog"==y.action){this.showError(null!=y.titleKey?mxResources.get(y.titleKey):y.title,null!=y.messageKey?mxResources.get(y.messageKey):
+g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");c||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,e.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(c){var e=null,g=!1,k=!1,m=null,p=mxUtils.bind(this,function(z,y){this.editor.modified&&"0"!=urlParams.modified?null!=
+urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});this.editor.graph.model.addListener(mxEvent.CHANGE,p);mxEvent.addListener(window,"message",mxUtils.bind(this,function(z){if(z.source==(window.opener||window.parent)){var y=z.data,L=null,N=mxUtils.bind(this,function(P){if(null!=P&&"function"===typeof P.charAt&&"<"!=P.charAt(0))try{Editor.isPngDataUrl(P)?P=Editor.extractGraphModelFromPng(P):"data:image/svg+xml;base64,"==P.substring(0,
+26)?P=atob(P.substring(26)):"data:image/svg+xml;utf8,"==P.substring(0,24)&&(P=P.substring(24)),null!=P&&("%"==P.charAt(0)?P=decodeURIComponent(P):"<"!=P.charAt(0)&&(P=Graph.decompress(P)))}catch(T){}return P});if("json"==urlParams.proto){var K=!1;try{y=JSON.parse(y),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[z],"data",[y])}catch(P){y=null}try{if(null==y)return;if("dialog"==y.action){this.showError(null!=y.titleKey?mxResources.get(y.titleKey):y.title,null!=y.messageKey?mxResources.get(y.messageKey):
y.message,null!=y.buttonKey?mxResources.get(y.buttonKey):y.button);null!=y.modified&&(this.editor.modified=y.modified);return}if("layout"==y.action){this.executeLayouts(this.editor.graph.createLayouts(y.layouts));return}if("prompt"==y.action){this.spinner.stop();var q=new FilenameDialog(this,y.defaultValue||"",null!=y.okKey?mxResources.get(y.okKey):y.ok,function(P){null!=P?v.postMessage(JSON.stringify({event:"prompt",value:P,message:y}),"*"):v.postMessage(JSON.stringify({event:"prompt-cancel",message:y}),
"*")},null!=y.titleKey?mxResources.get(y.titleKey):y.title);this.showDialog(q.container,300,80,!0,!1);q.init();return}if("draft"==y.action){var C=N(y.xml);this.spinner.stop();q=new DraftDialog(this,mxResources.get("draftFound",[y.name||this.defaultFilename]),C,mxUtils.bind(this,function(){this.hideDialog();v.postMessage(JSON.stringify({event:"draft",result:"edit",message:y}),"*")}),mxUtils.bind(this,function(){this.hideDialog();v.postMessage(JSON.stringify({event:"draft",result:"discard",message:y}),
"*")}),y.editKey?mxResources.get(y.editKey):null,y.discardKey?mxResources.get(y.discardKey):null,y.ignore?mxUtils.bind(this,function(){this.hideDialog();v.postMessage(JSON.stringify({event:"draft",result:"ignore",message:y}),"*")}):null);this.showDialog(q.container,640,480,!0,!1,mxUtils.bind(this,function(P){P&&this.actions.get("exit").funct()}));try{q.init()}catch(P){v.postMessage(JSON.stringify({event:"draft",error:P.toString(),message:y}),"*")}return}if("template"==y.action){this.spinner.stop();
-var z=1==y.enableRecent,B=1==y.enableSearch,G=1==y.enableCustomTemp;if("1"==urlParams.newTempDlg&&!y.templatesOnly&&null!=y.callback){var M=this.getCurrentUser(),H=new TemplatesDialog(this,function(P,T,Y){P=P||this.emptyDiagramXml;v.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:T,tempUrl:Y.url,libs:Y.libs,builtIn:null!=Y.info&&null!=Y.info.custContentId,message:y}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=M?M.id:
-null,z?mxUtils.bind(this,function(P,T,Y){this.remoteInvoke("getRecentDiagrams",[Y],null,P,T)}):null,B?mxUtils.bind(this,function(P,T,Y,ca){this.remoteInvoke("searchDiagrams",[P,ca],null,T,Y)}):null,mxUtils.bind(this,function(P,T,Y){this.remoteInvoke("getFileContent",[P.url],null,T,Y)}),null,G?mxUtils.bind(this,function(P){this.remoteInvoke("getCustomTemplates",null,null,P,function(){P({},0)})}):null,!1,!1,!0,!0);this.showDialog(H.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}q=
-new NewDialog(this,!1,y.templatesOnly?!1:null!=y.callback,mxUtils.bind(this,function(P,T,Y,ca){P=P||this.emptyDiagramXml;null!=y.callback?v.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:T,tempUrl:Y,libs:ca,builtIn:!0,message:y}),"*"):(c(P,A,P!=this.emptyDiagramXml,y.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,z?mxUtils.bind(this,function(P){this.remoteInvoke("getRecentDiagrams",[null],null,P,function(){P(null,
-"Network Error!")})}):null,B?mxUtils.bind(this,function(P,T){this.remoteInvoke("searchDiagrams",[P,null],null,T,function(){T(null,"Network Error!")})}):null,mxUtils.bind(this,function(P,T,Y){v.postMessage(JSON.stringify({event:"template",docUrl:P,info:T,name:Y}),"*")}),null,null,G?mxUtils.bind(this,function(P){this.remoteInvoke("getCustomTemplates",null,null,P,function(){P({},0)})}):null,1==y.withoutType);this.showDialog(q.container,620,460,!0,!1,mxUtils.bind(this,function(P){this.sidebar.hideTooltip();
+var A=1==y.enableRecent,B=1==y.enableSearch,G=1==y.enableCustomTemp;if("1"==urlParams.newTempDlg&&!y.templatesOnly&&null!=y.callback){var M=this.getCurrentUser(),H=new TemplatesDialog(this,function(P,T,X){P=P||this.emptyDiagramXml;v.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:T,tempUrl:X.url,libs:X.libs,builtIn:null!=X.info&&null!=X.info.custContentId,message:y}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=M?M.id:
+null,A?mxUtils.bind(this,function(P,T,X){this.remoteInvoke("getRecentDiagrams",[X],null,P,T)}):null,B?mxUtils.bind(this,function(P,T,X,ba){this.remoteInvoke("searchDiagrams",[P,ba],null,T,X)}):null,mxUtils.bind(this,function(P,T,X){this.remoteInvoke("getFileContent",[P.url],null,T,X)}),null,G?mxUtils.bind(this,function(P){this.remoteInvoke("getCustomTemplates",null,null,P,function(){P({},0)})}):null,!1,!1,!0,!0);this.showDialog(H.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}q=
+new NewDialog(this,!1,y.templatesOnly?!1:null!=y.callback,mxUtils.bind(this,function(P,T,X,ba){P=P||this.emptyDiagramXml;null!=y.callback?v.postMessage(JSON.stringify({event:"template",xml:P,blank:P==this.emptyDiagramXml,name:T,tempUrl:X,libs:ba,builtIn:!0,message:y}),"*"):(c(P,z,P!=this.emptyDiagramXml,y.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,A?mxUtils.bind(this,function(P){this.remoteInvoke("getRecentDiagrams",[null],null,P,function(){P(null,
+"Network Error!")})}):null,B?mxUtils.bind(this,function(P,T){this.remoteInvoke("searchDiagrams",[P,null],null,T,function(){T(null,"Network Error!")})}):null,mxUtils.bind(this,function(P,T,X){v.postMessage(JSON.stringify({event:"template",docUrl:P,info:T,name:X}),"*")}),null,null,G?mxUtils.bind(this,function(P){this.remoteInvoke("getCustomTemplates",null,null,P,function(){P({},0)})}):null,1==y.withoutType);this.showDialog(q.container,620,460,!0,!1,mxUtils.bind(this,function(P){this.sidebar.hideTooltip();
P&&this.actions.get("exit").funct()}));q.init();return}if("textContent"==y.action){var F=this.getDiagramTextContent();v.postMessage(JSON.stringify({event:"textContent",data:F,message:y}),"*");return}if("status"==y.action){null!=y.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(y.messageKey))):null!=y.message&&this.editor.setStatus(mxUtils.htmlEntities(y.message));null!=y.modified&&(this.editor.modified=y.modified);return}if("spinner"==y.action){var J=null!=y.messageKey?mxResources.get(y.messageKey):
y.message;null==y.show||y.show?this.spinner.spin(document.body,J):this.spinner.stop();return}if("exit"==y.action){this.actions.get("exit").funct();return}if("viewport"==y.action){null!=y.viewport&&(this.embedViewport=y.viewport);return}if("snapshot"==y.action){this.sendEmbeddedSvgExport(!0);return}if("export"==y.action){if("png"==y.format||"xmlpng"==y.format){if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin)){var R=null!=y.xml?y.xml:
this.getFileData(!0);this.editor.graph.setEnabled(!1);var W=this.editor.graph,O=mxUtils.bind(this,function(P){this.editor.graph.setEnabled(!0);this.spinner.stop();var T=this.createLoadMessage("export");T.format=y.format;T.message=y;T.data=P;T.xml=R;v.postMessage(JSON.stringify(T),"*")}),V=mxUtils.bind(this,function(P){null==P&&(P=Editor.blankImage);"xmlpng"==y.format&&(P=Editor.writeGraphModelToPng(P,"tEXt","mxfile",encodeURIComponent(R)));W!=this.editor.graph&&W.container.parentNode.removeChild(W.container);
-O(P)}),U=y.pageId||(null!=this.pages?y.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var X=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=U){var P=W.getGlobalVariable;W=this.createTemporaryGraph(W.getStylesheet());for(var T,Y=0;Y<this.pages.length;Y++)if(this.pages[Y].getId()==U){T=this.updatePageRoot(this.pages[Y]);break}null==T&&(T=this.currentPage);W.getGlobalVariable=function(fa){return"page"==fa?T.getName():"pagenumber"==
-fa?1:P.apply(this,arguments)};document.body.appendChild(W.container);W.model.setRoot(T.root)}if(null!=y.layerIds){var ca=W.model,ia=ca.getChildCells(ca.getRoot()),Z={};for(Y=0;Y<y.layerIds.length;Y++)Z[y.layerIds[Y]]=!0;for(Y=0;Y<ia.length;Y++)ca.setVisible(ia[Y],Z[ia[Y].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(fa){V(fa.toDataURL("image/png"))}),y.width,null,y.background,mxUtils.bind(this,function(){V(null)}),null,null,y.scale,y.transparent,y.shadow,null,W,y.border,null,y.grid,
-y.keepTheme)});null!=y.xml&&0<y.xml.length?(g=!0,this.setFileData(R),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(X)},0):X()):X()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==y.format?"1":"0")+(null!=U?"&pageId="+U:"")+(null!=y.layerIds&&0<y.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:y.layerIds})):"")+(null!=y.scale?"&scale="+y.scale:"")+"&base64=1&xml="+encodeURIComponent(R))).send(mxUtils.bind(this,function(P){200<=
-P.getStatus()&&299>=P.getStatus()?O("data:image/png;base64,"+P.getText()):V(null)}),mxUtils.bind(this,function(){V(null)}))}}else X=mxUtils.bind(this,function(){var P=this.createLoadMessage("export");P.message=y;if("html2"==y.format||"html"==y.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var T=this.getXmlFileData();P.xml=mxUtils.getXml(T);P.data=this.getFileData(null,null,!0,null,null,null,T);P.format=y.format}else if("html"==y.format)T=this.editor.getGraphXml(),P.data=this.getHtml(T,
-this.editor.graph),P.xml=mxUtils.getXml(T),P.format=y.format;else{mxSvgCanvas2D.prototype.foAltText=null;T=null!=y.background?y.background:this.editor.graph.background;T==mxConstants.NONE&&(T=null);P.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);P.format="svg";var Y=mxUtils.bind(this,function(ca){this.editor.graph.setEnabled(!0);this.spinner.stop();P.data=Editor.createSvgDataUri(ca);v.postMessage(JSON.stringify(P),"*")});if("xmlsvg"==y.format)(null==y.spin&&null==y.spinKey||
-this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))&&this.getEmbeddedSvg(P.xml,this.editor.graph,null,!0,Y,null,null,y.embedImages,T,y.scale,y.border,y.shadow,y.keepTheme);else if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))this.editor.graph.setEnabled(!1),T=this.editor.graph.getSvg(T,y.scale,y.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||y.shadow,null,y.keepTheme),(this.editor.graph.shadowVisible||
-y.shadow)&&this.editor.graph.addSvgShadow(T),this.embedFonts(T,mxUtils.bind(this,function(ca){y.embedImages||null==y.embedImages?this.editor.convertImages(ca,mxUtils.bind(this,function(ia){Y(mxUtils.getXml(ia))})):Y(mxUtils.getXml(ca))}));return}v.postMessage(JSON.stringify(P),"*")}),null!=y.xml&&0<y.xml.length?(g=!0,this.setFileData(y.xml),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(X)},0):X()):X();return}if("load"==y.action){K=y.toSketch;k=1==y.autosave;
+O(P)}),U=y.pageId||(null!=this.pages?y.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var Y=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=U){var P=W.getGlobalVariable;W=this.createTemporaryGraph(W.getStylesheet());for(var T,X=0;X<this.pages.length;X++)if(this.pages[X].getId()==U){T=this.updatePageRoot(this.pages[X]);break}null==T&&(T=this.currentPage);W.getGlobalVariable=function(ka){return"page"==ka?T.getName():"pagenumber"==
+ka?1:P.apply(this,arguments)};document.body.appendChild(W.container);W.model.setRoot(T.root)}if(null!=y.layerIds){var ba=W.model,ja=ba.getChildCells(ba.getRoot()),Z={};for(X=0;X<y.layerIds.length;X++)Z[y.layerIds[X]]=!0;for(X=0;X<ja.length;X++)ba.setVisible(ja[X],Z[ja[X].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(ka){V(ka.toDataURL("image/png"))}),y.width,null,y.background,mxUtils.bind(this,function(){V(null)}),null,null,y.scale,y.transparent,y.shadow,null,W,y.border,null,y.grid,
+y.keepTheme)});null!=y.xml&&0<y.xml.length?(g=!0,this.setFileData(R),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(Y)},0):Y()):Y()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==y.format?"1":"0")+(null!=U?"&pageId="+U:"")+(null!=y.layerIds&&0<y.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:y.layerIds})):"")+(null!=y.scale?"&scale="+y.scale:"")+"&base64=1&xml="+encodeURIComponent(R))).send(mxUtils.bind(this,function(P){200<=
+P.getStatus()&&299>=P.getStatus()?O("data:image/png;base64,"+P.getText()):V(null)}),mxUtils.bind(this,function(){V(null)}))}}else Y=mxUtils.bind(this,function(){var P=this.createLoadMessage("export");P.message=y;if("html2"==y.format||"html"==y.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var T=this.getXmlFileData();P.xml=mxUtils.getXml(T);P.data=this.getFileData(null,null,!0,null,null,null,T);P.format=y.format}else if("html"==y.format)T=this.editor.getGraphXml(),P.data=this.getHtml(T,
+this.editor.graph),P.xml=mxUtils.getXml(T),P.format=y.format;else{mxSvgCanvas2D.prototype.foAltText=null;T=null!=y.background?y.background:this.editor.graph.background;T==mxConstants.NONE&&(T=null);P.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);P.format="svg";var X=mxUtils.bind(this,function(ba){this.editor.graph.setEnabled(!0);this.spinner.stop();P.data=Editor.createSvgDataUri(ba);v.postMessage(JSON.stringify(P),"*")});if("xmlsvg"==y.format)(null==y.spin&&null==y.spinKey||
+this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))&&this.getEmbeddedSvg(P.xml,this.editor.graph,null,!0,X,null,null,y.embedImages,T,y.scale,y.border,y.shadow,y.keepTheme);else if(null==y.spin&&null==y.spinKey||this.spinner.spin(document.body,null!=y.spinKey?mxResources.get(y.spinKey):y.spin))this.editor.graph.setEnabled(!1),T=this.editor.graph.getSvg(T,y.scale,y.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||y.shadow,null,y.keepTheme),(this.editor.graph.shadowVisible||
+y.shadow)&&this.editor.graph.addSvgShadow(T),this.embedFonts(T,mxUtils.bind(this,function(ba){y.embedImages||null==y.embedImages?this.editor.convertImages(ba,mxUtils.bind(this,function(ja){X(mxUtils.getXml(ja))})):X(mxUtils.getXml(ba))}));return}v.postMessage(JSON.stringify(P),"*")}),null!=y.xml&&0<y.xml.length?(g=!0,this.setFileData(y.xml),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(Y)},0):Y()):Y();return}if("load"==y.action){K=y.toSketch;k=1==y.autosave;
this.hideDialog();null!=y.modified&&null==urlParams.modified&&(urlParams.modified=y.modified);null!=y.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=y.saveAndExit);null!=y.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=y.noSaveBtn);if(null!=y.rough){var n=Editor.sketchMode;this.doSetSketchMode(y.rough);n!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=y.dark&&(n=Editor.darkMode,this.doSetDarkMode(y.dark),n!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));
-null!=y.border&&(this.embedExportBorder=y.border);null!=y.background&&(this.embedExportBackground=y.background);null!=y.viewport&&(this.embedViewport=y.viewport);this.embedExitPoint=null;if(null!=y.rect){var E=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=y.rect.top+"px";this.diagramContainer.style.left=y.rect.left+"px";this.diagramContainer.style.height=y.rect.height+"px";this.diagramContainer.style.width=y.rect.width+"px";this.diagramContainer.style.bottom=
-"";this.diagramContainer.style.right="";L=mxUtils.bind(this,function(){var P=this.editor.graph,T=P.maxFitScale;P.maxFitScale=y.maxFitScale;P.fit(2*E);P.maxFitScale=T;P.container.scrollTop-=2*E;P.container.scrollLeft-=2*E;this.fireEvent(new mxEventObject("editInlineStart","data",[y]))})}null!=y.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=y.noExitBtn);null!=y.title&&null!=this.buttonContainer&&(C=document.createElement("span"),mxUtils.write(C,y.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
+null!=y.border&&(this.embedExportBorder=y.border);null!=y.background&&(this.embedExportBackground=y.background);null!=y.viewport&&(this.embedViewport=y.viewport);this.embedExitPoint=null;if(null!=y.rect){var D=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=y.rect.top+"px";this.diagramContainer.style.left=y.rect.left+"px";this.diagramContainer.style.height=y.rect.height+"px";this.diagramContainer.style.width=y.rect.width+"px";this.diagramContainer.style.bottom=
+"";this.diagramContainer.style.right="";L=mxUtils.bind(this,function(){var P=this.editor.graph,T=P.maxFitScale;P.maxFitScale=y.maxFitScale;P.fit(2*D);P.maxFitScale=T;P.container.scrollTop-=2*D;P.container.scrollLeft-=2*D;this.fireEvent(new mxEventObject("editInlineStart","data",[y]))})}null!=y.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=y.noExitBtn);null!=y.title&&null!=this.buttonContainer&&(C=document.createElement("span"),mxUtils.write(C,y.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
this.buttonContainer.appendChild(C),this.embedFilenameSpan=C);try{y.libs&&this.sidebar.showEntries(y.libs)}catch(P){}y=null!=y.xmlpng?this.extractGraphModelFromPng(y.xmlpng):null!=y.descriptor?y.descriptor:y.xml}else{if("merge"==y.action){var I=this.getCurrentFile();null!=I&&(C=N(y.xml),null!=C&&""!=C&&I.mergeFile(new LocalFile(this,C),function(){v.postMessage(JSON.stringify({event:"merge",message:y}),"*")},function(P){v.postMessage(JSON.stringify({event:"merge",message:y,error:P}),"*")}))}else"remoteInvokeReady"==
-y.action?this.handleRemoteInvokeReady(v):"remoteInvoke"==y.action?this.handleRemoteInvoke(y,A.origin):"remoteInvokeResponse"==y.action?this.handleRemoteInvokeResponse(y):v.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(y)}),"*");return}}catch(P){this.handleError(P)}}var S=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Q=mxUtils.bind(this,function(P,T){g=!0;try{c(P,
-T,null,K)}catch(Y){this.handleError(Y)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");m=S();k&&null==e&&(e=mxUtils.bind(this,function(Y,ca){Y=S();Y==m||g||(ca=this.createLoadMessage("autosave"),ca.xml=Y,(window.opener||window.parent).postMessage(JSON.stringify(ca),"*"));m=Y}),this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",e),this.editor.graph.addListener("shadowVisibleChanged",e),this.addListener("pageFormatChanged",e),this.addListener("pageScaleChanged",
+y.action?this.handleRemoteInvokeReady(v):"remoteInvoke"==y.action?this.handleRemoteInvoke(y,z.origin):"remoteInvokeResponse"==y.action?this.handleRemoteInvokeResponse(y):v.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(y)}),"*");return}}catch(P){this.handleError(P)}}var S=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),Q=mxUtils.bind(this,function(P,T){g=!0;try{c(P,
+T,null,K)}catch(X){this.handleError(X)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");m=S();k&&null==e&&(e=mxUtils.bind(this,function(X,ba){X=S();X==m||g||(ba=this.createLoadMessage("autosave"),ba.xml=X,(window.opener||window.parent).postMessage(JSON.stringify(ba),"*"));m=X}),this.editor.graph.model.addListener(mxEvent.CHANGE,e),this.editor.graph.addListener("gridSizeChanged",e),this.editor.graph.addListener("shadowVisibleChanged",e),this.addListener("pageFormatChanged",e),this.addListener("pageScaleChanged",
e),this.addListener("backgroundColorChanged",e),this.addListener("backgroundImageChanged",e),this.addListener("foldingEnabledChanged",e),this.addListener("mathEnabledChanged",e),this.addListener("gridEnabledChanged",e),this.addListener("guidesEnabledChanged",e),this.addListener("pageViewChanged",e));if("1"==urlParams.returnbounds||"json"==urlParams.proto)T=this.createLoadMessage("load"),T.xml=P,v.postMessage(JSON.stringify(T),"*");null!=L&&L()});null!=y&&"function"===typeof y.substring&&"data:application/vnd.visio;base64,"==
-y.substring(0,34)?(N="0M8R4KGxGuE"==y.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(y.substring(y.indexOf(",")+1)),function(P){Q(P,A)},mxUtils.bind(this,function(P){this.handleError(P)}),N)):null!=y&&"function"===typeof y.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(y,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(y,mxUtils.bind(this,function(P){4==P.readyState&&200<=P.status&&299>=P.status&&
-"<mxGraphModel"==P.responseText.substring(0,13)&&Q(P.responseText,A)}),""):null!=y&&"function"===typeof y.substring&&this.isLucidChartData(y)?this.convertLucidChart(y,mxUtils.bind(this,function(P){Q(P)}),mxUtils.bind(this,function(P){this.handleError(P)})):null==y||"object"!==typeof y||null==y.format||null==y.data&&null==y.url?(y=N(y),Q(y,A)):this.loadDescriptor(y,mxUtils.bind(this,function(P){Q(S(),A)}),mxUtils.bind(this,function(P){this.handleError(P,mxResources.get("errorLoadingFile"))}))}}));
-var v=window.opener||window.parent;p="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";v.postMessage(p,"*");if("json"==urlParams.proto){var x=this.editor.graph.openLink;this.editor.graph.openLink=function(A,y,L){x.apply(this,arguments);v.postMessage(JSON.stringify({event:"openLink",href:A,target:y,allowOpener:L}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var c=document.createElement("div");c.style.display=
+y.substring(0,34)?(N="0M8R4KGxGuE"==y.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(y.substring(y.indexOf(",")+1)),function(P){Q(P,z)},mxUtils.bind(this,function(P){this.handleError(P)}),N)):null!=y&&"function"===typeof y.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(y,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(y,mxUtils.bind(this,function(P){4==P.readyState&&200<=P.status&&299>=P.status&&
+"<mxGraphModel"==P.responseText.substring(0,13)&&Q(P.responseText,z)}),""):null!=y&&"function"===typeof y.substring&&this.isLucidChartData(y)?this.convertLucidChart(y,mxUtils.bind(this,function(P){Q(P)}),mxUtils.bind(this,function(P){this.handleError(P)})):null==y||"object"!==typeof y||null==y.format||null==y.data&&null==y.url?(y=N(y),Q(y,z)):this.loadDescriptor(y,mxUtils.bind(this,function(P){Q(S(),z)}),mxUtils.bind(this,function(P){this.handleError(P,mxResources.get("errorLoadingFile"))}))}}));
+var v=window.opener||window.parent;p="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";v.postMessage(p,"*");if("json"==urlParams.proto){var x=this.editor.graph.openLink;this.editor.graph.openLink=function(z,y,L){x.apply(this,arguments);v.postMessage(JSON.stringify({event:"openLink",href:z,target:y,allowOpener:L}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var c=document.createElement("div");c.style.display=
"inline-block";c.style.position="absolute";c.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";c.style.paddingLeft="8px";c.style.paddingBottom="2px";var e=document.createElement("button");e.className="geBigButton";var g=e;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var k="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(e,k);e.setAttribute("title",k);mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));
c.appendChild(e)}}else mxUtils.write(e,mxResources.get("save")),e.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),c.appendChild(e),"1"==urlParams.saveAndExit&&(e=document.createElement("a"),mxUtils.write(e,mxResources.get("saveAndExit")),e.setAttribute("title",mxResources.get("saveAndExit")),e.className="geBigButton geBigStandardButton",e.style.marginLeft="6px",mxEvent.addListener(e,
"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),c.appendChild(e),g=e);"1"!=urlParams.noExitBtn&&(e=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(e,g),e.setAttribute("title",g),e.className="geBigButton geBigStandardButton",e.style.marginLeft="6px",mxEvent.addListener(e,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),c.appendChild(e),g=e);g.style.marginRight="20px";this.toolbar.container.appendChild(c);
this.toolbar.staticElements.push(c);c.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(c){this.importCsv(c)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,
640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(c){var e=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();c()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?e():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
-function(){mxscript("js/orgchart/mxOrgChartLayout.js",e)})})}):mxscript("js/extensions.min.js",e))};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,e)}))};EditorUi.prototype.doImportCsv=function(c,e){try{var g=c.split("\n"),k=[],m=[],p=[],v={};if(0<g.length){var x={},A=this.editor.graph,y=null,L=null,N=null,K=null,q=null,C=null,z=null,B="whiteSpace=wrap;html=1;",G=null,M=null,H="",F="auto",J="auto",R=null,W=null,O=40,V=40,U=100,X=
-0,n=function(){null!=e?e(ya):(A.setSelectionCells(ya),A.scrollCellToVisible(A.getSelectionCell()))},E=A.getFreeInsertPoint(),I=E.x,S=E.y;E=S;var Q=null,P="auto";M=null;for(var T=[],Y=null,ca=null,ia=0;ia<g.length&&"#"==g[ia].charAt(0);){c=g[ia].replace(/\r$/,"");for(ia++;ia<g.length&&"\\"==c.charAt(c.length-1)&&"#"==g[ia].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(g[ia].substring(1)),ia++;if("#"!=c.charAt(1)){var Z=c.indexOf(":");if(0<Z){var fa=mxUtils.trim(c.substring(1,Z)),aa=mxUtils.trim(c.substring(Z+
-1));"label"==fa?Q=A.sanitizeHtml(aa):"labelname"==fa&&0<aa.length&&"-"!=aa?q=aa:"labels"==fa&&0<aa.length&&"-"!=aa?z=JSON.parse(aa):"style"==fa?L=aa:"parentstyle"==fa?B=aa:"unknownStyle"==fa&&"-"!=aa?C=aa:"stylename"==fa&&0<aa.length&&"-"!=aa?K=aa:"styles"==fa&&0<aa.length&&"-"!=aa?N=JSON.parse(aa):"vars"==fa&&0<aa.length&&"-"!=aa?y=JSON.parse(aa):"identity"==fa&&0<aa.length&&"-"!=aa?G=aa:"parent"==fa&&0<aa.length&&"-"!=aa?M=aa:"namespace"==fa&&0<aa.length&&"-"!=aa?H=aa:"width"==fa?F=aa:"height"==
-fa?J=aa:"left"==fa&&0<aa.length?R=aa:"top"==fa&&0<aa.length?W=aa:"ignore"==fa?ca=aa.split(","):"connect"==fa?T.push(JSON.parse(aa)):"link"==fa?Y=aa:"padding"==fa?X=parseFloat(aa):"edgespacing"==fa?O=parseFloat(aa):"nodespacing"==fa?V=parseFloat(aa):"levelspacing"==fa?U=parseFloat(aa):"layout"==fa&&(P=aa)}}}if(null==g[ia])throw Error(mxResources.get("invalidOrMissingFile"));var wa=this.editor.csvToArray(g[ia].replace(/\r$/,""));Z=c=null;fa=[];for(aa=0;aa<wa.length;aa++)G==wa[aa]&&(c=aa),M==wa[aa]&&
-(Z=aa),fa.push(mxUtils.trim(wa[aa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Q&&(Q="%"+fa[0]+"%");if(null!=T)for(var la=0;la<T.length;la++)null==x[T[la].to]&&(x[T[la].to]={});G=[];for(aa=ia+1;aa<g.length;aa++){var za=this.editor.csvToArray(g[aa].replace(/\r$/,""));if(null==za){var Ba=40<g[aa].length?g[aa].substring(0,40)+"...":g[aa];throw Error(Ba+" ("+aa+"):\n"+mxResources.get("containsValidationErrors"));}0<za.length&&G.push(za)}A.model.beginUpdate();try{for(aa=0;aa<
-G.length;aa++){za=G[aa];var ua=null,Da=null!=c?H+za[c]:null;null!=Da&&(ua=A.model.getCell(Da));g=null!=ua;var Fa=new mxCell(Q,new mxGeometry(I,E,0,0),L||"whiteSpace=wrap;html=1;");Fa.vertex=!0;Fa.id=Da;Ba=null!=ua?ua:Fa;for(var Ka=0;Ka<za.length;Ka++)A.setAttributeForCell(Ba,fa[Ka],za[Ka]);if(null!=q&&null!=z){var Qa=z[Ba.getAttribute(q)];null!=Qa&&A.labelChanged(Ba,Qa)}if(null!=K&&null!=N){var Ia=N[Ba.getAttribute(K)];null!=Ia&&(Ba.style=Ia)}A.setAttributeForCell(Ba,"placeholders","1");Ba.style=
-A.replacePlaceholders(Ba,Ba.style,y);g?(0>mxUtils.indexOf(p,ua)&&p.push(ua),A.fireEvent(new mxEventObject("cellsInserted","cells",[ua]))):A.fireEvent(new mxEventObject("cellsInserted","cells",[Fa]));ua=Fa;if(!g)for(la=0;la<T.length;la++)x[T[la].to][ua.getAttribute(T[la].to)]=ua;null!=Y&&"link"!=Y&&(A.setLinkForCell(ua,ua.getAttribute(Y)),A.setAttributeForCell(ua,Y,null));var Ea=this.editor.graph.getPreferredSizeForCell(ua);M=null!=Z?A.model.getCell(H+za[Z]):null;if(ua.vertex){Ba=null!=M?0:I;ia=null!=
-M?0:S;null!=R&&null!=ua.getAttribute(R)&&(ua.geometry.x=Ba+parseFloat(ua.getAttribute(R)));null!=W&&null!=ua.getAttribute(W)&&(ua.geometry.y=ia+parseFloat(ua.getAttribute(W)));var Ca="@"==F.charAt(0)?ua.getAttribute(F.substring(1)):null;ua.geometry.width=null!=Ca&&"auto"!=Ca?parseFloat(ua.getAttribute(F.substring(1))):"auto"==F||"auto"==Ca?Ea.width+X:parseFloat(F);var Na="@"==J.charAt(0)?ua.getAttribute(J.substring(1)):null;ua.geometry.height=null!=Na&&"auto"!=Na?parseFloat(Na):"auto"==J||"auto"==
-Na?Ea.height+X:parseFloat(J);E+=ua.geometry.height+V}g?(null==v[Da]&&(v[Da]=[]),v[Da].push(ua)):(k.push(ua),null!=M?(M.style=A.replacePlaceholders(M,B,y),A.addCell(ua,M),m.push(M)):p.push(A.addCell(ua)))}for(aa=0;aa<m.length;aa++)Ca="@"==F.charAt(0)?m[aa].getAttribute(F.substring(1)):null,Na="@"==J.charAt(0)?m[aa].getAttribute(J.substring(1)):null,"auto"!=F&&"auto"!=Ca||"auto"!=J&&"auto"!=Na||A.updateGroupBounds([m[aa]],X,!0);var Aa=p.slice(),ya=p.slice();for(la=0;la<T.length;la++){var pa=T[la];for(aa=
-0;aa<k.length;aa++){ua=k[aa];var ea=mxUtils.bind(this,function(ma,sa,ha){var Ma=sa.getAttribute(ha.from);if(null!=Ma&&""!=Ma){Ma=Ma.split(",");for(var Ja=0;Ja<Ma.length;Ja++){var Pa=x[ha.to][Ma[Ja]];if(null==Pa&&null!=C){Pa=new mxCell(Ma[Ja],new mxGeometry(I,S,0,0),C);Pa.style=A.replacePlaceholders(sa,Pa.style,y);var Sa=this.editor.graph.getPreferredSizeForCell(Pa);Pa.geometry.width=Sa.width+X;Pa.geometry.height=Sa.height+X;x[ha.to][Ma[Ja]]=Pa;Pa.vertex=!0;Pa.id=Ma[Ja];p.push(A.addCell(Pa))}if(null!=
-Pa){Sa=ha.label;null!=ha.fromlabel&&(Sa=(sa.getAttribute(ha.fromlabel)||"")+(Sa||""));null!=ha.sourcelabel&&(Sa=A.replacePlaceholders(sa,ha.sourcelabel,y)+(Sa||""));null!=ha.tolabel&&(Sa=(Sa||"")+(Pa.getAttribute(ha.tolabel)||""));null!=ha.targetlabel&&(Sa=(Sa||"")+A.replacePlaceholders(Pa,ha.targetlabel,y));var Ga="target"==ha.placeholders==!ha.invert?Pa:ma;Ga=null!=ha.style?A.replacePlaceholders(Ga,ha.style,y):A.createCurrentEdgeStyle();Sa=A.insertEdge(null,null,Sa||"",ha.invert?Pa:ma,ha.invert?
-ma:Pa,Ga);if(null!=ha.labels)for(Ga=0;Ga<ha.labels.length;Ga++){var Ha=ha.labels[Ga],Oa=new mxCell(Ha.label||Ga,new mxGeometry(null!=Ha.x?Ha.x:0,null!=Ha.y?Ha.y:0,0,0),"resizable=0;html=1;");Oa.vertex=!0;Oa.connectable=!1;Oa.geometry.relative=!0;null!=Ha.placeholders&&(Oa.value=A.replacePlaceholders("target"==Ha.placeholders==!ha.invert?Pa:ma,Oa.value,y));if(null!=Ha.dx||null!=Ha.dy)Oa.geometry.offset=new mxPoint(null!=Ha.dx?Ha.dx:0,null!=Ha.dy?Ha.dy:0);Sa.insert(Oa)}ya.push(Sa);mxUtils.remove(ha.invert?
-ma:Pa,Aa)}}}});ea(ua,ua,pa);if(null!=v[ua.id])for(Ka=0;Ka<v[ua.id].length;Ka++)ea(ua,v[ua.id][Ka],pa)}}if(null!=ca)for(aa=0;aa<k.length;aa++)for(ua=k[aa],Ka=0;Ka<ca.length;Ka++)A.setAttributeForCell(ua,mxUtils.trim(ca[Ka]),null);if(0<p.length){var ra=new mxParallelEdgeLayout(A);ra.spacing=O;ra.checkOverlap=!0;var xa=function(){0<ra.spacing&&ra.execute(A.getDefaultParent());for(var ma=0;ma<p.length;ma++){var sa=A.getCellGeometry(p[ma]);sa.x=Math.round(A.snap(sa.x));sa.y=Math.round(A.snap(sa.y));"auto"==
-F&&(sa.width=Math.round(A.snap(sa.width)));"auto"==J&&(sa.height=Math.round(A.snap(sa.height)))}};if("["==P.charAt(0)){var va=n;A.view.validate();this.executeLayouts(A.createLayouts(JSON.parse(P)),function(){xa();va()});n=null}else if("circle"==P){var qa=new mxCircleLayout(A);qa.disableEdgeStyle=!1;qa.resetEdges=!1;var ta=qa.isVertexIgnored;qa.isVertexIgnored=function(ma){return ta.apply(this,arguments)||0>mxUtils.indexOf(p,ma)};this.executeLayout(function(){qa.execute(A.getDefaultParent());xa()},
-!0,n);n=null}else if("horizontaltree"==P||"verticaltree"==P||"auto"==P&&ya.length==2*p.length-1&&1==Aa.length){A.view.validate();var ja=new mxCompactTreeLayout(A,"horizontaltree"==P);ja.levelDistance=V;ja.edgeRouting=!1;ja.resetEdges=!1;this.executeLayout(function(){ja.execute(A.getDefaultParent(),0<Aa.length?Aa[0]:null)},!0,n);n=null}else if("horizontalflow"==P||"verticalflow"==P||"auto"==P&&1==Aa.length){A.view.validate();var oa=new mxHierarchicalLayout(A,"horizontalflow"==P?mxConstants.DIRECTION_WEST:
-mxConstants.DIRECTION_NORTH);oa.intraCellSpacing=V;oa.parallelEdgeSpacing=O;oa.interRankCellSpacing=U;oa.disableEdgeStyle=!1;this.executeLayout(function(){oa.execute(A.getDefaultParent(),ya);A.moveCells(ya,I,S)},!0,n);n=null}else if("orgchart"==P){A.view.validate();var ba=new mxOrgChartLayout(A,2,U,V),da=ba.isVertexIgnored;ba.isVertexIgnored=function(ma){return da.apply(this,arguments)||0>mxUtils.indexOf(p,ma)};this.executeLayout(function(){ba.execute(A.getDefaultParent());xa()},!0,n);n=null}else if("organic"==
-P||"auto"==P&&ya.length>p.length){A.view.validate();var na=new mxFastOrganicLayout(A);na.forceConstant=3*V;na.disableEdgeStyle=!1;na.resetEdges=!1;var ka=na.isVertexIgnored;na.isVertexIgnored=function(ma){return ka.apply(this,arguments)||0>mxUtils.indexOf(p,ma)};this.executeLayout(function(){na.execute(A.getDefaultParent());xa()},!0,n);n=null}}this.hideDialog()}finally{A.model.endUpdate()}null!=n&&n()}}catch(ma){this.handleError(ma)}};EditorUi.prototype.getSearch=function(c){var e="";if("1"!=urlParams.offline&&
-"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var g="?",k;for(k in urlParams)0>mxUtils.indexOf(c,k)&&null!=urlParams[k]&&(e+=g+k+"="+urlParams[k],g="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),k;for(k in urlParams)0>mxUtils.indexOf(g,
-k)&&(c=0==e?c+"?":c+"&",null!=urlParams[k]&&(c+=k+"="+urlParams[k],e++))}return c};EditorUi.prototype.showLinkDialog=function(c,e,g,k,m){c=new LinkDialog(this,c,e,g,!0,k,m);this.showDialog(c.container,560,130,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var e=1;null==this.drive&&"function"!==typeof window.DriveClient||e++;null==this.dropbox&&"function"!==typeof window.DropboxClient||e++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||e++;null!=this.gitHub&&e++;null!=
-this.gitLab&&e++;c&&isLocalStorage&&"1"==urlParams.browser&&e++;return e};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(e);this.menus.get("viewZoom").setEnabled(e);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);
-this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(e);this.actions.get("zoomIn").setEnabled(e);this.actions.get("zoomOut").setEnabled(e);this.actions.get("resetView").setEnabled(e);
-this.actions.get("undo").setEnabled(this.canUndo()&&c);this.actions.get("redo").setEnabled(this.canRedo()&&c);this.menus.get("edit").setEnabled(e);this.menus.get("view").setEnabled(e);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(c),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(c));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=
-function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var u=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){u.apply(this,arguments);var c=this.editor.graph,e=this.getCurrentFile(),g=this.getSelectionState(),
-k=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(k);this.actions.get("autosave").setEnabled(null!=e&&e.isEditable()&&e.isAutosaveOptional());this.actions.get("guides").setEnabled(k);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("shadowVisible").setEnabled(k);this.actions.get("connectionArrows").setEnabled(k);this.actions.get("connectionPoints").setEnabled(k);this.actions.get("copyStyle").setEnabled(k&&!c.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(k&&
-0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(k);this.actions.get("createRevision").setEnabled(k);this.actions.get("moveToFolder").setEnabled(null!=e);this.actions.get("makeCopy").setEnabled(null!=e&&!e.isRestricted());this.actions.get("editDiagram").setEnabled(k&&(null==e||!e.isRestricted()));this.actions.get("publishLink").setEnabled(null!=e&&!e.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);
-this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=e&&e.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=e);this.menus.get("publish").setEnabled(null!=e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("hidden"!=this.diagramContainer.style.visibility);e.label=mxResources.get("find")+
-(c.isEnabled()?"/"+mxResources.get("replace"):"")+"...";c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(k&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var D=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);D.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=
-function(c,e,g,k,m,p,v,x){var A=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==g)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(A.getSvg(k,m,p)),"image/svg+xml");else{var y=c.getFileData(!0,null,null,null,null,!0),L=A.getGraphBounds(),N=Math.floor(L.width*m/A.view.scale),K=Math.floor(L.height*m/A.view.scale);if(y.length<=MAX_REQUEST_SIZE&&N*K<MAX_AREA)if(c.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!c.isExportToCanvas()){var q=
-{globalVars:A.getExportVariables()};x&&(q.grid={size:A.gridSize,steps:A.view.gridSteps,color:A.view.gridColor});c.saveRequest(e,g,function(C,z){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(z||"0")+(null!=C?"&filename="+encodeURIComponent(C):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<v?"&dpi="+v:"")+"&bg="+(null!=k?k:"none")+"&w="+N+"&h="+K+"&border="+p+"&xml="+encodeURIComponent(y))})}else"png"==g?c.exportImage(m,null==k||"none"==k,!0,!1,!1,p,!0,!1,null,x,v):c.exportImage(m,
-!1,!0,!1,!1,p,!0,!1,"jpeg",x);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var k=c;this.currentPage!=this.pages[g]&&(k=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[g]),k.model.setRoot(this.pages[g].root));e+=this.pages[g].getName()+" "+k.getIndexableText()+" "}else e=c.getIndexableText();
-this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");mxUtils.write(k,mxUtils.htmlEntities(c));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var m=document.createElement("div");m.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";m.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+
-IMAGE_PATH+'/spin.gif"></div>';var p={};try{var v=mxSettings.getCustomLibraries();for(c=0;c<v.length;c++){var x=v[c];if("R"==x.substring(0,1)){var A=JSON.parse(decodeURIComponent(x.substring(1)));p[A[0]]={id:A[0],title:A[1],downloadUrl:A[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",null,null,function(y){m.innerHTML="";if(0==y.length)m.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var L=0;L<
+function(){mxscript("js/orgchart/mxOrgChartLayout.js",e)})})}):mxscript("js/extensions.min.js",e))};EditorUi.prototype.importCsv=function(c,e){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(c,e)}))};EditorUi.prototype.doImportCsv=function(c,e){try{var g=c.split("\n"),k=[],m=[],p=[],v={};if(0<g.length){var x={},z=this.editor.graph,y=null,L=null,N=null,K=null,q=null,C=null,A=null,B="whiteSpace=wrap;html=1;",G=null,M=null,H="",F="auto",J="auto",R=!1,W=null,O=null,V=40,U=40,Y=
+100,n=0,D=function(){null!=e?e(pa):(z.setSelectionCells(pa),z.scrollCellToVisible(z.getSelectionCell()))},I=z.getFreeInsertPoint(),S=I.x,Q=I.y;I=Q;var P=null,T="auto";M=null;for(var X=[],ba=null,ja=null,Z=0;Z<g.length&&"#"==g[Z].charAt(0);){c=g[Z].replace(/\r$/,"");for(Z++;Z<g.length&&"\\"==c.charAt(c.length-1)&&"#"==g[Z].charAt(0);)c=c.substring(0,c.length-1)+mxUtils.trim(g[Z].substring(1)),Z++;if("#"!=c.charAt(1)){var ka=c.indexOf(":");if(0<ka){var da=mxUtils.trim(c.substring(1,ka)),fa=mxUtils.trim(c.substring(ka+
+1));"label"==da?P=z.sanitizeHtml(fa):"labelname"==da&&0<fa.length&&"-"!=fa?q=fa:"labels"==da&&0<fa.length&&"-"!=fa?A=JSON.parse(fa):"style"==da?L=fa:"parentstyle"==da?B=fa:"unknownStyle"==da&&"-"!=fa?C=fa:"stylename"==da&&0<fa.length&&"-"!=fa?K=fa:"styles"==da&&0<fa.length&&"-"!=fa?N=JSON.parse(fa):"vars"==da&&0<fa.length&&"-"!=fa?y=JSON.parse(fa):"identity"==da&&0<fa.length&&"-"!=fa?G=fa:"parent"==da&&0<fa.length&&"-"!=fa?M=fa:"namespace"==da&&0<fa.length&&"-"!=fa?H=fa:"width"==da?F=fa:"height"==
+da?J=fa:"collapsed"==da&&"-"!=fa?R="true"==fa:"left"==da&&0<fa.length?W=fa:"top"==da&&0<fa.length?O=fa:"ignore"==da?ja=fa.split(","):"connect"==da?X.push(JSON.parse(fa)):"link"==da?ba=fa:"padding"==da?n=parseFloat(fa):"edgespacing"==da?V=parseFloat(fa):"nodespacing"==da?U=parseFloat(fa):"levelspacing"==da?Y=parseFloat(fa):"layout"==da&&(T=fa)}}}if(null==g[Z])throw Error(mxResources.get("invalidOrMissingFile"));var ma=this.editor.csvToArray(g[Z].replace(/\r$/,""));ka=c=null;da=[];for(fa=0;fa<ma.length;fa++)G==
+ma[fa]&&(c=fa),M==ma[fa]&&(ka=fa),da.push(mxUtils.trim(ma[fa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==P&&(P="%"+da[0]+"%");if(null!=X)for(var ya=0;ya<X.length;ya++)null==x[X[ya].to]&&(x[X[ya].to]={});G=[];for(fa=Z+1;fa<g.length;fa++){var Ba=this.editor.csvToArray(g[fa].replace(/\r$/,""));if(null==Ba){var Ha=40<g[fa].length?g[fa].substring(0,40)+"...":g[fa];throw Error(Ha+" ("+fa+"):\n"+mxResources.get("containsValidationErrors"));}0<Ba.length&&G.push(Ba)}z.model.beginUpdate();
+try{for(fa=0;fa<G.length;fa++){Ba=G[fa];var sa=null,Ga=null!=c?H+Ba[c]:null;null!=Ga&&(sa=z.model.getCell(Ga));var Ka=new mxCell(P,new mxGeometry(S,I,0,0),L||"whiteSpace=wrap;html=1;");Ka.collapsed=R;Ka.vertex=!0;Ka.id=Ga;null!=sa&&z.model.setCollapsed(sa,R);for(var Ma=0;Ma<Ba.length;Ma++)z.setAttributeForCell(Ka,da[Ma],Ba[Ma]),null!=sa&&z.setAttributeForCell(sa,da[Ma],Ba[Ma]);if(null!=q&&null!=A){var Ia=A[Ka.getAttribute(q)];null!=Ia&&(z.labelChanged(Ka,Ia),null!=sa&&z.cellLabelChanged(sa,Ia))}if(null!=
+K&&null!=N){var Ea=N[Ka.getAttribute(K)];null!=Ea&&(Ka.style=Ea)}z.setAttributeForCell(Ka,"placeholders","1");Ka.style=z.replacePlaceholders(Ka,Ka.style,y);null!=sa?(z.model.setStyle(sa,Ka.style),0>mxUtils.indexOf(p,sa)&&p.push(sa),z.fireEvent(new mxEventObject("cellsInserted","cells",[sa]))):z.fireEvent(new mxEventObject("cellsInserted","cells",[Ka]));g=null!=sa;sa=Ka;if(!g)for(ya=0;ya<X.length;ya++)x[X[ya].to][sa.getAttribute(X[ya].to)]=sa;null!=ba&&"link"!=ba&&(z.setLinkForCell(sa,sa.getAttribute(ba)),
+z.setAttributeForCell(sa,ba,null));var Fa=this.editor.graph.getPreferredSizeForCell(sa);M=null!=ka?z.model.getCell(H+Ba[ka]):null;if(sa.vertex){Ha=null!=M?0:S;Z=null!=M?0:Q;null!=W&&null!=sa.getAttribute(W)&&(sa.geometry.x=Ha+parseFloat(sa.getAttribute(W)));null!=O&&null!=sa.getAttribute(O)&&(sa.geometry.y=Z+parseFloat(sa.getAttribute(O)));var Pa="@"==F.charAt(0)?sa.getAttribute(F.substring(1)):null;sa.geometry.width=null!=Pa&&"auto"!=Pa?parseFloat(sa.getAttribute(F.substring(1))):"auto"==F||"auto"==
+Pa?Fa.width+n:parseFloat(F);var Aa="@"==J.charAt(0)?sa.getAttribute(J.substring(1)):null;sa.geometry.height=null!=Aa&&"auto"!=Aa?parseFloat(Aa):"auto"==J||"auto"==Aa?Fa.height+n:parseFloat(J);I+=sa.geometry.height+U}g?(null==v[Ga]&&(v[Ga]=[]),v[Ga].push(sa)):(k.push(sa),null!=M?(M.style=z.replacePlaceholders(M,B,y),z.addCell(sa,M),m.push(M)):p.push(z.addCell(sa)))}for(fa=0;fa<m.length;fa++)Pa="@"==F.charAt(0)?m[fa].getAttribute(F.substring(1)):null,Aa="@"==J.charAt(0)?m[fa].getAttribute(J.substring(1)):
+null,"auto"!=F&&"auto"!=Pa||"auto"!=J&&"auto"!=Aa||z.updateGroupBounds([m[fa]],n,!0);var za=p.slice(),pa=p.slice();for(ya=0;ya<X.length;ya++){var ea=X[ya];for(fa=0;fa<k.length;fa++){sa=k[fa];var ta=mxUtils.bind(this,function(ra,ia,Da){var Ja=ia.getAttribute(Da.from);if(null!=Ja&&""!=Ja){Ja=Ja.split(",");for(var Sa=0;Sa<Ja.length;Sa++){var Ra=x[Da.to][Ja[Sa]];if(null==Ra&&null!=C){Ra=new mxCell(Ja[Sa],new mxGeometry(S,Q,0,0),C);Ra.style=z.replacePlaceholders(ia,Ra.style,y);var Ca=this.editor.graph.getPreferredSizeForCell(Ra);
+Ra.geometry.width=Ca.width+n;Ra.geometry.height=Ca.height+n;x[Da.to][Ja[Sa]]=Ra;Ra.vertex=!0;Ra.id=Ja[Sa];p.push(z.addCell(Ra))}if(null!=Ra){Ca=Da.label;null!=Da.fromlabel&&(Ca=(ia.getAttribute(Da.fromlabel)||"")+(Ca||""));null!=Da.sourcelabel&&(Ca=z.replacePlaceholders(ia,Da.sourcelabel,y)+(Ca||""));null!=Da.tolabel&&(Ca=(Ca||"")+(Ra.getAttribute(Da.tolabel)||""));null!=Da.targetlabel&&(Ca=(Ca||"")+z.replacePlaceholders(Ra,Da.targetlabel,y));var La="target"==Da.placeholders==!Da.invert?Ra:ra;La=
+null!=Da.style?z.replacePlaceholders(La,Da.style,y):z.createCurrentEdgeStyle();Ca=z.insertEdge(null,null,Ca||"",Da.invert?Ra:ra,Da.invert?ra:Ra,La);if(null!=Da.labels)for(La=0;La<Da.labels.length;La++){var Oa=Da.labels[La],Qa=new mxCell(Oa.label||La,new mxGeometry(null!=Oa.x?Oa.x:0,null!=Oa.y?Oa.y:0,0,0),"resizable=0;html=1;");Qa.vertex=!0;Qa.connectable=!1;Qa.geometry.relative=!0;null!=Oa.placeholders&&(Qa.value=z.replacePlaceholders("target"==Oa.placeholders==!Da.invert?Ra:ra,Qa.value,y));if(null!=
+Oa.dx||null!=Oa.dy)Qa.geometry.offset=new mxPoint(null!=Oa.dx?Oa.dx:0,null!=Oa.dy?Oa.dy:0);Ca.insert(Qa)}pa.push(Ca);mxUtils.remove(Da.invert?ra:Ra,za)}}}});ta(sa,sa,ea);if(null!=v[sa.id])for(Ma=0;Ma<v[sa.id].length;Ma++)ta(sa,v[sa.id][Ma],ea)}}if(null!=ja)for(fa=0;fa<k.length;fa++)for(sa=k[fa],Ma=0;Ma<ja.length;Ma++)z.setAttributeForCell(sa,mxUtils.trim(ja[Ma]),null);if(0<p.length){var xa=new mxParallelEdgeLayout(z);xa.spacing=V;xa.checkOverlap=!0;var wa=function(){0<xa.spacing&&xa.execute(z.getDefaultParent());
+for(var ra=0;ra<p.length;ra++){var ia=z.getCellGeometry(p[ra]);ia.x=Math.round(z.snap(ia.x));ia.y=Math.round(z.snap(ia.y));"auto"==F&&(ia.width=Math.round(z.snap(ia.width)));"auto"==J&&(ia.height=Math.round(z.snap(ia.height)))}};if("["==T.charAt(0)){var ua=D;z.view.validate();this.executeLayouts(z.createLayouts(JSON.parse(T)),function(){wa();ua()});D=null}else if("circle"==T){var va=new mxCircleLayout(z);va.disableEdgeStyle=!1;va.resetEdges=!1;var ha=va.isVertexIgnored;va.isVertexIgnored=function(ra){return ha.apply(this,
+arguments)||0>mxUtils.indexOf(p,ra)};this.executeLayout(function(){va.execute(z.getDefaultParent());wa()},!0,D);D=null}else if("horizontaltree"==T||"verticaltree"==T||"auto"==T&&pa.length==2*p.length-1&&1==za.length){z.view.validate();var qa=new mxCompactTreeLayout(z,"horizontaltree"==T);qa.levelDistance=U;qa.edgeRouting=!1;qa.resetEdges=!1;this.executeLayout(function(){qa.execute(z.getDefaultParent(),0<za.length?za[0]:null)},!0,D);D=null}else if("horizontalflow"==T||"verticalflow"==T||"auto"==T&&
+1==za.length){z.view.validate();var aa=new mxHierarchicalLayout(z,"horizontalflow"==T?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);aa.intraCellSpacing=U;aa.parallelEdgeSpacing=V;aa.interRankCellSpacing=Y;aa.disableEdgeStyle=!1;this.executeLayout(function(){aa.execute(z.getDefaultParent(),pa);z.moveCells(pa,S,Q)},!0,D);D=null}else if("orgchart"==T){z.view.validate();var ca=new mxOrgChartLayout(z,2,Y,U),na=ca.isVertexIgnored;ca.isVertexIgnored=function(ra){return na.apply(this,arguments)||
+0>mxUtils.indexOf(p,ra)};this.executeLayout(function(){ca.execute(z.getDefaultParent());wa()},!0,D);D=null}else if("organic"==T||"auto"==T&&pa.length>p.length){z.view.validate();var la=new mxFastOrganicLayout(z);la.forceConstant=3*U;la.disableEdgeStyle=!1;la.resetEdges=!1;var oa=la.isVertexIgnored;la.isVertexIgnored=function(ra){return oa.apply(this,arguments)||0>mxUtils.indexOf(p,ra)};this.executeLayout(function(){la.execute(z.getDefaultParent());wa()},!0,D);D=null}}this.hideDialog()}finally{z.model.endUpdate()}null!=
+D&&D()}}catch(ra){this.handleError(ra)}};EditorUi.prototype.getSearch=function(c){var e="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=c&&0<window.location.search.length){var g="?",k;for(k in urlParams)0>mxUtils.indexOf(c,k)&&null!=urlParams[k]&&(e+=g+k+"="+urlParams[k],g="&")}else e=window.location.search;return e};EditorUi.prototype.getUrl=function(c){c=null!=c?c:window.location.pathname;var e=0<c.indexOf("?")?1:0;if("1"==urlParams.offline)c+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),
+k;for(k in urlParams)0>mxUtils.indexOf(g,k)&&(c=0==e?c+"?":c+"&",null!=urlParams[k]&&(c+=k+"="+urlParams[k],e++))}return c};EditorUi.prototype.showLinkDialog=function(c,e,g,k,m){c=new LinkDialog(this,c,e,g,!0,k,m);this.showDialog(c.container,560,130,!0,!0);c.init()};EditorUi.prototype.getServiceCount=function(c){var e=1;null==this.drive&&"function"!==typeof window.DriveClient||e++;null==this.dropbox&&"function"!==typeof window.DropboxClient||e++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||
+e++;null!=this.gitHub&&e++;null!=this.gitLab&&e++;c&&isLocalStorage&&"1"==urlParams.browser&&e++;return e};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var c=this.getCurrentFile(),e=null!=c||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(e);this.menus.get("viewZoom").setEnabled(e);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==c||c.isRestricted());this.actions.get("makeCopy").setEnabled(!g);
+this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));c="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=c&&c.isEditable();this.actions.get("image").setEnabled(e);this.actions.get("zoomIn").setEnabled(e);this.actions.get("zoomOut").setEnabled(e);
+this.actions.get("resetView").setEnabled(e);this.actions.get("undo").setEnabled(this.canUndo()&&c);this.actions.get("redo").setEnabled(this.canRedo()&&c);this.menus.get("edit").setEnabled(e);this.menus.get("view").setEnabled(e);this.menus.get("importFrom").setEnabled(c);this.menus.get("arrange").setEnabled(c);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(c),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(c));this.updateUserElement()};
+EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var c=this.getCurrentFile();return null!=c&&c.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var u=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){u.apply(this,arguments);var c=this.editor.graph,
+e=this.getCurrentFile(),g=this.getSelectionState(),k=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(k);this.actions.get("autosave").setEnabled(null!=e&&e.isEditable()&&e.isAutosaveOptional());this.actions.get("guides").setEnabled(k);this.actions.get("editData").setEnabled(c.isEnabled());this.actions.get("shadowVisible").setEnabled(k);this.actions.get("connectionArrows").setEnabled(k);this.actions.get("connectionPoints").setEnabled(k);this.actions.get("copyStyle").setEnabled(k&&!c.isSelectionEmpty());
+this.actions.get("pasteStyle").setEnabled(k&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(k);this.actions.get("createRevision").setEnabled(k);this.actions.get("moveToFolder").setEnabled(null!=e);this.actions.get("makeCopy").setEnabled(null!=e&&!e.isRestricted());this.actions.get("editDiagram").setEnabled(k&&(null==e||!e.isRestricted()));this.actions.get("publishLink").setEnabled(null!=e&&!e.isRestricted());this.actions.get("tags").setEnabled("hidden"!=
+this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=e&&e.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=e);this.menus.get("publish").setEnabled(null!=e&&!e.isRestricted());e=this.actions.get("findReplace");e.setEnabled("hidden"!=this.diagramContainer.style.visibility);
+e.label=mxResources.get("find")+(c.isEnabled()?"/"+mxResources.get("replace"):"")+"...";c=c.view.getState(c.getSelectionCell());this.actions.get("editShape").setEnabled(k&&null!=c&&null!=c.shape&&null!=c.shape.stencil)};var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=
+!1,ExportDialog.exportFile=function(c,e,g,k,m,p,v,x){var z=c.editor.graph;if("xml"==g)c.hideDialog(),c.saveData(e,"xml",mxUtils.getXml(c.editor.getGraphXml()),"text/xml");else if("svg"==g)c.hideDialog(),c.saveData(e,"svg",mxUtils.getXml(z.getSvg(k,m,p)),"image/svg+xml");else{var y=c.getFileData(!0,null,null,null,null,!0),L=z.getGraphBounds(),N=Math.floor(L.width*m/z.view.scale),K=Math.floor(L.height*m/z.view.scale);if(y.length<=MAX_REQUEST_SIZE&&N*K<MAX_AREA)if(c.hideDialog(),"png"!=g&&"jpg"!=g&&
+"jpeg"!=g||!c.isExportToCanvas()){var q={globalVars:z.getExportVariables()};x&&(q.grid={size:z.gridSize,steps:z.view.gridSteps,color:z.view.gridColor});c.saveRequest(e,g,function(C,A){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(A||"0")+(null!=C?"&filename="+encodeURIComponent(C):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(0<v?"&dpi="+v:"")+"&bg="+(null!=k?k:"none")+"&w="+N+"&h="+K+"&border="+p+"&xml="+encodeURIComponent(y))})}else"png"==g?c.exportImage(m,null==k||"none"==
+k,!0,!1,!1,p,!0,!1,null,x,v):c.exportImage(m,!1,!0,!1,!1,p,!0,!1,"jpeg",x);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var c=this.editor.graph,e="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var k=c;this.currentPage!=this.pages[g]&&(k=this.createTemporaryGraph(c.getStylesheet()),this.updatePageRoot(this.pages[g]),k.model.setRoot(this.pages[g].root));e+=this.pages[g].getName()+" "+k.getIndexableText()+
+" "}else e=c.getIndexableText();this.editor.graph.setEnabled(!0);return e};EditorUi.prototype.showRemotelyStoredLibrary=function(c){var e={},g=document.createElement("div");g.style.whiteSpace="nowrap";var k=document.createElement("h3");mxUtils.write(k,mxUtils.htmlEntities(c));k.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(k);var m=document.createElement("div");m.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";m.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+
+IMAGE_PATH+'/spin.gif"></div>';var p={};try{var v=mxSettings.getCustomLibraries();for(c=0;c<v.length;c++){var x=v[c];if("R"==x.substring(0,1)){var z=JSON.parse(decodeURIComponent(x.substring(1)));p[z[0]]={id:z[0],title:z[1],downloadUrl:z[2]}}}}catch(y){}this.remoteInvoke("getCustomLibraries",null,null,function(y){m.innerHTML="";if(0==y.length)m.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var L=0;L<
y.length;L++){var N=y[L];p[N.id]&&(e[N.id]=N);var K=this.addCheckbox(m,N.title,p[N.id]);(function(q,C){mxEvent.addListener(C,"change",function(){this.checked?e[q.id]=q:delete e[q.id]})})(N,K)}},mxUtils.bind(this,function(y){m.innerHTML="";var L=document.createElement("div");L.style.padding="8px";L.style.textAlign="center";mxUtils.write(L,mxResources.get("error")+": ");mxUtils.write(L,null!=y&&null!=y.message?y.message:mxResources.get("unknownError"));m.appendChild(L)}));g.appendChild(m);g=new CustomDialog(this,
g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var y=0,L;for(L in e)null==p[L]&&(y++,mxUtils.bind(this,function(N){this.remoteInvoke("getFileContent",[N.downloadUrl],null,mxUtils.bind(this,function(K){y--;0==y&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,K,N))}catch(q){this.handleError(q,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){y--;0==y&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(e[L]));
for(L in p)e[L]||this.closeLibrary(new RemoteLibrary(this,null,p[L]));0==y&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};
EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(c){this.remoteWin=c;for(var e=0;e<this.remoteInvokeQueue.length;e++)c.postMessage(this.remoteInvokeQueue[e],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(c){var e=c.msgMarkers,g=this.remoteInvokeCallbacks[e.callbackId];if(null==g)throw Error("No callback for "+(null!=e?e.callbackId:"null"));c.error?g.error&&g.error(c.error.errResp):
-g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,g,k,m){var p=!0,v=window.setTimeout(mxUtils.bind(this,function(){p=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),x=mxUtils.bind(this,function(){window.clearTimeout(v);p&&k.apply(this,arguments)}),A=mxUtils.bind(this,function(){window.clearTimeout(v);p&&m.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;
-this.remoteInvokeCallbacks.push({callback:x,error:A});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var g=mxUtils.bind(this,function(y,L){var N={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=L?N.error={errResp:L}:null!=y&&(N.resp=y);this.remoteWin.postMessage(JSON.stringify(N),"*")});try{var k=c.funtionName,m=
-this.remoteInvokableFns[k];if(null!=m&&"function"===typeof this[k]){if(m.allowedDomains){for(var p=!1,v=0;v<m.allowedDomains.length;v++)if(e=="https://"+m.allowedDomains[v]){p=!0;break}if(!p){g(null,"Invalid Call: "+k+" is not allowed.");return}}var x=c.functionArgs;Array.isArray(x)||(x=[]);if(m.isAsync)x.push(function(){g(Array.prototype.slice.apply(arguments))}),x.push(function(y){g(null,y||"Unkown Error")}),this[k].apply(this,x);else{var A=this[k].apply(this,x);g([A])}}else g(null,"Invalid Call: "+
+g.callback&&g.callback.apply(this,c.resp);this.remoteInvokeCallbacks[e.callbackId]=null};EditorUi.prototype.remoteInvoke=function(c,e,g,k,m){var p=!0,v=window.setTimeout(mxUtils.bind(this,function(){p=!1;m({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),x=mxUtils.bind(this,function(){window.clearTimeout(v);p&&k.apply(this,arguments)}),z=mxUtils.bind(this,function(){window.clearTimeout(v);p&&m.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;
+this.remoteInvokeCallbacks.push({callback:x,error:z});c=JSON.stringify({event:"remoteInvoke",funtionName:c,functionArgs:e,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(c,"*"):this.remoteInvokeQueue.push(c)};EditorUi.prototype.handleRemoteInvoke=function(c,e){var g=mxUtils.bind(this,function(y,L){var N={event:"remoteInvokeResponse",msgMarkers:c.msgMarkers};null!=L?N.error={errResp:L}:null!=y&&(N.resp=y);this.remoteWin.postMessage(JSON.stringify(N),"*")});try{var k=c.funtionName,m=
+this.remoteInvokableFns[k];if(null!=m&&"function"===typeof this[k]){if(m.allowedDomains){for(var p=!1,v=0;v<m.allowedDomains.length;v++)if(e=="https://"+m.allowedDomains[v]){p=!0;break}if(!p){g(null,"Invalid Call: "+k+" is not allowed.");return}}var x=c.functionArgs;Array.isArray(x)||(x=[]);if(m.isAsync)x.push(function(){g(Array.prototype.slice.apply(arguments))}),x.push(function(y){g(null,y||"Unkown Error")}),this[k].apply(this,x);else{var z=this[k].apply(this,x);g([z])}}else g(null,"Invalid Call: "+
k+" is not found.")}catch(y){g(null,"Invalid Call: An error occurred, "+y.message)}};EditorUi.prototype.openDatabase=function(c,e){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var k=g.open("database",2);k.onupgradeneeded=function(m){try{var p=k.result;1>m.oldVersion&&p.createObjectStore("objects",{keyPath:"key"});2>m.oldVersion&&(p.createObjectStore("files",{keyPath:"title"}),p.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
isLocalStorage)}catch(v){null!=e&&e(v)}};k.onsuccess=mxUtils.bind(this,function(m){var p=k.result;this.database=p;EditorUi.migrateStorageFiles&&(StorageFile.migrate(p),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(v){if(!v||"1"==urlParams.forceMigration){var x=document.createElement("iframe");x.style.display="none";x.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
-urlParams.forceMigration);document.body.appendChild(x);var A=!0,y=!1,L,N=0,K=mxUtils.bind(this,function(){y=!0;this.setDatabaseItem(".drawioMigrated3",!0);x.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),q=mxUtils.bind(this,function(){N++;C()}),C=mxUtils.bind(this,function(){try{if(N>=L.length)K();else{var B=L[N];StorageFile.getFileContent(this,B,mxUtils.bind(this,function(G){null==G||".scratchpad"==B&&G==this.emptyLibraryXml?x.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFile",functionArgs:[B]}),"*"):q()}),q)}}catch(G){console.log(G)}}),z=mxUtils.bind(this,function(B){try{this.setDatabaseItem(null,[{title:B.title,size:B.data.length,lastModified:Date.now(),type:B.isLib?"L":"F"},{title:B.title,data:B.data}],q,q,["filesInfo","files"])}catch(G){console.log(G)}});v=mxUtils.bind(this,function(B){try{if(B.source==x.contentWindow){var G={};try{G=JSON.parse(B.data)}catch(M){}"init"==G.event?(x.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
-"*"),x.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=G.event||y||(A?null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?(L=G.resp[0],A=!1,C()):K():null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?z(G.resp[0]):q())}}catch(M){console.log(M)}});window.addEventListener("message",v)}})));c(p);p.onversionchange=function(){p.close()}});k.onerror=e;k.onblocked=function(){}}catch(m){null!=e&&e(m)}else null!=e&&e()}else c(this.database)};
+urlParams.forceMigration);document.body.appendChild(x);var z=!0,y=!1,L,N=0,K=mxUtils.bind(this,function(){y=!0;this.setDatabaseItem(".drawioMigrated3",!0);x.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),q=mxUtils.bind(this,function(){N++;C()}),C=mxUtils.bind(this,function(){try{if(N>=L.length)K();else{var B=L[N];StorageFile.getFileContent(this,B,mxUtils.bind(this,function(G){null==G||".scratchpad"==B&&G==this.emptyLibraryXml?x.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
+funtionName:"getLocalStorageFile",functionArgs:[B]}),"*"):q()}),q)}}catch(G){console.log(G)}}),A=mxUtils.bind(this,function(B){try{this.setDatabaseItem(null,[{title:B.title,size:B.data.length,lastModified:Date.now(),type:B.isLib?"L":"F"},{title:B.title,data:B.data}],q,q,["filesInfo","files"])}catch(G){console.log(G)}});v=mxUtils.bind(this,function(B){try{if(B.source==x.contentWindow){var G={};try{G=JSON.parse(B.data)}catch(M){}"init"==G.event?(x.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
+"*"),x.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=G.event||y||(z?null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?(L=G.resp[0],z=!1,C()):K():null!=G.resp&&0<G.resp.length&&null!=G.resp[0]?A(G.resp[0]):q())}}catch(M){console.log(M)}});window.addEventListener("message",v)}})));c(p);p.onversionchange=function(){p.close()}});k.onerror=e;k.onblocked=function(){}}catch(m){null!=e&&e(m)}else null!=e&&e()}else c(this.database)};
EditorUi.prototype.setDatabaseItem=function(c,e,g,k,m){this.openDatabase(mxUtils.bind(this,function(p){try{m=m||"objects";Array.isArray(m)||(m=[m],c=[c],e=[e]);var v=p.transaction(m,"readwrite");v.oncomplete=g;v.onerror=k;for(p=0;p<m.length;p++)v.objectStore(m[p]).put(null!=c&&null!=c[p]?{key:c[p],data:e[p]}:e[p])}catch(x){null!=k&&k(x)}}),k)};EditorUi.prototype.removeDatabaseItem=function(c,e,g,k){this.openDatabase(mxUtils.bind(this,function(m){k=k||"objects";Array.isArray(k)||(k=[k],c=[c]);m=m.transaction(k,
"readwrite");m.oncomplete=e;m.onerror=g;for(var p=0;p<k.length;p++)m.objectStore(k[p]).delete(c[p])}),g)};EditorUi.prototype.getDatabaseItem=function(c,e,g,k){this.openDatabase(mxUtils.bind(this,function(m){try{k=k||"objects";var p=m.transaction([k],"readonly").objectStore(k).get(c);p.onsuccess=function(){e(p.result)};p.onerror=g}catch(v){null!=g&&g(v)}}),g)};EditorUi.prototype.getDatabaseItems=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(k){try{g=g||"objects";var m=k.transaction([g],
"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),p=[];m.onsuccess=function(v){null==v.target.result?c(p):(p.push(v.target.result.value),v.target.result.continue())};m.onerror=e}catch(v){null!=e&&e(v)}}),e)};EditorUi.prototype.getDatabaseItemKeys=function(c,e,g){this.openDatabase(mxUtils.bind(this,function(k){try{g=g||"objects";var m=k.transaction([g],"readonly").objectStore(g).getAllKeys();m.onsuccess=function(){c(m.result)};m.onerror=e}catch(p){null!=e&&e(p)}}),e)};EditorUi.prototype.commentsSupported=
@@ -12120,64 +12120,64 @@ function(){var c=this.getCurrentFile();return null!=c?c.commentsSupported():!1};
null!=k?k.addComment(c,e,g):e(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var c=this.getCurrentFile();return null!=c?c.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var c=this.getCurrentFile();return null!=c?c.canComment():!0};EditorUi.prototype.newComment=function(c,e){var g=this.getCurrentFile();return null!=g?g.newComment(c,e):new DrawioComment(this,null,c,Date.now(),Date.now(),!1,e)};EditorUi.prototype.isRevisionHistorySupported=function(){var c=this.getCurrentFile();
return null!=c&&c.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(c,e){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(c,e):e({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var c=this.getCurrentFile();return null!=c&&(c.constructor==DriveFile&&c.isEditable()||c.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(c){c.setRequestHeader("Content-Language",
"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(c,e,g,k,m,p,v,x){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(c,e,g,k,m,p,v,x)};EditorUi.prototype.loadFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(c)};EditorUi.prototype.createSvgDataUri=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(c)};EditorUi.prototype.embedCssFonts=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
-return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,k,m,p,v,x,A,y,L,N,K,q,C,z){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,g,k,m,p,v,x,A,y,L,N,K,q,C,z)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
+return this.editor.embedCssFonts(c,e)};EditorUi.prototype.embedExtFonts=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(c)};EditorUi.prototype.exportToCanvas=function(c,e,g,k,m,p,v,x,z,y,L,N,K,q,C,A){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(c,e,g,k,m,p,v,x,z,y,L,N,K,q,C,A)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(c,e,g,k)};EditorUi.prototype.convertImageToDataUri=function(c,e){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(c,e)};EditorUi.prototype.base64Encode=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(c)};EditorUi.prototype.updateCRC=
function(c,e,g,k){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(c,e,g,k)};EditorUi.prototype.crc32=function(c){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(c)};EditorUi.prototype.writeGraphModelToPng=function(c,e,g,k,m){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(c,e,g,k,m)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
urlParams.forceMigration)return null;for(var c=[],e=0;e<localStorage.length;e++){var g=localStorage.key(e),k=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<k.length){var m="<mxfile "===k.substring(0,8)||"<?xml"===k.substring(0,5)||"\x3c!--[if IE]>"===k.substring(0,12);k="<mxlibrary>"===k.substring(0,11);(m||k)&&c.push(g)}}return c};EditorUi.prototype.getLocalStorageFile=function(c){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
var e=localStorage.getItem(c);return{title:c,data:e,isLib:"<mxlibrary>"===e.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,f,l,d,t,u){function D(){for(var H=N.getElementsByTagName("div"),F=0,J=0;J<H.length;J++)"none"!=H[J].style.display&&H[J].parentNode==N&&F++;K.style.display=0==F?"block":"none"}function c(H,F,J,R){function W(){F.removeChild(U);F.removeChild(X);V.style.display="block";O.style.display="block"}A={div:F,comment:H,saveCallback:J,deleteOnCancel:R};var O=F.querySelector(".geCommentTxt"),V=F.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className=
-"geCommentEditTxtArea";U.style.minHeight=O.offsetHeight+"px";U.value=H.content;F.insertBefore(U,O);var X=document.createElement("div");X.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){R?(F.parentNode.removeChild(F),D()):W();A=null});n.className="geCommentEditBtn";X.appendChild(n);var E=mxUtils.button(mxResources.get("save"),function(){O.innerHTML="";H.content=U.value;mxUtils.write(O,H.content);W();J(H);A=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this,
-function(I){mxEvent.isConsumed(I)||((mxEvent.isControlDown(I)||mxClient.IS_MAC&&mxEvent.isMetaDown(I))&&13==I.keyCode?(E.click(),mxEvent.consume(I)):27==I.keyCode&&(n.click(),mxEvent.consume(I)))}));E.focus();E.className="geCommentEditBtn gePrimaryBtn";X.appendChild(E);F.insertBefore(X,O);V.style.display="none";O.style.display="none";U.focus()}function e(H,F){F.innerHTML="";H=new Date(H.modifiedDate);var J=b.timeSince(H);null==J&&(J=mxResources.get("lessThanAMinute"));mxUtils.write(F,mxResources.get("timeAgo",
-[J],"{1} ago"));F.setAttribute("title",H.toLocaleDateString()+" "+H.toLocaleTimeString())}function g(H){var F=document.createElement("img");F.className="geCommentBusyImg";F.src=IMAGE_PATH+"/spin.gif";H.appendChild(F);H.busyImg=F}function k(H){H.style.border="1px solid red";H.removeChild(H.busyImg)}function m(H){H.style.border="";H.removeChild(H.busyImg)}function p(H,F,J,R,W){function O(Q,P,T){var Y=document.createElement("li");Y.className="geCommentAction";var ca=document.createElement("a");ca.className=
-"geCommentActionLnk";mxUtils.write(ca,Q);Y.appendChild(ca);mxEvent.addListener(ca,"click",function(ia){P(ia,H);ia.preventDefault();mxEvent.consume(ia)});S.appendChild(Y);T&&(Y.style.display="none")}function V(){function Q(Y){P.push(T);if(null!=Y.replies)for(var ca=0;ca<Y.replies.length;ca++)T=T.nextSibling,Q(Y.replies[ca])}var P=[],T=X;Q(H);return{pdiv:T,replies:P}}function U(Q,P,T,Y,ca){function ia(){g(wa);H.addReply(aa,function(la){aa.id=la;H.replies.push(aa);m(wa);T&&T()},function(la){Z();k(wa);
-b.handleError(la,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},Y,ca)}function Z(){c(aa,wa,function(la){ia()},!0)}var fa=V().pdiv,aa=b.newComment(Q,b.getCurrentUser());aa.pCommentId=H.id;null==H.replies&&(H.replies=[]);var wa=p(aa,H.replies,fa,R+1);P?Z():ia()}if(W||!H.isResolved){K.style.display="none";var X=document.createElement("div");X.className="geCommentContainer";X.setAttribute("data-commentId",H.id);X.style.marginLeft=20*R+5+"px";H.isResolved&&!Editor.isDarkMode()&&
-(X.style.backgroundColor="ghostWhite");var n=document.createElement("div");n.className="geCommentHeader";var E=document.createElement("img");E.className="geCommentUserImg";E.src=H.user.pictureUrl||Editor.userImage;n.appendChild(E);E=document.createElement("div");E.className="geCommentHeaderTxt";n.appendChild(E);var I=document.createElement("div");I.className="geCommentUsername";mxUtils.write(I,H.user.displayName||"");E.appendChild(I);I=document.createElement("div");I.className="geCommentDate";I.setAttribute("data-commentId",
-H.id);e(H,I);E.appendChild(I);X.appendChild(n);n=document.createElement("div");n.className="geCommentTxt";mxUtils.write(n,H.content||"");X.appendChild(n);H.isLocked&&(X.style.opacity="0.5");n=document.createElement("div");n.className="geCommentActions";var S=document.createElement("ul");S.className="geCommentActionsList";n.appendChild(S);v||H.isLocked||0!=R&&!x||O(mxResources.get("reply"),function(){U("",!0)},H.isResolved);E=b.getCurrentUser();null==E||E.id!=H.user.id||v||H.isLocked||(O(mxResources.get("edit"),
-function(){function Q(){c(H,X,function(){g(X);H.editComment(H.content,function(){m(X)},function(P){k(X);Q();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}Q()},H.isResolved),O(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(X);H.deleteComment(function(Q){if(!0===Q){Q=X.querySelector(".geCommentTxt");Q.innerHTML="";mxUtils.write(Q,mxResources.get("msgDeleted"));var P=X.querySelectorAll(".geCommentAction");for(Q=
-0;Q<P.length;Q++)P[Q].parentNode.removeChild(P[Q]);m(X);X.style.opacity="0.5"}else{P=V(H).replies;for(Q=0;Q<P.length;Q++)N.removeChild(P[Q]);for(Q=0;Q<F.length;Q++)if(F[Q]==H){F.splice(Q,1);break}K.style.display=0==N.getElementsByTagName("div").length?"block":"none"}},function(Q){k(X);b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},H.isResolved));v||H.isLocked||0!=R||O(H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(Q){function P(){var T=
-Q.target;T.innerHTML="";H.isResolved=!H.isResolved;mxUtils.write(T,H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var Y=H.isResolved?"none":"",ca=V(H).replies,ia=Editor.isDarkMode()?"transparent":H.isResolved?"ghostWhite":"white",Z=0;Z<ca.length;Z++){ca[Z].style.backgroundColor=ia;for(var fa=ca[Z].querySelectorAll(".geCommentAction"),aa=0;aa<fa.length;aa++)fa[aa]!=T.parentNode&&(fa[aa].style.display=Y);z||(ca[Z].style.display="none")}D()}H.isResolved?U(mxResources.get("reOpened")+
-": ",!0,P,!1,!0):U(mxResources.get("markedAsResolved"),!1,P,!0)});X.appendChild(n);null!=J?N.insertBefore(X,J.nextSibling):N.appendChild(X);for(J=0;null!=H.replies&&J<H.replies.length;J++)n=H.replies[J],n.isResolved=H.isResolved,p(n,H.replies,null,R+1,W);null!=A&&(A.comment.id==H.id?(W=H.content,H.content=A.comment.content,c(H,X,A.saveCallback,A.deleteOnCancel),H.content=W):null==A.comment.id&&A.comment.pCommentId==H.id&&(N.appendChild(A.div),c(A.comment,A.div,A.saveCallback,A.deleteOnCancel)));return X}}
-var v=!b.canComment(),x=b.canReplyToReplies(),A=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var L=EditorUi.compactUi?"26px":"30px",N=document.createElement("div");N.className="geCommentsList";N.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";N.style.bottom=parseInt(L)+7+"px";y.appendChild(N);var K=document.createElement("span");K.style.cssText="display:none;padding-top:10px;text-align:center;";
+var CommentsWindow=function(b,f,l,d,t,u){function E(){for(var H=N.getElementsByTagName("div"),F=0,J=0;J<H.length;J++)"none"!=H[J].style.display&&H[J].parentNode==N&&F++;K.style.display=0==F?"block":"none"}function c(H,F,J,R){function W(){F.removeChild(U);F.removeChild(Y);V.style.display="block";O.style.display="block"}z={div:F,comment:H,saveCallback:J,deleteOnCancel:R};var O=F.querySelector(".geCommentTxt"),V=F.querySelector(".geCommentActionsList"),U=document.createElement("textarea");U.className=
+"geCommentEditTxtArea";U.style.minHeight=O.offsetHeight+"px";U.value=H.content;F.insertBefore(U,O);var Y=document.createElement("div");Y.className="geCommentEditBtns";var n=mxUtils.button(mxResources.get("cancel"),function(){R?(F.parentNode.removeChild(F),E()):W();z=null});n.className="geCommentEditBtn";Y.appendChild(n);var D=mxUtils.button(mxResources.get("save"),function(){O.innerHTML="";H.content=U.value;mxUtils.write(O,H.content);W();J(H);z=null});mxEvent.addListener(U,"keydown",mxUtils.bind(this,
+function(I){mxEvent.isConsumed(I)||((mxEvent.isControlDown(I)||mxClient.IS_MAC&&mxEvent.isMetaDown(I))&&13==I.keyCode?(D.click(),mxEvent.consume(I)):27==I.keyCode&&(n.click(),mxEvent.consume(I)))}));D.focus();D.className="geCommentEditBtn gePrimaryBtn";Y.appendChild(D);F.insertBefore(Y,O);V.style.display="none";O.style.display="none";U.focus()}function e(H,F){F.innerHTML="";H=new Date(H.modifiedDate);var J=b.timeSince(H);null==J&&(J=mxResources.get("lessThanAMinute"));mxUtils.write(F,mxResources.get("timeAgo",
+[J],"{1} ago"));F.setAttribute("title",H.toLocaleDateString()+" "+H.toLocaleTimeString())}function g(H){var F=document.createElement("img");F.className="geCommentBusyImg";F.src=IMAGE_PATH+"/spin.gif";H.appendChild(F);H.busyImg=F}function k(H){H.style.border="1px solid red";H.removeChild(H.busyImg)}function m(H){H.style.border="";H.removeChild(H.busyImg)}function p(H,F,J,R,W){function O(Q,P,T){var X=document.createElement("li");X.className="geCommentAction";var ba=document.createElement("a");ba.className=
+"geCommentActionLnk";mxUtils.write(ba,Q);X.appendChild(ba);mxEvent.addListener(ba,"click",function(ja){P(ja,H);ja.preventDefault();mxEvent.consume(ja)});S.appendChild(X);T&&(X.style.display="none")}function V(){function Q(X){P.push(T);if(null!=X.replies)for(var ba=0;ba<X.replies.length;ba++)T=T.nextSibling,Q(X.replies[ba])}var P=[],T=Y;Q(H);return{pdiv:T,replies:P}}function U(Q,P,T,X,ba){function ja(){g(fa);H.addReply(da,function(ma){da.id=ma;H.replies.push(da);m(fa);T&&T()},function(ma){Z();k(fa);
+b.handleError(ma,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},X,ba)}function Z(){c(da,fa,function(ma){ja()},!0)}var ka=V().pdiv,da=b.newComment(Q,b.getCurrentUser());da.pCommentId=H.id;null==H.replies&&(H.replies=[]);var fa=p(da,H.replies,ka,R+1);P?Z():ja()}if(W||!H.isResolved){K.style.display="none";var Y=document.createElement("div");Y.className="geCommentContainer";Y.setAttribute("data-commentId",H.id);Y.style.marginLeft=20*R+5+"px";H.isResolved&&!Editor.isDarkMode()&&
+(Y.style.backgroundColor="ghostWhite");var n=document.createElement("div");n.className="geCommentHeader";var D=document.createElement("img");D.className="geCommentUserImg";D.src=H.user.pictureUrl||Editor.userImage;n.appendChild(D);D=document.createElement("div");D.className="geCommentHeaderTxt";n.appendChild(D);var I=document.createElement("div");I.className="geCommentUsername";mxUtils.write(I,H.user.displayName||"");D.appendChild(I);I=document.createElement("div");I.className="geCommentDate";I.setAttribute("data-commentId",
+H.id);e(H,I);D.appendChild(I);Y.appendChild(n);n=document.createElement("div");n.className="geCommentTxt";mxUtils.write(n,H.content||"");Y.appendChild(n);H.isLocked&&(Y.style.opacity="0.5");n=document.createElement("div");n.className="geCommentActions";var S=document.createElement("ul");S.className="geCommentActionsList";n.appendChild(S);v||H.isLocked||0!=R&&!x||O(mxResources.get("reply"),function(){U("",!0)},H.isResolved);D=b.getCurrentUser();null==D||D.id!=H.user.id||v||H.isLocked||(O(mxResources.get("edit"),
+function(){function Q(){c(H,Y,function(){g(Y);H.editComment(H.content,function(){m(Y)},function(P){k(Y);Q();b.handleError(P,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}Q()},H.isResolved),O(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(Y);H.deleteComment(function(Q){if(!0===Q){Q=Y.querySelector(".geCommentTxt");Q.innerHTML="";mxUtils.write(Q,mxResources.get("msgDeleted"));var P=Y.querySelectorAll(".geCommentAction");for(Q=
+0;Q<P.length;Q++)P[Q].parentNode.removeChild(P[Q]);m(Y);Y.style.opacity="0.5"}else{P=V(H).replies;for(Q=0;Q<P.length;Q++)N.removeChild(P[Q]);for(Q=0;Q<F.length;Q++)if(F[Q]==H){F.splice(Q,1);break}K.style.display=0==N.getElementsByTagName("div").length?"block":"none"}},function(Q){k(Y);b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},H.isResolved));v||H.isLocked||0!=R||O(H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(Q){function P(){var T=
+Q.target;T.innerHTML="";H.isResolved=!H.isResolved;mxUtils.write(T,H.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var X=H.isResolved?"none":"",ba=V(H).replies,ja=Editor.isDarkMode()?"transparent":H.isResolved?"ghostWhite":"white",Z=0;Z<ba.length;Z++){ba[Z].style.backgroundColor=ja;for(var ka=ba[Z].querySelectorAll(".geCommentAction"),da=0;da<ka.length;da++)ka[da]!=T.parentNode&&(ka[da].style.display=X);A||(ba[Z].style.display="none")}E()}H.isResolved?U(mxResources.get("reOpened")+
+": ",!0,P,!1,!0):U(mxResources.get("markedAsResolved"),!1,P,!0)});Y.appendChild(n);null!=J?N.insertBefore(Y,J.nextSibling):N.appendChild(Y);for(J=0;null!=H.replies&&J<H.replies.length;J++)n=H.replies[J],n.isResolved=H.isResolved,p(n,H.replies,null,R+1,W);null!=z&&(z.comment.id==H.id?(W=H.content,H.content=z.comment.content,c(H,Y,z.saveCallback,z.deleteOnCancel),H.content=W):null==z.comment.id&&z.comment.pCommentId==H.id&&(N.appendChild(z.div),c(z.comment,z.div,z.saveCallback,z.deleteOnCancel)));return Y}}
+var v=!b.canComment(),x=b.canReplyToReplies(),z=null,y=document.createElement("div");y.className="geCommentsWin";y.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var L=EditorUi.compactUi?"26px":"30px",N=document.createElement("div");N.className="geCommentsList";N.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";N.style.bottom=parseInt(L)+7+"px";y.appendChild(N);var K=document.createElement("span");K.style.cssText="display:none;padding-top:10px;text-align:center;";
mxUtils.write(K,mxResources.get("noCommentsFound"));var q=document.createElement("div");q.className="geToolbarContainer geCommentsToolbar";q.style.height=L;q.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";q.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";L=document.createElement("a");L.className="geButton";if(!v){var C=L.cloneNode();C.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';C.setAttribute("title",mxResources.get("create")+
"...");mxEvent.addListener(C,"click",function(H){function F(){c(J,R,function(W){g(R);b.addComment(W,function(O){W.id=O;B.push(W);m(R)},function(O){k(R);F();b.handleError(O,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var J=b.newComment("",b.getCurrentUser()),R=p(J,B,null,0);F();H.preventDefault();mxEvent.consume(H)});q.appendChild(C)}C=L.cloneNode();C.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';C.setAttribute("title",mxResources.get("showResolved"));
-var z=!1;Editor.isDarkMode()&&(C.style.filter="invert(100%)");mxEvent.addListener(C,"click",function(H){this.className=(z=!z)?"geButton geCheckedBtn":"geButton";G();H.preventDefault();mxEvent.consume(H)});q.appendChild(C);b.commentsRefreshNeeded()&&(C=L.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',C.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(C.style.filter="invert(100%)"),mxEvent.addListener(C,"click",function(H){G();
-H.preventDefault();mxEvent.consume(H)}),q.appendChild(C));b.commentsSaveNeeded()&&(L=L.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',L.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(H){u();H.preventDefault();mxEvent.consume(H)}),q.appendChild(L));y.appendChild(q);var B=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=A)try{A.div=A.div.cloneNode(!0);
-var H=A.div.querySelector(".geCommentEditTxtArea"),F=A.div.querySelector(".geCommentEditBtns");A.comment.content=H.value;H.parentNode.removeChild(H);F.parentNode.removeChild(F)}catch(J){b.handleError(J)}N.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";x=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(J){function R(W){if(null!=W){W.sort(function(V,U){return new Date(V.modifiedDate)-
-new Date(U.modifiedDate)});for(var O=0;O<W.length;O++)R(W[O].replies)}}J.sort(function(W,O){return new Date(W.modifiedDate)-new Date(O.modifiedDate)});N.innerHTML="";N.appendChild(K);K.style.display="block";B=J;for(J=0;J<B.length;J++)R(B[J].replies),p(B[J],B,null,0,z);null!=A&&null==A.comment.id&&null==A.comment.pCommentId&&(N.appendChild(A.div),c(A.comment,A.div,A.saveCallback,A.deleteOnCancel))},mxUtils.bind(this,function(J){N.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(J&&J.message?
+var A=!1;Editor.isDarkMode()&&(C.style.filter="invert(100%)");mxEvent.addListener(C,"click",function(H){this.className=(A=!A)?"geButton geCheckedBtn":"geButton";G();H.preventDefault();mxEvent.consume(H)});q.appendChild(C);b.commentsRefreshNeeded()&&(C=L.cloneNode(),C.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',C.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(C.style.filter="invert(100%)"),mxEvent.addListener(C,"click",function(H){G();
+H.preventDefault();mxEvent.consume(H)}),q.appendChild(C));b.commentsSaveNeeded()&&(L=L.cloneNode(),L.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',L.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(L.style.filter="invert(100%)"),mxEvent.addListener(L,"click",function(H){u();H.preventDefault();mxEvent.consume(H)}),q.appendChild(L));y.appendChild(q);var B=[],G=mxUtils.bind(this,function(){this.hasError=!1;if(null!=z)try{z.div=z.div.cloneNode(!0);
+var H=z.div.querySelector(".geCommentEditTxtArea"),F=z.div.querySelector(".geCommentEditBtns");z.comment.content=H.value;H.parentNode.removeChild(H);F.parentNode.removeChild(F)}catch(J){b.handleError(J)}N.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";x=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(J){function R(W){if(null!=W){W.sort(function(V,U){return new Date(V.modifiedDate)-
+new Date(U.modifiedDate)});for(var O=0;O<W.length;O++)R(W[O].replies)}}J.sort(function(W,O){return new Date(W.modifiedDate)-new Date(O.modifiedDate)});N.innerHTML="";N.appendChild(K);K.style.display="block";B=J;for(J=0;J<B.length;J++)R(B[J].replies),p(B[J],B,null,0,A);null!=z&&null==z.comment.id&&null==z.comment.pCommentId&&(N.appendChild(z.div),c(z.comment,z.div,z.saveCallback,z.deleteOnCancel))},mxUtils.bind(this,function(J){N.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(J&&J.message?
": "+J.message:""));this.hasError=!0})):N.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});G();this.refreshComments=G;q=mxUtils.bind(this,function(){function H(O){var V=J[O.id];if(null!=V)for(e(O,V),V=0;null!=O.replies&&V<O.replies.length;V++)H(O.replies[V])}if(this.window.isVisible()){for(var F=N.querySelectorAll(".geCommentDate"),J={},R=0;R<F.length;R++){var W=F[R];J[W.getAttribute("data-commentId")]=W}for(R=0;R<B.length;R++)H(B[R])}});setInterval(q,6E4);this.refreshCommentsTime=q;this.window=
new mxWindow(mxResources.get("comments"),y,f,l,d,t,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(H,F){var J=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;H=Math.max(0,Math.min(H,(window.innerWidth||
document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));F=Math.max(0,Math.min(F,J-this.table.clientHeight-48));this.getX()==H&&this.getY()==F||mxWindow.prototype.setLocation.apply(this,arguments)};var M=mxUtils.bind(this,function(){var H=this.window.getX(),F=this.window.getY();this.window.setLocation(H,F)});mxEvent.addListener(window,"resize",M);this.destroy=function(){mxEvent.removeListener(window,"resize",M);this.window.destroy()}},ConfirmDialog=function(b,f,l,
-d,t,u,D,c,e,g,k){var m=document.createElement("div");m.style.textAlign="center";k=null!=k?k:44;var p=document.createElement("div");p.style.padding="6px";p.style.overflow="auto";p.style.maxHeight=k+"px";p.style.lineHeight="1.2em";mxUtils.write(p,f);m.appendChild(p);null!=g&&(p=document.createElement("div"),p.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",g),p.appendChild(f),m.appendChild(p));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace=
-"nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");u=mxUtils.button(u||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(v.checked)});u.className="geBtn";null!=c&&(u.innerHTML=c+"<br>"+u.innerHTML,u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.style.width="40%");b.editor.cancelFirst&&g.appendChild(u);var x=mxUtils.button(t||mxResources.get("ok"),function(){b.hideDialog();null!=l&&l(v.checked)});g.appendChild(x);null!=D?(x.innerHTML=
-D+"<br>"+x.innerHTML+"<br>",x.style.paddingBottom="8px",x.style.paddingTop="8px",x.style.height="auto",x.className="geBtn",x.style.width="40%"):x.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(u);m.appendChild(g);e?(g.style.marginTop="10px",p=document.createElement("p"),p.style.marginTop="20px",p.style.marginBottom="0px",p.appendChild(v),t=document.createElement("span"),mxUtils.write(t," "+mxResources.get("rememberThisSetting")),p.appendChild(t),m.appendChild(p),mxEvent.addListener(t,
-"click",function(A){v.checked=!v.checked;mxEvent.consume(A)})):g.style.marginTop="12px";this.init=function(){x.focus()};this.container=m};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
+d,t,u,E,c,e,g,k){var m=document.createElement("div");m.style.textAlign="center";k=null!=k?k:44;var p=document.createElement("div");p.style.padding="6px";p.style.overflow="auto";p.style.maxHeight=k+"px";p.style.lineHeight="1.2em";mxUtils.write(p,f);m.appendChild(p);null!=g&&(p=document.createElement("div"),p.style.padding="6px 0 6px 0",f=document.createElement("img"),f.setAttribute("src",g),p.appendChild(f),m.appendChild(p));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace=
+"nowrap";var v=document.createElement("input");v.setAttribute("type","checkbox");u=mxUtils.button(u||mxResources.get("cancel"),function(){b.hideDialog();null!=d&&d(v.checked)});u.className="geBtn";null!=c&&(u.innerHTML=c+"<br>"+u.innerHTML,u.style.paddingBottom="8px",u.style.paddingTop="8px",u.style.height="auto",u.style.width="40%");b.editor.cancelFirst&&g.appendChild(u);var x=mxUtils.button(t||mxResources.get("ok"),function(){b.hideDialog();null!=l&&l(v.checked)});g.appendChild(x);null!=E?(x.innerHTML=
+E+"<br>"+x.innerHTML+"<br>",x.style.paddingBottom="8px",x.style.paddingTop="8px",x.style.height="auto",x.className="geBtn",x.style.width="40%"):x.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(u);m.appendChild(g);e?(g.style.marginTop="10px",p=document.createElement("p"),p.style.marginTop="20px",p.style.marginBottom="0px",p.appendChild(v),t=document.createElement("span"),mxUtils.write(t," "+mxResources.get("rememberThisSetting")),p.appendChild(t),m.appendChild(p),mxEvent.addListener(t,
+"click",function(z){v.checked=!v.checked;mxEvent.consume(z)})):g.style.marginTop="12px";this.init=function(){x.focus()};this.container=m};EditorUi.DIFF_INSERT="i";EditorUi.DIFF_REMOVE="r";EditorUi.DIFF_UPDATE="u";EditorUi.transientViewStateProperties="defaultParent currentRoot scrollLeft scrollTop scale translate lastPasteXml pasteCounter".split(" ");EditorUi.prototype.viewStateProperties={background:!0,backgroundImage:!0,shadowVisible:!0,foldingEnabled:!0,pageScale:!0,mathEnabled:!0,pageFormat:!0,extFonts:!0};
EditorUi.prototype.cellProperties={id:!0,value:!0,xmlValue:!0,vertex:!0,edge:!0,visible:!0,collapsed:!0,connectable:!0,parent:!0,children:!0,previous:!0,source:!0,target:!0,edges:!0,geometry:!0,style:!0,overlays:!0,mxObjectId:!0,mxTransient:!0};EditorUi.prototype.codec=new mxCodec;EditorUi.prototype.applyPatches=function(b,f,l,d,t){if(null!=f)for(var u=0;u<f.length;u++)null!=f[u]&&(b=this.patchPages(b,f[u],l,d,t));return b};
-EditorUi.prototype.patchPages=function(b,f,l,d,t){var u={},D=[],c={},e={},g={},k={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var m in d[EditorUi.DIFF_UPDATE])u[m]=d[EditorUi.DIFF_UPDATE][m];if(null!=f[EditorUi.DIFF_REMOVE])for(d=0;d<f[EditorUi.DIFF_REMOVE].length;d++)e[f[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(d=0;d<f[EditorUi.DIFF_INSERT].length;d++)c[f[EditorUi.DIFF_INSERT][d].previous]=f[EditorUi.DIFF_INSERT][d];if(null!=f[EditorUi.DIFF_UPDATE])for(m in f[EditorUi.DIFF_UPDATE])d=
-f[EditorUi.DIFF_UPDATE][m],null!=d.previous&&(k[d.previous]=m);if(null!=b){var p="";for(d=0;d<b.length;d++){var v=b[d].getId();g[v]=b[d];null!=k[p]||e[v]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][v]&&null!=f[EditorUi.DIFF_UPDATE][v].previous||(k[p]=v);p=v}}var x={},A=mxUtils.bind(this,function(L){var N=null!=L?L.getId():"";if(null!=L&&!x[N]){x[N]=!0;D.push(L);var K=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][N]:null;null!=K&&(this.updatePageRoot(L),null!=K.name&&L.setName(K.name),
-null!=K.view&&this.patchViewState(L,K.view),null!=K.cells&&this.patchPage(L,K.cells,u[L.getId()],t),!l||null==K.cells&&null==K.view||(L.needsUpdate=!0))}L=k[N];null!=L&&(delete k[N],A(g[L]));L=c[N];null!=L&&(delete c[N],y(L))}),y=mxUtils.bind(this,function(L){L=mxUtils.parseXml(L.data).documentElement;L=new DiagramPage(L);this.updatePageRoot(L);var N=g[L.getId()];null==N?A(L):(this.patchPage(N,this.diffPages([N],[L]),u[N.getId()],t),l&&(N.needsUpdate=!0))});A();for(m in k)A(g[k[m]]),delete k[m];for(m in c)y(c[m]),
-delete c[m];return D};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var l in f)try{this.patchViewStateProperty(b,f,l)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,l){b.viewState[l]=JSON.parse(f[l])};
-EditorUi.prototype.createParentLookup=function(b,f){function l(g){var k=d[g];null==k&&(k={inserted:[],moved:{}},d[g]=k);return k}var d={};if(null!=f[EditorUi.DIFF_INSERT])for(var t=0;t<f[EditorUi.DIFF_INSERT].length;t++){var u=f[EditorUi.DIFF_INSERT][t],D=null!=u.parent?u.parent:"",c=null!=u.previous?u.previous:"";l(D).inserted[c]=u}if(null!=f[EditorUi.DIFF_UPDATE])for(var e in f[EditorUi.DIFF_UPDATE])u=f[EditorUi.DIFF_UPDATE][e],null!=u.previous&&(D=u.parent,null==D&&(t=b.getCell(e),null!=t&&(t=
-b.getParent(t),null!=t&&(D=t.getId()))),null!=D&&(l(D).moved[u.previous]=e));return d};
-EditorUi.prototype.patchPage=function(b,f,l,d){var t=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),u=this.createParentLookup(t,f);t.beginUpdate();try{var D=t.updateEdgeParent,c=new mxDictionary,e=[];t.updateEdgeParent=function(y,L){!c.get(y)&&d&&(c.put(y,!0),e.push(y))};var g=u[""],k=null!=g&&null!=g.inserted?g.inserted[""]:null,m=null;null!=k&&(m=this.getCellForJson(k));if(null==m){var p=null!=g&&null!=g.moved?g.moved[""]:null;null!=p&&(m=t.getCell(p))}null!=m&&(t.setRoot(m),
-b.root=m);this.patchCellRecursive(b,t,t.root,u,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var v=0;v<f[EditorUi.DIFF_REMOVE].length;v++){var x=t.getCell(f[EditorUi.DIFF_REMOVE][v]);null!=x&&t.remove(x)}if(null!=f[EditorUi.DIFF_UPDATE]){var A=null!=l&&null!=l.cells?l.cells[EditorUi.DIFF_UPDATE]:null;for(p in f[EditorUi.DIFF_UPDATE])this.patchCell(t,t.getCell(p),f[EditorUi.DIFF_UPDATE][p],null!=A?A[p]:null)}if(null!=f[EditorUi.DIFF_INSERT])for(v=0;v<f[EditorUi.DIFF_INSERT].length;v++)k=f[EditorUi.DIFF_INSERT][v],
-x=t.getCell(k.id),null!=x&&(t.setTerminal(x,t.getCell(k.source),!0),t.setTerminal(x,t.getCell(k.target),!1));t.updateEdgeParent=D;if(d&&0<e.length)for(v=0;v<e.length;v++)t.contains(e[v])&&t.updateEdgeParent(e[v])}finally{t.endUpdate()}};
-EditorUi.prototype.patchCellRecursive=function(b,f,l,d,t){if(null!=l){var u=d[l.getId()],D=null!=u&&null!=u.inserted?u.inserted:{};u=null!=u&&null!=u.moved?u.moved:{};for(var c=0,e=f.getChildCount(l),g="",k=0;k<e;k++){var m=f.getChildAt(l,k).getId();null==u[g]&&(null==t[EditorUi.DIFF_UPDATE]||null==t[EditorUi.DIFF_UPDATE][m]||null==t[EditorUi.DIFF_UPDATE][m].previous&&null==t[EditorUi.DIFF_UPDATE][m].parent)&&(u[g]=m);g=m}e=mxUtils.bind(this,function(p,v){var x=null!=p?p.getId():"";null!=p&&v&&(v=
-f.getCell(x),null!=v&&v!=p&&(p=null));null!=p&&(f.getChildAt(l,c)!=p&&f.add(l,p,c),this.patchCellRecursive(b,f,p,d,t),c++);return x});for(g=[null];0<g.length;)if(k=g.shift(),k=e(null!=k?k.child:null,null!=k?k.insert:!1),m=u[k],null!=m&&(delete u[k],g.push({child:f.getCell(m)})),m=D[k],null!=m&&(delete D[k],g.push({child:this.getCellForJson(m),insert:!0})),0==g.length){for(k in u)g.push({child:f.getCell(u[k])}),delete u[k];for(k in D)g.push({child:this.getCellForJson(D[k]),insert:!0}),delete D[k]}}};
+EditorUi.prototype.patchPages=function(b,f,l,d,t){var u={},E=[],c={},e={},g={},k={};if(null!=d&&null!=d[EditorUi.DIFF_UPDATE])for(var m in d[EditorUi.DIFF_UPDATE])u[m]=d[EditorUi.DIFF_UPDATE][m];if(null!=f[EditorUi.DIFF_REMOVE])for(d=0;d<f[EditorUi.DIFF_REMOVE].length;d++)e[f[EditorUi.DIFF_REMOVE][d]]=!0;if(null!=f[EditorUi.DIFF_INSERT])for(d=0;d<f[EditorUi.DIFF_INSERT].length;d++)c[f[EditorUi.DIFF_INSERT][d].previous]=f[EditorUi.DIFF_INSERT][d];if(null!=f[EditorUi.DIFF_UPDATE])for(m in f[EditorUi.DIFF_UPDATE])d=
+f[EditorUi.DIFF_UPDATE][m],null!=d.previous&&(k[d.previous]=m);if(null!=b){var p="";for(d=0;d<b.length;d++){var v=b[d].getId();g[v]=b[d];null!=k[p]||e[v]||null!=f[EditorUi.DIFF_UPDATE]&&null!=f[EditorUi.DIFF_UPDATE][v]&&null!=f[EditorUi.DIFF_UPDATE][v].previous||(k[p]=v);p=v}}var x={},z=mxUtils.bind(this,function(L){var N=null!=L?L.getId():"";if(null!=L&&!x[N]){x[N]=!0;E.push(L);var K=null!=f[EditorUi.DIFF_UPDATE]?f[EditorUi.DIFF_UPDATE][N]:null;null!=K&&(this.updatePageRoot(L),null!=K.name&&L.setName(K.name),
+null!=K.view&&this.patchViewState(L,K.view),null!=K.cells&&this.patchPage(L,K.cells,u[L.getId()],t),!l||null==K.cells&&null==K.view||(L.needsUpdate=!0))}L=k[N];null!=L&&(delete k[N],z(g[L]));L=c[N];null!=L&&(delete c[N],y(L))}),y=mxUtils.bind(this,function(L){L=mxUtils.parseXml(L.data).documentElement;L=new DiagramPage(L);this.updatePageRoot(L);var N=g[L.getId()];null==N?z(L):(this.patchPage(N,this.diffPages([N],[L]),u[N.getId()],t),l&&(N.needsUpdate=!0))});z();for(m in k)z(g[k[m]]),delete k[m];for(m in c)y(c[m]),
+delete c[m];return E};EditorUi.prototype.patchViewState=function(b,f){if(null!=b.viewState&&null!=f){b==this.currentPage&&(b.viewState=this.editor.graph.getViewState());for(var l in f)try{this.patchViewStateProperty(b,f,l)}catch(d){}b==this.currentPage&&this.editor.graph.setViewState(b.viewState,!0)}};EditorUi.prototype.patchViewStateProperty=function(b,f,l){b.viewState[l]=JSON.parse(f[l])};
+EditorUi.prototype.createParentLookup=function(b,f){function l(g){var k=d[g];null==k&&(k={inserted:[],moved:{}},d[g]=k);return k}var d={};if(null!=f[EditorUi.DIFF_INSERT])for(var t=0;t<f[EditorUi.DIFF_INSERT].length;t++){var u=f[EditorUi.DIFF_INSERT][t],E=null!=u.parent?u.parent:"",c=null!=u.previous?u.previous:"";l(E).inserted[c]=u}if(null!=f[EditorUi.DIFF_UPDATE])for(var e in f[EditorUi.DIFF_UPDATE])u=f[EditorUi.DIFF_UPDATE][e],null!=u.previous&&(E=u.parent,null==E&&(t=b.getCell(e),null!=t&&(t=
+b.getParent(t),null!=t&&(E=t.getId()))),null!=E&&(l(E).moved[u.previous]=e));return d};
+EditorUi.prototype.patchPage=function(b,f,l,d){var t=b==this.currentPage?this.editor.graph.model:new mxGraphModel(b.root),u=this.createParentLookup(t,f);t.beginUpdate();try{var E=t.updateEdgeParent,c=new mxDictionary,e=[];t.updateEdgeParent=function(y,L){!c.get(y)&&d&&(c.put(y,!0),e.push(y))};var g=u[""],k=null!=g&&null!=g.inserted?g.inserted[""]:null,m=null;null!=k&&(m=this.getCellForJson(k));if(null==m){var p=null!=g&&null!=g.moved?g.moved[""]:null;null!=p&&(m=t.getCell(p))}null!=m&&(t.setRoot(m),
+b.root=m);this.patchCellRecursive(b,t,t.root,u,f);if(null!=f[EditorUi.DIFF_REMOVE])for(var v=0;v<f[EditorUi.DIFF_REMOVE].length;v++){var x=t.getCell(f[EditorUi.DIFF_REMOVE][v]);null!=x&&t.remove(x)}if(null!=f[EditorUi.DIFF_UPDATE]){var z=null!=l&&null!=l.cells?l.cells[EditorUi.DIFF_UPDATE]:null;for(p in f[EditorUi.DIFF_UPDATE])this.patchCell(t,t.getCell(p),f[EditorUi.DIFF_UPDATE][p],null!=z?z[p]:null)}if(null!=f[EditorUi.DIFF_INSERT])for(v=0;v<f[EditorUi.DIFF_INSERT].length;v++)k=f[EditorUi.DIFF_INSERT][v],
+x=t.getCell(k.id),null!=x&&(t.setTerminal(x,t.getCell(k.source),!0),t.setTerminal(x,t.getCell(k.target),!1));t.updateEdgeParent=E;if(d&&0<e.length)for(v=0;v<e.length;v++)t.contains(e[v])&&t.updateEdgeParent(e[v])}finally{t.endUpdate()}};
+EditorUi.prototype.patchCellRecursive=function(b,f,l,d,t){if(null!=l){var u=d[l.getId()],E=null!=u&&null!=u.inserted?u.inserted:{};u=null!=u&&null!=u.moved?u.moved:{};for(var c=0,e=f.getChildCount(l),g="",k=0;k<e;k++){var m=f.getChildAt(l,k).getId();null==u[g]&&(null==t[EditorUi.DIFF_UPDATE]||null==t[EditorUi.DIFF_UPDATE][m]||null==t[EditorUi.DIFF_UPDATE][m].previous&&null==t[EditorUi.DIFF_UPDATE][m].parent)&&(u[g]=m);g=m}e=mxUtils.bind(this,function(p,v){var x=null!=p?p.getId():"";null!=p&&v&&(v=
+f.getCell(x),null!=v&&v!=p&&(p=null));null!=p&&(f.getChildAt(l,c)!=p&&f.add(l,p,c),this.patchCellRecursive(b,f,p,d,t),c++);return x});for(g=[null];0<g.length;)if(k=g.shift(),k=e(null!=k?k.child:null,null!=k?k.insert:!1),m=u[k],null!=m&&(delete u[k],g.push({child:f.getCell(m)})),m=E[k],null!=m&&(delete E[k],g.push({child:this.getCellForJson(m),insert:!0})),0==g.length){for(k in u)g.push({child:f.getCell(u[k])}),delete u[k];for(k in E)g.push({child:this.getCellForJson(E[k]),insert:!0}),delete E[k]}}};
EditorUi.prototype.patchCell=function(b,f,l,d){if(null!=f&&null!=l){if(null==d||null==d.xmlValue&&(null==d.value||""==d.value))"value"in l?b.setValue(f,l.value):null!=l.xmlValue&&b.setValue(f,mxUtils.parseXml(l.xmlValue).documentElement);null!=d&&null!=d.style||null==l.style||b.setStyle(f,l.style);null!=l.visible&&b.setVisible(f,1==l.visible);null!=l.collapsed&&b.setCollapsed(f,1==l.collapsed);null!=l.vertex&&(f.vertex=1==l.vertex);null!=l.edge&&(f.edge=1==l.edge);null!=l.connectable&&(f.connectable=
1==l.connectable);null!=l.geometry&&b.setGeometry(f,this.codec.decode(mxUtils.parseXml(l.geometry).documentElement));null!=l.source&&b.setTerminal(f,b.getCell(l.source),!0);null!=l.target&&b.setTerminal(f,b.getCell(l.target),!1);for(var t in l)this.cellProperties[t]||(f[t]=l[t])}};EditorUi.prototype.getXmlForPages=function(b){b=this.getNodeForPages(b);var f=null;null!=b&&(f=mxUtils.getXml(b));return f};
EditorUi.prototype.getNodeForPages=function(b){var f=null;if(null!=this.fileNode&&null!=b){f=this.fileNode.cloneNode(!1);for(var l=0;l<b.length;l++){var d=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b[l].root));this.editor.graph.saveViewState(b[l].viewState,d);var t=b[l].node.cloneNode(!1);t.appendChild(d);f.appendChild(t)}}return f};EditorUi.prototype.getPagesForXml=function(b){b=mxUtils.parseXml(b);return this.getPagesForNode(b.documentElement)};
EditorUi.prototype.getPagesForNode=function(b,f){var l=this.editor.extractGraphModel(b,!0,!0);null!=l&&(b=l);f=b.getElementsByTagName(f||"diagram");l=[];if(0<f.length)for(b=0;b<f.length;b++){var d=new DiagramPage(f[b]);this.updatePageRoot(d,!0);l.push(d)}else"mxGraphModel"==b.nodeName&&(d=new DiagramPage(b.ownerDocument.createElement("diagram")),d.setName(mxResources.get("pageWithNumber",[1])),mxUtils.setTextContent(d.node,Graph.compressNode(b,!0)),l.push(d));return l};
-EditorUi.prototype.diffPages=function(b,f){var l=[],d=[],t={},u={},D={},c=null;if(null!=b&&null!=f){for(var e=0;e<f.length;e++)u[f[e].getId()]={page:f[e],prev:c},c=f[e];c=null;for(e=0;e<b.length;e++){var g=b[e].getId();f=u[g];if(null==f)d.push(g);else{var k=this.diffPage(b[e],f.page),m={};mxUtils.isEmptyObject(k)||(m.cells=k);k=this.diffViewState(b[e],f.page);mxUtils.isEmptyObject(k)||(m.view=k);if((null!=f.prev?null==c:null!=c)||null!=c&&null!=f.prev&&c.getId()!=f.prev.getId())m.previous=null!=f.prev?
-f.prev.getId():"";null!=f.page.getName()&&b[e].getName()!=f.page.getName()&&(m.name=f.page.getName());mxUtils.isEmptyObject(m)||(D[g]=m)}delete u[b[e].getId()];c=b[e]}for(g in u)f=u[g],l.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});mxUtils.isEmptyObject(D)||(t[EditorUi.DIFF_UPDATE]=D);0<d.length&&(t[EditorUi.DIFF_REMOVE]=d);0<l.length&&(t[EditorUi.DIFF_INSERT]=l)}return t};
+EditorUi.prototype.diffPages=function(b,f){var l=[],d=[],t={},u={},E={},c=null;if(null!=b&&null!=f){for(var e=0;e<f.length;e++)u[f[e].getId()]={page:f[e],prev:c},c=f[e];c=null;for(e=0;e<b.length;e++){var g=b[e].getId();f=u[g];if(null==f)d.push(g);else{var k=this.diffPage(b[e],f.page),m={};mxUtils.isEmptyObject(k)||(m.cells=k);k=this.diffViewState(b[e],f.page);mxUtils.isEmptyObject(k)||(m.view=k);if((null!=f.prev?null==c:null!=c)||null!=c&&null!=f.prev&&c.getId()!=f.prev.getId())m.previous=null!=f.prev?
+f.prev.getId():"";null!=f.page.getName()&&b[e].getName()!=f.page.getName()&&(m.name=f.page.getName());mxUtils.isEmptyObject(m)||(E[g]=m)}delete u[b[e].getId()];c=b[e]}for(g in u)f=u[g],l.push({data:mxUtils.getXml(f.page.node),previous:null!=f.prev?f.prev.getId():""});mxUtils.isEmptyObject(E)||(t[EditorUi.DIFF_UPDATE]=E);0<d.length&&(t[EditorUi.DIFF_REMOVE]=d);0<l.length&&(t[EditorUi.DIFF_INSERT]=l)}return t};
EditorUi.prototype.createCellLookup=function(b,f,l){l=null!=l?l:{};l[b.getId()]={cell:b,prev:f};var d=b.getChildCount();f=null;for(var t=0;t<d;t++){var u=b.getChildAt(t);this.createCellLookup(u,f,l);f=u}return l};
-EditorUi.prototype.diffCellRecursive=function(b,f,l,d,t){d=null!=d?d:{};var u=l[b.getId()];delete l[b.getId()];if(null==u)t.push(b.getId());else{var D=this.diffCell(b,u.cell);if(null!=D.parent||(null!=u.prev?null==f:null!=f)||null!=f&&null!=u.prev&&f.getId()!=u.prev.getId())D.previous=null!=u.prev?u.prev.getId():"";mxUtils.isEmptyObject(D)||(d[b.getId()]=D)}u=b.getChildCount();f=null;for(D=0;D<u;D++){var c=b.getChildAt(D);this.diffCellRecursive(c,f,l,d,t);f=c}return d};
-EditorUi.prototype.diffPage=function(b,f){var l=[],d=[],t={};this.updatePageRoot(b);this.updatePageRoot(f);f=this.createCellLookup(f.root);var u=this.diffCellRecursive(b.root,null,f,u,d),D;for(D in f)b=f[D],l.push(this.getJsonForCell(b.cell,b.prev));mxUtils.isEmptyObject(u)||(t[EditorUi.DIFF_UPDATE]=u);0<d.length&&(t[EditorUi.DIFF_REMOVE]=d);0<l.length&&(t[EditorUi.DIFF_INSERT]=l);return t};
+EditorUi.prototype.diffCellRecursive=function(b,f,l,d,t){d=null!=d?d:{};var u=l[b.getId()];delete l[b.getId()];if(null==u)t.push(b.getId());else{var E=this.diffCell(b,u.cell);if(null!=E.parent||(null!=u.prev?null==f:null!=f)||null!=f&&null!=u.prev&&f.getId()!=u.prev.getId())E.previous=null!=u.prev?u.prev.getId():"";mxUtils.isEmptyObject(E)||(d[b.getId()]=E)}u=b.getChildCount();f=null;for(E=0;E<u;E++){var c=b.getChildAt(E);this.diffCellRecursive(c,f,l,d,t);f=c}return d};
+EditorUi.prototype.diffPage=function(b,f){var l=[],d=[],t={};this.updatePageRoot(b);this.updatePageRoot(f);f=this.createCellLookup(f.root);var u=this.diffCellRecursive(b.root,null,f,u,d),E;for(E in f)b=f[E],l.push(this.getJsonForCell(b.cell,b.prev));mxUtils.isEmptyObject(u)||(t[EditorUi.DIFF_UPDATE]=u);0<d.length&&(t[EditorUi.DIFF_REMOVE]=d);0<l.length&&(t[EditorUi.DIFF_INSERT]=l);return t};
EditorUi.prototype.diffViewState=function(b,f){b=b.viewState;var l=f.viewState,d={};f==this.currentPage&&(l=this.editor.graph.getViewState());if(null!=b&&null!=l)for(var t in this.viewStateProperties)this.diffViewStateProperty(b,l,t,d);return d};EditorUi.prototype.diffViewStateProperty=function(b,f,l,d){b=JSON.stringify(this.getViewStateProperty(b,l));f=JSON.stringify(this.getViewStateProperty(f,l));b!=f&&(d[l]=f)};
EditorUi.prototype.getViewStateProperty=function(b,f){b=b[f];"backgroundImage"==f&&null!=b&&null!=b.originalSrc?delete b.src:"extFonts"==f&&null==b&&(b=[]);return b};
EditorUi.prototype.getCellForJson=function(b){var f=null!=b.geometry?this.codec.decode(mxUtils.parseXml(b.geometry).documentElement):null,l=b.value;null!=b.xmlValue&&(l=mxUtils.parseXml(b.xmlValue).documentElement);f=new mxCell(l,f,b.style);f.connectable=0!=b.connectable;f.collapsed=1==b.collapsed;f.visible=0!=b.visible;f.vertex=1==b.vertex;f.edge=1==b.edge;f.id=b.id;for(var d in b)this.cellProperties[d]||(f[d]=b[d]);return f};
EditorUi.prototype.getJsonForCell=function(b,f){var l={id:b.getId()};b.vertex&&(l.vertex=1);b.edge&&(l.edge=1);b.connectable||(l.connectable=0);null!=b.parent&&(l.parent=b.parent.getId());null!=f&&(l.previous=f.getId());null!=b.source&&(l.source=b.source.getId());null!=b.target&&(l.target=b.target.getId());null!=b.style&&(l.style=b.style);null!=b.geometry&&(l.geometry=mxUtils.getXml(this.codec.encode(b.geometry)));b.collapsed&&(l.collapsed=1);b.visible||(l.visible=0);null!=b.value&&("object"===typeof b.value&&
"number"===typeof b.value.nodeType&&"string"===typeof b.value.nodeName&&"function"===typeof b.value.getAttribute?l.xmlValue=mxUtils.getXml(b.value):l.value=b.value);for(var d in b)this.cellProperties[d]||"function"===typeof b[d]||(l[d]=b[d]);return l};
-EditorUi.prototype.diffCell=function(b,f){function l(D){return null!=D&&"object"===typeof D&&"number"===typeof D.nodeType&&"string"===typeof D.nodeName&&"function"===typeof D.getAttribute}var d={};b.vertex!=f.vertex&&(d.vertex=f.vertex?1:0);b.edge!=f.edge&&(d.edge=f.edge?1:0);b.connectable!=f.connectable&&(d.connectable=f.connectable?1:0);if((null!=b.parent?null==f.parent:null!=f.parent)||null!=b.parent&&null!=f.parent&&b.parent.getId()!=f.parent.getId())d.parent=null!=f.parent?f.parent.getId():"";
+EditorUi.prototype.diffCell=function(b,f){function l(E){return null!=E&&"object"===typeof E&&"number"===typeof E.nodeType&&"string"===typeof E.nodeName&&"function"===typeof E.getAttribute}var d={};b.vertex!=f.vertex&&(d.vertex=f.vertex?1:0);b.edge!=f.edge&&(d.edge=f.edge?1:0);b.connectable!=f.connectable&&(d.connectable=f.connectable?1:0);if((null!=b.parent?null==f.parent:null!=f.parent)||null!=b.parent&&null!=f.parent&&b.parent.getId()!=f.parent.getId())d.parent=null!=f.parent?f.parent.getId():"";
if((null!=b.source?null==f.source:null!=f.source)||null!=b.source&&null!=f.source&&b.source.getId()!=f.source.getId())d.source=null!=f.source?f.source.getId():"";if((null!=b.target?null==f.target:null!=f.target)||null!=b.target&&null!=f.target&&b.target.getId()!=f.target.getId())d.target=null!=f.target?f.target.getId():"";l(b.value)&&l(f.value)?b.value.isEqualNode(f.value)||(d.xmlValue=mxUtils.getXml(f.value)):b.value!=f.value&&(l(f.value)?d.xmlValue=mxUtils.getXml(f.value):d.value=null!=f.value?
f.value:null);b.style!=f.style&&(d.style=f.style);b.visible!=f.visible&&(d.visible=f.visible?1:0);b.collapsed!=f.collapsed&&(d.collapsed=f.collapsed?1:0);if(!this.isObjectEqual(b.geometry,f.geometry,new mxGeometry)){var t=this.codec.encode(f.geometry);null!=t&&(d.geometry=mxUtils.getXml(t))}for(var u in b)this.cellProperties[u]||"function"===typeof b[u]||"function"===typeof f[u]||b[u]==f[u]||(d[u]=void 0===f[u]?null:f[u]);for(u in f)u in b||this.cellProperties[u]||"function"===typeof b[u]||"function"===
typeof f[u]||b[u]==f[u]||(d[u]=void 0===f[u]?null:f[u]);return d};EditorUi.prototype.isObjectEqual=function(b,f,l){if(null==b&&null==f)return!0;if(null!=b?null==f:null!=f)return!1;var d=function(t,u){return null==l||l[t]!=u?!0===u?1:u:void 0};return JSON.stringify(b,d)==JSON.stringify(f,d)};var mxSettings={currentVersion:18,defaultFormatWidth:600>screen.width?"0":"240",key:Editor.settingsKey,getLanguage:function(){return mxSettings.settings.language},setLanguage:function(b){mxSettings.settings.language=b},getUi:function(){return mxSettings.settings.ui},setUi:function(b){var f=localStorage.getItem(".drawio-config");f=null==f?mxSettings.getDefaults():JSON.parse(f);f.ui=b;delete f.isNew;f.version=mxSettings.currentVersion;localStorage.setItem(".drawio-config",JSON.stringify(f))},getShowStartScreen:function(){return mxSettings.settings.showStartScreen},
@@ -12225,32 +12225,32 @@ DrawioFileSync.prototype.doSendLocalChanges=function(b){if(!this.file.ignorePatc
DrawioFileSync.prototype.receiveRemoteChanges=function(b){this.file.ignorePatches(b.c)||(null==this.receivedData?(this.receivedData=[b],window.setTimeout(mxUtils.bind(this,function(){if(this.ui.getCurrentFile()==this.file)if(1==this.receivedData.length)this.doReceiveRemoteChanges(this.receivedData[0].c);else{this.receivedData.sort(function(t,u){return t.id<u.id?-1:t.id>u.id?1:0});for(var f=null,l=0;l<this.receivedData.length;l++){var d=JSON.stringify(this.receivedData[l].c);d!=f&&this.doReceiveRemoteChanges(this.receivedData[l].c);
f=d}}this.receivedData=null}),this.syncReceiveMessageDelay)):this.receivedData.push(b))};DrawioFileSync.prototype.scheduleCleanup=function(b){b?null!=this.cleanupThread&&this.scheduleCleanup():(window.clearTimeout(this.cleanupThread),this.cleanupThread=window.setTimeout(mxUtils.bind(this,function(){this.cleanupThread=null;this.cleanup(null,mxUtils.bind(this,function(f){this.file.handleFileError(f)}))}),this.cleanupDelay))};
DrawioFileSync.prototype.cleanup=function(b,f,l){window.clearTimeout(this.cleanupThread);if(this.isValidState()&&!this.file.inConflictState&&this.file.isRealtime()&&!this.file.isModified()){var d=[this.ui.diffPages(this.ui.pages,this.file.ownPages)];this.file.theirPages=this.ui.clonePages(this.file.ownPages);this.file.ignorePatches(d)||this.file.patch(d);EditorUi.debug("DrawioFileSync.cleanup",[this],"patches",d,"checkFile",l);l?this.file.getLatestVersion(mxUtils.bind(this,function(t){try{if(this.isValidState()&&
-!this.file.inConflictState&&this.file.isRealtime()){var u=this.ui.getPagesForXml(t.data);d=[this.ui.diffPages(this.ui.pages,u),this.ui.diffPages(u,this.file.ownPages)];this.file.ignorePatches(d)||this.file.patch(d);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",t,"patches",d)}null!=b&&b()}catch(D){null!=f&&f(D)}}),f):null!=b&&b()}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",l,"modified",this.file.isModified()))};
+!this.file.inConflictState&&this.file.isRealtime()){var u=this.ui.getPagesForXml(t.data);d=[this.ui.diffPages(this.ui.pages,u),this.ui.diffPages(u,this.file.ownPages)];this.file.ignorePatches(d)||this.file.patch(d);EditorUi.debug("DrawioFileSync.cleanup",[this],"newFile",t,"patches",d)}null!=b&&b()}catch(E){null!=f&&f(E)}}),f):null!=b&&b()}else null!=b&&(b(),EditorUi.debug("DrawioFileSync.cleanup",[this],"checkFile",l,"modified",this.file.isModified()))};
DrawioFileSync.prototype.extractLocal=function(b){return mxUtils.isEmptyObject(b)?{}:this.ui.diffPages(this.file.theirPages,this.ui.patchPages(this.ui.clonePages(this.file.theirPages),b))};
DrawioFileSync.prototype.extractRemove=function(b){var f={};null!=b[EditorUi.DIFF_REMOVE]&&(f[EditorUi.DIFF_REMOVE]=b[EditorUi.DIFF_REMOVE]);if(null!=b[EditorUi.DIFF_UPDATE])for(var l in b[EditorUi.DIFF_UPDATE]){var d=b[EditorUi.DIFF_UPDATE][l];if(null!=d.cells&&null!=d.cells[EditorUi.DIFF_REMOVE]){null==f[EditorUi.DIFF_UPDATE]&&(f[EditorUi.DIFF_UPDATE]={});f[EditorUi.DIFF_UPDATE][l]={};var t=f[EditorUi.DIFF_UPDATE][l];t.cells={};t.cells[EditorUi.DIFF_REMOVE]=d.cells[EditorUi.DIFF_REMOVE]}}return f};
DrawioFileSync.prototype.patchRealtime=function(b,f,l){var d=null;if(this.file.isRealtime()){d=this.extractRemove(this.ui.diffPages(this.file.getShadowPages(),this.ui.pages));var t=this.extractRemove(this.extractLocal(d)),u=(null==l?b:b.concat(l)).concat([t]);this.file.ownPages=this.ui.applyPatches(this.file.ownPages,u,!0,f);mxUtils.isEmptyObject(t)?this.scheduleCleanup():this.file.fileChanged(!1);EditorUi.debug("DrawioFileSync.patchRealtime",[this],"patches",b,"backup",f,"own",l,"all",d,"local",
t,"applied",u)}return d};DrawioFileSync.prototype.isRealtimeActive=function(){return this.ui.editor.autosave};
DrawioFileSync.prototype.sendLocalChanges=function(){try{if(this.file.isRealtime()&&this.localFileWasChanged){var b=this.ui.clonePages(this.ui.pages),f=this.ui.diffPages(this.snapshot,b);this.file.ownPages=this.ui.patchPages(this.file.ownPages,f,!0);this.snapshot=b;this.isRealtimeActive()&&this.doSendLocalChanges([f])}this.localFileWasChanged=!1}catch(l){b=this.file.getCurrentUser(),b=null!=b?b.id:"unknown",EditorUi.logError("Error in sendLocalChanges",null,this.file.getMode()+"."+this.file.getId(),
b,l)}};DrawioFileSync.prototype.doReceiveRemoteChanges=function(b){this.file.isRealtime()&&this.isRealtimeActive()&&(this.sendLocalChanges(),this.file.patch(b),this.file.theirPages=this.ui.applyPatches(this.file.theirPages,b),this.scheduleCleanup(),EditorUi.debug("DrawioFileSync.doReceiveRemoteChanges",[this],"changes",b))};
-DrawioFileSync.prototype.merge=function(b,f,l,d,t,u){try{this.file.stats.merged++;this.lastModified=new Date;var D=this.file.getDescriptorRevisionId(l);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var c=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(c,this.ui.pages):null;var e=this.file.isRealtime()?this.ui.diffPages(c,this.file.ownPages):null;c=this.ui.applyPatches(c,b);var g=null==f?null:this.ui.getHashValueForPages(c);
-this.file.setShadowPages(c);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",e,"checksum",f,"current",g,"valid",f==g,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",D,"etag",this.file.getDescriptorEtag(l));if(null!=f&&f!=g){var k=this.ui.hashValue(D),m=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(t,b,"From: "+m+"\nTo: "+k+"\nChecksum: "+f+"\nCurrent: "+g,D,"merge");
+DrawioFileSync.prototype.merge=function(b,f,l,d,t,u){try{this.file.stats.merged++;this.lastModified=new Date;var E=this.file.getDescriptorRevisionId(l);if(!this.file.ignorePatches(b)){this.sendLocalChanges();var c=this.file.getShadowPages();this.file.backupPatch=this.file.isModified()&&!this.file.isRealtime()?this.ui.diffPages(c,this.ui.pages):null;var e=this.file.isRealtime()?this.ui.diffPages(c,this.file.ownPages):null;c=this.ui.applyPatches(c,b);var g=null==f?null:this.ui.getHashValueForPages(c);
+this.file.setShadowPages(c);EditorUi.debug("DrawioFileSync.merge",[this],"patches",b,"backup",this.file.backupPatch,"pending",e,"checksum",f,"current",g,"valid",f==g,"attempt",this.catchupRetryCount,"of",this.maxCatchupRetries,"from",this.file.getCurrentRevisionId(),"to",E,"etag",this.file.getDescriptorEtag(l));if(null!=f&&f!=g){var k=this.ui.hashValue(E),m=this.ui.hashValue(this.file.getCurrentRevisionId());this.file.checksumError(t,b,"From: "+m+"\nTo: "+k+"\nChecksum: "+f+"\nCurrent: "+g,E,"merge");
"1"==urlParams.test&&EditorUi.debug("DrawioFileSync.merge.checksumError",[this],"data",[this.file.data,this.file.createData(),this.ui.getXmlForPages(c)]);return}null==this.patchRealtime(b,null,e)&&this.file.patch(b,DrawioFile.LAST_WRITE_WINS?this.file.backupPatch:null)}this.file.invalidChecksum=!1;this.file.inConflictState=!1;this.file.patchDescriptor(this.file.getDescriptor(),l);this.file.backupPatch=null;null!=d&&d(!0)}catch(x){this.file.inConflictState=!0;this.file.invalidChecksum=!0;this.file.descriptorChanged();
-null!=t&&t(x);try{if(this.file.errorReportsEnabled)m=this.ui.hashValue(this.file.getCurrentRevisionId()),k=this.ui.hashValue(D),this.file.sendErrorReport("Error in merge","From: "+m+"\nTo: "+k+"\nChecksum: "+f+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),x);else{var p=this.file.getCurrentUser(),v=null!=p?p.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),v,x)}}catch(A){}}};
+null!=t&&t(x);try{if(this.file.errorReportsEnabled)m=this.ui.hashValue(this.file.getCurrentRevisionId()),k=this.ui.hashValue(E),this.file.sendErrorReport("Error in merge","From: "+m+"\nTo: "+k+"\nChecksum: "+f+"\nPatches:\n"+this.file.compressReportData(JSON.stringify(b,null,2)),x);else{var p=this.file.getCurrentUser(),v=null!=p?p.id:"unknown";EditorUi.logError("Error in merge",null,this.file.getMode()+"."+this.file.getId(),v,x)}}catch(z){}}};
DrawioFileSync.prototype.fileChanged=function(b,f,l,d){var t=window.setTimeout(mxUtils.bind(this,function(){null!=l&&l()||(EditorUi.debug("DrawioFileSync.fileChanged",[this],"lazy",d,"valid",this.isValidState()),this.isValidState()?this.file.loadPatchDescriptor(mxUtils.bind(this,function(u){null!=l&&l()||(this.isValidState()?this.catchup(u,b,f,l):null!=f&&f())}),f):null!=f&&f())}),d?this.cacheReadyDelay:0);return this.notifyThread=t};
DrawioFileSync.prototype.reloadDescriptor=function(){this.file.loadDescriptor(mxUtils.bind(this,function(b){null!=b?(this.file.setDescriptorRevisionId(b,this.file.getCurrentRevisionId()),this.updateDescriptor(b),this.fileChangedNotify()):(this.file.inConflictState=!0,this.file.handleFileError())}),mxUtils.bind(this,function(b){this.file.inConflictState=!0;this.file.handleFileError(b)}))};
DrawioFileSync.prototype.updateDescriptor=function(b){this.file.setDescriptor(b);this.file.descriptorChanged();this.start()};
-DrawioFileSync.prototype.catchup=function(b,f,l,d){if(null!=b&&(null==d||!d())){var t=this.file.getCurrentRevisionId(),u=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",t,"to",u,"valid",this.isValidState());if(t==u)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=f&&f(!0);else if(this.isValidState()){var D=this.file.getDescriptorSecret(b);if(null==D||"1"==urlParams.lockdown)this.reload(f,l,d);else{var c=0,e=!1,g=mxUtils.bind(this,function(){if(null==
-d||!d())if(t!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var k=!0,m=window.setTimeout(mxUtils.bind(this,function(){k=!1;this.reload(f,l,d)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(t)+"&to="+encodeURIComponent(u)+(null!=D?"&secret="+encodeURIComponent(D):""),mxUtils.bind(this,function(p){this.file.stats.bytesReceived+=p.getText().length;window.clearTimeout(m);if(k&&
-(null==d||!d()))if(t!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){var v=null,x=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[p],"status",p.getStatus(),"cacheReadyRetryCount",c,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=p.getStatus()&&299>=p.getStatus()&&0<p.getText().length)try{var A=JSON.parse(p.getText());if(null!=A&&0<A.length)for(var y=0;y<A.length;y++){var L=this.stringToObject(A[y]);if(L.v>DrawioFileSync.PROTOCOL){e=!0;x=[];break}else if(L.v===
-DrawioFileSync.PROTOCOL&&null!=L.d)v=L.d.checksum,x.push(L.d.patch);else{e=!0;x=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[A],"failed",e,"temp",x,"checksum",v)}catch(N){x=[],null!=window.console&&"1"==urlParams.test&&console.log(N)}try{0<x.length?(this.file.stats.cacheHits++,this.merge(x,v,b,f,l,d)):c<=this.maxCacheReadyRetries-1&&!e&&401!=p.getStatus()&&503!=p.getStatus()&&410!=p.getStatus()?(c++,this.file.stats.cacheMiss++,window.setTimeout(g,(c+1)*this.cacheReadyDelay)):
+DrawioFileSync.prototype.catchup=function(b,f,l,d){if(null!=b&&(null==d||!d())){var t=this.file.getCurrentRevisionId(),u=this.file.getDescriptorRevisionId(b);EditorUi.debug("DrawioFileSync.catchup",[this],"desc",[b],"from",t,"to",u,"valid",this.isValidState());if(t==u)this.file.patchDescriptor(this.file.getDescriptor(),b),null!=f&&f(!0);else if(this.isValidState()){var E=this.file.getDescriptorSecret(b);if(null==E||"1"==urlParams.lockdown)this.reload(f,l,d);else{var c=0,e=!1,g=mxUtils.bind(this,function(){if(null==
+d||!d())if(t!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){this.scheduleCleanup(!0);var k=!0,m=window.setTimeout(mxUtils.bind(this,function(){k=!1;this.reload(f,l,d)}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&from="+encodeURIComponent(t)+"&to="+encodeURIComponent(u)+(null!=E?"&secret="+encodeURIComponent(E):""),mxUtils.bind(this,function(p){this.file.stats.bytesReceived+=p.getText().length;window.clearTimeout(m);if(k&&
+(null==d||!d()))if(t!=this.file.getCurrentRevisionId())null!=f&&f(!0);else if(this.isValidState()){var v=null,x=[];EditorUi.debug("DrawioFileSync.doCatchup",[this],"req",[p],"status",p.getStatus(),"cacheReadyRetryCount",c,"maxCacheReadyRetries",this.maxCacheReadyRetries);if(200<=p.getStatus()&&299>=p.getStatus()&&0<p.getText().length)try{var z=JSON.parse(p.getText());if(null!=z&&0<z.length)for(var y=0;y<z.length;y++){var L=this.stringToObject(z[y]);if(L.v>DrawioFileSync.PROTOCOL){e=!0;x=[];break}else if(L.v===
+DrawioFileSync.PROTOCOL&&null!=L.d)v=L.d.checksum,x.push(L.d.patch);else{e=!0;x=[];break}}EditorUi.debug("DrawioFileSync.doCatchup",[this],"response",[z],"failed",e,"temp",x,"checksum",v)}catch(N){x=[],null!=window.console&&"1"==urlParams.test&&console.log(N)}try{0<x.length?(this.file.stats.cacheHits++,this.merge(x,v,b,f,l,d)):c<=this.maxCacheReadyRetries-1&&!e&&401!=p.getStatus()&&503!=p.getStatus()&&410!=p.getStatus()?(c++,this.file.stats.cacheMiss++,window.setTimeout(g,(c+1)*this.cacheReadyDelay)):
(this.file.stats.cacheFail++,this.reload(f,l,d))}catch(N){null!=l&&l(N)}}else null!=l&&l()}))}else null!=l&&l()});window.setTimeout(g,this.cacheReadyDelay)}}else null!=l&&l()}};DrawioFileSync.prototype.reload=function(b,f,l,d){this.file.updateFile(mxUtils.bind(this,function(){this.lastModified=this.file.getLastModifiedDate();this.updateStatus();this.start();null!=b&&b()}),mxUtils.bind(this,function(t){null!=f&&f(t)}),l,d)};
DrawioFileSync.prototype.descriptorChanged=function(b){this.lastModified=this.file.getLastModifiedDate();if(null!=this.channelId){var f=this.objectToString(this.createMessage({a:"desc",m:this.lastModified.getTime()})),l=this.file.getCurrentRevisionId(),d=this.objectToString({});mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(b)+"&to="+encodeURIComponent(l)+"&msg="+encodeURIComponent(f)+"&data="+encodeURIComponent(d));this.file.stats.bytesSent+=d.length;this.file.stats.msgSent++;
EditorUi.debug("DrawioFileSync.descriptorChanged",[this],"from",b,"to",l)}this.updateStatus()};DrawioFileSync.prototype.objectToString=function(b){b=Graph.compress(JSON.stringify(b));null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.encrypt(b,this.key).toString());return b};DrawioFileSync.prototype.stringToObject=function(b){null!=this.key&&"undefined"!==typeof CryptoJS&&(b=CryptoJS.AES.decrypt(b,this.key).toString(CryptoJS.enc.Utf8));return JSON.parse(Graph.decompress(b))};
DrawioFileSync.prototype.createToken=function(b,f,l){var d=!0,t=window.setTimeout(mxUtils.bind(this,function(){d=!1;l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.get(EditorUi.cacheUrl+"?id="+encodeURIComponent(this.channelId)+"&secret="+encodeURIComponent(b),mxUtils.bind(this,function(u){window.clearTimeout(t);d&&(200<=u.getStatus()&&299>=u.getStatus()?f(u.getText()):l({code:u.getStatus(),message:"Token Error "+u.getStatus()}))}))};
DrawioFileSync.prototype.fileSaving=function(){if(this.file.isOptimisticSync()){var b=this.objectToString(this.createMessage({m:(new Date).getTime(),type:"optimistic"}));mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(b),function(){})}EditorUi.debug("DrawioFileSync.fileSaving",[this],"optimistic",this.file.isOptimisticSync())};DrawioFileSync.prototype.fileDataUpdated=function(){this.scheduleCleanup(!0);EditorUi.debug("DrawioFileSync.fileDataUpdated",[this])};
-DrawioFileSync.prototype.fileSaved=function(b,f,l,d,t){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var u=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),D=this.file.getDescriptorSecret(this.file.getDescriptor()),c=this.file.getDescriptorRevisionId(f),e=this.file.getCurrentRevisionId();if(null==
-D||null==t||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(u),function(){}),null!=l&&l(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",c,"to",e,"etag",this.file.getCurrentEtag());else{var g=this.ui.diffPages(this.file.getShadowPages(),b);f=this.file.getDescriptorSecret(f);var k=this.ui.getHashValueForPages(b),m=this.objectToString(this.createMessage({patch:g,checksum:k}));this.file.stats.bytesSent+=m.length;
-this.file.stats.msgSent++;var p=!0,v=window.setTimeout(mxUtils.bind(this,function(){p=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(c)+"&to="+encodeURIComponent(e)+"&msg="+encodeURIComponent(u)+(null!=D?"&secret="+encodeURIComponent(D):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(m.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(m):"")+(null!=t?"&token="+encodeURIComponent(t):
+DrawioFileSync.prototype.fileSaved=function(b,f,l,d,t){this.lastModified=this.file.getLastModifiedDate();this.resetUpdateStatusThread();this.catchupRetryCount=0;if(!this.ui.isOffline(!0)&&!this.file.inConflictState&&!this.file.redirectDialogShowing&&(this.start(),null!=this.channelId)){var u=this.objectToString(this.createMessage({m:this.lastModified.getTime()})),E=this.file.getDescriptorSecret(this.file.getDescriptor()),c=this.file.getDescriptorRevisionId(f),e=this.file.getCurrentRevisionId();if(null==
+E||null==t||"1"==urlParams.lockdown)this.file.stats.msgSent++,mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&msg="+encodeURIComponent(u),function(){}),null!=l&&l(),EditorUi.debug("DrawioFileSync.fileSaved",[this],"from",c,"to",e,"etag",this.file.getCurrentEtag());else{var g=this.ui.diffPages(this.file.getShadowPages(),b);f=this.file.getDescriptorSecret(f);var k=this.ui.getHashValueForPages(b),m=this.objectToString(this.createMessage({patch:g,checksum:k}));this.file.stats.bytesSent+=m.length;
+this.file.stats.msgSent++;var p=!0,v=window.setTimeout(mxUtils.bind(this,function(){p=!1;d({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.ui.timeout);mxUtils.post(EditorUi.cacheUrl,this.getIdParameters()+"&from="+encodeURIComponent(c)+"&to="+encodeURIComponent(e)+"&msg="+encodeURIComponent(u)+(null!=E?"&secret="+encodeURIComponent(E):"")+(null!=f?"&last-secret="+encodeURIComponent(f):"")+(m.length<this.maxCacheEntrySize?"&data="+encodeURIComponent(m):"")+(null!=t?"&token="+encodeURIComponent(t):
""),mxUtils.bind(this,function(x){window.clearTimeout(v);p&&(200<=x.getStatus()&&299>=x.getStatus()?null!=l&&l():d({code:x.getStatus(),message:x.getStatus()}))}));EditorUi.debug("DrawioFileSync.fileSaved",[this],"diff",g,m.length,"bytes","from",c,"to",e,"etag",this.file.getCurrentEtag(),"checksum",k)}}this.file.setShadowPages(b);this.scheduleCleanup()};
DrawioFileSync.prototype.getIdParameters=function(){var b="id="+this.channelId;null!=this.pusher&&null!=this.pusher.connection&&null!=this.pusher.connection.socket_id&&(b+="&sid="+this.pusher.connection.socket_id);return b};DrawioFileSync.prototype.createMessage=function(b){return{v:DrawioFileSync.PROTOCOL,d:b,c:this.clientId}};
DrawioFileSync.prototype.fileConflict=function(b,f,l){this.catchupRetryCount++;EditorUi.debug("DrawioFileSync.fileConflict",[this],"desc",[b],"catchupRetryCount",this.catchupRetryCount,"maxCatchupRetries",this.maxCatchupRetries);this.catchupRetryCount<this.maxCatchupRetries?(this.file.stats.conflicts++,null!=b?this.catchup(b,f,l):this.fileChanged(f,l)):(this.file.stats.timeouts++,this.catchupRetryCount=0,null!=l&&l({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")}))};
@@ -12261,7 +12261,7 @@ this.autosaveListener),this.autosaveListener=null);null!=this.visibleListener&&(
d.ageStart?Math.round((Date.now()-d.ageStart.getTime())/1E3):"x")+(this.editor.autosave?"":"-nosave")+(d.isAutosave()?"":"-noauto")+"-open_"+(null!=d.opened?Math.round((Date.now()-d.opened.getTime())/1E3):"x")+"-save_"+(null!=d.lastSaved?Math.round((Date.now()-d.lastSaved.getTime())/1E3):"x")+"-change_"+(null!=d.lastChanged?Math.round((Date.now()-d.lastChanged.getTime())/1E3):"x")+"-alive_"+Math.round((Date.now()-App.startTime.getTime())/1E3),label:null!=d.sync?"client_"+d.sync.clientId:"nosync"};
d.constructor==DriveFile&&null!=d.desc&&null!=this.drive&&(t.label+=(null!=this.drive.user?"-user_"+this.drive.user.id:"-nouser")+"-rev_"+d.desc.headRevisionId+"-mod_"+d.desc.modifiedDate+"-size_"+d.getSize()+"-mime_"+d.desc.mimeType);EditorUi.logEvent(t)}}));this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(){var d=this.getCurrentFile();null!=d&&EditorUi.logEvent({category:(this.editor.autosave?"ON":"OFF")+"-AUTOSAVE-FILE-"+d.getHash(),action:"changed",label:"autosave_"+(this.editor.autosave?
"on":"off")})}));mxClient.IS_SVG?mxGraph.prototype.warningImage.src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAE7SURBVHjaYvz//z8DJQAggBjwGXDuHMP/tWuD/uPTCxBAOA0AaQRK/f/+XeJ/cbHlf1wGAAQQTgPu3QNLgfHSpZo4DQAIIKwGwGyH4e/fFbG6AiQJEEAs2Ew2NFzH8OOHBMO6dT/A/KCg7wxGRh+wuhQggDBcALMdFIAcHBxgDGJjcwVIIUAAYbhAUXEdVos4OO4DXcGBIQ4QQCguQPY7sgtgAYruCpAgQACx4LJdU1OCwctLEcyWlLwPJF+AXQE0EMUBAAEEdwF6yMOiD4RRY0QT7gqQAEAAseDzu6XldYYPH9DD4joQa8L5AAEENgWb7SBcXa0JDQMBrK4AcQACiAlfyOMCEFdAnAYQQEz4FLa0XGf4/v0H0IIPONUABBAjyBmMjIwMS5cK/L927QORbtBkaG29DtYLEGAAH6f7oq3Zc+kAAAAASUVORK5CYII=":
-(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(d,t,u){if("1"==urlParams.openInSameWin||navigator.standalone)u();else{var D=null;try{D=window.open(d)}catch(c){}null==D||void 0===D?this.showDialog((new PopupDialog(this,d,t,u)).container,320,140,!0,!0):null!=t&&t()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(d){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(d)});this.editor.chromeless&&
+(new Image).src=mxGraph.prototype.warningImage.src;window.openWindow=mxUtils.bind(this,function(d,t,u){if("1"==urlParams.openInSameWin||navigator.standalone)u();else{var E=null;try{E=window.open(d)}catch(c){}null==E||void 0===E?this.showDialog((new PopupDialog(this,d,t,u)).container,320,140,!0,!0):null!=t&&t()}});this.updateDocumentTitle();this.updateUi();window.showOpenAlert=mxUtils.bind(this,function(d){null!=window.openFile&&window.openFile.cancel(!0);this.handleError(d)});this.editor.chromeless&&
!this.editor.editable||this.addFileDropHandler([document]);if(null!=App.DrawPlugins){for(b=0;b<App.DrawPlugins.length;b++)try{App.DrawPlugins[b](this)}catch(d){null!=window.console&&console.log("Plugin Error:",d,App.DrawPlugins[b])}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}window.Draw.loadPlugin=mxUtils.bind(this,function(d){try{d(this)}finally{App.embedModePluginsCount--,this.initializeEmbedMode()}});setTimeout(mxUtils.bind(this,function(){0<App.embedModePluginsCount&&(App.embedModePluginsCount=
0,this.initializeEmbedMode())}),5E3)}this.load()};App.ERROR_TIMEOUT="timeout";App.ERROR_BUSY="busy";App.ERROR_UNKNOWN="unknown";App.MODE_GOOGLE="google";App.MODE_DROPBOX="dropbox";App.MODE_ONEDRIVE="onedrive";App.MODE_GITHUB="github";App.MODE_GITLAB="gitlab";App.MODE_DEVICE="device";App.MODE_BROWSER="browser";App.MODE_TRELLO="trello";App.MODE_EMBED="embed";App.MODE_ATLAS="atlas";App.DROPBOX_APPKEY=window.DRAWIO_DROPBOX_ID;App.DROPBOX_URL=window.DRAWIO_BASE_URL+"/js/dropbox/Dropbox-sdk.min.js";
App.DROPINS_URL="https://www.dropbox.com/static/api/2/dropins.js";App.ONEDRIVE_URL=mxClient.IS_IE11?"https://js.live.net/v7.2/OneDrive.js":window.DRAWIO_BASE_URL+"/js/onedrive/OneDrive.js";App.TRELLO_URL="https://api.trello.com/1/client.js";App.TRELLO_JQUERY_URL=window.DRAWIO_BASE_URL+"/js/jquery/jquery-3.3.1.min.js";App.PUSHER_KEY="1e756b07a690c5bdb054";App.PUSHER_CLUSTER="eu";App.PUSHER_URL="https://js.pusher.com/7.0.3/pusher.min.js";App.SIMPLE_PEER_URL=window.DRAWIO_BASE_URL+"/js/simplepeer/simplepeer9.10.0.min.js";
@@ -12279,7 +12279,7 @@ App.main=function(b,f){function l(k){mxUtils.getAll("1"!=urlParams.dev?[k]:[k,ST
9<document.documentMode))mxscript(App.DROPBOX_URL,function(){mxscript(App.DROPINS_URL,function(){DrawDropboxClientCallback()},"dropboxjs",App.DROPBOX_APPKEY)});else if("undefined"===typeof window.Dropbox||"undefined"===typeof window.Dropbox.choose)window.DropboxClient=null;"function"===typeof window.OneDriveClient&&"undefined"===typeof OneDrive&&null!=window.DrawOneDriveClientCallback&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&(null==navigator.userAgent||
0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.ONEDRIVE_URL,window.DrawOneDriveClientCallback):"undefined"===typeof window.OneDrive&&(window.OneDriveClient=null);"function"===typeof window.TrelloClient&&!mxClient.IS_IE11&&"undefined"===typeof window.Trello&&null!=window.DrawTrelloClientCallback&&"1"==urlParams.tr&&(null==navigator.userAgent||0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode)?mxscript(App.TRELLO_JQUERY_URL,function(){mxscript(App.TRELLO_URL,
function(){DrawTrelloClientCallback()})}):"undefined"===typeof window.Trello&&(window.TrelloClient=null)}null!=b&&b(K);"0"!=urlParams.chrome&&"1"==urlParams.test&&(EditorUi.debug("App.start",[K,(new Date).getTime()-t0.getTime()+"ms"]),null!=urlParams["export"]&&EditorUi.debug("Export:",EXPORT_URL))}mxResources.parse(m[0].getText());if(isLocalStorage&&null!=localStorage&&null!=window.location.hash&&"#_CONFIG_"==window.location.hash.substring(0,9))try{var v=function(K){if(null!=K)for(var q=0;q<K.length;q++)if(!x[K[q]])throw Error(mxResources.get("invalidInput")+
-' "'+K[q])+'"';return!0},x={},A;for(A in App.pluginRegistry)x[App.pluginRegistry[A]]=!0;var y=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=y&&v(y.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(y));if(null!=y.merge){var L=localStorage.getItem(Editor.configurationKey);if(null!=L)try{var N=JSON.parse(L);for(A in y.merge)N[A]=y.merge[A];y=N}catch(K){window.location.hash="",alert(K)}else y=y.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&
+' "'+K[q])+'"';return!0},x={},z;for(z in App.pluginRegistry)x[App.pluginRegistry[z]]=!0;var y=JSON.parse(Graph.decompress(window.location.hash.substring(9)));if(null!=y&&v(y.plugins)){EditorUi.debug("Setting configuration",JSON.stringify(y));if(null!=y.merge){var L=localStorage.getItem(Editor.configurationKey);if(null!=L)try{var N=JSON.parse(L);for(z in y.merge)N[z]=y.merge[z];y=N}catch(K){window.location.hash="",alert(K)}else y=y.merge}confirm(mxResources.get("configLinkWarn"))&&confirm(mxResources.get("configLinkConfirm"))&&
(localStorage.setItem(Editor.configurationKey,JSON.stringify(y)),window.location.hash="",window.location.reload())}window.location.hash=""}catch(K){window.location.hash="",alert(K)}1<m.length&&(Graph.prototype.defaultThemes["default-style2"]=m[1].getDocumentElement(),Graph.prototype.defaultThemes.darkTheme=m[1].getDocumentElement());"1"==urlParams.dev||EditorUi.isElectronApp?p():(mxStencilRegistry.allowEval=!1,App.loadScripts(["js/shapes-14-6-5.min.js","js/stencils.min.js","js/extensions.min.js"],
p))},function(m){m=document.getElementById("geStatus");null!=m&&(m.innerHTML="Error loading page. <a>Please try refreshing.</a>",m.getElementsByTagName("a")[0].onclick=function(){mxLanguage="en";l(mxResources.getDefaultBundle(RESOURCE_BASE,mxLanguage)||mxResources.getSpecialBundle(RESOURCE_BASE,mxLanguage))})})}function d(){try{if(null!=mxSettings.settings){document.body.style.backgroundColor="dark"==uiTheme||mxSettings.settings.darkMode?Editor.darkColor:"#ffffff";if(null!=mxSettings.settings.autosaveDelay){var k=
parseInt(mxSettings.settings.autosaveDelay);!isNaN(k)&&0<k?(DrawioFile.prototype.autosaveDelay=k,EditorUi.debug("Setting autosaveDelay",k)):EditorUi.debug("Invalid autosaveDelay",k)}null!=mxSettings.settings.defaultEdgeLength&&(k=parseInt(mxSettings.settings.defaultEdgeLength),!isNaN(k)&&0<k?(Graph.prototype.defaultEdgeLength=k,EditorUi.debug("Using defaultEdgeLength",k)):EditorUi.debug("Invalid defaultEdgeLength",k))}}catch(p){null!=window.console&&console.error(p)}if(null!=Menus.prototype.defaultFonts)for(k=
@@ -12288,7 +12288,7 @@ parseInt(mxSettings.settings.autosaveDelay);!isNaN(k)&&0<k?(DrawioFile.prototype
!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&null!=CryptoJS&&App.mode!=App.MODE_DROPBOX&&App.mode!=App.MODE_TRELLO){t=document.getElementsByTagName("script");if(null!=t&&0<t.length){var u=mxUtils.getTextContent(t[0]);"1f536e2400baaa30261b8c3976d6fe06"!=CryptoJS.MD5(u).toString()&&(console.log("Change bootstrap script MD5 in the previous line:",CryptoJS.MD5(u).toString()),alert("[Dev] Bootstrap script change requires update of CSP"))}null!=t&&1<t.length&&(u=mxUtils.getTextContent(t[t.length-1]),
"d53805dd6f0bbba2da4966491ca0a505"!=CryptoJS.MD5(u).toString()&&(console.log("Change main script MD5 in the previous line:",CryptoJS.MD5(u).toString()),alert("[Dev] Main script change requires update of CSP")))}try{Editor.enableServiceWorker&&("0"==urlParams.offline||/www\.draw\.io$/.test(window.location.hostname)||"1"!=urlParams.offline&&"1"==urlParams.dev)?App.clearServiceWorker(function(){"0"==urlParams.offline&&alert("Cache cleared")}):Editor.enableServiceWorker&&navigator.serviceWorker.register("/service-worker.js")}catch(k){null!=
window.console&&console.error(k)}!("ArrayBuffer"in window)||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"auto"!=DrawioFile.SYNC||"1"==urlParams.embed&&"1"!=urlParams.embedRT||"1"==urlParams.local||"0"==urlParams.chrome&&"1"!=urlParams.rt||"1"==urlParams.stealth||"1"==urlParams.offline||(mxscript(App.PUSHER_URL),"1"==urlParams["fast-sync"]&&mxscript(App.SIMPLE_PEER_URL));if("0"!=urlParams.plugins&&"1"!=urlParams.offline){t=null!=mxSettings.settings?mxSettings.getPlugins():null;if(null==mxSettings.settings&&
-isLocalStorage&&"undefined"!==typeof JSON)try{var D=JSON.parse(localStorage.getItem(mxSettings.key));null!=D&&(t=D.plugins)}catch(k){}D=urlParams.p;App.initPluginCallback();null!=D&&App.loadPlugins(D.split(";"));if(null!=t&&0<t.length&&"0"!=urlParams.plugins){D=window.location.protocol+"//"+window.location.host;u=!0;for(var c=0;c<t.length&&u;c++)"/"!=t[c].charAt(0)&&t[c].substring(0,D.length)!=D&&(u=!1);if(u||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",
+isLocalStorage&&"undefined"!==typeof JSON)try{var E=JSON.parse(localStorage.getItem(mxSettings.key));null!=E&&(t=E.plugins)}catch(k){}E=urlParams.p;App.initPluginCallback();null!=E&&App.loadPlugins(E.split(";"));if(null!=t&&0<t.length&&"0"!=urlParams.plugins){E=window.location.protocol+"//"+window.location.host;u=!0;for(var c=0;c<t.length&&u;c++)"/"!=t[c].charAt(0)&&t[c].substring(0,E.length)!=E&&(u=!1);if(u||mxUtils.confirm(mxResources.replacePlaceholders("The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n",
[t.join("\n")]).replace(/\\n/g,"\n")))for(c=0;c<t.length;c++)try{null==App.pluginsLoaded[t[c]]&&(App.pluginsLoaded[t[c]]=!0,App.embedModePluginsCount++,"/"==t[c].charAt(0)&&(t[c]=PLUGINS_BASE_PATH+t[c]),mxscript(t[c]))}catch(k){}}}"function"===typeof window.DriveClient&&"undefined"===typeof gapi&&("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&isSvgBrowser&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode)?mxscript("https://apis.google.com/js/api.js?onload=DrawGapiClientCallback",
null,null,null,mxClient.IS_SVG):"undefined"===typeof window.gapi&&(window.DriveClient=null)}"0"!=urlParams.math&&Editor.initMath();if("1"==urlParams.configure){var e=window.opener||window.parent,g=function(k){if(k.source==e)try{var m=JSON.parse(k.data);null!=m&&"configure"==m.action&&(mxEvent.removeListener(window,"message",g),Editor.configure(m.config,!0),mxSettings.load(),m.colorSchemeMeta&&mxmeta("color-scheme","dark light"),d())}catch(p){null!=window.console&&console.log("Error in configure message: "+
p,k.data)}};mxEvent.addListener(window,"message",g);e.postMessage(JSON.stringify({event:"configure"}),"*")}else{if(null==Editor.config){if(null!=window.DRAWIO_CONFIG)try{EditorUi.debug("Using global configuration",window.DRAWIO_CONFIG),Editor.configure(window.DRAWIO_CONFIG),mxSettings.load()}catch(k){null!=window.console&&console.error(k)}if(isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&(t=localStorage.getItem(Editor.configurationKey),null!=t))try{t=JSON.parse(t),null!=t&&(EditorUi.debug("Using local configuration",
@@ -12330,21 +12330,21 @@ l.setAttribute("border","0");l.setAttribute("align","absmiddle");l.setAttribute(
b.appendChild(l);var d=document.createElement("img");d.setAttribute("border","0");d.setAttribute("align","absmiddle");d.setAttribute("title","2 star");d.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");d.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
b.appendChild(d);var t=document.createElement("img");t.setAttribute("border","0");t.setAttribute("align","absmiddle");t.setAttribute("title","3 star");t.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");t.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
b.appendChild(t);var u=document.createElement("img");u.setAttribute("border","0");u.setAttribute("align","absmiddle");u.setAttribute("title","4 star");u.setAttribute("style","margin-top:-6px;margin-left:3px;cursor:pointer;");u.setAttribute("src","data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAABx0RVh0U29mdHdhcmUAQWRvYmUgRmlyZXdvcmtzIENTM5jWRgMAAAQRdEVYdFhNTDpjb20uYWRvYmUueG1wADw/eHBhY2tldCBiZWdpbj0iICAgIiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMS1jMDM0IDQ2LjI3Mjk3NiwgU2F0IEphbiAyNyAyMDA3IDIyOjExOjQxICAgICAgICAiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4YXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eGFwOkNyZWF0b3JUb29sPkFkb2JlIEZpcmV3b3JrcyBDUzM8L3hhcDpDcmVhdG9yVG9vbD4KICAgICAgICAgPHhhcDpDcmVhdGVEYXRlPjIwMDgtMDItMTdUMDI6MzY6NDVaPC94YXA6Q3JlYXRlRGF0ZT4KICAgICAgICAgPHhhcDpNb2RpZnlEYXRlPjIwMDktMDMtMTdUMTQ6MTI6MDJaPC94YXA6TW9kaWZ5RGF0ZT4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyI+CiAgICAgICAgIDxkYzpmb3JtYXQ+aW1hZ2UvcG5nPC9kYzpmb3JtYXQ+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIIImu8AAAAAVdEVYdENyZWF0aW9uIFRpbWUAMi8xNy8wOCCcqlgAAAHuSURBVDiNlZJBi1JRGIbfk+fc0ZuMXorJe4XujWoMdREaA23HICj6AQeLINr0C4I27ab27VqOI9+q/sH8gMDceG1RkIwgClEXFMbRc5zTZgZURmG+5fu9PN/7Hg6wZohoh4h21nn4uqXW+q0xZgzg+SrPlTXX73uet+26bp6ICpcGaK1fua57M5vN3tZav7gUgIiSqVTqcRAEm0EQbCaTyQoRXb3Iy4hoG8CT6XSaY4xtMMaSQohMPp8v+r7vAEC3243CMGwqpfoApsaYE8uyfgM45ABOjDEvXdfNlMvlzFINAIDneY7neZVzvdlsDgaDQYtzfsjOIjtKqU+e5+0Wi0V3VV8ACMOw3+/3v3HOX0sp/7K53te11h/S6fRuoVAIhBAL76OUOm2320dRFH0VQuxJKf8BAFu+UKvVvpRKpWe2bYt5fTweq0ajQUKIN1LK43N94SMR0Y1YLLYlhBBKqQUw51wkEol7WmuzoC8FuJtIJLaUUoii6Ljb7f4yxpz6vp9zHMe2bfvacDi8BeDHKkBuNps5rVbr52QyaVuW9ZExttHpdN73ej0/Ho+nADxYCdBaV0aj0RGAz5ZlHUgpx2erR/V6/d1wOHwK4CGA/QsBnPN9AN+llH+WkqFare4R0QGAO/M6M8Ysey81/wGqa8MlVvHPNAAAAABJRU5ErkJggg==");
-b.appendChild(u);this.bannerShowing=!0;var D=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(c){mxEvent.consume(c);D()}));mxEvent.addListener(l,"click",mxUtils.bind(this,function(c){mxEvent.consume(c);D()}));mxEvent.addListener(d,"click",mxUtils.bind(this,
-function(c){mxEvent.consume(c);D()}));mxEvent.addListener(t,"click",mxUtils.bind(this,function(c){mxEvent.consume(c);D()}));mxEvent.addListener(u,"click",mxUtils.bind(this,function(c){mxEvent.consume(c);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");D()}));f=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){D()}),1E3)});window.setTimeout(mxUtils.bind(this,
+b.appendChild(u);this.bannerShowing=!0;var E=mxUtils.bind(this,function(){null!=b.parentNode&&(b.parentNode.removeChild(b),this.bannerShowing=!1,this.hideBannerratingFooter=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings.closeratingFooter=Date.now(),mxSettings.save()))});mxEvent.addListener(f,"click",mxUtils.bind(this,function(c){mxEvent.consume(c);E()}));mxEvent.addListener(l,"click",mxUtils.bind(this,function(c){mxEvent.consume(c);E()}));mxEvent.addListener(d,"click",mxUtils.bind(this,
+function(c){mxEvent.consume(c);E()}));mxEvent.addListener(t,"click",mxUtils.bind(this,function(c){mxEvent.consume(c);E()}));mxEvent.addListener(u,"click",mxUtils.bind(this,function(c){mxEvent.consume(c);window.open("https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=datacenter&tab=reviews");E()}));f=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){E()}),1E3)});window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setPrefixedStyle(b.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(f,6E4)}};
-App.prototype.checkLicense=function(){var b=this.drive.getUser(),f=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=f&&null!=b.id){var l=f.lastIndexOf("@"),d=0<=l?f.substring(l+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(d)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(t){try{if(200<=t.getStatus()&&299>=t.getStatus()){var u=t.getText();if(0<u.length){var D=JSON.parse(u);null!=D&&this.handleLicense(D,
+App.prototype.checkLicense=function(){var b=this.drive.getUser(),f=null!=b?b.email:null;if(!this.isOffline()&&!this.editor.chromeless&&null!=f&&null!=b.id){var l=f.lastIndexOf("@"),d=0<=l?f.substring(l+1):"";b=Editor.crc32(b.id);mxUtils.post("/license","domain="+encodeURIComponent(d)+"&id="+encodeURIComponent(b)+"&ts="+(new Date).getTime(),mxUtils.bind(this,function(t){try{if(200<=t.getStatus()&&299>=t.getStatus()){var u=t.getText();if(0<u.length){var E=JSON.parse(u);null!=E&&this.handleLicense(E,
d)}}}catch(c){}}))}};App.prototype.handleLicense=function(b,f){null!=b&&null!=b.plugins&&App.loadPlugins(b.plugins.split(";"),!0)};App.prototype.getEditBlankXml=function(){var b=this.getCurrentFile();return null!=b&&this.editor.isChromelessView()&&this.editor.graph.isLightboxView()?b.getData():this.getFileData(!0)};App.prototype.updateActionStates=function(){EditorUi.prototype.updateActionStates.apply(this,arguments);this.actions.get("revisionHistory").setEnabled(this.isRevisionHistoryEnabled())};
App.prototype.addRecent=function(b){if(isLocalStorage&&null!=localStorage){var f=this.getRecent();if(null==f)f=[];else for(var l=0;l<f.length;l++)f[l].id==b.id&&f.splice(l,1);null!=f&&(f.unshift(b),f=f.slice(0,10),localStorage.setItem(".recent",JSON.stringify(f)))}};App.prototype.getRecent=function(){if(isLocalStorage&&null!=localStorage){try{var b=localStorage.getItem(".recent");if(null!=b)return JSON.parse(b)}catch(f){}return null}};
App.prototype.resetRecent=function(b){if(isLocalStorage&&null!=localStorage)try{localStorage.removeItem(".recent")}catch(f){}};
App.prototype.onBeforeUnload=function(){if("1"==urlParams.embed&&this.editor.modified)return mxResources.get("allChangesLost");var b=this.getCurrentFile();if(null!=b)if(b.constructor!=LocalFile||""!=b.getHash()||b.isModified()||"1"==urlParams.nowarn||this.isDiagramEmpty()||null!=urlParams.url||this.editor.isChromelessView()||null!=b.fileHandle){if(b.isModified())return mxResources.get("allChangesLost");b.close(!0)}else return mxResources.get("ensureDataSaved")};
App.prototype.updateDocumentTitle=function(){if(!this.editor.graph.isLightboxView()){var b=this.editor.appName,f=this.getCurrentFile();this.isOfflineApp()&&(b+=" app");null!=f&&(b=(null!=f.getTitle()?f.getTitle():this.defaultFilename)+" - "+b);document.title!=b&&(document.title=b,b=this.editor.graph,b.invalidateDescendantsWithPlaceholders(b.model.getRoot()),b.view.validate())}};
-App.prototype.getThumbnail=function(b,f){var l=!1;try{var d=!0,t=window.setTimeout(mxUtils.bind(this,function(){d=!1;f(null)}),this.timeout),u=mxUtils.bind(this,function(G){window.clearTimeout(t);d&&f(G)});null==this.thumbImageCache&&(this.thumbImageCache={});var D=this.editor.graph,c=D.backgroundImage,e=null!=D.themes&&"darkTheme"==D.defaultThemeName;if(null!=this.pages&&(e||this.currentPage!=this.pages[0])){var g=D.getGlobalVariable;D=this.createTemporaryGraph(D.getStylesheet());D.setBackgroundImage=
-this.editor.graph.setBackgroundImage;var k=this.pages[0];this.currentPage==k?D.setBackgroundImage(c):null!=k.viewState&&null!=k.viewState&&(c=k.viewState.backgroundImage,D.setBackgroundImage(c));D.getGlobalVariable=function(G){return"page"==G?k.getName():"pagenumber"==G?1:g.apply(this,arguments)};D.getGlobalVariable=g;document.body.appendChild(D.container);D.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(G){try{D!=this.editor.graph&&
-null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}catch(M){G=null}u(G)}),b,this.thumbImageCache,"#ffffff",function(){u()},null,null,null,null,null,null,D,null,null,null,null,"diagram",null),l=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),p=D.getGraphBounds(),v=D.view.translate,x=D.view.scale;null!=c&&(p=mxRectangle.fromRectangle(p),p.add(new mxRectangle((v.x+c.x)*x,(v.y+c.y)*x,c.width*x,c.height*x)));var A=b/p.width;
-A=Math.min(1,Math.min(3*b/(4*p.height),A));var y=Math.floor(p.x),L=Math.floor(p.y);m.setAttribute("width",Math.ceil(A*(p.width+4)));m.setAttribute("height",Math.ceil(A*(p.height+4)));var N=m.getContext("2d");N.scale(A,A);N.translate(-y,-L);var K=D.background;if(null==K||""==K||K==mxConstants.NONE)K="#ffffff";N.save();N.fillStyle=K;N.fillRect(y,L,Math.ceil(p.width+4),Math.ceil(p.height+4));N.restore();if(null!=c){var q=new Image;q.src=c.src;N.drawImage(q,c.x*A,c.y*A,c.width*A,c.height*A)}var C=new mxJsCanvas(m),
-z=new mxAsyncCanvas(this.thumbImageCache);C.images=this.thumbImageCache.images;var B=new mxImageExport;B.drawShape=function(G,M){G.shape instanceof mxShape&&G.shape.checkBounds()&&(M.save(),M.translate(.5,.5),G.shape.paint(M),M.translate(-.5,-.5),M.restore())};B.drawText=function(G,M){};B.drawState(D.getView().getState(D.model.root),z);z.finish(mxUtils.bind(this,function(){try{B.drawState(D.getView().getState(D.model.root),C),D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}catch(G){m=
-null}u(m)}));l=!0}}catch(G){l=!1,null!=D&&D!=this.editor.graph&&null!=D.container.parentNode&&D.container.parentNode.removeChild(D.container)}l||window.clearTimeout(t);return l};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
+App.prototype.getThumbnail=function(b,f){var l=!1;try{var d=!0,t=window.setTimeout(mxUtils.bind(this,function(){d=!1;f(null)}),this.timeout),u=mxUtils.bind(this,function(G){window.clearTimeout(t);d&&f(G)});null==this.thumbImageCache&&(this.thumbImageCache={});var E=this.editor.graph,c=E.backgroundImage,e=null!=E.themes&&"darkTheme"==E.defaultThemeName;if(null!=this.pages&&(e||this.currentPage!=this.pages[0])){var g=E.getGlobalVariable;E=this.createTemporaryGraph(E.getStylesheet());E.setBackgroundImage=
+this.editor.graph.setBackgroundImage;var k=this.pages[0];this.currentPage==k?E.setBackgroundImage(c):null!=k.viewState&&null!=k.viewState&&(c=k.viewState.backgroundImage,E.setBackgroundImage(c));E.getGlobalVariable=function(G){return"page"==G?k.getName():"pagenumber"==G?1:g.apply(this,arguments)};E.getGlobalVariable=g;document.body.appendChild(E.container);E.model.setRoot(k.root)}if(mxClient.IS_CHROMEAPP||this.useCanvasForExport)this.editor.exportToCanvas(mxUtils.bind(this,function(G){try{E!=this.editor.graph&&
+null!=E.container.parentNode&&E.container.parentNode.removeChild(E.container)}catch(M){G=null}u(G)}),b,this.thumbImageCache,"#ffffff",function(){u()},null,null,null,null,null,null,E,null,null,null,null,"diagram",null),l=!0;else if(this.canvasSupported&&null!=this.getCurrentFile()){var m=document.createElement("canvas"),p=E.getGraphBounds(),v=E.view.translate,x=E.view.scale;null!=c&&(p=mxRectangle.fromRectangle(p),p.add(new mxRectangle((v.x+c.x)*x,(v.y+c.y)*x,c.width*x,c.height*x)));var z=b/p.width;
+z=Math.min(1,Math.min(3*b/(4*p.height),z));var y=Math.floor(p.x),L=Math.floor(p.y);m.setAttribute("width",Math.ceil(z*(p.width+4)));m.setAttribute("height",Math.ceil(z*(p.height+4)));var N=m.getContext("2d");N.scale(z,z);N.translate(-y,-L);var K=E.background;if(null==K||""==K||K==mxConstants.NONE)K="#ffffff";N.save();N.fillStyle=K;N.fillRect(y,L,Math.ceil(p.width+4),Math.ceil(p.height+4));N.restore();if(null!=c){var q=new Image;q.src=c.src;N.drawImage(q,c.x*z,c.y*z,c.width*z,c.height*z)}var C=new mxJsCanvas(m),
+A=new mxAsyncCanvas(this.thumbImageCache);C.images=this.thumbImageCache.images;var B=new mxImageExport;B.drawShape=function(G,M){G.shape instanceof mxShape&&G.shape.checkBounds()&&(M.save(),M.translate(.5,.5),G.shape.paint(M),M.translate(-.5,-.5),M.restore())};B.drawText=function(G,M){};B.drawState(E.getView().getState(E.model.root),A);A.finish(mxUtils.bind(this,function(){try{B.drawState(E.getView().getState(E.model.root),C),E!=this.editor.graph&&null!=E.container.parentNode&&E.container.parentNode.removeChild(E.container)}catch(G){m=
+null}u(m)}));l=!0}}catch(G){l=!1,null!=E&&E!=this.editor.graph&&null!=E.container.parentNode&&E.container.parentNode.removeChild(E.container)}l||window.clearTimeout(t);return l};App.prototype.createBackground=function(){var b=this.createDiv("background");b.style.position="absolute";b.style.background="white";b.style.left="0px";b.style.top="0px";b.style.bottom="0px";b.style.right="0px";mxUtils.setOpacity(b,100);return b};
(function(){var b=EditorUi.prototype.setMode;App.prototype.setMode=function(f,l){b.apply(this,arguments);null!=this.mode&&(Editor.useLocalStorage=this.mode==App.MODE_BROWSER);if(null!=this.appIcon){var d=this.getCurrentFile();f=null!=d?d.getMode():f;f==App.MODE_GOOGLE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("googleDrive")])),this.appIcon.style.cursor="pointer"):f==App.MODE_DROPBOX?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("dropbox")])),
this.appIcon.style.cursor="pointer"):f==App.MODE_ONEDRIVE?(this.appIcon.setAttribute("title",mxResources.get("openIt",[mxResources.get("oneDrive")])),this.appIcon.style.cursor="pointer"):(this.appIcon.removeAttribute("title"),this.appIcon.style.cursor=f==App.MODE_DEVICE?"pointer":"default")}if(l)try{if(isLocalStorage)localStorage.setItem(".mode",f);else if("undefined"!=typeof Storage){var t=new Date;t.setYear(t.getFullYear()+1);document.cookie="MODE="+f+"; expires="+t.toUTCString()}}catch(u){}}})();
App.prototype.appIconClicked=function(b){if(mxEvent.isAltDown(b))this.showSplash(!0);else{var f=this.getCurrentFile(),l=null!=f?f.getMode():null;l==App.MODE_GOOGLE?null!=f&&null!=f.desc&&null!=f.desc.parents&&0<f.desc.parents.length&&!mxEvent.isShiftDown(b)?this.openLink("https://drive.google.com/drive/folders/"+f.desc.parents[0].id):null!=f&&null!=f.getId()?this.openLink("https://drive.google.com/open?id="+f.getId()):this.openLink("https://drive.google.com/?authuser=0"):l==App.MODE_ONEDRIVE?null!=
@@ -12360,20 +12360,20 @@ App.prototype.showRefreshDialog=function(b,f){this.showingRefreshDialog||(this.s
App.prototype.showAlert=function(b){if(null!=b&&0<b.length){var f=document.createElement("div");f.className="geAlert";f.style.zIndex=2E9;f.style.left="50%";f.style.top="-100%";f.style.maxWidth="80%";f.style.width="max-content";f.style.whiteSpace="pre-wrap";mxUtils.setPrefixedStyle(f.style,"transform","translate(-50%,0%)");mxUtils.setPrefixedStyle(f.style,"transition","all 1s ease");f.innerHTML=b;b=document.createElement("a");b.className="geAlertLink";b.style.textAlign="right";b.style.marginTop="20px";
b.style.display="block";b.setAttribute("title",mxResources.get("close"));b.innerHTML=mxResources.get("close");f.appendChild(b);mxEvent.addListener(b,"click",function(l){null!=f.parentNode&&(f.parentNode.removeChild(f),mxEvent.consume(l))});document.body.appendChild(f);window.setTimeout(function(){f.style.top="30px"},10);window.setTimeout(function(){mxUtils.setPrefixedStyle(f.style,"transition","all 2s ease");f.style.opacity="0";window.setTimeout(function(){null!=f.parentNode&&f.parentNode.removeChild(f)},
2E3)},15E3)}};
-App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(u,D,c,e,g){"ResizeObserver loop limit exceeded"!=u&&(EditorUi.logError("Uncaught: "+(null!=u?u:""),D,c,e,g,null,!0),b.handleError({message:u},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
-function(u){var D=this.getCurrentFile();EditorUi.debug("storage event",[u],[D]);null!=D&&".draft-alive-check"==u.key&&null!=u.newValue&&null!=D.draftId&&(this.draftAliveCheck=u.newValue,D.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(u){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(u){try{this.hideDialog();
-var D=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==D||this.loadFile(D,!0)}catch(e){null!=document.body&&this.handleError(e,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var g=this.getCurrentFile();window.location.hash=null!=g?g.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(u){this.handleError(u,mxResources.get("errorLoadingFile"))}))}catch(u){this.handleError(u,
+App.prototype.start=function(){null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);this.restoreLibraries();this.spinner.stop();try{var b=this;window.onerror=function(u,E,c,e,g){"ResizeObserver loop limit exceeded"!=u&&(EditorUi.logError("Uncaught: "+(null!=u?u:""),E,c,e,g,null,!0),b.handleError({message:u},mxResources.get("unknownError"),null,null,null,null,!0))};if("1"!=urlParams.client&&"1"!=urlParams.embed){try{isLocalStorage&&window.addEventListener("storage",mxUtils.bind(this,
+function(u){var E=this.getCurrentFile();EditorUi.debug("storage event",[u],[E]);null!=E&&".draft-alive-check"==u.key&&null!=u.newValue&&null!=E.draftId&&(this.draftAliveCheck=u.newValue,E.saveDraft())})),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()||null!=urlParams.open||!/www\.draw\.io$/.test(window.location.hostname)||this.editor.chromeless&&!this.editor.editable||this.showNameChangeBanner()}catch(u){}mxEvent.addListener(window,"hashchange",mxUtils.bind(this,function(u){try{this.hideDialog();
+var E=this.getDiagramId(),c=this.getCurrentFile();null!=c&&c.getHash()==E||this.loadFile(E,!0)}catch(e){null!=document.body&&this.handleError(e,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var g=this.getCurrentFile();window.location.hash=null!=g?g.getHash():""}))}}))}if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.desc)try{this.loadDescriptor(JSON.parse(Graph.decompress(urlParams.desc)),null,mxUtils.bind(this,function(u){this.handleError(u,mxResources.get("errorLoadingFile"))}))}catch(u){this.handleError(u,
mxResources.get("errorLoadingFile"))}else if((null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.url)this.loadFile("U"+urlParams.url,!0);else if(null==this.getCurrentFile()){var f=mxUtils.bind(this,function(){if("1"==urlParams.client&&(null==window.location.hash||0==window.location.hash.length||"#P"==window.location.hash.substring(0,2))){var u=mxUtils.bind(this,function(e){Editor.isPngDataUrl(e)&&(e=Editor.extractGraphModelFromPng(e));var g=urlParams.title;g=null!=g?decodeURIComponent(g):
-this.defaultFilename;e=new LocalFile(this,e,g,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(e.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(e);this.getCurrentFile().setModified(!this.editor.chromeless)}),D=window.opener||window.parent;if(D!=window){var c=urlParams.create;null!=c?u(D[decodeURIComponent(c)]):(c=urlParams.data,null!=c?u(decodeURIComponent(c)):this.installMessageHandler(mxUtils.bind(this,function(e,g){g.source==D&&u(e)})))}}else if(null==
+this.defaultFilename;e=new LocalFile(this,e,g,!0);null!=window.location.hash&&"#P"==window.location.hash.substring(0,2)&&(e.getHash=function(){return window.location.hash.substring(1)});this.fileLoaded(e);this.getCurrentFile().setModified(!this.editor.chromeless)}),E=window.opener||window.parent;if(E!=window){var c=urlParams.create;null!=c?u(E[decodeURIComponent(c)]):(c=urlParams.data,null!=c?u(decodeURIComponent(c)):this.installMessageHandler(mxUtils.bind(this,function(e,g){g.source==E&&u(e)})))}}else if(null==
this.dialog)if("1"==urlParams.demo)c=Editor.useLocalStorage,this.createFile(this.defaultFilename,null,null,null,null,null,null,!0),Editor.useLocalStorage=c;else{c=!1;try{c=null!=window.opener&&null!=window.opener.openFile}catch(e){}c?this.spinner.spin(document.body,mxResources.get("loading")):(c=this.getDiagramId(),!EditorUi.enableDrafts||null!=urlParams.mode||"draw.io"!=this.getServiceName()||null!=c&&0!=c.length||this.editor.isChromelessView()?null!=c&&0<c.length?this.loadFile(c,null,null,mxUtils.bind(this,
function(){var e=decodeURIComponent(urlParams.viewbox||"");if(""!=e)try{var g=JSON.parse(e);this.editor.graph.fitWindow(g,g.border)}catch(k){console.error(k)}})):"0"!=urlParams.splash||null!=urlParams.mode?this.loadFile():EditorUi.isElectronApp||this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0):this.checkDrafts())}}),l=decodeURIComponent(urlParams.create||"");if((null==window.location.hash||1>=window.location.hash.length)&&null!=l&&0<l.length&&this.spinner.spin(document.body,
-mxResources.get("loading"))){var d=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),t=mxUtils.bind(this,function(u){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,u,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var D=urlParams.title;D=null!=D?decodeURIComponent(D):this.defaultFilename;u=this.getServiceCount(!0);isLocalStorage&&u++;var c=4>=
-u?2:6<u?4:3;D=new CreateDialog(this,D,mxUtils.bind(this,function(e,g){if(null==g){this.hideDialog();var k=Editor.useLocalStorage;this.createFile(0<e.length?e:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=k}else this.pickFolder(g,mxUtils.bind(this,function(m){this.createFile(e,this.getFileData(!0),null,g,null,!0,m)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,c,null,null,null,this.editor.fileExtensions);this.showDialog(D.container,420,u>c?
-390:280,!0,!1,mxUtils.bind(this,function(e){e&&null==this.getCurrentFile()&&this.showSplash()}));D.init()}});l=decodeURIComponent(l);if("http://"!=l.substring(0,7)&&"https://"!=l.substring(0,8))try{null!=window.opener&&null!=window.opener[l]?t(window.opener[l]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}else this.loadTemplate(l,function(u){t(u)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),
+mxResources.get("loading"))){var d=mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("reconnecting"))&&(window.location.search=this.getSearch(["create","title"]))}),t=mxUtils.bind(this,function(u){this.spinner.stop();if("0"!=urlParams.splash){this.fileLoaded(new LocalFile(this,u,null));this.editor.graph.setEnabled(!1);this.mode=urlParams.mode;var E=urlParams.title;E=null!=E?decodeURIComponent(E):this.defaultFilename;u=this.getServiceCount(!0);isLocalStorage&&u++;var c=4>=
+u?2:6<u?4:3;E=new CreateDialog(this,E,mxUtils.bind(this,function(e,g){if(null==g){this.hideDialog();var k=Editor.useLocalStorage;this.createFile(0<e.length?e:this.defaultFilename,this.getFileData(),null,null,null,!0,null,!0);Editor.useLocalStorage=k}else this.pickFolder(g,mxUtils.bind(this,function(m){this.createFile(e,this.getFileData(!0),null,g,null,!0,m)}))}),null,null,null,null,"1"==urlParams.browser,null,null,!0,c,null,null,null,this.editor.fileExtensions);this.showDialog(E.container,420,u>c?
+390:280,!0,!1,mxUtils.bind(this,function(e){e&&null==this.getCurrentFile()&&this.showSplash()}));E.init()}});l=decodeURIComponent(l);if("http://"!=l.substring(0,7)&&"https://"!=l.substring(0,8))try{null!=window.opener&&null!=window.opener[l]?t(window.opener[l]):this.handleError(null,mxResources.get("errorLoadingFile"))}catch(u){this.handleError(u,mxResources.get("errorLoadingFile"))}else this.loadTemplate(l,function(u){t(u)},mxUtils.bind(this,function(){this.handleError(null,mxResources.get("errorLoadingFile"),
d)}))}else(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.state&&null!=this.stateArg&&"open"==this.stateArg.action?null!=this.stateArg.ids&&(window.history&&window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),window.location.hash="G"+this.stateArg.ids[0]):(null==window.location.hash||1>=window.location.hash.length)&&null!=this.drive&&null!=this.stateArg&&"create"==this.stateArg.action?(window.history&&
window.history.replaceState&&window.history.replaceState(null,null,window.location.pathname+this.getSearch(["state"])),this.setMode(App.MODE_GOOGLE),"0"==urlParams.splash?this.createFile(null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename):this.actions.get("new").funct()):(null!=urlParams.open&&window.history&&window.history.replaceState&&(window.history.replaceState(null,null,window.location.pathname+this.getSearch(["open","sketch"])),window.location.hash=urlParams.open),
f())}}catch(u){this.handleError(u)}};App.prototype.loadDraft=function(b,f){this.createFile(this.defaultFilename,b,null,null,mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){var l=this.getCurrentFile();null!=l&&(l.fileChanged(),null!=f&&f())}),0)}),null,null,!0)};
-App.prototype.filterDrafts=function(b,f,l){function d(){l(t)}var t=[];try{this.getDatabaseItems(mxUtils.bind(this,function(u){EditorUi.debug("App.filterDrafts",[this],"items",u);for(var D=0;D<u.length;D++)try{var c=u[D].key;if(null!=c&&".draft_"==c.substring(0,7)){var e=JSON.parse(u[D].data);null!=e&&"draft"==e.type&&e.aliveCheck!=f&&(null==b&&null==e.fileObject||null!=e.fileObject&&e.fileObject.path==b)&&(e.key=c,t.push(e))}}catch(g){}d()},d))}catch(u){d()}};
+App.prototype.filterDrafts=function(b,f,l){function d(){l(t)}var t=[];try{this.getDatabaseItems(mxUtils.bind(this,function(u){EditorUi.debug("App.filterDrafts",[this],"items",u);for(var E=0;E<u.length;E++)try{var c=u[E].key;if(null!=c&&".draft_"==c.substring(0,7)){var e=JSON.parse(u[E].data);null!=e&&"draft"==e.type&&e.aliveCheck!=f&&(null==b&&null==e.fileObject||null!=e.fileObject&&e.fileObject.path==b)&&(e.key=c,t.push(e))}}catch(g){}d()},d))}catch(u){d()}};
App.prototype.checkDrafts=function(){try{var b=Editor.guid();localStorage.setItem(".draft-alive-check",b);window.setTimeout(mxUtils.bind(this,function(){localStorage.removeItem(".draft-alive-check");this.filterDrafts(null,b,mxUtils.bind(this,function(f){if(1==f.length)this.loadDraft(f[0].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[0].key)}));else if(1<f.length){var l=new Date(f[0].modified);l=new DraftDialog(this,1<f.length?mxResources.get("selectDraft"):mxResources.get("draftFound",
[l.toLocaleDateString()+" "+l.toLocaleTimeString()]),1<f.length?null:f[0].data,mxUtils.bind(this,function(d){this.hideDialog();d=""!=d?d:0;this.loadDraft(f[d].data,mxUtils.bind(this,function(){this.removeDatabaseItem(f[d].key)}))}),mxUtils.bind(this,function(d,t){d=""!=d?d:0;this.confirm(mxResources.get("areYouSure"),null,mxUtils.bind(this,function(){this.removeDatabaseItem(f[d].key);null!=t&&t()}),mxResources.get("no"),mxResources.get("yes"))}),null,null,null,1<f.length?f:null);this.showDialog(l.container,
640,480,!0,!1,mxUtils.bind(this,function(d){"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}));l.init()}else"0"!=urlParams.splash?this.loadFile():this.createFile(this.defaultFilename,this.getFileData(),null,null,null,null,null,!0)}))}),0)}catch(f){}};
@@ -12382,93 +12382,93 @@ mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){this.showSplash
App.prototype.addLanguageMenu=function(b,f){var l=null;null!=this.menus.get("language")&&(l=document.createElement("div"),l.setAttribute("title",mxResources.get("language")),l.className="geIcon geSprite geSprite-globe",l.style.position="absolute",l.style.cursor="pointer",l.style.bottom="20px",l.style.right="20px",f&&(l.style.direction="rtl",l.style.textAlign="right",l.style.right="24px",f=document.createElement("span"),f.style.display="inline-block",f.style.fontSize="12px",f.style.margin="5px 24px 0 0",
f.style.color="gray",f.style.userSelect="none",mxUtils.write(f,mxResources.get("language")),l.appendChild(f)),mxEvent.addListener(l,"click",mxUtils.bind(this,function(d){this.editor.graph.popupMenuHandler.hideMenu();var t=new mxPopupMenu(this.menus.get("language").funct);t.div.className+=" geMenubarMenu";t.smartSeparators=!0;t.showDisabled=!0;t.autoExpand=!0;t.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(t,arguments);t.destroy()});var u=mxUtils.getOffset(l);t.popup(u.x,
u.y+l.offsetHeight,null,d);this.setCurrentMenu(t)})),b.appendChild(l));return l};
-App.prototype.loadFileSystemEntry=function(b,f,l){l=null!=l?l:mxUtils.bind(this,function(d){this.handleError(d)});try{b.getFile().then(mxUtils.bind(this,function(d){var t=new FileReader;t.onload=mxUtils.bind(this,function(u){try{if(null!=f){var D=u.target.result;"image/png"==d.type&&(D=this.extractGraphModelFromPng(D));f(new LocalFile(this,D,d.name,null,b,d))}else this.openFileHandle(u.target.result,d.name,d,!1,b)}catch(c){l(c)}});t.onerror=l;"image"!==d.type.substring(0,5)&&"application/pdf"!==d.type||
+App.prototype.loadFileSystemEntry=function(b,f,l){l=null!=l?l:mxUtils.bind(this,function(d){this.handleError(d)});try{b.getFile().then(mxUtils.bind(this,function(d){var t=new FileReader;t.onload=mxUtils.bind(this,function(u){try{if(null!=f){var E=u.target.result;"image/png"==d.type&&(E=this.extractGraphModelFromPng(E));f(new LocalFile(this,E,d.name,null,b,d))}else this.openFileHandle(u.target.result,d.name,d,!1,b)}catch(c){l(c)}});t.onerror=l;"image"!==d.type.substring(0,5)&&"application/pdf"!==d.type||
"image/svg"===d.type.substring(0,9)?t.readAsText(d):t.readAsDataURL(d)}),l)}catch(d){l(d)}};
App.prototype.createFileSystemOptions=function(b){var f=[],l=null;if(null!=b){var d=b.lastIndexOf(".");0<d&&(l=b.substring(d+1))}for(d=0;d<this.editor.diagramFileTypes.length;d++){var t={description:mxResources.get(this.editor.diagramFileTypes[d].description)+(mxClient.IS_MAC?" (."+this.editor.diagramFileTypes[d].extension+")":""),accept:{}};t.accept[this.editor.diagramFileTypes[d].mimeType]=["."+this.editor.diagramFileTypes[d].extension];this.editor.diagramFileTypes[d].extension==l?f.splice(0,0,
t):this.editor.diagramFileTypes[d].extension==l?f.splice(0,0,t):f.push(t)}return{types:f,fileName:b}};App.prototype.showSaveFilePicker=function(b,f,l){f=null!=f?f:mxUtils.bind(this,function(d){"AbortError"!=d.name&&this.handleError(d)});l=null!=l?l:this.createFileSystemOptions();window.showSaveFilePicker(l).then(mxUtils.bind(this,function(d){null!=d&&d.getFile().then(mxUtils.bind(this,function(t){b(d,t)}),f)}),f)};
-App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var f=this.getPeerForMode(b);if(null!=f)f.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(D){null!=D&&0<D.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(D[0])}),
-mxUtils.bind(this,function(D){"AbortError"!=D.name&&this.handleError(D)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.openFiles(l.files),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.openFileInputElt=l}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
-null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(D,c){StorageFile.listFiles(this,"F",D,c)});window.openBrowserFile=mxUtils.bind(this,function(D,c,e){StorageFile.getFileContent(this,D,c,e)});window.deleteBrowserFile=mxUtils.bind(this,function(D,c,e){StorageFile.deleteFile(this,D,c,e)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
-function(D,c){var e=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=c.substring(c.length-4)||(c=c.substring(0,c.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,D,c):new LocalFile(this,D,c))}),g=this.getCurrentFile();null!=g&&g.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}));var t=this.dialog,u=t.close;this.dialog.close=mxUtils.bind(this,function(D){Editor.useLocalStorage=
-d;u.apply(t,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(D){this.handleError(D)}};
-App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var f=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=f&&f.pickLibrary(mxUtils.bind(this,function(t,u){if(null!=u)try{this.loadLibrary(u)}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
-mxResources.get("loading"))&&f.getLibrary(t,mxUtils.bind(this,function(D){this.spinner.stop();try{this.loadLibrary(D)}catch(c){this.handleError(c,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(D){this.handleError(D,null!=D?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){if(null!=
-l.files){for(var t=0;t<l.files.length;t++)mxUtils.bind(this,function(u){var D=new FileReader;D.onload=mxUtils.bind(this,function(c){try{this.loadLibrary(new LocalLibrary(this,c.target.result,u.name))}catch(e){this.handleError(e,mxResources.get("errorLoadingFile"))}});D.readAsText(u)})(l.files[t]);l.type="";l.type="file";l.value=""}}));l.style.display="none";document.body.appendChild(l);this.libFileInputElt=l}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
-mxUtils.bind(this,function(t,u){StorageFile.listFiles(this,"L",t,u)});window.openBrowserFile=mxUtils.bind(this,function(t,u,D){StorageFile.getFileContent(this,t,u,D)});window.deleteBrowserFile=mxUtils.bind(this,function(t,u,D){StorageFile.deleteFile(this,t,u,D)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(t){this.hideDialog(t)}));window.openFile.setConsumer(mxUtils.bind(this,function(t,u){try{this.loadLibrary(b==
-App.MODE_BROWSER?new StorageLibrary(this,t,u):new LocalLibrary(this,t,u))}catch(D){this.handleError(D,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=d;window.openFile=null})}};
-App.prototype.saveLibrary=function(b,f,l,d,t,u,D){try{d=null!=d?d:this.mode;t=null!=t?t:!1;u=null!=u?u:!1;var c=this.createLibraryDataFromImages(f),e=mxUtils.bind(this,function(m){this.spinner.stop();null!=D&&D();this.handleError(m,null!=m?mxResources.get("errorSavingFile"):null)});null==l&&d==App.MODE_DEVICE&&(l=new LocalLibrary(this,c,b));if(null==l)this.pickFolder(d,mxUtils.bind(this,function(m){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
+App.prototype.pickFile=function(b){try{if(b=null!=b?b:this.mode,b==App.MODE_GOOGLE)null!=this.drive&&"undefined"!=typeof google&&"undefined"!=typeof google.picker?this.drive.pickFile():this.openLink("https://drive.google.com");else{var f=this.getPeerForMode(b);if(null!=f)f.pickFile();else if(b==App.MODE_DEVICE&&EditorUi.nativeFileSupport)window.showOpenFilePicker().then(mxUtils.bind(this,function(E){null!=E&&0<E.length&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.loadFileSystemEntry(E[0])}),
+mxUtils.bind(this,function(E){"AbortError"!=E.name&&this.handleError(E)}));else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.openFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){null!=l.files&&(this.openFiles(l.files),l.type="",l.type="file",l.value="")}));l.style.display="none";document.body.appendChild(l);this.openFileInputElt=l}this.openFileInputElt.click()}else{this.hideDialog();window.openNew=
+null!=this.getCurrentFile()&&!this.isDiagramEmpty();window.baseUrl=this.getUrl();window.openKey="open";window.listBrowserFiles=mxUtils.bind(this,function(E,c){StorageFile.listFiles(this,"F",E,c)});window.openBrowserFile=mxUtils.bind(this,function(E,c,e){StorageFile.getFileContent(this,E,c,e)});window.deleteBrowserFile=mxUtils.bind(this,function(E,c,e){StorageFile.deleteFile(this,E,c,e)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;this.openFile();window.openFile.setConsumer(mxUtils.bind(this,
+function(E,c){var e=mxUtils.bind(this,function(){this.useCanvasForExport||".png"!=c.substring(c.length-4)||(c=c.substring(0,c.length-4)+".drawio");this.fileLoaded(b==App.MODE_BROWSER?new StorageFile(this,E,c):new LocalFile(this,E,c))}),g=this.getCurrentFile();null!=g&&g.isModified()?this.confirm(mxResources.get("allChangesLost"),null,e,mxResources.get("cancel"),mxResources.get("discardChanges")):e()}));var t=this.dialog,u=t.close;this.dialog.close=mxUtils.bind(this,function(E){Editor.useLocalStorage=
+d;u.apply(t,arguments);null==this.getCurrentFile()&&this.showSplash()})}}}catch(E){this.handleError(E)}};
+App.prototype.pickLibrary=function(b){b=null!=b?b:this.mode;if(b==App.MODE_GOOGLE||b==App.MODE_DROPBOX||b==App.MODE_ONEDRIVE||b==App.MODE_GITHUB||b==App.MODE_GITLAB||b==App.MODE_TRELLO){var f=b==App.MODE_GOOGLE?this.drive:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_TRELLO?this.trello:this.dropbox;null!=f&&f.pickLibrary(mxUtils.bind(this,function(t,u){if(null!=u)try{this.loadLibrary(u)}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}else this.spinner.spin(document.body,
+mxResources.get("loading"))&&f.getLibrary(t,mxUtils.bind(this,function(E){this.spinner.stop();try{this.loadLibrary(E)}catch(c){this.handleError(c,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(E){this.handleError(E,null!=E?mxResources.get("errorLoadingFile"):null)}))}))}else if(b==App.MODE_DEVICE&&Graph.fileSupport){if(null==this.libFileInputElt){var l=document.createElement("input");l.setAttribute("type","file");mxEvent.addListener(l,"change",mxUtils.bind(this,function(){if(null!=
+l.files){for(var t=0;t<l.files.length;t++)mxUtils.bind(this,function(u){var E=new FileReader;E.onload=mxUtils.bind(this,function(c){try{this.loadLibrary(new LocalLibrary(this,c.target.result,u.name))}catch(e){this.handleError(e,mxResources.get("errorLoadingFile"))}});E.readAsText(u)})(l.files[t]);l.type="";l.type="file";l.value=""}}));l.style.display="none";document.body.appendChild(l);this.libFileInputElt=l}this.libFileInputElt.click()}else{window.openNew=!1;window.openKey="open";window.listBrowserFiles=
+mxUtils.bind(this,function(t,u){StorageFile.listFiles(this,"L",t,u)});window.openBrowserFile=mxUtils.bind(this,function(t,u,E){StorageFile.getFileContent(this,t,u,E)});window.deleteBrowserFile=mxUtils.bind(this,function(t,u,E){StorageFile.deleteFile(this,t,u,E)});var d=Editor.useLocalStorage;Editor.useLocalStorage=b==App.MODE_BROWSER;window.openFile=new OpenFile(mxUtils.bind(this,function(t){this.hideDialog(t)}));window.openFile.setConsumer(mxUtils.bind(this,function(t,u){try{this.loadLibrary(b==
+App.MODE_BROWSER?new StorageLibrary(this,t,u):new LocalLibrary(this,t,u))}catch(E){this.handleError(E,mxResources.get("errorLoadingFile"))}}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){Editor.useLocalStorage=d;window.openFile=null})}};
+App.prototype.saveLibrary=function(b,f,l,d,t,u,E){try{d=null!=d?d:this.mode;t=null!=t?t:!1;u=null!=u?u:!1;var c=this.createLibraryDataFromImages(f),e=mxUtils.bind(this,function(m){this.spinner.stop();null!=E&&E();this.handleError(m,null!=m?mxResources.get("errorSavingFile"):null)});null==l&&d==App.MODE_DEVICE&&(l=new LocalLibrary(this,c,b));if(null==l)this.pickFolder(d,mxUtils.bind(this,function(m){d==App.MODE_GOOGLE&&null!=this.drive&&this.spinner.spin(document.body,mxResources.get("inserting"))?
this.drive.insertFile(b,c,m,mxUtils.bind(this,function(p){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(p,f)}),e,this.drive.libraryMimeType):d==App.MODE_GITHUB&&null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitHub.insertLibrary(b,c,mxUtils.bind(this,function(p){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(p,f)}),e,m):d==App.MODE_GITLAB&&null!=this.gitLab&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.gitLab.insertLibrary(b,
c,mxUtils.bind(this,function(p){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(p,f)}),e,m):d==App.MODE_TRELLO&&null!=this.trello&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.trello.insertLibrary(b,c,mxUtils.bind(this,function(p){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(p,f)}),e,m):d==App.MODE_DROPBOX&&null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.dropbox.insertLibrary(b,c,mxUtils.bind(this,function(p){this.spinner.stop();
this.hideDialog(!0);this.libraryLoaded(p,f)}),e,m):d==App.MODE_ONEDRIVE&&null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("inserting"))?this.oneDrive.insertLibrary(b,c,mxUtils.bind(this,function(p){this.spinner.stop();this.hideDialog(!0);this.libraryLoaded(p,f)}),e,m):d==App.MODE_BROWSER?(m=mxUtils.bind(this,function(){var p=new StorageLibrary(this,c,b);p.saveFile(b,!1,mxUtils.bind(this,function(){this.hideDialog(!0);this.libraryLoaded(p,f)}),e)}),null==localStorage.getItem(b)?
-m():this.confirm(mxResources.get("replaceIt",[b]),m)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(t||this.spinner.spin(document.body,mxResources.get("saving"))){l.setData(c);var g=mxUtils.bind(this,function(){l.save(!0,mxUtils.bind(this,function(m){this.spinner.stop();this.hideDialog(!0);u||this.libraryLoaded(l,f);null!=D&&D()}),e)});if(b!=l.getTitle()){var k=l.getHash();l.rename(b,mxUtils.bind(this,function(m){l.constructor!=LocalLibrary&&k!=l.getHash()&&
+m():this.confirm(mxResources.get("replaceIt",[b]),m)):this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})}));else if(t||this.spinner.spin(document.body,mxResources.get("saving"))){l.setData(c);var g=mxUtils.bind(this,function(){l.save(!0,mxUtils.bind(this,function(m){this.spinner.stop();this.hideDialog(!0);u||this.libraryLoaded(l,f);null!=E&&E()}),e)});if(b!=l.getTitle()){var k=l.getHash();l.rename(b,mxUtils.bind(this,function(m){l.constructor!=LocalLibrary&&k!=l.getHash()&&
(mxSettings.removeCustomLibrary(k),mxSettings.addCustomLibrary(l.getHash()));this.removeLibrarySidebar(k);g()}),e)}else g()}}catch(m){this.handleError(m)}};
App.prototype.saveFile=function(b,f){var l=this.getCurrentFile();if(null!=l){var d=mxUtils.bind(this,function(){EditorUi.enableDrafts&&l.removeDraft();this.getCurrentFile()==l||l.isModified()||(l.getMode()!=App.MODE_DEVICE?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get("allChangesSaved"))):this.editor.setStatus(""));null!=f&&f()});if(b||null==l.getTitle()||null!=l.invalidFileHandle||null==this.mode)if(null!=l&&l.constructor==LocalFile&&null!=l.fileHandle)this.showSaveFilePicker(mxUtils.bind(this,
-function(e,g){l.invalidFileHandle=null;l.fileHandle=e;l.title=g.name;l.desc=g;this.save(g.name,d)}),null,this.createFileSystemOptions(l.getTitle()));else{var t=null!=l.getTitle()?l.getTitle():this.defaultFilename,u=!mxClient.IS_IOS||!navigator.standalone,D=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var c=4>=b?2:6<b?4:3;t=new CreateDialog(this,t,mxUtils.bind(this,function(e,g,k){null!=e&&0<e.length&&(/(\.pdf)$/i.test(e)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
-function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){k.value=e.split(".").slice(0,-1).join(".");k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==D&&g==App.MODE_DEVICE?null!=l&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(m,p){l.fileHandle=m;l.mode=App.MODE_DEVICE;l.title=p.name;
-l.desc=p;this.setMode(App.MODE_DEVICE);this.save(p.name,d)}),mxUtils.bind(this,function(m){"AbortError"!=m.name&&this.handleError(m)}),this.createFileSystemOptions(e)):(this.setMode(App.MODE_DEVICE),this.save(e,d)):"download"==g?(new LocalFile(this,null,e)).save():"_blank"==g?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):D!=g?this.pickFolder(g,mxUtils.bind(this,function(m){this.createFile(e,
+function(e,g){l.invalidFileHandle=null;l.fileHandle=e;l.title=g.name;l.desc=g;this.save(g.name,d)}),null,this.createFileSystemOptions(l.getTitle()));else{var t=null!=l.getTitle()?l.getTitle():this.defaultFilename,u=!mxClient.IS_IOS||!navigator.standalone,E=this.mode;b=this.getServiceCount(!0);isLocalStorage&&b++;var c=4>=b?2:6<b?4:3;t=new CreateDialog(this,t,mxUtils.bind(this,function(e,g,k){null!=e&&0<e.length&&(/(\.pdf)$/i.test(e)?this.confirm(mxResources.get("didYouMeanToExportToPdf"),mxUtils.bind(this,
+function(){this.hideDialog();this.actions.get("exportPdf").funct()}),mxUtils.bind(this,function(){k.value=e.split(".").slice(0,-1).join(".");k.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?k.select():document.execCommand("selectAll",!1,null)}),mxResources.get("yes"),mxResources.get("no")):(this.hideDialog(),null==E&&g==App.MODE_DEVICE?null!=l&&EditorUi.nativeFileSupport?this.showSaveFilePicker(mxUtils.bind(this,function(m,p){l.fileHandle=m;l.mode=App.MODE_DEVICE;l.title=p.name;
+l.desc=p;this.setMode(App.MODE_DEVICE);this.save(p.name,d)}),mxUtils.bind(this,function(m){"AbortError"!=m.name&&this.handleError(m)}),this.createFileSystemOptions(e)):(this.setMode(App.MODE_DEVICE),this.save(e,d)):"download"==g?(new LocalFile(this,null,e)).save():"_blank"==g?(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(this.getFileData(!0)),this.openLink(this.getUrl(window.location.pathname),null,!0)):E!=g?this.pickFolder(g,mxUtils.bind(this,function(m){this.createFile(e,
this.getFileData(/(\.xml)$/i.test(e)||0>e.indexOf(".")||/(\.drawio)$/i.test(e),/(\.svg)$/i.test(e),/(\.html)$/i.test(e)),null,g,d,null==this.mode,m)})):null!=g&&this.save(e,d)))}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),null,null,u,null,!0,c,null,null,null,this.editor.fileExtensions,!1);this.showDialog(t.container,420,b>c?390:280,!0,!0);t.init()}else this.save(l.getTitle(),d)}};
-App.prototype.loadTemplate=function(b,f,l,d,t){var u=!1,D=b,c=null!=d?d:b,e=/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c);d=/\.png$/i.test(c)||/\.pdf$/i.test(c);this.editor.isCorsEnabledForUrl(D)||(u=d||e,D="t="+(new Date).getTime(),D=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+D+(u?"&base64=1":""));this.editor.loadUrl(D,mxUtils.bind(this,function(g){try{var k=u?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(g):atob(g):g;if(e||this.isVisioData(k))e||(c=t?this.isRemoteVisioData(k)?
+App.prototype.loadTemplate=function(b,f,l,d,t){var u=!1,E=b,c=null!=d?d:b,e=/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c);d=/\.png$/i.test(c)||/\.pdf$/i.test(c);this.editor.isCorsEnabledForUrl(E)||(u=d||e,E="t="+(new Date).getTime(),E=PROXY_URL+"?url="+encodeURIComponent(b)+"&"+E+(u?"&base64=1":""));this.editor.loadUrl(E,mxUtils.bind(this,function(g){try{var k=u?!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(g):atob(g):g;if(e||this.isVisioData(k))e||(c=t?this.isRemoteVisioData(k)?
"raw.vss":"raw.vssx":this.isRemoteVisioData(k)?"raw.vsd":"raw.vsdx"),this.importVisio(this.base64ToBlob(g.substring(g.indexOf(",")+1)),function(m){f(m)},l,c);else if((new XMLHttpRequest).upload&&this.isRemoteFileFormat(k,c))this.isExternalDataComms()?this.parseFileData(k,mxUtils.bind(this,function(m){4==m.readyState&&200<=m.status&&299>=m.status&&"<mxGraphModel"==m.responseText.substring(0,13)&&f(m.responseText)}),b):this.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,l);
else if(this.isLucidChartData(k))this.convertLucidChart(k,mxUtils.bind(this,function(m){f(m)}),mxUtils.bind(this,function(m){l(m)}));else{if(/(\.png)($|\?)/i.test(c)||Editor.isPngData(k))k=Editor.extractGraphModelFromPng(g);f(k)}}catch(m){l(m)}}),l,/(\.png)($|\?)/i.test(c)||/(\.v(dx|sdx?))($|\?)/i.test(c)||/(\.vs(x|sx?))($|\?)/i.test(c),null,null,u)};
App.prototype.getPeerForMode=function(b){return b==App.MODE_GOOGLE?this.drive:b==App.MODE_GITHUB?this.gitHub:b==App.MODE_GITLAB?this.gitLab:b==App.MODE_DROPBOX?this.dropbox:b==App.MODE_ONEDRIVE?this.oneDrive:b==App.MODE_TRELLO?this.trello:null};
-App.prototype.createFile=function(b,f,l,d,t,u,D,c,e){d=c?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;var g=mxUtils.bind(this,function(){this.spinner.stop()}),k=mxUtils.bind(this,function(m){g();null==m&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=m&&this.handleError(m)});try{d==App.MODE_GOOGLE&&null!=this.drive?(null==D&&null!=this.stateArg&&null!=this.stateArg.folderId&&(D=this.stateArg.folderId),
-this.drive.insertFile(b,f,D,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,u,t,e)}),k)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,u,t,e)}),k,!1,D):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,u,t,e)}),k,!1,D):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,u,t,e)}),k,
-!1,D):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,f,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,u,t,e)}),k):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,f,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,u,t,e)}),k,!1,D):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,u,t,e)}),k):!c&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(g(),this.showSaveFilePicker(mxUtils.bind(this,
+App.prototype.createFile=function(b,f,l,d,t,u,E,c,e){d=c?null:null!=d?d:this.mode;if(null!=b&&this.spinner.spin(document.body,mxResources.get("inserting"))){f=null!=f?f:this.emptyDiagramXml;var g=mxUtils.bind(this,function(){this.spinner.stop()}),k=mxUtils.bind(this,function(m){g();null==m&&null==this.getCurrentFile()&&null==this.dialog?this.showSplash():null!=m&&this.handleError(m)});try{d==App.MODE_GOOGLE&&null!=this.drive?(null==E&&null!=this.stateArg&&null!=this.stateArg.folderId&&(E=this.stateArg.folderId),
+this.drive.insertFile(b,f,E,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,u,t,e)}),k)):d==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.insertFile(b,f,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,u,t,e)}),k,!1,E):d==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.insertFile(b,f,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,u,t,e)}),k,!1,E):d==App.MODE_TRELLO&&null!=this.trello?this.trello.insertFile(b,f,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,u,t,e)}),k,
+!1,E):d==App.MODE_DROPBOX&&null!=this.dropbox?this.dropbox.insertFile(b,f,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,u,t,e)}),k):d==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.insertFile(b,f,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,u,t,e)}),k,!1,E):d==App.MODE_BROWSER?StorageFile.insertFile(this,b,f,mxUtils.bind(this,function(m){g();this.fileCreated(m,l,u,t,e)}),k):!c&&d==App.MODE_DEVICE&&EditorUi.nativeFileSupport?(g(),this.showSaveFilePicker(mxUtils.bind(this,
function(m,p){var v=new LocalFile(this,f,p.name,null,m,p);v.saveFile(p.name,!1,mxUtils.bind(this,function(){this.fileCreated(v,l,u,t,e)}),k,!0)}),mxUtils.bind(this,function(m){"AbortError"!=m.name&&k(m)}),this.createFileSystemOptions(b))):(g(),this.fileCreated(new LocalFile(this,f,b,null==d),l,u,t,e))}catch(m){g(),this.handleError(m)}}};
-App.prototype.fileCreated=function(b,f,l,d,t){var u=window.location.pathname;null!=f&&0<f.length&&(u+="?libs="+f);null!=t&&0<t.length&&(u+="?clibs="+t);u=this.getUrl(u);b.getMode()!=App.MODE_DEVICE&&(u+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var D=b.getData();D=0<D.length?this.editor.extractGraphModel(mxUtils.parseXml(D).documentElement,!0):null;var c=window.location.protocol+"//"+window.location.hostname+u,e=D,g=null;null!=D&&/\.svg$/i.test(b.getTitle())&&
-(g=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(g.container),e=this.decodeNodeIntoGraph(e,g));b.setData(this.createFileData(D,g,b,c));null!=g&&g.container.parentNode.removeChild(g.container);var k=mxUtils.bind(this,function(){this.spinner.stop()}),m=mxUtils.bind(this,function(){k();var p=this.getCurrentFile();null==l&&null!=p&&(l=!p.isModified()&&null==p.getMode());var v=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);l&&b.addAllSavedStatus();
-null!=f&&this.sidebar.showEntries(f);if(null!=t){for(var A=[],y=t.split(";"),L=0;L<y.length;L++)A.push(decodeURIComponent(y[L]));this.loadLibraries(A)}}),x=mxUtils.bind(this,function(){l||null==p||!p.isModified()?v():this.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==l||l?x():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
+App.prototype.fileCreated=function(b,f,l,d,t){var u=window.location.pathname;null!=f&&0<f.length&&(u+="?libs="+f);null!=t&&0<t.length&&(u+="?clibs="+t);u=this.getUrl(u);b.getMode()!=App.MODE_DEVICE&&(u+="#"+b.getHash());if(this.spinner.spin(document.body,mxResources.get("inserting"))){var E=b.getData();E=0<E.length?this.editor.extractGraphModel(mxUtils.parseXml(E).documentElement,!0):null;var c=window.location.protocol+"//"+window.location.hostname+u,e=E,g=null;null!=E&&/\.svg$/i.test(b.getTitle())&&
+(g=this.createTemporaryGraph(this.editor.graph.getStylesheet()),document.body.appendChild(g.container),e=this.decodeNodeIntoGraph(e,g));b.setData(this.createFileData(E,g,b,c));null!=g&&g.container.parentNode.removeChild(g.container);var k=mxUtils.bind(this,function(){this.spinner.stop()}),m=mxUtils.bind(this,function(){k();var p=this.getCurrentFile();null==l&&null!=p&&(l=!p.isModified()&&null==p.getMode());var v=mxUtils.bind(this,function(){window.openFile=null;this.fileLoaded(b);l&&b.addAllSavedStatus();
+null!=f&&this.sidebar.showEntries(f);if(null!=t){for(var z=[],y=t.split(";"),L=0;L<y.length;L++)z.push(decodeURIComponent(y[L]));this.loadLibraries(z)}}),x=mxUtils.bind(this,function(){l||null==p||!p.isModified()?v():this.confirm(mxResources.get("allChangesLost"),null,v,mxResources.get("cancel"),mxResources.get("discardChanges"))});null!=d&&d();null==l||l?x():(b.constructor==LocalFile&&(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(b.getData(),b.getTitle(),
null==b.getMode())),null!=d&&d(),window.openWindow(u,null,x))});b.constructor==LocalFile?m():b.saveFile(b.getTitle(),!1,mxUtils.bind(this,function(){m()}),mxUtils.bind(this,function(p){k();null!=p&&"AbortError"==p.name||this.handleError(p)}))}};
App.prototype.loadFile=function(b,f,l,d,t){if("1"==urlParams.openInSameWin||navigator.standalone)f=!0;this.hideDialog();var u=mxUtils.bind(this,function(){if(null==b||0==b.length)this.editor.setStatus(""),this.fileLoaded(null);else if(this.spinner.spin(document.body,mxResources.get("loading")))if("L"==b.charAt(0))if(this.spinner.stop(),isLocalStorage){var e=mxUtils.bind(this,function(v){this.handleError(v,mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var x=this.getCurrentFile();
window.location.hash=null!=x?x.getHash():""}))});b=decodeURIComponent(b.substring(1));StorageFile.getFileContent(this,b,mxUtils.bind(this,function(v){null!=v?(this.fileLoaded(new StorageFile(this,v,b)),null!=d&&d()):e({message:mxResources.get("fileNotFound")})}),e)}else this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var v=this.getCurrentFile();window.location.hash=null!=v?v.getHash():""}));else if(null!=l)this.spinner.stop(),
this.fileLoaded(l),null!=d&&d();else if("S"==b.charAt(0))this.spinner.stop(),this.alert("[Deprecation] #S is no longer supported, go to https://app.diagrams.net/?desc="+b.substring(1).substring(0,10),mxUtils.bind(this,function(){window.location.href="https://app.diagrams.net/?desc="+b.substring(1)}));else if("R"==b.charAt(0)){this.spinner.stop();var g=decodeURIComponent(b.substring(1));"<"!=g.charAt(0)&&(g=Graph.decompress(g));g=new LocalFile(this,g,null!=urlParams.title?decodeURIComponent(urlParams.title):
this.defaultFilename,!0);g.getHash=function(){return b};this.fileLoaded(g);null!=d&&d()}else if("E"==b.charAt(0))null==this.getCurrentFile()?this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},mxResources.get("errorLoadingFile")):this.remoteInvoke("getDraftFileContent",null,null,mxUtils.bind(this,function(v,x){this.spinner.stop();this.fileLoaded(new EmbedFile(this,v,x));null!=d&&d()}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
-mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var k=decodeURIComponent(b.substring(1)),m=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=k.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var v=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var x=k.substring(31,k.lastIndexOf("&ex"));this.loadFile("G"+x,f,null,mxUtils.bind(this,function(){var A=this.getCurrentFile();null!=A&&this.editor.chromeless&&
-!this.editor.editable&&(A.getHash=function(){return"G"+x},window.location.hash="#"+A.getHash());null!=d&&d()}));return!0}return!1});!v()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",v);return!0});this.loadTemplate(k,mxUtils.bind(this,function(v){this.spinner.stop();if(null!=v&&0<v.length){var x=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var A=k,y=k.lastIndexOf("."),L=A.lastIndexOf("/");y>L&&0<L&&(A=A.substring(L+1,y),y=k.substring(y),
-this.useCanvasForExport||".png"!=y||(y=".drawio"),".svg"===y||".xml"===y||".html"===y||".png"===y||".drawio"===y)&&(x=A+y)}v=new LocalFile(this,v,null!=urlParams.title?decodeURIComponent(urlParams.title):x,!0);v.getHash=function(){return b};this.fileLoaded(v,!0)?null!=d&&d():m()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else m()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
+mxResources.get("errorLoadingFile"))}));else if("U"==b.charAt(0)){var k=decodeURIComponent(b.substring(1)),m=mxUtils.bind(this,function(){if("https://drive.google.com/uc?id="!=k.substring(0,31)||null==this.drive&&"function"!==typeof window.DriveClient)return!1;this.hideDialog();var v=mxUtils.bind(this,function(){this.spinner.stop();if(null!=this.drive){var x=k.substring(31,k.lastIndexOf("&ex"));this.loadFile("G"+x,f,null,mxUtils.bind(this,function(){var z=this.getCurrentFile();null!=z&&this.editor.chromeless&&
+!this.editor.editable&&(z.getHash=function(){return"G"+x},window.location.hash="#"+z.getHash());null!=d&&d()}));return!0}return!1});!v()&&this.spinner.spin(document.body,mxResources.get("loading"))&&this.addListener("clientLoaded",v);return!0});this.loadTemplate(k,mxUtils.bind(this,function(v){this.spinner.stop();if(null!=v&&0<v.length){var x=this.defaultFilename;if(null==urlParams.title&&"1"!=urlParams.notitle){var z=k,y=k.lastIndexOf("."),L=z.lastIndexOf("/");y>L&&0<L&&(z=z.substring(L+1,y),y=k.substring(y),
+this.useCanvasForExport||".png"!=y||(y=".drawio"),".svg"===y||".xml"===y||".html"===y||".png"===y||".drawio"===y)&&(x=z+y)}v=new LocalFile(this,v,null!=urlParams.title?decodeURIComponent(urlParams.title):x,!0);v.getHash=function(){return b};this.fileLoaded(v,!0)?null!=d&&d():m()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}else m()||this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile"))}),mxUtils.bind(this,
function(){m()||(this.spinner.stop(),this.handleError({message:mxResources.get("fileNotFound")},mxResources.get("errorLoadingFile")))}),null!=urlParams["template-filename"]?decodeURIComponent(urlParams["template-filename"]):null)}else if(g=null,"G"==b.charAt(0)?g=this.drive:"D"==b.charAt(0)?g=this.dropbox:"W"==b.charAt(0)?g=this.oneDrive:"H"==b.charAt(0)?g=this.gitHub:"A"==b.charAt(0)?g=this.gitLab:"T"==b.charAt(0)&&(g=this.trello),null==g)this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")},
mxResources.get("errorLoadingFile"),mxUtils.bind(this,function(){var v=this.getCurrentFile();window.location.hash=null!=v?v.getHash():""}));else{var p=b.charAt(0);b=decodeURIComponent(b.substring(1));g.getFile(b,mxUtils.bind(this,function(v){this.spinner.stop();this.fileLoaded(v);var x=this.getCurrentFile();null==x?(window.location.hash="",this.showSplash()):this.editor.chromeless&&!this.editor.editable?(x.getHash=function(){return p+b},window.location.hash="#"+x.getHash()):v==x&&null==v.getMode()&&
-(v=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+v+'" class="geStatusAlert">'+v+"</div>"));null!=d&&d()}),mxUtils.bind(this,function(v){null!=window.console&&null!=v&&console.log("error in loadFile:",b,v);var x=mxUtils.bind(this,function(){var A=this.getCurrentFile();null==A?(window.location.hash="",this.showSplash()):window.location.hash="#"+A.getHash()});null==v||"AbortError"!=v.name?this.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null,x,null,null,"#"+p+b):x()}))}}),
-D=this.getCurrentFile(),c=mxUtils.bind(this,function(){t||null==D||!D.isModified()?u():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=D&&(window.location.hash=D.getHash())}),u,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?c():null==D||f?c():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,c)).container,320,140,!0,!0)};
+(v=mxResources.get("copyCreated"),this.editor.setStatus('<div title="'+v+'" class="geStatusAlert">'+v+"</div>"));null!=d&&d()}),mxUtils.bind(this,function(v){null!=window.console&&null!=v&&console.log("error in loadFile:",b,v);var x=mxUtils.bind(this,function(){var z=this.getCurrentFile();null==z?(window.location.hash="",this.showSplash()):window.location.hash="#"+z.getHash()});null==v||"AbortError"!=v.name?this.handleError(v,null!=v?mxResources.get("errorLoadingFile"):null,x,null,null,"#"+p+b):x()}))}}),
+E=this.getCurrentFile(),c=mxUtils.bind(this,function(){t||null==E||!E.isModified()?u():this.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){null!=E&&(window.location.hash=E.getHash())}),u,mxResources.get("cancel"),mxResources.get("discardChanges"))});null==b||0==b.length?c():null==E||f?c():this.showDialog((new PopupDialog(this,this.getUrl()+"#"+b,null,c)).container,320,140,!0,!0)};
App.prototype.getLibraryStorageHint=function(b){var f=b.getTitle();b.constructor!=LocalLibrary&&(f+="\n"+b.getHash());b.constructor==DriveLibrary?f+=" ("+mxResources.get("googleDrive")+")":b.constructor==GitHubLibrary?f+=" ("+mxResources.get("github")+")":b.constructor==TrelloLibrary?f+=" ("+mxResources.get("trello")+")":b.constructor==DropboxLibrary?f+=" ("+mxResources.get("dropbox")+")":b.constructor==OneDriveLibrary?f+=" ("+mxResources.get("oneDrive")+")":b.constructor==StorageLibrary?f+=" ("+
mxResources.get("browser")+")":b.constructor==LocalLibrary&&(f+=" ("+mxResources.get("device")+")");return f};App.prototype.restoreLibraries=function(){function b(l){for(var d=0;d<l.length;d++)""!=l[d]&&0>mxUtils.indexOf(f,l[d])&&f.push(l[d])}var f=[];b(mxSettings.getCustomLibraries());b((urlParams.clibs||"").split(";"));this.loadLibraries(f)};
-App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var l=mxUtils.bind(this,function(g,k){k||mxSettings.removeCustomLibrary(g);delete this.loadedLibraries[g]}),d=0,t=[],u=0<b.length&&"L.scratchpad"==b[0]?1:0,D=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var g=b.length-1;0<=g;g--)null!=t[g]&&this.loadLibrary(t[g],g<=u);null!=f&&f()}});if(null!=b)for(var c=0;c<b.length;c++){var e=encodeURIComponent(decodeURIComponent(b[c]));
-mxUtils.bind(this,function(g,k){if(null!=g&&0<g.length&&null==this.loadedLibraries[g]&&null==this.sidebar.palettes[g]){this.loadedLibraries[g]=!0;d++;var m=mxUtils.bind(this,function(L){t[k]=L;d--;D()}),p=mxUtils.bind(this,function(L){l(g,L);d--;D()}),v=g.substring(0,1);if("L"==v)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var L=decodeURIComponent(g.substring(1));StorageFile.getFileContent(this,L,mxUtils.bind(this,function(N){".scratchpad"==L&&null==
-N&&(N=this.emptyLibraryXml);null!=N?m(new StorageLibrary(this,N,L)):p()}),p)}catch(N){p()}}),0);else if("U"==v){var x=decodeURIComponent(g.substring(1));this.isOffline()||this.loadTemplate(x,mxUtils.bind(this,function(L){null!=L&&0<L.length?m(new UrlLibrary(this,L,x)):p()}),function(){p()},null,!0)}else if("R"==v){v=decodeURIComponent(g.substring(1));try{v=JSON.parse(v);var A={id:v[0],title:v[1],downloadUrl:v[2]};this.remoteInvoke("getFileContent",[A.downloadUrl],null,mxUtils.bind(this,function(L){try{m(new RemoteLibrary(this,
-L,A))}catch(N){p()}}),function(){p()})}catch(L){p()}}else if("S"==v&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(g.substring(1)),function(L){m(L)},p)}catch(L){p()}else{var y=null;"G"==v?null!=this.drive&&null!=this.drive.user&&(y=this.drive):"H"==v?null!=this.gitHub&&null!=this.gitHub.getUser()&&(y=this.gitHub):"T"==v?null!=this.trello&&this.trello.isAuthorized()&&(y=this.trello):"D"==v?null!=this.dropbox&&null!=this.dropbox.getUser()&&(y=this.dropbox):"W"==v&&null!=this.oneDrive&&
-null!=this.oneDrive.getUser()&&(y=this.oneDrive);null!=y?y.getLibrary(decodeURIComponent(g.substring(1)),mxUtils.bind(this,function(L){try{m(L)}catch(N){p()}}),function(L){p()}):p(!0)}}})(e,c)}D()}};
+App.prototype.loadLibraries=function(b,f){if(null!=this.sidebar){null==this.loadedLibraries&&(this.loadedLibraries={});var l=mxUtils.bind(this,function(g,k){k||mxSettings.removeCustomLibrary(g);delete this.loadedLibraries[g]}),d=0,t=[],u=0<b.length&&"L.scratchpad"==b[0]?1:0,E=mxUtils.bind(this,function(){if(0==d){if(null!=b)for(var g=b.length-1;0<=g;g--)null!=t[g]&&this.loadLibrary(t[g],g<=u);null!=f&&f()}});if(null!=b)for(var c=0;c<b.length;c++){var e=encodeURIComponent(decodeURIComponent(b[c]));
+mxUtils.bind(this,function(g,k){if(null!=g&&0<g.length&&null==this.loadedLibraries[g]&&null==this.sidebar.palettes[g]){this.loadedLibraries[g]=!0;d++;var m=mxUtils.bind(this,function(L){t[k]=L;d--;E()}),p=mxUtils.bind(this,function(L){l(g,L);d--;E()}),v=g.substring(0,1);if("L"==v)(isLocalStorage||mxClient.IS_CHROMEAPP)&&window.setTimeout(mxUtils.bind(this,function(){try{var L=decodeURIComponent(g.substring(1));StorageFile.getFileContent(this,L,mxUtils.bind(this,function(N){".scratchpad"==L&&null==
+N&&(N=this.emptyLibraryXml);null!=N?m(new StorageLibrary(this,N,L)):p()}),p)}catch(N){p()}}),0);else if("U"==v){var x=decodeURIComponent(g.substring(1));this.isOffline()||this.loadTemplate(x,mxUtils.bind(this,function(L){null!=L&&0<L.length?m(new UrlLibrary(this,L,x)):p()}),function(){p()},null,!0)}else if("R"==v){v=decodeURIComponent(g.substring(1));try{v=JSON.parse(v);var z={id:v[0],title:v[1],downloadUrl:v[2]};this.remoteInvoke("getFileContent",[z.downloadUrl],null,mxUtils.bind(this,function(L){try{m(new RemoteLibrary(this,
+L,z))}catch(N){p()}}),function(){p()})}catch(L){p()}}else if("S"==v&&null!=this.loadDesktopLib)try{this.loadDesktopLib(decodeURIComponent(g.substring(1)),function(L){m(L)},p)}catch(L){p()}else{var y=null;"G"==v?null!=this.drive&&null!=this.drive.user&&(y=this.drive):"H"==v?null!=this.gitHub&&null!=this.gitHub.getUser()&&(y=this.gitHub):"T"==v?null!=this.trello&&this.trello.isAuthorized()&&(y=this.trello):"D"==v?null!=this.dropbox&&null!=this.dropbox.getUser()&&(y=this.dropbox):"W"==v&&null!=this.oneDrive&&
+null!=this.oneDrive.getUser()&&(y=this.oneDrive);null!=y?y.getLibrary(decodeURIComponent(g.substring(1)),mxUtils.bind(this,function(L){try{m(L)}catch(N){p()}}),function(L){p()}):p(!0)}}})(e,c)}E()}};
App.prototype.updateButtonContainer=function(){if(null!=this.buttonContainer){var b=this.getCurrentFile();"1"==urlParams.embed&&("atlas"==uiTheme||"1"==urlParams.atlas?(this.buttonContainer.style.paddingRight="12px",this.buttonContainer.style.paddingTop="6px",this.buttonContainer.style.right="1"==urlParams.noLangIcon?"0":"25px"):"min"!=uiTheme&&(this.buttonContainer.style.paddingRight="38px",this.buttonContainer.style.paddingTop="6px"));this.commentsSupported()&&"1"!=urlParams.sketch?null==this.commentButton&&
(this.commentButton=document.createElement("a"),this.commentButton.setAttribute("title",mxResources.get("comments")),this.commentButton.className="geToolbarButton",this.commentButton.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;float:left;cursor:pointer;width:24px;height:24px;background-size:24px 24px;background-position:center center;background-repeat:no-repeat;background-image:url("+Editor.commentImage+");","atlas"==uiTheme?(this.commentButton.style.marginRight=
"10px",this.commentButton.style.marginTop="-3px"):this.commentButton.style.marginTop="min"==uiTheme?"1px":"1"==urlParams.atlas?"-2px":"-5px",mxEvent.addListener(this.commentButton,"click",mxUtils.bind(this,function(){this.actions.get("comments").funct()})),this.buttonContainer.appendChild(this.commentButton),"dark"==uiTheme||"atlas"==uiTheme)&&(this.commentButton.style.filter="invert(100%)"):null!=this.commentButton&&(this.commentButton.parentNode.removeChild(this.commentButton),this.commentButton=
null);"1"==urlParams.embed||"draw.io"!=this.getServiceName()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||this.isOfflineApp()?null!=urlParams.notif&&this.fetchAndShowNotification(urlParams.notif):(null!=b?null==this.shareButton&&(this.shareButton=document.createElement("div"),this.shareButton.className="geBtn gePrimaryBtn",this.shareButton.style.display="inline-block",this.shareButton.style.backgroundColor="#F2931E",this.shareButton.style.borderColor="#F08705",this.shareButton.style.backgroundImage=
"none",this.shareButton.style.padding="2px 10px 0 10px",this.shareButton.style.marginTop="-10px",this.shareButton.style.height="28px",this.shareButton.style.lineHeight="28px",this.shareButton.style.minWidth="0px",this.shareButton.style.cssFloat="right",this.shareButton.setAttribute("title",mxResources.get("share")),b=document.createElement("img"),b.setAttribute("src",this.shareImage),b.setAttribute("align","absmiddle"),b.style.marginRight="4px",b.style.marginTop="-3px",this.shareButton.appendChild(b),
Editor.isDarkMode()||"atlas"==uiTheme||(this.shareButton.style.color="black",b.style.filter="invert(100%)"),mxUtils.write(this.shareButton,mxResources.get("share")),mxEvent.addListener(this.shareButton,"click",mxUtils.bind(this,function(){this.actions.get("share").funct()})),this.buttonContainer.appendChild(this.shareButton)):null!=this.shareButton&&(this.shareButton.parentNode.removeChild(this.shareButton),this.shareButton=null),"1"!=urlParams.extAuth&&this.fetchAndShowNotification("online",this.mode))}};
-App.prototype.fetchAndShowNotification=function(b,f){if(!this.fetchingNotif){b=b||"online";var l=null,d=mxUtils.bind(this,function(t){t=t.filter(function(e){return!e.targets||-1<e.targets.indexOf(b)||null!=f&&-1<e.targets.indexOf(f)});for(var u=b+"NotifReadTS",D=isLocalStorage?parseInt(localStorage.getItem(u)):!0,c=0;c<t.length;c++)t[c].isNew=!D||t[c].timestamp>D;this.showNotification(t,u)});try{isLocalStorage&&(l=JSON.parse(localStorage.getItem(".notifCache")))}catch(t){}null==l||l.ts+864E5<Date.now()?
-(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(t){200<=t.getStatus()&&299>=t.getStatus()&&(t=JSON.parse(t.getText()),t.sort(function(u,D){return D.timestamp-u.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:t})),this.fetchingNotif=!1,d(t))}))):d(l.notifs)}};
+App.prototype.fetchAndShowNotification=function(b,f){if(!this.fetchingNotif){b=b||"online";var l=null,d=mxUtils.bind(this,function(t){t=t.filter(function(e){return!e.targets||-1<e.targets.indexOf(b)||null!=f&&-1<e.targets.indexOf(f)});for(var u=b+"NotifReadTS",E=isLocalStorage?parseInt(localStorage.getItem(u)):!0,c=0;c<t.length;c++)t[c].isNew=!E||t[c].timestamp>E;this.showNotification(t,u)});try{isLocalStorage&&(l=JSON.parse(localStorage.getItem(".notifCache")))}catch(t){}null==l||l.ts+864E5<Date.now()?
+(this.fetchingNotif=!0,mxUtils.get(NOTIFICATIONS_URL,mxUtils.bind(this,function(t){200<=t.getStatus()&&299>=t.getStatus()&&(t=JSON.parse(t.getText()),t.sort(function(u,E){return E.timestamp-u.timestamp}),isLocalStorage&&localStorage.setItem(".notifCache",JSON.stringify({ts:Date.now(),notifs:t})),this.fetchingNotif=!1,d(t))}))):d(l.notifs)}};
App.prototype.showNotification=function(b,f){function l(g){var k=document.querySelector(".geNotification-count");null!=k&&(k.innerHTML=g,k.style.display=0==g?"none":"",k=document.querySelector(".geNotification-bell"),k.style.animation=0==g?"none":"",k.className="geNotification-bell"+(0==g?" geNotification-bellOff":""),document.querySelector(".geBell-rad").style.animation=0==g?"none":"")}var d=b.length;if("min"==uiTheme)for(var t=d=0;t<b.length;t++)b[t].isNew&&d++;if(0==d)null!=this.notificationBtn&&
(this.notificationBtn.style.display="none",this.editor.fireEvent(new mxEventObject("statusChanged")));else{var u=mxUtils.bind(this,function(){this.notificationWin.style.display="none";for(var g=this.notificationWin.querySelectorAll(".circle.active"),k=0;k<g.length;k++)g[k].className="circle";isLocalStorage&&b[0]&&localStorage.setItem(f,b[0].timestamp)});if(null==this.notificationBtn){this.notificationBtn=document.createElement("div");this.notificationBtn.className="geNotification-box";"min"==uiTheme?
(this.notificationBtn.style.width="30px",this.notificationBtn.style.top="4px"):"1"==urlParams.atlas&&(this.notificationBtn.style.top="2px");d=document.createElement("span");d.className="geNotification-count";this.notificationBtn.appendChild(d);d=document.createElement("div");d.className="geNotification-bell";d.style.opacity="min"==uiTheme?"0.5":"";t=document.createElement("span");t.className="geBell-top";d.appendChild(t);t=document.createElement("span");t.className="geBell-middle";d.appendChild(t);
t=document.createElement("span");t.className="geBell-bottom";d.appendChild(t);t=document.createElement("span");t.className="geBell-rad";d.appendChild(t);this.notificationBtn.appendChild(d);this.buttonContainer.insertBefore(this.notificationBtn,this.buttonContainer.firstChild);this.notificationWin=document.createElement("div");this.notificationWin.className="geNotifPanel";this.notificationWin.style.display="none";document.body.appendChild(this.notificationWin);t=document.createElement("div");t.className=
-"header";d=document.createElement("span");d.className="title";d.textContent=mxResources.get("notifications");t.appendChild(d);d=document.createElement("span");d.className="closeBtn";d.textContent="x";t.appendChild(d);this.notificationWin.appendChild(t);t=document.createElement("div");t.className="notifications clearfix";var D=document.createElement("div");D.setAttribute("id","geNotifList");D.style.position="relative";t.appendChild(D);this.notificationWin.appendChild(t);mxEvent.addListener(this.notificationBtn,
+"header";d=document.createElement("span");d.className="title";d.textContent=mxResources.get("notifications");t.appendChild(d);d=document.createElement("span");d.className="closeBtn";d.textContent="x";t.appendChild(d);this.notificationWin.appendChild(t);t=document.createElement("div");t.className="notifications clearfix";var E=document.createElement("div");E.setAttribute("id","geNotifList");E.style.position="relative";t.appendChild(E);this.notificationWin.appendChild(t);mxEvent.addListener(this.notificationBtn,
"click",mxUtils.bind(this,function(){if("none"==this.notificationWin.style.display){this.notificationWin.style.display="";document.querySelector(".notifications").scrollTop=0;var g=this.notificationBtn.getBoundingClientRect();this.notificationWin.style.top=g.top+this.notificationBtn.clientHeight+"px";this.notificationWin.style.left=g.right-this.notificationWin.clientWidth+"px";l(0)}else u()}));mxEvent.addListener(d,"click",u)}else this.notificationBtn.style.display="";var c=0,e=document.getElementById("geNotifList");
if(null!=e){e.innerHTML='<div class="line"></div>';for(t=0;t<b.length;t++)(function(g,k){k.isNew&&c++;var m=document.createElement("div");m.className="notification";g=g.timeSince(new Date(k.timestamp));null==g&&(g=mxResources.get("lessThanAMinute"));m.innerHTML='<div class="circle'+(k.isNew?" active":"")+'"></div><span class="time">'+mxUtils.htmlEntities(mxResources.get("timeAgo",[g],"{1} ago"))+"</span><p>"+mxUtils.htmlEntities(k.content)+"</p>";k.link&&mxEvent.addListener(m,"click",function(){window.open(k.link,
"notifWin")});e.appendChild(m)})(this,b[t]);l(c)}}};
App.prototype.save=function(b,f){var l=this.getCurrentFile();if(null!=l&&this.spinner.spin(document.body,mxResources.get("saving"))){this.editor.setStatus("");this.editor.graph.isEditing()&&this.editor.graph.stopEditing();var d=mxUtils.bind(this,function(){l.handleFileSuccess(!0);null!=f&&f()}),t=mxUtils.bind(this,function(u){l.isModified()&&Editor.addRetryToError(u,mxUtils.bind(this,function(){this.save(b,f)}));l.handleFileError(u,null==u||"AbortError"!=u.name)});try{b==l.getTitle()?l.save(!0,d,
t):l.saveAs(b,d,t)}catch(u){t(u)}}};
-App.prototype.pickFolder=function(b,f,l,d,t){l=null!=l?l:!0;var u=this.spinner.pause();l&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(D){u();if(D.action==google.picker.Action.PICKED){var c=null;null!=D.docs&&0<D.docs.length&&"folder"==D.docs[0].type&&(c=D.docs[0].id);f(c)}}),t):l&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(D){u();null!=D&&null!=D.value&&0<D.value.length&&(D=OneDriveFile.prototype.getIdOf(D.value[0]),
-f(D))}),d):l&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(D){u();f(D)})):l&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(D){u();f(D)})):l&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(D){u();f(D)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
-App.prototype.exportFile=function(b,f,l,d,t,u){t==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(f,d?this.base64ToBlob(b,l):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)})):t==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(f,b,u,mxUtils.bind(this,function(D){this.spinner.stop()}),
-mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),l,d):t==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(f,d?this.base64ToBlob(b,l):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),!1,u):t==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(f,b,mxUtils.bind(this,
-function(){this.spinner.stop()}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),!0,u,d):t==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(f,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),!0,u,d):t==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(f,d?this.base64ToBlob(b,
-l):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(D){this.spinner.stop();this.handleError(D)}),!1,u):t==App.MODE_BROWSER&&(l=mxUtils.bind(this,function(){localStorage.setItem(f,b)}),null==localStorage.getItem(f)?l():this.confirm(mxResources.get("replaceIt",[f]),l))};
+App.prototype.pickFolder=function(b,f,l,d,t){l=null!=l?l:!0;var u=this.spinner.pause();l&&b==App.MODE_GOOGLE&&null!=this.drive?this.drive.pickFolder(mxUtils.bind(this,function(E){u();if(E.action==google.picker.Action.PICKED){var c=null;null!=E.docs&&0<E.docs.length&&"folder"==E.docs[0].type&&(c=E.docs[0].id);f(c)}}),t):l&&b==App.MODE_ONEDRIVE&&null!=this.oneDrive?this.oneDrive.pickFolder(mxUtils.bind(this,function(E){u();null!=E&&null!=E.value&&0<E.value.length&&(E=OneDriveFile.prototype.getIdOf(E.value[0]),
+f(E))}),d):l&&b==App.MODE_GITHUB&&null!=this.gitHub?this.gitHub.pickFolder(mxUtils.bind(this,function(E){u();f(E)})):l&&b==App.MODE_GITLAB&&null!=this.gitLab?this.gitLab.pickFolder(mxUtils.bind(this,function(E){u();f(E)})):l&&b==App.MODE_TRELLO&&null!=this.trello?this.trello.pickFolder(mxUtils.bind(this,function(E){u();f(E)})):EditorUi.prototype.pickFolder.apply(this,arguments)};
+App.prototype.exportFile=function(b,f,l,d,t,u){t==App.MODE_DROPBOX?null!=this.dropbox&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.dropbox.insertFile(f,d?this.base64ToBlob(b,l):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(E){this.spinner.stop();this.handleError(E)})):t==App.MODE_GOOGLE?null!=this.drive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.drive.insertFile(f,b,u,mxUtils.bind(this,function(E){this.spinner.stop()}),
+mxUtils.bind(this,function(E){this.spinner.stop();this.handleError(E)}),l,d):t==App.MODE_ONEDRIVE?null!=this.oneDrive&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.oneDrive.insertFile(f,d?this.base64ToBlob(b,l):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(E){this.spinner.stop();this.handleError(E)}),!1,u):t==App.MODE_GITHUB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitHub.insertFile(f,b,mxUtils.bind(this,
+function(){this.spinner.stop()}),mxUtils.bind(this,function(E){this.spinner.stop();this.handleError(E)}),!0,u,d):t==App.MODE_GITLAB?null!=this.gitHub&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.gitLab.insertFile(f,b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(E){this.spinner.stop();this.handleError(E)}),!0,u,d):t==App.MODE_TRELLO?null!=this.trello&&this.spinner.spin(document.body,mxResources.get("saving"))&&this.trello.insertFile(f,d?this.base64ToBlob(b,
+l):b,mxUtils.bind(this,function(){this.spinner.stop()}),mxUtils.bind(this,function(E){this.spinner.stop();this.handleError(E)}),!1,u):t==App.MODE_BROWSER&&(l=mxUtils.bind(this,function(){localStorage.setItem(f,b)}),null==localStorage.getItem(f)?l():this.confirm(mxResources.get("replaceIt",[f]),l))};
App.prototype.descriptorChanged=function(){var b=this.getCurrentFile();if(null!=b){if(null!=this.fname){this.fnameWrapper.style.display="block";this.fname.innerHTML="";var f=null!=b.getTitle()?b.getTitle():this.defaultFilename;mxUtils.write(this.fname,f);this.fname.setAttribute("title",f+" - "+mxResources.get("rename"))}f=this.editor.graph;var l=b.isEditable()&&!b.invalidChecksum;f.isEnabled()&&!l&&f.reset();f.setEnabled(l);null==urlParams.rev&&(this.updateDocumentTitle(),f=b.getHash(),0<f.length?
window.location.hash=f:0<window.location.hash.length&&(window.location.hash=""))}this.updateUi();null==this.format||null!=b&&this.fileEditable==b.isEditable()||!this.editor.graph.isSelectionEmpty()||(this.format.refresh(),this.fileEditable=null!=b?b.isEditable():null);this.fireEvent(new mxEventObject("fileDescriptorChanged","file",b))};
-App.prototype.showAuthDialog=function(b,f,l,d){var t=this.spinner.pause();this.showDialog((new AuthDialog(this,b,f,mxUtils.bind(this,function(u){try{null!=l&&l(u,mxUtils.bind(this,function(){this.hideDialog();t()}))}catch(D){this.editor.setStatus(mxUtils.htmlEntities(D.message))}}))).container,300,f?180:140,!0,!0,mxUtils.bind(this,function(u){null!=d&&d(u);u&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
-App.prototype.convertFile=function(b,f,l,d,t,u,D,c){var e=f;/\.svg$/i.test(e)||(e=e.substring(0,f.lastIndexOf("."))+d);var g=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(g=!0);if(/\.v(dx|sdx?)$/i.test(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var k=new XMLHttpRequest;k.open("GET",b,!0);g||(k.responseType="blob");if(c)for(var m in c)k.setRequestHeader(m,c[m]);k.onload=mxUtils.bind(this,function(){if(200<=
+App.prototype.showAuthDialog=function(b,f,l,d){var t=this.spinner.pause();this.showDialog((new AuthDialog(this,b,f,mxUtils.bind(this,function(u){try{null!=l&&l(u,mxUtils.bind(this,function(){this.hideDialog();t()}))}catch(E){this.editor.setStatus(mxUtils.htmlEntities(E.message))}}))).container,300,f?180:140,!0,!0,mxUtils.bind(this,function(u){null!=d&&d(u);u&&null==this.getCurrentFile()&&null==this.dialog&&this.showSplash()}))};
+App.prototype.convertFile=function(b,f,l,d,t,u,E,c){var e=f;/\.svg$/i.test(e)||(e=e.substring(0,f.lastIndexOf("."))+d);var g=!1;null!=this.gitHub&&b.substring(0,this.gitHub.baseUrl.length)==this.gitHub.baseUrl&&(g=!0);if(/\.v(dx|sdx?)$/i.test(f)&&Graph.fileSupport&&(new XMLHttpRequest).upload&&"string"===typeof(new XMLHttpRequest).responseType){var k=new XMLHttpRequest;k.open("GET",b,!0);g||(k.responseType="blob");if(c)for(var m in c)k.setRequestHeader(m,c[m]);k.onload=mxUtils.bind(this,function(){if(200<=
k.status&&299>=k.status){var v=null;g?(v=JSON.parse(k.responseText),v=this.base64ToBlob(v.content,"application/octet-stream")):v=new Blob([k.response],{type:"application/octet-stream"});this.importVisio(v,mxUtils.bind(this,function(x){t(new LocalFile(this,x,e,!0))}),u,f)}else null!=u&&u({message:mxResources.get("errorLoadingFile")})});k.onerror=u;k.send()}else{var p=mxUtils.bind(this,function(v){try{if(/\.pdf$/i.test(f)){var x=Editor.extractGraphModelFromPdf(v);null!=x&&0<x.length&&t(new LocalFile(this,
-x,e,!0))}else/\.png$/i.test(f)?(x=this.extractGraphModelFromPng(v),null!=x?t(new LocalFile(this,x,e,!0)):t(new LocalFile(this,v,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(v,b)?this.parseFileData(v,mxUtils.bind(this,function(A){4==A.readyState&&(200<=A.status&&299>=A.status?t(new LocalFile(this,A.responseText,e,!0)):null!=u&&u({message:mxResources.get("errorLoadingFile")}))}),f):t(new LocalFile(this,v,e,!0))}catch(A){null!=u&&u(A)}});l=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||
+x,e,!0))}else/\.png$/i.test(f)?(x=this.extractGraphModelFromPng(v),null!=x?t(new LocalFile(this,x,e,!0)):t(new LocalFile(this,v,f,!0))):Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(v,b)?this.parseFileData(v,mxUtils.bind(this,function(z){4==z.readyState&&(200<=z.status&&299>=z.status?t(new LocalFile(this,z.responseText,e,!0)):null!=u&&u({message:mxResources.get("errorLoadingFile")}))}),f):t(new LocalFile(this,v,e,!0))}catch(z){null!=u&&u(z)}});l=/\.png$/i.test(f)||/\.jpe?g$/i.test(f)||
/\.pdf$/i.test(f)||null!=l&&"image/"==l.substring(0,6);g?mxUtils.get(b,mxUtils.bind(this,function(v){if(200<=v.getStatus()&&299>=v.getStatus()){if(null!=t){v=JSON.parse(v.getText());var x=v.content;"base64"===v.encoding&&(x=/\.png$/i.test(f)?"data:image/png;base64,"+x:/\.pdf$/i.test(f)?"data:application/pdf;base64,"+x:!window.atob||mxClient.IS_IE||mxClient.IS_IE11?Base64.decode(x):atob(x));p(x)}}else null!=u&&u({code:App.ERROR_UNKNOWN})}),function(){null!=u&&u({code:App.ERROR_UNKNOWN})},!1,this.timeout,
-function(){null!=u&&u({code:App.ERROR_TIMEOUT,retry:fn})},c):null!=D?D(b,p,u,l):this.editor.loadUrl(b,p,u,l,null,null,null,c)}};
+function(){null!=u&&u({code:App.ERROR_TIMEOUT,retry:fn})},c):null!=E?E(b,p,u,l):this.editor.loadUrl(b,p,u,l,null,null,null,c)}};
App.prototype.updateHeader=function(){if(null!=this.menubar){this.appIcon=document.createElement("a");this.appIcon.style.display="block";this.appIcon.style.position="absolute";this.appIcon.style.width="32px";this.appIcon.style.height=this.menubarHeight-28+"px";this.appIcon.style.margin="14px 0px 8px 16px";this.appIcon.style.opacity="0.85";this.appIcon.style.borderRadius="3px";"dark"!=uiTheme&&(this.appIcon.style.backgroundColor="#f08705");mxEvent.disableContextMenu(this.appIcon);mxEvent.addListener(this.appIcon,
"click",mxUtils.bind(this,function(d){this.appIconClicked(d)}));var b=mxClient.IS_SVG?"dark"==uiTheme?"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIKICAgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzA2LjE4NSAxMjAuMjk2IgogICB2aWV3Qm94PSIyNCAyNiA2OCA2OCIKICAgeT0iMHB4IgogICB4PSIwcHgiCiAgIHZlcnNpb249IjEuMSI+CiAgIAkgPGc+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNDEuMDYxIgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjkiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTUyOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGxpbmUKICAgICAgIHkyPSI3Mi4zOTQiCiAgICAgICB4Mj0iNzUuMDc2IgogICAgICAgeTE9IjQzLjM4NCIKICAgICAgIHgxPSI1OC4wNjgiCiAgICAgICBzdHJva2UtbWl0ZXJsaW1pdD0iMTAiCiAgICAgICBzdHJva2Utd2lkdGg9IjMuNTAwOCIKICAgICAgIHN0cm9rZT0iI0ZGRkZGRiIKICAgICAgIGZpbGw9Im5vbmUiIC8+PGc+PHBhdGgKICAgICAgICAgZD0iTTUyLjc3Myw3Ny4wODRjMCwxLjk1NC0xLjU5OSwzLjU1My0zLjU1MywzLjU1M0gzNi45OTljLTEuOTU0LDAtMy41NTMtMS41OTktMy41NTMtMy41NTN2LTkuMzc5ICAgIGMwLTEuOTU0LDEuNTk5LTMuNTUzLDMuNTUzLTMuNTUzaDEyLjIyMmMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjc3LjA4NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnCiAgICAgICBpZD0iZzM0MTkiPjxwYXRoCiAgICAgICAgIGQ9Ik02Ny43NjIsNDguMDc0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINTEuOTg4Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M0g2NC4yMWMxLjk1NCwwLDMuNTUzLDEuNTk5LDMuNTUzLDMuNTUzVjQ4LjA3NHoiCiAgICAgICAgIGZpbGw9IiNGRkZGRkYiIC8+PC9nPjxnPjxwYXRoCiAgICAgICAgIGQ9Ik04Mi43NTIsNzcuMDg0YzAsMS45NTQtMS41OTksMy41NTMtMy41NTMsMy41NTNINjYuOTc3Yy0xLjk1NCwwLTMuNTUzLTEuNTk5LTMuNTUzLTMuNTUzdi05LjM3OSAgICBjMC0xLjk1NCwxLjU5OS0zLjU1MywzLjU1My0zLjU1M2gxMi4yMjJjMS45NTQsMCwzLjU1MywxLjU5OSwzLjU1MywzLjU1M1Y3Ny4wODR6IgogICAgICAgICBmaWxsPSIjRkZGRkZGIiAvPjwvZz48L2c+PC9zdmc+)":
"url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSJFYmVuZV8xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIKCSB2aWV3Qm94PSIwIDAgMjI1IDIyNSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMjI1IDIyNTsiIHhtbDpzcGFjZT0icHJlc2VydmUiPgo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLnN0MXtmaWxsOiNERjZDMEM7fQoJLnN0MntmaWxsOiNGRkZGRkY7fQo8L3N0eWxlPgo8cGF0aCBjbGFzcz0ic3QxIiBkPSJNMjI1LDIxNS40YzAsNS4zLTQuMyw5LjYtOS41LDkuNmwwLDBINzcuMWwtNDQuOC00NS41TDYwLjIsMTM0bDgyLjctMTAyLjdsODIuMSw4NC41VjIxNS40eiIvPgo8cGF0aCBjbGFzcz0ic3QyIiBkPSJNMTg0LjYsMTI1LjhoLTIzLjdsLTI1LTQyLjdjNS43LTEuMiw5LjgtNi4yLDkuNy0xMlYzOWMwLTYuOC01LjQtMTIuMy0xMi4yLTEyLjNoLTAuMUg5MS42CgljLTYuOCwwLTEyLjMsNS40LTEyLjMsMTIuMlYzOXYzMi4xYzAsNS44LDQsMTAuOCw5LjcsMTJsLTI1LDQyLjdINDAuNGMtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4ydjAuMXYzMi4xCgljMCw2LjgsNS40LDEyLjMsMTIuMiwxMi4zaDAuMWg0MS43YzYuOCwwLDEyLjMtNS40LDEyLjMtMTIuMnYtMC4xdi0zMi4xYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuM2gtMC4xaC00bDI0LjgtNDIuNGgxOS4zCglsMjQuOSw0Mi40SDE0M2MtNi44LDAtMTIuMyw1LjQtMTIuMywxMi4ydjAuMXYzMi4xYzAsNi44LDUuNCwxMi4zLDEyLjIsMTIuM2gwLjFoNDEuN2M2LjgsMCwxMi4zLTUuNCwxMi4zLTEyLjJ2LTAuMXYtMzIuMQoJYzAtNi44LTUuNC0xMi4zLTEyLjItMTIuM0MxODQuNywxMjUuOCwxODQuNywxMjUuOCwxODQuNiwxMjUuOHoiLz4KPC9zdmc+Cg==)":
@@ -12497,174 +12497,174 @@ else{var d=!1;this.userPanel.innerHTML="";l=document.createElement("img");l.setA
function(e,g){var k=this.getCurrentFile();null!=k&&k.constructor==DriveFile?(this.spinner.spin(document.body,g),this.fileLoaded(null),window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();e()}),2E3)):e()});l=mxUtils.bind(this,function(e){var g=document.createElement("tr");g.setAttribute("title","User ID: "+e.id);var k=document.createElement("td");k.setAttribute("valig","middle");k.style.height="59px";k.style.width="66px";var m=document.createElement("img");m.setAttribute("width","50");
m.setAttribute("height","50");m.setAttribute("border","0");m.setAttribute("src",null!=e.pictureUrl?e.pictureUrl:this.defaultUserPicture);m.style.borderRadius="50%";m.style.margin="4px 8px 0 8px";k.appendChild(m);g.appendChild(k);k=document.createElement("td");k.setAttribute("valign","middle");k.style.whiteSpace="nowrap";k.style.paddingTop="4px";k.style.maxWidth="0";k.style.overflow="hidden";k.style.textOverflow="ellipsis";mxUtils.write(k,e.displayName+(e.isCurrent&&1<t.length?" ("+mxResources.get("default")+
")":""));null!=e.email&&(mxUtils.br(k),m=document.createElement("small"),m.style.color="gray",mxUtils.write(m,e.email),k.appendChild(m));m=document.createElement("div");m.style.marginTop="4px";var p=document.createElement("i");mxUtils.write(p,mxResources.get("googleDrive"));m.appendChild(p);k.appendChild(m);g.appendChild(k);e.isCurrent||(g.style.cursor="pointer",g.style.opacity="0.3",mxEvent.addListener(g,"click",mxUtils.bind(this,function(v){u(mxUtils.bind(this,function(){this.stateArg=null;this.drive.setUser(e);
-this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(x){this.handleError(x)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(v)})));return g});d=!0;var D=document.createElement("table");D.style.borderSpacing="0";D.style.fontSize="10pt";D.style.width="100%";D.style.padding="10px";for(var c=0;c<t.length;c++)D.appendChild(l(t[c]));this.userPanel.appendChild(D);l=document.createElement("div");l.style.textAlign=
-"left";l.style.padding="10px";l.style.whiteSpace="nowrap";l.style.borderTop="1px solid rgb(224, 224, 224)";D=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){u(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));D.className="geBtn";D.style.float="right";l.appendChild(D);D=mxUtils.button(mxResources.get("addAccount"),
-mxUtils.bind(this,function(){var e=this.drive.createAuthWin();e.blur();window.focus();u(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(g){this.handleError(g)}),!0,e)}),mxResources.get("closingFile")+"...")}));D.className="geBtn";D.style.margin="0px";l.appendChild(D);this.userPanel.appendChild(l)}}l=mxUtils.bind(this,function(e,g,k,m){if(null!=e){d&&this.userPanel.appendChild(document.createElement("hr"));
-d=!0;var p=document.createElement("table");p.style.borderSpacing="0";p.style.fontSize="10pt";p.style.width="100%";p.style.padding="10px";var v=document.createElement("tbody"),x=document.createElement("tr"),A=document.createElement("td");A.setAttribute("valig","top");A.style.width="40px";if(null!=g){var y=document.createElement("img");y.setAttribute("width","40");y.setAttribute("height","40");y.setAttribute("border","0");y.setAttribute("src",g);y.style.marginRight="6px";A.appendChild(y)}x.appendChild(A);
-A=document.createElement("td");A.setAttribute("valign","middle");A.style.whiteSpace="nowrap";A.style.maxWidth="0";A.style.overflow="hidden";A.style.textOverflow="ellipsis";mxUtils.write(A,e.displayName);null!=e.email&&(mxUtils.br(A),g=document.createElement("small"),g.style.color="gray",mxUtils.write(g,e.email),A.appendChild(g));null!=m&&(e=document.createElement("div"),e.style.marginTop="4px",g=document.createElement("i"),mxUtils.write(g,m),e.appendChild(g),A.appendChild(e));x.appendChild(A);v.appendChild(x);
+this.drive.authorize(!0,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(x){this.handleError(x)}),!0)}),mxResources.get("closingFile")+"...");mxEvent.consume(v)})));return g});d=!0;var E=document.createElement("table");E.style.borderSpacing="0";E.style.fontSize="10pt";E.style.width="100%";E.style.padding="10px";for(var c=0;c<t.length;c++)E.appendChild(l(t[c]));this.userPanel.appendChild(E);l=document.createElement("div");l.style.textAlign=
+"left";l.style.padding="10px";l.style.whiteSpace="nowrap";l.style.borderTop="1px solid rgb(224, 224, 224)";E=mxUtils.button(mxResources.get("signOut"),mxUtils.bind(this,function(){this.confirm(mxResources.get("areYouSure"),mxUtils.bind(this,function(){u(mxUtils.bind(this,function(){this.stateArg=null;this.drive.logout();this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxResources.get("signOut"))}))}));E.className="geBtn";E.style.float="right";l.appendChild(E);E=mxUtils.button(mxResources.get("addAccount"),
+mxUtils.bind(this,function(){var e=this.drive.createAuthWin();e.blur();window.focus();u(mxUtils.bind(this,function(){this.stateArg=null;this.drive.authorize(!1,mxUtils.bind(this,function(){this.setMode(App.MODE_GOOGLE);this.hideDialog();this.showSplash()}),mxUtils.bind(this,function(g){this.handleError(g)}),!0,e)}),mxResources.get("closingFile")+"...")}));E.className="geBtn";E.style.margin="0px";l.appendChild(E);this.userPanel.appendChild(l)}}l=mxUtils.bind(this,function(e,g,k,m){if(null!=e){d&&this.userPanel.appendChild(document.createElement("hr"));
+d=!0;var p=document.createElement("table");p.style.borderSpacing="0";p.style.fontSize="10pt";p.style.width="100%";p.style.padding="10px";var v=document.createElement("tbody"),x=document.createElement("tr"),z=document.createElement("td");z.setAttribute("valig","top");z.style.width="40px";if(null!=g){var y=document.createElement("img");y.setAttribute("width","40");y.setAttribute("height","40");y.setAttribute("border","0");y.setAttribute("src",g);y.style.marginRight="6px";z.appendChild(y)}x.appendChild(z);
+z=document.createElement("td");z.setAttribute("valign","middle");z.style.whiteSpace="nowrap";z.style.maxWidth="0";z.style.overflow="hidden";z.style.textOverflow="ellipsis";mxUtils.write(z,e.displayName);null!=e.email&&(mxUtils.br(z),g=document.createElement("small"),g.style.color="gray",mxUtils.write(g,e.email),z.appendChild(g));null!=m&&(e=document.createElement("div"),e.style.marginTop="4px",g=document.createElement("i"),mxUtils.write(g,m),e.appendChild(g),z.appendChild(e));x.appendChild(z);v.appendChild(x);
p.appendChild(v);this.userPanel.appendChild(p);e=document.createElement("div");e.style.textAlign="center";e.style.padding="10px";e.style.whiteSpace="nowrap";null!=k&&(k=mxUtils.button(mxResources.get("signOut"),k),k.className="geBtn",e.appendChild(k));this.userPanel.appendChild(e)}});null!=this.dropbox&&l(this.dropbox.getUser(),IMAGE_PATH+"/dropbox-logo.svg",mxUtils.bind(this,function(){var e=this.getCurrentFile();if(null!=e&&e.constructor==DropboxFile){var g=mxUtils.bind(this,function(){this.dropbox.logout();
window.location.hash=""});e.isModified()?this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):g()}else this.dropbox.logout()}),mxResources.get("dropbox"));null!=this.oneDrive&&l(this.oneDrive.getUser(),IMAGE_PATH+"/onedrive-logo.svg",this.oneDrive.noLogout?null:mxUtils.bind(this,function(){var e=this.getCurrentFile();if(null!=e&&e.constructor==OneDriveFile){var g=mxUtils.bind(this,function(){this.oneDrive.logout();window.location.hash=
""});e.isModified()?this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):g()}else this.oneDrive.logout()}),mxResources.get("oneDrive"));null!=this.gitHub&&l(this.gitHub.getUser(),IMAGE_PATH+"/github-logo.svg",mxUtils.bind(this,function(){var e=this.getCurrentFile();if(null!=e&&e.constructor==GitHubFile){var g=mxUtils.bind(this,function(){this.gitHub.logout();window.location.hash=""});e.isModified()?this.confirm(mxResources.get("allChangesLost"),
null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):g()}else this.gitHub.logout()}),mxResources.get("github"));null!=this.gitLab&&l(this.gitLab.getUser(),IMAGE_PATH+"/gitlab-logo.svg",mxUtils.bind(this,function(){var e=this.getCurrentFile();if(null!=e&&e.constructor==GitLabFile){var g=mxUtils.bind(this,function(){this.gitLab.logout();window.location.hash=""});e.isModified()?this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):
g()}else this.gitLab.logout()}),mxResources.get("gitlab"));null!=this.trello&&l(this.trello.getUser(),IMAGE_PATH+"/trello-logo.svg",mxUtils.bind(this,function(){var e=this.getCurrentFile();if(null!=e&&e.constructor==TrelloFile){var g=mxUtils.bind(this,function(){this.trello.logout();window.location.hash=""});e.isModified()?this.confirm(mxResources.get("allChangesLost"),null,g,mxResources.get("cancel"),mxResources.get("discardChanges")):g()}else this.trello.logout()}),mxResources.get("trello"));d||
-(l=document.createElement("div"),l.style.textAlign="center",l.style.padding="10px",l.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(l));l=document.createElement("div");l.style.textAlign="center";l.style.padding="10px";l.style.background=Editor.isDarkMode()?"":"whiteSmoke";l.style.borderTop="1px solid #e0e0e0";l.style.whiteSpace="nowrap";"1"==urlParams.sketch?(D=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.actions.get("share").funct()})),D.className=
-"geBtn",l.appendChild(D),this.commentsSupported()&&(D=mxUtils.button(mxResources.get("comments"),mxUtils.bind(this,function(){this.actions.get("comments").funct()})),D.className="geBtn",l.appendChild(D),this.userPanel.appendChild(l))):(D=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){mxEvent.isConsumed(f)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})),D.className="geBtn",l.appendChild(D));this.userPanel.appendChild(l);
-"min"==uiTheme&&(c=this.getCurrentFile(),null!=c&&c.isRealtimeEnabled()&&c.isRealtimeSupported()&&(l=l.cloneNode(!1),l.style.fontSize="9pt",D=c.getRealtimeError(),c=c.getRealtimeState(),mxUtils.write(l,mxResources.get("realtimeCollaboration")+": "+(1==c?mxResources.get("online"):null!=D&&null!=D.message?D.message:mxResources.get("disconnected"))),this.userPanel.appendChild(l)));document.body.appendChild(this.userPanel)}mxEvent.consume(f)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,
+(l=document.createElement("div"),l.style.textAlign="center",l.style.padding="10px",l.innerHTML=mxResources.get("notConnected"),this.userPanel.appendChild(l));l=document.createElement("div");l.style.textAlign="center";l.style.padding="10px";l.style.background=Editor.isDarkMode()?"":"whiteSmoke";l.style.borderTop="1px solid #e0e0e0";l.style.whiteSpace="nowrap";"1"==urlParams.sketch?(E=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.actions.get("share").funct()})),E.className=
+"geBtn",l.appendChild(E),this.commentsSupported()&&(E=mxUtils.button(mxResources.get("comments"),mxUtils.bind(this,function(){this.actions.get("comments").funct()})),E.className="geBtn",l.appendChild(E),this.userPanel.appendChild(l))):(E=mxUtils.button(mxResources.get("close"),mxUtils.bind(this,function(){mxEvent.isConsumed(f)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})),E.className="geBtn",l.appendChild(E));this.userPanel.appendChild(l);
+"min"==uiTheme&&(c=this.getCurrentFile(),null!=c&&c.isRealtimeEnabled()&&c.isRealtimeSupported()&&(l=l.cloneNode(!1),l.style.fontSize="9pt",E=c.getRealtimeError(),c=c.getRealtimeState(),mxUtils.write(l,mxResources.get("realtimeCollaboration")+": "+(1==c?mxResources.get("online"):null!=E&&null!=E.message?E.message:mxResources.get("disconnected"))),this.userPanel.appendChild(l)));document.body.appendChild(this.userPanel)}mxEvent.consume(f)})),mxEvent.addListener(document.body,"click",mxUtils.bind(this,
function(f){mxEvent.isConsumed(f)||null==this.userPanel||null==this.userPanel.parentNode||this.userPanel.parentNode.removeChild(this.userPanel)})));var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()?b=this.gitHub.getUser():null!=this.gitLab&&null!=this.gitLab.getUser()&&(b=this.gitLab.getUser());
null!=b?(this.userElement.innerHTML="",560<screen.width&&(mxUtils.write(this.userElement,b.displayName),this.userElement.style.display="block")):this.userElement.style.display="none"}else null!=this.userElement&&(this.userElement.parentNode.removeChild(this.userElement),this.userElement=null)};
App.prototype.getCurrentUser=function(){var b=null;null!=this.drive&&null!=this.drive.getUser()?b=this.drive.getUser():null!=this.oneDrive&&null!=this.oneDrive.getUser()?b=this.oneDrive.getUser():null!=this.dropbox&&null!=this.dropbox.getUser()?b=this.dropbox.getUser():null!=this.gitHub&&null!=this.gitHub.getUser()&&(b=this.gitHub.getUser());return b};var editorResetGraph=Editor.prototype.resetGraph;
Editor.prototype.resetGraph=function(){editorResetGraph.apply(this,arguments);null==this.graph.defaultPageFormat&&(this.graph.pageFormat=mxSettings.getPageFormat())};(function(){var b=mxPopupMenu.prototype.showMenu;mxPopupMenu.prototype.showMenu=function(){this.div.style.overflowY="auto";this.div.style.overflowX="hidden";this.div.style.maxHeight=Math.max(document.body.clientHeight,document.documentElement.clientHeight)-(EditorUi.isElectronApp?50:10)+"px";b.apply(this,arguments)};Menus.prototype.createHelpLink=function(l){var d=document.createElement("span");d.setAttribute("title",mxResources.get("help"));d.style.cssText="color:blue;text-decoration:underline;margin-left:8px;cursor:help;";
var t=document.createElement("img");mxUtils.setOpacity(t,50);t.style.height="16px";t.style.width="16px";t.setAttribute("border","0");t.setAttribute("valign","bottom");t.setAttribute("src",Editor.helpImage);d.appendChild(t);mxEvent.addGestureListeners(d,mxUtils.bind(this,function(u){this.editorUi.hideCurrentMenu();this.editorUi.openLink(l);mxEvent.consume(u)}));return d};Menus.prototype.addLinkToItem=function(l,d){null!=l&&l.firstChild.nextSibling.appendChild(this.createHelpLink(d))};var f=Menus.prototype.init;
-Menus.prototype.init=function(){function l(q,C,z){this.ui=q;this.previousExtFonts=this.extFonts=C;this.prevCustomFonts=this.customFonts=z}f.apply(this,arguments);var d=this.editorUi,t=d.editor.graph,u=mxUtils.bind(t,t.isEnabled),D=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),c=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
+Menus.prototype.init=function(){function l(q,C,A){this.ui=q;this.previousExtFonts=this.extFonts=C;this.prevCustomFonts=this.customFonts=A}f.apply(this,arguments);var d=this.editorUi,t=d.editor.graph,u=mxUtils.bind(t,t.isEnabled),E=("1"!=urlParams.embed&&"0"!=urlParams.gapi||"1"==urlParams.embed&&"1"==urlParams.gapi)&&mxClient.IS_SVG&&isLocalStorage&&(null==document.documentMode||10<=document.documentMode),c=("1"!=urlParams.embed&&"0"!=urlParams.db||"1"==urlParams.embed&&"1"==urlParams.db)&&mxClient.IS_SVG&&
(null==document.documentMode||9<document.documentMode),e=("www.draw.io"==window.location.hostname||"test.draw.io"==window.location.hostname||"drive.draw.io"==window.location.hostname||"app.diagrams.net"==window.location.hostname)&&("1"!=urlParams.embed&&"0"!=urlParams.od||"1"==urlParams.embed&&"1"==urlParams.od)&&!mxClient.IS_IOS&&(0>navigator.userAgent.indexOf("MSIE")||10<=document.documentMode),g="1"==urlParams.tr&&mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode);mxClient.IS_SVG||
d.isOffline()||((new Image).src=IMAGE_PATH+"/help.png");"1"==urlParams.noFileMenu&&(this.defaultMenuItems=this.defaultMenuItems.filter(function(q){return"file"!=q}));d.actions.addAction("new...",function(){var q=d.isOffline();if(q||"1"!=urlParams.newTempDlg||d.mode!=App.MODE_GOOGLE){var C=new NewDialog(d,q,!(d.mode==App.MODE_DEVICE&&"chooseFileSystemEntries"in window));d.showDialog(C.container,q?350:620,q?70:460,!0,!0,function(B){d.sidebar.hideTooltip();B&&null==d.getCurrentFile()&&d.showSplash()});
-C.init()}else{var z=function(B){return{id:B.id,isExt:!0,url:B.downloadUrl,title:B.title,imgUrl:B.thumbnailLink,changedBy:B.lastModifyingUserName,lastModifiedOn:B.modifiedDate}};q=new TemplatesDialog(d,function(B,G,M){var H=M.libs,F=M.clibs;d.pickFolder(d.mode,function(J){d.createFile(G,B,null!=H&&0<H.length?H:null,null,function(){d.hideDialog()},null,J,null,null!=F&&0<F.length?F:null)},null==d.stateArg||null==d.stateArg.folderId)},null,null,null,"user",function(B,G,M){var H=new Date;H.setDate(H.getDate()-
-7);d.drive.listFiles(null,H,M?!0:!1,function(F){for(var J=[],R=0;R<F.items.length;R++)J.push(z(F.items[R]));B(J)},G)},function(B,G,M,H){d.drive.listFiles(B,null,H?!0:!1,function(F){for(var J=[],R=0;R<F.items.length;R++)J.push(z(F.items[R]));G(J)},M)},function(B,G,M){d.drive.getFile(B.id,function(H){G(H.data)},M)},null,null,!1,!1);d.showDialog(q.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});d.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(t.isEnabled()&&
-!t.isCellLocked(t.getDefaultParent())){var q=new NewDialog(d,null,!1,function(C){d.hideDialog();if(null!=C){var z=d.editor.graph.getFreeInsertPoint();t.setSelectionCells(d.importXml(C,Math.max(z.x,20),Math.max(z.y,20),!0,null,null,!0));t.scrollCellToVisible(t.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));d.showDialog(q.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()});q.init()}})).isEnabled=u;var k=d.actions.addAction("shareCursor",
+C.init()}else{var A=function(B){return{id:B.id,isExt:!0,url:B.downloadUrl,title:B.title,imgUrl:B.thumbnailLink,changedBy:B.lastModifyingUserName,lastModifiedOn:B.modifiedDate}};q=new TemplatesDialog(d,function(B,G,M){var H=M.libs,F=M.clibs;d.pickFolder(d.mode,function(J){d.createFile(G,B,null!=H&&0<H.length?H:null,null,function(){d.hideDialog()},null,J,null,null!=F&&0<F.length?F:null)},null==d.stateArg||null==d.stateArg.folderId)},null,null,null,"user",function(B,G,M){var H=new Date;H.setDate(H.getDate()-
+7);d.drive.listFiles(null,H,M?!0:!1,function(F){for(var J=[],R=0;R<F.items.length;R++)J.push(A(F.items[R]));B(J)},G)},function(B,G,M,H){d.drive.listFiles(B,null,H?!0:!1,function(F){for(var J=[],R=0;R<F.items.length;R++)J.push(A(F.items[R]));G(J)},M)},function(B,G,M){d.drive.getFile(B.id,function(H){G(H.data)},M)},null,null,!1,!1);d.showDialog(q.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}});d.actions.put("insertTemplate",new Action(mxResources.get("template")+"...",function(){if(t.isEnabled()&&
+!t.isCellLocked(t.getDefaultParent())){var q=new NewDialog(d,null,!1,function(C){d.hideDialog();if(null!=C){var A=d.editor.graph.getFreeInsertPoint();t.setSelectionCells(d.importXml(C,Math.max(A.x,20),Math.max(A.y,20),!0,null,null,!0));t.scrollCellToVisible(t.getSelectionCell())}},null,null,null,null,null,null,null,null,null,null,!1,mxResources.get("insert"));d.showDialog(q.container,620,460,!0,!0,function(){d.sidebar.hideTooltip()});q.init()}})).isEnabled=u;var k=d.actions.addAction("shareCursor",
function(){d.setShareCursorPosition(!d.isShareCursorPosition())});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.isShareCursorPosition()});k=d.actions.addAction("showRemoteCursors",function(){d.setShowRemoteCursors(!d.isShowRemoteCursors())});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.isShowRemoteCursors()});k=d.actions.addAction("points",function(){d.editor.graph.view.setUnit(mxConstants.POINTS)});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.editor.graph.view.unit==
mxConstants.POINTS});k=d.actions.addAction("inches",function(){d.editor.graph.view.setUnit(mxConstants.INCHES)});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.INCHES});k=d.actions.addAction("millimeters",function(){d.editor.graph.view.setUnit(mxConstants.MILLIMETERS)});k.setToggleAction(!0);k.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.MILLIMETERS});k=d.actions.addAction("meters",function(){d.editor.graph.view.setUnit(mxConstants.METERS)});
k.setToggleAction(!0);k.setSelectedCallback(function(){return d.editor.graph.view.unit==mxConstants.METERS});this.put("units",new Menu(mxUtils.bind(this,function(q,C){this.addMenuItems(q,["points","inches","millimeters","meters"],C)})));k=d.actions.addAction("ruler",function(){mxSettings.setRulerOn(!mxSettings.isRulerOn());mxSettings.save();null!=d.ruler?(d.ruler.destroy(),d.ruler=null):d.ruler=new mxDualRuler(d,d.editor.graph.view.unit);d.refresh()});k.setEnabled(d.canvasSupported&&9!=document.documentMode);
k.setToggleAction(!0);k.setSelectedCallback(function(){return null!=d.ruler});k=d.actions.addAction("fullscreen",function(){"1"==urlParams.embedInline?d.setInlineFullscreen(!Editor.inlineFullscreen):null==document.fullscreenElement?document.body.requestFullscreen():document.exitFullscreen()});k.visible="1"==urlParams.embedInline||window==window.top&&document.fullscreenEnabled&&null!=document.body.requestFullscreen;k.setToggleAction(!0);k.setSelectedCallback(function(){return"1"==urlParams.embedInline?
Editor.inlineFullscreen:null!=document.fullscreenElement});d.actions.addAction("properties...",function(){var q=new FilePropertiesDialog(d);d.showDialog(q.container,320,120,!0,!0);q.init()}).isEnabled=u;window.mxFreehand&&(d.actions.put("insertFreehand",new Action(mxResources.get("freehand")+"...",function(q){t.isEnabled()&&(null==this.freehandWindow&&(q=!mxClient.IS_IE&&!mxClient.IS_IE11,this.freehandWindow=new FreehandWindow(d,document.body.offsetWidth-420,102,176,q?120:84,q)),t.freehand.isDrawing()?
-t.freehand.stopDrawing():t.freehand.startDrawing(),this.freehandWindow.window.setVisible(t.freehand.isDrawing()))})).isEnabled=function(){return u()&&mxClient.IS_SVG});d.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var q=document.createElement("div");q.style.whiteSpace="nowrap";var C=null==d.pages||1>=d.pages.length,z=document.createElement("h3");mxUtils.write(z,mxResources.get("formatXml"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
-q.appendChild(z);var B=d.addCheckbox(q,mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),G=d.addCheckbox(q,mxResources.get("compressed"),!0),M=d.addCheckbox(q,mxResources.get("allPages"),!C,C);M.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?M.setAttribute("disabled","disabled"):M.removeAttribute("disabled")});q=new CustomDialog(d,q,mxUtils.bind(this,function(){d.downloadFile("xml",!G.checked,null,!B.checked,C||!M.checked)}),null,mxResources.get("export"));d.showDialog(q.container,
-300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(q,C,z,B,G,M,H,F,J){H=[];J&&H.push("tags=%7B%7D");q=new EmbedDialog(d,d.createLink(q,C,z,B,G,M,null,!0,H));d.showDialog(q.container,450,240,!0,!0);q.init()})}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),
-function(q){d.spinner.stop();d.showHtmlDialog(mxResources.get("export"),null,q,function(C,z,B,G,M,H,F,J,R,W,O){d.createHtml(C,z,B,G,M,H,F,J,R,W,O,mxUtils.bind(this,function(V,U){var X=d.getBaseFilename(F);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(X)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+U+"\n</body>\n</html>";d.saveData(X+(".drawio"==X.substring(X.lenth-7)?"":".drawio")+
-".html","html",V,"text/html")}))})})}));d.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!d.isOffline()&&!d.printPdfExport){var q=null==d.pages||1>=d.pages.length,C=document.createElement("div");C.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("formatPdf"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";C.appendChild(z);var B=function(){F!=this&&this.checked?
-(U.removeAttribute("disabled"),U.checked=!t.pageVisible):(U.setAttribute("disabled","disabled"),U.checked=!1)};z=200;var G=1,M=null;if(d.pdfPageExport&&!q){var H=function(){O.value=Math.max(1,Math.min(G,Math.max(parseInt(O.value),parseInt(R.value))));R.value=Math.max(1,Math.min(G,Math.min(parseInt(O.value),parseInt(R.value))))},F=d.addRadiobox(C,"pages",mxResources.get("allPages"),!0),J=d.addRadiobox(C,"pages",mxResources.get("pages")+":",!1,null,!0),R=document.createElement("input");R.style.cssText=
+t.freehand.stopDrawing():t.freehand.startDrawing(),this.freehandWindow.window.setVisible(t.freehand.isDrawing()))})).isEnabled=function(){return u()&&mxClient.IS_SVG});d.actions.put("exportXml",new Action(mxResources.get("formatXml")+"...",function(){var q=document.createElement("div");q.style.whiteSpace="nowrap";var C=null==d.pages||1>=d.pages.length,A=document.createElement("h3");mxUtils.write(A,mxResources.get("formatXml"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";
+q.appendChild(A);var B=d.addCheckbox(q,mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),G=d.addCheckbox(q,mxResources.get("compressed"),!0),M=d.addCheckbox(q,mxResources.get("allPages"),!C,C);M.style.marginBottom="16px";mxEvent.addListener(B,"change",function(){B.checked?M.setAttribute("disabled","disabled"):M.removeAttribute("disabled")});q=new CustomDialog(d,q,mxUtils.bind(this,function(){d.downloadFile("xml",!G.checked,null,!B.checked,C||!M.checked)}),null,mxResources.get("export"));d.showDialog(q.container,
+300,200,!0,!0)}));Editor.enableExportUrl&&d.actions.put("exportUrl",new Action(mxResources.get("url")+"...",function(){d.showPublishLinkDialog(mxResources.get("url"),!0,null,null,function(q,C,A,B,G,M,H,F,J){H=[];J&&H.push("tags=%7B%7D");q=new EmbedDialog(d,d.createLink(q,C,A,B,G,M,null,!0,H));d.showDialog(q.container,450,240,!0,!0);q.init()})}));d.actions.put("exportHtml",new Action(mxResources.get("formatHtmlEmbedded")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),
+function(q){d.spinner.stop();d.showHtmlDialog(mxResources.get("export"),null,q,function(C,A,B,G,M,H,F,J,R,W,O){d.createHtml(C,A,B,G,M,H,F,J,R,W,O,mxUtils.bind(this,function(V,U){var Y=d.getBaseFilename(F);V='\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n<!DOCTYPE html>\n<html>\n<head>\n<title>'+mxUtils.htmlEntities(Y)+'</title>\n<meta charset="utf-8"/>\n</head>\n<body>'+V+"\n"+U+"\n</body>\n</html>";d.saveData(Y+(".drawio"==Y.substring(Y.lenth-7)?"":".drawio")+
+".html","html",V,"text/html")}))})})}));d.actions.put("exportPdf",new Action(mxResources.get("formatPdf")+"...",function(){if(EditorUi.isElectronApp||!d.isOffline()&&!d.printPdfExport){var q=null==d.pages||1>=d.pages.length,C=document.createElement("div");C.style.whiteSpace="nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("formatPdf"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";C.appendChild(A);var B=function(){F!=this&&this.checked?
+(U.removeAttribute("disabled"),U.checked=!t.pageVisible):(U.setAttribute("disabled","disabled"),U.checked=!1)};A=200;var G=1,M=null;if(d.pdfPageExport&&!q){var H=function(){O.value=Math.max(1,Math.min(G,Math.max(parseInt(O.value),parseInt(R.value))));R.value=Math.max(1,Math.min(G,Math.min(parseInt(O.value),parseInt(R.value))))},F=d.addRadiobox(C,"pages",mxResources.get("allPages"),!0),J=d.addRadiobox(C,"pages",mxResources.get("pages")+":",!1,null,!0),R=document.createElement("input");R.style.cssText=
"margin:0 8px 0 8px;";R.setAttribute("value","1");R.setAttribute("type","number");R.setAttribute("min","1");R.style.width="50px";C.appendChild(R);var W=document.createElement("span");mxUtils.write(W,mxResources.get("to"));C.appendChild(W);var O=R.cloneNode(!0);C.appendChild(O);mxEvent.addListener(R,"focus",function(){J.checked=!0});mxEvent.addListener(O,"focus",function(){J.checked=!0});mxEvent.addListener(R,"change",H);mxEvent.addListener(O,"change",H);if(null!=d.pages&&(G=d.pages.length,null!=d.currentPage))for(H=
-0;H<d.pages.length;H++)if(d.currentPage==d.pages[H]){M=H+1;R.value=M;O.value=M;break}R.setAttribute("max",G);O.setAttribute("max",G);mxUtils.br(C);var V=d.addRadiobox(C,"pages",mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),U=d.addCheckbox(C,mxResources.get("crop"),!1,!0),X=d.addCheckbox(C,mxResources.get("grid"),!1,!1);mxEvent.addListener(F,"change",B);mxEvent.addListener(J,"change",B);mxEvent.addListener(V,"change",B);z+=64}else V=d.addCheckbox(C,mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),
-U=d.addCheckbox(C,mxResources.get("crop"),!t.pageVisible||!d.pdfPageExport,!d.pdfPageExport),X=d.addCheckbox(C,mxResources.get("grid"),!1,!1),d.pdfPageExport||mxEvent.addListener(V,"change",B);B=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==d.getServiceName();var n=null,E=null;if(EditorUi.isElectronApp||B)E=d.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),z+=30;B&&(n=d.addCheckbox(C,mxResources.get("transparentBackground"),!1),z+=30);C=new CustomDialog(d,
-C,mxUtils.bind(this,function(){var I=null;if(!q){I=parseInt(R.value);var S=parseInt(O.value);I=F.checked||I==M&&S==M?null:{from:Math.max(0,Math.min(G-1,I-1)),to:Math.max(0,Math.min(G-1,S-1))}}d.downloadFile("pdf",null,null,!V.checked,q?!0:!F.checked&&null==I,!U.checked,null!=n&&n.checked,null,null,X.checked,null!=E&&E.checked,I)}),null,mxResources.get("export"));d.showDialog(C.container,300,z,!0,!0)}else d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,360,null!=d.pages&&1<
+0;H<d.pages.length;H++)if(d.currentPage==d.pages[H]){M=H+1;R.value=M;O.value=M;break}R.setAttribute("max",G);O.setAttribute("max",G);mxUtils.br(C);var V=d.addRadiobox(C,"pages",mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),U=d.addCheckbox(C,mxResources.get("crop"),!1,!0),Y=d.addCheckbox(C,mxResources.get("grid"),!1,!1);mxEvent.addListener(F,"change",B);mxEvent.addListener(J,"change",B);mxEvent.addListener(V,"change",B);A+=64}else V=d.addCheckbox(C,mxResources.get("selectionOnly"),!1,t.isSelectionEmpty()),
+U=d.addCheckbox(C,mxResources.get("crop"),!t.pageVisible||!d.pdfPageExport,!d.pdfPageExport),Y=d.addCheckbox(C,mxResources.get("grid"),!1,!1),d.pdfPageExport||mxEvent.addListener(V,"change",B);B=!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&"draw.io"==d.getServiceName();var n=null,D=null;if(EditorUi.isElectronApp||B)D=d.addCheckbox(C,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram),A+=30;B&&(n=d.addCheckbox(C,mxResources.get("transparentBackground"),!1),A+=30);C=new CustomDialog(d,
+C,mxUtils.bind(this,function(){var I=null;if(!q){I=parseInt(R.value);var S=parseInt(O.value);I=F.checked||I==M&&S==M?null:{from:Math.max(0,Math.min(G-1,I-1)),to:Math.max(0,Math.min(G-1,S-1))}}d.downloadFile("pdf",null,null,!V.checked,q?!0:!F.checked&&null==I,!U.checked,null!=n&&n.checked,null,null,Y.checked,null!=D&&D.checked,I)}),null,mxResources.get("export"));d.showDialog(C.container,300,A,!0,!0)}else d.showDialog((new PrintDialog(d,mxResources.get("formatPdf"))).container,360,null!=d.pages&&1<
d.pages.length&&(d.editor.editable||"1"!=urlParams["hide-pages"])?470:390,!0,!0)}));d.actions.addAction("open...",function(){d.pickFile()});d.actions.addAction("close",function(){function q(){null!=C&&C.removeDraft();d.fileLoaded(null)}var C=d.getCurrentFile();null!=C&&C.isModified()?d.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()});d.actions.addAction("editShape...",mxUtils.bind(this,function(){t.getSelectionCells();if(1==t.getSelectionCount()){var q=
t.getSelectionCell(),C=t.view.getState(q);null!=C&&null!=C.shape&&null!=C.shape.stencil&&(q=new EditShapeDialog(d,q,mxResources.get("editShape")+":",630,400),d.showDialog(q.container,640,480,!0,!1),q.init())}}));d.actions.addAction("revisionHistory...",function(){d.isRevisionHistorySupported()?d.spinner.spin(document.body,mxResources.get("loading"))&&d.getRevisions(mxUtils.bind(this,function(q,C){d.spinner.stop();q=new RevisionDialog(d,q,C);d.showDialog(q.container,640,480,!0,!0);q.init()}),mxUtils.bind(this,
function(q){d.handleError(q)})):d.showError(mxResources.get("error"),mxResources.get("notAvailable"),mxResources.get("ok"))});d.actions.addAction("createRevision",function(){d.actions.get("save").funct()},null,null,Editor.ctrlKey+"+S");k=d.actions.addAction("synchronize",function(){d.synchronizeCurrentFile("none"==DrawioFile.SYNC)},null,null,"Alt+Shift+S");"none"==DrawioFile.SYNC&&(k.label=mxResources.get("refresh"));d.actions.addAction("upload...",function(){var q=d.getCurrentFile();null!=q&&(window.drawdata=
d.getFileData(),q=null!=q.getTitle()?q.getTitle():d.defaultFilename,d.openLink(window.location.protocol+"//"+window.location.host+"/?create=drawdata&"+(d.mode==App.MODE_DROPBOX?"mode=dropbox&":"")+"title="+encodeURIComponent(q),null,!0))});"undefined"!==typeof MathJax&&(k=d.actions.addAction("mathematicalTypesetting",function(){var q=new ChangePageSetup(d);q.ignoreColor=!0;q.ignoreImage=!0;q.mathEnabled=!d.isMathEnabled();t.model.execute(q)}),k.setToggleAction(!0),k.setSelectedCallback(function(){return d.isMathEnabled()}),
k.isEnabled=u);isLocalStorage&&(k=d.actions.addAction("showStartScreen",function(){mxSettings.setShowStartScreen(!mxSettings.getShowStartScreen());mxSettings.save()}),k.setToggleAction(!0),k.setSelectedCallback(function(){return mxSettings.getShowStartScreen()}));var m=d.actions.addAction("autosave",function(){d.editor.setAutosave(!d.editor.autosave)});m.setToggleAction(!0);m.setSelectedCallback(function(){return m.isEnabled()&&d.editor.autosave});d.actions.addAction("editGeometry...",function(){for(var q=
-t.getSelectionCells(),C=[],z=0;z<q.length;z++)t.getModel().isVertex(q[z])&&C.push(q[z]);0<C.length&&(q=new EditGeometryDialog(d,C),d.showDialog(q.container,200,270,!0,!0),q.init())},null,null,Editor.ctrlKey+"+Shift+M");var p=null;d.actions.addAction("copyStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&(p=t.copyStyle(t.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");d.actions.addAction("pasteStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&null!=p&&t.pasteStyle(p,t.getSelectionCells())},
+t.getSelectionCells(),C=[],A=0;A<q.length;A++)t.getModel().isVertex(q[A])&&C.push(q[A]);0<C.length&&(q=new EditGeometryDialog(d,C),d.showDialog(q.container,200,270,!0,!0),q.init())},null,null,Editor.ctrlKey+"+Shift+M");var p=null;d.actions.addAction("copyStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&(p=t.copyStyle(t.getSelectionCell()))},null,null,Editor.ctrlKey+"+Shift+C");d.actions.addAction("pasteStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&null!=p&&t.pasteStyle(p,t.getSelectionCells())},
null,null,Editor.ctrlKey+"+Shift+V");d.actions.put("pageBackgroundImage",new Action(mxResources.get("backgroundImage")+"...",function(){if(!d.isOffline()){var q=new BackgroundImageDialog(d,function(C){d.setBackgroundImage(C)});d.showDialog(q.container,400,170,!0,!0);q.init()}}));d.actions.put("exportSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showExportDialog(mxResources.get("formatSvg"),!0,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,
-function(q,C,z,B,G,M,H,F,J,R,W,O,V,U,X){J=parseInt(q);!isNaN(J)&&0<J&&(X?d.downloadFile("remoteSvg",null,null,z,null,F,C,q,H,null,G):d.exportSvg(J/100,C,z,B,G,M,H,!F,!1,R,O,V,U))}),!0,null,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(q,C,z,B,G,M,H,F,J,R,W,O,V){q=parseInt(q);!isNaN(q)&&
-0<q&&d.exportImage(q/100,C,z,B,G,H,!F,!1,null,W,null,O,V)}),!0,Editor.defaultIncludeDiagram,"png",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(q,C,z,B,G){d.downloadFile(C?"xmlpng":"png",null,null,q,null,null,z,B,G)}),!1,!0)}));d.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",
-mxUtils.bind(this,function(q,C,z,B,G,M,H,F,J,R,W,O,V){q=parseInt(q);!isNaN(q)&&0<q&&d.exportImage(q/100,!1,z,B,!1,H,!F,!1,"jpeg",W,null,O,V)}),!0,!1,"jpeg",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(q,C,z,B,G){d.downloadFile("jpeg",null,null,q,null,null,null,B,G)}),!0,!0)}));k=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var q=mxUtils.sortCells(t.model.getTopmostCells(t.getSelectionCells())),
+function(q,C,A,B,G,M,H,F,J,R,W,O,V,U,Y){J=parseInt(q);!isNaN(J)&&0<J&&(Y?d.downloadFile("remoteSvg",null,null,A,null,F,C,q,H,null,G):d.exportSvg(J/100,C,A,B,G,M,H,!F,!1,R,O,V,U))}),!0,null,"svg",!0)}));d.actions.put("exportPng",new Action(mxResources.get("formatPng")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",mxUtils.bind(this,function(q,C,A,B,G,M,H,F,J,R,W,O,V){q=parseInt(q);!isNaN(q)&&
+0<q&&d.exportImage(q/100,C,A,B,G,H,!F,!1,null,W,null,O,V)}),!0,Editor.defaultIncludeDiagram,"png",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(q,C,A,B,G){d.downloadFile(C?"xmlpng":"png",null,null,q,null,null,A,B,G)}),!1,!0)}));d.actions.put("exportJpg",new Action(mxResources.get("formatJpg")+"...",function(){d.isExportToCanvas()?d.showExportDialog(mxResources.get("image"),!1,mxResources.get("export"),"https://www.diagrams.net/doc/faq/export-diagram",
+mxUtils.bind(this,function(q,C,A,B,G,M,H,F,J,R,W,O,V){q=parseInt(q);!isNaN(q)&&0<q&&d.exportImage(q/100,!1,A,B,!1,H,!F,!1,"jpeg",W,null,O,V)}),!0,!1,"jpeg",!0):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||d.showRemoteExportDialog(mxResources.get("export"),null,mxUtils.bind(this,function(q,C,A,B,G){d.downloadFile("jpeg",null,null,q,null,null,null,B,G)}),!0,!0)}));k=d.actions.addAction("copyAsImage",mxUtils.bind(this,function(){var q=mxUtils.sortCells(t.model.getTopmostCells(t.getSelectionCells())),
C=mxUtils.getXml(0==q.length?d.editor.getGraphXml():t.encodeCells(q));d.copyImage(q,C)}));k.visible=Editor.enableNativeCipboard&&d.isExportToCanvas()&&!mxClient.IS_SF;k=d.actions.put("shadowVisible",new Action(mxResources.get("shadow"),function(){t.setShadowVisible(!t.shadowVisible)}));k.setToggleAction(!0);k.setSelectedCallback(function(){return t.shadowVisible});d.actions.put("about",new Action(mxResources.get("about")+" "+EditorUi.VERSION+"...",function(){d.isOffline()||mxClient.IS_CHROMEAPP||
EditorUi.isElectronApp?d.alert(d.editor.appName+" "+EditorUi.VERSION):d.openLink("https://www.diagrams.net/")}));d.actions.addAction("support...",function(){EditorUi.isElectronApp?d.openLink("https://github.com/jgraph/drawio-desktop/wiki/Getting-Support"):d.openLink("https://github.com/jgraph/drawio/wiki/Getting-Support")});d.actions.addAction("exportOptionsDisabled...",function(){d.handleError({message:mxResources.get("exportOptionsDisabledDetails")},mxResources.get("exportOptionsDisabled"))});d.actions.addAction("keyboardShortcuts...",
function(){!mxClient.IS_SVG||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?d.openLink("https://viewer.diagrams.net/#Uhttps%3A%2F%2Fviewer.diagrams.net%2Fshortcuts.svg"):d.openLink("shortcuts.svg")});d.actions.addAction("feedback...",function(){var q=new FeedbackDialog(d);d.showDialog(q.container,610,360,!0,!1);q.init()});d.actions.addAction("quickStart...",function(){d.openLink("https://www.youtube.com/watch?v=Z0D96ZikMkc")});k=d.actions.addAction("tags",mxUtils.bind(this,function(){null==this.tagsWindow?
(this.tagsWindow=new TagsWindow(d,document.body.offsetWidth-400,60,212,200),this.tagsWindow.window.addListener("show",mxUtils.bind(this,function(){d.fireEvent(new mxEventObject("tags"))})),this.tagsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("tags"))}),this.tagsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("tags"))):this.tagsWindow.window.setVisible(!this.tagsWindow.window.isVisible())}));k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return null!=
-this.tagsWindow&&this.tagsWindow.window.isVisible()}));k=d.actions.addAction("findReplace...",mxUtils.bind(this,function(q,C){var z=(q=t.isEnabled()&&(null==C||!mxEvent.isShiftDown(C)))?"findReplace":"find";C=z+"Window";if(null==this[C]){var B=q?"min"==uiTheme?330:300:240;this[C]=new FindWindow(d,document.body.offsetWidth-(B+20),100,B,q?"min"==uiTheme?304:288:170,q);this[C].window.addListener("show",function(){d.fireEvent(new mxEventObject(z))});this[C].window.addListener("hide",function(){d.fireEvent(new mxEventObject(z))});
+this.tagsWindow&&this.tagsWindow.window.isVisible()}));k=d.actions.addAction("findReplace...",mxUtils.bind(this,function(q,C){var A=(q=t.isEnabled()&&(null==C||!mxEvent.isShiftDown(C)))?"findReplace":"find";C=A+"Window";if(null==this[C]){var B=q?"min"==uiTheme?330:300:240;this[C]=new FindWindow(d,document.body.offsetWidth-(B+20),100,B,q?"min"==uiTheme?304:288:170,q);this[C].window.addListener("show",function(){d.fireEvent(new mxEventObject(A))});this[C].window.addListener("hide",function(){d.fireEvent(new mxEventObject(A))});
this[C].window.setVisible(!0)}else this[C].window.setVisible(!this[C].window.isVisible())}),null,null,Editor.ctrlKey+"+F");k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){var q=t.isEnabled()?"findReplaceWindow":"findWindow";return null!=this[q]&&this[q].window.isVisible()}));d.actions.put("exportVsdx",new Action(mxResources.get("formatVsdx")+" (beta)...",function(){var q=null==d.pages||1>=d.pages.length;if(q)d.exportVisio();else{var C=document.createElement("div");C.style.whiteSpace=
-"nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("formatVsdx"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";C.appendChild(z);var B=d.addCheckbox(C,mxResources.get("allPages"),!q,q);B.style.marginBottom="16px";q=new CustomDialog(d,C,mxUtils.bind(this,function(){d.exportVisio(!B.checked)}),null,mxResources.get("export"));d.showDialog(q.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",
+"nowrap";var A=document.createElement("h3");mxUtils.write(A,mxResources.get("formatVsdx"));A.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";C.appendChild(A);var B=d.addCheckbox(C,mxResources.get("allPages"),!q,q);B.style.marginBottom="16px";q=new CustomDialog(d,C,mxUtils.bind(this,function(){d.exportVisio(!B.checked)}),null,mxResources.get("export"));d.showDialog(q.container,300,130,!0,!0)}}));isLocalStorage&&null!=localStorage&&"1"!=urlParams.embed&&d.actions.addAction("configuration...",
function(){var q=document.createElement("input");q.setAttribute("type","checkbox");q.style.marginRight="4px";q.checked=mxSettings.getShowStartScreen();q.defaultChecked=q.checked;if(d.isSettingsEnabled()&&"1"==urlParams.sketch){var C=document.createElement("span");C.style["float"]="right";C.style.cursor="pointer";C.style.userSelect="none";C.style.marginTop="-4px";C.appendChild(q);mxUtils.write(C,mxResources.get("showStartScreen"));mxEvent.addListener(C,"click",function(G){mxEvent.getSource(G)!=q&&
-(q.checked=!q.checked)});header=C}var z=localStorage.getItem(Editor.configurationKey);C=[[mxResources.get("reset"),function(G,M){d.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(G)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired")))}catch(H){d.handleError(H)}})},"Shift+Click to Reset Settings"]];var B=d.actions.get("plugins");
+(q.checked=!q.checked)});header=C}var A=localStorage.getItem(Editor.configurationKey);C=[[mxResources.get("reset"),function(G,M){d.confirm(mxResources.get("areYouSure"),function(){try{mxEvent.isShiftDown(G)?(localStorage.removeItem(Editor.settingsKey),localStorage.removeItem(".drawio-config")):(localStorage.removeItem(Editor.configurationKey),d.hideDialog(),d.alert(mxResources.get("restartForChangeRequired")))}catch(H){d.handleError(H)}})},"Shift+Click to Reset Settings"]];var B=d.actions.get("plugins");
null!=B&&"1"==urlParams.sketch&&C.push([mxResources.get("plugins"),B.funct]);EditorUi.isElectronApp||C.push([mxResources.get("share"),function(G,M){if(0<M.value.length)try{var H=JSON.parse(M.value),F=window.location.protocol+"//"+window.location.host+"/"+d.getSearch()+"#_CONFIG_"+Graph.compress(JSON.stringify(H)),J=new EmbedDialog(d,F);d.showDialog(J.container,450,240,!0);J.init()}catch(R){d.handleError(R)}else d.handleError({message:mxResources.get("invalidInput")})}]);C=new TextareaDialog(d,mxResources.get("configuration")+
-":",null!=z?JSON.stringify(JSON.parse(z),null,2):"",function(G){if(null!=G)try{if(null!=q.parentNode&&(mxSettings.setShowStartScreen(q.checked),mxSettings.save()),G==z)d.hideDialog();else{if(0<G.length){var M=JSON.parse(G);localStorage.setItem(Editor.configurationKey,JSON.stringify(M))}else localStorage.removeItem(Editor.configurationKey);d.hideDialog();d.alert(mxResources.get("restartForChangeRequired"))}}catch(H){d.handleError(H)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",
-C,q.parentNode);d.showDialog(C.container,620,460,!0,!1);C.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(q,C){var z=mxUtils.bind(this,function(G){var M=""==G?mxResources.get("automatic"):mxLanguageMap[G],H=null;""!=M&&(H=q.addItem(M,null,mxUtils.bind(this,function(){mxSettings.setLanguage(G);mxSettings.save();mxClient.language=G;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);d.alert(mxResources.get("restartForChangeRequired"))}),
-C),(G==mxLanguage||""==G&&null==mxLanguage)&&q.addCheckmark(H,Editor.checkmarkImage));return H});z("");q.addSeparator(C);for(var B in mxLanguageMap)z(B)})));var v=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(q){var C=v.apply(this,arguments);if(null!=C&&"1"!=urlParams.noLangIcon){var z=this.get("language");if(null!=z){z=C.addMenu("",z.funct);z.setAttribute("title",mxResources.get("language"));z.style.width="16px";z.style.paddingTop="2px";z.style.paddingLeft="4px";z.style.zIndex=
-"1";z.style.position="absolute";z.style.display="block";z.style.cursor="pointer";z.style.right="17px";"atlas"==uiTheme?(z.style.top="6px",z.style.right="15px"):z.style.top="min"==uiTheme?"2px":"0px";var B=document.createElement("div");B.style.backgroundImage="url("+Editor.globeImage+")";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";B.style.backgroundSize="19px 19px";B.style.position="absolute";B.style.height="19px";B.style.width="19px";B.style.marginTop="2px";B.style.zIndex=
-"1";z.appendChild(B);mxUtils.setOpacity(z,40);"1"==urlParams.winCtrls&&(z.style.right="95px",z.style.width="19px",z.style.height="19px",z.style.webkitAppRegion="no-drag",B.style.webkitAppRegion="no-drag");if("atlas"==uiTheme||"dark"==uiTheme)z.style.opacity="0.85",z.style.filter="invert(100%)";document.body.appendChild(z);C.langIcon=z}}return C}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];
-d.actions.addAction("runLayout",function(){var q=new TextareaDialog(d,"Run Layouts:",JSON.stringify(d.customLayoutConfig,null,2),function(C){if(0<C.length)try{var z=JSON.parse(C);d.executeLayouts(t.createLayouts(z));d.customLayoutConfig=z;d.hideDialog()}catch(B){d.handleError(B)}},null,null,null,null,function(C,z){var B=mxUtils.button(mxResources.get("copy"),function(){try{var G=z.value;z.value=JSON.stringify(JSON.parse(G));z.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?z.select():
-document.execCommand("selectAll",!1,null);document.execCommand("copy");d.alert(mxResources.get("copiedToClipboard"));z.value=G}catch(M){d.handleError(M)}});B.setAttribute("title","copy");B.className="geBtn";C.appendChild(B)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");d.showDialog(q.container,620,460,!0,!0);q.init()});k=this.get("layout");var x=k.funct;k.funct=function(q,C){x.apply(this,arguments);q.addItem(mxResources.get("orgChart"),null,function(){var z=null,B=20,G=20,M=function(){if("undefined"!==
-typeof mxOrgChartLayout&&null!=z){var U=d.editor.graph,X=new mxOrgChartLayout(U,z,B,G),n=U.getDefaultParent();1<U.model.getChildCount(U.getSelectionCell())&&(n=U.getSelectionCell());X.execute(n)}},H=document.createElement("div"),F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("orgChartType")+": ");H.appendChild(F);var J=document.createElement("select");J.style.width="200px";J.style.boxSizing="border-box";
-F=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var R=0;R<F.length;R++){var W=document.createElement("option");mxUtils.write(W,F[R]);W.value=R;2==R&&W.setAttribute("selected","selected");J.appendChild(W)}mxEvent.addListener(J,"change",function(){z=J.value});H.appendChild(J);F=document.createElement("div");F.style.marginTop=
+":",null!=A?JSON.stringify(JSON.parse(A),null,2):"",function(G){if(null!=G)try{if(null!=q.parentNode&&(mxSettings.setShowStartScreen(q.checked),mxSettings.save()),G==A)d.hideDialog();else{if(0<G.length){var M=JSON.parse(G);localStorage.setItem(Editor.configurationKey,JSON.stringify(M))}else localStorage.removeItem(Editor.configurationKey);d.hideDialog();d.alert(mxResources.get("restartForChangeRequired"))}}catch(H){d.handleError(H)}},null,null,null,null,null,!0,null,null,"https://www.diagrams.net/doc/faq/configure-diagram-editor",
+C,q.parentNode);d.showDialog(C.container,620,460,!0,!1);C.init()});if(mxClient.IS_CHROMEAPP||isLocalStorage){this.put("language",new Menu(mxUtils.bind(this,function(q,C){var A=mxUtils.bind(this,function(G){var M=""==G?mxResources.get("automatic"):mxLanguageMap[G],H=null;""!=M&&(H=q.addItem(M,null,mxUtils.bind(this,function(){mxSettings.setLanguage(G);mxSettings.save();mxClient.language=G;mxResources.loadDefaultBundle=!1;mxResources.add(RESOURCE_BASE);d.alert(mxResources.get("restartForChangeRequired"))}),
+C),(G==mxLanguage||""==G&&null==mxLanguage)&&q.addCheckmark(H,Editor.checkmarkImage));return H});A("");q.addSeparator(C);for(var B in mxLanguageMap)A(B)})));var v=Menus.prototype.createMenubar;Menus.prototype.createMenubar=function(q){var C=v.apply(this,arguments);if(null!=C&&"1"!=urlParams.noLangIcon){var A=this.get("language");if(null!=A){A=C.addMenu("",A.funct);A.setAttribute("title",mxResources.get("language"));A.style.width="16px";A.style.paddingTop="2px";A.style.paddingLeft="4px";A.style.zIndex=
+"1";A.style.position="absolute";A.style.display="block";A.style.cursor="pointer";A.style.right="17px";"atlas"==uiTheme?(A.style.top="6px",A.style.right="15px"):A.style.top="min"==uiTheme?"2px":"0px";var B=document.createElement("div");B.style.backgroundImage="url("+Editor.globeImage+")";B.style.backgroundPosition="center center";B.style.backgroundRepeat="no-repeat";B.style.backgroundSize="19px 19px";B.style.position="absolute";B.style.height="19px";B.style.width="19px";B.style.marginTop="2px";B.style.zIndex=
+"1";A.appendChild(B);mxUtils.setOpacity(A,40);"1"==urlParams.winCtrls&&(A.style.right="95px",A.style.width="19px",A.style.height="19px",A.style.webkitAppRegion="no-drag",B.style.webkitAppRegion="no-drag");if("atlas"==uiTheme||"dark"==uiTheme)A.style.opacity="0.85",A.style.filter="invert(100%)";document.body.appendChild(A);C.langIcon=A}}return C}}d.customLayoutConfig=[{layout:"mxHierarchicalLayout",config:{orientation:"west",intraCellSpacing:30,interRankCellSpacing:100,interHierarchySpacing:60,parallelEdgeSpacing:10}}];
+d.actions.addAction("runLayout",function(){var q=new TextareaDialog(d,"Run Layouts:",JSON.stringify(d.customLayoutConfig,null,2),function(C){if(0<C.length)try{var A=JSON.parse(C);d.executeLayouts(t.createLayouts(A));d.customLayoutConfig=A;d.hideDialog()}catch(B){d.handleError(B)}},null,null,null,null,function(C,A){var B=mxUtils.button(mxResources.get("copy"),function(){try{var G=A.value;A.value=JSON.stringify(JSON.parse(G));A.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?A.select():
+document.execCommand("selectAll",!1,null);document.execCommand("copy");d.alert(mxResources.get("copiedToClipboard"));A.value=G}catch(M){d.handleError(M)}});B.setAttribute("title","copy");B.className="geBtn";C.appendChild(B)},!0,null,null,"https://www.diagrams.net/doc/faq/apply-layouts");d.showDialog(q.container,620,460,!0,!0);q.init()});k=this.get("layout");var x=k.funct;k.funct=function(q,C){x.apply(this,arguments);q.addItem(mxResources.get("orgChart"),null,function(){var A=null,B=20,G=20,M=function(){if("undefined"!==
+typeof mxOrgChartLayout&&null!=A){var U=d.editor.graph,Y=new mxOrgChartLayout(U,A,B,G),n=U.getDefaultParent();1<U.model.getChildCount(U.getSelectionCell())&&(n=U.getSelectionCell());Y.execute(n)}},H=document.createElement("div"),F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("orgChartType")+": ");H.appendChild(F);var J=document.createElement("select");J.style.width="200px";J.style.boxSizing="border-box";
+F=[mxResources.get("linear"),mxResources.get("hanger2"),mxResources.get("hanger4"),mxResources.get("fishbone1"),mxResources.get("fishbone2"),mxResources.get("1ColumnLeft"),mxResources.get("1ColumnRight"),mxResources.get("smart")];for(var R=0;R<F.length;R++){var W=document.createElement("option");mxUtils.write(W,F[R]);W.value=R;2==R&&W.setAttribute("selected","selected");J.appendChild(W)}mxEvent.addListener(J,"change",function(){A=J.value});H.appendChild(J);F=document.createElement("div");F.style.marginTop=
"6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("parentChildSpacing")+": ");H.appendChild(F);var O=document.createElement("input");O.type="number";O.value=B;O.style.width="200px";O.style.boxSizing="border-box";H.appendChild(O);mxEvent.addListener(O,"change",function(){B=O.value});F=document.createElement("div");F.style.marginTop="6px";F.style.display="inline-block";F.style.width="140px";mxUtils.write(F,mxResources.get("siblingSpacing")+": ");H.appendChild(F);
-var V=document.createElement("input");V.type="number";V.value=G;V.style.width="200px";V.style.boxSizing="border-box";H.appendChild(V);mxEvent.addListener(V,"change",function(){G=V.value});H=new CustomDialog(d,H,function(){null==z&&(z=2);d.loadOrgChartLayouts(M)});d.showDialog(H.container,355,140,!0,!0)},C,null,u());q.addSeparator(C);q.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var z=new mxParallelEdgeLayout(t);z.checkOverlap=!0;d.prompt(mxResources.get("spacing"),z.spacing,
-mxUtils.bind(this,function(B){z.spacing=B;d.executeLayout(function(){z.execute(t.getDefaultParent(),t.isSelectionEmpty()?null:t.getSelectionCells())},!1)}))}),C);q.addSeparator(C);d.menus.addMenuItem(q,"runLayout",C,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(q,C){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(q,["about"],C);else{var z=q.addItem("Search:",null,null,C,null,null,!1);z.style.backgroundColor=Editor.isDarkMode()?"#505759":
-"whiteSmoke";z.style.cursor="default";var B=document.createElement("input");B.setAttribute("type","text");B.setAttribute("size","25");B.style.marginLeft="8px";mxEvent.addListener(B,"keydown",mxUtils.bind(this,function(G){var M=mxUtils.trim(B.value);13==G.keyCode&&0<M.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(M)),B.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",
-label:M}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==G.keyCode&&(B.value="")}));z.firstChild.nextSibling.appendChild(B);mxEvent.addGestureListeners(B,function(G){document.activeElement!=B&&B.focus();mxEvent.consume(G)},function(G){mxEvent.consume(G)},function(G){mxEvent.consume(G)});window.setTimeout(function(){B.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.diagrams.net")}),d.actions.addAction("check4Updates",
+var V=document.createElement("input");V.type="number";V.value=G;V.style.width="200px";V.style.boxSizing="border-box";H.appendChild(V);mxEvent.addListener(V,"change",function(){G=V.value});H=new CustomDialog(d,H,function(){null==A&&(A=2);d.loadOrgChartLayouts(M)});d.showDialog(H.container,355,140,!0,!0)},C,null,u());q.addSeparator(C);q.addItem(mxResources.get("parallels"),null,mxUtils.bind(this,function(){var A=new mxParallelEdgeLayout(t);A.checkOverlap=!0;d.prompt(mxResources.get("spacing"),A.spacing,
+mxUtils.bind(this,function(B){A.spacing=B;d.executeLayout(function(){A.execute(t.getDefaultParent(),t.isSelectionEmpty()?null:t.getSelectionCells())},!1)}))}),C);q.addSeparator(C);d.menus.addMenuItem(q,"runLayout",C,null,null,mxResources.get("apply")+"...")};this.put("help",new Menu(mxUtils.bind(this,function(q,C){if(!mxClient.IS_CHROMEAPP&&d.isOffline())this.addMenuItems(q,["about"],C);else{var A=q.addItem("Search:",null,null,C,null,null,!1);A.style.backgroundColor=Editor.isDarkMode()?"#505759":
+"whiteSmoke";A.style.cursor="default";var B=document.createElement("input");B.setAttribute("type","text");B.setAttribute("size","25");B.style.marginLeft="8px";mxEvent.addListener(B,"keydown",mxUtils.bind(this,function(G){var M=mxUtils.trim(B.value);13==G.keyCode&&0<M.length?(this.editorUi.openLink("https://www.diagrams.net/search?src="+(EditorUi.isElectronApp?"DESKTOP":encodeURIComponent(location.host))+"&search="+encodeURIComponent(M)),B.value="",EditorUi.logEvent({category:"SEARCH-HELP",action:"search",
+label:M}),window.setTimeout(mxUtils.bind(this,function(){this.editorUi.hideCurrentMenu()}),0)):27==G.keyCode&&(B.value="")}));A.firstChild.nextSibling.appendChild(B);mxEvent.addGestureListeners(B,function(G){document.activeElement!=B&&B.focus();mxEvent.consume(G)},function(G){mxEvent.consume(G)},function(G){mxEvent.consume(G)});window.setTimeout(function(){B.focus()},0);EditorUi.isElectronApp?(d.actions.addAction("website...",function(){d.openLink("https://www.diagrams.net")}),d.actions.addAction("check4Updates",
function(){d.checkForUpdates()}),this.addMenuItems(q,"- keyboardShortcuts quickStart website support -".split(" "),C),"1"!=urlParams.disableUpdate&&this.addMenuItems(q,["check4Updates"],C),this.addMenuItems(q,["openDevTools","-","about"],C)):this.addMenuItems(q,"- keyboardShortcuts quickStart support - about".split(" "),C)}"1"==urlParams.test&&(q.addSeparator(C),this.addSubmenu("testDevelop",q,C))})));mxResources.parse("diagramLanguage=Diagram Language");d.actions.addAction("diagramLanguage...",function(){var q=
prompt("Language Code",Graph.diagramLanguage||"");null!=q&&(Graph.diagramLanguage=0<q.length?q:null,t.refresh())});if("1"==urlParams.test){mxResources.parse("testDevelop=Develop");mxResources.parse("showBoundingBox=Show bounding box");mxResources.parse("createSidebarEntry=Create Sidebar Entry");mxResources.parse("testCheckFile=Check File");mxResources.parse("testDiff=Diff/Sync");mxResources.parse("testInspectPages=Check Pages");mxResources.parse("testFixPages=Fix Pages");mxResources.parse("testInspect=Inspect");
mxResources.parse("testShowConsole=Show Console");mxResources.parse("testXmlImageExport=XML Image Export");mxResources.parse("testOptimize=Remove Inline Images");d.actions.addAction("createSidebarEntry",mxUtils.bind(this,function(){if(!t.isSelectionEmpty()){var q=t.cloneCells(t.getSelectionCells()),C=t.getBoundingBoxFromGeometry(q);q=t.moveCells(q,-C.x,-C.y);d.showTextDialog("Create Sidebar Entry","this.addDataEntry('tag1 tag2', "+C.width+", "+C.height+", 'The Title', '"+Graph.compress(mxUtils.getXml(t.encodeCells(q)))+
-"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var q=t.getGraphBounds(),C=t.view.translate,z=t.view.scale;t.insertVertex(t.getDefaultParent(),null,"",q.x/z-C.x,q.y/z-C.y,q.width/z,q.height/z,"fillColor=none;strokeColor=red;")}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var q=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";q=new TextareaDialog(d,"Paste Data:",q,function(C){if(0<C.length)try{var z=
-function(F){function J(S){if(null==I[S]){if(I[S]=!0,null!=O[S]){for(;0<O[S].length;){var Q=O[S].pop();J(Q)}delete O[S]}}else mxLog.debug(R+": Visited: "+S)}var R=F.parentNode.id,W=F.childNodes;F={};for(var O={},V=null,U={},X=0;X<W.length;X++){var n=W[X];if(null!=n.id&&0<n.id.length)if(null==F[n.id]){F[n.id]=n.id;var E=n.getAttribute("parent");null==E?null!=V?mxLog.debug(R+": Multiple roots: "+n.id):V=n.id:(null==O[E]&&(O[E]=[]),O[E].push(n.id))}else U[n.id]=n.id}W=Object.keys(U);0<W.length?(W=R+": "+
+"'),")}}));d.actions.addAction("showBoundingBox",mxUtils.bind(this,function(){var q=t.getGraphBounds(),C=t.view.translate,A=t.view.scale;t.insertVertex(t.getDefaultParent(),null,"",q.x/A-C.x,q.y/A-C.y,q.width/A,q.height/A,"fillColor=none;strokeColor=red;")}));d.actions.addAction("testCheckFile",mxUtils.bind(this,function(){var q=null!=d.pages&&null!=d.getCurrentFile()?d.getCurrentFile().getAnonymizedXmlForPages(d.pages):"";q=new TextareaDialog(d,"Paste Data:",q,function(C){if(0<C.length)try{var A=
+function(F){function J(S){if(null==I[S]){if(I[S]=!0,null!=O[S]){for(;0<O[S].length;){var Q=O[S].pop();J(Q)}delete O[S]}}else mxLog.debug(R+": Visited: "+S)}var R=F.parentNode.id,W=F.childNodes;F={};for(var O={},V=null,U={},Y=0;Y<W.length;Y++){var n=W[Y];if(null!=n.id&&0<n.id.length)if(null==F[n.id]){F[n.id]=n.id;var D=n.getAttribute("parent");null==D?null!=V?mxLog.debug(R+": Multiple roots: "+n.id):V=n.id:(null==O[D]&&(O[D]=[]),O[D].push(n.id))}else U[n.id]=n.id}W=Object.keys(U);0<W.length?(W=R+": "+
W.length+" Duplicates: "+W.join(", "),mxLog.debug(W+" (see console)")):mxLog.debug(R+": Checked");var I={};null==V?mxLog.debug(R+": No root"):(J(V),Object.keys(I).length!=Object.keys(F).length&&(mxLog.debug(R+": Invalid tree: (see console)"),console.log(R+": Invalid tree",O)))};"<"!=C.charAt(0)&&(C=Graph.decompress(C),mxLog.debug("See console for uncompressed XML"),console.log("xml",C));var B=mxUtils.parseXml(C),G=d.getPagesForNode(B.documentElement,"mxGraphModel");if(null!=G&&0<G.length)try{var M=
-d.getHashValueForPages(G);mxLog.debug("Checksum: ",M)}catch(F){mxLog.debug("Error: ",F.message)}else mxLog.debug("No pages found for checksum");var H=B.getElementsByTagName("root");for(C=0;C<H.length;C++)z(H[C]);mxLog.show()}catch(F){d.handleError(F),null!=window.console&&console.error(F)}});d.showDialog(q.container,620,460,!0,!0);q.init()}));var A=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var q=new TextareaDialog(d,"Diff/Sync:","",function(C){var z=d.getCurrentFile();
-if(0<C.length&&null!=z)try{var B=JSON.parse(C);z.patch([B],null,!0);d.hideDialog()}catch(G){d.handleError(G)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(C,z){A=d.getPagesForXml(d.getFileData(!0));q.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(A)}],["Diff",function(C,z){try{q.textarea.value=JSON.stringify(d.diffPages(A,d.pages),null,2)}catch(B){d.handleError(B)}}]]);null==A?(A=d.getPagesForXml(d.getFileData(!0)),q.textarea.value=
-"Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(A)):q.textarea.value=JSON.stringify(d.diffPages(A,d.pages),null,2);d.showDialog(q.container,620,460,!0,!0);q.init()}else d.alert("No pages")}));d.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var q=d.getCurrentFile();console.log("editorUi",d,"file",q);if(null!=q&&q.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(q.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(q.theirPages));
+d.getHashValueForPages(G);mxLog.debug("Checksum: ",M)}catch(F){mxLog.debug("Error: ",F.message)}else mxLog.debug("No pages found for checksum");var H=B.getElementsByTagName("root");for(C=0;C<H.length;C++)A(H[C]);mxLog.show()}catch(F){d.handleError(F),null!=window.console&&console.error(F)}});d.showDialog(q.container,620,460,!0,!0);q.init()}));var z=null;d.actions.addAction("testDiff",mxUtils.bind(this,function(){if(null!=d.pages){var q=new TextareaDialog(d,"Diff/Sync:","",function(C){var A=d.getCurrentFile();
+if(0<C.length&&null!=A)try{var B=JSON.parse(C);A.patch([B],null,!0);d.hideDialog()}catch(G){d.handleError(G)}},null,"Close",null,null,null,!0,null,"Patch",null,[["Snapshot",function(C,A){z=d.getPagesForXml(d.getFileData(!0));q.textarea.value="Snapshot updated "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(z)}],["Diff",function(C,A){try{q.textarea.value=JSON.stringify(d.diffPages(z,d.pages),null,2)}catch(B){d.handleError(B)}}]]);null==z?(z=d.getPagesForXml(d.getFileData(!0)),q.textarea.value=
+"Snapshot created "+(new Date).toLocaleString()+" Checksum "+d.getHashValueForPages(z)):q.textarea.value=JSON.stringify(d.diffPages(z,d.pages),null,2);d.showDialog(q.container,620,460,!0,!0);q.init()}else d.alert("No pages")}));d.actions.addAction("testInspectPages",mxUtils.bind(this,function(){var q=d.getCurrentFile();console.log("editorUi",d,"file",q);if(null!=q&&q.isRealtime()){console.log("Checksum ownPages",d.getHashValueForPages(q.ownPages));console.log("Checksum theirPages",d.getHashValueForPages(q.theirPages));
console.log("diff ownPages/theirPages",d.diffPages(q.ownPages,q.theirPages));var C=q.getShadowPages();null!=C&&(console.log("Checksum shadowPages",d.getHashValueForPages(C)),console.log("diff shadowPages/ownPages",d.diffPages(C,q.ownPages)),console.log("diff ownPages/shadowPages",d.diffPages(q.ownPages,C)),console.log("diff theirPages/shadowPages",d.diffPages(q.theirPages,C)));null!=q.sync&&null!=q.sync.snapshot&&(console.log("Checksum snapshot",d.getHashValueForPages(q.sync.snapshot)),console.log("diff ownPages/snapshot",
d.diffPages(q.ownPages,q.sync.snapshot)),console.log("diff theirPages/snapshot",d.diffPages(q.theirPages,q.sync.snapshot)),null!=d.pages&&console.log("diff snapshot/actualPages",d.diffPages(q.sync.snapshot,d.pages)));null!=d.pages&&(console.log("diff ownPages/actualPages",d.diffPages(q.ownPages,d.pages)),console.log("diff theirPages/actualPages",d.diffPages(q.theirPages,d.pages)))}null!=q&&console.log("Shadow pages",[d.getXmlForPages(q.getShadowPages())]);null!=d.pages&&console.log("Checksum actualPages",
d.getHashValueForPages(d.pages))}));d.actions.addAction("testFixPages",mxUtils.bind(this,function(){console.log("editorUi",d);var q=d.getCurrentFile();null!=q&&q.isRealtime()&&null!=q.shadowPages&&(console.log("patching actualPages to shadowPages",q.patch([d.diffPages(q.shadowPages,d.pages)])),q.ownPages=d.clonePages(d.pages),q.theirPages=d.clonePages(d.pages),q.shadowPages=d.clonePages(d.pages),null!=q.sync&&(q.sync.snapshot=d.clonePages(d.pages)))}));d.actions.addAction("testOptimize",mxUtils.bind(this,
-function(){t.model.beginUpdate();try{var q=t.model.cells,C=0,z=[],B=[],G;for(G in q){var M=q[G],H=t.getCurrentCellStyle(M)[mxConstants.STYLE_IMAGE];null!=H&&"data:"==H.substring(0,5)&&(null==z[H]&&(z[H]=(z[H]||0)+1,C++),B.push(M))}t.setCellStyles(mxConstants.STYLE_IMAGE,null,B);console.log("Removed",C,"image(s) from",B.length,"cell(s): ",[B,z])}finally{t.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,t.getModel())}));d.actions.addAction("testXmlImageExport",
-mxUtils.bind(this,function(){var q=new mxImageExport,C=t.getGraphBounds(),z=t.view.scale,B=mxUtils.createXmlDocument(),G=B.createElement("output");B.appendChild(G);B=new mxXmlCanvas2D(G);B.translate(Math.floor((1-C.x)/z),Math.floor((1-C.y)/z));B.scale(1/z);var M=0,H=B.save;B.save=function(){M++;H.apply(this,arguments)};var F=B.restore;B.restore=function(){M--;F.apply(this,arguments)};var J=q.drawShape;q.drawShape=function(R){mxLog.debug("entering shape",R,M);J.apply(this,arguments);mxLog.debug("leaving shape",
+function(){t.model.beginUpdate();try{var q=t.model.cells,C=0,A=[],B=[],G;for(G in q){var M=q[G],H=t.getCurrentCellStyle(M)[mxConstants.STYLE_IMAGE];null!=H&&"data:"==H.substring(0,5)&&(null==A[H]&&(A[H]=(A[H]||0)+1,C++),B.push(M))}t.setCellStyles(mxConstants.STYLE_IMAGE,null,B);console.log("Removed",C,"image(s) from",B.length,"cell(s): ",[B,A])}finally{t.model.endUpdate()}}));d.actions.addAction("testInspect",mxUtils.bind(this,function(){console.log(d,t.getModel())}));d.actions.addAction("testXmlImageExport",
+mxUtils.bind(this,function(){var q=new mxImageExport,C=t.getGraphBounds(),A=t.view.scale,B=mxUtils.createXmlDocument(),G=B.createElement("output");B.appendChild(G);B=new mxXmlCanvas2D(G);B.translate(Math.floor((1-C.x)/A),Math.floor((1-C.y)/A));B.scale(1/A);var M=0,H=B.save;B.save=function(){M++;H.apply(this,arguments)};var F=B.restore;B.restore=function(){M--;F.apply(this,arguments)};var J=q.drawShape;q.drawShape=function(R){mxLog.debug("entering shape",R,M);J.apply(this,arguments);mxLog.debug("leaving shape",
R,M)};q.drawState(t.getView().getState(t.model.root),B);mxLog.show();mxLog.debug(mxUtils.getXml(G));mxLog.debug("stateCounter",M)}));d.actions.addAction("testShowConsole",function(){mxLog.isVisible()?mxLog.window.fit():mxLog.show();mxLog.window.div.style.zIndex=mxPopupMenu.prototype.zIndex-2});this.put("testDevelop",new Menu(mxUtils.bind(this,function(q,C){this.addMenuItems(q,"createSidebarEntry showBoundingBox - testInspectPages testFixPages - testCheckFile testDiff - testInspect testOptimize - testXmlImageExport - testShowConsole".split(" "),
C)})))}d.actions.addAction("shapes...",function(){mxClient.IS_CHROMEAPP||!d.isOffline()?d.showDialog((new MoreShapesDialog(d,!0)).container,640,isLocalStorage?mxClient.IS_IOS?480:460:440,!0,!0):d.showDialog((new MoreShapesDialog(d,!1)).container,360,isLocalStorage?mxClient.IS_IOS?300:280:260,!0,!0)});d.actions.put("createShape",new Action(mxResources.get("shape")+"...",function(q){t.isEnabled()&&(q=new mxCell("",new mxGeometry(0,0,120,120),d.defaultCustomShapeStyle),q.vertex=!0,q=new EditShapeDialog(d,
-q,mxResources.get("editShape")+":",630,400),d.showDialog(q.container,640,480,!0,!1),q.init())})).isEnabled=u;d.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(q){d.spinner.stop();d.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",q,function(C,z,B,G,M,H,F,J,R,W,O){d.createHtml(C,z,B,G,M,H,F,J,R,W,O,mxUtils.bind(this,function(V,
-U){var X=new EmbedDialog(d,V+"\n"+U,null,null,function(){var n=window.open(),E=n.document;if(null!=E){"CSS1Compat"===document.compatMode&&E.writeln("<!DOCTYPE html>");E.writeln("<html>");E.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');E.writeln("<body>");E.writeln(V);var I=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;I&&E.writeln(U);E.writeln("</body>");E.writeln("</html>");E.close();if(!I){var S=n.document.createElement("div");
-S.marginLeft="26px";S.marginTop="26px";mxUtils.write(S,mxResources.get("updatingDocument"));I=n.document.createElement("img");I.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");I.style.marginLeft="6px";S.appendChild(I);n.document.body.insertBefore(S,n.document.body.firstChild);window.setTimeout(function(){var Q=document.createElement("script");Q.type="text/javascript";Q.src=/<script.*?src="(.*?)"/.exec(U)[1];E.body.appendChild(Q);S.parentNode.removeChild(S)},
-20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});d.showDialog(X.container,450,240,!0,!0);X.init()}))})})}));d.actions.put("liveImage",new Action("Live image...",function(){var q=d.getCurrentFile();null!=q&&d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(C){d.spinner.stop();null!=C?(C=new EmbedDialog(d,'<img src="'+(q.constructor!=DriveFile?C:"https://drive.google.com/uc?id="+q.getId())+'"/>'),d.showDialog(C.container,
-450,240,!0,!0),C.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(q,C,z,B,G,M){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(q,C,z,B,G,M,function(H){d.spinner.stop();H=new EmbedDialog(d,H);d.showDialog(H.container,450,240,!0,!0);H.init()},function(H){d.spinner.stop();d.handleError(H)})},mxResources.get("image"),mxResources.get("retina"),
-d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showEmbedImageDialog(function(q,C,z,B,G,M){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(q,C,z,B,G,M,function(H){d.spinner.stop();H=new EmbedDialog(d,H);d.showDialog(H.container,450,240,!0,!0);H.init()},function(H){d.spinner.stop();d.handleError(H)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));
-d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var q=t.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(q.height/t.view.scale)+2,function(C,z,B,G,M,H,F,J,R){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(W){d.spinner.stop();var O=[];R&&O.push("tags=%7B%7D");W=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+F+";height:"+J+';" src="'+d.createLink(C,z,B,G,M,H,W,null,
+q,mxResources.get("editShape")+":",630,400),d.showDialog(q.container,640,480,!0,!1),q.init())})).isEnabled=u;d.actions.put("embedHtml",new Action(mxResources.get("html")+"...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(q){d.spinner.stop();d.showHtmlDialog(mxResources.get("create"),"https://www.diagrams.net/doc/faq/embed-html-options",q,function(C,A,B,G,M,H,F,J,R,W,O){d.createHtml(C,A,B,G,M,H,F,J,R,W,O,mxUtils.bind(this,function(V,
+U){var Y=new EmbedDialog(d,V+"\n"+U,null,null,function(){var n=window.open(),D=n.document;if(null!=D){"CSS1Compat"===document.compatMode&&D.writeln("<!DOCTYPE html>");D.writeln("<html>");D.writeln("<head><title>"+encodeURIComponent(mxResources.get("preview"))+'</title><meta charset="utf-8"></head>');D.writeln("<body>");D.writeln(V);var I=mxClient.IS_IE||mxClient.IS_EDGE||null!=document.documentMode;I&&D.writeln(U);D.writeln("</body>");D.writeln("</html>");D.close();if(!I){var S=n.document.createElement("div");
+S.marginLeft="26px";S.marginTop="26px";mxUtils.write(S,mxResources.get("updatingDocument"));I=n.document.createElement("img");I.setAttribute("src",window.location.protocol+"//"+window.location.hostname+"/"+IMAGE_PATH+"/spin.gif");I.style.marginLeft="6px";S.appendChild(I);n.document.body.insertBefore(S,n.document.body.firstChild);window.setTimeout(function(){var Q=document.createElement("script");Q.type="text/javascript";Q.src=/<script.*?src="(.*?)"/.exec(U)[1];D.body.appendChild(Q);S.parentNode.removeChild(S)},
+20)}}else d.handleError({message:mxResources.get("errorUpdatingPreview")})});d.showDialog(Y.container,450,240,!0,!0);Y.init()}))})})}));d.actions.put("liveImage",new Action("Live image...",function(){var q=d.getCurrentFile();null!=q&&d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(C){d.spinner.stop();null!=C?(C=new EmbedDialog(d,'<img src="'+(q.constructor!=DriveFile?C:"https://drive.google.com/uc?id="+q.getId())+'"/>'),d.showDialog(C.container,
+450,240,!0,!0),C.init()):d.handleError({message:mxResources.get("invalidPublicUrl")})})}));d.actions.put("embedImage",new Action(mxResources.get("image")+"...",function(){d.showEmbedImageDialog(function(q,C,A,B,G,M){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedImage(q,C,A,B,G,M,function(H){d.spinner.stop();H=new EmbedDialog(d,H);d.showDialog(H.container,450,240,!0,!0);H.init()},function(H){d.spinner.stop();d.handleError(H)})},mxResources.get("image"),mxResources.get("retina"),
+d.isExportToCanvas())}));d.actions.put("embedSvg",new Action(mxResources.get("formatSvg")+"...",function(){d.showEmbedImageDialog(function(q,C,A,B,G,M){d.spinner.spin(document.body,mxResources.get("loading"))&&d.createEmbedSvg(q,C,A,B,G,M,function(H){d.spinner.stop();H=new EmbedDialog(d,H);d.showDialog(H.container,450,240,!0,!0);H.init()},function(H){d.spinner.stop();d.handleError(H)})},mxResources.get("formatSvg"),mxResources.get("image"),!0,"https://www.diagrams.net/doc/faq/embed-svg.html")}));
+d.actions.put("embedIframe",new Action(mxResources.get("iframe")+"...",function(){var q=t.getGraphBounds();d.showPublishLinkDialog(mxResources.get("iframe"),null,"100%",Math.ceil(q.height/t.view.scale)+2,function(C,A,B,G,M,H,F,J,R){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(W){d.spinner.stop();var O=[];R&&O.push("tags=%7B%7D");W=new EmbedDialog(d,'<iframe frameborder="0" style="width:'+F+";height:"+J+';" src="'+d.createLink(C,A,B,G,M,H,W,null,
O)+'"></iframe>');d.showDialog(W.container,450,240,!0,!0);W.init()})},!0)}));d.actions.put("embedNotion",new Action(mxResources.get("notion")+"...",function(){var q=document.createElement("div");q.style.position="absolute";q.style.bottom="30px";q.style.textAlign="center";q.style.width="100%";q.style.left="0px";var C=document.createElement("a");C.setAttribute("href","javascript:void(0);");C.setAttribute("target","_blank");C.style.cursor="pointer";mxUtils.write(C,mxResources.get("getNotionChromeExtension"));
-q.appendChild(C);mxEvent.addListener(C,"click",function(z){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(z)});d.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(z,B,G,M,H,F,J,R,W){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(O){d.spinner.stop();var V=["border=0"];W&&V.push("tags=%7B%7D");O=new EmbedDialog(d,d.createLink(z,B,G,M,H,F,O,null,V,!0));
-d.showDialog(O.container,450,240,!0,!0);O.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",q)}));d.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){d.showPublishLinkDialog(null,null,null,null,function(q,C,z,B,G,M,H,F,J){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(R){d.spinner.stop();var W=[];J&&W.push("tags=%7B%7D");R=new EmbedDialog(d,d.createLink(q,C,z,B,G,M,R,null,W));d.showDialog(R.container,450,240,
+q.appendChild(C);mxEvent.addListener(C,"click",function(A){d.openLink("https://chrome.google.com/webstore/detail/drawio-for-notion/plhaalebpkihaccllnkdaokdoeaokmle");mxEvent.consume(A)});d.showPublishLinkDialog(mxResources.get("notion"),null,null,null,function(A,B,G,M,H,F,J,R,W){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(O){d.spinner.stop();var V=["border=0"];W&&V.push("tags=%7B%7D");O=new EmbedDialog(d,d.createLink(A,B,G,M,H,F,O,null,V,!0));
+d.showDialog(O.container,450,240,!0,!0);O.init()})},!0,"https://www.diagrams.net/blog/drawio-notion",q)}));d.actions.put("publishLink",new Action(mxResources.get("link")+"...",function(){d.showPublishLinkDialog(null,null,null,null,function(q,C,A,B,G,M,H,F,J){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),function(R){d.spinner.stop();var W=[];J&&W.push("tags=%7B%7D");R=new EmbedDialog(d,d.createLink(q,C,A,B,G,M,R,null,W));d.showDialog(R.container,450,240,
!0,!0);R.init()})})}));d.actions.addAction("microsoftOffice...",function(){d.openLink("https://office.draw.io")});d.actions.addAction("googleDocs...",function(){d.openLink("http://docsaddon.draw.io")});d.actions.addAction("googleSlides...",function(){d.openLink("https://slidesaddon.draw.io")});d.actions.addAction("googleSheets...",function(){d.openLink("https://sheetsaddon.draw.io")});d.actions.addAction("googleSites...",function(){d.spinner.spin(document.body,mxResources.get("loading"))&&d.getPublicUrl(d.getCurrentFile(),
function(q){d.spinner.stop();q=new GoogleSitesDialog(d,q);d.showDialog(q.container,420,256,!0,!0);q.init()})});if(isLocalStorage||mxClient.IS_CHROMEAPP)k=d.actions.addAction("scratchpad",function(){d.toggleScratchpad()}),k.setToggleAction(!0),k.setSelectedCallback(function(){return null!=d.scratchpad}),"0"!=urlParams.plugins&&d.actions.addAction("plugins...",function(){d.showDialog((new PluginsDialog(d)).container,380,240,!0,!1)});k=d.actions.addAction("search",function(){var q=d.sidebar.isEntryVisible("search");
-d.sidebar.showPalette("search",!q);isLocalStorage&&(mxSettings.settings.search=!q,mxSettings.save())});k.label=mxResources.get("searchShapes");k.setToggleAction(!0);k.setSelectedCallback(function(){return d.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(d.actions.get("save").funct=function(q){t.isEditing()&&t.stopEditing();var C="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var z=d.createLoadMessage("save");
-z.xml=C;q&&(z.exit=!0);C=JSON.stringify(z)}(window.opener||window.parent).postMessage(C,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));q=d.getCurrentFile();null==q||q.constructor==EmbedFile||q.constructor==LocalFile&&null==q.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),
+d.sidebar.showPalette("search",!q);isLocalStorage&&(mxSettings.settings.search=!q,mxSettings.save())});k.label=mxResources.get("searchShapes");k.setToggleAction(!0);k.setSelectedCallback(function(){return d.sidebar.isEntryVisible("search")});"1"==urlParams.embed&&(d.actions.get("save").funct=function(q){t.isEditing()&&t.stopEditing();var C="0"!=urlParams.pages||null!=d.pages&&1<d.pages.length?d.getFileData(!0):mxUtils.getXml(d.editor.getGraphXml());if("json"==urlParams.proto){var A=d.createLoadMessage("save");
+A.xml=C;q&&(A.exit=!0);C=JSON.stringify(A)}(window.opener||window.parent).postMessage(C,"*");"0"!=urlParams.modified&&"1"!=urlParams.keepmodified&&(d.editor.modified=!1,d.editor.setStatus(""));q=d.getCurrentFile();null==q||q.constructor==EmbedFile||q.constructor==LocalFile&&null==q.mode||d.saveFile()},d.actions.addAction("saveAndExit",function(){"1"==urlParams.toSvg?d.sendEmbeddedSvgExport():d.actions.get("save").funct(!0)}).label="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit"),
d.actions.addAction("exit",function(){if("1"==urlParams.embedInline)d.sendEmbeddedSvgExport();else{var q=function(){d.editor.modified=!1;var C="json"==urlParams.proto?JSON.stringify({event:"exit",modified:d.editor.modified}):"";(window.opener||window.parent).postMessage(C,"*")};d.editor.modified?d.confirm(mxResources.get("allChangesLost"),null,q,mxResources.get("cancel"),mxResources.get("discardChanges")):q()}}));this.put("exportAs",new Menu(mxUtils.bind(this,function(q,C){d.isExportToCanvas()?(this.addMenuItems(q,
["exportPng"],C),d.jpgSupported&&this.addMenuItems(q,["exportJpg"],C)):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPng","exportJpg"],C);this.addMenuItems(q,["exportSvg","-"],C);d.isOffline()||d.printPdfExport?this.addMenuItems(q,["exportPdf"],C):d.isOffline()||mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["exportPdf"],C);mxClient.IS_IE||"undefined"===typeof VsdxExport&&d.isOffline()||this.addMenuItems(q,["exportVsdx"],C);this.addMenuItems(q,["-",
-"exportHtml","exportXml","exportUrl"],C);d.isOffline()||(q.addSeparator(C),this.addMenuItem(q,"export",C).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(q,C){function z(M){M.pickFile(function(H){d.spinner.spin(document.body,mxResources.get("loading"))&&M.getFile(H,function(F){var J="data:image/"==F.getData().substring(0,11)?G(F.getTitle()):"text/xml";/\.svg$/i.test(F.getTitle())&&!d.editor.isDataSvg(F.getData())&&(F.setData(Editor.createSvgDataUri(F.getData())),
-J="image/svg+xml");B(F.getData(),J,F.getTitle())},function(F){d.handleError(F,null!=F?mxResources.get("errorLoadingFile"):null)},M==d.drive)},!0)}var B=mxUtils.bind(this,function(M,H,F){var J=t.view,R=t.getGraphBounds(),W=t.snap(Math.ceil(Math.max(0,R.x/J.scale-J.translate.x)+4*t.gridSize)),O=t.snap(Math.ceil(Math.max(0,(R.y+R.height)/J.scale-J.translate.y)+4*t.gridSize));"data:image/"==M.substring(0,11)?d.loadImage(M,mxUtils.bind(this,function(V){var U=!0,X=mxUtils.bind(this,function(){d.resizeImage(V,
-M,mxUtils.bind(this,function(n,E,I){n=U?Math.min(1,Math.min(d.maxImageSize/E,d.maxImageSize/I)):1;d.importFile(M,H,W,O,Math.round(E*n),Math.round(I*n),F,function(S){d.spinner.stop();t.setSelectionCells(S);t.scrollCellToVisible(t.getSelectionCell())})}),U)});M.length>d.resampleThreshold?d.confirmImageResize(function(n){U=n;X()}):X()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(M,H,W,O,0,0,F,function(V){d.spinner.stop();t.setSelectionCells(V);
-t.scrollCellToVisible(t.getSelectionCell())})}),G=mxUtils.bind(this,function(M){var H="text/xml";/\.png$/i.test(M)?H="image/png":/\.jpe?g$/i.test(M)?H="image/jpg":/\.gif$/i.test(M)?H="image/gif":/\.pdf$/i.test(M)&&(H="application/pdf");return H});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){z(d.drive)},C):D&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
-"...)",null,function(){},C,null,!1));null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){z(d.oneDrive)},C):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},C,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+"...",null,function(){z(d.dropbox)},C):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,
-function(){},C,null,!1);q.addSeparator(C);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){z(d.gitHub)},C);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){z(d.gitLab)},C);null!=d.trello?q.addItem(mxResources.get("trello")+"...",null,function(){z(d.trello)},C):g&&"function"===typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},C,null,!1);q.addSeparator(C);isLocalStorage&&"0"!=urlParams.browser&&
+"exportHtml","exportXml","exportUrl"],C);d.isOffline()||(q.addSeparator(C),this.addMenuItem(q,"export",C).firstChild.nextSibling.innerHTML=mxResources.get("advanced")+"...")})));this.put("importFrom",new Menu(mxUtils.bind(this,function(q,C){function A(M){M.pickFile(function(H){d.spinner.spin(document.body,mxResources.get("loading"))&&M.getFile(H,function(F){var J="data:image/"==F.getData().substring(0,11)?G(F.getTitle()):"text/xml";/\.svg$/i.test(F.getTitle())&&!d.editor.isDataSvg(F.getData())&&(F.setData(Editor.createSvgDataUri(F.getData())),
+J="image/svg+xml");B(F.getData(),J,F.getTitle())},function(F){d.handleError(F,null!=F?mxResources.get("errorLoadingFile"):null)},M==d.drive)},!0)}var B=mxUtils.bind(this,function(M,H,F){var J=t.view,R=t.getGraphBounds(),W=t.snap(Math.ceil(Math.max(0,R.x/J.scale-J.translate.x)+4*t.gridSize)),O=t.snap(Math.ceil(Math.max(0,(R.y+R.height)/J.scale-J.translate.y)+4*t.gridSize));"data:image/"==M.substring(0,11)?d.loadImage(M,mxUtils.bind(this,function(V){var U=!0,Y=mxUtils.bind(this,function(){d.resizeImage(V,
+M,mxUtils.bind(this,function(n,D,I){n=U?Math.min(1,Math.min(d.maxImageSize/D,d.maxImageSize/I)):1;d.importFile(M,H,W,O,Math.round(D*n),Math.round(I*n),F,function(S){d.spinner.stop();t.setSelectionCells(S);t.scrollCellToVisible(t.getSelectionCell())})}),U)});M.length>d.resampleThreshold?d.confirmImageResize(function(n){U=n;Y()}):Y()}),mxUtils.bind(this,function(){d.handleError({message:mxResources.get("cannotOpenFile")})})):d.importFile(M,H,W,O,0,0,F,function(V){d.spinner.stop();t.setSelectionCells(V);
+t.scrollCellToVisible(t.getSelectionCell())})}),G=mxUtils.bind(this,function(M){var H="text/xml";/\.png$/i.test(M)?H="image/png":/\.jpe?g$/i.test(M)?H="image/jpg":/\.gif$/i.test(M)?H="image/gif":/\.pdf$/i.test(M)&&(H="application/pdf");return H});"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){A(d.drive)},C):E&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+
+"...)",null,function(){},C,null,!1));null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){A(d.oneDrive)},C):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},C,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+"...",null,function(){A(d.dropbox)},C):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,
+function(){},C,null,!1);q.addSeparator(C);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){A(d.gitHub)},C);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){A(d.gitLab)},C);null!=d.trello?q.addItem(mxResources.get("trello")+"...",null,function(){A(d.trello)},C):g&&"function"===typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},C,null,!1);q.addSeparator(C);isLocalStorage&&"0"!=urlParams.browser&&
q.addItem(mxResources.get("browser")+"...",null,function(){d.importLocalFile(!1)},C);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.importLocalFile(!0)},C);d.isOffline()||(q.addSeparator(C),q.addItem(mxResources.get("url")+"...",null,function(){var M=new FilenameDialog(d,"",mxResources.get("import"),function(H){if(null!=H&&0<H.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var F=/(\.png)($|\?)/i.test(H)?"image/png":"text/xml";d.editor.loadUrl(PROXY_URL+
-"?url="+encodeURIComponent(H),function(J){B(J,F,H)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==F)}},mxResources.get("url"));d.showDialog(M.container,300,80,!0,!0);M.init()},C))}))).isEnabled=u;this.put("theme",new Menu(mxUtils.bind(this,function(q,C){var z="1"==urlParams.sketch?"sketch":mxSettings.getUi(),B=q.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");d.alert(mxResources.get("restartForChangeRequired"))},C);"kennedy"!=
-z&&"atlas"!=z&&"dark"!=z&&"min"!=z&&"sketch"!=z&&q.addCheckmark(B,Editor.checkmarkImage);q.addSeparator(C);B=q.addItem(mxResources.get("default"),null,function(){mxSettings.setUi("kennedy");d.alert(mxResources.get("restartForChangeRequired"))},C);"kennedy"==z&&q.addCheckmark(B,Editor.checkmarkImage);B=q.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");d.alert(mxResources.get("restartForChangeRequired"))},C);"min"==z&&q.addCheckmark(B,Editor.checkmarkImage);B=q.addItem(mxResources.get("atlas"),
-null,function(){mxSettings.setUi("atlas");d.alert(mxResources.get("restartForChangeRequired"))},C);"atlas"==z&&q.addCheckmark(B,Editor.checkmarkImage);if("dark"==z||!mxClient.IS_IE&&!mxClient.IS_IE11)B=q.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");d.alert(mxResources.get("restartForChangeRequired"))},C),"dark"==z&&q.addCheckmark(B,Editor.checkmarkImage);q.addSeparator(C);B=q.addItem(mxResources.get("sketch"),null,function(){mxSettings.setUi("sketch");d.alert(mxResources.get("restartForChangeRequired"))},
-C);"sketch"==z&&q.addCheckmark(B,Editor.checkmarkImage)})));k=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var q=this.editorUi.getCurrentFile();if(null!=q)if(q.constructor==LocalFile&&null!=q.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(z,B){q.invalidFileHandle=null;q.fileHandle=z;q.title=B.name;q.desc=B;d.save(B.name)}),null,d.createFileSystemOptions(q.getTitle()));else{var C=null!=q.getTitle()?q.getTitle():this.editorUi.defaultFilename;C=new FilenameDialog(this.editorUi,
-C,mxResources.get("rename"),mxUtils.bind(this,function(z){null!=z&&0<z.length&&null!=q&&z!=q.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&q.rename(z,mxUtils.bind(this,function(B){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(B){this.editorUi.handleError(B,null!=B?mxResources.get("errorRenamingFile"):null)}))}),q.constructor==DriveFile||q.constructor==StorageFile?mxResources.get("diagramName"):null,function(z){if(null!=z&&0<z.length)return!0;d.showError(mxResources.get("error"),
-mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,d.editor.fileExtensions);this.editorUi.showDialog(C.container,340,96,!0,!0);C.init()}}));k.isEnabled=function(){return this.enabled&&u.apply(this,arguments)};k.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var q=d.getCurrentFile();if(null!=q){var C=d.getCopyFilename(q);q.constructor==DriveFile?(C=new CreateDialog(d,C,mxUtils.bind(this,function(z,B){"_blank"==B?d.editor.editAsNew(d.getFileData(),
-z):("download"==B&&(B=App.MODE_GOOGLE),null!=z&&0<z.length&&(B==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&q.saveAs(z,mxUtils.bind(this,function(G){q.desc=G;q.save(!1,mxUtils.bind(this,function(){d.spinner.stop();q.setModified(!1);q.addAllSavedStatus()}),mxUtils.bind(this,function(M){d.handleError(M)}))}),mxUtils.bind(this,function(G){d.handleError(G)})):d.createFile(z,d.getFileData(!0),null,B)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),
-mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(C.container,420,380,!0,!0),C.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),C)}}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var q=d.getCurrentFile();if(q.getMode()==App.MODE_GOOGLE||q.getMode()==App.MODE_ONEDRIVE){var C=!1;if(q.getMode()==App.MODE_GOOGLE&&null!=q.desc.parents)for(var z=0;z<q.desc.parents.length;z++)if(q.desc.parents[z].isRoot){C=!0;break}d.pickFolder(q.getMode(),
+"?url="+encodeURIComponent(H),function(J){B(J,F,H)},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))},"image/png"==F)}},mxResources.get("url"));d.showDialog(M.container,300,80,!0,!0);M.init()},C))}))).isEnabled=u;this.put("theme",new Menu(mxUtils.bind(this,function(q,C){var A="1"==urlParams.sketch?"sketch":mxSettings.getUi(),B=q.addItem(mxResources.get("automatic"),null,function(){mxSettings.setUi("");d.alert(mxResources.get("restartForChangeRequired"))},C);"kennedy"!=
+A&&"atlas"!=A&&"dark"!=A&&"min"!=A&&"sketch"!=A&&q.addCheckmark(B,Editor.checkmarkImage);q.addSeparator(C);B=q.addItem(mxResources.get("default"),null,function(){mxSettings.setUi("kennedy");d.alert(mxResources.get("restartForChangeRequired"))},C);"kennedy"==A&&q.addCheckmark(B,Editor.checkmarkImage);B=q.addItem(mxResources.get("minimal"),null,function(){mxSettings.setUi("min");d.alert(mxResources.get("restartForChangeRequired"))},C);"min"==A&&q.addCheckmark(B,Editor.checkmarkImage);B=q.addItem(mxResources.get("atlas"),
+null,function(){mxSettings.setUi("atlas");d.alert(mxResources.get("restartForChangeRequired"))},C);"atlas"==A&&q.addCheckmark(B,Editor.checkmarkImage);if("dark"==A||!mxClient.IS_IE&&!mxClient.IS_IE11)B=q.addItem(mxResources.get("dark"),null,function(){mxSettings.setUi("dark");d.alert(mxResources.get("restartForChangeRequired"))},C),"dark"==A&&q.addCheckmark(B,Editor.checkmarkImage);q.addSeparator(C);B=q.addItem(mxResources.get("sketch"),null,function(){mxSettings.setUi("sketch");d.alert(mxResources.get("restartForChangeRequired"))},
+C);"sketch"==A&&q.addCheckmark(B,Editor.checkmarkImage)})));k=this.editorUi.actions.addAction("rename...",mxUtils.bind(this,function(){var q=this.editorUi.getCurrentFile();if(null!=q)if(q.constructor==LocalFile&&null!=q.fileHandle)d.showSaveFilePicker(mxUtils.bind(d,function(A,B){q.invalidFileHandle=null;q.fileHandle=A;q.title=B.name;q.desc=B;d.save(B.name)}),null,d.createFileSystemOptions(q.getTitle()));else{var C=null!=q.getTitle()?q.getTitle():this.editorUi.defaultFilename;C=new FilenameDialog(this.editorUi,
+C,mxResources.get("rename"),mxUtils.bind(this,function(A){null!=A&&0<A.length&&null!=q&&A!=q.getTitle()&&this.editorUi.spinner.spin(document.body,mxResources.get("renaming"))&&q.rename(A,mxUtils.bind(this,function(B){this.editorUi.spinner.stop()}),mxUtils.bind(this,function(B){this.editorUi.handleError(B,null!=B?mxResources.get("errorRenamingFile"):null)}))}),q.constructor==DriveFile||q.constructor==StorageFile?mxResources.get("diagramName"):null,function(A){if(null!=A&&0<A.length)return!0;d.showError(mxResources.get("error"),
+mxResources.get("invalidName"),mxResources.get("ok"));return!1},null,null,null,null,d.editor.fileExtensions);this.editorUi.showDialog(C.container,340,96,!0,!0);C.init()}}));k.isEnabled=function(){return this.enabled&&u.apply(this,arguments)};k.visible="1"!=urlParams.embed;d.actions.addAction("makeCopy...",mxUtils.bind(this,function(){var q=d.getCurrentFile();if(null!=q){var C=d.getCopyFilename(q);q.constructor==DriveFile?(C=new CreateDialog(d,C,mxUtils.bind(this,function(A,B){"_blank"==B?d.editor.editAsNew(d.getFileData(),
+A):("download"==B&&(B=App.MODE_GOOGLE),null!=A&&0<A.length&&(B==App.MODE_GOOGLE?d.spinner.spin(document.body,mxResources.get("saving"))&&q.saveAs(A,mxUtils.bind(this,function(G){q.desc=G;q.save(!1,mxUtils.bind(this,function(){d.spinner.stop();q.setModified(!1);q.addAllSavedStatus()}),mxUtils.bind(this,function(M){d.handleError(M)}))}),mxUtils.bind(this,function(G){d.handleError(G)})):d.createFile(A,d.getFileData(!0),null,B)))}),mxUtils.bind(this,function(){d.hideDialog()}),mxResources.get("makeCopy"),
+mxResources.get("create"),null,null,!0,null,!0,null,null,null,null,d.editor.fileExtensions),d.showDialog(C.container,420,380,!0,!0),C.init()):d.editor.editAsNew(this.editorUi.getFileData(!0),C)}}));d.actions.addAction("moveToFolder...",mxUtils.bind(this,function(){var q=d.getCurrentFile();if(q.getMode()==App.MODE_GOOGLE||q.getMode()==App.MODE_ONEDRIVE){var C=!1;if(q.getMode()==App.MODE_GOOGLE&&null!=q.desc.parents)for(var A=0;A<q.desc.parents.length;A++)if(q.desc.parents[A].isRoot){C=!0;break}d.pickFolder(q.getMode(),
mxUtils.bind(this,function(B){d.spinner.spin(document.body,mxResources.get("moving"))&&q.move(B,mxUtils.bind(this,function(G){d.spinner.stop()}),mxUtils.bind(this,function(G){d.handleError(G)}))}),null,!0,C)}}));this.put("publish",new Menu(mxUtils.bind(this,function(q,C){this.addMenuItems(q,["publishLink"],C)})));d.actions.put("useOffline",new Action(mxResources.get("useOffline")+"...",function(){d.openLink("https://app.draw.io/")}));this.editorUi.actions.addAction("share...",mxUtils.bind(this,function(){try{var q=
-d.getCurrentFile();null!=q&&q.share()}catch(C){d.handleError(C)}}));this.put("embed",new Menu(mxUtils.bind(this,function(q,C){var z=d.getCurrentFile();null==z||z.getMode()!=App.MODE_GOOGLE&&z.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(z.getTitle())||this.addMenuItems(q,["liveImage","-"],C);this.addMenuItems(q,["embedImage","embedSvg","-","embedHtml"],C);navigator.standalone||d.isOffline()||this.addMenuItems(q,["embedIframe"],C);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(q,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),
-C)})));d.addInsertItem=function(q,C,z,B){("plantUml"!=B||EditorUi.enablePlantUml&&!d.isOffline())&&q.addItem(z,null,mxUtils.bind(this,function(){if("fromText"==B||"formatSql"==B||"plantUml"==B||"mermaid"==B){var G=new ParseDialog(d,z,B);d.showDialog(G.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else G=new CreateGraphDialog(d,z,B),d.showDialog(G.container,620,420,!0,!1);G.init()}),C,null,u())};var y=function(q,C,z,B){var G=new mxCell(q,new mxGeometry(0,0,C,z),B);G.vertex=!0;q=
+d.getCurrentFile();null!=q&&q.share()}catch(C){d.handleError(C)}}));this.put("embed",new Menu(mxUtils.bind(this,function(q,C){var A=d.getCurrentFile();null==A||A.getMode()!=App.MODE_GOOGLE&&A.getMode()!=App.MODE_GITHUB||!/(\.png)$/i.test(A.getTitle())||this.addMenuItems(q,["liveImage","-"],C);this.addMenuItems(q,["embedImage","embedSvg","-","embedHtml"],C);navigator.standalone||d.isOffline()||this.addMenuItems(q,["embedIframe"],C);"1"==urlParams.embed||d.isOffline()||this.addMenuItems(q,"- googleDocs googleSlides googleSheets - microsoftOffice - embedNotion".split(" "),
+C)})));d.addInsertItem=function(q,C,A,B){("plantUml"!=B||EditorUi.enablePlantUml&&!d.isOffline())&&q.addItem(A,null,mxUtils.bind(this,function(){if("fromText"==B||"formatSql"==B||"plantUml"==B||"mermaid"==B){var G=new ParseDialog(d,A,B);d.showDialog(G.container,620,420,!0,!1);d.dialog.container.style.overflow="auto"}else G=new CreateGraphDialog(d,A,B),d.showDialog(G.container,620,420,!0,!1);G.init()}),C,null,u())};var y=function(q,C,A,B){var G=new mxCell(q,new mxGeometry(0,0,C,A),B);G.vertex=!0;q=
t.getCenterInsertPoint(t.getBoundingBoxFromGeometry([G],!0));G.geometry.x=q.x;G.geometry.y=q.y;t.getModel().beginUpdate();try{G=t.addCell(G),t.fireEvent(new mxEventObject("cellsInserted","cells",[G]))}finally{t.getModel().endUpdate()}t.scrollCellToVisible(G);t.setSelectionCell(G);t.container.focus();t.editAfterInsert&&t.startEditing(G);window.setTimeout(function(){null!=d.hoverIcons&&d.hoverIcons.update(t.view.getState(G))},0);return G};d.actions.put("insertText",new Action(mxResources.get("text"),
function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&t.startEditingAtCell(y("Text",40,20,"text;html=1;resizable=0;autosize=1;align=center;verticalAlign=middle;points=[];fillColor=none;strokeColor=none;rounded=0;"))}),null,null,Editor.ctrlKey+"+Shift+X").isEnabled=u;d.actions.put("insertRectangle",new Action(mxResources.get("rectangle"),function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&y("",120,60,"whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+K").isEnabled=u;d.actions.put("insertEllipse",
-new Action(mxResources.get("ellipse"),function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=u;d.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=u;d.addInsertMenuItems=mxUtils.bind(this,function(q,C,z){for(var B=0;B<z.length;B++)"-"==z[B]?q.addSeparator(C):
-d.addInsertItem(q,C,mxResources.get(z[B])+"...",z[B])});this.put("insert",new Menu(mxUtils.bind(this,function(q,C){this.addMenuItems(q,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),C);d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(q,["insertTemplate"],C);q.addSeparator(C);this.addSubmenu("insertLayout",q,C,mxResources.get("layout"));this.addSubmenu("insertAdvanced",q,C,mxResources.get("advanced"))})));this.put("insertLayout",
-new Menu(mxUtils.bind(this,function(q,C){d.addInsertMenuItems(q,C,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(q,C){d.addInsertMenuItems(q,C,["fromText","plantUml","mermaid","-","formatSql"]);q.addItem(mxResources.get("csv")+"...",null,function(){d.showImportCsvDialog()},C,null,u())})));this.put("openRecent",new Menu(function(q,C){var z=d.getRecent();if(null!=z){for(var B=0;B<z.length;B++)(function(G){var M=
-G.mode;M==App.MODE_GOOGLE?M="googleDrive":M==App.MODE_ONEDRIVE&&(M="oneDrive");q.addItem(G.title+" ("+mxResources.get(M)+")",null,function(){d.loadFile(G.id)},C)})(z[B]);q.addSeparator(C)}q.addItem(mxResources.get("reset"),null,function(){d.resetRecent()},C)}));this.put("openFrom",new Menu(function(q,C){null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},C):D&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+
+new Action(mxResources.get("ellipse"),function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&y("",80,80,"ellipse;whiteSpace=wrap;html=1;")}),null,null,Editor.ctrlKey+"+Shift+K").isEnabled=u;d.actions.put("insertRhombus",new Action(mxResources.get("rhombus"),function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&y("",80,80,"rhombus;whiteSpace=wrap;html=1;")})).isEnabled=u;d.addInsertMenuItems=mxUtils.bind(this,function(q,C,A){for(var B=0;B<A.length;B++)"-"==A[B]?q.addSeparator(C):
+d.addInsertItem(q,C,mxResources.get(A[B])+"...",A[B])});this.put("insert",new Menu(mxUtils.bind(this,function(q,C){this.addMenuItems(q,"insertRectangle insertEllipse insertRhombus - insertText insertLink - createShape insertFreehand - insertImage".split(" "),C);d.insertTemplateEnabled&&!d.isOffline()&&this.addMenuItems(q,["insertTemplate"],C);q.addSeparator(C);this.addSubmenu("insertLayout",q,C,mxResources.get("layout"));this.addSubmenu("insertAdvanced",q,C,mxResources.get("advanced"))})));this.put("insertLayout",
+new Menu(mxUtils.bind(this,function(q,C){d.addInsertMenuItems(q,C,"horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "))})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(q,C){d.addInsertMenuItems(q,C,["fromText","plantUml","mermaid","-","formatSql"]);q.addItem(mxResources.get("csv")+"...",null,function(){d.showImportCsvDialog()},C,null,u())})));this.put("openRecent",new Menu(function(q,C){var A=d.getRecent();if(null!=A){for(var B=0;B<A.length;B++)(function(G){var M=
+G.mode;M==App.MODE_GOOGLE?M="googleDrive":M==App.MODE_ONEDRIVE&&(M="oneDrive");q.addItem(G.title+" ("+mxResources.get(M)+")",null,function(){d.loadFile(G.id)},C)})(A[B]);q.addSeparator(C)}q.addItem(mxResources.get("reset"),null,function(){d.resetRecent()},C)}));this.put("openFrom",new Menu(function(q,C){null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickFile(App.MODE_GOOGLE)},C):E&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+
mxResources.get("loading")+"...)",null,function(){},C,null,!1);null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickFile(App.MODE_ONEDRIVE)},C):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},C,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickFile(App.MODE_DROPBOX)},C):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+
" ("+mxResources.get("loading")+"...)",null,function(){},C,null,!1);q.addSeparator(C);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){d.pickFile(App.MODE_GITHUB)},C);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickFile(App.MODE_GITLAB)},C);null!=d.trello?q.addItem(mxResources.get("trello")+"...",null,function(){d.pickFile(App.MODE_TRELLO)},C):g&&"function"===typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+
-"...)",null,function(){},C,null,!1);q.addSeparator(C);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.pickFile(App.MODE_BROWSER)},C);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},C);d.isOffline()||(q.addSeparator(C),q.addItem(mxResources.get("url")+"...",null,function(){var z=new FilenameDialog(d,"",mxResources.get("open"),function(B){null!=B&&0<B.length&&(null==d.getCurrentFile()?
-window.location.hash="#U"+encodeURIComponent(B):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(B)))},mxResources.get("url"));d.showDialog(z.container,300,80,!0,!0);z.init()},C))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(q,C){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,
-null,null,null,App.MODE_GOOGLE)},C):D&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},C,null,!1));null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},C):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},C,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+
+"...)",null,function(){},C,null,!1);q.addSeparator(C);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.pickFile(App.MODE_BROWSER)},C);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.pickFile(App.MODE_DEVICE)},C);d.isOffline()||(q.addSeparator(C),q.addItem(mxResources.get("url")+"...",null,function(){var A=new FilenameDialog(d,"",mxResources.get("open"),function(B){null!=B&&0<B.length&&(null==d.getCurrentFile()?
+window.location.hash="#U"+encodeURIComponent(B):window.openWindow((mxClient.IS_CHROMEAPP?"https://www.draw.io/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(B)))},mxResources.get("url"));d.showDialog(A.container,300,80,!0,!0);A.init()},C))}));Editor.enableCustomLibraries&&(this.put("newLibrary",new Menu(function(q,C){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.showLibraryDialog(null,
+null,null,null,App.MODE_GOOGLE)},C):E&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},C,null,!1));null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_ONEDRIVE)},C):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},C,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+
"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DROPBOX)},C):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,function(){},C,null,!1);q.addSeparator(C);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_GITHUB)},C);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){d.showLibraryDialog(null,null,null,null,
App.MODE_GITLAB)},C);null!=d.trello?q.addItem(mxResources.get("trello")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_TRELLO)},C):g&&"function"===typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},C,null,!1);q.addSeparator(C);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_BROWSER)},C);"1"!=urlParams.noDevice&&
-q.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},C)})),this.put("openLibraryFrom",new Menu(function(q,C){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},C):D&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},C,null,!1));
+q.addItem(mxResources.get("device")+"...",null,function(){d.showLibraryDialog(null,null,null,null,App.MODE_DEVICE)},C)})),this.put("openLibraryFrom",new Menu(function(q,C){"undefined"!=typeof google&&"undefined"!=typeof google.picker&&(null!=d.drive?q.addItem(mxResources.get("googleDrive")+"...",null,function(){d.pickLibrary(App.MODE_GOOGLE)},C):E&&"function"===typeof window.DriveClient&&q.addItem(mxResources.get("googleDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},C,null,!1));
null!=d.oneDrive?q.addItem(mxResources.get("oneDrive")+"...",null,function(){d.pickLibrary(App.MODE_ONEDRIVE)},C):e&&"function"===typeof window.OneDriveClient&&q.addItem(mxResources.get("oneDrive")+" ("+mxResources.get("loading")+"...)",null,function(){},C,null,!1);null!=d.dropbox?q.addItem(mxResources.get("dropbox")+"...",null,function(){d.pickLibrary(App.MODE_DROPBOX)},C):c&&"function"===typeof window.DropboxClient&&q.addItem(mxResources.get("dropbox")+" ("+mxResources.get("loading")+"...)",null,
function(){},C,null,!1);q.addSeparator(C);null!=d.gitHub&&q.addItem(mxResources.get("github")+"...",null,function(){d.pickLibrary(App.MODE_GITHUB)},C);null!=d.gitLab&&q.addItem(mxResources.get("gitlab")+"...",null,function(){d.pickLibrary(App.MODE_GITLAB)},C);null!=d.trello?q.addItem(mxResources.get("trello")+"...",null,function(){d.pickLibrary(App.MODE_TRELLO)},C):g&&"function"===typeof window.TrelloClient&&q.addItem(mxResources.get("trello")+" ("+mxResources.get("loading")+"...)",null,function(){},
-C,null,!1);q.addSeparator(C);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},C);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},C);d.isOffline()||(q.addSeparator(C),q.addItem(mxResources.get("url")+"...",null,function(){var z=new FilenameDialog(d,"",mxResources.get("open"),function(B){if(null!=B&&0<B.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var G=
-B;d.editor.isCorsEnabledForUrl(B)||(G=PROXY_URL+"?url="+encodeURIComponent(B));mxUtils.get(G,function(M){if(200<=M.getStatus()&&299>=M.getStatus()){d.spinner.stop();try{d.loadLibrary(new UrlLibrary(this,M.getText(),B))}catch(H){d.handleError(H,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));d.showDialog(z.container,300,
-80,!0,!0);z.init()},C));"1"==urlParams.confLib&&(q.addSeparator(C),q.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},C))})));this.put("edit",new Menu(mxUtils.bind(this,function(q,C){this.addMenuItems(q,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
+C,null,!1);q.addSeparator(C);isLocalStorage&&"0"!=urlParams.browser&&q.addItem(mxResources.get("browser")+"...",null,function(){d.pickLibrary(App.MODE_BROWSER)},C);"1"!=urlParams.noDevice&&q.addItem(mxResources.get("device")+"...",null,function(){d.pickLibrary(App.MODE_DEVICE)},C);d.isOffline()||(q.addSeparator(C),q.addItem(mxResources.get("url")+"...",null,function(){var A=new FilenameDialog(d,"",mxResources.get("open"),function(B){if(null!=B&&0<B.length&&d.spinner.spin(document.body,mxResources.get("loading"))){var G=
+B;d.editor.isCorsEnabledForUrl(B)||(G=PROXY_URL+"?url="+encodeURIComponent(B));mxUtils.get(G,function(M){if(200<=M.getStatus()&&299>=M.getStatus()){d.spinner.stop();try{d.loadLibrary(new UrlLibrary(this,M.getText(),B))}catch(H){d.handleError(H,mxResources.get("errorLoadingFile"))}}else d.spinner.stop(),d.handleError(null,mxResources.get("errorLoadingFile"))},function(){d.spinner.stop();d.handleError(null,mxResources.get("errorLoadingFile"))})}},mxResources.get("url"));d.showDialog(A.container,300,
+80,!0,!0);A.init()},C));"1"==urlParams.confLib&&(q.addSeparator(C),q.addItem(mxResources.get("confluenceCloud")+"...",null,function(){d.showRemotelyStoredLibrary(mxResources.get("libraries"))},C))})));this.put("edit",new Menu(mxUtils.bind(this,function(q,C){this.addMenuItems(q,"undo redo - cut copy copyAsImage paste delete - duplicate - findReplace - editData editTooltip - editStyle editGeometry - edit - editLink openLink - selectVertices selectEdges selectAll selectNone - lockUnlock".split(" "))})));
k=d.actions.addAction("comments",mxUtils.bind(this,function(){if(null==this.commentsWindow)this.commentsWindow=new CommentsWindow(d,document.body.offsetWidth-380,120,300,350),this.commentsWindow.window.addListener("show",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.addListener("hide",function(){d.fireEvent(new mxEventObject("comments"))}),this.commentsWindow.window.setVisible(!0),d.fireEvent(new mxEventObject("comments"));else{var q=!this.commentsWindow.window.isVisible();
this.commentsWindow.window.setVisible(q);this.commentsWindow.refreshCommentsTime();q&&this.commentsWindow.hasError&&this.commentsWindow.refreshComments()}}));k.setToggleAction(!0);k.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.commentsWindow&&this.commentsWindow.window.isVisible()}));d.editor.addListener("fileLoaded",mxUtils.bind(this,function(){null!=this.commentsWindow&&(this.commentsWindow.destroy(),this.commentsWindow=null)}));k=this.get("viewPanels");var L=k.funct;k.funct=
-function(q,C){L.apply(this,arguments);d.menus.addMenuItems(q,["tags"],C);d.commentsSupported()&&d.menus.addMenuItems(q,["comments"],C)};this.put("view",new Menu(mxUtils.bind(this,function(q,C){this.addMenuItems(q,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(q,["-","search"],C);if(isLocalStorage||mxClient.IS_CHROMEAPP){var z=this.addMenuItem(q,"scratchpad",C);(!d.isOffline()||mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp)&&this.addLinkToItem(z,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(q,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",q,C);this.addMenuItems(q,"- scrollbars tooltips ruler - grid guides".split(" "),C);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(q,"shadowVisible",C);this.addMenuItems(q,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),C);"1"!=urlParams.sketch&&this.addMenuItems(q,
+function(q,C){L.apply(this,arguments);d.menus.addMenuItems(q,["tags"],C);d.commentsSupported()&&d.menus.addMenuItems(q,["comments"],C)};this.put("view",new Menu(mxUtils.bind(this,function(q,C){this.addMenuItems(q,(null!=this.editorUi.format?["formatPanel"]:[]).concat(["outline","layers","tags"]).concat(d.commentsSupported()?["comments","-"]:["-"]));this.addMenuItems(q,["-","search"],C);if(isLocalStorage||mxClient.IS_CHROMEAPP){var A=this.addMenuItem(q,"scratchpad",C);(!d.isOffline()||mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)&&this.addLinkToItem(A,"https://www.diagrams.net/doc/faq/scratchpad")}this.addMenuItems(q,["shapes","-","pageView","pageScale"]);this.addSubmenu("units",q,C);this.addMenuItems(q,"- scrollbars tooltips ruler - grid guides".split(" "),C);mxClient.IS_SVG&&(null==document.documentMode||9<document.documentMode)&&this.addMenuItem(q,"shadowVisible",C);this.addMenuItems(q,"- connectionArrows connectionPoints - resetView zoomIn zoomOut".split(" "),C);"1"!=urlParams.sketch&&this.addMenuItems(q,
["-","fullscreen"],C)})));if(EditorUi.isElectronApp){var N="1"==urlParams.enableSpellCheck;k=d.actions.addAction("spellCheck",function(){d.toggleSpellCheck();N=!N;d.alert(mxResources.get("restartForChangeRequired"))});k.setToggleAction(!0);k.setSelectedCallback(function(){return N});var K="1"==urlParams.enableStoreBkp;k=d.actions.addAction("autoBkp",function(){d.toggleStoreBkp();K=!K});k.setToggleAction(!0);k.setSelectedCallback(function(){return K});d.actions.addAction("openDevTools",function(){d.openDevTools()});
d.actions.addAction("drafts...",function(){var q=new FilenameDialog(d,EditorUi.draftSaveDelay/1E3+"",mxResources.get("apply"),mxUtils.bind(this,function(C){C=parseInt(C);0<=C&&(EditorUi.draftSaveDelay=1E3*C,EditorUi.enableDrafts=0<C,mxSettings.setDraftSaveDelay(C),mxSettings.save())}),mxResources.get("draftSaveInt"),null,null,null,null,null,null,50,250);d.showDialog(q.container,320,80,!0,!0);q.init()})}this.put("extras",new Menu(mxUtils.bind(this,function(q,C){"1"==urlParams.noLangIcon&&(this.addSubmenu("language",
-q,C),q.addSeparator(C));"1"!=urlParams.embed&&(this.addSubmenu("theme",q,C),q.addSeparator(C));if("undefined"!==typeof MathJax){var z=this.addMenuItem(q,"mathematicalTypesetting",C);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(z,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(q,["spellCheck","autoBkp","drafts"],C);this.addMenuItems(q,["copyConnect","collapseExpand","-"],C);"1"!=urlParams.embed&&(z=d.getCurrentFile(),
-null!=z&&z.isRealtimeEnabled()&&z.isRealtimeSupported()&&this.addMenuItems(q,["showRemoteCursors","shareCursor"],C),this.addMenuItems(q,["autosave"],C));q.addSeparator(C);!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(q,"plugins",C);this.addMenuItems(q,["-","editDiagram"],C);Graph.translateDiagram&&this.addMenuItems(q,["diagramLanguage"]);q.addSeparator(C);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(q,["showStartScreen"],C);this.addMenuItems(q,["configuration"],
+q,C),q.addSeparator(C));"1"!=urlParams.embed&&(this.addSubmenu("theme",q,C),q.addSeparator(C));if("undefined"!==typeof MathJax){var A=this.addMenuItem(q,"mathematicalTypesetting",C);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(A,"https://www.diagrams.net/doc/faq/math-typesetting")}EditorUi.isElectronApp&&this.addMenuItems(q,["spellCheck","autoBkp","drafts"],C);this.addMenuItems(q,["copyConnect","collapseExpand","-"],C);"1"!=urlParams.embed&&(A=d.getCurrentFile(),
+null!=A&&A.isRealtimeEnabled()&&A.isRealtimeSupported()&&this.addMenuItems(q,["showRemoteCursors","shareCursor"],C),this.addMenuItems(q,["autosave"],C));q.addSeparator(C);!d.isOfflineApp()&&isLocalStorage&&this.addMenuItem(q,"plugins",C);this.addMenuItems(q,["-","editDiagram"],C);Graph.translateDiagram&&this.addMenuItems(q,["diagramLanguage"]);q.addSeparator(C);"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&this.addMenuItems(q,["showStartScreen"],C);this.addMenuItems(q,["configuration"],
C);q.addSeparator(C);"1"==urlParams.newTempDlg&&(d.actions.addAction("templates",function(){function B(M){return{id:M.id,isExt:!0,url:M.downloadUrl,title:M.title,imgUrl:M.thumbnailLink,changedBy:M.lastModifyingUserName,lastModifiedOn:M.modifiedDate}}var G=new TemplatesDialog(d,function(M){console.log(arguments)},null,null,null,"user",function(M,H,F){var J=new Date;J.setDate(J.getDate()-7);d.drive.listFiles(null,J,F?!0:!1,function(R){for(var W=[],O=0;O<R.items.length;O++)W.push(B(R.items[O]));M(W)},
H)},function(M,H,F,J){d.drive.listFiles(M,null,J?!0:!1,function(R){for(var W=[],O=0;O<R.items.length;O++)W.push(B(R.items[O]));H(W)},F)},function(M,H,F){d.drive.getFile(M.id,function(J){H(J.data)},F)},null,function(M){M({Test:[]},1)},!0,!1);d.showDialog(G.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0)}),this.addMenuItem(q,"templates",C))})));this.put("file",new Menu(mxUtils.bind(this,function(q,C){if("1"==urlParams.embed)this.addSubmenu("importFrom",q,C),this.addSubmenu("exportAs",
q,C),this.addSubmenu("embed",q,C),"1"==urlParams.libraries&&(this.addMenuItems(q,["-"],C),this.addSubmenu("newLibrary",q,C),this.addSubmenu("openLibraryFrom",q,C)),d.isRevisionHistorySupported()&&this.addMenuItems(q,["-","revisionHistory"],C),this.addMenuItems(q,["-","pageSetup","print","-","rename"],C),"1"!=urlParams.embedInline&&("1"==urlParams.noSaveBtn?"0"!=urlParams.saveAndExit&&this.addMenuItems(q,["saveAndExit"],C):(this.addMenuItems(q,["save"],C),"1"==urlParams.saveAndExit&&this.addMenuItems(q,
-["saveAndExit"],C))),"1"!=urlParams.noExitBtn&&this.addMenuItems(q,["exit"],C);else{var z=this.editorUi.getCurrentFile();if(null!=z&&z.constructor==DriveFile){z.isRestricted()&&this.addMenuItems(q,["exportOptionsDisabled"],C);this.addMenuItems(q,["save","-","share"],C);var B=this.addMenuItem(q,"synchronize",C);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/synchronize");q.addSeparator(C)}else this.addMenuItems(q,["new"],C);this.addSubmenu("openFrom",
-q,C);isLocalStorage&&this.addSubmenu("openRecent",q,C);null!=z&&z.constructor==DriveFile?this.addMenuItems(q,["new","-","rename","makeCopy","moveToFolder"],C):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==z||z.constructor==LocalFile&&null==z.fileHandle||(q.addSeparator(C),B=this.addMenuItem(q,"synchronize",C),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(q,["-","save","saveAs","-"],C),
-mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==z||this.addMenuItems(q,["share","-"],C),this.addMenuItems(q,["rename"],C),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(q,["upload"],C):(this.addMenuItems(q,["makeCopy"],C),null!=z&&z.constructor==OneDriveFile&&this.addMenuItems(q,["moveToFolder"],C)));q.addSeparator(C);this.addSubmenu("importFrom",q,C);this.addSubmenu("exportAs",q,C);q.addSeparator(C);
-this.addSubmenu("embed",q,C);this.addSubmenu("publish",q,C);q.addSeparator(C);this.addSubmenu("newLibrary",q,C);this.addSubmenu("openLibraryFrom",q,C);d.isRevisionHistorySupported()&&this.addMenuItems(q,["-","revisionHistory"],C);null!=z&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(B=null!=z.getTitle()?z.getTitle():d.defaultFilename,(z.constructor==DriveFile&&null!=z.sync&&z.sync.isConnected()||!/(\.html)$/i.test(B)&&!/(\.svg)$/i.test(B))&&this.addMenuItems(q,["-","properties"]));this.addMenuItems(q,
-["-","pageSetup"],C);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["print"],C);this.addMenuItems(q,["-","close"])}})));l.prototype.execute=function(){var q=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var C=q.extFonts,z=0;null!=C&&z<C.length;z++){var B=document.getElementById("extFont_"+C[z].name);
-null!=B&&B.parentNode.removeChild(B)}q.extFonts=[];for(z=0;null!=this.previousExtFonts&&z<this.previousExtFonts.length;z++)this.ui.editor.graph.addExtFont(this.previousExtFonts[z].name,this.previousExtFonts[z].url);this.previousExtFonts=C};this.put("fontFamily",new Menu(mxUtils.bind(this,function(q,C){for(var z=mxUtils.bind(this,function(O,V,U,X,n){var E=d.editor.graph;X=this.styleChange(q,X||O,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],
-"1"!=urlParams["ext-fonts"]?[O,null!=V?encodeURIComponent(V):null,null]:[O],null,C,function(){"1"!=urlParams["ext-fonts"]?E.setFont(O,V):(document.execCommand("fontname",!1,O),E.addExtFont(O,V));d.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[O,null!=V?encodeURIComponent(V):null,null]:[O],"cells",[E.cellEditor.getEditingCell()]))},function(){E.updateLabelElements(E.getSelectionCells(),
-function(I){I.removeAttribute("face");I.style.fontFamily=null;"PRE"==I.nodeName&&E.replaceElement(I,"div")});"1"==urlParams["ext-fonts"]&&E.addExtFont(O,V)});U&&(U=document.createElement("span"),U.className="geSprite geSprite-delete",U.style.cursor="pointer",U.style.display="inline-block",X.firstChild.nextSibling.nextSibling.appendChild(U),mxEvent.addListener(U,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(I){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[O.toLowerCase()];
+["saveAndExit"],C))),"1"!=urlParams.noExitBtn&&this.addMenuItems(q,["exit"],C);else{var A=this.editorUi.getCurrentFile();if(null!=A&&A.constructor==DriveFile){A.isRestricted()&&this.addMenuItems(q,["exportOptionsDisabled"],C);this.addMenuItems(q,["save","-","share"],C);var B=this.addMenuItem(q,"synchronize",C);(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/synchronize");q.addSeparator(C)}else this.addMenuItems(q,["new"],C);this.addSubmenu("openFrom",
+q,C);isLocalStorage&&this.addSubmenu("openRecent",q,C);null!=A&&A.constructor==DriveFile?this.addMenuItems(q,["new","-","rename","makeCopy","moveToFolder"],C):(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null==A||A.constructor==LocalFile&&null==A.fileHandle||(q.addSeparator(C),B=this.addMenuItem(q,"synchronize",C),(!d.isOffline()||mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)&&this.addLinkToItem(B,"https://www.diagrams.net/doc/faq/synchronize")),this.addMenuItems(q,["-","save","saveAs","-"],C),
+mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=d.getServiceName()||d.isOfflineApp()||null==A||this.addMenuItems(q,["share","-"],C),this.addMenuItems(q,["rename"],C),d.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(q,["upload"],C):(this.addMenuItems(q,["makeCopy"],C),null!=A&&A.constructor==OneDriveFile&&this.addMenuItems(q,["moveToFolder"],C)));q.addSeparator(C);this.addSubmenu("importFrom",q,C);this.addSubmenu("exportAs",q,C);q.addSeparator(C);
+this.addSubmenu("embed",q,C);this.addSubmenu("publish",q,C);q.addSeparator(C);this.addSubmenu("newLibrary",q,C);this.addSubmenu("openLibraryFrom",q,C);d.isRevisionHistorySupported()&&this.addMenuItems(q,["-","revisionHistory"],C);null!=A&&null!=d.fileNode&&"1"!=urlParams.embedInline&&(B=null!=A.getTitle()?A.getTitle():d.defaultFilename,(A.constructor==DriveFile&&null!=A.sync&&A.sync.isConnected()||!/(\.html)$/i.test(B)&&!/(\.svg)$/i.test(B))&&this.addMenuItems(q,["-","properties"]));this.addMenuItems(q,
+["-","pageSetup"],C);mxClient.IS_IOS&&navigator.standalone||this.addMenuItems(q,["print"],C);this.addMenuItems(q,["-","close"])}})));l.prototype.execute=function(){var q=this.ui.editor.graph;this.customFonts=this.prevCustomFonts;this.prevCustomFonts=this.ui.menus.customFonts;this.ui.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts));this.extFonts=this.previousExtFonts;for(var C=q.extFonts,A=0;null!=C&&A<C.length;A++){var B=document.getElementById("extFont_"+C[A].name);
+null!=B&&B.parentNode.removeChild(B)}q.extFonts=[];for(A=0;null!=this.previousExtFonts&&A<this.previousExtFonts.length;A++)this.ui.editor.graph.addExtFont(this.previousExtFonts[A].name,this.previousExtFonts[A].url);this.previousExtFonts=C};this.put("fontFamily",new Menu(mxUtils.bind(this,function(q,C){for(var A=mxUtils.bind(this,function(O,V,U,Y,n){var D=d.editor.graph;Y=this.styleChange(q,Y||O,"1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],
+"1"!=urlParams["ext-fonts"]?[O,null!=V?encodeURIComponent(V):null,null]:[O],null,C,function(){"1"!=urlParams["ext-fonts"]?D.setFont(O,V):(document.execCommand("fontname",!1,O),D.addExtFont(O,V));d.fireEvent(new mxEventObject("styleChanged","keys","1"!=urlParams["ext-fonts"]?[mxConstants.STYLE_FONTFAMILY,"fontSource","FType"]:[mxConstants.STYLE_FONTFAMILY],"values","1"!=urlParams["ext-fonts"]?[O,null!=V?encodeURIComponent(V):null,null]:[O],"cells",[D.cellEditor.getEditingCell()]))},function(){D.updateLabelElements(D.getSelectionCells(),
+function(I){I.removeAttribute("face");I.style.fontFamily=null;"PRE"==I.nodeName&&D.replaceElement(I,"div")});"1"==urlParams["ext-fonts"]&&D.addExtFont(O,V)});U&&(U=document.createElement("span"),U.className="geSprite geSprite-delete",U.style.cursor="pointer",U.style.display="inline-block",Y.firstChild.nextSibling.nextSibling.appendChild(U),mxEvent.addListener(U,mxClient.IS_POINTER?"pointerup":"mouseup",mxUtils.bind(this,function(I){if("1"!=urlParams["ext-fonts"]){delete Graph.recentCustomFonts[O.toLowerCase()];
for(var S=0;S<this.customFonts.length;S++)if(this.customFonts[S].name==O&&this.customFonts[S].url==V){this.customFonts.splice(S,1);d.fireEvent(new mxEventObject("customFontsChanged"));break}}else{var Q=mxUtils.clone(this.editorUi.editor.graph.extFonts);if(null!=Q&&0<Q.length)for(S=0;S<Q.length;S++)if(Q[S].name==O){Q.splice(S,1);break}var P=mxUtils.clone(this.customFonts);for(S=0;S<P.length;S++)if(P[S].name==O){P.splice(S,1);break}S=new l(this.editorUi,Q,P);this.editorUi.editor.graph.model.execute(S)}this.editorUi.hideCurrentMenu();
-mxEvent.consume(I)})));Graph.addFont(O,V);X.firstChild.nextSibling.style.fontFamily=O;null!=n&&X.setAttribute("title",n)}),B={},G=0;G<this.defaultFonts.length;G++){var M=this.defaultFonts[G];"string"===typeof M?z(M):null!=M.fontFamily&&null!=M.fontUrl&&(B[encodeURIComponent(M.fontFamily)+"@"+encodeURIComponent(M.fontUrl)]=!0,z(M.fontFamily,M.fontUrl))}q.addSeparator(C);if("1"!=urlParams["ext-fonts"]){M=function(O){var V=encodeURIComponent(O.name)+(null==O.url?"":"@"+encodeURIComponent(O.url));if(!B[V]){for(var U=
-O.name,X=0;null!=F[U.toLowerCase()];)U=O.name+" ("+ ++X+")";null==H[V]&&(J.push({name:O.name,url:O.url,label:U,title:O.url}),F[U.toLowerCase()]=O,H[V]=O)}};var H={},F={},J=[];for(G=0;G<this.customFonts.length;G++)M(this.customFonts[G]);for(var R in Graph.recentCustomFonts)M(Graph.recentCustomFonts[R]);J.sort(function(O,V){return O.label<V.label?-1:O.label>V.label?1:0});if(0<J.length){for(G=0;G<J.length;G++)z(J[G].name,J[G].url,!0,J[G].label,J[G].url);q.addSeparator(C)}q.addItem(mxResources.get("reset"),
+mxEvent.consume(I)})));Graph.addFont(O,V);Y.firstChild.nextSibling.style.fontFamily=O;null!=n&&Y.setAttribute("title",n)}),B={},G=0;G<this.defaultFonts.length;G++){var M=this.defaultFonts[G];"string"===typeof M?A(M):null!=M.fontFamily&&null!=M.fontUrl&&(B[encodeURIComponent(M.fontFamily)+"@"+encodeURIComponent(M.fontUrl)]=!0,A(M.fontFamily,M.fontUrl))}q.addSeparator(C);if("1"!=urlParams["ext-fonts"]){M=function(O){var V=encodeURIComponent(O.name)+(null==O.url?"":"@"+encodeURIComponent(O.url));if(!B[V]){for(var U=
+O.name,Y=0;null!=F[U.toLowerCase()];)U=O.name+" ("+ ++Y+")";null==H[V]&&(J.push({name:O.name,url:O.url,label:U,title:O.url}),F[U.toLowerCase()]=O,H[V]=O)}};var H={},F={},J=[];for(G=0;G<this.customFonts.length;G++)M(this.customFonts[G]);for(var R in Graph.recentCustomFonts)M(Graph.recentCustomFonts[R]);J.sort(function(O,V){return O.label<V.label?-1:O.label>V.label?1:0});if(0<J.length){for(G=0;G<J.length;G++)A(J[G].name,J[G].url,!0,J[G].label,J[G].url);q.addSeparator(C)}q.addItem(mxResources.get("reset"),
null,mxUtils.bind(this,function(){Graph.recentCustomFonts={};this.customFonts=[];d.fireEvent(new mxEventObject("customFontsChanged"))}),C);q.addSeparator(C)}else{R=this.editorUi.editor.graph.extFonts;if(null!=R&&0<R.length){M={};var W=!1;for(G=0;G<this.customFonts.length;G++)M[this.customFonts[G].name]=!0;for(G=0;G<R.length;G++)M[R[G].name]||(this.customFonts.push(R[G]),W=!0);W&&this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts))}if(0<this.customFonts.length){for(G=
-0;G<this.customFonts.length;G++)R=this.customFonts[G].name,M=this.customFonts[G].url,z(R,M,!0),this.editorUi.editor.graph.addExtFont(R,M,!0);q.addSeparator(C);q.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var O=new l(this.editorUi,[],[]);d.editor.graph.model.execute(O)}),C);q.addSeparator(C)}}q.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var O=this.editorUi.editor.graph,V=O.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],U=
-"s",X=null;if("1"!=urlParams["ext-fonts"]&&O.isEditing()){var n=O.getSelectedEditingElement();null!=n&&(n=mxUtils.getCurrentStyle(n),null!=n&&(V=Graph.stripQuotes(n.fontFamily),X=Graph.getFontUrl(V,null),null!=X&&(Graph.isGoogleFontUrl(X)?(X=null,U="g"):U="w")))}else n=O.getView().getState(O.getSelectionCell()),null!=n&&(V=n.style[mxConstants.STYLE_FONTFAMILY]||V,"1"!=urlParams["ext-fonts"]?(n=n.style.fontSource,null!=n&&(n=decodeURIComponent(n),Graph.isGoogleFontUrl(n)?U="g":(U="w",X=n))):(U=n.style.FType||
-U,"w"==U&&(X=this.editorUi.editor.graph.extFonts,n=null,null!=X&&(n=X.find(function(I){return I.name==V})),X=null!=n?n.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=X&&X.substring(0,PROXY_URL.length)==PROXY_URL&&(X=decodeURIComponent(X.substr((PROXY_URL+"?url=").length)));var E=null;document.activeElement==O.cellEditor.textarea&&(E=O.cellEditor.saveSelection());U=new FontDialog(this.editorUi,V,X,U,mxUtils.bind(this,function(I,S,Q){null!=E&&(O.cellEditor.restoreSelection(E),E=null);
+0;G<this.customFonts.length;G++)R=this.customFonts[G].name,M=this.customFonts[G].url,A(R,M,!0),this.editorUi.editor.graph.addExtFont(R,M,!0);q.addSeparator(C);q.addItem(mxResources.get("reset"),null,mxUtils.bind(this,function(){var O=new l(this.editorUi,[],[]);d.editor.graph.model.execute(O)}),C);q.addSeparator(C)}}q.addItem(mxResources.get("custom")+"...",null,mxUtils.bind(this,function(){var O=this.editorUi.editor.graph,V=O.getStylesheet().getDefaultVertexStyle()[mxConstants.STYLE_FONTFAMILY],U=
+"s",Y=null;if("1"!=urlParams["ext-fonts"]&&O.isEditing()){var n=O.getSelectedEditingElement();null!=n&&(n=mxUtils.getCurrentStyle(n),null!=n&&(V=Graph.stripQuotes(n.fontFamily),Y=Graph.getFontUrl(V,null),null!=Y&&(Graph.isGoogleFontUrl(Y)?(Y=null,U="g"):U="w")))}else n=O.getView().getState(O.getSelectionCell()),null!=n&&(V=n.style[mxConstants.STYLE_FONTFAMILY]||V,"1"!=urlParams["ext-fonts"]?(n=n.style.fontSource,null!=n&&(n=decodeURIComponent(n),Graph.isGoogleFontUrl(n)?U="g":(U="w",Y=n))):(U=n.style.FType||
+U,"w"==U&&(Y=this.editorUi.editor.graph.extFonts,n=null,null!=Y&&(n=Y.find(function(I){return I.name==V})),Y=null!=n?n.url:mxResources.get("urlNotFound",null,"URL not found"))));null!=Y&&Y.substring(0,PROXY_URL.length)==PROXY_URL&&(Y=decodeURIComponent(Y.substr((PROXY_URL+"?url=").length)));var D=null;document.activeElement==O.cellEditor.textarea&&(D=O.cellEditor.saveSelection());U=new FontDialog(this.editorUi,V,Y,U,mxUtils.bind(this,function(I,S,Q){null!=D&&(O.cellEditor.restoreSelection(D),D=null);
if(null!=I&&0<I.length)if("1"!=urlParams["ext-fonts"]&&O.isEditing())O.setFont(I,S);else{O.getModel().beginUpdate();try{O.stopEditing(!1);"1"!=urlParams["ext-fonts"]?(O.setCellStyles(mxConstants.STYLE_FONTFAMILY,I),O.setCellStyles("fontSource",null!=S?encodeURIComponent(S):null),O.setCellStyles("FType",null)):(O.setCellStyles(mxConstants.STYLE_FONTFAMILY,I),"s"!=Q&&(O.setCellStyles("FType",Q),0==S.indexOf("http://")&&(S=PROXY_URL+"?url="+encodeURIComponent(S)),this.editorUi.editor.graph.addExtFont(I,
S)));Q=!0;for(var P=0;P<this.customFonts.length;P++)if(this.customFonts[P].name==I){Q=!1;break}Q&&(this.customFonts.push({name:I,url:S}),this.editorUi.fireEvent(new mxEventObject("customFontsChanged","customFonts",this.customFonts)))}finally{O.getModel().endUpdate()}}}));this.editorUi.showDialog(U.container,380,Editor.enableWebFonts?250:180,!0,!0);U.init()}),C,null,!0)})))}})();function DiagramPage(b,f){this.node=b;null!=f?this.node.setAttribute("id",f):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,f,l){this.ui=b;this.page=f;this.previous=this.name=l}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
@@ -12677,14 +12677,14 @@ ChangePage.prototype.execute=function(){this.ui.editor.fireEvent(new mxEventObje
EditorUi.prototype.getPageIndex=function(b){var f=null;if(null!=this.pages&&null!=b)for(var l=0;l<this.pages.length;l++)if(this.pages[l]==b){f=l;break}return f};EditorUi.prototype.getPageById=function(b,f){f=null!=f?f:this.pages;if(null!=f)for(var l=0;l<f.length;l++)if(f[l].getId()==b)return f[l];return null};
EditorUi.prototype.createImageForPageLink=function(b,f,l){var d=b.indexOf(","),t=null;0<d&&(d=this.getPageById(b.substring(d+1)),null!=d&&d!=f&&(t=this.getImageForPage(d,f,l),t.originalSrc=b));null==t&&(t={originalSrc:b});return t};
EditorUi.prototype.getImageForPage=function(b,f,l){l=null!=l?l:this.editor.graph;var d=l.getGlobalVariable,t=this.createTemporaryGraph(l.getStylesheet());t.defaultPageBackgroundColor=l.defaultPageBackgroundColor;t.shapeBackgroundColor=l.shapeBackgroundColor;t.shapeForegroundColor=l.shapeForegroundColor;var u=this.getPageIndex(null!=f?f:this.currentPage);t.getGlobalVariable=function(c){return"pagenumber"==c?u+1:"page"==c&&null!=f?f.getName():d.apply(this,arguments)};document.body.appendChild(t.container);
-this.updatePageRoot(b);t.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";l=t.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var D=t.getGraphBounds();document.body.removeChild(t.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(l)),D.width,D.height,D.x,D.y)};
+this.updatePageRoot(b);t.model.setRoot(b.root);b=Graph.foreignObjectWarningText;Graph.foreignObjectWarningText="";l=t.getSvg(null,null,null,null,null,null,null,null,null,null,null,!0);var E=t.getGraphBounds();document.body.removeChild(t.container);Graph.foreignObjectWarningText=b;return new mxImage(Editor.createSvgDataUri(mxUtils.getXml(l)),E.width,E.height,E.x,E.y)};
EditorUi.prototype.initPages=function(){if(!this.editor.graph.standalone){this.actions.addAction("previousPage",mxUtils.bind(this,function(){this.selectNextPage(!1)}));this.actions.addAction("nextPage",mxUtils.bind(this,function(){this.selectNextPage(!0)}));this.isPagesEnabled()&&(this.keyHandler.bindAction(33,!0,"previousPage",!0),this.keyHandler.bindAction(34,!0,"nextPage",!0));var b=this.editor.graph,f=b.view.validateBackground;b.view.validateBackground=mxUtils.bind(this,function(){if(null!=this.tabContainer){var t=
this.tabContainer.style.height;this.tabContainer.style.height=null==this.fileNode||null==this.pages||1==this.pages.length&&"0"==urlParams.pages?"0px":this.tabContainerHeight+"px";t!=this.tabContainer.style.height&&this.refresh(!1)}f.apply(b.view,arguments)});var l=null,d=mxUtils.bind(this,function(){this.updateTabContainer();var t=this.currentPage;null!=t&&t!=l&&(null==t.viewState||null==t.viewState.scrollLeft?(this.resetScrollbars(),b.isLightboxView()&&this.lightboxFit(),null!=this.chromelessResize&&
(b.container.scrollLeft=0,b.container.scrollTop=0,this.chromelessResize())):(b.container.scrollLeft=b.view.translate.x*b.view.scale+t.viewState.scrollLeft,b.container.scrollTop=b.view.translate.y*b.view.scale+t.viewState.scrollTop),l=t);null!=this.actions.layersWindow&&this.actions.layersWindow.refreshLayers();"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?1!=MathJax.Hub.queue.pending||null==this.editor||this.editor.graph.mathEnabled||MathJax.Hub.Queue(mxUtils.bind(this,function(){null!=
this.editor&&this.editor.graph.refresh()})):"undefined"===typeof Editor.MathJaxClear||null!=this.editor&&this.editor.graph.mathEnabled||Editor.MathJaxClear()});this.editor.graph.model.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(t,u){t=u.getProperty("edit").changes;for(u=0;u<t.length;u++)if(t[u]instanceof SelectPage||t[u]instanceof RenamePage||t[u]instanceof MovePage||t[u]instanceof mxRootChange){d();break}}));null!=this.toolbar&&this.editor.addListener("pageSelected",this.toolbar.updateZoom)}};
EditorUi.prototype.restoreViewState=function(b,f,l){b=null!=b?this.getPageById(b.getId()):null;var d=this.editor.graph;null!=b&&null!=this.currentPage&&null!=this.pages&&(b!=this.currentPage?this.selectPage(b,!0,f):(d.setViewState(f),this.editor.updateGraphComponents(),d.view.revalidate(),d.sizeDidChange()),d.container.scrollLeft=d.view.translate.x*d.view.scale+f.scrollLeft,d.container.scrollTop=d.view.translate.y*d.view.scale+f.scrollTop,d.restoreSelection(l))};
-Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),l=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),t=parseFloat(b.getAttribute("pageHeight")),u=b.getAttribute("background"),D=this.parseBackgroundImage(b.getAttribute("backgroundImage")),c=b.getAttribute("extFonts");if(c)try{c=c.split("|").map(function(e){e=e.split("^");return{name:e[0],url:e[1]}})}catch(e){console.log("ExtFonts format error: "+e.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
-gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=u&&0<u.length?u:null,backgroundImage:D,pageScale:isNaN(l)?mxGraph.prototype.pageScale:l,pageFormat:isNaN(d)||isNaN(t)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
+Graph.prototype.createViewState=function(b){var f=b.getAttribute("page"),l=parseFloat(b.getAttribute("pageScale")),d=parseFloat(b.getAttribute("pageWidth")),t=parseFloat(b.getAttribute("pageHeight")),u=b.getAttribute("background"),E=this.parseBackgroundImage(b.getAttribute("backgroundImage")),c=b.getAttribute("extFonts");if(c)try{c=c.split("|").map(function(e){e=e.split("^");return{name:e[0],url:e[1]}})}catch(e){console.log("ExtFonts format error: "+e.message)}return{gridEnabled:"0"!=b.getAttribute("grid"),
+gridSize:parseFloat(b.getAttribute("gridSize"))||mxGraph.prototype.gridSize,guidesEnabled:"0"!=b.getAttribute("guides"),foldingEnabled:"0"!=b.getAttribute("fold"),shadowVisible:"1"==b.getAttribute("shadow"),pageVisible:this.isLightboxView()?!1:null!=f?"0"!=f:this.defaultPageVisible,background:null!=u&&0<u.length?u:null,backgroundImage:E,pageScale:isNaN(l)?mxGraph.prototype.pageScale:l,pageFormat:isNaN(d)||isNaN(t)?"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:
mxSettings.getPageFormat():new mxRectangle(0,0,d,t),tooltips:"0"!=b.getAttribute("tooltips"),connect:"0"!=b.getAttribute("connect"),arrows:"0"!=b.getAttribute("arrows"),mathEnabled:"1"==b.getAttribute("math"),selectionCells:null,defaultParent:null,scrollbars:this.defaultScrollbars,scale:1,hiddenTags:[],extFonts:c||[]}};
Graph.prototype.saveViewState=function(b,f,l,d){l||(f.setAttribute("grid",(null==b?this.defaultGridEnabled:b.gridEnabled)?"1":"0"),f.setAttribute("page",(null==b?this.defaultPageVisible:b.pageVisible)?"1":"0"),f.setAttribute("gridSize",null!=b?b.gridSize:mxGraph.prototype.gridSize),f.setAttribute("guides",null==b||b.guidesEnabled?"1":"0"),f.setAttribute("tooltips",null==b||b.tooltips?"1":"0"),f.setAttribute("connect",null==b||b.connect?"1":"0"),f.setAttribute("arrows",null==b||b.arrows?"1":"0"),f.setAttribute("fold",
null==b||b.foldingEnabled?"1":"0"));f.setAttribute("pageScale",null!=b&&null!=b.pageScale?b.pageScale:mxGraph.prototype.pageScale);l=null!=b?b.pageFormat:"undefined"===typeof mxSettings||null!=this.defaultPageFormat?mxGraph.prototype.pageFormat:mxSettings.getPageFormat();null!=l&&(f.setAttribute("pageWidth",l.width),f.setAttribute("pageHeight",l.height));null!=b&&(null!=b.background&&f.setAttribute("background",b.background),d=this.getBackgroundImageObject(b.backgroundImage,d),null!=d&&f.setAttribute("backgroundImage",
@@ -12705,7 +12705,7 @@ EditorUi.prototype.selectNextPage=function(b){var f=this.currentPage;null!=f&&nu
EditorUi.prototype.insertPage=function(b,f){this.editor.graph.isEnabled()&&(this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1),b=null!=b?b:this.createPage(null,this.createPageId()),f=null!=f?f:this.pages.length,f=new ChangePage(this,b,b,f),this.editor.graph.model.execute(f));return b};EditorUi.prototype.createPageId=function(){do var b=Editor.guid();while(null!=this.getPageById(b));return b};
EditorUi.prototype.createPage=function(b,f){f=new DiagramPage(this.fileNode.ownerDocument.createElement("diagram"),f);f.setName(null!=b?b:this.createPageName());this.initDiagramNode(f);return f};EditorUi.prototype.createPageName=function(){for(var b={},f=0;f<this.pages.length;f++){var l=this.pages[f].getName();null!=l&&0<l.length&&(b[l]=l)}f=this.pages.length;do l=mxResources.get("pageWithNumber",[++f]);while(null!=b[l]);return l};
EditorUi.prototype.removePage=function(b){try{var f=this.editor.graph,l=mxUtils.indexOf(this.pages,b);if(f.isEnabled()&&0<=l){this.editor.graph.isEditing()&&this.editor.graph.stopEditing(!1);f.model.beginUpdate();try{var d=this.currentPage;d==b&&1<this.pages.length?(l==this.pages.length-1?l--:l++,d=this.pages[l]):1>=this.pages.length&&(d=this.insertPage(),f.model.execute(new RenamePage(this,d,mxResources.get("pageWithNumber",[1]))));f.model.execute(new ChangePage(this,b,d))}finally{f.model.endUpdate()}}}catch(t){this.handleError(t)}return b};
-EditorUi.prototype.duplicatePage=function(b,f){var l=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var t=b.node.cloneNode(!1);t.removeAttribute("id");var u={},D=d.createCellLookup([d.model.root]);l=new DiagramPage(t);l.root=d.cloneCell(d.model.root,null,u);var c=new mxGraphModel;c.prefix=Editor.guid()+"-";c.setRoot(l.root);d.updateCustomLinks(d.createCellMapping(u,D),[l.root]);l.viewState=b==this.currentPage?d.getViewState():b.viewState;this.initDiagramNode(l);
+EditorUi.prototype.duplicatePage=function(b,f){var l=null;try{var d=this.editor.graph;if(d.isEnabled()){d.isEditing()&&d.stopEditing();var t=b.node.cloneNode(!1);t.removeAttribute("id");var u={},E=d.createCellLookup([d.model.root]);l=new DiagramPage(t);l.root=d.cloneCell(d.model.root,null,u);var c=new mxGraphModel;c.prefix=Editor.guid()+"-";c.setRoot(l.root);d.updateCustomLinks(d.createCellMapping(u,E),[l.root]);l.viewState=b==this.currentPage?d.getViewState():b.viewState;this.initDiagramNode(l);
l.viewState.scale=1;l.viewState.scrollLeft=null;l.viewState.scrollTop=null;l.viewState.currentRoot=null;l.viewState.defaultParent=null;l.setName(f);l=this.insertPage(l,mxUtils.indexOf(this.pages,b)+1)}}catch(e){this.handleError(e)}return l};EditorUi.prototype.initDiagramNode=function(b){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(b.root));this.editor.graph.saveViewState(b.viewState,f);mxUtils.setTextContent(b.node,Graph.compressNode(f))};
EditorUi.prototype.clonePages=function(b){for(var f=[],l=0;l<b.length;l++)f.push(this.clonePage(b[l]));return f};EditorUi.prototype.clonePage=function(b){this.updatePageRoot(b);var f=new DiagramPage(b.node.cloneNode(!0)),l=b==this.currentPage?this.editor.graph.getViewState():b.viewState;f.viewState=mxUtils.clone(l,EditorUi.transientViewStateProperties);f.root=this.editor.graph.model.cloneCell(b.root,null,!0);return f};
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var f=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(l){null!=l&&0<l.length&&this.editor.graph.model.execute(new RenamePage(this,b,l))}),mxResources.get("rename"));this.showDialog(f.container,300,80,!0,!0);f.init()}return b};EditorUi.prototype.movePage=function(b,f){this.editor.graph.model.execute(new MovePage(this,b,f))};
@@ -12713,99 +12713,99 @@ EditorUi.prototype.createTabContainer=function(){var b=document.createElement("d
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,f=document.createElement("div");f.style.position="relative";f.style.display="inline-block";f.style.verticalAlign="top";f.style.height=this.tabContainer.style.height;f.style.whiteSpace="nowrap";f.style.overflow="hidden";f.style.fontSize="13px";f.style.marginLeft="30px";for(var l=this.editor.isChromelessView()?29:59,d=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-l)/this.pages.length)+
1),t=null,u=0;u<this.pages.length;u++)mxUtils.bind(this,function(g,k){this.pages[g]==this.currentPage?(k.className="geActivePage",k.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):k.className="geInactivePage";k.setAttribute("draggable","true");mxEvent.addListener(k,"dragstart",mxUtils.bind(this,function(m){b.isEnabled()?(mxClient.IS_FF&&m.dataTransfer.setData("Text","<diagram/>"),t=g):mxEvent.consume(m)}));mxEvent.addListener(k,"dragend",mxUtils.bind(this,function(m){t=null;m.stopPropagation();
m.preventDefault()}));mxEvent.addListener(k,"dragover",mxUtils.bind(this,function(m){null!=t&&(m.dataTransfer.dropEffect="move");m.stopPropagation();m.preventDefault()}));mxEvent.addListener(k,"drop",mxUtils.bind(this,function(m){null!=t&&g!=t&&this.movePage(t,g);m.stopPropagation();m.preventDefault()}));f.appendChild(k)})(u,this.createTabForPage(this.pages[u],d,this.pages[u]!=this.currentPage,u+1));this.tabContainer.innerHTML="";this.tabContainer.appendChild(f);d=this.createPageMenuTab();this.tabContainer.appendChild(d);
-d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(f.clientWidth>this.tabContainer.clientWidth-l){null!=d&&(d.style.position="absolute",d.style.right="0px",f.style.marginRight="30px");var D=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");D.style.position="absolute";D.style.right=this.editor.chromeless?"29px":"55px";D.style.fontSize="13pt";this.tabContainer.appendChild(D);var c=this.createControlTab(4,"&nbsp;&#10095;");c.style.position="absolute";
-c.style.right=this.editor.chromeless?"0px":"29px";c.style.fontSize="13pt";this.tabContainer.appendChild(c);var e=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));f.style.width=e+"px";mxEvent.addListener(D,"click",mxUtils.bind(this,function(g){f.scrollLeft-=Math.max(20,e-20);mxUtils.setOpacity(D,0<f.scrollLeft?100:50);mxUtils.setOpacity(c,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(g)}));mxUtils.setOpacity(D,0<f.scrollLeft?100:50);mxUtils.setOpacity(c,
-f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.addListener(c,"click",mxUtils.bind(this,function(g){f.scrollLeft+=Math.max(20,e-20);mxUtils.setOpacity(D,0<f.scrollLeft?100:50);mxUtils.setOpacity(c,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(g)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
+d=null;this.isPageInsertTabVisible()&&(d=this.createPageInsertTab(),this.tabContainer.appendChild(d));if(f.clientWidth>this.tabContainer.clientWidth-l){null!=d&&(d.style.position="absolute",d.style.right="0px",f.style.marginRight="30px");var E=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var c=this.createControlTab(4,"&nbsp;&#10095;");c.style.position="absolute";
+c.style.right=this.editor.chromeless?"0px":"29px";c.style.fontSize="13pt";this.tabContainer.appendChild(c);var e=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));f.style.width=e+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(g){f.scrollLeft-=Math.max(20,e-20);mxUtils.setOpacity(E,0<f.scrollLeft?100:50);mxUtils.setOpacity(c,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(g)}));mxUtils.setOpacity(E,0<f.scrollLeft?100:50);mxUtils.setOpacity(c,
+f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.addListener(c,"click",mxUtils.bind(this,function(g){f.scrollLeft+=Math.max(20,e-20);mxUtils.setOpacity(E,0<f.scrollLeft?100:50);mxUtils.setOpacity(c,f.scrollLeft<f.scrollWidth-f.clientWidth?100:50);mxEvent.consume(g)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
EditorUi.prototype.createTab=function(b){var f=document.createElement("div");f.style.display="inline-block";f.style.whiteSpace="nowrap";f.style.boxSizing="border-box";f.style.position="relative";f.style.overflow="hidden";f.style.textAlign="center";f.style.marginLeft="-1px";f.style.height=this.tabContainer.clientHeight+"px";f.style.padding="12px 4px 8px 4px";f.style.border=Editor.isDarkMode()?"1px solid #505759":"1px solid #e8eaed";f.style.borderTopStyle="none";f.style.borderBottomStyle="none";f.style.backgroundColor=
this.tabContainer.style.backgroundColor;f.style.cursor="move";f.style.color="gray";b&&(mxEvent.addListener(f,"mouseenter",mxUtils.bind(this,function(l){this.editor.graph.isMouseDown||(f.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(l))})),mxEvent.addListener(f,"mouseleave",mxUtils.bind(this,function(l){f.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(l)})));return f};
EditorUi.prototype.createControlTab=function(b,f,l){l=this.createTab(null!=l?l:!0);l.style.lineHeight=this.tabContainerHeight+"px";l.style.paddingTop=b+"px";l.style.cursor="pointer";l.style.width="30px";l.innerHTML=f;null!=l.firstChild&&null!=l.firstChild.style&&mxUtils.setOpacity(l.firstChild,40);return l};
EditorUi.prototype.createPageMenuTab=function(b,f){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var l=b.getElementsByTagName("div")[0];l.style.display="inline-block";l.style.marginTop="5px";l.style.width="21px";l.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(d){this.editor.graph.popupMenuHandler.hideMenu();
-var t=new mxPopupMenu(mxUtils.bind(this,function(c,e){var g=mxUtils.bind(this,function(){for(var v=0;v<this.pages.length;v++)mxUtils.bind(this,function(x){var A=c.addItem(this.pages[x].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[x])}),e),y=this.pages[x].getId();A.setAttribute("title",this.pages[x].getName()+" ("+(x+1)+"/"+this.pages.length+")"+(null!=y?" ["+y+"]":""));this.pages[x]==this.currentPage&&c.addCheckmark(A,Editor.checkmarkImage)})(v)}),k=mxUtils.bind(this,function(){c.addItem(mxResources.get("insertPage"),
+var t=new mxPopupMenu(mxUtils.bind(this,function(c,e){var g=mxUtils.bind(this,function(){for(var v=0;v<this.pages.length;v++)mxUtils.bind(this,function(x){var z=c.addItem(this.pages[x].getName(),null,mxUtils.bind(this,function(){this.selectPage(this.pages[x])}),e),y=this.pages[x].getId();z.setAttribute("title",this.pages[x].getName()+" ("+(x+1)+"/"+this.pages.length+")"+(null!=y?" ["+y+"]":""));this.pages[x]==this.currentPage&&c.addCheckmark(z,Editor.checkmarkImage)})(v)}),k=mxUtils.bind(this,function(){c.addItem(mxResources.get("insertPage"),
null,mxUtils.bind(this,function(){this.insertPage()}),e)});f||g();if(this.editor.graph.isEnabled()){f||(c.addSeparator(e),k());var m=this.currentPage;if(null!=m){c.addSeparator(e);var p=m.getName();c.addItem(mxResources.get("removeIt",[p]),null,mxUtils.bind(this,function(){this.removePage(m)}),e);c.addItem(mxResources.get("renameIt",[p]),null,mxUtils.bind(this,function(){this.renamePage(m,m.getName())}),e);f||c.addSeparator(e);c.addItem(mxResources.get("duplicateIt",[p]),null,mxUtils.bind(this,function(){this.duplicatePage(m,
-mxResources.get("copyOf",[m.getName()]))}),e)}}f&&(c.addSeparator(e),k(),c.addSeparator(e),g())}));t.div.className+=" geMenubarMenu";t.smartSeparators=!0;t.showDisabled=!0;t.autoExpand=!0;t.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(t,arguments);t.destroy()});var u=mxEvent.getClientX(d),D=mxEvent.getClientY(d);t.popup(u,D,null,d);this.setCurrentMenu(t);mxEvent.consume(d)}));return b};
+mxResources.get("copyOf",[m.getName()]))}),e)}}f&&(c.addSeparator(e),k(),c.addSeparator(e),g())}));t.div.className+=" geMenubarMenu";t.smartSeparators=!0;t.showDisabled=!0;t.autoExpand=!0;t.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(t,arguments);t.destroy()});var u=mxEvent.getClientX(d),E=mxEvent.getClientY(d);t.popup(u,E,null,d);this.setCurrentMenu(t);mxEvent.consume(d)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(l){this.insertPage();mxEvent.consume(l)}));var f=b.getElementsByTagName("div")[0];f.style.display="inline-block";f.style.width="21px";f.style.height="21px";return b};
EditorUi.prototype.createTabForPage=function(b,f,l,d){l=this.createTab(l);var t=b.getName()||mxResources.get("untitled"),u=b.getId();l.setAttribute("title",t+(null!=u?" ("+u+")":"")+" ["+d+"]");mxUtils.write(l,t);l.style.maxWidth=f+"px";l.style.width=f+"px";this.addTabListeners(b,l);42<f&&(l.style.textOverflow="ellipsis");return l};
EditorUi.prototype.addTabListeners=function(b,f){mxEvent.disableContextMenu(f);var l=this.editor.graph;mxEvent.addListener(f,"dblclick",mxUtils.bind(this,function(u){this.renamePage(b);mxEvent.consume(u)}));var d=!1,t=!1;mxEvent.addGestureListeners(f,mxUtils.bind(this,function(u){d=null!=this.currentMenu;t=b==this.currentPage;l.isMouseDown||t||this.selectPage(b)}),null,mxUtils.bind(this,function(u){if(l.isEnabled()&&!l.isMouseDown&&(mxEvent.isTouchEvent(u)&&t||mxEvent.isPopupTrigger(u))){l.popupMenuHandler.hideMenu();
-this.hideCurrentMenu();if(!mxEvent.isTouchEvent(u)||!d){var D=new mxPopupMenu(this.createPageMenu(b));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);this.resetCurrentMenu();D.destroy()});var c=mxEvent.getClientX(u),e=mxEvent.getClientY(u);D.popup(c,e,null,u);this.setCurrentMenu(D,f)}mxEvent.consume(u)}}))};
+this.hideCurrentMenu();if(!mxEvent.isTouchEvent(u)||!d){var E=new mxPopupMenu(this.createPageMenu(b));E.div.className+=" geMenubarMenu";E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);this.resetCurrentMenu();E.destroy()});var c=mxEvent.getClientX(u),e=mxEvent.getClientY(u);E.popup(c,e,null,u);this.setCurrentMenu(E,f)}mxEvent.consume(u)}}))};
EditorUi.prototype.getLinkForPage=function(b,f,l){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var d=this.getCurrentFile();if(null!=d&&d.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var t=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));t+=(0==t.length?"?":"&")+"page-id="+b.getId();null!=f&&(t+="&"+f.join("&"));return(l&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
EditorUi.drawHost:"https://"+window.location.host)+"/"+t+"#"+d.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(b,f){return mxUtils.bind(this,function(l,d){var t=this.editor.graph;l.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),d);l.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),d);l.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,f)}),d);null!=this.getLinkForPage(b)&&(l.addSeparator(d),l.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(u,D,c,e,g,k){u=this.createUrlParameters(u,D,c,e,g,k);c||u.push("hide-pages=1");t.isSelectionEmpty()||(c=t.getBoundingBox(t.getSelectionCells()),D=t.view.translate,g=t.view.scale,c.width/=g,c.height/=g,c.x=c.x/g-D.x,c.y=c.y/g-D.y,u.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(c.x),y:Math.round(c.y),width:Math.round(c.width),height:Math.round(c.height),border:100}))));
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(u,E,c,e,g,k){u=this.createUrlParameters(u,E,c,e,g,k);c||u.push("hide-pages=1");t.isSelectionEmpty()||(c=t.getBoundingBox(t.getSelectionCells()),E=t.view.translate,g=t.view.scale,c.width/=g,c.height/=g,c.x=c.x/g-E.x,c.y=c.y/g-E.y,u.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(c.x),y:Math.round(c.y),width:Math.round(c.width),height:Math.round(c.height),border:100}))));
e=new EmbedDialog(this,this.getLinkForPage(b,u,e));this.showDialog(e.container,450,240,!0,!0);e.init()}))})));l.addSeparator(d);l.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),d);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(l.addSeparator(d),l.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),d))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(f){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};b.afterDecode=function(f,l,d){f=d.oldIndex;d.oldIndex=d.newIndex;d.newIndex=f;return d};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(f,l,d){d.ui=f.ui;return l};b.afterDecode=function(f,l,d){f=d.previous;d.previous=d.name;d.name=f;return d};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new ChangePage,"ui relatedPage index neverShown page previousPage".split(" "));b.afterEncode=function(f,l,d){d.setAttribute("relatedPage",l.relatedPage.getId());null==l.index&&(d.setAttribute("name",l.relatedPage.getName()),null!=l.relatedPage.viewState&&d.setAttribute("viewState",JSON.stringify(l.relatedPage.viewState,function(t,u){return 0>mxUtils.indexOf(EditorUi.transientViewStateProperties,t)?u:void 0})),null!=l.relatedPage.root&&f.encodeCell(l.relatedPage.root,
d));return d};b.beforeDecode=function(f,l,d){d.ui=f.ui;d.relatedPage=d.ui.getPageById(l.getAttribute("relatedPage"));if(null==d.relatedPage){var t=l.ownerDocument.createElement("diagram");t.setAttribute("id",l.getAttribute("relatedPage"));t.setAttribute("name",l.getAttribute("name"));d.relatedPage=new DiagramPage(t);t=l.getAttribute("viewState");null!=t&&(d.relatedPage.viewState=JSON.parse(t),l.removeAttribute("viewState"));l=l.cloneNode(!0);t=l.firstChild;if(null!=t)for(d.relatedPage.root=f.decodeCell(t,
-!1),d=t.nextSibling,t.parentNode.removeChild(t),t=d;null!=t;){d=t.nextSibling;if(t.nodeType==mxConstants.NODETYPE_ELEMENT){var u=t.getAttribute("id");null==f.lookup(u)&&f.decodeCell(t)}t.parentNode.removeChild(t);t=d}}return l};b.afterDecode=function(f,l,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(d,t,u,D,c){t=null!=t?t:!1;null==u&&(u=this.getFoldableCells(this.getSelectionCells(),d));this.stopEditing();this.model.beginUpdate();try{for(var e=u.slice(),g=0;g<u.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(u[g]),"treeFolding","0")&&this.foldTreeCell(d,u[g]);u=e;u=b.apply(this,arguments)}finally{this.model.endUpdate()}return u};Graph.prototype.foldTreeCell=
-function(d,t){this.model.beginUpdate();try{var u=[];this.traverse(t,!0,mxUtils.bind(this,function(c,e){var g=null!=e&&this.isTreeEdge(e);g&&u.push(e);c==t||null!=e&&!g||u.push(c);return(null==e||g)&&(c==t||!this.model.isCollapsed(c))}));this.model.setCollapsed(t,d);for(var D=0;D<u.length;D++)this.model.setVisible(u[D],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,t,u,D,c,e){return this.model.filterCells(this.getEdges(d,
-t,u,D,c,e),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(d,t){return this.getTreeEdges(d,t,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,t){return this.getTreeEdges(d,t,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(J){return A.isVertex(J)&&u(J)}function t(J){var R=
-!1;null!=J&&(R="1"==x.getCurrentCellStyle(J).treeMoving);return R}function u(J){var R=!1;null!=J&&(J=A.getParent(J),R=x.view.getState(J),R="tree"==(null!=R?R.style:x.getCellStyle(J)).containerType);return R}function D(J){var R=!1;null!=J&&(J=A.getParent(J),R=x.view.getState(J),x.view.getState(J),R=null!=(null!=R?R.style:x.getCellStyle(J)).childLayout);return R}function c(J){J=x.view.getState(J);if(null!=J){var R=x.getIncomingTreeEdges(J.cell);if(0<R.length&&(R=x.view.getState(R[0]),null!=R&&(R=R.absolutePoints,
+!1),d=t.nextSibling,t.parentNode.removeChild(t),t=d;null!=t;){d=t.nextSibling;if(t.nodeType==mxConstants.NODETYPE_ELEMENT){var u=t.getAttribute("id");null==f.lookup(u)&&f.decodeCell(t)}t.parentNode.removeChild(t);t=d}}return l};b.afterDecode=function(f,l,d){d.index=d.previousIndex;return d};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(d,t,u,E,c){t=null!=t?t:!1;null==u&&(u=this.getFoldableCells(this.getSelectionCells(),d));this.stopEditing();this.model.beginUpdate();try{for(var e=u.slice(),g=0;g<u.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(u[g]),"treeFolding","0")&&this.foldTreeCell(d,u[g]);u=e;u=b.apply(this,arguments)}finally{this.model.endUpdate()}return u};Graph.prototype.foldTreeCell=
+function(d,t){this.model.beginUpdate();try{var u=[];this.traverse(t,!0,mxUtils.bind(this,function(c,e){var g=null!=e&&this.isTreeEdge(e);g&&u.push(e);c==t||null!=e&&!g||u.push(c);return(null==e||g)&&(c==t||!this.model.isCollapsed(c))}));this.model.setCollapsed(t,d);for(var E=0;E<u.length;E++)this.model.setVisible(u[E],!d)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(d){return!this.isEdgeIgnored(d)};Graph.prototype.getTreeEdges=function(d,t,u,E,c,e){return this.model.filterCells(this.getEdges(d,
+t,u,E,c,e),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(d,t){return this.getTreeEdges(d,t,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(d,t){return this.getTreeEdges(d,t,!1,!0,!1)};var f=EditorUi.prototype.init;EditorUi.prototype.init=function(){f.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function d(J){return z.isVertex(J)&&u(J)}function t(J){var R=
+!1;null!=J&&(R="1"==x.getCurrentCellStyle(J).treeMoving);return R}function u(J){var R=!1;null!=J&&(J=z.getParent(J),R=x.view.getState(J),R="tree"==(null!=R?R.style:x.getCellStyle(J)).containerType);return R}function E(J){var R=!1;null!=J&&(J=z.getParent(J),R=x.view.getState(J),x.view.getState(J),R=null!=(null!=R?R.style:x.getCellStyle(J)).childLayout);return R}function c(J){J=x.view.getState(J);if(null!=J){var R=x.getIncomingTreeEdges(J.cell);if(0<R.length&&(R=x.view.getState(R[0]),null!=R&&(R=R.absolutePoints,
null!=R&&0<R.length&&(R=R[R.length-1],null!=R)))){if(R.y==J.y&&Math.abs(R.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_SOUTH;if(R.y==J.y+J.height&&Math.abs(R.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_NORTH;if(R.x>J.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function e(J,R){R=null!=R?R:!0;x.model.beginUpdate();try{var W=x.model.getParent(J),O=x.getIncomingTreeEdges(J),V=x.cloneCells([O[0],J]);x.model.setTerminal(V[0],x.model.getTerminal(O[0],
-!0),!0);var U=c(J),X=W.geometry;U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=R?J.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=R?J.geometry.height+10:-V[1].geometry.height-10;x.view.currentRoot!=W&&(V[1].geometry.x-=X.x,V[1].geometry.y-=X.y);var n=x.view.getState(J),E=x.view.scale;if(null!=n){var I=mxRectangle.fromRectangle(n);U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?I.x+=(R?J.geometry.width+10:-V[1].geometry.width-10)*E:I.y+=(R?
-J.geometry.height+10:-V[1].geometry.height-10)*E;var S=x.getOutgoingTreeEdges(x.model.getTerminal(O[0],!0));if(null!=S){for(var Q=U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH,P=X=O=0;P<S.length;P++){var T=x.model.getTerminal(S[P],!1);if(U==c(T)){var Y=x.view.getState(T);T!=J&&null!=Y&&(Q&&R!=Y.getCenterX()<n.getCenterX()||!Q&&R!=Y.getCenterY()<n.getCenterY())&&mxUtils.intersects(I,Y)&&(O=10+Math.max(O,(Math.min(I.x+I.width,Y.x+Y.width)-Math.max(I.x,Y.x))/E),X=10+Math.max(X,(Math.min(I.y+
-I.height,Y.y+Y.height)-Math.max(I.y,Y.y))/E))}}Q?X=0:O=0;for(P=0;P<S.length;P++)if(T=x.model.getTerminal(S[P],!1),U==c(T)&&(Y=x.view.getState(T),T!=J&&null!=Y&&(Q&&R!=Y.getCenterX()<n.getCenterX()||!Q&&R!=Y.getCenterY()<n.getCenterY()))){var ca=[];x.traverse(Y.cell,!0,function(ia,Z){var fa=null!=Z&&x.isTreeEdge(Z);fa&&ca.push(Z);(null==Z||fa)&&ca.push(ia);return null==Z||fa});x.moveCells(ca,(R?1:-1)*O,(R?1:-1)*X)}}}return x.addCells(V,W)}finally{x.model.endUpdate()}}function g(J){x.model.beginUpdate();
-try{var R=c(J),W=x.getIncomingTreeEdges(J),O=x.cloneCells([W[0],J]);x.model.setTerminal(W[0],O[1],!1);x.model.setTerminal(O[0],O[1],!0);x.model.setTerminal(O[0],J,!1);var V=x.model.getParent(J),U=V.geometry,X=[];x.view.currentRoot!=V&&(O[1].geometry.x-=U.x,O[1].geometry.y-=U.y);x.traverse(J,!0,function(I,S){var Q=null!=S&&x.isTreeEdge(S);Q&&X.push(S);(null==S||Q)&&X.push(I);return null==S||Q});var n=J.geometry.width+40,E=J.geometry.height+40;R==mxConstants.DIRECTION_SOUTH?n=0:R==mxConstants.DIRECTION_NORTH?
-(n=0,E=-E):R==mxConstants.DIRECTION_WEST?(n=-n,E=0):R==mxConstants.DIRECTION_EAST&&(E=0);x.moveCells(X,n,E);return x.addCells(O,V)}finally{x.model.endUpdate()}}function k(J,R){x.model.beginUpdate();try{var W=x.model.getParent(J),O=x.getIncomingTreeEdges(J),V=c(J);0==O.length&&(O=[x.createEdge(W,null,"",null,null,x.createCurrentEdgeStyle())],V=R);var U=x.cloneCells([O[0],J]);x.model.setTerminal(U[0],J,!0);if(null==x.model.getTerminal(U[0],!1)){x.model.setTerminal(U[0],U[1],!1);var X=x.getCellStyle(U[1]).newEdgeStyle;
-if(null!=X)try{var n=JSON.parse(X),E;for(E in n)x.setCellStyles(E,n[E],[U[0]]),"edgeStyle"==E&&"elbowEdgeStyle"==n[E]&&x.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[U[0]])}catch(Y){}}O=x.getOutgoingTreeEdges(J);var I=W.geometry;R=[];x.view.currentRoot==W&&(I=new mxRectangle);for(X=0;X<O.length;X++){var S=x.model.getTerminal(O[X],!1);null!=S&&R.push(S)}var Q=x.view.getBounds(R),P=x.view.translate,T=x.view.scale;V==mxConstants.DIRECTION_SOUTH?
+!0),!0);var U=c(J),Y=W.geometry;U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?V[1].geometry.x+=R?J.geometry.width+10:-V[1].geometry.width-10:V[1].geometry.y+=R?J.geometry.height+10:-V[1].geometry.height-10;x.view.currentRoot!=W&&(V[1].geometry.x-=Y.x,V[1].geometry.y-=Y.y);var n=x.view.getState(J),D=x.view.scale;if(null!=n){var I=mxRectangle.fromRectangle(n);U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH?I.x+=(R?J.geometry.width+10:-V[1].geometry.width-10)*D:I.y+=(R?
+J.geometry.height+10:-V[1].geometry.height-10)*D;var S=x.getOutgoingTreeEdges(x.model.getTerminal(O[0],!0));if(null!=S){for(var Q=U==mxConstants.DIRECTION_SOUTH||U==mxConstants.DIRECTION_NORTH,P=Y=O=0;P<S.length;P++){var T=x.model.getTerminal(S[P],!1);if(U==c(T)){var X=x.view.getState(T);T!=J&&null!=X&&(Q&&R!=X.getCenterX()<n.getCenterX()||!Q&&R!=X.getCenterY()<n.getCenterY())&&mxUtils.intersects(I,X)&&(O=10+Math.max(O,(Math.min(I.x+I.width,X.x+X.width)-Math.max(I.x,X.x))/D),Y=10+Math.max(Y,(Math.min(I.y+
+I.height,X.y+X.height)-Math.max(I.y,X.y))/D))}}Q?Y=0:O=0;for(P=0;P<S.length;P++)if(T=x.model.getTerminal(S[P],!1),U==c(T)&&(X=x.view.getState(T),T!=J&&null!=X&&(Q&&R!=X.getCenterX()<n.getCenterX()||!Q&&R!=X.getCenterY()<n.getCenterY()))){var ba=[];x.traverse(X.cell,!0,function(ja,Z){var ka=null!=Z&&x.isTreeEdge(Z);ka&&ba.push(Z);(null==Z||ka)&&ba.push(ja);return null==Z||ka});x.moveCells(ba,(R?1:-1)*O,(R?1:-1)*Y)}}}return x.addCells(V,W)}finally{x.model.endUpdate()}}function g(J){x.model.beginUpdate();
+try{var R=c(J),W=x.getIncomingTreeEdges(J),O=x.cloneCells([W[0],J]);x.model.setTerminal(W[0],O[1],!1);x.model.setTerminal(O[0],O[1],!0);x.model.setTerminal(O[0],J,!1);var V=x.model.getParent(J),U=V.geometry,Y=[];x.view.currentRoot!=V&&(O[1].geometry.x-=U.x,O[1].geometry.y-=U.y);x.traverse(J,!0,function(I,S){var Q=null!=S&&x.isTreeEdge(S);Q&&Y.push(S);(null==S||Q)&&Y.push(I);return null==S||Q});var n=J.geometry.width+40,D=J.geometry.height+40;R==mxConstants.DIRECTION_SOUTH?n=0:R==mxConstants.DIRECTION_NORTH?
+(n=0,D=-D):R==mxConstants.DIRECTION_WEST?(n=-n,D=0):R==mxConstants.DIRECTION_EAST&&(D=0);x.moveCells(Y,n,D);return x.addCells(O,V)}finally{x.model.endUpdate()}}function k(J,R){x.model.beginUpdate();try{var W=x.model.getParent(J),O=x.getIncomingTreeEdges(J),V=c(J);0==O.length&&(O=[x.createEdge(W,null,"",null,null,x.createCurrentEdgeStyle())],V=R);var U=x.cloneCells([O[0],J]);x.model.setTerminal(U[0],J,!0);if(null==x.model.getTerminal(U[0],!1)){x.model.setTerminal(U[0],U[1],!1);var Y=x.getCellStyle(U[1]).newEdgeStyle;
+if(null!=Y)try{var n=JSON.parse(Y),D;for(D in n)x.setCellStyles(D,n[D],[U[0]]),"edgeStyle"==D&&"elbowEdgeStyle"==n[D]&&x.setCellStyles("elbow",V==mxConstants.DIRECTION_SOUTH||V==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[U[0]])}catch(X){}}O=x.getOutgoingTreeEdges(J);var I=W.geometry;R=[];x.view.currentRoot==W&&(I=new mxRectangle);for(Y=0;Y<O.length;Y++){var S=x.model.getTerminal(O[Y],!1);null!=S&&R.push(S)}var Q=x.view.getBounds(R),P=x.view.translate,T=x.view.scale;V==mxConstants.DIRECTION_SOUTH?
(U[1].geometry.x=null==Q?J.geometry.x+(J.geometry.width-U[1].geometry.width)/2:(Q.x+Q.width)/T-P.x-I.x+10,U[1].geometry.y+=U[1].geometry.height-I.y+40):V==mxConstants.DIRECTION_NORTH?(U[1].geometry.x=null==Q?J.geometry.x+(J.geometry.width-U[1].geometry.width)/2:(Q.x+Q.width)/T-P.x+-I.x+10,U[1].geometry.y-=U[1].geometry.height+I.y+40):(U[1].geometry.x=V==mxConstants.DIRECTION_WEST?U[1].geometry.x-(U[1].geometry.width+I.x+40):U[1].geometry.x+(U[1].geometry.width-I.x+40),U[1].geometry.y=null==Q?J.geometry.y+
-(J.geometry.height-U[1].geometry.height)/2:(Q.y+Q.height)/T-P.y+-I.y+10);return x.addCells(U,W)}finally{x.model.endUpdate()}}function m(J,R,W){J=x.getOutgoingTreeEdges(J);W=x.view.getState(W);var O=[];if(null!=W&&null!=J){for(var V=0;V<J.length;V++){var U=x.view.getState(x.model.getTerminal(J[V],!1));null!=U&&(!R&&Math.min(U.x+U.width,W.x+W.width)>=Math.max(U.x,W.x)||R&&Math.min(U.y+U.height,W.y+W.height)>=Math.max(U.y,W.y))&&O.push(U)}O.sort(function(X,n){return R?X.x+X.width-n.x-n.width:X.y+X.height-
+(J.geometry.height-U[1].geometry.height)/2:(Q.y+Q.height)/T-P.y+-I.y+10);return x.addCells(U,W)}finally{x.model.endUpdate()}}function m(J,R,W){J=x.getOutgoingTreeEdges(J);W=x.view.getState(W);var O=[];if(null!=W&&null!=J){for(var V=0;V<J.length;V++){var U=x.view.getState(x.model.getTerminal(J[V],!1));null!=U&&(!R&&Math.min(U.x+U.width,W.x+W.width)>=Math.max(U.x,W.x)||R&&Math.min(U.y+U.height,W.y+W.height)>=Math.max(U.y,W.y))&&O.push(U)}O.sort(function(Y,n){return R?Y.x+Y.width-n.x-n.width:Y.y+Y.height-
n.y-n.height})}return O}function p(J,R){var W=c(J),O=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST;(W==mxConstants.DIRECTION_EAST||W==mxConstants.DIRECTION_WEST)==O&&W!=R?v.actions.get("selectParent").funct():W==R?(R=x.getOutgoingTreeEdges(J),null!=R&&0<R.length&&x.setSelectionCell(x.model.getTerminal(R[0],!1))):(W=x.getIncomingTreeEdges(J),null!=W&&0<W.length&&(O=m(x.model.getTerminal(W[0],!0),O,J),J=x.view.getState(J),null!=J&&(J=mxUtils.indexOf(O,J),0<=J&&(J+=R==mxConstants.DIRECTION_NORTH||
-R==mxConstants.DIRECTION_WEST?-1:1,0<=J&&J<=O.length-1&&x.setSelectionCell(O[J].cell)))))}var v=this,x=v.editor.graph,A=x.getModel(),y=v.menus.createPopupMenu;v.menus.createPopupMenu=function(J,R,W){y.apply(this,arguments);if(1==x.getSelectionCount()){R=x.getSelectionCell();var O=x.getOutgoingTreeEdges(R);J.addSeparator();0<O.length&&(d(x.getSelectionCell())&&this.addMenuItems(J,["selectChildren"],null,W),this.addMenuItems(J,["selectDescendants"],null,W));d(x.getSelectionCell())?(J.addSeparator(),
+R==mxConstants.DIRECTION_WEST?-1:1,0<=J&&J<=O.length-1&&x.setSelectionCell(O[J].cell)))))}var v=this,x=v.editor.graph,z=x.getModel(),y=v.menus.createPopupMenu;v.menus.createPopupMenu=function(J,R,W){y.apply(this,arguments);if(1==x.getSelectionCount()){R=x.getSelectionCell();var O=x.getOutgoingTreeEdges(R);J.addSeparator();0<O.length&&(d(x.getSelectionCell())&&this.addMenuItems(J,["selectChildren"],null,W),this.addMenuItems(J,["selectDescendants"],null,W));d(x.getSelectionCell())?(J.addSeparator(),
0<x.getIncomingTreeEdges(R).length&&this.addMenuItems(J,["selectSiblings","selectParent"],null,W)):0<x.model.getEdgeCount(R)&&this.addMenuItems(J,["selectConnections"],null,W)}};v.actions.addAction("selectChildren",function(){if(x.isEnabled()&&1==x.getSelectionCount()){var J=x.getSelectionCell();J=x.getOutgoingTreeEdges(J);if(null!=J){for(var R=[],W=0;W<J.length;W++)R.push(x.model.getTerminal(J[W],!1));x.setSelectionCells(R)}}},null,null,"Alt+Shift+X");v.actions.addAction("selectSiblings",function(){if(x.isEnabled()&&
1==x.getSelectionCount()){var J=x.getSelectionCell();J=x.getIncomingTreeEdges(J);if(null!=J&&0<J.length&&(J=x.getOutgoingTreeEdges(x.model.getTerminal(J[0],!0)),null!=J)){for(var R=[],W=0;W<J.length;W++)R.push(x.model.getTerminal(J[W],!1));x.setSelectionCells(R)}}},null,null,"Alt+Shift+S");v.actions.addAction("selectParent",function(){if(x.isEnabled()&&1==x.getSelectionCount()){var J=x.getSelectionCell();J=x.getIncomingTreeEdges(J);null!=J&&0<J.length&&x.setSelectionCell(x.model.getTerminal(J[0],
!0))}},null,null,"Alt+Shift+P");v.actions.addAction("selectDescendants",function(J,R){J=x.getSelectionCell();if(x.isEnabled()&&x.model.isVertex(J)){if(null!=R&&mxEvent.isAltDown(R))x.setSelectionCells(x.model.getTreeEdges(J,null==R||!mxEvent.isShiftDown(R),null==R||!mxEvent.isControlDown(R)));else{var W=[];x.traverse(J,!0,function(O,V){var U=null!=V&&x.isTreeEdge(V);U&&W.push(V);null!=V&&!U||null!=R&&mxEvent.isShiftDown(R)||W.push(O);return null==V||U})}x.setSelectionCells(W)}},null,null,"Alt+Shift+D");
-var L=x.removeCells;x.removeCells=function(J,R){R=null!=R?R:!0;null==J&&(J=this.getDeletableCells(this.getSelectionCells()));R&&(J=this.getDeletableCells(this.addAllEdges(J)));for(var W=[],O=0;O<J.length;O++){var V=J[O];A.isEdge(V)&&u(V)&&(W.push(V),V=A.getTerminal(V,!1));if(d(V)){var U=[];x.traverse(V,!0,function(X,n){var E=null!=n&&x.isTreeEdge(n);E&&U.push(n);(null==n||E)&&U.push(X);return null==n||E});0<U.length&&(W=W.concat(U),V=x.getIncomingTreeEdges(J[O]),J=J.concat(V))}else null!=V&&W.push(J[O])}J=
-W;return L.apply(this,arguments)};v.hoverIcons.getStateAt=function(J,R,W){return d(J.cell)?null:this.graph.view.getState(this.graph.getCellAt(R,W))};var N=x.duplicateCells;x.duplicateCells=function(J,R){J=null!=J?J:this.getSelectionCells();for(var W=J.slice(0),O=0;O<W.length;O++){var V=x.view.getState(W[O]);if(null!=V&&d(V.cell)){var U=x.getIncomingTreeEdges(V.cell);for(V=0;V<U.length;V++)mxUtils.remove(U[V],J)}}this.model.beginUpdate();try{var X=N.call(this,J,R);if(X.length==J.length)for(O=0;O<J.length;O++)if(d(J[O])){var n=
-x.getIncomingTreeEdges(X[O]);U=x.getIncomingTreeEdges(J[O]);if(0==n.length&&0<U.length){var E=this.cloneCell(U[0]);this.addEdge(E,x.getDefaultParent(),this.model.getTerminal(U[0],!0),X[O])}}}finally{this.model.endUpdate()}return X};var K=x.moveCells;x.moveCells=function(J,R,W,O,V,U,X){var n=null;this.model.beginUpdate();try{var E=V,I=this.getCurrentCellStyle(V);if(null!=J&&d(V)&&"1"==mxUtils.getValue(I,"treeFolding","0")){for(var S=0;S<J.length;S++)if(d(J[S])||x.model.isEdge(J[S])&&null==x.model.getTerminal(J[S],
-!0)){V=x.model.getParent(J[S]);break}if(null!=E&&V!=E&&null!=this.view.getState(J[0])){var Q=x.getIncomingTreeEdges(J[0]);if(0<Q.length){var P=x.view.getState(x.model.getTerminal(Q[0],!0));if(null!=P){var T=x.view.getState(E);null!=T&&(R=(T.getCenterX()-P.getCenterX())/x.view.scale,W=(T.getCenterY()-P.getCenterY())/x.view.scale)}}}}n=K.apply(this,arguments);if(null!=n&&null!=J&&n.length==J.length)for(S=0;S<n.length;S++)if(this.model.isEdge(n[S]))d(E)&&0>mxUtils.indexOf(n,this.model.getTerminal(n[S],
-!0))&&this.model.setTerminal(n[S],E,!0);else if(d(J[S])&&(Q=x.getIncomingTreeEdges(J[S]),0<Q.length))if(!O)d(E)&&0>mxUtils.indexOf(J,this.model.getTerminal(Q[0],!0))&&this.model.setTerminal(Q[0],E,!0);else if(0==x.getIncomingTreeEdges(n[S]).length){I=E;if(null==I||I==x.model.getParent(J[S]))I=x.model.getTerminal(Q[0],!0);O=this.cloneCell(Q[0]);this.addEdge(O,x.getDefaultParent(),I,n[S])}}finally{this.model.endUpdate()}return n};if(null!=v.sidebar){var q=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=
-function(J,R,W,O){var V=x.model,U=null;V.beginUpdate();try{if(U=q.apply(this,arguments),d(J))for(var X=0;X<U.length;X++)if(V.isEdge(U[X])&&null==V.getTerminal(U[X],!0)){V.setTerminal(U[X],J,!0);var n=x.getCellGeometry(U[X]);n.points=null;null!=n.getTerminalPoint(!0)&&n.setTerminalPoint(null,!0)}}finally{V.endUpdate()}return U}}var C={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},z=v.onKeyDown;v.onKeyDown=function(J){try{if(x.isEnabled()&&
+var L=x.removeCells;x.removeCells=function(J,R){R=null!=R?R:!0;null==J&&(J=this.getDeletableCells(this.getSelectionCells()));R&&(J=this.getDeletableCells(this.addAllEdges(J)));for(var W=[],O=0;O<J.length;O++){var V=J[O];z.isEdge(V)&&u(V)&&(W.push(V),V=z.getTerminal(V,!1));if(d(V)){var U=[];x.traverse(V,!0,function(Y,n){var D=null!=n&&x.isTreeEdge(n);D&&U.push(n);(null==n||D)&&U.push(Y);return null==n||D});0<U.length&&(W=W.concat(U),V=x.getIncomingTreeEdges(J[O]),J=J.concat(V))}else null!=V&&W.push(J[O])}J=
+W;return L.apply(this,arguments)};v.hoverIcons.getStateAt=function(J,R,W){return d(J.cell)?null:this.graph.view.getState(this.graph.getCellAt(R,W))};var N=x.duplicateCells;x.duplicateCells=function(J,R){J=null!=J?J:this.getSelectionCells();for(var W=J.slice(0),O=0;O<W.length;O++){var V=x.view.getState(W[O]);if(null!=V&&d(V.cell)){var U=x.getIncomingTreeEdges(V.cell);for(V=0;V<U.length;V++)mxUtils.remove(U[V],J)}}this.model.beginUpdate();try{var Y=N.call(this,J,R);if(Y.length==J.length)for(O=0;O<J.length;O++)if(d(J[O])){var n=
+x.getIncomingTreeEdges(Y[O]);U=x.getIncomingTreeEdges(J[O]);if(0==n.length&&0<U.length){var D=this.cloneCell(U[0]);this.addEdge(D,x.getDefaultParent(),this.model.getTerminal(U[0],!0),Y[O])}}}finally{this.model.endUpdate()}return Y};var K=x.moveCells;x.moveCells=function(J,R,W,O,V,U,Y){var n=null;this.model.beginUpdate();try{var D=V,I=this.getCurrentCellStyle(V);if(null!=J&&d(V)&&"1"==mxUtils.getValue(I,"treeFolding","0")){for(var S=0;S<J.length;S++)if(d(J[S])||x.model.isEdge(J[S])&&null==x.model.getTerminal(J[S],
+!0)){V=x.model.getParent(J[S]);break}if(null!=D&&V!=D&&null!=this.view.getState(J[0])){var Q=x.getIncomingTreeEdges(J[0]);if(0<Q.length){var P=x.view.getState(x.model.getTerminal(Q[0],!0));if(null!=P){var T=x.view.getState(D);null!=T&&(R=(T.getCenterX()-P.getCenterX())/x.view.scale,W=(T.getCenterY()-P.getCenterY())/x.view.scale)}}}}n=K.apply(this,arguments);if(null!=n&&null!=J&&n.length==J.length)for(S=0;S<n.length;S++)if(this.model.isEdge(n[S]))d(D)&&0>mxUtils.indexOf(n,this.model.getTerminal(n[S],
+!0))&&this.model.setTerminal(n[S],D,!0);else if(d(J[S])&&(Q=x.getIncomingTreeEdges(J[S]),0<Q.length))if(!O)d(D)&&0>mxUtils.indexOf(J,this.model.getTerminal(Q[0],!0))&&this.model.setTerminal(Q[0],D,!0);else if(0==x.getIncomingTreeEdges(n[S]).length){I=D;if(null==I||I==x.model.getParent(J[S]))I=x.model.getTerminal(Q[0],!0);O=this.cloneCell(Q[0]);this.addEdge(O,x.getDefaultParent(),I,n[S])}}finally{this.model.endUpdate()}return n};if(null!=v.sidebar){var q=v.sidebar.dropAndConnect;v.sidebar.dropAndConnect=
+function(J,R,W,O){var V=x.model,U=null;V.beginUpdate();try{if(U=q.apply(this,arguments),d(J))for(var Y=0;Y<U.length;Y++)if(V.isEdge(U[Y])&&null==V.getTerminal(U[Y],!0)){V.setTerminal(U[Y],J,!0);var n=x.getCellGeometry(U[Y]);n.points=null;null!=n.getTerminalPoint(!0)&&n.setTerminalPoint(null,!0)}}finally{V.endUpdate()}return U}}var C={88:v.actions.get("selectChildren"),84:v.actions.get("selectSubtree"),80:v.actions.get("selectParent"),83:v.actions.get("selectSiblings")},A=v.onKeyDown;v.onKeyDown=function(J){try{if(x.isEnabled()&&
!x.isEditing()&&d(x.getSelectionCell())&&1==x.getSelectionCount()){var R=null;0<x.getIncomingTreeEdges(x.getSelectionCell()).length&&(9==J.which?R=mxEvent.isShiftDown(J)?g(x.getSelectionCell()):k(x.getSelectionCell()):13==J.which&&(R=e(x.getSelectionCell(),!mxEvent.isShiftDown(J))));if(null!=R&&0<R.length)1==R.length&&x.model.isEdge(R[0])?x.setSelectionCell(x.model.getTerminal(R[0],!1)):x.setSelectionCell(R[R.length-1]),null!=v.hoverIcons&&v.hoverIcons.update(x.view.getState(x.getSelectionCell())),
x.startEditingAtCell(x.getSelectionCell()),mxEvent.consume(J);else if(mxEvent.isAltDown(J)&&mxEvent.isShiftDown(J)){var W=C[J.keyCode];null!=W&&(W.funct(J),mxEvent.consume(J))}else 37==J.keyCode?(p(x.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(J)):38==J.keyCode?(p(x.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(J)):39==J.keyCode?(p(x.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(J)):40==J.keyCode&&(p(x.getSelectionCell(),mxConstants.DIRECTION_SOUTH),
-mxEvent.consume(J))}}catch(O){v.handleError(O)}mxEvent.isConsumed(J)||z.apply(this,arguments)};var B=x.connectVertex;x.connectVertex=function(J,R,W,O,V,U,X){var n=x.getIncomingTreeEdges(J);if(d(J)){var E=c(J),I=E==mxConstants.DIRECTION_EAST||E==mxConstants.DIRECTION_WEST,S=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST;return E==R||0==n.length?k(J,R):I==S?g(J):e(J,R!=mxConstants.DIRECTION_NORTH&&R!=mxConstants.DIRECTION_WEST)}return B.apply(this,arguments)};x.getSubtree=function(J){var R=
-[J];!t(J)&&!d(J)||D(J)||x.traverse(J,!0,function(W,O){var V=null!=O&&x.isTreeEdge(O);V&&0>mxUtils.indexOf(R,O)&&R.push(O);(null==O||V)&&0>mxUtils.indexOf(R,W)&&R.push(W);return null==O||V});return R};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(t(this.state.cell)||d(this.state.cell))&&!D(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
+mxEvent.consume(J))}}catch(O){v.handleError(O)}mxEvent.isConsumed(J)||A.apply(this,arguments)};var B=x.connectVertex;x.connectVertex=function(J,R,W,O,V,U,Y){var n=x.getIncomingTreeEdges(J);if(d(J)){var D=c(J),I=D==mxConstants.DIRECTION_EAST||D==mxConstants.DIRECTION_WEST,S=R==mxConstants.DIRECTION_EAST||R==mxConstants.DIRECTION_WEST;return D==R||0==n.length?k(J,R):I==S?g(J):e(J,R!=mxConstants.DIRECTION_NORTH&&R!=mxConstants.DIRECTION_WEST)}return B.apply(this,arguments)};x.getSubtree=function(J){var R=
+[J];!t(J)&&!d(J)||E(J)||x.traverse(J,!0,function(W,O){var V=null!=O&&x.isTreeEdge(O);V&&0>mxUtils.indexOf(R,O)&&R.push(O);(null==O||V)&&0>mxUtils.indexOf(R,W)&&R.push(W);return null==O||V});return R};var G=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){G.apply(this,arguments);(t(this.state.cell)||d(this.state.cell))&&!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title",
"Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(J){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(J),mxEvent.getClientY(J),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(J);
this.graph.isMouseDown=!0;v.hoverIcons.reset();mxEvent.consume(J)})))};var M=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){M.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var H=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(J){H.apply(this,
arguments);null!=this.moveHandle&&(this.moveHandle.style.display=J?"":"none")};var F=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(J,R){F.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var l=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var d=l.apply(this,arguments),t=this.graph;return d.concat([this.addEntry("tree container",
-function(){var u=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");u.vertex=!0;var D=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.vertex=!0;var c=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;D.insertEdge(e,!0);c.insertEdge(e,!1);u.insert(e);u.insert(D);u.insert(c);return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var u=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
-u.vertex=!0;var D=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');D.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;D.insertEdge(e,!0);c.insertEdge(e,!1);var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-g.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");k.geometry.relative=!0;k.edge=!0;D.insertEdge(k,!0);g.insertEdge(k,!1);var m=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-m.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;D.insertEdge(p,!0);m.insertEdge(p,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-v.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");x.geometry.relative=!0;x.edge=!0;D.insertEdge(x,!0);v.insertEdge(x,!1);u.insert(e);u.insert(k);u.insert(p);u.insert(x);u.insert(D);u.insert(c);u.insert(g);u.insert(m);u.insert(v);return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var u=new mxCell("Central Idea",
+function(){var u=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");u.vertex=!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');E.vertex=!0;var c=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;E.insertEdge(e,!0);c.insertEdge(e,!1);u.insert(e);u.insert(E);u.insert(c);return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var u=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");
+u.vertex=!0;var E=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');E.vertex=!0;var c=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");e.geometry.relative=!0;e.edge=!0;E.insertEdge(e,!0);c.insertEdge(e,!1);var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+g.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");k.geometry.relative=!0;k.edge=!0;E.insertEdge(k,!0);g.insertEdge(k,!1);var m=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+m.vertex=!0;var p=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");p.geometry.relative=!0;p.edge=!0;E.insertEdge(p,!0);m.insertEdge(p,!1);var v=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+v.vertex=!0;var x=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");x.geometry.relative=!0;x.edge=!0;E.insertEdge(x,!0);v.insertEdge(x,!1);u.insert(e);u.insert(k);u.insert(p);u.insert(x);u.insert(E);u.insert(c);u.insert(g);u.insert(m);u.insert(v);return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var u=new mxCell("Central Idea",
new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');u.vertex=!0;return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var u=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-u.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");D.geometry.setTerminalPoint(new mxPoint(-40,40),!0);D.geometry.relative=!0;D.edge=!0;u.insertEdge(D,!1);return sb.createVertexTemplateFromCells([u,D],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var u=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
-u.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");D.geometry.setTerminalPoint(new mxPoint(-40,40),!0);D.geometry.relative=!0;D.edge=!0;u.insertEdge(D,!1);return sb.createVertexTemplateFromCells([u,D],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree orgchart organization division",function(){var u=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-u.vertex=!0;var D=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.setAttributeForCell(D,"treeRoot","1");D.vertex=!0;var c=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;D.insertEdge(e,!0);c.insertEdge(e,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');g.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-k.geometry.relative=!0;k.edge=!0;D.insertEdge(k,!0);g.insertEdge(k,!1);u.insert(e);u.insert(k);u.insert(D);u.insert(c);u.insert(g);return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree root",function(){var u=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.setAttributeForCell(u,"treeRoot",
-"1");u.vertex=!0;return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree division",function(){var u=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-D.geometry.setTerminalPoint(new mxPoint(0,0),!0);D.geometry.relative=!0;D.edge=!0;u.insertEdge(D,!1);return sb.createVertexTemplateFromCells([u,D],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree sub sections",function(){var u=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");u.vertex=!0;var D=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
-D.geometry.setTerminalPoint(new mxPoint(110,-40),!0);D.geometry.relative=!0;D.edge=!0;u.insertEdge(D,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");e.geometry.setTerminalPoint(new mxPoint(110,-40),!0);e.geometry.relative=
-!0;e.edge=!0;c.insertEdge(e,!1);return sb.createVertexTemplateFromCells([D,e,u,c],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(z,B){if(EditorUi.windowed){var G=z.editor.graph;G.popupMenuHandler.hideMenu();if(null==z.formatWindow){B="1"==urlParams.sketch?Math.max(10,z.diagramContainer.clientWidth-241):Math.max(10,z.diagramContainer.clientWidth-248);var M="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;G="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,G.container.clientHeight-10);z.formatWindow=new u(z,mxResources.get("format"),B,M,240,G,function(F){var J=
-z.createFormat(F);J.init();z.addListener("darkModeChanged",mxUtils.bind(this,function(){J.refresh()}));return J});z.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){z.formatWindow.window.fit()}));z.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else z.formatWindow.window.setVisible(null!=B?B:!z.formatWindow.window.isVisible())}else{if(null==z.formatElt){z.formatElt=t();var H=z.createFormat(z.formatElt);H.init();z.formatElt.style.border="none";z.formatElt.style.width=
-"240px";z.formatElt.style.borderLeft="1px solid gray";z.formatElt.style.right="0px";z.addListener("darkModeChanged",mxUtils.bind(this,function(){H.refresh()}))}G=z.diagramContainer.parentNode;null!=z.formatElt.parentNode?(z.formatElt.parentNode.removeChild(z.formatElt),G.style.right="0px"):(G.parentNode.appendChild(z.formatElt),G.style.right=z.formatElt.style.width)}}function f(z,B){function G(J,R){var W=z.menus.get(J);J=F.addMenu(R,mxUtils.bind(this,function(){W.funct.apply(this,arguments)}));J.style.cssText=
+u.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;u.insertEdge(E,!1);return sb.createVertexTemplateFromCells([u,E],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var u=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
+u.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;u.insertEdge(E,!1);return sb.createVertexTemplateFromCells([u,E],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree orgchart organization division",function(){var u=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+u.vertex=!0;var E=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var c=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
+c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");e.geometry.relative=!0;e.edge=!0;E.insertEdge(e,!0);c.insertEdge(e,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');g.vertex=!0;var k=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+k.geometry.relative=!0;k.edge=!0;E.insertEdge(k,!0);g.insertEdge(k,!1);u.insert(e);u.insert(k);u.insert(E);u.insert(c);u.insert(g);return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree root",function(){var u=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.setAttributeForCell(u,"treeRoot",
+"1");u.vertex=!0;return sb.createVertexTemplateFromCells([u],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree division",function(){var u=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');u.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;u.insertEdge(E,!1);return sb.createVertexTemplateFromCells([u,E],u.geometry.width,u.geometry.height,u.value)}),this.addEntry("tree sub sections",function(){var u=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");u.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
+E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;u.insertEdge(E,!1);var c=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");c.vertex=!0;var e=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");e.geometry.setTerminalPoint(new mxPoint(110,-40),!0);e.geometry.relative=
+!0;e.edge=!0;c.insertEdge(e,!1);return sb.createVertexTemplateFromCells([E,e,u,c],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
+EditorUi.initMinimalTheme=function(){function b(A,B){if(EditorUi.windowed){var G=A.editor.graph;G.popupMenuHandler.hideMenu();if(null==A.formatWindow){B="1"==urlParams.sketch?Math.max(10,A.diagramContainer.clientWidth-241):Math.max(10,A.diagramContainer.clientWidth-248);var M="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;G="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,G.container.clientHeight-10);A.formatWindow=new u(A,mxResources.get("format"),B,M,240,G,function(F){var J=
+A.createFormat(F);J.init();A.addListener("darkModeChanged",mxUtils.bind(this,function(){J.refresh()}));return J});A.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){A.formatWindow.window.fit()}));A.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else A.formatWindow.window.setVisible(null!=B?B:!A.formatWindow.window.isVisible())}else{if(null==A.formatElt){A.formatElt=t();var H=A.createFormat(A.formatElt);H.init();A.formatElt.style.border="none";A.formatElt.style.width=
+"240px";A.formatElt.style.borderLeft="1px solid gray";A.formatElt.style.right="0px";A.addListener("darkModeChanged",mxUtils.bind(this,function(){H.refresh()}))}G=A.diagramContainer.parentNode;null!=A.formatElt.parentNode?(A.formatElt.parentNode.removeChild(A.formatElt),G.style.right="0px"):(G.parentNode.appendChild(A.formatElt),G.style.right=A.formatElt.style.width)}}function f(A,B){function G(J,R){var W=A.menus.get(J);J=F.addMenu(R,mxUtils.bind(this,function(){W.funct.apply(this,arguments)}));J.style.cssText=
"position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";J.className="geTitle";B.appendChild(J);return J}var M=document.createElement("div");M.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";M.className="geTitle";var H=document.createElement("span");H.style.fontSize="18px";H.style.marginRight="5px";
-H.innerHTML="+";M.appendChild(H);mxUtils.write(M,mxResources.get("moreShapes"));B.appendChild(M);mxEvent.addListener(M,"click",function(){z.actions.get("shapes").funct()});var F=new Menubar(z,B);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?M.style.bottom="0":null!=z.actions.get("newLibrary")?(M=document.createElement("div"),M.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
-M.className="geTitle",H=document.createElement("span"),H.style.cssText="position:relative;top:6px;",mxUtils.write(H,mxResources.get("newLibrary")),M.appendChild(H),B.appendChild(M),mxEvent.addListener(M,"click",z.actions.get("newLibrary").funct),M=document.createElement("div"),M.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",M.className="geTitle",H=document.createElement("span"),
-H.style.cssText="position:relative;top:6px;",mxUtils.write(H,mxResources.get("openLibrary")),M.appendChild(H),B.appendChild(M),mxEvent.addListener(M,"click",z.actions.get("openLibrary").funct)):(M=G("newLibrary",mxResources.get("newLibrary")),M.style.boxSizing="border-box",M.style.paddingRight="6px",M.style.paddingLeft="6px",M.style.height="32px",M.style.left="0",M=G("openLibraryFrom",mxResources.get("openLibraryFrom")),M.style.borderLeft="1px solid lightgray",M.style.boxSizing="border-box",M.style.paddingRight=
-"6px",M.style.paddingLeft="6px",M.style.height="32px",M.style.left="50%");B.appendChild(z.sidebar.container);B.style.overflow="hidden"}function l(z,B){if(EditorUi.windowed){var G=z.editor.graph;G.popupMenuHandler.hideMenu();if(null==z.sidebarWindow){B=Math.min(G.container.clientWidth-10,218);var M="1"==urlParams.embedInline?650:Math.min(G.container.clientHeight-40,650);z.sidebarWindow=new u(z,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&
-"1"!=urlParams.embedInline?Math.max(30,(G.container.clientHeight-M)/2):56,B-6,M-6,function(H){f(z,H)});z.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){z.sidebarWindow.window.fit()}));z.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);z.sidebarWindow.window.setVisible(!0);z.getLocalData("sidebar",function(H){z.sidebar.showEntries(H,null,!0)});z.restoreLibraries()}else z.sidebarWindow.window.setVisible(null!=B?B:!z.sidebarWindow.window.isVisible())}else null==
-z.sidebarElt&&(z.sidebarElt=t(),f(z,z.sidebarElt),z.sidebarElt.style.border="none",z.sidebarElt.style.width="210px",z.sidebarElt.style.borderRight="1px solid gray"),G=z.diagramContainer.parentNode,null!=z.sidebarElt.parentNode?(z.sidebarElt.parentNode.removeChild(z.sidebarElt),G.style.left="0px"):(G.parentNode.appendChild(z.sidebarElt),G.style.left=z.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=
-null;else{var d=0;try{d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(z){}var t=function(){var z=document.createElement("div");z.className="geSidebarContainer";z.style.position="absolute";z.style.width="100%";z.style.height="100%";z.style.border="1px solid whiteSmoke";z.style.overflowX="hidden";z.style.overflowY="auto";return z},u=function(z,B,G,M,H,F,J){var R=t();J(R);this.window=new mxWindow(B,R,G,M,H,F,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
+H.innerHTML="+";M.appendChild(H);mxUtils.write(M,mxResources.get("moreShapes"));B.appendChild(M);mxEvent.addListener(M,"click",function(){A.actions.get("shapes").funct()});var F=new Menubar(A,B);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?M.style.bottom="0":null!=A.actions.get("newLibrary")?(M=document.createElement("div"),M.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
+M.className="geTitle",H=document.createElement("span"),H.style.cssText="position:relative;top:6px;",mxUtils.write(H,mxResources.get("newLibrary")),M.appendChild(H),B.appendChild(M),mxEvent.addListener(M,"click",A.actions.get("newLibrary").funct),M=document.createElement("div"),M.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",M.className="geTitle",H=document.createElement("span"),
+H.style.cssText="position:relative;top:6px;",mxUtils.write(H,mxResources.get("openLibrary")),M.appendChild(H),B.appendChild(M),mxEvent.addListener(M,"click",A.actions.get("openLibrary").funct)):(M=G("newLibrary",mxResources.get("newLibrary")),M.style.boxSizing="border-box",M.style.paddingRight="6px",M.style.paddingLeft="6px",M.style.height="32px",M.style.left="0",M=G("openLibraryFrom",mxResources.get("openLibraryFrom")),M.style.borderLeft="1px solid lightgray",M.style.boxSizing="border-box",M.style.paddingRight=
+"6px",M.style.paddingLeft="6px",M.style.height="32px",M.style.left="50%");B.appendChild(A.sidebar.container);B.style.overflow="hidden"}function l(A,B){if(EditorUi.windowed){var G=A.editor.graph;G.popupMenuHandler.hideMenu();if(null==A.sidebarWindow){B=Math.min(G.container.clientWidth-10,218);var M="1"==urlParams.embedInline?650:Math.min(G.container.clientHeight-40,650);A.sidebarWindow=new u(A,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&
+"1"!=urlParams.embedInline?Math.max(30,(G.container.clientHeight-M)/2):56,B-6,M-6,function(H){f(A,H)});A.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){A.sidebarWindow.window.fit()}));A.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);A.sidebarWindow.window.setVisible(!0);A.getLocalData("sidebar",function(H){A.sidebar.showEntries(H,null,!0)});A.restoreLibraries()}else A.sidebarWindow.window.setVisible(null!=B?B:!A.sidebarWindow.window.isVisible())}else null==
+A.sidebarElt&&(A.sidebarElt=t(),f(A,A.sidebarElt),A.sidebarElt.style.border="none",A.sidebarElt.style.width="210px",A.sidebarElt.style.borderRight="1px solid gray"),G=A.diagramContainer.parentNode,null!=A.sidebarElt.parentNode?(A.sidebarElt.parentNode.removeChild(A.sidebarElt),G.style.left="0px"):(G.parentNode.appendChild(A.sidebarElt),G.style.left=A.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=
+null;else{var d=0;try{d=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(A){}var t=function(){var A=document.createElement("div");A.className="geSidebarContainer";A.style.position="absolute";A.style.width="100%";A.style.height="100%";A.style.border="1px solid whiteSmoke";A.style.overflowX="hidden";A.style.overflowY="auto";return A},u=function(A,B,G,M,H,F,J){var R=t();J(R);this.window=new mxWindow(B,R,G,M,H,F,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(W,O){var V=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,U=this.table.firstChild.firstChild.firstChild;W=Math.max(0,Math.min(W,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-U.clientWidth-2));O=Math.max(0,Math.min(O,V-U.clientHeight-2));this.getX()==W&&this.getY()==O||mxWindow.prototype.setLocation.apply(this,
-arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(W){null==W&&(W=window.event);return null!=W&&z.isSelectionAllowed(W)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
+arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(W){null==W&&(W=window.event);return null!=W&&A.isSelectionAllowed(W)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;
mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
"0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;
-EditorUi.prototype.setDarkMode=function(z){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(z);null==urlParams.dark&&(mxSettings.settings.darkMode=z,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var D=document.createElement("link");D.setAttribute("rel","stylesheet");D.setAttribute("href",STYLE_PATH+"/dark.css");D.setAttribute("charset","UTF-8");D.setAttribute("type",
-"text/css");EditorUi.prototype.doSetDarkMode=function(z){if(Editor.darkMode!=z){var B=this.editor.graph;Editor.darkMode=z;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";B.view.gridColor=Editor.isDarkMode()?B.view.defaultDarkGridColor:B.view.defaultGridColor;B.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";B.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";B.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:
-"#ffffff";B.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";B.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";B.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";B.loadStylesheet();null!=this.actions.layersWindow&&(z=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
-this.actions.layersWindow=null,z&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=B.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=B.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=B.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=
+EditorUi.prototype.setDarkMode=function(A){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(A);null==urlParams.dark&&(mxSettings.settings.darkMode=A,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var E=document.createElement("link");E.setAttribute("rel","stylesheet");E.setAttribute("href",STYLE_PATH+"/dark.css");E.setAttribute("charset","UTF-8");E.setAttribute("type",
+"text/css");EditorUi.prototype.doSetDarkMode=function(A){if(Editor.darkMode!=A){var B=this.editor.graph;Editor.darkMode=A;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";B.view.gridColor=Editor.isDarkMode()?B.view.defaultDarkGridColor:B.view.defaultGridColor;B.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";B.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";B.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:
+"#ffffff";B.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";B.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";B.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";B.loadStylesheet();null!=this.actions.layersWindow&&(A=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
+this.actions.layersWindow=null,A&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=B.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=B.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=B.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=
B.shapeForegroundColor;Graph.prototype.defaultThemeName=B.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?
-Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;c.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==D.parentNode&&document.getElementsByTagName("head")[0].appendChild(D):null!=D.parentNode&&D.parentNode.removeChild(D)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?
+Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;c.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==E.parentNode&&document.getElementsByTagName("head")[0].appendChild(E):null!=E.parentNode&&E.parentNode.removeChild(E)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?
"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+
@@ -12814,139 +12814,139 @@ Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMo
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var c=document.createElement("style");c.type="text/css";c.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(c);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var e=EditorUi.prototype.updateTabContainer;
-EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");e.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var k=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(z,
-B){null!=B.shortcut&&900>d&&!mxClient.IS_IOS?z.firstChild.nextSibling.setAttribute("title",B.shortcut):k.apply(this,arguments)};var m=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){m.apply(this,arguments);if(null!=this.userElement){var z=this.userElement;z.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+z.style.display;z.className="geToolbarButton";z.innerHTML="";z.style.backgroundImage="url("+Editor.userImage+")";z.style.backgroundPosition="center center";
-z.style.backgroundRepeat="no-repeat";z.style.backgroundSize="24px 24px";z.style.height="24px";z.style.width="24px";z.style.cssFloat="right";z.setAttribute("title",mxResources.get("changeUser"));if("none"!=z.style.display){z.style.display="inline-block";var B=this.getCurrentFile();if(null!=B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()){var G=document.createElement("img");G.setAttribute("border","0");G.style.position="absolute";G.style.left="18px";G.style.top="2px";G.style.width="12px";G.style.height=
-"12px";var M=B.getRealtimeError();B=B.getRealtimeState();var H=mxResources.get("realtimeCollaboration");1==B?(G.src=Editor.syncImage,H+=" ("+mxResources.get("online")+")"):(G.src=Editor.syncProblemImage,H=null!=M&&null!=M.message?H+(" ("+M.message+")"):H+(" ("+mxResources.get("disconnected")+")"));G.setAttribute("title",H);z.style.paddingRight="4px";z.appendChild(G)}}}};var p=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){p.apply(this,arguments);if(null!=this.shareButton){var z=
-this.shareButton;z.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";z.className="geToolbarButton";z.innerHTML="";z.style.backgroundImage="url("+Editor.shareImage+")";z.style.backgroundPosition="center center";z.style.backgroundRepeat="no-repeat";z.style.backgroundSize="24px 24px";z.style.height="24px";z.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
-"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var z=document.createElement("div");z.style.display="inline-block";z.style.position="relative";z.style.marginTop="6px";z.style.marginRight="4px";var B=document.createElement("a");B.className="geMenuItem gePrimaryBtn";B.style.marginLeft="8px";B.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var G="1"==urlParams.publishClose?
-mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(B,G);B.setAttribute("title",G);mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));z.appendChild(B)}}else mxUtils.write(B,mxResources.get("save")),B.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),z.appendChild(B),"1"==urlParams.saveAndExit&&(B=document.createElement("a"),
-mxUtils.write(B,mxResources.get("saveAndExit")),B.setAttribute("title",mxResources.get("saveAndExit")),B.className="geMenuItem",B.style.marginLeft="6px",B.style.padding="6px",mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),z.appendChild(B));"1"!=urlParams.noExitBtn&&(B=document.createElement("a"),G="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(B,G),B.setAttribute("title",G),B.className="geMenuItem",
-B.style.marginLeft="6px",B.style.padding="6px",mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),z.appendChild(B));this.buttonContainer.appendChild(z);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var v=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(z,B){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,z)){var G=mxUtils.getOffset(this.editorUi.picker);
-G.x+=this.editorUi.picker.offsetWidth+4;G.y+=z.offsetTop-B.height/2+16;return G}var M=v.apply(this,arguments);G=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);M.x+=G.x-16;M.y+=G.y;return M};var x=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(z,B,G){var M=this.editorUi.editor.graph;z.smartSeparators=!0;x.apply(this,arguments);"1"==urlParams.sketch?M.isEnabled()&&(z.addSeparator(),1==M.getSelectionCount()&&this.addMenuItems(z,["-","lockUnlock"],null,G)):1==M.getSelectionCount()?
-(M.isCellFoldable(M.getSelectionCell())&&this.addMenuItems(z,M.isCellCollapsed(B)?["expand"]:["collapse"],null,G),this.addMenuItems(z,["collapsible","-","lockUnlock","enterGroup"],null,G),z.addSeparator(),this.addSubmenu("layout",z)):M.isSelectionEmpty()&&M.isEnabled()?(z.addSeparator(),this.addMenuItems(z,["editData"],null,G),z.addSeparator(),this.addSubmenu("layout",z),this.addSubmenu("insert",z),this.addMenuItems(z,["-","exitGroup"],null,G)):M.isEnabled()&&this.addMenuItems(z,["-","lockUnlock"],
-null,G)};var A=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(z,B,G){A.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(z,["copyAsImage"],null,G)};EditorUi.prototype.toggleFormatPanel=function(z){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=z?z:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var y=EditorUi.prototype.destroy;EditorUi.prototype.destroy=
+EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");e.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var k=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(A,
+B){null!=B.shortcut&&900>d&&!mxClient.IS_IOS?A.firstChild.nextSibling.setAttribute("title",B.shortcut):k.apply(this,arguments)};var m=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){m.apply(this,arguments);if(null!=this.userElement){var A=this.userElement;A.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+A.style.display;A.className="geToolbarButton";A.innerHTML="";A.style.backgroundImage="url("+Editor.userImage+")";A.style.backgroundPosition="center center";
+A.style.backgroundRepeat="no-repeat";A.style.backgroundSize="24px 24px";A.style.height="24px";A.style.width="24px";A.style.cssFloat="right";A.setAttribute("title",mxResources.get("changeUser"));if("none"!=A.style.display){A.style.display="inline-block";var B=this.getCurrentFile();if(null!=B&&B.isRealtimeEnabled()&&B.isRealtimeSupported()){var G=document.createElement("img");G.setAttribute("border","0");G.style.position="absolute";G.style.left="18px";G.style.top="2px";G.style.width="12px";G.style.height=
+"12px";var M=B.getRealtimeError();B=B.getRealtimeState();var H=mxResources.get("realtimeCollaboration");1==B?(G.src=Editor.syncImage,H+=" ("+mxResources.get("online")+")"):(G.src=Editor.syncProblemImage,H=null!=M&&null!=M.message?H+(" ("+M.message+")"):H+(" ("+mxResources.get("disconnected")+")"));G.setAttribute("title",H);A.style.paddingRight="4px";A.appendChild(G)}}}};var p=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){p.apply(this,arguments);if(null!=this.shareButton){var A=
+this.shareButton;A.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";A.className="geToolbarButton";A.innerHTML="";A.style.backgroundImage="url("+Editor.shareImage+")";A.style.backgroundPosition="center center";A.style.backgroundRepeat="no-repeat";A.style.backgroundSize="24px 24px";A.style.height="24px";A.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
+"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var A=document.createElement("div");A.style.display="inline-block";A.style.position="relative";A.style.marginTop="6px";A.style.marginRight="4px";var B=document.createElement("a");B.className="geMenuItem gePrimaryBtn";B.style.marginLeft="8px";B.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var G="1"==urlParams.publishClose?
+mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(B,G);B.setAttribute("title",G);mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));A.appendChild(B)}}else mxUtils.write(B,mxResources.get("save")),B.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),A.appendChild(B),"1"==urlParams.saveAndExit&&(B=document.createElement("a"),
+mxUtils.write(B,mxResources.get("saveAndExit")),B.setAttribute("title",mxResources.get("saveAndExit")),B.className="geMenuItem",B.style.marginLeft="6px",B.style.padding="6px",mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),A.appendChild(B));"1"!=urlParams.noExitBtn&&(B=document.createElement("a"),G="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(B,G),B.setAttribute("title",G),B.className="geMenuItem",
+B.style.marginLeft="6px",B.style.padding="6px",mxEvent.addListener(B,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),A.appendChild(B));this.buttonContainer.appendChild(A);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var v=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(A,B){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,A)){var G=mxUtils.getOffset(this.editorUi.picker);
+G.x+=this.editorUi.picker.offsetWidth+4;G.y+=A.offsetTop-B.height/2+16;return G}var M=v.apply(this,arguments);G=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);M.x+=G.x-16;M.y+=G.y;return M};var x=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(A,B,G){var M=this.editorUi.editor.graph;A.smartSeparators=!0;x.apply(this,arguments);"1"==urlParams.sketch?M.isEnabled()&&(A.addSeparator(),1==M.getSelectionCount()&&this.addMenuItems(A,["-","lockUnlock"],null,G)):1==M.getSelectionCount()?
+(M.isCellFoldable(M.getSelectionCell())&&this.addMenuItems(A,M.isCellCollapsed(B)?["expand"]:["collapse"],null,G),this.addMenuItems(A,["collapsible","-","lockUnlock","enterGroup"],null,G),A.addSeparator(),this.addSubmenu("layout",A)):M.isSelectionEmpty()&&M.isEnabled()?(A.addSeparator(),this.addMenuItems(A,["editData"],null,G),A.addSeparator(),this.addSubmenu("layout",A),this.addSubmenu("insert",A),this.addMenuItems(A,["-","exitGroup"],null,G)):M.isEnabled()&&this.addMenuItems(A,["-","lockUnlock"],
+null,G)};var z=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(A,B,G){z.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(A,["copyAsImage"],null,G)};EditorUi.prototype.toggleFormatPanel=function(A){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=A?A:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var y=EditorUi.prototype.destroy;EditorUi.prototype.destroy=
function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),
this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=
-null);y.apply(this,arguments)};var L=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(z){L.apply(this,arguments);if(z){var B=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=B&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=B||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
-null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var N=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(z){z=N.apply(this,arguments);var B=this.editorUi,G=B.editor.graph;if(G.isEnabled()&&"1"==urlParams.sketch){var M=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(H,F){B.setSketchMode(!Editor.sketchMode);null!=F&&mxEvent.isShiftDown(F)||G.updateCellStyles({sketch:H?
-"1":null},G.getVerticesAndEdges())},{install:function(H){this.listener=function(){H(Editor.sketchMode)};B.addListener("sketchModeChanged",this.listener)},destroy:function(){B.removeListener(this.listener)}});z.appendChild(M)}return z};var K=Menus.prototype.init;Menus.prototype.init=function(){K.apply(this,arguments);var z=this.editorUi,B=z.editor.graph;z.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";z.actions.get("createShape").label=mxResources.get("shape")+"...";z.actions.get("outline").label=
-mxResources.get("outline")+"...";z.actions.get("layers").label=mxResources.get("layers")+"...";z.actions.get("tags").label=mxResources.get("tags")+"...";z.actions.get("comments").label=mxResources.get("comments")+"...";var G=z.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(O){z.setDarkMode(!Editor.darkMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.isDarkMode()});G=z.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(O){z.setSketchMode(!Editor.sketchMode)}));
-G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.sketchMode});G=z.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(O){z.setPagesVisible(!Editor.pagesVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.pagesVisible});z.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){B.popupMenuHandler.hideMenu();z.showImportCsvDialog()}));z.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var O=
-new ParseDialog(z,"Insert from Text");z.showDialog(O.container,620,420,!0,!1);O.init()}));z.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var O=new ParseDialog(z,"Insert from Text","formatSql");z.showDialog(O.container,620,420,!0,!1);O.init()}));z.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){l(z)},null,null,Editor.ctrlKey+"+Shift+K"));z.actions.put("toggleFormat",new Action(mxResources.get("format")+
-"...",function(){b(z)})).shortcut=z.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!z.isOffline()&&z.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var O=new ParseDialog(z,mxResources.get("plantUml")+"...","plantUml");z.showDialog(O.container,620,420,!0,!1);O.init()}));z.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var O=new ParseDialog(z,mxResources.get("mermaid")+"...","mermaid");z.showDialog(O.container,620,420,!0,!1);
-O.init()}));var M=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(O,V){var U=this.editorUi.editor.graph,X=U.getSelectionCell();M.call(this,O,X,null,V);this.addMenuItems(O,["editTooltip"],V);U.model.isVertex(X)&&this.addMenuItems(O,["editGeometry"],V);this.addMenuItems(O,["-","edit"],V)})));this.addPopupMenuCellEditItems=function(O,V,U,X){O.addSeparator();this.addSubmenu("editCell",O,X,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(O,
-V){var U=z.getCurrentFile();z.menus.addMenuItems(O,["new"],V);z.menus.addSubmenu("openFrom",O,V);isLocalStorage&&this.addSubmenu("openRecent",O,V);O.addSeparator(V);null!=U&&U.constructor==DriveFile?z.menus.addMenuItems(O,["save","rename","makeCopy","moveToFolder"],V):(z.menus.addMenuItems(O,["save","saveAs","-","rename"],V),z.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(O,["upload"],V):z.menus.addMenuItems(O,["makeCopy"],V));O.addSeparator(V);
-null!=U&&(U.isRevisionHistorySupported()&&z.menus.addMenuItems(O,["revisionHistory"],V),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||U.constructor==LocalFile&&null==U.fileHandle||z.menus.addMenuItems(O,["synchronize"],V));z.menus.addMenuItems(O,["autosave"],V);if(null!=U&&(O.addSeparator(V),U.constructor==DriveFile&&z.menus.addMenuItems(O,["share"],V),null!=z.fileNode&&"1"!=urlParams.embedInline)){var X=null!=U.getTitle()?U.getTitle():z.defaultFilename;(U.constructor==DriveFile&&null!=U.sync&&U.sync.isConnected()||
-!/(\.html)$/i.test(X)&&!/(\.svg)$/i.test(X))&&this.addMenuItems(O,["-","properties"],V)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(O,V){var U=z.getCurrentFile();z.menus.addSubmenu("extras",O,V,mxResources.get("preferences"));O.addSeparator(V);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)z.menus.addMenuItems(O,"new open - synchronize - save saveAs -".split(" "),V);else if("1"==urlParams.embed||z.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&z.menus.addMenuItems(O,
-["-","save"],V);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||z.mode==App.MODE_ATLAS)z.menus.addMenuItems(O,["saveAndExit"],V),null!=U&&U.isRevisionHistorySupported()&&z.menus.addMenuItems(O,["revisionHistory"],V);O.addSeparator(V)}else z.mode==App.MODE_ATLAS?z.menus.addMenuItems(O,["save","synchronize","-"],V):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(z.menus.addMenuItems(O,["new"],V),z.menus.addSubmenu("openFrom",O,V),isLocalStorage&&this.addSubmenu("openRecent",
-O,V),O.addSeparator(V),null!=U&&(U.constructor==DriveFile&&z.menus.addMenuItems(O,["share"],V),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||U.constructor==LocalFile||z.menus.addMenuItems(O,["synchronize"],V)),O.addSeparator(V),z.menus.addSubmenu("save",O,V)):z.menus.addSubmenu("file",O,V));z.menus.addSubmenu("exportAs",O,V);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?z.menus.addMenuItems(O,["import"],V):"1"!=urlParams.noFileMenu&&z.menus.addSubmenu("importFrom",O,V);z.commentsSupported()&&z.menus.addMenuItems(O,
-["-","comments"],V);z.menus.addMenuItems(O,"- findReplace outline layers tags - pageSetup".split(" "),V);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||z.menus.addMenuItems(O,["print"],V);"1"!=urlParams.sketch&&null!=U&&null!=z.fileNode&&"1"!=urlParams.embedInline&&(U=null!=U.getTitle()?U.getTitle():z.defaultFilename,/(\.html)$/i.test(U)||/(\.svg)$/i.test(U)||this.addMenuItems(O,["-","properties"]));O.addSeparator(V);z.menus.addSubmenu("help",O,V);"1"==urlParams.embed||z.mode==
-App.MODE_ATLAS?("1"!=urlParams.noExitBtn||z.mode==App.MODE_ATLAS)&&z.menus.addMenuItems(O,["-","exit"],V):"1"!=urlParams.noFileMenu&&z.menus.addMenuItems(O,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(O,V){var U=z.getCurrentFile();null!=U&&U.constructor==DriveFile?z.menus.addMenuItems(O,["save","makeCopy","-","rename","moveToFolder"],V):(z.menus.addMenuItems(O,["save","saveAs","-","rename"],V),z.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&
-this.addMenuItems(O,["upload"],V):z.menus.addMenuItems(O,["makeCopy"],V));z.menus.addMenuItems(O,["-","autosave"],V);null!=U&&U.isRevisionHistorySupported()&&z.menus.addMenuItems(O,["-","revisionHistory"],V)})));var H=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(O,V){H.funct(O,V);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||z.menus.addMenuItems(O,["publishLink"],V);z.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(O.addSeparator(V),z.menus.addSubmenu("embed",O,V))})));
-var F=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(O,V){z.menus.addInsertTableCellItem(O,V)})));if("1"==urlParams.sketch){var J=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(O,V){J.funct(O,V);this.addMenuItems(O,["-","pageScale","-","ruler"],V)})))}this.put("extras",new Menu(mxUtils.bind(this,function(O,V){null!=F&&z.menus.addSubmenu("language",O,V);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&z.mode!=App.MODE_ATLAS&&z.menus.addSubmenu("theme",
-O,V);z.menus.addSubmenu("units",O,V);O.addSeparator(V);"1"!=urlParams.sketch&&z.menus.addMenuItems(O,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),V);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&z.mode!=App.MODE_ATLAS&&z.menus.addMenuItems(O,["-","showStartScreen","search","scratchpad"],V);O.addSeparator(V);"1"==urlParams.sketch?z.menus.addMenuItems(O,"configuration - copyConnect collapseExpand tooltips -".split(" "),
-V):(z.mode!=App.MODE_ATLAS&&z.menus.addMenuItem(O,"configuration",V),!z.isOfflineApp()&&isLocalStorage&&z.mode!=App.MODE_ATLAS&&z.menus.addMenuItem(O,"plugins",V));var U=z.getCurrentFile();null!=U&&U.isRealtimeEnabled()&&U.isRealtimeSupported()&&this.addMenuItems(O,["-","showRemoteCursors","shareCursor","-"],V);O.addSeparator(V);z.mode!=App.MODE_ATLAS&&this.addMenuItems(O,["fullscreen"],V);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(O,["toggleDarkMode"],
-V);O.addSeparator(V)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(O,V){z.menus.addMenuItems(O,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),V)})));mxUtils.bind(this,function(){var O=this.get("insert"),V=O.funct;O.funct=function(U,X){"1"==urlParams.sketch?(z.insertTemplateEnabled&&!z.isOffline()&&z.menus.addMenuItems(U,["insertTemplate"],X),z.menus.addMenuItems(U,["insertImage","insertLink","-"],X),z.menus.addSubmenu("insertAdvanced",
-U,X,mxResources.get("advanced")),z.menus.addSubmenu("layout",U,X)):(V.apply(this,arguments),z.menus.addSubmenu("table",U,X))}})();var R="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),W=function(O,V,U,X){O.addItem(U,null,mxUtils.bind(this,function(){var n=new CreateGraphDialog(z,U,X);z.showDialog(n.container,620,420,!0,!1);n.init()}),V)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(O,V){for(var U=0;U<R.length;U++)"-"==R[U]?O.addSeparator(V):
-W(O,V,mxResources.get(R[U])+"...",R[U])})))};EditorUi.prototype.installFormatToolbar=function(z){var B=this.editor.graph,G=document.createElement("div");G.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";B.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(M,H){0<B.getSelectionCount()?(z.appendChild(G),G.innerHTML="Selected: "+
-B.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var q=!1;EditorUi.prototype.initFormatWindow=function(){if(!q&&null!=this.formatWindow){q=!0;this.formatWindow.window.setClosable(!1);var z=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){z.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width=
-"240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(B){mxEvent.getSource(B)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var C=EditorUi.prototype.init;EditorUi.prototype.init=function(){function z(ba,da,na){var ka=F.menus.get(ba),ma=O.addMenu(mxResources.get(ba),mxUtils.bind(this,function(){ka.funct.apply(this,arguments)}),W);ma.className=
-"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ma.style.display="inline-block";ma.style.boxSizing="border-box";ma.style.top="6px";ma.style.marginRight="6px";ma.style.height="30px";ma.style.paddingTop="6px";ma.style.paddingBottom="6px";ma.style.cursor="pointer";ma.setAttribute("title",mxResources.get(ba));F.menus.menuCreated(ka,ma,"geMenuItem");null!=na?(ma.style.backgroundImage="url("+na+")",ma.style.backgroundPosition="center center",ma.style.backgroundRepeat="no-repeat",ma.style.backgroundSize=
-"24px 24px",ma.style.width="34px",ma.innerHTML=""):da||(ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",ma.style.backgroundPosition="right 6px center",ma.style.backgroundRepeat="no-repeat",ma.style.paddingRight="22px");return ma}function B(ba,da,na,ka,ma,sa){var ha=document.createElement("a");ha.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ha.style.display="inline-block";ha.style.boxSizing="border-box";ha.style.height="30px";ha.style.padding="6px";ha.style.position=
-"relative";ha.style.verticalAlign="top";ha.style.top="0px";"1"==urlParams.sketch&&(ha.style.borderStyle="none",ha.style.boxShadow="none",ha.style.padding="6px",ha.style.margin="0px");null!=F.statusContainer?R.insertBefore(ha,F.statusContainer):R.appendChild(ha);null!=sa?(ha.style.backgroundImage="url("+sa+")",ha.style.backgroundPosition="center center",ha.style.backgroundRepeat="no-repeat",ha.style.backgroundSize="24px 24px",ha.style.width="34px"):mxUtils.write(ha,ba);mxEvent.addListener(ha,mxClient.IS_POINTER?
-"pointerdown":"mousedown",mxUtils.bind(this,function(Ma){Ma.preventDefault()}));mxEvent.addListener(ha,"click",function(Ma){"disabled"!=ha.getAttribute("disabled")&&da(Ma);mxEvent.consume(Ma)});null==na&&(ha.style.marginRight="4px");null!=ka&&ha.setAttribute("title",ka);null!=ma&&(ba=function(){ma.isEnabled()?(ha.removeAttribute("disabled"),ha.style.cursor="pointer"):(ha.setAttribute("disabled","disabled"),ha.style.cursor="default")},ma.addListener("stateChanged",ba),J.addListener("enabledChanged",
-ba),ba());return ha}function G(ba,da,na){na=document.createElement("div");na.className="geMenuItem";na.style.display="inline-block";na.style.verticalAlign="top";na.style.marginRight="6px";na.style.padding="0 4px 0 4px";na.style.height="30px";na.style.position="relative";na.style.top="0px";"1"==urlParams.sketch&&(na.style.boxShadow="none");for(var ka=0;ka<ba.length;ka++)null!=ba[ka]&&("1"==urlParams.sketch&&(ba[ka].style.padding="10px 8px",ba[ka].style.width="30px"),ba[ka].style.margin="0px",ba[ka].style.boxShadow=
-"none",na.appendChild(ba[ka]));null!=da&&mxUtils.setOpacity(na,da);null!=F.statusContainer&&"1"!=urlParams.sketch?R.insertBefore(na,F.statusContainer):R.appendChild(na);return na}function M(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(Q.style.left=58>S.offsetTop-S.offsetHeight/2?"70px":"10px");else{for(var ba=R.firstChild;null!=ba;){var da=ba.nextSibling;"geMenuItem"!=ba.className&&"geItem"!=ba.className||ba.parentNode.removeChild(ba);ba=da}W=R.firstChild;d=window.innerWidth||document.documentElement.clientWidth||
-document.body.clientWidth;ba=1E3>d||"1"==urlParams.sketch;var na=null;ba||(na=z("diagram"));da=ba?z("diagram",null,Editor.drawLogoImage):null;null!=da&&(na=da);G([na,B(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),ba?Editor.shapesImage:null),B(mxResources.get("format"),F.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+F.actions.get("formatPanel").shortcut+")",F.actions.get("image"),ba?Editor.formatImage:null)],
-ba?60:null);da=z("insert",!0,ba?E:null);G([da,B(mxResources.get("delete"),F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),ba?Editor.trashImage:null)],ba?60:null);411<=d&&(G([Qa,Ia],60),520<=d&&G([ra,640<=d?B("",Ba.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Ba,Editor.zoomInImage):null,640<=d?B("",ua.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",ua,Editor.zoomOutImage):null],60))}null!=na&&(mxEvent.disableContextMenu(na),mxEvent.addGestureListeners(na,
-mxUtils.bind(this,function(ka){(mxEvent.isShiftDown(ka)||mxEvent.isAltDown(ka)||mxEvent.isMetaDown(ka)||mxEvent.isControlDown(ka)||mxEvent.isPopupTrigger(ka))&&F.appIconClicked(ka)}),null,null));da=F.menus.get("language");null!=da&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?(null==va&&(da=O.addMenu("",da.funct),da.setAttribute("title",mxResources.get("language")),da.className="geToolbarButton",da.style.backgroundImage="url("+Editor.globeImage+")",da.style.backgroundPosition=
-"center center",da.style.backgroundRepeat="no-repeat",da.style.backgroundSize="24px 24px",da.style.position="absolute",da.style.height="24px",da.style.width="24px",da.style.zIndex="1",da.style.right="8px",da.style.cursor="pointer",da.style.top="1"==urlParams.embed?"12px":"11px",R.appendChild(da),va=da),F.buttonContainer.style.paddingRight="34px"):(F.buttonContainer.style.paddingRight="4px",null!=va&&(va.parentNode.removeChild(va),va=null))}C.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=
+null);y.apply(this,arguments)};var L=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(A){L.apply(this,arguments);if(A){var B=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=B&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=B||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
+null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var N=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(A){A=N.apply(this,arguments);var B=this.editorUi,G=B.editor.graph;if(G.isEnabled()&&"1"==urlParams.sketch){var M=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(H,F){B.setSketchMode(!Editor.sketchMode);null!=F&&mxEvent.isShiftDown(F)||G.updateCellStyles({sketch:H?
+"1":null},G.getVerticesAndEdges())},{install:function(H){this.listener=function(){H(Editor.sketchMode)};B.addListener("sketchModeChanged",this.listener)},destroy:function(){B.removeListener(this.listener)}});A.appendChild(M)}return A};var K=Menus.prototype.init;Menus.prototype.init=function(){K.apply(this,arguments);var A=this.editorUi,B=A.editor.graph;A.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";A.actions.get("createShape").label=mxResources.get("shape")+"...";A.actions.get("outline").label=
+mxResources.get("outline")+"...";A.actions.get("layers").label=mxResources.get("layers")+"...";A.actions.get("tags").label=mxResources.get("tags")+"...";A.actions.get("comments").label=mxResources.get("comments")+"...";var G=A.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(O){A.setDarkMode(!Editor.darkMode)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.isDarkMode()});G=A.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(O){A.setSketchMode(!Editor.sketchMode)}));
+G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.sketchMode});G=A.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(O){A.setPagesVisible(!Editor.pagesVisible)}));G.setToggleAction(!0);G.setSelectedCallback(function(){return Editor.pagesVisible});A.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){B.popupMenuHandler.hideMenu();A.showImportCsvDialog()}));A.actions.put("importText",new Action(mxResources.get("text")+"...",function(){var O=
+new ParseDialog(A,"Insert from Text");A.showDialog(O.container,620,420,!0,!1);O.init()}));A.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var O=new ParseDialog(A,"Insert from Text","formatSql");A.showDialog(O.container,620,420,!0,!1);O.init()}));A.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){l(A)},null,null,Editor.ctrlKey+"+Shift+K"));A.actions.put("toggleFormat",new Action(mxResources.get("format")+
+"...",function(){b(A)})).shortcut=A.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!A.isOffline()&&A.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var O=new ParseDialog(A,mxResources.get("plantUml")+"...","plantUml");A.showDialog(O.container,620,420,!0,!1);O.init()}));A.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var O=new ParseDialog(A,mxResources.get("mermaid")+"...","mermaid");A.showDialog(O.container,620,420,!0,!1);
+O.init()}));var M=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(O,V){var U=this.editorUi.editor.graph,Y=U.getSelectionCell();M.call(this,O,Y,null,V);this.addMenuItems(O,["editTooltip"],V);U.model.isVertex(Y)&&this.addMenuItems(O,["editGeometry"],V);this.addMenuItems(O,["-","edit"],V)})));this.addPopupMenuCellEditItems=function(O,V,U,Y){O.addSeparator();this.addSubmenu("editCell",O,Y,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,function(O,
+V){var U=A.getCurrentFile();A.menus.addMenuItems(O,["new"],V);A.menus.addSubmenu("openFrom",O,V);isLocalStorage&&this.addSubmenu("openRecent",O,V);O.addSeparator(V);null!=U&&U.constructor==DriveFile?A.menus.addMenuItems(O,["save","rename","makeCopy","moveToFolder"],V):(A.menus.addMenuItems(O,["save","saveAs","-","rename"],V),A.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(O,["upload"],V):A.menus.addMenuItems(O,["makeCopy"],V));O.addSeparator(V);
+null!=U&&(U.isRevisionHistorySupported()&&A.menus.addMenuItems(O,["revisionHistory"],V),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||U.constructor==LocalFile&&null==U.fileHandle||A.menus.addMenuItems(O,["synchronize"],V));A.menus.addMenuItems(O,["autosave"],V);if(null!=U&&(O.addSeparator(V),U.constructor==DriveFile&&A.menus.addMenuItems(O,["share"],V),null!=A.fileNode&&"1"!=urlParams.embedInline)){var Y=null!=U.getTitle()?U.getTitle():A.defaultFilename;(U.constructor==DriveFile&&null!=U.sync&&U.sync.isConnected()||
+!/(\.html)$/i.test(Y)&&!/(\.svg)$/i.test(Y))&&this.addMenuItems(O,["-","properties"],V)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(O,V){var U=A.getCurrentFile();A.menus.addSubmenu("extras",O,V,mxResources.get("preferences"));O.addSeparator(V);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)A.menus.addMenuItems(O,"new open - synchronize - save saveAs -".split(" "),V);else if("1"==urlParams.embed||A.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&A.menus.addMenuItems(O,
+["-","save"],V);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||A.mode==App.MODE_ATLAS)A.menus.addMenuItems(O,["saveAndExit"],V),null!=U&&U.isRevisionHistorySupported()&&A.menus.addMenuItems(O,["revisionHistory"],V);O.addSeparator(V)}else A.mode==App.MODE_ATLAS?A.menus.addMenuItems(O,["save","synchronize","-"],V):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(A.menus.addMenuItems(O,["new"],V),A.menus.addSubmenu("openFrom",O,V),isLocalStorage&&this.addSubmenu("openRecent",
+O,V),O.addSeparator(V),null!=U&&(U.constructor==DriveFile&&A.menus.addMenuItems(O,["share"],V),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||U.constructor==LocalFile||A.menus.addMenuItems(O,["synchronize"],V)),O.addSeparator(V),A.menus.addSubmenu("save",O,V)):A.menus.addSubmenu("file",O,V));A.menus.addSubmenu("exportAs",O,V);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?A.menus.addMenuItems(O,["import"],V):"1"!=urlParams.noFileMenu&&A.menus.addSubmenu("importFrom",O,V);A.commentsSupported()&&A.menus.addMenuItems(O,
+["-","comments"],V);A.menus.addMenuItems(O,"- findReplace outline layers tags - pageSetup".split(" "),V);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||A.menus.addMenuItems(O,["print"],V);"1"!=urlParams.sketch&&null!=U&&null!=A.fileNode&&"1"!=urlParams.embedInline&&(U=null!=U.getTitle()?U.getTitle():A.defaultFilename,/(\.html)$/i.test(U)||/(\.svg)$/i.test(U)||this.addMenuItems(O,["-","properties"]));O.addSeparator(V);A.menus.addSubmenu("help",O,V);"1"==urlParams.embed||A.mode==
+App.MODE_ATLAS?("1"!=urlParams.noExitBtn||A.mode==App.MODE_ATLAS)&&A.menus.addMenuItems(O,["-","exit"],V):"1"!=urlParams.noFileMenu&&A.menus.addMenuItems(O,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(O,V){var U=A.getCurrentFile();null!=U&&U.constructor==DriveFile?A.menus.addMenuItems(O,["save","makeCopy","-","rename","moveToFolder"],V):(A.menus.addMenuItems(O,["save","saveAs","-","rename"],V),A.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&
+this.addMenuItems(O,["upload"],V):A.menus.addMenuItems(O,["makeCopy"],V));A.menus.addMenuItems(O,["-","autosave"],V);null!=U&&U.isRevisionHistorySupported()&&A.menus.addMenuItems(O,["-","revisionHistory"],V)})));var H=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(O,V){H.funct(O,V);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||A.menus.addMenuItems(O,["publishLink"],V);A.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(O.addSeparator(V),A.menus.addSubmenu("embed",O,V))})));
+var F=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(O,V){A.menus.addInsertTableCellItem(O,V)})));if("1"==urlParams.sketch){var J=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(O,V){J.funct(O,V);this.addMenuItems(O,["-","pageScale","-","ruler"],V)})))}this.put("extras",new Menu(mxUtils.bind(this,function(O,V){null!=F&&A.menus.addSubmenu("language",O,V);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&A.mode!=App.MODE_ATLAS&&A.menus.addSubmenu("theme",
+O,V);A.menus.addSubmenu("units",O,V);O.addSeparator(V);"1"!=urlParams.sketch&&A.menus.addMenuItems(O,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),V);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&A.mode!=App.MODE_ATLAS&&A.menus.addMenuItems(O,["-","showStartScreen","search","scratchpad"],V);O.addSeparator(V);"1"==urlParams.sketch?A.menus.addMenuItems(O,"configuration - copyConnect collapseExpand tooltips -".split(" "),
+V):(A.mode!=App.MODE_ATLAS&&A.menus.addMenuItem(O,"configuration",V),!A.isOfflineApp()&&isLocalStorage&&A.mode!=App.MODE_ATLAS&&A.menus.addMenuItem(O,"plugins",V));var U=A.getCurrentFile();null!=U&&U.isRealtimeEnabled()&&U.isRealtimeSupported()&&this.addMenuItems(O,["-","showRemoteCursors","shareCursor","-"],V);O.addSeparator(V);A.mode!=App.MODE_ATLAS&&this.addMenuItems(O,["fullscreen"],V);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(O,["toggleDarkMode"],
+V);O.addSeparator(V)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(O,V){A.menus.addMenuItems(O,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),V)})));mxUtils.bind(this,function(){var O=this.get("insert"),V=O.funct;O.funct=function(U,Y){"1"==urlParams.sketch?(A.insertTemplateEnabled&&!A.isOffline()&&A.menus.addMenuItems(U,["insertTemplate"],Y),A.menus.addMenuItems(U,["insertImage","insertLink","-"],Y),A.menus.addSubmenu("insertAdvanced",
+U,Y,mxResources.get("advanced")),A.menus.addSubmenu("layout",U,Y)):(V.apply(this,arguments),A.menus.addSubmenu("table",U,Y))}})();var R="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),W=function(O,V,U,Y){O.addItem(U,null,mxUtils.bind(this,function(){var n=new CreateGraphDialog(A,U,Y);A.showDialog(n.container,620,420,!0,!1);n.init()}),V)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(O,V){for(var U=0;U<R.length;U++)"-"==R[U]?O.addSeparator(V):
+W(O,V,mxResources.get(R[U])+"...",R[U])})))};EditorUi.prototype.installFormatToolbar=function(A){var B=this.editor.graph,G=document.createElement("div");G.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";B.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(M,H){0<B.getSelectionCount()?(A.appendChild(G),G.innerHTML="Selected: "+
+B.getSelectionCount()):null!=G.parentNode&&G.parentNode.removeChild(G)}))};var q=!1;EditorUi.prototype.initFormatWindow=function(){if(!q&&null!=this.formatWindow){q=!0;this.formatWindow.window.setClosable(!1);var A=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){A.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width=
+"240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(B){mxEvent.getSource(B)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var C=EditorUi.prototype.init;EditorUi.prototype.init=function(){function A(aa,ca,na){var la=F.menus.get(aa),oa=O.addMenu(mxResources.get(aa),mxUtils.bind(this,function(){la.funct.apply(this,arguments)}),W);oa.className=
+"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";oa.style.display="inline-block";oa.style.boxSizing="border-box";oa.style.top="6px";oa.style.marginRight="6px";oa.style.height="30px";oa.style.paddingTop="6px";oa.style.paddingBottom="6px";oa.style.cursor="pointer";oa.setAttribute("title",mxResources.get(aa));F.menus.menuCreated(la,oa,"geMenuItem");null!=na?(oa.style.backgroundImage="url("+na+")",oa.style.backgroundPosition="center center",oa.style.backgroundRepeat="no-repeat",oa.style.backgroundSize=
+"24px 24px",oa.style.width="34px",oa.innerHTML=""):ca||(oa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",oa.style.backgroundPosition="right 6px center",oa.style.backgroundRepeat="no-repeat",oa.style.paddingRight="22px");return oa}function B(aa,ca,na,la,oa,ra){var ia=document.createElement("a");ia.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";ia.style.display="inline-block";ia.style.boxSizing="border-box";ia.style.height="30px";ia.style.padding="6px";ia.style.position=
+"relative";ia.style.verticalAlign="top";ia.style.top="0px";"1"==urlParams.sketch&&(ia.style.borderStyle="none",ia.style.boxShadow="none",ia.style.padding="6px",ia.style.margin="0px");null!=F.statusContainer?R.insertBefore(ia,F.statusContainer):R.appendChild(ia);null!=ra?(ia.style.backgroundImage="url("+ra+")",ia.style.backgroundPosition="center center",ia.style.backgroundRepeat="no-repeat",ia.style.backgroundSize="24px 24px",ia.style.width="34px"):mxUtils.write(ia,aa);mxEvent.addListener(ia,mxClient.IS_POINTER?
+"pointerdown":"mousedown",mxUtils.bind(this,function(Da){Da.preventDefault()}));mxEvent.addListener(ia,"click",function(Da){"disabled"!=ia.getAttribute("disabled")&&ca(Da);mxEvent.consume(Da)});null==na&&(ia.style.marginRight="4px");null!=la&&ia.setAttribute("title",la);null!=oa&&(aa=function(){oa.isEnabled()?(ia.removeAttribute("disabled"),ia.style.cursor="pointer"):(ia.setAttribute("disabled","disabled"),ia.style.cursor="default")},oa.addListener("stateChanged",aa),J.addListener("enabledChanged",
+aa),aa());return ia}function G(aa,ca,na){na=document.createElement("div");na.className="geMenuItem";na.style.display="inline-block";na.style.verticalAlign="top";na.style.marginRight="6px";na.style.padding="0 4px 0 4px";na.style.height="30px";na.style.position="relative";na.style.top="0px";"1"==urlParams.sketch&&(na.style.boxShadow="none");for(var la=0;la<aa.length;la++)null!=aa[la]&&("1"==urlParams.sketch&&(aa[la].style.padding="10px 8px",aa[la].style.width="30px"),aa[la].style.margin="0px",aa[la].style.boxShadow=
+"none",na.appendChild(aa[la]));null!=ca&&mxUtils.setOpacity(na,ca);null!=F.statusContainer&&"1"!=urlParams.sketch?R.insertBefore(na,F.statusContainer):R.appendChild(na);return na}function M(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(Q.style.left=58>S.offsetTop-S.offsetHeight/2?"70px":"10px");else{for(var aa=R.firstChild;null!=aa;){var ca=aa.nextSibling;"geMenuItem"!=aa.className&&"geItem"!=aa.className||aa.parentNode.removeChild(aa);aa=ca}W=R.firstChild;d=window.innerWidth||document.documentElement.clientWidth||
+document.body.clientWidth;aa=1E3>d||"1"==urlParams.sketch;var na=null;aa||(na=A("diagram"));ca=aa?A("diagram",null,Editor.drawLogoImage):null;null!=ca&&(na=ca);G([na,B(mxResources.get("shapes"),F.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),F.actions.get("image"),aa?Editor.shapesImage:null),B(mxResources.get("format"),F.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+F.actions.get("formatPanel").shortcut+")",F.actions.get("image"),aa?Editor.formatImage:null)],
+aa?60:null);ca=A("insert",!0,aa?D:null);G([ca,B(mxResources.get("delete"),F.actions.get("delete").funct,null,mxResources.get("delete"),F.actions.get("delete"),aa?Editor.trashImage:null)],aa?60:null);411<=d&&(G([Ma,Ia],60),520<=d&&G([ta,640<=d?B("",Ba.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Ba,Editor.zoomInImage):null,640<=d?B("",Ha.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Ha,Editor.zoomOutImage):null],60))}null!=na&&(mxEvent.disableContextMenu(na),mxEvent.addGestureListeners(na,
+mxUtils.bind(this,function(la){(mxEvent.isShiftDown(la)||mxEvent.isAltDown(la)||mxEvent.isMetaDown(la)||mxEvent.isControlDown(la)||mxEvent.isPopupTrigger(la))&&F.appIconClicked(la)}),null,null));ca=F.menus.get("language");null!=ca&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=d&&"1"!=urlParams.sketch?(null==wa&&(ca=O.addMenu("",ca.funct),ca.setAttribute("title",mxResources.get("language")),ca.className="geToolbarButton",ca.style.backgroundImage="url("+Editor.globeImage+")",ca.style.backgroundPosition=
+"center center",ca.style.backgroundRepeat="no-repeat",ca.style.backgroundSize="24px 24px",ca.style.position="absolute",ca.style.height="24px",ca.style.width="24px",ca.style.zIndex="1",ca.style.right="8px",ca.style.cursor="pointer",ca.style.top="1"==urlParams.embed?"12px":"11px",R.appendChild(ca),wa=ca),F.buttonContainer.style.paddingRight="34px"):(F.buttonContainer.style.paddingRight="4px",null!=wa&&(wa.parentNode.removeChild(wa),wa=null))}C.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=
urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);var H=document.createElement("div");H.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";H.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(H);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&
(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=d||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])l(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));
-var F=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==F.embedViewport)mxUtils.fit(this.div);else{var ba=parseInt(this.div.offsetLeft),da=parseInt(this.div.offsetWidth),na=F.embedViewport.x+F.embedViewport.width,ka=parseInt(this.div.offsetTop),ma=parseInt(this.div.offsetHeight),sa=F.embedViewport.y+F.embedViewport.height;this.div.style.left=Math.max(F.embedViewport.x,Math.min(ba,na-da))+"px";this.div.style.top=Math.max(F.embedViewport.y,Math.min(ka,sa-ma))+"px";this.div.style.height=
+var F=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==F.embedViewport)mxUtils.fit(this.div);else{var aa=parseInt(this.div.offsetLeft),ca=parseInt(this.div.offsetWidth),na=F.embedViewport.x+F.embedViewport.width,la=parseInt(this.div.offsetTop),oa=parseInt(this.div.offsetHeight),ra=F.embedViewport.y+F.embedViewport.height;this.div.style.left=Math.max(F.embedViewport.x,Math.min(aa,na-ca))+"px";this.div.style.top=Math.max(F.embedViewport.y,Math.min(la,ra-oa))+"px";this.div.style.height=
Math.min(F.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(F.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),H=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>d||708>H)?this.formatWindow.window.toggleMinimized():
this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));F=this;var J=F.editor.graph;F.toolbar=this.createToolbar(F.createDiv("geToolbar"));F.defaultLibraryName=mxResources.get("untitledLibrary");var R=document.createElement("div");R.className="geMenubarContainer";var W=null,O=new Menubar(F,R);F.statusContainer=F.createStatusContainer();F.statusContainer.style.position="relative";F.statusContainer.style.maxWidth="";F.statusContainer.style.marginTop="7px";F.statusContainer.style.marginLeft=
-"6px";F.statusContainer.style.color="gray";F.statusContainer.style.cursor="default";var V=F.hideCurrentMenu;F.hideCurrentMenu=function(){V.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var U=F.descriptorChanged;F.descriptorChanged=function(){U.apply(this,arguments);var ba=F.getCurrentFile();if(null!=ba&&null!=ba.getTitle()){var da=ba.getMode();"google"==da?da="googleDrive":"github"==da?da="gitHub":"gitlab"==da?da="gitLab":"onedrive"==da&&(da="oneDrive");da=mxResources.get(da);
-R.setAttribute("title",ba.getTitle()+(null!=da?" ("+da+")":""))}else R.removeAttribute("title")};F.setStatusText(F.editor.getStatus());R.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";R.appendChild(F.buttonContainer);F.menubarContainer=F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className=
-"geTabContainer";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";H=F.diagramContainer.parentNode;var X=document.createElement("div");X.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){X.style.top="20px";F.titlebar=document.createElement("div");F.titlebar.style.cssText=
-"position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var n=document.createElement("div");n.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";F.titlebar.appendChild(n);H.appendChild(F.titlebar)}n=F.menus.get("viewZoom");var E="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,I="1"==urlParams.sketch?document.createElement("div"):
+"6px";F.statusContainer.style.color="gray";F.statusContainer.style.cursor="default";var V=F.hideCurrentMenu;F.hideCurrentMenu=function(){V.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var U=F.descriptorChanged;F.descriptorChanged=function(){U.apply(this,arguments);var aa=F.getCurrentFile();if(null!=aa&&null!=aa.getTitle()){var ca=aa.getMode();"google"==ca?ca="googleDrive":"github"==ca?ca="gitHub":"gitlab"==ca?ca="gitLab":"onedrive"==ca&&(ca="oneDrive");ca=mxResources.get(ca);
+R.setAttribute("title",aa.getTitle()+(null!=ca?" ("+ca+")":""))}else R.removeAttribute("title")};F.setStatusText(F.editor.getStatus());R.appendChild(F.statusContainer);F.buttonContainer=document.createElement("div");F.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";R.appendChild(F.buttonContainer);F.menubarContainer=F.buttonContainer;F.tabContainer=document.createElement("div");F.tabContainer.className=
+"geTabContainer";F.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";H=F.diagramContainer.parentNode;var Y=document.createElement("div");Y.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";F.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){Y.style.top="20px";F.titlebar=document.createElement("div");F.titlebar.style.cssText=
+"position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var n=document.createElement("div");n.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";F.titlebar.appendChild(n);H.appendChild(F.titlebar)}n=F.menus.get("viewZoom");var D="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,I="1"==urlParams.sketch?document.createElement("div"):
null,S="1"==urlParams.sketch?document.createElement("div"):null,Q="1"==urlParams.sketch?document.createElement("div"):null,P=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();J.refresh();J.view.validateBackground()});F.addListener("darkModeChanged",P);F.addListener("sketchModeChanged",P);var T=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)Q.style.left="10px",Q.style.top="10px",S.style.left="10px",S.style.top="60px",I.style.top="10px",I.style.right="12px",I.style.left=
-"",F.diagramContainer.setAttribute("data-bounds",F.diagramContainer.style.top+" "+F.diagramContainer.style.left+" "+F.diagramContainer.style.width+" "+F.diagramContainer.style.height),F.diagramContainer.style.top="0px",F.diagramContainer.style.left="0px",F.diagramContainer.style.bottom="0px",F.diagramContainer.style.right="0px",F.diagramContainer.style.width="",F.diagramContainer.style.height="";else{var ba=F.diagramContainer.getAttribute("data-bounds");if(null!=ba){F.diagramContainer.style.background=
-"transparent";F.diagramContainer.removeAttribute("data-bounds");var da=J.getGraphBounds();ba=ba.split(" ");F.diagramContainer.style.top=ba[0];F.diagramContainer.style.left=ba[1];F.diagramContainer.style.width=da.width+50+"px";F.diagramContainer.style.height=da.height+46+"px";F.diagramContainer.style.bottom="";F.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:F.diagramContainer.getBoundingClientRect()}),"*");F.refresh()}Q.style.left=F.diagramContainer.offsetLeft+
+"",F.diagramContainer.setAttribute("data-bounds",F.diagramContainer.style.top+" "+F.diagramContainer.style.left+" "+F.diagramContainer.style.width+" "+F.diagramContainer.style.height),F.diagramContainer.style.top="0px",F.diagramContainer.style.left="0px",F.diagramContainer.style.bottom="0px",F.diagramContainer.style.right="0px",F.diagramContainer.style.width="",F.diagramContainer.style.height="";else{var aa=F.diagramContainer.getAttribute("data-bounds");if(null!=aa){F.diagramContainer.style.background=
+"transparent";F.diagramContainer.removeAttribute("data-bounds");var ca=J.getGraphBounds();aa=aa.split(" ");F.diagramContainer.style.top=aa[0];F.diagramContainer.style.left=aa[1];F.diagramContainer.style.width=ca.width+50+"px";F.diagramContainer.style.height=ca.height+46+"px";F.diagramContainer.style.bottom="";F.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:F.diagramContainer.getBoundingClientRect()}),"*");F.refresh()}Q.style.left=F.diagramContainer.offsetLeft+
"px";Q.style.top=F.diagramContainer.offsetTop-Q.offsetHeight-4+"px";S.style.display="";S.style.left=F.diagramContainer.offsetLeft-S.offsetWidth-4+"px";S.style.top=F.diagramContainer.offsetTop+"px";I.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-I.offsetWidth+"px";I.style.top=Q.style.top;I.style.right="";F.bottomResizer.style.left=F.diagramContainer.offsetLeft+(F.diagramContainer.offsetWidth-F.bottomResizer.offsetWidth)/2+"px";F.bottomResizer.style.top=F.diagramContainer.offsetTop+
F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight/2-1+"px";F.rightResizer.style.left=F.diagramContainer.offsetLeft+F.diagramContainer.offsetWidth-F.rightResizer.offsetWidth/2-1+"px";F.rightResizer.style.top=F.diagramContainer.offsetTop+(F.diagramContainer.offsetHeight-F.bottomResizer.offsetHeight)/2+"px"}F.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";F.rightResizer.style.visibility=F.bottomResizer.style.visibility;R.style.display="none";Q.style.visibility="";I.style.visibility=
-""}),Y=mxUtils.bind(this,function(){Ea.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";T()});P=mxUtils.bind(this,function(){Y();b(F,!0);F.initFormatWindow();var ba=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ba.x+ba.width+4,ba.y)});F.addListener("inlineFullscreenChanged",Y);F.addListener("editInlineStart",
-P);"1"==urlParams.embedInline&&F.addListener("darkModeChanged",P);F.addListener("editInlineStop",mxUtils.bind(this,function(ba){F.diagramContainer.style.width="10px";F.diagramContainer.style.height="10px";F.diagramContainer.style.border="";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";Q.style.visibility="hidden";I.style.visibility="hidden";S.style.display="none"}));if(null!=F.hoverIcons){var ca=F.hoverIcons.update;F.hoverIcons.update=function(){J.freehand.isDrawing()||
-ca.apply(this,arguments)}}if(null!=J.freehand){var ia=J.freehand.createStyle;J.freehand.createStyle=function(ba){return ia.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){S.className="geToolbarContainer";I.className="geToolbarContainer";Q.className="geToolbarContainer";R.className="geToolbarContainer";F.picker=S;var Z=!1;"1"!=urlParams.embed&&"atlassian"!=F.getServiceName()&&(mxEvent.addListener(R,"mouseenter",function(){F.statusContainer.style.display="inline-block"}),mxEvent.addListener(R,
-"mouseleave",function(){Z||(F.statusContainer.style.display="none")}));var fa=mxUtils.bind(this,function(ba){null!=F.notificationBtn&&(null!=ba?F.notificationBtn.setAttribute("title",ba):F.notificationBtn.removeAttribute("title"))});R.style.visibility=20>R.clientWidth?"hidden":"";F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=F.getServiceName())if(F.statusContainer.style.display="inline-block",Z=!0,1==F.statusContainer.children.length&&
-""==F.editor.getStatus())R.style.visibility="hidden";else{if(0==F.statusContainer.children.length||1==F.statusContainer.children.length&&"function"===typeof F.statusContainer.firstChild.getAttribute&&null==F.statusContainer.firstChild.getAttribute("class")){var ba=null!=F.statusContainer.firstChild&&"function"===typeof F.statusContainer.firstChild.getAttribute?F.statusContainer.firstChild.getAttribute("title"):F.editor.getStatus();fa(ba);var da=F.getCurrentFile();da=null!=da?da.savingStatusKey:DrawioFile.prototype.savingStatusKey;
-ba==mxResources.get(da)+"..."?(F.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(da))+'..."src="'+Editor.tailSpin+'">',F.statusContainer.style.display="inline-block",Z=!0):6<F.buttonContainer.clientWidth&&(F.statusContainer.style.display="none",Z=!1)}else F.statusContainer.style.display="inline-block",fa(null),Z=!0;R.style.visibility=20>R.clientWidth&&!Z?"hidden":""}}));ea=z("diagram",null,Editor.menuImage);ea.style.boxShadow="none";ea.style.padding="6px";ea.style.margin=
-"0px";Q.appendChild(ea);mxEvent.disableContextMenu(ea);mxEvent.addGestureListeners(ea,mxUtils.bind(this,function(ba){(mxEvent.isShiftDown(ba)||mxEvent.isAltDown(ba)||mxEvent.isMetaDown(ba)||mxEvent.isControlDown(ba)||mxEvent.isPopupTrigger(ba))&&this.appIconClicked(ba)}),null,null);F.statusContainer.style.position="";F.statusContainer.style.display="none";F.statusContainer.style.margin="0px";F.statusContainer.style.padding="6px 0px";F.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";F.statusContainer.style.display=
-"inline-block";F.statusContainer.style.textOverflow="ellipsis";F.buttonContainer.style.position="";F.buttonContainer.style.paddingRight="0px";F.buttonContainer.style.display="inline-block";var aa=document.createElement("a");aa.style.padding="0px";aa.style.boxShadow="none";aa.className="geMenuItem";aa.style.display="inline-block";aa.style.width="40px";aa.style.height="12px";aa.style.marginBottom="-2px";aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";aa.style.backgroundPosition=
-"top center";aa.style.backgroundRepeat="no-repeat";aa.setAttribute("title","Minimize");var wa=!1,la=mxUtils.bind(this,function(){S.innerHTML="";if(!wa){var ba=function(ka,ma,sa){ka=B("",ka.funct,null,ma,ka,sa);ka.style.width="40px";ka.style.opacity="0.7";return da(ka,null,"pointer")},da=function(ka,ma,sa){null!=ma&&ka.setAttribute("title",ma);ka.style.cursor=null!=sa?sa:"default";ka.style.margin="2px 0px";S.appendChild(ka);mxUtils.br(S);return ka};da(F.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",
-60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");da(F.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note"),!0,!1,null,!0),mxResources.get("note"));da(F.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",
-160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");da(F.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var ka=new mxCell("",new mxGeometry(0,0,J.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");ka.geometry.setTerminalPoint(new mxPoint(0,0),!0);ka.geometry.setTerminalPoint(new mxPoint(ka.geometry.width,
-0),!1);ka.geometry.points=[];ka.geometry.relative=!0;ka.edge=!0;da(F.sidebar.createEdgeTemplateFromCells([ka],ka.geometry.width,ka.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));ka=ka.clone();ka.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ka.geometry.width=J.defaultEdgeLength+20;ka.geometry.setTerminalPoint(new mxPoint(0,20),!0);ka.geometry.setTerminalPoint(new mxPoint(ka.geometry.width,20),!1);ka=
-da(F.sidebar.createEdgeTemplateFromCells([ka],ka.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));ka.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");ka.style.paddingBottom="14px";ka.style.marginBottom="14px"})();ba(F.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var na=F.actions.get("toggleShapes");ba(na,mxResources.get("shapes")+" ("+na.shortcut+")",E);ea=z("table",null,Editor.calendarImage);ea.style.boxShadow=
-"none";ea.style.opacity="0.7";ea.style.padding="6px";ea.style.margin="0px";ea.style.width="37px";da(ea,null,"pointer");ea=z("insert",null,Editor.plusImage);ea.style.boxShadow="none";ea.style.opacity="0.7";ea.style.padding="6px";ea.style.margin="0px";ea.style.width="37px";da(ea,null,"pointer")}"1"!=urlParams.embedInline&&S.appendChild(aa)});mxEvent.addListener(aa,"click",mxUtils.bind(this,function(){wa?(mxUtils.setPrefixedStyle(S.style,"transform","translate(0, -50%)"),S.style.padding="8px 6px 4px",
-S.style.top="50%",S.style.bottom="",S.style.height="",aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",aa.style.width="40px",aa.style.height="12px",aa.setAttribute("title","Minimize"),wa=!1,la()):(S.innerHTML="",S.appendChild(aa),mxUtils.setPrefixedStyle(S.style,"transform","translate(0, 0)"),S.style.top="",S.style.bottom="12px",S.style.padding="0px",S.style.height="24px",aa.style.height="24px",aa.style.backgroundImage="url("+Editor.plusImage+")",aa.setAttribute("title",mxResources.get("insert")),
-aa.style.width="24px",wa=!0)}));la();F.addListener("darkModeChanged",la);F.addListener("sketchModeChanged",la)}else F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));if(null!=n){var za=function(ba){mxEvent.isShiftDown(ba)?(F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(ba)):mxEvent.isAltDown(ba)&&(F.hideCurrentMenu(),F.actions.get("customZoom").funct(),mxEvent.consume(ba))},Ba=F.actions.get("zoomIn"),ua=F.actions.get("zoomOut"),
-Da=F.actions.get("resetView");P=F.actions.get("fullscreen");var Fa=F.actions.get("undo"),Ka=F.actions.get("redo"),Qa=B("",Fa.funct,null,mxResources.get("undo")+" ("+Fa.shortcut+")",Fa,Editor.undoImage),Ia=B("",Ka.funct,null,mxResources.get("redo")+" ("+Ka.shortcut+")",Ka,Editor.redoImage),Ea=B("",P.funct,null,mxResources.get("fullscreen"),P,Editor.fullscreenImage);if(null!=I){Da=function(){pa.style.display=null!=F.pages&&("0"!=urlParams.pages||1<F.pages.length||Editor.pagesVisible)?"inline-block":
-"none"};var Ca=function(){pa.innerHTML="";if(null!=F.currentPage){mxUtils.write(pa,F.currentPage.getName());var ba=null!=F.pages?F.pages.length:1,da=F.getPageIndex(F.currentPage);da=null!=da?da+1:1;var na=F.currentPage.getId();pa.setAttribute("title",F.currentPage.getName()+" ("+da+"/"+ba+")"+(null!=na?" ["+na+"]":""))}};Ea.parentNode.removeChild(Ea);var Na=F.actions.get("delete"),Aa=B("",Na.funct,null,mxResources.get("delete"),Na,Editor.trashImage);Aa.style.opacity="0.1";Q.appendChild(Aa);Na.addListener("stateChanged",
-function(){Aa.style.opacity=Na.enabled?"":"0.1"});var ya=function(){Qa.style.display=0<F.editor.undoManager.history.length||J.isEditing()?"inline-block":"none";Ia.style.display=Qa.style.display;Qa.style.opacity=Fa.enabled?"":"0.1";Ia.style.opacity=Ka.enabled?"":"0.1"};Q.appendChild(Qa);Q.appendChild(Ia);Fa.addListener("stateChanged",ya);Ka.addListener("stateChanged",ya);ya();var pa=this.createPageMenuTab(!1,!0);pa.style.display="none";pa.style.position="";pa.style.marginLeft="";pa.style.top="";pa.style.left=
-"";pa.style.height="100%";pa.style.lineHeight="";pa.style.borderStyle="none";pa.style.padding="3px 0";pa.style.margin="0px";pa.style.background="";pa.style.border="";pa.style.boxShadow="none";pa.style.verticalAlign="top";pa.style.width="auto";pa.style.maxWidth="160px";pa.style.position="relative";pa.style.padding="6px";pa.style.textOverflow="ellipsis";pa.style.opacity="0.8";I.appendChild(pa);F.editor.addListener("pagesPatched",Ca);F.editor.addListener("pageSelected",Ca);F.editor.addListener("pageRenamed",
-Ca);F.editor.addListener("fileLoaded",Ca);Ca();F.addListener("fileDescriptorChanged",Da);F.addListener("pagesVisibleChanged",Da);F.editor.addListener("pagesPatched",Da);Da();Da=B("",ua.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",ua,Editor.zoomOutImage);I.appendChild(Da);var ea=O.addMenu("100%",n.funct);ea.setAttribute("title",mxResources.get("zoom"));ea.innerHTML="100%";ea.style.display="inline-block";ea.style.color="inherit";ea.style.cursor="pointer";ea.style.textAlign=
+""}),X=mxUtils.bind(this,function(){Ea.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";T()});P=mxUtils.bind(this,function(){X();b(F,!0);F.initFormatWindow();var aa=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(aa.x+aa.width+4,aa.y)});F.addListener("inlineFullscreenChanged",X);F.addListener("editInlineStart",
+P);"1"==urlParams.embedInline&&F.addListener("darkModeChanged",P);F.addListener("editInlineStop",mxUtils.bind(this,function(aa){F.diagramContainer.style.width="10px";F.diagramContainer.style.height="10px";F.diagramContainer.style.border="";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";Q.style.visibility="hidden";I.style.visibility="hidden";S.style.display="none"}));if(null!=F.hoverIcons){var ba=F.hoverIcons.update;F.hoverIcons.update=function(){J.freehand.isDrawing()||
+ba.apply(this,arguments)}}if(null!=J.freehand){var ja=J.freehand.createStyle;J.freehand.createStyle=function(aa){return ja.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){S.className="geToolbarContainer";I.className="geToolbarContainer";Q.className="geToolbarContainer";R.className="geToolbarContainer";F.picker=S;var Z=!1;"1"!=urlParams.embed&&"atlassian"!=F.getServiceName()&&(mxEvent.addListener(R,"mouseenter",function(){F.statusContainer.style.display="inline-block"}),mxEvent.addListener(R,
+"mouseleave",function(){Z||(F.statusContainer.style.display="none")}));var ka=mxUtils.bind(this,function(aa){null!=F.notificationBtn&&(null!=aa?F.notificationBtn.setAttribute("title",aa):F.notificationBtn.removeAttribute("title"))});R.style.visibility=20>R.clientWidth?"hidden":"";F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=F.getServiceName())if(F.statusContainer.style.display="inline-block",Z=!0,1==F.statusContainer.children.length&&
+""==F.editor.getStatus())R.style.visibility="hidden";else{if(0==F.statusContainer.children.length||1==F.statusContainer.children.length&&"function"===typeof F.statusContainer.firstChild.getAttribute&&null==F.statusContainer.firstChild.getAttribute("class")){var aa=null!=F.statusContainer.firstChild&&"function"===typeof F.statusContainer.firstChild.getAttribute?F.statusContainer.firstChild.getAttribute("title"):F.editor.getStatus();ka(aa);var ca=F.getCurrentFile();ca=null!=ca?ca.savingStatusKey:DrawioFile.prototype.savingStatusKey;
+aa==mxResources.get(ca)+"..."?(F.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ca))+'..."src="'+Editor.tailSpin+'">',F.statusContainer.style.display="inline-block",Z=!0):6<F.buttonContainer.clientWidth&&(F.statusContainer.style.display="none",Z=!1)}else F.statusContainer.style.display="inline-block",ka(null),Z=!0;R.style.visibility=20>R.clientWidth&&!Z?"hidden":""}}));ea=A("diagram",null,Editor.menuImage);ea.style.boxShadow="none";ea.style.padding="6px";ea.style.margin=
+"0px";Q.appendChild(ea);mxEvent.disableContextMenu(ea);mxEvent.addGestureListeners(ea,mxUtils.bind(this,function(aa){(mxEvent.isShiftDown(aa)||mxEvent.isAltDown(aa)||mxEvent.isMetaDown(aa)||mxEvent.isControlDown(aa)||mxEvent.isPopupTrigger(aa))&&this.appIconClicked(aa)}),null,null);F.statusContainer.style.position="";F.statusContainer.style.display="none";F.statusContainer.style.margin="0px";F.statusContainer.style.padding="6px 0px";F.statusContainer.style.maxWidth=Math.min(d-240,280)+"px";F.statusContainer.style.display=
+"inline-block";F.statusContainer.style.textOverflow="ellipsis";F.buttonContainer.style.position="";F.buttonContainer.style.paddingRight="0px";F.buttonContainer.style.display="inline-block";var da=document.createElement("a");da.style.padding="0px";da.style.boxShadow="none";da.className="geMenuItem";da.style.display="inline-block";da.style.width="40px";da.style.height="12px";da.style.marginBottom="-2px";da.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";da.style.backgroundPosition=
+"top center";da.style.backgroundRepeat="no-repeat";da.setAttribute("title","Minimize");var fa=!1,ma=mxUtils.bind(this,function(){S.innerHTML="";if(!fa){var aa=function(la,oa,ra){la=B("",la.funct,null,oa,la,ra);la.style.width="40px";la.style.opacity="0.7";return ca(la,null,"pointer")},ca=function(la,oa,ra){null!=oa&&la.setAttribute("title",oa);la.style.cursor=null!=ra?ra:"default";la.style.margin="2px 0px";S.appendChild(la);mxUtils.br(S);return la};ca(F.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",
+60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");ca(F.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note"),!0,!1,null,!0),mxResources.get("note"));ca(F.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",
+160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");ca(F.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var la=new mxCell("",new mxGeometry(0,0,J.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");la.geometry.setTerminalPoint(new mxPoint(0,0),!0);la.geometry.setTerminalPoint(new mxPoint(la.geometry.width,
+0),!1);la.geometry.points=[];la.geometry.relative=!0;la.edge=!0;ca(F.sidebar.createEdgeTemplateFromCells([la],la.geometry.width,la.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));la=la.clone();la.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";la.geometry.width=J.defaultEdgeLength+20;la.geometry.setTerminalPoint(new mxPoint(0,20),!0);la.geometry.setTerminalPoint(new mxPoint(la.geometry.width,20),!1);la=
+ca(F.sidebar.createEdgeTemplateFromCells([la],la.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));la.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");la.style.paddingBottom="14px";la.style.marginBottom="14px"})();aa(F.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var na=F.actions.get("toggleShapes");aa(na,mxResources.get("shapes")+" ("+na.shortcut+")",D);ea=A("table",null,Editor.calendarImage);ea.style.boxShadow=
+"none";ea.style.opacity="0.7";ea.style.padding="6px";ea.style.margin="0px";ea.style.width="37px";ca(ea,null,"pointer");ea=A("insert",null,Editor.plusImage);ea.style.boxShadow="none";ea.style.opacity="0.7";ea.style.padding="6px";ea.style.margin="0px";ea.style.width="37px";ca(ea,null,"pointer")}"1"!=urlParams.embedInline&&S.appendChild(da)});mxEvent.addListener(da,"click",mxUtils.bind(this,function(){fa?(mxUtils.setPrefixedStyle(S.style,"transform","translate(0, -50%)"),S.style.padding="8px 6px 4px",
+S.style.top="50%",S.style.bottom="",S.style.height="",da.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",da.style.width="40px",da.style.height="12px",da.setAttribute("title","Minimize"),fa=!1,ma()):(S.innerHTML="",S.appendChild(da),mxUtils.setPrefixedStyle(S.style,"transform","translate(0, 0)"),S.style.top="",S.style.bottom="12px",S.style.padding="0px",S.style.height="24px",da.style.height="24px",da.style.backgroundImage="url("+Editor.plusImage+")",da.setAttribute("title",mxResources.get("insert")),
+da.style.width="24px",fa=!0)}));ma();F.addListener("darkModeChanged",ma);F.addListener("sketchModeChanged",ma)}else F.editor.addListener("statusChanged",mxUtils.bind(this,function(){F.setStatusText(F.editor.getStatus())}));if(null!=n){var ya=function(aa){mxEvent.isShiftDown(aa)?(F.hideCurrentMenu(),F.actions.get("smartFit").funct(),mxEvent.consume(aa)):mxEvent.isAltDown(aa)&&(F.hideCurrentMenu(),F.actions.get("customZoom").funct(),mxEvent.consume(aa))},Ba=F.actions.get("zoomIn"),Ha=F.actions.get("zoomOut"),
+sa=F.actions.get("resetView");P=F.actions.get("fullscreen");var Ga=F.actions.get("undo"),Ka=F.actions.get("redo"),Ma=B("",Ga.funct,null,mxResources.get("undo")+" ("+Ga.shortcut+")",Ga,Editor.undoImage),Ia=B("",Ka.funct,null,mxResources.get("redo")+" ("+Ka.shortcut+")",Ka,Editor.redoImage),Ea=B("",P.funct,null,mxResources.get("fullscreen"),P,Editor.fullscreenImage);if(null!=I){sa=function(){pa.style.display=null!=F.pages&&("0"!=urlParams.pages||1<F.pages.length||Editor.pagesVisible)?"inline-block":
+"none"};var Fa=function(){pa.innerHTML="";if(null!=F.currentPage){mxUtils.write(pa,F.currentPage.getName());var aa=null!=F.pages?F.pages.length:1,ca=F.getPageIndex(F.currentPage);ca=null!=ca?ca+1:1;var na=F.currentPage.getId();pa.setAttribute("title",F.currentPage.getName()+" ("+ca+"/"+aa+")"+(null!=na?" ["+na+"]":""))}};Ea.parentNode.removeChild(Ea);var Pa=F.actions.get("delete"),Aa=B("",Pa.funct,null,mxResources.get("delete"),Pa,Editor.trashImage);Aa.style.opacity="0.1";Q.appendChild(Aa);Pa.addListener("stateChanged",
+function(){Aa.style.opacity=Pa.enabled?"":"0.1"});var za=function(){Ma.style.display=0<F.editor.undoManager.history.length||J.isEditing()?"inline-block":"none";Ia.style.display=Ma.style.display;Ma.style.opacity=Ga.enabled?"":"0.1";Ia.style.opacity=Ka.enabled?"":"0.1"};Q.appendChild(Ma);Q.appendChild(Ia);Ga.addListener("stateChanged",za);Ka.addListener("stateChanged",za);za();var pa=this.createPageMenuTab(!1,!0);pa.style.display="none";pa.style.position="";pa.style.marginLeft="";pa.style.top="";pa.style.left=
+"";pa.style.height="100%";pa.style.lineHeight="";pa.style.borderStyle="none";pa.style.padding="3px 0";pa.style.margin="0px";pa.style.background="";pa.style.border="";pa.style.boxShadow="none";pa.style.verticalAlign="top";pa.style.width="auto";pa.style.maxWidth="160px";pa.style.position="relative";pa.style.padding="6px";pa.style.textOverflow="ellipsis";pa.style.opacity="0.8";I.appendChild(pa);F.editor.addListener("pagesPatched",Fa);F.editor.addListener("pageSelected",Fa);F.editor.addListener("pageRenamed",
+Fa);F.editor.addListener("fileLoaded",Fa);Fa();F.addListener("fileDescriptorChanged",sa);F.addListener("pagesVisibleChanged",sa);F.editor.addListener("pagesPatched",sa);sa();sa=B("",Ha.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Ha,Editor.zoomOutImage);I.appendChild(sa);var ea=O.addMenu("100%",n.funct);ea.setAttribute("title",mxResources.get("zoom"));ea.innerHTML="100%";ea.style.display="inline-block";ea.style.color="inherit";ea.style.cursor="pointer";ea.style.textAlign=
"center";ea.style.whiteSpace="nowrap";ea.style.paddingRight="10px";ea.style.textDecoration="none";ea.style.verticalAlign="top";ea.style.padding="6px 0";ea.style.fontSize="14px";ea.style.width="40px";ea.style.opacity="0.4";I.appendChild(ea);n=B("",Ba.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Ba,Editor.zoomInImage);I.appendChild(n);P.visible&&(I.appendChild(Ea),mxEvent.addListener(document,"fullscreenchange",function(){Ea.style.backgroundImage="url("+(null!=document.fullscreenElement?
Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(n=F.actions.get("exit"),I.appendChild(B("",n.funct,null,mxResources.get("exit"),n,Editor.closeImage)));F.tabContainer.style.visibility="hidden";R.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";Q.style.cssText=
-"position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";I.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";X.appendChild(Q);X.appendChild(I);S.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(S.style.touchAction="none");X.appendChild(S);window.setTimeout(function(){mxUtils.setPrefixedStyle(S.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(X)}else{var ra=B("",za,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Da,Editor.zoomFitImage);R.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";ea=O.addMenu("100%",
+"position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";I.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";Y.appendChild(Q);Y.appendChild(I);S.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
+mxClient.IS_POINTER&&(S.style.touchAction="none");Y.appendChild(S);window.setTimeout(function(){mxUtils.setPrefixedStyle(S.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(Y)}else{var ta=B("",ya,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",sa,Editor.zoomFitImage);R.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";ea=O.addMenu("100%",
n.funct);ea.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ea.style.whiteSpace="nowrap";ea.style.paddingRight="10px";ea.style.textDecoration="none";ea.style.textDecoration="none";ea.style.overflow="hidden";ea.style.visibility="hidden";ea.style.textAlign="center";ea.style.cursor="pointer";ea.style.height=parseInt(F.tabContainerHeight)-1+"px";ea.style.lineHeight=parseInt(F.tabContainerHeight)+1+"px";ea.style.position="absolute";ea.style.display="block";ea.style.fontSize="12px";ea.style.width=
-"59px";ea.style.right="0px";ea.style.bottom="0px";ea.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";ea.style.backgroundPosition="right 6px center";ea.style.backgroundRepeat="no-repeat";X.appendChild(ea)}(function(ba){mxEvent.addListener(ba,"click",za);var da=mxUtils.bind(this,function(){ba.innerHTML="";mxUtils.write(ba,Math.round(100*F.editor.graph.view.scale)+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,da);F.editor.addListener("resetGraphView",da);F.editor.addListener("pageSelected",
-da)})(ea);var xa=F.setGraphEnabled;F.setGraphEnabled=function(){xa.apply(this,arguments);null!=this.tabContainer&&(ea.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==I?this.tabContainerHeight+"px":"0px")}}X.appendChild(R);X.appendChild(F.diagramContainer);H.appendChild(X);F.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&b(this,!0);null==I&&X.appendChild(F.tabContainer);
-var va=null;M();mxEvent.addListener(window,"resize",function(){M();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.menus.findReplaceWindow.window.fit()});if("1"==
-urlParams.embedInline){document.body.style.cursor="text";S.style.transform="";mxEvent.addGestureListeners(F.diagramContainer.parentNode,function(ba){mxEvent.getSource(ba)==F.diagramContainer.parentNode&&(F.embedExitPoint=new mxPoint(mxEvent.getClientX(ba),mxEvent.getClientY(ba)),F.sendEmbeddedSvgExport())});H=document.createElement("div");H.style.position="absolute";H.style.width="10px";H.style.height="10px";H.style.borderRadius="5px";H.style.border="1px solid gray";H.style.background="#ffffff";H.style.cursor=
-"row-resize";F.diagramContainer.parentNode.appendChild(H);F.bottomResizer=H;var qa=null,ta=null,ja=null,oa=null;mxEvent.addGestureListeners(H,function(ba){oa=parseInt(F.diagramContainer.style.height);ta=mxEvent.getClientY(ba);J.popupMenuHandler.hideMenu();mxEvent.consume(ba)});H=H.cloneNode(!1);H.style.cursor="col-resize";F.diagramContainer.parentNode.appendChild(H);F.rightResizer=H;mxEvent.addGestureListeners(H,function(ba){ja=parseInt(F.diagramContainer.style.width);qa=mxEvent.getClientX(ba);J.popupMenuHandler.hideMenu();
-mxEvent.consume(ba)});mxEvent.addGestureListeners(document.body,null,function(ba){var da=!1;null!=qa&&(F.diagramContainer.style.width=Math.max(20,ja+mxEvent.getClientX(ba)-qa)+"px",da=!0);null!=ta&&(F.diagramContainer.style.height=Math.max(20,oa+mxEvent.getClientY(ba)-ta)+"px",da=!0);da&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:F.diagramContainer.getBoundingClientRect()}),"*"),T(),F.refresh())},function(ba){null==qa&&null==
-ta||mxEvent.consume(ba);ta=qa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";Q.style.visibility="hidden";I.style.visibility="hidden";S.style.display="none"}"1"==urlParams.prefetchFonts&&F.editor.loadFonts()}}};
-(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,t,u,D){var c=t.y,e=t.x,g=!1,k=!1;if(null!=this.states&&null!=d&&null!=t){var m=this,p=new mxCellState,v=this.graph.getView().scale,x=Math.max(2,this.getGuideTolerance()/2);p.x=d.x+e;p.y=d.y+c;p.width=d.width;p.height=d.height;for(var A=[],y=[],L=0;L<this.states.length;L++){var N=this.states[L];N instanceof mxCellState&&(D||!this.graph.isCellSelected(N.cell))&&((p.x>=N.x&&p.x<=N.x+N.width||N.x>=p.x&&N.x<=p.x+p.width)&&(p.y>
-N.y+N.height+4||p.y+p.height+4<N.y)?A.push(N):(p.y>=N.y&&p.y<=N.y+N.height||N.y>=p.y&&N.y<=p.y+p.height)&&(p.x>N.x+N.width+4||p.x+p.width+4<N.x)&&y.push(N))}var K=0,q=0,C=N=0,z=0,B=0,G=0,M=0,H=5*v;if(1<A.length){A.push(p);A.sort(function(W,O){return W.y-O.y});var F=!1;L=p==A[0];v=p==A[A.length-1];if(!L&&!v)for(L=1;L<A.length-1;L++)if(p==A[L]){v=A[L-1];L=A[L+1];N=q=C=(L.y-v.y-v.height-p.height)/2;break}for(L=0;L<A.length-1;L++){v=A[L];var J=A[L+1],R=p==v||p==J;J=J.y-v.y-v.height;F|=p==v;if(0==q&&0==
-K)q=J,K=1;else if(Math.abs(q-J)<=(R||1==L&&F?x:0))K+=1;else if(1<K&&F){A=A.slice(0,L+1);break}else if(3<=A.length-L&&!F)K=0,N=q=0!=C?C:0,A.splice(0,0==L?1:L),L=-1;else break;0!=N||R||(q=N=J)}3==A.length&&A[1]==p&&(N=0)}if(1<y.length){y.push(p);y.sort(function(W,O){return W.x-O.x});F=!1;L=p==y[0];v=p==y[y.length-1];if(!L&&!v)for(L=1;L<y.length-1;L++)if(p==y[L]){v=y[L-1];L=y[L+1];G=B=M=(L.x-v.x-v.width-p.width)/2;break}for(L=0;L<y.length-1;L++){v=y[L];J=y[L+1];R=p==v||p==J;J=J.x-v.x-v.width;F|=p==v;
-if(0==B&&0==z)B=J,z=1;else if(Math.abs(B-J)<=(R||1==L&&F?x:0))z+=1;else if(1<z&&F){y=y.slice(0,L+1);break}else if(3<=y.length-L&&!F)z=0,G=B=0!=M?M:0,y.splice(0,0==L?1:L),L=-1;else break;0!=G||R||(B=G=J)}3==y.length&&y[1]==p&&(G=0)}x=function(W,O,V,U){var X=[];if(U){U=H;var n=0}else U=0,n=H;X.push(new mxPoint(W.x-U,W.y-n));X.push(new mxPoint(W.x+U,W.y+n));X.push(W);X.push(O);X.push(new mxPoint(O.x-U,O.y-n));X.push(new mxPoint(O.x+U,O.y+n));if(null!=V)return V.points=X,V;W=new mxPolyline(X,mxConstants.GUIDE_COLOR,
-mxConstants.GUIDE_STROKEWIDTH);W.dialect=mxConstants.DIALECT_SVG;W.pointerEvents=!1;W.init(m.graph.getView().getOverlayPane());return W};B=function(W,O){if(W&&null!=m.guidesArrHor)for(W=0;W<m.guidesArrHor.length;W++)m.guidesArrHor[W].node.style.visibility="hidden";if(O&&null!=m.guidesArrVer)for(W=0;W<m.guidesArrVer.length;W++)m.guidesArrVer[W].node.style.visibility="hidden"};if(1<z&&z==y.length-1){z=[];M=m.guidesArrHor;g=[];e=0;L=y[0]==p?1:0;F=y[L].y+y[L].height;if(0<G)for(L=0;L<y.length-1;L++)v=
+"59px";ea.style.right="0px";ea.style.bottom="0px";ea.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";ea.style.backgroundPosition="right 6px center";ea.style.backgroundRepeat="no-repeat";Y.appendChild(ea)}(function(aa){mxEvent.addListener(aa,"click",ya);var ca=mxUtils.bind(this,function(){aa.innerHTML="";mxUtils.write(aa,Math.round(100*F.editor.graph.view.scale)+"%")});F.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ca);F.editor.addListener("resetGraphView",ca);F.editor.addListener("pageSelected",
+ca)})(ea);var xa=F.setGraphEnabled;F.setGraphEnabled=function(){xa.apply(this,arguments);null!=this.tabContainer&&(ea.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==I?this.tabContainerHeight+"px":"0px")}}Y.appendChild(R);Y.appendChild(F.diagramContainer);H.appendChild(Y);F.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=d)&&"1"!=urlParams.embedInline&&b(this,!0);null==I&&Y.appendChild(F.tabContainer);
+var wa=null;M();mxEvent.addListener(window,"resize",function(){M();null!=F.sidebarWindow&&F.sidebarWindow.window.fit();null!=F.formatWindow&&F.formatWindow.window.fit();null!=F.actions.outlineWindow&&F.actions.outlineWindow.window.fit();null!=F.actions.layersWindow&&F.actions.layersWindow.window.fit();null!=F.menus.tagsWindow&&F.menus.tagsWindow.window.fit();null!=F.menus.findWindow&&F.menus.findWindow.window.fit();null!=F.menus.findReplaceWindow&&F.menus.findReplaceWindow.window.fit()});if("1"==
+urlParams.embedInline){document.body.style.cursor="text";S.style.transform="";mxEvent.addGestureListeners(F.diagramContainer.parentNode,function(aa){mxEvent.getSource(aa)==F.diagramContainer.parentNode&&(F.embedExitPoint=new mxPoint(mxEvent.getClientX(aa),mxEvent.getClientY(aa)),F.sendEmbeddedSvgExport())});H=document.createElement("div");H.style.position="absolute";H.style.width="10px";H.style.height="10px";H.style.borderRadius="5px";H.style.border="1px solid gray";H.style.background="#ffffff";H.style.cursor=
+"row-resize";F.diagramContainer.parentNode.appendChild(H);F.bottomResizer=H;var ua=null,va=null,ha=null,qa=null;mxEvent.addGestureListeners(H,function(aa){qa=parseInt(F.diagramContainer.style.height);va=mxEvent.getClientY(aa);J.popupMenuHandler.hideMenu();mxEvent.consume(aa)});H=H.cloneNode(!1);H.style.cursor="col-resize";F.diagramContainer.parentNode.appendChild(H);F.rightResizer=H;mxEvent.addGestureListeners(H,function(aa){ha=parseInt(F.diagramContainer.style.width);ua=mxEvent.getClientX(aa);J.popupMenuHandler.hideMenu();
+mxEvent.consume(aa)});mxEvent.addGestureListeners(document.body,null,function(aa){var ca=!1;null!=ua&&(F.diagramContainer.style.width=Math.max(20,ha+mxEvent.getClientX(aa)-ua)+"px",ca=!0);null!=va&&(F.diagramContainer.style.height=Math.max(20,qa+mxEvent.getClientY(aa)-va)+"px",ca=!0);ca&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:F.diagramContainer.getBoundingClientRect()}),"*"),T(),F.refresh())},function(aa){null==ua&&null==
+va||mxEvent.consume(aa);va=ua=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";F.bottomResizer.style.visibility="hidden";F.rightResizer.style.visibility="hidden";Q.style.visibility="hidden";I.style.visibility="hidden";S.style.display="none"}"1"==urlParams.prefetchFonts&&F.editor.loadFonts()}}};
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var f=EditorUi.initTheme;EditorUi.initTheme=function(){f.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();(function(){var b=mxGuide.prototype.move;mxGuide.prototype.move=function(d,t,u,E){var c=t.y,e=t.x,g=!1,k=!1;if(null!=this.states&&null!=d&&null!=t){var m=this,p=new mxCellState,v=this.graph.getView().scale,x=Math.max(2,this.getGuideTolerance()/2);p.x=d.x+e;p.y=d.y+c;p.width=d.width;p.height=d.height;for(var z=[],y=[],L=0;L<this.states.length;L++){var N=this.states[L];N instanceof mxCellState&&(E||!this.graph.isCellSelected(N.cell))&&((p.x>=N.x&&p.x<=N.x+N.width||N.x>=p.x&&N.x<=p.x+p.width)&&(p.y>
+N.y+N.height+4||p.y+p.height+4<N.y)?z.push(N):(p.y>=N.y&&p.y<=N.y+N.height||N.y>=p.y&&N.y<=p.y+p.height)&&(p.x>N.x+N.width+4||p.x+p.width+4<N.x)&&y.push(N))}var K=0,q=0,C=N=0,A=0,B=0,G=0,M=0,H=5*v;if(1<z.length){z.push(p);z.sort(function(W,O){return W.y-O.y});var F=!1;L=p==z[0];v=p==z[z.length-1];if(!L&&!v)for(L=1;L<z.length-1;L++)if(p==z[L]){v=z[L-1];L=z[L+1];N=q=C=(L.y-v.y-v.height-p.height)/2;break}for(L=0;L<z.length-1;L++){v=z[L];var J=z[L+1],R=p==v||p==J;J=J.y-v.y-v.height;F|=p==v;if(0==q&&0==
+K)q=J,K=1;else if(Math.abs(q-J)<=(R||1==L&&F?x:0))K+=1;else if(1<K&&F){z=z.slice(0,L+1);break}else if(3<=z.length-L&&!F)K=0,N=q=0!=C?C:0,z.splice(0,0==L?1:L),L=-1;else break;0!=N||R||(q=N=J)}3==z.length&&z[1]==p&&(N=0)}if(1<y.length){y.push(p);y.sort(function(W,O){return W.x-O.x});F=!1;L=p==y[0];v=p==y[y.length-1];if(!L&&!v)for(L=1;L<y.length-1;L++)if(p==y[L]){v=y[L-1];L=y[L+1];G=B=M=(L.x-v.x-v.width-p.width)/2;break}for(L=0;L<y.length-1;L++){v=y[L];J=y[L+1];R=p==v||p==J;J=J.x-v.x-v.width;F|=p==v;
+if(0==B&&0==A)B=J,A=1;else if(Math.abs(B-J)<=(R||1==L&&F?x:0))A+=1;else if(1<A&&F){y=y.slice(0,L+1);break}else if(3<=y.length-L&&!F)A=0,G=B=0!=M?M:0,y.splice(0,0==L?1:L),L=-1;else break;0!=G||R||(B=G=J)}3==y.length&&y[1]==p&&(G=0)}x=function(W,O,V,U){var Y=[];if(U){U=H;var n=0}else U=0,n=H;Y.push(new mxPoint(W.x-U,W.y-n));Y.push(new mxPoint(W.x+U,W.y+n));Y.push(W);Y.push(O);Y.push(new mxPoint(O.x-U,O.y-n));Y.push(new mxPoint(O.x+U,O.y+n));if(null!=V)return V.points=Y,V;W=new mxPolyline(Y,mxConstants.GUIDE_COLOR,
+mxConstants.GUIDE_STROKEWIDTH);W.dialect=mxConstants.DIALECT_SVG;W.pointerEvents=!1;W.init(m.graph.getView().getOverlayPane());return W};B=function(W,O){if(W&&null!=m.guidesArrHor)for(W=0;W<m.guidesArrHor.length;W++)m.guidesArrHor[W].node.style.visibility="hidden";if(O&&null!=m.guidesArrVer)for(W=0;W<m.guidesArrVer.length;W++)m.guidesArrVer[W].node.style.visibility="hidden"};if(1<A&&A==y.length-1){A=[];M=m.guidesArrHor;g=[];e=0;L=y[0]==p?1:0;F=y[L].y+y[L].height;if(0<G)for(L=0;L<y.length-1;L++)v=
y[L],J=y[L+1],p==v?(e=J.x-v.width-G,g.push(new mxPoint(e+v.width+H,F)),g.push(new mxPoint(J.x-H,F))):p==J?(g.push(new mxPoint(v.x+v.width+H,F)),e=v.x+v.width+G,g.push(new mxPoint(e-H,F))):(g.push(new mxPoint(v.x+v.width+H,F)),g.push(new mxPoint(J.x-H,F)));else v=y[0],L=y[2],e=v.x+v.width+(L.x-v.x-v.width-p.width)/2,g.push(new mxPoint(v.x+v.width+H,F)),g.push(new mxPoint(e-H,F)),g.push(new mxPoint(e+p.width+H,F)),g.push(new mxPoint(L.x-H,F));for(L=0;L<g.length;L+=2)y=g[L],G=g[L+1],y=x(y,G,null!=M?
-M[L/2]:null),y.node.style.visibility="visible",y.redraw(),z.push(y);for(L=g.length/2;null!=M&&L<M.length;L++)M[L].destroy();m.guidesArrHor=z;e-=d.x;g=!0}else B(!0);if(1<K&&K==A.length-1){z=[];M=m.guidesArrVer;k=[];c=0;L=A[0]==p?1:0;K=A[L].x+A[L].width;if(0<N)for(L=0;L<A.length-1;L++)v=A[L],J=A[L+1],p==v?(c=J.y-v.height-N,k.push(new mxPoint(K,c+v.height+H)),k.push(new mxPoint(K,J.y-H))):p==J?(k.push(new mxPoint(K,v.y+v.height+H)),c=v.y+v.height+N,k.push(new mxPoint(K,c-H))):(k.push(new mxPoint(K,v.y+
-v.height+H)),k.push(new mxPoint(K,J.y-H)));else v=A[0],L=A[2],c=v.y+v.height+(L.y-v.y-v.height-p.height)/2,k.push(new mxPoint(K,v.y+v.height+H)),k.push(new mxPoint(K,c-H)),k.push(new mxPoint(K,c+p.height+H)),k.push(new mxPoint(K,L.y-H));for(L=0;L<k.length;L+=2)y=k[L],G=k[L+1],y=x(y,G,null!=M?M[L/2]:null,!0),y.node.style.visibility="visible",y.redraw(),z.push(y);for(L=k.length/2;null!=M&&L<M.length;L++)M[L].destroy();m.guidesArrVer=z;c-=d.y;k=!0}else B(!1,!0)}if(g||k)return p=new mxPoint(e,c),A=b.call(this,
-d,p,u,D),g&&!k?p.y=A.y:k&&!g&&(p.x=A.x),A.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),A.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;B(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){f.call(this,d);var t=this.guidesArrVer,u=this.guidesArrHor;if(null!=t)for(var D=0;D<t.length;D++)t[D].node.style.visibility=d?"visible":"hidden";if(null!=
-u)for(D=0;D<u.length;D++)u[D].node.style.visibility=d?"visible":"hidden"};var l=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){l.call(this);var d=this.guidesArrVer,t=this.guidesArrHor;if(null!=d){for(var u=0;u<d.length;u++)d[u].destroy();this.guidesArrVer=null}if(null!=t){for(u=0;u<t.length;u++)t[u].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,l,d){function t(){var K=b.diagramContainer;m.style.top=K.offsetTop-e+"px";m.style.left=K.offsetLeft-e+"px";m.style.width=(l?0:K.offsetWidth)+e+"px";m.style.height=(l?K.offsetHeight:0)+e+"px"}function u(K,q,C){if(null!=D)return K;var z;return function(){var B=this,G=arguments,M=C&&!z;clearTimeout(z);z=setTimeout(function(){z=null;C||K.apply(B,G)},q);M&&K.apply(B,G)}}var D=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
+M[L/2]:null),y.node.style.visibility="visible",y.redraw(),A.push(y);for(L=g.length/2;null!=M&&L<M.length;L++)M[L].destroy();m.guidesArrHor=A;e-=d.x;g=!0}else B(!0);if(1<K&&K==z.length-1){A=[];M=m.guidesArrVer;k=[];c=0;L=z[0]==p?1:0;K=z[L].x+z[L].width;if(0<N)for(L=0;L<z.length-1;L++)v=z[L],J=z[L+1],p==v?(c=J.y-v.height-N,k.push(new mxPoint(K,c+v.height+H)),k.push(new mxPoint(K,J.y-H))):p==J?(k.push(new mxPoint(K,v.y+v.height+H)),c=v.y+v.height+N,k.push(new mxPoint(K,c-H))):(k.push(new mxPoint(K,v.y+
+v.height+H)),k.push(new mxPoint(K,J.y-H)));else v=z[0],L=z[2],c=v.y+v.height+(L.y-v.y-v.height-p.height)/2,k.push(new mxPoint(K,v.y+v.height+H)),k.push(new mxPoint(K,c-H)),k.push(new mxPoint(K,c+p.height+H)),k.push(new mxPoint(K,L.y-H));for(L=0;L<k.length;L+=2)y=k[L],G=k[L+1],y=x(y,G,null!=M?M[L/2]:null,!0),y.node.style.visibility="visible",y.redraw(),A.push(y);for(L=k.length/2;null!=M&&L<M.length;L++)M[L].destroy();m.guidesArrVer=A;c-=d.y;k=!0}else B(!1,!0)}if(g||k)return p=new mxPoint(e,c),z=b.call(this,
+d,p,u,E),g&&!k?p.y=z.y:k&&!g&&(p.x=z.x),z.y!=p.y&&null!=this.guideY&&null!=this.guideY.node&&(this.guideY.node.style.visibility="hidden"),z.x!=p.x&&null!=this.guideX&&null!=this.guideX.node&&(this.guideX.node.style.visibility="hidden"),p;B(!0,!0);return b.apply(this,arguments)};var f=mxGuide.prototype.setVisible;mxGuide.prototype.setVisible=function(d){f.call(this,d);var t=this.guidesArrVer,u=this.guidesArrHor;if(null!=t)for(var E=0;E<t.length;E++)t[E].node.style.visibility=d?"visible":"hidden";if(null!=
+u)for(E=0;E<u.length;E++)u[E].node.style.visibility=d?"visible":"hidden"};var l=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){l.call(this);var d=this.guidesArrVer,t=this.guidesArrHor;if(null!=d){for(var u=0;u<d.length;u++)d[u].destroy();this.guidesArrVer=null}if(null!=t){for(u=0;u<t.length;u++)t[u].destroy();this.guidesArrHor=null}}})();function mxRuler(b,f,l,d){function t(){var K=b.diagramContainer;m.style.top=K.offsetTop-e+"px";m.style.left=K.offsetLeft-e+"px";m.style.width=(l?0:K.offsetWidth)+e+"px";m.style.height=(l?K.offsetHeight:0)+e+"px"}function u(K,q,C){if(null!=E)return K;var A;return function(){var B=this,G=arguments,M=C&&!A;clearTimeout(A);A=setTimeout(function(){A=null;C||K.apply(B,G)},q);M&&K.apply(B,G)}}var E=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,
c=window.cancelAnimationFrame||window.mozCancelAnimationFrame,e=this.RULER_THICKNESS,g=this;this.unit=f;var k=Editor.isDarkMode()?{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"},m=document.createElement("div");m.style.position="absolute";this.updateStyle=mxUtils.bind(this,function(){k=Editor.isDarkMode()?
{bkgClr:"#202020",outBkgClr:Editor.darkColor,cornerClr:Editor.darkColor,strokeClr:"#505759",fontClr:"#BBBBBB",guideClr:"#0088cf"}:{bkgClr:"#ffffff",outBkgClr:"#e8e9ed",cornerClr:"#fbfbfb",strokeClr:"#dadce0",fontClr:"#BBBBBB",guideClr:"#0000BB"};m.style.background=k.bkgClr;m.style[l?"borderRight":"borderBottom"]="0.5px solid "+k.strokeClr;m.style.borderLeft="0.5px solid "+k.strokeClr});this.updateStyle();document.body.appendChild(m);mxEvent.disableContextMenu(m);this.editorUiRefresh=b.refresh;b.refresh=
-function(K){g.editorUiRefresh.apply(b,arguments);t()};t();var p=document.createElement("canvas");p.width=m.offsetWidth;p.height=m.offsetHeight;m.style.overflow="hidden";p.style.position="relative";m.appendChild(p);var v=p.getContext("2d");this.ui=b;var x=b.editor.graph;this.graph=x;this.container=m;this.canvas=p;var A=function(K,q,C,z,B){K=Math.round(K);q=Math.round(q);C=Math.round(C);z=Math.round(z);v.beginPath();v.moveTo(K+.5,q+.5);v.lineTo(C+.5,z+.5);v.stroke();B&&(l?(v.save(),v.translate(K,q),
-v.rotate(-Math.PI/2),v.fillText(B,0,0),v.restore()):v.fillText(B,K,q))},y=function(){v.clearRect(0,0,p.width,p.height);v.beginPath();v.lineWidth=.7;v.strokeStyle=k.strokeClr;v.setLineDash([]);v.font="9px Arial";v.textAlign="center";var K=x.view.scale,q=x.view.getBackgroundPageBounds(),C=x.view.translate,z=x.pageVisible;C=z?e+(l?q.y-x.container.scrollTop:q.x-x.container.scrollLeft):e+(l?C.y*K-x.container.scrollTop:C.x*K-x.container.scrollLeft);var B=0;z&&(B=x.getPageLayout(),B=l?B.y*x.pageFormat.height:
+function(K){g.editorUiRefresh.apply(b,arguments);t()};t();var p=document.createElement("canvas");p.width=m.offsetWidth;p.height=m.offsetHeight;m.style.overflow="hidden";p.style.position="relative";m.appendChild(p);var v=p.getContext("2d");this.ui=b;var x=b.editor.graph;this.graph=x;this.container=m;this.canvas=p;var z=function(K,q,C,A,B){K=Math.round(K);q=Math.round(q);C=Math.round(C);A=Math.round(A);v.beginPath();v.moveTo(K+.5,q+.5);v.lineTo(C+.5,A+.5);v.stroke();B&&(l?(v.save(),v.translate(K,q),
+v.rotate(-Math.PI/2),v.fillText(B,0,0),v.restore()):v.fillText(B,K,q))},y=function(){v.clearRect(0,0,p.width,p.height);v.beginPath();v.lineWidth=.7;v.strokeStyle=k.strokeClr;v.setLineDash([]);v.font="9px Arial";v.textAlign="center";var K=x.view.scale,q=x.view.getBackgroundPageBounds(),C=x.view.translate,A=x.pageVisible;C=A?e+(l?q.y-x.container.scrollTop:q.x-x.container.scrollLeft):e+(l?C.y*K-x.container.scrollTop:C.x*K-x.container.scrollLeft);var B=0;A&&(B=x.getPageLayout(),B=l?B.y*x.pageFormat.height:
B.x*x.pageFormat.width);var G;switch(g.unit){case mxConstants.POINTS:var M=G=10;var H=[3,5,5,5,5,10,5,5,5,5];break;case mxConstants.MILLIMETERS:G=10;M=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3];break;case mxConstants.METERS:G=20;M=mxConstants.PIXELS_PER_MM;H=[5,3,3,3,3,6,3,3,3,3,10,3,3,3,3,6,3,3,3,3];break;case mxConstants.INCHES:G=.5>=K||4<=K?8:16,M=mxConstants.PIXELS_PER_INCH/G,H=[5,3,5,3,7,3,5,3,7,3,5,3,7,3,5,3]}var F=M;2<=K?F=M/(2*Math.floor(K/2)):.5>=K&&(F=M*Math.floor(1/K/2)*(g.unit==
-mxConstants.MILLIMETERS?2:1));M=null;q=z?Math.min(C+(l?q.height:q.width),l?p.height:p.width):l?p.height:p.width;if(z)if(v.fillStyle=k.outBkgClr,l){var J=C-e;0<J&&v.fillRect(0,e,e,J);q<p.height&&v.fillRect(0,q,e,p.height)}else J=C-e,0<J&&v.fillRect(e,0,J,e),q<p.width&&v.fillRect(q,0,p.width,e);v.fillStyle=k.fontClr;for(z=z?C:C%(F*K);z<=q;z+=F*K)if(J=Math.round((z-C)/K/F),!(z<e||J==M)){M=J;var R=null;0==J%G&&(R=g.formatText(B+J*F)+"");l?A(e-H[Math.abs(J)%G],z,e,z,R):A(z,e-H[Math.abs(J)%G],z,e,R)}v.lineWidth=
-1;A(l?0:e,l?e:0,e,e);v.fillStyle=k.cornerClr;v.fillRect(0,0,e,e)},L=-1,N=function(){null!=D?(null!=c&&c(L),L=D(y)):y()};this.drawRuler=N;this.sizeListener=f=u(function(){var K=x.container;l?(K=K.offsetHeight+e,p.height!=K&&(p.height=K,m.style.height=K+"px",N())):(K=K.offsetWidth+e,p.width!=K&&(p.width=K,m.style.width=K+"px",N()))},10);this.pageListener=function(){N()};this.scrollListener=d=u(function(){var K=l?x.container.scrollTop:x.container.scrollLeft;g.lastScroll!=K&&(g.lastScroll=K,N())},10);
-this.unitListener=function(K,q){g.setUnit(q.getProperty("unit"))};x.addListener(mxEvent.SIZE,f);x.container.addEventListener("scroll",d);x.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(K){k=K;m.style.background=k.bkgClr;y()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(K,q,C,z){if(l&&4<K.height||
+mxConstants.MILLIMETERS?2:1));M=null;q=A?Math.min(C+(l?q.height:q.width),l?p.height:p.width):l?p.height:p.width;if(A)if(v.fillStyle=k.outBkgClr,l){var J=C-e;0<J&&v.fillRect(0,e,e,J);q<p.height&&v.fillRect(0,q,e,p.height)}else J=C-e,0<J&&v.fillRect(e,0,J,e),q<p.width&&v.fillRect(q,0,p.width,e);v.fillStyle=k.fontClr;for(A=A?C:C%(F*K);A<=q;A+=F*K)if(J=Math.round((A-C)/K/F),!(A<e||J==M)){M=J;var R=null;0==J%G&&(R=g.formatText(B+J*F)+"");l?z(e-H[Math.abs(J)%G],A,e,A,R):z(A,e-H[Math.abs(J)%G],A,e,R)}v.lineWidth=
+1;z(l?0:e,l?e:0,e,e);v.fillStyle=k.cornerClr;v.fillRect(0,0,e,e)},L=-1,N=function(){null!=E?(null!=c&&c(L),L=E(y)):y()};this.drawRuler=N;this.sizeListener=f=u(function(){var K=x.container;l?(K=K.offsetHeight+e,p.height!=K&&(p.height=K,m.style.height=K+"px",N())):(K=K.offsetWidth+e,p.width!=K&&(p.width=K,m.style.width=K+"px",N()))},10);this.pageListener=function(){N()};this.scrollListener=d=u(function(){var K=l?x.container.scrollTop:x.container.scrollLeft;g.lastScroll!=K&&(g.lastScroll=K,N())},10);
+this.unitListener=function(K,q){g.setUnit(q.getProperty("unit"))};x.addListener(mxEvent.SIZE,f);x.container.addEventListener("scroll",d);x.view.addListener("unitChanged",this.unitListener);b.addListener("pageViewChanged",this.pageListener);b.addListener("pageScaleChanged",this.pageListener);b.addListener("pageFormatChanged",this.pageListener);this.setStyle=function(K){k=K;m.style.background=k.bkgClr;y()};this.origGuideMove=mxGuide.prototype.move;mxGuide.prototype.move=function(K,q,C,A){if(l&&4<K.height||
!l&&4<K.width){if(null!=g.guidePart)try{v.putImageData(g.guidePart.imgData1,g.guidePart.x1,g.guidePart.y1),v.putImageData(g.guidePart.imgData2,g.guidePart.x2,g.guidePart.y2),v.putImageData(g.guidePart.imgData3,g.guidePart.x3,g.guidePart.y3)}catch(U){}var B=g.origGuideMove.apply(this,arguments);try{v.lineWidth=.5;v.strokeStyle=k.guideClr;v.setLineDash([2]);if(l){var G=K.y+B.y+e-this.graph.container.scrollTop;var M=0;var H=G+K.height/2;var F=e/2;var J=G+K.height;var R=0;var W=v.getImageData(M,G-1,e,
-3);A(M,G,e,G);G--;var O=v.getImageData(F,H-1,e,3);A(F,H,e,H);H--;var V=v.getImageData(R,J-1,e,3);A(R,J,e,J);J--}else G=0,M=K.x+B.x+e-this.graph.container.scrollLeft,H=e/2,F=M+K.width/2,J=0,R=M+K.width,W=v.getImageData(M-1,G,3,e),A(M,G,M,e),M--,O=v.getImageData(F-1,H,3,e),A(F,H,F,e),F--,V=v.getImageData(R-1,J,3,e),A(R,J,R,e),R--;if(null==g.guidePart||g.guidePart.x1!=M||g.guidePart.y1!=G)g.guidePart={imgData1:W,x1:M,y1:G,imgData2:O,x2:F,y2:H,imgData3:V,x3:R,y3:J}}catch(U){}}else B=g.origGuideMove.apply(this,
+3);z(M,G,e,G);G--;var O=v.getImageData(F,H-1,e,3);z(F,H,e,H);H--;var V=v.getImageData(R,J-1,e,3);z(R,J,e,J);J--}else G=0,M=K.x+B.x+e-this.graph.container.scrollLeft,H=e/2,F=M+K.width/2,J=0,R=M+K.width,W=v.getImageData(M-1,G,3,e),z(M,G,M,e),M--,O=v.getImageData(F-1,H,3,e),z(F,H,F,e),F--,V=v.getImageData(R-1,J,3,e),z(R,J,R,e),R--;if(null==g.guidePart||g.guidePart.x1!=M||g.guidePart.y1!=G)g.guidePart={imgData1:W,x1:M,y1:G,imgData2:O,x2:F,y2:H,imgData3:V,x3:R,y3:J}}catch(U){}}else B=g.origGuideMove.apply(this,
arguments);return B};this.origGuideDestroy=mxGuide.prototype.destroy;mxGuide.prototype.destroy=function(){var K=g.origGuideDestroy.apply(this,arguments);if(null!=g.guidePart)try{v.putImageData(g.guidePart.imgData1,g.guidePart.x1,g.guidePart.y1),v.putImageData(g.guidePart.imgData2,g.guidePart.x2,g.guidePart.y2),v.putImageData(g.guidePart.imgData3,g.guidePart.x3,g.guidePart.y3),g.guidePart=null}catch(q){}return K}}mxRuler.prototype.RULER_THICKNESS=14;mxRuler.prototype.unit=mxConstants.POINTS;
mxRuler.prototype.setUnit=function(b){this.unit=b;this.drawRuler()};mxRuler.prototype.formatText=function(b){switch(this.unit){case mxConstants.POINTS:return Math.round(b);case mxConstants.MILLIMETERS:return(b/mxConstants.PIXELS_PER_MM).toFixed(1);case mxConstants.METERS:return(b/(1E3*mxConstants.PIXELS_PER_MM)).toFixed(4);case mxConstants.INCHES:return(b/mxConstants.PIXELS_PER_INCH).toFixed(2)}};
mxRuler.prototype.destroy=function(){this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.graph.removeListener(this.sizeListener);this.graph.container.removeEventListener("scroll",this.scrollListener);this.graph.view.removeListener("unitChanged",this.unitListener);this.ui.removeListener("pageViewChanged",this.pageListener);this.ui.removeListener("pageScaleChanged",this.pageListener);this.ui.removeListener("pageFormatChanged",
this.pageListener);null!=this.container&&this.container.parentNode.removeChild(this.container)};
function mxDualRuler(b,f){var l=new mxPoint(mxRuler.prototype.RULER_THICKNESS,mxRuler.prototype.RULER_THICKNESS);this.editorUiGetDiagContOffset=b.getDiagramContainerOffset;b.getDiagramContainerOffset=function(){return l};this.editorUiRefresh=b.refresh;this.ui=b;this.origGuideMove=mxGuide.prototype.move;this.origGuideDestroy=mxGuide.prototype.destroy;this.vRuler=new mxRuler(b,f,!0);this.hRuler=new mxRuler(b,f,!1,!0);f=mxUtils.bind(this,function(d){var t=!1;mxEvent.addGestureListeners(d,mxUtils.bind(this,
-function(u){t=null!=b.currentMenu;mxEvent.consume(u)}),null,mxUtils.bind(this,function(u){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(u)||mxEvent.isPopupTrigger(u))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(u)||!t){var D=new mxPopupMenu(mxUtils.bind(this,function(g,k){b.menus.addMenuItems(g,["points","inches","millimeters","meters"],k)}));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=
-!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);b.resetCurrentMenu();D.destroy()});var c=mxEvent.getClientX(u),e=mxEvent.getClientY(u);D.popup(c,e,null,u);b.setCurrentMenu(D,d)}mxEvent.consume(u)}}))});f(this.hRuler.container);f(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
-mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var l=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,t=[],u,D=[],c,e=!1,g=!0,k=!0,m=!0,p=!0,v=[],x=!1,A=!0,y=!1,L={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},N=!1;this.setClosedPath=function(H){e=H};this.setAutoClose=function(H){g=H};this.setAutoInsert=
-function(H){k=H};this.setAutoScroll=function(H){m=H};this.setOpenFill=function(H){p=H};this.setStopClickEnabled=function(H){A=H};this.setSelectInserted=function(H){y=H};this.setSmoothing=function(H){l=H};this.setPerfectFreehandMode=function(H){N=H};this.setBrushSize=function(H){L.size=H};this.getBrushSize=function(){return L.size};var K=function(H){x=H;b.getRubberband().setEnabled(!H);b.graphHandler.setSelectEnabled(!H);b.graphHandler.setMoveEnabled(!H);b.container.style.cursor=H?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};
-this.startDrawing=function(){K(!0)};this.isDrawing=function(){return x};var q=mxUtils.bind(this,function(H){if(d){var F=c.length,J=A&&0<D.length&&null!=c&&2>c.length;J||D.push.apply(D,c);c=[];D.push(null);t.push(d);d=null;(J||k)&&this.stopDrawing();k&&2<=F&&this.startDrawing();mxEvent.consume(H)}}),C=new mxCell;C.edge=!0;var z=function(){var H=b.getCurrentCellStyle(C);H=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==
-H&&(H=b.shapeForegroundColor);return H};this.createStyle=function(H){var F=";fillColor=none;";N&&(F=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+H+F};this.stopDrawing=function(){if(0<t.length){if(N){for(var H=[],F=0;F<D.length;F++)null!=D[F]&&H.push([D[F].x,D[F].y]);H=PerfectFreehand.getStroke(H,L);D=[];for(F=0;F<H.length;F++)D.push({x:H[F][0],y:H[F][1]});D.push(null)}H=D[0].x;var J=D[0].x,R=D[0].y,W=D[0].y;for(F=1;F<D.length;F++)null!=D[F]&&(H=Math.max(H,D[F].x),J=Math.min(J,D[F].x),R=Math.max(R,
-D[F].y),W=Math.min(W,D[F].y));H-=J;R-=W;if(0<H&&0<R){var O=100/H,V=100/R;D.map(function(I){if(null==I)return I;I.x=(I.x-J)*O;I.y=(I.y-W)*V;return I});var U='<shape strokewidth="inherit"><foreground>',X=0;for(F=0;F<D.length;F++){var n=D[F];if(null==n){n=!1;X=D[X];var E=D[F-1];!e&&g&&(n=X.x-E.x,E=X.y-E.y,n=Math.sqrt(n*n+E*E)<=b.tolerance);if(e||n)U+='<line x="'+X.x.toFixed(2)+'" y="'+X.y.toFixed(2)+'"/>';U+="</path>"+(p||e||n?"<fillstroke/>":"<stroke/>");X=F+1}else U=F==X?U+('<path><move x="'+n.x.toFixed(2)+
-'" y="'+n.y.toFixed(2)+'"/>'):U+('<line x="'+n.x.toFixed(2)+'" y="'+n.y.toFixed(2)+'"/>')}U+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){F=this.createStyle("stencil("+Graph.compress(U)+")");U=b.view.scale;X=b.view.translate;F=new mxCell("",new mxGeometry(J/U-X.x,W/U-X.y,H/U,R/U),F);F.vertex=1;b.model.beginUpdate();try{F=b.addCell(F),b.fireEvent(new mxEventObject("cellsInserted","cells",[F])),b.fireEvent(new mxEventObject("freehandInserted","cell",F))}finally{b.model.endUpdate()}y&&
-b.setSelectionCells([F])}}for(F=0;F<t.length;F++)t[F].parentNode.removeChild(t[F]);d=null;t=[];D=[]}K(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(H,F){H=F.getProperty("eventName");F=F.getProperty("event");H==mxEvent.MOUSE_MOVE&&x&&(null!=F.sourceState&&F.sourceState.setCursor("crosshair"),F.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(H,F){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(H=F.getEvent(),x&&!mxEvent.isPopupTrigger(H)&&!mxEvent.isMultiTouchEvent(H))){var J=
-parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);J=Math.max(1,J*b.view.scale);var R=z();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill",N?R:"none");d.setAttribute("stroke",R);d.setAttribute("stroke-width",J);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(R=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",R=R.split(" ").map(function(W){return parseFloat(W)*J}).join(" "),d.setAttribute("stroke-dasharray",R));v=[];H=B(H);G(H);
-u="M"+H.x+" "+H.y;D.push(H);c=[];d.setAttribute("d",N?PerfectFreehand.getSvgPathFromStroke([[H.x,H.y]],L):u);f.appendChild(d);F.consume()}}),mouseMove:mxUtils.bind(this,function(H,F){if(d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){H=F.getEvent();H=B(H);G(H);var J=M(0);if(J)if(D.push(J),N){var R=[];for(J=0;J<D.length;J++)R.push([D[J].x,D[J].y]);c=[];for(var W=2;W<v.length;W+=2)J=M(W),R.push([J.x,J.y]),c.push(J);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(R,L))}else{u+=" L"+
+function(u){t=null!=b.currentMenu;mxEvent.consume(u)}),null,mxUtils.bind(this,function(u){if(b.editor.graph.isEnabled()&&!b.editor.graph.isMouseDown&&(mxEvent.isTouchEvent(u)||mxEvent.isPopupTrigger(u))){b.editor.graph.popupMenuHandler.hideMenu();b.hideCurrentMenu();if(!mxEvent.isTouchEvent(u)||!t){var E=new mxPopupMenu(mxUtils.bind(this,function(g,k){b.menus.addMenuItems(g,["points","inches","millimeters","meters"],k)}));E.div.className+=" geMenubarMenu";E.smartSeparators=!0;E.showDisabled=!0;E.autoExpand=
+!0;E.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(E,arguments);b.resetCurrentMenu();E.destroy()});var c=mxEvent.getClientX(u),e=mxEvent.getClientY(u);E.popup(c,e,null,u);b.setCurrentMenu(E,d)}mxEvent.consume(u)}}))});f(this.hRuler.container);f(this.vRuler.container);this.vRuler.drawRuler();this.hRuler.drawRuler()}mxDualRuler.prototype.updateStyle=function(){this.vRuler.updateStyle();this.hRuler.updateStyle();this.vRuler.drawRuler();this.hRuler.drawRuler()};
+mxDualRuler.prototype.setUnit=function(b){this.vRuler.setUnit(b);this.hRuler.setUnit(b)};mxDualRuler.prototype.setStyle=function(b){this.vRuler.setStyle(b);this.hRuler.setStyle(b)};mxDualRuler.prototype.destroy=function(){this.vRuler.destroy();this.hRuler.destroy();this.ui.refresh=this.editorUiRefresh;mxGuide.prototype.move=this.origGuideMove;mxGuide.prototype.destroy=this.origGuideDestroy;this.ui.getDiagramContainerOffset=this.editorUiGetDiagContOffset};function mxFreehand(b){var f=null!=b.view&&null!=b.view.canvas?b.view.canvas.ownerSVGElement:null;if(null!=b.container&&null!=f){b.addListener(mxEvent.ESCAPE,mxUtils.bind(this,function(){this.stopDrawing()}));var l=mxFreehand.prototype.NORMAL_SMOOTHING,d=null,t=[],u,E=[],c,e=!1,g=!0,k=!0,m=!0,p=!0,v=[],x=!1,z=!0,y=!1,L={size:12,thinning:.5,smoothing:.5,streamline:.5,start:{taper:0,cap:!0},end:{taper:0,cap:!0}},N=!1;this.setClosedPath=function(H){e=H};this.setAutoClose=function(H){g=H};this.setAutoInsert=
+function(H){k=H};this.setAutoScroll=function(H){m=H};this.setOpenFill=function(H){p=H};this.setStopClickEnabled=function(H){z=H};this.setSelectInserted=function(H){y=H};this.setSmoothing=function(H){l=H};this.setPerfectFreehandMode=function(H){N=H};this.setBrushSize=function(H){L.size=H};this.getBrushSize=function(){return L.size};var K=function(H){x=H;b.getRubberband().setEnabled(!H);b.graphHandler.setSelectEnabled(!H);b.graphHandler.setMoveEnabled(!H);b.container.style.cursor=H?"crosshair":"";b.fireEvent(new mxEventObject("freehandStateChanged"))};
+this.startDrawing=function(){K(!0)};this.isDrawing=function(){return x};var q=mxUtils.bind(this,function(H){if(d){var F=c.length,J=z&&0<E.length&&null!=c&&2>c.length;J||E.push.apply(E,c);c=[];E.push(null);t.push(d);d=null;(J||k)&&this.stopDrawing();k&&2<=F&&this.startDrawing();mxEvent.consume(H)}}),C=new mxCell;C.edge=!0;var A=function(){var H=b.getCurrentCellStyle(C);H=mxUtils.getValue(b.currentVertexStyle,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(H,mxConstants.STYLE_STROKECOLOR,"#000"));"default"==
+H&&(H=b.shapeForegroundColor);return H};this.createStyle=function(H){var F=";fillColor=none;";N&&(F=";lineShape=1;");return mxConstants.STYLE_SHAPE+"="+H+F};this.stopDrawing=function(){if(0<t.length){if(N){for(var H=[],F=0;F<E.length;F++)null!=E[F]&&H.push([E[F].x,E[F].y]);H=PerfectFreehand.getStroke(H,L);E=[];for(F=0;F<H.length;F++)E.push({x:H[F][0],y:H[F][1]});E.push(null)}H=E[0].x;var J=E[0].x,R=E[0].y,W=E[0].y;for(F=1;F<E.length;F++)null!=E[F]&&(H=Math.max(H,E[F].x),J=Math.min(J,E[F].x),R=Math.max(R,
+E[F].y),W=Math.min(W,E[F].y));H-=J;R-=W;if(0<H&&0<R){var O=100/H,V=100/R;E.map(function(I){if(null==I)return I;I.x=(I.x-J)*O;I.y=(I.y-W)*V;return I});var U='<shape strokewidth="inherit"><foreground>',Y=0;for(F=0;F<E.length;F++){var n=E[F];if(null==n){n=!1;Y=E[Y];var D=E[F-1];!e&&g&&(n=Y.x-D.x,D=Y.y-D.y,n=Math.sqrt(n*n+D*D)<=b.tolerance);if(e||n)U+='<line x="'+Y.x.toFixed(2)+'" y="'+Y.y.toFixed(2)+'"/>';U+="</path>"+(p||e||n?"<fillstroke/>":"<stroke/>");Y=F+1}else U=F==Y?U+('<path><move x="'+n.x.toFixed(2)+
+'" y="'+n.y.toFixed(2)+'"/>'):U+('<line x="'+n.x.toFixed(2)+'" y="'+n.y.toFixed(2)+'"/>')}U+="</foreground></shape>";if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){F=this.createStyle("stencil("+Graph.compress(U)+")");U=b.view.scale;Y=b.view.translate;F=new mxCell("",new mxGeometry(J/U-Y.x,W/U-Y.y,H/U,R/U),F);F.vertex=1;b.model.beginUpdate();try{F=b.addCell(F),b.fireEvent(new mxEventObject("cellsInserted","cells",[F])),b.fireEvent(new mxEventObject("freehandInserted","cell",F))}finally{b.model.endUpdate()}y&&
+b.setSelectionCells([F])}}for(F=0;F<t.length;F++)t[F].parentNode.removeChild(t[F]);d=null;t=[];E=[]}K(!1)};b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(H,F){H=F.getProperty("eventName");F=F.getProperty("event");H==mxEvent.MOUSE_MOVE&&x&&(null!=F.sourceState&&F.sourceState.setCursor("crosshair"),F.consume())}));b.addMouseListener({mouseDown:mxUtils.bind(this,function(H,F){if(b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(H=F.getEvent(),x&&!mxEvent.isPopupTrigger(H)&&!mxEvent.isMultiTouchEvent(H))){var J=
+parseFloat(b.currentVertexStyle[mxConstants.STYLE_STROKEWIDTH]||1);J=Math.max(1,J*b.view.scale);var R=A();d=document.createElementNS("http://www.w3.org/2000/svg","path");d.setAttribute("fill",N?R:"none");d.setAttribute("stroke",R);d.setAttribute("stroke-width",J);"1"==b.currentVertexStyle[mxConstants.STYLE_DASHED]&&(R=b.currentVertexStyle[mxConstants.STYLE_DASH_PATTERN]||"3 3",R=R.split(" ").map(function(W){return parseFloat(W)*J}).join(" "),d.setAttribute("stroke-dasharray",R));v=[];H=B(H);G(H);
+u="M"+H.x+" "+H.y;E.push(H);c=[];d.setAttribute("d",N?PerfectFreehand.getSvgPathFromStroke([[H.x,H.y]],L):u);f.appendChild(d);F.consume()}}),mouseMove:mxUtils.bind(this,function(H,F){if(d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())){H=F.getEvent();H=B(H);G(H);var J=M(0);if(J)if(E.push(J),N){var R=[];for(J=0;J<E.length;J++)R.push([E[J].x,E[J].y]);c=[];for(var W=2;W<v.length;W+=2)J=M(W),R.push([J.x,J.y]),c.push(J);d.setAttribute("d",PerfectFreehand.getSvgPathFromStroke(R,L))}else{u+=" L"+
J.x+" "+J.y;R="";c=[];for(W=2;W<v.length;W+=2)J=M(W),R+=" L"+J.x+" "+J.y,c.push(J);d.setAttribute("d",u+R)}m&&(J=b.view.translate,b.scrollRectToVisible((new mxRectangle(H.x-J.x,H.y-J.y)).grow(20)));F.consume()}}),mouseUp:mxUtils.bind(this,function(H,F){d&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent())&&(q(F.getEvent()),F.consume())})});var B=function(H){return mxUtils.convertPoint(b.container,mxEvent.getClientX(H),mxEvent.getClientY(H))},G=function(H){for(v.push(H);v.length>l;)v.shift()},M=
-function(H){var F=v.length;if(1===F%2||F>=l){var J=0,R=0,W,O=0;for(W=H;W<F;W++)O++,H=v[W],J+=H.x,R+=H.y;return{x:J/O,y:R/O}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,f,l,d,t){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=d;this.locale=t};DrawioComment=function(b,f,l,d,t,u,D){this.file=b;this.id=f;this.content=l;this.modifiedDate=d;this.createdDate=t;this.isResolved=u;this.user=D;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,d,t){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+function(H){var F=v.length;if(1===F%2||F>=l){var J=0,R=0,W,O=0;for(W=H;W<F;W++)O++,H=v[W],J+=H.x,R+=H.y;return{x:J/O,y:R/O}}return null}}}mxFreehand.prototype.NO_SMOOTHING=1;mxFreehand.prototype.MILD_SMOOTHING=4;mxFreehand.prototype.NORMAL_SMOOTHING=8;mxFreehand.prototype.VERY_SMOOTH_SMOOTHING=12;mxFreehand.prototype.SUPER_SMOOTH_SMOOTHING=16;mxFreehand.prototype.HYPER_SMOOTH_SMOOTHING=20;DrawioUser=function(b,f,l,d,t){this.id=b;this.email=f;this.displayName=l;this.pictureUrl=d;this.locale=t};DrawioComment=function(b,f,l,d,t,u,E){this.file=b;this.id=f;this.content=l;this.modifiedDate=d;this.createdDate=t;this.isResolved=u;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,f,l,d,t){f()};DrawioComment.prototype.editComment=function(b,f,l){f()};DrawioComment.prototype.deleteComment=function(b,f){b()};Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];
LucidImporter={};
(function(){function h(u){if(u&&null!=LucidImporter.imgSrcRepl){var E=LucidImporter.imgSrcRepl.attMap;if(E[u])u=E[u];else{E=LucidImporter.imgSrcRepl.imgRepl;for(var F=0;F<E.length;F++){var t=E[F];u=u.replace(t.searchVal,t.replVal)}LucidImporter.hasExtImgs=!0}}return u}function y(u){lb="";try{if(u){var E=null;LucidImporter.advImpConfig&&LucidImporter.advImpConfig.fontMapping&&(E=LucidImporter.advImpConfig.fontMapping[u]);if(E){for(var F in E)lb+=F+"="+E[F]+";";return E.fontFamily?"font-family: "+E.fontFamily:
@@ -14679,42 +14679,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
*/
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JSZip=e()}}(function(){return function s(a,o,h){function u(r,e){if(!o[r]){if(!a[r]){var t="function"==typeof require&&require;if(!e&&t)return t(r,!0);if(l)return l(r,!0);var n=new Error("Cannot find module '"+r+"'");throw n.code="MODULE_NOT_FOUND",n}var i=o[r]={exports:{}};a[r][0].call(i.exports,function(e){var t=a[r][1][e];return u(t||e)},i,i.exports,s,a,o,h)}return o[r].exports}for(var l="function"==typeof require&&require,e=0;e<h.length;e++)u(h[e]);return u}({1:[function(e,t,r){"use strict";var d=e("./utils"),c=e("./support"),p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(e){for(var t,r,n,i,s,a,o,h=[],u=0,l=e.length,f=l,c="string"!==d.getTypeOf(e);u<e.length;)f=l-u,n=c?(t=e[u++],r=u<l?e[u++]:0,u<l?e[u++]:0):(t=e.charCodeAt(u++),r=u<l?e.charCodeAt(u++):0,u<l?e.charCodeAt(u++):0),i=t>>2,s=(3&t)<<4|r>>4,a=1<f?(15&r)<<2|n>>6:64,o=2<f?63&n:64,h.push(p.charAt(i)+p.charAt(s)+p.charAt(a)+p.charAt(o));return h.join("")},r.decode=function(e){var t,r,n,i,s,a,o=0,h=0,u="data:";if(e.substr(0,u.length)===u)throw new Error("Invalid base64 input, it looks like a data url.");var l,f=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===p.charAt(64)&&f--,e.charAt(e.length-2)===p.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(l=c.uint8array?new Uint8Array(0|f):new Array(0|f);o<e.length;)t=p.indexOf(e.charAt(o++))<<2|(i=p.indexOf(e.charAt(o++)))>>4,r=(15&i)<<4|(s=p.indexOf(e.charAt(o++)))>>2,n=(3&s)<<6|(a=p.indexOf(e.charAt(o++))),l[h++]=t,64!==s&&(l[h++]=r),64!==a&&(l[h++]=n);return l}},{"./support":30,"./utils":32}],2:[function(e,t,r){"use strict";var n=e("./external"),i=e("./stream/DataWorker"),s=e("./stream/Crc32Probe"),a=e("./stream/DataLengthProbe");function o(e,t,r,n,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=r,this.compression=n,this.compressedContent=i}o.prototype={getContentWorker:function(){var e=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new a("data_length")),t=this;return e.on("end",function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),e},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},o.createWorkerFrom=function(e,t,r){return e.pipe(new s).pipe(new a("uncompressedSize")).pipe(t.compressWorker(r)).pipe(new a("compressedSize")).withStreamInfo("compression",t)},t.exports=o},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,r){"use strict";var n=e("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(e){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,r){"use strict";var n=e("./utils");var o=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==n.getTypeOf(e)?function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a<s;a++)e=e>>>8^i[255&(e^t[a])];return-1^e}(0|t,e,e.length,0):function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a<s;a++)e=e>>>8^i[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length,0):0}},{"./utils":32}],5:[function(e,t,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(e,t,r){"use strict";var n=null;n="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:n}},{lie:37}],7:[function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),s=e("./utils"),a=e("./stream/GenericWorker"),o=n?"uint8array":"array";function h(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}r.magic="\b\0",s.inherits(h,a),h.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(s.transformTo(o,e.data),!1)},h.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},h.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},h.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(e){return new h("Deflate",e)},r.uncompressWorker=function(){return new h("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,r){"use strict";function A(e,t){var r,n="";for(r=0;r<t;r++)n+=String.fromCharCode(255&e),e>>>=8;return n}function n(e,t,r,n,i,s){var a,o,h=e.file,u=e.compression,l=s!==O.utf8encode,f=I.transformTo("string",s(h.name)),c=I.transformTo("string",O.utf8encode(h.name)),d=h.comment,p=I.transformTo("string",s(d)),m=I.transformTo("string",O.utf8encode(d)),_=c.length!==h.name.length,g=m.length!==d.length,b="",v="",y="",w=h.dir,k=h.date,x={crc32:0,compressedSize:0,uncompressedSize:0};t&&!r||(x.crc32=e.crc32,x.compressedSize=e.compressedSize,x.uncompressedSize=e.uncompressedSize);var S=0;t&&(S|=8),l||!_&&!g||(S|=2048);var z=0,C=0;w&&(z|=16),"UNIX"===i?(C=798,z|=function(e,t){var r=e;return e||(r=t?16893:33204),(65535&r)<<16}(h.unixPermissions,w)):(C=20,z|=function(e){return 63&(e||0)}(h.dosPermissions)),a=k.getUTCHours(),a<<=6,a|=k.getUTCMinutes(),a<<=5,a|=k.getUTCSeconds()/2,o=k.getUTCFullYear()-1980,o<<=4,o|=k.getUTCMonth()+1,o<<=5,o|=k.getUTCDate(),_&&(v=A(1,1)+A(B(f),4)+c,b+="up"+A(v.length,2)+v),g&&(y=A(1,1)+A(B(p),4)+m,b+="uc"+A(y.length,2)+y);var E="";return E+="\n\0",E+=A(S,2),E+=u.magic,E+=A(a,2),E+=A(o,2),E+=A(x.crc32,4),E+=A(x.compressedSize,4),E+=A(x.uncompressedSize,4),E+=A(f.length,2),E+=A(b.length,2),{fileRecord:R.LOCAL_FILE_HEADER+E+f+b,dirRecord:R.CENTRAL_FILE_HEADER+A(C,2)+E+A(p.length,2)+"\0\0\0\0"+A(z,4)+A(n,4)+f+b+p}}var I=e("../utils"),i=e("../stream/GenericWorker"),O=e("../utf8"),B=e("../crc32"),R=e("../signature");function s(e,t,r,n){i.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}I.inherits(s,i),s.prototype.push=function(e){var t=e.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,i.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:r?(t+100*(r-n-1))/r:100}}))},s.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var r=n(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},s.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,r=n(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(r.dirRecord),t)this.push({data:function(e){return R.DATA_DESCRIPTOR+A(e.crc32,4)+A(e.compressedSize,4)+A(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:r.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},s.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var r=this.bytesWritten-e,n=function(e,t,r,n,i){var s=I.transformTo("string",i(n));return R.CENTRAL_DIRECTORY_END+"\0\0\0\0"+A(e,2)+A(e,2)+A(t,4)+A(r,4)+A(s.length,2)+s}(this.dirRecords.length,r,e,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})},s.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},s.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()}),e.on("error",function(e){t.error(e)}),this},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},s.prototype.error=function(e){var t=this._sources;if(!i.prototype.error.call(this,e))return!1;for(var r=0;r<t.length;r++)try{t[r].error(e)}catch(e){}return!0},s.prototype.lock=function(){i.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=s},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(e,t,r){"use strict";var u=e("../compressions"),n=e("./ZipFileWorker");r.generateWorker=function(e,a,t){var o=new n(a.streamFiles,t,a.platform,a.encodeFileName),h=0;try{e.forEach(function(e,t){h++;var r=function(e,t){var r=e||t,n=u[r];if(!n)throw new Error(r+" is not a valid compression method !");return n}(t.options.compression,a.compression),n=t.options.compressionOptions||a.compressionOptions||{},i=t.dir,s=t.date;t._compressWorker(r,n).withStreamInfo("file",{name:e,dir:i,date:s,comment:t.comment||"",unixPermissions:t.unixPermissions,dosPermissions:t.dosPermissions}).pipe(o)}),o.entriesCount=h}catch(e){o.error(e)}return o}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(e,t,r){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var e=new n;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}(n.prototype=e("./object")).loadAsync=e("./load"),n.support=e("./support"),n.defaults=e("./defaults"),n.version="3.10.0",n.loadAsync=function(e,t){return(new n).loadAsync(e,t)},n.external=e("./external"),t.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(e,t,r){"use strict";var u=e("./utils"),i=e("./external"),n=e("./utf8"),s=e("./zipEntries"),a=e("./stream/Crc32Probe"),l=e("./nodejsUtils");function f(n){return new i.Promise(function(e,t){var r=n.decompressed.getContentWorker().pipe(new a);r.on("error",function(e){t(e)}).on("end",function(){r.streamInfo.crc32!==n.decompressed.crc32?t(new Error("Corrupted zip : CRC32 mismatch")):e()}).resume()})}t.exports=function(e,o){var h=this;return o=u.extend(o||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:n.utf8decode}),l.isNode&&l.isStream(e)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):u.prepareContent("the loaded zip file",e,!0,o.optimizedBinaryString,o.base64).then(function(e){var t=new s(o);return t.load(e),t}).then(function(e){var t=[i.Promise.resolve(e)],r=e.files;if(o.checkCRC32)for(var n=0;n<r.length;n++)t.push(f(r[n]));return i.Promise.all(t)}).then(function(e){for(var t=e.shift(),r=t.files,n=0;n<r.length;n++){var i=r[n],s=i.fileNameStr,a=u.resolve(i.fileNameStr);h.file(a,i.decompressed,{binary:!0,optimizedBinaryString:!0,date:i.date,dir:i.dir,comment:i.fileCommentStr.length?i.fileCommentStr:null,unixPermissions:i.unixPermissions,dosPermissions:i.dosPermissions,createFolders:o.createFolders}),i.dir||(h.file(a).unsafeOriginalName=s)}return t.zipComment.length&&(h.comment=t.zipComment),h})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(e,t,r){"use strict";var n=e("../utils"),i=e("../stream/GenericWorker");function s(e,t){i.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}n.inherits(s,i),s.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",function(e){t.push({data:e,meta:{percent:0}})}).on("error",function(e){t.isPaused?this.generatedError=e:t.error(e)}).on("end",function(){t.isPaused?t._upstreamEnded=!0:t.end()})},s.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=s},{"../stream/GenericWorker":28,"../utils":32}],13:[function(e,t,r){"use strict";var i=e("readable-stream").Readable;function n(e,t,r){i.call(this,t),this._helper=e;var n=this;e.on("data",function(e,t){n.push(e)||n._helper.pause(),r&&r(t)}).on("error",function(e){n.emit("error",e)}).on("end",function(){n.push(null)})}e("../utils").inherits(n,i),n.prototype._read=function(){this._helper.resume()},t.exports=n},{"../utils":32,"readable-stream":16}],14:[function(e,t,r){"use strict";t.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(e,t){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(e,t);if("number"==typeof e)throw new Error('The "data" argument must not be a number');return new Buffer(e,t)},allocBuffer:function(e){if(Buffer.alloc)return Buffer.alloc(e);var t=new Buffer(e);return t.fill(0),t},isBuffer:function(e){return Buffer.isBuffer(e)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}},{}],15:[function(e,t,r){"use strict";function s(e,t,r){var n,i=u.getTypeOf(t),s=u.extend(r||{},f);s.date=s.date||new Date,null!==s.compression&&(s.compression=s.compression.toUpperCase()),"string"==typeof s.unixPermissions&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(e=g(e)),s.createFolders&&(n=_(e))&&b.call(this,n,!0);var a="string"===i&&!1===s.binary&&!1===s.base64;r&&void 0!==r.binary||(s.binary=!a),(t instanceof c&&0===t.uncompressedSize||s.dir||!t||0===t.length)&&(s.base64=!1,s.binary=!0,t="",s.compression="STORE",i="string");var o=null;o=t instanceof c||t instanceof l?t:p.isNode&&p.isStream(t)?new m(e,t):u.prepareContent(e,t,s.binary,s.optimizedBinaryString,s.base64);var h=new d(e,o,s);this.files[e]=h}var i=e("./utf8"),u=e("./utils"),l=e("./stream/GenericWorker"),a=e("./stream/StreamHelper"),f=e("./defaults"),c=e("./compressedObject"),d=e("./zipObject"),o=e("./generate"),p=e("./nodejsUtils"),m=e("./nodejs/NodejsStreamInputAdapter"),_=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return 0<t?e.substring(0,t):""},g=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},b=function(e,t){return t=void 0!==t?t:f.createFolders,e=g(e),this.files[e]||s.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]};function h(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var n={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,r,n;for(t in this.files)n=this.files[t],(r=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(r,n)},filter:function(r){var n=[];return this.forEach(function(e,t){r(e,t)&&n.push(t)}),n},file:function(e,t,r){if(1!==arguments.length)return e=this.root+e,s.call(this,e,t,r),this;if(h(e)){var n=e;return this.filter(function(e,t){return!t.dir&&n.test(e)})}var i=this.files[this.root+e];return i&&!i.dir?i:null},folder:function(r){if(!r)return this;if(h(r))return this.filter(function(e,t){return t.dir&&r.test(e)});var e=this.root+r,t=b.call(this,e),n=this.clone();return n.root=t.name,n},remove:function(r){r=this.root+r;var e=this.files[r];if(e||("/"!==r.slice(-1)&&(r+="/"),e=this.files[r]),e&&!e.dir)delete this.files[r];else for(var t=this.filter(function(e,t){return t.name.slice(0,r.length)===r}),n=0;n<t.length;n++)delete this.files[t[n].name];return this},generate:function(e){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t,r={};try{if((r=u.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");u.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var n=r.comment||this.comment||"";t=o.generateWorker(this,r,n)}catch(e){(t=new l("error")).error(e)}return new a(t,r.type||"string",r.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}};t.exports=n},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(e,t,r){t.exports=e("stream")},{stream:void 0}],17:[function(e,t,r){"use strict";var n=e("./DataReader");function i(e){n.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),s=this.length-4;0<=s;--s)if(this.data[s]===t&&this.data[s+1]===r&&this.data[s+2]===n&&this.data[s+3]===i)return s-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),r=e.charCodeAt(1),n=e.charCodeAt(2),i=e.charCodeAt(3),s=this.readData(4);return t===s[0]&&r===s[1]&&n===s[2]&&i===s[3]},i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return[];var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],18:[function(e,t,r){"use strict";var n=e("../utils");function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(e){},readInt:function(e){var t,r=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)r=(r<<8)+this.byteAt(t);return this.index+=e,r},readString:function(e){return n.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,r){"use strict";var n=e("./Uint8ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,r){"use strict";var n=e("./DataReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,r){"use strict";var n=e("./ArrayReader");function i(e){n.call(this,e)}e("../utils").inherits(i,n),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,r){"use strict";var n=e("../utils"),i=e("../support"),s=e("./ArrayReader"),a=e("./StringReader"),o=e("./NodeBufferReader"),h=e("./Uint8ArrayReader");t.exports=function(e){var t=n.getTypeOf(e);return n.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new o(e):i.uint8array?new h(n.transformTo("uint8array",e)):new s(n.transformTo("array",e)):new a(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,r){"use strict";var n=e("./GenericWorker"),i=e("../utils");function s(e){n.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(s,n),s.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=s},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,r){"use strict";var n=e("./GenericWorker"),i=e("../crc32");function s(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(s,n),s.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=s},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}n.inherits(s,i),s.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=s},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,r){"use strict";var n=e("../utils"),i=e("./GenericWorker");function s(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then(function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=n.getTypeOf(e),t.isPaused||t._tickAndRepeat()},function(e){t.error(e)})}n.inherits(s,i),s.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},s.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},s.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},s.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=s},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,r){"use strict";function n(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var r=0;r<this._listeners[e].length;r++)this._listeners[e][r].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",function(e){t.processChunk(e)}),e.on("end",function(){t.end()}),e.on("error",function(e){t.error(e)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var e=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),!e},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=n},{}],29:[function(e,t,r){"use strict";var h=e("../utils"),i=e("./ConvertWorker"),s=e("./GenericWorker"),u=e("../base64"),n=e("../support"),a=e("../external"),o=null;if(n.nodestream)try{o=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function l(e,o){return new a.Promise(function(t,r){var n=[],i=e._internalType,s=e._outputType,a=e._mimeType;e.on("data",function(e,t){n.push(e),o&&o(t)}).on("error",function(e){n=[],r(e)}).on("end",function(){try{var e=function(e,t,r){switch(e){case"blob":return h.newBlob(h.transformTo("arraybuffer",t),r);case"base64":return u.encode(t);default:return h.transformTo(e,t)}}(s,function(e,t){var r,n=0,i=null,s=0;for(r=0;r<t.length;r++)s+=t[r].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(i=new Uint8Array(s),r=0;r<t.length;r++)i.set(t[r],n),n+=t[r].length;return i;case"nodebuffer":return Buffer.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(i,n),a);t(e)}catch(e){r(e)}n=[]}).resume()})}function f(e,t,r){var n=t;switch(t){case"blob":case"arraybuffer":n="uint8array";break;case"base64":n="string"}try{this._internalType=n,this._outputType=t,this._mimeType=r,h.checkSupport(n),this._worker=e.pipe(new i(n)),e.lock()}catch(e){this._worker=new s("error"),this._worker.error(e)}}f.prototype={accumulate:function(e){return l(this,e)},on:function(e,t){var r=this;return"data"===e?this._worker.on(e,function(e){t.call(r,e.data,e.meta)}):this._worker.on(e,function(){h.delay(t,arguments,r)}),this},resume:function(){return h.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(h.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new o(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=f},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(e,t,r){"use strict";if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof Buffer,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var n=new ArrayBuffer(0);try{r.blob=0===new Blob([n],{type:"application/zip"}).size}catch(e){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(n),r.blob=0===i.getBlob("application/zip").size}catch(e){r.blob=!1}}}try{r.nodestream=!!e("readable-stream").Readable}catch(e){r.nodestream=!1}},{"readable-stream":16}],31:[function(e,t,s){"use strict";for(var o=e("./utils"),h=e("./support"),r=e("./nodejsUtils"),n=e("./stream/GenericWorker"),u=new Array(256),i=0;i<256;i++)u[i]=252<=i?6:248<=i?5:240<=i?4:224<=i?3:192<=i?2:1;u[254]=u[254]=1;function a(){n.call(this,"utf-8 decode"),this.leftOver=null}function l(){n.call(this,"utf-8 encode")}s.utf8encode=function(e){return h.nodebuffer?r.newBufferFrom(e,"utf-8"):function(e){var t,r,n,i,s,a=e.length,o=0;for(i=0;i<a;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),o+=r<128?1:r<2048?2:r<65536?3:4;for(t=h.uint8array?new Uint8Array(o):new Array(o),i=s=0;s<o;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t}(e)},s.utf8decode=function(e){return h.nodebuffer?o.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,r,n,i,s=e.length,a=new Array(2*s);for(t=r=0;t<s;)if((n=e[t++])<128)a[r++]=n;else if(4<(i=u[n]))a[r++]=65533,t+=i-1;else{for(n&=2===i?31:3===i?15:7;1<i&&t<s;)n=n<<6|63&e[t++],i--;1<i?a[r++]=65533:n<65536?a[r++]=n:(n-=65536,a[r++]=55296|n>>10&1023,a[r++]=56320|1023&n)}return a.length!==r&&(a.subarray?a=a.subarray(0,r):a.length=r),o.applyFromCharCode(a)}(e=o.transformTo(h.uint8array?"uint8array":"array",e))},o.inherits(a,n),a.prototype.processChunk=function(e){var t=o.transformTo(h.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(h.uint8array){var r=t;(t=new Uint8Array(r.length+this.leftOver.length)).set(this.leftOver,0),t.set(r,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var n=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t}(t),i=t;n!==t.length&&(h.uint8array?(i=t.subarray(0,n),this.leftOver=t.subarray(n,t.length)):(i=t.slice(0,n),this.leftOver=t.slice(n,t.length))),this.push({data:s.utf8decode(i),meta:e.meta})},a.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:s.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},s.Utf8DecodeWorker=a,o.inherits(l,n),l.prototype.processChunk=function(e){this.push({data:s.utf8encode(e.data),meta:e.meta})},s.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,a){"use strict";var o=e("./support"),h=e("./base64"),r=e("./nodejsUtils"),u=e("./external");function n(e){return e}function l(e,t){for(var r=0;r<e.length;++r)t[r]=255&e.charCodeAt(r);return t}e("setimmediate"),a.newBlob=function(t,r){a.checkSupport("blob");try{return new Blob([t],{type:r})}catch(e){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(t),n.getBlob(r)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var i={stringifyByChunk:function(e,t,r){var n=[],i=0,s=e.length;if(s<=r)return String.fromCharCode.apply(null,e);for(;i<s;)"array"===t||"nodebuffer"===t?n.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+r,s)))):n.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+r,s)))),i+=r;return n.join("")},stringifyByChar:function(e){for(var t="",r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return t},applyCanBeUsed:{uint8array:function(){try{return o.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return o.nodebuffer&&1===String.fromCharCode.apply(null,r.allocBuffer(1)).length}catch(e){return!1}}()}};function s(e){var t=65536,r=a.getTypeOf(e),n=!0;if("uint8array"===r?n=i.applyCanBeUsed.uint8array:"nodebuffer"===r&&(n=i.applyCanBeUsed.nodebuffer),n)for(;1<t;)try{return i.stringifyByChunk(e,r,t)}catch(e){t=Math.floor(t/2)}return i.stringifyByChar(e)}function f(e,t){for(var r=0;r<e.length;r++)t[r]=e[r];return t}a.applyFromCharCode=s;var c={};c.string={string:n,array:function(e){return l(e,new Array(e.length))},arraybuffer:function(e){return c.string.uint8array(e).buffer},uint8array:function(e){return l(e,new Uint8Array(e.length))},nodebuffer:function(e){return l(e,r.allocBuffer(e.length))}},c.array={string:s,array:n,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return r.newBufferFrom(e)}},c.arraybuffer={string:function(e){return s(new Uint8Array(e))},array:function(e){return f(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:n,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return r.newBufferFrom(new Uint8Array(e))}},c.uint8array={string:s,array:function(e){return f(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:n,nodebuffer:function(e){return r.newBufferFrom(e)}},c.nodebuffer={string:s,array:function(e){return f(e,new Array(e.length))},arraybuffer:function(e){return c.nodebuffer.uint8array(e).buffer},uint8array:function(e){return f(e,new Uint8Array(e.length))},nodebuffer:n},a.transformTo=function(e,t){if(t=t||"",!e)return t;a.checkSupport(e);var r=a.getTypeOf(t);return c[r][e](t)},a.resolve=function(e){for(var t=e.split("/"),r=[],n=0;n<t.length;n++){var i=t[n];"."===i||""===i&&0!==n&&n!==t.length-1||(".."===i?r.pop():r.push(i))}return r.join("/")},a.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":o.nodebuffer&&r.isBuffer(e)?"nodebuffer":o.uint8array&&e instanceof Uint8Array?"uint8array":o.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},a.checkSupport=function(e){if(!o[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},a.MAX_VALUE_16BITS=65535,a.MAX_VALUE_32BITS=-1,a.pretty=function(e){var t,r,n="";for(r=0;r<(e||"").length;r++)n+="\\x"+((t=e.charCodeAt(r))<16?"0":"")+t.toString(16).toUpperCase();return n},a.delay=function(e,t,r){setImmediate(function(){e.apply(r||null,t||[])})},a.inherits=function(e,t){function r(){}r.prototype=t.prototype,e.prototype=new r},a.extend=function(){var e,t,r={};for(e=0;e<arguments.length;e++)for(t in arguments[e])arguments[e].hasOwnProperty(t)&&void 0===r[t]&&(r[t]=arguments[e][t]);return r},a.prepareContent=function(r,e,n,i,s){return u.Promise.resolve(e).then(function(n){return o.blob&&(n instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(n)))&&"undefined"!=typeof FileReader?new u.Promise(function(t,r){var e=new FileReader;e.onload=function(e){t(e.target.result)},e.onerror=function(e){r(e.target.error)},e.readAsArrayBuffer(n)}):n}).then(function(e){var t=a.getTypeOf(e);return t?("arraybuffer"===t?e=a.transformTo("uint8array",e):"string"===t&&(s?e=h.decode(e):n&&!0!==i&&(e=function(e){return l(e,o.uint8array?new Uint8Array(e.length):new Array(e.length))}(e))),e):u.Promise.reject(new Error("Can't read the data of '"+r+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(e,t,r){"use strict";var n=e("./reader/readerFor"),i=e("./utils"),s=e("./signature"),a=e("./zipEntry"),o=(e("./utf8"),e("./support"));function h(e){this.files=[],this.loadOptions=e}h.prototype={checkSignature:function(e){if(!this.reader.readAndCheckSignature(e)){this.reader.index-=4;var t=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(t)+", expected "+i.pretty(e)+")")}},isSignature:function(e,t){var r=this.reader.index;this.reader.setIndex(e);var n=this.reader.readString(4)===t;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=o.uint8array?"uint8array":"array",r=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,r,n=this.zip64EndOfCentralSize-44;0<n;)e=this.reader.readInt(2),t=this.reader.readInt(4),r=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var e,t;for(e=0;e<this.files.length;e++)t=this.files[e],this.reader.setIndex(t.localHeaderOffset),this.checkSignature(s.LOCAL_FILE_HEADER),t.readLocalPart(this.reader),t.handleUTF8(),t.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(s.CENTRAL_FILE_HEADER);)(e=new a({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(s.CENTRAL_DIRECTORY_END);if(e<0)throw!this.isSignature(0,s.LOCAL_FILE_HEADER)?new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"):new Error("Corrupted zip: can't find end of central directory");this.reader.setIndex(e);var t=e;if(this.checkSignature(s.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,s.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(s.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=t-r;if(0<n)this.isSignature(t,s.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(e){this.reader=n(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=h},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(e,t,r){"use strict";var n=e("./reader/readerFor"),s=e("./utils"),i=e("./compressedObject"),a=e("./crc32"),o=e("./utf8"),h=e("./compressions"),u=e("./support");function l(e,t){this.options=e,this.loadOptions=t}l.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t,r;if(e.skip(22),this.fileNameLength=e.readInt(2),r=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in h)if(h.hasOwnProperty(t)&&h[t].magic===e)return h[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+s.pretty(this.compressionMethod)+" unknown (inner file : "+s.transformTo("string",this.fileName)+")");this.decompressed=new i(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){if(this.extraFields[1]){var t=n(this.extraFields[1].value);this.uncompressedSize===s.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===s.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===s.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===s.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4))}},readExtraFields:function(e){var t,r,n,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<i;)t=e.readInt(2),r=e.readInt(2),n=e.readData(r),this.extraFields[t]={id:t,length:r,value:n};e.setIndex(i)},handleUTF8:function(){var e=u.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=o.utf8decode(this.fileName),this.fileCommentStr=o.utf8decode(this.fileComment);else{var t=this.findExtraFieldUnicodePath();if(null!==t)this.fileNameStr=t;else{var r=s.transformTo(e,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var i=s.transformTo(e,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(i)}}},findExtraFieldUnicodePath:function(){var e=this.extraFields[28789];if(e){var t=n(e.value);return 1!==t.readInt(1)?null:a(this.fileName)!==t.readInt(4)?null:o.utf8decode(t.readData(e.length-5))}return null},findExtraFieldUnicodeComment:function(){var e=this.extraFields[25461];if(e){var t=n(e.value);return 1!==t.readInt(1)?null:a(this.fileComment)!==t.readInt(4)?null:o.utf8decode(t.readData(e.length-5))}return null}},t.exports=l},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(e,t,r){"use strict";function n(e,t,r){this.name=e,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=t,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var s=e("./stream/StreamHelper"),i=e("./stream/DataWorker"),a=e("./utf8"),o=e("./compressedObject"),h=e("./stream/GenericWorker");n.prototype={internalStream:function(e){var t=null,r="string";try{if(!e)throw new Error("No output type specified.");var n="string"===(r=e.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),t=this._decompressWorker();var i=!this._dataBinary;i&&!n&&(t=t.pipe(new a.Utf8EncodeWorker)),!i&&n&&(t=t.pipe(new a.Utf8DecodeWorker))}catch(e){(t=new h("error")).error(e)}return new s(t,r,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){if(this._data instanceof o&&this._data.compression.magic===e.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new a.Utf8EncodeWorker)),o.createWorkerFrom(r,e,t)},_decompressWorker:function(){return this._data instanceof o?this._data.getContentWorker():this._data instanceof h?this._data:new i(this._data)}};for(var u=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},f=0;f<u.length;f++)n.prototype[u[f]]=l;t.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(e,l,t){(function(t){"use strict";var r,n,e=t.MutationObserver||t.WebKitMutationObserver;if(e){var i=0,s=new e(u),a=t.document.createTextNode("");s.observe(a,{characterData:!0}),r=function(){a.data=i=++i%2}}else if(t.setImmediate||void 0===t.MessageChannel)r="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){u(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(u,0)};else{var o=new t.MessageChannel;o.port1.onmessage=u,r=function(){o.port2.postMessage(0)}}var h=[];function u(){var e,t;n=!0;for(var r=h.length;r;){for(t=h,h=[],e=-1;++e<r;)t[e]();r=h.length}n=!1}l.exports=function(e){1!==h.push(e)||n||r()}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(e,t,r){"use strict";var i=e("immediate");function u(){}var l={},s=["REJECTED"],a=["FULFILLED"],n=["PENDING"];function o(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=n,this.queue=[],this.outcome=void 0,e!==u&&d(this,e)}function h(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function f(t,r,n){i(function(){var e;try{e=r(n)}catch(e){return l.reject(t,e)}e===t?l.reject(t,new TypeError("Cannot resolve promise with itself")):l.resolve(t,e)})}function c(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function d(t,e){var r=!1;function n(e){r||(r=!0,l.reject(t,e))}function i(e){r||(r=!0,l.resolve(t,e))}var s=p(function(){e(i,n)});"error"===s.status&&n(s.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}(t.exports=o).prototype.finally=function(t){if("function"!=typeof t)return this;var r=this.constructor;return this.then(function(e){return r.resolve(t()).then(function(){return e})},function(e){return r.resolve(t()).then(function(){throw e})})},o.prototype.catch=function(e){return this.then(null,e)},o.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var r=new this.constructor(u);this.state!==n?f(r,this.state===a?e:t,this.outcome):this.queue.push(new h(r,e,t));return r},h.prototype.callFulfilled=function(e){l.resolve(this.promise,e)},h.prototype.otherCallFulfilled=function(e){f(this.promise,this.onFulfilled,e)},h.prototype.callRejected=function(e){l.reject(this.promise,e)},h.prototype.otherCallRejected=function(e){f(this.promise,this.onRejected,e)},l.resolve=function(e,t){var r=p(c,t);if("error"===r.status)return l.reject(e,r.value);var n=r.value;if(n)d(e,n);else{e.state=a,e.outcome=t;for(var i=-1,s=e.queue.length;++i<s;)e.queue[i].callFulfilled(t)}return e},l.reject=function(e,t){e.state=s,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},o.resolve=function(e){if(e instanceof this)return e;return l.resolve(new this(u),e)},o.reject=function(e){var t=new this(u);return l.reject(t,e)},o.all=function(e){var r=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,i=!1;if(!n)return this.resolve([]);var s=new Array(n),a=0,t=-1,o=new this(u);for(;++t<n;)h(e[t],t);return o;function h(e,t){r.resolve(e).then(function(e){s[t]=e,++a!==n||i||(i=!0,l.resolve(o,s))},function(e){i||(i=!0,l.reject(o,e))})}},o.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);var i=-1,s=new this(u);for(;++i<r;)a=e[i],t.resolve(a).then(function(e){n||(n=!0,l.resolve(s,e))},function(e){n||(n=!0,l.reject(s,e))});var a;return s}},{immediate:36}],38:[function(e,t,r){"use strict";var n={};(0,e("./lib/utils/common").assign)(n,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=n},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(e,t,r){"use strict";var a=e("./zlib/deflate"),o=e("./utils/common"),h=e("./utils/strings"),i=e("./zlib/messages"),s=e("./zlib/zstream"),u=Object.prototype.toString,l=0,f=-1,c=0,d=8;function p(e){if(!(this instanceof p))return new p(e);this.options=o.assign({level:f,method:d,chunkSize:16384,windowBits:15,memLevel:8,strategy:c,to:""},e||{});var t=this.options;t.raw&&0<t.windowBits?t.windowBits=-t.windowBits:t.gzip&&0<t.windowBits&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0;var r=a.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==l)throw new Error(i[r]);if(t.header&&a.deflateSetHeader(this.strm,t.header),t.dictionary){var n;if(n="string"==typeof t.dictionary?h.string2buf(t.dictionary):"[object ArrayBuffer]"===u.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(r=a.deflateSetDictionary(this.strm,n))!==l)throw new Error(i[r]);this._dict_set=!0}}function n(e,t){var r=new p(t);if(r.push(e,!0),r.err)throw r.msg||i[r.err];return r.result}p.prototype.push=function(e,t){var r,n,i=this.strm,s=this.options.chunkSize;if(this.ended)return!1;n=t===~~t?t:!0===t?4:0,"string"==typeof e?i.input=h.string2buf(e):"[object ArrayBuffer]"===u.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;do{if(0===i.avail_out&&(i.output=new o.Buf8(s),i.next_out=0,i.avail_out=s),1!==(r=a.deflate(i,n))&&r!==l)return this.onEnd(r),!(this.ended=!0);0!==i.avail_out&&(0!==i.avail_in||4!==n&&2!==n)||("string"===this.options.to?this.onData(h.buf2binstring(o.shrinkBuf(i.output,i.next_out))):this.onData(o.shrinkBuf(i.output,i.next_out)))}while((0<i.avail_in||0===i.avail_out)&&1!==r);return 4===n?(r=a.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===l):2!==n||(this.onEnd(l),!(i.avail_out=0))},p.prototype.onData=function(e){this.chunks.push(e)},p.prototype.onEnd=function(e){e===l&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=o.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Deflate=p,r.deflate=n,r.deflateRaw=function(e,t){return(t=t||{}).raw=!0,n(e,t)},r.gzip=function(e,t){return(t=t||{}).gzip=!0,n(e,t)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(e,t,r){"use strict";var c=e("./zlib/inflate"),d=e("./utils/common"),p=e("./utils/strings"),m=e("./zlib/constants"),n=e("./zlib/messages"),i=e("./zlib/zstream"),s=e("./zlib/gzheader"),_=Object.prototype.toString;function a(e){if(!(this instanceof a))return new a(e);this.options=d.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new i,this.strm.avail_out=0;var r=c.inflateInit2(this.strm,t.windowBits);if(r!==m.Z_OK)throw new Error(n[r]);this.header=new s,c.inflateGetHeader(this.strm,this.header)}function o(e,t){var r=new a(t);if(r.push(e,!0),r.err)throw r.msg||n[r.err];return r.result}a.prototype.push=function(e,t){var r,n,i,s,a,o,h=this.strm,u=this.options.chunkSize,l=this.options.dictionary,f=!1;if(this.ended)return!1;n=t===~~t?t:!0===t?m.Z_FINISH:m.Z_NO_FLUSH,"string"==typeof e?h.input=p.binstring2buf(e):"[object ArrayBuffer]"===_.call(e)?h.input=new Uint8Array(e):h.input=e,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new d.Buf8(u),h.next_out=0,h.avail_out=u),(r=c.inflate(h,m.Z_NO_FLUSH))===m.Z_NEED_DICT&&l&&(o="string"==typeof l?p.string2buf(l):"[object ArrayBuffer]"===_.call(l)?new Uint8Array(l):l,r=c.inflateSetDictionary(this.strm,o)),r===m.Z_BUF_ERROR&&!0===f&&(r=m.Z_OK,f=!1),r!==m.Z_STREAM_END&&r!==m.Z_OK)return this.onEnd(r),!(this.ended=!0);h.next_out&&(0!==h.avail_out&&r!==m.Z_STREAM_END&&(0!==h.avail_in||n!==m.Z_FINISH&&n!==m.Z_SYNC_FLUSH)||("string"===this.options.to?(i=p.utf8border(h.output,h.next_out),s=h.next_out-i,a=p.buf2string(h.output,i),h.next_out=s,h.avail_out=u-s,s&&d.arraySet(h.output,h.output,i,s,0),this.onData(a)):this.onData(d.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(f=!0)}while((0<h.avail_in||0===h.avail_out)&&r!==m.Z_STREAM_END);return r===m.Z_STREAM_END&&(n=m.Z_FINISH),n===m.Z_FINISH?(r=c.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===m.Z_OK):n!==m.Z_SYNC_FLUSH||(this.onEnd(m.Z_OK),!(h.avail_out=0))},a.prototype.onData=function(e){this.chunks.push(e)},a.prototype.onEnd=function(e){e===m.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=d.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},r.Inflate=a,r.inflate=o,r.inflateRaw=function(e,t){return(t=t||{}).raw=!0,o(e,t)},r.ungzip=o},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(e,t,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(e[n]=r[n])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var s=0;s<n;s++)e[i+s]=t[r+s]},flattenChunks:function(e){var t,r,n,i,s,a;for(t=n=0,r=e.length;t<r;t++)n+=e[t].length;for(a=new Uint8Array(n),t=i=0,r=e.length;t<r;t++)s=e[t],a.set(s,i),i+=s.length;return a}},s={arraySet:function(e,t,r,n,i){for(var s=0;s<n;s++)e[i+s]=t[r+s]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,s))},r.setTyped(n)},{}],42:[function(e,t,r){"use strict";var h=e("./common"),i=!0,s=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){s=!1}for(var u=new h.Buf8(256),n=0;n<256;n++)u[n]=252<=n?6:248<=n?5:240<=n?4:224<=n?3:192<=n?2:1;function l(e,t){if(t<65537&&(e.subarray&&s||!e.subarray&&i))return String.fromCharCode.apply(null,h.shrinkBuf(e,t));for(var r="",n=0;n<t;n++)r+=String.fromCharCode(e[n]);return r}u[254]=u[254]=1,r.string2buf=function(e){var t,r,n,i,s,a=e.length,o=0;for(i=0;i<a;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),o+=r<128?1:r<2048?2:r<65536?3:4;for(t=new h.Buf8(o),i=s=0;s<o;i++)55296==(64512&(r=e.charCodeAt(i)))&&i+1<a&&56320==(64512&(n=e.charCodeAt(i+1)))&&(r=65536+(r-55296<<10)+(n-56320),i++),r<128?t[s++]=r:(r<2048?t[s++]=192|r>>>6:(r<65536?t[s++]=224|r>>>12:(t[s++]=240|r>>>18,t[s++]=128|r>>>12&63),t[s++]=128|r>>>6&63),t[s++]=128|63&r);return t},r.buf2binstring=function(e){return l(e,e.length)},r.binstring2buf=function(e){for(var t=new h.Buf8(e.length),r=0,n=t.length;r<n;r++)t[r]=e.charCodeAt(r);return t},r.buf2string=function(e,t){var r,n,i,s,a=t||e.length,o=new Array(2*a);for(r=n=0;r<a;)if((i=e[r++])<128)o[n++]=i;else if(4<(s=u[i]))o[n++]=65533,r+=s-1;else{for(i&=2===s?31:3===s?15:7;1<s&&r<a;)i=i<<6|63&e[r++],s--;1<s?o[n++]=65533:i<65536?o[n++]=i:(i-=65536,o[n++]=55296|i>>10&1023,o[n++]=56320|1023&i)}return l(o,n)},r.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;0<=r&&128==(192&e[r]);)r--;return r<0?t:0===r?t:r+u[e[r]]>t?r:t}},{"./common":41}],43:[function(e,t,r){"use strict";t.exports=function(e,t,r,n){for(var i=65535&e|0,s=e>>>16&65535|0,a=0;0!==r;){for(r-=a=2e3<r?2e3:r;s=s+(i=i+t[n++]|0)|0,--a;);i%=65521,s%=65521}return i|s<<16|0}},{}],44:[function(e,t,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(e,t,r){"use strict";var o=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,n){var i=o,s=n+r;e^=-1;for(var a=n;a<s;a++)e=e>>>8^i[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,r){"use strict";var h,c=e("../utils/common"),u=e("./trees"),d=e("./adler32"),p=e("./crc32"),n=e("./messages"),l=0,f=4,m=0,_=-2,g=-1,b=4,i=2,v=8,y=9,s=286,a=30,o=19,w=2*s+1,k=15,x=3,S=258,z=S+x+1,C=42,E=113,A=1,I=2,O=3,B=4;function R(e,t){return e.msg=n[t],t}function T(e){return(e<<1)-(4<e?9:0)}function D(e){for(var t=e.length;0<=--t;)e[t]=0}function F(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(c.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function N(e,t){u._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,F(e.strm)}function U(e,t){e.pending_buf[e.pending++]=t}function P(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function L(e,t){var r,n,i=e.max_chain_length,s=e.strstart,a=e.prev_length,o=e.nice_match,h=e.strstart>e.w_size-z?e.strstart-(e.w_size-z):0,u=e.window,l=e.w_mask,f=e.prev,c=e.strstart+S,d=u[s+a-1],p=u[s+a];e.prev_length>=e.good_match&&(i>>=2),o>e.lookahead&&(o=e.lookahead);do{if(u[(r=t)+a]===p&&u[r+a-1]===d&&u[r]===u[s]&&u[++r]===u[s+1]){s+=2,r++;do{}while(u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&u[++s]===u[++r]&&s<c);if(n=S-(c-s),s=c-S,a<n){if(e.match_start=t,o<=(a=n))break;d=u[s+a-1],p=u[s+a]}}}while((t=f[t&l])>h&&0!=--i);return a<=e.lookahead?a:e.lookahead}function j(e){var t,r,n,i,s,a,o,h,u,l,f=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=f+(f-z)){for(c.arraySet(e.window,e.window,f,f,0),e.match_start-=f,e.strstart-=f,e.block_start-=f,t=r=e.hash_size;n=e.head[--t],e.head[t]=f<=n?n-f:0,--r;);for(t=r=f;n=e.prev[--t],e.prev[t]=f<=n?n-f:0,--r;);i+=f}if(0===e.strm.avail_in)break;if(a=e.strm,o=e.window,h=e.strstart+e.lookahead,u=i,l=void 0,l=a.avail_in,u<l&&(l=u),r=0===l?0:(a.avail_in-=l,c.arraySet(o,a.input,a.next_in,l,h),1===a.state.wrap?a.adler=d(a.adler,o,l,h):2===a.state.wrap&&(a.adler=p(a.adler,o,l,h)),a.next_in+=l,a.total_in+=l,l),e.lookahead+=r,e.lookahead+e.insert>=x)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+x-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<x)););}while(e.lookahead<z&&0!==e.strm.avail_in)}function Z(e,t){for(var r,n;;){if(e.lookahead<z){if(j(e),e.lookahead<z&&t===l)return A;if(0===e.lookahead)break}if(r=0,e.lookahead>=x&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-z&&(e.match_length=L(e,r)),e.match_length>=x)if(n=u._tr_tally(e,e.strstart-e.match_start,e.match_length-x),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=x){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=e.strstart<x-1?e.strstart:x-1,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}function W(e,t){for(var r,n,i;;){if(e.lookahead<z){if(j(e),e.lookahead<z&&t===l)return A;if(0===e.lookahead)break}if(r=0,e.lookahead>=x&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=x-1,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-z&&(e.match_length=L(e,r),e.match_length<=5&&(1===e.strategy||e.match_length===x&&4096<e.strstart-e.match_start)&&(e.match_length=x-1)),e.prev_length>=x&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-x,n=u._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-x),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+x-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=x-1,e.strstart++,n&&(N(e,!1),0===e.strm.avail_out))return A}else if(e.match_available){if((n=u._tr_tally(e,0,e.window[e.strstart-1]))&&N(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return A}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=u._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<x-1?e.strstart:x-1,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}function M(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function H(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=v,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new c.Buf16(2*w),this.dyn_dtree=new c.Buf16(2*(2*a+1)),this.bl_tree=new c.Buf16(2*(2*o+1)),D(this.dyn_ltree),D(this.dyn_dtree),D(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new c.Buf16(k+1),this.heap=new c.Buf16(2*s+1),D(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new c.Buf16(2*s+1),D(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function G(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=i,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?C:E,e.adler=2===t.wrap?0:1,t.last_flush=l,u._tr_init(t),m):R(e,_)}function K(e){var t=G(e);return t===m&&function(e){e.window_size=2*e.w_size,D(e.head),e.max_lazy_match=h[e.level].max_lazy,e.good_match=h[e.level].good_length,e.nice_match=h[e.level].nice_length,e.max_chain_length=h[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=x-1,e.match_available=0,e.ins_h=0}(e.state),t}function Y(e,t,r,n,i,s){if(!e)return _;var a=1;if(t===g&&(t=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),i<1||y<i||r!==v||n<8||15<n||t<0||9<t||s<0||b<s)return R(e,_);8===n&&(n=9);var o=new H;return(e.state=o).strm=e,o.wrap=a,o.gzhead=null,o.w_bits=n,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=i+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+x-1)/x),o.window=new c.Buf8(2*o.w_size),o.head=new c.Buf16(o.hash_size),o.prev=new c.Buf16(o.w_size),o.lit_bufsize=1<<i+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new c.Buf8(o.pending_buf_size),o.d_buf=1*o.lit_bufsize,o.l_buf=3*o.lit_bufsize,o.level=t,o.strategy=s,o.method=r,K(e)}h=[new M(0,0,0,0,function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(j(e),0===e.lookahead&&t===l)return A;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,N(e,!1),0===e.strm.avail_out))return A;if(e.strstart-e.block_start>=e.w_size-z&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):(e.strstart>e.block_start&&(N(e,!1),e.strm.avail_out),A)}),new M(4,4,8,4,Z),new M(4,5,16,8,Z),new M(4,6,32,32,Z),new M(4,4,16,16,W),new M(8,16,32,32,W),new M(8,16,128,128,W),new M(8,32,128,256,W),new M(32,128,258,1024,W),new M(32,258,258,4096,W)],r.deflateInit=function(e,t){return Y(e,t,v,15,8,0)},r.deflateInit2=Y,r.deflateReset=K,r.deflateResetKeep=G,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?_:(e.state.gzhead=t,m):_},r.deflate=function(e,t){var r,n,i,s;if(!e||!e.state||5<t||t<0)return e?R(e,_):_;if(n=e.state,!e.output||!e.input&&0!==e.avail_in||666===n.status&&t!==f)return R(e,0===e.avail_out?-5:_);if(n.strm=e,r=n.last_flush,n.last_flush=t,n.status===C)if(2===n.wrap)e.adler=0,U(n,31),U(n,139),U(n,8),n.gzhead?(U(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),U(n,255&n.gzhead.time),U(n,n.gzhead.time>>8&255),U(n,n.gzhead.time>>16&255),U(n,n.gzhead.time>>24&255),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(U(n,255&n.gzhead.extra.length),U(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=p(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(U(n,0),U(n,0),U(n,0),U(n,0),U(n,0),U(n,9===n.level?2:2<=n.strategy||n.level<2?4:0),U(n,3),n.status=E);else{var a=v+(n.w_bits-8<<4)<<8;a|=(2<=n.strategy||n.level<2?0:n.level<6?1:6===n.level?2:3)<<6,0!==n.strstart&&(a|=32),a+=31-a%31,n.status=E,P(n,a),0!==n.strstart&&(P(n,e.adler>>>16),P(n,65535&e.adler)),e.adler=1}if(69===n.status)if(n.gzhead.extra){for(i=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending!==n.pending_buf_size));)U(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,U(n,s)}while(0!==s);n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),F(e),i=n.pending,n.pending===n.pending_buf_size)){s=1;break}s=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,U(n,s)}while(0!==s);n.gzhead.hcrc&&n.pending>i&&(e.adler=p(e.adler,n.pending_buf,n.pending-i,i)),0===s&&(n.status=103)}else n.status=103;if(103===n.status&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&F(e),n.pending+2<=n.pending_buf_size&&(U(n,255&e.adler),U(n,e.adler>>8&255),e.adler=0,n.status=E)):n.status=E),0!==n.pending){if(F(e),0===e.avail_out)return n.last_flush=-1,m}else if(0===e.avail_in&&T(t)<=T(r)&&t!==f)return R(e,-5);if(666===n.status&&0!==e.avail_in)return R(e,-5);if(0!==e.avail_in||0!==n.lookahead||t!==l&&666!==n.status){var o=2===n.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(j(e),0===e.lookahead)){if(t===l)return A;break}if(e.match_length=0,r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):3===n.strategy?function(e,t){for(var r,n,i,s,a=e.window;;){if(e.lookahead<=S){if(j(e),e.lookahead<=S&&t===l)return A;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=x&&0<e.strstart&&(n=a[i=e.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=e.strstart+S;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<s);e.match_length=S-(s-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=x?(r=u._tr_tally(e,1,e.match_length-x),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=u._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(N(e,!1),0===e.strm.avail_out))return A}return e.insert=0,t===f?(N(e,!0),0===e.strm.avail_out?O:B):e.last_lit&&(N(e,!1),0===e.strm.avail_out)?A:I}(n,t):h[n.level].func(n,t);if(o!==O&&o!==B||(n.status=666),o===A||o===O)return 0===e.avail_out&&(n.last_flush=-1),m;if(o===I&&(1===t?u._tr_align(n):5!==t&&(u._tr_stored_block(n,0,0,!1),3===t&&(D(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),F(e),0===e.avail_out))return n.last_flush=-1,m}return t!==f?m:n.wrap<=0?1:(2===n.wrap?(U(n,255&e.adler),U(n,e.adler>>8&255),U(n,e.adler>>16&255),U(n,e.adler>>24&255),U(n,255&e.total_in),U(n,e.total_in>>8&255),U(n,e.total_in>>16&255),U(n,e.total_in>>24&255)):(P(n,e.adler>>>16),P(n,65535&e.adler)),F(e),0<n.wrap&&(n.wrap=-n.wrap),0!==n.pending?m:1)},r.deflateEnd=function(e){var t;return e&&e.state?(t=e.state.status)!==C&&69!==t&&73!==t&&91!==t&&103!==t&&t!==E&&666!==t?R(e,_):(e.state=null,t===E?R(e,-3):m):_},r.deflateSetDictionary=function(e,t){var r,n,i,s,a,o,h,u,l=t.length;if(!e||!e.state)return _;if(2===(s=(r=e.state).wrap)||1===s&&r.status!==C||r.lookahead)return _;for(1===s&&(e.adler=d(e.adler,t,l,0)),r.wrap=0,l>=r.w_size&&(0===s&&(D(r.head),r.strstart=0,r.block_start=0,r.insert=0),u=new c.Buf8(r.w_size),c.arraySet(u,t,l-r.w_size,r.w_size,0),t=u,l=r.w_size),a=e.avail_in,o=e.next_in,h=e.input,e.avail_in=l,e.next_in=0,e.input=t,j(r);r.lookahead>=x;){for(n=r.strstart,i=r.lookahead-(x-1);r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+x-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++,--i;);r.strstart=n,r.lookahead=x-1,j(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=x-1,r.match_available=0,e.next_in=o,e.input=h,e.avail_in=a,r.wrap=s,m},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(e,t,r){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i,s,a,o,h,u,l,f,c,d,p,m,_,g,b,v,y,w,k,x,S,z,C;r=e.state,n=e.next_in,z=e.input,i=n+(e.avail_in-5),s=e.next_out,C=e.output,a=s-(t-e.avail_out),o=s+(e.avail_out-257),h=r.dmax,u=r.wsize,l=r.whave,f=r.wnext,c=r.window,d=r.hold,p=r.bits,m=r.lencode,_=r.distcode,g=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;e:do{p<15&&(d+=z[n++]<<p,p+=8,d+=z[n++]<<p,p+=8),v=m[d&g];t:for(;;){if(d>>>=y=v>>>24,p-=y,0===(y=v>>>16&255))C[s++]=65535&v;else{if(!(16&y)){if(0==(64&y)){v=m[(65535&v)+(d&(1<<y)-1)];continue t}if(32&y){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}w=65535&v,(y&=15)&&(p<y&&(d+=z[n++]<<p,p+=8),w+=d&(1<<y)-1,d>>>=y,p-=y),p<15&&(d+=z[n++]<<p,p+=8,d+=z[n++]<<p,p+=8),v=_[d&b];r:for(;;){if(d>>>=y=v>>>24,p-=y,!(16&(y=v>>>16&255))){if(0==(64&y)){v=_[(65535&v)+(d&(1<<y)-1)];continue r}e.msg="invalid distance code",r.mode=30;break e}if(k=65535&v,p<(y&=15)&&(d+=z[n++]<<p,(p+=8)<y&&(d+=z[n++]<<p,p+=8)),h<(k+=d&(1<<y)-1)){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=y,p-=y,(y=s-a)<k){if(l<(y=k-y)&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(S=c,(x=0)===f){if(x+=u-y,y<w){for(w-=y;C[s++]=c[x++],--y;);x=s-k,S=C}}else if(f<y){if(x+=u+f-y,(y-=f)<w){for(w-=y;C[s++]=c[x++],--y;);if(x=0,f<w){for(w-=y=f;C[s++]=c[x++],--y;);x=s-k,S=C}}}else if(x+=f-y,y<w){for(w-=y;C[s++]=c[x++],--y;);x=s-k,S=C}for(;2<w;)C[s++]=S[x++],C[s++]=S[x++],C[s++]=S[x++],w-=3;w&&(C[s++]=S[x++],1<w&&(C[s++]=S[x++]))}else{for(x=s-k;C[s++]=C[x++],C[s++]=C[x++],C[s++]=C[x++],2<(w-=3););w&&(C[s++]=C[x++],1<w&&(C[s++]=C[x++]))}break}}break}}while(n<i&&s<o);n-=w=p>>3,d&=(1<<(p-=w<<3))-1,e.next_in=n,e.next_out=s,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=s<o?o-s+257:257-(s-o),r.hold=d,r.bits=p}},{}],49:[function(e,t,r){"use strict";var I=e("../utils/common"),O=e("./adler32"),B=e("./crc32"),R=e("./inffast"),T=e("./inftrees"),D=1,F=2,N=0,U=-2,P=1,n=852,i=592;function L(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function s(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new I.Buf16(320),this.work=new I.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=P,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new I.Buf32(n),t.distcode=t.distdyn=new I.Buf32(i),t.sane=1,t.back=-1,N):U}function o(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,a(e)):U}function h(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t)?U:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,o(e))):U}function u(e,t){var r,n;return e?(n=new s,(e.state=n).window=null,(r=h(e,t))!==N&&(e.state=null),r):U}var l,f,c=!0;function j(e){if(c){var t;for(l=new I.Buf32(512),f=new I.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(T(D,e.lens,0,288,l,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;T(F,e.lens,0,32,f,0,e.work,{bits:5}),c=!1}e.lencode=l,e.lenbits=9,e.distcode=f,e.distbits=5}function Z(e,t,r,n){var i,s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new I.Buf8(s.wsize)),n>=s.wsize?(I.arraySet(s.window,t,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(n<(i=s.wsize-s.wnext)&&(i=n),I.arraySet(s.window,t,r-n,i,s.wnext),(n-=i)?(I.arraySet(s.window,t,r-n,n,0),s.wnext=n,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0}r.inflateReset=o,r.inflateReset2=h,r.inflateResetKeep=a,r.inflateInit=function(e){return u(e,15)},r.inflateInit2=u,r.inflate=function(e,t){var r,n,i,s,a,o,h,u,l,f,c,d,p,m,_,g,b,v,y,w,k,x,S,z,C=0,E=new I.Buf8(4),A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return U;12===(r=e.state).mode&&(r.mode=13),a=e.next_out,i=e.output,h=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,u=r.hold,l=r.bits,f=o,c=h,x=N;e:for(;;)switch(r.mode){case P:if(0===r.wrap){r.mode=13;break}for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if(2&r.wrap&&35615===u){E[r.check=0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0),l=u=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&u)<<8)+(u>>8))%31){e.msg="incorrect header check",r.mode=30;break}if(8!=(15&u)){e.msg="unknown compression method",r.mode=30;break}if(l-=4,k=8+(15&(u>>>=4)),0===r.wbits)r.wbits=k;else if(k>r.wbits){e.msg="invalid window size",r.mode=30;break}r.dmax=1<<k,e.adler=r.check=1,r.mode=512&u?10:12,l=u=0;break;case 2:for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if(r.flags=u,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=u>>8&1),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=3;case 3:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}r.head&&(r.head.time=u),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,E[2]=u>>>16&255,E[3]=u>>>24&255,r.check=B(r.check,E,4,0)),l=u=0,r.mode=4;case 4:for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}r.head&&(r.head.xflags=255&u,r.head.os=u>>8),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0,r.mode=5;case 5:if(1024&r.flags){for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}r.length=u,r.head&&(r.head.extra_len=u),512&r.flags&&(E[0]=255&u,E[1]=u>>>8&255,r.check=B(r.check,E,2,0)),l=u=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(o<(d=r.length)&&(d=o),d&&(r.head&&(k=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),I.arraySet(r.head.extra,n,s,d,k)),512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,r.length-=d),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===o)break e;for(d=0;k=n[s+d++],r.head&&k&&r.length<65536&&(r.head.name+=String.fromCharCode(k)),k&&d<o;);if(512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,k)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===o)break e;for(d=0;k=n[s+d++],r.head&&k&&r.length<65536&&(r.head.comment+=String.fromCharCode(k)),k&&d<o;);if(512&r.flags&&(r.check=B(r.check,n,d,s)),o-=d,s+=d,k)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;l<16;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if(u!==(65535&r.check)){e.msg="header crc mismatch",r.mode=30;break}l=u=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=12;break;case 10:for(;l<32;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}e.adler=r.check=L(u),l=u=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,2;e.adler=r.check=1,r.mode=12;case 12:if(5===t||6===t)break e;case 13:if(r.last){u>>>=7&l,l-=7&l,r.mode=27;break}for(;l<3;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}switch(r.last=1&u,l-=1,3&(u>>>=1)){case 0:r.mode=14;break;case 1:if(j(r),r.mode=20,6!==t)break;u>>>=2,l-=2;break e;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=30}u>>>=2,l-=2;break;case 14:for(u>>>=7&l,l-=7&l;l<32;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if((65535&u)!=(u>>>16^65535)){e.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&u,l=u=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(d=r.length){if(o<d&&(d=o),h<d&&(d=h),0===d)break e;I.arraySet(i,n,s,d,a),o-=d,s+=d,h-=d,a+=d,r.length-=d;break}r.mode=12;break;case 17:for(;l<14;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if(r.nlen=257+(31&u),u>>>=5,l-=5,r.ndist=1+(31&u),u>>>=5,l-=5,r.ncode=4+(15&u),u>>>=4,l-=4,286<r.nlen||30<r.ndist){e.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;l<3;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}r.lens[A[r.have++]]=7&u,u>>>=3,l-=3}for(;r.have<19;)r.lens[A[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,S={bits:r.lenbits},x=T(0,r.lens,0,19,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;g=(C=r.lencode[u&(1<<r.lenbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if(b<16)u>>>=_,l-=_,r.lens[r.have++]=b;else{if(16===b){for(z=_+2;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if(u>>>=_,l-=_,0===r.have){e.msg="invalid bit length repeat",r.mode=30;break}k=r.lens[r.have-1],d=3+(3&u),u>>>=2,l-=2}else if(17===b){for(z=_+3;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}l-=_,k=0,d=3+(7&(u>>>=_)),u>>>=3,l-=3}else{for(z=_+7;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}l-=_,k=0,d=11+(127&(u>>>=_)),u>>>=7,l-=7}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=30;break}for(;d--;)r.lens[r.have++]=k}}if(30===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,S={bits:r.lenbits},x=T(D,r.lens,0,r.nlen,r.lencode,0,r.work,S),r.lenbits=S.bits,x){e.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,S={bits:r.distbits},x=T(F,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,S),r.distbits=S.bits,x){e.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(6<=o&&258<=h){e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,R(e,c),a=e.next_out,i=e.output,h=e.avail_out,s=e.next_in,n=e.input,o=e.avail_in,u=r.hold,l=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;g=(C=r.lencode[u&(1<<r.lenbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if(g&&0==(240&g)){for(v=_,y=g,w=b;g=(C=r.lencode[w+((u&(1<<v+y)-1)>>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}u>>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,r.length=b,0===g){r.mode=26;break}if(32&g){r.back=-1,r.mode=12;break}if(64&g){e.msg="invalid literal/length code",r.mode=30;break}r.extra=15&g,r.mode=22;case 22:if(r.extra){for(z=r.extra;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}r.length+=u&(1<<r.extra)-1,u>>>=r.extra,l-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;g=(C=r.distcode[u&(1<<r.distbits)-1])>>>16&255,b=65535&C,!((_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if(0==(240&g)){for(v=_,y=g,w=b;g=(C=r.distcode[w+((u&(1<<v+y)-1)>>v)])>>>16&255,b=65535&C,!(v+(_=C>>>24)<=l);){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}u>>>=v,l-=v,r.back+=v}if(u>>>=_,l-=_,r.back+=_,64&g){e.msg="invalid distance code",r.mode=30;break}r.offset=b,r.extra=15&g,r.mode=24;case 24:if(r.extra){for(z=r.extra;l<z;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}r.offset+=u&(1<<r.extra)-1,u>>>=r.extra,l-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===h)break e;if(d=c-h,r.offset>d){if((d=r.offset-d)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=30;break}p=d>r.wnext?(d-=r.wnext,r.wsize-d):r.wnext-d,d>r.length&&(d=r.length),m=r.window}else m=i,p=a-r.offset,d=r.length;for(h<d&&(d=h),h-=d,r.length-=d;i[a++]=m[p++],--d;);0===r.length&&(r.mode=21);break;case 26:if(0===h)break e;i[a++]=r.length,h--,r.mode=21;break;case 27:if(r.wrap){for(;l<32;){if(0===o)break e;o--,u|=n[s++]<<l,l+=8}if(c-=h,e.total_out+=c,r.total+=c,c&&(e.adler=r.check=r.flags?B(r.check,i,c,a-c):O(r.check,i,c,a-c)),c=h,(r.flags?u:L(u))!==r.check){e.msg="incorrect data check",r.mode=30;break}l=u=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;l<32;){if(0===o)break e;o--,u+=n[s++]<<l,l+=8}if(u!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=30;break}l=u=0}r.mode=29;case 29:x=1;break e;case 30:x=-3;break e;case 31:return-4;case 32:default:return U}return e.next_out=a,e.avail_out=h,e.next_in=s,e.avail_in=o,r.hold=u,r.bits=l,(r.wsize||c!==e.avail_out&&r.mode<30&&(r.mode<27||4!==t))&&Z(e,e.output,e.next_out,c-e.avail_out)?(r.mode=31,-4):(f-=e.avail_in,c-=e.avail_out,e.total_in+=f,e.total_out+=c,r.total+=c,r.wrap&&c&&(e.adler=r.check=r.flags?B(r.check,i,c,e.next_out-c):O(r.check,i,c,e.next_out-c)),e.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==f&&0===c||4===t)&&x===N&&(x=-5),x)},r.inflateEnd=function(e){if(!e||!e.state)return U;var t=e.state;return t.window&&(t.window=null),e.state=null,N},r.inflateGetHeader=function(e,t){var r;return e&&e.state?0==(2&(r=e.state).wrap)?U:((r.head=t).done=!1,N):U},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?U:11===r.mode&&O(1,t,n,0)!==r.check?-3:Z(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,N):U},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(e,t,r){"use strict";var D=e("../utils/common"),F=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],N=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],U=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],P=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,n,i,s,a,o){var h,u,l,f,c,d,p,m,_,g=o.bits,b=0,v=0,y=0,w=0,k=0,x=0,S=0,z=0,C=0,E=0,A=null,I=0,O=new D.Buf16(16),B=new D.Buf16(16),R=null,T=0;for(b=0;b<=15;b++)O[b]=0;for(v=0;v<n;v++)O[t[r+v]]++;for(k=g,w=15;1<=w&&0===O[w];w--);if(w<k&&(k=w),0===w)return i[s++]=20971520,i[s++]=20971520,o.bits=1,0;for(y=1;y<w&&0===O[y];y++);for(k<y&&(k=y),b=z=1;b<=15;b++)if(z<<=1,(z-=O[b])<0)return-1;if(0<z&&(0===e||1!==w))return-1;for(B[1]=0,b=1;b<15;b++)B[b+1]=B[b]+O[b];for(v=0;v<n;v++)0!==t[r+v]&&(a[B[t[r+v]]++]=v);if(d=0===e?(A=R=a,19):1===e?(A=F,I-=257,R=N,T-=257,256):(A=U,R=P,-1),b=y,c=s,S=v=E=0,l=-1,f=(C=1<<(x=k))-1,1===e&&852<C||2===e&&592<C)return 1;for(;;){for(p=b-S,_=a[v]<d?(m=0,a[v]):a[v]>d?(m=R[T+a[v]],A[I+a[v]]):(m=96,0),h=1<<b-S,y=u=1<<x;i[c+(E>>S)+(u-=h)]=p<<24|m<<16|_|0,0!==u;);for(h=1<<b-1;E&h;)h>>=1;if(0!==h?(E&=h-1,E+=h):E=0,v++,0==--O[b]){if(b===w)break;b=t[r+a[v]]}if(k<b&&(E&f)!==l){for(0===S&&(S=k),c+=y,z=1<<(x=b-S);x+S<w&&!((z-=O[x+S])<=0);)x++,z<<=1;if(C+=1<<x,1===e&&852<C||2===e&&592<C)return 1;i[l=E&f]=k<<24|x<<16|c-s|0}}return 0!==E&&(i[c+E]=b-S<<24|64<<16|0),o.bits=k,0}},{"../utils/common":41}],51:[function(e,t,r){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(e,t,r){"use strict";var i=e("../utils/common"),o=0,h=1;function n(e){for(var t=e.length;0<=--t;)e[t]=0}var s=0,a=29,u=256,l=u+1+a,f=30,c=19,_=2*l+1,g=15,d=16,p=7,m=256,b=16,v=17,y=18,w=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],k=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],S=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],z=new Array(2*(l+2));n(z);var C=new Array(2*f);n(C);var E=new Array(512);n(E);var A=new Array(256);n(A);var I=new Array(a);n(I);var O,B,R,T=new Array(f);function D(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function F(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function N(e){return e<256?E[e]:E[256+(e>>>7)]}function U(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function P(e,t,r){e.bi_valid>d-r?(e.bi_buf|=t<<e.bi_valid&65535,U(e,e.bi_buf),e.bi_buf=t>>d-e.bi_valid,e.bi_valid+=r-d):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function L(e,t,r){P(e,r[2*t],r[2*t+1])}function j(e,t){for(var r=0;r|=1&e,e>>>=1,r<<=1,0<--t;);return r>>>1}function Z(e,t,r){var n,i,s=new Array(g+1),a=0;for(n=1;n<=g;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=t;i++){var o=e[2*i+1];0!==o&&(e[2*i]=j(s[o]++,o))}}function W(e){var t;for(t=0;t<l;t++)e.dyn_ltree[2*t]=0;for(t=0;t<f;t++)e.dyn_dtree[2*t]=0;for(t=0;t<c;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*m]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function M(e){8<e.bi_valid?U(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function H(e,t,r,n){var i=2*t,s=2*r;return e[i]<e[s]||e[i]===e[s]&&n[t]<=n[r]}function G(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&H(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!H(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function K(e,t,r){var n,i,s,a,o=0;if(0!==e.last_lit)for(;n=e.pending_buf[e.d_buf+2*o]<<8|e.pending_buf[e.d_buf+2*o+1],i=e.pending_buf[e.l_buf+o],o++,0===n?L(e,i,t):(L(e,(s=A[i])+u+1,t),0!==(a=w[s])&&P(e,i-=I[s],a),L(e,s=N(--n),r),0!==(a=k[s])&&P(e,n-=T[s],a)),o<e.last_lit;);L(e,m,t)}function Y(e,t){var r,n,i,s=t.dyn_tree,a=t.stat_desc.static_tree,o=t.stat_desc.has_stree,h=t.stat_desc.elems,u=-1;for(e.heap_len=0,e.heap_max=_,r=0;r<h;r++)0!==s[2*r]?(e.heap[++e.heap_len]=u=r,e.depth[r]=0):s[2*r+1]=0;for(;e.heap_len<2;)s[2*(i=e.heap[++e.heap_len]=u<2?++u:0)]=1,e.depth[i]=0,e.opt_len--,o&&(e.static_len-=a[2*i+1]);for(t.max_code=u,r=e.heap_len>>1;1<=r;r--)G(e,s,r);for(i=h;r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],G(e,s,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,s[2*i]=s[2*r]+s[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,s[2*r+1]=s[2*n+1]=i,e.heap[1]=i++,G(e,s,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,s,a,o,h=t.dyn_tree,u=t.max_code,l=t.stat_desc.static_tree,f=t.stat_desc.has_stree,c=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(s=0;s<=g;s++)e.bl_count[s]=0;for(h[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<_;r++)p<(s=h[2*h[2*(n=e.heap[r])+1]+1]+1)&&(s=p,m++),h[2*n+1]=s,u<n||(e.bl_count[s]++,a=0,d<=n&&(a=c[n-d]),o=h[2*n],e.opt_len+=o*(s+a),f&&(e.static_len+=o*(l[2*n+1]+a)));if(0!==m){do{for(s=p-1;0===e.bl_count[s];)s--;e.bl_count[s]--,e.bl_count[s+1]+=2,e.bl_count[p]--,m-=2}while(0<m);for(s=p;0!==s;s--)for(n=e.bl_count[s];0!==n;)u<(i=e.heap[--r])||(h[2*i+1]!==s&&(e.opt_len+=(s-h[2*i+1])*h[2*i],h[2*i+1]=s),n--)}}(e,t),Z(s,u,e.bl_count)}function X(e,t,r){var n,i,s=-1,a=t[1],o=0,h=7,u=4;for(0===a&&(h=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=a,a=t[2*(n+1)+1],++o<h&&i===a||(o<u?e.bl_tree[2*i]+=o:0!==i?(i!==s&&e.bl_tree[2*i]++,e.bl_tree[2*b]++):o<=10?e.bl_tree[2*v]++:e.bl_tree[2*y]++,s=i,u=(o=0)===a?(h=138,3):i===a?(h=6,3):(h=7,4))}function V(e,t,r){var n,i,s=-1,a=t[1],o=0,h=7,u=4;for(0===a&&(h=138,u=3),n=0;n<=r;n++)if(i=a,a=t[2*(n+1)+1],!(++o<h&&i===a)){if(o<u)for(;L(e,i,e.bl_tree),0!=--o;);else 0!==i?(i!==s&&(L(e,i,e.bl_tree),o--),L(e,b,e.bl_tree),P(e,o-3,2)):o<=10?(L(e,v,e.bl_tree),P(e,o-3,3)):(L(e,y,e.bl_tree),P(e,o-11,7));s=i,u=(o=0)===a?(h=138,3):i===a?(h=6,3):(h=7,4)}}n(T);var q=!1;function J(e,t,r,n){P(e,(s<<1)+(n?1:0),3),function(e,t,r,n){M(e),n&&(U(e,r),U(e,~r)),i.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r,!0)}r._tr_init=function(e){q||(function(){var e,t,r,n,i,s=new Array(g+1);for(n=r=0;n<a-1;n++)for(I[n]=r,e=0;e<1<<w[n];e++)A[r++]=n;for(A[r-1]=n,n=i=0;n<16;n++)for(T[n]=i,e=0;e<1<<k[n];e++)E[i++]=n;for(i>>=7;n<f;n++)for(T[n]=i<<7,e=0;e<1<<k[n]-7;e++)E[256+i++]=n;for(t=0;t<=g;t++)s[t]=0;for(e=0;e<=143;)z[2*e+1]=8,e++,s[8]++;for(;e<=255;)z[2*e+1]=9,e++,s[9]++;for(;e<=279;)z[2*e+1]=7,e++,s[7]++;for(;e<=287;)z[2*e+1]=8,e++,s[8]++;for(Z(z,l+1,s),e=0;e<f;e++)C[2*e+1]=5,C[2*e]=j(e,5);O=new D(z,w,u+1,l,g),B=new D(C,k,0,f,g),R=new D(new Array(0),x,0,c,p)}(),q=!0),e.l_desc=new F(e.dyn_ltree,O),e.d_desc=new F(e.dyn_dtree,B),e.bl_desc=new F(e.bl_tree,R),e.bi_buf=0,e.bi_valid=0,W(e)},r._tr_stored_block=J,r._tr_flush_block=function(e,t,r,n){var i,s,a=0;0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return o;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return h;for(t=32;t<u;t++)if(0!==e.dyn_ltree[2*t])return h;return o}(e)),Y(e,e.l_desc),Y(e,e.d_desc),a=function(e){var t;for(X(e,e.dyn_ltree,e.l_desc.max_code),X(e,e.dyn_dtree,e.d_desc.max_code),Y(e,e.bl_desc),t=c-1;3<=t&&0===e.bl_tree[2*S[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=r+5,r+4<=i&&-1!==t?J(e,t,r,n):4===e.strategy||s===i?(P(e,2+(n?1:0),3),K(e,z,C)):(P(e,4+(n?1:0),3),function(e,t,r,n){var i;for(P(e,t-257,5),P(e,r-1,5),P(e,n-4,4),i=0;i<n;i++)P(e,e.bl_tree[2*S[i]+1],3);V(e,e.dyn_ltree,t-1),V(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),K(e,e.dyn_ltree,e.dyn_dtree)),W(e),n&&M(e)},r._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(A[r]+u+1)]++,e.dyn_dtree[2*N(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){P(e,2,3),L(e,m,z),function(e){16===e.bi_valid?(U(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,r){(function(e){!function(r,n){"use strict";if(!r.setImmediate){var i,s,t,a,o=1,h={},u=!1,l=r.document,e=Object.getPrototypeOf&&Object.getPrototypeOf(r);e=e&&e.setTimeout?e:r,i="[object process]"==={}.toString.call(r.process)?function(e){process.nextTick(function(){c(e)})}:function(){if(r.postMessage&&!r.importScripts){var e=!0,t=r.onmessage;return r.onmessage=function(){e=!1},r.postMessage("","*"),r.onmessage=t,e}}()?(a="setImmediate$"+Math.random()+"$",r.addEventListener?r.addEventListener("message",d,!1):r.attachEvent("onmessage",d),function(e){r.postMessage(a+e,"*")}):r.MessageChannel?((t=new MessageChannel).port1.onmessage=function(e){c(e.data)},function(e){t.port2.postMessage(e)}):l&&"onreadystatechange"in l.createElement("script")?(s=l.documentElement,function(e){var t=l.createElement("script");t.onreadystatechange=function(){c(e),t.onreadystatechange=null,s.removeChild(t),t=null},s.appendChild(t)}):function(e){setTimeout(c,0,e)},e.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;r<t.length;r++)t[r]=arguments[r+1];var n={callback:e,args:t};return h[o]=n,i(o),o++},e.clearImmediate=f}function f(e){delete h[e]}function c(e){if(u)setTimeout(c,0,e);else{var t=h[e];if(t){u=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{f(e),u=!1}}}}function d(e){e.source===r&&"string"==typeof e.data&&0===e.data.indexOf(a)&&c(+e.data.slice(a.length))}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[10])(10)});
-Number.isInteger = Number.isInteger || function(value) {
- return typeof value === 'number' &&
- isFinite(value) &&
- Math.floor(value) === value;
-};
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mermaid=e():t.mermaid=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=384)}([function(t,e,n){"use strict";n.r(e);var r=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},i=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return r(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}};var a=i(r),o=a.right,s=a.left,c=o,u=function(t,e){null==e&&(e=l);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return a};function l(t,e){return[t,e]}var h=function(t,e,n){var r,i,a,o,s=t.length,c=e.length,u=new Array(s*c);for(null==n&&(n=l),r=a=0;r<s;++r)for(o=t[r],i=0;i<c;++i,++a)u[a]=n(o,e[i]);return u},f=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,e){var n,r,i=t.length,a=0,o=-1,s=0,c=0;if(null==e)for(;++o<i;)isNaN(n=d(t[o]))||(c+=(r=n-s)*(n-(s+=r/++a)));else for(;++o<i;)isNaN(n=d(e(t[o],o,t)))||(c+=(r=n-s)*(n-(s+=r/++a)));if(a>1)return c/(a-1)},y=function(t,e){var n=p(t,e);return n?Math.sqrt(n):n},g=function(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]},v=Array.prototype,m=v.slice,b=v.map,x=function(t){return function(){return t}},_=function(t){return t},k=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a},w=Math.sqrt(50),E=Math.sqrt(10),T=Math.sqrt(2),C=function(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=S(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return r&&a.reverse(),a};function S(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=w?10:a>=E?5:a>=T?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=w?10:a>=E?5:a>=T?2:1)}function A(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=w?i*=10:a>=E?i*=5:a>=T&&(i*=2),e<t?-i:i}var M=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},O=function(){var t=_,e=g,n=M;function r(r){var i,a,o=r.length,s=new Array(o);for(i=0;i<o;++i)s[i]=t(r[i],i,r);var u=e(s),l=u[0],h=u[1],f=n(s,l,h);Array.isArray(f)||(f=A(l,h,f),f=k(Math.ceil(l/f)*f,h,f));for(var d=f.length;f[0]<=l;)f.shift(),--d;for(;f[d-1]>h;)f.pop(),--d;var p,y=new Array(d+1);for(i=0;i<=d;++i)(p=y[i]=[]).x0=i>0?f[i-1]:l,p.x1=i<d?f[i]:h;for(i=0;i<o;++i)l<=(a=s[i])&&a<=h&&y[c(f,a,0,d)].push(r[i]);return y}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:x(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:x([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?x(m.call(t)):x(t),r):n},r},B=function(t,e,n){if(null==n&&(n=d),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}},N=function(t,e,n){return t=b.call(t,d).sort(r),Math.ceil((n-e)/(2*(B(t,.75)-B(t,.25))*Math.pow(t.length,-1/3)))},D=function(t,e,n){return Math.ceil((n-e)/(3.5*y(t)*Math.pow(t.length,-1/3)))},L=function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r},I=function(t,e){var n,r=t.length,i=r,a=-1,o=0;if(null==e)for(;++a<r;)isNaN(n=d(t[a]))?--i:o+=n;else for(;++a<r;)isNaN(n=d(e(t[a],a,t)))?--i:o+=n;if(i)return o/i},R=function(t,e){var n,i=t.length,a=-1,o=[];if(null==e)for(;++a<i;)isNaN(n=d(t[a]))||o.push(n);else for(;++a<i;)isNaN(n=d(e(t[a],a,t)))||o.push(n);return B(o.sort(r),.5)},F=function(t){for(var e,n,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(n=new Array(o);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n},P=function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&r>n&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&r>n&&(r=n);return r},j=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},Y=function(t,e){if(n=t.length){var n,i,a=0,o=0,s=t[o];for(null==e&&(e=r);++a<n;)(e(i=t[a],s)<0||0!==e(s,s))&&(s=i,o=a);return 0===e(s,s)?o:void 0}},z=function(t,e,n){for(var r,i,a=(null==n?t.length:n)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,r=t[a+e],t[a+e]=t[i+e],t[i+e]=r;return t},U=function(t,e){var n,r=t.length,i=-1,a=0;if(null==e)for(;++i<r;)(n=+t[i])&&(a+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(a+=n);return a},$=function(t){if(!(i=t.length))return[];for(var e=-1,n=P(t,q),r=new Array(n);++e<n;)for(var i,a=-1,o=r[e]=new Array(i);++a<i;)o[a]=t[a][e];return r};function q(t){return t.length}var W=function(){return $(arguments)},V=Array.prototype.slice,H=function(t){return t};function G(t){return"translate("+(t+.5)+",0)"}function X(t){return"translate(0,"+(t+.5)+")"}function Z(t){return function(e){return+t(e)}}function Q(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function K(){return!this.__axis}function J(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,c=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",l=1===t||3===t?G:X;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):H:i,p=Math.max(a,0)+s,y=e.range(),g=+y[0]+.5,v=+y[y.length-1]+.5,m=(e.bandwidth?Q:Z)(e.copy()),b=h.selection?h.selection():h,x=b.selectAll(".domain").data([null]),_=b.selectAll(".tick").data(f,e).order(),k=_.exit(),w=_.enter().append("g").attr("class","tick"),E=_.select("line"),T=_.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(w),E=E.merge(w.append("line").attr("stroke","currentColor").attr(u+"2",c*a)),T=T.merge(w.append("text").attr("fill","currentColor").attr(u,c*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==b&&(x=x.transition(h),_=_.transition(h),E=E.transition(h),T=T.transition(h),k=k.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=m(t))?l(t):this.getAttribute("transform")})),w.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:m(t))}))),k.remove(),x.attr("d",4===t||2==t?o?"M"+c*o+","+g+"H0.5V"+v+"H"+c*o:"M0.5,"+g+"V"+v:o?"M"+g+","+c*o+"V0.5H"+v+"V"+c*o:"M"+g+",0.5H"+v),_.attr("opacity",1).attr("transform",(function(t){return l(m(t))})),E.attr(u+"2",c*a),T.attr(u,c*p).text(d),b.filter(K).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each((function(){this.__axis=m}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=V.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:V.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:V.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=o=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(o=+t,h):o},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function tt(t){return J(1,t)}function et(t){return J(2,t)}function nt(t){return J(3,t)}function rt(t){return J(4,t)}var it={value:function(){}};function at(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ot(r)}function ot(t){this._=t}function st(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function ct(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function ut(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=it,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ot.prototype=at.prototype={constructor:ot,on:function(t,e){var n,r=this._,i=st(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=ut(r[n],t.name,e);else if(null==e)for(n in r)r[n]=ut(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=ct(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ot(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var lt=at;function ht(){}var ft=function(t){return null==t?ht:function(){return this.querySelector(t)}};function dt(){return[]}var pt=function(t){return null==t?dt:function(){return this.querySelectorAll(t)}},yt=function(t){return function(){return this.matches(t)}},gt=function(t){return new Array(t.length)};function vt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}vt.prototype={constructor:vt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function mt(t,e,n,r,i,a){for(var o,s=0,c=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new vt(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function bt(t,e,n,r,i,a,o){var s,c,u,l={},h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(d[s]=u="$"+o.call(c,c.__data__,s,e),u in l?i[s]=c:l[u]=c);for(s=0;s<f;++s)(c=l[u="$"+o.call(t,a[s],s,a)])?(r[s]=c,c.__data__=a[s],l[u]=null):n[s]=new vt(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&l[d[s]]===c&&(i[s]=c)}function xt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var _t="http://www.w3.org/1999/xhtml",kt={svg:"http://www.w3.org/2000/svg",xhtml:_t,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},wt=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),kt.hasOwnProperty(e)?{space:kt[e],local:t}:t};function Et(t){return function(){this.removeAttribute(t)}}function Tt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ct(t,e){return function(){this.setAttribute(t,e)}}function St(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function At(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Mt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var Ot=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function Bt(t){return function(){this.style.removeProperty(t)}}function Nt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Dt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Lt(t,e){return t.style.getPropertyValue(e)||Ot(t).getComputedStyle(t,null).getPropertyValue(e)}function It(t){return function(){delete this[t]}}function Rt(t,e){return function(){this[t]=e}}function Ft(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Pt(t){return t.trim().split(/^|\s+/)}function jt(t){return t.classList||new Yt(t)}function Yt(t){this._node=t,this._names=Pt(t.getAttribute("class")||"")}function zt(t,e){for(var n=jt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Ut(t,e){for(var n=jt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function $t(t){return function(){zt(this,t)}}function qt(t){return function(){Ut(this,t)}}function Wt(t,e){return function(){(e.apply(this,arguments)?zt:Ut)(this,t)}}Yt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Vt(){this.textContent=""}function Ht(t){return function(){this.textContent=t}}function Gt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Xt(){this.innerHTML=""}function Zt(t){return function(){this.innerHTML=t}}function Qt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Kt(){this.nextSibling&&this.parentNode.appendChild(this)}function Jt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function te(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===_t&&e.documentElement.namespaceURI===_t?e.createElement(t):e.createElementNS(n,t)}}function ee(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var ne=function(t){var e=wt(t);return(e.local?ee:te)(e)};function re(){return null}function ie(){var t=this.parentNode;t&&t.removeChild(this)}function ae(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function oe(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}var se={},ce=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(se={mouseenter:"mouseover",mouseleave:"mouseout"}));function ue(t,e,n){return t=le(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function le(t,e,n){return function(r){var i=ce;ce=r;try{t.call(this,this.__data__,e,n)}finally{ce=i}}}function he(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function fe(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function de(t,e,n){var r=se.hasOwnProperty(t.type)?ue:le;return function(i,a,o){var s,c=this.__on,u=r(e,a,o);if(c)for(var l=0,h=c.length;l<h;++l)if((s=c[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=u,s.capture=n),void(s.value=e);this.addEventListener(t.type,u,n),s={type:t.type,name:t.name,value:e,listener:u,capture:n},c?c.push(s):this.__on=[s]}}function pe(t,e,n,r){var i=ce;t.sourceEvent=ce,ce=t;try{return e.apply(n,r)}finally{ce=i}}function ye(t,e,n){var r=Ot(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function ge(t,e){return function(){return ye(this,t,e)}}function ve(t,e){return function(){return ye(this,t,e.apply(this,arguments))}}var me=[null];function be(t,e){this._groups=t,this._parents=e}function xe(){return new be([[document.documentElement]],me)}be.prototype=xe.prototype={constructor:be,select:function(t){"function"!=typeof t&&(t=ft(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,u=r[i]=new Array(c),l=0;l<c;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),u[l]=o);return new be(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=pt(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,u=0;u<c;++u)(o=s[u])&&(r.push(t.call(o,o.__data__,u,s)),i.push(o));return new be(r,i)},filter:function(t){"function"!=typeof t&&(t=yt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new be(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),l=-1,this.each((function(t){p[++l]=t})),p;var n,r=e?bt:mt,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,s=new Array(o),c=new Array(o),u=new Array(o),l=0;l<o;++l){var h=i[l],f=a[l],d=f.length,p=t.call(h,h&&h.__data__,l,i),y=p.length,g=c[l]=new Array(y),v=s[l]=new Array(y);r(h,f,g,v,u[l]=new Array(d),p,e);for(var m,b,x=0,_=0;x<y;++x)if(m=g[x]){for(x>=_&&(_=x+1);!(b=v[_])&&++_<y;);m._next=b||null}}return(s=new be(s,i))._enter=c,s._exit=u,s},enter:function(){return new be(this._enter||this._groups.map(gt),this._parents)},exit:function(){return new be(this._exit||this._groups.map(gt),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new be(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=xt);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,u=i[a]=new Array(c),l=0;l<c;++l)(o=s[l])&&(u[l]=o);u.sort(e)}return new be(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=wt(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Tt:Et:"function"==typeof e?n.local?Mt:At:n.local?St:Ct)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Bt:"function"==typeof e?Dt:Nt)(t,e,null==n?"":n)):Lt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?It:"function"==typeof e?Ft:Rt)(t,e)):this.node()[t]},classed:function(t,e){var n=Pt(t+"");if(arguments.length<2){for(var r=jt(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Wt:e?$t:qt)(n,e))},text:function(t){return arguments.length?this.each(null==t?Vt:("function"==typeof t?Gt:Ht)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Xt:("function"==typeof t?Qt:Zt)(t)):this.node().innerHTML},raise:function(){return this.each(Kt)},lower:function(){return this.each(Jt)},append:function(t){var e="function"==typeof t?t:ne(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ne(t),r=null==e?re:"function"==typeof e?e:ft(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ie)},clone:function(t){return this.select(t?oe:ae)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=he(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?de:fe,null==n&&(n=!1),r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,u=0,l=s.length;u<l;++u)for(r=0,c=s[u];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?ve:ge)(t,e))}};var _e=xe,ke=function(t){return"string"==typeof t?new be([[document.querySelector(t)]],[document.documentElement]):new be([[t]],me)};function we(){ce.stopImmediatePropagation()}var Ee=function(){ce.preventDefault(),ce.stopImmediatePropagation()},Te=function(t){var e=t.document.documentElement,n=ke(t).on("dragstart.drag",Ee,!0);"onselectstart"in e?n.on("selectstart.drag",Ee,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")};function Ce(t,e){var n=t.document.documentElement,r=ke(t).on("dragstart.drag",null);e&&(r.on("click.drag",Ee,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Se=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function Ae(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Me(){}var Oe="\\s*([+-]?\\d+)\\s*",Be="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ne="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",De=/^#([0-9a-f]{3,8})$/,Le=new RegExp("^rgb\\("+[Oe,Oe,Oe]+"\\)$"),Ie=new RegExp("^rgb\\("+[Ne,Ne,Ne]+"\\)$"),Re=new RegExp("^rgba\\("+[Oe,Oe,Oe,Be]+"\\)$"),Fe=new RegExp("^rgba\\("+[Ne,Ne,Ne,Be]+"\\)$"),Pe=new RegExp("^hsl\\("+[Be,Ne,Ne]+"\\)$"),je=new RegExp("^hsla\\("+[Be,Ne,Ne,Be]+"\\)$"),Ye={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ze(){return this.rgb().formatHex()}function Ue(){return this.rgb().formatRgb()}function $e(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=De.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?qe(e):3===n?new Ge(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Ge(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Ge(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Le.exec(t))?new Ge(e[1],e[2],e[3],1):(e=Ie.exec(t))?new Ge(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Re.exec(t))?We(e[1],e[2],e[3],e[4]):(e=Fe.exec(t))?We(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Pe.exec(t))?Ke(e[1],e[2]/100,e[3]/100,1):(e=je.exec(t))?Ke(e[1],e[2]/100,e[3]/100,e[4]):Ye.hasOwnProperty(t)?qe(Ye[t]):"transparent"===t?new Ge(NaN,NaN,NaN,0):null}function qe(t){return new Ge(t>>16&255,t>>8&255,255&t,1)}function We(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ge(t,e,n,r)}function Ve(t){return t instanceof Me||(t=$e(t)),t?new Ge((t=t.rgb()).r,t.g,t.b,t.opacity):new Ge}function He(t,e,n,r){return 1===arguments.length?Ve(t):new Ge(t,e,n,null==r?1:r)}function Ge(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Xe(){return"#"+Qe(this.r)+Qe(this.g)+Qe(this.b)}function Ze(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Qe(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ke(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new en(t,e,n,r)}function Je(t){if(t instanceof en)return new en(t.h,t.s,t.l,t.opacity);if(t instanceof Me||(t=$e(t)),!t)return new en;if(t instanceof en)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new en(o,s,c,t.opacity)}function tn(t,e,n,r){return 1===arguments.length?Je(t):new en(t,e,n,null==r?1:r)}function en(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function nn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function rn(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}Se(Me,$e,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:ze,formatHex:ze,formatHsl:function(){return Je(this).formatHsl()},formatRgb:Ue,toString:Ue}),Se(Ge,He,Ae(Me,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ge(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ge(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Xe,formatHex:Xe,formatRgb:Ze,toString:Ze})),Se(en,tn,Ae(Me,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new en(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new en(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ge(nn(t>=240?t-240:t+120,i,r),nn(t,i,r),nn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var an=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return rn((n-r/e)*e,o,i,a,s)}},on=function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return rn((n-r/e)*e,i,a,o,s)}},sn=function(t){return function(){return t}};function cn(t,e){return function(n){return t+n*e}}function un(t,e){var n=e-t;return n?cn(t,n>180||n<-180?n-360*Math.round(n/360):n):sn(isNaN(t)?e:t)}function ln(t){return 1==(t=+t)?hn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):sn(isNaN(e)?n:e)}}function hn(t,e){var n=e-t;return n?cn(t,n):sn(isNaN(t)?e:t)}var fn=function t(e){var n=ln(e);function r(t,e){var r=n((t=He(t)).r,(e=He(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=hn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function dn(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=He(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}var pn=dn(an),yn=dn(on),gn=function(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}};function vn(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}var mn=function(t,e){return(vn(e)?gn:bn)(t,e)};function bn(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=An(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}var xn=function(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}},_n=function(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}},kn=function(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=An(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}},wn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,En=new RegExp(wn.source,"g");var Tn,Cn,Sn=function(t,e){var n,r,i,a=wn.lastIndex=En.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=wn.exec(t))&&(r=En.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:_n(n,r)})),a=En.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})},An=function(t,e){var n,r=typeof e;return null==e||"boolean"===r?sn(e):("number"===r?_n:"string"===r?(n=$e(e))?(e=n,fn):Sn:e instanceof $e?fn:e instanceof Date?xn:vn(e)?gn:Array.isArray(e)?bn:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?kn:_n)(t,e)},Mn=function(){for(var t,e=ce;t=e.sourceEvent;)e=t;return e},On=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]},Bn=function(t,e,n){arguments.length<3&&(n=e,e=Mn().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return On(t,r);return null},Nn=function(t){var e=Mn();return e.changedTouches&&(e=e.changedTouches[0]),On(t,e)},Dn=0,Ln=0,In=0,Rn=0,Fn=0,Pn=0,jn="object"==typeof performance&&performance.now?performance:Date,Yn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function zn(){return Fn||(Yn(Un),Fn=jn.now()+Pn)}function Un(){Fn=0}function $n(){this._call=this._time=this._next=null}function qn(t,e,n){var r=new $n;return r.restart(t,e,n),r}function Wn(){zn(),++Dn;for(var t,e=Tn;e;)(t=Fn-e._time)>=0&&e._call.call(null,t),e=e._next;--Dn}function Vn(){Fn=(Rn=jn.now())+Pn,Dn=Ln=0;try{Wn()}finally{Dn=0,function(){var t,e,n=Tn,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Tn=e);Cn=t,Gn(r)}(),Fn=0}}function Hn(){var t=jn.now(),e=t-Rn;e>1e3&&(Pn-=e,Rn=t)}function Gn(t){Dn||(Ln&&(Ln=clearTimeout(Ln)),t-Fn>24?(t<1/0&&(Ln=setTimeout(Vn,t-jn.now()-Pn)),In&&(In=clearInterval(In))):(In||(Rn=jn.now(),In=setInterval(Hn,1e3)),Dn=1,Yn(Vn)))}$n.prototype=qn.prototype={constructor:$n,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?zn():+n)+(null==e?0:+e),this._next||Cn===this||(Cn?Cn._next=this:Tn=this,Cn=this),this._call=t,this._time=n,Gn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Gn())}};var Xn=function(t,e,n){var r=new $n;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},Zn=lt("start","end","cancel","interrupt"),Qn=[],Kn=function(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(c){var u,l,h,f;if(1!==n.state)return s();for(u in i)if((f=i[u]).name===n.name){if(3===f.state)return Xn(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+u<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[u])}if(Xn((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,l=-1;u<h;++u)(f=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=qn((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Zn,tween:Qn,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})};function Jn(t,e){var n=er(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function tr(t,e){var n=er(t,e);if(n.state>3)throw new Error("too late; already running");return n}function er(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var nr,rr,ir,ar,or=function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}},sr=180/Math.PI,cr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},ur=function(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*sr,skewX:Math.atan(c)*sr,scaleX:o,scaleY:s}};function lr(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:_n(t,i)},{i:c-2,x:_n(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:_n(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:_n(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:_n(t,n)},{i:s-2,x:_n(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var hr=lr((function(t){return"none"===t?cr:(nr||(nr=document.createElement("DIV"),rr=document.documentElement,ir=document.defaultView),nr.style.transform=t,t=ir.getComputedStyle(rr.appendChild(nr),null).getPropertyValue("transform"),rr.removeChild(nr),t=t.slice(7,-1).split(","),ur(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),fr=lr((function(t){return null==t?cr:(ar||(ar=document.createElementNS("http://www.w3.org/2000/svg","g")),ar.setAttribute("transform",t),(t=ar.transform.baseVal.consolidate())?(t=t.matrix,ur(t.a,t.b,t.c,t.d,t.e,t.f)):cr)}),", ",")",")");function dr(t,e){var n,r;return function(){var i=tr(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function pr(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=tr(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}a.tween=i}}function yr(t,e,n){var r=t._id;return t.each((function(){var t=tr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return er(t,r).value[e]}}var gr=function(t,e){var n;return("number"==typeof e?_n:e instanceof $e?fn:(n=$e(e))?(e=n,fn):Sn)(t,e)};function vr(t){return function(){this.removeAttribute(t)}}function mr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function br(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function xr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function _r(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function kr(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function wr(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Er(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Tr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Er(t,i)),n}return i._value=e,i}function Cr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&wr(t,i)),n}return i._value=e,i}function Sr(t,e){return function(){Jn(this,t).delay=+e.apply(this,arguments)}}function Ar(t,e){return e=+e,function(){Jn(this,t).delay=e}}function Mr(t,e){return function(){tr(this,t).duration=+e.apply(this,arguments)}}function Or(t,e){return e=+e,function(){tr(this,t).duration=e}}function Br(t,e){if("function"!=typeof e)throw new Error;return function(){tr(this,t).ease=e}}function Nr(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Jn:tr;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Dr=_e.prototype.constructor;function Lr(t){return function(){this.style.removeProperty(t)}}function Ir(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Rr(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Ir(t,a,n)),r}return a._value=e,a}function Fr(t){return function(e){this.textContent=t.call(this,e)}}function Pr(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Fr(r)),e}return r._value=t,r}var jr=0;function Yr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function zr(t){return _e().transition(t)}function Ur(){return++jr}var $r=_e.prototype;function qr(t){return t*t*t}function Wr(t){return--t*t*t+1}function Vr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Yr.prototype=zr.prototype={constructor:Yr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ft(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,u=r[o],l=u.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=u[f])&&(c=t.call(s,s.__data__,f,u))&&("__data__"in s&&(c.__data__=s.__data__),h[f]=c,Kn(h[f],e,n,f,h,er(s,n)));return new Yr(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=pt(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,u=r[s],l=u.length,h=0;h<l;++h)if(c=u[h]){for(var f,d=t.call(c,c.__data__,h,u),p=er(c,n),y=0,g=d.length;y<g;++y)(f=d[y])&&Kn(f,e,n,y,d,p);a.push(d),o.push(c)}return new Yr(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=yt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new Yr(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new Yr(o,this._parents,this._name,this._id)},selection:function(){return new Dr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Ur(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)if(o=s[u]){var l=er(o,e);Kn(o,t,n,u,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Yr(r,this._parents,t,n)},call:$r.call,nodes:$r.nodes,node:$r.node,size:$r.size,empty:$r.empty,each:$r.each,on:function(t,e){var n=this._id;return arguments.length<2?er(this.node(),n).on.on(t):this.each(Nr(n,t,e))},attr:function(t,e){var n=wt(t),r="transform"===n?fr:gr;return this.attrTween(t,"function"==typeof e?(n.local?kr:_r)(n,r,yr(this,"attr."+t,e)):null==e?(n.local?mr:vr)(n):(n.local?xr:br)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=wt(t);return this.tween(n,(r.local?Tr:Cr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?hr:gr;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Lt(this,t),o=(this.style.removeProperty(t),Lt(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Lr(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Lt(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=Lt(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,yr(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=tr(this,t),u=c.on,l=null==c.value[o]?a||(a=Lr(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(s,i=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Lt(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Rr(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(yr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Pr(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=er(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?dr:pr)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Sr:Ar)(e,t)):er(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Mr:Or)(e,t)):er(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Br(e,t)):er(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=tr(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e}))}))}};var Hr={time:null,delay:0,duration:250,ease:Vr};function Gr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Hr.time=zn(),Hr;return n}_e.prototype.interrupt=function(t){return this.each((function(){or(this,t)}))},_e.prototype.transition=function(t){var e,n;t instanceof Yr?(e=t._id,t=t._name):(e=Ur(),(n=Hr).time=zn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)(o=s[u])&&Kn(o,t,e,u,s,n||Gr(o,e));return new Yr(r,this._parents,t,e)};var Xr=[null],Zr=function(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+"",i)if((n=i[r]).state>1&&n.name===e)return new Yr([[t]],Xr,e,+r);return null},Qr=function(t){return function(){return t}},Kr=function(t,e,n){this.target=t,this.type=e,this.selection=n};function Jr(){ce.stopImmediatePropagation()}var ti=function(){ce.preventDefault(),ce.stopImmediatePropagation()},ei={name:"drag"},ni={name:"space"},ri={name:"handle"},ii={name:"center"};function ai(t){return[+t[0],+t[1]]}function oi(t){return[ai(t[0]),ai(t[1])]}function si(t){return function(e){return Bn(e,ce.touches,t)}}var ci={name:"x",handles:["w","e"].map(gi),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ui={name:"y",handles:["n","s"].map(gi),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},li={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(gi),input:function(t){return null==t?null:oi(t)},output:function(t){return t}},hi={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},fi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},di={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},pi={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},yi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function gi(t){return{type:t}}function vi(){return!ce.ctrlKey&&!ce.button}function mi(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function bi(){return navigator.maxTouchPoints||"ontouchstart"in this}function xi(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function _i(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function ki(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function wi(){return Ci(ci)}function Ei(){return Ci(ui)}var Ti=function(){return Ci(li)};function Ci(t){var e,n=mi,r=vi,i=bi,a=!0,o=lt("start","brush","end"),s=6;function c(e){var n=e.property("__brush",y).selectAll(".overlay").data([gi("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",hi.overlay).merge(n).each((function(){var t=xi(this).extent;ke(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([gi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",hi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return hi[t.type]})),e.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(i).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function u(){var t=ke(this),e=xi(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(t,e,n){return!n&&t.__brush.emitter||new h(t,e)}function h(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function f(){if((!e||ce.touches)&&r.apply(this,arguments)){var n,i,o,s,c,h,f,d,p,y,g,v=this,m=ce.target.__data__.type,b="selection"===(a&&ce.metaKey?m="overlay":m)?ei:a&&ce.altKey?ii:ri,x=t===ui?null:pi[m],_=t===ci?null:yi[m],k=xi(v),w=k.extent,E=k.selection,T=w[0][0],C=w[0][1],S=w[1][0],A=w[1][1],M=0,O=0,B=x&&_&&a&&ce.shiftKey,N=ce.touches?si(ce.changedTouches[0].identifier):Nn,D=N(v),L=D,I=l(v,arguments,!0).beforestart();"overlay"===m?(E&&(p=!0),k.selection=E=[[n=t===ui?T:D[0],o=t===ci?C:D[1]],[c=t===ui?S:n,f=t===ci?A:o]]):(n=E[0][0],o=E[0][1],c=E[1][0],f=E[1][1]),i=n,s=o,h=c,d=f;var R=ke(v).attr("pointer-events","none"),F=R.selectAll(".overlay").attr("cursor",hi[m]);if(ce.touches)I.moved=j,I.ended=z;else{var P=ke(ce.view).on("mousemove.brush",j,!0).on("mouseup.brush",z,!0);a&&P.on("keydown.brush",U,!0).on("keyup.brush",$,!0),Te(ce.view)}Jr(),or(v),u.call(v),I.start()}function j(){var t=N(v);!B||y||g||(Math.abs(t[0]-L[0])>Math.abs(t[1]-L[1])?g=!0:y=!0),L=t,p=!0,ti(),Y()}function Y(){var t;switch(M=L[0]-D[0],O=L[1]-D[1],b){case ni:case ei:x&&(M=Math.max(T-n,Math.min(S-c,M)),i=n+M,h=c+M),_&&(O=Math.max(C-o,Math.min(A-f,O)),s=o+O,d=f+O);break;case ri:x<0?(M=Math.max(T-n,Math.min(S-n,M)),i=n+M,h=c):x>0&&(M=Math.max(T-c,Math.min(S-c,M)),i=n,h=c+M),_<0?(O=Math.max(C-o,Math.min(A-o,O)),s=o+O,d=f):_>0&&(O=Math.max(C-f,Math.min(A-f,O)),s=o,d=f+O);break;case ii:x&&(i=Math.max(T,Math.min(S,n-M*x)),h=Math.max(T,Math.min(S,c+M*x))),_&&(s=Math.max(C,Math.min(A,o-O*_)),d=Math.max(C,Math.min(A,f+O*_)))}h<i&&(x*=-1,t=n,n=c,c=t,t=i,i=h,h=t,m in fi&&F.attr("cursor",hi[m=fi[m]])),d<s&&(_*=-1,t=o,o=f,f=t,t=s,s=d,d=t,m in di&&F.attr("cursor",hi[m=di[m]])),k.selection&&(E=k.selection),y&&(i=E[0][0],h=E[1][0]),g&&(s=E[0][1],d=E[1][1]),E[0][0]===i&&E[0][1]===s&&E[1][0]===h&&E[1][1]===d||(k.selection=[[i,s],[h,d]],u.call(v),I.brush())}function z(){if(Jr(),ce.touches){if(ce.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else Ce(ce.view,p),P.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);R.attr("pointer-events","all"),F.attr("cursor",hi.overlay),k.selection&&(E=k.selection),_i(E)&&(k.selection=null,u.call(v)),I.end()}function U(){switch(ce.keyCode){case 16:B=x&&_;break;case 18:b===ri&&(x&&(c=h-M*x,n=i+M*x),_&&(f=d-O*_,o=s+O*_),b=ii,Y());break;case 32:b!==ri&&b!==ii||(x<0?c=h-M:x>0&&(n=i-M),_<0?f=d-O:_>0&&(o=s-O),b=ni,F.attr("cursor",hi.selection),Y());break;default:return}ti()}function $(){switch(ce.keyCode){case 16:B&&(y=g=B=!1,Y());break;case 18:b===ii&&(x<0?c=h:x>0&&(n=i),_<0?f=d:_>0&&(o=s),b=ri,Y());break;case 32:b===ni&&(ce.altKey?(x&&(c=h-M*x,n=i+M*x),_&&(f=d-O*_,o=s+O*_),b=ii):(x<0?c=h:x>0&&(n=i),_<0?f=d:_>0&&(o=s),b=ri),F.attr("cursor",hi[m]),Y());break;default:return}ti()}}function d(){l(this,arguments).moved()}function p(){l(this,arguments).ended()}function y(){var e=this.__brush||{selection:null};return e.extent=oi(n.apply(this,arguments)),e.dim=t,e}return c.move=function(e,n){e.selection?e.on("start.brush",(function(){l(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){l(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=l(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=An(a,o);function c(t){r.selection=1===t&&null===o?null:s(t),u.call(e),i.brush()}return null!==a&&null!==o?c:c(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,a=t.input("function"==typeof n?n.apply(e,r):n,i.extent),o=l(e,r).beforestart();or(e),i.selection=null===a?null:a,u.call(e),o.start().brush().end()}))},c.clear=function(t){c.move(t,null)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){pe(new Kr(c,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},c.extent=function(t){return arguments.length?(n="function"==typeof t?t:Qr(oi(t)),c):n},c.filter=function(t){return arguments.length?(r="function"==typeof t?t:Qr(!!t),c):r},c.touchable=function(t){return arguments.length?(i="function"==typeof t?t:Qr(!!t),c):i},c.handleSize=function(t){return arguments.length?(s=+t,c):s},c.keyModifiers=function(t){return arguments.length?(a=!!t,c):a},c.on=function(){var t=o.on.apply(o,arguments);return t===o?c:t},c}var Si=Math.cos,Ai=Math.sin,Mi=Math.PI,Oi=Mi/2,Bi=2*Mi,Ni=Math.max;function Di(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}var Li=function(){var t=0,e=null,n=null,r=null;function i(i){var a,o,s,c,u,l,h=i.length,f=[],d=k(h),p=[],y=[],g=y.groups=new Array(h),v=new Array(h*h);for(a=0,u=-1;++u<h;){for(o=0,l=-1;++l<h;)o+=i[u][l];f.push(o),p.push(k(h)),a+=o}for(e&&d.sort((function(t,n){return e(f[t],f[n])})),n&&p.forEach((function(t,e){t.sort((function(t,r){return n(i[e][t],i[e][r])}))})),c=(a=Ni(0,Bi-t*h)/a)?t:Bi/h,o=0,u=-1;++u<h;){for(s=o,l=-1;++l<h;){var m=d[u],b=p[m][l],x=i[m][b],_=o,w=o+=x*a;v[b*h+m]={index:m,subindex:b,startAngle:_,endAngle:w,value:x}}g[m]={index:m,startAngle:s,endAngle:o,value:f[m]},o+=c}for(u=-1;++u<h;)for(l=u-1;++l<h;){var E=v[l*h+u],T=v[u*h+l];(E.value||T.value)&&y.push(E.value<T.value?{source:T,target:E}:{source:E,target:T})}return r?y.sort(r):y}return i.padAngle=function(e){return arguments.length?(t=Ni(0,e),i):t},i.sortGroups=function(t){return arguments.length?(e=t,i):e},i.sortSubgroups=function(t){return arguments.length?(n=t,i):n},i.sortChords=function(t){return arguments.length?(null==t?r=null:(r=Di(t))._=t,i):r&&r._},i},Ii=Array.prototype.slice,Ri=function(t){return function(){return t}},Fi=Math.PI,Pi=2*Fi,ji=Pi-1e-6;function Yi(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function zi(){return new Yi}Yi.prototype=zi.prototype={constructor:Yi,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,c=r-e,u=a-t,l=o-e,h=u*u+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(l*s-c*u)>1e-6&&i){var f=n-a,d=r-o,p=s*s+c*c,y=f*f+d*d,g=Math.sqrt(p),v=Math.sqrt(h),m=i*Math.tan((Fi-Math.acos((p+h-y)/(2*g*v)))/2),b=m/v,x=m/g;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*u)+","+(e+b*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>u*d)+","+(this._x1=t+x*s)+","+(this._y1=e+x*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),c=t+o,u=e+s,l=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+u:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-u)>1e-6)&&(this._+="L"+c+","+u),n&&(h<0&&(h=h%Pi+Pi),h>ji?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=c)+","+(this._y1=u):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Fi)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Ui=zi;function $i(t){return t.source}function qi(t){return t.target}function Wi(t){return t.radius}function Vi(t){return t.startAngle}function Hi(t){return t.endAngle}var Gi=function(){var t=$i,e=qi,n=Wi,r=Vi,i=Hi,a=null;function o(){var o,s=Ii.call(arguments),c=t.apply(this,s),u=e.apply(this,s),l=+n.apply(this,(s[0]=c,s)),h=r.apply(this,s)-Oi,f=i.apply(this,s)-Oi,d=l*Si(h),p=l*Ai(h),y=+n.apply(this,(s[0]=u,s)),g=r.apply(this,s)-Oi,v=i.apply(this,s)-Oi;if(a||(a=o=Ui()),a.moveTo(d,p),a.arc(0,0,l,h,f),h===g&&f===v||(a.quadraticCurveTo(0,0,y*Si(g),y*Ai(g)),a.arc(0,0,y,g,v)),a.quadraticCurveTo(0,0,d,p),a.closePath(),o)return a=null,o+""||null}return o.radius=function(t){return arguments.length?(n="function"==typeof t?t:Ri(+t),o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Ri(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ri(+t),o):i},o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(t){return arguments.length?(e=t,o):e},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o};function Xi(){}function Zi(t,e){var n=new Xi;if(t instanceof Xi)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}Xi.prototype=Zi.prototype={constructor:Xi,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var Qi=Zi,Ki=function(){var t,e,n,r=[],i=[];function a(n,i,o,s){if(i>=r.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var c,u,l,h=-1,f=n.length,d=r[i++],p=Qi(),y=o();++h<f;)(l=p.get(c=d(u=n[h])+""))?l.push(u):p.set(c,[u]);return p.each((function(t,e){s(y,e,a(t,i,o,s))})),y}return n={object:function(t){return a(t,0,Ji,ta)},map:function(t){return a(t,0,ea,na)},entries:function(t){return function t(n,a){if(++a>r.length)return n;var o,s=i[a-1];return null!=e&&a>=r.length?o=n.entries():(o=[],n.each((function(e,n){o.push({key:n,values:t(e,a)})}))),null!=s?o.sort((function(t,e){return s(t.key,e.key)})):o}(a(t,0,ea,na),0)},key:function(t){return r.push(t),n},sortKeys:function(t){return i[r.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}};function Ji(){return{}}function ta(t,e,n){t[e]=n}function ea(){return Qi()}function na(t,e,n){t.set(e,n)}function ra(){}var ia=Qi.prototype;function aa(t,e){var n=new ra;if(t instanceof ra)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}ra.prototype=aa.prototype={constructor:ra,has:ia.has,add:function(t){return this["$"+(t+="")]=t,this},remove:ia.remove,clear:ia.clear,values:ia.keys,size:ia.size,empty:ia.empty,each:ia.each};var oa=aa,sa=function(t){var e=[];for(var n in t)e.push(n);return e},ca=function(t){var e=[];for(var n in t)e.push(t[n]);return e},ua=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},la=Math.PI/180,ha=180/Math.PI;function fa(t){if(t instanceof ya)return new ya(t.l,t.a,t.b,t.opacity);if(t instanceof wa)return Ea(t);t instanceof Ge||(t=Ve(t));var e,n,r=ba(t.r),i=ba(t.g),a=ba(t.b),o=ga((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=ga((.4360747*r+.3850649*i+.1430804*a)/.96422),n=ga((.0139322*r+.0971045*i+.7141733*a)/.82521)),new ya(116*o-16,500*(e-o),200*(o-n),t.opacity)}function da(t,e){return new ya(t,0,0,null==e?1:e)}function pa(t,e,n,r){return 1===arguments.length?fa(t):new ya(t,e,n,null==r?1:r)}function ya(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function ga(t){return t>6/29*(6/29)*(6/29)?Math.pow(t,1/3):t/(6/29*3*(6/29))+4/29}function va(t){return t>6/29?t*t*t:6/29*3*(6/29)*(t-4/29)}function ma(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ba(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function xa(t){if(t instanceof wa)return new wa(t.h,t.c,t.l,t.opacity);if(t instanceof ya||(t=fa(t)),0===t.a&&0===t.b)return new wa(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*ha;return new wa(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function _a(t,e,n,r){return 1===arguments.length?xa(t):new wa(n,e,t,null==r?1:r)}function ka(t,e,n,r){return 1===arguments.length?xa(t):new wa(t,e,n,null==r?1:r)}function wa(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Ea(t){if(isNaN(t.h))return new ya(t.l,0,0,t.opacity);var e=t.h*la;return new ya(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Se(ya,pa,Ae(Me,{brighter:function(t){return new ya(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new ya(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Ge(ma(3.1338561*(e=.96422*va(e))-1.6168667*(t=1*va(t))-.4906146*(n=.82521*va(n))),ma(-.9787684*e+1.9161415*t+.033454*n),ma(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Se(wa,ka,Ae(Me,{brighter:function(t){return new wa(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new wa(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Ea(this).rgb()}}));var Ta=-.29227,Ca=-1.7884503806,Sa=3.5172982438,Aa=-.6557636667999999;function Ma(t){if(t instanceof Ba)return new Ba(t.h,t.s,t.l,t.opacity);t instanceof Ge||(t=Ve(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Aa*r+Ca*e-Sa*n)/(Aa+Ca-Sa),a=r-i,o=(1.97294*(n-i)-Ta*a)/-.90649,s=Math.sqrt(o*o+a*a)/(1.97294*i*(1-i)),c=s?Math.atan2(o,a)*ha-120:NaN;return new Ba(c<0?c+360:c,s,i,t.opacity)}function Oa(t,e,n,r){return 1===arguments.length?Ma(t):new Ba(t,e,n,null==r?1:r)}function Ba(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Se(Ba,Oa,Ae(Me,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ba(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ba(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*la,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Ge(255*(e+n*(-.14861*r+1.78277*i)),255*(e+n*(Ta*r+-.90649*i)),255*(e+n*(1.97294*r)),this.opacity)}}));var Na=Array.prototype.slice,Da=function(t,e){return t-e},La=function(t){return function(){return t}},Ia=function(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=Ra(t,e[r]))return n;return 0};function Ra(t,e){for(var n=e[0],r=e[1],i=-1,a=0,o=t.length,s=o-1;a<o;s=a++){var c=t[a],u=c[0],l=c[1],h=t[s],f=h[0],d=h[1];if(Fa(c,h,e))return 0;l>r!=d>r&&n<(f-u)*(r-l)/(d-l)+u&&(i=-i)}return i}function Fa(t,e,n){var r,i,a,o;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],a=n[r],o=e[r],i<=a&&a<=o||o<=a&&a<=i)}var Pa=function(){},ja=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]],Ya=function(){var t=1,e=1,n=M,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Da);else{var r=g(t),i=r[0],o=r[1];e=A(i,o,e),e=k(Math.floor(i/e)*e,Math.floor(o/e)*e,e)}return e.map((function(e){return a(t,e)}))}function a(n,i){var a=[],s=[];return function(n,r,i){var a,s,c,u,l,h,f=new Array,d=new Array;a=s=-1,u=n[0]>=r,ja[u<<1].forEach(p);for(;++a<t-1;)c=u,u=n[a+1]>=r,ja[c|u<<1].forEach(p);ja[u<<0].forEach(p);for(;++s<e-1;){for(a=-1,u=n[s*t+t]>=r,l=n[s*t]>=r,ja[u<<1|l<<2].forEach(p);++a<t-1;)c=u,u=n[s*t+t+a+1]>=r,h=l,l=n[s*t+a+1]>=r,ja[c|u<<1|l<<2|h<<3].forEach(p);ja[u|l<<3].forEach(p)}a=-1,l=n[s*t]>=r,ja[l<<2].forEach(p);for(;++a<t-1;)h=l,l=n[s*t+a+1]>=r,ja[l<<2|h<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+a,t[0][1]+s],c=[t[1][0]+a,t[1][1]+s],u=o(r),l=o(c);(e=d[u])?(n=f[l])?(delete d[e.end],delete f[n.start],e===n?(e.ring.push(c),i(e.ring)):f[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete d[e.end],e.ring.push(c),d[e.end=l]=e):(e=f[l])?(n=d[u])?(delete f[e.start],delete d[n.end],e===n?(e.ring.push(c),i(e.ring)):f[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete f[e.start],e.ring.unshift(r),f[e.start=u]=e):f[u]=d[l]={start:u,end:l,ring:[r,c]}}ja[l<<3].forEach(p)}(n,i,(function(t){r(t,n,i),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?a.push([t]):s.push(t)})),s.forEach((function(t){for(var e,n=0,r=a.length;n<r;++n)if(-1!==Ia((e=a[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:i,coordinates:a}}function o(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,i){n.forEach((function(n){var a,o=n[0],s=n[1],c=0|o,u=0|s,l=r[u*t+c];o>0&&o<t&&c===o&&(a=r[u*t+c-1],n[0]=o+(i-a)/(l-a)-.5),s>0&&s<e&&u===s&&(a=r[(u-1)*t+c],n[1]=s+(i-a)/(l-a)-.5)}))}return i.contour=a,i.size=function(n){if(!arguments.length)return[t,e];var r=Math.ceil(n[0]),a=Math.ceil(n[1]);if(!(r>0&&a>0))throw new Error("invalid size");return t=r,e=a,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?La(Na.call(t)):La(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:Pa,i):r===s},i};function za(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<i;++o)for(var s=0,c=0;s<r+n;++s)s<r&&(c+=t.data[s+o*r]),s>=n&&(s>=a&&(c-=t.data[s-a+o*r]),e.data[s-n+o*r]=c/Math.min(s+1,r-1+a-s,a))}function Ua(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<r;++o)for(var s=0,c=0;s<i+n;++s)s<i&&(c+=t.data[o+s*r]),s>=n&&(s>=a&&(c-=t.data[o+(s-a)*r]),e.data[o+(s-n)*r]=c/Math.min(s+1,i-1+a-s,a))}function $a(t){return t[0]}function qa(t){return t[1]}function Wa(){return 1}var Va=function(){var t=$a,e=qa,n=Wa,r=960,i=500,a=20,o=2,s=3*a,c=r+2*s>>o,u=i+2*s>>o,l=La(20);function h(r){var i=new Float32Array(c*u),h=new Float32Array(c*u);r.forEach((function(r,a,l){var h=+t(r,a,l)+s>>o,f=+e(r,a,l)+s>>o,d=+n(r,a,l);h>=0&&h<c&&f>=0&&f<u&&(i[h+f*c]+=d)})),za({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),Ua({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o),za({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),Ua({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o),za({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),Ua({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o);var d=l(i);if(!Array.isArray(d)){var p=L(i);d=A(0,p,d),(d=k(0,Math.floor(p/d)*d,d)).shift()}return Ya().thresholds(d).size([c,u])(i).map(f)}function f(t){return t.value*=Math.pow(2,-2*o),t.coordinates.forEach(d),t}function d(t){t.forEach(p)}function p(t){t.forEach(y)}function y(t){t[0]=t[0]*Math.pow(2,o)-s,t[1]=t[1]*Math.pow(2,o)-s}function g(){return c=r+2*(s=3*a)>>o,u=i+2*s>>o,h}return h.x=function(e){return arguments.length?(t="function"==typeof e?e:La(+e),h):t},h.y=function(t){return arguments.length?(e="function"==typeof t?t:La(+t),h):e},h.weight=function(t){return arguments.length?(n="function"==typeof t?t:La(+t),h):n},h.size=function(t){if(!arguments.length)return[r,i];var e=Math.ceil(t[0]),n=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return r=e,i=n,g()},h.cellSize=function(t){if(!arguments.length)return 1<<o;if(!((t=+t)>=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(t)/Math.LN2),g()},h.thresholds=function(t){return arguments.length?(l="function"==typeof t?t:Array.isArray(t)?La(Na.call(t)):La(t),h):l},h.bandwidth=function(t){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return a=Math.round((Math.sqrt(4*t*t+1)-1)/2),g()},h},Ha=function(t){return function(){return t}};function Ga(t,e,n,r,i,a,o,s,c,u){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=a,this.y=o,this.dx=s,this.dy=c,this._=u}function Xa(){return!ce.ctrlKey&&!ce.button}function Za(){return this.parentNode}function Qa(t){return null==t?{x:ce.x,y:ce.y}:t}function Ka(){return navigator.maxTouchPoints||"ontouchstart"in this}Ga.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Ja=function(){var t,e,n,r,i=Xa,a=Za,o=Qa,s=Ka,c={},u=lt("start","drag","end"),l=0,h=0;function f(t){t.on("mousedown.drag",d).filter(s).on("touchstart.drag",g).on("touchmove.drag",v).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(){if(!r&&i.apply(this,arguments)){var o=b("mouse",a.apply(this,arguments),Nn,this,arguments);o&&(ke(ce.view).on("mousemove.drag",p,!0).on("mouseup.drag",y,!0),Te(ce.view),we(),n=!1,t=ce.clientX,e=ce.clientY,o("start"))}}function p(){if(Ee(),!n){var r=ce.clientX-t,i=ce.clientY-e;n=r*r+i*i>h}c.mouse("drag")}function y(){ke(ce.view).on("mousemove.drag mouseup.drag",null),Ce(ce.view,n),Ee(),c.mouse("end")}function g(){if(i.apply(this,arguments)){var t,e,n=ce.changedTouches,r=a.apply(this,arguments),o=n.length;for(t=0;t<o;++t)(e=b(n[t].identifier,r,Bn,this,arguments))&&(we(),e("start"))}}function v(){var t,e,n=ce.changedTouches,r=n.length;for(t=0;t<r;++t)(e=c[n[t].identifier])&&(Ee(),e("drag"))}function m(){var t,e,n=ce.changedTouches,i=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(e=c[n[t].identifier])&&(we(),e("end"))}function b(t,e,n,r,i){var a,s,h,d=n(e,t),p=u.copy();if(pe(new Ga(f,"beforestart",a,t,l,d[0],d[1],0,0,p),(function(){return null!=(ce.subject=a=o.apply(r,i))&&(s=a.x-d[0]||0,h=a.y-d[1]||0,!0)})))return function o(u){var y,g=d;switch(u){case"start":c[t]=o,y=l++;break;case"end":delete c[t],--l;case"drag":d=n(e,t),y=l}pe(new Ga(f,u,a,t,y,d[0]+s,d[1]+h,d[0]-g[0],d[1]-g[1],p),p.apply,p,[u,r,i])}}return f.filter=function(t){return arguments.length?(i="function"==typeof t?t:Ha(!!t),f):i},f.container=function(t){return arguments.length?(a="function"==typeof t?t:Ha(t),f):a},f.subject=function(t){return arguments.length?(o="function"==typeof t?t:Ha(t),f):o},f.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Ha(!!t),f):s},f.on=function(){var t=u.on.apply(u,arguments);return t===u?f:t},f.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,f):Math.sqrt(h)},f},to={},eo={};function no(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function ro(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function io(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function ao(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+io(-e,6):e>9999?"+"+io(e,6):io(e,4))+"-"+io(t.getUTCMonth()+1,2)+"-"+io(t.getUTCDate(),2)+(a?"T"+io(n,2)+":"+io(r,2)+":"+io(i,2)+"."+io(a,3)+"Z":i?"T"+io(n,2)+":"+io(r,2)+":"+io(i,2)+"Z":r||n?"T"+io(n,2)+":"+io(r,2)+"Z":"")}var oo=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,s=0,c=a<=0,u=!1;function l(){if(c)return eo;if(u)return u=!1,to;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?c=!0:10===(r=t.charCodeAt(o++))?u=!0:13===r&&(u=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))u=!0;else if(13===r)u=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return c=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=l())!==eo;){for(var h=[];r!==to&&r!==eo;)h.push(r),r=l();e&&null==(h=e(h,s++))||i.push(h)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?ao(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=no(t);return function(r,i){return e(n(r),i,t)}}(t,e):no(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=ro(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=ro(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}},so=oo(","),co=so.parse,uo=so.parseRows,lo=so.format,ho=so.formatBody,fo=so.formatRows,po=so.formatRow,yo=so.formatValue,go=oo("\t"),vo=go.parse,mo=go.parseRows,bo=go.format,xo=go.formatBody,_o=go.formatRows,ko=go.formatRow,wo=go.formatValue;function Eo(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;To&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}var To=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function Co(t){return+t}function So(t){return t*t}function Ao(t){return t*(2-t)}function Mo(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var Oo=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),Bo=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),No=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Do=Math.PI,Lo=Do/2;function Io(t){return 1-Math.cos(t*Lo)}function Ro(t){return Math.sin(t*Lo)}function Fo(t){return(1-Math.cos(Do*t))/2}function Po(t){return Math.pow(2,10*t-10)}function jo(t){return 1-Math.pow(2,-10*t)}function Yo(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function zo(t){return 1-Math.sqrt(1-t*t)}function Uo(t){return Math.sqrt(1- --t*t)}function $o(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}function qo(t){return 1-Wo(1-t)}function Wo(t){return(t=+t)<4/11?7.5625*t*t:t<8/11?7.5625*(t-=6/11)*t+.75:t<10/11?7.5625*(t-=9/11)*t+.9375:7.5625*(t-=21/22)*t+63/64}function Vo(t){return((t*=2)<=1?1-Wo(1-t):Wo(t-1)+1)/2}var Ho=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),Go=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),Xo=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),Zo=2*Math.PI,Qo=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Zo);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Zo)},i.period=function(n){return t(e,n)},i}(1,.3),Ko=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Zo);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Zo)},i.period=function(n){return t(e,n)},i}(1,.3),Jo=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Zo);function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Zo)},i.period=function(n){return t(e,n)},i}(1,.3);function ts(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}var es=function(t,e){return fetch(t,e).then(ts)};function ns(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}var rs=function(t,e){return fetch(t,e).then(ns)};function is(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var as=function(t,e){return fetch(t,e).then(is)};function os(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),as(e,n).then((function(e){return t(e,r)}))}}function ss(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=oo(t);return as(e,n).then((function(t){return i.parse(t,r)}))}var cs=os(co),us=os(vo),ls=function(t,e){return new Promise((function(n,r){var i=new Image;for(var a in e)i[a]=e[a];i.onerror=r,i.onload=function(){n(i)},i.src=t}))};function hs(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}var fs=function(t,e){return fetch(t,e).then(hs)};function ds(t){return function(e,n){return as(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}var ps=ds("application/xml"),ys=ds("text/html"),gs=ds("image/svg+xml"),vs=function(t,e){var n;function r(){var r,i,a=n.length,o=0,s=0;for(r=0;r<a;++r)o+=(i=n[r]).x,s+=i.y;for(o=o/a-t,s=s/a-e,r=0;r<a;++r)(i=n[r]).x-=o,i.y-=s}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r},ms=function(t){return function(){return t}},bs=function(){return 1e-6*(Math.random()-.5)};function xs(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,s,c,u,l,h,f,d=t._root,p={data:r},y=t._x0,g=t._y0,v=t._x1,m=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((u=e>=(a=(y+v)/2))?y=a:v=a,(l=n>=(o=(g+m)/2))?g=o:m=o,i=d,!(d=d[h=l<<1|u]))return i[h]=p,t;if(s=+t._x.call(null,d.data),c=+t._y.call(null,d.data),e===s&&n===c)return p.next=d,i?i[h]=p:t._root=p,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(u=e>=(a=(y+v)/2))?y=a:v=a,(l=n>=(o=(g+m)/2))?g=o:m=o}while((h=l<<1|u)==(f=(c>=o)<<1|s>=a));return i[f]=d,i[h]=p,t}var _s=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function ks(t){return t[0]}function ws(t){return t[1]}function Es(t,e,n){var r=new Ts(null==e?ks:e,null==n?ws:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Ts(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Cs(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Ss=Es.prototype=Ts.prototype;function As(t){return t.x+t.vx}function Ms(t){return t.y+t.vy}Ss.copy=function(){var t,e,n=new Ts(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=Cs(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Cs(e));return n},Ss.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return xs(this.cover(e,n),e,n,t)},Ss.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),s=new Array(a),c=1/0,u=1/0,l=-1/0,h=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(o[n]=r,s[n]=i,r<c&&(c=r),r>l&&(l=r),i<u&&(u=i),i>h&&(h=i));if(c>l||u>h)return this;for(this.cover(c,u).cover(l,h),n=0;n<a;++n)xs(this,o[n],s[n],t[n]);return this},Ss.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,c=i-n,u=this._root;n>t||t>=i||r>e||e>=a;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=u,u=o,c*=2,s){case 0:i=n+c,a=r+c;break;case 1:n=i-c,a=r+c;break;case 2:i=n+c,r=a-c;break;case 3:n=i-c,r=a-c}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},Ss.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},Ss.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Ss.find=function(t,e,n){var r,i,a,o,s,c,u,l=this._x0,h=this._y0,f=this._x1,d=this._y1,p=[],y=this._root;for(y&&p.push(new _s(y,l,h,f,d)),null==n?n=1/0:(l=t-n,h=e-n,f=t+n,d=e+n,n*=n);c=p.pop();)if(!(!(y=c.node)||(i=c.x0)>f||(a=c.y0)>d||(o=c.x1)<l||(s=c.y1)<h))if(y.length){var g=(i+o)/2,v=(a+s)/2;p.push(new _s(y[3],g,v,o,s),new _s(y[2],i,v,g,s),new _s(y[1],g,a,o,v),new _s(y[0],i,a,g,v)),(u=(e>=v)<<1|t>=g)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-u],p[p.length-1-u]=c)}else{var m=t-+this._x.call(null,y.data),b=e-+this._y.call(null,y.data),x=m*m+b*b;if(x<n){var _=Math.sqrt(n=x);l=t-_,h=e-_,f=t+_,d=e+_,r=y.data}}return r},Ss.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,s,c,u,l,h,f,d=this._root,p=this._x0,y=this._y0,g=this._x1,v=this._y1;if(!d)return this;if(d.length)for(;;){if((u=a>=(s=(p+g)/2))?p=s:g=s,(l=o>=(c=(y+v)/2))?y=c:v=c,e=d,!(d=d[h=l<<1|u]))return this;if(!d.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,f=h)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[h]=i:delete e[h],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[f]=d:this._root=d),this):(this._root=i,this)},Ss.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Ss.root=function(){return this._root},Ss.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},Ss.visit=function(t){var e,n,r,i,a,o,s=[],c=this._root;for(c&&s.push(new _s(c,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(c=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&c.length){var u=(r+a)/2,l=(i+o)/2;(n=c[3])&&s.push(new _s(n,u,l,a,o)),(n=c[2])&&s.push(new _s(n,r,l,u,o)),(n=c[1])&&s.push(new _s(n,u,i,a,l)),(n=c[0])&&s.push(new _s(n,r,i,u,l))}return this},Ss.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new _s(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,s=e.y0,c=e.x1,u=e.y1,l=(o+c)/2,h=(s+u)/2;(a=i[0])&&n.push(new _s(a,o,s,l,h)),(a=i[1])&&n.push(new _s(a,l,s,c,h)),(a=i[2])&&n.push(new _s(a,o,h,l,u)),(a=i[3])&&n.push(new _s(a,l,h,c,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Ss.x=function(t){return arguments.length?(this._x=t,this):this._x},Ss.y=function(t){return arguments.length?(this._y=t,this):this._y};var Os=function(t){var e,n,r=1,i=1;function a(){for(var t,a,s,c,u,l,h,f=e.length,d=0;d<i;++d)for(a=Es(e,As,Ms).visitAfter(o),t=0;t<f;++t)s=e[t],l=n[s.index],h=l*l,c=s.x+s.vx,u=s.y+s.vy,a.visit(p);function p(t,e,n,i,a){var o=t.data,f=t.r,d=l+f;if(!o)return e>c+d||i<c-d||n>u+d||a<u-d;if(o.index>s.index){var p=c-o.x-o.vx,y=u-o.y-o.vy,g=p*p+y*y;g<d*d&&(0===p&&(g+=(p=bs())*p),0===y&&(g+=(y=bs())*y),g=(d-(g=Math.sqrt(g)))/g*r,s.vx+=(p*=g)*(d=(f*=f)/(h+f)),s.vy+=(y*=g)*d,o.vx-=p*(d=1-d),o.vy-=y*d)}}}function o(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function s(){if(e){var r,i,a=e.length;for(n=new Array(a),r=0;r<a;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=ms(null==t?1:+t)),a.initialize=function(t){e=t,s()},a.iterations=function(t){return arguments.length?(i=+t,a):i},a.strength=function(t){return arguments.length?(r=+t,a):r},a.radius=function(e){return arguments.length?(t="function"==typeof e?e:ms(+e),s(),a):t},a};function Bs(t){return t.index}function Ns(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}var Ds=function(t){var e,n,r,i,a,o=Bs,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},c=ms(30),u=1;function l(r){for(var i=0,o=t.length;i<u;++i)for(var s,c,l,h,f,d,p,y=0;y<o;++y)c=(s=t[y]).source,h=(l=s.target).x+l.vx-c.x-c.vx||bs(),f=l.y+l.vy-c.y-c.vy||bs(),h*=d=((d=Math.sqrt(h*h+f*f))-n[y])/d*r*e[y],f*=d,l.vx-=h*(p=a[y]),l.vy-=f*p,c.vx+=h*(p=1-p),c.vy+=f*p}function h(){if(r){var s,c,u=r.length,l=t.length,h=Qi(r,o);for(s=0,i=new Array(u);s<l;++s)(c=t[s]).index=s,"object"!=typeof c.source&&(c.source=Ns(h,c.source)),"object"!=typeof c.target&&(c.target=Ns(h,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(s=0,a=new Array(l);s<l;++s)c=t[s],a[s]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);e=new Array(l),f(),n=new Array(l),d()}}function f(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+s(t[n],n,t)}function d(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+c(t[e],e,t)}return null==t&&(t=[]),l.initialize=function(t){r=t,h()},l.links=function(e){return arguments.length?(t=e,h(),l):t},l.id=function(t){return arguments.length?(o=t,l):o},l.iterations=function(t){return arguments.length?(u=+t,l):u},l.strength=function(t){return arguments.length?(s="function"==typeof t?t:ms(+t),f(),l):s},l.distance=function(t){return arguments.length?(c="function"==typeof t?t:ms(+t),d(),l):c},l};function Ls(t){return t.x}function Is(t){return t.y}var Rs=Math.PI*(3-Math.sqrt(5)),Fs=function(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=Qi(),c=qn(l),u=lt("tick","end");function l(){h(),u.call("tick",e),n<r&&(c.stop(),u.call("end",e))}function h(r){var c,u,l=t.length;void 0===r&&(r=1);for(var h=0;h<r;++h)for(n+=(a-n)*i,s.each((function(t){t(n)})),c=0;c<l;++c)null==(u=t[c]).fx?u.x+=u.vx*=o:(u.x=u.fx,u.vx=0),null==u.fy?u.y+=u.vy*=o:(u.y=u.fy,u.vy=0);return e}function f(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(n),a=n*Rs;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function d(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),f(),e={tick:h,restart:function(){return c.restart(l),e},stop:function(){return c.stop(),e},nodes:function(n){return arguments.length?(t=n,f(),s.each(d),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(a=+t,e):a},velocityDecay:function(t){return arguments.length?(o=1-t,e):1-o},force:function(t,n){return arguments.length>1?(null==n?s.remove(t):s.set(t,d(n)),e):s.get(t)},find:function(e,n,r){var i,a,o,s,c,u=0,l=t.length;for(null==r?r=1/0:r*=r,u=0;u<l;++u)(o=(i=e-(s=t[u]).x)*i+(a=n-s.y)*a)<r&&(c=s,r=o);return c},on:function(t,n){return arguments.length>1?(u.on(t,n),e):u.on(t)}}},Ps=function(){var t,e,n,r,i=ms(-30),a=1,o=1/0,s=.81;function c(r){var i,a=t.length,o=Es(t,Ls,Is).visitAfter(l);for(n=r,i=0;i<a;++i)e=t[i],o.visit(h)}function u(){if(t){var e,n,a=t.length;for(r=new Array(a),e=0;e<a;++e)n=t[e],r[n.index]=+i(n,e,t)}}function l(t){var e,n,i,a,o,s=0,c=0;if(t.length){for(i=a=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(s+=e.value,c+=n,i+=n*e.x,a+=n*e.y);t.x=i/c,t.y=a/c}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=r[e.data.index]}while(e=e.next)}t.value=s}function h(t,i,c,u){if(!t.value)return!0;var l=t.x-e.x,h=t.y-e.y,f=u-i,d=l*l+h*h;if(f*f/s<d)return d<o&&(0===l&&(d+=(l=bs())*l),0===h&&(d+=(h=bs())*h),d<a&&(d=Math.sqrt(a*d)),e.vx+=l*t.value*n/d,e.vy+=h*t.value*n/d),!0;if(!(t.length||d>=o)){(t.data!==e||t.next)&&(0===l&&(d+=(l=bs())*l),0===h&&(d+=(h=bs())*h),d<a&&(d=Math.sqrt(a*d)));do{t.data!==e&&(f=r[t.data.index]*n/d,e.vx+=l*f,e.vy+=h*f)}while(t=t.next)}}return c.initialize=function(e){t=e,u()},c.strength=function(t){return arguments.length?(i="function"==typeof t?t:ms(+t),u(),c):i},c.distanceMin=function(t){return arguments.length?(a=t*t,c):Math.sqrt(a)},c.distanceMax=function(t){return arguments.length?(o=t*t,c):Math.sqrt(o)},c.theta=function(t){return arguments.length?(s=t*t,c):Math.sqrt(s)},c},js=function(t,e,n){var r,i,a,o=ms(.1);function s(t){for(var o=0,s=r.length;o<s;++o){var c=r[o],u=c.x-e||1e-6,l=c.y-n||1e-6,h=Math.sqrt(u*u+l*l),f=(a[o]-h)*i[o]*t/h;c.vx+=u*f,c.vy+=l*f}}function c(){if(r){var e,n=r.length;for(i=new Array(n),a=new Array(n),e=0;e<n;++e)a[e]=+t(r[e],e,r),i[e]=isNaN(a[e])?0:+o(r[e],e,r)}}return"function"!=typeof t&&(t=ms(+t)),null==e&&(e=0),null==n&&(n=0),s.initialize=function(t){r=t,c()},s.strength=function(t){return arguments.length?(o="function"==typeof t?t:ms(+t),c(),s):o},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:ms(+e),c(),s):t},s.x=function(t){return arguments.length?(e=+t,s):e},s.y=function(t){return arguments.length?(n=+t,s):n},s},Ys=function(t){var e,n,r,i=ms(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vx+=(r[a]-i.x)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=ms(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:ms(+t),o(),a):i},a.x=function(e){return arguments.length?(t="function"==typeof e?e:ms(+e),o(),a):t},a},zs=function(t){var e,n,r,i=ms(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vy+=(r[a]-i.y)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=ms(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:ms(+t),o(),a):i},a.y=function(e){return arguments.length?(t="function"==typeof e?e:ms(+e),o(),a):t},a},Us=function(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]},$s=function(t){return(t=Us(Math.abs(t)))?t[1]:NaN},qs=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ws(t){if(!(e=qs.exec(t)))throw new Error("invalid format: "+t);var e;return new Vs({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Vs(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}Ws.prototype=Vs.prototype,Vs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Hs,Gs,Xs,Zs,Qs=function(t,e){var n=Us(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},Ks={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Qs(100*t,e)},r:Qs,s:function(t,e){var n=Us(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Hs=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Us(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Js=function(t){return t},tc=Array.prototype.map,ec=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],nc=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Js:(e=tc.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(t.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Js:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(tc.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Ws(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,y=t.comma,g=t.precision,v=t.trim,m=t.type;"n"===m?(y=!0,m="g"):Ks[m]||(void 0===g&&(g=12),v=!0,m="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var b="$"===f?i:"#"===f&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",x="$"===f?a:/[%p]/.test(m)?c:"",_=Ks[m],k=/[defgprs%]/.test(m);function w(t){var i,a,c,f=b,w=x;if("c"===m)w=_(t)+w,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?l:_(Math.abs(t),g),v&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),E&&0==+t&&(E=!1),f=(E?"("===h?h:u:"-"===h||"("===h?"":h)+f,w=("s"===m?ec[8+Hs/3]:"")+w+(E&&"("===h?")":""),k)for(i=-1,a=t.length;++i<a;)if(48>(c=t.charCodeAt(i))||c>57){w=(46===c?o+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}y&&!d&&(t=r(t,1/0));var T=f.length+t.length+w.length,C=T<p?new Array(p-T+1).join(e):"";switch(y&&d&&(t=r(C+t,C.length?p-w.length:1/0),C=""),n){case"<":t=f+t+w+C;break;case"=":t=f+C+t+w;break;case"^":t=C.slice(0,T=C.length>>1)+f+t+w+C.slice(T);break;default:t=C+f+t+w}return s(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),w.toString=function(){return t+""},w}return{format:h,formatPrefix:function(t,e){var n=h(((t=Ws(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor($s(e)/3))),i=Math.pow(10,-r),a=ec[8+r/3];return function(t){return n(i*t)+a}}}};function rc(t){return Gs=nc(t),Xs=Gs.format,Zs=Gs.formatPrefix,Gs}rc({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var ic=function(t){return Math.max(0,-$s(Math.abs(t)))},ac=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor($s(e)/3)))-$s(Math.abs(t)))},oc=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,$s(e)-$s(t))+1},sc=function(){return new cc};function cc(){this.reset()}cc.prototype={constructor:cc,reset:function(){this.s=this.t=0},add:function(t){lc(uc,t,this.t),lc(this,uc.s,this.s),this.s?this.t+=uc.t:this.s=uc.t},valueOf:function(){return this.s}};var uc=new cc;function lc(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var hc=Math.PI,fc=hc/2,dc=hc/4,pc=2*hc,yc=180/hc,gc=hc/180,vc=Math.abs,mc=Math.atan,bc=Math.atan2,xc=Math.cos,_c=Math.ceil,kc=Math.exp,wc=(Math.floor,Math.log),Ec=Math.pow,Tc=Math.sin,Cc=Math.sign||function(t){return t>0?1:t<0?-1:0},Sc=Math.sqrt,Ac=Math.tan;function Mc(t){return t>1?0:t<-1?hc:Math.acos(t)}function Oc(t){return t>1?fc:t<-1?-fc:Math.asin(t)}function Bc(t){return(t=Tc(t/2))*t}function Nc(){}function Dc(t,e){t&&Ic.hasOwnProperty(t.type)&&Ic[t.type](t,e)}var Lc={Feature:function(t,e){Dc(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Dc(n[r].geometry,e)}},Ic={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Rc(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Rc(n[r],e,0)},Polygon:function(t,e){Fc(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Fc(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Dc(n[r],e)}};function Rc(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function Fc(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Rc(t[n],e,1);e.polygonEnd()}var Pc,jc,Yc,zc,Uc,$c=function(t,e){t&&Lc.hasOwnProperty(t.type)?Lc[t.type](t,e):Dc(t,e)},qc=sc(),Wc=sc(),Vc={point:Nc,lineStart:Nc,lineEnd:Nc,polygonStart:function(){qc.reset(),Vc.lineStart=Hc,Vc.lineEnd=Gc},polygonEnd:function(){var t=+qc;Wc.add(t<0?pc+t:t),this.lineStart=this.lineEnd=this.point=Nc},sphere:function(){Wc.add(pc)}};function Hc(){Vc.point=Xc}function Gc(){Zc(Pc,jc)}function Xc(t,e){Vc.point=Zc,Pc=t,jc=e,Yc=t*=gc,zc=xc(e=(e*=gc)/2+dc),Uc=Tc(e)}function Zc(t,e){var n=(t*=gc)-Yc,r=n>=0?1:-1,i=r*n,a=xc(e=(e*=gc)/2+dc),o=Tc(e),s=Uc*o,c=zc*a+s*xc(i),u=s*r*Tc(i);qc.add(bc(u,c)),Yc=t,zc=a,Uc=o}var Qc=function(t){return Wc.reset(),$c(t,Vc),2*Wc};function Kc(t){return[bc(t[1],t[0]),Oc(t[2])]}function Jc(t){var e=t[0],n=t[1],r=xc(n);return[r*xc(e),r*Tc(e),Tc(n)]}function tu(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function eu(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function nu(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function ru(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function iu(t){var e=Sc(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var au,ou,su,cu,uu,lu,hu,fu,du,pu,yu=sc(),gu={point:vu,lineStart:bu,lineEnd:xu,polygonStart:function(){gu.point=_u,gu.lineStart=ku,gu.lineEnd=wu,yu.reset(),Vc.polygonStart()},polygonEnd:function(){Vc.polygonEnd(),gu.point=vu,gu.lineStart=bu,gu.lineEnd=xu,qc<0?(au=-(su=180),ou=-(cu=90)):yu>1e-6?cu=90:yu<-1e-6&&(ou=-90),pu[0]=au,pu[1]=su},sphere:function(){au=-(su=180),ou=-(cu=90)}};function vu(t,e){du.push(pu=[au=t,su=t]),e<ou&&(ou=e),e>cu&&(cu=e)}function mu(t,e){var n=Jc([t*gc,e*gc]);if(fu){var r=eu(fu,n),i=eu([r[1],-r[0],0],r);iu(i),i=Kc(i);var a,o=t-uu,s=o>0?1:-1,c=i[0]*yc*s,u=vc(o)>180;u^(s*uu<c&&c<s*t)?(a=i[1]*yc)>cu&&(cu=a):u^(s*uu<(c=(c+360)%360-180)&&c<s*t)?(a=-i[1]*yc)<ou&&(ou=a):(e<ou&&(ou=e),e>cu&&(cu=e)),u?t<uu?Eu(au,t)>Eu(au,su)&&(su=t):Eu(t,su)>Eu(au,su)&&(au=t):su>=au?(t<au&&(au=t),t>su&&(su=t)):t>uu?Eu(au,t)>Eu(au,su)&&(su=t):Eu(t,su)>Eu(au,su)&&(au=t)}else du.push(pu=[au=t,su=t]);e<ou&&(ou=e),e>cu&&(cu=e),fu=n,uu=t}function bu(){gu.point=mu}function xu(){pu[0]=au,pu[1]=su,gu.point=vu,fu=null}function _u(t,e){if(fu){var n=t-uu;yu.add(vc(n)>180?n+(n>0?360:-360):n)}else lu=t,hu=e;Vc.point(t,e),mu(t,e)}function ku(){Vc.lineStart()}function wu(){_u(lu,hu),Vc.lineEnd(),vc(yu)>1e-6&&(au=-(su=180)),pu[0]=au,pu[1]=su,fu=null}function Eu(t,e){return(e-=t)<0?e+360:e}function Tu(t,e){return t[0]-e[0]}function Cu(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var Su,Au,Mu,Ou,Bu,Nu,Du,Lu,Iu,Ru,Fu,Pu,ju,Yu,zu,Uu,$u=function(t){var e,n,r,i,a,o,s;if(cu=su=-(au=ou=1/0),du=[],$c(t,gu),n=du.length){for(du.sort(Tu),e=1,a=[r=du[0]];e<n;++e)Cu(r,(i=du[e])[0])||Cu(r,i[1])?(Eu(r[0],i[1])>Eu(r[0],r[1])&&(r[1]=i[1]),Eu(i[0],r[1])>Eu(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,e=0,r=a[n=a.length-1];e<=n;r=i,++e)i=a[e],(s=Eu(r[1],i[0]))>o&&(o=s,au=i[0],su=r[1])}return du=pu=null,au===1/0||ou===1/0?[[NaN,NaN],[NaN,NaN]]:[[au,ou],[su,cu]]},qu={sphere:Nc,point:Wu,lineStart:Hu,lineEnd:Zu,polygonStart:function(){qu.lineStart=Qu,qu.lineEnd=Ku},polygonEnd:function(){qu.lineStart=Hu,qu.lineEnd=Zu}};function Wu(t,e){t*=gc;var n=xc(e*=gc);Vu(n*xc(t),n*Tc(t),Tc(e))}function Vu(t,e,n){++Su,Mu+=(t-Mu)/Su,Ou+=(e-Ou)/Su,Bu+=(n-Bu)/Su}function Hu(){qu.point=Gu}function Gu(t,e){t*=gc;var n=xc(e*=gc);Yu=n*xc(t),zu=n*Tc(t),Uu=Tc(e),qu.point=Xu,Vu(Yu,zu,Uu)}function Xu(t,e){t*=gc;var n=xc(e*=gc),r=n*xc(t),i=n*Tc(t),a=Tc(e),o=bc(Sc((o=zu*a-Uu*i)*o+(o=Uu*r-Yu*a)*o+(o=Yu*i-zu*r)*o),Yu*r+zu*i+Uu*a);Au+=o,Nu+=o*(Yu+(Yu=r)),Du+=o*(zu+(zu=i)),Lu+=o*(Uu+(Uu=a)),Vu(Yu,zu,Uu)}function Zu(){qu.point=Wu}function Qu(){qu.point=Ju}function Ku(){tl(Pu,ju),qu.point=Wu}function Ju(t,e){Pu=t,ju=e,t*=gc,e*=gc,qu.point=tl;var n=xc(e);Yu=n*xc(t),zu=n*Tc(t),Uu=Tc(e),Vu(Yu,zu,Uu)}function tl(t,e){t*=gc;var n=xc(e*=gc),r=n*xc(t),i=n*Tc(t),a=Tc(e),o=zu*a-Uu*i,s=Uu*r-Yu*a,c=Yu*i-zu*r,u=Sc(o*o+s*s+c*c),l=Oc(u),h=u&&-l/u;Iu+=h*o,Ru+=h*s,Fu+=h*c,Au+=l,Nu+=l*(Yu+(Yu=r)),Du+=l*(zu+(zu=i)),Lu+=l*(Uu+(Uu=a)),Vu(Yu,zu,Uu)}var el=function(t){Su=Au=Mu=Ou=Bu=Nu=Du=Lu=Iu=Ru=Fu=0,$c(t,qu);var e=Iu,n=Ru,r=Fu,i=e*e+n*n+r*r;return i<1e-12&&(e=Nu,n=Du,r=Lu,Au<1e-6&&(e=Mu,n=Ou,r=Bu),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[bc(n,e)*yc,Oc(r/Sc(i))*yc]},nl=function(t){return function(){return t}},rl=function(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n};function il(t,e){return[vc(t)>hc?t+Math.round(-t/pc)*pc:t,e]}function al(t,e,n){return(t%=pc)?e||n?rl(sl(t),cl(e,n)):sl(t):e||n?cl(e,n):il}function ol(t){return function(e,n){return[(e+=t)>hc?e-pc:e<-hc?e+pc:e,n]}}function sl(t){var e=ol(t);return e.invert=ol(-t),e}function cl(t,e){var n=xc(t),r=Tc(t),i=xc(e),a=Tc(e);function o(t,e){var o=xc(e),s=xc(t)*o,c=Tc(t)*o,u=Tc(e),l=u*n+s*r;return[bc(c*i-l*a,s*n-u*r),Oc(l*i+c*a)]}return o.invert=function(t,e){var o=xc(e),s=xc(t)*o,c=Tc(t)*o,u=Tc(e),l=u*i-c*a;return[bc(c*i+u*a,s*n+l*r),Oc(l*n-s*r)]},o}il.invert=il;var ul=function(t){function e(e){return(e=t(e[0]*gc,e[1]*gc))[0]*=yc,e[1]*=yc,e}return t=al(t[0]*gc,t[1]*gc,t.length>2?t[2]*gc:0),e.invert=function(e){return(e=t.invert(e[0]*gc,e[1]*gc))[0]*=yc,e[1]*=yc,e},e};function ll(t,e,n,r,i,a){if(n){var o=xc(e),s=Tc(e),c=r*n;null==i?(i=e+r*pc,a=e-c/2):(i=hl(o,i),a=hl(o,a),(r>0?i<a:i>a)&&(i+=r*pc));for(var u,l=i;r>0?l>a:l<a;l-=c)u=Kc([o,-s*xc(l),-s*Tc(l)]),t.point(u[0],u[1])}}function hl(t,e){(e=Jc(e))[0]-=t,iu(e);var n=Mc(-e[1]);return((-e[2]<0?-n:n)+pc-1e-6)%pc}var fl=function(){var t,e,n=nl([0,0]),r=nl(90),i=nl(6),a={point:function(n,r){t.push(n=e(n,r)),n[0]*=yc,n[1]*=yc}};function o(){var o=n.apply(this,arguments),s=r.apply(this,arguments)*gc,c=i.apply(this,arguments)*gc;return t=[],e=al(-o[0]*gc,-o[1]*gc,0).invert,ll(a,s,c,1),o={type:"Polygon",coordinates:[t]},t=e=null,o}return o.center=function(t){return arguments.length?(n="function"==typeof t?t:nl([+t[0],+t[1]]),o):n},o.radius=function(t){return arguments.length?(r="function"==typeof t?t:nl(+t),o):r},o.precision=function(t){return arguments.length?(i="function"==typeof t?t:nl(+t),o):i},o},dl=function(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:Nc,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},pl=function(t,e){return vc(t[0]-e[0])<1e-6&&vc(t[1]-e[1])<1e-6};function yl(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var gl=function(t,e,n,r,i){var a,o,s=[],c=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(pl(r,o)){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);i.lineEnd()}else s.push(n=new yl(r,t,null,!0)),c.push(n.o=new yl(r,null,n,!1)),s.push(n=new yl(o,t,null,!1)),c.push(n.o=new yl(o,null,n,!0))}})),s.length){for(c.sort(e),vl(s),vl(c),a=0,o=c.length;a<o;++a)c[a].e=n=!n;for(var u,l,h=s[0];;){for(var f=h,d=!0;f.v;)if((f=f.n)===h)return;u=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(a=0,o=u.length;a<o;++a)i.point((l=u[a])[0],l[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(d)for(u=f.p.z,a=u.length-1;a>=0;--a)i.point((l=u[a])[0],l[1]);else r(f.x,f.p.x,-1,i);f=f.p}u=(f=f.o).z,d=!d}while(!f.v);i.lineEnd()}}};function vl(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}var ml=sc();function bl(t){return vc(t[0])<=hc?t[0]:Cc(t[0])*((vc(t[0])+hc)%pc-hc)}var xl=function(t,e){var n=bl(e),r=e[1],i=Tc(r),a=[Tc(n),-xc(n),0],o=0,s=0;ml.reset(),1===i?r=fc+1e-6:-1===i&&(r=-fc-1e-6);for(var c=0,u=t.length;c<u;++c)if(h=(l=t[c]).length)for(var l,h,f=l[h-1],d=bl(f),p=f[1]/2+dc,y=Tc(p),g=xc(p),v=0;v<h;++v,d=b,y=_,g=k,f=m){var m=l[v],b=bl(m),x=m[1]/2+dc,_=Tc(x),k=xc(x),w=b-d,E=w>=0?1:-1,T=E*w,C=T>hc,S=y*_;if(ml.add(bc(S*E*Tc(T),g*k+S*xc(T))),o+=C?w+E*pc:w,C^d>=n^b>=n){var A=eu(Jc(f),Jc(m));iu(A);var M=eu(a,A);iu(M);var O=(C^w>=0?-1:1)*Oc(M[2]);(r>O||r===O&&(A[0]||A[1]))&&(s+=C^w>=0?1:-1)}}return(o<-1e-6||o<1e-6&&ml<-1e-6)^1&s},_l=function(t,e,n,r){return function(i){var a,o,s,c=e(i),u=dl(),l=e(u),h=!1,f={point:d,lineStart:y,lineEnd:g,polygonStart:function(){f.point=v,f.lineStart=m,f.lineEnd=b,o=[],a=[]},polygonEnd:function(){f.point=d,f.lineStart=y,f.lineEnd=g,o=F(o);var t=xl(a,r);o.length?(h||(i.polygonStart(),h=!0),gl(o,wl,t,n,i)):t&&(h||(i.polygonStart(),h=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),h&&(i.polygonEnd(),h=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(e,n){t(e,n)&&i.point(e,n)}function p(t,e){c.point(t,e)}function y(){f.point=p,c.lineStart()}function g(){f.point=d,c.lineEnd()}function v(t,e){s.push([t,e]),l.point(t,e)}function m(){l.lineStart(),s=[]}function b(){v(s[0][0],s[0][1]),l.lineEnd();var t,e,n,r,c=l.clean(),f=u.result(),d=f.length;if(s.pop(),a.push(s),s=null,d)if(1&c){if((e=(n=f[0]).length-1)>0){for(h||(i.polygonStart(),h=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else d>1&&2&c&&f.push(f.pop().concat(f.shift())),o.push(f.filter(kl))}return f}};function kl(t){return t.length>1}function wl(t,e){return((t=t.x)[0]<0?t[1]-fc-1e-6:fc-t[1])-((e=e.x)[0]<0?e[1]-fc-1e-6:fc-e[1])}var El=_l((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?hc:-hc,c=vc(a-n);vc(c-hc)<1e-6?(t.point(n,r=(r+o)/2>0?fc:-fc),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&c>=hc&&(vc(n-i)<1e-6&&(n-=1e-6*i),vc(a-s)<1e-6&&(a-=1e-6*s),r=function(t,e,n,r){var i,a,o=Tc(t-n);return vc(o)>1e-6?mc((Tc(e)*(a=xc(r))*Tc(n)-Tc(r)*(i=xc(e))*Tc(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=a,r=o),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*fc,r.point(-hc,i),r.point(0,i),r.point(hc,i),r.point(hc,0),r.point(hc,-i),r.point(0,-i),r.point(-hc,-i),r.point(-hc,0),r.point(-hc,i);else if(vc(t[0]-e[0])>1e-6){var a=t[0]<e[0]?hc:-hc;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-hc,-fc]);var Tl=function(t){var e=xc(t),n=6*gc,r=e>0,i=vc(e)>1e-6;function a(t,n){return xc(t)*xc(n)>e}function o(t,n,r){var i=[1,0,0],a=eu(Jc(t),Jc(n)),o=tu(a,a),s=a[0],c=o-s*s;if(!c)return!r&&t;var u=e*o/c,l=-e*s/c,h=eu(i,a),f=ru(i,u);nu(f,ru(a,l));var d=h,p=tu(f,d),y=tu(d,d),g=p*p-y*(tu(f,f)-1);if(!(g<0)){var v=Sc(g),m=ru(d,(-p-v)/y);if(nu(m,f),m=Kc(m),!r)return m;var b,x=t[0],_=n[0],k=t[1],w=n[1];_<x&&(b=x,x=_,_=b);var E=_-x,T=vc(E-hc)<1e-6;if(!T&&w<k&&(b=k,k=w,w=b),T||E<1e-6?T?k+w>0^m[1]<(vc(m[0]-x)<1e-6?k:w):k<=m[1]&&m[1]<=w:E>hc^(x<=m[0]&&m[0]<=_)){var C=ru(d,(-p+v)/y);return nu(C,f),[m,Kc(C)]}}}function s(e,n){var i=r?t:hc-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return _l(a,(function(t){var e,n,c,u,l;return{lineStart:function(){u=c=!1,l=1},point:function(h,f){var d,p=[h,f],y=a(h,f),g=r?y?0:s(h,f):y?s(h+(h<0?hc:-hc),f):0;if(!e&&(u=c=y)&&t.lineStart(),y!==c&&(!(d=o(e,p))||pl(e,d)||pl(p,d))&&(p[0]+=1e-6,p[1]+=1e-6,y=a(p[0],p[1])),y!==c)l=0,y?(t.lineStart(),d=o(p,e),t.point(d[0],d[1])):(d=o(e,p),t.point(d[0],d[1]),t.lineEnd()),e=d;else if(i&&e&&r^y){var v;g&n||!(v=o(p,e,!0))||(l=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!y||e&&pl(e,p)||t.point(p[0],p[1]),e=p,c=y,n=g},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return l|(u&&c)<<1}}}),(function(e,r,i,a){ll(a,t,n,i,e,r)}),r?[0,-t]:[-hc,t-hc])};function Cl(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,s,u){var l=0,h=0;if(null==i||(l=o(i,s))!==(h=o(a,s))||c(i,a)<0^s>0)do{u.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+s+4)%4)!==h);else u.point(a[0],a[1])}function o(r,i){return vc(r[0]-t)<1e-6?i>0?0:3:vc(r[0]-n)<1e-6?i>0?2:1:vc(r[1]-e)<1e-6?i>0?1:0:i>0?3:2}function s(t,e){return c(t.x,e.x)}function c(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var c,u,l,h,f,d,p,y,g,v,m,b=o,x=dl(),_={point:k,lineStart:function(){_.point=w,u&&u.push(l=[]);v=!0,g=!1,p=y=NaN},lineEnd:function(){c&&(w(h,f),d&&g&&x.rejoin(),c.push(x.result()));_.point=k,g&&b.lineEnd()},polygonStart:function(){b=x,c=[],u=[],m=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var a,o,s=u[n],c=1,l=s.length,h=s[0],f=h[0],d=h[1];c<l;++c)a=f,o=d,h=s[c],f=h[0],d=h[1],o<=r?d>r&&(f-a)*(r-o)>(d-o)*(t-a)&&++e:d<=r&&(f-a)*(r-o)<(d-o)*(t-a)&&--e;return e}(),n=m&&e,i=(c=F(c)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&gl(c,s,e,a,o),o.polygonEnd());b=o,c=u=l=null}};function k(t,e){i(t,e)&&b.point(t,e)}function w(a,o){var s=i(a,o);if(u&&l.push([a,o]),v)h=a,f=o,d=s,v=!1,s&&(b.lineStart(),b.point(a,o));else if(s&&g)b.point(a,o);else{var c=[p=Math.max(-1e9,Math.min(1e9,p)),y=Math.max(-1e9,Math.min(1e9,y))],x=[a=Math.max(-1e9,Math.min(1e9,a)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,n,r,i,a){var o,s=t[0],c=t[1],u=0,l=1,h=e[0]-s,f=e[1]-c;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<u)return;o<l&&(l=o)}else if(h>0){if(o>l)return;o>u&&(u=o)}if(o=i-s,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>u&&(u=o)}else if(h>0){if(o<u)return;o<l&&(l=o)}if(o=r-c,f||!(o>0)){if(o/=f,f<0){if(o<u)return;o<l&&(l=o)}else if(f>0){if(o>l)return;o>u&&(u=o)}if(o=a-c,f||!(o<0)){if(o/=f,f<0){if(o>l)return;o>u&&(u=o)}else if(f>0){if(o<u)return;o<l&&(l=o)}return u>0&&(t[0]=s+u*h,t[1]=c+u*f),l<1&&(e[0]=s+l*h,e[1]=c+l*f),!0}}}}}(c,x,t,e,n,r)?s&&(b.lineStart(),b.point(a,o),m=!1):(g||(b.lineStart(),b.point(c[0],c[1])),b.point(x[0],x[1]),s||b.lineEnd(),m=!1)}p=a,y=o,g=s}return _}}var Sl,Al,Ml,Ol=function(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=Cl(r,i,a,o)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],a=+s[1][0],o=+s[1][1],t=e=null,n):[[r,i],[a,o]]}}},Bl=sc(),Nl={sphere:Nc,point:Nc,lineStart:function(){Nl.point=Ll,Nl.lineEnd=Dl},lineEnd:Nc,polygonStart:Nc,polygonEnd:Nc};function Dl(){Nl.point=Nl.lineEnd=Nc}function Ll(t,e){Sl=t*=gc,Al=Tc(e*=gc),Ml=xc(e),Nl.point=Il}function Il(t,e){t*=gc;var n=Tc(e*=gc),r=xc(e),i=vc(t-Sl),a=xc(i),o=r*Tc(i),s=Ml*n-Al*r*a,c=Al*n+Ml*r*a;Bl.add(bc(Sc(o*o+s*s),c)),Sl=t,Al=n,Ml=r}var Rl=function(t){return Bl.reset(),$c(t,Nl),+Bl},Fl=[null,null],Pl={type:"LineString",coordinates:Fl},jl=function(t,e){return Fl[0]=t,Fl[1]=e,Rl(Pl)},Yl={Feature:function(t,e){return Ul(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Ul(n[r].geometry,e))return!0;return!1}},zl={Sphere:function(){return!0},Point:function(t,e){return $l(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if($l(n[r],e))return!0;return!1},LineString:function(t,e){return ql(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(ql(n[r],e))return!0;return!1},Polygon:function(t,e){return Wl(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Wl(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Ul(n[r],e))return!0;return!1}};function Ul(t,e){return!(!t||!zl.hasOwnProperty(t.type))&&zl[t.type](t,e)}function $l(t,e){return 0===jl(t,e)}function ql(t,e){for(var n,r,i,a=0,o=t.length;a<o;a++){if(0===(r=jl(t[a],e)))return!0;if(a>0&&(i=jl(t[a],t[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<1e-12*i)return!0;n=r}return!1}function Wl(t,e){return!!xl(t.map(Vl),Hl(e))}function Vl(t){return(t=t.map(Hl)).pop(),t}function Hl(t){return[t[0]*gc,t[1]*gc]}var Gl=function(t,e){return(t&&Yl.hasOwnProperty(t.type)?Yl[t.type]:Ul)(t,e)};function Xl(t,e,n){var r=k(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function Zl(t,e,n){var r=k(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function Ql(){var t,e,n,r,i,a,o,s,c,u,l,h,f=10,d=f,p=90,y=360,g=2.5;function v(){return{type:"MultiLineString",coordinates:m()}}function m(){return k(_c(r/p)*p,n,p).map(l).concat(k(_c(s/y)*y,o,y).map(h)).concat(k(_c(e/f)*f,t,f).filter((function(t){return vc(t%p)>1e-6})).map(c)).concat(k(_c(a/d)*d,i,d).filter((function(t){return vc(t%y)>1e-6})).map(u))}return v.lines=function(){return m().map((function(t){return{type:"LineString",coordinates:t}}))},v.outline=function(){return{type:"Polygon",coordinates:[l(r).concat(h(o).slice(1),l(n).reverse().slice(1),h(s).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),s>o&&(t=s,s=o,o=t),v.precision(g)):[[r,s],[n,o]]},v.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),v.precision(g)):[[e,a],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(p=+t[0],y=+t[1],v):[p,y]},v.stepMinor=function(t){return arguments.length?(f=+t[0],d=+t[1],v):[f,d]},v.precision=function(f){return arguments.length?(g=+f,c=Xl(a,i,90),u=Zl(e,t,g),l=Xl(s,o,90),h=Zl(r,n,g),v):g},v.extentMajor([[-180,1e-6-90],[180,90-1e-6]]).extentMinor([[-180,-80-1e-6],[180,80+1e-6]])}function Kl(){return Ql()()}var Jl,th,eh,nh,rh=function(t,e){var n=t[0]*gc,r=t[1]*gc,i=e[0]*gc,a=e[1]*gc,o=xc(r),s=Tc(r),c=xc(a),u=Tc(a),l=o*xc(n),h=o*Tc(n),f=c*xc(i),d=c*Tc(i),p=2*Oc(Sc(Bc(a-r)+o*c*Bc(i-n))),y=Tc(p),g=p?function(t){var e=Tc(t*=p)/y,n=Tc(p-t)/y,r=n*l+e*f,i=n*h+e*d,a=n*s+e*u;return[bc(i,r)*yc,bc(a,Sc(r*r+i*i))*yc]}:function(){return[n*yc,r*yc]};return g.distance=p,g},ih=function(t){return t},ah=sc(),oh=sc(),sh={point:Nc,lineStart:Nc,lineEnd:Nc,polygonStart:function(){sh.lineStart=ch,sh.lineEnd=hh},polygonEnd:function(){sh.lineStart=sh.lineEnd=sh.point=Nc,ah.add(vc(oh)),oh.reset()},result:function(){var t=ah/2;return ah.reset(),t}};function ch(){sh.point=uh}function uh(t,e){sh.point=lh,Jl=eh=t,th=nh=e}function lh(t,e){oh.add(nh*t-eh*e),eh=t,nh=e}function hh(){lh(Jl,th)}var fh=sh,dh=1/0,ph=dh,yh=-dh,gh=yh;var vh,mh,bh,xh,_h={point:function(t,e){t<dh&&(dh=t);t>yh&&(yh=t);e<ph&&(ph=e);e>gh&&(gh=e)},lineStart:Nc,lineEnd:Nc,polygonStart:Nc,polygonEnd:Nc,result:function(){var t=[[dh,ph],[yh,gh]];return yh=gh=-(ph=dh=1/0),t}},kh=0,wh=0,Eh=0,Th=0,Ch=0,Sh=0,Ah=0,Mh=0,Oh=0,Bh={point:Nh,lineStart:Dh,lineEnd:Rh,polygonStart:function(){Bh.lineStart=Fh,Bh.lineEnd=Ph},polygonEnd:function(){Bh.point=Nh,Bh.lineStart=Dh,Bh.lineEnd=Rh},result:function(){var t=Oh?[Ah/Oh,Mh/Oh]:Sh?[Th/Sh,Ch/Sh]:Eh?[kh/Eh,wh/Eh]:[NaN,NaN];return kh=wh=Eh=Th=Ch=Sh=Ah=Mh=Oh=0,t}};function Nh(t,e){kh+=t,wh+=e,++Eh}function Dh(){Bh.point=Lh}function Lh(t,e){Bh.point=Ih,Nh(bh=t,xh=e)}function Ih(t,e){var n=t-bh,r=e-xh,i=Sc(n*n+r*r);Th+=i*(bh+t)/2,Ch+=i*(xh+e)/2,Sh+=i,Nh(bh=t,xh=e)}function Rh(){Bh.point=Nh}function Fh(){Bh.point=jh}function Ph(){Yh(vh,mh)}function jh(t,e){Bh.point=Yh,Nh(vh=bh=t,mh=xh=e)}function Yh(t,e){var n=t-bh,r=e-xh,i=Sc(n*n+r*r);Th+=i*(bh+t)/2,Ch+=i*(xh+e)/2,Sh+=i,Ah+=(i=xh*t-bh*e)*(bh+t),Mh+=i*(xh+e),Oh+=3*i,Nh(bh=t,xh=e)}var zh=Bh;function Uh(t){this._context=t}Uh.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,pc)}},result:Nc};var $h,qh,Wh,Vh,Hh,Gh=sc(),Xh={point:Nc,lineStart:function(){Xh.point=Zh},lineEnd:function(){$h&&Qh(qh,Wh),Xh.point=Nc},polygonStart:function(){$h=!0},polygonEnd:function(){$h=null},result:function(){var t=+Gh;return Gh.reset(),t}};function Zh(t,e){Xh.point=Qh,qh=Vh=t,Wh=Hh=e}function Qh(t,e){Vh-=t,Hh-=e,Gh.add(Sc(Vh*Vh+Hh*Hh)),Vh=t,Hh=e}var Kh=Xh;function Jh(){this._string=[]}function tf(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Jh.prototype={_radius:4.5,_circle:tf(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=tf(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var ef=function(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),$c(t,n(r))),r.result()}return a.area=function(t){return $c(t,n(fh)),fh.result()},a.measure=function(t){return $c(t,n(Kh)),Kh.result()},a.bounds=function(t){return $c(t,n(_h)),_h.result()},a.centroid=function(t){return $c(t,n(zh)),zh.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,ih):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new Jh):new Uh(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.projection(t).context(e)},nf=function(t){return{stream:rf(t)}};function rf(t){return function(e){var n=new af;for(var r in t)n[r]=t[r];return n.stream=e,n}}function af(){}function of(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),$c(n,t.stream(_h)),e(_h.result()),null!=r&&t.clipExtent(r),t}function sf(t,e,n){return of(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s])}),n)}function cf(t,e,n){return sf(t,[[0,0],e],n)}function uf(t,e,n){return of(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])}),n)}function lf(t,e,n){return of(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])}),n)}af.prototype={constructor:af,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var hf=xc(30*gc),ff=function(t,e){return+e?function(t,e){function n(r,i,a,o,s,c,u,l,h,f,d,p,y,g){var v=u-r,m=l-i,b=v*v+m*m;if(b>4*e&&y--){var x=o+f,_=s+d,k=c+p,w=Sc(x*x+_*_+k*k),E=Oc(k/=w),T=vc(vc(k)-1)<1e-6||vc(a-h)<1e-6?(a+h)/2:bc(_,x),C=t(T,E),S=C[0],A=C[1],M=S-r,O=A-i,B=m*M-v*O;(B*B/b>e||vc((v*M+m*O)/b-.5)>.3||o*f+s*d+c*p<hf)&&(n(r,i,a,o,s,c,S,A,T,x/=w,_/=w,k,y,g),g.point(S,A),n(S,A,T,x,_,k,u,l,h,f,d,p,y,g))}}return function(e){var r,i,a,o,s,c,u,l,h,f,d,p,y={point:g,lineStart:v,lineEnd:b,polygonStart:function(){e.polygonStart(),y.lineStart=x},polygonEnd:function(){e.polygonEnd(),y.lineStart=v}};function g(n,r){n=t(n,r),e.point(n[0],n[1])}function v(){l=NaN,y.point=m,e.lineStart()}function m(r,i){var a=Jc([r,i]),o=t(r,i);n(l,h,u,f,d,p,l=o[0],h=o[1],u=r,f=a[0],d=a[1],p=a[2],16,e),e.point(l,h)}function b(){y.point=g,e.lineEnd()}function x(){v(),y.point=_,y.lineEnd=k}function _(t,e){m(r=t,e),i=l,a=h,o=f,s=d,c=p,y.point=m}function k(){n(l,h,u,f,d,p,i,a,r,o,s,c,16,e),y.lineEnd=b,b()}return y}}(t,e):function(t){return rf({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)};var df=rf({point:function(t,e){this.stream.point(t*gc,e*gc)}});function pf(t,e,n){function r(r,i){return[e+t*r,n-t*i]}return r.invert=function(r,i){return[(r-e)/t,(n-i)/t]},r}function yf(t,e,n,r){var i=xc(r),a=Tc(r),o=i*t,s=a*t,c=i/t,u=a/t,l=(a*n-i*e)/t,h=(a*e+i*n)/t;function f(t,r){return[o*t-s*r+e,n-s*t-o*r]}return f.invert=function(t,e){return[c*t-u*e+l,h-u*t-c*e]},f}function gf(t){return vf((function(){return t}))()}function vf(t){var e,n,r,i,a,o,s,c,u,l,h=150,f=480,d=250,p=0,y=0,g=0,v=0,m=0,b=0,x=null,_=El,k=null,w=ih,E=.5;function T(t){return c(t[0]*gc,t[1]*gc)}function C(t){return(t=c.invert(t[0],t[1]))&&[t[0]*yc,t[1]*yc]}function S(){var t=yf(h,0,0,b).apply(null,e(p,y)),r=(b?yf:pf)(h,f-t[0],d-t[1],b);return n=al(g,v,m),s=rl(e,r),c=rl(n,s),o=ff(s,E),A()}function A(){return u=l=null,T}return T.stream=function(t){return u&&l===t?u:u=df(function(t){return rf({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(_(o(w(l=t)))))},T.preclip=function(t){return arguments.length?(_=t,x=void 0,A()):_},T.postclip=function(t){return arguments.length?(w=t,k=r=i=a=null,A()):w},T.clipAngle=function(t){return arguments.length?(_=+t?Tl(x=t*gc):(x=null,El),A()):x*yc},T.clipExtent=function(t){return arguments.length?(w=null==t?(k=r=i=a=null,ih):Cl(k=+t[0][0],r=+t[0][1],i=+t[1][0],a=+t[1][1]),A()):null==k?null:[[k,r],[i,a]]},T.scale=function(t){return arguments.length?(h=+t,S()):h},T.translate=function(t){return arguments.length?(f=+t[0],d=+t[1],S()):[f,d]},T.center=function(t){return arguments.length?(p=t[0]%360*gc,y=t[1]%360*gc,S()):[p*yc,y*yc]},T.rotate=function(t){return arguments.length?(g=t[0]%360*gc,v=t[1]%360*gc,m=t.length>2?t[2]%360*gc:0,S()):[g*yc,v*yc,m*yc]},T.angle=function(t){return arguments.length?(b=t%360*gc,S()):b*yc},T.precision=function(t){return arguments.length?(o=ff(s,E=t*t),A()):Sc(E)},T.fitExtent=function(t,e){return sf(T,t,e)},T.fitSize=function(t,e){return cf(T,t,e)},T.fitWidth=function(t,e){return uf(T,t,e)},T.fitHeight=function(t,e){return lf(T,t,e)},function(){return e=t.apply(this,arguments),T.invert=e.invert&&C,S()}}function mf(t){var e=0,n=hc/3,r=vf(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*gc,n=t[1]*gc):[e*yc,n*yc]},i}function bf(t,e){var n=Tc(t),r=(n+Tc(e))/2;if(vc(r)<1e-6)return function(t){var e=xc(t);function n(t,n){return[t*e,Tc(n)/e]}return n.invert=function(t,n){return[t/e,Oc(n*e)]},n}(t);var i=1+n*(2*r-n),a=Sc(i)/r;function o(t,e){var n=Sc(i-2*r*Tc(e))/r;return[n*Tc(t*=r),a-n*xc(t)]}return o.invert=function(t,e){var n=a-e;return[bc(t,vc(n))/r*Cc(n),Oc((i-(t*t+n*n)*r*r)/(2*r))]},o}var xf=function(){return mf(bf).scale(155.424).center([0,33.6442])},_f=function(){return xf().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};var kf=function(){var t,e,n,r,i,a,o=_f(),s=xf().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=xf().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){a=[t,e]}};function l(t){var e=t[0],o=t[1];return a=null,n.point(e,o),a||(r.point(e,o),a)||(i.point(e,o),a)}function h(){return t=e=null,l}return l.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(t)},l.stream=function(n){return t&&e===n?t:(r=[o.stream(e=n),s.stream(n),c.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},l.precision=function(t){return arguments.length?(o.precision(t),s.precision(t),c.precision(t),h()):o.precision()},l.scale=function(t){return arguments.length?(o.scale(t),s.scale(.35*t),c.scale(t),l.translate(o.translate())):o.scale()},l.translate=function(t){if(!arguments.length)return o.translate();var e=o.scale(),a=+t[0],l=+t[1];return n=o.translate(t).clipExtent([[a-.455*e,l-.238*e],[a+.455*e,l+.238*e]]).stream(u),r=s.translate([a-.307*e,l+.201*e]).clipExtent([[a-.425*e+1e-6,l+.12*e+1e-6],[a-.214*e-1e-6,l+.234*e-1e-6]]).stream(u),i=c.translate([a-.205*e,l+.212*e]).clipExtent([[a-.214*e+1e-6,l+.166*e+1e-6],[a-.115*e-1e-6,l+.234*e-1e-6]]).stream(u),h()},l.fitExtent=function(t,e){return sf(l,t,e)},l.fitSize=function(t,e){return cf(l,t,e)},l.fitWidth=function(t,e){return uf(l,t,e)},l.fitHeight=function(t,e){return lf(l,t,e)},l.scale(1070)};function wf(t){return function(e,n){var r=xc(e),i=xc(n),a=t(r*i);return[a*i*Tc(e),a*Tc(n)]}}function Ef(t){return function(e,n){var r=Sc(e*e+n*n),i=t(r),a=Tc(i),o=xc(i);return[bc(e*a,r*o),Oc(r&&n*a/r)]}}var Tf=wf((function(t){return Sc(2/(1+t))}));Tf.invert=Ef((function(t){return 2*Oc(t/2)}));var Cf=function(){return gf(Tf).scale(124.75).clipAngle(179.999)},Sf=wf((function(t){return(t=Mc(t))&&t/Tc(t)}));Sf.invert=Ef((function(t){return t}));var Af=function(){return gf(Sf).scale(79.4188).clipAngle(179.999)};function Mf(t,e){return[t,wc(Ac((fc+e)/2))]}Mf.invert=function(t,e){return[t,2*mc(kc(e))-fc]};var Of=function(){return Bf(Mf).scale(961/pc)};function Bf(t){var e,n,r,i=gf(t),a=i.center,o=i.scale,s=i.translate,c=i.clipExtent,u=null;function l(){var a=hc*o(),s=i(ul(i.rotate()).invert([0,0]));return c(null==u?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:t===Mf?[[Math.max(s[0]-a,u),e],[Math.min(s[0]+a,n),r]]:[[u,Math.max(s[1]-a,e)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(t){return arguments.length?(o(t),l()):o()},i.translate=function(t){return arguments.length?(s(t),l()):s()},i.center=function(t){return arguments.length?(a(t),l()):a()},i.clipExtent=function(t){return arguments.length?(null==t?u=e=n=r=null:(u=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),l()):null==u?null:[[u,e],[n,r]]},l()}function Nf(t){return Ac((fc+t)/2)}function Df(t,e){var n=xc(t),r=t===e?Tc(t):wc(n/xc(e))/wc(Nf(e)/Nf(t)),i=n*Ec(Nf(t),r)/r;if(!r)return Mf;function a(t,e){i>0?e<1e-6-fc&&(e=1e-6-fc):e>fc-1e-6&&(e=fc-1e-6);var n=i/Ec(Nf(e),r);return[n*Tc(r*t),i-n*xc(r*t)]}return a.invert=function(t,e){var n=i-e,a=Cc(r)*Sc(t*t+n*n);return[bc(t,vc(n))/r*Cc(n),2*mc(Ec(i/a,1/r))-fc]},a}var Lf=function(){return mf(Df).scale(109.5).parallels([30,30])};function If(t,e){return[t,e]}If.invert=If;var Rf=function(){return gf(If).scale(152.63)};function Ff(t,e){var n=xc(t),r=t===e?Tc(t):(n-xc(e))/(e-t),i=n/r+t;if(vc(r)<1e-6)return If;function a(t,e){var n=i-e,a=r*t;return[n*Tc(a),i-n*xc(a)]}return a.invert=function(t,e){var n=i-e;return[bc(t,vc(n))/r*Cc(n),i-Cc(r)*Sc(t*t+n*n)]},a}var Pf=function(){return mf(Ff).scale(131.154).center([0,13.9389])},jf=1.340264,Yf=-.081106,zf=893e-6,Uf=.003796,$f=Sc(3)/2;function qf(t,e){var n=Oc($f*Tc(e)),r=n*n,i=r*r*r;return[t*xc(n)/($f*(jf+3*Yf*r+i*(7*zf+9*Uf*r))),n*(jf+Yf*r+i*(zf+Uf*r))]}qf.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(jf+Yf*i+a*(zf+Uf*i))-e)/(jf+3*Yf*i+a*(7*zf+9*Uf*i)))*r)*i*i,!(vc(n)<1e-12));++o);return[$f*t*(jf+3*Yf*i+a*(7*zf+9*Uf*i))/xc(r),Oc(Tc(r)/$f)]};var Wf=function(){return gf(qf).scale(177.158)};function Vf(t,e){var n=xc(e),r=xc(t)*n;return[n*Tc(t)/r,Tc(e)/r]}Vf.invert=Ef(mc);var Hf=function(){return gf(Vf).scale(144.049).clipAngle(60)};function Gf(t,e,n,r){return 1===t&&1===e&&0===n&&0===r?ih:rf({point:function(i,a){this.stream.point(i*t+n,a*e+r)}})}var Xf=function(){var t,e,n,r,i,a,o=1,s=0,c=0,u=1,l=1,h=ih,f=null,d=ih;function p(){return r=i=null,a}return a={stream:function(t){return r&&i===t?r:r=h(d(i=t))},postclip:function(r){return arguments.length?(d=r,f=t=e=n=null,p()):d},clipExtent:function(r){return arguments.length?(d=null==r?(f=t=e=n=null,ih):Cl(f=+r[0][0],t=+r[0][1],e=+r[1][0],n=+r[1][1]),p()):null==f?null:[[f,t],[e,n]]},scale:function(t){return arguments.length?(h=Gf((o=+t)*u,o*l,s,c),p()):o},translate:function(t){return arguments.length?(h=Gf(o*u,o*l,s=+t[0],c=+t[1]),p()):[s,c]},reflectX:function(t){return arguments.length?(h=Gf(o*(u=t?-1:1),o*l,s,c),p()):u<0},reflectY:function(t){return arguments.length?(h=Gf(o*u,o*(l=t?-1:1),s,c),p()):l<0},fitExtent:function(t,e){return sf(a,t,e)},fitSize:function(t,e){return cf(a,t,e)},fitWidth:function(t,e){return uf(a,t,e)},fitHeight:function(t,e){return lf(a,t,e)}}};function Zf(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}Zf.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(vc(n)>1e-6&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]};var Qf=function(){return gf(Zf).scale(175.295)};function Kf(t,e){return[xc(e)*Tc(t),Tc(e)]}Kf.invert=Ef(Oc);var Jf=function(){return gf(Kf).scale(249.5).clipAngle(90+1e-6)};function td(t,e){var n=xc(e),r=1+xc(t)*n;return[n*Tc(t)/r,Tc(e)/r]}td.invert=Ef((function(t){return 2*mc(t)}));var ed=function(){return gf(td).scale(250).clipAngle(142)};function nd(t,e){return[wc(Ac((fc+e)/2)),-t]}nd.invert=function(t,e){return[-e,2*mc(kc(t))-fc]};var rd=function(){var t=Bf(nd),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)};function id(t,e){return t.parent===e.parent?1:2}function ad(t,e){return t+e.x}function od(t,e){return Math.max(t,e.y)}var sd=function(){var t=id,e=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(ad,0)/t.length}(n),e.y=function(t){return 1+t.reduce(od,0)}(n)):(e.x=a?o+=t(e,a):0,e.y=0,a=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=s.x-t(s,c)/2,l=c.x+t(c,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(l-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i};function cd(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function ud(t,e){var n,r,i,a,o,s=new dd(t),c=+t.value&&(s.value=t.value),u=[s];for(null==e&&(e=ld);n=u.pop();)if(c&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)u.push(r=n.children[a]=new dd(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(fd)}function ld(t){return t.children}function hd(t){t.data=t.data.data}function fd(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function dd(t){this.data=t,this.depth=this.height=0,this.parent=null}dd.prototype=ud.prototype={constructor:dd,count:function(){return this.eachAfter(cd)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return ud(this).eachBefore(hd)}};var pd=Array.prototype.slice;var yd=function(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(pd.call(t))).length,a=[];r<i;)e=t[r],n&&md(n,e)?++r:(n=xd(a=gd(a,e)),r=0);return n};function gd(t,e){var n,r;if(bd(e,t))return[e];for(n=0;n<t.length;++n)if(vd(e,t[n])&&bd(_d(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(vd(_d(t[n],t[r]),e)&&vd(_d(t[n],e),t[r])&&vd(_d(t[r],e),t[n])&&bd(kd(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function vd(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function md(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function bd(t,e){for(var n=0;n<e.length;++n)if(!md(t,e[n]))return!1;return!0}function xd(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return _d(t[0],t[1]);case 3:return kd(t[0],t[1],t[2])}var e}function _d(t,e){var n=t.x,r=t.y,i=t.r,a=e.x,o=e.y,s=e.r,c=a-n,u=o-r,l=s-i,h=Math.sqrt(c*c+u*u);return{x:(n+a+c/h*l)/2,y:(r+o+u/h*l)/2,r:(h+i+s)/2}}function kd(t,e,n){var r=t.x,i=t.y,a=t.r,o=e.x,s=e.y,c=e.r,u=n.x,l=n.y,h=n.r,f=r-o,d=r-u,p=i-s,y=i-l,g=c-a,v=h-a,m=r*r+i*i-a*a,b=m-o*o-s*s+c*c,x=m-u*u-l*l+h*h,_=d*p-f*y,k=(p*x-y*b)/(2*_)-r,w=(y*g-p*v)/_,E=(d*b-f*x)/(2*_)-i,T=(f*v-d*g)/_,C=w*w+T*T-1,S=2*(a+k*w+E*T),A=k*k+E*E-a*a,M=-(C?(S+Math.sqrt(S*S-4*C*A))/(2*C):A/S);return{x:r+k+w*M,y:i+E+T*M,r:M}}function wd(t,e,n){var r,i,a,o,s=t.x-e.x,c=t.y-e.y,u=s*s+c*c;u?(i=e.r+n.r,i*=i,o=t.r+n.r,i>(o*=o)?(r=(u+o-i)/(2*u),a=Math.sqrt(Math.max(0,o/u-r*r)),n.x=t.x-r*s-a*c,n.y=t.y-r*c+a*s):(r=(u+i-o)/(2*u),a=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*s-a*c,n.y=e.y+r*c+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Ed(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Td(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function Cd(t){this._=t,this.next=null,this.previous=null}function Sd(t){if(!(i=t.length))return 0;var e,n,r,i,a,o,s,c,u,l,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;wd(n,e,r=t[2]),e=new Cd(e),n=new Cd(n),r=new Cd(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){wd(e._,n._,r=t[s]),r=new Cd(r),c=n.next,u=e.previous,l=n._.r,h=e._.r;do{if(l<=h){if(Ed(c._,r._)){n=c,e.next=n,n.previous=e,--s;continue t}l+=c._.r,c=c.next}else{if(Ed(u._,r._)){(e=u).next=n,n.previous=e,--s;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,a=Td(e);(r=r.next)!==n;)(o=Td(r))<a&&(e=r,a=o);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=yd(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}var Ad=function(t){return Sd(t),t};function Md(t){return null==t?null:Od(t)}function Od(t){if("function"!=typeof t)throw new Error;return t}function Bd(){return 0}var Nd=function(t){return function(){return t}};function Dd(t){return Math.sqrt(t.value)}var Ld=function(){var t=null,e=1,n=1,r=Bd;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(Id(t)).eachAfter(Rd(r,.5)).eachBefore(Fd(1)):i.eachBefore(Id(Dd)).eachAfter(Rd(Bd,1)).eachAfter(Rd(r,i.r/Math.min(e,n))).eachBefore(Fd(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=Md(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:Nd(+t),i):r},i};function Id(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Rd(t,e){return function(n){if(r=n.children){var r,i,a,o=r.length,s=t(n)*e||0;if(s)for(i=0;i<o;++i)r[i].r+=s;if(a=Sd(r),s)for(i=0;i<o;++i)r[i].r-=s;n.r=a+s}}}function Fd(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}var Pd=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)},jd=function(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,u=t.value&&(r-e)/t.value;++s<c;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*u},Yd=function(){var t=1,e=1,n=0,r=!1;function i(i){var a=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(r){r.children&&jd(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=s}}(e,a)),r&&i.eachBefore(Pd),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i},zd={depth:-1},Ud={};function $d(t){return t.id}function qd(t){return t.parentId}var Wd=function(){var t=$d,e=qd;function n(n){var r,i,a,o,s,c,u,l=n.length,h=new Array(l),f={};for(i=0;i<l;++i)r=n[i],s=h[i]=new dd(r),null!=(c=t(r,i,n))&&(c+="")&&(f[u="$"+(s.id=c)]=u in f?Ud:s);for(i=0;i<l;++i)if(s=h[i],null!=(c=e(n[i],i,n))&&(c+="")){if(!(o=f["$"+c]))throw new Error("missing: "+c);if(o===Ud)throw new Error("ambiguous: "+c);o.children?o.children.push(s):o.children=[s],s.parent=o}else{if(a)throw new Error("multiple roots");a=s}if(!a)throw new Error("no root");if(a.parent=zd,a.eachBefore((function(t){t.depth=t.parent.depth+1,--l})).eachBefore(fd),a.parent=null,l>0)throw new Error("cycle");return a}return n.id=function(e){return arguments.length?(t=Od(e),n):t},n.parentId=function(t){return arguments.length?(e=Od(t),n):e},n};function Vd(t,e){return t.parent===e.parent?1:2}function Hd(t){var e=t.children;return e?e[0]:t.t}function Gd(t){var e=t.children;return e?e[e.length-1]:t.t}function Xd(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Zd(t,e,n){return t.a.parent===e.parent?t.a:n}function Qd(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}Qd.prototype=Object.create(dd.prototype);var Kd=function(){var t=Vd,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,a,o=new Qd(t,0),s=[o];e=s.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=e.children[i]=new Qd(r[i],i)),n.parent=e;return(o.parent=new Qd(null,0)).children=[o],o}(i);if(c.eachAfter(a),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(s);else{var u=i,l=i,h=i;i.eachBefore((function(t){t.x<u.x&&(u=t),t.x>l.x&&(l=t),t.depth>h.depth&&(h=t)}));var f=u===l?1:t(u,l)/2,d=f-u.x,p=e/(l.x+f+d),y=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*y}))}return i}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,a=e,o=e,s=n,c=a.parent.children[0],u=a.m,l=o.m,h=s.m,f=c.m;s=Gd(s),a=Hd(a),s&&a;)c=Hd(c),(o=Gd(o)).a=e,(i=s.z+h-a.z-u+t(s._,a._))>0&&(Xd(Zd(s,e,r),e,i),u+=i,l+=i),h+=s.m,u+=a.m,f+=c.m,l+=o.m;s&&!Gd(o)&&(o.t=s,o.m+=h-l),a&&!Hd(c)&&(c.t=a,c.m+=u-f,r=e)}return r}(e,i,e.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},Jd=function(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,u=t.value&&(i-n)/t.value;++s<c;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*u},tp=(1+Math.sqrt(5))/2;function ep(t,e,n,r,i,a){for(var o,s,c,u,l,h,f,d,p,y,g,v=[],m=e.children,b=0,x=0,_=m.length,k=e.value;b<_;){c=i-n,u=a-r;do{l=m[x++].value}while(!l&&x<_);for(h=f=l,g=l*l*(y=Math.max(u/c,c/u)/(k*t)),p=Math.max(f/g,g/h);x<_;++x){if(l+=s=m[x].value,s<h&&(h=s),s>f&&(f=s),g=l*l*y,(d=Math.max(f/g,g/h))>p){l-=s;break}p=d}v.push(o={value:l,dice:c<u,children:m.slice(b,x)}),o.dice?jd(o,n,r,i,k?r+=u*l/k:a):Jd(o,n,r,k?n+=c*l/k:i,a),k-=l,b=x}return v}var np=function t(e){function n(t,n,r,i,a){ep(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(tp),rp=function(){var t=np,e=!1,n=1,r=1,i=[0],a=Bd,o=Bd,s=Bd,c=Bd,u=Bd;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Pd),t}function h(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<l&&(l=f=(l+f)/2),e.x0=r,e.y0=l,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=a(e)/2,r+=u(e)-n,l+=o(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=c(e)-n)<l&&(l=f=(l+f)/2),t(e,r,l,h,f))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=Od(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:Nd(+t),l):a},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:Nd(+t),l):o},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Nd(+t),l):s},l.paddingBottom=function(t){return arguments.length?(c="function"==typeof t?t:Nd(+t),l):c},l.paddingLeft=function(t){return arguments.length?(u="function"==typeof t?t:Nd(+t),l):u},l},ip=function(t,e,n,r,i){var a,o,s=t.children,c=s.length,u=new Array(c+1);for(u[0]=o=a=0;a<c;++a)u[a+1]=o+=s[a].value;!function t(e,n,r,i,a,o,c){if(e>=n-1){var l=s[e];return l.x0=i,l.y0=a,l.x1=o,void(l.y1=c)}var h=u[e],f=r/2+h,d=e+1,p=n-1;for(;d<p;){var y=d+p>>>1;u[y]<f?d=y+1:p=y}f-u[d-1]<u[d]-f&&e+1<d&&--d;var g=u[d]-h,v=r-g;if(o-i>c-a){var m=(i*v+o*g)/r;t(e,d,g,i,a,m,c),t(d,n,v,m,a,o,c)}else{var b=(a*v+c*g)/r;t(e,d,g,i,a,o,b),t(d,n,v,i,b,o,c)}}(0,c,t.value,e,n,r,i)},ap=function(t,e,n,r,i){(1&t.depth?Jd:jd)(t,e,n,r,i)},op=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,c,u,l,h=-1,f=o.length,d=t.value;++h<f;){for(c=(s=o[h]).children,u=s.value=0,l=c.length;u<l;++u)s.value+=c[u].value;s.dice?jd(s,n,r,i,r+=(a-r)*s.value/d):Jd(s,n,r,n+=(i-n)*s.value/d,a),d-=s.value}else t._squarify=o=ep(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(tp),sp=function(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}},cp=function(t,e){var n=un(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}},up=function(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}},lp=Math.SQRT2;function hp(t){return((t=Math.exp(t))+1/t)/2}var fp=function(t,e){var n,r,i=t[0],a=t[1],o=t[2],s=e[0],c=e[1],u=e[2],l=s-i,h=c-a,f=l*l+h*h;if(f<1e-12)r=Math.log(u/o)/lp,n=function(t){return[i+t*l,a+t*h,o*Math.exp(lp*t*r)]};else{var d=Math.sqrt(f),p=(u*u-o*o+4*f)/(2*o*2*d),y=(u*u-o*o-4*f)/(2*u*2*d),g=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(y*y+1)-y);r=(v-g)/lp,n=function(t){var e,n=t*r,s=hp(g),c=o/(2*d)*(s*(e=lp*n+g,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(g));return[i+c*l,a+c*h,o*s/hp(lp*n+g)]}}return n.duration=1e3*r,n};function dp(t){return function(e,n){var r=t((e=tn(e)).h,(n=tn(n)).h),i=hn(e.s,n.s),a=hn(e.l,n.l),o=hn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+""}}}var pp=dp(un),yp=dp(hn);function gp(t,e){var n=hn((t=pa(t)).l,(e=pa(e)).l),r=hn(t.a,e.a),i=hn(t.b,e.b),a=hn(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+""}}function vp(t){return function(e,n){var r=t((e=ka(e)).h,(n=ka(n)).h),i=hn(e.c,n.c),a=hn(e.l,n.l),o=hn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}var mp=vp(un),bp=vp(hn);function xp(t){return function e(n){function r(e,r){var i=t((e=Oa(e)).h,(r=Oa(r)).h),a=hn(e.s,r.s),o=hn(e.l,r.l),s=hn(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}var _p=xp(un),kp=xp(hn);function wp(t,e){for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n<r;)a[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return a[e](t-e)}}var Ep=function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n},Tp=function(t){for(var e,n=-1,r=t.length,i=t[r-1],a=0;++n<r;)e=i,i=t[n],a+=e[1]*i[0]-e[0]*i[1];return a/2},Cp=function(t){for(var e,n,r=-1,i=t.length,a=0,o=0,s=t[i-1],c=0;++r<i;)e=s,s=t[r],c+=n=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*n,o+=(e[1]+s[1])*n;return[a/(c*=3),o/c]};function Sp(t,e){return t[0]-e[0]||t[1]-e[1]}function Ap(t){for(var e,n,r,i=t.length,a=[0,1],o=2,s=2;s<i;++s){for(;o>1&&(e=t[a[o-2]],n=t[a[o-1]],r=t[s],(n[0]-e[0])*(r[1]-e[1])-(n[1]-e[1])*(r[0]-e[0])<=0);)--o;a[o++]=s}return a.slice(0,o)}var Mp=function(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(Sp),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var a=Ap(r),o=Ap(i),s=o[0]===a[0],c=o[o.length-1]===a[a.length-1],u=[];for(e=a.length-1;e>=0;--e)u.push(t[r[a[e]][2]]);for(e=+s;e<o.length-c;++e)u.push(t[r[o[e]][2]]);return u},Op=function(t,e){for(var n,r,i=t.length,a=t[i-1],o=e[0],s=e[1],c=a[0],u=a[1],l=!1,h=0;h<i;++h)n=(a=t[h])[0],(r=a[1])>s!=u>s&&o<(c-n)*(s-r)/(u-r)+n&&(l=!l),c=n,u=r;return l},Bp=function(t){for(var e,n,r=-1,i=t.length,a=t[i-1],o=a[0],s=a[1],c=0;++r<i;)e=o,n=s,e-=o=(a=t[r])[0],n-=s=a[1],c+=Math.sqrt(e*e+n*n);return c},Np=function(){return Math.random()},Dp=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(Np),Lp=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(Np),Ip=function t(e){function n(){var t=Lp.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(Np),Rp=function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(Np),Fp=function t(e){function n(t){var n=Rp.source(e)(t);return function(){return n()/t}}return n.source=t,n}(Np),Pp=function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(Np);function jp(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Yp(t,e){switch(arguments.length){case 0:break;case 1:this.interpolator(t);break;default:this.interpolator(e).domain(t)}return this}var zp=Array.prototype,Up=zp.map,$p=zp.slice,qp={name:"implicit"};function Wp(){var t=Qi(),e=[],n=[],r=qp;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==qp)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Qi();for(var r,a,o=-1,s=n.length;++o<s;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=$p.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Wp(e,n).unknown(r)},jp.apply(i,arguments),i}function Vp(){var t,e,n=Wp().unknown(void 0),r=n.domain,i=n.range,a=[0,1],o=!1,s=0,c=0,u=.5;function l(){var n=r().length,l=a[1]<a[0],h=a[l-0],f=a[1-l];t=(f-h)/Math.max(1,n-s+2*c),o&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*u,e=t*(1-s),o&&(h=Math.round(h),e=Math.round(e));var d=k(n).map((function(e){return h+t*e}));return i(l?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),l()):r()},n.range=function(t){return arguments.length?(a=[+t[0],+t[1]],l()):a.slice()},n.rangeRound=function(t){return a=[+t[0],+t[1]],o=!0,l()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,l()):o},n.padding=function(t){return arguments.length?(s=Math.min(1,c=+t),l()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),l()):s},n.paddingOuter=function(t){return arguments.length?(c=+t,l()):c},n.align=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),l()):u},n.copy=function(){return Vp(r(),a).round(o).paddingInner(s).paddingOuter(c).align(u)},jp.apply(l(),arguments)}function Hp(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Hp(e())},t}function Gp(){return Hp(Vp.apply(null,arguments).paddingInner(1))}var Xp=function(t){return+t},Zp=[0,1];function Qp(t){return t}function Kp(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function Jp(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function ty(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=Kp(i,r),a=n(o,a)):(r=Kp(r,i),a=n(a,o)),function(t){return a(r(t))}}function ey(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Kp(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=c(t,e,1,r)-1;return a[n](i[n](e))}}function ny(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function ry(){var t,e,n,r,i,a,o=Zp,s=Zp,c=An,u=Qp;function l(){return r=Math.min(o.length,s.length)>2?ey:ty,i=a=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,c)))(t(u(e)))}return h.invert=function(n){return u(e((a||(a=r(s,o.map(t),_n)))(n)))},h.domain=function(t){return arguments.length?(o=Up.call(t,Xp),u===Qp||(u=Jp(o)),l()):o.slice()},h.range=function(t){return arguments.length?(s=$p.call(t),l()):s.slice()},h.rangeRound=function(t){return s=$p.call(t),c=up,l()},h.clamp=function(t){return arguments.length?(u=t?Jp(o):Qp,h):u!==Qp},h.interpolate=function(t){return arguments.length?(c=t,l()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}function iy(t,e){return ry()(t,e)}var ay=function(t,e,n,r){var i,a=A(t,e,n);switch((r=Ws(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=ac(a,o))||(r.precision=i),Zs(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=oc(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=ic(a))||(r.precision=i-2*("%"===r.type))}return Xs(r)};function oy(t){var e=t.domain;return t.ticks=function(t){var n=e();return C(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return ay(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,s=i[a],c=i[o];return c<s&&(r=s,s=c,c=r,r=a,a=o,o=r),(r=S(s,c,n))>0?r=S(s=Math.floor(s/r)*r,c=Math.ceil(c/r)*r,n):r<0&&(r=S(s=Math.ceil(s*r)/r,c=Math.floor(c*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(c/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(c*r)/r,e(i)),t},t}function sy(){var t=iy(Qp,Qp);return t.copy=function(){return ny(t,sy())},jp.apply(t,arguments),oy(t)}function cy(t){var e;function n(t){return isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Up.call(e,Xp),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return cy(t).unknown(e)},t=arguments.length?Up.call(t,Xp):[0,1],oy(n)}var uy=function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t};function ly(t){return Math.log(t)}function hy(t){return Math.exp(t)}function fy(t){return-Math.log(-t)}function dy(t){return-Math.exp(-t)}function py(t){return isFinite(t)?+("1e"+t):t<0?0:t}function yy(t){return function(e){return-t(-e)}}function gy(t){var e,n,r=t(ly,hy),i=r.domain,a=10;function o(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(a),n=function(t){return 10===t?py:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=yy(e),n=yy(n),t(fy,dy)):t(ly,hy),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),s=o[0],c=o[o.length-1];(r=c<s)&&(f=s,s=c,c=f);var u,l,h,f=e(s),d=e(c),p=null==t?10:+t,y=[];if(!(a%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(l=1,u=n(f);l<a;++l)if(!((h=u*l)<s)){if(h>c)break;y.push(h)}}else for(;f<d;++f)for(l=a-1,u=n(f);l>=1;--l)if(!((h=u*l)<s)){if(h>c)break;y.push(h)}}else y=C(f,d,Math.min(d-f,p)).map(n);return r?y.reverse():y},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=Xs(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(uy(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function vy(){var t=gy(ry()).domain([1,10]);return t.copy=function(){return ny(t,vy()).base(t.base())},jp.apply(t,arguments),t}function my(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function by(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function xy(t){var e=1,n=t(my(e),by(e));return n.constant=function(n){return arguments.length?t(my(e=+n),by(e)):e},oy(n)}function _y(){var t=xy(ry());return t.copy=function(){return ny(t,_y()).constant(t.constant())},jp.apply(t,arguments)}function ky(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function wy(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Ey(t){return t<0?-t*t:t*t}function Ty(t){var e=t(Qp,Qp),n=1;function r(){return 1===n?t(Qp,Qp):.5===n?t(wy,Ey):t(ky(n),ky(1/n))}return e.exponent=function(t){return arguments.length?(n=+t,r()):n},oy(e)}function Cy(){var t=Ty(ry());return t.copy=function(){return ny(t,Cy()).exponent(t.exponent())},jp.apply(t,arguments),t}function Sy(){return Cy.apply(null,arguments).exponent(.5)}function Ay(){var t,e=[],n=[],i=[];function a(){var t=0,r=Math.max(1,n.length);for(i=new Array(r-1);++t<r;)i[t-1]=B(e,t/r);return o}function o(e){return isNaN(e=+e)?t:n[c(i,e)]}return o.invertExtent=function(t){var r=n.indexOf(t);return r<0?[NaN,NaN]:[r>0?i[r-1]:e[0],r<i.length?i[r]:e[e.length-1]]},o.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var n,i=0,o=t.length;i<o;++i)null==(n=t[i])||isNaN(n=+n)||e.push(n);return e.sort(r),a()},o.range=function(t){return arguments.length?(n=$p.call(t),a()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return i.slice()},o.copy=function(){return Ay().domain(e).range(n).unknown(t)},jp.apply(o,arguments)}function My(){var t,e=0,n=1,r=1,i=[.5],a=[0,1];function o(e){return e<=e?a[c(i,e,0,r)]:t}function s(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*e)/(r+1);return o}return o.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],s()):[e,n]},o.range=function(t){return arguments.length?(r=(a=$p.call(t)).length-1,s()):a.slice()},o.invertExtent=function(t){var o=a.indexOf(t);return o<0?[NaN,NaN]:o<1?[e,i[0]]:o>=r?[i[r-1],n]:[i[o-1],i[o]]},o.unknown=function(e){return arguments.length?(t=e,o):o},o.thresholds=function(){return i.slice()},o.copy=function(){return My().domain([e,n]).range(a).unknown(t)},jp.apply(oy(o),arguments)}function Oy(){var t,e=[.5],n=[0,1],r=1;function i(i){return i<=i?n[c(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=$p.call(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=$p.call(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return Oy().domain(e).range(n).unknown(t)},jp.apply(i,arguments)}var By=new Date,Ny=new Date;function Dy(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return Dy((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return By.setTime(+e),Ny.setTime(+r),t(By),t(Ny),Math.floor(n(By,Ny))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Ly=Dy((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Ly.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Dy((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var Iy=Ly,Ry=Ly.range,Fy=Dy((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),Py=Fy,jy=Fy.range;function Yy(t){return Dy((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var zy=Yy(0),Uy=Yy(1),$y=Yy(2),qy=Yy(3),Wy=Yy(4),Vy=Yy(5),Hy=Yy(6),Gy=zy.range,Xy=Uy.range,Zy=$y.range,Qy=qy.range,Ky=Wy.range,Jy=Vy.range,tg=Hy.range,eg=Dy((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),ng=eg,rg=eg.range,ig=Dy((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),ag=ig,og=ig.range,sg=Dy((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),cg=sg,ug=sg.range,lg=Dy((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),hg=lg,fg=lg.range,dg=Dy((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));dg.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Dy((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):dg:null};var pg=dg,yg=dg.range;function gg(t){return Dy((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var vg=gg(0),mg=gg(1),bg=gg(2),xg=gg(3),_g=gg(4),kg=gg(5),wg=gg(6),Eg=vg.range,Tg=mg.range,Cg=bg.range,Sg=xg.range,Ag=_g.range,Mg=kg.range,Og=wg.range,Bg=Dy((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1})),Ng=Bg,Dg=Bg.range,Lg=Dy((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));Lg.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Dy((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var Ig=Lg,Rg=Lg.range;function Fg(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Pg(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function jg(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Yg(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,u=Kg(i),l=Jg(i),h=Kg(a),f=Jg(a),d=Kg(o),p=Jg(o),y=Kg(s),g=Jg(s),v=Kg(c),m=Jg(c),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:xv,e:xv,f:Tv,H:_v,I:kv,j:wv,L:Ev,m:Cv,M:Sv,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:em,s:nm,S:Av,u:Mv,U:Ov,V:Bv,w:Nv,W:Dv,x:null,X:null,y:Lv,Y:Iv,Z:Rv,"%":tm},x={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Fv,e:Fv,f:Uv,H:Pv,I:jv,j:Yv,L:zv,m:$v,M:qv,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:em,s:nm,S:Wv,u:Vv,U:Hv,V:Gv,w:Xv,W:Zv,x:null,X:null,y:Qv,Y:Kv,Z:Jv,"%":tm},_={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=m[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:lv,e:lv,f:gv,H:fv,I:fv,j:hv,L:yv,m:uv,M:dv,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:cv,Q:mv,s:bv,S:pv,u:ev,U:nv,V:rv,w:tv,W:iv,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:ov,Y:av,Z:sv,"%":vv};function k(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===t.charCodeAt(s)&&(o.push(t.slice(c,s)),null!=(i=Vg[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),c=s+1);return o.push(t.slice(c,s)),o.join("")}}function w(t,e){return function(n){var r,i,a=jg(1900,void 0,1);if(E(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(!e||"Z"in a||(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Pg(jg(a.y,0,1))).getUTCDay(),r=i>4||0===i?mg.ceil(r):mg(r),r=Ng.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Fg(jg(a.y,0,1))).getDay(),r=i>4||0===i?Uy.ceil(r):Uy(r),r=ng.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Pg(jg(a.y,0,1)).getUTCDay():Fg(jg(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Pg(a)):Fg(a)}}function E(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o<s;){if(r>=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=_[i in Vg?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(b.x=k(n,b),b.X=k(r,b),b.c=k(e,b),x.x=k(n,x),x.X=k(r,x),x.c=k(e,x),{format:function(t){var e=k(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=w(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=k(t+="",x);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t+="",!0);return e.toString=function(){return t},e}})}var zg,Ug,$g,qg,Wg,Vg={"-":"",_:" ",0:"0"},Hg=/^\s*\d+/,Gg=/^%/,Xg=/[\\^$*+?|[\]().{}]/g;function Zg(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function Qg(t){return t.replace(Xg,"\\$&")}function Kg(t){return new RegExp("^(?:"+t.map(Qg).join("|")+")","i")}function Jg(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function tv(t,e,n){var r=Hg.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function ev(t,e,n){var r=Hg.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function nv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function rv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function iv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function av(t,e,n){var r=Hg.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function ov(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function sv(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function cv(t,e,n){var r=Hg.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function uv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function lv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function hv(t,e,n){var r=Hg.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function fv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function dv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function pv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function yv(t,e,n){var r=Hg.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function gv(t,e,n){var r=Hg.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function vv(t,e,n){var r=Gg.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function mv(t,e,n){var r=Hg.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function bv(t,e,n){var r=Hg.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function xv(t,e){return Zg(t.getDate(),e,2)}function _v(t,e){return Zg(t.getHours(),e,2)}function kv(t,e){return Zg(t.getHours()%12||12,e,2)}function wv(t,e){return Zg(1+ng.count(Iy(t),t),e,3)}function Ev(t,e){return Zg(t.getMilliseconds(),e,3)}function Tv(t,e){return Ev(t,e)+"000"}function Cv(t,e){return Zg(t.getMonth()+1,e,2)}function Sv(t,e){return Zg(t.getMinutes(),e,2)}function Av(t,e){return Zg(t.getSeconds(),e,2)}function Mv(t){var e=t.getDay();return 0===e?7:e}function Ov(t,e){return Zg(zy.count(Iy(t)-1,t),e,2)}function Bv(t,e){var n=t.getDay();return t=n>=4||0===n?Wy(t):Wy.ceil(t),Zg(Wy.count(Iy(t),t)+(4===Iy(t).getDay()),e,2)}function Nv(t){return t.getDay()}function Dv(t,e){return Zg(Uy.count(Iy(t)-1,t),e,2)}function Lv(t,e){return Zg(t.getFullYear()%100,e,2)}function Iv(t,e){return Zg(t.getFullYear()%1e4,e,4)}function Rv(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Zg(e/60|0,"0",2)+Zg(e%60,"0",2)}function Fv(t,e){return Zg(t.getUTCDate(),e,2)}function Pv(t,e){return Zg(t.getUTCHours(),e,2)}function jv(t,e){return Zg(t.getUTCHours()%12||12,e,2)}function Yv(t,e){return Zg(1+Ng.count(Ig(t),t),e,3)}function zv(t,e){return Zg(t.getUTCMilliseconds(),e,3)}function Uv(t,e){return zv(t,e)+"000"}function $v(t,e){return Zg(t.getUTCMonth()+1,e,2)}function qv(t,e){return Zg(t.getUTCMinutes(),e,2)}function Wv(t,e){return Zg(t.getUTCSeconds(),e,2)}function Vv(t){var e=t.getUTCDay();return 0===e?7:e}function Hv(t,e){return Zg(vg.count(Ig(t)-1,t),e,2)}function Gv(t,e){var n=t.getUTCDay();return t=n>=4||0===n?_g(t):_g.ceil(t),Zg(_g.count(Ig(t),t)+(4===Ig(t).getUTCDay()),e,2)}function Xv(t){return t.getUTCDay()}function Zv(t,e){return Zg(mg.count(Ig(t)-1,t),e,2)}function Qv(t,e){return Zg(t.getUTCFullYear()%100,e,2)}function Kv(t,e){return Zg(t.getUTCFullYear()%1e4,e,4)}function Jv(){return"+0000"}function tm(){return"%"}function em(t){return+t}function nm(t){return Math.floor(+t/1e3)}function rm(t){return zg=Yg(t),Ug=zg.format,$g=zg.parse,qg=zg.utcFormat,Wg=zg.utcParse,zg}rm({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function im(t){return new Date(t)}function am(t){return t instanceof Date?+t:+new Date(+t)}function om(t,e,n,r,a,o,s,c,u){var l=iy(Qp,Qp),h=l.invert,f=l.domain,d=u(".%L"),p=u(":%S"),y=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),m=u("%b %d"),b=u("%B"),x=u("%Y"),_=[[s,1,1e3],[s,5,5e3],[s,15,15e3],[s,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[a,1,36e5],[a,3,108e5],[a,6,216e5],[a,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function k(i){return(s(i)<i?d:o(i)<i?p:a(i)<i?y:r(i)<i?g:e(i)<i?n(i)<i?v:m:t(i)<i?b:x)(i)}function w(e,n,r,a){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,s=i((function(t){return t[2]})).right(_,o);s===_.length?(a=A(n/31536e6,r/31536e6,e),e=t):s?(a=(s=_[o/_[s-1][2]<_[s][2]/o?s-1:s])[1],e=s[0]):(a=Math.max(A(n,r,e),1),e=c)}return null==a?e:e.every(a)}return l.invert=function(t){return new Date(h(t))},l.domain=function(t){return arguments.length?f(Up.call(t,am)):f().map(im)},l.ticks=function(t,e){var n,r=f(),i=r[0],a=r[r.length-1],o=a<i;return o&&(n=i,i=a,a=n),n=(n=w(t,i,a,e))?n.range(i,a+1):[],o?n.reverse():n},l.tickFormat=function(t,e){return null==e?k:u(e)},l.nice=function(t,e){var n=f();return(t=w(t,n[0],n[n.length-1],e))?f(uy(n,t)):l},l.copy=function(){return ny(l,om(t,e,n,r,a,o,s,c,u))},l}var sm=function(){return jp.apply(om(Iy,Py,zy,ng,ag,cg,hg,pg,Ug).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},cm=Dy((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),um=cm,lm=cm.range,hm=Dy((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()})),fm=hm,dm=hm.range,pm=Dy((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()})),ym=pm,gm=pm.range,vm=function(){return jp.apply(om(Ig,um,vg,Ng,fm,ym,hg,pg,qg).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)};function mm(){var t,e,n,r,i,a=0,o=1,s=Qp,c=!1;function u(e){return isNaN(e=+e)?i:s(0===n?.5:(e=(r(e)-t)*n,c?Math.max(0,Math.min(1,e)):e))}return u.domain=function(i){return arguments.length?(t=r(a=+i[0]),e=r(o=+i[1]),n=t===e?0:1/(e-t),u):[a,o]},u.clamp=function(t){return arguments.length?(c=!!t,u):c},u.interpolator=function(t){return arguments.length?(s=t,u):s},u.unknown=function(t){return arguments.length?(i=t,u):i},function(i){return r=i,t=i(a),e=i(o),n=t===e?0:1/(e-t),u}}function bm(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function xm(){var t=oy(mm()(Qp));return t.copy=function(){return bm(t,xm())},Yp.apply(t,arguments)}function _m(){var t=gy(mm()).domain([1,10]);return t.copy=function(){return bm(t,_m()).base(t.base())},Yp.apply(t,arguments)}function km(){var t=xy(mm());return t.copy=function(){return bm(t,km()).constant(t.constant())},Yp.apply(t,arguments)}function wm(){var t=Ty(mm());return t.copy=function(){return bm(t,wm()).exponent(t.exponent())},Yp.apply(t,arguments)}function Em(){return wm.apply(null,arguments).exponent(.5)}function Tm(){var t=[],e=Qp;function n(n){if(!isNaN(n=+n))return e((c(t,n)-1)/(t.length-1))}return n.domain=function(e){if(!arguments.length)return t.slice();t=[];for(var i,a=0,o=e.length;a<o;++a)null==(i=e[a])||isNaN(i=+i)||t.push(i);return t.sort(r),n},n.interpolator=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return Tm(e).domain(t)},Yp.apply(n,arguments)}function Cm(){var t,e,n,r,i,a,o,s=0,c=.5,u=1,l=Qp,h=!1;function f(t){return isNaN(t=+t)?o:(t=.5+((t=+a(t))-e)*(t<e?r:i),l(h?Math.max(0,Math.min(1,t)):t))}return f.domain=function(o){return arguments.length?(t=a(s=+o[0]),e=a(c=+o[1]),n=a(u=+o[2]),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),f):[s,c,u]},f.clamp=function(t){return arguments.length?(h=!!t,f):h},f.interpolator=function(t){return arguments.length?(l=t,f):l},f.unknown=function(t){return arguments.length?(o=t,f):o},function(o){return a=o,t=o(s),e=o(c),n=o(u),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),f}}function Sm(){var t=oy(Cm()(Qp));return t.copy=function(){return bm(t,Sm())},Yp.apply(t,arguments)}function Am(){var t=gy(Cm()).domain([.1,1,10]);return t.copy=function(){return bm(t,Am()).base(t.base())},Yp.apply(t,arguments)}function Mm(){var t=xy(Cm());return t.copy=function(){return bm(t,Mm()).constant(t.constant())},Yp.apply(t,arguments)}function Om(){var t=Ty(Cm());return t.copy=function(){return bm(t,Om()).exponent(t.exponent())},Yp.apply(t,arguments)}function Bm(){return Om.apply(null,arguments).exponent(.5)}var Nm=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n},Dm=Nm("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Lm=Nm("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Im=Nm("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Rm=Nm("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Fm=Nm("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Pm=Nm("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),jm=Nm("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Ym=Nm("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),zm=Nm("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Um=Nm("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),$m=function(t){return pn(t[t.length-1])},qm=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Nm),Wm=$m(qm),Vm=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Nm),Hm=$m(Vm),Gm=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Nm),Xm=$m(Gm),Zm=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Nm),Qm=$m(Zm),Km=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Nm),Jm=$m(Km),tb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Nm),eb=$m(tb),nb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Nm),rb=$m(nb),ib=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Nm),ab=$m(ib),ob=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Nm),sb=$m(ob),cb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Nm),ub=$m(cb),lb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Nm),hb=$m(lb),fb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Nm),db=$m(fb),pb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Nm),yb=$m(pb),gb=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Nm),vb=$m(gb),mb=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Nm),bb=$m(mb),xb=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Nm),_b=$m(xb),kb=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Nm),wb=$m(kb),Eb=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Nm),Tb=$m(Eb),Cb=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Nm),Sb=$m(Cb),Ab=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Nm),Mb=$m(Ab),Ob=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Nm),Bb=$m(Ob),Nb=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Nm),Db=$m(Nb),Lb=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Nm),Ib=$m(Lb),Rb=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Nm),Fb=$m(Rb),Pb=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Nm),jb=$m(Pb),Yb=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Nm),zb=$m(Yb),Ub=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Nm),$b=$m(Ub),qb=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},Wb=kp(Oa(300,.5,0),Oa(-240,.5,1)),Vb=kp(Oa(-100,.75,.35),Oa(80,1.5,.8)),Hb=kp(Oa(260,.75,.35),Oa(80,1.5,.8)),Gb=Oa(),Xb=function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Gb.h=360*t-100,Gb.s=1.5-1.5*e,Gb.l=.8-.9*e,Gb+""},Zb=He(),Qb=Math.PI/3,Kb=2*Math.PI/3,Jb=function(t){var e;return t=(.5-t)*Math.PI,Zb.r=255*(e=Math.sin(t))*e,Zb.g=255*(e=Math.sin(t+Qb))*e,Zb.b=255*(e=Math.sin(t+Kb))*e,Zb+""},tx=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"};function ex(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var nx=ex(Nm("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),rx=ex(Nm("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),ix=ex(Nm("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ax=ex(Nm("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),ox=function(t){return ke(ne(t).call(document.documentElement))},sx=0;function cx(){return new ux}function ux(){this._="@"+(++sx).toString(36)}ux.prototype=cx.prototype={constructor:ux,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var lx=function(t){return"string"==typeof t?new be([document.querySelectorAll(t)],[document.documentElement]):new be([null==t?[]:t],me)},hx=function(t,e){null==e&&(e=Mn().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=On(t,e[n]);return i},fx=function(t){return function(){return t}},dx=Math.abs,px=Math.atan2,yx=Math.cos,gx=Math.max,vx=Math.min,mx=Math.sin,bx=Math.sqrt,xx=Math.PI,_x=xx/2,kx=2*xx;function wx(t){return t>1?0:t<-1?xx:Math.acos(t)}function Ex(t){return t>=1?_x:t<=-1?-_x:Math.asin(t)}function Tx(t){return t.innerRadius}function Cx(t){return t.outerRadius}function Sx(t){return t.startAngle}function Ax(t){return t.endAngle}function Mx(t){return t&&t.padAngle}function Ox(t,e,n,r,i,a,o,s){var c=n-t,u=r-e,l=o-i,h=s-a,f=h*c-l*u;if(!(f*f<1e-12))return[t+(f=(l*(e-a)-h*(t-i))/f)*c,e+f*u]}function Bx(t,e,n,r,i,a,o){var s=t-n,c=e-r,u=(o?a:-a)/bx(s*s+c*c),l=u*c,h=-u*s,f=t+l,d=e+h,p=n+l,y=r+h,g=(f+p)/2,v=(d+y)/2,m=p-f,b=y-d,x=m*m+b*b,_=i-a,k=f*y-p*d,w=(b<0?-1:1)*bx(gx(0,_*_*x-k*k)),E=(k*b-m*w)/x,T=(-k*m-b*w)/x,C=(k*b+m*w)/x,S=(-k*m+b*w)/x,A=E-g,M=T-v,O=C-g,B=S-v;return A*A+M*M>O*O+B*B&&(E=C,T=S),{cx:E,cy:T,x01:-l,y01:-h,x11:E*(i/_-1),y11:T*(i/_-1)}}var Nx=function(){var t=Tx,e=Cx,n=fx(0),r=null,i=Sx,a=Ax,o=Mx,s=null;function c(){var c,u,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-_x,d=a.apply(this,arguments)-_x,p=dx(d-f),y=d>f;if(s||(s=c=Ui()),h<l&&(u=h,h=l,l=u),h>1e-12)if(p>kx-1e-12)s.moveTo(h*yx(f),h*mx(f)),s.arc(0,0,h,f,d,!y),l>1e-12&&(s.moveTo(l*yx(d),l*mx(d)),s.arc(0,0,l,d,f,y));else{var g,v,m=f,b=d,x=f,_=d,k=p,w=p,E=o.apply(this,arguments)/2,T=E>1e-12&&(r?+r.apply(this,arguments):bx(l*l+h*h)),C=vx(dx(h-l)/2,+n.apply(this,arguments)),S=C,A=C;if(T>1e-12){var M=Ex(T/l*mx(E)),O=Ex(T/h*mx(E));(k-=2*M)>1e-12?(x+=M*=y?1:-1,_-=M):(k=0,x=_=(f+d)/2),(w-=2*O)>1e-12?(m+=O*=y?1:-1,b-=O):(w=0,m=b=(f+d)/2)}var B=h*yx(m),N=h*mx(m),D=l*yx(_),L=l*mx(_);if(C>1e-12){var I,R=h*yx(b),F=h*mx(b),P=l*yx(x),j=l*mx(x);if(p<xx&&(I=Ox(B,N,P,j,R,F,D,L))){var Y=B-I[0],z=N-I[1],U=R-I[0],$=F-I[1],q=1/mx(wx((Y*U+z*$)/(bx(Y*Y+z*z)*bx(U*U+$*$)))/2),W=bx(I[0]*I[0]+I[1]*I[1]);S=vx(C,(l-W)/(q-1)),A=vx(C,(h-W)/(q+1))}}w>1e-12?A>1e-12?(g=Bx(P,j,B,N,h,A,y),v=Bx(R,F,D,L,h,A,y),s.moveTo(g.cx+g.x01,g.cy+g.y01),A<C?s.arc(g.cx,g.cy,A,px(g.y01,g.x01),px(v.y01,v.x01),!y):(s.arc(g.cx,g.cy,A,px(g.y01,g.x01),px(g.y11,g.x11),!y),s.arc(0,0,h,px(g.cy+g.y11,g.cx+g.x11),px(v.cy+v.y11,v.cx+v.x11),!y),s.arc(v.cx,v.cy,A,px(v.y11,v.x11),px(v.y01,v.x01),!y))):(s.moveTo(B,N),s.arc(0,0,h,m,b,!y)):s.moveTo(B,N),l>1e-12&&k>1e-12?S>1e-12?(g=Bx(D,L,R,F,l,-S,y),v=Bx(B,N,P,j,l,-S,y),s.lineTo(g.cx+g.x01,g.cy+g.y01),S<C?s.arc(g.cx,g.cy,S,px(g.y01,g.x01),px(v.y01,v.x01),!y):(s.arc(g.cx,g.cy,S,px(g.y01,g.x01),px(g.y11,g.x11),!y),s.arc(0,0,l,px(g.cy+g.y11,g.cx+g.x11),px(v.cy+v.y11,v.cx+v.x11),y),s.arc(v.cx,v.cy,S,px(v.y11,v.x11),px(v.y01,v.x01),!y))):s.arc(0,0,l,_,x,y):s.lineTo(D,L)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-xx/2;return[yx(r)*n,mx(r)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:fx(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:fx(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:fx(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:fx(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:fx(+t),c):i},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:fx(+t),c):a},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:fx(+t),c):o},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c};function Dx(t){this._context=t}Dx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var Lx=function(t){return new Dx(t)};function Ix(t){return t[0]}function Rx(t){return t[1]}var Fx=function(){var t=Ix,e=Rx,n=fx(!0),r=null,i=Lx,a=null;function o(o){var s,c,u,l=o.length,h=!1;for(null==r&&(a=i(u=Ui())),s=0;s<=l;++s)!(s<l&&n(c=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(c,s,o),+e(c,s,o));if(u)return a=null,u+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:fx(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:fx(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:fx(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o},Px=function(){var t=Ix,e=null,n=fx(0),r=Rx,i=fx(!0),a=null,o=Lx,s=null;function c(c){var u,l,h,f,d,p=c.length,y=!1,g=new Array(p),v=new Array(p);for(null==a&&(s=o(d=Ui())),u=0;u<=p;++u){if(!(u<p&&i(f=c[u],u,c))===y)if(y=!y)l=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=u-1;h>=l;--h)s.point(g[h],v[h]);s.lineEnd(),s.areaEnd()}y&&(g[u]=+t(f,u,c),v[u]=+n(f,u,c),s.point(e?+e(f,u,c):g[u],r?+r(f,u,c):v[u]))}if(d)return s=null,d+""||null}function u(){return Fx().defined(i).curve(o).context(a)}return c.x=function(n){return arguments.length?(t="function"==typeof n?n:fx(+n),e=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:fx(+e),c):t},c.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:fx(+t),c):e},c.y=function(t){return arguments.length?(n="function"==typeof t?t:fx(+t),r=null,c):n},c.y0=function(t){return arguments.length?(n="function"==typeof t?t:fx(+t),c):n},c.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:fx(+t),c):r},c.lineX0=c.lineY0=function(){return u().x(t).y(n)},c.lineY1=function(){return u().x(t).y(r)},c.lineX1=function(){return u().x(e).y(n)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:fx(!!t),c):i},c.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),c):a},c},jx=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},Yx=function(t){return t},zx=function(){var t=Yx,e=jx,n=null,r=fx(0),i=fx(kx),a=fx(0);function o(o){var s,c,u,l,h,f=o.length,d=0,p=new Array(f),y=new Array(f),g=+r.apply(this,arguments),v=Math.min(kx,Math.max(-kx,i.apply(this,arguments)-g)),m=Math.min(Math.abs(v)/f,a.apply(this,arguments)),b=m*(v<0?-1:1);for(s=0;s<f;++s)(h=y[p[s]=s]=+t(o[s],s,o))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(y[t],y[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),s=0,u=d?(v-f*b)/d:0;s<f;++s,g=l)c=p[s],l=g+((h=y[c])>0?h*u:0)+b,y[c]={data:o[c],index:s,value:h,startAngle:g,endAngle:l,padAngle:m};return y}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:fx(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:fx(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:fx(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:fx(+t),o):a},o},Ux=qx(Lx);function $x(t){this._curve=t}function qx(t){function e(e){return new $x(t(e))}return e._curve=t,e}function Wx(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(qx(t)):e()._curve},t}$x.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var Vx=function(){return Wx(Fx().curve(Ux))},Hx=function(){var t=Px().curve(Ux),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Wx(n())},delete t.lineX0,t.lineEndAngle=function(){return Wx(r())},delete t.lineX1,t.lineInnerRadius=function(){return Wx(i())},delete t.lineY0,t.lineOuterRadius=function(){return Wx(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(qx(t)):e()._curve},t},Gx=function(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]},Xx=Array.prototype.slice;function Zx(t){return t.source}function Qx(t){return t.target}function Kx(t){var e=Zx,n=Qx,r=Ix,i=Rx,a=null;function o(){var o,s=Xx.call(arguments),c=e.apply(this,s),u=n.apply(this,s);if(a||(a=o=Ui()),t(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=u,s)),+i.apply(this,s)),o)return a=null,o+""||null}return o.source=function(t){return arguments.length?(e=t,o):e},o.target=function(t){return arguments.length?(n=t,o):n},o.x=function(t){return arguments.length?(r="function"==typeof t?t:fx(+t),o):r},o.y=function(t){return arguments.length?(i="function"==typeof t?t:fx(+t),o):i},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}function Jx(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function t_(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function e_(t,e,n,r,i){var a=Gx(e,n),o=Gx(e,n=(n+i)/2),s=Gx(r,n),c=Gx(r,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],c[0],c[1])}function n_(){return Kx(Jx)}function r_(){return Kx(t_)}function i_(){var t=Kx(e_);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var a_={draw:function(t,e){var n=Math.sqrt(e/xx);t.moveTo(n,0),t.arc(0,0,n,0,kx)}},o_={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},s_=Math.sqrt(1/3),c_=2*s_,u_={draw:function(t,e){var n=Math.sqrt(e/c_),r=n*s_;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},l_=Math.sin(xx/10)/Math.sin(7*xx/10),h_=Math.sin(kx/10)*l_,f_=-Math.cos(kx/10)*l_,d_={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=h_*n,i=f_*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=kx*a/5,s=Math.cos(o),c=Math.sin(o);t.lineTo(c*n,-s*n),t.lineTo(s*r-c*i,c*r+s*i)}t.closePath()}},p_={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},y_=Math.sqrt(3),g_={draw:function(t,e){var n=-Math.sqrt(e/(3*y_));t.moveTo(0,2*n),t.lineTo(-y_*n,-n),t.lineTo(y_*n,-n),t.closePath()}},v_=Math.sqrt(3)/2,m_=1/Math.sqrt(12),b_=3*(m_/2+1),x_={draw:function(t,e){var n=Math.sqrt(e/b_),r=n/2,i=n*m_,a=r,o=n*m_+n,s=-a,c=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,c),t.lineTo(-.5*r-v_*i,v_*r+-.5*i),t.lineTo(-.5*a-v_*o,v_*a+-.5*o),t.lineTo(-.5*s-v_*c,v_*s+-.5*c),t.lineTo(-.5*r+v_*i,-.5*i-v_*r),t.lineTo(-.5*a+v_*o,-.5*o-v_*a),t.lineTo(-.5*s+v_*c,-.5*c-v_*s),t.closePath()}},__=[a_,o_,u_,p_,d_,g_,x_],k_=function(){var t=fx(a_),e=fx(64),n=null;function r(){var r;if(n||(n=r=Ui()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:fx(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:fx(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r},w_=function(){};function E_(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function T_(t){this._context=t}T_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:E_(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:E_(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var C_=function(t){return new T_(t)};function S_(t){this._context=t}S_.prototype={areaStart:w_,areaEnd:w_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:E_(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var A_=function(t){return new S_(t)};function M_(t){this._context=t}M_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:E_(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var O_=function(t){return new M_(t)};function B_(t,e){this._basis=new T_(t),this._beta=e}B_.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,s=e[n]-a,c=-1;++c<=n;)r=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*e[c]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var N_=function t(e){function n(t){return 1===e?new T_(t):new B_(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function D_(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function L_(t,e){this._context=t,this._k=(1-e)/6}L_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:D_(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:D_(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var I_=function t(e){function n(t){return new L_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function R_(t,e){this._context=t,this._k=(1-e)/6}R_.prototype={areaStart:w_,areaEnd:w_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:D_(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var F_=function t(e){function n(t){return new R_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function P_(t,e){this._context=t,this._k=(1-e)/6}P_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:D_(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var j_=function t(e){function n(t){return new P_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Y_(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>1e-12){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function z_(t,e){this._context=t,this._alpha=e}z_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Y_(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var U_=function t(e){function n(t){return e?new z_(t,e):new L_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function $_(t,e){this._context=t,this._alpha=e}$_.prototype={areaStart:w_,areaEnd:w_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Y_(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var q_=function t(e){function n(t){return e?new $_(t,e):new R_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function W_(t,e){this._context=t,this._alpha=e}W_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Y_(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var V_=function t(e){function n(t){return e?new W_(t,e):new P_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function H_(t){this._context=t}H_.prototype={areaStart:w_,areaEnd:w_,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var G_=function(t){return new H_(t)};function X_(t){return t<0?-1:1}function Z_(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(X_(a)+X_(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Q_(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function K_(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function J_(t){this._context=t}function tk(t){this._context=new ek(t)}function ek(t){this._context=t}function nk(t){return new J_(t)}function rk(t){return new tk(t)}function ik(t){this._context=t}function ak(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}J_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:K_(this,this._t0,Q_(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,K_(this,Q_(this,n=Z_(this,t,e)),n);break;default:K_(this,this._t0,n=Z_(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(tk.prototype=Object.create(J_.prototype)).point=function(t,e){J_.prototype.point.call(this,e,t)},ek.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},ik.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=ak(t),i=ak(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var ok=function(t){return new ik(t)};function sk(t,e){this._context=t,this._t=e}sk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var ck=function(t){return new sk(t,.5)};function uk(t){return new sk(t,0)}function lk(t){return new sk(t,1)}var hk=function(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a<i;++a)for(r=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]},fk=function(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n};function dk(t,e){return t[e]}var pk=function(){var t=fx([]),e=fk,n=hk,r=dk;function i(i){var a,o,s=t.apply(this,arguments),c=i.length,u=s.length,l=new Array(u);for(a=0;a<u;++a){for(var h,f=s[a],d=l[a]=new Array(c),p=0;p<c;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.key=f}for(a=0,o=e(l);a<u;++a)l[o[a]].index=a;return n(l,o),l}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:fx(Xx.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:fx(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?fk:"function"==typeof t?t:fx(Xx.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?hk:t,i):n},i},yk=function(t,e){if((r=t.length)>0){for(var n,r,i,a=0,o=t[0].length;a<o;++a){for(i=n=0;n<r;++n)i+=t[n][a][1]||0;if(i)for(n=0;n<r;++n)t[n][a][1]/=i}hk(t,e)}},gk=function(t,e){if((s=t.length)>0)for(var n,r,i,a,o,s,c=0,u=t[e[0]].length;c<u;++c)for(a=o=0,n=0;n<s;++n)(i=(r=t[e[n]][c])[1]-r[0])>0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)},vk=function(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],a=i.length;r<a;++r){for(var o=0,s=0;o<n;++o)s+=t[o][r][1]||0;i[r][1]+=i[r][0]=-s/2}hk(t,e)}},mk=function(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,a=0,o=1;o<r;++o){for(var s=0,c=0,u=0;s<i;++s){for(var l=t[e[s]],h=l[o][1]||0,f=(h-(l[o-1][1]||0))/2,d=0;d<s;++d){var p=t[e[d]];f+=(p[o][1]||0)-(p[o-1][1]||0)}c+=h,u+=f*h}n[o-1][1]+=n[o-1][0]=a,c&&(a-=u/c)}n[o-1][1]+=n[o-1][0]=a,hk(t,e)}},bk=function(t){var e=t.map(xk);return fk(t).sort((function(t,n){return e[t]-e[n]}))};function xk(t){for(var e,n=-1,r=0,i=t.length,a=-1/0;++n<i;)(e=+t[n][1])>a&&(a=e,r=n);return r}var _k=function(t){var e=t.map(kk);return fk(t).sort((function(t,n){return e[t]-e[n]}))};function kk(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}var wk=function(t){return _k(t).reverse()},Ek=function(t){var e,n,r=t.length,i=t.map(kk),a=bk(t),o=0,s=0,c=[],u=[];for(e=0;e<r;++e)n=a[e],o<s?(o+=i[n],c.push(n)):(s+=i[n],u.push(n));return u.reverse().concat(c)},Tk=function(t){return fk(t).reverse()};var Ck=Date.prototype.toISOString?function(t){return t.toISOString()}:qg("%Y-%m-%dT%H:%M:%S.%LZ");var Sk=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:Wg("%Y-%m-%dT%H:%M:%S.%LZ"),Ak=function(t,e,n){var r=new $n,i=e;return null==e?(r.restart(t,e,n),r):(e=+e,n=null==n?zn():+n,r.restart((function a(o){o+=i,r.restart(a,i+=e,n),t(o)}),e,n),r)},Mk=function(t){return function(){return t}};function Ok(t){return t[0]}function Bk(t){return t[1]}function Nk(){this._=null}function Dk(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Lk(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Ik(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Rk(t){for(;t.L;)t=t.L;return t}Nk.prototype={constructor:Nk,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=Rk(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(Lk(this,n),n=(t=n).U),n.C=!1,r.C=!0,Ik(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(Ik(this,n),n=(t=n).U),n.C=!1,r.C=!0,Lk(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,a=t.L,o=t.R;if(n=a?o?Rk(o):a:o,i?i.L===t?i.L=n:i.R=n:this._=n,a&&o?(r=n.C,n.C=t.C,n.L=a,a.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Lk(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Ik(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Lk(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Ik(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Lk(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Ik(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Fk=Nk;function Pk(t,e,n,r){var i=[null,null],a=cw.push(i)-1;return i.left=t,i.right=e,n&&Yk(i,t,e,n),r&&Yk(i,e,t,r),ow[t.index].halfedges.push(a),ow[e.index].halfedges.push(a),i}function jk(t,e,n){var r=[e,n];return r.left=t,r}function Yk(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function zk(t,e,n,r,i){var a,o=t[0],s=t[1],c=o[0],u=o[1],l=0,h=1,f=s[0]-c,d=s[1]-u;if(a=e-c,f||!(a>0)){if(a/=f,f<0){if(a<l)return;a<h&&(h=a)}else if(f>0){if(a>h)return;a>l&&(l=a)}if(a=r-c,f||!(a<0)){if(a/=f,f<0){if(a>h)return;a>l&&(l=a)}else if(f>0){if(a<l)return;a<h&&(h=a)}if(a=n-u,d||!(a>0)){if(a/=d,d<0){if(a<l)return;a<h&&(h=a)}else if(d>0){if(a>h)return;a>l&&(l=a)}if(a=i-u,d||!(a<0)){if(a/=d,d<0){if(a>h)return;a>l&&(l=a)}else if(d>0){if(a<l)return;a<h&&(h=a)}return!(l>0||h<1)||(l>0&&(t[0]=[c+l*f,u+l*d]),h<1&&(t[1]=[c+h*f,u+h*d]),!0)}}}}}function Uk(t,e,n,r,i){var a=t[1];if(a)return!0;var o,s,c=t[0],u=t.left,l=t.right,h=u[0],f=u[1],d=l[0],p=l[1],y=(h+d)/2,g=(f+p)/2;if(p===f){if(y<e||y>=r)return;if(h>d){if(c){if(c[1]>=i)return}else c=[y,n];a=[y,i]}else{if(c){if(c[1]<n)return}else c=[y,i];a=[y,n]}}else if(s=g-(o=(h-d)/(p-f))*y,o<-1||o>1)if(h>d){if(c){if(c[1]>=i)return}else c=[(n-s)/o,n];a=[(i-s)/o,i]}else{if(c){if(c[1]<n)return}else c=[(i-s)/o,i];a=[(n-s)/o,n]}else if(f<p){if(c){if(c[0]>=r)return}else c=[e,o*e+s];a=[r,o*r+s]}else{if(c){if(c[0]<e)return}else c=[r,o*r+s];a=[e,o*e+s]}return t[0]=c,t[1]=a,!0}function $k(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function qk(t,e){return e[+(e.left!==t.site)]}function Wk(t,e){return e[+(e.left===t.site)]}var Vk,Hk=[];function Gk(){Dk(this),this.x=this.y=this.arc=this.site=this.cy=null}function Xk(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,a=n.site;if(r!==a){var o=i[0],s=i[1],c=r[0]-o,u=r[1]-s,l=a[0]-o,h=a[1]-s,f=2*(c*h-u*l);if(!(f>=-lw)){var d=c*c+u*u,p=l*l+h*h,y=(h*d-u*p)/f,g=(c*p-l*d)/f,v=Hk.pop()||new Gk;v.arc=t,v.site=i,v.x=y+o,v.y=(v.cy=g+s)+Math.sqrt(y*y+g*g),t.circle=v;for(var m=null,b=sw._;b;)if(v.y<b.y||v.y===b.y&&v.x<=b.x){if(!b.L){m=b.P;break}b=b.L}else{if(!b.R){m=b;break}b=b.R}sw.insert(m,v),m||(Vk=v)}}}}function Zk(t){var e=t.circle;e&&(e.P||(Vk=e.N),sw.remove(e),Hk.push(e),Dk(e),t.circle=null)}var Qk=[];function Kk(){Dk(this),this.edge=this.site=this.circle=null}function Jk(t){var e=Qk.pop()||new Kk;return e.site=t,e}function tw(t){Zk(t),aw.remove(t),Qk.push(t),Dk(t)}function ew(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,s=[t];tw(t);for(var c=a;c.circle&&Math.abs(n-c.circle.x)<uw&&Math.abs(r-c.circle.cy)<uw;)a=c.P,s.unshift(c),tw(c),c=a;s.unshift(c),Zk(c);for(var u=o;u.circle&&Math.abs(n-u.circle.x)<uw&&Math.abs(r-u.circle.cy)<uw;)o=u.N,s.push(u),tw(u),u=o;s.push(u),Zk(u);var l,h=s.length;for(l=1;l<h;++l)u=s[l],c=s[l-1],Yk(u.edge,c.site,u.site,i);c=s[0],(u=s[h-1]).edge=Pk(c.site,u.site,null,i),Xk(c),Xk(u)}function nw(t){for(var e,n,r,i,a=t[0],o=t[1],s=aw._;s;)if((r=rw(s,o)-a)>uw)s=s.L;else{if(!((i=a-iw(s,o))>uw)){r>-uw?(e=s.P,n=s):i>-uw?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){ow[t.index]={site:t,halfedges:[]}}(t);var c=Jk(t);if(aw.insert(e,c),e||n){if(e===n)return Zk(e),n=Jk(e.site),aw.insert(c,n),c.edge=n.edge=Pk(e.site,c.site),Xk(e),void Xk(n);if(n){Zk(e),Zk(n);var u=e.site,l=u[0],h=u[1],f=t[0]-l,d=t[1]-h,p=n.site,y=p[0]-l,g=p[1]-h,v=2*(f*g-d*y),m=f*f+d*d,b=y*y+g*g,x=[(g*m-d*b)/v+l,(f*b-y*m)/v+h];Yk(n.edge,u,p,x),c.edge=Pk(u,t,null,x),n.edge=Pk(t,p,null,x),Xk(e),Xk(n)}else c.edge=Pk(e.site,c.site)}}function rw(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var s=(n=o.site)[0],c=n[1],u=c-e;if(!u)return s;var l=s-r,h=1/a-1/u,f=l/u;return h?(-f+Math.sqrt(f*f-2*h*(l*l/(-2*u)-c+u/2+i-a/2)))/h+r:(r+s)/2}function iw(t,e){var n=t.N;if(n)return rw(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var aw,ow,sw,cw,uw=1e-6,lw=1e-12;function hw(t,e){return e[1]-t[1]||e[0]-t[0]}function fw(t,e){var n,r,i,a=t.sort(hw).pop();for(cw=[],ow=new Array(t.length),aw=new Fk,sw=new Fk;;)if(i=Vk,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(nw(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;ew(i.arc)}if(function(){for(var t,e,n,r,i=0,a=ow.length;i<a;++i)if((t=ow[i])&&(r=(e=t.halfedges).length)){var o=new Array(r),s=new Array(r);for(n=0;n<r;++n)o[n]=n,s[n]=$k(t,cw[e[n]]);for(o.sort((function(t,e){return s[e]-s[t]})),n=0;n<r;++n)s[n]=e[o[n]];for(n=0;n<r;++n)e[n]=s[n]}}(),e){var o=+e[0][0],s=+e[0][1],c=+e[1][0],u=+e[1][1];!function(t,e,n,r){for(var i,a=cw.length;a--;)Uk(i=cw[a],t,e,n,r)&&zk(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>uw||Math.abs(i[0][1]-i[1][1])>uw)||delete cw[a]}(o,s,c,u),function(t,e,n,r){var i,a,o,s,c,u,l,h,f,d,p,y,g=ow.length,v=!0;for(i=0;i<g;++i)if(a=ow[i]){for(o=a.site,s=(c=a.halfedges).length;s--;)cw[c[s]]||c.splice(s,1);for(s=0,u=c.length;s<u;)p=(d=Wk(a,cw[c[s]]))[0],y=d[1],h=(l=qk(a,cw[c[++s%u]]))[0],f=l[1],(Math.abs(p-h)>uw||Math.abs(y-f)>uw)&&(c.splice(s,0,cw.push(jk(o,d,Math.abs(p-t)<uw&&r-y>uw?[t,Math.abs(h-t)<uw?f:r]:Math.abs(y-r)<uw&&n-p>uw?[Math.abs(f-r)<uw?h:n,r]:Math.abs(p-n)<uw&&y-e>uw?[n,Math.abs(h-n)<uw?f:e]:Math.abs(y-e)<uw&&p-t>uw?[Math.abs(f-e)<uw?h:t,e]:null))-1),++u);u&&(v=!1)}if(v){var m,b,x,_=1/0;for(i=0,v=null;i<g;++i)(a=ow[i])&&(x=(m=(o=a.site)[0]-t)*m+(b=o[1]-e)*b)<_&&(_=x,v=a);if(v){var k=[t,e],w=[t,r],E=[n,r],T=[n,e];v.halfedges.push(cw.push(jk(o=v.site,k,w))-1,cw.push(jk(o,w,E))-1,cw.push(jk(o,E,T))-1,cw.push(jk(o,T,k))-1)}}for(i=0;i<g;++i)(a=ow[i])&&(a.halfedges.length||delete ow[i])}(o,s,c,u)}this.edges=cw,this.cells=ow,aw=sw=cw=ow=null}fw.prototype={constructor:fw,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return qk(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(a=(i=n.halfedges).length)for(var i,a,o,s,c,u,l=n.site,h=-1,f=e[i[a-1]],d=f.left===l?f.right:f.left;++h<a;)o=d,d=(f=e[i[h]]).left===l?f.right:f.left,o&&d&&r<o.index&&r<d.index&&(c=o,u=d,((s=l)[0]-u[0])*(c[1]-s[1])-(s[0]-c[0])*(u[1]-s[1])<0)&&t.push([l.data,o.data,d.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,a=this,o=a._found||0,s=a.cells.length;!(i=a.cells[o]);)if(++o>=s)return null;var c=t-i.site[0],u=e-i.site[1],l=c*c+u*u;do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var c=t-s[0],u=e-s[1],h=c*c+u*u;h<l&&(l=h,o=s.index)}}))}while(null!==o);return a._found=r,null==n||l<=n*n?i.site:null}};var dw=function(){var t=Ok,e=Bk,n=null;function r(r){return new fw(r.map((function(n,i){var a=[Math.round(t(n,i,r)/uw)*uw,Math.round(e(n,i,r)/uw)*uw];return a.index=i,a.data=n,a})),n)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(e){return arguments.length?(t="function"==typeof e?e:Mk(+e),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:Mk(+t),r):e},r.extent=function(t){return arguments.length?(n=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(t){return arguments.length?(n=null==t?null:[[0,0],[+t[0],+t[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r},pw=function(t){return function(){return t}};function yw(t,e,n){this.target=t,this.type=e,this.transform=n}function gw(t,e,n){this.k=t,this.x=e,this.y=n}gw.prototype={constructor:gw,scale:function(t){return 1===t?this:new gw(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new gw(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var vw=new gw(1,0,0);function mw(t){for(;!t.__zoom;)if(!(t=t.parentNode))return vw;return t.__zoom}function bw(){ce.stopImmediatePropagation()}mw.prototype=gw.prototype;var xw=function(){ce.preventDefault(),ce.stopImmediatePropagation()};function _w(){return!ce.ctrlKey&&!ce.button}function kw(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function ww(){return this.__zoom||vw}function Ew(){return-ce.deltaY*(1===ce.deltaMode?.05:ce.deltaMode?1:.002)}function Tw(){return navigator.maxTouchPoints||"ontouchstart"in this}function Cw(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}var Sw=function(){var t,e,n=_w,r=kw,i=Cw,a=Ew,o=Tw,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,l=fp,h=lt("start","zoom","end"),f=0;function d(t){t.property("__zoom",ww).on("wheel.zoom",x).on("mousedown.zoom",_).on("dblclick.zoom",k).filter(o).on("touchstart.zoom",w).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new gw(e,t.x,t.y)}function y(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new gw(t.k,r,i)}function g(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function v(t,e,n){t.on("start.zoom",(function(){m(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){m(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,a=m(t,i),o=r.apply(t,i),s=null==n?g(o):"function"==typeof n?n.apply(t,i):n,c=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),u=t.__zoom,h="function"==typeof e?e.apply(t,i):e,f=l(u.invert(s).concat(c/u.k),h.invert(s).concat(c/h.k));return function(t){if(1===t)t=h;else{var e=f(t),n=c/e[2];t=new gw(n,s[0]-e[0]*n,s[1]-e[1]*n)}a.zoom(null,t)}}))}function m(t,e,n){return!n&&t.__zooming||new b(t,e)}function b(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function x(){if(n.apply(this,arguments)){var t=m(this,arguments),e=this.__zoom,r=Math.max(s[0],Math.min(s[1],e.k*Math.pow(2,a.apply(this,arguments)))),o=Nn(this);if(t.wheel)t.mouse[0][0]===o[0]&&t.mouse[0][1]===o[1]||(t.mouse[1]=e.invert(t.mouse[0]=o)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[o,e.invert(o)],or(this),t.start()}xw(),t.wheel=setTimeout(u,150),t.zoom("mouse",i(y(p(e,r),t.mouse[0],t.mouse[1]),t.extent,c))}function u(){t.wheel=null,t.end()}}function _(){if(!e&&n.apply(this,arguments)){var t=m(this,arguments,!0),r=ke(ce.view).on("mousemove.zoom",u,!0).on("mouseup.zoom",l,!0),a=Nn(this),o=ce.clientX,s=ce.clientY;Te(ce.view),bw(),t.mouse=[a,this.__zoom.invert(a)],or(this),t.start()}function u(){if(xw(),!t.moved){var e=ce.clientX-o,n=ce.clientY-s;t.moved=e*e+n*n>f}t.zoom("mouse",i(y(t.that.__zoom,t.mouse[0]=Nn(t.that),t.mouse[1]),t.extent,c))}function l(){r.on("mousemove.zoom mouseup.zoom",null),Ce(ce.view,t.moved),xw(),t.end()}}function k(){if(n.apply(this,arguments)){var t=this.__zoom,e=Nn(this),a=t.invert(e),o=t.k*(ce.shiftKey?.5:2),s=i(y(p(t,o),e,a),r.apply(this,arguments),c);xw(),u>0?ke(this).transition().duration(u).call(v,s,e):ke(this).call(d.transform,s)}}function w(){if(n.apply(this,arguments)){var e,r,i,a,o=ce.touches,s=o.length,c=m(this,arguments,ce.changedTouches.length===s);for(bw(),r=0;r<s;++r)i=o[r],a=[a=Bn(this,o,i.identifier),this.__zoom.invert(a),i.identifier],c.touch0?c.touch1||c.touch0[2]===a[2]||(c.touch1=a,c.taps=0):(c.touch0=a,e=!0,c.taps=1+!!t);t&&(t=clearTimeout(t)),e&&(c.taps<2&&(t=setTimeout((function(){t=null}),500)),or(this),c.start())}}function E(){if(this.__zooming){var e,n,r,a,o=m(this,arguments),s=ce.changedTouches,u=s.length;for(xw(),t&&(t=clearTimeout(t)),o.taps=0,e=0;e<u;++e)n=s[e],r=Bn(this,s,n.identifier),o.touch0&&o.touch0[2]===n.identifier?o.touch0[0]=r:o.touch1&&o.touch1[2]===n.identifier&&(o.touch1[0]=r);if(n=o.that.__zoom,o.touch1){var l=o.touch0[0],h=o.touch0[1],f=o.touch1[0],d=o.touch1[1],g=(g=f[0]-l[0])*g+(g=f[1]-l[1])*g,v=(v=d[0]-h[0])*v+(v=d[1]-h[1])*v;n=p(n,Math.sqrt(g/v)),r=[(l[0]+f[0])/2,(l[1]+f[1])/2],a=[(h[0]+d[0])/2,(h[1]+d[1])/2]}else{if(!o.touch0)return;r=o.touch0[0],a=o.touch0[1]}o.zoom("touch",i(y(n,r,a),o.extent,c))}}function T(){if(this.__zooming){var t,n,r=m(this,arguments),i=ce.changedTouches,a=i.length;for(bw(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),500),t=0;t<a;++t)n=i[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),2===r.taps){var o=ke(this).on("dblclick.zoom");o&&o.apply(this,arguments)}}}return d.transform=function(t,e,n){var r=t.selection?t.selection():t;r.property("__zoom",ww),t!==r?v(t,e,n):r.interrupt().each((function(){m(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},d.scaleBy=function(t,e,n){d.scaleTo(t,(function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n}),n)},d.scaleTo=function(t,e,n){d.transform(t,(function(){var t=r.apply(this,arguments),a=this.__zoom,o=null==n?g(t):"function"==typeof n?n.apply(this,arguments):n,s=a.invert(o),u="function"==typeof e?e.apply(this,arguments):e;return i(y(p(a,u),o,s),t,c)}),n)},d.translateBy=function(t,e,n){d.transform(t,(function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),c)}))},d.translateTo=function(t,e,n,a){d.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,s=null==a?g(t):"function"==typeof a?a.apply(this,arguments):a;return i(vw.translate(s[0],s[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)}),a)},b.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){pe(new yw(d,t,this.that.__zoom),h.apply,h,[t,this.that,this.args])}},d.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:pw(+t),d):a},d.filter=function(t){return arguments.length?(n="function"==typeof t?t:pw(!!t),d):n},d.touchable=function(t){return arguments.length?(o="function"==typeof t?t:pw(!!t),d):o},d.extent=function(t){return arguments.length?(r="function"==typeof t?t:pw([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),d):r},d.scaleExtent=function(t){return arguments.length?(s[0]=+t[0],s[1]=+t[1],d):[s[0],s[1]]},d.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],d):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},d.constrain=function(t){return arguments.length?(i=t,d):i},d.duration=function(t){return arguments.length?(u=+t,d):u},d.interpolate=function(t){return arguments.length?(l=t,d):l},d.on=function(){var t=h.on.apply(h,arguments);return t===h?d:t},d.clickDistance=function(t){return arguments.length?(f=(t=+t)*t,d):Math.sqrt(f)},d};n.d(e,"version",(function(){return"5.15.0"})),n.d(e,"bisect",(function(){return c})),n.d(e,"bisectRight",(function(){return o})),n.d(e,"bisectLeft",(function(){return s})),n.d(e,"ascending",(function(){return r})),n.d(e,"bisector",(function(){return i})),n.d(e,"cross",(function(){return h})),n.d(e,"descending",(function(){return f})),n.d(e,"deviation",(function(){return y})),n.d(e,"extent",(function(){return g})),n.d(e,"histogram",(function(){return O})),n.d(e,"thresholdFreedmanDiaconis",(function(){return N})),n.d(e,"thresholdScott",(function(){return D})),n.d(e,"thresholdSturges",(function(){return M})),n.d(e,"max",(function(){return L})),n.d(e,"mean",(function(){return I})),n.d(e,"median",(function(){return R})),n.d(e,"merge",(function(){return F})),n.d(e,"min",(function(){return P})),n.d(e,"pairs",(function(){return u})),n.d(e,"permute",(function(){return j})),n.d(e,"quantile",(function(){return B})),n.d(e,"range",(function(){return k})),n.d(e,"scan",(function(){return Y})),n.d(e,"shuffle",(function(){return z})),n.d(e,"sum",(function(){return U})),n.d(e,"ticks",(function(){return C})),n.d(e,"tickIncrement",(function(){return S})),n.d(e,"tickStep",(function(){return A})),n.d(e,"transpose",(function(){return $})),n.d(e,"variance",(function(){return p})),n.d(e,"zip",(function(){return W})),n.d(e,"axisTop",(function(){return tt})),n.d(e,"axisRight",(function(){return et})),n.d(e,"axisBottom",(function(){return nt})),n.d(e,"axisLeft",(function(){return rt})),n.d(e,"brush",(function(){return Ti})),n.d(e,"brushX",(function(){return wi})),n.d(e,"brushY",(function(){return Ei})),n.d(e,"brushSelection",(function(){return ki})),n.d(e,"chord",(function(){return Li})),n.d(e,"ribbon",(function(){return Gi})),n.d(e,"nest",(function(){return Ki})),n.d(e,"set",(function(){return oa})),n.d(e,"map",(function(){return Qi})),n.d(e,"keys",(function(){return sa})),n.d(e,"values",(function(){return ca})),n.d(e,"entries",(function(){return ua})),n.d(e,"color",(function(){return $e})),n.d(e,"rgb",(function(){return He})),n.d(e,"hsl",(function(){return tn})),n.d(e,"lab",(function(){return pa})),n.d(e,"hcl",(function(){return ka})),n.d(e,"lch",(function(){return _a})),n.d(e,"gray",(function(){return da})),n.d(e,"cubehelix",(function(){return Oa})),n.d(e,"contours",(function(){return Ya})),n.d(e,"contourDensity",(function(){return Va})),n.d(e,"dispatch",(function(){return lt})),n.d(e,"drag",(function(){return Ja})),n.d(e,"dragDisable",(function(){return Te})),n.d(e,"dragEnable",(function(){return Ce})),n.d(e,"dsvFormat",(function(){return oo})),n.d(e,"csvParse",(function(){return co})),n.d(e,"csvParseRows",(function(){return uo})),n.d(e,"csvFormat",(function(){return lo})),n.d(e,"csvFormatBody",(function(){return ho})),n.d(e,"csvFormatRows",(function(){return fo})),n.d(e,"csvFormatRow",(function(){return po})),n.d(e,"csvFormatValue",(function(){return yo})),n.d(e,"tsvParse",(function(){return vo})),n.d(e,"tsvParseRows",(function(){return mo})),n.d(e,"tsvFormat",(function(){return bo})),n.d(e,"tsvFormatBody",(function(){return xo})),n.d(e,"tsvFormatRows",(function(){return _o})),n.d(e,"tsvFormatRow",(function(){return ko})),n.d(e,"tsvFormatValue",(function(){return wo})),n.d(e,"autoType",(function(){return Eo})),n.d(e,"easeLinear",(function(){return Co})),n.d(e,"easeQuad",(function(){return Mo})),n.d(e,"easeQuadIn",(function(){return So})),n.d(e,"easeQuadOut",(function(){return Ao})),n.d(e,"easeQuadInOut",(function(){return Mo})),n.d(e,"easeCubic",(function(){return Vr})),n.d(e,"easeCubicIn",(function(){return qr})),n.d(e,"easeCubicOut",(function(){return Wr})),n.d(e,"easeCubicInOut",(function(){return Vr})),n.d(e,"easePoly",(function(){return No})),n.d(e,"easePolyIn",(function(){return Oo})),n.d(e,"easePolyOut",(function(){return Bo})),n.d(e,"easePolyInOut",(function(){return No})),n.d(e,"easeSin",(function(){return Fo})),n.d(e,"easeSinIn",(function(){return Io})),n.d(e,"easeSinOut",(function(){return Ro})),n.d(e,"easeSinInOut",(function(){return Fo})),n.d(e,"easeExp",(function(){return Yo})),n.d(e,"easeExpIn",(function(){return Po})),n.d(e,"easeExpOut",(function(){return jo})),n.d(e,"easeExpInOut",(function(){return Yo})),n.d(e,"easeCircle",(function(){return $o})),n.d(e,"easeCircleIn",(function(){return zo})),n.d(e,"easeCircleOut",(function(){return Uo})),n.d(e,"easeCircleInOut",(function(){return $o})),n.d(e,"easeBounce",(function(){return Wo})),n.d(e,"easeBounceIn",(function(){return qo})),n.d(e,"easeBounceOut",(function(){return Wo})),n.d(e,"easeBounceInOut",(function(){return Vo})),n.d(e,"easeBack",(function(){return Xo})),n.d(e,"easeBackIn",(function(){return Ho})),n.d(e,"easeBackOut",(function(){return Go})),n.d(e,"easeBackInOut",(function(){return Xo})),n.d(e,"easeElastic",(function(){return Ko})),n.d(e,"easeElasticIn",(function(){return Qo})),n.d(e,"easeElasticOut",(function(){return Ko})),n.d(e,"easeElasticInOut",(function(){return Jo})),n.d(e,"blob",(function(){return es})),n.d(e,"buffer",(function(){return rs})),n.d(e,"dsv",(function(){return ss})),n.d(e,"csv",(function(){return cs})),n.d(e,"tsv",(function(){return us})),n.d(e,"image",(function(){return ls})),n.d(e,"json",(function(){return fs})),n.d(e,"text",(function(){return as})),n.d(e,"xml",(function(){return ps})),n.d(e,"html",(function(){return ys})),n.d(e,"svg",(function(){return gs})),n.d(e,"forceCenter",(function(){return vs})),n.d(e,"forceCollide",(function(){return Os})),n.d(e,"forceLink",(function(){return Ds})),n.d(e,"forceManyBody",(function(){return Ps})),n.d(e,"forceRadial",(function(){return js})),n.d(e,"forceSimulation",(function(){return Fs})),n.d(e,"forceX",(function(){return Ys})),n.d(e,"forceY",(function(){return zs})),n.d(e,"formatDefaultLocale",(function(){return rc})),n.d(e,"format",(function(){return Xs})),n.d(e,"formatPrefix",(function(){return Zs})),n.d(e,"formatLocale",(function(){return nc})),n.d(e,"formatSpecifier",(function(){return Ws})),n.d(e,"FormatSpecifier",(function(){return Vs})),n.d(e,"precisionFixed",(function(){return ic})),n.d(e,"precisionPrefix",(function(){return ac})),n.d(e,"precisionRound",(function(){return oc})),n.d(e,"geoArea",(function(){return Qc})),n.d(e,"geoBounds",(function(){return $u})),n.d(e,"geoCentroid",(function(){return el})),n.d(e,"geoCircle",(function(){return fl})),n.d(e,"geoClipAntimeridian",(function(){return El})),n.d(e,"geoClipCircle",(function(){return Tl})),n.d(e,"geoClipExtent",(function(){return Ol})),n.d(e,"geoClipRectangle",(function(){return Cl})),n.d(e,"geoContains",(function(){return Gl})),n.d(e,"geoDistance",(function(){return jl})),n.d(e,"geoGraticule",(function(){return Ql})),n.d(e,"geoGraticule10",(function(){return Kl})),n.d(e,"geoInterpolate",(function(){return rh})),n.d(e,"geoLength",(function(){return Rl})),n.d(e,"geoPath",(function(){return ef})),n.d(e,"geoAlbers",(function(){return _f})),n.d(e,"geoAlbersUsa",(function(){return kf})),n.d(e,"geoAzimuthalEqualArea",(function(){return Cf})),n.d(e,"geoAzimuthalEqualAreaRaw",(function(){return Tf})),n.d(e,"geoAzimuthalEquidistant",(function(){return Af})),n.d(e,"geoAzimuthalEquidistantRaw",(function(){return Sf})),n.d(e,"geoConicConformal",(function(){return Lf})),n.d(e,"geoConicConformalRaw",(function(){return Df})),n.d(e,"geoConicEqualArea",(function(){return xf})),n.d(e,"geoConicEqualAreaRaw",(function(){return bf})),n.d(e,"geoConicEquidistant",(function(){return Pf})),n.d(e,"geoConicEquidistantRaw",(function(){return Ff})),n.d(e,"geoEqualEarth",(function(){return Wf})),n.d(e,"geoEqualEarthRaw",(function(){return qf})),n.d(e,"geoEquirectangular",(function(){return Rf})),n.d(e,"geoEquirectangularRaw",(function(){return If})),n.d(e,"geoGnomonic",(function(){return Hf})),n.d(e,"geoGnomonicRaw",(function(){return Vf})),n.d(e,"geoIdentity",(function(){return Xf})),n.d(e,"geoProjection",(function(){return gf})),n.d(e,"geoProjectionMutator",(function(){return vf})),n.d(e,"geoMercator",(function(){return Of})),n.d(e,"geoMercatorRaw",(function(){return Mf})),n.d(e,"geoNaturalEarth1",(function(){return Qf})),n.d(e,"geoNaturalEarth1Raw",(function(){return Zf})),n.d(e,"geoOrthographic",(function(){return Jf})),n.d(e,"geoOrthographicRaw",(function(){return Kf})),n.d(e,"geoStereographic",(function(){return ed})),n.d(e,"geoStereographicRaw",(function(){return td})),n.d(e,"geoTransverseMercator",(function(){return rd})),n.d(e,"geoTransverseMercatorRaw",(function(){return nd})),n.d(e,"geoRotation",(function(){return ul})),n.d(e,"geoStream",(function(){return $c})),n.d(e,"geoTransform",(function(){return nf})),n.d(e,"cluster",(function(){return sd})),n.d(e,"hierarchy",(function(){return ud})),n.d(e,"pack",(function(){return Ld})),n.d(e,"packSiblings",(function(){return Ad})),n.d(e,"packEnclose",(function(){return yd})),n.d(e,"partition",(function(){return Yd})),n.d(e,"stratify",(function(){return Wd})),n.d(e,"tree",(function(){return Kd})),n.d(e,"treemap",(function(){return rp})),n.d(e,"treemapBinary",(function(){return ip})),n.d(e,"treemapDice",(function(){return jd})),n.d(e,"treemapSlice",(function(){return Jd})),n.d(e,"treemapSliceDice",(function(){return ap})),n.d(e,"treemapSquarify",(function(){return np})),n.d(e,"treemapResquarify",(function(){return op})),n.d(e,"interpolate",(function(){return An})),n.d(e,"interpolateArray",(function(){return mn})),n.d(e,"interpolateBasis",(function(){return an})),n.d(e,"interpolateBasisClosed",(function(){return on})),n.d(e,"interpolateDate",(function(){return xn})),n.d(e,"interpolateDiscrete",(function(){return sp})),n.d(e,"interpolateHue",(function(){return cp})),n.d(e,"interpolateNumber",(function(){return _n})),n.d(e,"interpolateNumberArray",(function(){return gn})),n.d(e,"interpolateObject",(function(){return kn})),n.d(e,"interpolateRound",(function(){return up})),n.d(e,"interpolateString",(function(){return Sn})),n.d(e,"interpolateTransformCss",(function(){return hr})),n.d(e,"interpolateTransformSvg",(function(){return fr})),n.d(e,"interpolateZoom",(function(){return fp})),n.d(e,"interpolateRgb",(function(){return fn})),n.d(e,"interpolateRgbBasis",(function(){return pn})),n.d(e,"interpolateRgbBasisClosed",(function(){return yn})),n.d(e,"interpolateHsl",(function(){return pp})),n.d(e,"interpolateHslLong",(function(){return yp})),n.d(e,"interpolateLab",(function(){return gp})),n.d(e,"interpolateHcl",(function(){return mp})),n.d(e,"interpolateHclLong",(function(){return bp})),n.d(e,"interpolateCubehelix",(function(){return _p})),n.d(e,"interpolateCubehelixLong",(function(){return kp})),n.d(e,"piecewise",(function(){return wp})),n.d(e,"quantize",(function(){return Ep})),n.d(e,"path",(function(){return Ui})),n.d(e,"polygonArea",(function(){return Tp})),n.d(e,"polygonCentroid",(function(){return Cp})),n.d(e,"polygonHull",(function(){return Mp})),n.d(e,"polygonContains",(function(){return Op})),n.d(e,"polygonLength",(function(){return Bp})),n.d(e,"quadtree",(function(){return Es})),n.d(e,"randomUniform",(function(){return Dp})),n.d(e,"randomNormal",(function(){return Lp})),n.d(e,"randomLogNormal",(function(){return Ip})),n.d(e,"randomBates",(function(){return Fp})),n.d(e,"randomIrwinHall",(function(){return Rp})),n.d(e,"randomExponential",(function(){return Pp})),n.d(e,"scaleBand",(function(){return Vp})),n.d(e,"scalePoint",(function(){return Gp})),n.d(e,"scaleIdentity",(function(){return cy})),n.d(e,"scaleLinear",(function(){return sy})),n.d(e,"scaleLog",(function(){return vy})),n.d(e,"scaleSymlog",(function(){return _y})),n.d(e,"scaleOrdinal",(function(){return Wp})),n.d(e,"scaleImplicit",(function(){return qp})),n.d(e,"scalePow",(function(){return Cy})),n.d(e,"scaleSqrt",(function(){return Sy})),n.d(e,"scaleQuantile",(function(){return Ay})),n.d(e,"scaleQuantize",(function(){return My})),n.d(e,"scaleThreshold",(function(){return Oy})),n.d(e,"scaleTime",(function(){return sm})),n.d(e,"scaleUtc",(function(){return vm})),n.d(e,"scaleSequential",(function(){return xm})),n.d(e,"scaleSequentialLog",(function(){return _m})),n.d(e,"scaleSequentialPow",(function(){return wm})),n.d(e,"scaleSequentialSqrt",(function(){return Em})),n.d(e,"scaleSequentialSymlog",(function(){return km})),n.d(e,"scaleSequentialQuantile",(function(){return Tm})),n.d(e,"scaleDiverging",(function(){return Sm})),n.d(e,"scaleDivergingLog",(function(){return Am})),n.d(e,"scaleDivergingPow",(function(){return Om})),n.d(e,"scaleDivergingSqrt",(function(){return Bm})),n.d(e,"scaleDivergingSymlog",(function(){return Mm})),n.d(e,"tickFormat",(function(){return ay})),n.d(e,"schemeCategory10",(function(){return Dm})),n.d(e,"schemeAccent",(function(){return Lm})),n.d(e,"schemeDark2",(function(){return Im})),n.d(e,"schemePaired",(function(){return Rm})),n.d(e,"schemePastel1",(function(){return Fm})),n.d(e,"schemePastel2",(function(){return Pm})),n.d(e,"schemeSet1",(function(){return jm})),n.d(e,"schemeSet2",(function(){return Ym})),n.d(e,"schemeSet3",(function(){return zm})),n.d(e,"schemeTableau10",(function(){return Um})),n.d(e,"interpolateBrBG",(function(){return Wm})),n.d(e,"schemeBrBG",(function(){return qm})),n.d(e,"interpolatePRGn",(function(){return Hm})),n.d(e,"schemePRGn",(function(){return Vm})),n.d(e,"interpolatePiYG",(function(){return Xm})),n.d(e,"schemePiYG",(function(){return Gm})),n.d(e,"interpolatePuOr",(function(){return Qm})),n.d(e,"schemePuOr",(function(){return Zm})),n.d(e,"interpolateRdBu",(function(){return Jm})),n.d(e,"schemeRdBu",(function(){return Km})),n.d(e,"interpolateRdGy",(function(){return eb})),n.d(e,"schemeRdGy",(function(){return tb})),n.d(e,"interpolateRdYlBu",(function(){return rb})),n.d(e,"schemeRdYlBu",(function(){return nb})),n.d(e,"interpolateRdYlGn",(function(){return ab})),n.d(e,"schemeRdYlGn",(function(){return ib})),n.d(e,"interpolateSpectral",(function(){return sb})),n.d(e,"schemeSpectral",(function(){return ob})),n.d(e,"interpolateBuGn",(function(){return ub})),n.d(e,"schemeBuGn",(function(){return cb})),n.d(e,"interpolateBuPu",(function(){return hb})),n.d(e,"schemeBuPu",(function(){return lb})),n.d(e,"interpolateGnBu",(function(){return db})),n.d(e,"schemeGnBu",(function(){return fb})),n.d(e,"interpolateOrRd",(function(){return yb})),n.d(e,"schemeOrRd",(function(){return pb})),n.d(e,"interpolatePuBuGn",(function(){return vb})),n.d(e,"schemePuBuGn",(function(){return gb})),n.d(e,"interpolatePuBu",(function(){return bb})),n.d(e,"schemePuBu",(function(){return mb})),n.d(e,"interpolatePuRd",(function(){return _b})),n.d(e,"schemePuRd",(function(){return xb})),n.d(e,"interpolateRdPu",(function(){return wb})),n.d(e,"schemeRdPu",(function(){return kb})),n.d(e,"interpolateYlGnBu",(function(){return Tb})),n.d(e,"schemeYlGnBu",(function(){return Eb})),n.d(e,"interpolateYlGn",(function(){return Sb})),n.d(e,"schemeYlGn",(function(){return Cb})),n.d(e,"interpolateYlOrBr",(function(){return Mb})),n.d(e,"schemeYlOrBr",(function(){return Ab})),n.d(e,"interpolateYlOrRd",(function(){return Bb})),n.d(e,"schemeYlOrRd",(function(){return Ob})),n.d(e,"interpolateBlues",(function(){return Db})),n.d(e,"schemeBlues",(function(){return Nb})),n.d(e,"interpolateGreens",(function(){return Ib})),n.d(e,"schemeGreens",(function(){return Lb})),n.d(e,"interpolateGreys",(function(){return Fb})),n.d(e,"schemeGreys",(function(){return Rb})),n.d(e,"interpolatePurples",(function(){return jb})),n.d(e,"schemePurples",(function(){return Pb})),n.d(e,"interpolateReds",(function(){return zb})),n.d(e,"schemeReds",(function(){return Yb})),n.d(e,"interpolateOranges",(function(){return $b})),n.d(e,"schemeOranges",(function(){return Ub})),n.d(e,"interpolateCividis",(function(){return qb})),n.d(e,"interpolateCubehelixDefault",(function(){return Wb})),n.d(e,"interpolateRainbow",(function(){return Xb})),n.d(e,"interpolateWarm",(function(){return Vb})),n.d(e,"interpolateCool",(function(){return Hb})),n.d(e,"interpolateSinebow",(function(){return Jb})),n.d(e,"interpolateTurbo",(function(){return tx})),n.d(e,"interpolateViridis",(function(){return nx})),n.d(e,"interpolateMagma",(function(){return rx})),n.d(e,"interpolateInferno",(function(){return ix})),n.d(e,"interpolatePlasma",(function(){return ax})),n.d(e,"create",(function(){return ox})),n.d(e,"creator",(function(){return ne})),n.d(e,"local",(function(){return cx})),n.d(e,"matcher",(function(){return yt})),n.d(e,"mouse",(function(){return Nn})),n.d(e,"namespace",(function(){return wt})),n.d(e,"namespaces",(function(){return kt})),n.d(e,"clientPoint",(function(){return On})),n.d(e,"select",(function(){return ke})),n.d(e,"selectAll",(function(){return lx})),n.d(e,"selection",(function(){return _e})),n.d(e,"selector",(function(){return ft})),n.d(e,"selectorAll",(function(){return pt})),n.d(e,"style",(function(){return Lt})),n.d(e,"touch",(function(){return Bn})),n.d(e,"touches",(function(){return hx})),n.d(e,"window",(function(){return Ot})),n.d(e,"event",(function(){return ce})),n.d(e,"customEvent",(function(){return pe})),n.d(e,"arc",(function(){return Nx})),n.d(e,"area",(function(){return Px})),n.d(e,"line",(function(){return Fx})),n.d(e,"pie",(function(){return zx})),n.d(e,"areaRadial",(function(){return Hx})),n.d(e,"radialArea",(function(){return Hx})),n.d(e,"lineRadial",(function(){return Vx})),n.d(e,"radialLine",(function(){return Vx})),n.d(e,"pointRadial",(function(){return Gx})),n.d(e,"linkHorizontal",(function(){return n_})),n.d(e,"linkVertical",(function(){return r_})),n.d(e,"linkRadial",(function(){return i_})),n.d(e,"symbol",(function(){return k_})),n.d(e,"symbols",(function(){return __})),n.d(e,"symbolCircle",(function(){return a_})),n.d(e,"symbolCross",(function(){return o_})),n.d(e,"symbolDiamond",(function(){return u_})),n.d(e,"symbolSquare",(function(){return p_})),n.d(e,"symbolStar",(function(){return d_})),n.d(e,"symbolTriangle",(function(){return g_})),n.d(e,"symbolWye",(function(){return x_})),n.d(e,"curveBasisClosed",(function(){return A_})),n.d(e,"curveBasisOpen",(function(){return O_})),n.d(e,"curveBasis",(function(){return C_})),n.d(e,"curveBundle",(function(){return N_})),n.d(e,"curveCardinalClosed",(function(){return F_})),n.d(e,"curveCardinalOpen",(function(){return j_})),n.d(e,"curveCardinal",(function(){return I_})),n.d(e,"curveCatmullRomClosed",(function(){return q_})),n.d(e,"curveCatmullRomOpen",(function(){return V_})),n.d(e,"curveCatmullRom",(function(){return U_})),n.d(e,"curveLinearClosed",(function(){return G_})),n.d(e,"curveLinear",(function(){return Lx})),n.d(e,"curveMonotoneX",(function(){return nk})),n.d(e,"curveMonotoneY",(function(){return rk})),n.d(e,"curveNatural",(function(){return ok})),n.d(e,"curveStep",(function(){return ck})),n.d(e,"curveStepAfter",(function(){return lk})),n.d(e,"curveStepBefore",(function(){return uk})),n.d(e,"stack",(function(){return pk})),n.d(e,"stackOffsetExpand",(function(){return yk})),n.d(e,"stackOffsetDiverging",(function(){return gk})),n.d(e,"stackOffsetNone",(function(){return hk})),n.d(e,"stackOffsetSilhouette",(function(){return vk})),n.d(e,"stackOffsetWiggle",(function(){return mk})),n.d(e,"stackOrderAppearance",(function(){return bk})),n.d(e,"stackOrderAscending",(function(){return _k})),n.d(e,"stackOrderDescending",(function(){return wk})),n.d(e,"stackOrderInsideOut",(function(){return Ek})),n.d(e,"stackOrderNone",(function(){return fk})),n.d(e,"stackOrderReverse",(function(){return Tk})),n.d(e,"timeInterval",(function(){return Dy})),n.d(e,"timeMillisecond",(function(){return pg})),n.d(e,"timeMilliseconds",(function(){return yg})),n.d(e,"utcMillisecond",(function(){return pg})),n.d(e,"utcMilliseconds",(function(){return yg})),n.d(e,"timeSecond",(function(){return hg})),n.d(e,"timeSeconds",(function(){return fg})),n.d(e,"utcSecond",(function(){return hg})),n.d(e,"utcSeconds",(function(){return fg})),n.d(e,"timeMinute",(function(){return cg})),n.d(e,"timeMinutes",(function(){return ug})),n.d(e,"timeHour",(function(){return ag})),n.d(e,"timeHours",(function(){return og})),n.d(e,"timeDay",(function(){return ng})),n.d(e,"timeDays",(function(){return rg})),n.d(e,"timeWeek",(function(){return zy})),n.d(e,"timeWeeks",(function(){return Gy})),n.d(e,"timeSunday",(function(){return zy})),n.d(e,"timeSundays",(function(){return Gy})),n.d(e,"timeMonday",(function(){return Uy})),n.d(e,"timeMondays",(function(){return Xy})),n.d(e,"timeTuesday",(function(){return $y})),n.d(e,"timeTuesdays",(function(){return Zy})),n.d(e,"timeWednesday",(function(){return qy})),n.d(e,"timeWednesdays",(function(){return Qy})),n.d(e,"timeThursday",(function(){return Wy})),n.d(e,"timeThursdays",(function(){return Ky})),n.d(e,"timeFriday",(function(){return Vy})),n.d(e,"timeFridays",(function(){return Jy})),n.d(e,"timeSaturday",(function(){return Hy})),n.d(e,"timeSaturdays",(function(){return tg})),n.d(e,"timeMonth",(function(){return Py})),n.d(e,"timeMonths",(function(){return jy})),n.d(e,"timeYear",(function(){return Iy})),n.d(e,"timeYears",(function(){return Ry})),n.d(e,"utcMinute",(function(){return ym})),n.d(e,"utcMinutes",(function(){return gm})),n.d(e,"utcHour",(function(){return fm})),n.d(e,"utcHours",(function(){return dm})),n.d(e,"utcDay",(function(){return Ng})),n.d(e,"utcDays",(function(){return Dg})),n.d(e,"utcWeek",(function(){return vg})),n.d(e,"utcWeeks",(function(){return Eg})),n.d(e,"utcSunday",(function(){return vg})),n.d(e,"utcSundays",(function(){return Eg})),n.d(e,"utcMonday",(function(){return mg})),n.d(e,"utcMondays",(function(){return Tg})),n.d(e,"utcTuesday",(function(){return bg})),n.d(e,"utcTuesdays",(function(){return Cg})),n.d(e,"utcWednesday",(function(){return xg})),n.d(e,"utcWednesdays",(function(){return Sg})),n.d(e,"utcThursday",(function(){return _g})),n.d(e,"utcThursdays",(function(){return Ag})),n.d(e,"utcFriday",(function(){return kg})),n.d(e,"utcFridays",(function(){return Mg})),n.d(e,"utcSaturday",(function(){return wg})),n.d(e,"utcSaturdays",(function(){return Og})),n.d(e,"utcMonth",(function(){return um})),n.d(e,"utcMonths",(function(){return lm})),n.d(e,"utcYear",(function(){return Ig})),n.d(e,"utcYears",(function(){return Rg})),n.d(e,"timeFormatDefaultLocale",(function(){return rm})),n.d(e,"timeFormat",(function(){return Ug})),n.d(e,"timeParse",(function(){return $g})),n.d(e,"utcFormat",(function(){return qg})),n.d(e,"utcParse",(function(){return Wg})),n.d(e,"timeFormatLocale",(function(){return Yg})),n.d(e,"isoFormat",(function(){return Ck})),n.d(e,"isoParse",(function(){return Sk})),n.d(e,"now",(function(){return zn})),n.d(e,"timer",(function(){return qn})),n.d(e,"timerFlush",(function(){return Wn})),n.d(e,"timeout",(function(){return Xn})),n.d(e,"interval",(function(){return Ak})),n.d(e,"transition",(function(){return zr})),n.d(e,"active",(function(){return Zr})),n.d(e,"interrupt",(function(){return or})),n.d(e,"voronoi",(function(){return dw})),n.d(e,"zoom",(function(){return Sw})),n.d(e,"zoomTransform",(function(){return mw})),n.d(e,"zoomIdentity",(function(){return vw}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(n(172))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,18],u=[1,20],l=[1,21],h=[1,22],f=[1,24],d=[1,25],p=[1,26],y=[1,27],g=[1,28],v=[1,29],m=[1,32],b=[1,33],x=[1,36],_=[1,4,5,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,58],k=[1,44],w=[4,5,16,21,22,23,25,27,28,29,30,31,33,37,48,58],E=[4,5,16,21,22,23,25,27,28,29,30,31,33,36,37,48,58],T=[4,5,16,21,22,23,25,27,28,29,30,31,33,35,37,48,58],C=[46,47,48],S=[1,4,5,7,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,58],A={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,":":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,signal:20,autonumber:21,activate:22,deactivate:23,note_statement:24,title:25,text2:26,loop:27,end:28,rect:29,opt:30,alt:31,else_sections:32,par:33,par_sections:34,and:35,else:36,note:37,placement:38,over:39,actor_pair:40,spaceList:41,",":42,left_of:43,right_of:44,signaltype:45,"+":46,"-":47,ACTOR:48,SOLID_OPEN_ARROW:49,DOTTED_OPEN_ARROW:50,SOLID_ARROW:51,DOTTED_ARROW:52,SOLID_CROSS:53,DOTTED_CROSS:54,SOLID_POINT:55,DOTTED_POINT:56,TXT:57,open_directive:58,type_directive:59,arg_directive:60,close_directive:61,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",21:"autonumber",22:"activate",23:"deactivate",25:"title",27:"loop",28:"end",29:"rect",30:"opt",31:"alt",33:"par",35:"and",36:"else",37:"note",39:"over",42:",",43:"left_of",44:"right_of",46:"+",47:"-",48:"ACTOR",49:"SOLID_OPEN_ARROW",50:"DOTTED_OPEN_ARROW",51:"SOLID_ARROW",52:"DOTTED_ARROW",53:"SOLID_CROSS",54:"DOTTED_CROSS",55:"SOLID_POINT",56:"DOTTED_POINT",57:"TXT",58:"open_directive",59:"type_directive",60:"arg_directive",61:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,2],[10,1],[10,3],[10,3],[10,2],[10,3],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[34,1],[34,4],[32,1],[32,4],[24,4],[24,4],[41,2],[41,1],[40,3],[40,1],[38,1],[38,1],[20,5],[20,5],[20,4],[17,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[26,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.apply(a[s]),a[s];case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:this.$=[];break;case 12:a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 13:this.$=a[s-1];break;case 15:r.enableSequenceNumbers();break;case 16:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]};break;case 17:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1]};break;case 19:this.$=[{type:"setTitle",text:a[s-1]}];break;case 20:a[s-1].unshift({type:"loopStart",loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:"loopEnd",loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 21:a[s-1].unshift({type:"rectStart",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:"rectEnd",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 22:a[s-1].unshift({type:"optStart",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:"optEnd",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 23:a[s-1].unshift({type:"altStart",altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 24:a[s-1].unshift({type:"parStart",parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 27:this.$=a[s-3].concat([{type:"and",parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 29:this.$=a[s-3].concat([{type:"else",altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 30:this.$=[a[s-1],{type:"addNote",placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 31:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 34:this.$=[a[s-2],a[s]];break;case 35:this.$=a[s];break;case 36:this.$=r.PLACEMENT.LEFTOF;break;case 37:this.$=r.PLACEMENT.RIGHTOF;break;case 38:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]}];break;case 39:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4]}];break;case 40:this.$=[a[s-3],a[s-1],{type:"addMessage",from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 41:this.$={type:"addActor",actor:a[s]};break;case 42:this.$=r.LINETYPE.SOLID_OPEN;break;case 43:this.$=r.LINETYPE.DOTTED_OPEN;break;case 44:this.$=r.LINETYPE.SOLID;break;case 45:this.$=r.LINETYPE.DOTTED;break;case 46:this.$=r.LINETYPE.SOLID_CROSS;break;case 47:this.$=r.LINETYPE.DOTTED_CROSS;break;case 48:this.$=r.LINETYPE.SOLID_POINT;break;case 49:this.$=r.LINETYPE.DOTTED_POINT;break;case 50:this.$=r.parseMessage(a[s].trim().substring(1));break;case 51:r.parseDirective("%%{","open_directive");break;case 52:r.parseDirective(a[s],"type_directive");break;case 53:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 54:r.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:e,5:n,6:4,7:r,11:6,58:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,11:6,58:i},{3:9,4:e,5:n,6:4,7:r,11:6,58:i},{3:10,4:e,5:n,6:4,7:r,11:6,58:i},t([1,4,5,16,21,22,23,25,27,29,30,31,33,37,48,58],a,{8:11}),{12:12,59:[1,13]},{59:[2,51]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,29:p,30:y,31:g,33:v,37:m,48:b,58:i},{13:34,14:[1,35],61:x},t([14,61],[2,52]),t(_,[2,6]),{6:30,10:37,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,29:p,30:y,31:g,33:v,37:m,48:b,58:i},t(_,[2,8]),t(_,[2,9]),{17:38,48:b},{5:[1,39]},t(_,[2,15]),{17:40,48:b},{17:41,48:b},{5:[1,42]},{26:43,57:k},{19:[1,45]},{19:[1,46]},{19:[1,47]},{19:[1,48]},{19:[1,49]},t(_,[2,25]),{45:50,49:[1,51],50:[1,52],51:[1,53],52:[1,54],53:[1,55],54:[1,56],55:[1,57],56:[1,58]},{38:59,39:[1,60],43:[1,61],44:[1,62]},t([5,18,42,49,50,51,52,53,54,55,56,57],[2,41]),{5:[1,63]},{15:64,60:[1,65]},{5:[2,54]},t(_,[2,7]),{5:[1,67],18:[1,66]},t(_,[2,14]),{5:[1,68]},{5:[1,69]},t(_,[2,18]),{5:[1,70]},{5:[2,50]},t(w,a,{8:71}),t(w,a,{8:72}),t(w,a,{8:73}),t(E,a,{32:74,8:75}),t(T,a,{34:76,8:77}),{17:80,46:[1,78],47:[1,79],48:b},t(C,[2,42]),t(C,[2,43]),t(C,[2,44]),t(C,[2,45]),t(C,[2,46]),t(C,[2,47]),t(C,[2,48]),t(C,[2,49]),{17:81,48:b},{17:83,40:82,48:b},{48:[2,36]},{48:[2,37]},t(S,[2,10]),{13:84,61:x},{61:[2,53]},{19:[1,85]},t(_,[2,13]),t(_,[2,16]),t(_,[2,17]),t(_,[2,19]),{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[1,86],29:p,30:y,31:g,33:v,37:m,48:b,58:i},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[1,87],29:p,30:y,31:g,33:v,37:m,48:b,58:i},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[1,88],29:p,30:y,31:g,33:v,37:m,48:b,58:i},{28:[1,89]},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[2,28],29:p,30:y,31:g,33:v,36:[1,90],37:m,48:b,58:i},{28:[1,91]},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[2,26],29:p,30:y,31:g,33:v,35:[1,92],37:m,48:b,58:i},{17:93,48:b},{17:94,48:b},{26:95,57:k},{26:96,57:k},{26:97,57:k},{42:[1,98],57:[2,35]},{5:[1,99]},{5:[1,100]},t(_,[2,20]),t(_,[2,21]),t(_,[2,22]),t(_,[2,23]),{19:[1,101]},t(_,[2,24]),{19:[1,102]},{26:103,57:k},{26:104,57:k},{5:[2,40]},{5:[2,30]},{5:[2,31]},{17:105,48:b},t(S,[2,11]),t(_,[2,12]),t(E,a,{8:75,32:106}),t(T,a,{8:77,34:107}),{5:[2,38]},{5:[2,39]},{57:[2,34]},{28:[2,29]},{28:[2,27]}],defaultActions:{7:[2,51],8:[2,1],9:[2,2],10:[2,3],36:[2,54],44:[2,50],61:[2,36],62:[2,37],65:[2,53],95:[2,40],96:[2,30],97:[2,31],103:[2,38],104:[2,39],105:[2,34],106:[2,29],107:[2,27]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},M={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),58;case 1:return this.begin("type_directive"),59;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),61;case 4:return 60;case 5:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return this.begin("ID"),16;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),48;case 13:return this.popState(),this.popState(),this.begin("LINE"),18;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),27;case 16:return this.begin("LINE"),29;case 17:return this.begin("LINE"),30;case 18:return this.begin("LINE"),31;case 19:return this.begin("LINE"),36;case 20:return this.begin("LINE"),33;case 21:return this.begin("LINE"),35;case 22:return this.popState(),19;case 23:return 28;case 24:return 43;case 25:return 44;case 26:return 39;case 27:return 37;case 28:return this.begin("ID"),22;case 29:return this.begin("ID"),23;case 30:return 25;case 31:return 7;case 32:return 21;case 33:return 42;case 34:return 5;case 35:return e.yytext=e.yytext.trim(),48;case 36:return 51;case 37:return 52;case 38:return 49;case 39:return 50;case 40:return 53;case 41:return 54;case 42:return 55;case 43:return 56;case 44:return 57;case 45:return 46;case 46:return 47;case 47:return 5;case 48:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:participant\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,12],inclusive:!1},ALIAS:{rules:[7,8,13,14],inclusive:!1},LINE:{rules:[7,8,22],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}};function O(){this.yy={}}return A.lexer=M,O.prototype=A,A.Parser=O,new O}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){var r=n(199);t.exports={Graph:r.Graph,json:n(302),alg:n(303),version:r.version}},function(t,e,n){var r;try{r={cloneDeep:n(314),constant:n(87),defaults:n(155),each:n(88),filter:n(129),find:n(315),flatten:n(157),forEach:n(127),forIn:n(320),has:n(94),isUndefined:n(140),last:n(321),map:n(141),mapValues:n(322),max:n(323),merge:n(325),min:n(330),minBy:n(331),now:n(332),pick:n(162),range:n(163),reduce:n(143),sortBy:n(339),uniqueId:n(164),values:n(148),zipObject:n(344)}}catch(t){}r||(r=window._),t.exports=r},function(t,e){var n=Array.isArray;t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){
-/**
- * @license
- * Copyright (c) 2012-2013 Chris Pettitt
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-t.exports={graphlib:n(312),dagre:n(154),intersect:n(369),render:n(371),util:n(14),version:n(383)}},function(t,e,n){"use strict";var r=n(4),i=n(20).Graph;function a(t,e,n,i){var a;do{a=r.uniqueId(i)}while(t.hasNode(a));return n.dummy=e,t.setNode(a,n),a}function o(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}t.exports={addDummyNode:a,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=u*o/s,r=u):(o<0&&(c=-c),n=c,r=c*s/o);return{x:i+n,y:a+r}},buildLayerMatrix:function(t){var e=r.map(r.range(o(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),a=i.rank;r.isUndefined(a)||(e[a][i.order]=n)})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,a=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%a!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return a(t,"border",i,e)},maxRank:o,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},function(t,e,n){t.exports={graphlib:n(20),layout:n(313),debug:n(367),util:{time:n(8).time,notime:n(8).notime},version:n(368)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(173),i=n(174),a=n(175),o={channel:r.default,lang:i.default,unit:a.default};e.default=o},function(t,e){var n,r,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(t){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var c,u=[],l=!1,h=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(f);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function y(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new p(t,e)),1!==u.length||l||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){var r;try{r={clone:n(200),constant:n(87),each:n(88),filter:n(129),has:n(94),isArray:n(5),isEmpty:n(277),isFunction:n(38),isUndefined:n(140),keys:n(30),map:n(141),reduce:n(143),size:n(280),transform:n(286),union:n(287),values:n(148)}}catch(t){}r||(r=window._),t.exports=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(44);t.exports={isSubgraph:function(t,e){return!!t.children(e).length},edgeToId:function(t){return a(t.v)+":"+a(t.w)+":"+a(t.name)},applyStyle:function(t,e){e&&t.attr("style",e)},applyClass:function(t,e,n){e&&t.attr("class",e).attr("class",n+" "+t.attr("class"))},applyTransition:function(t,e){var n=e.graph();if(r.isPlainObject(n)){var i=n.transition;if(r.isFunction(i))return i(t)}return t}};var i=/:/g;function a(t){return t?String(t).replace(i,"\\:"):""}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,7],n=[1,6],r=[1,14],i=[1,25],a=[1,28],o=[1,26],s=[1,27],c=[1,29],u=[1,30],l=[1,31],h=[1,32],f=[1,35],d=[1,36],p=[1,37],y=[1,38],g=[10,19],v=[1,50],m=[1,51],b=[1,52],x=[1,53],_=[1,54],k=[1,55],w=[10,19,26,33,34,42,45,46,47,48,49,50,55,57],E=[10,19,24,26,33,34,38,42,45,46,47,48,49,50,55,57,72,73,74,75],T=[10,13,17,19],C=[42,72,73,74,75],S=[42,49,50,72,73,74,75],A=[42,45,46,47,48,72,73,74,75],M=[10,19,26],O=[1,87],B={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,graphConfig:6,openDirective:7,typeDirective:8,closeDirective:9,NEWLINE:10,":":11,argDirective:12,open_directive:13,type_directive:14,arg_directive:15,close_directive:16,CLASS_DIAGRAM:17,statements:18,EOF:19,statement:20,className:21,alphaNumToken:22,classLiteralName:23,GENERICTYPE:24,relationStatement:25,LABEL:26,classStatement:27,methodStatement:28,annotationStatement:29,clickStatement:30,cssClassStatement:31,CLASS:32,STYLE_SEPARATOR:33,STRUCT_START:34,members:35,STRUCT_STOP:36,ANNOTATION_START:37,ANNOTATION_END:38,MEMBER:39,SEPARATOR:40,relation:41,STR:42,relationType:43,lineType:44,AGGREGATION:45,EXTENSION:46,COMPOSITION:47,DEPENDENCY:48,LINE:49,DOTTED_LINE:50,CALLBACK:51,LINK:52,LINK_TARGET:53,CLICK:54,CALLBACK_NAME:55,CALLBACK_ARGS:56,HREF:57,CSSCLASS:58,commentToken:59,textToken:60,graphCodeTokens:61,textNoTagsToken:62,TAGSTART:63,TAGEND:64,"==":65,"--":66,PCT:67,DEFAULT:68,SPACE:69,MINUS:70,keywords:71,UNICODE_TEXT:72,NUM:73,ALPHA:74,BQUOTE_STR:75,$accept:0,$end:1},terminals_:{2:"error",10:"NEWLINE",11:":",13:"open_directive",14:"type_directive",15:"arg_directive",16:"close_directive",17:"CLASS_DIAGRAM",19:"EOF",24:"GENERICTYPE",26:"LABEL",32:"CLASS",33:"STYLE_SEPARATOR",34:"STRUCT_START",36:"STRUCT_STOP",37:"ANNOTATION_START",38:"ANNOTATION_END",39:"MEMBER",40:"SEPARATOR",42:"STR",45:"AGGREGATION",46:"EXTENSION",47:"COMPOSITION",48:"DEPENDENCY",49:"LINE",50:"DOTTED_LINE",51:"CALLBACK",52:"LINK",53:"LINK_TARGET",54:"CLICK",55:"CALLBACK_NAME",56:"CALLBACK_ARGS",57:"HREF",58:"CSSCLASS",61:"graphCodeTokens",63:"TAGSTART",64:"TAGEND",65:"==",66:"--",67:"PCT",68:"DEFAULT",69:"SPACE",70:"MINUS",71:"keywords",72:"UNICODE_TEXT",73:"NUM",74:"ALPHA",75:"BQUOTE_STR"},productions_:[0,[3,1],[3,2],[4,1],[5,4],[5,6],[7,1],[8,1],[12,1],[9,1],[6,4],[18,1],[18,2],[18,3],[21,1],[21,1],[21,2],[21,2],[21,2],[20,1],[20,2],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[27,2],[27,4],[27,5],[27,7],[29,4],[35,1],[35,2],[28,1],[28,2],[28,1],[28,1],[25,3],[25,4],[25,4],[25,5],[41,3],[41,2],[41,2],[41,1],[43,1],[43,1],[43,1],[43,1],[44,1],[44,1],[30,3],[30,4],[30,3],[30,4],[30,4],[30,5],[30,3],[30,4],[30,4],[30,5],[30,3],[30,4],[30,4],[30,5],[31,3],[59,1],[59,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[62,1],[62,1],[62,1],[62,1],[22,1],[22,1],[22,1],[23,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:r.parseDirective("%%{","open_directive");break;case 7:r.parseDirective(a[s],"type_directive");break;case 8:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 9:r.parseDirective("}%%","close_directive","class");break;case 14:case 15:this.$=a[s];break;case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+"~"+a[s];break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 27:r.addClass(a[s]);break;case 28:r.addClass(a[s-2]),r.setCssClass(a[s-2],a[s]);break;case 29:r.addClass(a[s-3]),r.addMembers(a[s-3],a[s-1]);break;case 30:r.addClass(a[s-5]),r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 31:r.addAnnotation(a[s],a[s-2]);break;case 32:this.$=[a[s]];break;case 33:a[s].push(a[s-1]),this.$=a[s];break;case 34:break;case 35:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 36:case 37:break;case 38:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 39:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:"none"};break;case 40:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:"none",relationTitle2:a[s-1]};break;case 41:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 42:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 43:this.$={type1:"none",type2:a[s],lineType:a[s-1]};break;case 44:this.$={type1:a[s-1],type2:"none",lineType:a[s]};break;case 45:this.$={type1:"none",type2:"none",lineType:a[s]};break;case 46:this.$=r.relationType.AGGREGATION;break;case 47:this.$=r.relationType.EXTENSION;break;case 48:this.$=r.relationType.COMPOSITION;break;case 49:this.$=r.relationType.DEPENDENCY;break;case 50:this.$=r.lineType.LINE;break;case 51:this.$=r.lineType.DOTTED_LINE;break;case 52:case 58:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 53:case 59:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 54:case 62:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 55:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 56:case 64:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 57:case 65:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 60:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 61:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 63:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 66:r.setCssClass(a[s-1],a[s])}},table:[{3:1,4:2,5:3,6:4,7:5,13:e,17:n},{1:[3]},{1:[2,1]},{3:8,4:2,5:3,6:4,7:5,13:e,17:n},{1:[2,3]},{8:9,14:[1,10]},{10:[1,11]},{14:[2,6]},{1:[2,2]},{9:12,11:[1,13],16:r},t([11,16],[2,7]),{5:23,7:5,13:e,18:15,20:16,21:24,22:33,23:34,25:17,27:18,28:19,29:20,30:21,31:22,32:i,37:a,39:o,40:s,51:c,52:u,54:l,58:h,72:f,73:d,74:p,75:y},{10:[1,39]},{12:40,15:[1,41]},{10:[2,9]},{19:[1,42]},{10:[1,43],19:[2,11]},t(g,[2,19],{26:[1,44]}),t(g,[2,21]),t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),t(g,[2,26]),t(g,[2,34],{41:45,43:48,44:49,26:[1,47],42:[1,46],45:v,46:m,47:b,48:x,49:_,50:k}),{21:56,22:33,23:34,72:f,73:d,74:p,75:y},t(g,[2,36]),t(g,[2,37]),{22:57,72:f,73:d,74:p},{21:58,22:33,23:34,72:f,73:d,74:p,75:y},{21:59,22:33,23:34,72:f,73:d,74:p,75:y},{21:60,22:33,23:34,72:f,73:d,74:p,75:y},{42:[1,61]},t(w,[2,14],{22:33,23:34,21:62,24:[1,63],72:f,73:d,74:p,75:y}),t(w,[2,15],{24:[1,64]}),t(E,[2,80]),t(E,[2,81]),t(E,[2,82]),t([10,19,24,26,33,34,42,45,46,47,48,49,50,55,57],[2,83]),t(T,[2,4]),{9:65,16:r},{16:[2,8]},{1:[2,10]},{5:23,7:5,13:e,18:66,19:[2,12],20:16,21:24,22:33,23:34,25:17,27:18,28:19,29:20,30:21,31:22,32:i,37:a,39:o,40:s,51:c,52:u,54:l,58:h,72:f,73:d,74:p,75:y},t(g,[2,20]),{21:67,22:33,23:34,42:[1,68],72:f,73:d,74:p,75:y},{41:69,43:48,44:49,45:v,46:m,47:b,48:x,49:_,50:k},t(g,[2,35]),{44:70,49:_,50:k},t(C,[2,45],{43:71,45:v,46:m,47:b,48:x}),t(S,[2,46]),t(S,[2,47]),t(S,[2,48]),t(S,[2,49]),t(A,[2,50]),t(A,[2,51]),t(g,[2,27],{33:[1,72],34:[1,73]}),{38:[1,74]},{42:[1,75]},{42:[1,76]},{55:[1,77],57:[1,78]},{22:79,72:f,73:d,74:p},t(w,[2,16]),t(w,[2,17]),t(w,[2,18]),{10:[1,80]},{19:[2,13]},t(M,[2,38]),{21:81,22:33,23:34,72:f,73:d,74:p,75:y},{21:82,22:33,23:34,42:[1,83],72:f,73:d,74:p,75:y},t(C,[2,44],{43:84,45:v,46:m,47:b,48:x}),t(C,[2,43]),{22:85,72:f,73:d,74:p},{35:86,39:O},{21:88,22:33,23:34,72:f,73:d,74:p,75:y},t(g,[2,52],{42:[1,89]}),t(g,[2,54],{42:[1,91],53:[1,90]}),t(g,[2,58],{42:[1,92],56:[1,93]}),t(g,[2,62],{42:[1,95],53:[1,94]}),t(g,[2,66]),t(T,[2,5]),t(M,[2,40]),t(M,[2,39]),{21:96,22:33,23:34,72:f,73:d,74:p,75:y},t(C,[2,42]),t(g,[2,28],{34:[1,97]}),{36:[1,98]},{35:99,36:[2,32],39:O},t(g,[2,31]),t(g,[2,53]),t(g,[2,55]),t(g,[2,56],{53:[1,100]}),t(g,[2,59]),t(g,[2,60],{42:[1,101]}),t(g,[2,63]),t(g,[2,64],{53:[1,102]}),t(M,[2,41]),{35:103,39:O},t(g,[2,29]),{36:[2,33]},t(g,[2,57]),t(g,[2,61]),t(g,[2,65]),{36:[1,104]},t(g,[2,30])],defaultActions:{2:[2,1],4:[2,3],7:[2,6],8:[2,2],14:[2,9],41:[2,8],42:[2,10],66:[2,13],99:[2,33]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},N={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),13;case 1:return this.begin("type_directive"),14;case 2:return this.popState(),this.begin("arg_directive"),11;case 3:return this.popState(),this.popState(),16;case 4:return 15;case 5:case 6:break;case 7:return 10;case 8:break;case 9:case 10:return 17;case 11:return this.begin("struct"),34;case 12:return"EOF_IN_STRUCT";case 13:return"OPEN_IN_STRUCT";case 14:return this.popState(),36;case 15:break;case 16:return"MEMBER";case 17:return 32;case 18:return 58;case 19:return 51;case 20:return 52;case 21:return 54;case 22:return 37;case 23:return 38;case 24:this.begin("generic");break;case 25:this.popState();break;case 26:return"GENERICTYPE";case 27:this.begin("string");break;case 28:this.popState();break;case 29:return"STR";case 30:this.begin("bqstring");break;case 31:this.popState();break;case 32:return"BQUOTE_STR";case 33:this.begin("href");break;case 34:this.popState();break;case 35:return 57;case 36:this.begin("callback_name");break;case 37:this.popState();break;case 38:this.popState(),this.begin("callback_args");break;case 39:return 55;case 40:this.popState();break;case 41:return 56;case 42:case 43:case 44:case 45:return 53;case 46:case 47:return 46;case 48:case 49:return 48;case 50:return 47;case 51:return 45;case 52:return 49;case 53:return 50;case 54:return 26;case 55:return 33;case 56:return 70;case 57:return"DOT";case 58:return"PLUS";case 59:return 67;case 60:case 61:return"EQUALS";case 62:return 74;case 63:return"PUNCTUATION";case 64:return 73;case 65:return 72;case 66:return 69;case 67:return 19}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callback_args:{rules:[40,41],inclusive:!1},callback_name:{rules:[37,38,39],inclusive:!1},href:{rules:[34,35],inclusive:!1},struct:{rules:[12,13,14,15,16],inclusive:!1},generic:{rules:[25,26],inclusive:!1},bqstring:{rules:[31,32],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,17,18,19,20,21,22,23,24,27,30,33,36,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};function D(){this.yy={}}return B.lexer=N,D.prototype=B,B.Parser=D,new D}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(76),i=n(99),a=n(179),o=n(180),s=n(181),c={format:{keyword:a.default,hex:i.default,rgb:o.default,rgba:o.default,hsl:s.default,hsla:s.default},parse:function(t){if("string"!=typeof t)return t;var e=i.default.parse(t)||o.default.parse(t)||s.default.parse(t)||a.default.parse(t);if(e)return e;throw new Error('Unsupported color format: "'+t+'"')},stringify:function(t){return!t.changed&&t.color?t.color:t.type.is(r.TYPE.HSL)||void 0===t.data.r?s.default.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?o.default.stringify(t):i.default.stringify(t)}};e.default=c},function(t,e){},function(t,e,n){(function(t){function n(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}e.resolve=function(){for(var e="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(e=o+"/"+e,i="/"===o.charAt(0))}return(i?"/":"")+(e=n(r(e.split("/"),(function(t){return!!t})),!i).join("/"))||"."},e.normalize=function(t){var a=e.isAbsolute(t),o="/"===i(t,-1);return(t=n(r(t.split("/"),(function(t){return!!t})),!a).join("/"))||a||(t="."),t&&o&&(t+="/"),(a?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,n){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var i=r(t.split("/")),a=r(n.split("/")),o=Math.min(i.length,a.length),s=o,c=0;c<o;c++)if(i[c]!==a[c]){s=c;break}var u=[];for(c=s;c<i.length;c++)u.push("..");return(u=u.concat(a.slice(s))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,r=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":t.slice(0,r)},e.basename=function(t,e){var n=function(t){"string"!=typeof t&&(t+="");var e,n=0,r=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){n=e+1;break}}else-1===r&&(i=!1,r=e+1);return-1===r?"":t.slice(n,r)}(t);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,n=0,r=-1,i=!0,a=0,o=t.length-1;o>=0;--o){var s=t.charCodeAt(o);if(47!==s)-1===r&&(i=!1,r=o+1),46===s?-1===e?e=o:1!==a&&(a=1):-1!==e&&(a=-1);else if(!i){n=o+1;break}}return-1===e||-1===r||0===a||1===a&&e===r-1&&e===n+1?"":t.slice(e,r)};var i="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,n(11))},function(t,e,n){var r=n(110),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();t.exports=a},function(t,e,n){var r;try{r=n(3)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,19],u=[1,20],l=[1,21],h=[1,22],f=[1,30],d=[1,23],p=[1,24],y=[1,25],g=[1,26],v=[1,27],m=[1,32],b=[1,33],x=[1,34],_=[1,35],k=[1,31],w=[1,38],E=[1,4,5,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],T=[1,4,5,12,13,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],C=[1,4,5,7,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],S=[4,5,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],A={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,idStatement:11,DESCR:12,"--\x3e":13,HIDE_EMPTY:14,scale:15,WIDTH:16,COMPOSIT_STATE:17,STRUCT_START:18,STRUCT_STOP:19,STATE_DESCR:20,AS:21,ID:22,FORK:23,JOIN:24,CHOICE:25,CONCURRENT:26,note:27,notePosition:28,NOTE_TEXT:29,direction:30,openDirective:31,typeDirective:32,closeDirective:33,":":34,argDirective:35,direction_tb:36,direction_bt:37,direction_rl:38,direction_lr:39,eol:40,";":41,EDGE_STATE:42,left_of:43,right_of:44,open_directive:45,type_directive:46,arg_directive:47,close_directive:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",12:"DESCR",13:"--\x3e",14:"HIDE_EMPTY",15:"scale",16:"WIDTH",17:"COMPOSIT_STATE",18:"STRUCT_START",19:"STRUCT_STOP",20:"STATE_DESCR",21:"AS",22:"ID",23:"FORK",24:"JOIN",25:"CHOICE",26:"CONCURRENT",27:"note",29:"NOTE_TEXT",34:":",36:"direction_tb",37:"direction_bt",38:"direction_rl",39:"direction_lr",41:";",42:"EDGE_STATE",43:"left_of",44:"right_of",45:"open_directive",46:"type_directive",47:"arg_directive",48:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[6,3],[6,5],[30,1],[30,1],[30,1],[30,1],[40,1],[40,1],[11,1],[11,1],[28,1],[28,1],[31,1],[32,1],[35,1],[33,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.setRootDoc(a[s]),a[s];case 5:this.$=[];break;case 6:"nl"!=a[s]&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 7:case 8:this.$=a[s];break;case 9:this.$="nl";break;case 10:this.$={stmt:"state",id:a[s],type:"default",description:""};break;case 11:this.$={stmt:"state",id:a[s-1],type:"default",description:r.trimColon(a[s])};break;case 12:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-2],type:"default",description:""},state2:{stmt:"state",id:a[s],type:"default",description:""}};break;case 13:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-3],type:"default",description:""},state2:{stmt:"state",id:a[s-1],type:"default",description:""},description:a[s].substr(1).trim()};break;case 17:this.$={stmt:"state",id:a[s-3],type:"default",description:"",doc:a[s-1]};break;case 18:var c=a[s],u=a[s-2].trim();if(a[s].match(":")){var l=a[s].split(":");c=l[0],u=[u,l[1]]}this.$={stmt:"state",id:c,type:"default",description:u};break;case 19:this.$={stmt:"state",id:a[s-3],type:"default",description:a[s-5],doc:a[s-1]};break;case 20:this.$={stmt:"state",id:a[s],type:"fork"};break;case 21:this.$={stmt:"state",id:a[s],type:"join"};break;case 22:this.$={stmt:"state",id:a[s],type:"choice"};break;case 23:this.$={stmt:"state",id:r.getDividerId(),type:"divider"};break;case 24:this.$={stmt:"state",id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 30:r.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 31:r.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 32:r.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 33:r.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 36:case 37:this.$=a[s];break;case 40:r.parseDirective("%%{","open_directive");break;case 41:r.parseDirective(a[s],"type_directive");break;case 42:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 43:r.parseDirective("}%%","close_directive","state")}},table:[{3:1,4:e,5:n,6:4,7:r,31:6,45:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,31:6,45:i},{3:9,4:e,5:n,6:4,7:r,31:6,45:i},{3:10,4:e,5:n,6:4,7:r,31:6,45:i},t([1,4,5,14,15,17,20,22,23,24,25,26,27,36,37,38,39,42,45],a,{8:11}),{32:12,46:[1,13]},{46:[2,40]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:u,17:l,20:h,22:f,23:d,24:p,25:y,26:g,27:v,30:29,31:6,36:m,37:b,38:x,39:_,42:k,45:i},{33:36,34:[1,37],48:w},t([34,48],[2,41]),t(E,[2,6]),{6:28,10:39,11:18,14:c,15:u,17:l,20:h,22:f,23:d,24:p,25:y,26:g,27:v,30:29,31:6,36:m,37:b,38:x,39:_,42:k,45:i},t(E,[2,8]),t(E,[2,9]),t(E,[2,10],{12:[1,40],13:[1,41]}),t(E,[2,14]),{16:[1,42]},t(E,[2,16],{18:[1,43]}),{21:[1,44]},t(E,[2,20]),t(E,[2,21]),t(E,[2,22]),t(E,[2,23]),{28:45,29:[1,46],43:[1,47],44:[1,48]},t(E,[2,26]),t(E,[2,27]),t(T,[2,36]),t(T,[2,37]),t(E,[2,30]),t(E,[2,31]),t(E,[2,32]),t(E,[2,33]),t(C,[2,28]),{35:49,47:[1,50]},t(C,[2,43]),t(E,[2,7]),t(E,[2,11]),{11:51,22:f,42:k},t(E,[2,15]),t(S,a,{8:52}),{22:[1,53]},{22:[1,54]},{21:[1,55]},{22:[2,38]},{22:[2,39]},{33:56,48:w},{48:[2,42]},t(E,[2,12],{12:[1,57]}),{4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:u,17:l,19:[1,58],20:h,22:f,23:d,24:p,25:y,26:g,27:v,30:29,31:6,36:m,37:b,38:x,39:_,42:k,45:i},t(E,[2,18],{18:[1,59]}),{29:[1,60]},{22:[1,61]},t(C,[2,29]),t(E,[2,13]),t(E,[2,17]),t(S,a,{8:62}),t(E,[2,24]),t(E,[2,25]),{4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:u,17:l,19:[1,63],20:h,22:f,23:d,24:p,25:y,26:g,27:v,30:29,31:6,36:m,37:b,38:x,39:_,42:k,45:i},t(E,[2,19])],defaultActions:{7:[2,40],8:[2,1],9:[2,2],10:[2,3],47:[2,38],48:[2,39],50:[2,42]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},M={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 36;case 1:return 37;case 2:return 38;case 3:return 39;case 4:return this.begin("open_directive"),45;case 5:return this.begin("type_directive"),46;case 6:return this.popState(),this.begin("arg_directive"),34;case 7:return this.popState(),this.popState(),48;case 8:return 47;case 9:case 10:break;case 11:return 5;case 12:case 13:case 14:case 15:break;case 16:return this.pushState("SCALE"),15;case 17:return 16;case 18:this.popState();break;case 19:this.pushState("STATE");break;case 20:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 21:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 22:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),25;case 23:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 24:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 25:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),25;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:this.begin("STATE_STRING");break;case 31:return this.popState(),this.pushState("STATE_ID"),"AS";case 32:return this.popState(),"ID";case 33:this.popState();break;case 34:return"STATE_DESCR";case 35:return 17;case 36:this.popState();break;case 37:return this.popState(),this.pushState("struct"),18;case 38:return this.popState(),19;case 39:break;case 40:return this.begin("NOTE"),27;case 41:return this.popState(),this.pushState("NOTE_ID"),43;case 42:return this.popState(),this.pushState("NOTE_ID"),44;case 43:this.popState(),this.pushState("FLOATING_NOTE");break;case 44:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 45:break;case 46:return"NOTE_TEXT";case 47:return this.popState(),"ID";case 48:return this.popState(),this.pushState("NOTE_TEXT"),22;case 49:return this.popState(),e.yytext=e.yytext.substr(2).trim(),29;case 50:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),29;case 51:case 52:return 7;case 53:return 14;case 54:return 42;case 55:return 22;case 56:return e.yytext=e.yytext.trim(),12;case 57:return 13;case 58:return 26;case 59:return 5;case 60:return"INVALID"}},rules:[/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[13,14],inclusive:!1},close_directive:{rules:[13,14],inclusive:!1},arg_directive:{rules:[7,8,13,14],inclusive:!1},type_directive:{rules:[6,7,13,14],inclusive:!1},open_directive:{rules:[5,13,14],inclusive:!1},struct:{rules:[13,14,19,26,27,28,29,38,39,40,54,55,56,57,58],inclusive:!1},FLOATING_NOTE_ID:{rules:[47],inclusive:!1},FLOATING_NOTE:{rules:[44,45,46],inclusive:!1},NOTE_TEXT:{rules:[49,50],inclusive:!1},NOTE_ID:{rules:[48],inclusive:!1},NOTE:{rules:[41,42,43],inclusive:!1},SCALE:{rules:[17,18],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[32],inclusive:!1},STATE_STRING:{rules:[33,34],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[13,14,20,21,22,23,24,25,30,31,35,36,37],inclusive:!1},ID:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,12,14,15,16,19,37,40,51,52,53,54,55,56,57,59,60],inclusive:!0}}};function O(){this.yy={}}return A.lexer=M,O.prototype=A,A.Parser=O,new O}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t){t.exports=function(){"use strict";var e,r;function i(){return e.apply(null,arguments)}function a(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return void 0===t}function c(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function u(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function l(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function f(t,e){for(var n in e)h(e,n)&&(t[n]=e[n]);return h(e,"toString")&&(t.toString=e.toString),h(e,"valueOf")&&(t.valueOf=e.valueOf),t}function d(t,e,n,r){return be(t,e,n,r,!0).utc()}function p(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function y(t){if(null==t._isValid){var e=p(t),n=r.call(e.parsedDateParts,(function(t){return null!=t})),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i}return t._isValid}function g(t){var e=d(NaN);return null!=t?f(p(e),t):p(e).userInvalidated=!0,e}r=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};var v=i.momentProperties=[];function m(t,e){var n,r,i;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=p(e)),s(e._locale)||(t._locale=e._locale),0<v.length)for(n=0;n<v.length;n++)s(i=e[r=v[n]])||(t[r]=i);return t}var b=!1;function x(t){m(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,i.updateOffset(this),b=!1)}function _(t){return t instanceof x||null!=t&&null!=t._isAMomentObject}function k(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function w(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=k(e)),n}function E(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&&w(t[r])!==w(e[r]))&&o++;return o+a}function T(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function C(t,e){var n=!0;return f((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var r,a=[],o=0;o<arguments.length;o++){if(r="","object"==typeof arguments[o]){for(var s in r+="\n["+o+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[o];a.push(r)}T(t+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var S,A={};function M(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),A[t]||(T(e),A[t]=!0)}function O(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function B(t,e){var n,r=f({},t);for(n in e)h(e,n)&&(o(t[n])&&o(e[n])?(r[n]={},f(r[n],t[n]),f(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)h(t,n)&&!h(e,n)&&o(t[n])&&(r[n]=f({},r[n]));return r}function N(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,S=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)h(t,e)&&n.push(e);return n};var D={};function L(t,e){var n=t.toLowerCase();D[n]=D[n+"s"]=D[e]=t}function I(t){return"string"==typeof t?D[t]||D[t.toLowerCase()]:void 0}function R(t){var e,n,r={};for(n in t)h(t,n)&&(e=I(n))&&(r[e]=t[n]);return r}var F={};function P(t,e){F[t]=e}function j(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(0<=t?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Y=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,U={},$={};function q(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&($[t]=i),e&&($[e[0]]=function(){return j(i.apply(this,arguments),e[1],e[2])}),n&&($[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function W(t,e){return t.isValid()?(e=V(e,t.localeData()),U[e]=U[e]||function(t){var e,n,r,i=t.match(Y);for(e=0,n=i.length;e<n;e++)$[i[e]]?i[e]=$[i[e]]:i[e]=(r=i[e]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(e){var r,a="";for(r=0;r<n;r++)a+=O(i[r])?i[r].call(e,t):i[r];return a}}(e),U[e](t)):t.localeData().invalidDate()}function V(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for(z.lastIndex=0;0<=n&&z.test(t);)t=t.replace(z,r),z.lastIndex=0,n-=1;return t}var H=/\d/,G=/\d\d/,X=/\d{3}/,Z=/\d{4}/,Q=/[+-]?\d{6}/,K=/\d\d?/,J=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,et=/\d{1,3}/,nt=/\d{1,4}/,rt=/[+-]?\d{1,6}/,it=/\d+/,at=/[+-]?\d+/,ot=/Z|[+-]\d\d:?\d\d/gi,st=/Z|[+-]\d\d(?::?\d\d)?/gi,ct=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut={};function lt(t,e,n){ut[t]=O(e)?e:function(t,r){return t&&n?n:e}}function ht(t,e){return h(ut,t)?ut[t](e._strict,e._locale):new RegExp(ft(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,r,i){return e||n||r||i}))))}function ft(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var dt={};function pt(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),c(e)&&(r=function(t,n){n[e]=w(t)}),n=0;n<t.length;n++)dt[t[n]]=r}function yt(t,e){pt(t,(function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)}))}function gt(t){return vt(t)?366:365}function vt(t){return t%4==0&&t%100!=0||t%400==0}q("Y",0,0,(function(){var t=this.year();return t<=9999?""+t:"+"+t})),q(0,["YY",2],0,(function(){return this.year()%100})),q(0,["YYYY",4],0,"year"),q(0,["YYYYY",5],0,"year"),q(0,["YYYYYY",6,!0],0,"year"),L("year","y"),P("year",1),lt("Y",at),lt("YY",K,G),lt("YYYY",nt,Z),lt("YYYYY",rt,Q),lt("YYYYYY",rt,Q),pt(["YYYYY","YYYYYY"],0),pt("YYYY",(function(t,e){e[0]=2===t.length?i.parseTwoDigitYear(t):w(t)})),pt("YY",(function(t,e){e[0]=i.parseTwoDigitYear(t)})),pt("Y",(function(t,e){e[0]=parseInt(t,10)})),i.parseTwoDigitYear=function(t){return w(t)+(68<w(t)?1900:2e3)};var mt,bt=xt("FullYear",!0);function xt(t,e){return function(n){return null!=n?(kt(this,t,n),i.updateOffset(this,e),this):_t(this,t)}}function _t(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function kt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&vt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),wt(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function wt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=(e%12+12)%12;return t+=(e-n)/12,1===n?vt(t)?29:28:31-n%7%2}mt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},q("M",["MM",2],"Mo",(function(){return this.month()+1})),q("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),q("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),L("month","M"),P("month",8),lt("M",K),lt("MM",K,G),lt("MMM",(function(t,e){return e.monthsShortRegex(t)})),lt("MMMM",(function(t,e){return e.monthsRegex(t)})),pt(["M","MM"],(function(t,e){e[1]=w(t)-1})),pt(["MMM","MMMM"],(function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[1]=i:p(n).invalidMonth=t}));var Et=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Tt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ct="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function St(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=w(e);else if(!c(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),wt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function At(t){return null!=t?(St(this,t),i.updateOffset(this,!0),this):_t(this,"Month")}var Mt=ct,Ot=ct;function Bt(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],a=[];for(e=0;e<12;e++)n=d([2e3,e]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(t),i.sort(t),a.sort(t),e=0;e<12;e++)r[e]=ft(r[e]),i[e]=ft(i[e]);for(e=0;e<24;e++)a[e]=ft(a[e]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Nt(t){var e;if(t<100&&0<=t){var n=Array.prototype.slice.call(arguments);n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function Dt(t,e,n){var r=7+e-n;return-(7+Nt(t,0,r).getUTCDay()-e)%7+r-1}function Lt(t,e,n,r,i){var a,o,s=1+7*(e-1)+(7+n-r)%7+Dt(t,r,i);return o=s<=0?gt(a=t-1)+s:s>gt(t)?(a=t+1,s-gt(t)):(a=t,s),{year:a,dayOfYear:o}}function It(t,e,n){var r,i,a=Dt(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+Rt(i=t.year()-1,e,n):o>Rt(t.year(),e,n)?(r=o-Rt(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function Rt(t,e,n){var r=Dt(t,e,n),i=Dt(t+1,e,n);return(gt(t)-r+i)/7}function Ft(t,e){return t.slice(e,7).concat(t.slice(0,e))}q("w",["ww",2],"wo","week"),q("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),P("week",5),P("isoWeek",5),lt("w",K),lt("ww",K,G),lt("W",K),lt("WW",K,G),yt(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=w(t)})),q("d",0,"do","day"),q("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),q("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),q("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),q("e",0,0,"weekday"),q("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),P("day",11),P("weekday",11),P("isoWeekday",11),lt("d",K),lt("e",K),lt("E",K),lt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),lt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),lt("dddd",(function(t,e){return e.weekdaysRegex(t)})),yt(["dd","ddd","dddd"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:p(n).invalidWeekday=t})),yt(["d","e","E"],(function(t,e,n,r){e[r]=w(t)}));var Pt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),jt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Yt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zt=ct,Ut=ct,$t=ct;function qt(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],c=[],u=[];for(e=0;e<7;e++)n=d([2e3,1]).day(e),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),a=this.weekdays(n,""),o.push(r),s.push(i),c.push(a),u.push(r),u.push(i),u.push(a);for(o.sort(t),s.sort(t),c.sort(t),u.sort(t),e=0;e<7;e++)s[e]=ft(s[e]),c[e]=ft(c[e]),u[e]=ft(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Wt(){return this.hours()%12||12}function Vt(t,e){q(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Ht(t,e){return e._meridiemParse}q("H",["HH",2],0,"hour"),q("h",["hh",2],0,Wt),q("k",["kk",2],0,(function(){return this.hours()||24})),q("hmm",0,0,(function(){return""+Wt.apply(this)+j(this.minutes(),2)})),q("hmmss",0,0,(function(){return""+Wt.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)})),q("Hmm",0,0,(function(){return""+this.hours()+j(this.minutes(),2)})),q("Hmmss",0,0,(function(){return""+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)})),Vt("a",!0),Vt("A",!1),L("hour","h"),P("hour",13),lt("a",Ht),lt("A",Ht),lt("H",K),lt("h",K),lt("k",K),lt("HH",K,G),lt("hh",K,G),lt("kk",K,G),lt("hmm",J),lt("hmmss",tt),lt("Hmm",J),lt("Hmmss",tt),pt(["H","HH"],3),pt(["k","kk"],(function(t,e,n){var r=w(t);e[3]=24===r?0:r})),pt(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),pt(["h","hh"],(function(t,e,n){e[3]=w(t),p(n).bigHour=!0})),pt("hmm",(function(t,e,n){var r=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r)),p(n).bigHour=!0})),pt("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r,2)),e[5]=w(t.substr(i)),p(n).bigHour=!0})),pt("Hmm",(function(t,e,n){var r=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r))})),pt("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r,2)),e[5]=w(t.substr(i))}));var Gt,Xt=xt("Hours",!0),Zt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Tt,monthsShort:Ct,week:{dow:0,doy:6},weekdays:Pt,weekdaysMin:Yt,weekdaysShort:jt,meridiemParse:/[ap]\.?m?\.?/i},Qt={},Kt={};function Jt(t){return t?t.toLowerCase().replace("_","-"):t}function te(e){var r=null;if(!Qt[e]&&void 0!==t&&t&&t.exports)try{r=Gt._abbr,n(198)("./"+e),ee(r)}catch(e){}return Qt[e]}function ee(t,e){var n;return t&&((n=s(e)?re(t):ne(t,e))?Gt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Gt._abbr}function ne(t,e){if(null===e)return delete Qt[t],null;var n,r=Zt;if(e.abbr=t,null!=Qt[t])M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Qt[t]._config;else if(null!=e.parentLocale)if(null!=Qt[e.parentLocale])r=Qt[e.parentLocale]._config;else{if(null==(n=te(e.parentLocale)))return Kt[e.parentLocale]||(Kt[e.parentLocale]=[]),Kt[e.parentLocale].push({name:t,config:e}),null;r=n._config}return Qt[t]=new N(B(r,e)),Kt[t]&&Kt[t].forEach((function(t){ne(t.name,t.config)})),ee(t),Qt[t]}function re(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Gt;if(!a(t)){if(e=te(t))return e;t=[t]}return function(t){for(var e,n,r,i,a=0;a<t.length;){for(e=(i=Jt(t[a]).split("-")).length,n=(n=Jt(t[a+1]))?n.split("-"):null;0<e;){if(r=te(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&E(i,n,!0)>=e-1)break;e--}a++}return Gt}(t)}function ie(t){var e,n=t._a;return n&&-2===p(t).overflow&&(e=n[1]<0||11<n[1]?1:n[2]<1||n[2]>wt(n[0],n[1])?2:n[3]<0||24<n[3]||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||59<n[4]?4:n[5]<0||59<n[5]?5:n[6]<0||999<n[6]?6:-1,p(t)._overflowDayOfYear&&(e<0||2<e)&&(e=2),p(t)._overflowWeeks&&-1===e&&(e=7),p(t)._overflowWeekday&&-1===e&&(e=8),p(t).overflow=e),t}function ae(t,e,n){return null!=t?t:null!=e?e:n}function oe(t){var e,n,r,a,o,s=[];if(!t._d){var c,u;for(c=t,u=new Date(i.now()),r=c._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,n,r,i,a,o,s,c;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)a=1,o=4,n=ae(e.GG,t._a[0],It(xe(),1,4).year),r=ae(e.W,1),((i=ae(e.E,1))<1||7<i)&&(c=!0);else{a=t._locale._week.dow,o=t._locale._week.doy;var u=It(xe(),a,o);n=ae(e.gg,t._a[0],u.year),r=ae(e.w,u.week),null!=e.d?((i=e.d)<0||6<i)&&(c=!0):null!=e.e?(i=e.e+a,(e.e<0||6<e.e)&&(c=!0)):i=a}r<1||r>Rt(n,a,o)?p(t)._overflowWeeks=!0:null!=c?p(t)._overflowWeekday=!0:(s=Lt(n,r,i,a,o),t._a[0]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=ae(t._a[0],r[0]),(t._dayOfYear>gt(o)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),n=Nt(o,0,t._dayOfYear),t._a[1]=n.getUTCMonth(),t._a[2]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=r[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Nt:function(t,e,n,r,i,a,o){var s;return t<100&&0<=t?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,a,o),s}).apply(null,s),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(p(t).weekdayMismatch=!0)}}var se=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ce=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ue=/Z|[+-]\d\d(?::?\d\d)?/,le=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],he=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],fe=/^\/?Date\((\-?\d+)/i;function de(t){var e,n,r,i,a,o,s=t._i,c=se.exec(s)||ce.exec(s);if(c){for(p(t).iso=!0,e=0,n=le.length;e<n;e++)if(le[e][1].exec(c[1])){i=le[e][0],r=!1!==le[e][2];break}if(null==i)return void(t._isValid=!1);if(c[3]){for(e=0,n=he.length;e<n;e++)if(he[e][1].exec(c[3])){a=(c[2]||" ")+he[e][0];break}if(null==a)return void(t._isValid=!1)}if(!r&&null!=a)return void(t._isValid=!1);if(c[4]){if(!ue.exec(c[4]))return void(t._isValid=!1);o="Z"}t._f=i+(a||"")+(o||""),ve(t)}else t._isValid=!1}var pe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,ye={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ge(t){var e,n,r,i=pe.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(i){var a=function(t,e,n,r,i,a){var o=[function(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}(t),Ct.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}(i[4],i[3],i[2],i[5],i[6],i[7]);if(n=a,r=t,(e=i[1])&&jt.indexOf(e)!==new Date(n[0],n[1],n[2]).getDay()&&(p(r).weekdayMismatch=!0,!(r._isValid=!1)))return;t._a=a,t._tzm=function(t,e,n){if(t)return ye[t];if(e)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(i[8],i[9],i[10]),t._d=Nt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),p(t).rfc2822=!0}else t._isValid=!1}function ve(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],p(t).empty=!0;var e,n,r,a,o,s,c,u,l=""+t._i,f=l.length,d=0;for(r=V(t._f,t._locale).match(Y)||[],e=0;e<r.length;e++)a=r[e],(n=(l.match(ht(a,t))||[])[0])&&(0<(o=l.substr(0,l.indexOf(n))).length&&p(t).unusedInput.push(o),l=l.slice(l.indexOf(n)+n.length),d+=n.length),$[a]?(n?p(t).empty=!1:p(t).unusedTokens.push(a),s=a,u=t,null!=(c=n)&&h(dt,s)&&dt[s](c,u._a,u,s)):t._strict&&!n&&p(t).unusedTokens.push(a);p(t).charsLeftOver=f-d,0<l.length&&p(t).unusedInput.push(l),t._a[3]<=12&&!0===p(t).bigHour&&0<t._a[3]&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[3]=function(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):(null!=t.isPM&&((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0)),e)}(t._locale,t._a[3],t._meridiem),oe(t),ie(t)}else ge(t);else de(t)}function me(t){var e,n,r,h,d=t._i,v=t._f;return t._locale=t._locale||re(t._l),null===d||void 0===v&&""===d?g({nullInput:!0}):("string"==typeof d&&(t._i=d=t._locale.preparse(d)),_(d)?new x(ie(d)):(u(d)?t._d=d:a(v)?function(t){var e,n,r,i,a;if(0===t._f.length)return p(t).invalidFormat=!0,t._d=new Date(NaN);for(i=0;i<t._f.length;i++)a=0,e=m({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],ve(e),y(e)&&(a+=p(e).charsLeftOver,a+=10*p(e).unusedTokens.length,p(e).score=a,(null==r||a<r)&&(r=a,n=e));f(t,n||e)}(t):v?ve(t):s(n=(e=t)._i)?e._d=new Date(i.now()):u(n)?e._d=new Date(n.valueOf()):"string"==typeof n?(r=e,null===(h=fe.exec(r._i))?(de(r),!1===r._isValid&&(delete r._isValid,ge(r),!1===r._isValid&&(delete r._isValid,i.createFromInputFallback(r)))):r._d=new Date(+h[1])):a(n)?(e._a=l(n.slice(0),(function(t){return parseInt(t,10)})),oe(e)):o(n)?function(t){if(!t._d){var e=R(t._i);t._a=l([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),oe(t)}}(e):c(n)?e._d=new Date(n):i.createFromInputFallback(e),y(t)||(t._d=null),t))}function be(t,e,n,r,i){var s,c={};return!0!==n&&!1!==n||(r=n,n=void 0),(o(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||a(t)&&0===t.length)&&(t=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=i,c._l=n,c._i=t,c._f=e,c._strict=r,(s=new x(ie(me(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function xe(t,e,n,r){return be(t,e,n,r,!1)}i.createFromInputFallback=C("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var _e=C("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=xe.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:g()})),ke=C("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=xe.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:g()}));function we(t,e){var n,r;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return xe();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}var Ee=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Te(t){var e=R(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,c=e.minute||0,u=e.second||0,l=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===mt.call(Ee,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,r=0;r<Ee.length;++r)if(t[Ee[r]]){if(n)return!1;parseFloat(t[Ee[r]])!==w(t[Ee[r]])&&(n=!0)}return!0}(e),this._milliseconds=+l+1e3*u+6e4*c+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=re(),this._bubble()}function Ce(t){return t instanceof Te}function Se(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Ae(t,e){q(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+j(~~(t/60),2)+e+j(~~t%60,2)}))}Ae("Z",":"),Ae("ZZ",""),lt("Z",st),lt("ZZ",st),pt(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=Oe(st,t)}));var Me=/([\+\-]|\d\d)/gi;function Oe(t,e){var n=(e||"").match(t);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Me)||["-",0,0],i=60*r[1]+w(r[2]);return 0===i?0:"+"===r[0]?i:-i}function Be(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(_(t)||u(t)?t.valueOf():xe(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):xe(t).local()}function Ne(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function De(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Le=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ie=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Re(t,e){var n,r,i,a=t,o=null;return Ce(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:c(t)?(a={},e?a[e]=t:a.milliseconds=t):(o=Le.exec(t))?(n="-"===o[1]?-1:1,a={y:0,d:w(o[2])*n,h:w(o[3])*n,m:w(o[4])*n,s:w(o[5])*n,ms:w(Se(1e3*o[6]))*n}):(o=Ie.exec(t))?(n="-"===o[1]?-1:1,a={y:Fe(o[2],n),M:Fe(o[3],n),w:Fe(o[4],n),d:Fe(o[5],n),h:Fe(o[6],n),m:Fe(o[7],n),s:Fe(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=function(t,e){var n;return t.isValid()&&e.isValid()?(e=Be(e,t),t.isBefore(e)?n=Pe(t,e):((n=Pe(e,t)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}(xe(a.from),xe(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new Te(a),Ce(t)&&h(t,"_locale")&&(r._locale=t._locale),r}function Fe(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Pe(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function je(t,e){return function(n,r){var i;return null===r||isNaN(+r)||(M(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Ye(this,Re(n="string"==typeof n?+n:n,r),t),this}}function Ye(t,e,n,r){var a=e._milliseconds,o=Se(e._days),s=Se(e._months);t.isValid()&&(r=null==r||r,s&&St(t,_t(t,"Month")+s*n),o&&kt(t,"Date",_t(t,"Date")+o*n),a&&t._d.setTime(t._d.valueOf()+a*n),r&&i.updateOffset(t,o||s))}Re.fn=Te.prototype,Re.invalid=function(){return Re(NaN)};var ze=je(1,"add"),Ue=je(-1,"subtract");function $e(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,"months");return-(n+(e-r<0?(e-r)/(r-t.clone().add(n-1,"months")):(e-r)/(t.clone().add(n+1,"months")-r)))||0}function qe(t){var e;return void 0===t?this._locale._abbr:(null!=(e=re(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var We=C("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function Ve(){return this._locale}var He=126227808e5;function Ge(t,e){return(t%e+e)%e}function Xe(t,e,n){return t<100&&0<=t?new Date(t+400,e,n)-He:new Date(t,e,n).valueOf()}function Ze(t,e,n){return t<100&&0<=t?Date.UTC(t+400,e,n)-He:Date.UTC(t,e,n)}function Qe(t,e){q(0,[t,t.length],0,e)}function Ke(t,e,n,r,i){var a;return null==t?It(this,r,i).year:((a=Rt(t,r,i))<e&&(e=a),function(t,e,n,r,i){var a=Lt(t,e,n,r,i),o=Nt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,t,e,n,r,i))}q(0,["gg",2],0,(function(){return this.weekYear()%100})),q(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Qe("gggg","weekYear"),Qe("ggggg","weekYear"),Qe("GGGG","isoWeekYear"),Qe("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),P("weekYear",1),P("isoWeekYear",1),lt("G",at),lt("g",at),lt("GG",K,G),lt("gg",K,G),lt("GGGG",nt,Z),lt("gggg",nt,Z),lt("GGGGG",rt,Q),lt("ggggg",rt,Q),yt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,r){e[r.substr(0,2)]=w(t)})),yt(["gg","GG"],(function(t,e,n,r){e[r]=i.parseTwoDigitYear(t)})),q("Q",0,"Qo","quarter"),L("quarter","Q"),P("quarter",7),lt("Q",H),pt("Q",(function(t,e){e[1]=3*(w(t)-1)})),q("D",["DD",2],"Do","date"),L("date","D"),P("date",9),lt("D",K),lt("DD",K,G),lt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),pt(["D","DD"],2),pt("Do",(function(t,e){e[2]=w(t.match(K)[0])}));var Je=xt("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),P("dayOfYear",4),lt("DDD",et),lt("DDDD",X),pt(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=w(t)})),q("m",["mm",2],0,"minute"),L("minute","m"),P("minute",14),lt("m",K),lt("mm",K,G),pt(["m","mm"],4);var tn=xt("Minutes",!1);q("s",["ss",2],0,"second"),L("second","s"),P("second",15),lt("s",K),lt("ss",K,G),pt(["s","ss"],5);var en,nn=xt("Seconds",!1);for(q("S",0,0,(function(){return~~(this.millisecond()/100)})),q(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),q(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),q(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),q(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),q(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),q(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),L("millisecond","ms"),P("millisecond",16),lt("S",et,H),lt("SS",et,G),lt("SSS",et,X),en="SSSS";en.length<=9;en+="S")lt(en,it);function rn(t,e){e[6]=w(1e3*("0."+t))}for(en="S";en.length<=9;en+="S")pt(en,rn);var an=xt("Milliseconds",!1);q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");var on=x.prototype;function sn(t){return t}on.add=ze,on.calendar=function(t,e){var n=t||xe(),r=Be(n,this).startOf("day"),a=i.calendarFormat(this,r)||"sameElse",o=e&&(O(e[a])?e[a].call(this,n):e[a]);return this.format(o||this.localeData().calendar(a,this,xe(n)))},on.clone=function(){return new x(this)},on.diff=function(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=Be(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=I(e)){case"year":a=$e(this,r)/12;break;case"month":a=$e(this,r);break;case"quarter":a=$e(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:k(a)},on.endOf=function(t){var e;if(void 0===(t=I(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-Ge(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-Ge(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-Ge(e,1e3)-1}return this._d.setTime(e),i.updateOffset(this,!0),this},on.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=W(this,t);return this.localeData().postformat(e)},on.from=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||xe(t).isValid())?Re({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.fromNow=function(t){return this.from(xe(),t)},on.to=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||xe(t).isValid())?Re({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.toNow=function(t){return this.to(xe(),t)},on.get=function(t){return O(this[t=I(t)])?this[t]():this},on.invalidAt=function(){return p(this).overflow},on.isAfter=function(t,e){var n=_(t)?t:xe(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},on.isBefore=function(t,e){var n=_(t)?t:xe(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},on.isBetween=function(t,e,n,r){var i=_(t)?t:xe(t),a=_(e)?e:xe(e);return!!(this.isValid()&&i.isValid()&&a.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))},on.isSame=function(t,e){var n,r=_(t)?t:xe(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},on.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},on.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},on.isValid=function(){return y(this)},on.lang=We,on.locale=qe,on.localeData=Ve,on.max=ke,on.min=_e,on.parsingFlags=function(){return f({},p(this))},on.set=function(t,e){if("object"==typeof t)for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:F[n]});return e.sort((function(t,e){return t.priority-e.priority})),e}(t=R(t)),r=0;r<n.length;r++)this[n[r].unit](t[n[r].unit]);else if(O(this[t=I(t)]))return this[t](e);return this},on.startOf=function(t){var e;if(void 0===(t=I(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Ge(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=Ge(e,6e4);break;case"second":e=this._d.valueOf(),e-=Ge(e,1e3)}return this._d.setTime(e),i.updateOffset(this,!0),this},on.subtract=Ue,on.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},on.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},on.toDate=function(){return new Date(this.valueOf())},on.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||9999<n.year()?W(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(n,"Z")):W(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},on.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=e+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},on.toJSON=function(){return this.isValid()?this.toISOString():null},on.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},on.unix=function(){return Math.floor(this.valueOf()/1e3)},on.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},on.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},on.year=bt,on.isLeapYear=function(){return vt(this.year())},on.weekYear=function(t){return Ke.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},on.isoWeekYear=function(t){return Ke.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},on.quarter=on.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},on.month=At,on.daysInMonth=function(){return wt(this.year(),this.month())},on.week=on.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},on.isoWeek=on.isoWeeks=function(t){var e=It(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},on.weeksInYear=function(){var t=this.localeData()._week;return Rt(this.year(),t.dow,t.doy)},on.isoWeeksInYear=function(){return Rt(this.year(),1,4)},on.date=Je,on.day=on.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,n,r=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,n=this.localeData(),t="string"!=typeof e?e:isNaN(e)?"number"==typeof(e=n.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-r,"d")):r},on.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},on.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null==t)return this.day()||7;var e,n,r=(e=t,n=this.localeData(),"string"==typeof e?n.weekdaysParse(e)%7||7:isNaN(e)?null:e);return this.day(this.day()%7?r:r-7)},on.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},on.hour=on.hours=Xt,on.minute=on.minutes=tn,on.second=on.seconds=nn,on.millisecond=on.milliseconds=an,on.utcOffset=function(t,e,n){var r,a=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null==t)return this._isUTC?a:Ne(this);if("string"==typeof t){if(null===(t=Oe(st,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(r=Ne(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==t&&(!e||this._changeInProgress?Ye(this,Re(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this},on.utc=function(t){return this.utcOffset(0,t)},on.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ne(this),"m")),this},on.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Oe(ot,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},on.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?xe(t).utcOffset():0,(this.utcOffset()-t)%60==0)},on.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},on.isLocal=function(){return!!this.isValid()&&!this._isUTC},on.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},on.isUtc=De,on.isUTC=De,on.zoneAbbr=function(){return this._isUTC?"UTC":""},on.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},on.dates=C("dates accessor is deprecated. Use date instead.",Je),on.months=C("months accessor is deprecated. Use month instead",At),on.years=C("years accessor is deprecated. Use year instead",bt),on.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),on.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(m(t,this),(t=me(t))._a){var e=t._isUTC?d(t._a):xe(t._a);this._isDSTShifted=this.isValid()&&0<E(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted}));var cn=N.prototype;function un(t,e,n,r){var i=re(),a=d().set(r,e);return i[n](a,t)}function ln(t,e,n){if(c(t)&&(e=t,t=void 0),t=t||"",null!=e)return un(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=un(t,r,n,"month");return i}function hn(t,e,n,r){"boolean"==typeof t?c(e)&&(n=e,e=void 0):(e=t,t=!1,c(n=e)&&(n=e,e=void 0)),e=e||"";var i,a=re(),o=t?a._week.dow:0;if(null!=n)return un(e,(n+o)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=un(e,(i+o)%7,r,"day");return s}cn.calendar=function(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return O(r)?r.call(e,n):r},cn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},cn.invalidDate=function(){return this._invalidDate},cn.ordinal=function(t){return this._ordinal.replace("%d",t)},cn.preparse=sn,cn.postformat=sn,cn.relativeTime=function(t,e,n,r){var i=this._relativeTime[n];return O(i)?i(t,e,n,r):i.replace(/%d/i,t)},cn.pastFuture=function(t,e){var n=this._relativeTime[0<t?"future":"past"];return O(n)?n(e):n.replace(/%s/i,e)},cn.set=function(t){var e,n;for(n in t)O(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},cn.months=function(t,e){return t?a(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Et).test(e)?"format":"standalone"][t.month()]:a(this._months)?this._months:this._months.standalone},cn.monthsShort=function(t,e){return t?a(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Et.test(e)?"format":"standalone"][t.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},cn.monthsParse=function(t,e,n){var r,i,a;if(this._monthsParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=d([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=mt.call(this._shortMonthsParse,o))?i:null:-1!==(i=mt.call(this._longMonthsParse,o))?i:null:"MMM"===e?-1!==(i=mt.call(this._shortMonthsParse,o))?i:-1!==(i=mt.call(this._longMonthsParse,o))?i:null:-1!==(i=mt.call(this._longMonthsParse,o))?i:-1!==(i=mt.call(this._shortMonthsParse,o))?i:null}.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=d([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},cn.monthsRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||Bt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=Ot),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},cn.monthsShortRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||Bt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Mt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},cn.week=function(t){return It(t,this._week.dow,this._week.doy).week},cn.firstDayOfYear=function(){return this._week.doy},cn.firstDayOfWeek=function(){return this._week.dow},cn.weekdays=function(t,e){var n=a(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Ft(n,this._week.dow):t?n[t.day()]:n},cn.weekdaysMin=function(t){return!0===t?Ft(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},cn.weekdaysShort=function(t){return!0===t?Ft(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},cn.weekdaysParse=function(t,e,n){var r,i,a;if(this._weekdaysParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=d([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=mt.call(this._weekdaysParse,o))?i:null:"ddd"===e?-1!==(i=mt.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=mt.call(this._minWeekdaysParse,o))?i:null:"dddd"===e?-1!==(i=mt.call(this._weekdaysParse,o))?i:-1!==(i=mt.call(this._shortWeekdaysParse,o))?i:-1!==(i=mt.call(this._minWeekdaysParse,o))?i:null:"ddd"===e?-1!==(i=mt.call(this._shortWeekdaysParse,o))?i:-1!==(i=mt.call(this._weekdaysParse,o))?i:-1!==(i=mt.call(this._minWeekdaysParse,o))?i:null:-1!==(i=mt.call(this._minWeekdaysParse,o))?i:-1!==(i=mt.call(this._weekdaysParse,o))?i:-1!==(i=mt.call(this._shortWeekdaysParse,o))?i:null}.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=d([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}},cn.weekdaysRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=zt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},cn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ut),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},cn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$t),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},cn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},cn.meridiem=function(t,e,n){return 11<t?n?"pm":"PM":n?"am":"AM"},ee("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===w(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=C("moment.lang is deprecated. Use moment.locale instead.",ee),i.langData=C("moment.langData is deprecated. Use moment.localeData instead.",re);var fn=Math.abs;function dn(t,e,n,r){var i=Re(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function pn(t){return t<0?Math.floor(t):Math.ceil(t)}function yn(t){return 4800*t/146097}function gn(t){return 146097*t/4800}function vn(t){return function(){return this.as(t)}}var mn=vn("ms"),bn=vn("s"),xn=vn("m"),_n=vn("h"),kn=vn("d"),wn=vn("w"),En=vn("M"),Tn=vn("Q"),Cn=vn("y");function Sn(t){return function(){return this.isValid()?this._data[t]:NaN}}var An=Sn("milliseconds"),Mn=Sn("seconds"),On=Sn("minutes"),Bn=Sn("hours"),Nn=Sn("days"),Dn=Sn("months"),Ln=Sn("years"),In=Math.round,Rn={ss:44,s:45,m:45,h:22,d:26,M:11},Fn=Math.abs;function Pn(t){return(0<t)-(t<0)||+t}function jn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=Fn(this._milliseconds)/1e3,r=Fn(this._days),i=Fn(this._months);e=k((t=k(n/60))/60),n%=60,t%=60;var a=k(i/12),o=i%=12,s=r,c=e,u=t,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var f=h<0?"-":"",d=Pn(this._months)!==Pn(h)?"-":"",p=Pn(this._days)!==Pn(h)?"-":"",y=Pn(this._milliseconds)!==Pn(h)?"-":"";return f+"P"+(a?d+a+"Y":"")+(o?d+o+"M":"")+(s?p+s+"D":"")+(c||u||l?"T":"")+(c?y+c+"H":"")+(u?y+u+"M":"")+(l?y+l+"S":"")}var Yn=Te.prototype;return Yn.isValid=function(){return this._isValid},Yn.abs=function(){var t=this._data;return this._milliseconds=fn(this._milliseconds),this._days=fn(this._days),this._months=fn(this._months),t.milliseconds=fn(t.milliseconds),t.seconds=fn(t.seconds),t.minutes=fn(t.minutes),t.hours=fn(t.hours),t.months=fn(t.months),t.years=fn(t.years),this},Yn.add=function(t,e){return dn(this,t,e,1)},Yn.subtract=function(t,e){return dn(this,t,e,-1)},Yn.as=function(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=I(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+yn(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(gn(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}},Yn.asMilliseconds=mn,Yn.asSeconds=bn,Yn.asMinutes=xn,Yn.asHours=_n,Yn.asDays=kn,Yn.asWeeks=wn,Yn.asMonths=En,Yn.asQuarters=Tn,Yn.asYears=Cn,Yn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},Yn._bubble=function(){var t,e,n,r,i,a=this._milliseconds,o=this._days,s=this._months,c=this._data;return 0<=a&&0<=o&&0<=s||a<=0&&o<=0&&s<=0||(a+=864e5*pn(gn(s)+o),s=o=0),c.milliseconds=a%1e3,t=k(a/1e3),c.seconds=t%60,e=k(t/60),c.minutes=e%60,n=k(e/60),c.hours=n%24,s+=i=k(yn(o+=k(n/24))),o-=pn(gn(i)),r=k(s/12),s%=12,c.days=o,c.months=s,c.years=r,this},Yn.clone=function(){return Re(this)},Yn.get=function(t){return t=I(t),this.isValid()?this[t+"s"]():NaN},Yn.milliseconds=An,Yn.seconds=Mn,Yn.minutes=On,Yn.hours=Bn,Yn.days=Nn,Yn.weeks=function(){return k(this.days()/7)},Yn.months=Dn,Yn.years=Ln,Yn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,n,r,i,a,o,s,c,u,l,h=this.localeData(),f=(e=!t,n=h,r=Re(this).abs(),i=In(r.as("s")),a=In(r.as("m")),o=In(r.as("h")),s=In(r.as("d")),c=In(r.as("M")),u=In(r.as("y")),(l=i<=Rn.ss&&["s",i]||i<Rn.s&&["ss",i]||a<=1&&["m"]||a<Rn.m&&["mm",a]||o<=1&&["h"]||o<Rn.h&&["hh",o]||s<=1&&["d"]||s<Rn.d&&["dd",s]||c<=1&&["M"]||c<Rn.M&&["MM",c]||u<=1&&["y"]||["yy",u])[2]=e,l[3]=0<+this,l[4]=n,function(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}.apply(null,l));return t&&(f=h.pastFuture(+this,f)),h.postformat(f)},Yn.toISOString=jn,Yn.toString=jn,Yn.toJSON=jn,Yn.locale=qe,Yn.localeData=Ve,Yn.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",jn),Yn.lang=We,q("X",0,0,"unix"),q("x",0,0,"valueOf"),lt("x",at),lt("X",/[+-]?\d+(\.\d{1,3})?/),pt("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))})),pt("x",(function(t,e,n){n._d=new Date(w(t))})),i.version="2.24.0",e=xe,i.fn=on,i.min=function(){return we("isBefore",[].slice.call(arguments,0))},i.max=function(){return we("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=d,i.unix=function(t){return xe(1e3*t)},i.months=function(t,e){return ln(t,e,"months")},i.isDate=u,i.locale=ee,i.invalid=g,i.duration=Re,i.isMoment=_,i.weekdays=function(t,e,n){return hn(t,e,n,"weekdays")},i.parseZone=function(){return xe.apply(null,arguments).parseZone()},i.localeData=re,i.isDuration=Ce,i.monthsShort=function(t,e){return ln(t,e,"monthsShort")},i.weekdaysMin=function(t,e,n){return hn(t,e,n,"weekdaysMin")},i.defineLocale=ne,i.updateLocale=function(t,e){if(null!=e){var n,r,i=Zt;null!=(r=te(t))&&(i=r._config),(n=new N(e=B(i,e))).parentLocale=Qt[t],Qt[t]=n,ee(t)}else null!=Qt[t]&&(null!=Qt[t].parentLocale?Qt[t]=Qt[t].parentLocale:null!=Qt[t]&&delete Qt[t]);return Qt[t]},i.locales=function(){return S(Qt)},i.weekdaysShort=function(t,e,n){return hn(t,e,n,"weekdaysShort")},i.normalizeUnits=I,i.relativeTimeRounding=function(t){return void 0===t?In:"function"==typeof t&&(In=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==Rn[t]&&(void 0===e?Rn[t]:(Rn[t]=e,"s"===t&&(Rn.ss=e-1),!0))},i.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=on,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}).call(this,n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,5],r=[7,9,11,12,13,14,15,16,17,18,19,21,28,33],i=[1,15],a=[1,16],o=[1,17],s=[1,18],c=[1,19],u=[1,20],l=[1,21],h=[1,22],f=[1,24],d=[1,26],p=[1,29],y=[5,7,9,11,12,13,14,15,16,17,18,19,21,28,33],g={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,excludes:16,todayMarker:17,title:18,section:19,clickStatement:20,taskTxt:21,taskData:22,openDirective:23,typeDirective:24,closeDirective:25,":":26,argDirective:27,click:28,callbackname:29,callbackargs:30,href:31,clickStatementDebug:32,open_directive:33,type_directive:34,arg_directive:35,close_directive:36,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"excludes",17:"todayMarker",18:"title",19:"section",21:"taskTxt",22:"taskData",26:":",28:"click",29:"callbackname",30:"callbackargs",31:"href",33:"open_directive",34:"type_directive",35:"arg_directive",36:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[20,2],[20,3],[20,3],[20,4],[20,3],[20,4],[20,2],[32,2],[32,3],[32,3],[32,4],[32,3],[32,4],[32,2],[23,1],[24,1],[27,1],[25,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 2:return a[s-1];case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 9:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 10:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 11:r.TopAxis(),this.$=a[s].substr(8);break;case 12:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 13:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 14:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 15:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 16:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s-1],a[s]),this.$="task";break;case 22:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 23:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 24:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 25:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 26:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 27:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 28:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 29:case 35:this.$=a[s-1]+" "+a[s];break;case 30:case 31:case 33:this.$=a[s-2]+" "+a[s-1]+" "+a[s];break;case 32:case 34:this.$=a[s-3]+" "+a[s-2]+" "+a[s-1]+" "+a[s];break;case 36:r.parseDirective("%%{","open_directive");break;case 37:r.parseDirective(a[s],"type_directive");break;case 38:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 39:r.parseDirective("}%%","close_directive","gantt")}},table:[{3:1,4:2,5:e,23:4,33:n},{1:[3]},{3:6,4:2,5:e,23:4,33:n},t(r,[2,3],{6:7}),{24:8,34:[1,9]},{34:[2,36]},{1:[2,1]},{4:25,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:i,13:a,14:o,15:s,16:c,17:u,18:l,19:h,20:23,21:f,23:4,28:d,33:n},{25:27,26:[1,28],36:p},t([26,36],[2,37]),t(r,[2,8],{1:[2,2]}),t(r,[2,4]),{4:25,10:30,12:i,13:a,14:o,15:s,16:c,17:u,18:l,19:h,20:23,21:f,23:4,28:d,33:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),t(r,[2,17]),{22:[1,31]},t(r,[2,19]),{29:[1,32],31:[1,33]},{11:[1,34]},{27:35,35:[1,36]},{11:[2,39]},t(r,[2,5]),t(r,[2,18]),t(r,[2,22],{30:[1,37],31:[1,38]}),t(r,[2,28],{29:[1,39]}),t(y,[2,20]),{25:40,36:p},{36:[2,38]},t(r,[2,23],{31:[1,41]}),t(r,[2,24]),t(r,[2,26],{30:[1,42]}),{11:[1,43]},t(r,[2,25]),t(r,[2,27]),t(y,[2,21])],defaultActions:{5:[2,36],6:[2,1],29:[2,39],36:[2,38]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},v={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),33;case 1:return this.begin("type_directive"),34;case 2:return this.popState(),this.begin("arg_directive"),26;case 3:return this.popState(),this.popState(),36;case 4:return 35;case 5:case 6:case 7:break;case 8:return 11;case 9:case 10:case 11:break;case 12:this.begin("href");break;case 13:this.popState();break;case 14:return 31;case 15:this.begin("callbackname");break;case 16:this.popState();break;case 17:this.popState(),this.begin("callbackargs");break;case 18:return 29;case 19:this.popState();break;case 20:return 30;case 21:this.begin("click");break;case 22:this.popState();break;case 23:return 28;case 24:return 5;case 25:return 12;case 26:return 13;case 27:return 14;case 28:return 15;case 29:return 16;case 30:return 17;case 31:return"date";case 32:return 18;case 33:return 19;case 34:return 21;case 35:return 22;case 36:return 26;case 37:return 7;case 38:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[19,20],inclusive:!1},callbackname:{rules:[16,17,18],inclusive:!1},href:{rules:[13,14],inclusive:!1},click:{rules:[22,23],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,15,21,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],inclusive:!0}}};function m(){this.yy={}}return g.lexer=v,m.prototype=g,g.Parser=m,new m}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){var r=n(38),i=n(81);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e,n){var r=n(257),i=n(267),a=n(35),o=n(5),s=n(274);t.exports=function(t){return"function"==typeof t?t:null==t?a:"object"==typeof t?o(t)?i(t[0],t[1]):r(t):s(t)}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,9],n=[1,7],r=[1,6],i=[1,8],a=[1,20,21,22,23,38,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],o=[2,10],s=[1,20],c=[1,21],u=[1,22],l=[1,23],h=[1,30],f=[1,54],d=[1,32],p=[1,33],y=[1,34],g=[1,35],v=[1,36],m=[1,48],b=[1,43],x=[1,45],_=[1,40],k=[1,44],w=[1,47],E=[1,51],T=[1,52],C=[1,53],S=[1,42],A=[1,46],M=[1,49],O=[1,50],B=[1,41],N=[1,57],D=[1,62],L=[1,20,21,22,23,38,42,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],I=[1,66],R=[1,65],F=[1,67],P=[20,21,23,69,70],j=[1,88],Y=[1,93],z=[1,90],U=[1,95],$=[1,98],q=[1,96],W=[1,97],V=[1,91],H=[1,103],G=[1,102],X=[1,92],Z=[1,94],Q=[1,99],K=[1,100],J=[1,101],tt=[1,104],et=[20,21,22,23,69,70],nt=[20,21,22,23,47,69,70],rt=[20,21,22,23,40,46,47,49,51,53,55,57,59,61,62,64,69,70,80,94,95,98,99,100,102,103,109,110,111,112,113,114],it=[20,21,23],at=[20,21,23,46,69,70,80,94,95,98,99,100,102,103,109,110,111,112,113,114],ot=[1,12,20,21,22,23,24,38,42,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],st=[46,80,94,95,98,99,100,102,103,109,110,111,112,113,114],ct=[1,136],ut=[1,144],lt=[1,145],ht=[1,146],ft=[1,147],dt=[1,131],pt=[1,132],yt=[1,128],gt=[1,139],vt=[1,140],mt=[1,141],bt=[1,142],xt=[1,143],_t=[1,148],kt=[1,149],wt=[1,134],Et=[1,137],Tt=[1,133],Ct=[1,130],St=[20,21,22,23,38,42,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],At=[1,152],Mt=[20,21,22,23,26,46,80,94,95,98,99,100,102,103,109,110,111,112,113,114],Ot=[20,21,22,23,24,26,38,40,41,42,46,50,52,54,56,58,60,61,63,65,69,70,71,75,76,77,78,79,80,81,84,94,95,98,99,100,102,103,104,105,109,110,111,112,113,114],Bt=[12,21,22,24],Nt=[22,95],Dt=[1,233],Lt=[1,237],It=[1,234],Rt=[1,231],Ft=[1,228],Pt=[1,229],jt=[1,230],Yt=[1,232],zt=[1,235],Ut=[1,236],$t=[1,238],qt=[1,255],Wt=[20,21,23,95],Vt=[20,21,22,23,75,91,94,95,98,99,100,101,102,103,104],Ht={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,link:43,node:44,vertex:45,AMP:46,STYLE_SEPARATOR:47,idString:48,PS:49,PE:50,"(-":51,"-)":52,STADIUMSTART:53,STADIUMEND:54,SUBROUTINESTART:55,SUBROUTINEEND:56,CYLINDERSTART:57,CYLINDEREND:58,DIAMOND_START:59,DIAMOND_STOP:60,TAGEND:61,TRAPSTART:62,TRAPEND:63,INVTRAPSTART:64,INVTRAPEND:65,linkStatement:66,arrowText:67,TESTSTR:68,START_LINK:69,LINK:70,PIPE:71,textToken:72,STR:73,keywords:74,STYLE:75,LINKSTYLE:76,CLASSDEF:77,CLASS:78,CLICK:79,DOWN:80,UP:81,textNoTags:82,textNoTagsToken:83,DEFAULT:84,stylesOpt:85,alphaNum:86,CALLBACKNAME:87,CALLBACKARGS:88,HREF:89,LINK_TARGET:90,HEX:91,numList:92,INTERPOLATE:93,NUM:94,COMMA:95,style:96,styleComponent:97,ALPHA:98,COLON:99,MINUS:100,UNIT:101,BRKT:102,DOT:103,PCT:104,TAGSTART:105,alphaNumToken:106,idStringToken:107,alphaNumStatement:108,PUNCTUATION:109,UNICODE_TEXT:110,PLUS:111,EQUALS:112,MULT:113,UNDERSCORE:114,graphCodeTokens:115,ARROW_CROSS:116,ARROW_POINT:117,ARROW_CIRCLE:118,ARROW_OPEN:119,QUOTE:120,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",46:"AMP",47:"STYLE_SEPARATOR",49:"PS",50:"PE",51:"(-",52:"-)",53:"STADIUMSTART",54:"STADIUMEND",55:"SUBROUTINESTART",56:"SUBROUTINEEND",57:"CYLINDERSTART",58:"CYLINDEREND",59:"DIAMOND_START",60:"DIAMOND_STOP",61:"TAGEND",62:"TRAPSTART",63:"TRAPEND",64:"INVTRAPSTART",65:"INVTRAPEND",68:"TESTSTR",69:"START_LINK",70:"LINK",71:"PIPE",73:"STR",75:"STYLE",76:"LINKSTYLE",77:"CLASSDEF",78:"CLASS",79:"CLICK",80:"DOWN",81:"UP",84:"DEFAULT",87:"CALLBACKNAME",88:"CALLBACKARGS",89:"HREF",90:"LINK_TARGET",91:"HEX",93:"INTERPOLATE",94:"NUM",95:"COMMA",98:"ALPHA",99:"COLON",100:"MINUS",101:"UNIT",102:"BRKT",103:"DOT",104:"PCT",105:"TAGSTART",109:"PUNCTUATION",110:"UNICODE_TEXT",111:"PLUS",112:"EQUALS",113:"MULT",114:"UNDERSCORE",116:"ARROW_CROSS",117:"ARROW_POINT",118:"ARROW_CIRCLE",119:"ARROW_OPEN",120:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[44,1],[44,5],[44,3],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[43,2],[43,3],[43,3],[43,1],[43,3],[66,1],[67,3],[39,1],[39,2],[39,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[82,1],[82,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[92,1],[92,3],[85,1],[85,3],[96,1],[96,2],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[83,1],[83,1],[83,1],[83,1],[48,1],[48,2],[86,1],[86,2],[108,1],[108,1],[108,1],[108,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.parseDirective("%%{","open_directive");break;case 6:r.parseDirective(a[s],"type_directive");break;case 7:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 8:r.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:a[s]!==[]&&a[s-1].push(a[s]),this.$=a[s-1];break;case 12:case 76:case 78:case 90:case 146:case 148:case 149:this.$=a[s];break;case 19:r.setDirection("TB"),this.$="TB";break;case 20:r.setDirection(a[s-1]),this.$=a[s-1];break;case 35:this.$=a[s-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 42:this.$=r.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 43:this.$=r.addSubGraph(void 0,a[s-1],void 0);break;case 47:r.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 48:r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 49:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 50:this.$={stmt:a[s],nodes:a[s]};break;case 51:this.$=[a[s]];break;case 52:this.$=a[s-4].concat(a[s]);break;case 53:this.$=[a[s-2]],r.setClass(a[s-2],a[s]);break;case 54:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"square");break;case 55:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"circle");break;case 56:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"ellipse");break;case 57:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"stadium");break;case 58:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"subroutine");break;case 59:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"cylinder");break;case 60:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"round");break;case 61:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"diamond");break;case 62:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"hexagon");break;case 63:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"odd");break;case 64:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"trapezoid");break;case 65:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"inv_trapezoid");break;case 66:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_right");break;case 67:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_left");break;case 68:this.$=a[s],r.addVertex(a[s]);break;case 69:a[s-1].text=a[s],this.$=a[s-1];break;case 70:case 71:a[s-2].text=a[s-1],this.$=a[s-2];break;case 72:this.$=a[s];break;case 73:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1]};break;case 74:c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 75:this.$=a[s-1];break;case 77:case 91:case 147:this.$=a[s-1]+""+a[s];break;case 92:case 93:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 94:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 95:case 103:this.$=a[s-1],r.setClickEvent(a[s-1],a[s]);break;case 96:case 104:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 97:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 98:this.$=a[s-4],r.setClickEvent(a[s-4],a[s-3],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 99:case 105:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 100:case 106:this.$=a[s-3],r.setLink(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 101:case 107:this.$=a[s-3],r.setLink(a[s-3],a[s-2],a[s]);break;case 102:case 108:this.$=a[s-5],r.setLink(a[s-5],a[s-4],a[s]),r.setTooltip(a[s-5],a[s-2]);break;case 109:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 110:case 112:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 111:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 113:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 114:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 115:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 116:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 117:case 119:this.$=[a[s]];break;case 118:case 120:a[s-2].push(a[s]),this.$=a[s-2];break;case 122:this.$=a[s-1]+a[s];break;case 144:this.$=a[s];break;case 145:this.$=a[s-1]+""+a[s];break;case 150:this.$="v";break;case 151:this.$="-"}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},t(a,o,{17:11}),{7:12,13:[1,13]},{16:14,21:n,22:r,24:i},{16:15,21:n,22:r,24:i},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,44:31,45:37,46:f,48:38,75:d,76:p,77:y,78:g,79:v,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},{8:55,10:[1,56],15:N},t([10,15],[2,6]),t(a,[2,17]),t(a,[2,18]),t(a,[2,19]),{20:[1,59],21:[1,60],22:D,27:58,30:61},t(L,[2,11]),t(L,[2,12]),t(L,[2,13]),t(L,[2,14]),t(L,[2,15]),t(L,[2,16]),{9:63,20:I,21:R,23:F,43:64,66:68,69:[1,69],70:[1,70]},{9:71,20:I,21:R,23:F},{9:72,20:I,21:R,23:F},{9:73,20:I,21:R,23:F},{9:74,20:I,21:R,23:F},{9:75,20:I,21:R,23:F},{9:77,20:I,21:R,22:[1,76],23:F},t(P,[2,50],{30:78,22:D}),{22:[1,79]},{22:[1,80]},{22:[1,81]},{22:[1,82]},{26:j,46:Y,73:[1,86],80:z,86:85,87:[1,83],89:[1,84],94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(et,[2,51],{47:[1,105]}),t(nt,[2,68],{107:116,40:[1,106],46:f,49:[1,107],51:[1,108],53:[1,109],55:[1,110],57:[1,111],59:[1,112],61:[1,113],62:[1,114],64:[1,115],80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,109:C,110:S,111:A,112:M,113:O,114:B}),t(rt,[2,144]),t(rt,[2,165]),t(rt,[2,166]),t(rt,[2,167]),t(rt,[2,168]),t(rt,[2,169]),t(rt,[2,170]),t(rt,[2,171]),t(rt,[2,172]),t(rt,[2,173]),t(rt,[2,174]),t(rt,[2,175]),t(rt,[2,176]),t(rt,[2,177]),t(rt,[2,178]),t(rt,[2,179]),{9:117,20:I,21:R,23:F},{11:118,14:[1,119]},t(it,[2,8]),t(a,[2,20]),t(a,[2,26]),t(a,[2,27]),{21:[1,120]},t(at,[2,34],{30:121,22:D}),t(L,[2,35]),{44:122,45:37,46:f,48:38,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},t(ot,[2,44]),t(ot,[2,45]),t(ot,[2,46]),t(st,[2,72],{67:123,68:[1,124],71:[1,125]}),{22:ct,24:ut,26:lt,38:ht,39:126,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t([46,68,71,80,94,95,98,99,100,102,103,109,110,111,112,113,114],[2,74]),t(L,[2,36]),t(L,[2,37]),t(L,[2,38]),t(L,[2,39]),t(L,[2,40]),{22:ct,24:ut,26:lt,38:ht,39:150,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(St,o,{17:151}),t(P,[2,49],{46:At}),{26:j,46:Y,80:z,86:153,91:[1,154],94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},{84:[1,155],92:156,94:[1,157]},{26:j,46:Y,80:z,84:[1,158],86:159,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},{26:j,46:Y,80:z,86:160,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(it,[2,95],{22:[1,161],88:[1,162]}),t(it,[2,99],{22:[1,163]}),t(it,[2,103],{106:89,108:165,22:[1,164],26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,109:X,110:Z,111:Q,112:K,113:J,114:tt}),t(it,[2,105],{22:[1,166]}),t(Mt,[2,146]),t(Mt,[2,148]),t(Mt,[2,149]),t(Mt,[2,150]),t(Mt,[2,151]),t(Ot,[2,152]),t(Ot,[2,153]),t(Ot,[2,154]),t(Ot,[2,155]),t(Ot,[2,156]),t(Ot,[2,157]),t(Ot,[2,158]),t(Ot,[2,159]),t(Ot,[2,160]),t(Ot,[2,161]),t(Ot,[2,162]),t(Ot,[2,163]),t(Ot,[2,164]),{46:f,48:167,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},{22:ct,24:ut,26:lt,38:ht,39:168,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:170,42:ft,46:Y,49:[1,169],61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:171,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:172,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:173,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:174,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:175,42:ft,46:Y,59:[1,176],61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:177,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:178,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:179,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(rt,[2,145]),t(Bt,[2,3]),{8:180,15:N},{15:[2,7]},t(a,[2,28]),t(at,[2,33]),t(P,[2,47],{30:181,22:D}),t(st,[2,69],{22:[1,182]}),{22:[1,183]},{22:ct,24:ut,26:lt,38:ht,39:184,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,61:dt,69:pt,70:[1,185],72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(Ot,[2,76]),t(Ot,[2,78]),t(Ot,[2,134]),t(Ot,[2,135]),t(Ot,[2,136]),t(Ot,[2,137]),t(Ot,[2,138]),t(Ot,[2,139]),t(Ot,[2,140]),t(Ot,[2,141]),t(Ot,[2,142]),t(Ot,[2,143]),t(Ot,[2,79]),t(Ot,[2,80]),t(Ot,[2,81]),t(Ot,[2,82]),t(Ot,[2,83]),t(Ot,[2,84]),t(Ot,[2,85]),t(Ot,[2,86]),t(Ot,[2,87]),t(Ot,[2,88]),t(Ot,[2,89]),{9:188,20:I,21:R,22:ct,23:F,24:ut,26:lt,38:ht,40:[1,187],42:ft,46:Y,61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,189],44:31,45:37,46:f,48:38,75:d,76:p,77:y,78:g,79:v,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},{22:D,30:190},{22:[1,191],26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:165,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:[1,192]},{22:[1,193]},{22:[1,194],95:[1,195]},t(Nt,[2,117]),{22:[1,196]},{22:[1,197],26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:165,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:[1,198],26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:165,109:X,110:Z,111:Q,112:K,113:J,114:tt},{73:[1,199]},t(it,[2,97],{22:[1,200]}),{73:[1,201],90:[1,202]},{73:[1,203]},t(Mt,[2,147]),{73:[1,204],90:[1,205]},t(et,[2,53],{107:116,46:f,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,109:C,110:S,111:A,112:M,113:O,114:B}),{22:ct,24:ut,26:lt,38:ht,41:[1,206],42:ft,46:Y,61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:207,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,50:[1,208],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,52:[1,209],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,54:[1,210],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,56:[1,211],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,58:[1,212],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,60:[1,213],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:214,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,41:[1,215],42:ft,46:Y,61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,61:dt,63:[1,216],65:[1,217],69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,61:dt,63:[1,219],65:[1,218],69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{9:220,20:I,21:R,23:F},t(P,[2,48],{46:At}),t(st,[2,71]),t(st,[2,70]),{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,61:dt,69:pt,71:[1,221],72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(st,[2,73]),t(Ot,[2,77]),{22:ct,24:ut,26:lt,38:ht,39:222,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(St,o,{17:223}),t(L,[2,43]),{45:224,46:f,48:38,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},{22:Dt,75:Lt,85:225,91:It,94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{22:Dt,75:Lt,85:239,91:It,94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{22:Dt,75:Lt,85:240,91:It,93:[1,241],94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{22:Dt,75:Lt,85:242,91:It,93:[1,243],94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{94:[1,244]},{22:Dt,75:Lt,85:245,91:It,94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{22:Dt,75:Lt,85:246,91:It,94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{26:j,46:Y,80:z,86:247,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(it,[2,96]),{73:[1,248]},t(it,[2,100],{22:[1,249]}),t(it,[2,101]),t(it,[2,104]),t(it,[2,106],{22:[1,250]}),t(it,[2,107]),t(nt,[2,54]),{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,50:[1,251],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(nt,[2,60]),t(nt,[2,56]),t(nt,[2,57]),t(nt,[2,58]),t(nt,[2,59]),t(nt,[2,61]),{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,60:[1,252],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(nt,[2,63]),t(nt,[2,64]),t(nt,[2,66]),t(nt,[2,65]),t(nt,[2,67]),t(Bt,[2,4]),t([22,46,80,94,95,98,99,100,102,103,109,110,111,112,113,114],[2,75]),{22:ct,24:ut,26:lt,38:ht,41:[1,253],42:ft,46:Y,61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,254],44:31,45:37,46:f,48:38,75:d,76:p,77:y,78:g,79:v,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},t(et,[2,52]),t(it,[2,109],{95:qt}),t(Wt,[2,119],{97:256,22:Dt,75:Lt,91:It,94:Rt,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t}),t(Vt,[2,121]),t(Vt,[2,123]),t(Vt,[2,124]),t(Vt,[2,125]),t(Vt,[2,126]),t(Vt,[2,127]),t(Vt,[2,128]),t(Vt,[2,129]),t(Vt,[2,130]),t(Vt,[2,131]),t(Vt,[2,132]),t(Vt,[2,133]),t(it,[2,110],{95:qt}),t(it,[2,111],{95:qt}),{22:[1,257]},t(it,[2,112],{95:qt}),{22:[1,258]},t(Nt,[2,118]),t(it,[2,92],{95:qt}),t(it,[2,93],{95:qt}),t(it,[2,94],{106:89,108:165,26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,109:X,110:Z,111:Q,112:K,113:J,114:tt}),t(it,[2,98]),{90:[1,259]},{90:[1,260]},{50:[1,261]},{60:[1,262]},{9:263,20:I,21:R,23:F},t(L,[2,42]),{22:Dt,75:Lt,91:It,94:Rt,96:264,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},t(Vt,[2,122]),{26:j,46:Y,80:z,86:265,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},{26:j,46:Y,80:z,86:266,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(it,[2,102]),t(it,[2,108]),t(nt,[2,55]),t(nt,[2,62]),t(St,o,{17:267}),t(Wt,[2,120],{97:256,22:Dt,75:Lt,91:It,94:Rt,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t}),t(it,[2,115],{106:89,108:165,22:[1,268],26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,109:X,110:Z,111:Q,112:K,113:J,114:tt}),t(it,[2,116],{106:89,108:165,22:[1,269],26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,109:X,110:Z,111:Q,112:K,113:J,114:tt}),{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,270],44:31,45:37,46:f,48:38,75:d,76:p,77:y,78:g,79:v,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},{22:Dt,75:Lt,85:271,91:It,94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{22:Dt,75:Lt,85:272,91:It,94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},t(L,[2,41]),t(it,[2,113],{95:qt}),t(it,[2,114],{95:qt})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],119:[2,7]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},Gt={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:case 6:break;case 7:this.begin("string");break;case 8:this.popState();break;case 9:return"STR";case 10:return 75;case 11:return 84;case 12:return 76;case 13:return 93;case 14:return 77;case 15:return 78;case 16:this.begin("href");break;case 17:this.popState();break;case 18:return 89;case 19:this.begin("callbackname");break;case 20:this.popState();break;case 21:this.popState(),this.begin("callbackargs");break;case 22:return 87;case 23:this.popState();break;case 24:return 88;case 25:this.begin("click");break;case 26:this.popState();break;case 27:return 79;case 28:case 29:return t.lex.firstGraph()&&this.begin("dir"),24;case 30:return 38;case 31:return 42;case 32:case 33:case 34:case 35:return 90;case 36:return this.popState(),25;case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:return this.popState(),26;case 47:return 94;case 48:return 102;case 49:return 47;case 50:return 99;case 51:return 46;case 52:return 20;case 53:return 95;case 54:return 113;case 55:case 56:case 57:return 70;case 58:case 59:case 60:return 69;case 61:return 51;case 62:return 52;case 63:return 53;case 64:return 54;case 65:return 55;case 66:return 56;case 67:return 57;case 68:return 58;case 69:return 100;case 70:return 103;case 71:return 114;case 72:return 111;case 73:return 104;case 74:case 75:return 112;case 76:return 105;case 77:return 61;case 78:return 81;case 79:return"SEP";case 80:return 80;case 81:return 98;case 82:return 63;case 83:return 62;case 84:return 65;case 85:return 64;case 86:return 109;case 87:return 110;case 88:return 71;case 89:return 49;case 90:return 50;case 91:return 40;case 92:return 41;case 93:return 59;case 94:return 60;case 95:return 120;case 96:return 21;case 97:return 22;case 98:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\()/,/^(?:\)\])/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_\/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[23,24],inclusive:!1},callbackname:{rules:[20,21,22],inclusive:!1},href:{rules:[17,18],inclusive:!1},click:{rules:[26,27],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[36,37,38,39,40,41,42,43,44,45,46],inclusive:!1},string:{rules:[8,9],inclusive:!1},INITIAL:{rules:[0,5,6,7,10,11,12,13,14,15,16,19,25,28,29,30,31,32,33,34,35,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98],inclusive:!0}}};function Xt(){this.yy={}}return Ht.lexer=Gt,Xt.prototype=Ht,Ht.Parser=Xt,new Xt}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,17,18,19,21],i=[1,15],a=[1,16],o=[1,17],s=[1,21],c=[4,6,9,11,17,18,19,21],u={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,section:18,taskName:19,taskData:20,open_directive:21,type_directive:22,arg_directive:23,close_directive:24,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"section",19:"taskName",20:"taskData",21:"open_directive",22:"type_directive",23:"arg_directive",24:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 11:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$="task";break;case 15:r.parseDirective("%%{","open_directive");break;case 16:r.parseDirective(a[s],"type_directive");break;case 17:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 18:r.parseDirective("}%%","close_directive","journey")}},table:[{3:1,4:e,7:3,12:4,21:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,21:n},{13:8,22:[1,9]},{22:[2,15]},{6:[1,10],7:18,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:a,19:o,21:n},{1:[2,2]},{14:19,15:[1,20],24:s},t([15,24],[2,16]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:18,10:22,12:4,17:i,18:a,19:o,21:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,12]),{20:[1,23]},t(r,[2,14]),{11:[1,24]},{16:25,23:[1,26]},{11:[2,18]},t(r,[2,5]),t(r,[2,13]),t(c,[2,9]),{14:27,24:s},{24:[2,17]},{11:[1,28]},t(c,[2,10])],defaultActions:{5:[2,15],7:[2,2],21:[2,18],26:[2,17]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},l={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),21;case 1:return this.begin("type_directive"),22;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),24;case 4:return 23;case 5:case 6:break;case 7:return 11;case 8:case 9:break;case 10:return 4;case 11:return 17;case 12:return 18;case 13:return 19;case 14:return 20;case 15:return 15;case 16:return 6;case 17:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}}};function h(){this.yy={}}return u.lexer=l,h.prototype=u,u.Parser=h,new h}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(16);e.default=function(t,e){return r.default.lang.round(i.default.parse(t)[e])}},function(t,e,n){var r=n(113),i=n(83),a=n(25);t.exports=function(t){return a(t)?r(t):i(t)}},function(t,e,n){var r;if(!r)try{r=n(0)}catch(t){}r||(r=window.d3),t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(16);e.default=function(t,e,n){var a=i.default.parse(t),o=a[e],s=r.default.channel.clamp[e](o+n);return o!==s&&(a[e]=s),i.default.stringify(a)}},function(t,e,n){var r=n(211),i=n(217);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(39),i=n(213),a=n(214),o=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?i(t):a(t)}},function(t,e){t.exports=function(t){return t}},function(t){t.exports=JSON.parse('{"name":"mermaid","version":"8.9.3","description":"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.","main":"dist/mermaid.core.js","keywords":["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],"scripts":{"build:development":"webpack --progress --colors","build:production":"yarn build:development -p --config webpack.config.prod.babel.js","build":"yarn build:development && yarn build:production","postbuild":"documentation build src/mermaidAPI.js src/config.js src/defaultConfig.js --shallow -f md --markdown-toc false > docs/Setup.md","build:watch":"yarn build --watch","minify":"minify ./dist/mermaid.js > ./dist/mermaid.min.js","release":"yarn build","lint":"eslint src","e2e:depr":"yarn lint && jest e2e --config e2e/jest.config.js","cypress":"percy exec -- cypress run","e2e":"start-server-and-test dev http://localhost:9000/ cypress","e2e-upd":"yarn lint && jest e2e -u --config e2e/jest.config.js","dev":"webpack-dev-server --config webpack.config.e2e.js","test":"yarn lint && jest src/.*","test:watch":"jest --watch src","prepublishOnly":"yarn build && yarn test","prepare":"yarn build"},"repository":{"type":"git","url":"https://github.com/knsv/mermaid"},"author":"Knut Sveidqvist","license":"MIT","standard":{"ignore":["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],"globals":["page"]},"dependencies":{"@braintree/sanitize-url":"^3.1.0","d3":"^5.7.0","dagre":"^0.8.4","dagre-d3":"^0.6.4","entity-decode":"^2.0.2","graphlib":"^2.1.7","he":"^1.2.0","khroma":"^1.1.0","minify":"^4.1.1","moment-mini":"^2.22.1","stylis":"^3.5.2"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.8.4","@babel/register":"^7.0.0","@percy/cypress":"*","babel-core":"7.0.0-bridge.0","babel-eslint":"^10.1.0","babel-jest":"^24.9.0","babel-loader":"^8.0.4","coveralls":"^3.0.2","css-loader":"^2.0.1","css-to-string-loader":"^0.1.3","cypress":"4.0.1","documentation":"^12.0.1","eslint":"^6.3.0","eslint-config-prettier":"^6.3.0","eslint-plugin-prettier":"^3.1.0","husky":"^1.2.1","identity-obj-proxy":"^3.0.0","jest":"^24.9.0","jison":"^0.4.18","moment":"^2.23.0","node-sass":"^5.0.0","prettier":"^1.18.2","puppeteer":"^1.17.0","sass-loader":"^7.1.0","start-server-and-test":"^1.10.6","terser-webpack-plugin":"^2.2.2","webpack":"^4.41.2","webpack-bundle-analyzer":"^3.7.0","webpack-cli":"^3.1.2","webpack-dev-server":"^3.4.1","webpack-node-externals":"^1.7.2","yarn-upgrade-all":"^0.5.0"},"files":["dist"],"yarn-upgrade-all":{"ignore":["babel-core"]},"sideEffects":["**/*.css","**/*.scss"],"husky":{"hooks":{"pre-push":"yarn test"}}}')},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(34),i=n(13);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(19).Symbol;t.exports=r},function(t,e,n){(function(t){var r=n(19),i=n(233),a=e&&!e.nodeType&&e,o=a&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===a?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||i;t.exports=c}).call(this,n(6)(t))},function(t,e,n){var r=n(113),i=n(237),a=n(25);t.exports=function(t){return a(t)?r(t,!0):i(t)}},function(t,e,n){var r=n(242),i=n(78),a=n(243),o=n(122),s=n(244),c=n(34),u=n(111),l=u(r),h=u(i),f=u(a),d=u(o),p=u(s),y=c;(r&&"[object DataView]"!=y(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=y(new i)||a&&"[object Promise]"!=y(a.resolve())||o&&"[object Set]"!=y(new o)||s&&"[object WeakMap]"!=y(new s))&&(y=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,r=n?u(n):"";if(r)switch(r){case l:return"[object DataView]";case h:return"[object Map]";case f:return"[object Promise]";case d:return"[object Set]";case p:return"[object WeakMap]"}return e}),t.exports=y},function(t,e,n){var r=n(34),i=n(21);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,e,n){var r;try{r={defaults:n(155),each:n(88),isFunction:n(38),isPlainObject:n(159),pick:n(162),has:n(94),range:n(163),uniqueId:n(164)}}catch(t){}r||(r=window._),t.exports=r},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,5],r=[1,17],i=[2,10],a=[1,21],o=[1,22],s=[1,23],c=[1,24],u=[1,25],l=[1,26],h=[1,19],f=[1,27],d=[1,28],p=[1,31],y=[66,67],g=[5,8,14,35,36,37,38,39,40,48,55,57,66,67],v=[5,6,8,14,35,36,37,38,39,40,48,66,67],m=[1,51],b=[1,52],x=[1,53],_=[1,54],k=[1,55],w=[1,56],E=[1,57],T=[57,58],C=[1,69],S=[1,65],A=[1,66],M=[1,67],O=[1,68],B=[1,70],N=[1,74],D=[1,75],L=[1,72],I=[1,73],R=[5,8,14,35,36,37,38,39,40,48,66,67],F={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,open_directive:14,type_directive:15,arg_directive:16,close_directive:17,requirementDef:18,elementDef:19,relationshipDef:20,requirementType:21,requirementName:22,STRUCT_START:23,requirementBody:24,ID:25,COLONSEP:26,id:27,TEXT:28,text:29,RISK:30,riskLevel:31,VERIFYMTHD:32,verifyType:33,STRUCT_STOP:34,REQUIREMENT:35,FUNCTIONAL_REQUIREMENT:36,INTERFACE_REQUIREMENT:37,PERFORMANCE_REQUIREMENT:38,PHYSICAL_REQUIREMENT:39,DESIGN_CONSTRAINT:40,LOW_RISK:41,MED_RISK:42,HIGH_RISK:43,VERIFY_ANALYSIS:44,VERIFY_DEMONSTRATION:45,VERIFY_INSPECTION:46,VERIFY_TEST:47,ELEMENT:48,elementName:49,elementBody:50,TYPE:51,type:52,DOCREF:53,ref:54,END_ARROW_L:55,relationship:56,LINE:57,END_ARROW_R:58,CONTAINS:59,COPIES:60,DERIVES:61,SATISFIES:62,VERIFIES:63,REFINES:64,TRACES:65,unqString:66,qString:67,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"open_directive",15:"type_directive",16:"arg_directive",17:"close_directive",23:"STRUCT_START",25:"ID",26:"COLONSEP",28:"TEXT",30:"RISK",32:"VERIFYMTHD",34:"STRUCT_STOP",35:"REQUIREMENT",36:"FUNCTIONAL_REQUIREMENT",37:"INTERFACE_REQUIREMENT",38:"PERFORMANCE_REQUIREMENT",39:"PHYSICAL_REQUIREMENT",40:"DESIGN_CONSTRAINT",41:"LOW_RISK",42:"MED_RISK",43:"HIGH_RISK",44:"VERIFY_ANALYSIS",45:"VERIFY_DEMONSTRATION",46:"VERIFY_INSPECTION",47:"VERIFY_TEST",48:"ELEMENT",51:"TYPE",53:"DOCREF",55:"END_ARROW_L",57:"LINE",58:"END_ARROW_R",59:"CONTAINS",60:"COPIES",61:"DERIVES",62:"SATISFIES",63:"VERIFIES",64:"REFINES",65:"TRACES",66:"unqString",67:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[18,5],[24,5],[24,5],[24,5],[24,5],[24,2],[24,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[31,1],[31,1],[31,1],[33,1],[33,1],[33,1],[33,1],[19,5],[50,5],[50,5],[50,2],[50,1],[20,5],[20,5],[56,1],[56,1],[56,1],[56,1],[56,1],[56,1],[56,1],[22,1],[22,1],[27,1],[27,1],[29,1],[29,1],[49,1],[49,1],[52,1],[52,1],[54,1],[54,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:r.parseDirective("%%{","open_directive");break;case 7:r.parseDirective(a[s],"type_directive");break;case 8:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 9:r.parseDirective("}%%","close_directive","pie");break;case 10:this.$=[];break;case 16:r.addRequirement(a[s-3],a[s-4]);break;case 17:r.setNewReqId(a[s-2]);break;case 18:r.setNewReqText(a[s-2]);break;case 19:r.setNewReqRisk(a[s-2]);break;case 20:r.setNewReqVerifyMethod(a[s-2]);break;case 23:this.$=r.RequirementType.REQUIREMENT;break;case 24:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 25:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 26:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 27:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 28:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 29:this.$=r.RiskLevel.LOW_RISK;break;case 30:this.$=r.RiskLevel.MED_RISK;break;case 31:this.$=r.RiskLevel.HIGH_RISK;break;case 32:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 33:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 34:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 35:this.$=r.VerifyType.VERIFY_TEST;break;case 36:r.addElement(a[s-3]);break;case 37:r.setNewElementType(a[s-2]);break;case 38:r.setNewElementDocRef(a[s-2]);break;case 41:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 42:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 43:this.$=r.Relationships.CONTAINS;break;case 44:this.$=r.Relationships.COPIES;break;case 45:this.$=r.Relationships.DERIVES;break;case 46:this.$=r.Relationships.SATISFIES;break;case 47:this.$=r.Relationships.VERIFIES;break;case 48:this.$=r.Relationships.REFINES;break;case 49:this.$=r.Relationships.TRACES}},table:[{3:1,4:2,6:e,9:4,14:n},{1:[3]},{3:7,4:2,5:[1,6],6:e,9:4,14:n},{5:[1,8]},{10:9,15:[1,10]},{15:[2,6]},{3:11,4:2,6:e,9:4,14:n},{1:[2,2]},{4:16,5:r,7:12,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:u,40:l,48:h,66:f,67:d},{11:29,12:[1,30],17:p},t([12,17],[2,7]),{1:[2,1]},{8:[1,32]},{4:16,5:r,7:33,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:u,40:l,48:h,66:f,67:d},{4:16,5:r,7:34,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:u,40:l,48:h,66:f,67:d},{4:16,5:r,7:35,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:u,40:l,48:h,66:f,67:d},{4:16,5:r,7:36,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:u,40:l,48:h,66:f,67:d},{4:16,5:r,7:37,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:u,40:l,48:h,66:f,67:d},{22:38,66:[1,39],67:[1,40]},{49:41,66:[1,42],67:[1,43]},{55:[1,44],57:[1,45]},t(y,[2,23]),t(y,[2,24]),t(y,[2,25]),t(y,[2,26]),t(y,[2,27]),t(y,[2,28]),t(g,[2,52]),t(g,[2,53]),t(v,[2,4]),{13:46,16:[1,47]},t(v,[2,9]),{1:[2,3]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{23:[1,48]},{23:[2,50]},{23:[2,51]},{23:[1,49]},{23:[2,56]},{23:[2,57]},{56:50,59:m,60:b,61:x,62:_,63:k,64:w,65:E},{56:58,59:m,60:b,61:x,62:_,63:k,64:w,65:E},{11:59,17:p},{17:[2,8]},{5:[1,60]},{5:[1,61]},{57:[1,62]},t(T,[2,43]),t(T,[2,44]),t(T,[2,45]),t(T,[2,46]),t(T,[2,47]),t(T,[2,48]),t(T,[2,49]),{58:[1,63]},t(v,[2,5]),{5:C,24:64,25:S,28:A,30:M,32:O,34:B},{5:N,34:D,50:71,51:L,53:I},{27:76,66:f,67:d},{27:77,66:f,67:d},t(R,[2,16]),{26:[1,78]},{26:[1,79]},{26:[1,80]},{26:[1,81]},{5:C,24:82,25:S,28:A,30:M,32:O,34:B},t(R,[2,22]),t(R,[2,36]),{26:[1,83]},{26:[1,84]},{5:N,34:D,50:85,51:L,53:I},t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),{27:86,66:f,67:d},{29:87,66:[1,88],67:[1,89]},{31:90,41:[1,91],42:[1,92],43:[1,93]},{33:94,44:[1,95],45:[1,96],46:[1,97],47:[1,98]},t(R,[2,21]),{52:99,66:[1,100],67:[1,101]},{54:102,66:[1,103],67:[1,104]},t(R,[2,39]),{5:[1,105]},{5:[1,106]},{5:[2,54]},{5:[2,55]},{5:[1,107]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[1,108]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[2,35]},{5:[1,109]},{5:[2,58]},{5:[2,59]},{5:[1,110]},{5:[2,60]},{5:[2,61]},{5:C,24:111,25:S,28:A,30:M,32:O,34:B},{5:C,24:112,25:S,28:A,30:M,32:O,34:B},{5:C,24:113,25:S,28:A,30:M,32:O,34:B},{5:C,24:114,25:S,28:A,30:M,32:O,34:B},{5:N,34:D,50:115,51:L,53:I},{5:N,34:D,50:116,51:L,53:I},t(R,[2,17]),t(R,[2,18]),t(R,[2,19]),t(R,[2,20]),t(R,[2,37]),t(R,[2,38])],defaultActions:{5:[2,6],7:[2,2],11:[2,1],32:[2,3],33:[2,11],34:[2,12],35:[2,13],36:[2,14],37:[2,15],39:[2,50],40:[2,51],42:[2,56],43:[2,57],47:[2,8],88:[2,54],89:[2,55],91:[2,29],92:[2,30],93:[2,31],95:[2,32],96:[2,33],97:[2,34],98:[2,35],100:[2,58],101:[2,59],103:[2,60],104:[2,61]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},P={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),14;case 1:return this.begin("type_directive"),15;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),17;case 4:return 16;case 5:return 5;case 6:case 7:case 8:break;case 9:return 8;case 10:return 6;case 11:return 23;case 12:return 34;case 13:return 26;case 14:return 25;case 15:return 28;case 16:return 30;case 17:return 32;case 18:return 35;case 19:return 36;case 20:return 37;case 21:return 38;case 22:return 39;case 23:return 40;case 24:return 41;case 25:return 42;case 26:return 43;case 27:return 44;case 28:return 45;case 29:return 46;case 30:return 47;case 31:return 48;case 32:return 59;case 33:return 60;case 34:return 61;case 35:return 62;case 36:return 63;case 37:return 64;case 38:return 65;case 39:return 51;case 40:return 53;case 41:return 55;case 42:return 58;case 43:return 57;case 44:this.begin("string");break;case 45:this.popState();break;case 46:return"qString";case 47:return e.yytext=e.yytext.trim(),66}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[45,46],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,47],inclusive:!0}}};function j(){this.yy={}}return F.lexer=P,j.prototype=F,F.Parser=j,new j}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=new(n(176).default)({r:0,g:0,b:0,a:0},"transparent");e.default=r},function(t,e,n){var r=n(59),i=n(60);t.exports=function(t,e,n,a){var o=!n;n||(n={});for(var s=-1,c=e.length;++s<c;){var u=e[s],l=a?a(n[u],t[u],u,n,t):void 0;void 0===l&&(l=t[u]),o?i(n,u,l):r(n,u,l)}return n}},function(t,e,n){var r=n(232),i=n(21),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return i(t)&&o.call(t,"callee")&&!s.call(t,"callee")};t.exports=c},function(t,e,n){var r=n(234),i=n(62),a=n(82),o=a&&a.isTypedArray,s=o?i(o):r;t.exports=s},function(t,e,n){var r=n(43);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(14);t.exports=function(t,e){var n=t.append("foreignObject").attr("width","100000"),a=n.append("xhtml:div");a.attr("xmlns","http://www.w3.org/1999/xhtml");var o=e.label;switch(r(o)){case"function":a.insert(o);break;case"object":a.insert((function(){return o}));break;default:a.html(o)}i.applyStyle(a,e.labelStyle),a.style("display","inline-block"),a.style("white-space","nowrap");var s=a.node().getBoundingClientRect();return n.attr("width",s.width).attr("height",s.height),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(46),a=n(16),o=n(53);e.default=function(t,e,n,s){if(void 0===n&&(n=0),void 0===s&&(s=1),"number"!=typeof t)return o.default(t,{a:e});var c=i.default.set({r:r.default.channel.clamp.r(t),g:r.default.channel.clamp.g(e),b:r.default.channel.clamp.b(n),a:r.default.channel.clamp.a(s)});return a.default.stringify(c)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(16);e.default=function(t,e){var n=i.default.parse(t);for(var a in e)n[a]=r.default.channel.clamp[a](e[a]);return i.default.stringify(n)}},function(t,e,n){var r=n(55),i=n(206),a=n(207),o=n(208),s=n(209),c=n(210);function u(t){var e=this.__data__=new r(t);this.size=e.size}u.prototype.clear=i,u.prototype.delete=a,u.prototype.get=o,u.prototype.has=s,u.prototype.set=c,t.exports=u},function(t,e,n){var r=n(201),i=n(202),a=n(203),o=n(204),s=n(205);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},function(t,e,n){var r=n(37);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(33)(Object,"create");t.exports=r},function(t,e,n){var r=n(226);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(60),i=n(37),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var o=t[e];a.call(t,e)&&i(o,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(112);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(114)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(89),i=n(255)(r);t.exports=i},function(t,e,n){var r=n(5),i=n(93),a=n(269),o=n(136);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:a(o(t))}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},function(t,e,n){var r=n(35),i=n(144),a=n(145);t.exports=function(t,e){return a(i(t,e,r),t+"")}},function(t,e,n){var r=n(37),i=n(25),a=n(61),o=n(13);t.exports=function(t,e,n){if(!o(n))return!1;var s=typeof e;return!!("number"==s?i(n)&&a(e,n.length):"string"==s&&e in n)&&r(n[e],t)}},function(t,e,n){"use strict";var r=n(4);t.exports={longestPath:function(t){var e={};r.forEach(t.sources(),(function n(i){var a=t.node(i);if(r.has(e,i))return a.rank;e[i]=!0;var o=r.min(r.map(t.outEdges(i),(function(e){return n(e.w)-t.edge(e).minlen})));return o!==Number.POSITIVE_INFINITY&&null!=o||(o=0),a.rank=o}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},function(t,e,n){"use strict";var r=/^(%20|\s)*(javascript|data)/im,i=/[^\x20-\x7E]/gim,a=/^([^:]+):/gm,o=[".","/"];t.exports={sanitizeUrl:function(t){if(!t)return"about:blank";var e,n,s=t.replace(i,"").trim();return function(t){return o.indexOf(t[0])>-1}(s)?s:(n=s.match(a))?(e=n[0],r.test(e)?"about:blank":s):"about:blank"}}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[2,3],n=[1,7],r=[7,12,15,17,19,20,21],i=[7,11,12,15,17,19,20,21],a=[2,20],o=[1,32],s={trace:function(){},yy:{},symbols_:{error:2,start:3,GG:4,":":5,document:6,EOF:7,DIR:8,options:9,body:10,OPT:11,NL:12,line:13,statement:14,COMMIT:15,commit_arg:16,BRANCH:17,ID:18,CHECKOUT:19,MERGE:20,RESET:21,reset_arg:22,STR:23,HEAD:24,reset_parents:25,CARET:26,$accept:0,$end:1},terminals_:{2:"error",4:"GG",5:":",7:"EOF",8:"DIR",11:"OPT",12:"NL",15:"COMMIT",17:"BRANCH",18:"ID",19:"CHECKOUT",20:"MERGE",21:"RESET",23:"STR",24:"HEAD",26:"CARET"},productions_:[0,[3,4],[3,5],[6,0],[6,2],[9,2],[9,1],[10,0],[10,2],[13,2],[13,1],[14,2],[14,2],[14,2],[14,2],[14,2],[16,0],[16,1],[22,2],[22,2],[25,0],[25,2]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:return r.setDirection(a[s-3]),a[s-1];case 4:r.setOptions(a[s-1]),this.$=a[s];break;case 5:a[s-1]+=a[s],this.$=a[s-1];break;case 7:this.$=[];break;case 8:a[s-1].push(a[s]),this.$=a[s-1];break;case 9:this.$=a[s-1];break;case 11:r.commit(a[s]);break;case 12:r.branch(a[s]);break;case 13:r.checkout(a[s]);break;case 14:r.merge(a[s]);break;case 15:r.reset(a[s]);break;case 16:this.$="";break;case 17:this.$=a[s];break;case 18:this.$=a[s-1]+":"+a[s];break;case 19:this.$=a[s-1]+":"+r.count,r.count=0;break;case 20:r.count=0;break;case 21:r.count+=1}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:e,9:6,12:n},{5:[1,8]},{7:[1,9]},t(r,[2,7],{10:10,11:[1,11]}),t(i,[2,6]),{6:12,7:e,9:6,12:n},{1:[2,1]},{7:[2,4],12:[1,15],13:13,14:14,15:[1,16],17:[1,17],19:[1,18],20:[1,19],21:[1,20]},t(i,[2,5]),{7:[1,21]},t(r,[2,8]),{12:[1,22]},t(r,[2,10]),{12:[2,16],16:23,23:[1,24]},{18:[1,25]},{18:[1,26]},{18:[1,27]},{18:[1,30],22:28,24:[1,29]},{1:[2,2]},t(r,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:a,25:31,26:o},{12:a,25:33,26:o},{12:[2,18]},{12:a,25:34,26:o},{12:[2,19]},{12:[2,21]}],defaultActions:{9:[2,1],21:[2,2],23:[2,11],24:[2,17],25:[2,12],26:[2,13],27:[2,14],28:[2,15],31:[2,18],33:[2,19],34:[2,21]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},c={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 12;case 1:case 2:case 3:break;case 4:return 4;case 5:return 15;case 6:return 17;case 7:return 20;case 8:return 21;case 9:return 19;case 10:case 11:return 8;case 12:return 5;case 13:return 26;case 14:this.begin("options");break;case 15:this.popState();break;case 16:return 11;case 17:this.begin("string");break;case 18:this.popState();break;case 19:return 23;case 20:return 18;case 21:return 7}},rules:[/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:branch\b)/i,/^(?:merge\b)/i,/^(?:reset\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:end\r?\n)/i,/^(?:[^\n]+\r?\n)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[a-zA-Z][-_\.a-zA-Z0-9]*[-_a-zA-Z0-9])/i,/^(?:$)/i],conditions:{options:{rules:[15,16],inclusive:!1},string:{rules:[18,19],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,21],inclusive:!0}}};function u(){this.yy={}}return s.lexer=c,u.prototype=s,s.Parser=u,new u}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,9,10],n={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,r,i,a,o){a.length;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function i(){this.yy={}}return n.lexer=r,i.prototype=n,n.Parser=i,new i}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,4],n=[1,5],r=[1,6],i=[1,7],a=[1,9],o=[1,11,13,20,21,22,23],s=[2,5],c=[1,6,11,13,20,21,22,23],u=[20,21,22],l=[2,8],h=[1,18],f=[1,19],d=[1,24],p=[6,20,21,22,23],y={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,openDirective:15,typeDirective:16,closeDirective:17,":":18,argDirective:19,NEWLINE:20,";":21,EOF:22,open_directive:23,type_directive:24,arg_directive:25,close_directive:26,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",18:":",20:"NEWLINE",21:";",22:"EOF",23:"open_directive",24:"type_directive",25:"arg_directive",26:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[15,1],[16,1],[19,1],[17,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.setShowData(!0);break;case 7:this.$=a[s-1];break;case 9:r.addSection(a[s-1],r.cleanupValue(a[s]));break;case 10:this.$=a[s].trim(),r.setTitle(this.$);break;case 17:r.parseDirective("%%{","open_directive");break;case 18:r.parseDirective(a[s],"type_directive");break;case 19:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 20:r.parseDirective("}%%","close_directive","pie")}},table:[{3:1,4:2,5:3,6:e,15:8,20:n,21:r,22:i,23:a},{1:[3]},{3:10,4:2,5:3,6:e,15:8,20:n,21:r,22:i,23:a},{3:11,4:2,5:3,6:e,15:8,20:n,21:r,22:i,23:a},t(o,s,{7:12,8:[1,13]}),t(c,[2,14]),t(c,[2,15]),t(c,[2,16]),{16:14,24:[1,15]},{24:[2,17]},{1:[2,1]},{1:[2,2]},t(u,l,{15:8,9:16,10:17,5:20,1:[2,3],11:h,13:f,23:a}),t(o,s,{7:21}),{17:22,18:[1,23],26:d},t([18,26],[2,18]),t(o,[2,6]),{4:25,20:n,21:r,22:i},{12:[1,26]},{14:[1,27]},t(u,[2,11]),t(u,l,{15:8,9:16,10:17,5:20,1:[2,4],11:h,13:f,23:a}),t(p,[2,12]),{19:28,25:[1,29]},t(p,[2,20]),t(o,[2,7]),t(u,[2,9]),t(u,[2,10]),{17:30,26:d},{26:[2,19]},t(p,[2,13])],defaultActions:{9:[2,17],10:[2,1],11:[2,2],29:[2,19]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},g={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),23;case 1:return this.begin("type_directive"),24;case 2:return this.popState(),this.begin("arg_directive"),18;case 3:return this.popState(),this.popState(),26;case 4:return 25;case 5:case 6:break;case 7:return 20;case 8:case 9:break;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:this.begin("string");break;case 13:this.popState();break;case 14:return"txt";case 15:return 6;case 16:return 8;case 17:return"value";case 18:return 22}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,15,16,17,18],inclusive:!0}}};function v(){this.yy={}}return y.lexer=g,v.prototype=y,y.Parser=v,new v}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,23,37],i=[1,17],a=[1,20],o=[1,25],s=[1,26],c=[1,27],u=[1,28],l=[1,37],h=[23,34,35],f=[4,6,9,11,23,37],d=[30,31,32,33],p=[22,27],y={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,ALPHANUM:23,attribute:24,attributeType:25,attributeName:26,ATTRIBUTE_WORD:27,cardinality:28,relType:29,ZERO_OR_ONE:30,ZERO_OR_MORE:31,ONE_OR_MORE:32,ONLY_ONE:33,NON_IDENTIFYING:34,IDENTIFYING:35,WORD:36,open_directive:37,type_directive:38,arg_directive:39,close_directive:40,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"ALPHANUM",27:"ATTRIBUTE_WORD",30:"ZERO_OR_ONE",31:"ZERO_OR_MORE",32:"ONE_OR_MORE",33:"ONLY_ONE",34:"NON_IDENTIFYING",35:"IDENTIFYING",36:"WORD",37:"open_directive",38:"type_directive",39:"arg_directive",40:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[17,1],[21,1],[21,2],[24,2],[25,1],[26,1],[18,3],[28,1],[28,1],[28,1],[28,1],[29,1],[29,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 12:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 13:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s]);break;case 16:this.$=a[s];break;case 17:this.$=[a[s]];break;case 18:a[s].push(a[s-1]),this.$=a[s];break;case 19:this.$={attributeType:a[s-1],attributeName:a[s]};break;case 20:case 21:this.$=a[s];break;case 22:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 23:this.$=r.Cardinality.ZERO_OR_ONE;break;case 24:this.$=r.Cardinality.ZERO_OR_MORE;break;case 25:this.$=r.Cardinality.ONE_OR_MORE;break;case 26:this.$=r.Cardinality.ONLY_ONE;break;case 27:this.$=r.Identification.NON_IDENTIFYING;break;case 28:this.$=r.Identification.IDENTIFYING;break;case 29:this.$=a[s].replace(/"/g,"");break;case 30:this.$=a[s];break;case 31:r.parseDirective("%%{","open_directive");break;case 32:r.parseDirective(a[s],"type_directive");break;case 33:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 34:r.parseDirective("}%%","close_directive","er")}},table:[{3:1,4:e,7:3,12:4,37:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,37:n},{13:8,38:[1,9]},{38:[2,31]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:i,37:n},{1:[2,2]},{14:18,15:[1,19],40:a},t([15,40],[2,32]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:15,10:21,12:4,17:16,23:i,37:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,15],{18:22,28:24,20:[1,23],30:o,31:s,32:c,33:u}),t([6,9,11,15,20,23,30,31,32,33,37],[2,16]),{11:[1,29]},{16:30,39:[1,31]},{11:[2,34]},t(r,[2,5]),{17:32,23:i},{21:33,22:[1,34],24:35,25:36,27:l},{29:38,34:[1,39],35:[1,40]},t(h,[2,23]),t(h,[2,24]),t(h,[2,25]),t(h,[2,26]),t(f,[2,9]),{14:41,40:a},{40:[2,33]},{15:[1,42]},{22:[1,43]},t(r,[2,14]),{21:44,22:[2,17],24:35,25:36,27:l},{26:45,27:[1,46]},{27:[2,20]},{28:47,30:o,31:s,32:c,33:u},t(d,[2,27]),t(d,[2,28]),{11:[1,48]},{19:49,23:[1,51],36:[1,50]},t(r,[2,13]),{22:[2,18]},t(p,[2,19]),t(p,[2,21]),{23:[2,22]},t(f,[2,10]),t(r,[2,12]),t(r,[2,29]),t(r,[2,30])],defaultActions:{5:[2,31],7:[2,2],20:[2,34],31:[2,33],37:[2,20],44:[2,18],47:[2,22]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},g={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),37;case 1:return this.begin("type_directive"),38;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),40;case 4:return 39;case 5:case 6:break;case 7:return 11;case 8:break;case 9:return 9;case 10:return 36;case 11:return 4;case 12:return this.begin("block"),20;case 13:break;case 14:return 27;case 15:break;case 16:return this.popState(),22;case 17:return e.yytext[0];case 18:return 30;case 19:return 31;case 20:return 32;case 21:return 33;case 22:return 30;case 23:return 31;case 24:return 32;case 25:return 34;case 26:return 35;case 27:case 28:return 34;case 29:return 23;case 30:return e.yytext[0];case 31:return 6}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\|o\b)/i,/^(?:\}o\b)/i,/^(?:\}\|)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},block:{rules:[13,14,15,16,17],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,18,19,20,21,22,23,24,25,26,27,28,29,30,31],inclusive:!0}}};function v(){this.yy={}}return y.lexer=g,v.prototype=y,y.Parser=v,new v}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.ALL=0]="ALL",t[t.RGB=1]="RGB",t[t.HSL=2]="HSL"}(r||(r={})),e.TYPE=r},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(12);t.exports=a;function a(t){this._isDirected=!i.has(t,"directed")||t.directed,this._isMultigraph=!!i.has(t,"multigraph")&&t.multigraph,this._isCompound=!!i.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=i.constant(void 0),this._defaultEdgeLabelFn=i.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function o(t,e){t[e]?t[e]++:t[e]=1}function s(t,e){--t[e]||delete t[e]}function c(t,e,n,r){var a=""+e,o=""+n;if(!t&&a>o){var s=a;a=o,o=s}return a+""+o+""+(i.isUndefined(r)?"\0":r)}function u(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function l(t,e){return c(t,e.v,e.w,e.name)}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(t){return this._label=t,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(t){return i.isFunction(t)||(t=i.constant(t)),this._defaultNodeLabelFn=t,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return i.keys(this._nodes)},a.prototype.sources=function(){var t=this;return i.filter(this.nodes(),(function(e){return i.isEmpty(t._in[e])}))},a.prototype.sinks=function(){var t=this;return i.filter(this.nodes(),(function(e){return i.isEmpty(t._out[e])}))},a.prototype.setNodes=function(t,e){var n=arguments,r=this;return i.each(t,(function(t){n.length>1?r.setNode(t,e):r.setNode(t)})),this},a.prototype.setNode=function(t,e){return i.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]="\0",this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},a.prototype.node=function(t){return this._nodes[t]},a.prototype.hasNode=function(t){return i.has(this._nodes,t)},a.prototype.removeNode=function(t){var e=this;if(i.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],i.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),i.each(i.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],i.each(i.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},a.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(i.isUndefined(e))e="\0";else{for(var n=e+="";!i.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},a.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},a.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if("\0"!==e)return e}},a.prototype.children=function(t){if(i.isUndefined(t)&&(t="\0"),this._isCompound){var e=this._children[t];if(e)return i.keys(e)}else{if("\0"===t)return this.nodes();if(this.hasNode(t))return[]}},a.prototype.predecessors=function(t){var e=this._preds[t];if(e)return i.keys(e)},a.prototype.successors=function(t){var e=this._sucs[t];if(e)return i.keys(e)},a.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return i.union(e,this.successors(t))},a.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},a.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;i.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),i.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var r={};return this._isCompound&&i.each(e.nodes(),(function(t){e.setParent(t,function t(i){var a=n.parent(i);return void 0===a||e.hasNode(a)?(r[i]=a,a):a in r?r[a]:t(a)}(t))})),e},a.prototype.setDefaultEdgeLabel=function(t){return i.isFunction(t)||(t=i.constant(t)),this._defaultEdgeLabelFn=t,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return i.values(this._edgeObjs)},a.prototype.setPath=function(t,e){var n=this,r=arguments;return i.reduce(t,(function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i})),this},a.prototype.setEdge=function(){var t,e,n,a,s=!1,l=arguments[0];"object"===r(l)&&null!==l&&"v"in l?(t=l.v,e=l.w,n=l.name,2===arguments.length&&(a=arguments[1],s=!0)):(t=l,e=arguments[1],n=arguments[3],arguments.length>2&&(a=arguments[2],s=!0)),t=""+t,e=""+e,i.isUndefined(n)||(n=""+n);var h=c(this._isDirected,t,e,n);if(i.has(this._edgeLabels,h))return s&&(this._edgeLabels[h]=a),this;if(!i.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[h]=s?a:this._defaultEdgeLabelFn(t,e,n);var f=u(this._isDirected,t,e,n);return t=f.v,e=f.w,Object.freeze(f),this._edgeObjs[h]=f,o(this._preds[e],t),o(this._sucs[t],e),this._in[e][h]=f,this._out[t][h]=f,this._edgeCount++,this},a.prototype.edge=function(t,e,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return this._edgeLabels[r]},a.prototype.hasEdge=function(t,e,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return i.has(this._edgeLabels,r)},a.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[e],t),s(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},a.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var r=i.values(n);return e?i.filter(r,(function(t){return t.v===e})):r}},a.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var r=i.values(n);return e?i.filter(r,(function(t){return t.w===e})):r}},a.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},function(t,e,n){var r=n(33)(n(19),"Map");t.exports=r},function(t,e,n){var r=n(218),i=n(225),a=n(227),o=n(228),s=n(229);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){(function(t){var r=n(110),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i&&r.process,s=function(){try{var t=a&&a.require&&a.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=s}).call(this,n(6)(t))},function(t,e,n){var r=n(63),i=n(235),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){var r=n(117),i=n(118),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(t){return null==t?[]:(t=Object(t),r(o(t),(function(e){return a.call(t,e)})))}:i;t.exports=s},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},function(t,e,n){var r=n(123);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e,n){t.exports=n(127)},function(t,e,n){var r=n(90),i=n(30);t.exports=function(t,e){return t&&r(t,e,i)}},function(t,e,n){var r=n(254)();t.exports=r},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},function(t,e,n){var r=n(66),i=n(50);t.exports=function(t,e){for(var n=0,a=(e=r(e,t)).length;null!=t&&n<a;)t=t[i(e[n++])];return n&&n==a?t:void 0}},function(t,e,n){var r=n(5),i=n(43),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||(o.test(t)||!a.test(t)||null!=e&&t in Object(e))}},function(t,e,n){var r=n(276),i=n(138);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e,n){var r=n(85),i=n(288);t.exports=function t(e,n,a,o,s){var c=-1,u=e.length;for(a||(a=i),s||(s=[]);++c<u;){var l=e[c];n>0&&a(l)?n>1?t(l,n-1,a,o,s):r(s,l):o||(s[s.length]=l)}return s}},function(t,e,n){var r=n(43);t.exports=function(t,e,n){for(var i=-1,a=t.length;++i<a;){var o=t[i],s=e(o);if(null!=s&&(void 0===c?s==s&&!r(s):n(s,c)))var c=s,u=o}return u}},function(t,e){t.exports=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),u=Math.abs(e*n*o/c);r.x<i&&(u=-u);var l=Math.abs(e*n*s/c);r.y<a&&(l=-l);return{x:i+u,y:a+l}}},function(t,e,n){var r=n(373),i=n(51),a=n(374);t.exports=function(t,e,n){var o=e.label,s=t.append("g");"svg"===e.labelType?a(s,e):"string"!=typeof o||"html"===e.labelType?i(s,e):r(s,e);var c,u=s.node().getBBox();switch(n){case"top":c=-e.height/2;break;case"bottom":c=e.height/2-u.height;break;default:c=-u.height/2}return s.attr("transform","translate("+-u.width/2+","+c+")"),s}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(46),a=n(178),o={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:function(t){if(35===t.charCodeAt(0)){var e=t.match(o.re);if(e){var n=e[1],r=parseInt(n,16),a=n.length,s=a%4==0,c=a>4,u=c?1:17,l=c?8:4,h=s?0:-1,f=c?255:15;return i.default.set({r:(r>>l*(h+3)&f)*u,g:(r>>l*(h+2)&f)*u,b:(r>>l*(h+1)&f)*u,a:s?(r&f)*u/255:1},t)}}},stringify:function(t){return t.a<1?"#"+a.DEC2HEX[Math.round(t.r)]+a.DEC2HEX[Math.round(t.g)]+a.DEC2HEX[Math.round(t.b)]+r.default.unit.frac2hex(t.a):"#"+a.DEC2HEX[Math.round(t.r)]+a.DEC2HEX[Math.round(t.g)]+a.DEC2HEX[Math.round(t.b)]}};e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(46),a=n(16);e.default=function(t,e,n,o){void 0===o&&(o=1);var s=i.default.set({h:r.default.channel.clamp.h(t),s:r.default.channel.clamp.s(e),l:r.default.channel.clamp.l(n),a:r.default.channel.clamp.a(o)});return a.default.stringify(s)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"a")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(16);e.default=function(t){var e=i.default.parse(t),n=e.r,a=e.g,o=e.b,s=.2126*r.default.channel.toLinear(n)+.7152*r.default.channel.toLinear(a)+.0722*r.default.channel.toLinear(o);return r.default.lang.round(s)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(102);e.default=function(t){return r.default(t)>=.5}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"a",e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"a",-e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(16),i=n(53);e.default=function(t,e){var n=r.default.parse(t),a={};for(var o in e)e[o]&&(a[o]=n[o]+e[o]);return i.default(t,a)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(16),i=n(52);e.default=function(t,e,n){void 0===n&&(n=50);var a=r.default.parse(t),o=a.r,s=a.g,c=a.b,u=a.a,l=r.default.parse(e),h=l.r,f=l.g,d=l.b,p=l.a,y=n/100,g=2*y-1,v=u-p,m=((g*v==-1?g:(g+v)/(1+g*v))+1)/2,b=1-m,x=o*m+h*b,_=s*m+f*b,k=c*m+d*b,w=u*y+p*(1-y);return i.default(x,_,k,w)}},function(t,e){},function(t,e,n){var r=n(54),i=n(80),a=n(59),o=n(230),s=n(236),c=n(115),u=n(116),l=n(239),h=n(240),f=n(120),d=n(241),p=n(42),y=n(245),g=n(246),v=n(125),m=n(5),b=n(40),x=n(250),_=n(13),k=n(252),w=n(30),E={};E["[object Arguments]"]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E["[object Object]"]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E["[object Function]"]=E["[object WeakMap]"]=!1,t.exports=function t(e,n,T,C,S,A){var M,O=1&n,B=2&n,N=4&n;if(T&&(M=S?T(e,C,S,A):T(e)),void 0!==M)return M;if(!_(e))return e;var D=m(e);if(D){if(M=y(e),!O)return u(e,M)}else{var L=p(e),I="[object Function]"==L||"[object GeneratorFunction]"==L;if(b(e))return c(e,O);if("[object Object]"==L||"[object Arguments]"==L||I&&!S){if(M=B||I?{}:v(e),!O)return B?h(e,s(M,e)):l(e,o(M,e))}else{if(!E[L])return S?e:{};M=g(e,L,O)}}A||(A=new r);var R=A.get(e);if(R)return R;A.set(e,M),k(e)?e.forEach((function(r){M.add(t(r,n,T,r,e,A))})):x(e)&&e.forEach((function(r,i){M.set(i,t(r,n,T,i,e,A))}));var F=N?B?d:f:B?keysIn:w,P=D?void 0:F(e);return i(P||e,(function(r,i){P&&(r=e[i=r]),a(M,i,t(r,n,T,i,e,A))})),M}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(212))},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var r=n(33),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,n){var r=n(231),i=n(48),a=n(5),o=n(40),s=n(61),c=n(49),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=a(t),l=!n&&i(t),h=!n&&!l&&o(t),f=!n&&!l&&!h&&c(t),d=n||l||h||f,p=d?r(t.length,String):[],y=p.length;for(var g in t)!e&&!u.call(t,g)||d&&("length"==g||h&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,y))||p.push(g);return p}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){(function(t){var r=n(19),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(6)(t))},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(85),i=n(64),a=n(84),o=n(118),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,a(t)),t=i(t);return e}:o;t.exports=s},function(t,e,n){var r=n(121),i=n(84),a=n(30);t.exports=function(t){return r(t,a,i)}},function(t,e,n){var r=n(85),i=n(5);t.exports=function(t,e,n){var a=e(t);return i(t)?a:r(a,n(t))}},function(t,e,n){var r=n(33)(n(19),"Set");t.exports=r},function(t,e,n){var r=n(19).Uint8Array;t.exports=r},function(t,e,n){var r=n(86);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){var r=n(126),i=n(64),a=n(63);t.exports=function(t){return"function"!=typeof t.constructor||a(t)?{}:r(i(t))}},function(t,e,n){var r=n(13),i=Object.create,a=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=a},function(t,e,n){var r=n(80),i=n(65),a=n(128),o=n(5);t.exports=function(t,e){return(o(t)?r:i)(t,a(e))}},function(t,e,n){var r=n(35);t.exports=function(t){return"function"==typeof t?t:r}},function(t,e,n){var r=n(117),i=n(256),a=n(26),o=n(5);t.exports=function(t,e){return(o(t)?r:i)(t,a(e,3))}},function(t,e,n){var r=n(259),i=n(21);t.exports=function t(e,n,a,o,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,a,o,t,s))}},function(t,e,n){var r=n(132),i=n(262),a=n(133);t.exports=function(t,e,n,o,s,c){var u=1&n,l=t.length,h=e.length;if(l!=h&&!(u&&h>l))return!1;var f=c.get(t);if(f&&c.get(e))return f==e;var d=-1,p=!0,y=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++d<l;){var g=t[d],v=e[d];if(o)var m=u?o(v,g,d,e,t,c):o(g,v,d,t,e,c);if(void 0!==m){if(m)continue;p=!1;break}if(y){if(!i(e,(function(t,e){if(!a(y,e)&&(g===t||s(g,t,n,o,c)))return y.push(e)}))){p=!1;break}}else if(g!==v&&!s(g,v,n,o,c)){p=!1;break}}return c.delete(t),c.delete(e),p}},function(t,e,n){var r=n(79),i=n(260),a=n(261);function o(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}o.prototype.add=o.prototype.push=i,o.prototype.has=a,t.exports=o},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(13);t.exports=function(t){return t==t&&!r(t)}},function(t,e){t.exports=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}},function(t,e,n){var r=n(272);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(273),i=n(138);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e,n){var r=n(66),i=n(48),a=n(5),o=n(61),s=n(81),c=n(50);t.exports=function(t,e,n){for(var u=-1,l=(e=r(e,t)).length,h=!1;++u<l;){var f=c(e[u]);if(!(h=null!=t&&n(t,f)))break;t=t[f]}return h||++u!=l?h:!!(l=null==t?0:t.length)&&s(l)&&o(f,l)&&(a(t)||i(t))}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e){t.exports=function(t){return void 0===t}},function(t,e,n){var r=n(67),i=n(26),a=n(142),o=n(5);t.exports=function(t,e){return(o(t)?r:a)(t,i(e,3))}},function(t,e,n){var r=n(65),i=n(25);t.exports=function(t,e){var n=-1,a=i(t)?Array(t.length):[];return r(t,(function(t,r,i){a[++n]=e(t,r,i)})),a}},function(t,e,n){var r=n(278),i=n(65),a=n(26),o=n(279),s=n(5);t.exports=function(t,e,n){var c=s(t)?r:o,u=arguments.length<3;return c(t,a(e,4),n,u,i)}},function(t,e,n){var r=n(289),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var a=arguments,o=-1,s=i(a.length-e,0),c=Array(s);++o<s;)c[o]=a[e+o];o=-1;for(var u=Array(e+1);++o<e;)u[o]=a[o];return u[e]=n(c),r(t,this,u)}}},function(t,e,n){var r=n(290),i=n(291)(r);t.exports=i},function(t,e){t.exports=function(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}},function(t,e,n){var r=n(25),i=n(21);t.exports=function(t){return i(t)&&r(t)}},function(t,e,n){var r=n(300),i=n(30);t.exports=function(t){return null==t?[]:r(t,i(t))}},function(t,e,n){var r=n(12),i=n(150);t.exports=function(t,e,n,r){return function(t,e,n,r){var a,o,s={},c=new i,u=function(t){var e=t.v!==a?t.v:t.w,r=s[e],i=n(t),u=o.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);u<r.distance&&(r.distance=u,r.predecessor=a,c.decrease(e,u))};t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;s[t]={distance:n},c.add(t,n)}));for(;c.size()>0&&(a=c.removeMin(),(o=s[a]).distance!==Number.POSITIVE_INFINITY);)r(a).forEach(u);return s}(t,String(e),n||a,r||function(e){return t.outEdges(e)})};var a=r.constant(1)},function(t,e,n){var r=n(12);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,a=i.length;return n[t]=a,i.push({key:t,priority:e}),this._decrease(a),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},i.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e},i.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,i=n[t],a=n[e];n[t]=a,n[e]=i,r[a.key]=t,r[i.key]=e}},function(t,e,n){var r=n(12);t.exports=function(t){var e=0,n=[],i={},a=[];return t.nodes().forEach((function(o){r.has(i,o)||function o(s){var c=i[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach((function(t){r.has(i,t)?i[t].onStack&&(c.lowlink=Math.min(c.lowlink,i[t].index)):(o(t),c.lowlink=Math.min(c.lowlink,i[t].lowlink))})),c.lowlink===c.index){var u,l=[];do{u=n.pop(),i[u].onStack=!1,l.push(u)}while(s!==u);a.push(l)}}(o)})),a}},function(t,e,n){var r=n(12);function i(t){var e={},n={},i=[];if(r.each(t.sinks(),(function o(s){if(r.has(n,s))throw new a;r.has(e,s)||(n[s]=!0,e[s]=!0,r.each(t.predecessors(s),o),delete n[s],i.push(s))})),r.size(e)!==t.nodeCount())throw new a;return i}function a(){}t.exports=i,i.CycleException=a,a.prototype=new Error},function(t,e,n){var r=n(12);t.exports=function(t,e,n){r.isArray(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],o={};return r.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);!function t(e,n,i,a,o,s){r.has(a,n)||(a[n]=!0,i||s.push(n),r.each(o(n),(function(n){t(e,n,i,a,o,s)})),i&&s.push(n))}(t,e,"post"===n,o,i,a)})),a}},function(t,e,n){var r;try{r=n(9)}catch(t){}r||(r=window.dagre),t.exports=r},function(t,e,n){var r=n(68),i=n(37),a=n(69),o=n(41),s=Object.prototype,c=s.hasOwnProperty,u=r((function(t,e){t=Object(t);var n=-1,r=e.length,u=r>2?e[2]:void 0;for(u&&a(e[0],e[1],u)&&(r=1);++n<r;)for(var l=e[n],h=o(l),f=-1,d=h.length;++f<d;){var p=h[f],y=t[p];(void 0===y||i(y,s[p])&&!c.call(t,p))&&(t[p]=l[p])}return t}));t.exports=u},function(t,e,n){var r=n(319);t.exports=function(t){return t?(t=r(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},function(t,e,n){var r=n(95);t.exports=function(t){return(null==t?0:t.length)?r(t,1):[]}},function(t,e,n){var r=n(60),i=n(37);t.exports=function(t,e,n){(void 0===n||i(t[e],n))&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(34),i=n(64),a=n(21),o=Function.prototype,s=Object.prototype,c=o.toString,u=s.hasOwnProperty,l=c.call(Object);t.exports=function(t){if(!a(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=u.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},function(t,e){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},function(t,e){t.exports=function(t,e){return t<e}},function(t,e,n){var r=n(333),i=n(336)((function(t,e){return null==t?{}:r(t,e)}));t.exports=i},function(t,e,n){var r=n(337)();t.exports=r},function(t,e,n){var r=n(136),i=0;t.exports=function(t){var e=++i;return r(t)+e}},function(t,e,n){"use strict";var r=n(4),i=n(20).Graph,a=n(70).slack;function o(t,e){return r.forEach(t.nodes(),(function n(i){r.forEach(e.nodeEdges(i),(function(r){var o=r.v,s=i===o?r.w:o;t.hasNode(s)||a(e,r)||(t.setNode(s,{}),t.setEdge(i,s,{}),n(s))}))})),t.nodeCount()}function s(t,e){return r.minBy(e.edges(),(function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return a(e,n)}))}function c(t,e,n){r.forEach(t.nodes(),(function(t){e.node(t).rank+=n}))}t.exports=function(t){var e,n,r=new i({directed:!1}),u=t.nodes()[0],l=t.nodeCount();r.setNode(u,{});for(;o(r,t)<l;)e=s(r,t),n=r.hasNode(e.v)?a(t,e):-a(t,e),c(r,t,n);return r}},function(t,e){t.exports=function(t,e){return t.intersect(e)}},function(t,e,n){var r=n(97);t.exports=function(t,e,n){return r(t,e,e,n)}},function(t,e,n){var r=n(370);t.exports=function(t,e,n){var i=t.x,a=t.y,o=[],s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;e.forEach((function(t){s=Math.min(s,t.x),c=Math.min(c,t.y)}));for(var u=i-t.width/2-s,l=a-t.height/2-c,h=0;h<e.length;h++){var f=e[h],d=e[h<e.length-1?h+1:0],p=r(t,n,{x:u+f.x,y:l+f.y},{x:u+d.x,y:l+d.y});p&&o.push(p)}if(!o.length)return console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t;o.length>1&&o.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}));return o[0]}},function(t,e){t.exports=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=0===s?0:u*o/s,r=u):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o);return{x:i+n,y:a+r}}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(n){"object"===r(e)&&void 0!==t?t.exports=n(null):"function"==typeof define&&define.amd?define(n(null)):window.stylis=n(null)}((function t(e){"use strict";var n=/^\0+/g,i=/[\0\r\f]/g,a=/: */g,o=/zoo|gra/,s=/([,: ])(transform)/g,c=/,+\s*(?![^(]*[)])/g,u=/ +\s*(?![^(]*[)])/g,l=/ *[\0] */g,h=/,\r+?/g,f=/([\t\r\n ])*\f?&/g,d=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,p=/\W+/g,y=/@(k\w+)\s*(\S*)\s*/,g=/::(place)/g,v=/:(read-only)/g,m=/\s+(?=[{\];=:>])/g,b=/([[}=:>])\s+/g,x=/(\{[^{]+?);(?=\})/g,_=/\s{2,}/g,k=/([^\(])(:+) */g,w=/[svh]\w+-[tblr]{2}/,E=/\(\s*(.*)\s*\)/g,T=/([\s\S]*?);/g,C=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,A=/stretch|:\s*\w+\-(?:conte|avail)/,M=/([^-])(image-set\()/,O="-webkit-",B="-moz-",N="-ms-",D=1,L=1,I=0,R=1,F=1,P=1,j=0,Y=0,z=0,U=[],$=[],q=0,W=null,V=0,H=1,G="",X="",Z="";function Q(t,e,r,a,o){for(var s,c,u=0,h=0,f=0,d=0,p=0,m=0,b=0,x=0,_=0,w=0,T=0,C=0,S=0,A=0,M=0,B=0,N=0,j=0,$=0,W=r.length,J=W-1,at="",ot="",st="",ct="",ut="",lt="";M<W;){if(b=r.charCodeAt(M),M===J&&h+d+f+u!==0&&(0!==h&&(b=47===h?10:47),d=f=u=0,W++,J++),h+d+f+u===0){if(M===J&&(B>0&&(ot=ot.replace(i,"")),ot.trim().length>0)){switch(b){case 32:case 9:case 59:case 13:case 10:break;default:ot+=r.charAt(M)}b=59}if(1===N)switch(b){case 123:case 125:case 59:case 34:case 39:case 40:case 41:case 44:N=0;case 9:case 13:case 10:case 32:break;default:for(N=0,$=M,p=b,M--,b=59;$<W;)switch(r.charCodeAt($++)){case 10:case 13:case 59:++M,b=p,$=W;break;case 58:B>0&&(++M,b=p);case 123:$=W}}switch(b){case 123:for(p=(ot=ot.trim()).charCodeAt(0),T=1,$=++M;M<W;){switch(b=r.charCodeAt(M)){case 123:T++;break;case 125:T--;break;case 47:switch(m=r.charCodeAt(M+1)){case 42:case 47:M=it(m,M,J,r)}break;case 91:b++;case 40:b++;case 34:case 39:for(;M++<J&&r.charCodeAt(M)!==b;);}if(0===T)break;M++}switch(st=r.substring($,M),0===p&&(p=(ot=ot.replace(n,"").trim()).charCodeAt(0)),p){case 64:switch(B>0&&(ot=ot.replace(i,"")),m=ot.charCodeAt(1)){case 100:case 109:case 115:case 45:s=e;break;default:s=U}if($=(st=Q(e,s,st,m,o+1)).length,z>0&&0===$&&($=ot.length),q>0&&(c=rt(3,st,s=K(U,ot,j),e,L,D,$,m,o,a),ot=s.join(""),void 0!==c&&0===($=(st=c.trim()).length)&&(m=0,st="")),$>0)switch(m){case 115:ot=ot.replace(E,nt);case 100:case 109:case 45:st=ot+"{"+st+"}";break;case 107:st=(ot=ot.replace(y,"$1 $2"+(H>0?G:"")))+"{"+st+"}",st=1===F||2===F&&et("@"+st,3)?"@"+O+st+"@"+st:"@"+st;break;default:st=ot+st,112===a&&(ct+=st,st="")}else st="";break;default:st=Q(e,K(e,ot,j),st,a,o+1)}ut+=st,C=0,N=0,A=0,B=0,j=0,S=0,ot="",st="",b=r.charCodeAt(++M);break;case 125:case 59:if(($=(ot=(B>0?ot.replace(i,""):ot).trim()).length)>1)switch(0===A&&(45===(p=ot.charCodeAt(0))||p>96&&p<123)&&($=(ot=ot.replace(" ",":")).length),q>0&&void 0!==(c=rt(1,ot,e,t,L,D,ct.length,a,o,a))&&0===($=(ot=c.trim()).length)&&(ot="\0\0"),p=ot.charCodeAt(0),m=ot.charCodeAt(1),p){case 0:break;case 64:if(105===m||99===m){lt+=ot+r.charAt(M);break}default:if(58===ot.charCodeAt($-1))break;ct+=tt(ot,p,m,ot.charCodeAt(2))}C=0,N=0,A=0,B=0,j=0,ot="",b=r.charCodeAt(++M)}}switch(b){case 13:case 10:if(h+d+f+u+Y===0)switch(w){case 41:case 39:case 34:case 64:case 126:case 62:case 42:case 43:case 47:case 45:case 58:case 44:case 59:case 123:case 125:break;default:A>0&&(N=1)}47===h?h=0:R+C===0&&107!==a&&ot.length>0&&(B=1,ot+="\0"),q*V>0&&rt(0,ot,e,t,L,D,ct.length,a,o,a),D=1,L++;break;case 59:case 125:if(h+d+f+u===0){D++;break}default:switch(D++,at=r.charAt(M),b){case 9:case 32:if(d+u+h===0)switch(x){case 44:case 58:case 9:case 32:at="";break;default:32!==b&&(at=" ")}break;case 0:at="\\0";break;case 12:at="\\f";break;case 11:at="\\v";break;case 38:d+h+u===0&&R>0&&(j=1,B=1,at="\f"+at);break;case 108:if(d+h+u+I===0&&A>0)switch(M-A){case 2:112===x&&58===r.charCodeAt(M-3)&&(I=x);case 8:111===_&&(I=_)}break;case 58:d+h+u===0&&(A=M);break;case 44:h+f+d+u===0&&(B=1,at+="\r");break;case 34:case 39:0===h&&(d=d===b?0:0===d?b:d);break;case 91:d+h+f===0&&u++;break;case 93:d+h+f===0&&u--;break;case 41:d+h+u===0&&f--;break;case 40:if(d+h+u===0){if(0===C)switch(2*x+3*_){case 533:break;default:T=0,C=1}f++}break;case 64:h+f+d+u+A+S===0&&(S=1);break;case 42:case 47:if(d+u+f>0)break;switch(h){case 0:switch(2*b+3*r.charCodeAt(M+1)){case 235:h=47;break;case 220:$=M,h=42}break;case 42:47===b&&42===x&&$+2!==M&&(33===r.charCodeAt($+2)&&(ct+=r.substring($,M+1)),at="",h=0)}}if(0===h){if(R+d+u+S===0&&107!==a&&59!==b)switch(b){case 44:case 126:case 62:case 43:case 41:case 40:if(0===C){switch(x){case 9:case 32:case 10:case 13:at+="\0";break;default:at="\0"+at+(44===b?"":"\0")}B=1}else switch(b){case 40:A+7===M&&108===x&&(A=0),C=++T;break;case 41:0==(C=--T)&&(B=1,at+="\0")}break;case 9:case 32:switch(x){case 0:case 123:case 125:case 59:case 44:case 12:case 9:case 32:case 10:case 13:break;default:0===C&&(B=1,at+="\0")}}ot+=at,32!==b&&9!==b&&(w=b)}}_=x,x=b,M++}if($=ct.length,z>0&&0===$&&0===ut.length&&0===e[0].length==!1&&(109!==a||1===e.length&&(R>0?X:Z)===e[0])&&($=e.join(",").length+2),$>0){if(s=0===R&&107!==a?function(t){for(var e,n,r=0,a=t.length,o=Array(a);r<a;++r){for(var s=t[r].split(l),c="",u=0,h=0,f=0,d=0,p=s.length;u<p;++u)if(!(0===(h=(n=s[u]).length)&&p>1)){if(f=c.charCodeAt(c.length-1),d=n.charCodeAt(0),e="",0!==u)switch(f){case 42:case 126:case 62:case 43:case 32:case 40:break;default:e=" "}switch(d){case 38:n=e+X;case 126:case 62:case 43:case 32:case 41:case 40:break;case 91:n=e+n+X;break;case 58:switch(2*n.charCodeAt(1)+3*n.charCodeAt(2)){case 530:if(P>0){n=e+n.substring(8,h-1);break}default:(u<1||s[u-1].length<1)&&(n=e+X+n)}break;case 44:e="";default:n=h>1&&n.indexOf(":")>0?e+n.replace(k,"$1"+X+"$2"):e+n+X}c+=n}o[r]=c.replace(i,"").trim()}return o}(e):e,q>0&&void 0!==(c=rt(2,ct,s,t,L,D,$,a,o,a))&&0===(ct=c).length)return lt+ct+ut;if(ct=s.join(",")+"{"+ct+"}",F*I!=0){switch(2!==F||et(ct,2)||(I=0),I){case 111:ct=ct.replace(v,":-moz-$1")+ct;break;case 112:ct=ct.replace(g,"::-webkit-input-$1")+ct.replace(g,"::-moz-$1")+ct.replace(g,":-ms-input-$1")+ct}I=0}}return lt+ct+ut}function K(t,e,n){var r=e.trim().split(h),i=r,a=r.length,o=t.length;switch(o){case 0:case 1:for(var s=0,c=0===o?"":t[0]+" ";s<a;++s)i[s]=J(c,i[s],n,o).trim();break;default:s=0;var u=0;for(i=[];s<a;++s)for(var l=0;l<o;++l)i[u++]=J(t[l]+" ",r[s],n,o).trim()}return i}function J(t,e,n,r){var i=e,a=i.charCodeAt(0);switch(a<33&&(a=(i=i.trim()).charCodeAt(0)),a){case 38:switch(R+r){case 0:case 1:if(0===t.trim().length)break;default:return i.replace(f,"$1"+t.trim())}break;case 58:switch(i.charCodeAt(1)){case 103:if(P>0&&R>0)return i.replace(d,"$1").replace(f,"$1"+Z);break;default:return t.trim()+i.replace(f,"$1"+t.trim())}default:if(n*R>0&&i.indexOf("\f")>0)return i.replace(f,(58===t.charCodeAt(0)?"":"$1")+t.trim())}return t+i}function tt(t,e,n,r){var i,l=0,h=t+";",f=2*e+3*n+4*r;if(944===f)return function(t){var e=t.length,n=t.indexOf(":",9)+1,r=t.substring(0,n).trim(),i=t.substring(n,e-1).trim();switch(t.charCodeAt(9)*H){case 0:break;case 45:if(110!==t.charCodeAt(10))break;default:var a=i.split((i="",c)),o=0;for(n=0,e=a.length;o<e;n=0,++o){for(var s=a[o],l=s.split(u);s=l[n];){var h=s.charCodeAt(0);if(1===H&&(h>64&&h<90||h>96&&h<123||95===h||45===h&&45!==s.charCodeAt(1)))switch(isNaN(parseFloat(s))+(-1!==s.indexOf("("))){case 1:switch(s){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:s+=G}}l[n++]=s}i+=(0===o?"":",")+l.join(" ")}}return i=r+i+";",1===F||2===F&&et(i,1)?O+i+i:i}(h);if(0===F||2===F&&!et(h,1))return h;switch(f){case 1015:return 97===h.charCodeAt(10)?O+h+h:h;case 951:return 116===h.charCodeAt(3)?O+h+h:h;case 963:return 110===h.charCodeAt(5)?O+h+h:h;case 1009:if(100!==h.charCodeAt(4))break;case 969:case 942:return O+h+h;case 978:return O+h+B+h+h;case 1019:case 983:return O+h+B+h+N+h+h;case 883:return 45===h.charCodeAt(8)?O+h+h:h.indexOf("image-set(",11)>0?h.replace(M,"$1-webkit-$2")+h:h;case 932:if(45===h.charCodeAt(4))switch(h.charCodeAt(5)){case 103:return O+"box-"+h.replace("-grow","")+O+h+N+h.replace("grow","positive")+h;case 115:return O+h+N+h.replace("shrink","negative")+h;case 98:return O+h+N+h.replace("basis","preferred-size")+h}return O+h+N+h+h;case 964:return O+h+N+"flex-"+h+h;case 1023:if(99!==h.charCodeAt(8))break;return i=h.substring(h.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),O+"box-pack"+i+O+h+N+"flex-pack"+i+h;case 1005:return o.test(h)?h.replace(a,":"+O)+h.replace(a,":"+B)+h:h;case 1e3:switch(l=(i=h.substring(13).trim()).indexOf("-")+1,i.charCodeAt(0)+i.charCodeAt(l)){case 226:i=h.replace(w,"tb");break;case 232:i=h.replace(w,"tb-rl");break;case 220:i=h.replace(w,"lr");break;default:return h}return O+h+N+i+h;case 1017:if(-1===h.indexOf("sticky",9))return h;case 975:switch(l=(h=t).length-10,f=(i=(33===h.charCodeAt(l)?h.substring(0,l):h).substring(t.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|i.charCodeAt(7))){case 203:if(i.charCodeAt(8)<111)break;case 115:h=h.replace(i,O+i)+";"+h;break;case 207:case 102:h=h.replace(i,O+(f>102?"inline-":"")+"box")+";"+h.replace(i,O+i)+";"+h.replace(i,N+i+"box")+";"+h}return h+";";case 938:if(45===h.charCodeAt(5))switch(h.charCodeAt(6)){case 105:return i=h.replace("-items",""),O+h+O+"box-"+i+N+"flex-"+i+h;case 115:return O+h+N+"flex-item-"+h.replace(C,"")+h;default:return O+h+N+"flex-line-pack"+h.replace("align-content","").replace(C,"")+h}break;case 973:case 989:if(45!==h.charCodeAt(3)||122===h.charCodeAt(4))break;case 931:case 953:if(!0===A.test(t))return 115===(i=t.substring(t.indexOf(":")+1)).charCodeAt(0)?tt(t.replace("stretch","fill-available"),e,n,r).replace(":fill-available",":stretch"):h.replace(i,O+i)+h.replace(i,B+i.replace("fill-",""))+h;break;case 962:if(h=O+h+(102===h.charCodeAt(5)?N+h:"")+h,n+r===211&&105===h.charCodeAt(13)&&h.indexOf("transform",10)>0)return h.substring(0,h.indexOf(";",27)+1).replace(s,"$1-webkit-$2")+h}return h}function et(t,e){var n=t.indexOf(1===e?":":"{"),r=t.substring(0,3!==e?n:10),i=t.substring(n+1,t.length-1);return W(2!==e?r:r.replace(S,"$1"),i,e)}function nt(t,e){var n=tt(e,e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2));return n!==e+";"?n.replace(T," or ($1)").substring(4):"("+e+")"}function rt(t,e,n,r,i,a,o,s,c,u){for(var l,h=0,f=e;h<q;++h)switch(l=$[h].call(ot,t,f,n,r,i,a,o,s,c,u)){case void 0:case!1:case!0:case null:break;default:f=l}if(f!==e)return f}function it(t,e,n,r){for(var i=e+1;i<n;++i)switch(r.charCodeAt(i)){case 47:if(42===t&&42===r.charCodeAt(i-1)&&e+2!==i)return i+1;break;case 10:if(47===t)return i+1}return i}function at(t){for(var e in t){var n=t[e];switch(e){case"keyframe":H=0|n;break;case"global":P=0|n;break;case"cascade":R=0|n;break;case"compress":j=0|n;break;case"semicolon":Y=0|n;break;case"preserve":z=0|n;break;case"prefix":W=null,n?"function"!=typeof n?F=1:(F=2,W=n):F=0}}return at}function ot(e,n){if(void 0!==this&&this.constructor===ot)return t(e);var r=e,a=r.charCodeAt(0);a<33&&(a=(r=r.trim()).charCodeAt(0)),H>0&&(G=r.replace(p,91===a?"":"-")),a=1,1===R?Z=r:X=r;var o,s=[Z];q>0&&void 0!==(o=rt(-1,n,s,s,L,D,0,0,0,0))&&"string"==typeof o&&(n=o);var c=Q(U,s,n,0,0);return q>0&&void 0!==(o=rt(-2,c,s,s,L,D,c.length,0,0,0))&&"string"!=typeof(c=o)&&(a=0),G="",Z="",X="",I=0,L=1,D=1,j*a==0?c:function(t){return t.replace(i,"").replace(m,"").replace(b,"$1").replace(x,"$1").replace(_," ")}(c)}return ot.use=function t(e){switch(e){case void 0:case null:q=$.length=0;break;default:if("function"==typeof e)$[q++]=e;else if("object"===r(e))for(var n=0,i=e.length;n<i;++n)t(e[n]);else V=0|!!e}return t},ot.set=at,void 0!==e&&at(e),ot}))},function(t,e){t.exports=function(t,e){return t.intersect(e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(52);e.hex=r.default;var i=n(52);e.rgb=i.default;var a=n(52);e.rgba=a.default;var o=n(100);e.hsl=o.default;var s=n(100);e.hsla=s.default;var c=n(29);e.channel=c.default;var u=n(182);e.red=u.default;var l=n(183);e.green=l.default;var h=n(184);e.blue=h.default;var f=n(185);e.hue=f.default;var d=n(186);e.saturation=d.default;var p=n(187);e.lightness=p.default;var y=n(101);e.alpha=y.default;var g=n(101);e.opacity=g.default;var v=n(102);e.luminance=v.default;var m=n(188);e.isDark=m.default;var b=n(103);e.isLight=b.default;var x=n(189);e.isValid=x.default;var _=n(190);e.saturate=_.default;var k=n(191);e.desaturate=k.default;var w=n(192);e.lighten=w.default;var E=n(193);e.darken=E.default;var T=n(104);e.opacify=T.default;var C=n(104);e.fadeIn=C.default;var S=n(105);e.transparentize=S.default;var A=n(105);e.fadeOut=A.default;var M=n(194);e.complement=M.default;var O=n(195);e.grayscale=O.default;var B=n(106);e.adjust=B.default;var N=n(53);e.change=N.default;var D=n(196);e.invert=D.default;var L=n(107);e.mix=L.default;var I=n(197);e.scale=I.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:function(t){return t>=255?255:t<0?0:t},g:function(t){return t>=255?255:t<0?0:t},b:function(t){return t>=255?255:t<0?0:t},h:function(t){return t%360},s:function(t){return t>=100?100:t<0?0:t},l:function(t){return t>=100?100:t<0?0:t},a:function(t){return t>=1?1:t<0?0:t}},toLinear:function(t){var e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:function(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t},hsl2rgb:function(t,e){var n=t.h,i=t.s,a=t.l;if(100===i)return 2.55*a;n/=360,i/=100;var o=(a/=100)<.5?a*(1+i):a+i-a*i,s=2*a-o;switch(e){case"r":return 255*r.hue2rgb(s,o,n+1/3);case"g":return 255*r.hue2rgb(s,o,n);case"b":return 255*r.hue2rgb(s,o,n-1/3)}},rgb2hsl:function(t,e){var n=t.r,r=t.g,i=t.b;n/=255,r/=255,i/=255;var a=Math.max(n,r,i),o=Math.min(n,r,i),s=(a+o)/2;if("l"===e)return 100*s;if(a===o)return 0;var c=a-o;if("s"===e)return 100*(s>.5?c/(2-a-o):c/(a+o));switch(a){case n:return 60*((r-i)/c+(r<i?6:0));case r:return 60*((i-n)/c+2);case i:return 60*((n-r)/c+4);default:return-1}}};e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={round:function(t){return Math.round(1e10*t)/1e10}};e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={frac2hex:function(t){var e=Math.round(255*t).toString(16);return e.length>1?e:"0"+e},dec2hex:function(t){var e=Math.round(t).toString(16);return e.length>1?e:"0"+e}};e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(76),a=n(177),o=function(){function t(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a.default}return t.prototype.set=function(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=i.TYPE.ALL,this},t.prototype._ensureHSL=function(){void 0===this.data.h&&(this.data.h=r.default.channel.rgb2hsl(this.data,"h")),void 0===this.data.s&&(this.data.s=r.default.channel.rgb2hsl(this.data,"s")),void 0===this.data.l&&(this.data.l=r.default.channel.rgb2hsl(this.data,"l"))},t.prototype._ensureRGB=function(){void 0===this.data.r&&(this.data.r=r.default.channel.hsl2rgb(this.data,"r")),void 0===this.data.g&&(this.data.g=r.default.channel.hsl2rgb(this.data,"g")),void 0===this.data.b&&(this.data.b=r.default.channel.hsl2rgb(this.data,"b"))},Object.defineProperty(t.prototype,"r",{get:function(){return this.type.is(i.TYPE.HSL)||void 0===this.data.r?(this._ensureHSL(),r.default.channel.hsl2rgb(this.data,"r")):this.data.r},set:function(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.r=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"g",{get:function(){return this.type.is(i.TYPE.HSL)||void 0===this.data.g?(this._ensureHSL(),r.default.channel.hsl2rgb(this.data,"g")):this.data.g},set:function(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.g=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){return this.type.is(i.TYPE.HSL)||void 0===this.data.b?(this._ensureHSL(),r.default.channel.hsl2rgb(this.data,"b")):this.data.b},set:function(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.b=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"h",{get:function(){return this.type.is(i.TYPE.RGB)||void 0===this.data.h?(this._ensureRGB(),r.default.channel.rgb2hsl(this.data,"h")):this.data.h},set:function(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.h=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"s",{get:function(){return this.type.is(i.TYPE.RGB)||void 0===this.data.s?(this._ensureRGB(),r.default.channel.rgb2hsl(this.data,"s")):this.data.s},set:function(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.s=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"l",{get:function(){return this.type.is(i.TYPE.RGB)||void 0===this.data.l?(this._ensureRGB(),r.default.channel.rgb2hsl(this.data,"l")):this.data.l},set:function(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.l=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"a",{get:function(){return this.data.a},set:function(t){this.changed=!0,this.data.a=t},enumerable:!0,configurable:!0}),t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(76),i=function(){function t(){this.type=r.TYPE.ALL}return t.prototype.get=function(){return this.type},t.prototype.set=function(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t},t.prototype.reset=function(){this.type=r.TYPE.ALL},t.prototype.is=function(t){return this.type===t},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i={};e.DEC2HEX=i;for(var a=0;a<=255;a++)i[a]=r.default.unit.dec2hex(a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(99),i={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:function(t){t=t.toLowerCase();var e=i.colors[t];if(e)return r.default.parse(e)},stringify:function(t){var e=r.default.stringify(t);for(var n in i.colors)if(i.colors[n]===e)return n}};e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(46),a={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:function(t){var e=t.charCodeAt(0);if(114===e||82===e){var n=t.match(a.re);if(n){var o=n[1],s=n[2],c=n[3],u=n[4],l=n[5],h=n[6],f=n[7],d=n[8];return i.default.set({r:r.default.channel.clamp.r(s?2.55*parseFloat(o):parseFloat(o)),g:r.default.channel.clamp.g(u?2.55*parseFloat(c):parseFloat(c)),b:r.default.channel.clamp.b(h?2.55*parseFloat(l):parseFloat(l)),a:f?r.default.channel.clamp.a(d?parseFloat(f)/100:parseFloat(f)):1},t)}}},stringify:function(t){return t.a<1?"rgba("+r.default.lang.round(t.r)+", "+r.default.lang.round(t.g)+", "+r.default.lang.round(t.b)+", "+r.default.lang.round(t.a)+")":"rgb("+r.default.lang.round(t.r)+", "+r.default.lang.round(t.g)+", "+r.default.lang.round(t.b)+")"}};e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(46),a={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:function(t){var e=t.match(a.hueRe);if(e){var n=e[1];switch(e[2]){case"grad":return r.default.channel.clamp.h(.9*parseFloat(n));case"rad":return r.default.channel.clamp.h(180*parseFloat(n)/Math.PI);case"turn":return r.default.channel.clamp.h(360*parseFloat(n))}}return r.default.channel.clamp.h(parseFloat(t))},parse:function(t){var e=t.charCodeAt(0);if(104===e||72===e){var n=t.match(a.re);if(n){var o=n[1],s=n[2],c=n[3],u=n[4],l=n[5];return i.default.set({h:a._hue2deg(o),s:r.default.channel.clamp.s(parseFloat(s)),l:r.default.channel.clamp.l(parseFloat(c)),a:u?r.default.channel.clamp.a(l?parseFloat(u)/100:parseFloat(u)):1},t)}}},stringify:function(t){return t.a<1?"hsla("+r.default.lang.round(t.h)+", "+r.default.lang.round(t.s)+"%, "+r.default.lang.round(t.l)+"%, "+t.a+")":"hsl("+r.default.lang.round(t.h)+", "+r.default.lang.round(t.s)+"%, "+r.default.lang.round(t.l)+"%)"}};e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"r")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"g")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"b")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"h")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"s")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"l")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(103);e.default=function(t){return!r.default(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(16);e.default=function(t){try{return r.default.parse(t),!0}catch(t){return!1}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"s",e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"s",-e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"l",e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"l",-e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t){return r.default(t,"h",180)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(53);e.default=function(t){return r.default(t,{s:0})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(16),i=n(107);e.default=function(t,e){void 0===e&&(e=100);var n=r.default.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,i.default(n,t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(16),a=n(106);e.default=function(t,e){var n,o,s,c=i.default.parse(t),u={};for(var l in e)u[l]=(n=c[l],o=e[l],s=r.default.channel.max[l],o>0?(s-n)*o/100:n*o/100);return a.default(t,u)}},function(t,e,n){var r={"./locale":108,"./locale.js":108};function i(t){var e=a(t);return n(e)}function a(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=a,t.exports=i,i.id=198},function(t,e,n){t.exports={Graph:n(77),version:n(301)}},function(t,e,n){var r=n(109);t.exports=function(t){return r(t,4)}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(56),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():i.call(e,n,1),--this.size,!0)}},function(t,e,n){var r=n(56);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(56);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(56);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(55);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(55),i=n(78),a=n(79);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new a(o)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(38),i=n(215),a=n(13),o=n(111),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,h=u.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||i(t))&&(r(t)?f:s).test(o(t))}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(39),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=a.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=o.call(t);return r&&(e?t[s]=n:delete t[s]),i}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r,i=n(216),a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!a&&a in t}},function(t,e,n){var r=n(19)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(219),i=n(55),a=n(78);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},function(t,e,n){var r=n(220),i=n(221),a=n(222),o=n(223),s=n(224);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},function(t,e,n){var r=n(57);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(57),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(57),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},function(t,e,n){var r=n(57);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,n){var r=n(58);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(58);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(58);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(58);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},function(t,e,n){var r=n(47),i=n(30);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(34),i=n(21);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(34),i=n(81),a=n(21),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,t.exports=function(t){return a(t)&&i(t.length)&&!!o[r(t)]}},function(t,e,n){var r=n(114)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(47),i=n(41);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e,n){var r=n(13),i=n(63),a=n(238),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return a(t);var e=i(t),n=[];for(var s in t)("constructor"!=s||!e&&o.call(t,s))&&n.push(s);return n}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){var r=n(47),i=n(84);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(47),i=n(119);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(121),i=n(119),a=n(41);t.exports=function(t){return r(t,a,i)}},function(t,e,n){var r=n(33)(n(19),"DataView");t.exports=r},function(t,e,n){var r=n(33)(n(19),"Promise");t.exports=r},function(t,e,n){var r=n(33)(n(19),"WeakMap");t.exports=r},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&n.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},function(t,e,n){var r=n(86),i=n(247),a=n(248),o=n(249),s=n(124);t.exports=function(t,e,n){var c=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return i(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(t,n);case"[object Map]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return a(t);case"[object Set]":return new c;case"[object Symbol]":return o(t)}}},function(t,e,n){var r=n(86);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},function(t,e){var n=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,n){var r=n(39),i=r?r.prototype:void 0,a=i?i.valueOf:void 0;t.exports=function(t){return a?Object(a.call(t)):{}}},function(t,e,n){var r=n(251),i=n(62),a=n(82),o=a&&a.isMap,s=o?i(o):r;t.exports=s},function(t,e,n){var r=n(42),i=n(21);t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},function(t,e,n){var r=n(253),i=n(62),a=n(82),o=a&&a.isSet,s=o?i(o):r;t.exports=s},function(t,e,n){var r=n(42),i=n(21);t.exports=function(t){return i(t)&&"[object Set]"==r(t)}},function(t,e){t.exports=function(t){return function(e,n,r){for(var i=-1,a=Object(e),o=r(e),s=o.length;s--;){var c=o[t?s:++i];if(!1===n(a[c],c,a))break}return e}}},function(t,e,n){var r=n(25);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var a=n.length,o=e?a:-1,s=Object(n);(e?o--:++o<a)&&!1!==i(s[o],o,s););return n}}},function(t,e,n){var r=n(65);t.exports=function(t,e){var n=[];return r(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}},function(t,e,n){var r=n(258),i=n(266),a=n(135);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?a(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(54),i=n(130);t.exports=function(t,e,n,a){var o=n.length,s=o,c=!a;if(null==t)return!s;for(t=Object(t);o--;){var u=n[o];if(c&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<s;){var l=(u=n[o])[0],h=t[l],f=u[1];if(c&&u[2]){if(void 0===h&&!(l in t))return!1}else{var d=new r;if(a)var p=a(h,f,l,t,e,d);if(!(void 0===p?i(f,h,3,a,d):p))return!1}}return!0}},function(t,e,n){var r=n(54),i=n(131),a=n(263),o=n(265),s=n(42),c=n(5),u=n(40),l=n(49),h="[object Object]",f=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,d,p,y){var g=c(t),v=c(e),m=g?"[object Array]":s(t),b=v?"[object Array]":s(e),x=(m="[object Arguments]"==m?h:m)==h,_=(b="[object Arguments]"==b?h:b)==h,k=m==b;if(k&&u(t)){if(!u(e))return!1;g=!0,x=!1}if(k&&!x)return y||(y=new r),g||l(t)?i(t,e,n,d,p,y):a(t,e,m,n,d,p,y);if(!(1&n)){var w=x&&f.call(t,"__wrapped__"),E=_&&f.call(e,"__wrapped__");if(w||E){var T=w?t.value():t,C=E?e.value():e;return y||(y=new r),p(T,C,n,d,y)}}return!!k&&(y||(y=new r),o(t,e,n,d,p,y))}},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e,n){var r=n(39),i=n(123),a=n(37),o=n(131),s=n(264),c=n(91),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;t.exports=function(t,e,n,r,u,h,f){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!h(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=s;case"[object Set]":var p=1&r;if(d||(d=c),t.size!=e.size&&!p)return!1;var y=f.get(t);if(y)return y==e;r|=2,f.set(t,e);var g=o(d(t),d(e),r,u,h,f);return f.delete(t),g;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},function(t,e,n){var r=n(120),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,a,o,s){var c=1&n,u=r(t),l=u.length;if(l!=r(e).length&&!c)return!1;for(var h=l;h--;){var f=u[h];if(!(c?f in e:i.call(e,f)))return!1}var d=s.get(t);if(d&&s.get(e))return d==e;var p=!0;s.set(t,e),s.set(e,t);for(var y=c;++h<l;){var g=t[f=u[h]],v=e[f];if(a)var m=c?a(v,g,f,e,t,s):a(g,v,f,t,e,s);if(!(void 0===m?g===v||o(g,v,n,a,s):m)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){var b=t.constructor,x=e.constructor;b!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x)&&(p=!1)}return s.delete(t),s.delete(e),p}},function(t,e,n){var r=n(134),i=n(30);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var a=e[n],o=t[a];e[n]=[a,o,r(o)]}return e}},function(t,e,n){var r=n(130),i=n(268),a=n(137),o=n(93),s=n(134),c=n(135),u=n(50);t.exports=function(t,e){return o(t)&&s(e)?c(u(t),e):function(n){var o=i(n,t);return void 0===o&&o===e?a(n,t):r(e,o,3)}}},function(t,e,n){var r=n(92);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},function(t,e,n){var r=n(270),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(a,"$1"):n||t)})),e}));t.exports=o},function(t,e,n){var r=n(271);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},function(t,e,n){var r=n(79);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},function(t,e,n){var r=n(39),i=n(67),a=n(5),o=n(43),s=r?r.prototype:void 0,c=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(a(e))return i(e,t)+"";if(o(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,n){var r=n(139),i=n(275),a=n(93),o=n(50);t.exports=function(t){return a(t)?r(o(t)):i(t)}},function(t,e,n){var r=n(92);t.exports=function(t){return function(e){return r(e,t)}}},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&n.call(t,e)}},function(t,e,n){var r=n(83),i=n(42),a=n(48),o=n(5),s=n(25),c=n(40),u=n(63),l=n(49),h=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(o(t)||"string"==typeof t||"function"==typeof t.splice||c(t)||l(t)||a(t)))return!t.length;var e=i(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(u(t))return!r(t).length;for(var n in t)if(h.call(t,n))return!1;return!0}},function(t,e){t.exports=function(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}},function(t,e){t.exports=function(t,e,n,r,i){return i(t,(function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)})),n}},function(t,e,n){var r=n(83),i=n(42),a=n(25),o=n(281),s=n(282);t.exports=function(t){if(null==t)return 0;if(a(t))return o(t)?s(t):t.length;var e=i(t);return"[object Map]"==e||"[object Set]"==e?t.size:r(t).length}},function(t,e,n){var r=n(34),i=n(5),a=n(21);t.exports=function(t){return"string"==typeof t||!i(t)&&a(t)&&"[object String]"==r(t)}},function(t,e,n){var r=n(283),i=n(284),a=n(285);t.exports=function(t){return i(t)?a(t):r(t)}},function(t,e,n){var r=n(139)("length");t.exports=r},function(t,e){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return n.test(t)}},function(t,e){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",a="[^\\ud800-\\udfff]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+r+"|"+i+")"+"?",u="[\\ufe0e\\ufe0f]?"+c+("(?:\\u200d(?:"+[a,o,s].join("|")+")[\\ufe0e\\ufe0f]?"+c+")*"),l="(?:"+[a+r+"?",r,o,s,n].join("|")+")",h=RegExp(i+"(?="+i+")|"+l+u,"g");t.exports=function(t){for(var e=h.lastIndex=0;h.test(t);)++e;return e}},function(t,e,n){var r=n(80),i=n(126),a=n(89),o=n(26),s=n(64),c=n(5),u=n(40),l=n(38),h=n(13),f=n(49);t.exports=function(t,e,n){var d=c(t),p=d||u(t)||f(t);if(e=o(e,4),null==n){var y=t&&t.constructor;n=p?d?new y:[]:h(t)&&l(y)?i(s(t)):{}}return(p?r:a)(t,(function(t,r,i){return e(n,t,r,i)})),n}},function(t,e,n){var r=n(95),i=n(68),a=n(292),o=n(147),s=i((function(t){return a(r(t,1,o,!0))}));t.exports=s},function(t,e,n){var r=n(39),i=n(48),a=n(5),o=r?r.isConcatSpreadable:void 0;t.exports=function(t){return a(t)||i(t)||!!(o&&t&&t[o])}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(87),i=n(112),a=n(35),o=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:a;t.exports=o},function(t,e){var n=Date.now;t.exports=function(t){var e=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(132),i=n(293),a=n(297),o=n(133),s=n(298),c=n(91);t.exports=function(t,e,n){var u=-1,l=i,h=t.length,f=!0,d=[],p=d;if(n)f=!1,l=a;else if(h>=200){var y=e?null:s(t);if(y)return c(y);f=!1,l=o,p=new r}else p=e?[]:d;t:for(;++u<h;){var g=t[u],v=e?e(g):g;if(g=n||0!==g?g:0,f&&v==v){for(var m=p.length;m--;)if(p[m]===v)continue t;e&&p.push(v),d.push(g)}else l(p,v,n)||(p!==d&&p.push(v),d.push(g))}return d}},function(t,e,n){var r=n(294);t.exports=function(t,e){return!!(null==t?0:t.length)&&r(t,e,0)>-1}},function(t,e,n){var r=n(146),i=n(295),a=n(296);t.exports=function(t,e,n){return e==e?a(t,e,n):r(t,i,n)}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},function(t,e,n){var r=n(122),i=n(299),a=n(91),o=r&&1/a(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=o},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(67);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},function(t,e){t.exports="2.1.8"},function(t,e,n){var r=n(12),i=n(77);function a(t){return r.map(t.nodes(),(function(e){var n=t.node(e),i=t.parent(e),a={v:e};return r.isUndefined(n)||(a.value=n),r.isUndefined(i)||(a.parent=i),a}))}function o(t){return r.map(t.edges(),(function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:a(t),edges:o(t)};r.isUndefined(t.graph())||(e.value=r.clone(t.graph()));return e},read:function(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),r.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},function(t,e,n){t.exports={components:n(304),dijkstra:n(149),dijkstraAll:n(305),findCycles:n(306),floydWarshall:n(307),isAcyclic:n(308),postorder:n(309),preorder:n(310),prim:n(311),tarjan:n(151),topsort:n(152)}},function(t,e,n){var r=n(12);t.exports=function(t){var e,n={},i=[];function a(i){r.has(n,i)||(n[i]=!0,e.push(i),r.each(t.successors(i),a),r.each(t.predecessors(i),a))}return r.each(t.nodes(),(function(t){e=[],a(t),e.length&&i.push(e)})),i}},function(t,e,n){var r=n(149),i=n(12);t.exports=function(t,e,n){return i.transform(t.nodes(),(function(i,a){i[a]=r(t,a,e,n)}),{})}},function(t,e,n){var r=n(12),i=n(151);t.exports=function(t){return r.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},function(t,e,n){var r=n(12);t.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,a=e(n);r[t][i]={distance:a,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var a=r[n];i.forEach((function(n){var r=a[t],i=e[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)}))}))})),r}(t,e||i,n||function(e){return t.outEdges(e)})};var i=r.constant(1)},function(t,e,n){var r=n(152);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},function(t,e,n){var r=n(153);t.exports=function(t,e){return r(t,e,"post")}},function(t,e,n){var r=n(153);t.exports=function(t,e){return r(t,e,"pre")}},function(t,e,n){var r=n(12),i=n(77),a=n(150);t.exports=function(t,e){var n,o=new i,s={},c=new a;function u(t){var r=t.v===n?t.w:t.v,i=c.priority(r);if(void 0!==i){var a=e(t);a<i&&(s[r]=n,c.decrease(r,a))}}if(0===t.nodeCount())return o;r.each(t.nodes(),(function(t){c.add(t,Number.POSITIVE_INFINITY),o.setNode(t)})),c.decrease(t.nodes()[0],0);var l=!1;for(;c.size()>0;){if(n=c.removeMin(),r.has(s,n))o.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(n).forEach(u)}return o}},function(t,e,n){var r;try{r=n(3)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,e,n){"use strict";var r=n(4),i=n(346),a=n(349),o=n(350),s=n(8).normalizeRanks,c=n(352),u=n(8).removeEmptyRanks,l=n(353),h=n(354),f=n(355),d=n(356),p=n(365),y=n(8),g=n(20).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?y.time:y.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new g({multigraph:!0,compound:!0}),n=C(t.graph());return e.setGraph(r.merge({},m,T(n,v),r.pick(n,b))),r.forEach(t.nodes(),(function(n){var i=C(t.node(n));e.setNode(n,r.defaults(T(i,x),_)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=C(t.edge(n));e.setEdge(n,r.merge({},w,T(i,k),r.pick(i,E)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){i.run(t)})),e(" nestingGraph.run",(function(){l.run(t)})),e(" rank",(function(){o(y.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};y.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){u(t)})),e(" nestingGraph.cleanup",(function(){l.cleanup(t)})),e(" normalizeRanks",(function(){s(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){a.run(t)})),e(" parentDummyChains",(function(){c(t)})),e(" addBorderSegments",(function(){h(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=y.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var a=t.node(e);a.order=i+n,r.forEach(a.selfEdges,(function(e){y.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:a.rank,order:i+ ++n,e:e.e,label:e.label},"_se")})),delete a.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){f.adjust(t)})),e(" position",(function(){p(t)})),e(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),a=t.node(n.borderBottom),o=t.node(r.last(n.borderLeft)),s=t.node(r.last(n.borderRight));n.width=Math.abs(s.x-o.x),n.height=Math.abs(a.y-i.y),n.x=o.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){a.undo(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){f.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),s=o.marginx||0,c=o.marginy||0;function u(t){var r=t.x,o=t.y,s=t.width,c=t.height;e=Math.min(e,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}r.forEach(t.nodes(),(function(e){u(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&u(n)})),e-=s,i-=c,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i})),r.forEach(t.edges(),(function(n){var a=t.edge(n);r.forEach(a.points,(function(t){t.x-=e,t.y-=i})),r.has(a,"x")&&(a.x-=e),r.has(a,"y")&&(a.y-=i)})),o.width=n-e+s,o.height=a-i+c}(t)})),e(" assignNodeIntersects",(function(){!function(t){r.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=a),i.points.unshift(y.intersectRect(a,n)),i.points.push(y.intersectRect(o,r))}))}(t)})),e(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){i.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(t.edges(),(function(n){var i=t.edge(n),a=e.edge(n);i.points=a.points,r.has(a,"x")&&(i.x=a.x,i.y=a.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};var v=["nodesep","edgesep","ranksep","marginx","marginy"],m={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],x=["width","height"],_={width:0,height:0},k=["minlen","weight","width","height","labeloffset"],w={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},E=["labelpos"];function T(t,e){return r.mapValues(r.pick(t,e),Number)}function C(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},function(t,e,n){var r=n(109);t.exports=function(t){return r(t,5)}},function(t,e,n){var r=n(316)(n(317));t.exports=r},function(t,e,n){var r=n(26),i=n(25),a=n(30);t.exports=function(t){return function(e,n,o){var s=Object(e);if(!i(e)){var c=r(n,3);e=a(e),n=function(t){return c(s[t],t,s)}}var u=t(e,n,o);return u>-1?s[c?e[u]:u]:void 0}}},function(t,e,n){var r=n(146),i=n(26),a=n(318),o=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var c=null==n?0:a(n);return c<0&&(c=o(s+c,0)),r(t,i(e,3),c)}},function(t,e,n){var r=n(156);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},function(t,e,n){var r=n(13),i=n(43),a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(a,"");var n=s.test(t);return n||c.test(t)?u(t.slice(2),n?2:8):o.test(t)?NaN:+t}},function(t,e,n){var r=n(90),i=n(128),a=n(41);t.exports=function(t,e){return null==t?t:r(t,i(e),a)}},function(t,e){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},function(t,e,n){var r=n(60),i=n(89),a=n(26);t.exports=function(t,e){var n={};return e=a(e,3),i(t,(function(t,i,a){r(n,i,e(t,i,a))})),n}},function(t,e,n){var r=n(96),i=n(324),a=n(35);t.exports=function(t){return t&&t.length?r(t,a,i):void 0}},function(t,e){t.exports=function(t,e){return t>e}},function(t,e,n){var r=n(326),i=n(329)((function(t,e,n){r(t,e,n)}));t.exports=i},function(t,e,n){var r=n(54),i=n(158),a=n(90),o=n(327),s=n(13),c=n(41),u=n(160);t.exports=function t(e,n,l,h,f){e!==n&&a(n,(function(a,c){if(f||(f=new r),s(a))o(e,n,c,l,t,h,f);else{var d=h?h(u(e,c),a,c+"",e,n,f):void 0;void 0===d&&(d=a),i(e,c,d)}}),c)}},function(t,e,n){var r=n(158),i=n(115),a=n(124),o=n(116),s=n(125),c=n(48),u=n(5),l=n(147),h=n(40),f=n(38),d=n(13),p=n(159),y=n(49),g=n(160),v=n(328);t.exports=function(t,e,n,m,b,x,_){var k=g(t,n),w=g(e,n),E=_.get(w);if(E)r(t,n,E);else{var T=x?x(k,w,n+"",t,e,_):void 0,C=void 0===T;if(C){var S=u(w),A=!S&&h(w),M=!S&&!A&&y(w);T=w,S||A||M?u(k)?T=k:l(k)?T=o(k):A?(C=!1,T=i(w,!0)):M?(C=!1,T=a(w,!0)):T=[]:p(w)||c(w)?(T=k,c(k)?T=v(k):d(k)&&!f(k)||(T=s(w))):C=!1}C&&(_.set(w,T),b(T,w,m,x,_),_.delete(w)),r(t,n,T)}}},function(t,e,n){var r=n(47),i=n(41);t.exports=function(t){return r(t,i(t))}},function(t,e,n){var r=n(68),i=n(69);t.exports=function(t){return r((function(e,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&i(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++r<a;){var c=n[r];c&&t(e,c,r,o)}return e}))}},function(t,e,n){var r=n(96),i=n(161),a=n(35);t.exports=function(t){return t&&t.length?r(t,a,i):void 0}},function(t,e,n){var r=n(96),i=n(26),a=n(161);t.exports=function(t,e){return t&&t.length?r(t,i(e,2),a):void 0}},function(t,e,n){var r=n(19);t.exports=function(){return r.Date.now()}},function(t,e,n){var r=n(334),i=n(137);t.exports=function(t,e){return r(t,e,(function(e,n){return i(t,n)}))}},function(t,e,n){var r=n(92),i=n(335),a=n(66);t.exports=function(t,e,n){for(var o=-1,s=e.length,c={};++o<s;){var u=e[o],l=r(t,u);n(l,u)&&i(c,a(u,t),l)}return c}},function(t,e,n){var r=n(59),i=n(66),a=n(61),o=n(13),s=n(50);t.exports=function(t,e,n,c){if(!o(t))return t;for(var u=-1,l=(e=i(e,t)).length,h=l-1,f=t;null!=f&&++u<l;){var d=s(e[u]),p=n;if(u!=h){var y=f[d];void 0===(p=c?c(y,d,f):void 0)&&(p=o(y)?y:a(e[u+1])?[]:{})}r(f,d,p),f=f[d]}return t}},function(t,e,n){var r=n(157),i=n(144),a=n(145);t.exports=function(t){return a(i(t,void 0,r),t+"")}},function(t,e,n){var r=n(338),i=n(69),a=n(156);t.exports=function(t){return function(e,n,o){return o&&"number"!=typeof o&&i(e,n,o)&&(n=o=void 0),e=a(e),void 0===n?(n=e,e=0):n=a(n),o=void 0===o?e<n?1:-1:a(o),r(e,n,o,t)}}},function(t,e){var n=Math.ceil,r=Math.max;t.exports=function(t,e,i,a){for(var o=-1,s=r(n((e-t)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=t,t+=i;return c}},function(t,e,n){var r=n(95),i=n(340),a=n(68),o=n(69),s=a((function(t,e){if(null==t)return[];var n=e.length;return n>1&&o(t,e[0],e[1])?e=[]:n>2&&o(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=s},function(t,e,n){var r=n(67),i=n(26),a=n(142),o=n(341),s=n(62),c=n(342),u=n(35);t.exports=function(t,e,n){var l=-1;e=r(e.length?e:[u],s(i));var h=a(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++l,value:t}}));return o(h,(function(t,e){return c(t,e,n)}))}},function(t,e){t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},function(t,e,n){var r=n(343);t.exports=function(t,e,n){for(var i=-1,a=t.criteria,o=e.criteria,s=a.length,c=n.length;++i<s;){var u=r(a[i],o[i]);if(u)return i>=c?u:u*("desc"==n[i]?-1:1)}return t.index-e.index}},function(t,e,n){var r=n(43);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,a=t==t,o=r(t),s=void 0!==e,c=null===e,u=e==e,l=r(e);if(!c&&!l&&!o&&t>e||o&&s&&u&&!c&&!l||i&&s&&u||!n&&u||!a)return 1;if(!i&&!o&&!l&&t<e||l&&n&&a&&!i&&!o||c&&n&&a||!s&&a||!u)return-1}return 0}},function(t,e,n){var r=n(59),i=n(345);t.exports=function(t,e){return i(t||[],e||[],r)}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=t.length,a=e.length,o={};++r<i;){var s=r<a?e[r]:void 0;n(o,t[r],s)}return o}},function(t,e,n){"use strict";var r=n(4),i=n(347);t.exports={run:function(t){var e="greedy"===t.graph().acyclicer?i(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},i={};function a(o){r.has(i,o)||(i[o]=!0,n[o]=!0,r.forEach(t.outEdges(o),(function(t){r.has(n,t.w)?e.push(t):a(t.w)})),delete n[o])}return r.forEach(t.nodes(),a),e}(t);r.forEach(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.uniqueId("rev"))}))},undo:function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}}},function(t,e,n){var r=n(4),i=n(20).Graph,a=n(348);t.exports=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new i,o=0,s=0;r.forEach(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),r.forEach(t.edges(),(function(t){var r=n.edge(t.v,t.w)||0,i=e(t),a=r+i;n.setEdge(t.v,t.w,a),s=Math.max(s,n.node(t.v).out+=i),o=Math.max(o,n.node(t.w).in+=i)}));var u=r.range(s+o+3).map((function(){return new a})),l=o+1;return r.forEach(n.nodes(),(function(t){c(u,l,n.node(t))})),{graph:n,buckets:u,zeroIdx:l}}(t,e||o),u=function(t,e,n){var r,i=[],a=e[e.length-1],o=e[0];for(;t.nodeCount();){for(;r=o.dequeue();)s(t,e,n,r);for(;r=a.dequeue();)s(t,e,n,r);if(t.nodeCount())for(var c=e.length-2;c>0;--c)if(r=e[c].dequeue()){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(u,(function(e){return t.outEdges(e.v,e.w)})),!0)};var o=r.constant(1);function s(t,e,n,i,a){var o=a?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),s=t.node(r.v);a&&o.push({v:r.v,w:r.w}),s.out-=i,c(e,n,s)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),a=r.w,o=t.node(a);o.in-=i,c(e,n,o)})),t.removeNode(i.v),o}function c(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},function(t,e){function n(){var t={};t._next=t._prev=t,this._sentinel=t}function r(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=n,n.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return r(e),e},n.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&r(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},n.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,i)),n=n._prev;return"["+t.join(", ")+"]"}},function(t,e,n){"use strict";var r=n(4),i=n(8);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,a,o=e.v,s=t.node(o).rank,c=e.w,u=t.node(c).rank,l=e.name,h=t.edge(e),f=h.labelRank;if(u===s+1)return;for(t.removeEdge(e),a=0,++s;s<u;++a,++s)h.points=[],r={width:0,height:0,edgeLabel:h,edgeObj:e,rank:s},n=i.addDummyNode(t,"edge",r,"_d"),s===f&&(r.width=h.width,r.height=h.height,r.dummy="edge-label",r.labelpos=h.labelpos),t.setEdge(o,n,{weight:h.weight},l),0===a&&t.graph().dummyChains.push(n),o=n;t.setEdge(o,c,{weight:h.weight},l)}(t,e)}))},undo:function(t){r.forEach(t.graph().dummyChains,(function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}}},function(t,e,n){"use strict";var r=n(70).longestPath,i=n(165),a=n(351);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":s(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":o(t);break;default:s(t)}};var o=r;function s(t){a(t)}},function(t,e,n){"use strict";var r=n(4),i=n(165),a=n(70).slack,o=n(70).longestPath,s=n(20).alg.preorder,c=n(20).alg.postorder,u=n(8).simplify;function l(t){t=u(t),o(t);var e,n=i(t);for(d(n),h(n,t);e=y(n);)v(n,t,e,g(n,t,e))}function h(t,e){var n=c(t,t.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=f(t,e,n)}(t,e,n)}))}function f(t,e,n){var i=t.node(n).parent,a=!0,o=e.edge(n,i),s=0;return o||(a=!1,o=e.edge(i,n)),s=o.weight,r.forEach(e.nodeEdges(n),(function(r){var o,c,u=r.v===n,l=u?r.w:r.v;if(l!==i){var h=u===a,f=e.edge(r).weight;if(s+=h?f:-f,o=n,c=l,t.hasEdge(o,c)){var d=t.edge(n,l).cutvalue;s+=h?-d:d}}})),s}function d(t,e){arguments.length<2&&(e=t.nodes()[0]),p(t,{},1,e)}function p(t,e,n,i,a){var o=n,s=t.node(i);return e[i]=!0,r.forEach(t.neighbors(i),(function(a){r.has(e,a)||(n=p(t,e,n,a,i))})),s.low=o,s.lim=n++,a?s.parent=a:delete s.parent,n}function y(t){return r.find(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function g(t,e,n){var i=n.v,o=n.w;e.hasEdge(i,o)||(i=n.w,o=n.v);var s=t.node(i),c=t.node(o),u=s,l=!1;s.lim>c.lim&&(u=c,l=!0);var h=r.filter(e.edges(),(function(e){return l===m(t,t.node(e.v),u)&&l!==m(t,t.node(e.w),u)}));return r.minBy(h,(function(t){return a(e,t)}))}function v(t,e,n,i){var a=n.v,o=n.w;t.removeEdge(a,o),t.setEdge(i.v,i.w,{}),d(t),h(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=s(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)}))}(t,e)}function m(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=l,l.initLowLimValues=d,l.initCutValues=h,l.calcCutValue=f,l.leaveEdge=y,l.enterEdge=g,l.exchangeEdges=v},function(t,e,n){var r=n(4);t.exports=function(t){var e=function(t){var e={},n=0;function i(a){var o=n;r.forEach(t.children(a),i),e[a]={low:o,lim:n++}}return r.forEach(t.children(),i),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,a=function(t,e,n,r){var i,a,o=[],s=[],c=Math.min(e[n].low,e[r].low),u=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),o.push(i)}while(i&&(e[i].low>c||u>e[i].lim));a=i,i=r;for(;(i=t.parent(i))!==a;)s.push(i);return{path:o.concat(s.reverse()),lca:a}}(t,e,i.v,i.w),o=a.path,s=a.lca,c=0,u=o[c],l=!0;n!==i.w;){if(r=t.node(n),l){for(;(u=o[c])!==s&&t.node(u).maxRank<r.rank;)c++;u===s&&(l=!1)}if(!l){for(;c<o.length-1&&t.node(u=o[c+1]).minRank<=r.rank;)c++;u=o[c]}t.setParent(n,u),n=t.successors(n)[0]}}))}},function(t,e,n){var r=n(4),i=n(8);t.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};return r.forEach(t.children(),(function(n){!function n(i,a){var o=t.children(i);o&&o.length&&r.forEach(o,(function(t){n(t,a+1)}));e[i]=a}(n,1)})),e}(t),a=r.max(r.values(n))-1,o=2*a+1;t.graph().nestingRoot=e,r.forEach(t.edges(),(function(e){t.edge(e).minlen*=o}));var s=function(t){return r.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;r.forEach(t.children(),(function(c){!function t(e,n,a,o,s,c,u){var l=e.children(u);if(!l.length)return void(u!==n&&e.setEdge(n,u,{weight:0,minlen:a}));var h=i.addBorderNode(e,"_bt"),f=i.addBorderNode(e,"_bb"),d=e.node(u);e.setParent(h,u),d.borderTop=h,e.setParent(f,u),d.borderBottom=f,r.forEach(l,(function(r){t(e,n,a,o,s,c,r);var i=e.node(r),l=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,p=i.borderTop?o:2*o,y=l!==d?1:s-c[u]+1;e.setEdge(h,l,{weight:p,minlen:y,nestingEdge:!0}),e.setEdge(d,f,{weight:p,minlen:y,nestingEdge:!0})})),e.parent(u)||e.setEdge(n,h,{weight:0,minlen:s+c[u]})}(t,e,o,s,a,n,c)})),t.graph().nodeRankFactor=o},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},function(t,e,n){var r=n(4),i=n(8);function a(t,e,n,r,a,o){var s={width:0,height:0,rank:o,borderType:e},c=a[e][o-1],u=i.addDummyNode(t,"border",s,n);a[e][o]=u,t.setParent(u,r),c&&t.setEdge(c,u,{weight:1})}t.exports=function(t){r.forEach(t.children(),(function e(n){var i=t.children(n),o=t.node(n);if(i.length&&r.forEach(i,e),r.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var s=o.minRank,c=o.maxRank+1;s<c;++s)a(t,"borderLeft","_bl",n,o,s),a(t,"borderRight","_br",n,o,s)}}))}},function(t,e,n){"use strict";var r=n(4);function i(t){r.forEach(t.nodes(),(function(e){a(t.node(e))})),r.forEach(t.edges(),(function(e){a(t.edge(e))}))}function a(t){var e=t.width;t.width=t.height,t.height=e}function o(t){t.y=-t.y}function s(t){var e=t.x;t.x=t.y,t.y=e}t.exports={adjust:function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||i(t)},undo:function(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){r.forEach(t.nodes(),(function(e){o(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,o),r.has(n,"y")&&o(n)}))}(t);"lr"!==e&&"rl"!==e||(!function(t){r.forEach(t.nodes(),(function(e){s(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,s),r.has(n,"x")&&s(n)}))}(t),i(t))}}},function(t,e,n){"use strict";var r=n(4),i=n(357),a=n(358),o=n(359),s=n(363),c=n(364),u=n(20).Graph,l=n(8);function h(t,e,n){return r.map(e,(function(e){return s(t,e,n)}))}function f(t,e){var n=new u;r.forEach(t,(function(t){var i=t.graph().root,a=o(t,i,n,e);r.forEach(a.vs,(function(e,n){t.node(e).order=n})),c(t,n,a.vs)}))}function d(t,e){r.forEach(e,(function(e){r.forEach(e,(function(e,n){t.node(e).order=n}))}))}t.exports=function(t){var e=l.maxRank(t),n=h(t,r.range(1,e+1),"inEdges"),o=h(t,r.range(e-1,-1,-1),"outEdges"),s=i(t);d(t,s);for(var c,u=Number.POSITIVE_INFINITY,p=0,y=0;y<4;++p,++y){f(p%2?n:o,p%4>=2),s=l.buildLayerMatrix(t);var g=a(t,s);g<u&&(y=0,c=r.cloneDeep(s),u=g)}d(t,c)}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t){var e={},n=r.filter(t.nodes(),(function(e){return!t.children(e).length})),i=r.max(r.map(n,(function(e){return t.node(e).rank}))),a=r.map(r.range(i+1),(function(){return[]}));var o=r.sortBy(n,(function(e){return t.node(e).rank}));return r.forEach(o,(function n(i){if(r.has(e,i))return;e[i]=!0;var o=t.node(i);a[o.rank].push(i),r.forEach(t.successors(i),n)})),a}},function(t,e,n){"use strict";var r=n(4);function i(t,e,n){for(var i=r.zipObject(n,r.map(n,(function(t,e){return e}))),a=r.flatten(r.map(e,(function(e){return r.sortBy(r.map(t.outEdges(e),(function(e){return{pos:i[e.w],weight:t.edge(e).weight}})),"pos")})),!0),o=1;o<n.length;)o<<=1;var s=2*o-1;o-=1;var c=r.map(new Array(s),(function(){return 0})),u=0;return r.forEach(a.forEach((function(t){var e=t.pos+o;c[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=c[e+1]),c[e=e-1>>1]+=t.weight;u+=t.weight*n}))),u}t.exports=function(t,e){for(var n=0,r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n}},function(t,e,n){var r=n(4),i=n(360),a=n(361),o=n(362);t.exports=function t(e,n,s,c){var u=e.children(n),l=e.node(n),h=l?l.borderLeft:void 0,f=l?l.borderRight:void 0,d={};h&&(u=r.filter(u,(function(t){return t!==h&&t!==f})));var p=i(e,u);r.forEach(p,(function(n){if(e.children(n.v).length){var i=t(e,n.v,s,c);d[n.v]=i,r.has(i,"barycenter")&&(a=n,o=i,r.isUndefined(a.barycenter)?(a.barycenter=o.barycenter,a.weight=o.weight):(a.barycenter=(a.barycenter*a.weight+o.barycenter*o.weight)/(a.weight+o.weight),a.weight+=o.weight))}var a,o}));var y=a(p,s);!function(t,e){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(y,d);var g=o(y,c);if(h&&(g.vs=r.flatten([h,g.vs,f],!0),e.predecessors(h).length)){var v=e.node(e.predecessors(h)[0]),m=e.node(e.predecessors(f)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+v.order+m.order)/(g.weight+2),g.weight+=2}return g}},function(t,e,n){var r=n(4);t.exports=function(t,e){return r.map(e,(function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,(function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}}))}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t,e){var n={};return r.forEach(t,(function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};r.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)})),r.forEach(e.edges(),(function(t){var e=n[t.v],i=n[t.w];r.isUndefined(e)||r.isUndefined(i)||(i.indegree++,e.out.push(n[t.w]))})),function(t){var e=[];function n(t){return function(e){e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&function(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var a=t.pop();e.push(a),r.forEach(a.in.reverse(),n(a)),r.forEach(a.out,i(a))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(t){return!t.indegree})))}},function(t,e,n){var r=n(4),i=n(8);function a(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){var n=i.partition(t,(function(t){return r.has(t,"barycenter")})),o=n.lhs,s=r.sortBy(n.rhs,(function(t){return-t.i})),c=[],u=0,l=0,h=0;o.sort((f=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:f?e.i-t.i:t.i-e.i})),h=a(c,s,h),r.forEach(o,(function(t){h+=t.vs.length,c.push(t.vs),u+=t.barycenter*t.weight,l+=t.weight,h=a(c,s,h)}));var f;var d={vs:r.flatten(c,!0)};l&&(d.barycenter=u/l,d.weight=l);return d}},function(t,e,n){var r=n(4),i=n(20).Graph;t.exports=function(t,e,n){var a=function(t){var e;for(;t.hasNode(e=r.uniqueId("_root")););return e}(t),o=new i({compound:!0}).setGraph({root:a}).setDefaultNodeLabel((function(e){return t.node(e)}));return r.forEach(t.nodes(),(function(i){var s=t.node(i),c=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(o.setNode(i),o.setParent(i,c||a),r.forEach(t[n](i),(function(e){var n=e.v===i?e.w:e.v,a=o.edge(n,i),s=r.isUndefined(a)?0:a.weight;o.setEdge(n,i,{weight:t.edge(e).weight+s})})),r.has(s,"minRank")&&o.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))})),o}},function(t,e,n){var r=n(4);t.exports=function(t,e,n){var i,a={};r.forEach(n,(function(n){for(var r,o,s=t.parent(n);s;){if((r=t.parent(s))?(o=a[r],a[r]=s):(o=i,i=s),o&&o!==s)return void e.setEdge(o,s);s=r}}))}},function(t,e,n){"use strict";var r=n(4),i=n(8),a=n(366).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,a=0;r.forEach(e,(function(e){var i=r.max(r.map(e,(function(e){return t.node(e).height})));r.forEach(e,(function(e){t.node(e).y=a+i/2})),a+=i+n}))})(t=i.asNonCompoundGraph(t)),r.forEach(a(t),(function(e,n){t.node(n).x=e}))}},function(t,e,n){"use strict";var r=n(4),i=n(20).Graph,a=n(8);function o(t,e){var n={};return r.reduce(e,(function(e,i){var a=0,o=0,s=e.length,u=r.last(i);return r.forEach(i,(function(e,l){var h=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),f=h?t.node(h).order:s;(h||e===u)&&(r.forEach(i.slice(o,l+1),(function(e){r.forEach(t.predecessors(e),(function(r){var i=t.node(r),o=i.order;!(o<a||f<o)||i.dummy&&t.node(e).dummy||c(n,r,e)}))})),o=l+1,a=f)})),i})),n}function s(t,e){var n={};function i(e,i,a,o,s){var u;r.forEach(r.range(i,a),(function(i){u=e[i],t.node(u).dummy&&r.forEach(t.predecessors(u),(function(e){var r=t.node(e);r.dummy&&(r.order<o||r.order>s)&&c(n,e,u)}))}))}return r.reduce(e,(function(e,n){var a,o=-1,s=0;return r.forEach(n,(function(r,c){if("border"===t.node(r).dummy){var u=t.predecessors(r);u.length&&(a=t.node(u[0]).order,i(n,s,c,o,a),s=c,o=a)}i(n,s,n.length,a,e.length)})),n})),n}function c(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function u(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function l(t,e,n,i){var a={},o={},s={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){a[t]=t,o[t]=t,s[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var c=i(t);if(c.length)for(var l=((c=r.sortBy(c,(function(t){return s[t]}))).length-1)/2,h=Math.floor(l),f=Math.ceil(l);h<=f;++h){var d=c[h];o[t]===t&&e<s[d]&&!u(n,t,d)&&(o[d]=t,o[t]=a[t]=a[d],e=s[d])}}))})),{root:a,align:o}}function h(t,e,n,a,o){var s={},c=function(t,e,n,a){var o=new i,s=t.graph(),c=function(t,e,n){return function(i,a,o){var s,c=i.node(a),u=i.node(o),l=0;if(l+=c.width/2,r.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=-c.width/2;break;case"r":s=c.width/2}if(s&&(l+=n?s:-s),s=0,l+=(c.dummy?e:t)/2,l+=(u.dummy?e:t)/2,l+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=u.width/2;break;case"r":s=-u.width/2}return s&&(l+=n?s:-s),s=0,l}}(s.nodesep,s.edgesep,a);return r.forEach(e,(function(e){var i;r.forEach(e,(function(e){var r=n[e];if(o.setNode(r),i){var a=n[i],s=o.edge(a,r);o.setEdge(a,r,Math.max(c(t,e,i),s||0))}i=e}))})),o}(t,e,n,o),u=o?"borderLeft":"borderRight";function l(t,e){for(var n=c.nodes(),r=n.pop(),i={};r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return l((function(t){s[t]=c.inEdges(t).reduce((function(t,e){return Math.max(t,s[e.v]+c.edge(e))}),0)}),c.predecessors.bind(c)),l((function(e){var n=c.outEdges(e).reduce((function(t,e){return Math.min(t,s[e.w]-c.edge(e))}),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(s[e]=Math.max(s[e],n))}),c.successors.bind(c)),r.forEach(a,(function(t){s[t]=s[n[t]]})),s}function f(t,e){return r.minBy(r.values(e),(function(e){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return r.forIn(e,(function(e,r){var a=function(t,e){return t.node(e).width}(t,r)/2;n=Math.max(e+a,n),i=Math.min(e-a,i)})),n-i}))}function d(t,e){var n=r.values(e),i=r.min(n),a=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(o){var s,c=n+o,u=t[c];if(u!==e){var l=r.values(u);(s="l"===o?i-r.min(l):a-r.max(l))&&(t[c]=r.mapValues(u,(function(t){return t+s})))}}))}))}function p(t,e){return r.mapValues(t.ul,(function(n,i){if(e)return t[e.toLowerCase()][i];var a=r.sortBy(r.map(t,i));return(a[1]+a[2])/2}))}t.exports={positionX:function(t){var e,n=a.buildLayerMatrix(t),i=r.merge(o(t,n),s(t,n)),c={};r.forEach(["u","d"],(function(a){e="u"===a?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(e=r.map(e,(function(t){return r.values(t).reverse()})));var o=("u"===a?t.predecessors:t.successors).bind(t),s=l(t,e,i,o),u=h(t,e,s.root,s.align,"r"===n);"r"===n&&(u=r.mapValues(u,(function(t){return-t}))),c[a+n]=u}))}));var u=f(t,c);return d(c,u),p(c,t.graph().align)},findType1Conflicts:o,findType2Conflicts:s,addConflict:c,hasConflict:u,verticalAlignment:l,horizontalCompaction:h,alignCoordinates:d,findSmallestWidthAlignment:f,balance:p}},function(t,e,n){var r=n(4),i=n(8),a=n(20).Graph;t.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),(function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),r.forEach(t.edges(),(function(t){n.setEdge(t.v,t.w,{},t.name)})),r.forEach(e,(function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,(function(t,e){return n.setEdge(t,e,{style:"invis"}),e}))})),n}}},function(t,e){t.exports="0.8.5"},function(t,e,n){t.exports={node:n(166),circle:n(167),ellipse:n(97),polygon:n(168),rect:n(169)}},function(t,e){function n(t,e){return t*e>0}t.exports=function(t,e,r,i){var a,o,s,c,u,l,h,f,d,p,y,g,v;if(a=e.y-t.y,s=t.x-e.x,u=e.x*t.y-t.x*e.y,d=a*r.x+s*r.y+u,p=a*i.x+s*i.y+u,0!==d&&0!==p&&n(d,p))return;if(o=i.y-r.y,c=r.x-i.x,l=i.x*r.y-r.x*i.y,h=o*t.x+c*t.y+l,f=o*e.x+c*e.y+l,0!==h&&0!==f&&n(h,f))return;if(0===(y=a*c-o*s))return;return g=Math.abs(y/2),{x:(v=s*l-c*u)<0?(v-g)/y:(v+g)/y,y:(v=o*u-a*l)<0?(v-g)/y:(v+g)/y}}},function(t,e,n){var r=n(44),i=n(31),a=n(154).layout;t.exports=function(){var t=n(372),e=n(375),i=n(376),u=n(377),l=n(378),h=n(379),f=n(380),d=n(381),p=n(382),y=function(n,y){!function(t){t.nodes().forEach((function(e){var n=t.node(e);r.has(n,"label")||t.children(e).length||(n.label=e),r.has(n,"paddingX")&&r.defaults(n,{paddingLeft:n.paddingX,paddingRight:n.paddingX}),r.has(n,"paddingY")&&r.defaults(n,{paddingTop:n.paddingY,paddingBottom:n.paddingY}),r.has(n,"padding")&&r.defaults(n,{paddingLeft:n.padding,paddingRight:n.padding,paddingTop:n.padding,paddingBottom:n.padding}),r.defaults(n,o),r.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],(function(t){n[t]=Number(n[t])})),r.has(n,"width")&&(n._prevWidth=n.width),r.has(n,"height")&&(n._prevHeight=n.height)})),t.edges().forEach((function(e){var n=t.edge(e);r.has(n,"label")||(n.label=""),r.defaults(n,s)}))}(y);var g=c(n,"output"),v=c(g,"clusters"),m=c(g,"edgePaths"),b=i(c(g,"edgeLabels"),y),x=t(c(g,"nodes"),y,d);a(y),l(x,y),h(b,y),u(m,y,p);var _=e(v,y);f(_,y),function(t){r.each(t.nodes(),(function(e){var n=t.node(e);r.has(n,"_prevWidth")?n.width=n._prevWidth:delete n.width,r.has(n,"_prevHeight")?n.height=n._prevHeight:delete n.height,delete n._prevWidth,delete n._prevHeight}))}(y)};return y.createNodes=function(e){return arguments.length?(t=e,y):t},y.createClusters=function(t){return arguments.length?(e=t,y):e},y.createEdgeLabels=function(t){return arguments.length?(i=t,y):i},y.createEdgePaths=function(t){return arguments.length?(u=t,y):u},y.shapes=function(t){return arguments.length?(d=t,y):d},y.arrows=function(t){return arguments.length?(p=t,y):p},y};var o={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},s={arrowhead:"normal",curve:i.curveLinear};function c(t,e){var n=t.select("g."+e);return n.empty()&&(n=t.append("g").attr("class",e)),n}},function(t,e,n){"use strict";var r=n(44),i=n(98),a=n(14),o=n(31);t.exports=function(t,e,n){var s,c=e.nodes().filter((function(t){return!a.isSubgraph(e,t)})),u=t.selectAll("g.node").data(c,(function(t){return t})).classed("update",!0);u.exit().remove(),u.enter().append("g").attr("class","node").style("opacity",0),(u=t.selectAll("g.node")).each((function(t){var s=e.node(t),c=o.select(this);a.applyClass(c,s.class,(c.classed("update")?"update ":"")+"node"),c.select("g.label").remove();var u=c.append("g").attr("class","label"),l=i(u,s),h=n[s.shape],f=r.pick(l.node().getBBox(),"width","height");s.elem=this,s.id&&c.attr("id",s.id),s.labelId&&u.attr("id",s.labelId),r.has(s,"width")&&(f.width=s.width),r.has(s,"height")&&(f.height=s.height),f.width+=s.paddingLeft+s.paddingRight,f.height+=s.paddingTop+s.paddingBottom,u.attr("transform","translate("+(s.paddingLeft-s.paddingRight)/2+","+(s.paddingTop-s.paddingBottom)/2+")");var d=o.select(this);d.select(".label-container").remove();var p=h(d,f,s).classed("label-container",!0);a.applyStyle(p,s.style);var y=p.node().getBBox();s.width=y.width,s.height=y.height})),s=u.exit?u.exit():u.selectAll(null);return a.applyTransition(s,e).style("opacity",0).remove(),u}},function(t,e,n){var r=n(14);t.exports=function(t,e){for(var n=t.append("text"),i=function(t){for(var e,n="",r=!1,i=0;i<t.length;++i)if(e=t[i],r){switch(e){case"n":n+="\n";break;default:n+=e}r=!1}else"\\"===e?r=!0:n+=e;return n}(e.label).split("\n"),a=0;a<i.length;a++)n.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(i[a]);return r.applyStyle(n,e.labelStyle),n}},function(t,e,n){var r=n(14);t.exports=function(t,e){var n=t;return n.node().appendChild(e.label),r.applyStyle(n,e.labelStyle),n}},function(t,e,n){var r=n(14),i=n(31),a=n(98);t.exports=function(t,e){var n,o=e.nodes().filter((function(t){return r.isSubgraph(e,t)})),s=t.selectAll("g.cluster").data(o,(function(t){return t}));s.selectAll("*").remove(),s.enter().append("g").attr("class","cluster").attr("id",(function(t){return e.node(t).id})).style("opacity",0),s=t.selectAll("g.cluster"),r.applyTransition(s,e).style("opacity",1),s.each((function(t){var n=e.node(t),r=i.select(this);i.select(this).append("rect");var o=r.append("g").attr("class","label");a(o,n,n.clusterLabelPos)})),s.selectAll("rect").each((function(t){var n=e.node(t),a=i.select(this);r.applyStyle(a,n.style)})),n=s.exit?s.exit():s.selectAll(null);return r.applyTransition(n,e).style("opacity",0).remove(),s}},function(t,e,n){"use strict";var r=n(44),i=n(98),a=n(14),o=n(31);t.exports=function(t,e){var n,s=t.selectAll("g.edgeLabel").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0);s.exit().remove(),s.enter().append("g").classed("edgeLabel",!0).style("opacity",0),(s=t.selectAll("g.edgeLabel")).each((function(t){var n=o.select(this);n.select(".label").remove();var a=e.edge(t),s=i(n,e.edge(t),0,0).classed("label",!0),c=s.node().getBBox();a.labelId&&s.attr("id",a.labelId),r.has(a,"width")||(a.width=c.width),r.has(a,"height")||(a.height=c.height)})),n=s.exit?s.exit():s.selectAll(null);return a.applyTransition(n,e).style("opacity",0).remove(),s}},function(t,e,n){"use strict";var r=n(44),i=n(166),a=n(14),o=n(31);function s(t,e){var n=(o.line||o.svg.line)().x((function(t){return t.x})).y((function(t){return t.y}));return(n.curve||n.interpolate)(t.curve),n(e)}t.exports=function(t,e,n){var c=t.selectAll("g.edgePath").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0),u=function(t,e){var n=t.enter().append("g").attr("class","edgePath").style("opacity",0);return n.append("path").attr("class","path").attr("d",(function(t){var n=e.edge(t),i=e.node(t.v).elem;return s(n,r.range(n.points.length).map((function(){return e=(t=i).getBBox(),{x:(n=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2)).e,y:n.f};var t,e,n})))})),n.append("defs"),n}(c,e);!function(t,e){var n=t.exit();a.applyTransition(n,e).style("opacity",0).remove()}(c,e);var l=void 0!==c.merge?c.merge(u):c;return a.applyTransition(l,e).style("opacity",1),l.each((function(t){var n=o.select(this),r=e.edge(t);r.elem=this,r.id&&n.attr("id",r.id),a.applyClass(n,r.class,(n.classed("update")?"update ":"")+"edgePath")})),l.selectAll("path.path").each((function(t){var n=e.edge(t);n.arrowheadId=r.uniqueId("arrowhead");var c=o.select(this).attr("marker-end",(function(){return"url("+(t=location.href,e=n.arrowheadId,t.split("#")[0]+"#"+e)+")";var t,e})).style("fill","none");a.applyTransition(c,e).attr("d",(function(t){return function(t,e){var n=t.edge(e),r=t.node(e.v),a=t.node(e.w),o=n.points.slice(1,n.points.length-1);return o.unshift(i(r,o[0])),o.push(i(a,o[o.length-1])),s(n,o)}(e,t)})),a.applyStyle(c,n.style)})),l.selectAll("defs *").remove(),l.selectAll("defs").each((function(t){var r=e.edge(t);(0,n[r.arrowhead])(o.select(this),r.arrowheadId,r,"arrowhead")})),l}},function(t,e,n){"use strict";var r=n(14),i=n(31);t.exports=function(t,e){function n(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},function(t,e,n){"use strict";var r=n(14),i=n(31),a=n(44);t.exports=function(t,e){function n(t){var n=e.edge(t);return a.has(n,"x")?"translate("+n.x+","+n.y+")":""}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},function(t,e,n){"use strict";var r=n(14),i=n(31);t.exports=function(t,e){var n=t.filter((function(){return!i.select(this).classed("update")}));function a(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}n.attr("transform",a),r.applyTransition(t,e).style("opacity",1).attr("transform",a),r.applyTransition(n.selectAll("rect"),e).attr("width",(function(t){return e.node(t).width})).attr("height",(function(t){return e.node(t).height})).attr("x",(function(t){return-e.node(t).width/2})).attr("y",(function(t){return-e.node(t).height/2}))}},function(t,e,n){"use strict";var r=n(169),i=n(97),a=n(167),o=n(168);t.exports={rect:function(t,e,n){var i=t.insert("rect",":first-child").attr("rx",n.rx).attr("ry",n.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return n.intersect=function(t){return r(n,t)},i},ellipse:function(t,e,n){var r=e.width/2,a=e.height/2,o=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",r).attr("ry",a);return n.intersect=function(t){return i(n,r,a,t)},o},circle:function(t,e,n){var r=Math.max(e.width,e.height)/2,i=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",r);return n.intersect=function(t){return a(n,r,t)},i},diamond:function(t,e,n){var r=e.width*Math.SQRT2/2,i=e.height*Math.SQRT2/2,a=[{x:0,y:-i},{x:-r,y:0},{x:0,y:i},{x:r,y:0}],s=t.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" "));return n.intersect=function(t){return o(n,a,t)},s}}},function(t,e,n){var r=n(14);function i(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])}t.exports={default:i,normal:i,vee:function(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])},undirected:function(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])}}},function(t,e){t.exports="0.6.4"},function(t,e,n){"use strict";var r;function i(t){return r=r||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),r.innerHTML=t,unescape(r.textContent)}n.r(e);var a=n(23),o=n.n(a),s={debug:1,info:2,warn:3,error:4,fatal:5},c={debug:function(){},info:function(){},warn:function(){},error:function(){},fatal:function(){}},u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"fatal";isNaN(t)&&(t=t.toLowerCase(),void 0!==s[t]&&(t=s[t])),c.trace=function(){},c.debug=function(){},c.info=function(){},c.warn=function(){},c.error=function(){},c.fatal=function(){},t<=s.fatal&&(c.fatal=console.error?console.error.bind(console,l("FATAL"),"color: orange"):console.log.bind(console,"",l("FATAL"))),t<=s.error&&(c.error=console.error?console.error.bind(console,l("ERROR"),"color: orange"):console.log.bind(console,"",l("ERROR"))),t<=s.warn&&(c.warn=console.warn?console.warn.bind(console,l("WARN"),"color: orange"):console.log.bind(console,"",l("WARN"))),t<=s.info&&(c.info=console.info?console.info.bind(console,l("INFO"),"color: lightblue"):console.log.bind(console,"",l("INFO"))),t<=s.debug&&(c.debug=console.debug?console.debug.bind(console,l("DEBUG"),"color: lightgreen"):console.log.bind(console,"",l("DEBUG")))},l=function(t){var e=o()().format("ss.SSS");return"%c".concat(e," : ").concat(t," : ")},h=n(0),f=n(170),d=n.n(f),p=n(36),y=n(71),g=function(t){for(var e="",n=0;n>=0;){if(!((n=t.indexOf("<script"))>=0)){e+=t,n=-1;break}e+=t.substr(0,n),(n=(t=t.substr(n+1)).indexOf("<\/script>"))>=0&&(n+=9,t=t.substr(n))}return e},v=/<br\s*\/?>/gi,m=function(t){return t.replace(v,"#br#")},b=function(t){return t.replace(/#br#/g,"<br/>")},x={getRows:function(t){if(!t)return 1;var e=m(t);return(e=e.replace(/\\n/g,"#br#")).split("#br#")},sanitizeText:function(t,e){var n=t,r=!0;if(!e.flowchart||!1!==e.flowchart.htmlLabels&&"false"!==e.flowchart.htmlLabels||(r=!1),r){var i=e.securityLevel;"antiscript"===i?n=g(n):"loose"!==i&&(n=(n=(n=m(n)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),n=b(n))}return n},hasBreaks:function(t){return/<br\s*[/]?>/gi.test(t)},splitBreaks:function(t){return t.split(/<br\s*[/]?>/gi)},lineBreakRegex:v,removeScript:g,getUrl:function(t){var e="";return t&&(e=(e=(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e}};function _(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function k(t){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function w(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var E={curveBasis:h.curveBasis,curveBasisClosed:h.curveBasisClosed,curveBasisOpen:h.curveBasisOpen,curveLinear:h.curveLinear,curveLinearClosed:h.curveLinearClosed,curveMonotoneX:h.curveMonotoneX,curveMonotoneY:h.curveMonotoneY,curveNatural:h.curveNatural,curveStep:h.curveStep,curveStepAfter:h.curveStepAfter,curveStepBefore:h.curveStepBefore},T=/[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,C=/\s*(?:(?:(\w+)(?=:):|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,S=/\s*%%.*\n/gm,A=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var n=new RegExp("[%]{2}(?![{]".concat(C.source,")(?=[}][%]{2}).*\n"),"ig");t=t.trim().replace(n,"").replace(/'/gm,'"'),c.debug("Detecting diagram directive".concat(null!==e?" type:"+e:""," based on the text:").concat(t));for(var r,i=[];null!==(r=T.exec(t));)if(r.index===T.lastIndex&&T.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){var a=r[1]?r[1]:r[2],o=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:a,args:o})}return 0===i.length&&i.push({type:t,args:null}),1===i.length?i[0]:i}catch(n){return c.error("ERROR: ".concat(n.message," - Unable to parse directive\n ").concat(null!==e?" type:"+e:""," based on the text:").concat(t)),{type:null,args:null}}},M=function(t,e){return t=t.replace(T,"").replace(S,"\n"),c.debug("Detecting diagram type based on the text "+t),t.match(/^\s*sequenceDiagram/)?"sequence":t.match(/^\s*gantt/)?"gantt":t.match(/^\s*classDiagram-v2/)?"classDiagram":t.match(/^\s*classDiagram/)?e&&e.class&&"dagre-wrapper"===e.class.defaultRenderer?"classDiagram":"class":t.match(/^\s*stateDiagram-v2/)?"stateDiagram":t.match(/^\s*stateDiagram/)?e&&e.class&&"dagre-wrapper"===e.state.defaultRenderer?"stateDiagram":"state":t.match(/^\s*gitGraph/)?"git":t.match(/^\s*flowchart/)?"flowchart-v2":t.match(/^\s*info/)?"info":t.match(/^\s*pie/)?"pie":t.match(/^\s*erDiagram/)?"er":t.match(/^\s*journey/)?"journey":t.match(/^\s*requirement/)||t.match(/^\s*requirementDiagram/)?"requirement":e&&e.flowchart&&"dagre-wrapper"===e.flowchart.defaultRenderer?"flowchart-v2":"flowchart"},O=function(t,e){var n={};return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=e?e.apply(void 0,i):i[0];if(o in n)return n[o];var s=t.apply(void 0,i);return n[o]=s,s}},B=function(t,e){if(!t)return e;var n="curve".concat(t.charAt(0).toUpperCase()+t.slice(1));return E[n]||e},N=function(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0},D=function(t){for(var e="",n="",r=0;r<t.length;r++)void 0!==t[r]&&(t[r].startsWith("color:")||t[r].startsWith("text-align:")?n=n+t[r]+";":e=e+t[r]+";");return{style:e,labelStyle:n}},L=0,I=function(){return L++,"id-"+Math.random().toString(36).substr(2,12)+"-"+L};var R=function(t){return function(t){for(var e="",n="0123456789abcdef".length,r=0;r<t;r++)e+="0123456789abcdef".charAt(Math.floor(Math.random()*n));return e}(t.length)},F=function t(e,n,r){var i=Object.assign({depth:2,clobber:!1},r),a=i.depth,o=i.clobber;return Array.isArray(n)&&!Array.isArray(e)?(n.forEach((function(n){return t(e,n,r)})),e):Array.isArray(n)&&Array.isArray(e)?(n.forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),e):void 0===e||a<=0?null!=e&&"object"===k(e)&&"object"===k(n)?Object.assign(e,n):n:(void 0!==n&&"object"===k(e)&&"object"===k(n)&&Object.keys(n).forEach((function(r){"object"!==k(n[r])||void 0!==e[r]&&"object"!==k(e[r])?(o||"object"!==k(e[r])&&"object"!==k(n[r]))&&(e[r]=n[r]):(void 0===e[r]&&(e[r]=Array.isArray(n[r])?[]:{}),e[r]=t(e[r],n[r],{depth:a-1,clobber:o}))})),e)},P=function(t,e){var n=e.text.replace(x.lineBreakRegex," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.style("text-anchor",e.anchor),r.style("font-family",e.fontFamily),r.style("font-size",e.fontSize),r.style("font-weight",e.fontWeight),r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.attr("fill",e.fill),i.text(n),r},j=O((function(t,e,n){if(!t)return t;if(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},n),x.lineBreakRegex.test(t))return t;var r=t.split(" "),i=[],a="";return r.forEach((function(t,o){var s=z("".concat(t," "),n),c=z(a,n);if(s>e){var u=Y(t,e,"-",n),l=u.hyphenatedStrings,h=u.remainingWord;i.push.apply(i,[a].concat(w(l))),a=h}else c+s>=e?(i.push(a),a=t):a=[a,t].filter(Boolean).join(" ");o+1===r.length&&i.push(a)})),i.filter((function(t){return""!==t})).join(n.joinWith)}),(function(t,e,n){return"".concat(t,"-").concat(e,"-").concat(n.fontSize,"-").concat(n.fontWeight,"-").concat(n.fontFamily,"-").concat(n.joinWith)})),Y=O((function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);var i=t.split(""),a=[],o="";return i.forEach((function(t,s){var c="".concat(o).concat(t);if(z(c,r)>=e){var u=s+1,l=i.length===u,h="".concat(c).concat(n);a.push(l?c:h),o=""}else o=c})),{hyphenatedStrings:a,remainingWord:o}}),(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;return"".concat(t,"-").concat(e,"-").concat(n,"-").concat(r.fontSize,"-").concat(r.fontWeight,"-").concat(r.fontFamily)})),z=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),U(t,e).width},U=O((function(t,e){var n=e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),r=n.fontSize,i=n.fontFamily,a=n.fontWeight;if(!t)return{width:0,height:0};var o=["sans-serif",i],s=t.split(x.lineBreakRegex),c=[],u=Object(h.select)("body");if(!u.remove)return{width:0,height:0,lineHeight:0};for(var l=u.append("svg"),f=0,d=o;f<d.length;f++){var p=d[f],y=0,g={width:0,height:0,lineHeight:0},v=!0,m=!1,b=void 0;try{for(var _,k=s[Symbol.iterator]();!(v=(_=k.next()).done);v=!0){var w=_.value,E={x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0};E.text=w;var T=P(l,E).style("font-size",r).style("font-weight",a).style("font-family",p),C=(T._groups||T)[0][0].getBBox();g.width=Math.round(Math.max(g.width,C.width)),y=Math.round(C.height),g.height+=y,g.lineHeight=Math.round(Math.max(g.lineHeight,y))}}catch(t){m=!0,b=t}finally{try{v||null==k.return||k.return()}finally{if(m)throw b}}c.push(g)}return l.remove(),c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]}),(function(t,e){return"".concat(t,"-").concat(e.fontSize,"-").concat(e.fontWeight,"-").concat(e.fontFamily)})),$=function(t,e,n){var r=new Map;return r.set("height",t),n?(r.set("width","100%"),r.set("style","max-width: ".concat(e,"px;"))):r.set("width",e),r},q=function(t,e,n,r){!function(t,e){var n=!0,r=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;t.attr(s[0],s[1])}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}}(t,$(e,n,r))},W={assignWithDepth:F,wrapLabel:j,calculateTextHeight:function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),U(t,e).height},calculateTextWidth:z,calculateTextDimensions:U,calculateSvgSizeAttrs:$,configureSvgSize:q,detectInit:function(t,e){var n=A(t,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){var i=n.map((function(t){return t.args}));r=F(r,w(i))}else r=n.args;if(r){var a=M(t,e);["config"].forEach((function(t){void 0!==r[t]&&("flowchart-v2"===a&&(a="flowchart"),r[a]=r[t],delete r[t])}))}return r},detectDirective:A,detectType:M,isSubstringInArray:function(t,e){for(var n=0;n<e.length;n++)if(e[n].match(t))return n;return-1},interpolateToCurve:B,calcLabelPosition:function(t){return function(t){var e,n=0;t.forEach((function(t){n+=N(t,e),e=t}));var r=n/2,i=void 0;return e=void 0,t.forEach((function(t){if(e&&!i){var n=N(t,e);if(n<r)r-=n;else{var a=r/n;a<=0&&(i=e),a>=1&&(i={x:t.x,y:t.y}),a>0&&a<1&&(i={x:(1-a)*e.x+a*t.x,y:(1-a)*e.y+a*t.y})}}e=t})),i}(t)},calcCardinalityPosition:function(t,e,n){var r;c.info("our points",e),e[0]!==n&&(e=e.reverse()),e.forEach((function(t){N(t,r),r=t}));var i,a=25;r=void 0,e.forEach((function(t){if(r&&!i){var e=N(t,r);if(e<a)a-=e;else{var n=a/e;n<=0&&(i=r),n>=1&&(i={x:t.x,y:t.y}),n>0&&n<1&&(i={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));var o=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),u={x:0,y:0};return u.x=Math.sin(s)*o+(e[0].x+i.x)/2,u.y=-Math.cos(s)*o+(e[0].y+i.y)/2,u},calcTerminalLabelPosition:function(t,e,n){var r,i=JSON.parse(JSON.stringify(n));c.info("our points",i),"start_left"!==e&&"start_right"!==e&&(i=i.reverse()),i.forEach((function(t){N(t,r),r=t}));var a,o=25;r=void 0,i.forEach((function(t){if(r&&!a){var e=N(t,r);if(e<o)o-=e;else{var n=o/e;n<=0&&(a=r),n>=1&&(a={x:t.x,y:t.y}),n>0&&n<1&&(a={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));var s=10,u=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return l.x=Math.sin(u)*s+(i[0].x+a.x)/2,l.y=-Math.cos(u)*s+(i[0].y+a.y)/2,"start_left"===e&&(l.x=Math.sin(u+Math.PI)*s+(i[0].x+a.x)/2,l.y=-Math.cos(u+Math.PI)*s+(i[0].y+a.y)/2),"end_right"===e&&(l.x=Math.sin(u-Math.PI)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(u-Math.PI)*s+(i[0].y+a.y)/2-5),"end_left"===e&&(l.x=Math.sin(u)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(u)*s+(i[0].y+a.y)/2-5),l},formatUrl:function(t,e){var n=t.trim();if(n)return"loose"!==e.securityLevel?Object(y.sanitizeUrl)(n):n},getStylesFromArray:D,generateId:I,random:R,memoize:O,runFunc:function(t){for(var e,n=t.split("."),r=n.length-1,i=n[r],a=window,o=0;o<r;o++)if(!(a=a[n[o]]))return;for(var s=arguments.length,c=new Array(s>1?s-1:0),u=1;u<s;u++)c[u-1]=arguments[u];(e=a)[i].apply(e,c)},initIdGeneratior:function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.deterministic=e,this.seed=n,this.count=n?n.length:0}var e,n,r;return e=t,(n=[{key:"next",value:function(){return this.deterministic?this.count++:Date.now()}}])&&_(e.prototype,n),r&&_(e,r),t}()},V=n(1),H=function(t,e){return e?Object(V.adjust)(t,{s:-40,l:10}):Object(V.adjust)(t,{s:-40,l:-10})};function G(t){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function X(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Z=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.darkMode=!1,this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#ddd":"#333"),this.secondaryColor=this.secondaryColor||Object(V.adjust)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Object(V.adjust)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||H(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||H(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||H(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Object(V.invert)(this.tertiaryColor),this.lineColor=this.lineColor||Object(V.invert)(this.background),this.textColor=this.textColor||this.primaryTextColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Object(V.darken)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Object(V.darken)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Object(V.invert)(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Object(V.lighten)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Object(V.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Object(V.adjust)(this.primaryColor,{l:-10}),this.pie5=this.pie5||Object(V.adjust)(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Object(V.adjust)(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Object(V.adjust)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Object(V.adjust)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Object(V.adjust)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Object(V.adjust)(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Object(V.adjust)(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Object(V.adjust)(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Object(V.darken)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===G(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&X(e.prototype,n),r&&X(e,r),t}();function Q(t){return(Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function K(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var J=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Object(V.lighten)(this.primaryColor,16),this.tertiaryColor=Object(V.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=H(this.primaryColor,this.darkMode),this.secondaryBorderColor=H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=H(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(V.invert)(this.primaryColor),this.secondaryTextColor=Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=Object(V.invert)(this.tertiaryColor),this.lineColor=Object(V.invert)(this.background),this.textColor=Object(V.invert)(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Object(V.lighten)(Object(V.invert)("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=Object(V.rgba)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Object(V.darken)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=Object(V.rgba)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Object(V.rgba)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){this.secondBkg=Object(V.lighten)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=Object(V.lighten)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=Object(V.lighten)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(V.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||"#0b0000",this.pie2=this.pie2||"#4d1037",this.pie3=this.pie3||"#3f5258",this.pie4=this.pie4||"#4f2f1b",this.pie5=this.pie5||"#6e0a0a",this.pie6=this.pie6||"#3b0048",this.pie7=this.pie7||"#995a01",this.pie8=this.pie8||"#154706",this.pie9=this.pie9||"#161722",this.pie10=this.pie10||"#00296f",this.pie11=this.pie11||"#01629c",this.pie12=this.pie12||"#010029",this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Object(V.darken)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===Q(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&K(e.prototype,n),r&&K(e,r),t}();function tt(t){return(tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function et(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var nt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Object(V.adjust)(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Object(V.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=H(this.primaryColor,this.darkMode),this.secondaryBorderColor=H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=H(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(V.invert)(this.primaryColor),this.secondaryTextColor=Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=Object(V.invert)(this.tertiaryColor),this.lineColor=Object(V.invert)(this.background),this.textColor=Object(V.invert)(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=Object(V.rgba)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=Object(V.lighten)(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(V.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||Object(V.adjust)(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||Object(V.adjust)(this.primaryColor,{l:-10}),this.pie5=this.pie5||Object(V.adjust)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Object(V.adjust)(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||Object(V.adjust)(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||Object(V.adjust)(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||Object(V.adjust)(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||Object(V.adjust)(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||Object(V.adjust)(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||Object(V.adjust)(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===tt(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&et(e.prototype,n),r&&et(e,r),t}();function rt(t){return(rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function it(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var at=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=Object(V.lighten)("#cde498",10),this.primaryBorderColor=H(this.primaryColor,this.darkMode),this.secondaryBorderColor=H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=H(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(V.invert)(this.primaryColor),this.secondaryTextColor=Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=Object(V.invert)(this.primaryColor),this.lineColor=Object(V.invert)(this.background),this.textColor=Object(V.invert)(this.background),this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=Object(V.darken)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(V.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Object(V.adjust)(this.primaryColor,{l:-30}),this.pie5=this.pie5||Object(V.adjust)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Object(V.adjust)(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||Object(V.adjust)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Object(V.adjust)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Object(V.adjust)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Object(V.adjust)(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||Object(V.adjust)(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||Object(V.adjust)(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===rt(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&it(e.prototype,n),r&&it(e,r),t}();function ot(t){return(ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function st(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var ct=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Object(V.lighten)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Object(V.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=H(this.primaryColor,this.darkMode),this.secondaryBorderColor=H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=H(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(V.invert)(this.primaryColor),this.secondaryTextColor=Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=Object(V.invert)(this.tertiaryColor),this.lineColor=Object(V.invert)(this.background),this.textColor=Object(V.invert)(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){this.secondBkg=Object(V.lighten)(this.contrast,55),this.border2=this.contrast,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=Object(V.lighten)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.sectionBkgColor=Object(V.lighten)(this.contrast,30),this.sectionBkgColor2=Object(V.lighten)(this.contrast,30),this.taskBorderColor=Object(V.darken)(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=Object(V.lighten)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Object(V.darken)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(V.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||"#F4F4F4",this.pie2=this.pie2||"#555",this.pie3=this.pie3||"#BBB",this.pie4=this.pie4||"#777",this.pie5=this.pie5||"#999",this.pie6=this.pie6||"#DDD",this.pie7=this.pie7||"#FFF",this.pie8=this.pie8||"#DDD",this.pie9=this.pie9||"#BBB",this.pie10=this.pie10||"#999",this.pie11=this.pie11||"#777",this.pie12=this.pie12||"#555",this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===ot(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&st(e.prototype,n),r&&st(e,r),t}(),ut={base:{getThemeVariables:function(t){var e=new Z;return e.calculate(t),e}},dark:{getThemeVariables:function(t){var e=new J;return e.calculate(t),e}},default:{getThemeVariables:function(t){var e=new nt;return e.calculate(t),e}},forest:{getThemeVariables:function(t){var e=new at;return e.calculate(t),e}},neutral:{getThemeVariables:function(t){var e=new ct;return e.calculate(t),e}}},lt={theme:"default",themeVariables:ut.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-d3"},sequence:{activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open-Sans", "sans-serif"',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open-Sans", "sans-serif"',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{arrowMarkerAbsolute:!1,useMaxWidth:!0,defaultRenderer:"dagre-d3"},git:{arrowMarkerAbsolute:!1,useWidth:void 0,useMaxWidth:!0},state:{dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,useMaxWidth:!0,defaultRenderer:"dagre-d3"},er:{diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20}};lt.class.arrowMarkerAbsolute=lt.arrowMarkerAbsolute,lt.git.arrowMarkerAbsolute=lt.arrowMarkerAbsolute;var ht=lt;function ft(t){return(ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var dt,pt=Object.freeze(ht),yt=F({},pt),gt=[],vt=F({},pt),mt=function(t,e){for(var n=F({},t),r={},i=0;i<e.length;i++){var a=e[i];_t(a),r=F(r,a)}if(n=F(n,r),r.theme){var o=F({},dt),s=F(o.themeVariables||{},r.themeVariables);n.themeVariables=ut[n.theme].getThemeVariables(s)}return vt=n,n},bt=function(){return F({},yt)},xt=function(){return F({},vt)},_t=function t(e){Object.keys(yt.secure).forEach((function(t){void 0!==e[yt.secure[t]]&&(c.debug("Denied attempt to modify a secure key ".concat(yt.secure[t]),e[yt.secure[t]]),delete e[yt.secure[t]])})),Object.keys(e).forEach((function(t){0===t.indexOf("__")&&delete e[t]})),Object.keys(e).forEach((function(n){"string"==typeof e[n]&&(e[n].indexOf("<")>-1||e[n].indexOf(">")>-1||e[n].indexOf("url(data:")>-1)&&delete e[n],"object"===ft(e[n])&&t(e[n])}))},kt=function(t){t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),gt.push(t),mt(yt,gt)},wt=function(){mt(yt,gt=[])};function Et(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Tt=[],Ct={},St=0,At=[],Mt=function(t){var e="",n=t;if(t.indexOf("~")>0){var r=t.split("~");n=r[0],e=r[1]}return{className:n,type:e}},Ot=function(t){var e=Mt(t);void 0===Ct[e.className]&&(Ct[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:"classid-"+e.className+"-"+St},St++)},Bt=function(t){for(var e=Object.keys(Ct),n=0;n<e.length;n++)if(Ct[e[n]].id===t)return Ct[e[n]].domId},Nt=function(t,e){var n=Mt(t).className,r=Ct[n];if("string"==typeof e){var i=e.trim();i.startsWith("<<")&&i.endsWith(">>")?r.annotations.push(i.substring(2,i.length-2)):i.indexOf(")")>0?r.methods.push(i):i&&r.members.push(i)}},Dt=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n="classid-"+n),void 0!==Ct[n]&&Ct[n].cssClasses.push(e)}))},Lt=function(t,e,n){var r=xt(),i=t,a=Bt(i);if("loose"===r.securityLevel&&void 0!==e&&void 0!==Ct[i]){var o=[];if("string"==typeof n){o=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var s=0;s<o.length;s++){var c=o[s].trim();'"'===c.charAt(0)&&'"'===c.charAt(c.length-1)&&(c=c.substr(1,c.length-2)),o[s]=c}}0===o.length&&o.push(a),At.push((function(){var t=document.querySelector('[id="'.concat(a,'"]'));null!==t&&t.addEventListener("click",(function(){W.runFunc.apply(W,[e].concat(Et(o)))}),!1)}))}},It={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},Rt=function(t){var e=Object(h.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(h.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(h.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(h.select)(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(h.select)(this).classed("hover",!1)}))};At.push(Rt);var Ft={parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().class},addClass:Ot,bindFunctions:function(t){At.forEach((function(e){e(t)}))},clear:function(){Tt=[],Ct={},(At=[]).push(Rt)},getClass:function(t){return Ct[t]},getClasses:function(){return Ct},addAnnotation:function(t,e){var n=Mt(t).className;Ct[n].annotations.push(e)},getRelations:function(){return Tt},addRelation:function(t){c.debug("Adding relation: "+JSON.stringify(t)),Ot(t.id1),Ot(t.id2),t.id1=Mt(t.id1).className,t.id2=Mt(t.id2).className,Tt.push(t)},addMember:Nt,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((function(e){return Nt(t,e)})))},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(1).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:It,setClickEvent:function(t,e,n){t.split(",").forEach((function(t){Lt(t,e,n),Ct[t].haveCallback=!0})),Dt(t,"clickable")},setCssClass:Dt,setLink:function(t,e,n){var r=xt();t.split(",").forEach((function(t){var i=t;t[0].match(/\d/)&&(i="classid-"+i),void 0!==Ct[i]&&(Ct[i].link=W.formatUrl(e,r),Ct[i].linkTarget="string"==typeof n?n:"_blank")})),Dt(t,"clickable")},setTooltip:function(t,e){var n=xt();t.split(",").forEach((function(t){void 0!==e&&(Ct[t].tooltip=x.sanitizeText(e,n))}))},lookUpDomId:Bt},Pt=n(9),jt=n.n(Pt),Yt=n(3),zt=n.n(Yt),Ut=n(15),$t=n.n(Ut),qt=0,Wt=function(t){var e=t.match(/(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+)/),n=t.match(/^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/);return e&&!n?Vt(e):n?Ht(n):Gt(t)},Vt=function(t){var e="";try{e=(t[1]?t[1].trim():"")+(t[2]?t[2].trim():"")+(t[3]?Zt(t[3].trim()):"")+" "+(t[4]?t[4].trim():"")}catch(n){e=t}return{displayText:e,cssStyle:""}},Ht=function(t){var e="",n="";try{var r=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",a=t[3]?Zt(t[3].trim()):"",o=t[4]?t[4].trim():"";n=r+i+"("+a+")"+(t[5]?" : "+Zt(t[5]).trim():""),e=Qt(o)}catch(e){n=t}return{displayText:n,cssStyle:e}},Gt=function(t){var e="",n="",r="",i=t.indexOf("("),a=t.indexOf(")");if(i>1&&a>i&&a<=t.length){var o="",s="",c=t.substring(0,1);c.match(/\w/)?s=t.substring(0,i).trim():(c.match(/\+|-|~|#/)&&(o=c),s=t.substring(1,i).trim());var u=t.substring(i+1,a),l=t.substring(a+1,1);n=Qt(l),e=o+s+"("+Zt(u.trim())+")",a<"".length&&""!==(r=t.substring(a+2).trim())&&(r=" : "+Zt(r))}else e=Zt(t);return{displayText:e,cssStyle:n}},Xt=function(t,e,n,r){var i=Wt(e),a=t.append("tspan").attr("x",r.padding).text(i.displayText);""!==i.cssStyle&&a.attr("style",i.cssStyle),n||a.attr("dy",r.textHeight)},Zt=function t(e){var n=e;return-1!=e.indexOf("~")?t(n=(n=n.replace("~","<")).replace("~",">")):n},Qt=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},Kt=function(t,e,n){c.info("Rendering class "+e);var r,i=e.id,a={id:i,label:e.id,width:0,height:0},o=t.append("g").attr("id",Bt(i)).attr("class","classGroup");r=e.link?o.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",n.textHeight+n.padding).attr("x",0):o.append("text").attr("y",n.textHeight+n.padding).attr("x",0);var s=!0;e.annotations.forEach((function(t){var e=r.append("tspan").text("«"+t+"»");s||e.attr("dy",n.textHeight),s=!1}));var u=e.id;void 0!==e.type&&""!==e.type&&(u+="<"+e.type+">");var l=r.append("tspan").text(u).attr("class","title");s||l.attr("dy",n.textHeight);var h=r.node().getBBox().height,f=o.append("line").attr("x1",0).attr("y1",n.padding+h+n.dividerMargin/2).attr("y2",n.padding+h+n.dividerMargin/2),d=o.append("text").attr("x",n.padding).attr("y",h+n.dividerMargin+n.textHeight).attr("fill","white").attr("class","classText");s=!0,e.members.forEach((function(t){Xt(d,t,s,n),s=!1}));var p=d.node().getBBox(),y=o.append("line").attr("x1",0).attr("y1",n.padding+h+n.dividerMargin+p.height).attr("y2",n.padding+h+n.dividerMargin+p.height),g=o.append("text").attr("x",n.padding).attr("y",h+2*n.dividerMargin+p.height+n.textHeight).attr("fill","white").attr("class","classText");s=!0,e.methods.forEach((function(t){Xt(g,t,s,n),s=!1}));var v=o.node().getBBox(),m=" ";e.cssClasses.length>0&&(m+=e.cssClasses.join(" "));var b=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",v.width+2*n.padding).attr("height",v.height+n.padding+.5*n.dividerMargin).attr("class",m).node().getBBox().width;return r.node().childNodes.forEach((function(t){t.setAttribute("x",(b-t.getBBox().width)/2)})),e.tooltip&&r.insert("title").text(e.tooltip),f.attr("x2",b),y.attr("x2",b),a.width=b,a.height=v.height+n.padding+.5*n.dividerMargin,a},Jt=function(t,e,n,r){var i=function(t){switch(t){case It.AGGREGATION:return"aggregation";case It.EXTENSION:return"extension";case It.COMPOSITION:return"composition";case It.DEPENDENCY:return"dependency"}};e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var a,o,s=e.points,u=Object(h.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(h.curveBasis),l=t.append("path").attr("d",u(s)).attr("id","edge"+qt).attr("class","relation"),f="";r.arrowMarkerAbsolute&&(f=(f=(f=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),1==n.relation.lineType&&l.attr("class","relation dashed-line"),"none"!==n.relation.type1&&l.attr("marker-start","url("+f+"#"+i(n.relation.type1)+"Start)"),"none"!==n.relation.type2&&l.attr("marker-end","url("+f+"#"+i(n.relation.type2)+"End)");var d,p,y,g,v=e.points.length,m=W.calcLabelPosition(e.points);if(a=m.x,o=m.y,v%2!=0&&v>1){var b=W.calcCardinalityPosition("none"!==n.relation.type1,e.points,e.points[0]),x=W.calcCardinalityPosition("none"!==n.relation.type2,e.points,e.points[v-1]);c.debug("cardinality_1_point "+JSON.stringify(b)),c.debug("cardinality_2_point "+JSON.stringify(x)),d=b.x,p=b.y,y=x.x,g=x.y}if(void 0!==n.title){var _=t.append("g").attr("class","classLabel"),k=_.append("text").attr("class","label").attr("x",a).attr("y",o).attr("fill","red").attr("text-anchor","middle").text(n.title);window.label=k;var w=k.node().getBBox();_.insert("rect",":first-child").attr("class","box").attr("x",w.x-r.padding/2).attr("y",w.y-r.padding/2).attr("width",w.width+r.padding).attr("height",w.height+r.padding)}(c.info("Rendering relation "+JSON.stringify(n)),void 0!==n.relationTitle1&&"none"!==n.relationTitle1)&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",d).attr("y",p).attr("fill","black").attr("font-size","6").text(n.relationTitle1);void 0!==n.relationTitle2&&"none"!==n.relationTitle2&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",y).attr("y",g).attr("fill","black").attr("font-size","6").text(n.relationTitle2);qt++};Ut.parser.yy=Ft;var te={},ee={dividerMargin:10,padding:5,textHeight:10},ne=function(t){for(var e=Object.keys(te),n=0;n<e.length;n++)if(te[e[n]].label===t)return e[n]},re=function(t){Object.keys(t).forEach((function(e){ee[e]=t[e]}))},ie=function(t,e){te={},Ut.parser.yy.clear(),Ut.parser.parse(t),c.info("Rendering diagram "+t);var n,r=Object(h.select)("[id='".concat(e,"']"));r.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),(n=r).append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),n.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),n.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");var i=new zt.a.Graph({multigraph:!0});i.setGraph({isMultiGraph:!0}),i.setDefaultEdgeLabel((function(){return{}}));for(var a=Ft.getClasses(),o=Object.keys(a),s=0;s<o.length;s++){var u=a[o[s]],l=Kt(r,u,ee);te[l.id]=l,i.setNode(l.id,l),c.info("Org height: "+l.height)}Ft.getRelations().forEach((function(t){c.info("tjoho"+ne(t.id1)+ne(t.id2)+JSON.stringify(t)),i.setEdge(ne(t.id1),ne(t.id2),{relation:t},t.title||"DEFAULT")})),jt.a.layout(i),i.nodes().forEach((function(t){void 0!==t&&void 0!==i.node(t)&&(c.debug("Node "+t+": "+JSON.stringify(i.node(t))),Object(h.select)("#"+Bt(t)).attr("transform","translate("+(i.node(t).x-i.node(t).width/2)+","+(i.node(t).y-i.node(t).height/2)+" )"))})),i.edges().forEach((function(t){void 0!==t&&void 0!==i.edge(t)&&(c.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(i.edge(t))),Jt(r,i.edge(t),i.edge(t).relation,ee))}));var f=r.node().getBBox(),d=f.width+40,p=f.height+40;q(r,p,d,ee.useMaxWidth);var y="".concat(f.x-20," ").concat(f.y-20," ").concat(d," ").concat(p);c.debug("viewBox ".concat(y)),r.attr("viewBox",y)},ae={extension:function(t,e,n){c.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:function(t,e){t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:function(t,e){t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:function(t,e){t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},point:function(t,e){t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:function(t,e){t.append("marker").attr("id",e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:function(t,e){t.append("marker").attr("id",e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:function(t,e){t.append("defs").append("marker").attr("id",e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}},oe=function(t,e,n,r){e.forEach((function(e){ae[e](t,n,r)}))};function se(t){return(se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ce=function(t,e,n,r){var i=t||"";if("object"===se(i)&&(i=i[0]),xt().flowchart.htmlLabels)return i=i.replace(/\\n|\n/g,"<br />"),c.info("vertexText"+i),function(t){var e,n,r=Object(h.select)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),i=r.append("xhtml:div"),a=t.label,o=t.isNode?"nodeLabel":"edgeLabel";return i.html('<span class="'+o+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+a+"</span>"),e=i,(n=t.labelStyle)&&e.attr("style",n),i.style("display","inline-block"),i.style("white-space","nowrap"),i.attr("xmlns","http://www.w3.org/1999/xhtml"),r.node()}({isNode:r,label:i.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")})),labelStyle:e.replace("fill:","color:")});var a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));var o=[];o="string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[];for(var s=0;s<o.length;s++){var u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),n?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=o[s].trim(),a.appendChild(u)}return a},ue=function(t,e,n,r){var i;i=n||"node default";var a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=a.insert("g").attr("class","label").attr("style",e.labelStyle),s=o.node().appendChild(ce(e.labelText,e.labelStyle,!1,r)),c=s.getBBox();if(xt().flowchart.htmlLabels){var u=s.children[0],l=Object(h.select)(s);c=u.getBoundingClientRect(),l.attr("width",c.width),l.attr("height",c.height)}var f=e.padding/2;return o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),{shapeSvg:a,bbox:c,halfPadding:f,label:o}},le=function(t,e){var n=e.node().getBBox();t.width=n.width,t.height=n.height};function he(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}var fe={},de={},pe={},ye=function(t,e){return c.trace("In isDecendant",e," ",t," = ",de[e].indexOf(t)>=0),de[e].indexOf(t)>=0},ge=function t(e,n,r,i){c.warn("Copying children of ",e,"root",i,"data",n.node(e),i);var a=n.children(e)||[];e!==i&&a.push(e),c.warn("Copying (nodes) clusterId",e,"nodes",a),a.forEach((function(a){if(n.children(a).length>0)t(a,n,r,i);else{var o=n.node(a);c.info("cp ",a," to ",i," with parent ",e),r.setNode(a,o),i!==n.parent(a)&&(c.warn("Setting parent",a,n.parent(a)),r.setParent(a,n.parent(a))),e!==i&&a!==e?(c.debug("Setting parent",a,e),r.setParent(a,e)):(c.info("In copy ",e,"root",i,"data",n.node(e),i),c.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));var s=n.edges(a);c.debug("Copying Edges",s),s.forEach((function(t){c.info("Edge",t);var a=n.edge(t.v,t.w,t.name);c.info("Edge data",a,i);try{!function(t,e){return c.info("Decendants of ",e," is ",de[e]),c.info("Edge is ",t),t.v!==e&&(t.w!==e&&(de[e]?(c.info("Here "),de[e].indexOf(t.v)>=0||(!!ye(t.v,e)||(!!ye(t.w,e)||de[e].indexOf(t.w)>=0))):(c.debug("Tilt, ",e,",not in decendants"),!1)))}(t,i)?c.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",i," clusterId:",e):(c.info("Copying as ",t.v,t.w,a,t.name),r.setEdge(t.v,t.w,a,t.name),c.info("newGraph edges ",r.edges(),r.edge(r.edges()[0])))}catch(t){c.error(t)}}))}c.debug("Removing node",a),n.removeNode(a)}))},ve=function t(e,n){c.trace("Searching",e);var r=n.children(e);if(c.trace("Searching children of id ",e,r),r.length<1)return c.trace("This is a valid node",e),e;for(var i=0;i<r.length;i++){var a=t(r[i],n);if(a)return c.trace("Found replacement for",e," => ",a),a}},me=function(t){return fe[t]&&fe[t].externalConnections&&fe[t]?fe[t].id:t},be=function(t,e){!t||e>10?c.debug("Opting out, no graph "):(c.debug("Opting in, graph "),t.nodes().forEach((function(e){t.children(e).length>0&&(c.warn("Cluster identified",e," Replacement id in edges: ",ve(e,t)),de[e]=function t(e,n){for(var r=n.children(e),i=[].concat(r),a=0;a<r.length;a++)pe[r[a]]=e,i=i.concat(t(r[a],n));return i}(e,t),fe[e]={id:ve(e,t),clusterData:t.node(e)})})),t.nodes().forEach((function(e){var n=t.children(e),r=t.edges();n.length>0?(c.debug("Cluster identified",e,de),r.forEach((function(t){t.v!==e&&t.w!==e&&(ye(t.v,e)^ye(t.w,e)&&(c.warn("Edge: ",t," leaves cluster ",e),c.warn("Decendants of XXX ",e,": ",de[e]),fe[e].externalConnections=!0))}))):c.debug("Not a cluster ",e,de)})),t.edges().forEach((function(e){var n=t.edge(e);c.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),c.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));var r=e.v,i=e.w;c.warn("Fix XXX",fe,"ids:",e.v,e.w,"Translateing: ",fe[e.v]," --- ",fe[e.w]),(fe[e.v]||fe[e.w])&&(c.warn("Fixing and trixing - removing XXX",e.v,e.w,e.name),r=me(e.v),i=me(e.w),t.removeEdge(e.v,e.w,e.name),r!==e.v&&(n.fromCluster=e.v),i!==e.w&&(n.toCluster=e.w),c.warn("Fix Replacing with XXX",r,i,e.name),t.setEdge(r,i,n,e.name))})),c.warn("Adjusted Graph",zt.a.json.write(t)),xe(t,0),c.trace(fe))},xe=function t(e,n){if(c.warn("extractor - ",n,zt.a.json.write(e),e.children("D")),n>10)c.error("Bailing out");else{for(var r=e.nodes(),i=!1,a=0;a<r.length;a++){var o=r[a],s=e.children(o);i=i||s.length>0}if(i){c.debug("Nodes = ",r,n);for(var u=0;u<r.length;u++){var l=r[u];if(c.debug("Extracting node",l,fe,fe[l]&&!fe[l].externalConnections,!e.parent(l),e.node(l),e.children("D")," Depth ",n),fe[l])if(!fe[l].externalConnections&&e.children(l)&&e.children(l).length>0){c.warn("Cluster without external connections, without a parent and with children",l,n);var h="TB"===e.graph().rankdir?"LR":"TB";fe[l]&&fe[l].clusterData&&fe[l].clusterData.dir&&(h=fe[l].clusterData.dir,c.warn("Fixing dir",fe[l].clusterData.dir,h));var f=new zt.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:h,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));c.warn("Old graph before copy",zt.a.json.write(e)),ge(l,e,f,l),e.setNode(l,{clusterNode:!0,id:l,clusterData:fe[l].clusterData,labelText:fe[l].labelText,graph:f}),c.warn("New graph after copy node: (",l,")",zt.a.json.write(f)),c.debug("Old graph after copy",zt.a.json.write(e))}else c.warn("Cluster ** ",l," **not meeting the criteria !externalConnections:",!fe[l].externalConnections," no parent: ",!e.parent(l)," children ",e.children(l)&&e.children(l).length>0,e.children("D"),n),c.debug(fe);else c.debug("Not a cluster",l,n)}r=e.nodes(),c.warn("New list of nodes",r);for(var d=0;d<r.length;d++){var p=r[d],y=e.node(p);c.warn(" Now next level",p,y),y.clusterNode&&t(y.graph,n+1)}}else c.debug("Done, no node has children",e.nodes())}},_e=function(t){return function t(e,n){if(0===n.length)return[];var r=Object.assign(n);return n.forEach((function(n){var i=e.children(n),a=t(e,i);r=r.concat(a)})),r}(t,t.children())},ke=n(171);var we=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),u=Math.abs(e*n*o/c);r.x<i&&(u=-u);var l=Math.abs(e*n*s/c);return r.y<a&&(l=-l),{x:i+u,y:a+l}};var Ee=function(t,e,n){return we(t,e,e,n)};function Te(t,e){return t*e>0}var Ce=function(t,e,n,r){var i,a,o,s,c,u,l,h,f,d,p,y,g;if(i=e.y-t.y,o=t.x-e.x,c=e.x*t.y-t.x*e.y,f=i*n.x+o*n.y+c,d=i*r.x+o*r.y+c,!(0!==f&&0!==d&&Te(f,d)||(a=r.y-n.y,s=n.x-r.x,u=r.x*n.y-n.x*r.y,l=a*t.x+s*t.y+u,h=a*e.x+s*e.y+u,0!==l&&0!==h&&Te(l,h)||0==(p=i*s-a*o))))return y=Math.abs(p/2),{x:(g=o*u-s*c)<0?(g-y)/p:(g+y)/p,y:(g=a*c-i*u)<0?(g-y)/p:(g+y)/p}},Se=function(t,e,n){var r=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)})):(o=Math.min(o,e.x),s=Math.min(s,e.y));for(var c=r-t.width/2-o,u=i-t.height/2-s,l=0;l<e.length;l++){var h=e[l],f=e[l<e.length-1?l+1:0],d=Ce(t,n,{x:c+h.x,y:u+h.y},{x:c+f.x,y:u+f.y});d&&a.push(d)}if(!a.length)return t;a.length>1&&a.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}));return a[0]};var Ae=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;return Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=0===s?0:u*o/s,r=u):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o),{x:i+n,y:a+r}},Me={node:n.n(ke).a,circle:Ee,ellipse:we,polygon:Se,rect:Ae};function Oe(t){return(Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Be=function(t,e,n){var r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,a=10;"LR"===n&&(i=10,a=70);var o=r.append("rect").style("stroke","black").style("fill","black").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return le(e,o),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Me.rect(e,t)},r},Ne={question:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding+(i.height+e.padding),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];c.info("Question main (Circle)");var s=he(r,a,a,o);return s.attr("style",e.style),le(e,s),e.intersect=function(t){return c.warn("Intersect called"),Me.polygon(e,o,t)},r},rect:function(t,e){var n=ue(t,e,"node "+e.classes,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;c.trace("Classes = ",e.classes);var o=r.insert("rect",":first-child");return o.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),le(e,o),e.intersect=function(t){return Me.rect(e,t)},r},rectWithTitle:function(t,e){var n;n=e.classes?"node "+e.classes:"node default";var r=t.insert("g").attr("class",n).attr("id",e.domId||e.id),i=r.insert("rect",":first-child"),a=r.insert("line"),o=r.insert("g").attr("class","label"),s=e.labelText.flat?e.labelText.flat():e.labelText,u="";u="object"===Oe(s)?s[0]:s,c.info("Label text abc79",u,s,"object"===Oe(s));var l,f=o.node().appendChild(ce(u,e.labelStyle,!0,!0));if(xt().flowchart.htmlLabels){var d=f.children[0],p=Object(h.select)(f);l=d.getBoundingClientRect(),p.attr("width",l.width),p.attr("height",l.height)}c.info("Text 2",s);var y=s.slice(1,s.length),g=f.getBBox(),v=o.node().appendChild(ce(y.join?y.join("<br/>"):y,e.labelStyle,!0,!0));if(xt().flowchart.htmlLabels){var m=v.children[0],b=Object(h.select)(v);l=m.getBoundingClientRect(),b.attr("width",l.width),b.attr("height",l.height)}var x=e.padding/2;return Object(h.select)(v).attr("transform","translate( "+(l.width>g.width?0:(g.width-l.width)/2)+", "+(g.height+x+5)+")"),Object(h.select)(f).attr("transform","translate( "+(l.width<g.width?0:-(g.width-l.width)/2)+", 0)"),l=o.node().getBBox(),o.attr("transform","translate("+-l.width/2+", "+(-l.height/2-x+3)+")"),i.attr("class","outer title-state").attr("x",-l.width/2-x).attr("y",-l.height/2-x).attr("width",l.width+e.padding).attr("height",l.height+e.padding),a.attr("class","divider").attr("x1",-l.width/2-x).attr("x2",l.width/2+x).attr("y1",-l.height/2-x+g.height+x).attr("y2",-l.height/2-x+g.height+x),le(e,i),e.intersect=function(t){return Me.rect(e,t)},r},choice:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}],i=n.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" "));return i.attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return Me.circle(e,14,t)},n},circle:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding,o=r.insert("circle",":first-child");return o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),c.info("Circle main"),le(e,o),e.intersect=function(t){return c.info("Circle intersect",e,i.width/2+a,t),Me.circle(e,i.width/2+a,t)},r},stadium:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.height+e.padding,o=i.width+a/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",a/2).attr("ry",a/2).attr("x",-o/2).attr("y",-a/2).attr("width",o).attr("height",a);return le(e,s),e.intersect=function(t){return Me.rect(e,t)},r},hexagon:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.height+e.padding,o=a/4,s=i.width+2*o+e.padding,c=[{x:o,y:0},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}],u=he(r,s,a,c);return u.attr("style",e.style),le(e,u),e.intersect=function(t){return Me.polygon(e,c,t)},r},rect_left_inv_arrow:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-o/2,y:0},{x:a,y:0},{x:a,y:-o},{x:-o/2,y:-o},{x:0,y:-o/2}];return he(r,a,o,s).attr("style",e.style),e.width=a+o,e.height=o,e.intersect=function(t){return Me.polygon(e,s,t)},r},lean_right:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-2*o/6,y:0},{x:a-o/6,y:0},{x:a+2*o/6,y:-o},{x:o/6,y:-o}],c=he(r,a,o,s);return c.attr("style",e.style),le(e,c),e.intersect=function(t){return Me.polygon(e,s,t)},r},lean_left:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:2*o/6,y:0},{x:a+o/6,y:0},{x:a-2*o/6,y:-o},{x:-o/6,y:-o}],c=he(r,a,o,s);return c.attr("style",e.style),le(e,c),e.intersect=function(t){return Me.polygon(e,s,t)},r},trapezoid:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-2*o/6,y:0},{x:a+2*o/6,y:0},{x:a-o/6,y:-o},{x:o/6,y:-o}],c=he(r,a,o,s);return c.attr("style",e.style),le(e,c),e.intersect=function(t){return Me.polygon(e,s,t)},r},inv_trapezoid:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:o/6,y:0},{x:a-o/6,y:0},{x:a+2*o/6,y:-o},{x:-2*o/6,y:-o}],c=he(r,a,o,s);return c.attr("style",e.style),le(e,c),e.intersect=function(t){return Me.polygon(e,s,t)},r},rect_right_inv_arrow:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:0,y:0},{x:a+o/2,y:0},{x:a,y:-o/2},{x:a+o/2,y:-o},{x:0,y:-o}],c=he(r,a,o,s);return c.attr("style",e.style),le(e,c),e.intersect=function(t){return Me.polygon(e,s,t)},r},cylinder:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=a/2,s=o/(2.5+a/50),c=i.height+s+e.padding,u="M 0,"+s+" a "+o+","+s+" 0,0,0 "+a+" 0 a "+o+","+s+" 0,0,0 "+-a+" 0 l 0,"+c+" a "+o+","+s+" 0,0,0 "+a+" 0 l 0,"+-c,l=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",u).attr("transform","translate("+-a/2+","+-(c/2+s)+")");return le(e,l),e.intersect=function(t){var n=Me.rect(e,t),r=n.x-e.x;if(0!=o&&(Math.abs(r)<e.width/2||Math.abs(r)==e.width/2&&Math.abs(n.y-e.y)>e.height/2-s)){var i=s*s*(1-r*r/(o*o));0!=i&&(i=Math.sqrt(i)),i=s-i,t.y-e.y>0&&(i=-i),n.y+=i}return n},r},start:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),le(e,r),e.intersect=function(t){return Me.circle(e,7,t)},n},end:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child"),i=n.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),le(e,i),e.intersect=function(t){return Me.circle(e,7,t)},n},note:function(t,e){var n=ue(t,e,"node "+e.classes,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;c.info("Classes = ",e.classes);var o=r.insert("rect",":first-child");return o.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),le(e,o),e.intersect=function(t){return Me.rect(e,t)},r},subroutine:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:0,y:0},{x:a,y:0},{x:a,y:-o},{x:0,y:-o},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-o},{x:-8,y:-o},{x:-8,y:0}],c=he(r,a,o,s);return c.attr("style",e.style),le(e,c),e.intersect=function(t){return Me.polygon(e,s,t)},r},fork:Be,join:Be,class_box:function(t,e){var n,r=e.padding/2;n=e.classes?"node "+e.classes:"node default";var i=t.insert("g").attr("class",n).attr("id",e.domId||e.id),a=i.insert("rect",":first-child"),o=i.insert("line"),s=i.insert("line"),c=0,u=4,l=i.insert("g").attr("class","label"),f=0,d=e.classData.annotations&&e.classData.annotations[0],p=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",y=l.node().appendChild(ce(p,e.labelStyle,!0,!0)),g=y.getBBox();if(xt().flowchart.htmlLabels){var v=y.children[0],m=Object(h.select)(y);g=v.getBoundingClientRect(),m.attr("width",g.width),m.attr("height",g.height)}e.classData.annotations[0]&&(u+=g.height+4,c+=g.width);var b=e.classData.id;void 0!==e.classData.type&&""!==e.classData.type&&(b+="<"+e.classData.type+">");var x=l.node().appendChild(ce(b,e.labelStyle,!0,!0));Object(h.select)(x).attr("class","classTitle");var _=x.getBBox();if(xt().flowchart.htmlLabels){var k=x.children[0],w=Object(h.select)(x);_=k.getBoundingClientRect(),w.attr("width",_.width),w.attr("height",_.height)}u+=_.height+4,_.width>c&&(c=_.width);var E=[];e.classData.members.forEach((function(t){var n=Wt(t).displayText,r=l.node().appendChild(ce(n,e.labelStyle,!0,!0)),i=r.getBBox();if(xt().flowchart.htmlLabels){var a=r.children[0],o=Object(h.select)(r);i=a.getBoundingClientRect(),o.attr("width",i.width),o.attr("height",i.height)}i.width>c&&(c=i.width),u+=i.height+4,E.push(r)})),u+=8;var T=[];if(e.classData.methods.forEach((function(t){var n=Wt(t).displayText,r=l.node().appendChild(ce(n,e.labelStyle,!0,!0)),i=r.getBBox();if(xt().flowchart.htmlLabels){var a=r.children[0],o=Object(h.select)(r);i=a.getBoundingClientRect(),o.attr("width",i.width),o.attr("height",i.height)}i.width>c&&(c=i.width),u+=i.height+4,T.push(r)})),u+=8,d){var C=(c-g.width)/2;Object(h.select)(y).attr("transform","translate( "+(-1*c/2+C)+", "+-1*u/2+")"),f=g.height+4}var S=(c-_.width)/2;return Object(h.select)(x).attr("transform","translate( "+(-1*c/2+S)+", "+(-1*u/2+f)+")"),f+=_.height+4,o.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-u/2-r+8+f).attr("y2",-u/2-r+8+f),f+=8,E.forEach((function(t){Object(h.select)(t).attr("transform","translate( "+-c/2+", "+(-1*u/2+f+4)+")"),f+=_.height+4})),f+=8,s.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-u/2-r+8+f).attr("y2",-u/2-r+8+f),f+=8,T.forEach((function(t){Object(h.select)(t).attr("transform","translate( "+-c/2+", "+(-1*u/2+f)+")"),f+=_.height+4})),a.attr("class","outer title-state").attr("x",-c/2-r).attr("y",-u/2-r).attr("width",c+e.padding).attr("height",u+e.padding),le(e,a),e.intersect=function(t){return Me.rect(e,t)},i}},De={},Le=function(t){var e=De[t.id];c.trace("Transforming node",t,"translate("+(t.x-t.width/2-5)+", "+(t.y-t.height/2-5)+")");t.clusterNode?e.attr("transform","translate("+(t.x-t.width/2-8)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")")},Ie={rect:function(t,e){c.trace("Creating subgraph rect for ",e.id,e);var n=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),a=i.node().appendChild(ce(e.labelText,e.labelStyle,void 0,!0)),o=a.getBBox();if(xt().flowchart.htmlLabels){var s=a.children[0],u=Object(h.select)(a);o=s.getBoundingClientRect(),u.attr("width",o.width),u.attr("height",o.height)}var l=0*e.padding,f=l/2;c.trace("Data ",e,JSON.stringify(e)),r.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-f).attr("y",e.y-e.height/2-f).attr("width",e.width+l).attr("height",e.height+l),i.attr("transform","translate("+(e.x-o.width/2)+", "+(e.y-e.height/2+e.padding/3)+")");var d=r.node().getBBox();return e.width=d.width,e.height=d.height,e.intersect=function(t){return Ae(e,t)},n},roundedWithTitle:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),a=n.append("rect"),o=i.node().appendChild(ce(e.labelText,e.labelStyle,void 0,!0)),s=o.getBBox();if(xt().flowchart.htmlLabels){var c=o.children[0],u=Object(h.select)(o);s=c.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}s=o.getBBox();var l=0*e.padding,f=l/2,d=e.width>s.width?e.width:s.width+e.padding;r.attr("class","outer").attr("x",e.x-d/2-f).attr("y",e.y-e.height/2-f).attr("width",d+l).attr("height",e.height+l),a.attr("class","inner").attr("x",e.x-d/2-f).attr("y",e.y-e.height/2-f+s.height-1).attr("width",d+l).attr("height",e.height+l-s.height-3),i.attr("transform","translate("+(e.x-s.width/2)+", "+(e.y-e.height/2-e.padding/3+(xt().flowchart.htmlLabels?5:3))+")");var p=r.node().getBBox();return e.width=p.width,e.height=p.height,e.intersect=function(t){return Ae(e,t)},n},noteGroup:function(t,e){var n=t.insert("g").attr("class","note-cluster").attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return Ae(e,t)},n},divider:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("class","divider").attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2).attr("width",e.width+i).attr("height",e.height+i);var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return Ae(e,t)},n}},Re={},Fe={},Pe={},je=function(t,e){c.warn("abc88 cutPathAtIntersect",t,e);var n=[],r=t[0],i=!1;return t.forEach((function(t){if(c.info("abc88 checking point",t,e),function(t,e){var n=t.x,r=t.y,i=Math.abs(e.x-n),a=Math.abs(e.y-r),o=t.width/2,s=t.height/2;return i>=o||a>=s}(e,t)||i)c.warn("abc88 outside",t,r),r=t,i||n.push(t);else{var a=function(t,e,n){c.warn("intersection calc abc89:\n outsidePoint: ".concat(JSON.stringify(e),"\n insidePoint : ").concat(JSON.stringify(n),"\n node : x:").concat(t.x," y:").concat(t.y," w:").concat(t.width," h:").concat(t.height));var r=t.x,i=t.y,a=Math.abs(r-n.x),o=t.width/2,s=n.x<e.x?o-a:o+a,u=t.height/2,l=Math.abs(e.y-n.y),h=Math.abs(e.x-n.x);if(Math.abs(i-e.y)*o>Math.abs(r-e.x)*u){var f=n.y<e.y?e.y-u-i:i-u-e.y;s=h*f/l;var d={x:n.x<e.x?n.x+s:n.x-h+s,y:n.y<e.y?n.y+l-f:n.y-l+f};return 0===s&&(d.x=e.x,d.y=e.y),0===h&&(d.x=e.x),0===l&&(d.y=e.y),c.warn("abc89 topp/bott calc, Q ".concat(l,", q ").concat(f,", R ").concat(h,", r ").concat(s),d),d}var p=l*(s=n.x<e.x?e.x-o-r:r-o-e.x)/h,y=n.x<e.x?n.x+h-s:n.x-h+s,g=n.y<e.y?n.y+p:n.y-p;return c.warn("sides calc abc89, Q ".concat(l,", q ").concat(p,", R ").concat(h,", r ").concat(s),{_x:y,_y:g}),0===s&&(y=e.x,g=e.y),0===h&&(y=e.x),0===l&&(g=e.y),{x:y,y:g}}(e,r,t);c.warn("abc88 inside",t,r,a),c.warn("abc88 intersection",a);var o=!1;n.forEach((function(t){o=o||t.x===a.x&&t.y===a.y})),n.find((function(t){return t.x===a.x&&t.y===a.y}))?c.warn("abc88 no intersect",a,n):n.push(a),i=!0}})),c.warn("abc88 returning points",n),n},Ye=function t(e,n,r,i){c.info("Graph in recursive render: XXX",zt.a.json.write(n),i);var a=n.graph().rankdir;c.trace("Dir in recursive render - dir:",a);var o=e.insert("g").attr("class","root");n.nodes()?c.info("Recursive render XXX",n.nodes()):c.info("No nodes found for",n),n.edges().length>0&&c.trace("Recursive edges",n.edge(n.edges()[0]));var s=o.insert("g").attr("class","clusters"),u=o.insert("g").attr("class","edgePaths"),l=o.insert("g").attr("class","edgeLabels"),f=o.insert("g").attr("class","nodes");return n.nodes().forEach((function(e){var o=n.node(e);if(void 0!==i){var s=JSON.parse(JSON.stringify(i.clusterData));c.info("Setting data for cluster XXX (",e,") ",s,i),n.setNode(i.id,s),n.parent(e)||(c.trace("Setting parent",e,i.id),n.setParent(e,i.id,s))}if(c.info("(Insert) Node XXX"+e+": "+JSON.stringify(n.node(e))),o&&o.clusterNode){c.info("Cluster identified",e,o,n.node(e));var u=t(f,o.graph,r,n.node(e));le(o,u),function(t,e){De[e.id]=t}(u,o),c.warn("Recursive render complete",u,o)}else n.children(e).length>0?(c.info("Cluster - the non recursive path XXX",e,o.id,o,n),c.info(ve(o.id,n)),fe[o.id]={id:ve(o.id,n),node:o}):(c.info("Node - the non recursive path",e,o.id,o),function(t,e,n){var r,i;e.link?(r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget||"_blank"),i=Ne[e.shape](r,e,n)):r=i=Ne[e.shape](t,e,n),e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),De[e.id]=r,e.haveCallback&&De[e.id].attr("class",De[e.id].attr("class")+" clickable")}(f,n.node(e),a))})),n.edges().forEach((function(t){var e=n.edge(t.v,t.w,t.name);c.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),c.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(n.edge(t))),c.info("Fix",fe,"ids:",t.v,t.w,"Translateing: ",fe[t.v],fe[t.w]),function(t,e){var n=ce(e.label,e.labelStyle),r=t.insert("g").attr("class","edgeLabel"),i=r.insert("g").attr("class","label");i.node().appendChild(n);var a=n.getBBox();if(xt().flowchart.htmlLabels){var o=n.children[0],s=Object(h.select)(n);a=o.getBoundingClientRect(),s.attr("width",a.width),s.attr("height",a.height)}if(i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),Fe[e.id]=r,e.width=a.width,e.height=a.height,e.startLabelLeft){var c=ce(e.startLabelLeft,e.labelStyle),u=t.insert("g").attr("class","edgeTerminals"),l=u.insert("g").attr("class","inner");l.node().appendChild(c);var f=c.getBBox();l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Pe[e.id]||(Pe[e.id]={}),Pe[e.id].startLeft=u}if(e.startLabelRight){var d=ce(e.startLabelRight,e.labelStyle),p=t.insert("g").attr("class","edgeTerminals"),y=p.insert("g").attr("class","inner");p.node().appendChild(d),y.node().appendChild(d);var g=d.getBBox();y.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),Pe[e.id]||(Pe[e.id]={}),Pe[e.id].startRight=p}if(e.endLabelLeft){var v=ce(e.endLabelLeft,e.labelStyle),m=t.insert("g").attr("class","edgeTerminals"),b=m.insert("g").attr("class","inner");b.node().appendChild(v);var x=v.getBBox();b.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"),m.node().appendChild(v),Pe[e.id]||(Pe[e.id]={}),Pe[e.id].endLeft=m}if(e.endLabelRight){var _=ce(e.endLabelRight,e.labelStyle),k=t.insert("g").attr("class","edgeTerminals"),w=k.insert("g").attr("class","inner");w.node().appendChild(_);var E=_.getBBox();w.attr("transform","translate("+-E.width/2+", "+-E.height/2+")"),k.node().appendChild(_),Pe[e.id]||(Pe[e.id]={}),Pe[e.id].endRight=k}}(l,e)})),n.edges().forEach((function(t){c.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))})),c.info("#############################################"),c.info("### Layout ###"),c.info("#############################################"),c.info(n),jt.a.layout(n),c.info("Graph after layout:",zt.a.json.write(n)),_e(n).forEach((function(t){var e=n.node(t);c.info("Position "+t+": "+JSON.stringify(n.node(t))),c.info("Position "+t+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e&&e.clusterNode?Le(e):n.children(t).length>0?(!function(t,e){c.trace("Inserting cluster");var n=e.shape||"rect";Re[e.id]=Ie[n](t,e)}(s,e),fe[e.id].node=e):Le(e)})),n.edges().forEach((function(t){var e=n.edge(t);c.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e),e),function(t,e){c.info("Moving label abc78 ",t.id,t.label,Fe[t.id]);var n=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){var r=Fe[t.id],i=t.x,a=t.y;if(n){var o=W.calcLabelPosition(n);c.info("Moving label from (",i,",",a,") to (",o.x,",",o.y,") abc78")}r.attr("transform","translate("+i+", "+a+")")}if(t.startLabelLeft){var s=Pe[t.id].startLeft,u=t.x,l=t.y;if(n){var h=W.calcTerminalLabelPosition(0,"start_left",n);u=h.x,l=h.y}s.attr("transform","translate("+u+", "+l+")")}if(t.startLabelRight){var f=Pe[t.id].startRight,d=t.x,p=t.y;if(n){var y=W.calcTerminalLabelPosition(0,"start_right",n);d=y.x,p=y.y}f.attr("transform","translate("+d+", "+p+")")}if(t.endLabelLeft){var g=Pe[t.id].endLeft,v=t.x,m=t.y;if(n){var b=W.calcTerminalLabelPosition(0,"end_left",n);v=b.x,m=b.y}g.attr("transform","translate("+v+", "+m+")")}if(t.endLabelRight){var x=Pe[t.id].endRight,_=t.x,k=t.y;if(n){var w=W.calcTerminalLabelPosition(0,"end_right",n);_=w.x,k=w.y}x.attr("transform","translate("+_+", "+k+")")}}(e,function(t,e,n,r,i,a){var o=n.points,s=!1,u=a.node(e.v),l=a.node(e.w);c.info("abc88 InsertEdge: ",n),l.intersect&&u.intersect&&((o=o.slice(1,n.points.length-1)).unshift(u.intersect(o[0])),c.info("Last point",o[o.length-1],l,l.intersect(o[o.length-1])),o.push(l.intersect(o[o.length-1]))),n.toCluster&&(c.info("to cluster abc88",r[n.toCluster]),o=je(n.points,r[n.toCluster].node),s=!0),n.fromCluster&&(c.info("from cluster abc88",r[n.fromCluster]),o=je(o.reverse(),r[n.fromCluster].node).reverse(),s=!0);var f,d=o.filter((function(t){return!Number.isNaN(t.y)}));f=("graph"===i||"flowchart"===i)&&n.curve||h.curveBasis;var p,y=Object(h.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(f);switch(n.thickness){case"normal":p="edge-thickness-normal";break;case"thick":p="edge-thickness-thick";break;default:p=""}switch(n.pattern){case"solid":p+=" edge-pattern-solid";break;case"dotted":p+=" edge-pattern-dotted";break;case"dashed":p+=" edge-pattern-dashed"}var g=t.append("path").attr("d",y(d)).attr("id",n.id).attr("class"," "+p+(n.classes?" "+n.classes:"")).attr("style",n.style),v="";switch(xt().state.arrowMarkerAbsolute&&(v=(v=(v=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),c.info("arrowTypeStart",n.arrowTypeStart),c.info("arrowTypeEnd",n.arrowTypeEnd),n.arrowTypeStart){case"arrow_cross":g.attr("marker-start","url("+v+"#"+i+"-crossStart)");break;case"arrow_point":g.attr("marker-start","url("+v+"#"+i+"-pointStart)");break;case"arrow_barb":g.attr("marker-start","url("+v+"#"+i+"-barbStart)");break;case"arrow_circle":g.attr("marker-start","url("+v+"#"+i+"-circleStart)");break;case"aggregation":g.attr("marker-start","url("+v+"#"+i+"-aggregationStart)");break;case"extension":g.attr("marker-start","url("+v+"#"+i+"-extensionStart)");break;case"composition":g.attr("marker-start","url("+v+"#"+i+"-compositionStart)");break;case"dependency":g.attr("marker-start","url("+v+"#"+i+"-dependencyStart)")}switch(n.arrowTypeEnd){case"arrow_cross":g.attr("marker-end","url("+v+"#"+i+"-crossEnd)");break;case"arrow_point":g.attr("marker-end","url("+v+"#"+i+"-pointEnd)");break;case"arrow_barb":g.attr("marker-end","url("+v+"#"+i+"-barbEnd)");break;case"arrow_circle":g.attr("marker-end","url("+v+"#"+i+"-circleEnd)");break;case"aggregation":g.attr("marker-end","url("+v+"#"+i+"-aggregationEnd)");break;case"extension":g.attr("marker-end","url("+v+"#"+i+"-extensionEnd)");break;case"composition":g.attr("marker-end","url("+v+"#"+i+"-compositionEnd)");break;case"dependency":g.attr("marker-end","url("+v+"#"+i+"-dependencyEnd)")}var m={};return s&&(m.updatedPath=o),m.originalPath=n.points,m}(u,t,e,fe,r,n))})),o},ze=function(t,e,n,r,i){oe(t,n,r,i),De={},Fe={},Pe={},Re={},de={},pe={},fe={},c.warn("Graph at first:",zt.a.json.write(e)),be(e),c.warn("Graph after:",zt.a.json.write(e)),Ye(t,e,r)};Ut.parser.yy=Ft;var Ue={dividerMargin:10,padding:5,textHeight:10},$e=function(t){Object.keys(t).forEach((function(e){Ue[e]=t[e]}))},qe=function(t,e){c.info("Drawing class"),Ft.clear(),Ut.parser.parse(t);var n=xt().flowchart;c.info("config:",n);var r=n.nodeSpacing||50,i=n.rankSpacing||50,a=new zt.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:"TD",nodesep:r,ranksep:i,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),o=Ft.getClasses(),s=Ft.getRelations();c.info(s),function(t,e){var n=Object.keys(t);c.info("keys:",n),c.info(t),n.forEach((function(n){var r=t[n],i="";r.cssClasses.length>0&&(i=i+" "+r.cssClasses.join(" "));var a={labelStyle:""},o=void 0!==r.text?r.text:r.id,s="";switch(r.type){case"class":s="class_box";break;default:s="class_box"}e.setNode(r.id,{labelStyle:a.labelStyle,shape:s,labelText:o,classData:r,rx:0,ry:0,class:i,style:a.style,id:r.id,domId:r.domId,haveCallback:r.haveCallback,link:r.link,width:"group"===r.type?500:void 0,type:r.type,padding:xt().flowchart.padding}),c.info("setNode",{labelStyle:a.labelStyle,shape:s,labelText:o,rx:0,ry:0,class:i,style:a.style,id:r.id,width:"group"===r.type?500:void 0,type:r.type,padding:xt().flowchart.padding})}))}(o,a),function(t,e){var n=0;t.forEach((function(r){n++;var i={classes:"relation"};i.pattern=1==r.relation.lineType?"dashed":"solid",i.id="id"+n,"arrow_open"===r.type?i.arrowhead="none":i.arrowhead="normal",c.info(i,r),i.startLabelRight="none"===r.relationTitle1?"":r.relationTitle1,i.endLabelLeft="none"===r.relationTitle2?"":r.relationTitle2,i.arrowTypeStart=We(r.relation.type1),i.arrowTypeEnd=We(r.relation.type2);var a="",o="";if(void 0!==r.style){var s=D(r.style);a=s.style,o=s.labelStyle}else a="fill:none";i.style=a,i.labelStyle=o,void 0!==r.interpolate?i.curve=B(r.interpolate,h.curveLinear):void 0!==t.defaultInterpolate?i.curve=B(t.defaultInterpolate,h.curveLinear):i.curve=B(Ue.curve,h.curveLinear),r.text=r.title,void 0===r.text?void 0!==r.style&&(i.arrowheadStyle="fill: #333"):(i.arrowheadStyle="fill: #333",i.labelpos="c",xt().flowchart.htmlLabels,i.labelType="text",i.label=r.text.replace(x.lineBreakRegex,"\n"),void 0===r.style&&(i.style=i.style||"stroke: #333; stroke-width: 1.5px;fill:none"),i.labelStyle=i.labelStyle.replace("color:","fill:")),e.setEdge(r.id1,r.id2,i,n)}))}(s,a);var u=Object(h.select)('[id="'.concat(e,'"]'));u.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var l=Object(h.select)("#"+e+" g");ze(l,a,["aggregation","extension","composition","dependency"],"classDiagram",e);var f=u.node().getBBox(),d=f.width+16,p=f.height+16;if(c.debug("new ViewBox 0 0 ".concat(d," ").concat(p),"translate(".concat(8-a._label.marginx,", ").concat(8-a._label.marginy,")")),q(u,p,d,n.useMaxWidth),u.attr("viewBox","0 0 ".concat(d," ").concat(p)),u.select("g").attr("transform","translate(".concat(8-a._label.marginx,", ").concat(8-f.y,")")),!n.htmlLabels)for(var y=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),g=0;g<y.length;g++){var v=y[g],m=v.getBBox(),b=document.createElementNS("http://www.w3.org/2000/svg","rect");b.setAttribute("rx",0),b.setAttribute("ry",0),b.setAttribute("width",m.width),b.setAttribute("height",m.height),b.setAttribute("style","fill:#e8e8e8;"),v.insertBefore(b,v.firstChild)}};function We(t){var e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;default:e="none"}return e}var Ve={},He=[],Ge="",Xe=function(t){return void 0===Ve[t]&&(Ve[t]={attributes:[]},c.info("Added new entity :",t)),Ve[t]},Ze={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().er},addEntity:Xe,addAttributes:function(t,e){var n,r=Xe(t);for(n=e.length-1;n>=0;n--)r.attributes.push(e[n]),c.debug("Added attribute ",e[n].attributeName)},getEntities:function(){return Ve},addRelationship:function(t,e,n,r){var i={entityA:t,roleA:e,entityB:n,relSpec:r};He.push(i),c.debug("Added new relationship :",i)},getRelationships:function(){return He},clear:function(){Ve={},He=[],Ge=""},setTitle:function(t){Ge=t},getTitle:function(){return Ge}},Qe=n(75),Ke=n.n(Qe),Je={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"},tn=Je,en=function(t,e){var n;t.append("defs").append("marker").attr("id",Je.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",Je.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",Je.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",Je.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",Je.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",Je.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),(n=t.append("defs").append("marker").attr("id",Je.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(n=t.append("defs").append("marker").attr("id",Je.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},nn={},rn=function(t,e,n){var r;return Object.keys(e).forEach((function(i){var a=t.append("g").attr("id",i);r=void 0===r?i:r;var o="entity-"+i,s=a.append("text").attr("class","er entityLabel").attr("id",o).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("style","font-family: "+xt().fontFamily+"; font-size: "+nn.fontSize+"px").text(i),c=function(t,e,n){var r=nn.entityPadding/3,i=nn.entityPadding/3,a=.85*nn.fontSize,o=e.node().getBBox(),s=[],c=0,u=0,l=o.height+2*r,h=1;n.forEach((function(n){var i="".concat(e.node().id,"-attr-").concat(h),o=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-type")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+xt().fontFamily+"; font-size: "+a+"px").text(n.attributeType),f=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-name")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+xt().fontFamily+"; font-size: "+a+"px").text(n.attributeName);s.push({tn:o,nn:f});var d=o.node().getBBox(),p=f.node().getBBox();c=Math.max(c,d.width),u=Math.max(u,p.width),l+=Math.max(d.height,p.height)+2*r,h+=1}));var f={width:Math.max(nn.minEntityWidth,Math.max(o.width+2*nn.entityPadding,c+u+4*i)),height:n.length>0?l:Math.max(nn.minEntityHeight,o.height+2*nn.entityPadding)},d=Math.max(0,f.width-(c+u)-4*i);if(n.length>0){e.attr("transform","translate("+f.width/2+","+(r+o.height/2)+")");var p=o.height+2*r,y="attributeBoxOdd";s.forEach((function(e){var n=p+r+Math.max(e.tn.node().getBBox().height,e.nn.node().getBBox().height)/2;e.tn.attr("transform","translate("+i+","+n+")");var a=t.insert("rect","#"+e.tn.node().id).attr("class","er ".concat(y)).attr("fill",nn.fill).attr("fill-opacity","100%").attr("stroke",nn.stroke).attr("x",0).attr("y",p).attr("width",c+2*i+d/2).attr("height",e.tn.node().getBBox().height+2*r);e.nn.attr("transform","translate("+(parseFloat(a.attr("width"))+i)+","+n+")"),t.insert("rect","#"+e.nn.node().id).attr("class","er ".concat(y)).attr("fill",nn.fill).attr("fill-opacity","100%").attr("stroke",nn.stroke).attr("x","".concat(a.attr("x")+a.attr("width"))).attr("y",p).attr("width",u+2*i+d/2).attr("height",e.nn.node().getBBox().height+2*r),p+=Math.max(e.tn.node().getBBox().height,e.nn.node().getBBox().height)+2*r,y="attributeBoxOdd"==y?"attributeBoxEven":"attributeBoxOdd"}))}else f.height=Math.max(nn.minEntityHeight,l),e.attr("transform","translate("+f.width/2+","+f.height/2+")");return f}(a,s,e[i].attributes),u=c.width,l=c.height,h=a.insert("rect","#"+o).attr("class","er entityBox").attr("fill",nn.fill).attr("fill-opacity","100%").attr("stroke",nn.stroke).attr("x",0).attr("y",0).attr("width",u).attr("height",l).node().getBBox();n.setNode(i,{width:h.width,height:h.height,shape:"rect",id:i})})),r},an=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},on=0,sn=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)nn[e[n]]=t[e[n]]},cn=function(t,e){c.info("Drawing ER diagram"),Ze.clear();var n=Ke.a.parser;n.yy=Ze;try{n.parse(t)}catch(t){c.debug("Parsing failed")}var r,i=Object(h.select)("[id='".concat(e,"']"));en(i,nn),r=new zt.a.Graph({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:nn.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));var a,o,s=rn(i,Ze.getEntities(),r),u=function(t,e){return t.forEach((function(t){e.setEdge(t.entityA,t.entityB,{relationship:t},an(t))})),t}(Ze.getRelationships(),r);jt.a.layout(r),a=i,(o=r).nodes().forEach((function(t){void 0!==t&&void 0!==o.node(t)&&a.select("#"+t).attr("transform","translate("+(o.node(t).x-o.node(t).width/2)+","+(o.node(t).y-o.node(t).height/2)+" )")})),u.forEach((function(t){!function(t,e,n,r){on++;var i=n.edge(e.entityA,e.entityB,an(e)),a=Object(h.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(h.curveBasis),o=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",a(i.points)).attr("stroke",nn.stroke).attr("fill","none");e.relSpec.relType===Ze.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");var s="";switch(nn.arrowMarkerAbsolute&&(s=(s=(s=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e.relSpec.cardA){case Ze.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+s+"#"+tn.ZERO_OR_ONE_END+")");break;case Ze.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+s+"#"+tn.ZERO_OR_MORE_END+")");break;case Ze.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+s+"#"+tn.ONE_OR_MORE_END+")");break;case Ze.Cardinality.ONLY_ONE:o.attr("marker-end","url("+s+"#"+tn.ONLY_ONE_END+")")}switch(e.relSpec.cardB){case Ze.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+s+"#"+tn.ZERO_OR_ONE_START+")");break;case Ze.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+s+"#"+tn.ZERO_OR_MORE_START+")");break;case Ze.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+s+"#"+tn.ONE_OR_MORE_START+")");break;case Ze.Cardinality.ONLY_ONE:o.attr("marker-start","url("+s+"#"+tn.ONLY_ONE_START+")")}var c=o.node().getTotalLength(),u=o.node().getPointAtLength(.5*c),l="rel"+on,f=t.append("text").attr("class","er relationshipLabel").attr("id",l).attr("x",u.x).attr("y",u.y).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("style","font-family: "+xt().fontFamily+"; font-size: "+nn.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+l).attr("class","er relationshipLabelBox").attr("x",u.x-f.width/2).attr("y",u.y-f.height/2).attr("width",f.width).attr("height",f.height).attr("fill","white").attr("fill-opacity","85%")}(i,t,r,s)}));var l=nn.diagramPadding,f=i.node().getBBox(),d=f.width+2*l,p=f.height+2*l;q(i,p,d,nn.useMaxWidth),i.attr("viewBox","".concat(f.x-l," ").concat(f.y-l," ").concat(d," ").concat(p))};function un(t){return(un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ln(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var hn,fn,dn=0,pn=xt(),yn={},gn=[],vn=[],mn=[],bn={},xn={},_n=0,kn=!0,wn=[],En=function(t){for(var e=Object.keys(yn),n=0;n<e.length;n++)if(yn[e[n]].id===t)return yn[e[n]].domId;return t},Tn=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:""};void 0!==(r=n.text)&&(i.text=x.sanitizeText(r.trim(),pn),'"'===i.text[0]&&'"'===i.text[i.text.length-1]&&(i.text=i.text.substring(1,i.text.length-1))),void 0!==n&&(i.type=n.type,i.stroke=n.stroke,i.length=n.length),gn.push(i)},Cn=function(t,e){t.split(",").forEach((function(t){var n=t;void 0!==yn[n]&&yn[n].classes.push(e),void 0!==bn[n]&&bn[n].classes.push(e)}))},Sn=function(t){var e=Object(h.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(h.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(h.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(h.select)(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(h.select)(this).classed("hover",!1)}))};wn.push(Sn);var An=function(t){for(var e=0;e<mn.length;e++)if(mn[e].id===t)return e;return-1},Mn=-1,On=[],Bn=function(t,e){var n=!1;return t.forEach((function(t){t.nodes.indexOf(e)>=0&&(n=!0)})),n},Nn=function(t,e){var n=[];return t.nodes.forEach((function(r,i){Bn(e,r)||n.push(t.nodes[i])})),{nodes:n}},Dn={parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},defaultConfig:function(){return pt.flowchart},addVertex:function(t,e,n,r,i){var a,o=t;void 0!==o&&0!==o.trim().length&&(void 0===yn[o]&&(yn[o]={id:o,domId:"flowchart-"+o+"-"+dn,styles:[],classes:[]}),dn++,void 0!==e?(pn=xt(),'"'===(a=x.sanitizeText(e.trim(),pn))[0]&&'"'===a[a.length-1]&&(a=a.substring(1,a.length-1)),yn[o].text=a):void 0===yn[o].text&&(yn[o].text=t),void 0!==n&&(yn[o].type=n),null!=r&&r.forEach((function(t){yn[o].styles.push(t)})),null!=i&&i.forEach((function(t){yn[o].classes.push(t)})))},lookUpDomId:En,addLink:function(t,e,n,r){var i,a;for(i=0;i<t.length;i++)for(a=0;a<e.length;a++)Tn(t[i],e[a],n,r)},updateLinkInterpolate:function(t,e){t.forEach((function(t){"default"===t?gn.defaultInterpolate=e:gn[t].interpolate=e}))},updateLink:function(t,e){t.forEach((function(t){"default"===t?gn.defaultStyle=e:(-1===W.isSubstringInArray("fill",e)&&e.push("fill:none"),gn[t].style=e)}))},addClass:function(t,e){void 0===vn[t]&&(vn[t]={id:t,styles:[],textStyles:[]}),null!=e&&e.forEach((function(e){if(e.match("color")){var n=e.replace("fill","bgFill").replace("color","fill");vn[t].textStyles.push(n)}vn[t].styles.push(e)}))},setDirection:function(t){(hn=t).match(/.*</)&&(hn="RL"),hn.match(/.*\^/)&&(hn="BT"),hn.match(/.*>/)&&(hn="LR"),hn.match(/.*v/)&&(hn="TB")},setClass:Cn,setTooltip:function(t,e){t.split(",").forEach((function(t){void 0!==e&&(xn["gen-1"===fn?En(t):t]=x.sanitizeText(e,pn))}))},getTooltip:function(t){return xn[t]},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){var r=En(t);if("loose"===xt().securityLevel&&void 0!==e){var i=[];if("string"==typeof n){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var a=0;a<i.length;a++){var o=i[a].trim();'"'===o.charAt(0)&&'"'===o.charAt(o.length-1)&&(o=o.substr(1,o.length-2)),i[a]=o}}0===i.length&&i.push(t),void 0!==yn[t]&&(yn[t].haveCallback=!0,wn.push((function(){var t=document.querySelector('[id="'.concat(r,'"]'));null!==t&&t.addEventListener("click",(function(){W.runFunc.apply(W,[e].concat(ln(i)))}),!1)})))}}(t,e,n)})),Cn(t,"clickable")},setLink:function(t,e,n){t.split(",").forEach((function(t){void 0!==yn[t]&&(yn[t].link=W.formatUrl(e,pn),yn[t].linkTarget=n)})),Cn(t,"clickable")},bindFunctions:function(t){wn.forEach((function(e){e(t)}))},getDirection:function(){return hn.trim()},getVertices:function(){return yn},getEdges:function(){return gn},getClasses:function(){return vn},clear:function(t){yn={},vn={},gn=[],(wn=[]).push(Sn),mn=[],bn={},_n=0,xn=[],kn=!0,fn=t||"gen-1"},setGen:function(t){fn=t||"gen-1"},defaultStyle:function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},addSubGraph:function(t,e,n){var r=t.trim(),i=n;t===n&&n.match(/\s/)&&(r=void 0);var a,o,s,u=[];if(a=u.concat.apply(u,e),o={boolean:{},number:{},string:{}},s=[],u=a.filter((function(t){var e=un(t);return""!==t.trim()&&(e in o?!o[e].hasOwnProperty(t)&&(o[e][t]=!0):!(s.indexOf(t)>=0)&&s.push(t))})),"gen-1"===fn){c.warn("LOOKING UP");for(var l=0;l<u.length;l++)u[l]=En(u[l])}r=r||"subGraph"+_n,i=i||"",i=x.sanitizeText(i,pn),_n+=1;var h={id:r,nodes:u,title:i.trim(),classes:[]};return c.info("Adding",h.id,h.nodes),h.nodes=Nn(h,mn).nodes,mn.push(h),bn[r]=h,r},getDepthFirstPos:function(t){return On[t]},indexNodes:function(){Mn=-1,mn.length>0&&function t(e,n){var r=mn[n].nodes;if(!((Mn+=1)>2e3)){if(On[Mn]=n,mn[n].id===e)return{result:!0,count:0};for(var i=0,a=1;i<r.length;){var o=An(r[i]);if(o>=0){var s=t(e,o);if(s.result)return{result:!0,count:a+s.count};a+=s.count}i+=1}return{result:!1,count:a}}}("none",mn.length-1)},getSubGraphs:function(){return mn},destructLink:function(t,e){var n,r=function(t){var e=t.trim(),n=e.slice(0,-1),r="arrow_open";switch(e.slice(-1)){case"x":r="arrow_cross","x"===e[0]&&(r="double_"+r,n=n.slice(1));break;case">":r="arrow_point","<"===e[0]&&(r="double_"+r,n=n.slice(1));break;case"o":r="arrow_circle","o"===e[0]&&(r="double_"+r,n=n.slice(1))}var i="normal",a=n.length-1;"="===n[0]&&(i="thick");var o=function(t,e){for(var n=e.length,r=0,i=0;i<n;++i)e[i]===t&&++r;return r}(".",n);return o&&(i="dotted",a=o),{type:r,stroke:i,length:a}}(t);if(e){if((n=function(t){var e=t.trim(),n="arrow_open";switch(e[0]){case"<":n="arrow_point",e=e.slice(1);break;case"x":n="arrow_cross",e=e.slice(1);break;case"o":n="arrow_circle",e=e.slice(1)}var r="normal";return-1!==e.indexOf("=")&&(r="thick"),-1!==e.indexOf(".")&&(r="dotted"),{type:n,stroke:r}}(e)).stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===n.type)n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return"double_arrow"===n.type&&(n.type="double_arrow_point"),n.length=r.length,n}return r},lex:{firstGraph:function(){return!!kn&&(kn=!1,!0)}},exists:Bn,makeUniq:Nn},Ln=n(27),In=n.n(Ln),Rn=n(7),Fn=n.n(Rn),Pn=n(51),jn=n.n(Pn);function Yn(t,e,n){var r=.9*(e.width+e.height),i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],a=Qn(t,r,r,i);return n.intersect=function(t){return Fn.a.intersect.polygon(n,i,t)},a}function zn(t,e,n){var r=e.height,i=r/4,a=e.width+2*i,o=[{x:i,y:0},{x:a-i,y:0},{x:a,y:-r/2},{x:a-i,y:-r},{x:i,y:-r},{x:0,y:-r/2}],s=Qn(t,a,r,o);return n.intersect=function(t){return Fn.a.intersect.polygon(n,o,t)},s}function Un(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function $n(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:i/6,y:-i}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function qn(t,e,n){var r=e.width,i=e.height,a=[{x:2*i/6,y:0},{x:r+i/6,y:0},{x:r-2*i/6,y:-i},{x:-i/6,y:-i}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function Wn(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r+2*i/6,y:0},{x:r-i/6,y:-i},{x:i/6,y:-i}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function Vn(t,e,n){var r=e.width,i=e.height,a=[{x:i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:-2*i/6,y:-i}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function Hn(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function Gn(t,e,n){var r=e.height,i=e.width+r/4,a=t.insert("rect",":first-child").attr("rx",r/2).attr("ry",r/2).attr("x",-i/2).attr("y",-r/2).attr("width",i).attr("height",r);return n.intersect=function(t){return Fn.a.intersect.rect(n,t)},a}function Xn(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r,y:0},{x:r,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:r+8,y:0},{x:r+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function Zn(t,e,n){var r=e.width,i=r/2,a=i/(2.5+r/50),o=e.height+a,s="M 0,"+a+" a "+i+","+a+" 0,0,0 "+r+" 0 a "+i+","+a+" 0,0,0 "+-r+" 0 l 0,"+o+" a "+i+","+a+" 0,0,0 "+r+" 0 l 0,"+-o,c=t.attr("label-offset-y",a).insert("path",":first-child").attr("d",s).attr("transform","translate("+-r/2+","+-(o/2+a)+")");return n.intersect=function(t){var e=Fn.a.intersect.rect(n,t),r=e.x-n.x;if(0!=i&&(Math.abs(r)<n.width/2||Math.abs(r)==n.width/2&&Math.abs(e.y-n.y)>n.height/2-a)){var o=a*a*(1-r*r/(i*i));0!=o&&(o=Math.sqrt(o)),o=a-o,t.y-n.y>0&&(o=-o),e.y+=o}return e},c}function Qn(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("transform","translate("+-e/2+","+n/2+")")}var Kn={addToRender:function(t){t.shapes().question=Yn,t.shapes().hexagon=zn,t.shapes().stadium=Gn,t.shapes().subroutine=Xn,t.shapes().cylinder=Zn,t.shapes().rect_left_inv_arrow=Un,t.shapes().lean_right=$n,t.shapes().lean_left=qn,t.shapes().trapezoid=Wn,t.shapes().inv_trapezoid=Vn,t.shapes().rect_right_inv_arrow=Hn},addToRenderV2:function(t){t({question:Yn}),t({hexagon:zn}),t({stadium:Gn}),t({subroutine:Xn}),t({cylinder:Zn}),t({rect_left_inv_arrow:Un}),t({lean_right:$n}),t({lean_left:qn}),t({trapezoid:Wn}),t({inv_trapezoid:Vn}),t({rect_right_inv_arrow:Hn})}},Jn={},tr=function(t,e,n){var r=Object(h.select)('[id="'.concat(n,'"]'));Object.keys(t).forEach((function(n){var i=t[n],a="default";i.classes.length>0&&(a=i.classes.join(" "));var o,s=D(i.styles),u=void 0!==i.text?i.text:i.id;if(xt().flowchart.htmlLabels){var l={label:u.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(o=jn()(r,l).node()).parentNode.removeChild(o)}else{var h=document.createElementNS("http://www.w3.org/2000/svg","text");h.setAttribute("style",s.labelStyle.replace("color:","fill:"));for(var f=u.split(x.lineBreakRegex),d=0;d<f.length;d++){var p=document.createElementNS("http://www.w3.org/2000/svg","tspan");p.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),p.setAttribute("dy","1em"),p.setAttribute("x","1"),p.textContent=f[d],h.appendChild(p)}o=h}var y=0,g="";switch(i.type){case"round":y=5,g="rect";break;case"square":g="rect";break;case"diamond":g="question";break;case"hexagon":g="hexagon";break;case"odd":g="rect_left_inv_arrow";break;case"lean_right":g="lean_right";break;case"lean_left":g="lean_left";break;case"trapezoid":g="trapezoid";break;case"inv_trapezoid":g="inv_trapezoid";break;case"odd_right":g="rect_left_inv_arrow";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"stadium":g="stadium";break;case"subroutine":g="subroutine";break;case"cylinder":g="cylinder";break;case"group":g="rect";break;default:g="rect"}c.warn("Adding node",i.id,i.domId),e.setNode(Dn.lookUpDomId(i.id),{labelType:"svg",labelStyle:s.labelStyle,shape:g,label:o,rx:y,ry:y,class:a,style:s.style,id:Dn.lookUpDomId(i.id)})}))},er=function(t,e){var n,r,i=0;if(void 0!==t.defaultStyle){var a=D(t.defaultStyle);n=a.style,r=a.labelStyle}t.forEach((function(a){i++;var o="L-"+a.start+"-"+a.end,s="LS-"+a.start,c="LE-"+a.end,u={};"arrow_open"===a.type?u.arrowhead="none":u.arrowhead="normal";var l="",f="";if(void 0!==a.style){var d=D(a.style);l=d.style,f=d.labelStyle}else switch(a.stroke){case"normal":l="fill:none",void 0!==n&&(l=n),void 0!==r&&(f=r);break;case"dotted":l="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":l=" stroke-width: 3.5px;fill:none"}u.style=l,u.labelStyle=f,void 0!==a.interpolate?u.curve=B(a.interpolate,h.curveLinear):void 0!==t.defaultInterpolate?u.curve=B(t.defaultInterpolate,h.curveLinear):u.curve=B(Jn.curve,h.curveLinear),void 0===a.text?void 0!==a.style&&(u.arrowheadStyle="fill: #333"):(u.arrowheadStyle="fill: #333",u.labelpos="c",xt().flowchart.htmlLabels?(u.labelType="html",u.label='<span id="L-'.concat(o,'" class="edgeLabel L-').concat(s,"' L-").concat(c,'">').concat(a.text.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")})),"</span>")):(u.labelType="text",u.label=a.text.replace(x.lineBreakRegex,"\n"),void 0===a.style&&(u.style=u.style||"stroke: #333; stroke-width: 1.5px;fill:none"),u.labelStyle=u.labelStyle.replace("color:","fill:"))),u.id=o,u.class=s+" "+c,u.minlen=a.length||1,e.setEdge(Dn.lookUpDomId(a.start),Dn.lookUpDomId(a.end),u,i)}))},nr=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)Jn[e[n]]=t[e[n]]},rr=function(t){c.info("Extracting classes"),Dn.clear();try{var e=In.a.parser;return e.yy=Dn,e.parse(t),Dn.getClasses()}catch(t){return}},ir=function(t,e){c.info("Drawing flowchart"),Dn.clear(),Dn.setGen("gen-1");var n=In.a.parser;n.yy=Dn,n.parse(t);var r=Dn.getDirection();void 0===r&&(r="TD");for(var i,a=xt().flowchart,o=a.nodeSpacing||50,s=a.rankSpacing||50,u=new zt.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:o,ranksep:s,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),l=Dn.getSubGraphs(),f=l.length-1;f>=0;f--)i=l[f],Dn.addVertex(i.id,i.title,"group",void 0,i.classes);var d=Dn.getVertices();c.warn("Get vertices",d);var p=Dn.getEdges(),y=0;for(y=l.length-1;y>=0;y--){i=l[y],Object(h.selectAll)("cluster").append("text");for(var g=0;g<i.nodes.length;g++)c.warn("Setting subgraph",i.nodes[g],Dn.lookUpDomId(i.nodes[g]),Dn.lookUpDomId(i.id)),u.setParent(Dn.lookUpDomId(i.nodes[g]),Dn.lookUpDomId(i.id))}tr(d,u,e),er(p,u);var v=new(0,Fn.a.render);Kn.addToRender(v),v.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");Fn.a.util.applyStyle(i,n[r+"Style"])},v.arrows().normal=function(t,e){t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};var m=Object(h.select)('[id="'.concat(e,'"]'));m.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),c.warn(u);var b=Object(h.select)("#"+e+" g");v(b,u),b.selectAll("g.node").attr("title",(function(){return Dn.getTooltip(this.id)}));var x=a.diagramPadding,_=m.node().getBBox(),k=_.width+2*x,w=_.height+2*x;q(m,w,k,a.useMaxWidth);var E="".concat(_.x-x," ").concat(_.y-x," ").concat(k," ").concat(w);for(c.debug("viewBox ".concat(E)),m.attr("viewBox",E),Dn.indexNodes("subGraph"+y),y=0;y<l.length;y++)if("undefined"!==(i=l[y]).title){var T=document.querySelectorAll("#"+e+' [id="'+Dn.lookUpDomId(i.id)+'"] rect'),C=document.querySelectorAll("#"+e+' [id="'+Dn.lookUpDomId(i.id)+'"]'),S=T[0].x.baseVal.value,A=T[0].y.baseVal.value,M=T[0].width.baseVal.value,O=Object(h.select)(C[0]).select(".label");O.attr("transform","translate(".concat(S+M/2,", ").concat(A+14,")")),O.attr("id",e+"Text");for(var B=0;B<i.classes.length;B++)C[0].classList.add(i.classes[B])}a.htmlLabels;for(var N=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),D=0;D<N.length;D++){var L=N[D],I=L.getBBox(),R=document.createElementNS("http://www.w3.org/2000/svg","rect");R.setAttribute("rx",0),R.setAttribute("ry",0),R.setAttribute("width",I.width),R.setAttribute("height",I.height),L.insertBefore(R,L.firstChild)}Object.keys(d).forEach((function(t){var n=d[t];if(n.link){var r=Object(h.select)("#"+e+' [id="'+Dn.lookUpDomId(t)+'"]');if(r){var i=document.createElementNS("http://www.w3.org/2000/svg","a");i.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),i.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),i.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),n.linkTarget&&i.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);var a=r.insert((function(){return i}),":first-child"),o=r.select(".label-container");o&&a.append((function(){return o.node()}));var s=r.select(".label");s&&a.append((function(){return s.node()}))}}}))},ar={},or=function(t,e,n){var r=Object(h.select)('[id="'.concat(n,'"]'));Object.keys(t).forEach((function(n){var i=t[n],a="default";i.classes.length>0&&(a=i.classes.join(" "));var o,s=D(i.styles),u=void 0!==i.text?i.text:i.id;if(xt().flowchart.htmlLabels){var l={label:u.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(o=jn()(r,l).node()).parentNode.removeChild(o)}else{var h=document.createElementNS("http://www.w3.org/2000/svg","text");h.setAttribute("style",s.labelStyle.replace("color:","fill:"));for(var f=u.split(x.lineBreakRegex),d=0;d<f.length;d++){var p=document.createElementNS("http://www.w3.org/2000/svg","tspan");p.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),p.setAttribute("dy","1em"),p.setAttribute("x","1"),p.textContent=f[d],h.appendChild(p)}o=h}var y=0,g="";switch(i.type){case"round":y=5,g="rect";break;case"square":g="rect";break;case"diamond":g="question";break;case"hexagon":g="hexagon";break;case"odd":g="rect_left_inv_arrow";break;case"lean_right":g="lean_right";break;case"lean_left":g="lean_left";break;case"trapezoid":g="trapezoid";break;case"inv_trapezoid":g="inv_trapezoid";break;case"odd_right":g="rect_left_inv_arrow";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"stadium":g="stadium";break;case"subroutine":g="subroutine";break;case"cylinder":g="cylinder";break;case"group":g="rect";break;default:g="rect"}e.setNode(i.id,{labelStyle:s.labelStyle,shape:g,labelText:u,rx:y,ry:y,class:a,style:s.style,id:i.id,link:i.link,linkTarget:i.linkTarget,tooltip:Dn.getTooltip(i.id)||"",domId:Dn.lookUpDomId(i.id),haveCallback:i.haveCallback,width:"group"===i.type?500:void 0,type:i.type,padding:xt().flowchart.padding}),c.info("setNode",{labelStyle:s.labelStyle,shape:g,labelText:u,rx:y,ry:y,class:a,style:s.style,id:i.id,domId:Dn.lookUpDomId(i.id),width:"group"===i.type?500:void 0,type:i.type,padding:xt().flowchart.padding})}))},sr=function(t,e){c.info("abc78 edges = ",t);var n,r,i=0,a={};if(void 0!==t.defaultStyle){var o=D(t.defaultStyle);n=o.style,r=o.labelStyle}t.forEach((function(o){i++;var s="L-"+o.start+"-"+o.end;void 0===a[s]?(a[s]=0,c.info("abc78 new entry",s,a[s])):(a[s]++,c.info("abc78 new entry",s,a[s]));var u=s+"-"+a[s];c.info("abc78 new link id to be used is",s,u,a[s]);var l="LS-"+o.start,f="LE-"+o.end,d={style:"",labelStyle:""};switch(d.minlen=o.length||1,"arrow_open"===o.type?d.arrowhead="none":d.arrowhead="normal",d.arrowTypeStart="arrow_open",d.arrowTypeEnd="arrow_open",o.type){case"double_arrow_cross":d.arrowTypeStart="arrow_cross";case"arrow_cross":d.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":d.arrowTypeStart="arrow_point";case"arrow_point":d.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":d.arrowTypeStart="arrow_circle";case"arrow_circle":d.arrowTypeEnd="arrow_circle"}var p="",y="";switch(o.stroke){case"normal":p="fill:none;",void 0!==n&&(p=n),void 0!==r&&(y=r),d.thickness="normal",d.pattern="solid";break;case"dotted":d.thickness="normal",d.pattern="dotted",d.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":d.thickness="thick",d.pattern="solid",d.style="stroke-width: 3.5px;fill:none;"}if(void 0!==o.style){var g=D(o.style);p=g.style,y=g.labelStyle}d.style=d.style+=p,d.labelStyle=d.labelStyle+=y,void 0!==o.interpolate?d.curve=B(o.interpolate,h.curveLinear):void 0!==t.defaultInterpolate?d.curve=B(t.defaultInterpolate,h.curveLinear):d.curve=B(ar.curve,h.curveLinear),void 0===o.text?void 0!==o.style&&(d.arrowheadStyle="fill: #333"):(d.arrowheadStyle="fill: #333",d.labelpos="c"),d.labelType="text",d.label=o.text.replace(x.lineBreakRegex,"\n"),void 0===o.style&&(d.style=d.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),d.labelStyle=d.labelStyle.replace("color:","fill:"),d.id=u,d.classes="flowchart-link "+l+" "+f,e.setEdge(o.start,o.end,d,i)}))},cr=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)ar[e[n]]=t[e[n]]},ur=function(t,e){c.info("Drawing flowchart"),Dn.clear(),Dn.setGen("gen-2");var n=In.a.parser;n.yy=Dn,n.parse(t);var r=Dn.getDirection();void 0===r&&(r="TD");var i,a=xt().flowchart,o=a.nodeSpacing||50,s=a.rankSpacing||50,u=new zt.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:o,ranksep:s,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),l=Dn.getSubGraphs();c.info("Subgraphs - ",l);for(var f=l.length-1;f>=0;f--)i=l[f],c.info("Subgraph - ",i),Dn.addVertex(i.id,i.title,"group",void 0,i.classes);var d=Dn.getVertices(),p=Dn.getEdges();c.info(p);var y=0;for(y=l.length-1;y>=0;y--){i=l[y],Object(h.selectAll)("cluster").append("text");for(var g=0;g<i.nodes.length;g++)c.info("Setting up subgraphs",i.nodes[g],i.id),u.setParent(i.nodes[g],i.id)}or(d,u,e),sr(p,u);var v=Object(h.select)('[id="'.concat(e,'"]'));v.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var m=Object(h.select)("#"+e+" g");ze(m,u,["point","circle","cross"],"flowchart",e);var b=a.diagramPadding,x=v.node().getBBox(),_=x.width+2*b,k=x.height+2*b;if(c.debug("new ViewBox 0 0 ".concat(_," ").concat(k),"translate(".concat(b-u._label.marginx,", ").concat(b-u._label.marginy,")")),q(v,k,_,a.useMaxWidth),v.attr("viewBox","0 0 ".concat(_," ").concat(k)),v.select("g").attr("transform","translate(".concat(b-u._label.marginx,", ").concat(b-x.y,")")),Dn.indexNodes("subGraph"+y),!a.htmlLabels)for(var w=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),E=0;E<w.length;E++){var T=w[E],C=T.getBBox(),S=document.createElementNS("http://www.w3.org/2000/svg","rect");S.setAttribute("rx",0),S.setAttribute("ry",0),S.setAttribute("width",C.width),S.setAttribute("height",C.height),T.insertBefore(S,T.firstChild)}Object.keys(d).forEach((function(t){var n=d[t];if(n.link){var r=Object(h.select)("#"+e+' [id="'+t+'"]');if(r){var i=document.createElementNS("http://www.w3.org/2000/svg","a");i.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),i.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),i.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),n.linkTarget&&i.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);var a=r.insert((function(){return i}),":first-child"),o=r.select(".label-container");o&&a.append((function(){return o.node()}));var s=r.select(".label");s&&a.append((function(){return s.node()}))}}}))};function lr(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var hr,fr,dr="",pr="",yr="",gr=[],vr="",mr=[],br=[],xr="",_r=["active","done","crit","milestone"],kr=[],wr=!1,Er=!1,Tr=0,Cr=function(t,e,n){return t.isoWeekday()>=6&&n.indexOf("weekends")>=0||(n.indexOf(t.format("dddd").toLowerCase())>=0||n.indexOf(t.format(e.trim()))>=0)},Sr=function(t,e,n){if(n.length&&!t.manualEndTime){var r=o()(t.startTime,e,!0);r.add(1,"d");var i=o()(t.endTime,e,!0),a=Ar(r,i,e,n);t.endTime=i.toDate(),t.renderEndTime=a}},Ar=function(t,e,n,r){for(var i=!1,a=null;t<=e;)i||(a=e.toDate()),(i=Cr(t,n,r))&&e.add(1,"d"),t.add(1,"d");return a},Mr=function(t,e,n){n=n.trim();var r=/^after\s+([\d\w- ]+)/.exec(n.trim());if(null!==r){var i=null;if(r[1].split(" ").forEach((function(t){var e=Rr(t);void 0!==e&&(i?e.endTime>i.endTime&&(i=e):i=e)})),i)return i.endTime;var a=new Date;return a.setHours(0,0,0,0),a}var s=o()(n,e.trim(),!0);return s.isValid()?s.toDate():(c.debug("Invalid date:"+n),c.debug("With date format:"+e.trim()),new Date)},Or=function(t,e){if(null!==t)switch(t[2]){case"s":e.add(t[1],"seconds");break;case"m":e.add(t[1],"minutes");break;case"h":e.add(t[1],"hours");break;case"d":e.add(t[1],"days");break;case"w":e.add(t[1],"weeks")}return e.toDate()},Br=function(t,e,n,r){r=r||!1,n=n.trim();var i=o()(n,e.trim(),!0);return i.isValid()?(r&&i.add(1,"d"),i.toDate()):Or(/^([\d]+)([wdhms])/.exec(n.trim()),o()(t))},Nr=0,Dr=function(t){return void 0===t?"task"+(Nr+=1):t},Lr=[],Ir={},Rr=function(t){var e=Ir[t];return Lr[e]},Fr=function(){for(var t=function(t){var e=Lr[t],n="";switch(Lr[t].raw.startTime.type){case"prevTaskEnd":var r=Rr(e.prevTaskId);e.startTime=r.endTime;break;case"getStartDate":(n=Mr(0,dr,Lr[t].raw.startTime.startData))&&(Lr[t].startTime=n)}return Lr[t].startTime&&(Lr[t].endTime=Br(Lr[t].startTime,dr,Lr[t].raw.endTime.data,wr),Lr[t].endTime&&(Lr[t].processed=!0,Lr[t].manualEndTime=o()(Lr[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Sr(Lr[t],dr,gr))),Lr[t].processed},e=!0,n=0;n<Lr.length;n++)t(n),e=e&&Lr[n].processed;return e},Pr=function(t,e){t.split(",").forEach((function(t){var n=Rr(t);void 0!==n&&n.classes.push(e)}))},jr=function(t,e){kr.push((function(){var n=document.querySelector('[id="'.concat(t,'"]'));null!==n&&n.addEventListener("click",(function(){e()}))})),kr.push((function(){var n=document.querySelector('[id="'.concat(t,'-text"]'));null!==n&&n.addEventListener("click",(function(){e()}))}))},Yr={parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().gantt},clear:function(){mr=[],br=[],xr="",kr=[],vr="",Nr=0,hr=void 0,fr=void 0,Lr=[],dr="",pr="",yr="",gr=[],wr=!1,Er=!1,Tr=0},setDateFormat:function(t){dr=t},getDateFormat:function(){return dr},enableInclusiveEndDates:function(){wr=!0},endDatesAreInclusive:function(){return wr},enableTopAxis:function(){Er=!0},topAxisEnabled:function(){return Er},setAxisFormat:function(t){pr=t},getAxisFormat:function(){return pr},setTodayMarker:function(t){yr=t},getTodayMarker:function(){return yr},setTitle:function(t){vr=t},getTitle:function(){return vr},addSection:function(t){xr=t,mr.push(t)},getSections:function(){return mr},getTasks:function(){for(var t=Fr(),e=0;!t&&e<10;)t=Fr(),e++;return br=Lr},addTask:function(t,e){var n={section:xr,type:xr,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};zr(n,r,_r);for(var i=0;i<n.length;i++)n[i]=n[i].trim();switch(n.length){case 1:r.id=Dr(),r.startTime={type:"prevTaskEnd",id:t},r.endTime={data:n[0]};break;case 2:r.id=Dr(),r.startTime={type:"getStartDate",startData:n[0]},r.endTime={data:n[1]};break;case 3:r.id=Dr(n[0]),r.startTime={type:"getStartDate",startData:n[1]},r.endTime={data:n[2]}}return r}(fr,e);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=fr,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.order=Tr,Tr++;var i=Lr.push(n);fr=n.id,Ir[n.id]=i-1},findTaskById:Rr,addTaskOrg:function(t,e){var n={section:xr,type:xr,description:t,task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};zr(n,r,_r);for(var i=0;i<n.length;i++)n[i]=n[i].trim();var a="";switch(n.length){case 1:r.id=Dr(),r.startTime=t.endTime,a=n[0];break;case 2:r.id=Dr(),r.startTime=Mr(0,dr,n[0]),a=n[1];break;case 3:r.id=Dr(n[0]),r.startTime=Mr(0,dr,n[1]),a=n[2]}return a&&(r.endTime=Br(r.startTime,dr,a,wr),r.manualEndTime=o()(a,"YYYY-MM-DD",!0).isValid(),Sr(r,dr,gr)),r}(hr,e);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,hr=n,br.push(n)},setExcludes:function(t){gr=t.toLowerCase().split(/[\s,]+/)},getExcludes:function(){return gr},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){if("loose"===xt().securityLevel&&void 0!==e){var r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var i=0;i<r.length;i++){var a=r[i].trim();'"'===a.charAt(0)&&'"'===a.charAt(a.length-1)&&(a=a.substr(1,a.length-2)),r[i]=a}}0===r.length&&r.push(t),void 0!==Rr(t)&&jr(t,(function(){W.runFunc.apply(W,[e].concat(lr(r)))}))}}(t,e,n)})),Pr(t,"clickable")},setLink:function(t,e){var n=e;"loose"!==xt().securityLevel&&(n=Object(y.sanitizeUrl)(e)),t.split(",").forEach((function(t){void 0!==Rr(t)&&jr(t,(function(){window.open(n,"_self")}))})),Pr(t,"clickable")},bindFunctions:function(t){kr.forEach((function(e){e(t)}))},durationToDate:Or};function zr(t,e,n){for(var r=!0;r;)r=!1,n.forEach((function(n){var i=new RegExp("^\\s*"+n+"\\s*$");t[0].match(i)&&(e[n]=!0,t.shift(1),r=!0)}))}var Ur=n(24),$r=n.n(Ur);Ur.parser.yy=Yr;var qr,Wr=function(){},Vr=function(t,e){var n=xt().gantt;Ur.parser.yy.clear(),Ur.parser.parse(t);var r=document.getElementById(e);void 0===(qr=r.parentElement.offsetWidth)&&(qr=1200),void 0!==n.useWidth&&(qr=n.useWidth);var i=Ur.parser.yy.getTasks(),a=i.length*(n.barHeight+n.barGap)+2*n.topPadding;r.setAttribute("viewBox","0 0 "+qr+" "+a);for(var o=Object(h.select)('[id="'.concat(e,'"]')),s=Object(h.scaleTime)().domain([Object(h.min)(i,(function(t){return t.startTime})),Object(h.max)(i,(function(t){return t.endTime}))]).rangeRound([0,qr-n.leftPadding-n.rightPadding]),c=[],u=0;u<i.length;u++)c.push(i[u].type);var l=c;function f(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}c=function(t){for(var e={},n=[],r=0,i=t.length;r<i;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}(c),i.sort((function(t,e){var n=t.startTime,r=e.startTime,i=0;return n>r?i=1:n<r&&(i=-1),i})),function(t,e,r){var i=n.barHeight,a=i+n.barGap,u=n.topPadding,d=n.leftPadding;Object(h.scaleLinear)().domain([0,c.length]).range(["#00B9FA","#F95002"]).interpolate(h.interpolateHcl);(function(t,e,r,i){var a=Object(h.axisBottom)(s).tickSize(-i+e+n.gridLineStartPadding).tickFormat(Object(h.timeFormat)(Ur.parser.yy.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));if(o.append("g").attr("class","grid").attr("transform","translate("+t+", "+(i-50)+")").call(a).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),Yr.topAxisEnabled()||n.topAxis){var c=Object(h.axisTop)(s).tickSize(-i+e+n.gridLineStartPadding).tickFormat(Object(h.timeFormat)(Ur.parser.yy.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));o.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(c).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}})(d,u,0,r),function(t,e,r,i,a,u,l){o.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",(function(t,n){return t.order*e+r-2})).attr("width",(function(){return l-n.rightPadding/2})).attr("height",e).attr("class",(function(t){for(var e=0;e<c.length;e++)if(t.type===c[e])return"section section"+e%n.numberSectionStyles;return"section section0"}));var h=o.append("g").selectAll("rect").data(t).enter();h.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?s(t.startTime)+i+.5*(s(t.endTime)-s(t.startTime))-.5*a:s(t.startTime)+i})).attr("y",(function(t,n){return t.order*e+r})).attr("width",(function(t){return t.milestone?a:s(t.renderEndTime||t.endTime)-s(t.startTime)})).attr("height",a).attr("transform-origin",(function(t,n){return n=t.order,(s(t.startTime)+i+.5*(s(t.endTime)-s(t.startTime))).toString()+"px "+(n*e+r+.5*a).toString()+"px"})).attr("class",(function(t){var e="";t.classes.length>0&&(e=t.classes.join(" "));for(var r=0,i=0;i<c.length;i++)t.type===c[i]&&(r=i%n.numberSectionStyles);var a="";return t.active?t.crit?a+=" activeCrit":a=" active":t.done?a=t.crit?" doneCrit":" done":t.crit&&(a+=" crit"),0===a.length&&(a=" task"),t.milestone&&(a=" milestone "+a),a+=r,"task"+(a+=" "+e)})),h.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",n.fontSize).attr("x",(function(t){var e=s(t.startTime),r=s(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(s(t.endTime)-s(t.startTime))-.5*a),t.milestone&&(r=e+a);var o=this.getBBox().width;return o>r-e?r+o+1.5*n.leftPadding>l?e+i-5:r+i+5:(r-e)/2+e+i})).attr("y",(function(t,i){return t.order*e+n.barHeight/2+(n.fontSize/2-2)+r})).attr("text-height",a).attr("class",(function(t){var e=s(t.startTime),r=s(t.endTime);t.milestone&&(r=e+a);var i=this.getBBox().width,o="";t.classes.length>0&&(o=t.classes.join(" "));for(var u=0,h=0;h<c.length;h++)t.type===c[h]&&(u=h%n.numberSectionStyles);var f="";return t.active&&(f=t.crit?"activeCritText"+u:"activeText"+u),t.done?f=t.crit?f+" doneCritText"+u:f+" doneText"+u:t.crit&&(f=f+" critText"+u),t.milestone&&(f+=" milestoneText"),i>r-e?r+i+1.5*n.leftPadding>l?o+" taskTextOutsideLeft taskTextOutside"+u+" "+f:o+" taskTextOutsideRight taskTextOutside"+u+" "+f+" width-"+i:o+" taskText taskText"+u+" "+f+" width-"+i}))}(t,a,u,d,i,0,e),function(t,e){for(var r=[],i=0,a=0;a<c.length;a++)r[a]=[c[a],(s=c[a],u=l,f(u)[s]||0)];var s,u;o.append("g").selectAll("text").data(r).enter().append((function(t){var e=t[0].split(x.lineBreakRegex),n=-(e.length-1)/2,r=document.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("dy",n+"em");for(var i=0;i<e.length;i++){var a=document.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttribute("alignment-baseline","central"),a.setAttribute("x","10"),i>0&&a.setAttribute("dy","1em"),a.textContent=e[i],r.appendChild(a)}return r})).attr("x",10).attr("y",(function(n,a){if(!(a>0))return n[1]*t/2+e;for(var o=0;o<a;o++)return i+=r[a-1][1],n[1]*t/2+i*t+e})).attr("font-size",n.sectionFontSize).attr("font-size",n.sectionFontSize).attr("class",(function(t){for(var e=0;e<c.length;e++)if(t[0]===c[e])return"sectionTitle sectionTitle"+e%n.numberSectionStyles;return"sectionTitle"}))}(a,u),function(t,e,r,i){var a=Yr.getTodayMarker();if("off"===a)return;var c=o.append("g").attr("class","today"),u=new Date,l=c.append("line");l.attr("x1",s(u)+t).attr("x2",s(u)+t).attr("y1",n.titleTopMargin).attr("y2",i-n.titleTopMargin).attr("class","today"),""!==a&&l.attr("style",a.replace(/,/g,";"))}(d,0,0,r)}(i,qr,a),q(o,a,qr,n.useMaxWidth),o.append("text").text(Ur.parser.yy.getTitle()).attr("x",qr/2).attr("y",n.titleTopMargin).attr("class","titleText")},Hr={},Gr=null,Xr={master:Gr},Zr="master",Qr="LR",Kr=0;function Jr(){return R({length:7})}function ti(t,e){for(c.debug("Entering isfastforwardable:",t.id,e.id);t.seq<=e.seq&&t!==e&&null!=e.parent;){if(Array.isArray(e.parent))return c.debug("In merge commit:",e.parent),ti(t,Hr[e.parent[0]])||ti(t,Hr[e.parent[1]]);e=Hr[e.parent]}return c.debug(t.id,e.id),t.id===e.id}var ei={};function ni(t,e,n){var r=t.indexOf(e);-1===r?t.push(n):t.splice(r,1,n)}function ri(t){var e=t.reduce((function(t,e){return t.seq>e.seq?t:e}),t[0]),n="";t.forEach((function(t){n+=t===e?"\t*":"\t|"}));var r,i,a,o=[n,e.id,e.seq];for(var s in Xr)Xr[s]===e.id&&o.push(s);if(c.debug(o.join(" ")),Array.isArray(e.parent)){var u=Hr[e.parent[0]];ni(t,e,u),t.push(Hr[e.parent[1]])}else{if(null==e.parent)return;var l=Hr[e.parent];ni(t,e,l)}r=t,i=function(t){return t.id},a=Object.create(null),ri(t=r.reduce((function(t,e){var n=i(e);return a[n]||(a[n]=!0,t.push(e)),t}),[]))}var ii,ai=function(){var t=Object.keys(Hr).map((function(t){return Hr[t]}));return t.forEach((function(t){c.debug(t.id)})),t.sort((function(t,e){return e.seq-t.seq})),t},oi={setDirection:function(t){Qr=t},setOptions:function(t){c.debug("options str",t),t=(t=t&&t.trim())||"{}";try{ei=JSON.parse(t)}catch(t){c.error("error while parsing gitGraph options",t.message)}},getOptions:function(){return ei},commit:function(t){var e={id:Jr(),message:t,seq:Kr++,parent:null==Gr?null:Gr.id};Gr=e,Hr[e.id]=e,Xr[Zr]=e.id,c.debug("in pushCommit "+e.id)},branch:function(t){Xr[t]=null!=Gr?Gr.id:null,c.debug("in createBranch")},merge:function(t){var e=Hr[Xr[Zr]],n=Hr[Xr[t]];if(function(t,e){return t.seq>e.seq&&ti(e,t)}(e,n))c.debug("Already merged");else{if(ti(e,n))Xr[Zr]=Xr[t],Gr=Hr[Xr[Zr]];else{var r={id:Jr(),message:"merged branch "+t+" into "+Zr,seq:Kr++,parent:[null==Gr?null:Gr.id,Xr[t]]};Gr=r,Hr[r.id]=r,Xr[Zr]=r.id}c.debug(Xr),c.debug("in mergeBranch")}},checkout:function(t){c.debug("in checkout");var e=Xr[Zr=t];Gr=Hr[e]},reset:function(t){c.debug("in reset",t);var e=t.split(":")[0],n=parseInt(t.split(":")[1]),r="HEAD"===e?Gr:Hr[Xr[e]];for(c.debug(r,n);n>0;)if(n--,!(r=Hr[r.parent])){var i="Critical error - unique parent commit not found during reset";throw c.error(i),i}Gr=r,Xr[Zr]=r.id},prettyPrint:function(){c.debug(Hr),ri([ai()[0]])},clear:function(){Hr={},Xr={master:Gr=null},Zr="master",Kr=0},getBranchesAsObjArray:function(){var t=[];for(var e in Xr)t.push({name:e,commit:Hr[Xr[e]]});return t},getBranches:function(){return Xr},getCommits:function(){return Hr},getCommitsArray:ai,getCurrentBranch:function(){return Zr},getDirection:function(){return Qr},getHead:function(){return Gr}},si=n(72),ci=n.n(si),ui={},li={nodeSpacing:150,nodeFillColor:"yellow",nodeStrokeWidth:2,nodeStrokeColor:"grey",lineStrokeWidth:4,branchOffset:50,lineColor:"grey",leftMargin:50,branchColors:["#442f74","#983351","#609732","#AA9A39"],nodeRadius:10,nodeLabel:{width:75,height:100,x:-25,y:0}},hi={};function fi(t,e,n,r){var i=B(r,h.curveBasis),a=li.branchColors[n%li.branchColors.length],o=Object(h.line)().x((function(t){return Math.round(t.x)})).y((function(t){return Math.round(t.y)})).curve(i);t.append("svg:path").attr("d",o(e)).style("stroke",a).style("stroke-width",li.lineStrokeWidth).style("fill","none")}function di(t,e){e=e||t.node().getBBox();var n=t.node().getCTM();return{left:n.e+e.x*n.a,top:n.f+e.y*n.d,width:e.width,height:e.height}}function pi(t,e,n,r,i){c.debug("svgDrawLineForCommits: ",e,n);var a=di(t.select("#node-"+e+" circle")),o=di(t.select("#node-"+n+" circle"));switch(r){case"LR":if(a.left-o.left>li.nodeSpacing){var s={x:a.left-li.nodeSpacing,y:o.top+o.height/2};fi(t,[s,{x:o.left+o.width,y:o.top+o.height/2}],i,"linear"),fi(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-li.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-li.nodeSpacing/2,y:s.y},s],i)}else fi(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-li.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-li.nodeSpacing/2,y:o.top+o.height/2},{x:o.left+o.width,y:o.top+o.height/2}],i);break;case"BT":if(o.top-a.top>li.nodeSpacing){var u={x:o.left+o.width/2,y:a.top+a.height+li.nodeSpacing};fi(t,[u,{x:o.left+o.width/2,y:o.top}],i,"linear"),fi(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+a.height+li.nodeSpacing/2},{x:o.left+o.width/2,y:u.y-li.nodeSpacing/2},u],i)}else fi(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+li.nodeSpacing/2},{x:o.left+o.width/2,y:o.top-li.nodeSpacing/2},{x:o.left+o.width/2,y:o.top}],i)}}function yi(t,e){return t.select(e).node().cloneNode(!0)}function gi(t,e,n,r){var i,a=Object.keys(ui).length;if("string"==typeof e)do{if(i=ui[e],c.debug("in renderCommitHistory",i.id,i.seq),t.select("#node-"+e).size()>0)return;t.append((function(){return yi(t,"#def-commit")})).attr("class","commit").attr("id",(function(){return"node-"+i.id})).attr("transform",(function(){switch(r){case"LR":return"translate("+(i.seq*li.nodeSpacing+li.leftMargin)+", "+ii*li.branchOffset+")";case"BT":return"translate("+(ii*li.branchOffset+li.leftMargin)+", "+(a-i.seq)*li.nodeSpacing+")"}})).attr("fill",li.nodeFillColor).attr("stroke",li.nodeStrokeColor).attr("stroke-width",li.nodeStrokeWidth);var o=void 0;for(var s in n)if(n[s].commit===i){o=n[s];break}o&&(c.debug("found branch ",o.name),t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","branch-label").text(o.name+", ")),t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","commit-id").text(i.id),""!==i.message&&"BT"===r&&t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","commit-msg").text(", "+i.message),e=i.parent}while(e&&ui[e]);Array.isArray(e)&&(c.debug("found merge commmit",e),gi(t,e[0],n,r),ii++,gi(t,e[1],n,r),ii--)}function vi(t,e,n,r){for(r=r||0;e.seq>0&&!e.lineDrawn;)"string"==typeof e.parent?(pi(t,e.id,e.parent,n,r),e.lineDrawn=!0,e=ui[e.parent]):Array.isArray(e.parent)&&(pi(t,e.id,e.parent[0],n,r),pi(t,e.id,e.parent[1],n,r+1),vi(t,ui[e.parent[1]],n,r+1),e.lineDrawn=!0,e=ui[e.parent[0]])}var mi,bi=function(t){hi=t},xi=function(t,e,n){try{var r=ci.a.parser;r.yy=oi,r.yy.clear(),c.debug("in gitgraph renderer",t+"\n","id:",e,n),r.parse(t+"\n"),li=Object.assign(li,hi,oi.getOptions()),c.debug("effective options",li);var i=oi.getDirection();ui=oi.getCommits();var a=oi.getBranchesAsObjArray();"BT"===i&&(li.nodeLabel.x=a.length*li.branchOffset,li.nodeLabel.width="100%",li.nodeLabel.y=-2*li.nodeRadius);var o=Object(h.select)('[id="'.concat(e,'"]'));for(var s in function(t){t.append("defs").append("g").attr("id","def-commit").append("circle").attr("r",li.nodeRadius).attr("cx",0).attr("cy",0),t.select("#def-commit").append("foreignObject").attr("width",li.nodeLabel.width).attr("height",li.nodeLabel.height).attr("x",li.nodeLabel.x).attr("y",li.nodeLabel.y).attr("class","node-label").attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").append("p").html("")}(o),ii=1,a){var u=a[s];gi(o,u.commit.id,a,i),vi(o,u.commit,i),ii++}o.attr("height",(function(){return"BT"===i?Object.keys(ui).length*li.nodeSpacing:(a.length+1)*li.branchOffset}))}catch(t){c.error("Error while rendering gitgraph"),c.error(t.message)}},_i="",ki=!1,wi={setMessage:function(t){c.debug("Setting message to: "+t),_i=t},getMessage:function(){return _i},setInfo:function(t){ki=t},getInfo:function(){return ki}},Ei=n(73),Ti=n.n(Ei),Ci={},Si=function(t){Object.keys(t).forEach((function(e){Ci[e]=t[e]}))},Ai=function(t,e,n){try{var r=Ti.a.parser;r.yy=wi,c.debug("Renering info diagram\n"+t),r.parse(t),c.debug("Parsed info diagram");var i=Object(h.select)("#"+e);i.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+n),i.attr("height",100),i.attr("width",400)}catch(t){c.error("Error while rendering info diagram"),c.error(t.message)}},Mi=n(74),Oi=n.n(Mi),Bi={},Ni="",Di=!1,Li={parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().pie},addSection:function(t,e){void 0===Bi[t]&&(Bi[t]=e,c.debug("Added new section :",t))},getSections:function(){return Bi},cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){Bi={},Ni="",Di=!1},setTitle:function(t){Ni=t},getTitle:function(){return Ni},setShowData:function(t){Di=t},getShowData:function(){return Di}},Ii=xt(),Ri=function(t,e){try{Ii=xt();var n=Oi.a.parser;n.yy=Li,c.debug("Rendering info diagram\n"+t),n.yy.clear(),n.parse(t),c.debug("Parsed info diagram");var r=document.getElementById(e);void 0===(mi=r.parentElement.offsetWidth)&&(mi=1200),void 0!==Ii.useWidth&&(mi=Ii.useWidth),void 0!==Ii.pie.useWidth&&(mi=Ii.pie.useWidth);var i=Object(h.select)("#"+e);q(i,450,mi,Ii.pie.useMaxWidth),r.setAttribute("viewBox","0 0 "+mi+" 450");var a=Math.min(mi,450)/2-40,o=i.append("g").attr("transform","translate("+mi/2+",225)"),s=Li.getSections(),u=0;Object.keys(s).forEach((function(t){u+=s[t]}));var l=Ii.themeVariables,f=[l.pie1,l.pie2,l.pie3,l.pie4,l.pie5,l.pie6,l.pie7,l.pie8,l.pie9,l.pie10,l.pie11,l.pie12],d=Object(h.scaleOrdinal)().domain(s).range(f),p=Object(h.pie)().value((function(t){return t.value}))(Object(h.entries)(s)),y=Object(h.arc)().innerRadius(0).outerRadius(a);o.selectAll("mySlices").data(p).enter().append("path").attr("d",y).attr("fill",(function(t){return d(t.data.key)})).attr("class","pieCircle"),o.selectAll("mySlices").data(p.filter((function(t){return 0!==t.data.value}))).enter().append("text").text((function(t){return(t.data.value/u*100).toFixed(0)+"%"})).attr("transform",(function(t){return"translate("+y.centroid(t)+")"})).style("text-anchor","middle").attr("class","slice"),o.append("text").text(n.yy.getTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");var g=o.selectAll(".legend").data(d.domain()).enter().append("g").attr("class","legend").attr("transform",(function(t,e){return"translate(216,"+(22*e-22*d.domain().length/2)+")"}));g.append("rect").attr("width",18).attr("height",18).style("fill",d).style("stroke",d),g.data(p.filter((function(t){return 0!==t.data.value}))).append("text").attr("x",22).attr("y",14).text((function(t){return n.yy.getShowData()||Ii.showData||Ii.pie.showData?t.data.key+" ["+t.data.value+"]":t.data.key}))}catch(t){c.error("Error while rendering info diagram"),c.error(t)}},Fi=n(45),Pi=n.n(Fi),ji=[],Yi={},zi={},Ui={},$i={},qi={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().req},addRequirement:function(t,e){return void 0===zi[t]&&(zi[t]={name:t,type:e,id:Yi.id,text:Yi.text,risk:Yi.risk,verifyMethod:Yi.verifyMethod}),Yi={},zi[t]},getRequirements:function(){return zi},setNewReqId:function(t){void 0!==Yi&&(Yi.id=t)},setNewReqText:function(t){void 0!==Yi&&(Yi.text=t)},setNewReqRisk:function(t){void 0!==Yi&&(Yi.risk=t)},setNewReqVerifyMethod:function(t){void 0!==Yi&&(Yi.verifyMethod=t)},addElement:function(t){return void 0===$i[t]&&($i[t]={name:t,type:Ui.type,docRef:Ui.docRef},c.info("Added new requirement: ",t)),Ui={},$i[t]},getElements:function(){return $i},setNewElementType:function(t){void 0!==Ui&&(Ui.type=t)},setNewElementDocRef:function(t){void 0!==Ui&&(Ui.docRef=t)},addRelationship:function(t,e,n){ji.push({type:t,src:e,dst:n})},getRelationships:function(){return ji},clear:function(){ji=[],Yi={},zi={},Ui={},$i={}}},Wi={CONTAINS:"contains",ARROW:"arrow"},Vi=Wi,Hi=function(t,e){var n=t.append("defs").append("marker").attr("id",Wi.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");n.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),n.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),n.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",Wi.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d","M0,0\n L".concat(e.line_height,",").concat(e.line_height/2,"\n M").concat(e.line_height,",").concat(e.line_height/2,"\n L0,").concat(e.line_height)).attr("stroke-width",1)},Gi={},Xi=0,Zi=function(t,e){return t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",Gi.rect_min_width+"px").attr("height",Gi.rect_min_height+"px")},Qi=function(t,e,n){var r=Gi.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",r).attr("y",Gi.rect_padding).attr("dominant-baseline","hanging"),a=0;n.forEach((function(t){0==a?i.append("tspan").attr("text-anchor","middle").attr("x",Gi.rect_min_width/2).attr("dy",0).text(t):i.append("tspan").attr("text-anchor","middle").attr("x",Gi.rect_min_width/2).attr("dy",.75*Gi.line_height).text(t),a++}));var o=1.5*Gi.rect_padding+a*Gi.line_height*.75;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",Gi.rect_min_width).attr("y1",o).attr("y2",o),{titleNode:i,y:o}},Ki=function(t,e,n,r){var i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",Gi.rect_padding).attr("y",r).attr("dominant-baseline","hanging"),a=0,o=[];return n.forEach((function(t){for(var e=t.length;e>30&&a<3;){var n=t.substring(0,30);e=(t=t.substring(30,t.length)).length,o[o.length]=n,a++}if(3==a){var r=o[o.length-1];o[o.length-1]=r.substring(0,r.length-4)+"..."}else o[o.length]=t;a=0})),o.forEach((function(t){i.append("tspan").attr("x",Gi.rect_padding).attr("dy",Gi.line_height).text(t)})),i},Ji=function(t,e,n,r){var i=n.edge(ta(e.src),ta(e.dst)),a=Object(h.line)().x((function(t){return t.x})).y((function(t){return t.y})),o=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",a(i.points)).attr("fill","none");e.type==qi.Relationships.CONTAINS?o.attr("marker-start","url("+x.getUrl(Gi.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+x.getUrl(Gi.arrowMarkerAbsolute)+"#"+Vi.ARROW+"_line_ending)")),function(t,e,n,r){var i=e.node().getTotalLength(),a=e.node().getPointAtLength(.5*i),o="rel"+Xi;Xi++;var s=t.append("text").attr("class","req relationshipLabel").attr("id",o).attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(r).node().getBBox();t.insert("rect","#"+o).attr("class","req reqLabelBox").attr("x",a.x-s.width/2).attr("y",a.y-s.height/2).attr("width",s.width).attr("height",s.height).attr("fill","white").attr("fill-opacity","85%")}(t,o,0,"<<".concat(e.type,">>"))},ta=function(t){return t.replace(/\s/g,"").replace(/\./g,"_")},ea=function(t){if(void 0!==t)for(var e=Object.keys(t),n=0;n<e.length;n++)Gi[e[n]]=t[e[n]]},na=function(t,e){Fi.parser.yy=qi,Fi.parser.yy.clear(),Fi.parser.parse(t);var n=Object(h.select)("[id='".concat(e,"']"));Hi(n,Gi);var r,i,a,o=new zt.a.Graph({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:Gi.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}})),s=qi.getRequirements(),u=qi.getElements(),l=qi.getRelationships();r=s,i=o,a=n,Object.keys(r).forEach((function(t){var e=r[t];t=ta(t),c.info("Added new requirement: ",t);var n=a.append("g").attr("id",t),o=Zi(n,"req-"+t),s=[],u=Qi(n,t+"_title",["<<".concat(e.type,">>"),"".concat(e.name)]);s.push(u.titleNode);var l=Ki(n,t+"_body",["Id: ".concat(e.id),"Text: ".concat(e.text),"Risk: ".concat(e.risk),"Verification: ".concat(e.verifyMethod)],u.y);s.push(l);var h=o.node().getBBox();i.setNode(t,{width:h.width,height:h.height,shape:"rect",id:t})})),function(t,e,n){Object.keys(t).forEach((function(r){var i=t[r],a=ta(r),o=n.append("g").attr("id",a),s="element-"+a,c=Zi(o,s),u=[],l=Qi(o,s+"_title",["<<Element>>","".concat(r)]);u.push(l.titleNode);var h=Ki(o,s+"_body",["Type: ".concat(i.type||"Not Specified"),"Doc Ref: ".concat(i.docRef||"None")],l.y);u.push(h);var f=c.node().getBBox();e.setNode(a,{width:f.width,height:f.height,shape:"rect",id:a})}))}(u,o,n),function(t,e){t.forEach((function(t){var n=ta(t.src),r=ta(t.dst);e.setEdge(n,r,{relationship:t})}))}(l,o),jt.a.layout(o),function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&(t.select("#"+n),t.select("#"+n).attr("transform","translate("+(e.node(n).x-e.node(n).width/2)+","+(e.node(n).y-e.node(n).height/2)+" )"))}))}(n,o),l.forEach((function(t){Ji(n,t,o,e)}));var f=Gi.rect_padding,d=n.node().getBBox(),p=d.width+2*f,y=d.height+2*f;q(n,y,p,Gi.useMaxWidth),n.attr("viewBox","".concat(d.x-f," ").concat(d.y-f," ").concat(p," ").concat(y))},ra=n(2),ia=n.n(ra),aa=void 0,oa={},sa=[],ca=[],ua="",la=!1,ha=!1,fa=!1,da=function(t,e,n){var r=oa[t];r&&e===r.name&&null==n||(null!=n&&null!=n.text||(n={text:e,wrap:null}),oa[t]={name:e,description:n.text,wrap:void 0===n.wrap&&ga()||!!n.wrap,prevActor:aa},aa&&oa[aa]&&(oa[aa].nextActor=t),aa=t)},pa=function(t){var e,n=0;for(e=0;e<sa.length;e++)sa[e].type===va.ACTIVE_START&&sa[e].from.actor===t&&n++,sa[e].type===va.ACTIVE_END&&sa[e].from.actor===t&&n--;return n},ya=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{text:void 0,wrap:void 0},r=arguments.length>3?arguments[3]:void 0;if(r===va.ACTIVE_END){var i=pa(t.actor);if(i<1){var a=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw a.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a}}return sa.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&ga()||!!n.wrap,type:r}),!0},ga=function(){return fa},va={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ma=function(t,e,n){var r={actor:t,placement:e,message:n.text,wrap:void 0===n.wrap&&ga()||!!n.wrap},i=[].concat(t,t);ca.push(r),sa.push({from:i[0],to:i[1],message:n.text,wrap:void 0===n.wrap&&ga()||!!n.wrap,type:va.NOTE,placement:e})},ba=function(t){ua=t.text,la=void 0===t.wrap&&ga()||!!t.wrap},xa={addActor:da,addMessage:function(t,e,n,r){sa.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&ga()||!!n.wrap,answer:r})},addSignal:ya,autoWrap:ga,setWrap:function(t){fa=t},enableSequenceNumbers:function(){ha=!0},showSequenceNumbers:function(){return ha},getMessages:function(){return sa},getActors:function(){return oa},getActor:function(t){return oa[t]},getActorKeys:function(){return Object.keys(oa)},getTitle:function(){return ua},parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().sequence},getTitleWrapped:function(){return la},clear:function(){oa={},sa=[]},parseMessage:function(t){var e=t.trim(),n={text:e.replace(/^[:]?(?:no)?wrap:/,"").trim(),wrap:null!==e.match(/^[:]?wrap:/)||null===e.match(/^[:]?nowrap:/)&&void 0};return c.debug("parseMessage:",n),n},LINETYPE:va,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:ma,setTitle:ba,apply:function t(e){if(e instanceof Array)e.forEach((function(e){t(e)}));else switch(e.type){case"addActor":da(e.actor,e.actor,e.description);break;case"activeStart":case"activeEnd":ya(e.actor,void 0,void 0,e.signalType);break;case"addNote":ma(e.actor,e.placement,e.text);break;case"addMessage":ya(e.from,e.to,e.msg,e.signalType);break;case"loopStart":ya(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":ya(void 0,void 0,void 0,e.signalType);break;case"rectStart":ya(void 0,void 0,e.color,e.signalType);break;case"rectEnd":ya(void 0,void 0,void 0,e.signalType);break;case"optStart":ya(void 0,void 0,e.optText,e.signalType);break;case"optEnd":ya(void 0,void 0,void 0,e.signalType);break;case"altStart":case"else":ya(void 0,void 0,e.altText,e.signalType);break;case"altEnd":ya(void 0,void 0,void 0,e.signalType);break;case"setTitle":ba(e.text);break;case"parStart":case"and":ya(void 0,void 0,e.parText,e.signalType);break;case"parEnd":ya(void 0,void 0,void 0,e.signalType)}}},_a=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},ka=function(t,e){var n=0,r=0,i=e.text.split(x.lineBreakRegex),a=[],o=0,s=function(){return e.y};if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":s=function(){return Math.round(e.y+e.textMargin)};break;case"middle":case"center":s=function(){return Math.round(e.y+(n+r+e.textMargin)/2)};break;case"bottom":case"end":s=function(){return Math.round(e.y+(n+r+2*e.textMargin)-e.textMargin)}}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="text-after-edge",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="text-before-edge",e.alignmentBaseline="middle"}for(var c=0;c<i.length;c++){var u=i[c];void 0!==e.textMargin&&0===e.textMargin&&void 0!==e.fontSize&&(o=c*e.fontSize);var l=t.append("text");if(l.attr("x",e.x),l.attr("y",s()),void 0!==e.anchor&&l.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&l.style("font-family",e.fontFamily),void 0!==e.fontSize&&l.style("font-size",e.fontSize),void 0!==e.fontWeight&&l.style("font-weight",e.fontWeight),void 0!==e.fill&&l.attr("fill",e.fill),void 0!==e.class&&l.attr("class",e.class),void 0!==e.dy?l.attr("dy",e.dy):0!==o&&l.attr("dy",o),e.tspan){var h=l.append("tspan");h.attr("x",e.x),void 0!==e.fill&&h.attr("fill",e.fill),h.text(u)}else l.text(u);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(l._groups||l)[0][0].getBBox().height,n=r),a.push(l)}return a},wa=function(t,e){var n,r,i,a,o,s=t.append("polygon");return s.attr("points",(n=e.x,r=e.y,i=e.width,a=e.height,n+","+r+" "+(n+i)+","+r+" "+(n+i)+","+(r+a-(o=7))+" "+(n+i-1.2*o)+","+(r+a)+" "+n+","+(r+a))),s.attr("class","labelBox"),e.y=e.y+e.height/2,ka(t,e),s},Ea=-1,Ta=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},Ca=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},Sa=function(){function t(t,e,n,i,a,o,s){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c){for(var u=c.actorFontSize,l=c.actorFontFamily,h=c.actorFontWeight,f=t.split(x.lineBreakRegex),d=0;d<f.length;d++){var p=d*u-u*(f.length-1)/2,y=e.append("text").attr("x",n+a/2).attr("y",i).style("text-anchor","middle").style("font-size",u).style("font-weight",h).style("font-family",l);y.append("tspan").attr("x",n+a/2).attr("dy",p).text(f[d]),y.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(y,s)}}function n(t,n,i,a,o,s,c,u){var l=n.append("switch"),h=l.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).append("div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,i,a,o,s,c,u),r(h,c)}function r(t,e){for(var n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),Aa={drawRect:_a,drawText:ka,drawLabel:wa,drawActor:function(t,e,n){var r=e.x+e.width/2,i=t.append("g");0===e.y&&(Ea++,i.append("line").attr("id","actor"+Ea).attr("x1",r).attr("y1",5).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));var a=Ca();a.x=e.x,a.y=e.y,a.fill="#eaeaea",a.width=e.width,a.height=e.height,a.class="actor",a.rx=3,a.ry=3,_a(i,a),Sa(n)(e.description,i,a.x,a.y,a.width,a.height,{class:"actor"},n)},anchorElement:function(t){return t.append("g")},drawActivation:function(t,e,n,r,i){var a=Ca(),o=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=n-e.starty,_a(o,a)},drawLoop:function(t,e,n,r){var i=r.boxMargin,a=r.boxTextMargin,o=r.labelBoxHeight,s=r.labelBoxWidth,c=r.messageFontFamily,u=r.messageFontSize,l=r.messageFontWeight,h=t.append("g"),f=function(t,e,n,r){return h.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("class","loopLine")};f(e.startx,e.starty,e.stopx,e.starty),f(e.stopx,e.starty,e.stopx,e.stopy),f(e.startx,e.stopy,e.stopx,e.stopy),f(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){f(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));var d=Ta();d.text=n,d.x=e.startx,d.y=e.starty,d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.anchor="middle",d.valign="middle",d.tspan=!1,d.width=s||50,d.height=o||20,d.textMargin=a,d.class="labelText",wa(h,d),(d=Ta()).text=e.title,d.x=e.startx+s/2+(e.stopx-e.startx)/2,d.y=e.starty+i+a,d.anchor="middle",d.valign="middle",d.textMargin=a,d.class="loopText",d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.wrap=!0;var p=ka(h,d);return void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,n){if(t.message){d.text=t.message,d.x=e.startx+(e.stopx-e.startx)/2,d.y=e.sections[n].y+i+a,d.class="loopText",d.anchor="middle",d.valign="middle",d.tspan=!1,d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.wrap=e.wrap,p=ka(h,d);var r=Math.round(p.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));e.sections[n].height+=r-(i+a)}})),e.height=Math.round(e.stopy-e.starty),h},drawBackgroundRect:function(t,e){_a(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},insertArrowHead:function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},insertArrowFilledHead:function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},insertSequenceNumber:function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},insertArrowCrossHead:function(t){var e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},getTextObj:Ta,getNoteRect:Ca};ra.parser.yy=xa;var Ma={},Oa={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((function(t){return t.height||0})))+(0===this.loops.length?0:this.loops.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.messages.length?0:this.messages.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.notes.length?0:this.notes.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))},clear:function(){this.actors=[],this.loops=[],this.messages=[],this.notes=[]},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Ia(ra.parser.yy.getConfig())},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i=this,a=0;function o(o){return function(s){a++;var c=i.sequenceItems.length-a+1;i.updateVal(s,"starty",e-c*Ma.boxMargin,Math.min),i.updateVal(s,"stopy",r+c*Ma.boxMargin,Math.max),i.updateVal(Oa.data,"startx",t-c*Ma.boxMargin,Math.min),i.updateVal(Oa.data,"stopx",n+c*Ma.boxMargin,Math.max),"activation"!==o&&(i.updateVal(s,"startx",t-c*Ma.boxMargin,Math.min),i.updateVal(s,"stopx",n+c*Ma.boxMargin,Math.max),i.updateVal(Oa.data,"starty",e-c*Ma.boxMargin,Math.min),i.updateVal(Oa.data,"stopy",r+c*Ma.boxMargin,Math.max))}}this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(Oa.data,"startx",i,Math.min),this.updateVal(Oa.data,"starty",o,Math.min),this.updateVal(Oa.data,"stopx",a,Math.max),this.updateVal(Oa.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},newActivation:function(t,e,n){var r=n[t.from.actor],i=Ra(t.from.actor).length||0,a=r.x+r.width/2+(i-1)*Ma.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Ma.activationWidth,stopy:void 0,actor:t.from.actor,anchored:Aa.anchorElement(e)})},endActivation:function(t){var e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Oa.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},Ba=function(t){return{fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}},Na=function(t){return{fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}},Da=function(t){return{fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}},La=function(t,e,n,r){for(var i=0,a=0,o=0;o<n.length;o++){var s=e[n[o]];s.width=s.width||Ma.width,s.height=Math.max(s.height||Ma.height,Ma.height),s.margin=s.margin||Ma.actorMargin,s.x=i+a,s.y=r,Aa.drawActor(t,s,Ma),Oa.insert(s.x,r,s.x+s.width,s.height),i+=s.width,a+=s.margin,Oa.models.addActor(s)}Oa.bumpVerticalPos(Ma.height)},Ia=function(t){F(Ma,t),t.fontFamily&&(Ma.actorFontFamily=Ma.noteFontFamily=Ma.messageFontFamily=t.fontFamily),t.fontSize&&(Ma.actorFontSize=Ma.noteFontSize=Ma.messageFontSize=t.fontSize),t.fontWeight&&(Ma.actorFontWeight=Ma.noteFontWeight=Ma.messageFontWeight=t.fontWeight)},Ra=function(t){return Oa.activations.filter((function(e){return e.actor===t}))},Fa=function(t,e){var n=e[t],r=Ra(t);return[r.reduce((function(t,e){return Math.min(t,e.startx)}),n.x+n.width/2),r.reduce((function(t,e){return Math.max(t,e.stopx)}),n.x+n.width/2)]};function Pa(t,e,n,r,i){Oa.bumpVerticalPos(n);var a=r;if(e.id&&e.message&&t[e.id]){var o=t[e.id].width,s=Ba(Ma);e.message=W.wrapLabel("[".concat(e.message,"]"),o-2*Ma.wrapPadding,s),e.width=o,e.wrap=!0;var u=W.calculateTextDimensions(e.message,s),l=Math.max(u.height,Ma.labelBoxHeight);a=r+l,c.debug("".concat(l," - ").concat(e.message))}i(e),Oa.bumpVerticalPos(a)}var ja=function(t,e){var n={};return e.forEach((function(e){if(t[e.to]&&t[e.from]){var r=t[e.to];if(e.placement===ra.parser.yy.PLACEMENT.LEFTOF&&!r.prevActor)return;if(e.placement===ra.parser.yy.PLACEMENT.RIGHTOF&&!r.nextActor)return;var i=void 0!==e.placement,a=!i,o=i?Na(Ma):Ba(Ma),s=e.wrap?W.wrapLabel(e.message,Ma.width-2*Ma.wrapPadding,o):e.message,c=W.calculateTextDimensions(s,o).width+2*Ma.wrapPadding;a&&e.from===r.nextActor?n[e.to]=Math.max(n[e.to]||0,c):a&&e.from===r.prevActor?n[e.from]=Math.max(n[e.from]||0,c):a&&e.from===e.to?(n[e.from]=Math.max(n[e.from]||0,c/2),n[e.to]=Math.max(n[e.to]||0,c/2)):e.placement===ra.parser.yy.PLACEMENT.RIGHTOF?n[e.from]=Math.max(n[e.from]||0,c):e.placement===ra.parser.yy.PLACEMENT.LEFTOF?n[r.prevActor]=Math.max(n[r.prevActor]||0,c):e.placement===ra.parser.yy.PLACEMENT.OVER&&(r.prevActor&&(n[r.prevActor]=Math.max(n[r.prevActor]||0,c/2)),r.nextActor&&(n[e.from]=Math.max(n[e.from]||0,c/2)))}})),c.debug("maxMessageWidthPerActor:",n),n},Ya=function(t,e){var n=0;for(var r in Object.keys(t).forEach((function(e){var r=t[e];r.wrap&&(r.description=W.wrapLabel(r.description,Ma.width-2*Ma.wrapPadding,Da(Ma)));var i=W.calculateTextDimensions(r.description,Da(Ma));r.width=r.wrap?Ma.width:Math.max(Ma.width,i.width+2*Ma.wrapPadding),r.height=r.wrap?Math.max(i.height,Ma.height):Ma.height,n=Math.max(n,r.height)})),e){var i=t[r];if(i){var a=t[i.nextActor];if(a){var o=e[r]+Ma.actorMargin-i.width/2-a.width/2;i.margin=Math.max(o,Ma.actorMargin)}}}return Math.max(n,Ma.height)},za=function(t,e){var n,r,i,a={},o=[];return t.forEach((function(t){switch(t.id=W.random({length:10}),t.type){case ra.parser.yy.LINETYPE.LOOP_START:case ra.parser.yy.LINETYPE.ALT_START:case ra.parser.yy.LINETYPE.OPT_START:case ra.parser.yy.LINETYPE.PAR_START:o.push({id:t.id,msg:t.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case ra.parser.yy.LINETYPE.ALT_ELSE:case ra.parser.yy.LINETYPE.PAR_AND:t.message&&(n=o.pop(),a[n.id]=n,a[t.id]=n,o.push(n));break;case ra.parser.yy.LINETYPE.LOOP_END:case ra.parser.yy.LINETYPE.ALT_END:case ra.parser.yy.LINETYPE.OPT_END:case ra.parser.yy.LINETYPE.PAR_END:n=o.pop(),a[n.id]=n;break;case ra.parser.yy.LINETYPE.ACTIVE_START:var s=e[t.from?t.from.actor:t.to.actor],u=Ra(t.from?t.from.actor:t.to.actor).length,l=s.x+s.width/2+(u-1)*Ma.activationWidth/2,h={startx:l,stopx:l+Ma.activationWidth,actor:t.from.actor,enabled:!0};Oa.activations.push(h);break;case ra.parser.yy.LINETYPE.ACTIVE_END:var f=Oa.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);delete Oa.activations.splice(f,1)[0]}void 0!==t.placement?(r=function(t,e){var n=e[t.from].x,r=e[t.to].x,i=t.wrap&&t.message,a=W.calculateTextDimensions(i?W.wrapLabel(t.message,Ma.width,Na(Ma)):t.message,Na(Ma)),o={width:i?Ma.width:Math.max(Ma.width,a.width+2*Ma.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===ra.parser.yy.PLACEMENT.RIGHTOF?(o.width=i?Math.max(Ma.width,a.width):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*Ma.noteMargin),o.startx=n+(e[t.from].width+Ma.actorMargin)/2):t.placement===ra.parser.yy.PLACEMENT.LEFTOF?(o.width=i?Math.max(Ma.width,a.width+2*Ma.noteMargin):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*Ma.noteMargin),o.startx=n-o.width+(e[t.from].width-Ma.actorMargin)/2):t.to===t.from?(a=W.calculateTextDimensions(i?W.wrapLabel(t.message,Math.max(Ma.width,e[t.from].width),Na(Ma)):t.message,Na(Ma)),o.width=i?Math.max(Ma.width,e[t.from].width):Math.max(e[t.from].width,Ma.width,a.width+2*Ma.noteMargin),o.startx=n+(e[t.from].width-o.width)/2):(o.width=Math.abs(n+e[t.from].width/2-(r+e[t.to].width/2))+Ma.actorMargin,o.startx=n<r?n+e[t.from].width/2-Ma.actorMargin/2:r+e[t.to].width/2-Ma.actorMargin/2),i&&(o.message=W.wrapLabel(t.message,o.width-2*Ma.wrapPadding,Na(Ma))),c.debug("NM:[".concat(o.startx,",").concat(o.stopx,",").concat(o.starty,",").concat(o.stopy,":").concat(o.width,",").concat(o.height,"=").concat(t.message,"]")),o}(t,e),t.noteModel=r,o.forEach((function(t){(n=t).from=Math.min(n.from,r.startx),n.to=Math.max(n.to,r.startx+r.width),n.width=Math.max(n.width,Math.abs(n.from-n.to))-Ma.labelBoxWidth}))):(i=function(t,e){var n=!1;if([ra.parser.yy.LINETYPE.SOLID_OPEN,ra.parser.yy.LINETYPE.DOTTED_OPEN,ra.parser.yy.LINETYPE.SOLID,ra.parser.yy.LINETYPE.DOTTED,ra.parser.yy.LINETYPE.SOLID_CROSS,ra.parser.yy.LINETYPE.DOTTED_CROSS,ra.parser.yy.LINETYPE.SOLID_POINT,ra.parser.yy.LINETYPE.DOTTED_POINT].includes(t.type)&&(n=!0),!n)return{};var r=Fa(t.from,e),i=Fa(t.to,e),a=r[0]<=i[0]?1:0,o=r[0]<i[0]?0:1,s=r.concat(i),c=Math.abs(i[o]-r[a]);t.wrap&&t.message&&(t.message=W.wrapLabel(t.message,Math.max(c+2*Ma.wrapPadding,Ma.width),Ba(Ma)));var u=W.calculateTextDimensions(t.message,Ba(Ma));return{width:Math.max(t.wrap?0:u.width+2*Ma.wrapPadding,c+2*Ma.wrapPadding,Ma.width),height:0,startx:r[a],stopx:i[o],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,s),toBounds:Math.max.apply(null,s)}}(t,e),t.msgModel=i,i.startx&&i.stopx&&o.length>0&&o.forEach((function(r){if(n=r,i.startx===i.stopx){var a=e[t.from],o=e[t.to];n.from=Math.min(a.x-i.width/2,a.x-a.width/2,n.from),n.to=Math.max(o.x+i.width/2,o.x+a.width/2,n.to),n.width=Math.max(n.width,Math.abs(n.to-n.from))-Ma.labelBoxWidth}else n.from=Math.min(i.startx,n.from),n.to=Math.max(i.stopx,n.to),n.width=Math.max(n.width,i.width)-Ma.labelBoxWidth})))})),Oa.activations=[],c.debug("Loop type widths:",a),a},Ua={bounds:Oa,drawActors:La,setConf:Ia,draw:function(t,e){Ma=xt().sequence,ra.parser.yy.clear(),ra.parser.yy.setWrap(Ma.wrap),ra.parser.parse(t+"\n"),Oa.init(),c.debug("C:".concat(JSON.stringify(Ma,null,2)));var n=Object(h.select)('[id="'.concat(e,'"]')),r=ra.parser.yy.getActors(),i=ra.parser.yy.getActorKeys(),a=ra.parser.yy.getMessages(),o=ra.parser.yy.getTitle(),s=ja(r,a);Ma.height=Ya(r,s),La(n,r,i,0);var u=za(a,r,s);Aa.insertArrowHead(n),Aa.insertArrowCrossHead(n),Aa.insertArrowFilledHead(n),Aa.insertSequenceNumber(n);var l=1;a.forEach((function(t){var e,i,a;switch(t.type){case ra.parser.yy.LINETYPE.NOTE:i=t.noteModel,function(t,e){Oa.bumpVerticalPos(Ma.boxMargin),e.height=Ma.boxMargin,e.starty=Oa.getVerticalPos();var n=Aa.getNoteRect();n.x=e.startx,n.y=e.starty,n.width=e.width||Ma.width,n.class="note";var r=t.append("g"),i=Aa.drawRect(r,n),a=Aa.getTextObj();a.x=e.startx,a.y=e.starty,a.width=n.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=Ma.noteFontFamily,a.fontSize=Ma.noteFontSize,a.fontWeight=Ma.noteFontWeight,a.anchor=Ma.noteAlign,a.textMargin=Ma.noteMargin,a.valign=Ma.noteAlign;var o=ka(r,a),s=Math.round(o.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));i.attr("height",s+2*Ma.noteMargin),e.height+=s+2*Ma.noteMargin,Oa.bumpVerticalPos(s+2*Ma.noteMargin),e.stopy=e.starty+s+2*Ma.noteMargin,e.stopx=e.startx+n.width,Oa.insert(e.startx,e.starty,e.stopx,e.stopy),Oa.models.addNote(e)}(n,i);break;case ra.parser.yy.LINETYPE.ACTIVE_START:Oa.newActivation(t,n,r);break;case ra.parser.yy.LINETYPE.ACTIVE_END:!function(t,e){var r=Oa.endActivation(t);r.starty+18>e&&(r.starty=e-6,e+=12),Aa.drawActivation(n,r,e,Ma,Ra(t.from.actor).length),Oa.insert(r.startx,e-10,r.stopx,e)}(t,Oa.getVerticalPos());break;case ra.parser.yy.LINETYPE.LOOP_START:Pa(u,t,Ma.boxMargin,Ma.boxMargin+Ma.boxTextMargin,(function(t){return Oa.newLoop(t)}));break;case ra.parser.yy.LINETYPE.LOOP_END:e=Oa.endLoop(),Aa.drawLoop(n,e,"loop",Ma),Oa.bumpVerticalPos(e.stopy-Oa.getVerticalPos()),Oa.models.addLoop(e);break;case ra.parser.yy.LINETYPE.RECT_START:Pa(u,t,Ma.boxMargin,Ma.boxMargin,(function(t){return Oa.newLoop(void 0,t.message)}));break;case ra.parser.yy.LINETYPE.RECT_END:e=Oa.endLoop(),Aa.drawBackgroundRect(n,e),Oa.models.addLoop(e),Oa.bumpVerticalPos(e.stopy-Oa.getVerticalPos());break;case ra.parser.yy.LINETYPE.OPT_START:Pa(u,t,Ma.boxMargin,Ma.boxMargin+Ma.boxTextMargin,(function(t){return Oa.newLoop(t)}));break;case ra.parser.yy.LINETYPE.OPT_END:e=Oa.endLoop(),Aa.drawLoop(n,e,"opt",Ma),Oa.bumpVerticalPos(e.stopy-Oa.getVerticalPos()),Oa.models.addLoop(e);break;case ra.parser.yy.LINETYPE.ALT_START:Pa(u,t,Ma.boxMargin,Ma.boxMargin+Ma.boxTextMargin,(function(t){return Oa.newLoop(t)}));break;case ra.parser.yy.LINETYPE.ALT_ELSE:Pa(u,t,Ma.boxMargin+Ma.boxTextMargin,Ma.boxMargin,(function(t){return Oa.addSectionToLoop(t)}));break;case ra.parser.yy.LINETYPE.ALT_END:e=Oa.endLoop(),Aa.drawLoop(n,e,"alt",Ma),Oa.bumpVerticalPos(e.stopy-Oa.getVerticalPos()),Oa.models.addLoop(e);break;case ra.parser.yy.LINETYPE.PAR_START:Pa(u,t,Ma.boxMargin,Ma.boxMargin+Ma.boxTextMargin,(function(t){return Oa.newLoop(t)}));break;case ra.parser.yy.LINETYPE.PAR_AND:Pa(u,t,Ma.boxMargin+Ma.boxTextMargin,Ma.boxMargin,(function(t){return Oa.addSectionToLoop(t)}));break;case ra.parser.yy.LINETYPE.PAR_END:e=Oa.endLoop(),Aa.drawLoop(n,e,"par",Ma),Oa.bumpVerticalPos(e.stopy-Oa.getVerticalPos()),Oa.models.addLoop(e);break;default:try{(a=t.msgModel).starty=Oa.getVerticalPos(),a.sequenceIndex=l,function(t,e){Oa.bumpVerticalPos(10);var n=e.startx,r=e.stopx,i=e.starty,a=e.message,o=e.type,s=e.sequenceIndex,c=x.splitBreaks(a).length,u=W.calculateTextDimensions(a,Ba(Ma)),l=u.height/c;e.height+=l,Oa.bumpVerticalPos(l);var h=Aa.getTextObj();h.x=n,h.y=i+10,h.width=r-n,h.class="messageText",h.dy="1em",h.text=a,h.fontFamily=Ma.messageFontFamily,h.fontSize=Ma.messageFontSize,h.fontWeight=Ma.messageFontWeight,h.anchor=Ma.messageAlign,h.valign=Ma.messageAlign,h.textMargin=Ma.wrapPadding,h.tspan=!1,ka(t,h);var f,d,p=u.height-10,y=u.width;if(n===r){d=Oa.getVerticalPos()+p,Ma.rightAngles?f=t.append("path").attr("d","M ".concat(n,",").concat(d," H ").concat(n+Math.max(Ma.width/2,y/2)," V ").concat(d+25," H ").concat(n)):(p+=Ma.boxMargin,d=Oa.getVerticalPos()+p,f=t.append("path").attr("d","M "+n+","+d+" C "+(n+60)+","+(d-10)+" "+(n+60)+","+(d+30)+" "+n+","+(d+20))),p+=30;var g=Math.max(y/2,Ma.width/2);Oa.insert(n-g,Oa.getVerticalPos()-10+p,r+g,Oa.getVerticalPos()+30+p)}else p+=Ma.boxMargin,d=Oa.getVerticalPos()+p,(f=t.append("line")).attr("x1",n),f.attr("y1",d),f.attr("x2",r),f.attr("y2",d),Oa.insert(n,d-10,r,d);o===ra.parser.yy.LINETYPE.DOTTED||o===ra.parser.yy.LINETYPE.DOTTED_CROSS||o===ra.parser.yy.LINETYPE.DOTTED_POINT||o===ra.parser.yy.LINETYPE.DOTTED_OPEN?(f.style("stroke-dasharray","3, 3"),f.attr("class","messageLine1")):f.attr("class","messageLine0");var v="";Ma.arrowMarkerAbsolute&&(v=(v=(v=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),f.attr("stroke-width",2),f.attr("stroke","none"),f.style("fill","none"),o!==ra.parser.yy.LINETYPE.SOLID&&o!==ra.parser.yy.LINETYPE.DOTTED||f.attr("marker-end","url("+v+"#arrowhead)"),o!==ra.parser.yy.LINETYPE.SOLID_POINT&&o!==ra.parser.yy.LINETYPE.DOTTED_POINT||f.attr("marker-end","url("+v+"#filled-head)"),o!==ra.parser.yy.LINETYPE.SOLID_CROSS&&o!==ra.parser.yy.LINETYPE.DOTTED_CROSS||f.attr("marker-end","url("+v+"#crosshead)"),(xa.showSequenceNumbers()||Ma.showSequenceNumbers)&&(f.attr("marker-start","url("+v+"#sequencenumber)"),t.append("text").attr("x",n).attr("y",d+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("textLength","16px").attr("class","sequenceNumber").text(s)),Oa.bumpVerticalPos(p),e.height+=p,e.stopy=e.starty+e.height,Oa.insert(e.fromBounds,e.starty,e.toBounds,e.stopy)}(n,a),Oa.models.addMessage(a)}catch(t){c.error("error while drawing message",t)}}[ra.parser.yy.LINETYPE.SOLID_OPEN,ra.parser.yy.LINETYPE.DOTTED_OPEN,ra.parser.yy.LINETYPE.SOLID,ra.parser.yy.LINETYPE.DOTTED,ra.parser.yy.LINETYPE.SOLID_CROSS,ra.parser.yy.LINETYPE.DOTTED_CROSS,ra.parser.yy.LINETYPE.SOLID_POINT,ra.parser.yy.LINETYPE.DOTTED_POINT].includes(t.type)&&l++})),Ma.mirrorActors&&(Oa.bumpVerticalPos(2*Ma.boxMargin),La(n,r,i,Oa.getVerticalPos()));var f=Oa.getBounds().bounds;c.debug("For line height fix Querying: #"+e+" .actor-line"),Object(h.selectAll)("#"+e+" .actor-line").attr("y2",f.stopy);var d=f.stopy-f.starty+2*Ma.diagramMarginY;Ma.mirrorActors&&(d=d-Ma.boxMargin+Ma.bottomMarginAdj);var p=f.stopx-f.startx+2*Ma.diagramMarginX;o&&n.append("text").text(o).attr("x",(f.stopx-f.startx)/2-2*Ma.diagramMarginX).attr("y",-25),q(n,d,p,Ma.useMaxWidth);var y=o?40:0;n.attr("viewBox",f.startx-Ma.diagramMarginX+" -"+(Ma.diagramMarginY+y)+" "+p+" "+(d+y)),c.debug("models:",Oa.models)}},$a=n(22),qa=n.n($a);function Wa(t){return(Wa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Va,Ha=function(t){return JSON.parse(JSON.stringify(t))},Ga=[],Xa={root:{relations:[],states:{},documents:{}}},Za=Xa.root,Qa=0,Ka=function(t,e,n,r,i){void 0===Za.states[t]?Za.states[t]={id:t,descriptions:[],type:e,doc:n,note:i}:(Za.states[t].doc||(Za.states[t].doc=n),Za.states[t].type||(Za.states[t].type=e)),r&&(c.info("Adding state ",t,r),"string"==typeof r&&eo(t,r.trim()),"object"===Wa(r)&&r.forEach((function(e){return eo(t,e.trim())}))),i&&(Za.states[t].note=i)},Ja=function(){Za=(Xa={root:{relations:[],states:{},documents:{}}}).root,Za=Xa.root,Qa=0,0,ro=[]},to=function(t,e,n){var r=t,i=e,a="default",o="default";"[*]"===t&&(r="start"+ ++Qa,a="start"),"[*]"===e&&(i="end"+Qa,o="end"),Ka(r,a),Ka(i,o),Za.relations.push({id1:r,id2:i,title:n})},eo=function(t,e){var n=Za.states[t],r=e;":"===r[0]&&(r=r.substr(1).trim()),n.descriptions.push(r)},no=0,ro=[],io="TB",ao={parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().state},addState:Ka,clear:Ja,getState:function(t){return Za.states[t]},getStates:function(){return Za.states},getRelations:function(){return Za.relations},getClasses:function(){return ro},getDirection:function(){return io},addRelation:to,getDividerId:function(){return"divider-id-"+ ++no},setDirection:function(t){io=t},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:function(){c.info("Documents = ",Xa)},getRootDoc:function(){return Ga},setRootDoc:function(t){c.info("Setting root doc",t),Ga=t},getRootDocV2:function(){return function t(e,n,r){if("relation"===n.stmt)t(e,n.state1,!0),t(e,n.state2,!1);else if("state"===n.stmt&&"[*]"===n.id&&(n.id=r?e.id+"_start":e.id+"_end",n.start=r),n.doc){var i=[],a=0,o=[];for(a=0;a<n.doc.length;a++)if("divider"===n.doc[a].type){var s=Ha(n.doc[a]);s.doc=Ha(o),i.push(s),o=[]}else o.push(n.doc[a]);if(i.length>0&&o.length>0){var c={stmt:"state",id:I(),type:"divider",doc:Ha(o)};i.push(Ha(c)),n.doc=i}n.doc.forEach((function(e){return t(n,e,!0)}))}}({id:"root"},{id:"root",doc:Ga},!0),{id:"root",doc:Ga}},extract:function(t){var e;e=t.doc?t.doc:t,c.info(e),Ja(),c.info("Extract",e),e.forEach((function(t){"state"===t.stmt&&Ka(t.id,t.type,t.doc,t.description,t.note),"relation"===t.stmt&&to(t.state1.id,t.state2.id,t.description)}))},trimColon:function(t){return t&&":"===t[0]?t.substr(1).trim():t.trim()}},oo={},so=function(t,e){oo[t]=e},co=function(t,e){var n=t.append("text").attr("x",2*xt().state.padding).attr("y",xt().state.textHeight+1.3*xt().state.padding).attr("font-size",xt().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),r=n.height,i=t.append("text").attr("x",xt().state.padding).attr("y",r+.4*xt().state.padding+xt().state.dividerMargin+xt().state.textHeight).attr("class","state-description"),a=!0,o=!0;e.descriptions.forEach((function(t){a||(!function(t,e,n){var r=t.append("tspan").attr("x",2*xt().state.padding).text(e);n||r.attr("dy",xt().state.textHeight)}(i,t,o),o=!1),a=!1}));var s=t.append("line").attr("x1",xt().state.padding).attr("y1",xt().state.padding+r+xt().state.dividerMargin/2).attr("y2",xt().state.padding+r+xt().state.dividerMargin/2).attr("class","descr-divider"),c=i.node().getBBox(),u=Math.max(c.width,n.width);return s.attr("x2",u+3*xt().state.padding),t.insert("rect",":first-child").attr("x",xt().state.padding).attr("y",xt().state.padding).attr("width",u+2*xt().state.padding).attr("height",c.height+r+2*xt().state.padding).attr("rx",xt().state.radius),t},uo=function(t,e,n){var r,i=xt().state.padding,a=2*xt().state.padding,o=t.node().getBBox(),s=o.width,c=o.x,u=t.append("text").attr("x",0).attr("y",xt().state.titleShift).attr("font-size",xt().state.fontSize).attr("class","state-title").text(e.id),l=u.node().getBBox().width+a,h=Math.max(l,s);h===s&&(h+=a);var f=t.node().getBBox();e.doc,r=c-i,l>s&&(r=(s-h)/2+i),Math.abs(c-f.x)<i&&l>s&&(r=c-(l-s)/2);var d=1-xt().state.textHeight;return t.insert("rect",":first-child").attr("x",r).attr("y",d).attr("class",n?"alt-composit":"composit").attr("width",h).attr("height",f.height+xt().state.textHeight+xt().state.titleShift+1).attr("rx","0"),u.attr("x",r+i),l<=s&&u.attr("x",c+(h-a)/2-l/2+i),t.insert("rect",":first-child").attr("x",r).attr("y",xt().state.titleShift-xt().state.textHeight-xt().state.padding).attr("width",h).attr("height",3*xt().state.textHeight).attr("rx",xt().state.radius),t.insert("rect",":first-child").attr("x",r).attr("y",xt().state.titleShift-xt().state.textHeight-xt().state.padding).attr("width",h).attr("height",f.height+3+2*xt().state.textHeight).attr("rx",xt().state.radius),t},lo=function(t,e){e.attr("class","state-note");var n=e.append("rect").attr("x",0).attr("y",xt().state.padding),r=function(t,e,n,r){var i=0,a=r.append("text");a.style("text-anchor","start"),a.attr("class","noteText");var o=t.replace(/\r\n/g,"<br/>"),s=(o=o.replace(/\n/g,"<br/>")).split(x.lineBreakRegex),c=1.25*xt().state.noteMargin,u=!0,l=!1,h=void 0;try{for(var f,d=s[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var p=f.value.trim();if(p.length>0){var y=a.append("tspan");if(y.text(p),0===c)c+=y.node().getBBox().height;i+=c,y.attr("x",e+xt().state.noteMargin),y.attr("y",n+i+1.25*xt().state.noteMargin)}}}catch(t){l=!0,h=t}finally{try{u||null==d.return||d.return()}finally{if(l)throw h}}return{textWidth:a.node().getBBox().width,textHeight:i}}(t,0,0,e.append("g")),i=r.textWidth,a=r.textHeight;return n.attr("height",a+2*xt().state.noteMargin),n.attr("width",i+2*xt().state.noteMargin),n},ho=function(t,e){var n=e.id,r={id:n,label:e.id,width:0,height:0},i=t.append("g").attr("id",n).attr("class","stateGroup");"start"===e.type&&function(t){t.append("circle").attr("class","start-state").attr("r",xt().state.sizeUnit).attr("cx",xt().state.padding+xt().state.sizeUnit).attr("cy",xt().state.padding+xt().state.sizeUnit)}(i),"end"===e.type&&function(t){t.append("circle").attr("class","end-state-outer").attr("r",xt().state.sizeUnit+xt().state.miniPadding).attr("cx",xt().state.padding+xt().state.sizeUnit+xt().state.miniPadding).attr("cy",xt().state.padding+xt().state.sizeUnit+xt().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",xt().state.sizeUnit).attr("cx",xt().state.padding+xt().state.sizeUnit+2).attr("cy",xt().state.padding+xt().state.sizeUnit+2)}(i),"fork"!==e.type&&"join"!==e.type||function(t,e){var n=xt().state.forkWidth,r=xt().state.forkHeight;if(e.parentId){var i=n;n=r,r=i}t.append("rect").style("stroke","black").style("fill","black").attr("width",n).attr("height",r).attr("x",xt().state.padding).attr("y",xt().state.padding)}(i,e),"note"===e.type&&lo(e.note.text,i),"divider"===e.type&&function(t){t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",xt().state.textHeight).attr("class","divider").attr("x2",2*xt().state.textHeight).attr("y1",0).attr("y2",0)}(i),"default"===e.type&&0===e.descriptions.length&&function(t,e){var n=t.append("text").attr("x",2*xt().state.padding).attr("y",xt().state.textHeight+2*xt().state.padding).attr("font-size",xt().state.fontSize).attr("class","state-title").text(e.id),r=n.node().getBBox();t.insert("rect",":first-child").attr("x",xt().state.padding).attr("y",xt().state.padding).attr("width",r.width+2*xt().state.padding).attr("height",r.height+2*xt().state.padding).attr("rx",xt().state.radius)}(i,e),"default"===e.type&&e.descriptions.length>0&&co(i,e);var a=i.node().getBBox();return r.width=a.width+2*xt().state.padding,r.height=a.height+2*xt().state.padding,so(n,r),r},fo=0;$a.parser.yy=ao;var po={},yo=function t(e,n,r,i){var a,o=new zt.a.Graph({compound:!0,multigraph:!0}),s=!0;for(a=0;a<e.length;a++)if("relation"===e[a].stmt){s=!1;break}r?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:s?1:Va.edgeLengthFactor,nodeSep:s?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:s?1:Va.edgeLengthFactor,nodeSep:s?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel((function(){return{}})),ao.extract(e);for(var u=ao.getStates(),l=ao.getRelations(),f=Object.keys(u),d=0;d<f.length;d++){var p=u[f[d]];r&&(p.parentId=r);var y=void 0;if(p.doc){var g=n.append("g").attr("id",p.id).attr("class","stateGroup");y=t(p.doc,g,p.id,!i);var v=(g=uo(g,p,i)).node().getBBox();y.width=v.width,y.height=v.height+Va.padding/2,po[p.id]={y:Va.compositTitleSize}}else y=ho(n,p);if(p.note){var m={descriptions:[],id:p.id+"-note",note:p.note,type:"note"},b=ho(n,m);"left of"===p.note.position?(o.setNode(y.id+"-note",b),o.setNode(y.id,y)):(o.setNode(y.id,y),o.setNode(y.id+"-note",b)),o.setParent(y.id,y.id+"-group"),o.setParent(y.id+"-note",y.id+"-group")}else o.setNode(y.id,y)}c.debug("Count=",o.nodeCount(),o);var _=0;l.forEach((function(t){var e;_++,c.debug("Setting edge",t),o.setEdge(t.id1,t.id2,{relation:t,width:(e=t.title,e?e.length*Va.fontSizeFactor:1),height:Va.labelHeight*x.getRows(t.title).length,labelpos:"c"},"id"+_)})),jt.a.layout(o),c.debug("Graph after layout",o.nodes());var k=n.node();o.nodes().forEach((function(t){void 0!==t&&void 0!==o.node(t)?(c.warn("Node "+t+": "+JSON.stringify(o.node(t))),Object(h.select)("#"+k.id+" #"+t).attr("transform","translate("+(o.node(t).x-o.node(t).width/2)+","+(o.node(t).y+(po[t]?po[t].y:0)-o.node(t).height/2)+" )"),Object(h.select)("#"+k.id+" #"+t).attr("data-x-shift",o.node(t).x-o.node(t).width/2),document.querySelectorAll("#"+k.id+" #"+t+" .divider").forEach((function(t){var e=t.parentElement,n=0,r=0;e&&(e.parentElement&&(n=e.parentElement.getBBox().width),r=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(r)&&(r=0)),t.setAttribute("x1",0-r+8),t.setAttribute("x2",n-r-8)}))):c.debug("No Node "+t+": "+JSON.stringify(o.node(t)))}));var w=k.getBBox();o.edges().forEach((function(t){void 0!==t&&void 0!==o.edge(t)&&(c.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(o.edge(t))),function(t,e,n){e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var r=e.points,i=Object(h.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(h.curveBasis),a=t.append("path").attr("d",i(r)).attr("id","edge"+fo).attr("class","transition"),o="";if(xt().state.arrowMarkerAbsolute&&(o=(o=(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),a.attr("marker-end","url("+o+"#"+function(t){switch(t){case ao.relationType.AGGREGATION:return"aggregation";case ao.relationType.EXTENSION:return"extension";case ao.relationType.COMPOSITION:return"composition";case ao.relationType.DEPENDENCY:return"dependency"}}(ao.relationType.DEPENDENCY)+"End)"),void 0!==n.title){for(var s=t.append("g").attr("class","stateLabel"),u=W.calcLabelPosition(e.points),l=u.x,f=u.y,d=x.getRows(n.title),p=0,y=[],g=0,v=0,m=0;m<=d.length;m++){var b=s.append("text").attr("text-anchor","middle").text(d[m]).attr("x",l).attr("y",f+p),_=b.node().getBBox();if(g=Math.max(g,_.width),v=Math.min(v,_.x),c.info(_.x,l,f+p),0===p){var k=b.node().getBBox();p=k.height,c.info("Title height",p,f)}y.push(b)}var w=p*d.length;if(d.length>1){var E=(d.length-1)*p*.5;y.forEach((function(t,e){return t.attr("y",f+e*p-E)})),w=p*d.length}var T=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",l-g/2-xt().state.padding/2).attr("y",f-w/2-xt().state.padding/2-3.5).attr("width",g+xt().state.padding).attr("height",w+xt().state.padding),c.info(T)}fo++}(n,o.edge(t),o.edge(t).relation))})),w=k.getBBox();var E={id:r||"root",label:r||"root",width:0,height:0};return E.width=w.width+2*Va.padding,E.height=w.height+2*Va.padding,c.debug("Doc rendered",E,o),E},go=function(){},vo=function(t,e){Va=xt().state,$a.parser.yy.clear(),$a.parser.parse(t),c.debug("Rendering diagram "+t);var n=Object(h.select)("[id='".concat(e,"']"));n.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z"),new zt.a.Graph({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}}));var r=ao.getRootDoc();yo(r,n,void 0,!1);var i=Va.padding,a=n.node().getBBox(),o=a.width+2*i,s=a.height+2*i;q(n,s,1.75*o,Va.useMaxWidth),n.attr("viewBox","".concat(a.x-Va.padding," ").concat(a.y-Va.padding," ")+o+" "+s)},mo={},bo={},xo=function(t,e,n,r){if("root"!==n.id){var i="rect";!0===n.start&&(i="start"),!1===n.start&&(i="end"),"default"!==n.type&&(i=n.type),bo[n.id]||(bo[n.id]={id:n.id,shape:i,description:n.id,classes:"statediagram-state"}),n.description&&(Array.isArray(bo[n.id].description)?(bo[n.id].shape="rectWithTitle",bo[n.id].description.push(n.description)):bo[n.id].description.length>0?(bo[n.id].shape="rectWithTitle",bo[n.id].description===n.id?bo[n.id].description=[n.description]:bo[n.id].description=[bo[n.id].description,n.description]):(bo[n.id].shape="rect",bo[n.id].description=n.description)),!bo[n.id].type&&n.doc&&(c.info("Setting cluster for ",n.id,wo(n)),bo[n.id].type="group",bo[n.id].dir=wo(n),bo[n.id].shape="divider"===n.type?"divider":"roundedWithTitle",bo[n.id].classes=bo[n.id].classes+" "+(r?"statediagram-cluster statediagram-cluster-alt":"statediagram-cluster"));var a={labelStyle:"",shape:bo[n.id].shape,labelText:bo[n.id].description,classes:bo[n.id].classes,style:"",id:n.id,dir:bo[n.id].dir,domId:"state-"+n.id+"-"+_o,type:bo[n.id].type,padding:15};if(n.note){var o={labelStyle:"",shape:"note",labelText:n.note.text,classes:"statediagram-note",style:"",id:n.id+"----note-"+_o,domId:"state-"+n.id+"----note-"+_o,type:bo[n.id].type,padding:15},s={labelStyle:"",shape:"noteGroup",labelText:n.note.text,classes:bo[n.id].classes,style:"",id:n.id+"----parent",domId:"state-"+n.id+"----parent-"+_o,type:"group",padding:0};_o++,t.setNode(n.id+"----parent",s),t.setNode(o.id,o),t.setNode(n.id,a),t.setParent(n.id,n.id+"----parent"),t.setParent(o.id,n.id+"----parent");var u=n.id,l=o.id;"left of"===n.note.position&&(u=o.id,l=n.id),t.setEdge(u,l,{arrowhead:"none",arrowType:"",style:"fill:none",labelStyle:"",classes:"transition note-edge",arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal"})}else t.setNode(n.id,a)}e&&"root"!==e.id&&(c.trace("Setting node ",n.id," to be child of its parent ",e.id),t.setParent(n.id,e.id)),n.doc&&(c.trace("Adding nodes children "),ko(t,n,n.doc,!r))},_o=0,ko=function(t,e,n,r){c.trace("items",n),n.forEach((function(n){if("state"===n.stmt||"default"===n.stmt)xo(t,e,n,r);else if("relation"===n.stmt){xo(t,e,n.state1,r),xo(t,e,n.state2,r);var i={id:"edge"+_o,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:"fill:none",labelStyle:"",label:n.description,arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal",classes:"transition"},a=n.state1.id,o=n.state2.id;t.setEdge(a,o,i,_o),_o++}}))},wo=function(t,e){var n=e||"TB";if(t.doc)for(var r=0;r<t.doc.length;r++){var i=t.doc[r];"dir"===i.stmt&&(n=i.value)}return n},Eo=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)mo[e[n]]=t[e[n]]},To=function(t,e){c.info("Drawing state diagram (v2)",e),ao.clear(),bo={};var n=qa.a.parser;n.yy=ao,n.parse(t);var r=ao.getDirection();void 0===r&&(r="LR");var i=xt().state,a=i.nodeSpacing||50,o=i.rankSpacing||50;c.info(ao.getRootDocV2()),ao.extract(ao.getRootDocV2()),c.info(ao.getRootDocV2());var s=new zt.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:wo(ao.getRootDocV2()),nodesep:a,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));xo(s,void 0,ao.getRootDocV2(),!0);var u=Object(h.select)('[id="'.concat(e,'"]')),l=Object(h.select)("#"+e+" g");ze(l,s,["barb"],"statediagram",e);var f=u.node().getBBox(),d=f.width+16,p=f.height+16;u.attr("class","statediagram");var y=u.node().getBBox();q(u,p,1.75*d,i.useMaxWidth);var g="".concat(y.x-8," ").concat(y.y-8," ").concat(d," ").concat(p);if(c.debug("viewBox ".concat(g)),u.attr("viewBox",g),!i.htmlLabels)for(var v=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),m=0;m<v.length;m++){var b=v[m],x=b.getBBox(),_=document.createElementNS("http://www.w3.org/2000/svg","rect");_.setAttribute("rx",0),_.setAttribute("ry",0),_.setAttribute("width",x.width),_.setAttribute("height",x.height),b.insertBefore(_,b.firstChild)}};function Co(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var So="",Ao="",Mo=[],Oo=[],Bo=[],No=function(){for(var t=!0,e=0;e<Bo.length;e++)Bo[e].processed,t=t&&Bo[e].processed;return t},Do={parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().journey},clear:function(){Mo.length=0,Oo.length=0,Ao="",So="",Bo.length=0},setTitle:function(t){So=t},getTitle:function(){return So},addSection:function(t){Ao=t,Mo.push(t)},getSections:function(){return Mo},getTasks:function(){for(var t=No(),e=0;!t&&e<100;)t=No(),e++;return Oo.push.apply(Oo,Bo),Oo},addTask:function(t,e){var n=e.substr(1).split(":"),r=0,i=[];1===n.length?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(","));var a=i.map((function(t){return t.trim()})),o={section:Ao,type:Ao,people:a,task:t,score:r};Bo.push(o)},addTaskOrg:function(t){var e={section:Ao,type:Ao,description:t,task:t,classes:[]};Oo.push(e)},getActors:function(){return t=[],Oo.forEach((function(e){e.people&&t.push.apply(t,Co(e.people))})),Co(new Set(t)).sort();var t}},Lo=n(28),Io=n.n(Lo),Ro=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},Fo=function(t,e){var n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},Po=function(t,e){var n=e.text.replace(/<br\s*\/?>/gi," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(n),r},jo=-1,Yo=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},zo=function(){function t(t,e,n,i,a,o,s,c){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("font-color",c).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c,u){for(var l=c.taskFontSize,h=c.taskFontFamily,f=t.split(/<br\s*\/?>/gi),d=0;d<f.length;d++){var p=d*l-l*(f.length-1)/2,y=e.append("text").attr("x",n+a/2).attr("y",i).attr("fill",u).style("text-anchor","middle").style("font-size",l).style("font-family",h);y.append("tspan").attr("x",n+a/2).attr("dy",p).text(f[d]),y.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(y,s)}}function n(t,n,i,a,o,s,c,u){var l=n.append("switch"),h=l.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).attr("position","fixed").append("div").style("display","table").style("height","100%").style("width","100%");h.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,i,a,o,s,c,u),r(h,c)}function r(t,e){for(var n in e)n in e&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),Uo=Fo,$o=function(t,e,n){var r=t.append("g"),i=Yo();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,Ro(r,i),zo(n)(e.text,r,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},n,e.colour)},qo=Po,Wo=function(t,e,n){var r=e.x+n.width/2,i=t.append("g");jo++;var a,o,s;i.append("line").attr("id","task"+jo).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),a=i,o={cx:r,cy:300+30*(5-e.score),score:e.score},a.append("circle").attr("cx",o.cx).attr("cy",o.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),(s=a.append("g")).append("circle").attr("cx",o.cx-5).attr("cy",o.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",o.cx+5).attr("cy",o.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),o.score>3?function(t){var e=Object(h.arc)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+o.cx+","+(o.cy+2)+")")}(s):o.score<3?function(t){var e=Object(h.arc)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+o.cx+","+(o.cy+7)+")")}(s):function(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",o.cx-5).attr("y1",o.cy+7).attr("x2",o.cx+5).attr("y2",o.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}(s);var c=Yo();c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=n.width,c.height=n.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,Ro(i,c);var u=e.x+14;e.people.forEach((function(t){var n=e.actors[t],r={cx:u,cy:e.y,r:7,fill:n,stroke:"#000",title:t};Fo(i,r),u+=10})),zo(n)(e.task,i,c.x,c.y,c.width,c.height,{class:"task"},n,e.colour)},Vo=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")};Lo.parser.yy=Do;var Ho={};var Go=xt().journey,Xo=xt().journey.leftMargin,Zo={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i,a=xt().journey,o=this,s=0;this.sequenceItems.forEach((function(c){s++;var u=o.sequenceItems.length-s+1;o.updateVal(c,"starty",e-u*a.boxMargin,Math.min),o.updateVal(c,"stopy",r+u*a.boxMargin,Math.max),o.updateVal(Zo.data,"startx",t-u*a.boxMargin,Math.min),o.updateVal(Zo.data,"stopx",n+u*a.boxMargin,Math.max),"activation"!==i&&(o.updateVal(c,"startx",t-u*a.boxMargin,Math.min),o.updateVal(c,"stopx",n+u*a.boxMargin,Math.max),o.updateVal(Zo.data,"starty",e-u*a.boxMargin,Math.min),o.updateVal(Zo.data,"stopy",r+u*a.boxMargin,Math.max))}))},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(Zo.data,"startx",i,Math.min),this.updateVal(Zo.data,"starty",o,Math.min),this.updateVal(Zo.data,"stopx",a,Math.max),this.updateVal(Zo.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},Qo=Go.sectionFills,Ko=Go.sectionColours,Jo=function(t,e,n){for(var r=xt().journey,i="",a=n+(2*r.height+r.diagramMarginY),o=0,s="#CCC",c="black",u=0,l=0;l<e.length;l++){var h=e[l];if(i!==h.section){s=Qo[o%Qo.length],u=o%Qo.length,c=Ko[o%Ko.length];var f={x:l*r.taskMargin+l*r.width+Xo,y:50,text:h.section,fill:s,num:u,colour:c};$o(t,f,r),i=h.section,o++}var d=h.people.reduce((function(t,e){return Ho[e]&&(t[e]=Ho[e]),t}),{});h.x=l*r.taskMargin+l*r.width+Xo,h.y=a,h.width=r.diagramMarginX,h.height=r.diagramMarginY,h.colour=c,h.fill=s,h.num=u,h.actors=d,Wo(t,h,r),Zo.insert(h.x,h.y,h.x+h.width+r.taskMargin,450)}},ts=function(t){Object.keys(t).forEach((function(e){Go[e]=t[e]}))},es=function(t,e){var n=xt().journey;Lo.parser.yy.clear(),Lo.parser.parse(t+"\n"),Zo.init();var r=Object(h.select)("#"+e);r.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),Vo(r);var i=Lo.parser.yy.getTasks(),a=Lo.parser.yy.getTitle(),o=Lo.parser.yy.getActors();for(var s in Ho)delete Ho[s];var c=0;o.forEach((function(t){Ho[t]=n.actorColours[c%n.actorColours.length],c++})),function(t){var e=xt().journey,n=60;Object.keys(Ho).forEach((function(r){var i=Ho[r];Uo(t,{cx:20,cy:n,r:7,fill:i,stroke:"#000"});var a={x:40,y:n+7,fill:"#666",text:r,textMargin:5|e.boxTextMargin};qo(t,a),n+=20}))}(r),Zo.insert(0,0,Xo,50*Object.keys(Ho).length),Jo(r,i,0);var u=Zo.getBounds();a&&r.append("text").text(a).attr("x",Xo).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);var l=u.stopy-u.starty+2*n.diagramMarginY,f=Xo+u.stopx+2*n.diagramMarginX;q(r,l,f,n.useMaxWidth),r.append("line").attr("x1",Xo).attr("y1",4*n.height).attr("x2",f-Xo-4).attr("y2",4*n.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");var d=a?70:0;r.attr("viewBox","".concat(u.startx," -25 ").concat(f," ").concat(l+d)),r.attr("preserveAspectRatio","xMinYMin meet"),r.attr("height",l+d+25)},ns={},rs=function(t){Object.keys(t).forEach((function(e){ns[e]=t[e]}))},is=function(t,e){try{c.debug("Renering svg for syntax error\n");var n=Object(h.select)("#"+t),r=n.append("g");r.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),r.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),r.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),r.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),r.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),r.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),r.append("text").attr("class","error-text").attr("x",1240).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),r.append("text").attr("class","error-text").attr("x",1050).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+e),n.attr("height",100),n.attr("width",400),n.attr("viewBox","768 0 512 512")}catch(t){c.error("Error while rendering info diagram"),c.error(t.message)}},as=function(t){return"g.classGroup text {\n fill: ".concat(t.nodeBorder,";\n fill: ").concat(t.classText,";\n stroke: none;\n font-family: ").concat(t.fontFamily,";\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ").concat(t.nodeBorder,";\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.classGroup line {\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ").concat(t.nodeBorder,";\n font-size: 10px;\n}\n\n.relation {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n#compositionStart, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n")},os=function(t){return".label {\n font-family: ".concat(t.fontFamily,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n .cluster-label text {\n fill: ").concat(t.titleColor,";\n }\n .cluster-label span {\n color: ").concat(t.titleColor,";\n }\n\n .label text,span {\n fill: ").concat(t.nodeTextColor||t.textColor,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n background-color: ").concat(t.edgeLabelBackground,";\n fill: ").concat(t.edgeLabelBackground,";\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ").concat(t.clusterBkg,";\n stroke: ").concat(t.clusterBorder,";\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n .cluster span {\n color: ").concat(t.titleColor,";\n }\n // .cluster div {\n // color: ").concat(t.titleColor,";\n // }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ").concat(t.fontFamily,";\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n")},ss=function(t){return"\ndefs #statediagram-barbEnd {\n fill: ".concat(t.transitionColor,";\n stroke: ").concat(t.transitionColor,";\n }\ng.stateGroup text {\n fill: ").concat(t.nodeBorder,";\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ").concat(t.textColor,";\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ").concat(t.stateLabelColor,";\n}\n\ng.stateGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.stateGroup line {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n\n.transition {\n stroke: ").concat(t.transitionColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ").concat(t.background,";\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n\n text {\n fill: ").concat(t.noteTextColor,";\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ").concat(t.labelBackgroundColor,";\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ").concat(t.transitionLabelColor||t.tertiaryTextColor,";\n}\n.label div .edgeLabel {\n color: ").concat(t.transitionLabelColor||t.tertiaryTextColor,";\n}\n\n.stateLabel text {\n fill: ").concat(t.stateLabelColor,";\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ").concat(t.lineColor,";\n stroke: black;\n}\n.node circle.state-end {\n fill: ").concat(t.primaryBorderColor,";\n stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ").concat(t.compositeBackground||t.background,";\n // stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ").concat(t.stateBkg||t.mainBkg,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n stroke-width: 1px;\n}\n.node polygon {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ").concat(t.lineColor,";\n}\n\n.statediagram-cluster rect {\n fill: ").concat(t.compositeTitleBackground,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ").concat(t.stateLabelColor,";\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ").concat(t.compositeBackground||t.background,";\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ").concat(t.altBackground?t.altBackground:"#efefef",";\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ").concat(t.altBackground?t.altBackground:"#efefef",";\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ").concat(t.noteTextColor,";\n}\n\n.statediagram-note .nodeLabel {\n color: ").concat(t.noteTextColor,";\n}\n.statediagram .edgeLabel {\n color: red; // ").concat(t.noteTextColor,";\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ").concat(t.lineColor,";\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n")},cs={flowchart:os,"flowchart-v2":os,sequence:function(t){return".actor {\n stroke: ".concat(t.actorBorder,";\n fill: ").concat(t.actorBkg,";\n }\n\n text.actor > tspan {\n fill: ").concat(t.actorTextColor,";\n stroke: none;\n }\n\n .actor-line {\n stroke: ").concat(t.actorLineColor,";\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ").concat(t.signalColor,";\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.signalColor,";\n }\n\n #arrowhead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .sequenceNumber {\n fill: ").concat(t.sequenceNumberColor,";\n }\n\n #sequencenumber {\n fill: ").concat(t.signalColor,";\n }\n\n #crosshead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .messageText {\n fill: ").concat(t.signalTextColor,";\n stroke: ").concat(t.signalTextColor,";\n }\n\n .labelBox {\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBkgColor,";\n }\n\n .labelText, .labelText > tspan {\n fill: ").concat(t.labelTextColor,";\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ").concat(t.loopTextColor,";\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBorderColor,";\n }\n\n .note {\n //stroke: #decc93;\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n }\n\n .noteText, .noteText > tspan {\n fill: ").concat(t.noteTextColor,";\n stroke: none;\n }\n\n .activation0 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation1 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation2 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n")},gantt:function(t){return'\n .mermaid-main-font {\n font-family: "trebuchet ms", verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: '.concat(t.sectionBkgColor,";\n }\n\n .section2 {\n fill: ").concat(t.sectionBkgColor2,";\n }\n\n .section1,\n .section3 {\n fill: ").concat(t.altSectionBkgColor,";\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle1 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle2 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle3 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle {\n text-anchor: start;\n // font-size: ").concat(t.ganttFontSize,";\n // text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ").concat(t.gridColor,";\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.textColor,";\n }\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ").concat(t.todayLineColor,";\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n // .taskText:not([font-size]) {\n // font-size: ").concat(t.ganttFontSize,";\n // }\n\n .taskTextOutsideRight {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: start;\n // font-size: ").concat(t.ganttFontSize,";\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: end;\n // font-size: ").concat(t.ganttFontSize,";\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ").concat(t.taskTextColor,";\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ").concat(t.taskBkgColor,";\n stroke: ").concat(t.taskBorderColor,";\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ").concat(t.activeTaskBkgColor,";\n stroke: ").concat(t.activeTaskBorderColor,";\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ").concat(t.doneTaskBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.critBkgColor,";\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.activeTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ").concat(t.textColor," ;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n")},classDiagram:as,"classDiagram-v2":as,class:as,stateDiagram:ss,state:ss,git:function(){return"\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n"},info:function(){return""},pie:function(t){return"\n .pieCircle{\n stroke: ".concat(t.pieStrokeColor,";\n stroke-width : ").concat(t.pieStrokeWidth,";\n opacity : ").concat(t.pieOpacity,";\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ").concat(t.pieTitleTextSize,";\n fill: ").concat(t.pieTitleTextColor,";\n font-family: ").concat(t.fontFamily,";\n }\n .slice {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.pieSectionTextColor,";\n font-size:").concat(t.pieSectionTextSize,";\n // fill: white;\n }\n .legend text {\n fill: ").concat(t.pieLegendTextColor,";\n font-family: ").concat(t.fontFamily,";\n font-size: ").concat(t.pieLegendTextSize,";\n }\n")},er:function(t){return"\n .entityBox {\n fill: ".concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n }\n\n .attributeBoxOdd {\n fill: #ffffff;\n stroke: ").concat(t.nodeBorder,";\n }\n\n .attributeBoxEven {\n fill: #f2f2f2;\n stroke: ").concat(t.nodeBorder,";\n }\n\n .relationshipLabelBox {\n fill: ").concat(t.tertiaryColor,";\n opacity: 0.7;\n background-color: ").concat(t.tertiaryColor,";\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ").concat(t.lineColor,";\n }\n")},journey:function(t){return".label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ".concat(t.textColor,";\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ").concat(t.textColor,"\n }\n\n .legend {\n fill: ").concat(t.textColor,";\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ").concat(t.textColor,"\n }\n\n .face {\n fill: #FFF8DC;\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType0):"",";\n }\n .task-type-1, .section-type-1 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType1):"",";\n }\n .task-type-2, .section-type-2 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType2):"",";\n }\n .task-type-3, .section-type-3 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType3):"",";\n }\n .task-type-4, .section-type-4 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType4):"",";\n }\n .task-type-5, .section-type-5 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType5):"",";\n }\n .task-type-6, .section-type-6 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType6):"",";\n }\n .task-type-7, .section-type-7 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType7):"",";\n }\n")},requirement:function(t){return"\n\n marker {\n fill: ".concat(t.relationColor,";\n stroke: ").concat(t.relationColor,";\n }\n\n marker.cross {\n stroke: ").concat(t.lineColor,";\n }\n\n svg {\n font-family: ").concat(t.fontFamily,";\n font-size: ").concat(t.fontSize,";\n }\n\n .reqBox {\n fill: ").concat(t.requirementBackground,";\n fill-opacity: 100%;\n stroke: ").concat(t.requirementBorderColor,";\n stroke-width: ").concat(t.requirementBorderSize,";\n }\n \n .reqTitle, .reqLabel{\n fill: ").concat(t.requirementTextColor,";\n }\n .reqLabelBox {\n fill: ").concat(t.relationLabelBackground,";\n fill-opacity: 100%;\n }\n\n .req-title-line {\n stroke: ").concat(t.requirementBorderColor,";\n stroke-width: ").concat(t.requirementBorderSize,";\n }\n .relationshipLine {\n stroke: ").concat(t.relationColor,";\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ").concat(t.relationLabelColor,";\n }\n\n")}},us=function(t,e,n){return" {\n font-family: ".concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n fill: ").concat(n.textColor,"\n }\n\n /* Classes common for multiple diagrams */\n\n .error-icon {\n fill: ").concat(n.errorBkgColor,";\n }\n .error-text {\n fill: ").concat(n.errorTextColor,";\n stroke: ").concat(n.errorTextColor,";\n }\n\n .edge-thickness-normal {\n stroke-width: 2px;\n }\n .edge-thickness-thick {\n stroke-width: 3.5px\n }\n .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n .marker {\n fill: ").concat(n.lineColor,";\n stroke: ").concat(n.lineColor,";\n }\n .marker.cross {\n stroke: ").concat(n.lineColor,";\n }\n\n svg {\n font-family: ").concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n }\n\n ").concat(cs[t](n),"\n\n ").concat(e,"\n")};function ls(t){return(ls="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var hs={},fs=function(t,e,n){switch(c.debug("Directive type=".concat(e.type," with args:"),e.args),e.type){case"init":case"initialize":["config"].forEach((function(t){void 0!==e.args[t]&&("flowchart-v2"===n&&(n="flowchart"),e.args[n]=e.args[t],delete e.args[t])})),e.args,kt(e.args);break;case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap("wrap"===e.type);break;default:c.warn("Unhandled directive: source: '%%{".concat(e.type,": ").concat(JSON.stringify(e.args?e.args:{}),"}%%"),e)}};function ds(t){bi(t.git),nr(t.flowchart),cr(t.flowchart),void 0!==t.sequenceDiagram&&Ua.setConf(F(t.sequence,t.sequenceDiagram)),Ua.setConf(t.sequence),Wr(t.gantt),re(t.class),go(t.state),Eo(t.state),Si(t.class),sn(t.er),ts(t.journey),ea(t.requirement),rs(t.class)}function ps(){}var ys=Object.freeze({render:function(t,e,n,r){wt();var i=e,a=W.detectInit(i);a&&kt(a);var o=xt();if(e.length>o.maxTextSize&&(i="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa"),void 0!==r)r.innerHTML="",Object(h.select)(r).append("div").attr("id","d"+t).attr("style","font-family: "+o.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g");else{var s=document.getElementById(t);s&&s.remove();var u=document.querySelector("#d"+t);u&&u.remove(),Object(h.select)("body").append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}window.txt=i,i=function(t){var e=t;return e=(e=(e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)}))).replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)}))).replace(/#\w+;/g,(function(t){var e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}))}(i);var l=Object(h.select)("#d"+t).node(),f=W.detectType(i,o),y=l.firstChild,g=y.firstChild,v="";if(void 0!==o.themeCSS&&(v+="\n".concat(o.themeCSS)),void 0!==o.fontFamily&&(v+="\n:root { --mermaid-font-family: ".concat(o.fontFamily,"}")),void 0!==o.altFontFamily&&(v+="\n:root { --mermaid-alt-font-family: ".concat(o.altFontFamily,"}")),"flowchart"===f||"flowchart-v2"===f||"graph"===f){var m=rr(i);for(var b in m)o.htmlLabels||o.flowchart.htmlLabels?(v+="\n.".concat(b," > * { ").concat(m[b].styles.join(" !important; ")," !important; }"),v+="\n.".concat(b," span { ").concat(m[b].styles.join(" !important; ")," !important; }")):(v+="\n.".concat(b," path { ").concat(m[b].styles.join(" !important; ")," !important; }"),v+="\n.".concat(b," rect { ").concat(m[b].styles.join(" !important; ")," !important; }"),v+="\n.".concat(b," polygon { ").concat(m[b].styles.join(" !important; ")," !important; }"),v+="\n.".concat(b," ellipse { ").concat(m[b].styles.join(" !important; ")," !important; }"),v+="\n.".concat(b," circle { ").concat(m[b].styles.join(" !important; ")," !important; }"),m[b].textStyles&&(v+="\n.".concat(b," tspan { ").concat(m[b].textStyles.join(" !important; ")," !important; }")))}var x=(new d.a)("#".concat(t),us(f,v,o.themeVariables)),_=document.createElement("style");_.innerHTML=x,y.insertBefore(_,g);try{switch(f){case"git":o.flowchart.arrowMarkerAbsolute=o.arrowMarkerAbsolute,bi(o.git),xi(i,t,!1);break;case"flowchart":o.flowchart.arrowMarkerAbsolute=o.arrowMarkerAbsolute,nr(o.flowchart),ir(i,t,!1);break;case"flowchart-v2":o.flowchart.arrowMarkerAbsolute=o.arrowMarkerAbsolute,cr(o.flowchart),ur(i,t,!1);break;case"sequence":o.sequence.arrowMarkerAbsolute=o.arrowMarkerAbsolute,o.sequenceDiagram?(Ua.setConf(Object.assign(o.sequence,o.sequenceDiagram)),console.error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.")):Ua.setConf(o.sequence),Ua.draw(i,t);break;case"gantt":o.gantt.arrowMarkerAbsolute=o.arrowMarkerAbsolute,Wr(o.gantt),Vr(i,t);break;case"class":o.class.arrowMarkerAbsolute=o.arrowMarkerAbsolute,re(o.class),ie(i,t);break;case"classDiagram":o.class.arrowMarkerAbsolute=o.arrowMarkerAbsolute,$e(o.class),qe(i,t);break;case"state":o.class.arrowMarkerAbsolute=o.arrowMarkerAbsolute,go(o.state),vo(i,t);break;case"stateDiagram":o.class.arrowMarkerAbsolute=o.arrowMarkerAbsolute,Eo(o.state),To(i,t);break;case"info":o.class.arrowMarkerAbsolute=o.arrowMarkerAbsolute,Si(o.class),Ai(i,t,p.version);break;case"pie":Ri(i,t,p.version);break;case"er":sn(o.er),cn(i,t,p.version);break;case"journey":ts(o.journey),es(i,t,p.version);break;case"requirement":ea(o.requirement),na(i,t,p.version)}}catch(e){throw is(t,p.version),e}Object(h.select)('[id="'.concat(t,'"]')).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");var k=Object(h.select)("#d"+t).node().innerHTML;if(c.debug("cnf.arrowMarkerAbsolute",o.arrowMarkerAbsolute),o.arrowMarkerAbsolute&&"false"!==o.arrowMarkerAbsolute||(k=k.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),k=(k=function(t){var e=t;return e=(e=(e=e.replace(/fl°°/g,(function(){return"&#"}))).replace(/fl°/g,(function(){return"&"}))).replace(/¶ß/g,(function(){return";"}))}(k)).replace(/<br>/g,"<br/>"),void 0!==n)switch(f){case"flowchart":case"flowchart-v2":n(k,Dn.bindFunctions);break;case"gantt":n(k,Yr.bindFunctions);break;case"class":case"classDiagram":n(k,Ft.bindFunctions);break;default:n(k)}else c.debug("CB = undefined!");var w=Object(h.select)("#d"+t).node();return null!==w&&"function"==typeof w.remove&&Object(h.select)("#d"+t).node().remove(),k},parse:function(t){var e=xt(),n=W.detectInit(t,e);n&&c.debug("reinit ",n);var r,i=W.detectType(t,e);switch(c.debug("Type "+i),i){case"git":(r=ci.a).parser.yy=oi;break;case"flowchart":case"flowchart-v2":Dn.clear(),(r=In.a).parser.yy=Dn;break;case"sequence":(r=ia.a).parser.yy=xa;break;case"gantt":(r=$r.a).parser.yy=Yr;break;case"class":case"classDiagram":(r=$t.a).parser.yy=Ft;break;case"state":case"stateDiagram":(r=qa.a).parser.yy=ao;break;case"info":c.debug("info info info"),(r=Ti.a).parser.yy=wi;break;case"pie":c.debug("pie"),(r=Oi.a).parser.yy=Li;break;case"er":c.debug("er"),(r=Ke.a).parser.yy=Ze;break;case"journey":c.debug("Journey"),(r=Io.a).parser.yy=Do;break;case"requirement":case"requirementDiagram":c.debug("RequirementDiagram"),(r=Pi.a).parser.yy=qi}return r.parser.yy.graphType=i,r.parser.yy.parseError=function(t,e){throw{str:t,hash:e}},r.parse(t),r},parseDirective:function(t,e,n,r){try{if(void 0!==e)switch(e=e.trim(),n){case"open_directive":hs={};break;case"type_directive":hs.type=e.toLowerCase();break;case"arg_directive":hs.args=JSON.parse(e);break;case"close_directive":fs(t,hs,r),hs=null}}catch(t){c.error("Error while rendering sequenceDiagram directive: ".concat(e," jison context: ").concat(n)),c.error(t.message)}},initialize:function(t){t&&t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),dt=F({},t),t&&t.theme&&ut[t.theme]?t.themeVariables=ut[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ut.default.getThemeVariables(t.themeVariables));var e="object"===ls(t)?function(t){return yt=F({},pt),yt=F(yt,t),t.theme&&(yt.themeVariables=ut[t.theme].getThemeVariables(t.themeVariables)),vt=mt(yt,gt),yt}(t):bt();ds(e),u(e.logLevel)},reinitialize:ps,getConfig:xt,setConfig:function(t){return F(vt,t),xt()},getSiteConfig:bt,updateSiteConfig:function(t){return yt=F(yt,t),mt(yt,gt),yt},reset:function(){wt()},globalReset:function(){wt(),ds(xt())},defaultConfig:pt});u(xt().logLevel),wt(xt());var gs=ys,vs=function(){ms.startOnLoad?gs.getConfig().startOnLoad&&ms.init():void 0===ms.startOnLoad&&(c.debug("In start, no config"),gs.getConfig().startOnLoad&&ms.init())};"undefined"!=typeof document&&
-/*!
- * Wait for document loaded before starting the execution
- */
-window.addEventListener("load",(function(){vs()}),!1);var ms={startOnLoad:!0,htmlLabels:!0,mermaidAPI:gs,parse:gs.parse,render:gs.render,init:function(){var t,e,n=this,r=gs.getConfig();arguments.length>=2?(
-/*! sequence config was passed as #1 */
-void 0!==arguments[0]&&(ms.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],"function"==typeof arguments[arguments.length-1]?(e=arguments[arguments.length-1],c.debug("Callback function found")):void 0!==r.mermaid&&("function"==typeof r.mermaid.callback?(e=r.mermaid.callback,c.debug("Callback function found")):c.debug("No Callback function found")),t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof window.Node?[t]:t,c.debug("Start On Load before: "+ms.startOnLoad),void 0!==ms.startOnLoad&&(c.debug("Start On Load inner: "+ms.startOnLoad),gs.updateSiteConfig({startOnLoad:ms.startOnLoad})),void 0!==ms.ganttConfig&&gs.updateSiteConfig({gantt:ms.ganttConfig});for(var a,o=new W.initIdGeneratior(r.deterministicIds,r.deterministicIDSeed),s=function(r){var s=t[r];
-/*! Check if previously processed */if(s.getAttribute("data-processed"))return"continue";s.setAttribute("data-processed",!0);var u="mermaid-".concat(o.next());a=i(a=s.innerHTML).trim().replace(/<br\s*\/?>/gi,"<br/>");var l=W.detectInit(a);l&&c.debug("Detected early reinit: ",l);try{gs.render(u,a,(function(t,n){s.innerHTML=t,void 0!==e&&e(u),n&&n(s)}),s)}catch(t){c.warn("Syntax Error rendering"),c.warn(t),n.parseError&&n.parseError(t)}},u=0;u<t.length;u++)s(u)},initialize:function(t){void 0!==t.mermaid&&(void 0!==t.mermaid.startOnLoad&&(ms.startOnLoad=t.mermaid.startOnLoad),void 0!==t.mermaid.htmlLabels&&(ms.htmlLabels=t.mermaid.htmlLabels)),gs.initialize(t)},contentLoaded:vs};e.default=ms}]).default}));
+/*! For license information please see mermaid.min.js.LICENSE.txt */
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mermaid=e():t.mermaid=e()}("undefined"!=typeof self?self:this,(()=>(()=>{var t={1362:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,7],r=[1,8],i=[1,9],a=[1,10],o=[1,13],s=[1,12],c=[1,16,25],u=[1,20],l=[1,31],h=[1,32],f=[1,33],d=[1,35],p=[1,38],g=[1,36],y=[1,37],m=[1,39],v=[1,40],b=[1,41],_=[1,42],x=[1,45],w=[1,46],k=[1,47],T=[1,48],C=[16,25],E=[1,62],S=[1,63],A=[1,64],M=[1,65],N=[1,66],D=[1,67],B=[16,25,32,44,45,53,56,57,58,59,60,61,66,68],L=[16,25,30,32,44,45,49,53,56,57,58,59,60,61,66,68,83,84,85,86],O=[5,8,9,10,11,16,19,23,25],I=[53,83,84,85,86],R=[53,60,61,83,84,85,86],F=[53,56,57,58,59,83,84,85,86],P=[16,25,32],Y=[1,99],j={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statments:5,direction:6,directive:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,statements:24,EOF:25,statement:26,className:27,alphaNumToken:28,classLiteralName:29,GENERICTYPE:30,relationStatement:31,LABEL:32,classStatement:33,methodStatement:34,annotationStatement:35,clickStatement:36,cssClassStatement:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,CLASS:43,STYLE_SEPARATOR:44,STRUCT_START:45,members:46,STRUCT_STOP:47,ANNOTATION_START:48,ANNOTATION_END:49,MEMBER:50,SEPARATOR:51,relation:52,STR:53,relationType:54,lineType:55,AGGREGATION:56,EXTENSION:57,COMPOSITION:58,DEPENDENCY:59,LINE:60,DOTTED_LINE:61,CALLBACK:62,LINK:63,LINK_TARGET:64,CLICK:65,CALLBACK_NAME:66,CALLBACK_ARGS:67,HREF:68,CSSCLASS:69,commentToken:70,textToken:71,graphCodeTokens:72,textNoTagsToken:73,TAGSTART:74,TAGEND:75,"==":76,"--":77,PCT:78,DEFAULT:79,SPACE:80,MINUS:81,keywords:82,UNICODE_TEXT:83,NUM:84,ALPHA:85,BQUOTE_STR:86,$accept:0,$end:1},terminals_:{2:"error",5:"statments",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",25:"EOF",30:"GENERICTYPE",32:"LABEL",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"CLASS",44:"STYLE_SEPARATOR",45:"STRUCT_START",47:"STRUCT_STOP",48:"ANNOTATION_START",49:"ANNOTATION_END",50:"MEMBER",51:"SEPARATOR",53:"STR",56:"AGGREGATION",57:"EXTENSION",58:"COMPOSITION",59:"DEPENDENCY",60:"LINE",61:"DOTTED_LINE",62:"CALLBACK",63:"LINK",64:"LINK_TARGET",65:"CLICK",66:"CALLBACK_NAME",67:"CALLBACK_ARGS",68:"HREF",69:"CSSCLASS",72:"graphCodeTokens",74:"TAGSTART",75:"TAGEND",76:"==",77:"--",78:"PCT",79:"DEFAULT",80:"SPACE",81:"MINUS",82:"keywords",83:"UNICODE_TEXT",84:"NUM",85:"ALPHA",86:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[3,1],[3,2],[6,1],[6,1],[6,1],[6,1],[4,1],[7,4],[7,6],[13,1],[14,1],[18,1],[15,1],[12,4],[24,1],[24,2],[24,3],[27,1],[27,1],[27,2],[27,2],[27,2],[26,1],[26,2],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,2],[26,2],[26,1],[33,2],[33,4],[33,5],[33,7],[35,4],[46,1],[46,2],[34,1],[34,2],[34,1],[34,1],[31,3],[31,4],[31,4],[31,5],[52,3],[52,2],[52,2],[52,1],[54,1],[54,1],[54,1],[54,1],[55,1],[55,1],[36,3],[36,4],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[37,3],[70,1],[70,1],[71,1],[71,1],[71,1],[71,1],[71,1],[71,1],[71,1],[73,1],[73,1],[73,1],[73,1],[28,1],[28,1],[28,1],[29,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.setDirection("TB");break;case 6:r.setDirection("BT");break;case 7:r.setDirection("RL");break;case 8:r.setDirection("LR");break;case 12:r.parseDirective("%%{","open_directive");break;case 13:r.parseDirective(a[s],"type_directive");break;case 14:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 15:r.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=a[s];break;case 22:this.$=a[s-1]+a[s];break;case 23:case 24:this.$=a[s-1]+"~"+a[s];break;case 25:r.addRelation(a[s]);break;case 26:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 34:this.$=a[s].trim(),r.setTitle(this.$);break;case 35:case 36:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 37:r.addClass(a[s]);break;case 38:r.addClass(a[s-2]),r.setCssClass(a[s-2],a[s]);break;case 39:r.addClass(a[s-3]),r.addMembers(a[s-3],a[s-1]);break;case 40:r.addClass(a[s-5]),r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 41:r.addAnnotation(a[s],a[s-2]);break;case 42:this.$=[a[s]];break;case 43:a[s].push(a[s-1]),this.$=a[s];break;case 44:case 46:case 47:break;case 45:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 48:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 49:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:"none"};break;case 50:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:"none",relationTitle2:a[s-1]};break;case 51:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 52:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 53:this.$={type1:"none",type2:a[s],lineType:a[s-1]};break;case 54:this.$={type1:a[s-1],type2:"none",lineType:a[s]};break;case 55:this.$={type1:"none",type2:"none",lineType:a[s]};break;case 56:this.$=r.relationType.AGGREGATION;break;case 57:this.$=r.relationType.EXTENSION;break;case 58:this.$=r.relationType.COMPOSITION;break;case 59:this.$=r.relationType.DEPENDENCY;break;case 60:this.$=r.lineType.LINE;break;case 61:this.$=r.lineType.DOTTED_LINE;break;case 62:case 68:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 63:case 69:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 64:case 72:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 65:case 73:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 66:case 74:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 67:case 75:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 70:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 71:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 76:r.setCssClass(a[s-1],a[s])}},table:[{3:1,4:2,5:e,6:4,7:5,8:n,9:r,10:i,11:a,12:6,13:11,19:o,23:s},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:e,6:4,7:5,8:n,9:r,10:i,11:a,12:6,13:11,19:o,23:s},{1:[2,9]},t(c,[2,5]),t(c,[2,6]),t(c,[2,7]),t(c,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:u},t([17,22],[2,13]),{6:30,7:29,8:n,9:r,10:i,11:a,13:11,19:o,24:21,26:22,27:34,28:43,29:44,31:23,33:24,34:25,35:26,36:27,37:28,38:l,40:h,42:f,43:d,48:p,50:g,51:y,62:m,63:v,65:b,69:_,83:x,84:w,85:k,86:T},{16:[1,49]},{18:50,21:[1,51]},{16:[2,15]},{25:[1,52]},{16:[1,53],25:[2,17]},t(C,[2,25],{32:[1,54]}),t(C,[2,27]),t(C,[2,28]),t(C,[2,29]),t(C,[2,30]),t(C,[2,31]),t(C,[2,32]),t(C,[2,33]),{39:[1,55]},{41:[1,56]},t(C,[2,36]),t(C,[2,44],{52:57,54:60,55:61,32:[1,59],53:[1,58],56:E,57:S,58:A,59:M,60:N,61:D}),{27:68,28:43,29:44,83:x,84:w,85:k,86:T},t(C,[2,46]),t(C,[2,47]),{28:69,83:x,84:w,85:k},{27:70,28:43,29:44,83:x,84:w,85:k,86:T},{27:71,28:43,29:44,83:x,84:w,85:k,86:T},{27:72,28:43,29:44,83:x,84:w,85:k,86:T},{53:[1,73]},t(B,[2,20],{28:43,29:44,27:74,30:[1,75],83:x,84:w,85:k,86:T}),t(B,[2,21],{30:[1,76]}),t(L,[2,90]),t(L,[2,91]),t(L,[2,92]),t([16,25,30,32,44,45,53,56,57,58,59,60,61,66,68],[2,93]),t(O,[2,10]),{15:77,22:u},{22:[2,14]},{1:[2,16]},{6:30,7:29,8:n,9:r,10:i,11:a,13:11,19:o,24:78,25:[2,18],26:22,27:34,28:43,29:44,31:23,33:24,34:25,35:26,36:27,37:28,38:l,40:h,42:f,43:d,48:p,50:g,51:y,62:m,63:v,65:b,69:_,83:x,84:w,85:k,86:T},t(C,[2,26]),t(C,[2,34]),t(C,[2,35]),{27:79,28:43,29:44,53:[1,80],83:x,84:w,85:k,86:T},{52:81,54:60,55:61,56:E,57:S,58:A,59:M,60:N,61:D},t(C,[2,45]),{55:82,60:N,61:D},t(I,[2,55],{54:83,56:E,57:S,58:A,59:M}),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,59]),t(F,[2,60]),t(F,[2,61]),t(C,[2,37],{44:[1,84],45:[1,85]}),{49:[1,86]},{53:[1,87]},{53:[1,88]},{66:[1,89],68:[1,90]},{28:91,83:x,84:w,85:k},t(B,[2,22]),t(B,[2,23]),t(B,[2,24]),{16:[1,92]},{25:[2,19]},t(P,[2,48]),{27:93,28:43,29:44,83:x,84:w,85:k,86:T},{27:94,28:43,29:44,53:[1,95],83:x,84:w,85:k,86:T},t(I,[2,54],{54:96,56:E,57:S,58:A,59:M}),t(I,[2,53]),{28:97,83:x,84:w,85:k},{46:98,50:Y},{27:100,28:43,29:44,83:x,84:w,85:k,86:T},t(C,[2,62],{53:[1,101]}),t(C,[2,64],{53:[1,103],64:[1,102]}),t(C,[2,68],{53:[1,104],67:[1,105]}),t(C,[2,72],{53:[1,107],64:[1,106]}),t(C,[2,76]),t(O,[2,11]),t(P,[2,50]),t(P,[2,49]),{27:108,28:43,29:44,83:x,84:w,85:k,86:T},t(I,[2,52]),t(C,[2,38],{45:[1,109]}),{47:[1,110]},{46:111,47:[2,42],50:Y},t(C,[2,41]),t(C,[2,63]),t(C,[2,65]),t(C,[2,66],{64:[1,112]}),t(C,[2,69]),t(C,[2,70],{53:[1,113]}),t(C,[2,73]),t(C,[2,74],{64:[1,114]}),t(P,[2,51]),{46:115,50:Y},t(C,[2,39]),{47:[2,43]},t(C,[2,67]),t(C,[2,71]),t(C,[2,75]),{47:[1,116]},t(C,[2,40])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],6:[2,9],13:[2,12],14:[2,4],20:[2,15],51:[2,14],52:[2,16],78:[2,19],111:[2,43]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},U={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:case 10:case 19:case 26:break;case 11:return this.begin("acc_title"),38;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),40;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:case 36:case 39:case 42:case 45:case 48:case 51:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 20:case 21:return 23;case 22:return this.begin("struct"),45;case 23:return"EOF_IN_STRUCT";case 24:return"OPEN_IN_STRUCT";case 25:return this.popState(),47;case 27:return"MEMBER";case 28:return 43;case 29:return 69;case 30:return 62;case 31:return 63;case 32:return 65;case 33:return 48;case 34:return 49;case 35:this.begin("generic");break;case 37:return"GENERICTYPE";case 38:this.begin("string");break;case 40:return"STR";case 41:this.begin("bqstring");break;case 43:return"BQUOTE_STR";case 44:this.begin("href");break;case 46:return 68;case 47:this.begin("callback_name");break;case 49:this.popState(),this.begin("callback_args");break;case 50:return 66;case 52:return 67;case 53:case 54:case 55:case 56:return 64;case 57:case 58:return 57;case 59:case 60:return 59;case 61:return 58;case 62:return 56;case 63:return 60;case 64:return 61;case 65:return 32;case 66:return 44;case 67:return 81;case 68:return"DOT";case 69:return"PLUS";case 70:return 78;case 71:case 72:return"EQUALS";case 73:return 85;case 74:return"PUNCTUATION";case 75:return 84;case 76:return 83;case 77:return 80;case 78:return 25}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},callback_args:{rules:[51,52],inclusive:!1},callback_name:{rules:[48,49,50],inclusive:!1},href:{rules:[45,46],inclusive:!1},struct:{rules:[23,24,25,26,27],inclusive:!1},generic:{rules:[36,37],inclusive:!1},bqstring:{rules:[42,43],inclusive:!1},string:{rules:[39,40],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,28,29,30,31,32,33,34,35,38,41,44,47,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78],inclusive:!0}}};function z(){this.yy={}}return j.lexer=U,z.prototype=j,j.Parser=z,new z}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8218).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},5890:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,23,25,27,29,30,48],i=[1,17],a=[1,18],o=[1,19],s=[1,20],c=[1,21],u=[1,24],l=[1,29],h=[1,30],f=[1,31],d=[1,32],p=[1,44],g=[30,45,46],y=[4,6,9,11,23,25,27,29,30,48],m=[41,42,43,44],v=[22,36],b=[1,62],_={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,attribute:31,attributeType:32,attributeName:33,attributeKeyType:34,attributeComment:35,ATTRIBUTE_WORD:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,NON_IDENTIFYING:45,IDENTIFYING:46,WORD:47,open_directive:48,type_directive:49,arg_directive:50,close_directive:51,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",36:"ATTRIBUTE_WORD",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"NON_IDENTIFYING",46:"IDENTIFYING",47:"WORD",48:"open_directive",49:"type_directive",50:"arg_directive",51:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[21,1],[21,2],[31,2],[31,3],[31,3],[31,4],[32,1],[33,1],[34,1],[35,1],[18,3],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 3:case 7:case 8:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:case 20:case 27:case 28:case 29:case 39:this.$=a[s];break;case 12:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 13:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s]);break;case 16:case 17:this.$=a[s].trim(),r.setTitle(this.$);break;case 18:case 19:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 21:this.$=[a[s]];break;case 22:a[s].push(a[s-1]),this.$=a[s];break;case 23:this.$={attributeType:a[s-1],attributeName:a[s]};break;case 24:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeKeyType:a[s]};break;case 25:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeComment:a[s]};break;case 26:this.$={attributeType:a[s-3],attributeName:a[s-2],attributeKeyType:a[s-1],attributeComment:a[s]};break;case 30:case 38:this.$=a[s].replace(/"/g,"");break;case 31:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 32:this.$=r.Cardinality.ZERO_OR_ONE;break;case 33:this.$=r.Cardinality.ZERO_OR_MORE;break;case 34:this.$=r.Cardinality.ONE_OR_MORE;break;case 35:this.$=r.Cardinality.ONLY_ONE;break;case 36:this.$=r.Identification.NON_IDENTIFYING;break;case 37:this.$=r.Identification.IDENTIFYING;break;case 40:r.parseDirective("%%{","open_directive");break;case 41:r.parseDirective(a[s],"type_directive");break;case 42:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 43:r.parseDirective("}%%","close_directive","er")}},table:[{3:1,4:e,7:3,12:4,48:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,48:n},{13:8,49:[1,9]},{49:[2,40]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:i,25:a,27:o,29:s,30:c,48:n},{1:[2,2]},{14:22,15:[1,23],51:u},t([15,51],[2,41]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:15,10:25,12:4,17:16,23:i,25:a,27:o,29:s,30:c,48:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,15],{18:26,39:28,20:[1,27],41:l,42:h,43:f,44:d}),{24:[1,33]},{26:[1,34]},{28:[1,35]},t(r,[2,19]),t([6,9,11,15,20,23,25,27,29,30,41,42,43,44,48],[2,20]),{11:[1,36]},{16:37,50:[1,38]},{11:[2,43]},t(r,[2,5]),{17:39,30:c},{21:40,22:[1,41],31:42,32:43,36:p},{40:45,45:[1,46],46:[1,47]},t(g,[2,32]),t(g,[2,33]),t(g,[2,34]),t(g,[2,35]),t(r,[2,16]),t(r,[2,17]),t(r,[2,18]),t(y,[2,9]),{14:48,51:u},{51:[2,42]},{15:[1,49]},{22:[1,50]},t(r,[2,14]),{21:51,22:[2,21],31:42,32:43,36:p},{33:52,36:[1,53]},{36:[2,27]},{39:54,41:l,42:h,43:f,44:d},t(m,[2,36]),t(m,[2,37]),{11:[1,55]},{19:56,30:[1,58],47:[1,57]},t(r,[2,13]),{22:[2,22]},t(v,[2,23],{34:59,35:60,37:[1,61],38:b}),t([22,36,37,38],[2,28]),{30:[2,31]},t(y,[2,10]),t(r,[2,12]),t(r,[2,38]),t(r,[2,39]),t(v,[2,24],{35:63,38:b}),t(v,[2,25]),t([22,36,38],[2,29]),t(v,[2,30]),t(v,[2,26])],defaultActions:{5:[2,40],7:[2,2],24:[2,43],38:[2,42],44:[2,27],51:[2,22],54:[2,31]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},x={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.begin("open_directive"),48;case 8:return this.begin("type_directive"),49;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),51;case 11:return 50;case 12:case 13:case 15:case 20:case 24:break;case 14:return 11;case 16:return 9;case 17:return 47;case 18:return 4;case 19:return this.begin("block"),20;case 21:return 37;case 22:return 36;case 23:return 38;case 25:return this.popState(),22;case 26:case 39:return e.yytext[0];case 27:case 31:return 41;case 28:case 32:return 42;case 29:case 33:return 43;case 30:return 44;case 34:case 36:case 37:return 45;case 35:return 46;case 38:return 30;case 40:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:(?:PK)|(?:FK))/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\|o\b)/i,/^(?:\}o\b)/i,/^(?:\}\|)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[20,21,22,23,24,25,26],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,27,28,29,30,31,32,33,34,35,36,37,38,39,40],inclusive:!0}}};function w(){this.yy={}}return _.lexer=x,w.prototype=_,_.Parser=w,new w}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8009).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},3602:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,9],n=[1,7],r=[1,6],i=[1,8],a=[1,20,21,22,23,38,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],o=[2,10],s=[1,20],c=[1,21],u=[1,22],l=[1,23],h=[1,30],f=[1,32],d=[1,33],p=[1,34],g=[1,62],y=[1,48],m=[1,52],v=[1,36],b=[1,37],_=[1,38],x=[1,39],w=[1,40],k=[1,56],T=[1,63],C=[1,51],E=[1,53],S=[1,55],A=[1,59],M=[1,60],N=[1,41],D=[1,42],B=[1,43],L=[1,44],O=[1,61],I=[1,50],R=[1,54],F=[1,57],P=[1,58],Y=[1,49],j=[1,66],U=[1,71],z=[1,20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],$=[1,75],q=[1,74],H=[1,76],W=[20,21,23,81,82],V=[1,99],G=[1,104],X=[1,107],Z=[1,108],Q=[1,101],K=[1,106],J=[1,109],tt=[1,102],et=[1,114],nt=[1,113],rt=[1,103],it=[1,105],at=[1,110],ot=[1,111],st=[1,112],ct=[1,115],ut=[20,21,22,23,81,82],lt=[20,21,22,23,53,81,82],ht=[20,21,22,23,40,52,53,55,57,59,61,63,65,66,67,69,71,73,74,76,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],ft=[20,21,23],dt=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],pt=[1,12,20,21,22,23,24,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],gt=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],yt=[1,149],mt=[1,157],vt=[1,158],bt=[1,159],_t=[1,160],xt=[1,144],wt=[1,145],kt=[1,141],Tt=[1,152],Ct=[1,153],Et=[1,154],St=[1,155],At=[1,156],Mt=[1,161],Nt=[1,162],Dt=[1,147],Bt=[1,150],Lt=[1,146],Ot=[1,143],It=[20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Rt=[1,165],Ft=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],Pt=[20,21,22,23,24,26,38,40,41,42,52,56,58,60,62,64,66,67,68,70,72,73,75,77,81,82,86,87,88,89,90,91,92,95,105,106,109,111,112,113,114,122,123,124,125,126,127],Yt=[12,21,22,24],jt=[22,106],Ut=[1,250],zt=[1,245],$t=[1,246],qt=[1,254],Ht=[1,251],Wt=[1,248],Vt=[1,247],Gt=[1,249],Xt=[1,252],Zt=[1,253],Qt=[1,255],Kt=[1,273],Jt=[20,21,23,106],te=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],ee={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,link:49,node:50,vertex:51,AMP:52,STYLE_SEPARATOR:53,idString:54,DOUBLECIRCLESTART:55,DOUBLECIRCLEEND:56,PS:57,PE:58,"(-":59,"-)":60,STADIUMSTART:61,STADIUMEND:62,SUBROUTINESTART:63,SUBROUTINEEND:64,VERTEX_WITH_PROPS_START:65,ALPHA:66,COLON:67,PIPE:68,CYLINDERSTART:69,CYLINDEREND:70,DIAMOND_START:71,DIAMOND_STOP:72,TAGEND:73,TRAPSTART:74,TRAPEND:75,INVTRAPSTART:76,INVTRAPEND:77,linkStatement:78,arrowText:79,TESTSTR:80,START_LINK:81,LINK:82,textToken:83,STR:84,keywords:85,STYLE:86,LINKSTYLE:87,CLASSDEF:88,CLASS:89,CLICK:90,DOWN:91,UP:92,textNoTags:93,textNoTagsToken:94,DEFAULT:95,stylesOpt:96,alphaNum:97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,HEX:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,MINUS:109,UNIT:110,BRKT:111,DOT:112,PCT:113,TAGSTART:114,alphaNumToken:115,idStringToken:116,alphaNumStatement:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,PUNCTUATION:122,UNICODE_TEXT:123,PLUS:124,EQUALS:125,MULT:126,UNDERSCORE:127,graphCodeTokens:128,ARROW_CROSS:129,ARROW_POINT:130,ARROW_CIRCLE:131,ARROW_OPEN:132,QUOTE:133,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",52:"AMP",53:"STYLE_SEPARATOR",55:"DOUBLECIRCLESTART",56:"DOUBLECIRCLEEND",57:"PS",58:"PE",59:"(-",60:"-)",61:"STADIUMSTART",62:"STADIUMEND",63:"SUBROUTINESTART",64:"SUBROUTINEEND",65:"VERTEX_WITH_PROPS_START",66:"ALPHA",67:"COLON",68:"PIPE",69:"CYLINDERSTART",70:"CYLINDEREND",71:"DIAMOND_START",72:"DIAMOND_STOP",73:"TAGEND",74:"TRAPSTART",75:"TRAPEND",76:"INVTRAPSTART",77:"INVTRAPEND",80:"TESTSTR",81:"START_LINK",82:"LINK",84:"STR",86:"STYLE",87:"LINKSTYLE",88:"CLASSDEF",89:"CLASS",90:"CLICK",91:"DOWN",92:"UP",95:"DEFAULT",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"HEX",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"MINUS",110:"UNIT",111:"BRKT",112:"DOT",113:"PCT",114:"TAGSTART",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr",122:"PUNCTUATION",123:"UNICODE_TEXT",124:"PLUS",125:"EQUALS",126:"MULT",127:"UNDERSCORE",129:"ARROW_CROSS",130:"ARROW_POINT",131:"ARROW_CIRCLE",132:"ARROW_OPEN",133:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[50,1],[50,5],[50,3],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,8],[51,4],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,4],[51,4],[51,1],[49,2],[49,3],[49,3],[49,1],[49,3],[78,1],[79,3],[39,1],[39,2],[39,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[93,1],[93,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[103,1],[103,3],[96,1],[96,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[94,1],[94,1],[94,1],[94,1],[54,1],[54,2],[97,1],[97,2],[117,1],[117,1],[117,1],[117,1],[43,1],[43,1],[43,1],[43,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.parseDirective("%%{","open_directive");break;case 6:r.parseDirective(a[s],"type_directive");break;case 7:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 8:r.parseDirective("}%%","close_directive","flowchart");break;case 10:case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 11:a[s]!==[]&&a[s-1].push(a[s]),this.$=a[s-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:case 78:case 150:this.$=a[s];break;case 19:r.setDirection("TB"),this.$="TB";break;case 20:r.setDirection(a[s-1]),this.$=a[s-1];break;case 35:this.$=a[s-1].nodes;break;case 41:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 42:this.$=r.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 43:this.$=r.addSubGraph(void 0,a[s-1],void 0);break;case 45:this.$=a[s].trim(),r.setTitle(this.$);break;case 46:case 47:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 51:r.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 52:r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 53:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 54:this.$={stmt:a[s],nodes:a[s]};break;case 55:case 123:case 125:this.$=[a[s]];break;case 56:this.$=a[s-4].concat(a[s]);break;case 57:this.$=[a[s-2]],r.setClass(a[s-2],a[s]);break;case 58:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"square");break;case 59:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"doublecircle");break;case 60:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"circle");break;case 61:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"ellipse");break;case 62:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"stadium");break;case 63:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"subroutine");break;case 64:this.$=a[s-7],r.addVertex(a[s-7],a[s-1],"rect",void 0,void 0,void 0,Object.fromEntries([[a[s-5],a[s-3]]]));break;case 65:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"cylinder");break;case 66:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"round");break;case 67:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"diamond");break;case 68:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"hexagon");break;case 69:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"odd");break;case 70:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"trapezoid");break;case 71:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"inv_trapezoid");break;case 72:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_right");break;case 73:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_left");break;case 74:this.$=a[s],r.addVertex(a[s]);break;case 75:a[s-1].text=a[s],this.$=a[s-1];break;case 76:case 77:a[s-2].text=a[s-1],this.$=a[s-2];break;case 79:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1]};break;case 80:c=r.destructLink(a[s]),this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 81:this.$=a[s-1];break;case 83:case 97:case 153:case 151:this.$=a[s-1]+""+a[s];break;case 98:case 99:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 100:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 101:case 109:this.$=a[s-1],r.setClickEvent(a[s-1],a[s]);break;case 102:case 110:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 103:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 104:this.$=a[s-4],r.setClickEvent(a[s-4],a[s-3],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 105:case 111:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 106:case 112:this.$=a[s-3],r.setLink(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 107:case 113:this.$=a[s-3],r.setLink(a[s-3],a[s-2],a[s]);break;case 108:case 114:this.$=a[s-5],r.setLink(a[s-5],a[s-4],a[s]),r.setTooltip(a[s-5],a[s-2]);break;case 115:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 116:case 118:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 117:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 119:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 120:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 121:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 122:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 124:case 126:a[s-2].push(a[s]),this.$=a[s-2];break;case 128:this.$=a[s-1]+a[s];break;case 156:this.$="v";break;case 157:this.$="-";break;case 158:this.$={stmt:"dir",value:"TB"};break;case 159:this.$={stmt:"dir",value:"BT"};break;case 160:this.$={stmt:"dir",value:"RL"};break;case 161:this.$={stmt:"dir",value:"LR"}}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},t(a,o,{17:11}),{7:12,13:[1,13]},{16:14,21:n,22:r,24:i},{16:15,21:n,22:r,24:i},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,43:31,44:f,46:d,48:p,50:35,51:45,52:g,54:46,66:y,67:m,86:v,87:b,88:_,89:x,90:w,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,118:N,119:D,120:B,121:L,122:O,123:I,124:R,125:F,126:P,127:Y},{8:64,10:[1,65],15:j},t([10,15],[2,6]),t(a,[2,17]),t(a,[2,18]),t(a,[2,19]),{20:[1,68],21:[1,69],22:U,27:67,30:70},t(z,[2,11]),t(z,[2,12]),t(z,[2,13]),t(z,[2,14]),t(z,[2,15]),t(z,[2,16]),{9:72,20:$,21:q,23:H,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:$,21:q,23:H},{9:81,20:$,21:q,23:H},{9:82,20:$,21:q,23:H},{9:83,20:$,21:q,23:H},{9:84,20:$,21:q,23:H},{9:86,20:$,21:q,22:[1,85],23:H},t(z,[2,44]),{45:[1,87]},{47:[1,88]},t(z,[2,47]),t(W,[2,54],{30:89,22:U}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:V,52:G,66:X,67:Z,84:[1,97],91:Q,97:96,98:[1,94],100:[1,95],105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(z,[2,158]),t(z,[2,159]),t(z,[2,160]),t(z,[2,161]),t(ut,[2,55],{53:[1,116]}),t(lt,[2,74],{116:129,40:[1,117],52:g,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:y,67:m,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:k,95:T,105:C,106:E,109:S,111:A,112:M,122:O,123:I,124:R,125:F,126:P,127:Y}),t(ht,[2,150]),t(ht,[2,175]),t(ht,[2,176]),t(ht,[2,177]),t(ht,[2,178]),t(ht,[2,179]),t(ht,[2,180]),t(ht,[2,181]),t(ht,[2,182]),t(ht,[2,183]),t(ht,[2,184]),t(ht,[2,185]),t(ht,[2,186]),t(ht,[2,187]),t(ht,[2,188]),t(ht,[2,189]),t(ht,[2,190]),{9:130,20:$,21:q,23:H},{11:131,14:[1,132]},t(ft,[2,8]),t(a,[2,20]),t(a,[2,26]),t(a,[2,27]),{21:[1,133]},t(dt,[2,34],{30:134,22:U}),t(z,[2,35]),{50:135,51:45,52:g,54:46,66:y,67:m,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,122:O,123:I,124:R,125:F,126:P,127:Y},t(pt,[2,48]),t(pt,[2,49]),t(pt,[2,50]),t(gt,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:yt,24:mt,26:vt,38:bt,39:139,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),t(z,[2,36]),t(z,[2,37]),t(z,[2,38]),t(z,[2,39]),t(z,[2,40]),{22:yt,24:mt,26:vt,38:bt,39:163,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(It,o,{17:164}),t(z,[2,45]),t(z,[2,46]),t(W,[2,53],{52:Rt}),{26:V,52:G,66:X,67:Z,91:Q,97:166,102:[1,167],105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},{95:[1,168],103:169,105:[1,170]},{26:V,52:G,66:X,67:Z,91:Q,95:[1,171],97:172,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},{26:V,52:G,66:X,67:Z,91:Q,97:173,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(ft,[2,101],{22:[1,174],99:[1,175]}),t(ft,[2,105],{22:[1,176]}),t(ft,[2,109],{115:100,117:178,22:[1,177],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,122:rt,123:it,124:at,125:ot,126:st,127:ct}),t(ft,[2,111],{22:[1,179]}),t(Ft,[2,152]),t(Ft,[2,154]),t(Ft,[2,155]),t(Ft,[2,156]),t(Ft,[2,157]),t(Pt,[2,162]),t(Pt,[2,163]),t(Pt,[2,164]),t(Pt,[2,165]),t(Pt,[2,166]),t(Pt,[2,167]),t(Pt,[2,168]),t(Pt,[2,169]),t(Pt,[2,170]),t(Pt,[2,171]),t(Pt,[2,172]),t(Pt,[2,173]),t(Pt,[2,174]),{52:g,54:180,66:y,67:m,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,122:O,123:I,124:R,125:F,126:P,127:Y},{22:yt,24:mt,26:vt,38:bt,39:181,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:182,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:184,42:_t,52:G,57:[1,183],66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:185,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:186,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:187,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{66:[1,188]},{22:yt,24:mt,26:vt,38:bt,39:189,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:190,42:_t,52:G,66:X,67:Z,71:[1,191],73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:192,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:193,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:194,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(ht,[2,151]),t(Yt,[2,3]),{8:195,15:j},{15:[2,7]},t(a,[2,28]),t(dt,[2,33]),t(W,[2,51],{30:196,22:U}),t(gt,[2,75],{22:[1,197]}),{22:[1,198]},{22:yt,24:mt,26:vt,38:bt,39:199,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,73:xt,81:wt,82:[1,200],83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(Pt,[2,82]),t(Pt,[2,84]),t(Pt,[2,140]),t(Pt,[2,141]),t(Pt,[2,142]),t(Pt,[2,143]),t(Pt,[2,144]),t(Pt,[2,145]),t(Pt,[2,146]),t(Pt,[2,147]),t(Pt,[2,148]),t(Pt,[2,149]),t(Pt,[2,85]),t(Pt,[2,86]),t(Pt,[2,87]),t(Pt,[2,88]),t(Pt,[2,89]),t(Pt,[2,90]),t(Pt,[2,91]),t(Pt,[2,92]),t(Pt,[2,93]),t(Pt,[2,94]),t(Pt,[2,95]),{9:203,20:$,21:q,22:yt,23:H,24:mt,26:vt,38:bt,40:[1,202],42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,204],43:31,44:f,46:d,48:p,50:35,51:45,52:g,54:46,66:y,67:m,86:v,87:b,88:_,89:x,90:w,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,118:N,119:D,120:B,121:L,122:O,123:I,124:R,125:F,126:P,127:Y},{22:U,30:205},{22:[1,206],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,115:100,117:178,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},t(jt,[2,123]),{22:[1,211]},{22:[1,212],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,115:100,117:178,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:[1,213],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,115:100,117:178,122:rt,123:it,124:at,125:ot,126:st,127:ct},{84:[1,214]},t(ft,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},t(Ft,[2,153]),{84:[1,219],101:[1,220]},t(ut,[2,57],{116:129,52:g,66:y,67:m,91:k,95:T,105:C,106:E,109:S,111:A,112:M,122:O,123:I,124:R,125:F,126:P,127:Y}),{22:yt,24:mt,26:vt,38:bt,41:[1,221],42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,56:[1,222],66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:223,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,58:[1,224],66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,60:[1,225],66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,62:[1,226],66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,64:[1,227],66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{67:[1,228]},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,70:[1,229],73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,72:[1,230],73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:231,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,41:[1,232],42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,73:xt,75:[1,233],77:[1,234],81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,73:xt,75:[1,236],77:[1,235],81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{9:237,20:$,21:q,23:H},t(W,[2,52],{52:Rt}),t(gt,[2,77]),t(gt,[2,76]),{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,68:[1,238],73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(gt,[2,79]),t(Pt,[2,83]),{22:yt,24:mt,26:vt,38:bt,39:239,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(It,o,{17:240}),t(z,[2,43]),{51:241,52:g,54:46,66:y,67:m,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,122:O,123:I,124:R,125:F,126:P,127:Y},{22:Ut,66:zt,67:$t,86:qt,96:242,102:Ht,105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Ut,66:zt,67:$t,86:qt,96:256,102:Ht,105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Ut,66:zt,67:$t,86:qt,96:257,102:Ht,104:[1,258],105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Ut,66:zt,67:$t,86:qt,96:259,102:Ht,104:[1,260],105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{105:[1,261]},{22:Ut,66:zt,67:$t,86:qt,96:262,102:Ht,105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Ut,66:zt,67:$t,86:qt,96:263,102:Ht,105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{26:V,52:G,66:X,67:Z,91:Q,97:264,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(ft,[2,102]),{84:[1,265]},t(ft,[2,106],{22:[1,266]}),t(ft,[2,107]),t(ft,[2,110]),t(ft,[2,112],{22:[1,267]}),t(ft,[2,113]),t(lt,[2,58]),t(lt,[2,59]),{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,58:[1,268],66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(lt,[2,66]),t(lt,[2,61]),t(lt,[2,62]),t(lt,[2,63]),{66:[1,269]},t(lt,[2,65]),t(lt,[2,67]),{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,72:[1,270],73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(lt,[2,69]),t(lt,[2,70]),t(lt,[2,72]),t(lt,[2,71]),t(lt,[2,73]),t(Yt,[2,4]),t([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:yt,24:mt,26:vt,38:bt,41:[1,271],42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,272],43:31,44:f,46:d,48:p,50:35,51:45,52:g,54:46,66:y,67:m,86:v,87:b,88:_,89:x,90:w,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,118:N,119:D,120:B,121:L,122:O,123:I,124:R,125:F,126:P,127:Y},t(ut,[2,56]),t(ft,[2,115],{106:Kt}),t(Jt,[2,125],{108:274,22:Ut,66:zt,67:$t,86:qt,102:Ht,105:Wt,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt}),t(te,[2,127]),t(te,[2,129]),t(te,[2,130]),t(te,[2,131]),t(te,[2,132]),t(te,[2,133]),t(te,[2,134]),t(te,[2,135]),t(te,[2,136]),t(te,[2,137]),t(te,[2,138]),t(te,[2,139]),t(ft,[2,116],{106:Kt}),t(ft,[2,117],{106:Kt}),{22:[1,275]},t(ft,[2,118],{106:Kt}),{22:[1,276]},t(jt,[2,124]),t(ft,[2,98],{106:Kt}),t(ft,[2,99],{106:Kt}),t(ft,[2,100],{115:100,117:178,26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,122:rt,123:it,124:at,125:ot,126:st,127:ct}),t(ft,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:$,21:q,23:H},t(z,[2,42]),{22:Ut,66:zt,67:$t,86:qt,102:Ht,105:Wt,107:283,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},t(te,[2,128]),{26:V,52:G,66:X,67:Z,91:Q,97:284,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},{26:V,52:G,66:X,67:Z,91:Q,97:285,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(ft,[2,108]),t(ft,[2,114]),t(lt,[2,60]),{22:yt,24:mt,26:vt,38:bt,39:286,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(lt,[2,68]),t(It,o,{17:287}),t(Jt,[2,126],{108:274,22:Ut,66:zt,67:$t,86:qt,102:Ht,105:Wt,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt}),t(ft,[2,121],{115:100,117:178,22:[1,288],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,122:rt,123:it,124:at,125:ot,126:st,127:ct}),t(ft,[2,122],{115:100,117:178,22:[1,289],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,122:rt,123:it,124:at,125:ot,126:st,127:ct}),{22:yt,24:mt,26:vt,38:bt,41:[1,290],42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,291],43:31,44:f,46:d,48:p,50:35,51:45,52:g,54:46,66:y,67:m,86:v,87:b,88:_,89:x,90:w,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,118:N,119:D,120:B,121:L,122:O,123:I,124:R,125:F,126:P,127:Y},{22:Ut,66:zt,67:$t,86:qt,96:292,102:Ht,105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Ut,66:zt,67:$t,86:qt,96:293,102:Ht,105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},t(lt,[2,64]),t(z,[2,41]),t(ft,[2,119],{106:Kt}),t(ft,[2,120],{106:Kt})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},ne={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:case 6:break;case 7:return this.begin("acc_title"),44;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),46;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:case 15:case 24:case 27:case 30:case 33:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 16:return"STR";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin("href");break;case 25:return 100;case 26:this.begin("callbackname");break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 31:return 99;case 32:this.begin("click");break;case 34:return 90;case 35:case 36:return t.lex.firstGraph()&&this.begin("dir"),24;case 37:return 38;case 38:return 42;case 39:case 40:case 41:case 42:return 101;case 43:return this.popState(),25;case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:return this.popState(),26;case 54:return 118;case 55:return 119;case 56:return 120;case 57:return 121;case 58:return 105;case 59:return 111;case 60:return 53;case 61:return 67;case 62:return 52;case 63:return 20;case 64:return 106;case 65:return 126;case 66:case 67:case 68:return 82;case 69:case 70:case 71:return 81;case 72:return 59;case 73:return 60;case 74:return 61;case 75:return 62;case 76:return 63;case 77:return 64;case 78:return 65;case 79:return 69;case 80:return 70;case 81:return 55;case 82:return 56;case 83:return 109;case 84:return 112;case 85:return 127;case 86:return 124;case 87:return 113;case 88:case 89:return 125;case 90:return 114;case 91:return 73;case 92:return 92;case 93:return"SEP";case 94:return 91;case 95:return 66;case 96:return 75;case 97:return 74;case 98:return 77;case 99:return 76;case 100:return 122;case 101:return 123;case 102:return 68;case 103:return 57;case 104:return 58;case 105:return 40;case 106:return 41;case 107:return 71;case 108:return 72;case 109:return 133;case 110:return 21;case 111:return 22;case 112:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\])/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[30,31],inclusive:!1},callbackname:{rules:[27,28,29],inclusive:!1},href:{rules:[24,25],inclusive:!1},click:{rules:[33,34],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[43,44,45,46,47,48,49,50,51,52,53],inclusive:!1},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,5,6,7,9,11,14,17,18,19,20,21,22,23,26,32,35,36,37,38,39,40,41,42,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112],inclusive:!0}}};function re(){this.yy={}}return ee.lexer=ne,re.prototype=ee,ee.Parser=re,new re}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(5354).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},9959:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,5],r=[7,9,11,12,13,14,15,16,17,18,19,20,22,24,25,27,34,39],i=[1,15],a=[1,16],o=[1,17],s=[1,18],c=[1,19],u=[1,20],l=[1,21],h=[1,22],f=[1,23],d=[1,24],p=[1,25],g=[1,26],y=[1,28],m=[1,30],v=[1,33],b=[5,7,9,11,12,13,14,15,16,17,18,19,20,22,24,25,27,34,39],_={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,excludes:16,includes:17,todayMarker:18,title:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,clickStatement:26,taskTxt:27,taskData:28,openDirective:29,typeDirective:30,closeDirective:31,":":32,argDirective:33,click:34,callbackname:35,callbackargs:36,href:37,clickStatementDebug:38,open_directive:39,type_directive:40,arg_directive:41,close_directive:42,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"excludes",17:"includes",18:"todayMarker",19:"title",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"taskTxt",28:"taskData",32:":",34:"click",35:"callbackname",36:"callbackargs",37:"href",39:"open_directive",40:"type_directive",41:"arg_directive",42:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[26,2],[26,3],[26,3],[26,4],[26,3],[26,4],[26,2],[38,2],[38,3],[38,3],[38,4],[38,3],[38,4],[38,2],[29,1],[30,1],[33,1],[31,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 2:return a[s-1];case 3:case 7:case 8:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 9:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 10:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 11:r.TopAxis(),this.$=a[s].substr(8);break;case 12:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 13:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 14:r.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 15:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 16:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 17:this.$=a[s].trim(),r.setTitle(this.$);break;case 18:case 19:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 20:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 22:r.addTask(a[s-1],a[s]),this.$="task";break;case 26:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 27:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 28:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 29:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 30:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 31:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 32:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 33:case 39:this.$=a[s-1]+" "+a[s];break;case 34:case 35:case 37:this.$=a[s-2]+" "+a[s-1]+" "+a[s];break;case 36:case 38:this.$=a[s-3]+" "+a[s-2]+" "+a[s-1]+" "+a[s];break;case 40:r.parseDirective("%%{","open_directive");break;case 41:r.parseDirective(a[s],"type_directive");break;case 42:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 43:r.parseDirective("}%%","close_directive","gantt")}},table:[{3:1,4:2,5:e,29:4,39:n},{1:[3]},{3:6,4:2,5:e,29:4,39:n},t(r,[2,3],{6:7}),{30:8,40:[1,9]},{40:[2,40]},{1:[2,1]},{4:29,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:i,13:a,14:o,15:s,16:c,17:u,18:l,19:h,20:f,22:d,24:p,25:g,26:27,27:y,29:4,34:m,39:n},{31:31,32:[1,32],42:v},t([32,42],[2,41]),t(r,[2,8],{1:[2,2]}),t(r,[2,4]),{4:29,10:34,12:i,13:a,14:o,15:s,16:c,17:u,18:l,19:h,20:f,22:d,24:p,25:g,26:27,27:y,29:4,34:m,39:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),{21:[1,35]},{23:[1,36]},t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),{28:[1,37]},t(r,[2,23]),{35:[1,38],37:[1,39]},{11:[1,40]},{33:41,41:[1,42]},{11:[2,43]},t(r,[2,5]),t(r,[2,17]),t(r,[2,18]),t(r,[2,22]),t(r,[2,26],{36:[1,43],37:[1,44]}),t(r,[2,32],{35:[1,45]}),t(b,[2,24]),{31:46,42:v},{42:[2,42]},t(r,[2,27],{37:[1,47]}),t(r,[2,28]),t(r,[2,30],{36:[1,48]}),{11:[1,49]},t(r,[2,29]),t(r,[2,31]),t(b,[2,25])],defaultActions:{5:[2,40],6:[2,1],33:[2,43],42:[2,42]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},x={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),39;case 1:return this.begin("type_directive"),40;case 2:return this.popState(),this.begin("arg_directive"),32;case 3:return this.popState(),this.popState(),42;case 4:return 41;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:case 20:case 23:case 26:case 29:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:case 13:case 14:case 16:case 17:case 18:break;case 15:return 11;case 19:this.begin("href");break;case 21:return 37;case 22:this.begin("callbackname");break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 35;case 27:return 36;case 28:this.begin("click");break;case 30:return 34;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 17;case 37:return 16;case 38:return 18;case 39:return"date";case 40:return 19;case 41:return"accDescription";case 42:return 25;case 43:return 27;case 44:return 28;case 45:return 32;case 46:return 7;case 47:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],inclusive:!0}}};function w(){this.yy={}}return _.lexer=x,w.prototype=_,_.Parser=w,new w}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(6878).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},2553:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,4],n=[1,7],r=[1,5],i=[1,9],a=[1,6],o=[2,6],s=[1,16],c=[6,8,14,19,21,23,24,26,28,31,34,47,51],u=[8,14,19,21,23,24,26,28,31,34],l=[8,13,14,19,21,23,24,26,28,31,34],h=[1,26],f=[6,8,14,47,51],d=[8,14,51],p=[1,61],g=[1,62],y=[1,63],m=[8,14,32,38,39,51],v={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,section:24,branchStatement:25,CHECKOUT:26,ID:27,BRANCH:28,ORDER:29,NUM:30,MERGE:31,COMMIT_TAG:32,STR:33,COMMIT:34,commit_arg:35,COMMIT_TYPE:36,commitType:37,COMMIT_ID:38,COMMIT_MSG:39,NORMAL:40,REVERSE:41,HIGHLIGHT:42,openDirective:43,typeDirective:44,closeDirective:45,argDirective:46,open_directive:47,type_directive:48,arg_directive:49,close_directive:50,";":51,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"section",26:"CHECKOUT",27:"ID",28:"BRANCH",29:"ORDER",30:"NUM",31:"MERGE",32:"COMMIT_TAG",33:"STR",34:"COMMIT",36:"COMMIT_TYPE",38:"COMMIT_ID",39:"COMMIT_MSG",40:"NORMAL",41:"REVERSE",42:"HIGHLIGHT",47:"open_directive",48:"type_directive",49:"arg_directive",50:"close_directive",51:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[25,2],[25,4],[18,2],[18,4],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[35,0],[35,1],[37,1],[37,1],[37,1],[5,3],[5,5],[43,1],[44,1],[46,1],[45,1],[4,1],[4,1],[4,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return a[s];case 4:return a[s-1];case 5:return r.setDirection(a[s-3]),a[s-1];case 7:r.setOptions(a[s-1]),this.$=a[s];break;case 8:a[s-1]+=a[s],this.$=a[s-1];break;case 10:this.$=[];break;case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 12:this.$=a[s-1];break;case 16:this.$=a[s].trim(),r.setTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 19:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 21:r.checkout(a[s]);break;case 22:r.branch(a[s]);break;case 23:r.branch(a[s-2],a[s]);break;case 24:r.merge(a[s]);break;case 25:r.merge(a[s-2],a[s]);break;case 26:r.commit(a[s]);break;case 27:r.commit("","",r.commitType.NORMAL,a[s]);break;case 28:r.commit("","",a[s],"");break;case 29:r.commit("","",a[s],a[s-2]);break;case 30:r.commit("","",a[s-2],a[s]);break;case 31:r.commit("",a[s],r.commitType.NORMAL,"");break;case 32:r.commit("",a[s-2],r.commitType.NORMAL,a[s]);break;case 33:r.commit("",a[s],r.commitType.NORMAL,a[s-2]);break;case 34:r.commit("",a[s-2],a[s],"");break;case 35:r.commit("",a[s],a[s-2],"");break;case 36:r.commit("",a[s-4],a[s-2],a[s]);break;case 37:r.commit("",a[s-4],a[s],a[s-2]);break;case 38:r.commit("",a[s-2],a[s-4],a[s]);break;case 39:r.commit("",a[s],a[s-4],a[s-2]);break;case 40:r.commit("",a[s],a[s-2],a[s-4]);break;case 41:r.commit("",a[s-2],a[s],a[s-4]);break;case 42:r.commit(a[s],"",r.commitType.NORMAL,"");break;case 43:r.commit(a[s],"",r.commitType.NORMAL,a[s-2]);break;case 44:r.commit(a[s-2],"",r.commitType.NORMAL,a[s]);break;case 45:r.commit(a[s-2],"",a[s],"");break;case 46:r.commit(a[s],"",a[s-2],"");break;case 47:r.commit(a[s],a[s-2],r.commitType.NORMAL,"");break;case 48:r.commit(a[s-2],a[s],r.commitType.NORMAL,"");break;case 49:r.commit(a[s-4],"",a[s-2],a[s]);break;case 50:r.commit(a[s-4],"",a[s],a[s-2]);break;case 51:r.commit(a[s-2],"",a[s-4],a[s]);break;case 52:r.commit(a[s],"",a[s-4],a[s-2]);break;case 53:r.commit(a[s],"",a[s-2],a[s-4]);break;case 54:r.commit(a[s-2],"",a[s],a[s-4]);break;case 55:r.commit(a[s-4],a[s],a[s-2],"");break;case 56:r.commit(a[s-4],a[s-2],a[s],"");break;case 57:r.commit(a[s-2],a[s],a[s-4],"");break;case 58:r.commit(a[s],a[s-2],a[s-4],"");break;case 59:r.commit(a[s],a[s-4],a[s-2],"");break;case 60:r.commit(a[s-2],a[s-4],a[s],"");break;case 61:r.commit(a[s-4],a[s],r.commitType.NORMAL,a[s-2]);break;case 62:r.commit(a[s-4],a[s-2],r.commitType.NORMAL,a[s]);break;case 63:r.commit(a[s-2],a[s],r.commitType.NORMAL,a[s-4]);break;case 64:r.commit(a[s],a[s-2],r.commitType.NORMAL,a[s-4]);break;case 65:r.commit(a[s],a[s-4],r.commitType.NORMAL,a[s-2]);break;case 66:r.commit(a[s-2],a[s-4],r.commitType.NORMAL,a[s]);break;case 67:r.commit(a[s-6],a[s-4],a[s-2],a[s]);break;case 68:r.commit(a[s-6],a[s-4],a[s],a[s-2]);break;case 69:r.commit(a[s-6],a[s-2],a[s-4],a[s]);break;case 70:r.commit(a[s-6],a[s],a[s-4],a[s-2]);break;case 71:r.commit(a[s-6],a[s-2],a[s],a[s-4]);break;case 72:r.commit(a[s-6],a[s],a[s-2],a[s-4]);break;case 73:r.commit(a[s-4],a[s-6],a[s-2],a[s]);break;case 74:r.commit(a[s-4],a[s-6],a[s],a[s-2]);break;case 75:r.commit(a[s-2],a[s-6],a[s-4],a[s]);break;case 76:r.commit(a[s],a[s-6],a[s-4],a[s-2]);break;case 77:r.commit(a[s-2],a[s-6],a[s],a[s-4]);break;case 78:r.commit(a[s],a[s-6],a[s-2],a[s-4]);break;case 79:r.commit(a[s],a[s-4],a[s-2],a[s-6]);break;case 80:r.commit(a[s-2],a[s-4],a[s],a[s-6]);break;case 81:r.commit(a[s],a[s-2],a[s-4],a[s-6]);break;case 82:r.commit(a[s-2],a[s],a[s-4],a[s-6]);break;case 83:r.commit(a[s-4],a[s-2],a[s],a[s-6]);break;case 84:r.commit(a[s-4],a[s],a[s-2],a[s-6]);break;case 85:r.commit(a[s-2],a[s-4],a[s-6],a[s]);break;case 86:r.commit(a[s],a[s-4],a[s-6],a[s-2]);break;case 87:r.commit(a[s-2],a[s],a[s-6],a[s-4]);break;case 88:r.commit(a[s],a[s-2],a[s-6],a[s-4]);break;case 89:r.commit(a[s-4],a[s-2],a[s-6],a[s]);break;case 90:r.commit(a[s-4],a[s],a[s-6],a[s-2]);break;case 91:this.$="";break;case 92:this.$=a[s];break;case 93:this.$=r.commitType.NORMAL;break;case 94:this.$=r.commitType.REVERSE;break;case 95:this.$=r.commitType.HIGHLIGHT;break;case 98:r.parseDirective("%%{","open_directive");break;case 99:r.parseDirective(a[s],"type_directive");break;case 100:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 101:r.parseDirective("}%%","close_directive","gitGraph")}},table:[{3:1,4:2,5:3,6:e,8:n,14:r,43:8,47:i,51:a},{1:[3]},{3:10,4:2,5:3,6:e,8:n,14:r,43:8,47:i,51:a},{3:11,4:2,5:3,6:e,8:n,14:r,43:8,47:i,51:a},{7:12,8:o,9:[1,13],10:[1,14],11:15,14:s},t(c,[2,102]),t(c,[2,103]),t(c,[2,104]),{44:17,48:[1,18]},{48:[2,98]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:o,11:15,14:s},{9:[1,21]},t(u,[2,10],{12:22,13:[1,23]}),t(l,[2,9]),{9:[1,25],45:24,50:h},t([9,50],[2,99]),{1:[2,3]},{8:[1,27]},{7:28,8:o,11:15,14:s},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:[1,34],21:[1,35],23:[1,36],24:[1,37],25:38,26:[1,39],28:[1,42],31:[1,41],34:[1,40]},t(l,[2,8]),t(f,[2,96]),{46:43,49:[1,44]},t(f,[2,101]),{1:[2,4]},{8:[1,45]},t(u,[2,11]),{4:46,8:n,14:r,51:a},t(u,[2,13]),t(d,[2,14]),t(d,[2,15]),{20:[1,47]},{22:[1,48]},t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),{27:[1,49]},t(d,[2,91],{35:50,32:[1,51],33:[1,55],36:[1,52],38:[1,53],39:[1,54]}),{27:[1,56]},{27:[1,57]},{45:58,50:h},{50:[2,100]},{1:[2,5]},t(u,[2,12]),t(d,[2,16]),t(d,[2,17]),t(d,[2,21]),t(d,[2,26]),{33:[1,59]},{37:60,40:p,41:g,42:y},{33:[1,64]},{33:[1,65]},t(d,[2,92]),t(d,[2,24],{32:[1,66]}),t(d,[2,22],{29:[1,67]}),t(f,[2,97]),t(d,[2,27],{36:[1,68],38:[1,69],39:[1,70]}),t(d,[2,28],{32:[1,71],38:[1,72],39:[1,73]}),t(m,[2,93]),t(m,[2,94]),t(m,[2,95]),t(d,[2,31],{32:[1,74],36:[1,75],39:[1,76]}),t(d,[2,42],{32:[1,77],36:[1,78],38:[1,79]}),{33:[1,80]},{30:[1,81]},{37:82,40:p,41:g,42:y},{33:[1,83]},{33:[1,84]},{33:[1,85]},{33:[1,86]},{33:[1,87]},{33:[1,88]},{37:89,40:p,41:g,42:y},{33:[1,90]},{33:[1,91]},{37:92,40:p,41:g,42:y},{33:[1,93]},t(d,[2,25]),t(d,[2,23]),t(d,[2,29],{38:[1,94],39:[1,95]}),t(d,[2,33],{36:[1,96],39:[1,97]}),t(d,[2,43],{36:[1,98],38:[1,99]}),t(d,[2,30],{38:[1,100],39:[1,101]}),t(d,[2,35],{32:[1,102],39:[1,103]}),t(d,[2,46],{32:[1,104],38:[1,105]}),t(d,[2,32],{36:[1,106],39:[1,107]}),t(d,[2,34],{32:[1,108],39:[1,109]}),t(d,[2,47],{32:[1,111],36:[1,110]}),t(d,[2,44],{36:[1,112],38:[1,113]}),t(d,[2,45],{32:[1,114],38:[1,115]}),t(d,[2,48],{32:[1,117],36:[1,116]}),{33:[1,118]},{33:[1,119]},{37:120,40:p,41:g,42:y},{33:[1,121]},{37:122,40:p,41:g,42:y},{33:[1,123]},{33:[1,124]},{33:[1,125]},{33:[1,126]},{33:[1,127]},{33:[1,128]},{33:[1,129]},{37:130,40:p,41:g,42:y},{33:[1,131]},{33:[1,132]},{33:[1,133]},{37:134,40:p,41:g,42:y},{33:[1,135]},{37:136,40:p,41:g,42:y},{33:[1,137]},{33:[1,138]},{33:[1,139]},{37:140,40:p,41:g,42:y},{33:[1,141]},t(d,[2,40],{39:[1,142]}),t(d,[2,53],{38:[1,143]}),t(d,[2,41],{39:[1,144]}),t(d,[2,64],{36:[1,145]}),t(d,[2,54],{38:[1,146]}),t(d,[2,63],{36:[1,147]}),t(d,[2,39],{39:[1,148]}),t(d,[2,52],{38:[1,149]}),t(d,[2,38],{39:[1,150]}),t(d,[2,58],{32:[1,151]}),t(d,[2,51],{38:[1,152]}),t(d,[2,57],{32:[1,153]}),t(d,[2,37],{39:[1,154]}),t(d,[2,65],{36:[1,155]}),t(d,[2,36],{39:[1,156]}),t(d,[2,59],{32:[1,157]}),t(d,[2,60],{32:[1,158]}),t(d,[2,66],{36:[1,159]}),t(d,[2,50],{38:[1,160]}),t(d,[2,61],{36:[1,161]}),t(d,[2,49],{38:[1,162]}),t(d,[2,55],{32:[1,163]}),t(d,[2,56],{32:[1,164]}),t(d,[2,62],{36:[1,165]}),{33:[1,166]},{33:[1,167]},{33:[1,168]},{37:169,40:p,41:g,42:y},{33:[1,170]},{37:171,40:p,41:g,42:y},{33:[1,172]},{33:[1,173]},{33:[1,174]},{33:[1,175]},{33:[1,176]},{33:[1,177]},{33:[1,178]},{37:179,40:p,41:g,42:y},{33:[1,180]},{33:[1,181]},{33:[1,182]},{37:183,40:p,41:g,42:y},{33:[1,184]},{37:185,40:p,41:g,42:y},{33:[1,186]},{33:[1,187]},{33:[1,188]},{37:189,40:p,41:g,42:y},t(d,[2,81]),t(d,[2,82]),t(d,[2,79]),t(d,[2,80]),t(d,[2,84]),t(d,[2,83]),t(d,[2,88]),t(d,[2,87]),t(d,[2,86]),t(d,[2,85]),t(d,[2,90]),t(d,[2,89]),t(d,[2,78]),t(d,[2,77]),t(d,[2,76]),t(d,[2,75]),t(d,[2,73]),t(d,[2,74]),t(d,[2,72]),t(d,[2,71]),t(d,[2,70]),t(d,[2,69]),t(d,[2,67]),t(d,[2,68])],defaultActions:{9:[2,98],10:[2,1],11:[2,2],19:[2,3],27:[2,4],44:[2,100],45:[2,5]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},b={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),47;case 1:return this.begin("type_directive"),48;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),50;case 4:return 49;case 5:return this.begin("acc_title"),19;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),21;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:case 34:case 37:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:case 14:case 15:break;case 16:return 6;case 17:return 34;case 18:return 38;case 19:return 36;case 20:return 39;case 21:return 40;case 22:return 41;case 23:return 42;case 24:return 32;case 25:return 28;case 26:return 29;case 27:return 31;case 28:return 26;case 29:case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 35:return 13;case 36:this.begin("string");break;case 38:return 33;case 39:return 30;case 40:return 27;case 41:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch\b)/i,/^(?:order:)/i,/^(?:merge\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+)/i,/^(?:[a-zA-Z][-_\./a-zA-Z0-9]*[-_a-zA-Z0-9])/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[34,35],inclusive:!1},string:{rules:[37,38],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,39,40,41],inclusive:!0}}};function _(){this.yy={}}return v.lexer=b,_.prototype=v,v.Parser=_,new _}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8183).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},6765:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,9,10],n={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,r,i,a,o){switch(a.length,i){case 1:return r;case 4:break;case 6:r.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function i(){this.yy={}}return n.lexer=r,i.prototype=n,n.Parser=i,new i}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(1428).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},7062:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,4],n=[1,5],r=[1,6],i=[1,7],a=[1,9],o=[1,11,13,15,17,19,20,26,27,28,29],s=[2,5],c=[1,6,11,13,15,17,19,20,26,27,28,29],u=[26,27,28],l=[2,8],h=[1,18],f=[1,19],d=[1,20],p=[1,21],g=[1,22],y=[1,23],m=[1,28],v=[6,26,27,28,29],b={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.setShowData(!0);break;case 7:this.$=a[s-1];break;case 9:r.addSection(a[s-1],r.cleanupValue(a[s]));break;case 10:this.$=a[s].trim(),r.setPieTitle(this.$);break;case 11:this.$=a[s].trim(),r.setTitle(this.$);break;case 12:case 13:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 14:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 21:r.parseDirective("%%{","open_directive");break;case 22:r.parseDirective(a[s],"type_directive");break;case 23:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 24:r.parseDirective("}%%","close_directive","pie")}},table:[{3:1,4:2,5:3,6:e,21:8,26:n,27:r,28:i,29:a},{1:[3]},{3:10,4:2,5:3,6:e,21:8,26:n,27:r,28:i,29:a},{3:11,4:2,5:3,6:e,21:8,26:n,27:r,28:i,29:a},t(o,s,{7:12,8:[1,13]}),t(c,[2,18]),t(c,[2,19]),t(c,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},t(u,l,{21:8,9:16,10:17,5:24,1:[2,3],11:h,13:f,15:d,17:p,19:g,20:y,29:a}),t(o,s,{7:25}),{23:26,24:[1,27],32:m},t([24,32],[2,22]),t(o,[2,6]),{4:29,26:n,27:r,28:i},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},t(u,[2,13]),t(u,[2,14]),t(u,[2,15]),t(u,l,{21:8,9:16,10:17,5:24,1:[2,4],11:h,13:f,15:d,17:p,19:g,20:y,29:a}),t(v,[2,16]),{25:34,31:[1,35]},t(v,[2,24]),t(o,[2,7]),t(u,[2,9]),t(u,[2,10]),t(u,[2,11]),t(u,[2,12]),{23:36,32:m},{32:[2,23]},t(v,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},_={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:case 6:case 8:case 9:break;case 7:return 26;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:case 20:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}};function x(){this.yy={}}return b.lexer=_,x.prototype=b,b.Parser=x,new x}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(4551).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},3176:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,5],r=[1,6],i=[1,7],a=[1,8],o=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],s=[1,22],c=[2,13],u=[1,26],l=[1,27],h=[1,28],f=[1,29],d=[1,30],p=[1,31],g=[1,24],y=[1,32],m=[1,33],v=[1,36],b=[71,72],_=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],x=[1,56],w=[1,57],k=[1,58],T=[1,59],C=[1,60],E=[1,61],S=[1,62],A=[62,63],M=[1,74],N=[1,70],D=[1,71],B=[1,72],L=[1,73],O=[1,75],I=[1,79],R=[1,80],F=[1,77],P=[1,78],Y=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],j={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",39:"STRUCT_STOP",40:"REQUIREMENT",41:"FUNCTIONAL_REQUIREMENT",42:"INTERFACE_REQUIREMENT",43:"PERFORMANCE_REQUIREMENT",44:"PHYSICAL_REQUIREMENT",45:"DESIGN_CONSTRAINT",46:"LOW_RISK",47:"MED_RISK",48:"HIGH_RISK",49:"VERIFY_ANALYSIS",50:"VERIFY_DEMONSTRATION",51:"VERIFY_INSPECTION",52:"VERIFY_TEST",53:"ELEMENT",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:this.$=a[s].trim(),r.setTitle(this.$);break;case 7:case 8:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 9:r.parseDirective("%%{","open_directive");break;case 10:r.parseDirective(a[s],"type_directive");break;case 11:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 12:r.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:r.addRequirement(a[s-3],a[s-4]);break;case 20:r.setNewReqId(a[s-2]);break;case 21:r.setNewReqText(a[s-2]);break;case 22:r.setNewReqRisk(a[s-2]);break;case 23:r.setNewReqVerifyMethod(a[s-2]);break;case 26:this.$=r.RequirementType.REQUIREMENT;break;case 27:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=r.RiskLevel.LOW_RISK;break;case 33:this.$=r.RiskLevel.MED_RISK;break;case 34:this.$=r.RiskLevel.HIGH_RISK;break;case 35:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=r.VerifyType.VERIFY_TEST;break;case 39:r.addElement(a[s-3]);break;case 40:r.setNewElementType(a[s-2]);break;case 41:r.setNewElementDocRef(a[s-2]);break;case 44:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 45:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 46:this.$=r.Relationships.CONTAINS;break;case 47:this.$=r.Relationships.COPIES;break;case 48:this.$=r.Relationships.DERIVES;break;case 49:this.$=r.Relationships.SATISFIES;break;case 50:this.$=r.Relationships.VERIFIES;break;case 51:this.$=r.Relationships.REFINES;break;case 52:this.$=r.Relationships.TRACES}},table:[{3:1,4:2,6:e,9:4,14:n,16:r,18:i,19:a},{1:[3]},{3:10,4:2,5:[1,9],6:e,9:4,14:n,16:r,18:i,19:a},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},t(o,[2,8]),{20:[2,9]},{3:16,4:2,6:e,9:4,14:n,16:r,18:i,19:a},{1:[2,2]},{4:21,5:s,7:17,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:l,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{11:34,12:[1,35],22:v},t([12,22],[2,10]),t(o,[2,6]),t(o,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:s,7:38,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:l,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{4:21,5:s,7:39,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:l,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{4:21,5:s,7:40,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:l,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{4:21,5:s,7:41,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:l,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{4:21,5:s,7:42,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:l,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},t(b,[2,26]),t(b,[2,27]),t(b,[2,28]),t(b,[2,29]),t(b,[2,30]),t(b,[2,31]),t(_,[2,55]),t(_,[2,56]),t(o,[2,4]),{13:51,21:[1,52]},t(o,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:x,65:w,66:k,67:T,68:C,69:E,70:S},{61:63,64:x,65:w,66:k,67:T,68:C,69:E,70:S},{11:64,22:v},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},t(A,[2,46]),t(A,[2,47]),t(A,[2,48]),t(A,[2,49]),t(A,[2,50]),t(A,[2,51]),t(A,[2,52]),{63:[1,68]},t(o,[2,5]),{5:M,29:69,30:N,33:D,35:B,37:L,39:O},{5:I,39:R,55:76,56:F,58:P},{32:81,71:y,72:m},{32:82,71:y,72:m},t(Y,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:M,29:87,30:N,33:D,35:B,37:L,39:O},t(Y,[2,25]),t(Y,[2,39]),{31:[1,88]},{31:[1,89]},{5:I,39:R,55:90,56:F,58:P},t(Y,[2,43]),t(Y,[2,44]),t(Y,[2,45]),{32:91,71:y,72:m},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},t(Y,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},t(Y,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:M,29:116,30:N,33:D,35:B,37:L,39:O},{5:M,29:117,30:N,33:D,35:B,37:L,39:O},{5:M,29:118,30:N,33:D,35:B,37:L,39:O},{5:M,29:119,30:N,33:D,35:B,37:L,39:O},{5:I,39:R,55:120,56:F,58:P},{5:I,39:R,55:121,56:F,58:P},t(Y,[2,20]),t(Y,[2,21]),t(Y,[2,22]),t(Y,[2,23]),t(Y,[2,40]),t(Y,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},U={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 53:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:case 15:case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 54:return"qString";case 55:return e.yytext=e.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55],inclusive:!0}}};function z(){this.yy={}}return j.lexer=U,z.prototype=j,j.Parser=z,new z}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8800).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},6876:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,18],u=[1,19],l=[1,21],h=[1,22],f=[1,23],d=[1,29],p=[1,30],g=[1,31],y=[1,32],m=[1,33],v=[1,34],b=[1,35],_=[1,36],x=[1,37],w=[1,38],k=[1,41],T=[1,42],C=[1,43],E=[1,44],S=[1,45],A=[1,46],M=[1,49],N=[1,4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,48,49,54,55,56,57,65,75],D=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,49,54,55,56,57,65,75],B=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,48,49,54,55,56,57,65,75],L=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,54,55,56,57,65,75],O=[63,64,65],I=[1,114],R=[1,4,5,7,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,48,49,54,55,56,57,65,75],F={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,":":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,participant_actor:20,signal:21,autonumber:22,NUM:23,off:24,activate:25,deactivate:26,note_statement:27,links_statement:28,link_statement:29,properties_statement:30,details_statement:31,title:32,legacy_title:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,loop:39,end:40,rect:41,opt:42,alt:43,else_sections:44,par:45,par_sections:46,and:47,else:48,note:49,placement:50,text2:51,over:52,actor_pair:53,links:54,link:55,properties:56,details:57,spaceList:58,",":59,left_of:60,right_of:61,signaltype:62,"+":63,"-":64,ACTOR:65,SOLID_OPEN_ARROW:66,DOTTED_OPEN_ARROW:67,SOLID_ARROW:68,DOTTED_ARROW:69,SOLID_CROSS:70,DOTTED_CROSS:71,SOLID_POINT:72,DOTTED_POINT:73,TXT:74,open_directive:75,type_directive:76,arg_directive:77,close_directive:78,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",20:"participant_actor",22:"autonumber",23:"NUM",24:"off",25:"activate",26:"deactivate",32:"title",33:"legacy_title",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",39:"loop",40:"end",41:"rect",42:"opt",43:"alt",45:"par",47:"and",48:"else",49:"note",52:"over",54:"links",55:"link",56:"properties",57:"details",59:",",60:"left_of",61:"right_of",63:"+",64:"-",65:"ACTOR",66:"SOLID_OPEN_ARROW",67:"DOTTED_OPEN_ARROW",68:"SOLID_ARROW",69:"DOTTED_ARROW",70:"SOLID_CROSS",71:"DOTTED_CROSS",72:"SOLID_POINT",73:"DOTTED_POINT",74:"TXT",75:"open_directive",76:"type_directive",77:"arg_directive",78:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,5],[10,3],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[46,1],[46,4],[44,1],[44,4],[27,4],[27,4],[28,3],[29,3],[30,3],[31,3],[58,2],[58,1],[53,3],[53,1],[50,1],[50,1],[21,5],[21,5],[21,4],[17,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[51,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.apply(a[s]),a[s];case 5:case 9:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:case 52:this.$=a[s];break;case 12:a[s-3].type="addParticipant",a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 13:a[s-1].type="addParticipant",this.$=a[s-1];break;case 14:a[s-3].type="addActor",a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 15:a[s-1].type="addActor",this.$=a[s-1];break;case 17:this.$={type:"sequenceIndex",sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]};break;case 22:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1]};break;case 28:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 29:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 30:this.$=a[s].trim(),r.setTitle(this.$);break;case 31:case 32:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 33:a[s-1].unshift({type:"loopStart",loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:"loopEnd",loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 34:a[s-1].unshift({type:"rectStart",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:"rectEnd",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 35:a[s-1].unshift({type:"optStart",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:"optEnd",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:"altStart",altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:"parStart",parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:this.$=a[s-3].concat([{type:"and",parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 42:this.$=a[s-3].concat([{type:"else",altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 43:this.$=[a[s-1],{type:"addNote",placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 44:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 45:this.$=[a[s-1],{type:"addLinks",actor:a[s-1].actor,text:a[s]}];break;case 46:this.$=[a[s-1],{type:"addALink",actor:a[s-1].actor,text:a[s]}];break;case 47:this.$=[a[s-1],{type:"addProperties",actor:a[s-1].actor,text:a[s]}];break;case 48:this.$=[a[s-1],{type:"addDetails",actor:a[s-1].actor,text:a[s]}];break;case 51:this.$=[a[s-2],a[s]];break;case 53:this.$=r.PLACEMENT.LEFTOF;break;case 54:this.$=r.PLACEMENT.RIGHTOF;break;case 55:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]}];break;case 56:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4]}];break;case 57:this.$=[a[s-3],a[s-1],{type:"addMessage",from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 58:this.$={type:"addParticipant",actor:a[s]};break;case 59:this.$=r.LINETYPE.SOLID_OPEN;break;case 60:this.$=r.LINETYPE.DOTTED_OPEN;break;case 61:this.$=r.LINETYPE.SOLID;break;case 62:this.$=r.LINETYPE.DOTTED;break;case 63:this.$=r.LINETYPE.SOLID_CROSS;break;case 64:this.$=r.LINETYPE.DOTTED_CROSS;break;case 65:this.$=r.LINETYPE.SOLID_POINT;break;case 66:this.$=r.LINETYPE.DOTTED_POINT;break;case 67:this.$=r.parseMessage(a[s].trim().substring(1));break;case 68:r.parseDirective("%%{","open_directive");break;case 69:r.parseDirective(a[s],"type_directive");break;case 70:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 71:r.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:e,5:n,6:4,7:r,11:6,75:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,11:6,75:i},{3:9,4:e,5:n,6:4,7:r,11:6,75:i},{3:10,4:e,5:n,6:4,7:r,11:6,75:i},t([1,4,5,16,20,22,25,26,32,33,34,36,38,39,41,42,43,45,49,54,55,56,57,65,75],a,{8:11}),{12:12,76:[1,13]},{76:[2,68]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:39,9:14,10:16,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,41:b,42:_,43:x,45:w,49:k,54:T,55:C,56:E,57:S,65:A,75:i},{13:47,14:[1,48],78:M},t([14,78],[2,69]),t(N,[2,6]),{6:39,10:50,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,41:b,42:_,43:x,45:w,49:k,54:T,55:C,56:E,57:S,65:A,75:i},t(N,[2,8]),t(N,[2,9]),{17:51,65:A},{17:52,65:A},{5:[1,53]},{5:[1,56],23:[1,54],24:[1,55]},{17:57,65:A},{17:58,65:A},{5:[1,59]},{5:[1,60]},{5:[1,61]},{5:[1,62]},{5:[1,63]},t(N,[2,28]),t(N,[2,29]),{35:[1,64]},{37:[1,65]},t(N,[2,32]),{19:[1,66]},{19:[1,67]},{19:[1,68]},{19:[1,69]},{19:[1,70]},t(N,[2,38]),{62:71,66:[1,72],67:[1,73],68:[1,74],69:[1,75],70:[1,76],71:[1,77],72:[1,78],73:[1,79]},{50:80,52:[1,81],60:[1,82],61:[1,83]},{17:84,65:A},{17:85,65:A},{17:86,65:A},{17:87,65:A},t([5,18,59,66,67,68,69,70,71,72,73,74],[2,58]),{5:[1,88]},{15:89,77:[1,90]},{5:[2,71]},t(N,[2,7]),{5:[1,92],18:[1,91]},{5:[1,94],18:[1,93]},t(N,[2,16]),{5:[1,96],23:[1,95]},{5:[1,97]},t(N,[2,20]),{5:[1,98]},{5:[1,99]},t(N,[2,23]),t(N,[2,24]),t(N,[2,25]),t(N,[2,26]),t(N,[2,27]),t(N,[2,30]),t(N,[2,31]),t(D,a,{8:100}),t(D,a,{8:101}),t(D,a,{8:102}),t(B,a,{44:103,8:104}),t(L,a,{46:105,8:106}),{17:109,63:[1,107],64:[1,108],65:A},t(O,[2,59]),t(O,[2,60]),t(O,[2,61]),t(O,[2,62]),t(O,[2,63]),t(O,[2,64]),t(O,[2,65]),t(O,[2,66]),{17:110,65:A},{17:112,53:111,65:A},{65:[2,53]},{65:[2,54]},{51:113,74:I},{51:115,74:I},{51:116,74:I},{51:117,74:I},t(R,[2,10]),{13:118,78:M},{78:[2,70]},{19:[1,119]},t(N,[2,13]),{19:[1,120]},t(N,[2,15]),{5:[1,121]},t(N,[2,18]),t(N,[2,19]),t(N,[2,21]),t(N,[2,22]),{4:o,5:s,6:39,9:14,10:16,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,40:[1,122],41:b,42:_,43:x,45:w,49:k,54:T,55:C,56:E,57:S,65:A,75:i},{4:o,5:s,6:39,9:14,10:16,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,40:[1,123],41:b,42:_,43:x,45:w,49:k,54:T,55:C,56:E,57:S,65:A,75:i},{4:o,5:s,6:39,9:14,10:16,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,40:[1,124],41:b,42:_,43:x,45:w,49:k,54:T,55:C,56:E,57:S,65:A,75:i},{40:[1,125]},{4:o,5:s,6:39,9:14,10:16,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,40:[2,41],41:b,42:_,43:x,45:w,48:[1,126],49:k,54:T,55:C,56:E,57:S,65:A,75:i},{40:[1,127]},{4:o,5:s,6:39,9:14,10:16,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,40:[2,39],41:b,42:_,43:x,45:w,47:[1,128],49:k,54:T,55:C,56:E,57:S,65:A,75:i},{17:129,65:A},{17:130,65:A},{51:131,74:I},{51:132,74:I},{51:133,74:I},{59:[1,134],74:[2,52]},{5:[2,45]},{5:[2,67]},{5:[2,46]},{5:[2,47]},{5:[2,48]},{5:[1,135]},{5:[1,136]},{5:[1,137]},t(N,[2,17]),t(N,[2,33]),t(N,[2,34]),t(N,[2,35]),t(N,[2,36]),{19:[1,138]},t(N,[2,37]),{19:[1,139]},{51:140,74:I},{51:141,74:I},{5:[2,57]},{5:[2,43]},{5:[2,44]},{17:142,65:A},t(R,[2,11]),t(N,[2,12]),t(N,[2,14]),t(B,a,{8:104,44:143}),t(L,a,{8:106,46:144}),{5:[2,55]},{5:[2,56]},{74:[2,51]},{40:[2,42]},{40:[2,40]}],defaultActions:{7:[2,68],8:[2,1],9:[2,2],10:[2,3],49:[2,71],82:[2,53],83:[2,54],90:[2,70],113:[2,45],114:[2,67],115:[2,46],116:[2,47],117:[2,48],131:[2,57],132:[2,43],133:[2,44],140:[2,55],141:[2,56],142:[2,51],143:[2,42],144:[2,40]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},P={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),75;case 1:return this.begin("type_directive"),76;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),78;case 4:return 77;case 5:case 49:case 62:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return 23;case 12:return this.begin("ID"),16;case 13:return this.begin("ID"),20;case 14:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),65;case 15:return this.popState(),this.popState(),this.begin("LINE"),18;case 16:return this.popState(),this.popState(),5;case 17:return this.begin("LINE"),39;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),48;case 22:return this.begin("LINE"),45;case 23:return this.begin("LINE"),47;case 24:return this.popState(),19;case 25:return 40;case 26:return 60;case 27:return 61;case 28:return 54;case 29:return 55;case 30:return 56;case 31:return 57;case 32:return 52;case 33:return 49;case 34:return this.begin("ID"),25;case 35:return this.begin("ID"),26;case 36:return 32;case 37:return 33;case 38:return this.begin("acc_title"),34;case 39:return this.popState(),"acc_title_value";case 40:return this.begin("acc_descr"),36;case 41:return this.popState(),"acc_descr_value";case 42:this.begin("acc_descr_multiline");break;case 43:this.popState();break;case 44:return"acc_descr_multiline_value";case 45:return 7;case 46:return 22;case 47:return 24;case 48:return 59;case 50:return e.yytext=e.yytext.trim(),65;case 51:return 68;case 52:return 69;case 53:return 66;case 54:return 67;case 55:return 70;case 56:return 71;case 57:return 72;case 58:return 73;case 59:return 74;case 60:return 63;case 61:return 64;case 63:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[43,44],inclusive:!1},acc_descr:{rules:[41],inclusive:!1},acc_title:{rules:[39],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,14],inclusive:!1},ALIAS:{rules:[7,8,15,16],inclusive:!1},LINE:{rules:[7,8,24],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,17,18,19,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,40,42,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63],inclusive:!0}}};function Y(){this.yy={}}return F.lexer=P,Y.prototype=F,F.Parser=Y,new Y}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(1993).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},3584:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,19],u=[1,20],l=[1,21],h=[1,22],f=[1,33],d=[1,23],p=[1,24],g=[1,25],y=[1,26],m=[1,27],v=[1,30],b=[1,31],_=[1,32],x=[1,35],w=[1,36],k=[1,37],T=[1,38],C=[1,34],E=[1,41],S=[1,4,5,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],A=[1,4,5,12,13,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],M=[1,4,5,7,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],N=[4,5,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],D={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,idStatement:11,DESCR:12,"--\x3e":13,HIDE_EMPTY:14,scale:15,WIDTH:16,COMPOSIT_STATE:17,STRUCT_START:18,STRUCT_STOP:19,STATE_DESCR:20,AS:21,ID:22,FORK:23,JOIN:24,CHOICE:25,CONCURRENT:26,note:27,notePosition:28,NOTE_TEXT:29,direction:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,openDirective:36,typeDirective:37,closeDirective:38,":":39,argDirective:40,direction_tb:41,direction_bt:42,direction_rl:43,direction_lr:44,eol:45,";":46,EDGE_STATE:47,left_of:48,right_of:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",12:"DESCR",13:"--\x3e",14:"HIDE_EMPTY",15:"scale",16:"WIDTH",17:"COMPOSIT_STATE",18:"STRUCT_START",19:"STRUCT_STOP",20:"STATE_DESCR",21:"AS",22:"ID",23:"FORK",24:"JOIN",25:"CHOICE",26:"CONCURRENT",27:"note",29:"NOTE_TEXT",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",39:":",41:"direction_tb",42:"direction_bt",43:"direction_rl",44:"direction_lr",46:";",47:"EDGE_STATE",48:"left_of",49:"right_of",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[10,2],[10,2],[10,1],[6,3],[6,5],[30,1],[30,1],[30,1],[30,1],[45,1],[45,1],[11,1],[11,1],[28,1],[28,1],[36,1],[37,1],[40,1],[38,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.setRootDoc(a[s]),a[s];case 5:this.$=[];break;case 6:"nl"!=a[s]&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 7:case 8:case 39:case 40:this.$=a[s];break;case 9:this.$="nl";break;case 10:this.$={stmt:"state",id:a[s],type:"default",description:""};break;case 11:this.$={stmt:"state",id:a[s-1],type:"default",description:r.trimColon(a[s])};break;case 12:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-2],type:"default",description:""},state2:{stmt:"state",id:a[s],type:"default",description:""}};break;case 13:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-3],type:"default",description:""},state2:{stmt:"state",id:a[s-1],type:"default",description:""},description:a[s].substr(1).trim()};break;case 17:this.$={stmt:"state",id:a[s-3],type:"default",description:"",doc:a[s-1]};break;case 18:var c=a[s],u=a[s-2].trim();if(a[s].match(":")){var l=a[s].split(":");c=l[0],u=[u,l[1]]}this.$={stmt:"state",id:c,type:"default",description:u};break;case 19:this.$={stmt:"state",id:a[s-3],type:"default",description:a[s-5],doc:a[s-1]};break;case 20:this.$={stmt:"state",id:a[s],type:"fork"};break;case 21:this.$={stmt:"state",id:a[s],type:"join"};break;case 22:this.$={stmt:"state",id:a[s],type:"choice"};break;case 23:this.$={stmt:"state",id:r.getDividerId(),type:"divider"};break;case 24:this.$={stmt:"state",id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 28:this.$=a[s].trim(),r.setTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 33:r.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 34:r.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 35:r.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 36:r.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 43:r.parseDirective("%%{","open_directive");break;case 44:r.parseDirective(a[s],"type_directive");break;case 45:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 46:r.parseDirective("}%%","close_directive","state")}},table:[{3:1,4:e,5:n,6:4,7:r,36:6,50:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,36:6,50:i},{3:9,4:e,5:n,6:4,7:r,36:6,50:i},{3:10,4:e,5:n,6:4,7:r,36:6,50:i},t([1,4,5,14,15,17,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],a,{8:11}),{37:12,51:[1,13]},{51:[2,43]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:u,17:l,20:h,22:f,23:d,24:p,25:g,26:y,27:m,30:29,31:v,33:b,35:_,36:6,41:x,42:w,43:k,44:T,47:C,50:i},{38:39,39:[1,40],53:E},t([39,53],[2,44]),t(S,[2,6]),{6:28,10:42,11:18,14:c,15:u,17:l,20:h,22:f,23:d,24:p,25:g,26:y,27:m,30:29,31:v,33:b,35:_,36:6,41:x,42:w,43:k,44:T,47:C,50:i},t(S,[2,8]),t(S,[2,9]),t(S,[2,10],{12:[1,43],13:[1,44]}),t(S,[2,14]),{16:[1,45]},t(S,[2,16],{18:[1,46]}),{21:[1,47]},t(S,[2,20]),t(S,[2,21]),t(S,[2,22]),t(S,[2,23]),{28:48,29:[1,49],48:[1,50],49:[1,51]},t(S,[2,26]),t(S,[2,27]),{32:[1,52]},{34:[1,53]},t(S,[2,30]),t(A,[2,39]),t(A,[2,40]),t(S,[2,33]),t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(M,[2,31]),{40:54,52:[1,55]},t(M,[2,46]),t(S,[2,7]),t(S,[2,11]),{11:56,22:f,47:C},t(S,[2,15]),t(N,a,{8:57}),{22:[1,58]},{22:[1,59]},{21:[1,60]},{22:[2,41]},{22:[2,42]},t(S,[2,28]),t(S,[2,29]),{38:61,53:E},{53:[2,45]},t(S,[2,12],{12:[1,62]}),{4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:u,17:l,19:[1,63],20:h,22:f,23:d,24:p,25:g,26:y,27:m,30:29,31:v,33:b,35:_,36:6,41:x,42:w,43:k,44:T,47:C,50:i},t(S,[2,18],{18:[1,64]}),{29:[1,65]},{22:[1,66]},t(M,[2,32]),t(S,[2,13]),t(S,[2,17]),t(N,a,{8:67}),t(S,[2,24]),t(S,[2,25]),{4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:u,17:l,19:[1,68],20:h,22:f,23:d,24:p,25:g,26:y,27:m,30:29,31:v,33:b,35:_,36:6,41:x,42:w,43:k,44:T,47:C,50:i},t(S,[2,19])],defaultActions:{7:[2,43],8:[2,1],9:[2,2],10:[2,3],50:[2,41],51:[2,42],55:[2,45]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},B={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:case 33:return 41;case 1:case 34:return 42;case 2:case 35:return 43;case 3:case 36:return 44;case 4:return this.begin("open_directive"),50;case 5:return this.begin("type_directive"),51;case 6:return this.popState(),this.begin("arg_directive"),39;case 7:return this.popState(),this.popState(),53;case 8:return 52;case 9:case 10:case 12:case 13:case 14:case 15:case 46:case 52:break;case 11:case 66:return 5;case 16:return this.pushState("SCALE"),15;case 17:return 16;case 18:case 24:case 40:case 43:this.popState();break;case 19:return this.begin("acc_title"),31;case 20:return this.popState(),"acc_title_value";case 21:return this.begin("acc_descr"),33;case 22:return this.popState(),"acc_descr_value";case 23:this.begin("acc_descr_multiline");break;case 25:return"acc_descr_multiline_value";case 26:this.pushState("STATE");break;case 27:case 30:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 28:case 31:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 29:case 32:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),25;case 37:this.begin("STATE_STRING");break;case 38:return this.popState(),this.pushState("STATE_ID"),"AS";case 39:case 54:return this.popState(),"ID";case 41:return"STATE_DESCR";case 42:return 17;case 44:return this.popState(),this.pushState("struct"),18;case 45:return this.popState(),19;case 47:return this.begin("NOTE"),27;case 48:return this.popState(),this.pushState("NOTE_ID"),48;case 49:return this.popState(),this.pushState("NOTE_ID"),49;case 50:this.popState(),this.pushState("FLOATING_NOTE");break;case 51:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 53:return"NOTE_TEXT";case 55:return this.popState(),this.pushState("NOTE_TEXT"),22;case 56:return this.popState(),e.yytext=e.yytext.substr(2).trim(),29;case 57:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),29;case 58:case 59:return 7;case 60:return 14;case 61:return 47;case 62:return 22;case 63:return e.yytext=e.yytext.trim(),12;case 64:return 13;case 65:return 26;case 67:return"INVALID"}},rules:[/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[13,14],inclusive:!1},close_directive:{rules:[13,14],inclusive:!1},arg_directive:{rules:[7,8,13,14],inclusive:!1},type_directive:{rules:[6,7,13,14],inclusive:!1},open_directive:{rules:[5,13,14],inclusive:!1},struct:{rules:[13,14,26,33,34,35,36,45,46,47,61,62,63,64,65],inclusive:!1},FLOATING_NOTE_ID:{rules:[54],inclusive:!1},FLOATING_NOTE:{rules:[51,52,53],inclusive:!1},NOTE_TEXT:{rules:[56,57],inclusive:!1},NOTE_ID:{rules:[55],inclusive:!1},NOTE:{rules:[48,49,50],inclusive:!1},acc_descr_multiline:{rules:[24,25],inclusive:!1},acc_descr:{rules:[22],inclusive:!1},acc_title:{rules:[20],inclusive:!1},SCALE:{rules:[17,18],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[39],inclusive:!1},STATE_STRING:{rules:[40,41],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[13,14,27,28,29,30,31,32,37,38,42,43,44],inclusive:!1},ID:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,12,14,15,16,19,21,23,26,44,47,58,59,60,61,62,63,64,66,67],inclusive:!0}}};function L(){this.yy={}}return D.lexer=B,L.prototype=D,D.Parser=L,new L}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(3069).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},9763:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,17,18,20,22,23,24,26],i=[1,15],a=[1,16],o=[1,17],s=[1,18],c=[1,19],u=[1,20],l=[1,24],h=[4,6,9,11,17,18,20,22,23,24,26],f={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:case 7:case 8:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 11:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.setTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 16:r.addTask(a[s-1],a[s]),this.$="task";break;case 18:r.parseDirective("%%{","open_directive");break;case 19:r.parseDirective(a[s],"type_directive");break;case 20:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 21:r.parseDirective("}%%","close_directive","journey")}},table:[{3:1,4:e,7:3,12:4,26:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,26:n},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:a,20:o,22:s,23:c,24:u,26:n},{1:[2,2]},{14:22,15:[1,23],29:l},t([15,29],[2,19]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:21,10:25,12:4,17:i,18:a,20:o,22:s,23:c,24:u,26:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),{19:[1,26]},{21:[1,27]},t(r,[2,14]),t(r,[2,15]),{25:[1,28]},t(r,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},t(r,[2,5]),t(r,[2,12]),t(r,[2,13]),t(r,[2,16]),t(h,[2,9]),{14:32,29:l},{29:[2,20]},{11:[1,33]},t(h,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},d={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:case 6:case 8:case 9:break;case 7:return 11;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};function p(){this.yy={}}return f.lexer=d,p.prototype=f,f.Parser=p,new p}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(9143).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},7967:(t,e)=>{"use strict";e.N=void 0;var n=/^([^\w]*)(javascript|data|vbscript)/im,r=/&#(\w+)(^\w|;)?/g,i=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,a=/^([^:]+):/gm,o=[".","/"];e.N=function(t){var e,s=(e=t||"",e.replace(r,(function(t,e){return String.fromCharCode(e)}))).replace(i,"").trim();if(!s)return"about:blank";if(function(t){return o.indexOf(t[0])>-1}(s))return s;var c=s.match(a);if(!c)return s;var u=c[0];return n.test(u)?"about:blank":s}},3841:t=>{t.exports=function(t,e){return t.intersect(e)}},8968:(t,e,n)=>{"use strict";n.d(e,{default:()=>HE});var r=n(1941),i=n.n(r),a={debug:1,info:2,warn:3,error:4,fatal:5},o={debug:function(){},info:function(){},warn:function(){},error:function(){},fatal:function(){}},s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"fatal";isNaN(t)&&(t=t.toLowerCase(),void 0!==a[t]&&(t=a[t])),o.trace=function(){},o.debug=function(){},o.info=function(){},o.warn=function(){},o.error=function(){},o.fatal=function(){},t<=a.fatal&&(o.fatal=console.error?console.error.bind(console,c("FATAL"),"color: orange"):console.log.bind(console,"",c("FATAL"))),t<=a.error&&(o.error=console.error?console.error.bind(console,c("ERROR"),"color: orange"):console.log.bind(console,"",c("ERROR"))),t<=a.warn&&(o.warn=console.warn?console.warn.bind(console,c("WARN"),"color: orange"):console.log.bind(console,"",c("WARN"))),t<=a.info&&(o.info=console.info?console.info.bind(console,c("INFO"),"color: lightblue"):console.log.bind(console,"",c("INFO"))),t<=a.debug&&(o.debug=console.debug?console.debug.bind(console,c("DEBUG"),"color: lightgreen"):console.log.bind(console,"",c("DEBUG")))},c=function(t){var e=i()().format("ss.SSS");return"%c".concat(e," : ").concat(t," : ")};function u(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function l(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function h(t){return t}var f=1e-6;function d(t){return"translate("+t+",0)"}function p(t){return"translate(0,"+t+")"}function g(t){return e=>+t(e)}function y(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function m(){return!this.__axis}function v(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",v=1===t||3===t?d:p;function b(d){var p=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,b=null==i?e.tickFormat?e.tickFormat.apply(e,n):h:i,_=Math.max(a,0)+s,x=e.range(),w=+x[0]+c,k=+x[x.length-1]+c,T=(e.bandwidth?y:g)(e.copy(),c),C=d.selection?d.selection():d,E=C.selectAll(".domain").data([null]),S=C.selectAll(".tick").data(p,e).order(),A=S.exit(),M=S.enter().append("g").attr("class","tick"),N=S.select("line"),D=S.select("text");E=E.merge(E.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge(M),N=N.merge(M.append("line").attr("stroke","currentColor").attr(l+"2",u*a)),D=D.merge(M.append("text").attr("fill","currentColor").attr(l,u*_).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),d!==C&&(E=E.transition(d),S=S.transition(d),N=N.transition(d),D=D.transition(d),A=A.transition(d).attr("opacity",f).attr("transform",(function(t){return isFinite(t=T(t))?v(t+c):this.getAttribute("transform")})),M.attr("opacity",f).attr("transform",(function(t){var e=this.parentNode.__axis;return v((e&&isFinite(e=e(t))?e:T(t))+c)}))),A.remove(),E.attr("d",4===t||2===t?o?"M"+u*o+","+w+"H"+c+"V"+k+"H"+u*o:"M"+c+","+w+"V"+k:o?"M"+w+","+u*o+"V"+c+"H"+k+"V"+u*o:"M"+w+","+c+"H"+k),S.attr("opacity",1).attr("transform",(function(t){return v(T(t)+c)})),N.attr(l+"2",u*a),D.attr(l,u*_).text(b),C.filter(m).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),C.each((function(){this.__axis=T}))}return b.scale=function(t){return arguments.length?(e=t,b):e},b.ticks=function(){return n=Array.from(arguments),b},b.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),b):n.slice()},b.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),b):r&&r.slice()},b.tickFormat=function(t){return arguments.length?(i=t,b):i},b.tickSize=function(t){return arguments.length?(a=o=+t,b):a},b.tickSizeInner=function(t){return arguments.length?(a=+t,b):a},b.tickSizeOuter=function(t){return arguments.length?(o=+t,b):o},b.tickPadding=function(t){return arguments.length?(s=+t,b):s},b.offset=function(t){return arguments.length?(c=+t,b):c},b}function b(){}function _(t){return null==t?b:function(){return this.querySelector(t)}}function x(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function w(){return[]}function k(t){return null==t?w:function(){return this.querySelectorAll(t)}}function T(t){return function(){return this.matches(t)}}function C(t){return function(e){return e.matches(t)}}var E=Array.prototype.find;function S(){return this.firstElementChild}var A=Array.prototype.filter;function M(){return Array.from(this.children)}function N(t){return new Array(t.length)}function D(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function B(t){return function(){return t}}function L(t,e,n,r,i,a){for(var o,s=0,c=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new D(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function O(t,e,n,r,i,a,o){var s,c,u,l=new Map,h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(d[s]=u=o.call(c,c.__data__,s,e)+"",l.has(u)?i[s]=c:l.set(u,c));for(s=0;s<f;++s)u=o.call(t,a[s],s,a)+"",(c=l.get(u))?(r[s]=c,c.__data__=a[s],l.delete(u)):n[s]=new D(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&l.get(d[s])===c&&(i[s]=c)}function I(t){return t.__data__}function R(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function F(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}D.prototype={constructor:D,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var P="http://www.w3.org/1999/xhtml";const Y={svg:"http://www.w3.org/2000/svg",xhtml:P,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function j(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Y.hasOwnProperty(e)?{space:Y[e],local:t}:t}function U(t){return function(){this.removeAttribute(t)}}function z(t){return function(){this.removeAttributeNS(t.space,t.local)}}function $(t,e){return function(){this.setAttribute(t,e)}}function q(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function H(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function W(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function V(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function G(t){return function(){this.style.removeProperty(t)}}function X(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Z(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Q(t,e){return t.style.getPropertyValue(e)||V(t).getComputedStyle(t,null).getPropertyValue(e)}function K(t){return function(){delete this[t]}}function J(t,e){return function(){this[t]=e}}function tt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function et(t){return t.trim().split(/^|\s+/)}function nt(t){return t.classList||new rt(t)}function rt(t){this._node=t,this._names=et(t.getAttribute("class")||"")}function it(t,e){for(var n=nt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function at(t,e){for(var n=nt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function ot(t){return function(){it(this,t)}}function st(t){return function(){at(this,t)}}function ct(t,e){return function(){(e.apply(this,arguments)?it:at)(this,t)}}function ut(){this.textContent=""}function lt(t){return function(){this.textContent=t}}function ht(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ft(){this.innerHTML=""}function dt(t){return function(){this.innerHTML=t}}function pt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function gt(){this.nextSibling&&this.parentNode.appendChild(this)}function yt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mt(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===P&&e.documentElement.namespaceURI===P?e.createElement(t):e.createElementNS(n,t)}}function vt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function bt(t){var e=j(t);return(e.local?vt:mt)(e)}function _t(){return null}function xt(){var t=this.parentNode;t&&t.removeChild(this)}function wt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function kt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Tt(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Ct(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Et(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function St(t,e,n){var r=V(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function At(t,e){return function(){return St(this,t,e)}}function Mt(t,e){return function(){return St(this,t,e.apply(this,arguments))}}rt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Nt=[null];function Dt(t,e){this._groups=t,this._parents=e}function Bt(){return new Dt([[document.documentElement]],Nt)}Dt.prototype=Bt.prototype={constructor:Dt,select:function(t){"function"!=typeof t&&(t=_(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,u=r[i]=new Array(c),l=0;l<c;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),u[l]=o);return new Dt(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return x(t.apply(this,arguments))}}(t):k(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,u=0;u<c;++u)(o=s[u])&&(r.push(t.call(o,o.__data__,u,s)),i.push(o));return new Dt(r,i)},selectChild:function(t){return this.select(null==t?S:function(t){return function(){return E.call(this.children,t)}}("function"==typeof t?t:C(t)))},selectChildren:function(t){return this.selectAll(null==t?M:function(t){return function(){return A.call(this.children,t)}}("function"==typeof t?t:C(t)))},filter:function(t){"function"!=typeof t&&(t=T(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new Dt(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,I);var n=e?O:L,r=this._parents,i=this._groups;"function"!=typeof t&&(t=B(t));for(var a=i.length,o=new Array(a),s=new Array(a),c=new Array(a),u=0;u<a;++u){var l=r[u],h=i[u],f=h.length,d=R(t.call(l,l&&l.__data__,u,r)),p=d.length,g=s[u]=new Array(p),y=o[u]=new Array(p),m=c[u]=new Array(f);n(l,h,g,y,m,d,e);for(var v,b,_=0,x=0;_<p;++_)if(v=g[_]){for(_>=x&&(x=_+1);!(b=y[x])&&++x<p;);v._next=b||null}}return(o=new Dt(o,r))._enter=s,o._exit=c,o},enter:function(){return new Dt(this._enter||this._groups.map(N),this._parents)},exit:function(){return new Dt(this._exit||this._groups.map(N),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),c=0;c<o;++c)for(var u,l=n[c],h=r[c],f=l.length,d=s[c]=new Array(f),p=0;p<f;++p)(u=l[p]||h[p])&&(d[p]=u);for(;c<i;++c)s[c]=n[c];return new Dt(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=F);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,u=i[a]=new Array(c),l=0;l<c;++l)(o=s[l])&&(u[l]=o);u.sort(e)}return new Dt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=j(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?z:U:"function"==typeof e?n.local?W:H:n.local?q:$)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?G:"function"==typeof e?Z:X)(t,e,null==n?"":n)):Q(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?K:"function"==typeof e?tt:J)(t,e)):this.node()[t]},classed:function(t,e){var n=et(t+"");if(arguments.length<2){for(var r=nt(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?ct:e?ot:st)(n,e))},text:function(t){return arguments.length?this.each(null==t?ut:("function"==typeof t?ht:lt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ft:("function"==typeof t?pt:dt)(t)):this.node().innerHTML},raise:function(){return this.each(gt)},lower:function(){return this.each(yt)},append:function(t){var e="function"==typeof t?t:bt(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:bt(t),r=null==e?_t:"function"==typeof e?e:_(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(xt)},clone:function(t){return this.select(t?kt:wt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=Tt(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?Et:Ct,r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,u=0,l=s.length;u<l;++u)for(r=0,c=s[u];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?Mt:At)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};const Lt=Bt;var Ot={value:()=>{}};function It(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Rt(r)}function Rt(t){this._=t}function Ft(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function Pt(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Yt(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Ot,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Rt.prototype=It.prototype={constructor:Rt,on:function(t,e){var n,r=this._,i=Ft(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=Yt(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Yt(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=Pt(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Rt(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};const jt=It;var Ut,zt,$t=0,qt=0,Ht=0,Wt=0,Vt=0,Gt=0,Xt="object"==typeof performance&&performance.now?performance:Date,Zt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Qt(){return Vt||(Zt(Kt),Vt=Xt.now()+Gt)}function Kt(){Vt=0}function Jt(){this._call=this._time=this._next=null}function te(t,e,n){var r=new Jt;return r.restart(t,e,n),r}function ee(){Vt=(Wt=Xt.now())+Gt,$t=qt=0;try{!function(){Qt(),++$t;for(var t,e=Ut;e;)(t=Vt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--$t}()}finally{$t=0,function(){for(var t,e,n=Ut,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Ut=e);zt=t,re(r)}(),Vt=0}}function ne(){var t=Xt.now(),e=t-Wt;e>1e3&&(Gt-=e,Wt=t)}function re(t){$t||(qt&&(qt=clearTimeout(qt)),t-Vt>24?(t<1/0&&(qt=setTimeout(ee,t-Xt.now()-Gt)),Ht&&(Ht=clearInterval(Ht))):(Ht||(Wt=Xt.now(),Ht=setInterval(ne,1e3)),$t=1,Zt(ee)))}function ie(t,e,n){var r=new Jt;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}Jt.prototype=te.prototype={constructor:Jt,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Qt():+n)+(null==e?0:+e),this._next||zt===this||(zt?zt._next=this:Ut=this,zt=this),this._call=t,this._time=n,re()},stop:function(){this._call&&(this._call=null,this._time=1/0,re())}};var ae=jt("start","end","cancel","interrupt"),oe=[];function se(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(c){var u,l,h,f;if(1!==n.state)return s();for(u in i)if((f=i[u]).name===n.name){if(3===f.state)return ie(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+u<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[u])}if(ie((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,l=-1;u<h;++u)(f=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=te((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:ae,tween:oe,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function ce(t,e){var n=le(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function ue(t,e){var n=le(t,e);if(n.state>3)throw new Error("too late; already running");return n}function le(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function he(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var fe,de=180/Math.PI,pe={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ge(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*de,skewX:Math.atan(c)*de,scaleX:o,scaleY:s}}function ye(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:he(t,i)},{i:c-2,x:he(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:he(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:he(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:he(t,n)},{i:s-2,x:he(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var me=ye((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?pe:ge(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),ve=ye((function(t){return null==t?pe:(fe||(fe=document.createElementNS("http://www.w3.org/2000/svg","g")),fe.setAttribute("transform",t),(t=fe.transform.baseVal.consolidate())?ge((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):pe)}),", ",")",")");function be(t,e){var n,r;return function(){var i=ue(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function _e(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=ue(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}a.tween=i}}function xe(t,e,n){var r=t._id;return t.each((function(){var t=ue(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return le(t,r).value[e]}}function we(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ke(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Te(){}var Ce=.7,Ee=1/Ce,Se="\\s*([+-]?\\d+)\\s*",Ae="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Me="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ne=/^#([0-9a-f]{3,8})$/,De=new RegExp("^rgb\\("+[Se,Se,Se]+"\\)$"),Be=new RegExp("^rgb\\("+[Me,Me,Me]+"\\)$"),Le=new RegExp("^rgba\\("+[Se,Se,Se,Ae]+"\\)$"),Oe=new RegExp("^rgba\\("+[Me,Me,Me,Ae]+"\\)$"),Ie=new RegExp("^hsl\\("+[Ae,Me,Me]+"\\)$"),Re=new RegExp("^hsla\\("+[Ae,Me,Me,Ae]+"\\)$"),Fe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Pe(){return this.rgb().formatHex()}function Ye(){return this.rgb().formatRgb()}function je(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ne.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ue(e):3===n?new He(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ze(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ze(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=De.exec(t))?new He(e[1],e[2],e[3],1):(e=Be.exec(t))?new He(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Le.exec(t))?ze(e[1],e[2],e[3],e[4]):(e=Oe.exec(t))?ze(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ie.exec(t))?Xe(e[1],e[2]/100,e[3]/100,1):(e=Re.exec(t))?Xe(e[1],e[2]/100,e[3]/100,e[4]):Fe.hasOwnProperty(t)?Ue(Fe[t]):"transparent"===t?new He(NaN,NaN,NaN,0):null}function Ue(t){return new He(t>>16&255,t>>8&255,255&t,1)}function ze(t,e,n,r){return r<=0&&(t=e=n=NaN),new He(t,e,n,r)}function $e(t){return t instanceof Te||(t=je(t)),t?new He((t=t.rgb()).r,t.g,t.b,t.opacity):new He}function qe(t,e,n,r){return 1===arguments.length?$e(t):new He(t,e,n,null==r?1:r)}function He(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function We(){return"#"+Ge(this.r)+Ge(this.g)+Ge(this.b)}function Ve(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Ge(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Xe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Qe(t,e,n,r)}function Ze(t){if(t instanceof Qe)return new Qe(t.h,t.s,t.l,t.opacity);if(t instanceof Te||(t=je(t)),!t)return new Qe;if(t instanceof Qe)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Qe(o,s,c,t.opacity)}function Qe(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ke(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Je(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}we(Te,je,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Pe,formatHex:Pe,formatHsl:function(){return Ze(this).formatHsl()},formatRgb:Ye,toString:Ye}),we(He,qe,ke(Te,{brighter:function(t){return t=null==t?Ee:Math.pow(Ee,t),new He(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Ce:Math.pow(Ce,t),new He(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:We,formatHex:We,formatRgb:Ve,toString:Ve})),we(Qe,(function(t,e,n,r){return 1===arguments.length?Ze(t):new Qe(t,e,n,null==r?1:r)}),ke(Te,{brighter:function(t){return t=null==t?Ee:Math.pow(Ee,t),new Qe(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Ce:Math.pow(Ce,t),new Qe(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new He(Ke(t>=240?t-240:t+120,i,r),Ke(t,i,r),Ke(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const tn=t=>()=>t;function en(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):tn(isNaN(t)?e:t)}const nn=function t(e){var n=function(t){return 1==(t=+t)?en:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):tn(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=qe(t)).r,(e=qe(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=en(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function rn(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=qe(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}rn((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return Je((n-r/e)*e,o,i,a,s)}})),rn((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return Je((n-r/e)*e,i,a,o,s)}}));var an=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,on=new RegExp(an.source,"g");function sn(t,e){var n,r,i,a=an.lastIndex=on.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=an.exec(t))&&(r=on.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:he(n,r)})),a=on.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function cn(t,e){var n;return("number"==typeof e?he:e instanceof je?nn:(n=je(e))?(e=n,nn):sn)(t,e)}function un(t){return function(){this.removeAttribute(t)}}function ln(t){return function(){this.removeAttributeNS(t.space,t.local)}}function hn(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function fn(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function dn(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function pn(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function gn(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function yn(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function mn(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&yn(t,i)),n}return i._value=e,i}function vn(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&gn(t,i)),n}return i._value=e,i}function bn(t,e){return function(){ce(this,t).delay=+e.apply(this,arguments)}}function _n(t,e){return e=+e,function(){ce(this,t).delay=e}}function xn(t,e){return function(){ue(this,t).duration=+e.apply(this,arguments)}}function wn(t,e){return e=+e,function(){ue(this,t).duration=e}}function kn(t,e){if("function"!=typeof e)throw new Error;return function(){ue(this,t).ease=e}}function Tn(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?ce:ue;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Cn=Lt.prototype.constructor;function En(t){return function(){this.style.removeProperty(t)}}function Sn(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function An(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Sn(t,a,n)),r}return a._value=e,a}function Mn(t){return function(e){this.textContent=t.call(this,e)}}function Nn(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Mn(r)),e}return r._value=t,r}var Dn=0;function Bn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ln(){return++Dn}var On=Lt.prototype;Bn.prototype=function(t){return Lt().transition(t)}.prototype={constructor:Bn,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=_(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,u=r[o],l=u.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=u[f])&&(c=t.call(s,s.__data__,f,u))&&("__data__"in s&&(c.__data__=s.__data__),h[f]=c,se(h[f],e,n,f,h,le(s,n)));return new Bn(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=k(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,u=r[s],l=u.length,h=0;h<l;++h)if(c=u[h]){for(var f,d=t.call(c,c.__data__,h,u),p=le(c,n),g=0,y=d.length;g<y;++g)(f=d[g])&&se(f,e,n,g,d,p);a.push(d),o.push(c)}return new Bn(a,o,e,n)},selectChild:On.selectChild,selectChildren:On.selectChildren,filter:function(t){"function"!=typeof t&&(t=T(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new Bn(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new Bn(o,this._parents,this._name,this._id)},selection:function(){return new Cn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Ln(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)if(o=s[u]){var l=le(o,e);se(o,t,n,u,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Bn(r,this._parents,t,n)},call:On.call,nodes:On.nodes,node:On.node,size:On.size,empty:On.empty,each:On.each,on:function(t,e){var n=this._id;return arguments.length<2?le(this.node(),n).on.on(t):this.each(Tn(n,t,e))},attr:function(t,e){var n=j(t),r="transform"===n?ve:cn;return this.attrTween(t,"function"==typeof e?(n.local?pn:dn)(n,r,xe(this,"attr."+t,e)):null==e?(n.local?ln:un)(n):(n.local?fn:hn)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=j(t);return this.tween(n,(r.local?mn:vn)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?me:cn;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Q(this,t),o=(this.style.removeProperty(t),Q(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,En(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Q(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=Q(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,xe(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=ue(this,t),u=c.on,l=null==c.value[o]?a||(a=En(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(s,i=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Q(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,An(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(xe(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Nn(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=le(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?be:_e)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?bn:_n)(e,t)):le(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?xn:wn)(e,t)):le(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(kn(e,t)):le(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;ue(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=ue(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e})),0===i&&a()}))},[Symbol.iterator]:On[Symbol.iterator]};var In={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Rn(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Lt.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}(this,t)}))},Lt.prototype.transition=function(t){var e,n;t instanceof Bn?(e=t._id,t=t._name):(e=Ln(),(n=In).time=Qt(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)(o=s[u])&&se(o,t,e,u,s,n||Rn(o,e));return new Bn(r,this._parents,t,e)};const{abs:Fn,max:Pn,min:Yn}=Math;function jn(t){return{type:t}}function Un(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function zn(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function $n(){}["w","e"].map(jn),["n","s"].map(jn),["n","w","e","s","nw","ne","sw","se"].map(jn);var qn=.7,Hn=1/qn,Wn="\\s*([+-]?\\d+)\\s*",Vn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Gn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Xn=/^#([0-9a-f]{3,8})$/,Zn=new RegExp("^rgb\\("+[Wn,Wn,Wn]+"\\)$"),Qn=new RegExp("^rgb\\("+[Gn,Gn,Gn]+"\\)$"),Kn=new RegExp("^rgba\\("+[Wn,Wn,Wn,Vn]+"\\)$"),Jn=new RegExp("^rgba\\("+[Gn,Gn,Gn,Vn]+"\\)$"),tr=new RegExp("^hsl\\("+[Vn,Gn,Gn]+"\\)$"),er=new RegExp("^hsla\\("+[Vn,Gn,Gn,Vn]+"\\)$"),nr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function rr(){return this.rgb().formatHex()}function ir(){return this.rgb().formatRgb()}function ar(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Xn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?or(e):3===n?new lr(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?sr(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?sr(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Zn.exec(t))?new lr(e[1],e[2],e[3],1):(e=Qn.exec(t))?new lr(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Kn.exec(t))?sr(e[1],e[2],e[3],e[4]):(e=Jn.exec(t))?sr(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=tr.exec(t))?pr(e[1],e[2]/100,e[3]/100,1):(e=er.exec(t))?pr(e[1],e[2]/100,e[3]/100,e[4]):nr.hasOwnProperty(t)?or(nr[t]):"transparent"===t?new lr(NaN,NaN,NaN,0):null}function or(t){return new lr(t>>16&255,t>>8&255,255&t,1)}function sr(t,e,n,r){return r<=0&&(t=e=n=NaN),new lr(t,e,n,r)}function cr(t){return t instanceof $n||(t=ar(t)),t?new lr((t=t.rgb()).r,t.g,t.b,t.opacity):new lr}function ur(t,e,n,r){return 1===arguments.length?cr(t):new lr(t,e,n,null==r?1:r)}function lr(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function hr(){return"#"+dr(this.r)+dr(this.g)+dr(this.b)}function fr(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function dr(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function pr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new yr(t,e,n,r)}function gr(t){if(t instanceof yr)return new yr(t.h,t.s,t.l,t.opacity);if(t instanceof $n||(t=ar(t)),!t)return new yr;if(t instanceof yr)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new yr(o,s,c,t.opacity)}function yr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function mr(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Un($n,ar,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:rr,formatHex:rr,formatHsl:function(){return gr(this).formatHsl()},formatRgb:ir,toString:ir}),Un(lr,ur,zn($n,{brighter:function(t){return t=null==t?Hn:Math.pow(Hn,t),new lr(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?qn:Math.pow(qn,t),new lr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:hr,formatHex:hr,formatRgb:fr,toString:fr})),Un(yr,(function(t,e,n,r){return 1===arguments.length?gr(t):new yr(t,e,n,null==r?1:r)}),zn($n,{brighter:function(t){return t=null==t?Hn:Math.pow(Hn,t),new yr(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?qn:Math.pow(qn,t),new yr(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new lr(mr(t>=240?t-240:t+120,i,r),mr(t,i,r),mr(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const vr=Math.PI/180,br=180/Math.PI,_r=.96422,xr=.82521,wr=4/29,kr=6/29,Tr=3*kr*kr;function Cr(t){if(t instanceof Er)return new Er(t.l,t.a,t.b,t.opacity);if(t instanceof Lr)return Or(t);t instanceof lr||(t=cr(t));var e,n,r=Nr(t.r),i=Nr(t.g),a=Nr(t.b),o=Sr((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=Sr((.4360747*r+.3850649*i+.1430804*a)/_r),n=Sr((.0139322*r+.0971045*i+.7141733*a)/xr)),new Er(116*o-16,500*(e-o),200*(o-n),t.opacity)}function Er(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Sr(t){return t>.008856451679035631?Math.pow(t,1/3):t/Tr+wr}function Ar(t){return t>kr?t*t*t:Tr*(t-wr)}function Mr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Nr(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Dr(t){if(t instanceof Lr)return new Lr(t.h,t.c,t.l,t.opacity);if(t instanceof Er||(t=Cr(t)),0===t.a&&0===t.b)return new Lr(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*br;return new Lr(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Br(t,e,n,r){return 1===arguments.length?Dr(t):new Lr(t,e,n,null==r?1:r)}function Lr(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Or(t){if(isNaN(t.h))return new Er(t.l,0,0,t.opacity);var e=t.h*vr;return new Er(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Un(Er,(function(t,e,n,r){return 1===arguments.length?Cr(t):new Er(t,e,n,null==r?1:r)}),zn($n,{brighter:function(t){return new Er(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Er(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new lr(Mr(3.1338561*(e=_r*Ar(e))-1.6168667*(t=1*Ar(t))-.4906146*(n=xr*Ar(n))),Mr(-.9787684*e+1.9161415*t+.033454*n),Mr(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Un(Lr,Br,zn($n,{brighter:function(t){return new Lr(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Lr(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Or(this).rgb()}}));const Ir=t=>()=>t;function Rr(t,e){return function(n){return t+n*e}}function Fr(t,e){var n=e-t;return n?Rr(t,n):Ir(isNaN(t)?e:t)}function Pr(t){return function(e,n){var r=t((e=Br(e)).h,(n=Br(n)).h),i=Fr(e.c,n.c),a=Fr(e.l,n.l),o=Fr(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}const Yr=Pr((function(t,e){var n=e-t;return n?Rr(t,n>180||n<-180?n-360*Math.round(n/360):n):Ir(isNaN(t)?e:t)}));Pr(Fr);var jr=Math.sqrt(50),Ur=Math.sqrt(10),zr=Math.sqrt(2);function $r(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=jr?10:a>=Ur?5:a>=zr?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=jr?10:a>=Ur?5:a>=zr?2:1)}function qr(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=jr?i*=10:a>=Ur?i*=5:a>=zr&&(i*=2),e<t?-i:i}function Hr(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Wr(t){let e=t,n=t,r=t;function i(t,e,i=0,a=t.length){if(i<a){if(0!==n(e,e))return a;do{const n=i+a>>>1;r(t[n],e)<0?i=n+1:a=n}while(i<a)}return i}return 2!==t.length&&(e=(e,n)=>t(e)-n,n=Hr,r=(e,n)=>Hr(t(e),n)),{left:i,center:function(t,n,r=0,a=t.length){const o=i(t,n,r,a-1);return o>r&&e(t[o-1],n)>-e(t[o],n)?o-1:o},right:function(t,e,i=0,a=t.length){if(i<a){if(0!==n(e,e))return a;do{const n=i+a>>>1;r(t[n],e)<=0?i=n+1:a=n}while(i<a)}return i}}}const Vr=Wr(Hr),Gr=Vr.right,Xr=(Vr.left,Wr((function(t){return null===t?NaN:+t})).center,Gr);function Zr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Qr(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Kr(){}var Jr=.7,ti=1.4285714285714286,ei="\\s*([+-]?\\d+)\\s*",ni="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ri="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ii=/^#([0-9a-f]{3,8})$/,ai=new RegExp("^rgb\\("+[ei,ei,ei]+"\\)$"),oi=new RegExp("^rgb\\("+[ri,ri,ri]+"\\)$"),si=new RegExp("^rgba\\("+[ei,ei,ei,ni]+"\\)$"),ci=new RegExp("^rgba\\("+[ri,ri,ri,ni]+"\\)$"),ui=new RegExp("^hsl\\("+[ni,ri,ri]+"\\)$"),li=new RegExp("^hsla\\("+[ni,ri,ri,ni]+"\\)$"),hi={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function fi(){return this.rgb().formatHex()}function di(){return this.rgb().formatRgb()}function pi(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ii.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?gi(e):3===n?new bi(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?yi(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?yi(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ai.exec(t))?new bi(e[1],e[2],e[3],1):(e=oi.exec(t))?new bi(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=si.exec(t))?yi(e[1],e[2],e[3],e[4]):(e=ci.exec(t))?yi(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ui.exec(t))?ki(e[1],e[2]/100,e[3]/100,1):(e=li.exec(t))?ki(e[1],e[2]/100,e[3]/100,e[4]):hi.hasOwnProperty(t)?gi(hi[t]):"transparent"===t?new bi(NaN,NaN,NaN,0):null}function gi(t){return new bi(t>>16&255,t>>8&255,255&t,1)}function yi(t,e,n,r){return r<=0&&(t=e=n=NaN),new bi(t,e,n,r)}function mi(t){return t instanceof Kr||(t=pi(t)),t?new bi((t=t.rgb()).r,t.g,t.b,t.opacity):new bi}function vi(t,e,n,r){return 1===arguments.length?mi(t):new bi(t,e,n,null==r?1:r)}function bi(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function _i(){return"#"+wi(this.r)+wi(this.g)+wi(this.b)}function xi(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function wi(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function ki(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ci(t,e,n,r)}function Ti(t){if(t instanceof Ci)return new Ci(t.h,t.s,t.l,t.opacity);if(t instanceof Kr||(t=pi(t)),!t)return new Ci;if(t instanceof Ci)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Ci(o,s,c,t.opacity)}function Ci(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ei(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Si(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}Zr(Kr,pi,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:fi,formatHex:fi,formatHsl:function(){return Ti(this).formatHsl()},formatRgb:di,toString:di}),Zr(bi,vi,Qr(Kr,{brighter:function(t){return t=null==t?ti:Math.pow(ti,t),new bi(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Jr:Math.pow(Jr,t),new bi(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:_i,formatHex:_i,formatRgb:xi,toString:xi})),Zr(Ci,(function(t,e,n,r){return 1===arguments.length?Ti(t):new Ci(t,e,n,null==r?1:r)}),Qr(Kr,{brighter:function(t){return t=null==t?ti:Math.pow(ti,t),new Ci(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Jr:Math.pow(Jr,t),new Ci(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new bi(Ei(t>=240?t-240:t+120,i,r),Ei(t,i,r),Ei(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const Ai=t=>()=>t;function Mi(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Ai(isNaN(t)?e:t)}const Ni=function t(e){var n=function(t){return 1==(t=+t)?Mi:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ai(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=vi(t)).r,(e=vi(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Mi(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function Di(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=vi(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}function Bi(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=ji(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function Li(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Oi(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Ii(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=ji(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}Di((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return Si((n-r/e)*e,o,i,a,s)}})),Di((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return Si((n-r/e)*e,i,a,o,s)}}));var Ri=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fi=new RegExp(Ri.source,"g");function Pi(t,e){var n,r,i,a=Ri.lastIndex=Fi.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=Ri.exec(t))&&(r=Fi.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:Oi(n,r)})),a=Fi.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function Yi(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function ji(t,e){var n,r,i=typeof e;return null==e||"boolean"===i?Ai(e):("number"===i?Oi:"string"===i?(n=pi(e))?(e=n,Ni):Pi:e instanceof pi?Ni:e instanceof Date?Li:(r=e,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(e)?Bi:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Ii:Oi:Yi))(t,e)}function Ui(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function zi(t){return+t}var $i=[0,1];function qi(t){return t}function Hi(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function Wi(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=Hi(i,r),a=n(o,a)):(r=Hi(r,i),a=n(a,o)),function(t){return a(r(t))}}function Vi(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Hi(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=Xr(t,e,1,r)-1;return a[n](i[n](e))}}function Gi(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Xi(){return function(){var t,e,n,r,i,a,o=$i,s=$i,c=ji,u=qi;function l(){var t,e,n,c=Math.min(o.length,s.length);return u!==qi&&(t=o[0],e=o[c-1],t>e&&(n=t,t=e,e=n),u=function(n){return Math.max(t,Math.min(e,n))}),r=c>2?Vi:Wi,i=a=null,h}function h(e){return null==e||isNaN(e=+e)?n:(i||(i=r(o.map(t),s,c)))(t(u(e)))}return h.invert=function(n){return u(e((a||(a=r(s,o.map(t),Oi)))(n)))},h.domain=function(t){return arguments.length?(o=Array.from(t,zi),l()):o.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),l()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),c=Ui,l()},h.clamp=function(t){return arguments.length?(u=!!t||qi,l()):u!==qi},h.interpolate=function(t){return arguments.length?(c=t,l()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}()(qi,qi)}function Zi(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Qi,Ki=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ji(t){if(!(e=Ki.exec(t)))throw new Error("invalid format: "+t);var e;return new ta({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function ta(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function ea(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function na(t){return(t=ea(Math.abs(t)))?t[1]:NaN}function ra(t,e){var n=ea(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Ji.prototype=ta.prototype,ta.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const ia={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>ra(100*t,e),r:ra,s:function(t,e){var n=ea(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Qi=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+ea(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function aa(t){return t}var oa,sa,ca,ua=Array.prototype.map,la=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ha(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=$r(t,e,n))||!isFinite(o))return[];if(o>0){let n=Math.round(t/o),r=Math.round(e/o);for(n*o<t&&++n,r*o>e&&--r,a=new Array(i=r-n+1);++s<i;)a[s]=(n+s)*o}else{o=-o;let n=Math.round(t*o),r=Math.round(e*o);for(n/o<t&&++n,r/o>e&&--r,a=new Array(i=r-n+1);++s<i;)a[s]=(n+s)/o}return r&&a.reverse(),a}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return function(t,e,n,r){var i,a=qr(t,e,n);switch((r=Ji(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(na(e)/3)))-na(Math.abs(t)))}(a,o))||(r.precision=i),ca(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,na(e)-na(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-na(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return sa(r)}(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,a=e(),o=0,s=a.length-1,c=a[o],u=a[s],l=10;for(u<c&&(i=c,c=u,u=i,i=o,o=s,s=i);l-- >0;){if((i=$r(c,u,n))===r)return a[o]=c,a[s]=u,e(a);if(i>0)c=Math.floor(c/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,u=Math.floor(u*i)/i}r=i}return t},t}function fa(){var t=Xi();return t.copy=function(){return Gi(t,fa())},Zi.apply(t,arguments),ha(t)}oa=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?aa:(e=ua.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(t.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?aa:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(ua.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Ji(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,y=t.precision,m=t.trim,v=t.type;"n"===v?(g=!0,v="g"):ia[v]||(void 0===y&&(y=12),m=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var b="$"===f?i:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",_="$"===f?a:/[%p]/.test(v)?c:"",x=ia[v],w=/[defgprs%]/.test(v);function k(t){var i,a,c,f=b,k=_;if("c"===v)k=x(t)+k,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:x(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==h&&(T=!1),f=(T?"("===h?h:u:"-"===h||"("===h?"":h)+f,k=("s"===v?la[8+Qi/3]:"")+k+(T&&"("===h?")":""),w)for(i=-1,a=t.length;++i<a;)if(48>(c=t.charCodeAt(i))||c>57){k=(46===c?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var C=f.length+t.length+k.length,E=C<p?new Array(p-C+1).join(e):"";switch(g&&d&&(t=r(E+t,E.length?p-k.length:1/0),E=""),n){case"<":t=f+t+k+E;break;case"=":t=f+E+t+k;break;case"^":t=E.slice(0,C=E.length>>1)+f+t+k+E.slice(C);break;default:t=E+f+t+k}return s(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=Ji(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(na(e)/3))),i=Math.pow(10,-r),a=la[8+r/3];return function(t){return n(i*t)+a}}}}({thousands:",",grouping:[3],currency:["$",""]}),sa=oa.format,ca=oa.formatPrefix;class da extends Map{constructor(t,e=ga){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(pa(this,t))}has(t){return super.has(pa(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}(this,t))}}function pa({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function ga(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;const ya=Symbol("implicit");function ma(){var t=new da,e=[],n=[],r=ya;function i(i){let a=t.get(i);if(void 0===a){if(r!==ya)return r;t.set(i,a=e.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new da;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return ma(e,n).unknown(r)},Zi.apply(i,arguments),i}const va=1e3,ba=6e4,_a=36e5,xa=864e5,wa=6048e5,ka=31536e6;var Ta=new Date,Ca=new Date;function Ea(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return Ea((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Ta.setTime(+e),Ca.setTime(+r),t(Ta),t(Ca),Math.floor(n(Ta,Ca))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Sa=Ea((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Sa.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Ea((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Sa:null};const Aa=Sa;Sa.range;var Ma=Ea((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*va)}),(function(t,e){return(e-t)/va}),(function(t){return t.getUTCSeconds()}));const Na=Ma;Ma.range;var Da=Ea((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*va)}),(function(t,e){t.setTime(+t+e*ba)}),(function(t,e){return(e-t)/ba}),(function(t){return t.getMinutes()}));const Ba=Da;Da.range;var La=Ea((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*va-t.getMinutes()*ba)}),(function(t,e){t.setTime(+t+e*_a)}),(function(t,e){return(e-t)/_a}),(function(t){return t.getHours()}));const Oa=La;La.range;var Ia=Ea((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ba)/xa),(t=>t.getDate()-1));const Ra=Ia;function Fa(t){return Ea((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ba)/wa}))}Ia.range;var Pa=Fa(0),Ya=Fa(1),ja=Fa(2),Ua=Fa(3),za=Fa(4),$a=Fa(5),qa=Fa(6),Ha=(Pa.range,Ya.range,ja.range,Ua.range,za.range,$a.range,qa.range,Ea((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})));const Wa=Ha;Ha.range;var Va=Ea((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Va.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ea((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};const Ga=Va;Va.range;var Xa=Ea((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*ba)}),(function(t,e){return(e-t)/ba}),(function(t){return t.getUTCMinutes()}));const Za=Xa;Xa.range;var Qa=Ea((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*_a)}),(function(t,e){return(e-t)/_a}),(function(t){return t.getUTCHours()}));const Ka=Qa;Qa.range;var Ja=Ea((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/xa}),(function(t){return t.getUTCDate()-1}));const to=Ja;function eo(t){return Ea((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/wa}))}Ja.range;var no=eo(0),ro=eo(1),io=eo(2),ao=eo(3),oo=eo(4),so=eo(5),co=eo(6),uo=(no.range,ro.range,io.range,ao.range,oo.range,so.range,co.range,Ea((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})));const lo=uo;uo.range;var ho=Ea((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));ho.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ea((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};const fo=ho;function po(t,e,n,r,i,a){const o=[[Na,1,va],[Na,5,5e3],[Na,15,15e3],[Na,30,3e4],[a,1,ba],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,_a],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,xa],[r,2,1728e5],[n,1,wa],[e,1,2592e6],[e,3,7776e6],[t,1,ka]];function s(e,n,r){const i=Math.abs(n-e)/r,a=Wr((([,,t])=>t)).right(o,i);if(a===o.length)return t.every(qr(e/ka,n/ka,r));if(0===a)return Aa.every(Math.max(qr(e,n,r),1));const[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[function(t,e,n){const r=e<t;r&&([t,e]=[e,t]);const i=n&&"function"==typeof n.range?n:s(t,e,n),a=i?i.range(t,+e+1):[];return r?a.reverse():a},s]}ho.range;const[go,yo]=po(fo,lo,no,to,Ka,Za),[mo,vo]=po(Ga,Wa,Pa,Ra,Oa,Ba);function bo(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function _o(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function xo(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var wo,ko,To={"-":"",_:" ",0:"0"},Co=/^\s*\d+/,Eo=/^%/,So=/[\\^$*+?|[\]().{}]/g;function Ao(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function Mo(t){return t.replace(So,"\\$&")}function No(t){return new RegExp("^(?:"+t.map(Mo).join("|")+")","i")}function Do(t){return new Map(t.map(((t,e)=>[t.toLowerCase(),e])))}function Bo(t,e,n){var r=Co.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Lo(t,e,n){var r=Co.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Oo(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Io(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Ro(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Fo(t,e,n){var r=Co.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Po(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Yo(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function jo(t,e,n){var r=Co.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Uo(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function zo(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function $o(t,e,n){var r=Co.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function qo(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ho(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Wo(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Vo(t,e,n){var r=Co.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Go(t,e,n){var r=Co.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xo(t,e,n){var r=Eo.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Zo(t,e,n){var r=Co.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Qo(t,e,n){var r=Co.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Ko(t,e){return Ao(t.getDate(),e,2)}function Jo(t,e){return Ao(t.getHours(),e,2)}function ts(t,e){return Ao(t.getHours()%12||12,e,2)}function es(t,e){return Ao(1+Ra.count(Ga(t),t),e,3)}function ns(t,e){return Ao(t.getMilliseconds(),e,3)}function rs(t,e){return ns(t,e)+"000"}function is(t,e){return Ao(t.getMonth()+1,e,2)}function as(t,e){return Ao(t.getMinutes(),e,2)}function os(t,e){return Ao(t.getSeconds(),e,2)}function ss(t){var e=t.getDay();return 0===e?7:e}function cs(t,e){return Ao(Pa.count(Ga(t)-1,t),e,2)}function us(t){var e=t.getDay();return e>=4||0===e?za(t):za.ceil(t)}function ls(t,e){return t=us(t),Ao(za.count(Ga(t),t)+(4===Ga(t).getDay()),e,2)}function hs(t){return t.getDay()}function fs(t,e){return Ao(Ya.count(Ga(t)-1,t),e,2)}function ds(t,e){return Ao(t.getFullYear()%100,e,2)}function ps(t,e){return Ao((t=us(t)).getFullYear()%100,e,2)}function gs(t,e){return Ao(t.getFullYear()%1e4,e,4)}function ys(t,e){var n=t.getDay();return Ao((t=n>=4||0===n?za(t):za.ceil(t)).getFullYear()%1e4,e,4)}function ms(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Ao(e/60|0,"0",2)+Ao(e%60,"0",2)}function vs(t,e){return Ao(t.getUTCDate(),e,2)}function bs(t,e){return Ao(t.getUTCHours(),e,2)}function _s(t,e){return Ao(t.getUTCHours()%12||12,e,2)}function xs(t,e){return Ao(1+to.count(fo(t),t),e,3)}function ws(t,e){return Ao(t.getUTCMilliseconds(),e,3)}function ks(t,e){return ws(t,e)+"000"}function Ts(t,e){return Ao(t.getUTCMonth()+1,e,2)}function Cs(t,e){return Ao(t.getUTCMinutes(),e,2)}function Es(t,e){return Ao(t.getUTCSeconds(),e,2)}function Ss(t){var e=t.getUTCDay();return 0===e?7:e}function As(t,e){return Ao(no.count(fo(t)-1,t),e,2)}function Ms(t){var e=t.getUTCDay();return e>=4||0===e?oo(t):oo.ceil(t)}function Ns(t,e){return t=Ms(t),Ao(oo.count(fo(t),t)+(4===fo(t).getUTCDay()),e,2)}function Ds(t){return t.getUTCDay()}function Bs(t,e){return Ao(ro.count(fo(t)-1,t),e,2)}function Ls(t,e){return Ao(t.getUTCFullYear()%100,e,2)}function Os(t,e){return Ao((t=Ms(t)).getUTCFullYear()%100,e,2)}function Is(t,e){return Ao(t.getUTCFullYear()%1e4,e,4)}function Rs(t,e){var n=t.getUTCDay();return Ao((t=n>=4||0===n?oo(t):oo.ceil(t)).getUTCFullYear()%1e4,e,4)}function Fs(){return"+0000"}function Ps(){return"%"}function Ys(t){return+t}function js(t){return Math.floor(+t/1e3)}function Us(t){return new Date(t)}function zs(t){return t instanceof Date?+t:+new Date(+t)}function $s(t,e,n,r,i,a,o,s,c,u){var l=Xi(),h=l.invert,f=l.domain,d=u(".%L"),p=u(":%S"),g=u("%I:%M"),y=u("%I %p"),m=u("%a %d"),v=u("%b %d"),b=u("%B"),_=u("%Y");function x(t){return(c(t)<t?d:s(t)<t?p:o(t)<t?g:a(t)<t?y:r(t)<t?i(t)<t?m:v:n(t)<t?b:_)(t)}return l.invert=function(t){return new Date(h(t))},l.domain=function(t){return arguments.length?f(Array.from(t,zs)):f().map(Us)},l.ticks=function(e){var n=f();return t(n[0],n[n.length-1],null==e?10:e)},l.tickFormat=function(t,e){return null==e?x:u(e)},l.nice=function(t){var n=f();return t&&"function"==typeof t.range||(t=e(n[0],n[n.length-1],null==t?10:t)),t?f(function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}(n,t)):l},l.copy=function(){return Gi(l,$s(t,e,n,r,i,a,o,s,c,u))},l}function qs(){}function Hs(t){return null==t?qs:function(){return this.querySelector(t)}}function Ws(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Vs(){return[]}function Gs(t){return null==t?Vs:function(){return this.querySelectorAll(t)}}function Xs(t){return function(){return this.matches(t)}}function Zs(t){return function(e){return e.matches(t)}}wo=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,u=No(i),l=Do(i),h=No(a),f=Do(a),d=No(o),p=Do(o),g=No(s),y=Do(s),m=No(c),v=Do(c),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Ko,e:Ko,f:rs,g:ps,G:ys,H:Jo,I:ts,j:es,L:ns,m:is,M:as,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Ys,s:js,S:os,u:ss,U:cs,V:ls,w:hs,W:fs,x:null,X:null,y:ds,Y:gs,Z:ms,"%":Ps},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:vs,e:vs,f:ks,g:Os,G:Rs,H:bs,I:_s,j:xs,L:ws,m:Ts,M:Cs,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Ys,s:js,S:Es,u:Ss,U:As,V:Ns,w:Ds,W:Bs,x:null,X:null,y:Ls,Y:Is,Z:Fs,"%":Ps},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return T(t,e,n,r)},d:zo,e:zo,f:Go,g:Po,G:Fo,H:qo,I:qo,j:$o,L:Vo,m:Uo,M:Ho,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=l.get(r[0].toLowerCase()),n+r[0].length):-1},q:jo,Q:Zo,s:Qo,S:Wo,u:Lo,U:Oo,V:Io,w:Bo,W:Ro,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:Po,Y:Fo,Z:Yo,"%":Xo};function w(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===t.charCodeAt(s)&&(o.push(t.slice(c,s)),null!=(i=To[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),c=s+1);return o.push(t.slice(c,s)),o.join("")}}function k(t,e){return function(n){var r,i,a=xo(1900,void 0,1);if(T(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=_o(xo(a.y,0,1))).getUTCDay(),r=i>4||0===i?ro.ceil(r):ro(r),r=to.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=bo(xo(a.y,0,1))).getDay(),r=i>4||0===i?Ya.ceil(r):Ya(r),r=Ra.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?_o(xo(a.y,0,1)).getUTCDay():bo(xo(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,_o(a)):bo(a)}}function T(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o<s;){if(r>=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in To?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),{format:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),ko=wo.format,wo.parse,wo.utcFormat,wo.utcParse;var Qs=Array.prototype.find;function Ks(){return this.firstElementChild}var Js=Array.prototype.filter;function tc(){return Array.from(this.children)}function ec(t){return new Array(t.length)}function nc(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function rc(t){return function(){return t}}function ic(t,e,n,r,i,a){for(var o,s=0,c=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new nc(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function ac(t,e,n,r,i,a,o){var s,c,u,l=new Map,h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(d[s]=u=o.call(c,c.__data__,s,e)+"",l.has(u)?i[s]=c:l.set(u,c));for(s=0;s<f;++s)u=o.call(t,a[s],s,a)+"",(c=l.get(u))?(r[s]=c,c.__data__=a[s],l.delete(u)):n[s]=new nc(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&l.get(d[s])===c&&(i[s]=c)}function oc(t){return t.__data__}function sc(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function cc(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}nc.prototype={constructor:nc,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var uc="http://www.w3.org/1999/xhtml";const lc={svg:"http://www.w3.org/2000/svg",xhtml:uc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function hc(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),lc.hasOwnProperty(e)?{space:lc[e],local:t}:t}function fc(t){return function(){this.removeAttribute(t)}}function dc(t){return function(){this.removeAttributeNS(t.space,t.local)}}function pc(t,e){return function(){this.setAttribute(t,e)}}function gc(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function yc(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function mc(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function vc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function bc(t){return function(){this.style.removeProperty(t)}}function _c(t,e,n){return function(){this.style.setProperty(t,e,n)}}function xc(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function wc(t,e){return t.style.getPropertyValue(e)||vc(t).getComputedStyle(t,null).getPropertyValue(e)}function kc(t){return function(){delete this[t]}}function Tc(t,e){return function(){this[t]=e}}function Cc(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Ec(t){return t.trim().split(/^|\s+/)}function Sc(t){return t.classList||new Ac(t)}function Ac(t){this._node=t,this._names=Ec(t.getAttribute("class")||"")}function Mc(t,e){for(var n=Sc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Nc(t,e){for(var n=Sc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Dc(t){return function(){Mc(this,t)}}function Bc(t){return function(){Nc(this,t)}}function Lc(t,e){return function(){(e.apply(this,arguments)?Mc:Nc)(this,t)}}function Oc(){this.textContent=""}function Ic(t){return function(){this.textContent=t}}function Rc(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Fc(){this.innerHTML=""}function Pc(t){return function(){this.innerHTML=t}}function Yc(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function jc(){this.nextSibling&&this.parentNode.appendChild(this)}function Uc(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function zc(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===uc&&e.documentElement.namespaceURI===uc?e.createElement(t):e.createElementNS(n,t)}}function $c(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function qc(t){var e=hc(t);return(e.local?$c:zc)(e)}function Hc(){return null}function Wc(){var t=this.parentNode;t&&t.removeChild(this)}function Vc(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Gc(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Xc(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Zc(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Qc(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function Kc(t,e,n){var r=vc(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Jc(t,e){return function(){return Kc(this,t,e)}}function tu(t,e){return function(){return Kc(this,t,e.apply(this,arguments))}}Ac.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var eu=[null];function nu(t,e){this._groups=t,this._parents=e}function ru(){return new nu([[document.documentElement]],eu)}nu.prototype=ru.prototype={constructor:nu,select:function(t){"function"!=typeof t&&(t=Hs(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,u=r[i]=new Array(c),l=0;l<c;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),u[l]=o);return new nu(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return Ws(t.apply(this,arguments))}}(t):Gs(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,u=0;u<c;++u)(o=s[u])&&(r.push(t.call(o,o.__data__,u,s)),i.push(o));return new nu(r,i)},selectChild:function(t){return this.select(null==t?Ks:function(t){return function(){return Qs.call(this.children,t)}}("function"==typeof t?t:Zs(t)))},selectChildren:function(t){return this.selectAll(null==t?tc:function(t){return function(){return Js.call(this.children,t)}}("function"==typeof t?t:Zs(t)))},filter:function(t){"function"!=typeof t&&(t=Xs(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new nu(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,oc);var n=e?ac:ic,r=this._parents,i=this._groups;"function"!=typeof t&&(t=rc(t));for(var a=i.length,o=new Array(a),s=new Array(a),c=new Array(a),u=0;u<a;++u){var l=r[u],h=i[u],f=h.length,d=sc(t.call(l,l&&l.__data__,u,r)),p=d.length,g=s[u]=new Array(p),y=o[u]=new Array(p),m=c[u]=new Array(f);n(l,h,g,y,m,d,e);for(var v,b,_=0,x=0;_<p;++_)if(v=g[_]){for(_>=x&&(x=_+1);!(b=y[x])&&++x<p;);v._next=b||null}}return(o=new nu(o,r))._enter=s,o._exit=c,o},enter:function(){return new nu(this._enter||this._groups.map(ec),this._parents)},exit:function(){return new nu(this._exit||this._groups.map(ec),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),c=0;c<o;++c)for(var u,l=n[c],h=r[c],f=l.length,d=s[c]=new Array(f),p=0;p<f;++p)(u=l[p]||h[p])&&(d[p]=u);for(;c<i;++c)s[c]=n[c];return new nu(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=cc);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,u=i[a]=new Array(c),l=0;l<c;++l)(o=s[l])&&(u[l]=o);u.sort(e)}return new nu(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=hc(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?dc:fc:"function"==typeof e?n.local?mc:yc:n.local?gc:pc)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?bc:"function"==typeof e?xc:_c)(t,e,null==n?"":n)):wc(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?kc:"function"==typeof e?Cc:Tc)(t,e)):this.node()[t]},classed:function(t,e){var n=Ec(t+"");if(arguments.length<2){for(var r=Sc(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Lc:e?Dc:Bc)(n,e))},text:function(t){return arguments.length?this.each(null==t?Oc:("function"==typeof t?Rc:Ic)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Fc:("function"==typeof t?Yc:Pc)(t)):this.node().innerHTML},raise:function(){return this.each(jc)},lower:function(){return this.each(Uc)},append:function(t){var e="function"==typeof t?t:qc(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:qc(t),r=null==e?Hc:"function"==typeof e?e:Hs(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Wc)},clone:function(t){return this.select(t?Gc:Vc)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=Xc(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?Qc:Zc,r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,u=0,l=s.length;u<l;++u)for(r=0,c=s[u];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?tu:Jc)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};const iu=ru;function au(t){return"string"==typeof t?new nu([[document.querySelector(t)]],[document.documentElement]):new nu([[t]],eu)}function ou(t){return"string"==typeof t?new nu([document.querySelectorAll(t)],[document.documentElement]):new nu([Ws(t)],eu)}const su=Math.PI,cu=2*su,uu=1e-6,lu=cu-uu;function hu(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function fu(){return new hu}hu.prototype=fu.prototype={constructor:hu,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,c=r-e,u=a-t,l=o-e,h=u*u+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>uu)if(Math.abs(l*s-c*u)>uu&&i){var f=n-a,d=r-o,p=s*s+c*c,g=f*f+d*d,y=Math.sqrt(p),m=Math.sqrt(h),v=i*Math.tan((su-Math.acos((p+h-g)/(2*y*m)))/2),b=v/m,_=v/y;Math.abs(b-1)>uu&&(this._+="L"+(t+b*u)+","+(e+b*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>u*d)+","+(this._x1=t+_*s)+","+(this._y1=e+_*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),c=t+o,u=e+s,l=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+u:(Math.abs(this._x1-c)>uu||Math.abs(this._y1-u)>uu)&&(this._+="L"+c+","+u),n&&(h<0&&(h=h%cu+cu),h>lu?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=c)+","+(this._y1=u):h>uu&&(this._+="A"+n+","+n+",0,"+ +(h>=su)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const du=fu;function pu(t){return function(){return t}}var gu=Math.abs,yu=Math.atan2,mu=Math.cos,vu=Math.max,bu=Math.min,_u=Math.sin,xu=Math.sqrt,wu=1e-12,ku=Math.PI,Tu=ku/2,Cu=2*ku;function Eu(t){return t>1?0:t<-1?ku:Math.acos(t)}function Su(t){return t>=1?Tu:t<=-1?-Tu:Math.asin(t)}function Au(t){return t.innerRadius}function Mu(t){return t.outerRadius}function Nu(t){return t.startAngle}function Du(t){return t.endAngle}function Bu(t){return t&&t.padAngle}function Lu(t,e,n,r,i,a,o,s){var c=n-t,u=r-e,l=o-i,h=s-a,f=h*c-l*u;if(!(f*f<wu))return[t+(f=(l*(e-a)-h*(t-i))/f)*c,e+f*u]}function Ou(t,e,n,r,i,a,o){var s=t-n,c=e-r,u=(o?a:-a)/xu(s*s+c*c),l=u*c,h=-u*s,f=t+l,d=e+h,p=n+l,g=r+h,y=(f+p)/2,m=(d+g)/2,v=p-f,b=g-d,_=v*v+b*b,x=i-a,w=f*g-p*d,k=(b<0?-1:1)*xu(vu(0,x*x*_-w*w)),T=(w*b-v*k)/_,C=(-w*v-b*k)/_,E=(w*b+v*k)/_,S=(-w*v+b*k)/_,A=T-y,M=C-m,N=E-y,D=S-m;return A*A+M*M>N*N+D*D&&(T=E,C=S),{cx:T,cy:C,x01:-l,y01:-h,x11:T*(i/x-1),y11:C*(i/x-1)}}function Iu(){var t=Au,e=Mu,n=pu(0),r=null,i=Nu,a=Du,o=Bu,s=null;function c(){var c,u,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-Tu,d=a.apply(this,arguments)-Tu,p=gu(d-f),g=d>f;if(s||(s=c=du()),h<l&&(u=h,h=l,l=u),h>wu)if(p>Cu-wu)s.moveTo(h*mu(f),h*_u(f)),s.arc(0,0,h,f,d,!g),l>wu&&(s.moveTo(l*mu(d),l*_u(d)),s.arc(0,0,l,d,f,g));else{var y,m,v=f,b=d,_=f,x=d,w=p,k=p,T=o.apply(this,arguments)/2,C=T>wu&&(r?+r.apply(this,arguments):xu(l*l+h*h)),E=bu(gu(h-l)/2,+n.apply(this,arguments)),S=E,A=E;if(C>wu){var M=Su(C/l*_u(T)),N=Su(C/h*_u(T));(w-=2*M)>wu?(_+=M*=g?1:-1,x-=M):(w=0,_=x=(f+d)/2),(k-=2*N)>wu?(v+=N*=g?1:-1,b-=N):(k=0,v=b=(f+d)/2)}var D=h*mu(v),B=h*_u(v),L=l*mu(x),O=l*_u(x);if(E>wu){var I,R=h*mu(b),F=h*_u(b),P=l*mu(_),Y=l*_u(_);if(p<ku&&(I=Lu(D,B,P,Y,R,F,L,O))){var j=D-I[0],U=B-I[1],z=R-I[0],$=F-I[1],q=1/_u(Eu((j*z+U*$)/(xu(j*j+U*U)*xu(z*z+$*$)))/2),H=xu(I[0]*I[0]+I[1]*I[1]);S=bu(E,(l-H)/(q-1)),A=bu(E,(h-H)/(q+1))}}k>wu?A>wu?(y=Ou(P,Y,D,B,h,A,g),m=Ou(R,F,L,O,h,A,g),s.moveTo(y.cx+y.x01,y.cy+y.y01),A<E?s.arc(y.cx,y.cy,A,yu(y.y01,y.x01),yu(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,A,yu(y.y01,y.x01),yu(y.y11,y.x11),!g),s.arc(0,0,h,yu(y.cy+y.y11,y.cx+y.x11),yu(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,yu(m.y11,m.x11),yu(m.y01,m.x01),!g))):(s.moveTo(D,B),s.arc(0,0,h,v,b,!g)):s.moveTo(D,B),l>wu&&w>wu?S>wu?(y=Ou(L,O,R,F,l,-S,g),m=Ou(D,B,P,Y,l,-S,g),s.lineTo(y.cx+y.x01,y.cy+y.y01),S<E?s.arc(y.cx,y.cy,S,yu(y.y01,y.x01),yu(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,S,yu(y.y01,y.x01),yu(y.y11,y.x11),!g),s.arc(0,0,l,yu(y.cy+y.y11,y.cx+y.x11),yu(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,S,yu(m.y11,m.x11),yu(m.y01,m.x01),!g))):s.arc(0,0,l,x,_,g):s.lineTo(L,O)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-ku/2;return[mu(r)*n,_u(r)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:pu(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:pu(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:pu(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:pu(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:pu(+t),c):i},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:pu(+t),c):a},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:pu(+t),c):o},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c}function Ru(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Fu(t){this._context=t}function Pu(t){return new Fu(t)}function Yu(t){return t[0]}function ju(t){return t[1]}function Uu(t,e){var n=pu(!0),r=null,i=Pu,a=null;function o(o){var s,c,u,l=(o=Ru(o)).length,h=!1;for(null==r&&(a=i(u=du())),s=0;s<=l;++s)!(s<l&&n(c=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(c,s,o),+e(c,s,o));if(u)return a=null,u+""||null}return t="function"==typeof t?t:void 0===t?Yu:pu(t),e="function"==typeof e?e:void 0===e?ju:pu(e),o.x=function(e){return arguments.length?(t="function"==typeof e?e:pu(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:pu(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:pu(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}function zu(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function $u(t){return t}function qu(){}function Hu(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Wu(t){this._context=t}function Vu(t){return new Wu(t)}function Gu(t){this._context=t}function Xu(t){this._context=t}function Zu(t){this._context=t}function Qu(t){return t<0?-1:1}function Ku(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Qu(a)+Qu(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Ju(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function tl(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function el(t){this._context=t}function nl(t){this._context=new rl(t)}function rl(t){this._context=t}function il(t){this._context=t}function al(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function ol(t,e){this._context=t,this._t=e}Array.prototype.slice,Fu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},Wu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Hu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Hu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Gu.prototype={areaStart:qu,areaEnd:qu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Hu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Xu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Hu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Zu.prototype={areaStart:qu,areaEnd:qu,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},el.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:tl(this,this._t0,Ju(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,tl(this,Ju(this,n=Ku(this,t,e)),n);break;default:tl(this,this._t0,n=Ku(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(nl.prototype=Object.create(el.prototype)).point=function(t,e){el.prototype.point.call(this,e,t)},rl.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},il.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=al(t),i=al(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},ol.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var sl=new Date,cl=new Date;function ul(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return ul((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return sl.setTime(+e),cl.setTime(+r),t(sl),t(cl),Math.floor(n(sl,cl))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}const ll=864e5,hl=6048e5;function fl(t){return ul((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/hl}))}var dl=fl(0),pl=fl(1),gl=fl(2),yl=fl(3),ml=fl(4),vl=fl(5),bl=fl(6),_l=(dl.range,pl.range,gl.range,yl.range,ml.range,vl.range,bl.range,ul((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/ll}),(function(t){return t.getUTCDate()-1})));const xl=_l;function wl(t){return ul((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/hl}))}_l.range;var kl=wl(0),Tl=wl(1),Cl=wl(2),El=wl(3),Sl=wl(4),Al=wl(5),Ml=wl(6),Nl=(kl.range,Tl.range,Cl.range,El.range,Sl.range,Al.range,Ml.range,ul((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/ll),(t=>t.getDate()-1)));const Dl=Nl;Nl.range;var Bl=ul((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Bl.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ul((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};const Ll=Bl;Bl.range;var Ol=ul((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));Ol.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ul((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};const Il=Ol;function Rl(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Fl(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Pl(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Ol.range;var Yl,jl,Ul={"-":"",_:" ",0:"0"},zl=/^\s*\d+/,$l=/^%/,ql=/[\\^$*+?|[\]().{}]/g;function Hl(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function Wl(t){return t.replace(ql,"\\$&")}function Vl(t){return new RegExp("^(?:"+t.map(Wl).join("|")+")","i")}function Gl(t){return new Map(t.map(((t,e)=>[t.toLowerCase(),e])))}function Xl(t,e,n){var r=zl.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Zl(t,e,n){var r=zl.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ql(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Kl(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Jl(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function th(t,e,n){var r=zl.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function eh(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function nh(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function rh(t,e,n){var r=zl.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function ih(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ah(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function oh(t,e,n){var r=zl.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function sh(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ch(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function uh(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function lh(t,e,n){var r=zl.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function hh(t,e,n){var r=zl.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function fh(t,e,n){var r=$l.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function dh(t,e,n){var r=zl.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function ph(t,e,n){var r=zl.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function gh(t,e){return Hl(t.getDate(),e,2)}function yh(t,e){return Hl(t.getHours(),e,2)}function mh(t,e){return Hl(t.getHours()%12||12,e,2)}function vh(t,e){return Hl(1+Dl.count(Ll(t),t),e,3)}function bh(t,e){return Hl(t.getMilliseconds(),e,3)}function _h(t,e){return bh(t,e)+"000"}function xh(t,e){return Hl(t.getMonth()+1,e,2)}function wh(t,e){return Hl(t.getMinutes(),e,2)}function kh(t,e){return Hl(t.getSeconds(),e,2)}function Th(t){var e=t.getDay();return 0===e?7:e}function Ch(t,e){return Hl(kl.count(Ll(t)-1,t),e,2)}function Eh(t){var e=t.getDay();return e>=4||0===e?Sl(t):Sl.ceil(t)}function Sh(t,e){return t=Eh(t),Hl(Sl.count(Ll(t),t)+(4===Ll(t).getDay()),e,2)}function Ah(t){return t.getDay()}function Mh(t,e){return Hl(Tl.count(Ll(t)-1,t),e,2)}function Nh(t,e){return Hl(t.getFullYear()%100,e,2)}function Dh(t,e){return Hl((t=Eh(t)).getFullYear()%100,e,2)}function Bh(t,e){return Hl(t.getFullYear()%1e4,e,4)}function Lh(t,e){var n=t.getDay();return Hl((t=n>=4||0===n?Sl(t):Sl.ceil(t)).getFullYear()%1e4,e,4)}function Oh(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Hl(e/60|0,"0",2)+Hl(e%60,"0",2)}function Ih(t,e){return Hl(t.getUTCDate(),e,2)}function Rh(t,e){return Hl(t.getUTCHours(),e,2)}function Fh(t,e){return Hl(t.getUTCHours()%12||12,e,2)}function Ph(t,e){return Hl(1+xl.count(Il(t),t),e,3)}function Yh(t,e){return Hl(t.getUTCMilliseconds(),e,3)}function jh(t,e){return Yh(t,e)+"000"}function Uh(t,e){return Hl(t.getUTCMonth()+1,e,2)}function zh(t,e){return Hl(t.getUTCMinutes(),e,2)}function $h(t,e){return Hl(t.getUTCSeconds(),e,2)}function qh(t){var e=t.getUTCDay();return 0===e?7:e}function Hh(t,e){return Hl(dl.count(Il(t)-1,t),e,2)}function Wh(t){var e=t.getUTCDay();return e>=4||0===e?ml(t):ml.ceil(t)}function Vh(t,e){return t=Wh(t),Hl(ml.count(Il(t),t)+(4===Il(t).getUTCDay()),e,2)}function Gh(t){return t.getUTCDay()}function Xh(t,e){return Hl(pl.count(Il(t)-1,t),e,2)}function Zh(t,e){return Hl(t.getUTCFullYear()%100,e,2)}function Qh(t,e){return Hl((t=Wh(t)).getUTCFullYear()%100,e,2)}function Kh(t,e){return Hl(t.getUTCFullYear()%1e4,e,4)}function Jh(t,e){var n=t.getUTCDay();return Hl((t=n>=4||0===n?ml(t):ml.ceil(t)).getUTCFullYear()%1e4,e,4)}function tf(){return"+0000"}function ef(){return"%"}function nf(t){return+t}function rf(t){return Math.floor(+t/1e3)}Yl=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,u=Vl(i),l=Gl(i),h=Vl(a),f=Gl(a),d=Vl(o),p=Gl(o),g=Vl(s),y=Gl(s),m=Vl(c),v=Gl(c),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:gh,e:gh,f:_h,g:Dh,G:Lh,H:yh,I:mh,j:vh,L:bh,m:xh,M:wh,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:nf,s:rf,S:kh,u:Th,U:Ch,V:Sh,w:Ah,W:Mh,x:null,X:null,y:Nh,Y:Bh,Z:Oh,"%":ef},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Ih,e:Ih,f:jh,g:Qh,G:Jh,H:Rh,I:Fh,j:Ph,L:Yh,m:Uh,M:zh,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:nf,s:rf,S:$h,u:qh,U:Hh,V:Vh,w:Gh,W:Xh,x:null,X:null,y:Zh,Y:Kh,Z:tf,"%":ef},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return T(t,e,n,r)},d:ah,e:ah,f:hh,g:eh,G:th,H:sh,I:sh,j:oh,L:lh,m:ih,M:ch,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=l.get(r[0].toLowerCase()),n+r[0].length):-1},q:rh,Q:dh,s:ph,S:uh,u:Zl,U:Ql,V:Kl,w:Xl,W:Jl,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:eh,Y:th,Z:nh,"%":fh};function w(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===t.charCodeAt(s)&&(o.push(t.slice(c,s)),null!=(i=Ul[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),c=s+1);return o.push(t.slice(c,s)),o.join("")}}function k(t,e){return function(n){var r,i,a=Pl(1900,void 0,1);if(T(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Fl(Pl(a.y,0,1))).getUTCDay(),r=i>4||0===i?pl.ceil(r):pl(r),r=xl.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Rl(Pl(a.y,0,1))).getDay(),r=i>4||0===i?Tl.ceil(r):Tl(r),r=Dl.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Fl(Pl(a.y,0,1)).getUTCDay():Rl(Pl(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Fl(a)):Rl(a)}}function T(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o<s;){if(r>=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in Ul?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),{format:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),jl=Yl.format,Yl.parse,Yl.utcFormat,Yl.utcParse;var af={value:()=>{}};function of(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new sf(r)}function sf(t){this._=t}function cf(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function uf(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function lf(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=af,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}sf.prototype=of.prototype={constructor:sf,on:function(t,e){var n,r=this._,i=cf(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=lf(r[n],t.name,e);else if(null==e)for(n in r)r[n]=lf(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=uf(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new sf(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};const hf=of;var ff,df,pf=0,gf=0,yf=0,mf=0,vf=0,bf=0,_f="object"==typeof performance&&performance.now?performance:Date,xf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function wf(){return vf||(xf(kf),vf=_f.now()+bf)}function kf(){vf=0}function Tf(){this._call=this._time=this._next=null}function Cf(t,e,n){var r=new Tf;return r.restart(t,e,n),r}function Ef(){vf=(mf=_f.now())+bf,pf=gf=0;try{!function(){wf(),++pf;for(var t,e=ff;e;)(t=vf-e._time)>=0&&e._call.call(void 0,t),e=e._next;--pf}()}finally{pf=0,function(){for(var t,e,n=ff,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:ff=e);df=t,Af(r)}(),vf=0}}function Sf(){var t=_f.now(),e=t-mf;e>1e3&&(bf-=e,mf=t)}function Af(t){pf||(gf&&(gf=clearTimeout(gf)),t-vf>24?(t<1/0&&(gf=setTimeout(Ef,t-_f.now()-bf)),yf&&(yf=clearInterval(yf))):(yf||(mf=_f.now(),yf=setInterval(Sf,1e3)),pf=1,xf(Ef)))}function Mf(t,e,n){var r=new Tf;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}Tf.prototype=Cf.prototype={constructor:Tf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?wf():+n)+(null==e?0:+e),this._next||df===this||(df?df._next=this:ff=this,df=this),this._call=t,this._time=n,Af()},stop:function(){this._call&&(this._call=null,this._time=1/0,Af())}};var Nf=hf("start","end","cancel","interrupt"),Df=[];function Bf(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(c){var u,l,h,f;if(1!==n.state)return s();for(u in i)if((f=i[u]).name===n.name){if(3===f.state)return Mf(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+u<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[u])}if(Mf((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,l=-1;u<h;++u)(f=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Cf((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Nf,tween:Df,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Lf(t,e){var n=If(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Of(t,e){var n=If(t,e);if(n.state>3)throw new Error("too late; already running");return n}function If(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Rf(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Ff,Pf=180/Math.PI,Yf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function jf(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*Pf,skewX:Math.atan(c)*Pf,scaleX:o,scaleY:s}}function Uf(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:Rf(t,i)},{i:c-2,x:Rf(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Rf(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Rf(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Rf(t,n)},{i:s-2,x:Rf(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var zf=Uf((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Yf:jf(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),$f=Uf((function(t){return null==t?Yf:(Ff||(Ff=document.createElementNS("http://www.w3.org/2000/svg","g")),Ff.setAttribute("transform",t),(t=Ff.transform.baseVal.consolidate())?jf((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Yf)}),", ",")",")");function qf(t,e){var n,r;return function(){var i=Of(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function Hf(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=Of(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}a.tween=i}}function Wf(t,e,n){var r=t._id;return t.each((function(){var t=Of(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return If(t,r).value[e]}}function Vf(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}const Gf=function t(e){var n=function(t){return 1==(t=+t)?Fr:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ir(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=ur(t)).r,(e=ur(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Fr(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function Xf(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=ur(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}Xf((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return Vf((n-r/e)*e,o,i,a,s)}})),Xf((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return Vf((n-r/e)*e,i,a,o,s)}}));var Zf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qf=new RegExp(Zf.source,"g");function Kf(t,e){var n,r,i,a=Zf.lastIndex=Qf.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=Zf.exec(t))&&(r=Qf.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:Rf(n,r)})),a=Qf.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function Jf(t,e){var n;return("number"==typeof e?Rf:e instanceof ar?Gf:(n=ar(e))?(e=n,Gf):Kf)(t,e)}function td(t){return function(){this.removeAttribute(t)}}function ed(t){return function(){this.removeAttributeNS(t.space,t.local)}}function nd(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function rd(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function id(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function ad(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function od(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function sd(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function cd(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&sd(t,i)),n}return i._value=e,i}function ud(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&od(t,i)),n}return i._value=e,i}function ld(t,e){return function(){Lf(this,t).delay=+e.apply(this,arguments)}}function hd(t,e){return e=+e,function(){Lf(this,t).delay=e}}function fd(t,e){return function(){Of(this,t).duration=+e.apply(this,arguments)}}function dd(t,e){return e=+e,function(){Of(this,t).duration=e}}function pd(t,e){if("function"!=typeof e)throw new Error;return function(){Of(this,t).ease=e}}function gd(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Lf:Of;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var yd=iu.prototype.constructor;function md(t){return function(){this.style.removeProperty(t)}}function vd(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function bd(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&vd(t,a,n)),r}return a._value=e,a}function _d(t){return function(e){this.textContent=t.call(this,e)}}function xd(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&_d(r)),e}return r._value=t,r}var wd=0;function kd(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Td(){return++wd}var Cd=iu.prototype;kd.prototype=function(t){return iu().transition(t)}.prototype={constructor:kd,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Hs(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,u=r[o],l=u.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=u[f])&&(c=t.call(s,s.__data__,f,u))&&("__data__"in s&&(c.__data__=s.__data__),h[f]=c,Bf(h[f],e,n,f,h,If(s,n)));return new kd(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Gs(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,u=r[s],l=u.length,h=0;h<l;++h)if(c=u[h]){for(var f,d=t.call(c,c.__data__,h,u),p=If(c,n),g=0,y=d.length;g<y;++g)(f=d[g])&&Bf(f,e,n,g,d,p);a.push(d),o.push(c)}return new kd(a,o,e,n)},selectChild:Cd.selectChild,selectChildren:Cd.selectChildren,filter:function(t){"function"!=typeof t&&(t=Xs(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new kd(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new kd(o,this._parents,this._name,this._id)},selection:function(){return new yd(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Td(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)if(o=s[u]){var l=If(o,e);Bf(o,t,n,u,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new kd(r,this._parents,t,n)},call:Cd.call,nodes:Cd.nodes,node:Cd.node,size:Cd.size,empty:Cd.empty,each:Cd.each,on:function(t,e){var n=this._id;return arguments.length<2?If(this.node(),n).on.on(t):this.each(gd(n,t,e))},attr:function(t,e){var n=hc(t),r="transform"===n?$f:Jf;return this.attrTween(t,"function"==typeof e?(n.local?ad:id)(n,r,Wf(this,"attr."+t,e)):null==e?(n.local?ed:td)(n):(n.local?rd:nd)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=hc(t);return this.tween(n,(r.local?cd:ud)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?zf:Jf;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=wc(this,t),o=(this.style.removeProperty(t),wc(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,md(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=wc(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=wc(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,Wf(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=Of(this,t),u=c.on,l=null==c.value[o]?a||(a=md(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(s,i=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=wc(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,bd(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Wf(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,xd(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=If(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?qf:Hf)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ld:hd)(e,t)):If(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?fd:dd)(e,t)):If(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(pd(e,t)):If(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;Of(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=Of(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e})),0===i&&a()}))},[Symbol.iterator]:Cd[Symbol.iterator]};var Ed={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Sd(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Ad(){}function Md(t){return null==t?Ad:function(){return this.querySelector(t)}}function Nd(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Dd(){return[]}function Bd(t){return null==t?Dd:function(){return this.querySelectorAll(t)}}function Ld(t){return function(){return this.matches(t)}}function Od(t){return function(e){return e.matches(t)}}iu.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}(this,t)}))},iu.prototype.transition=function(t){var e,n;t instanceof kd?(e=t._id,t=t._name):(e=Td(),(n=Ed).time=wf(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)(o=s[u])&&Bf(o,t,e,u,s,n||Sd(o,e));return new kd(r,this._parents,t,e)};var Id=Array.prototype.find;function Rd(){return this.firstElementChild}var Fd=Array.prototype.filter;function Pd(){return Array.from(this.children)}function Yd(t){return new Array(t.length)}function jd(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Ud(t){return function(){return t}}function zd(t,e,n,r,i,a){for(var o,s=0,c=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new jd(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function $d(t,e,n,r,i,a,o){var s,c,u,l=new Map,h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(d[s]=u=o.call(c,c.__data__,s,e)+"",l.has(u)?i[s]=c:l.set(u,c));for(s=0;s<f;++s)u=o.call(t,a[s],s,a)+"",(c=l.get(u))?(r[s]=c,c.__data__=a[s],l.delete(u)):n[s]=new jd(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&l.get(d[s])===c&&(i[s]=c)}function qd(t){return t.__data__}function Hd(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Wd(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}jd.prototype={constructor:jd,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Vd="http://www.w3.org/1999/xhtml";const Gd={svg:"http://www.w3.org/2000/svg",xhtml:Vd,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Xd(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Gd.hasOwnProperty(e)?{space:Gd[e],local:t}:t}function Zd(t){return function(){this.removeAttribute(t)}}function Qd(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Kd(t,e){return function(){this.setAttribute(t,e)}}function Jd(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function tp(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function ep(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function np(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function rp(t){return function(){this.style.removeProperty(t)}}function ip(t,e,n){return function(){this.style.setProperty(t,e,n)}}function ap(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function op(t,e){return t.style.getPropertyValue(e)||np(t).getComputedStyle(t,null).getPropertyValue(e)}function sp(t){return function(){delete this[t]}}function cp(t,e){return function(){this[t]=e}}function up(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function lp(t){return t.trim().split(/^|\s+/)}function hp(t){return t.classList||new fp(t)}function fp(t){this._node=t,this._names=lp(t.getAttribute("class")||"")}function dp(t,e){for(var n=hp(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function pp(t,e){for(var n=hp(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function gp(t){return function(){dp(this,t)}}function yp(t){return function(){pp(this,t)}}function mp(t,e){return function(){(e.apply(this,arguments)?dp:pp)(this,t)}}function vp(){this.textContent=""}function bp(t){return function(){this.textContent=t}}function _p(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function xp(){this.innerHTML=""}function wp(t){return function(){this.innerHTML=t}}function kp(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Tp(){this.nextSibling&&this.parentNode.appendChild(this)}function Cp(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ep(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Vd&&e.documentElement.namespaceURI===Vd?e.createElement(t):e.createElementNS(n,t)}}function Sp(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ap(t){var e=Xd(t);return(e.local?Sp:Ep)(e)}function Mp(){return null}function Np(){var t=this.parentNode;t&&t.removeChild(this)}function Dp(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Bp(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Lp(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Op(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Ip(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function Rp(t,e,n){var r=np(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Fp(t,e){return function(){return Rp(this,t,e)}}function Pp(t,e){return function(){return Rp(this,t,e.apply(this,arguments))}}fp.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Yp=[null];function jp(t,e){this._groups=t,this._parents=e}function Up(){return new jp([[document.documentElement]],Yp)}jp.prototype=Up.prototype={constructor:jp,select:function(t){"function"!=typeof t&&(t=Md(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,u=r[i]=new Array(c),l=0;l<c;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),u[l]=o);return new jp(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return Nd(t.apply(this,arguments))}}(t):Bd(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,u=0;u<c;++u)(o=s[u])&&(r.push(t.call(o,o.__data__,u,s)),i.push(o));return new jp(r,i)},selectChild:function(t){return this.select(null==t?Rd:function(t){return function(){return Id.call(this.children,t)}}("function"==typeof t?t:Od(t)))},selectChildren:function(t){return this.selectAll(null==t?Pd:function(t){return function(){return Fd.call(this.children,t)}}("function"==typeof t?t:Od(t)))},filter:function(t){"function"!=typeof t&&(t=Ld(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new jp(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,qd);var n=e?$d:zd,r=this._parents,i=this._groups;"function"!=typeof t&&(t=Ud(t));for(var a=i.length,o=new Array(a),s=new Array(a),c=new Array(a),u=0;u<a;++u){var l=r[u],h=i[u],f=h.length,d=Hd(t.call(l,l&&l.__data__,u,r)),p=d.length,g=s[u]=new Array(p),y=o[u]=new Array(p),m=c[u]=new Array(f);n(l,h,g,y,m,d,e);for(var v,b,_=0,x=0;_<p;++_)if(v=g[_]){for(_>=x&&(x=_+1);!(b=y[x])&&++x<p;);v._next=b||null}}return(o=new jp(o,r))._enter=s,o._exit=c,o},enter:function(){return new jp(this._enter||this._groups.map(Yd),this._parents)},exit:function(){return new jp(this._exit||this._groups.map(Yd),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),c=0;c<o;++c)for(var u,l=n[c],h=r[c],f=l.length,d=s[c]=new Array(f),p=0;p<f;++p)(u=l[p]||h[p])&&(d[p]=u);for(;c<i;++c)s[c]=n[c];return new jp(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Wd);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,u=i[a]=new Array(c),l=0;l<c;++l)(o=s[l])&&(u[l]=o);u.sort(e)}return new jp(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=Xd(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Qd:Zd:"function"==typeof e?n.local?ep:tp:n.local?Jd:Kd)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?rp:"function"==typeof e?ap:ip)(t,e,null==n?"":n)):op(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?sp:"function"==typeof e?up:cp)(t,e)):this.node()[t]},classed:function(t,e){var n=lp(t+"");if(arguments.length<2){for(var r=hp(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?mp:e?gp:yp)(n,e))},text:function(t){return arguments.length?this.each(null==t?vp:("function"==typeof t?_p:bp)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?xp:("function"==typeof t?kp:wp)(t)):this.node().innerHTML},raise:function(){return this.each(Tp)},lower:function(){return this.each(Cp)},append:function(t){var e="function"==typeof t?t:Ap(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Ap(t),r=null==e?Mp:"function"==typeof e?e:Md(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Np)},clone:function(t){return this.select(t?Bp:Dp)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=Lp(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?Ip:Op,r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,u=0,l=s.length;u<l;++u)for(r=0,c=s[u];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?Pp:Fp)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};const zp=Up;var $p={value:()=>{}};function qp(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Hp(r)}function Hp(t){this._=t}function Wp(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function Vp(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Gp(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=$p,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Hp.prototype=qp.prototype={constructor:Hp,on:function(t,e){var n,r=this._,i=Wp(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=Gp(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Gp(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=Vp(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Hp(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};const Xp=qp;var Zp,Qp,Kp=0,Jp=0,tg=0,eg=0,ng=0,rg=0,ig="object"==typeof performance&&performance.now?performance:Date,ag="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function og(){return ng||(ag(sg),ng=ig.now()+rg)}function sg(){ng=0}function cg(){this._call=this._time=this._next=null}function ug(t,e,n){var r=new cg;return r.restart(t,e,n),r}function lg(){ng=(eg=ig.now())+rg,Kp=Jp=0;try{!function(){og(),++Kp;for(var t,e=Zp;e;)(t=ng-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Kp}()}finally{Kp=0,function(){for(var t,e,n=Zp,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Zp=e);Qp=t,fg(r)}(),ng=0}}function hg(){var t=ig.now(),e=t-eg;e>1e3&&(rg-=e,eg=t)}function fg(t){Kp||(Jp&&(Jp=clearTimeout(Jp)),t-ng>24?(t<1/0&&(Jp=setTimeout(lg,t-ig.now()-rg)),tg&&(tg=clearInterval(tg))):(tg||(eg=ig.now(),tg=setInterval(hg,1e3)),Kp=1,ag(lg)))}function dg(t,e,n){var r=new cg;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}cg.prototype=ug.prototype={constructor:cg,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?og():+n)+(null==e?0:+e),this._next||Qp===this||(Qp?Qp._next=this:Zp=this,Qp=this),this._call=t,this._time=n,fg()},stop:function(){this._call&&(this._call=null,this._time=1/0,fg())}};var pg=Xp("start","end","cancel","interrupt"),gg=[];function yg(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(c){var u,l,h,f;if(1!==n.state)return s();for(u in i)if((f=i[u]).name===n.name){if(3===f.state)return dg(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+u<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[u])}if(dg((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,l=-1;u<h;++u)(f=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=ug((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:pg,tween:gg,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function mg(t,e){var n=bg(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function vg(t,e){var n=bg(t,e);if(n.state>3)throw new Error("too late; already running");return n}function bg(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function _g(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var xg,wg=180/Math.PI,kg={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Tg(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*wg,skewX:Math.atan(c)*wg,scaleX:o,scaleY:s}}function Cg(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:_g(t,i)},{i:c-2,x:_g(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:_g(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:_g(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:_g(t,n)},{i:s-2,x:_g(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var Eg=Cg((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?kg:Tg(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Sg=Cg((function(t){return null==t?kg:(xg||(xg=document.createElementNS("http://www.w3.org/2000/svg","g")),xg.setAttribute("transform",t),(t=xg.transform.baseVal.consolidate())?Tg((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):kg)}),", ",")",")");function Ag(t,e){var n,r;return function(){var i=vg(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function Mg(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=vg(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}a.tween=i}}function Ng(t,e,n){var r=t._id;return t.each((function(){var t=vg(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return bg(t,r).value[e]}}function Dg(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Bg(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Lg(){}var Og=.7,Ig=1.4285714285714286,Rg="\\s*([+-]?\\d+)\\s*",Fg="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pg="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yg=/^#([0-9a-f]{3,8})$/,jg=new RegExp("^rgb\\("+[Rg,Rg,Rg]+"\\)$"),Ug=new RegExp("^rgb\\("+[Pg,Pg,Pg]+"\\)$"),zg=new RegExp("^rgba\\("+[Rg,Rg,Rg,Fg]+"\\)$"),$g=new RegExp("^rgba\\("+[Pg,Pg,Pg,Fg]+"\\)$"),qg=new RegExp("^hsl\\("+[Fg,Pg,Pg]+"\\)$"),Hg=new RegExp("^hsla\\("+[Fg,Pg,Pg,Fg]+"\\)$"),Wg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Vg(){return this.rgb().formatHex()}function Gg(){return this.rgb().formatRgb()}function Xg(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Yg.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Zg(e):3===n?new ty(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Qg(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Qg(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=jg.exec(t))?new ty(e[1],e[2],e[3],1):(e=Ug.exec(t))?new ty(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=zg.exec(t))?Qg(e[1],e[2],e[3],e[4]):(e=$g.exec(t))?Qg(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=qg.exec(t))?iy(e[1],e[2]/100,e[3]/100,1):(e=Hg.exec(t))?iy(e[1],e[2]/100,e[3]/100,e[4]):Wg.hasOwnProperty(t)?Zg(Wg[t]):"transparent"===t?new ty(NaN,NaN,NaN,0):null}function Zg(t){return new ty(t>>16&255,t>>8&255,255&t,1)}function Qg(t,e,n,r){return r<=0&&(t=e=n=NaN),new ty(t,e,n,r)}function Kg(t){return t instanceof Lg||(t=Xg(t)),t?new ty((t=t.rgb()).r,t.g,t.b,t.opacity):new ty}function Jg(t,e,n,r){return 1===arguments.length?Kg(t):new ty(t,e,n,null==r?1:r)}function ty(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ey(){return"#"+ry(this.r)+ry(this.g)+ry(this.b)}function ny(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function ry(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function iy(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new oy(t,e,n,r)}function ay(t){if(t instanceof oy)return new oy(t.h,t.s,t.l,t.opacity);if(t instanceof Lg||(t=Xg(t)),!t)return new oy;if(t instanceof oy)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new oy(o,s,c,t.opacity)}function oy(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function sy(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function cy(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}Dg(Lg,Xg,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Vg,formatHex:Vg,formatHsl:function(){return ay(this).formatHsl()},formatRgb:Gg,toString:Gg}),Dg(ty,Jg,Bg(Lg,{brighter:function(t){return t=null==t?Ig:Math.pow(Ig,t),new ty(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Og:Math.pow(Og,t),new ty(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ey,formatHex:ey,formatRgb:ny,toString:ny})),Dg(oy,(function(t,e,n,r){return 1===arguments.length?ay(t):new oy(t,e,n,null==r?1:r)}),Bg(Lg,{brighter:function(t){return t=null==t?Ig:Math.pow(Ig,t),new oy(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Og:Math.pow(Og,t),new oy(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ty(sy(t>=240?t-240:t+120,i,r),sy(t,i,r),sy(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const uy=t=>()=>t;function ly(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):uy(isNaN(t)?e:t)}const hy=function t(e){var n=function(t){return 1==(t=+t)?ly:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):uy(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=Jg(t)).r,(e=Jg(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=ly(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function fy(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=Jg(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}fy((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return cy((n-r/e)*e,o,i,a,s)}})),fy((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return cy((n-r/e)*e,i,a,o,s)}}));var dy=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,py=new RegExp(dy.source,"g");function gy(t,e){var n,r,i,a=dy.lastIndex=py.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=dy.exec(t))&&(r=py.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:_g(n,r)})),a=py.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function yy(t,e){var n;return("number"==typeof e?_g:e instanceof Xg?hy:(n=Xg(e))?(e=n,hy):gy)(t,e)}function my(t){return function(){this.removeAttribute(t)}}function vy(t){return function(){this.removeAttributeNS(t.space,t.local)}}function by(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function _y(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function xy(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function wy(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function ky(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Ty(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Cy(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Ty(t,i)),n}return i._value=e,i}function Ey(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&ky(t,i)),n}return i._value=e,i}function Sy(t,e){return function(){mg(this,t).delay=+e.apply(this,arguments)}}function Ay(t,e){return e=+e,function(){mg(this,t).delay=e}}function My(t,e){return function(){vg(this,t).duration=+e.apply(this,arguments)}}function Ny(t,e){return e=+e,function(){vg(this,t).duration=e}}function Dy(t,e){if("function"!=typeof e)throw new Error;return function(){vg(this,t).ease=e}}function By(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?mg:vg;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Ly=zp.prototype.constructor;function Oy(t){return function(){this.style.removeProperty(t)}}function Iy(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Ry(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Iy(t,a,n)),r}return a._value=e,a}function Fy(t){return function(e){this.textContent=t.call(this,e)}}function Py(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Fy(r)),e}return r._value=t,r}var Yy=0;function jy(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Uy(){return++Yy}var zy=zp.prototype;jy.prototype=function(t){return zp().transition(t)}.prototype={constructor:jy,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Md(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,u=r[o],l=u.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=u[f])&&(c=t.call(s,s.__data__,f,u))&&("__data__"in s&&(c.__data__=s.__data__),h[f]=c,yg(h[f],e,n,f,h,bg(s,n)));return new jy(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Bd(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,u=r[s],l=u.length,h=0;h<l;++h)if(c=u[h]){for(var f,d=t.call(c,c.__data__,h,u),p=bg(c,n),g=0,y=d.length;g<y;++g)(f=d[g])&&yg(f,e,n,g,d,p);a.push(d),o.push(c)}return new jy(a,o,e,n)},selectChild:zy.selectChild,selectChildren:zy.selectChildren,filter:function(t){"function"!=typeof t&&(t=Ld(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new jy(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new jy(o,this._parents,this._name,this._id)},selection:function(){return new Ly(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Uy(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)if(o=s[u]){var l=bg(o,e);yg(o,t,n,u,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new jy(r,this._parents,t,n)},call:zy.call,nodes:zy.nodes,node:zy.node,size:zy.size,empty:zy.empty,each:zy.each,on:function(t,e){var n=this._id;return arguments.length<2?bg(this.node(),n).on.on(t):this.each(By(n,t,e))},attr:function(t,e){var n=Xd(t),r="transform"===n?Sg:yy;return this.attrTween(t,"function"==typeof e?(n.local?wy:xy)(n,r,Ng(this,"attr."+t,e)):null==e?(n.local?vy:my)(n):(n.local?_y:by)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Xd(t);return this.tween(n,(r.local?Cy:Ey)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Eg:yy;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=op(this,t),o=(this.style.removeProperty(t),op(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Oy(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=op(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=op(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,Ng(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=vg(this,t),u=c.on,l=null==c.value[o]?a||(a=Oy(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(s,i=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=op(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Ry(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Ng(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Py(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=bg(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?Ag:Mg)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Sy:Ay)(e,t)):bg(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?My:Ny)(e,t)):bg(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Dy(e,t)):bg(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;vg(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=vg(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e})),0===i&&a()}))},[Symbol.iterator]:zy[Symbol.iterator]};var $y={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function qy(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Hy(t,e,n){this.k=t,this.x=e,this.y=n}zp.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}(this,t)}))},zp.prototype.transition=function(t){var e,n;t instanceof jy?(e=t._id,t=t._name):(e=Uy(),(n=$y).time=og(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)(o=s[u])&&yg(o,t,e,u,s,n||qy(o,e));return new jy(r,this._parents,t,e)},Hy.prototype={constructor:Hy,scale:function(t){return 1===t?this:new Hy(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Hy(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new Hy(1,0,0),Hy.prototype;var Wy="comm",Vy="rule",Gy="decl",Xy=Math.abs,Zy=String.fromCharCode;function Qy(t){return t.trim()}function Ky(t,e,n){return t.replace(e,n)}function Jy(t,e){return t.indexOf(e)}function tm(t,e){return 0|t.charCodeAt(e)}function em(t,e,n){return t.slice(e,n)}function nm(t){return t.length}function rm(t){return t.length}function im(t,e){return e.push(t),t}function am(t,e){for(var n="",r=rm(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function om(t,e,n,r){switch(t.type){case"@import":case Gy:return t.return=t.return||t.value;case Wy:return"";case"@keyframes":return t.return=t.value+"{"+am(t.children,r)+"}";case Vy:t.value=t.props.join(",")}return nm(n=am(t.children,r))?t.return=t.value+"{"+n+"}":""}Object.assign;var sm=1,cm=1,um=0,lm=0,hm=0,fm="";function dm(t,e,n,r,i,a,o){return{value:t,root:e,parent:n,type:r,props:i,children:a,line:sm,column:cm,length:o,return:""}}function pm(){return hm=lm>0?tm(fm,--lm):0,cm--,10===hm&&(cm=1,sm--),hm}function gm(){return hm=lm<um?tm(fm,lm++):0,cm++,10===hm&&(cm=1,sm++),hm}function ym(){return tm(fm,lm)}function mm(){return lm}function vm(t,e){return em(fm,t,e)}function bm(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function _m(t){return Qy(vm(lm-1,km(91===t?t+2:40===t?t+1:t)))}function xm(t){for(;(hm=ym())&&hm<33;)gm();return bm(t)>2||bm(hm)>3?"":" "}function wm(t,e){for(;--e&&gm()&&!(hm<48||hm>102||hm>57&&hm<65||hm>70&&hm<97););return vm(t,mm()+(e<6&&32==ym()&&32==gm()))}function km(t){for(;gm();)switch(hm){case t:return lm;case 34:case 39:34!==t&&39!==t&&km(hm);break;case 40:41===t&&km(t);break;case 92:gm()}return lm}function Tm(t,e){for(;gm()&&t+hm!==57&&(t+hm!==84||47!==ym()););return"/*"+vm(e,lm-1)+"*"+Zy(47===t?t:gm())}function Cm(t){for(;!bm(ym());)gm();return vm(t,lm)}function Em(t){return function(t){return fm="",t}(Sm("",null,null,null,[""],t=function(t){return sm=cm=1,um=nm(fm=t),lm=0,[]}(t),0,[0],t))}function Sm(t,e,n,r,i,a,o,s,c){for(var u=0,l=0,h=o,f=0,d=0,p=0,g=1,y=1,m=1,v=0,b="",_=i,x=a,w=r,k=b;y;)switch(p=v,v=gm()){case 40:if(108!=p&&58==k.charCodeAt(h-1)){-1!=Jy(k+=Ky(_m(v),"&","&\f"),"&\f")&&(m=-1);break}case 34:case 39:case 91:k+=_m(v);break;case 9:case 10:case 13:case 32:k+=xm(p);break;case 92:k+=wm(mm()-1,7);continue;case 47:switch(ym()){case 42:case 47:im(Mm(Tm(gm(),mm()),e,n),c);break;default:k+="/"}break;case 123*g:s[u++]=nm(k)*m;case 125*g:case 59:case 0:switch(v){case 0:case 125:y=0;case 59+l:d>0&&nm(k)-h&&im(d>32?Nm(k+";",r,n,h-1):Nm(Ky(k," ","")+";",r,n,h-2),c);break;case 59:k+=";";default:if(im(w=Am(k,e,n,u,l,i,s,b,_=[],x=[],h),a),123===v)if(0===l)Sm(k,e,w,w,_,a,h,s,x);else switch(f){case 100:case 109:case 115:Sm(t,w,w,r&&im(Am(t,w,w,0,0,i,s,b,i,_=[],h),x),i,x,h,s,r?_:x);break;default:Sm(k,w,w,w,[""],x,0,s,x)}}u=l=d=0,g=m=1,b=k="",h=o;break;case 58:h=1+nm(k),d=p;default:if(g<1)if(123==v)--g;else if(125==v&&0==g++&&125==pm())continue;switch(k+=Zy(v),v*g){case 38:m=l>0?1:(k+="\f",-1);break;case 44:s[u++]=(nm(k)-1)*m,m=1;break;case 64:45===ym()&&(k+=_m(gm())),f=ym(),l=h=nm(b=k+=Cm(mm())),v++;break;case 45:45===p&&2==nm(k)&&(g=0)}}return a}function Am(t,e,n,r,i,a,o,s,c,u,l){for(var h=i-1,f=0===i?a:[""],d=rm(f),p=0,g=0,y=0;p<r;++p)for(var m=0,v=em(t,h+1,h=Xy(g=o[p])),b=t;m<d;++m)(b=Qy(g>0?f[m]+" "+v:Ky(v,/&\f/g,f[m])))&&(c[y++]=b);return dm(t,e,n,0===i?Vy:s,c,u,l)}function Mm(t,e,n){return dm(t,e,n,Wy,Zy(hm),em(t,2,-2),0)}function Nm(t,e,n,r){return dm(t,e,n,Gy,em(t,0,r),em(t,r+1,-1),r)}const Dm="9.1.1";var Bm=n(7967),Lm=n(7856),Om=n.n(Lm),Im=function(t){var e=t.replace(/\\u[\dA-F]{4}/gi,(function(t){return String.fromCharCode(parseInt(t.replace(/\\u/g,""),16))}));return e=(e=(e=e.replace(/\\x([0-9a-f]{2})/gi,(function(t,e){return String.fromCharCode(parseInt(e,16))}))).replace(/\\[\d\d\d]{3}/gi,(function(t){return String.fromCharCode(parseInt(t.replace(/\\/g,""),8))}))).replace(/\\[\d\d\d]{2}/gi,(function(t){return String.fromCharCode(parseInt(t.replace(/\\/g,""),8))}))},Rm=function(t){for(var e="",n=0;n>=0;){if(!((n=t.indexOf("<script"))>=0)){e+=t,n=-1;break}e+=t.substr(0,n),(n=(t=t.substr(n+1)).indexOf("<\/script>"))>=0&&(n+=9,t=t.substr(n))}var r=Im(e);return(r=(r=(r=(r=r.replaceAll(/script>/gi,"#")).replaceAll(/javascript:/gi,"#")).replaceAll(/javascript&colon/gi,"#")).replaceAll(/onerror=/gi,"onerror:")).replaceAll(/<iframe/gi,"")},Fm=function(t,e){var n=t,r=!0;if(!e.flowchart||!1!==e.flowchart.htmlLabels&&"false"!==e.flowchart.htmlLabels||(r=!1),r){var i=e.securityLevel;"antiscript"===i||"strict"===i?n=Rm(n):"loose"!==i&&(n=(n=(n=Um(n)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),n=jm(n))}return n},Pm=function(t,e){return t?e.dompurifyConfig?Om().sanitize(Fm(t,e),e.dompurifyConfig):Om().sanitize(Fm(t,e)):t},Ym=/<br\s*\/?>/gi,jm=function(t){return t.replace(/#br#/g,"<br/>")},Um=function(t){return t.replace(Ym,"#br#")},zm=function(t){return"false"!==t&&!1!==t};const $m={getRows:function(t){if(!t)return 1;var e=Um(t);return(e=e.replace(/\\n/g,"#br#")).split("#br#")},sanitizeText:Pm,sanitizeTextOrArray:function(t,e){return"string"==typeof t?Pm(t,e):t.flat().map((function(t){return Pm(t,e)}))},hasBreaks:function(t){return Ym.test(t)},splitBreaks:function(t){return t.split(Ym)},lineBreakRegex:Ym,removeScript:Rm,getUrl:function(t){var e="";return t&&(e=(e=(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e},evaluate:zm,removeEscapes:Im},qm={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t),hsl2rgb:({h:t,s:e,l:n},r)=>{if(!e)return 2.55*n;t/=360,e/=100;const i=(n/=100)<.5?n*(1+e):n+e-n*e,a=2*n-i;switch(r){case"r":return 255*qm.hue2rgb(a,i,t+1/3);case"g":return 255*qm.hue2rgb(a,i,t);case"b":return 255*qm.hue2rgb(a,i,t-1/3)}},rgb2hsl:({r:t,g:e,b:n},r)=>{t/=255,e/=255,n/=255;const i=Math.max(t,e,n),a=Math.min(t,e,n),o=(i+a)/2;if("l"===r)return 100*o;if(i===a)return 0;const s=i-a;if("s"===r)return 100*(o>.5?s/(2-i-a):s/(i+a));switch(i){case t:return 60*((e-n)/s+(e<n?6:0));case e:return 60*((n-t)/s+2);case n:return 60*((t-e)/s+4);default:return-1}}},Hm={clamp:(t,e,n)=>e>n?Math.min(e,Math.max(n,t)):Math.min(n,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},Wm={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},Vm={channel:qm,lang:Hm,unit:Wm},Gm={};for(let t=0;t<=255;t++)Gm[t]=Vm.unit.dec2hex(t);const Xm=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new class{constructor(){this.type=0}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=0}is(t){return this.type===t}}}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=0,this}_ensureHSL(){const t=this.data,{h:e,s:n,l:r}=t;void 0===e&&(t.h=Vm.channel.rgb2hsl(t,"h")),void 0===n&&(t.s=Vm.channel.rgb2hsl(t,"s")),void 0===r&&(t.l=Vm.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:n,b:r}=t;void 0===e&&(t.r=Vm.channel.hsl2rgb(t,"r")),void 0===n&&(t.g=Vm.channel.hsl2rgb(t,"g")),void 0===r&&(t.b=Vm.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(2)||void 0===e?(this._ensureHSL(),Vm.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(2)||void 0===e?(this._ensureHSL(),Vm.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(2)||void 0===e?(this._ensureHSL(),Vm.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(1)||void 0===e?(this._ensureRGB(),Vm.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(1)||void 0===e?(this._ensureRGB(),Vm.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(1)||void 0===e?(this._ensureRGB(),Vm.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(1),this.changed=!0,this.data.r=t}set g(t){this.type.set(1),this.changed=!0,this.data.g=t}set b(t){this.type.set(1),this.changed=!0,this.data.b=t}set h(t){this.type.set(2),this.changed=!0,this.data.h=t}set s(t){this.type.set(2),this.changed=!0,this.data.s=t}set l(t){this.type.set(2),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent"),Zm={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(Zm.re);if(!e)return;const n=e[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,c=o?8:4,u=a?0:-1,l=o?255:15;return Xm.set({r:(r>>c*(u+3)&l)*s,g:(r>>c*(u+2)&l)*s,b:(r>>c*(u+1)&l)*s,a:a?(r&l)*s/255:1},t)},stringify:t=>{const{r:e,g:n,b:r,a:i}=t;return i<1?`#${Gm[Math.round(e)]}${Gm[Math.round(n)]}${Gm[Math.round(r)]}${Gm[Math.round(255*i)]}`:`#${Gm[Math.round(e)]}${Gm[Math.round(n)]}${Gm[Math.round(r)]}`}},Qm=Zm,Km={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(Km.hueRe);if(e){const[,t,n]=e;switch(n){case"grad":return Vm.channel.clamp.h(.9*parseFloat(t));case"rad":return Vm.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return Vm.channel.clamp.h(360*parseFloat(t))}}return Vm.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const n=t.match(Km.re);if(!n)return;const[,r,i,a,o,s]=n;return Xm.set({h:Km._hue2deg(r),s:Vm.channel.clamp.s(parseFloat(i)),l:Vm.channel.clamp.l(parseFloat(a)),a:o?Vm.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},t)},stringify:t=>{const{h:e,s:n,l:r,a:i}=t;return i<1?`hsla(${Vm.lang.round(e)}, ${Vm.lang.round(n)}%, ${Vm.lang.round(r)}%, ${i})`:`hsl(${Vm.lang.round(e)}, ${Vm.lang.round(n)}%, ${Vm.lang.round(r)}%)`}},Jm=Km,tv={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=tv.colors[t];if(e)return Qm.parse(e)},stringify:t=>{const e=Qm.stringify(t);for(const t in tv.colors)if(tv.colors[t]===e)return t}},ev=tv,nv={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const n=t.match(nv.re);if(!n)return;const[,r,i,a,o,s,c,u,l]=n;return Xm.set({r:Vm.channel.clamp.r(i?2.55*parseFloat(r):parseFloat(r)),g:Vm.channel.clamp.g(o?2.55*parseFloat(a):parseFloat(a)),b:Vm.channel.clamp.b(c?2.55*parseFloat(s):parseFloat(s)),a:u?Vm.channel.clamp.a(l?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:n,b:r,a:i}=t;return i<1?`rgba(${Vm.lang.round(e)}, ${Vm.lang.round(n)}, ${Vm.lang.round(r)}, ${Vm.lang.round(i)})`:`rgb(${Vm.lang.round(e)}, ${Vm.lang.round(n)}, ${Vm.lang.round(r)})`}},rv=nv,iv={format:{keyword:ev,hex:Qm,rgb:rv,rgba:rv,hsl:Jm,hsla:Jm},parse:t=>{if("string"!=typeof t)return t;const e=Qm.parse(t)||rv.parse(t)||Jm.parse(t)||ev.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(2)||void 0===t.data.r?Jm.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?rv.stringify(t):Qm.stringify(t)},av=iv,ov=(t,e)=>{const n=av.parse(t);for(const t in e)n[t]=Vm.channel.clamp[t](e[t]);return av.stringify(n)},sv=(t,e)=>{const n=av.parse(t),r={};for(const t in e)e[t]&&(r[t]=n[t]+e[t]);return ov(t,r)},cv=(t,e,n=0,r=1)=>{if("number"!=typeof t)return ov(t,{a:e});const i=Xm.set({r:Vm.channel.clamp.r(t),g:Vm.channel.clamp.g(e),b:Vm.channel.clamp.b(n),a:Vm.channel.clamp.a(r)});return av.stringify(i)},uv=(t,e=100)=>{const n=av.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,((t,e,n=50)=>{const{r,g:i,b:a,a:o}=av.parse(t),{r:s,g:c,b:u,a:l}=av.parse(e),h=n/100,f=2*h-1,d=o-l,p=((f*d==-1?f:(f+d)/(1+f*d))+1)/2,g=1-p;return cv(r*p+s*g,i*p+c*g,a*p+u*g,o*h+l*(1-h))})(n,t,e)},lv=(t,e,n)=>{const r=av.parse(t),i=r[e],a=Vm.channel.clamp[e](i+n);return i!==a&&(r[e]=a),av.stringify(r)},hv=(t,e)=>lv(t,"l",-e),fv=(t,e)=>lv(t,"l",e);var dv=function(t,e){return sv(t,e?{s:-40,l:10}:{s:-40,l:-10})};function pv(t){return pv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pv(t)}function gv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var yv=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.darkMode=!1,this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}var e,n;return e=t,n=[{key:"updateColors",value:function(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||sv(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||sv(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||dv(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||dv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||dv(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||dv(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||uv(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||uv(this.tertiaryColor),this.lineColor=this.lineColor||uv(this.background),this.textColor=this.textColor||this.primaryTextColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?hv(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||hv(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||uv(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||fv(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||sv(this.primaryColor,{h:64}),this.fillType3=this.fillType3||sv(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||sv(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||sv(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||sv(this.primaryColor,{h:128}),this.fillType7=this.fillType7||sv(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||sv(this.primaryColor,{l:-10}),this.pie5=this.pie5||sv(this.secondaryColor,{l:-10}),this.pie6=this.pie6||sv(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||sv(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||sv(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||sv(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||sv(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||sv(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||sv(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?hv(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||sv(this.primaryColor,{h:-30}),this.git4=this.git4||sv(this.primaryColor,{h:-60}),this.git5=this.git5||sv(this.primaryColor,{h:-90}),this.git6=this.git6||sv(this.primaryColor,{h:60}),this.git7=this.git7||sv(this.primaryColor,{h:120}),this.darkMode?(this.git0=fv(this.git0,25),this.git1=fv(this.git1,25),this.git2=fv(this.git2,25),this.git3=fv(this.git3,25),this.git4=fv(this.git4,25),this.git5=fv(this.git5,25),this.git6=fv(this.git6,25),this.git7=fv(this.git7,25)):(this.git0=hv(this.git0,25),this.git1=hv(this.git1,25),this.git2=hv(this.git2,25),this.git3=hv(this.git3,25),this.git4=hv(this.git4,25),this.git5=hv(this.git5,25),this.git6=hv(this.git6,25),this.git7=hv(this.git7,25)),this.gitInv0=this.gitInv0||uv(this.git0),this.gitInv1=this.gitInv1||uv(this.git1),this.gitInv2=this.gitInv2||uv(this.git2),this.gitInv3=this.gitInv3||uv(this.git3),this.gitInv4=this.gitInv4||uv(this.git4),this.gitInv5=this.gitInv5||uv(this.git5),this.gitInv6=this.gitInv6||uv(this.git6),this.gitInv7=this.gitInv7||uv(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor}},{key:"calculate",value:function(t){var e=this;if("object"===pv(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}],n&&gv(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function mv(t){return mv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mv(t)}function vv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var bv=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=fv(this.primaryColor,16),this.tertiaryColor=sv(this.primaryColor,{h:-160}),this.primaryBorderColor=uv(this.background),this.secondaryBorderColor=dv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dv(this.tertiaryColor,this.darkMode),this.primaryTextColor=uv(this.primaryColor),this.secondaryTextColor=uv(this.secondaryColor),this.tertiaryTextColor=uv(this.tertiaryColor),this.lineColor=uv(this.background),this.textColor=uv(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=fv(uv("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=cv(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=hv("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=cv(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=cv(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}var e,n;return e=t,n=[{key:"updateColors",value:function(){this.secondBkg=fv(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=fv(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=fv(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=sv(this.primaryColor,{h:64}),this.fillType3=sv(this.secondaryColor,{h:64}),this.fillType4=sv(this.primaryColor,{h:-64}),this.fillType5=sv(this.secondaryColor,{h:-64}),this.fillType6=sv(this.primaryColor,{h:128}),this.fillType7=sv(this.secondaryColor,{h:128}),this.pie1=this.pie1||"#0b0000",this.pie2=this.pie2||"#4d1037",this.pie3=this.pie3||"#3f5258",this.pie4=this.pie4||"#4f2f1b",this.pie5=this.pie5||"#6e0a0a",this.pie6=this.pie6||"#3b0048",this.pie7=this.pie7||"#995a01",this.pie8=this.pie8||"#154706",this.pie9=this.pie9||"#161722",this.pie10=this.pie10||"#00296f",this.pie11=this.pie11||"#01629c",this.pie12=this.pie12||"#010029",this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?hv(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=fv(this.secondaryColor,20),this.git1=fv(this.pie2||this.secondaryColor,20),this.git2=fv(this.pie3||this.tertiaryColor,20),this.git3=fv(this.pie4||sv(this.primaryColor,{h:-30}),20),this.git4=fv(this.pie5||sv(this.primaryColor,{h:-60}),20),this.git5=fv(this.pie6||sv(this.primaryColor,{h:-90}),10),this.git6=fv(this.pie7||sv(this.primaryColor,{h:60}),10),this.git7=fv(this.pie8||sv(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||uv(this.git0),this.gitInv1=this.gitInv1||uv(this.git1),this.gitInv2=this.gitInv2||uv(this.git2),this.gitInv3=this.gitInv3||uv(this.git3),this.gitInv4=this.gitInv4||uv(this.git4),this.gitInv5=this.gitInv5||uv(this.git5),this.gitInv6=this.gitInv6||uv(this.git6),this.gitInv7=this.gitInv7||uv(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor}},{key:"calculate",value:function(t){var e=this;if("object"===mv(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}],n&&vv(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function _v(t){return _v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_v(t)}function xv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var wv=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=sv(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=sv(this.primaryColor,{h:-160}),this.primaryBorderColor=dv(this.primaryColor,this.darkMode),this.secondaryBorderColor=dv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dv(this.tertiaryColor,this.darkMode),this.primaryTextColor=uv(this.primaryColor),this.secondaryTextColor=uv(this.secondaryColor),this.tertiaryTextColor=uv(this.tertiaryColor),this.lineColor=uv(this.background),this.textColor=uv(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=cv(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}var e,n;return e=t,n=[{key:"updateColors",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=fv(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=sv(this.primaryColor,{h:64}),this.fillType3=sv(this.secondaryColor,{h:64}),this.fillType4=sv(this.primaryColor,{h:-64}),this.fillType5=sv(this.secondaryColor,{h:-64}),this.fillType6=sv(this.primaryColor,{h:128}),this.fillType7=sv(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||sv(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||sv(this.primaryColor,{l:-10}),this.pie5=this.pie5||sv(this.secondaryColor,{l:-30}),this.pie6=this.pie6||sv(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||sv(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||sv(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||sv(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||sv(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||sv(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||sv(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||sv(this.primaryColor,{h:-30}),this.git4=this.git4||sv(this.primaryColor,{h:-60}),this.git5=this.git5||sv(this.primaryColor,{h:-90}),this.git6=this.git6||sv(this.primaryColor,{h:60}),this.git7=this.git7||sv(this.primaryColor,{h:120}),this.darkMode?(this.git0=fv(this.git0,25),this.git1=fv(this.git1,25),this.git2=fv(this.git2,25),this.git3=fv(this.git3,25),this.git4=fv(this.git4,25),this.git5=fv(this.git5,25),this.git6=fv(this.git6,25),this.git7=fv(this.git7,25)):(this.git0=hv(this.git0,25),this.git1=hv(this.git1,25),this.git2=hv(this.git2,25),this.git3=hv(this.git3,25),this.git4=hv(this.git4,25),this.git5=hv(this.git5,25),this.git6=hv(this.git6,25),this.git7=hv(this.git7,25)),this.gitInv0=this.gitInv0||hv(uv(this.git0),25),this.gitInv1=this.gitInv1||uv(this.git1),this.gitInv2=this.gitInv2||uv(this.git2),this.gitInv3=this.gitInv3||uv(this.git3),this.gitInv4=this.gitInv4||uv(this.git4),this.gitInv5=this.gitInv5||uv(this.git5),this.gitInv6=this.gitInv6||uv(this.git6),this.gitInv7=this.gitInv7||uv(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||uv(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||uv(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor}},{key:"calculate",value:function(t){var e=this;if("object"===_v(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}],n&&xv(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function kv(t){return kv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kv(t)}function Tv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Cv=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=fv("#cde498",10),this.primaryBorderColor=dv(this.primaryColor,this.darkMode),this.secondaryBorderColor=dv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dv(this.tertiaryColor,this.darkMode),this.primaryTextColor=uv(this.primaryColor),this.secondaryTextColor=uv(this.secondaryColor),this.tertiaryTextColor=uv(this.primaryColor),this.lineColor=uv(this.background),this.textColor=uv(this.background),this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,n;return e=t,n=[{key:"updateColors",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=hv(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=sv(this.primaryColor,{h:64}),this.fillType3=sv(this.secondaryColor,{h:64}),this.fillType4=sv(this.primaryColor,{h:-64}),this.fillType5=sv(this.secondaryColor,{h:-64}),this.fillType6=sv(this.primaryColor,{h:128}),this.fillType7=sv(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||sv(this.primaryColor,{l:-30}),this.pie5=this.pie5||sv(this.secondaryColor,{l:-30}),this.pie6=this.pie6||sv(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||sv(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||sv(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||sv(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||sv(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||sv(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||sv(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||sv(this.primaryColor,{h:-30}),this.git4=this.git4||sv(this.primaryColor,{h:-60}),this.git5=this.git5||sv(this.primaryColor,{h:-90}),this.git6=this.git6||sv(this.primaryColor,{h:60}),this.git7=this.git7||sv(this.primaryColor,{h:120}),this.darkMode?(this.git0=fv(this.git0,25),this.git1=fv(this.git1,25),this.git2=fv(this.git2,25),this.git3=fv(this.git3,25),this.git4=fv(this.git4,25),this.git5=fv(this.git5,25),this.git6=fv(this.git6,25),this.git7=fv(this.git7,25)):(this.git0=hv(this.git0,25),this.git1=hv(this.git1,25),this.git2=hv(this.git2,25),this.git3=hv(this.git3,25),this.git4=hv(this.git4,25),this.git5=hv(this.git5,25),this.git6=hv(this.git6,25),this.git7=hv(this.git7,25)),this.gitInv0=this.gitInv0||uv(this.git0),this.gitInv1=this.gitInv1||uv(this.git1),this.gitInv2=this.gitInv2||uv(this.git2),this.gitInv3=this.gitInv3||uv(this.git3),this.gitInv4=this.gitInv4||uv(this.git4),this.gitInv5=this.gitInv5||uv(this.git5),this.gitInv6=this.gitInv6||uv(this.git6),this.gitInv7=this.gitInv7||uv(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor}},{key:"calculate",value:function(t){var e=this;if("object"===kv(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}],n&&Tv(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ev(t){return Ev="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ev(t)}function Sv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Av=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=fv(this.contrast,55),this.background="#ffffff",this.tertiaryColor=sv(this.primaryColor,{h:-160}),this.primaryBorderColor=dv(this.primaryColor,this.darkMode),this.secondaryBorderColor=dv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dv(this.tertiaryColor,this.darkMode),this.primaryTextColor=uv(this.primaryColor),this.secondaryTextColor=uv(this.secondaryColor),this.tertiaryTextColor=uv(this.tertiaryColor),this.lineColor=uv(this.background),this.textColor=uv(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,n;return e=t,n=[{key:"updateColors",value:function(){this.secondBkg=fv(this.contrast,55),this.border2=this.contrast,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=fv(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.sectionBkgColor=fv(this.contrast,30),this.sectionBkgColor2=fv(this.contrast,30),this.taskBorderColor=hv(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=fv(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=hv(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=sv(this.primaryColor,{h:64}),this.fillType3=sv(this.secondaryColor,{h:64}),this.fillType4=sv(this.primaryColor,{h:-64}),this.fillType5=sv(this.secondaryColor,{h:-64}),this.fillType6=sv(this.primaryColor,{h:128}),this.fillType7=sv(this.secondaryColor,{h:128}),this.pie1=this.pie1||"#F4F4F4",this.pie2=this.pie2||"#555",this.pie3=this.pie3||"#BBB",this.pie4=this.pie4||"#777",this.pie5=this.pie5||"#999",this.pie6=this.pie6||"#DDD",this.pie7=this.pie7||"#FFF",this.pie8=this.pie8||"#DDD",this.pie9=this.pie9||"#BBB",this.pie10=this.pie10||"#999",this.pie11=this.pie11||"#777",this.pie12=this.pie12||"#555",this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=hv(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||sv(this.primaryColor,{h:-30}),this.git4=this.pie5||sv(this.primaryColor,{h:-60}),this.git5=this.pie6||sv(this.primaryColor,{h:-90}),this.git6=this.pie7||sv(this.primaryColor,{h:60}),this.git7=this.pie8||sv(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||uv(this.git0),this.gitInv1=this.gitInv1||uv(this.git1),this.gitInv2=this.gitInv2||uv(this.git2),this.gitInv3=this.gitInv3||uv(this.git3),this.gitInv4=this.gitInv4||uv(this.git4),this.gitInv5=this.gitInv5||uv(this.git5),this.gitInv6=this.gitInv6||uv(this.git6),this.gitInv7=this.gitInv7||uv(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor}},{key:"calculate",value:function(t){var e=this;if("object"===Ev(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}],n&&Sv(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Mv={base:{getThemeVariables:function(t){var e=new yv;return e.calculate(t),e}},dark:{getThemeVariables:function(t){var e=new bv;return e.calculate(t),e}},default:{getThemeVariables:function(t){var e=new wv;return e.calculate(t),e}},forest:{getThemeVariables:function(t){var e=new Cv;return e.calculate(t),e}},neutral:{getThemeVariables:function(t){var e=new Av;return e.calculate(t),e}}};function Nv(t){return function(t){if(Array.isArray(t))return Dv(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Dv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dv(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Bv(t){return Bv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bv(t)}var Lv={theme:"default",themeVariables:Mv.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-d3"},sequence:{hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{arrowMarkerAbsolute:!1,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},state:{dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},gitGraph:{diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0}};Lv.class.arrowMarkerAbsolute=Lv.arrowMarkerAbsolute,Lv.gitGraph.arrowMarkerAbsolute=Lv.arrowMarkerAbsolute;var Ov=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.keys(e).reduce((function(r,i){return Array.isArray(e[i])?r:"object"===Bv(e[i])&&null!==e[i]?[].concat(Nv(r),[n+i],Nv(t(e[i],""))):[].concat(Nv(r),[n+i])}),[])}(Lv,"");const Iv=Lv;var Rv=void 0;function Fv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Pv(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Uv(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Yv(t){return Yv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yv(t)}function jv(t){return function(t){if(Array.isArray(t))return zv(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Uv(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Uv(t,e){if(t){if("string"==typeof t)return zv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zv(t,e):void 0}}function zv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var $v,qv={curveBasis:Vu,curveBasisClosed:function(t){return new Gu(t)},curveBasisOpen:function(t){return new Xu(t)},curveLinear:Pu,curveLinearClosed:function(t){return new Zu(t)},curveMonotoneX:function(t){return new el(t)},curveMonotoneY:function(t){return new nl(t)},curveNatural:function(t){return new il(t)},curveStep:function(t){return new ol(t,.5)},curveStepAfter:function(t){return new ol(t,1)},curveStepBefore:function(t){return new ol(t,0)}},Hv=/[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,Wv=/\s*(?:(?:(\w+)(?=:):|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,Vv=/\s*%%.*\n/gm,Gv=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var n=new RegExp("[%]{2}(?![{]".concat(Wv.source,")(?=[}][%]{2}).*\n"),"ig");t=t.trim().replace(n,"").replace(/'/gm,'"'),o.debug("Detecting diagram directive".concat(null!==e?" type:"+e:""," based on the text:").concat(t));for(var r,i=[];null!==(r=Hv.exec(t));)if(r.index===Hv.lastIndex&&Hv.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){var a=r[1]?r[1]:r[2],s=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:a,args:s})}return 0===i.length&&i.push({type:t,args:null}),1===i.length?i[0]:i}catch(n){return o.error("ERROR: ".concat(n.message," - Unable to parse directive\n ").concat(null!==e?" type:"+e:""," based on the text:").concat(t)),{type:null,args:null}}},Xv=function(t,e){return(t=t.replace(Hv,"").replace(Vv,"\n")).match(/^\s*sequenceDiagram/)?"sequence":t.match(/^\s*gantt/)?"gantt":t.match(/^\s*classDiagram-v2/)?"classDiagram":t.match(/^\s*classDiagram/)?e&&e.class&&"dagre-wrapper"===e.class.defaultRenderer?"classDiagram":"class":t.match(/^\s*stateDiagram-v2/)?"stateDiagram":t.match(/^\s*stateDiagram/)?e&&e.class&&"dagre-wrapper"===e.state.defaultRenderer?"stateDiagram":"state":t.match(/^\s*gitGraph/)?"gitGraph":t.match(/^\s*flowchart/)?"flowchart-v2":t.match(/^\s*info/)?"info":t.match(/^\s*pie/)?"pie":t.match(/^\s*erDiagram/)?"er":t.match(/^\s*journey/)?"journey":t.match(/^\s*requirement/)||t.match(/^\s*requirementDiagram/)?"requirement":e&&e.flowchart&&"dagre-wrapper"===e.flowchart.defaultRenderer?"flowchart-v2":"flowchart"},Zv=function(t,e){var n={};return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=e?e.apply(Rv,i):i[0];if(o in n)return n[o];var s=t.apply(void 0,i);return n[o]=s,s}},Qv=function(t,e){if(!t)return e;var n="curve".concat(t.charAt(0).toUpperCase()+t.slice(1));return qv[n]||e},Kv=function(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0},Jv=function(t){for(var e="",n="",r=0;r<t.length;r++)void 0!==t[r]&&(t[r].startsWith("color:")||t[r].startsWith("text-align:")?n=n+t[r]+";":e=e+t[r]+";");return{style:e,labelStyle:n}},tb=0,eb=function(){return tb++,"id-"+Math.random().toString(36).substr(2,12)+"-"+tb},nb=function(t){return function(t){for(var e="",n="0123456789abcdef",r=n.length,i=0;i<t;i++)e+=n.charAt(Math.floor(Math.random()*r));return e}(t.length)},rb=function t(e,n,r){var i=Object.assign({depth:2,clobber:!1},r),a=i.depth,o=i.clobber;return Array.isArray(n)&&!Array.isArray(e)?(n.forEach((function(n){return t(e,n,r)})),e):Array.isArray(n)&&Array.isArray(e)?(n.forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),e):void 0===e||a<=0?null!=e&&"object"===Yv(e)&&"object"===Yv(n)?Object.assign(e,n):n:(void 0!==n&&"object"===Yv(e)&&"object"===Yv(n)&&Object.keys(n).forEach((function(r){"object"!==Yv(n[r])||void 0!==e[r]&&"object"!==Yv(e[r])?(o||"object"!==Yv(e[r])&&"object"!==Yv(n[r]))&&(e[r]=n[r]):(void 0===e[r]&&(e[r]=Array.isArray(n[r])?[]:{}),e[r]=t(e[r],n[r],{depth:a-1,clobber:o}))})),e)},ib=function(t,e){var n=e.text.replace($m.lineBreakRegex," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.style("text-anchor",e.anchor),r.style("font-family",e.fontFamily),r.style("font-size",e.fontSize),r.style("font-weight",e.fontWeight),r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.attr("fill",e.fill),i.text(n),r},ab=Zv((function(t,e,n){if(!t)return t;if(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},n),$m.lineBreakRegex.test(t))return t;var r=t.split(" "),i=[],a="";return r.forEach((function(t,o){var s=sb("".concat(t," "),n),c=sb(a,n);if(s>e){var u=ob(t,e,"-",n),l=u.hyphenatedStrings,h=u.remainingWord;i.push.apply(i,[a].concat(jv(l))),a=h}else c+s>=e?(i.push(a),a=t):a=[a,t].filter(Boolean).join(" ");o+1===r.length&&i.push(a)})),i.filter((function(t){return""!==t})).join(n.joinWith)}),(function(t,e,n){return"".concat(t,"-").concat(e,"-").concat(n.fontSize,"-").concat(n.fontWeight,"-").concat(n.fontFamily,"-").concat(n.joinWith)})),ob=Zv((function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);var i=t.split(""),a=[],o="";return i.forEach((function(t,s){var c="".concat(o).concat(t);if(sb(c,r)>=e){var u=s+1,l=i.length===u,h="".concat(c).concat(n);a.push(l?c:h),o=""}else o=c})),{hyphenatedStrings:a,remainingWord:o}}),(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;return"".concat(t,"-").concat(e,"-").concat(n,"-").concat(r.fontSize,"-").concat(r.fontWeight,"-").concat(r.fontFamily)})),sb=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),cb(t,e).width},cb=Zv((function(t,e){var n=e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),r=n.fontSize,i=n.fontFamily,a=n.fontWeight;if(!t)return{width:0,height:0};var o=["sans-serif",i],s=t.split($m.lineBreakRegex),c=[],u=au("body");if(!u.remove)return{width:0,height:0,lineHeight:0};for(var l=u.append("svg"),h=0,f=o;h<f.length;h++){var d,p=f[h],g=0,y={width:0,height:0,lineHeight:0},m=Pv(s);try{for(m.s();!(d=m.n()).done;){var v=d.value,b={x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0};b.text=v;var _=ib(l,b).style("font-size",r).style("font-weight",a).style("font-family",p),x=(_._groups||_)[0][0].getBBox();y.width=Math.round(Math.max(y.width,x.width)),g=Math.round(x.height),y.height+=g,y.lineHeight=Math.round(Math.max(y.lineHeight,g))}}catch(t){m.e(t)}finally{m.f()}c.push(y)}return l.remove(),c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]}),(function(t,e){return"".concat(t,"-").concat(e.fontSize,"-").concat(e.fontWeight,"-").concat(e.fontFamily)})),ub=function(t,e,n){var r=new Map;return r.set("height",t),n?(r.set("width","100%"),r.set("style","max-width: ".concat(e,"px;"))):r.set("width",e),r},lb=function(t,e,n,r){!function(t,e){var n,r=Pv(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;t.attr(i[0],i[1])}}catch(t){r.e(t)}finally{r.f()}}(t,ub(e,n,r))},hb=function t(e){o.debug("directiveSanitizer called with",e),"object"===Yv(e)&&(e.length?e.forEach((function(e){return t(e)})):Object.keys(e).forEach((function(n){o.debug("Checking key",n),0===n.indexOf("__")&&(o.debug("sanitize deleting __ option",n),delete e[n]),n.indexOf("proto")>=0&&(o.debug("sanitize deleting proto option",n),delete e[n]),n.indexOf("constr")>=0&&(o.debug("sanitize deleting constr option",n),delete e[n]),n.indexOf("themeCSS")>=0&&(o.debug("sanitizing themeCss option"),e[n]=fb(e[n])),Ov.indexOf(n)<0?(o.debug("sanitize deleting option",n),delete e[n]):"object"===Yv(e[n])&&(o.debug("sanitize deleting object",n),t(e[n]))})))},fb=function(t){return(t.match(/\{/g)||[]).length!==(t.match(/\}/g)||[]).length?"{ /* ERROR: Unbalanced CSS */ }":t};const db={assignWithDepth:rb,wrapLabel:ab,calculateTextHeight:function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),cb(t,e).height},calculateTextWidth:sb,calculateTextDimensions:cb,calculateSvgSizeAttrs:ub,configureSvgSize:lb,detectInit:function(t,e){var n=Gv(t,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){var i=n.map((function(t){return t.args}));hb(i),r=rb(r,jv(i))}else r=n.args;if(r){var a=Xv(t,e);["config"].forEach((function(t){void 0!==r[t]&&("flowchart-v2"===a&&(a="flowchart"),r[a]=r[t],delete r[t])}))}return r},detectDirective:Gv,detectType:Xv,isSubstringInArray:function(t,e){for(var n=0;n<e.length;n++)if(e[n].match(t))return n;return-1},interpolateToCurve:Qv,calcLabelPosition:function(t){return function(t){var e,n=0;t.forEach((function(t){n+=Kv(t,e),e=t}));var r=n/2,i=void 0;return e=void 0,t.forEach((function(t){if(e&&!i){var n=Kv(t,e);if(n<r)r-=n;else{var a=r/n;a<=0&&(i=e),a>=1&&(i={x:t.x,y:t.y}),a>0&&a<1&&(i={x:(1-a)*e.x+a*t.x,y:(1-a)*e.y+a*t.y})}}e=t})),i}(t)},calcCardinalityPosition:function(t,e,n){var r;o.info("our points",e),e[0]!==n&&(e=e.reverse()),e.forEach((function(t){Kv(t,r),r=t}));var i,a=25;r=void 0,e.forEach((function(t){if(r&&!i){var e=Kv(t,r);if(e<a)a-=e;else{var n=a/e;n<=0&&(i=r),n>=1&&(i={x:t.x,y:t.y}),n>0&&n<1&&(i={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));var s=t?10:5,c=Math.atan2(e[0].y-i.y,e[0].x-i.x),u={x:0,y:0};return u.x=Math.sin(c)*s+(e[0].x+i.x)/2,u.y=-Math.cos(c)*s+(e[0].y+i.y)/2,u},calcTerminalLabelPosition:function(t,e,n){var r,i=JSON.parse(JSON.stringify(n));o.info("our points",i),"start_left"!==e&&"start_right"!==e&&(i=i.reverse()),i.forEach((function(t){Kv(t,r),r=t}));var a,s=25+t;r=void 0,i.forEach((function(t){if(r&&!a){var e=Kv(t,r);if(e<s)s-=e;else{var n=s/e;n<=0&&(a=r),n>=1&&(a={x:t.x,y:t.y}),n>0&&n<1&&(a={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));var c=10+.5*t,u=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return l.x=Math.sin(u)*c+(i[0].x+a.x)/2,l.y=-Math.cos(u)*c+(i[0].y+a.y)/2,"start_left"===e&&(l.x=Math.sin(u+Math.PI)*c+(i[0].x+a.x)/2,l.y=-Math.cos(u+Math.PI)*c+(i[0].y+a.y)/2),"end_right"===e&&(l.x=Math.sin(u-Math.PI)*c+(i[0].x+a.x)/2-5,l.y=-Math.cos(u-Math.PI)*c+(i[0].y+a.y)/2-5),"end_left"===e&&(l.x=Math.sin(u)*c+(i[0].x+a.x)/2-5,l.y=-Math.cos(u)*c+(i[0].y+a.y)/2-5),l},formatUrl:function(t,e){var n=t.trim();if(n)return"loose"!==e.securityLevel?(0,Bm.N)(n):n},getStylesFromArray:Jv,generateId:eb,random:nb,memoize:Zv,runFunc:function(t){for(var e,n=t.split("."),r=n.length-1,i=n[r],a=window,o=0;o<r;o++)if(!(a=a[n[o]]))return;for(var s=arguments.length,c=new Array(s>1?s-1:0),u=1;u<s;u++)c[u-1]=arguments[u];(e=a)[i].apply(e,c)},entityDecode:function(t){return $v=$v||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),$v.innerHTML=t,unescape($v.textContent)},initIdGeneratior:function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.deterministic=e,this.seed=n,this.count=n?n.length:0}var e,n;return e=t,(n=[{key:"next",value:function(){return this.deterministic?this.count++:Date.now()}}])&&Fv(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),directiveSanitizer:hb,sanitizeCss:fb};function pb(t){return pb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pb(t)}var gb,yb=Object.freeze(Iv),mb=rb({},yb),vb=[],bb=rb({},yb),_b=function(t,e){for(var n=rb({},t),r={},i=0;i<e.length;i++){var a=e[i];kb(a),r=rb(r,a)}if(n=rb(n,r),r.theme&&Mv[r.theme]){var o=rb({},gb),s=rb(o.themeVariables||{},r.themeVariables);n.themeVariables=Mv[n.theme].getThemeVariables(s)}return bb=n,n},xb=function(){return rb({},mb)},wb=function(){return rb({},bb)},kb=function t(e){Object.keys(mb.secure).forEach((function(t){void 0!==e[mb.secure[t]]&&(o.debug("Denied attempt to modify a secure key ".concat(mb.secure[t]),e[mb.secure[t]]),delete e[mb.secure[t]])})),Object.keys(e).forEach((function(t){0===t.indexOf("__")&&delete e[t]})),Object.keys(e).forEach((function(n){"string"==typeof e[n]&&(e[n].indexOf("<")>-1||e[n].indexOf(">")>-1||e[n].indexOf("url(data:")>-1)&&delete e[n],"object"===pb(e[n])&&t(e[n])}))},Tb=function(t){t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),vb.push(t),_b(mb,vb)},Cb=function(){_b(mb,vb=[])},Eb="",Sb="",Ab=function(t){return Pm(t,wb())},Mb=function(){Eb="",Sb=""},Nb=function(t){Eb=Ab(t).replace(/^\s+/g,"")},Db=function(){return Eb},Bb=function(t){Sb=Ab(t).replace(/\n\s+/g,"\n")},Lb=function(){return Sb};function Ob(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ib="classid-",Rb=[],Fb={},Pb=0,Yb=[],jb=function(t){return $m.sanitizeText(t,wb())},Ub=function(t){var e="",n=t;if(t.indexOf("~")>0){var r=t.split("~");n=r[0],e=$m.sanitizeText(r[1],wb())}return{className:n,type:e}},zb=function(t){var e=Ub(t);void 0===Fb[e.className]&&(Fb[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:Ib+e.className+"-"+Pb},Pb++)},$b=function(t){for(var e=Object.keys(Fb),n=0;n<e.length;n++)if(Fb[e[n]].id===t)return Fb[e[n]].domId},qb=function(t,e){console.log(t,e);var n=Ub(t).className,r=Fb[n];if("string"==typeof e){var i=e.trim();i.startsWith("<<")&&i.endsWith(">>")?r.annotations.push(jb(i.substring(2,i.length-2))):i.indexOf(")")>0?r.methods.push(jb(i)):i&&r.members.push(jb(i))}},Hb=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n=Ib+n),void 0!==Fb[n]&&Fb[n].cssClasses.push(e)}))},Wb=function(t,e,n){var r=wb(),i=t,a=$b(i);if("loose"===r.securityLevel&&void 0!==e&&void 0!==Fb[i]){var o=[];if("string"==typeof n){o=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var s=0;s<o.length;s++){var c=o[s].trim();'"'===c.charAt(0)&&'"'===c.charAt(c.length-1)&&(c=c.substr(1,c.length-2)),o[s]=c}}0===o.length&&o.push(a),Yb.push((function(){var t=document.querySelector('[id="'.concat(a,'"]'));null!==t&&t.addEventListener("click",(function(){var t;db.runFunc.apply(db,[e].concat(function(t){if(Array.isArray(t))return Ob(t)}(t=o)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ob(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ob(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))}),!1)}))}},Vb={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},Gb=function(t){var e=au(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=au("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),au(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=au(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),au(this).classed("hover",!1)}))};Yb.push(Gb);var Xb="TB";const Zb={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},setTitle:Nb,getTitle:Db,getAccDescription:Lb,setAccDescription:Bb,getConfig:function(){return wb().class},addClass:zb,bindFunctions:function(t){Yb.forEach((function(e){e(t)}))},clear:function(){Rb=[],Fb={},(Yb=[]).push(Gb),Mb()},getClass:function(t){return Fb[t]},getClasses:function(){return Fb},addAnnotation:function(t,e){var n=Ub(t).className;Fb[n].annotations.push(e)},getRelations:function(){return Rb},addRelation:function(t){o.debug("Adding relation: "+JSON.stringify(t)),zb(t.id1),zb(t.id2),t.id1=Ub(t.id1).className,t.id2=Ub(t.id2).className,t.relationTitle1=$m.sanitizeText(t.relationTitle1.trim(),wb()),t.relationTitle2=$m.sanitizeText(t.relationTitle2.trim(),wb()),Rb.push(t)},getDirection:function(){return Xb},setDirection:function(t){Xb=t},addMember:qb,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((function(e){return qb(t,e)})))},cleanupLabel:function(t){return":"===t.substring(0,1)?$m.sanitizeText(t.substr(1).trim(),wb()):jb(t.trim())},lineType:{LINE:0,DOTTED_LINE:1},relationType:Vb,setClickEvent:function(t,e,n){t.split(",").forEach((function(t){Wb(t,e,n),Fb[t].haveCallback=!0})),Hb(t,"clickable")},setCssClass:Hb,setLink:function(t,e,n){var r=wb();t.split(",").forEach((function(t){var i=t;t[0].match(/\d/)&&(i=Ib+i),void 0!==Fb[i]&&(Fb[i].link=db.formatUrl(e,r),"sandbox"===r.securityLevel?Fb[i].linkTarget="_top":Fb[i].linkTarget="string"==typeof n?jb(n):"_blank")})),Hb(t,"clickable")},setTooltip:function(t,e){var n=wb();t.split(",").forEach((function(t){void 0!==e&&(Fb[t].tooltip=$m.sanitizeText(e,n))}))},lookUpDomId:$b};var Qb=n(681),Kb=n.n(Qb),Jb=n(8282),t_=n.n(Jb),e_=n(1362),n_=n.n(e_),r_=0,i_=function(t){var e=t.match(/^(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+) *(\*|\$)?$/),n=t.match(/^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/);return e&&!n?a_(e):n?o_(n):s_(t)},a_=function(t){var e="",n="";try{var r=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",a=t[3]?u_(t[3].trim()):"",o=t[4]?t[4].trim():"",s=t[5]?t[5].trim():"";n=r+i+a+" "+o,e=l_(s)}catch(e){n=t}return{displayText:n,cssStyle:e}},o_=function(t){var e="",n="";try{var r=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",a=t[3]?u_(t[3].trim()):"",o=t[4]?t[4].trim():"";n=r+i+"("+a+")"+(t[5]?" : "+u_(t[5]).trim():""),e=l_(o)}catch(e){n=t}return{displayText:n,cssStyle:e}},s_=function(t){var e="",n="",r="",i=t.indexOf("("),a=t.indexOf(")");if(i>1&&a>i&&a<=t.length){var o="",s="",c=t.substring(0,1);c.match(/\w/)?s=t.substring(0,i).trim():(c.match(/\+|-|~|#/)&&(o=c),s=t.substring(1,i).trim());var u=t.substring(i+1,a),l=t.substring(a+1,1);n=l_(l),e=o+s+"("+u_(u.trim())+")",a<"".length&&""!==(r=t.substring(a+2).trim())&&(r=" : "+u_(r))}else e=u_(t);return{displayText:e,cssStyle:n}},c_=function(t,e,n,r){var i=i_(e),a=t.append("tspan").attr("x",r.padding).text(i.displayText);""!==i.cssStyle&&a.attr("style",i.cssStyle),n||a.attr("dy",r.textHeight)},u_=function t(e){var n=e;return-1!=e.indexOf("~")?t(n=(n=n.replace("~","<")).replace("~",">")):n},l_=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}};const h_=function(t,e,n){o.info("Rendering class "+e);var r,i=e.id,a={id:i,label:e.id,width:0,height:0},s=t.append("g").attr("id",$b(i)).attr("class","classGroup");r=e.link?s.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",n.textHeight+n.padding).attr("x",0):s.append("text").attr("y",n.textHeight+n.padding).attr("x",0);var c=!0;e.annotations.forEach((function(t){var e=r.append("tspan").text("«"+t+"»");c||e.attr("dy",n.textHeight),c=!1}));var u=e.id;void 0!==e.type&&""!==e.type&&(u+="<"+e.type+">");var l=r.append("tspan").text(u).attr("class","title");c||l.attr("dy",n.textHeight);var h=r.node().getBBox().height,f=s.append("line").attr("x1",0).attr("y1",n.padding+h+n.dividerMargin/2).attr("y2",n.padding+h+n.dividerMargin/2),d=s.append("text").attr("x",n.padding).attr("y",h+n.dividerMargin+n.textHeight).attr("fill","white").attr("class","classText");c=!0,e.members.forEach((function(t){c_(d,t,c,n),c=!1}));var p=d.node().getBBox(),g=s.append("line").attr("x1",0).attr("y1",n.padding+h+n.dividerMargin+p.height).attr("y2",n.padding+h+n.dividerMargin+p.height),y=s.append("text").attr("x",n.padding).attr("y",h+2*n.dividerMargin+p.height+n.textHeight).attr("fill","white").attr("class","classText");c=!0,e.methods.forEach((function(t){c_(y,t,c,n),c=!1}));var m=s.node().getBBox(),v=" ";e.cssClasses.length>0&&(v+=e.cssClasses.join(" "));var b=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",m.width+2*n.padding).attr("height",m.height+n.padding+.5*n.dividerMargin).attr("class",v).node().getBBox().width;return r.node().childNodes.forEach((function(t){t.setAttribute("x",(b-t.getBBox().width)/2)})),e.tooltip&&r.insert("title").text(e.tooltip),f.attr("x2",b),g.attr("x2",b),a.width=b,a.height=m.height+n.padding+.5*n.dividerMargin,a};function f_(t,e,n){if(void 0!==e.insert){var r=t.getTitle(),i=t.getAccDescription();e.attr("role","img").attr("aria-labelledby","chart-title-"+n+" chart-desc-"+n),e.insert("desc",":first-child").attr("id","chart-desc-"+n).text(i),e.insert("title",":first-child").attr("id","chart-title-"+n).text(r)}}e_.parser.yy=Zb;var d_={},p_={dividerMargin:10,padding:5,textHeight:10},g_=function(t){var e=Object.entries(d_).find((function(e){return e[1].label===t}));if(e)return e[0]};const y_=function(t){Object.keys(t).forEach((function(e){p_[e]=t[e]}))},m_=function(t,e){d_={},e_.parser.yy.clear(),e_.parser.parse(t),o.info("Rendering diagram "+t);var n,r=wb().securityLevel;"sandbox"===r&&(n=au("#i"+e));var i,a=au("sandbox"===r?n.nodes()[0].contentDocument.body:"body"),s=("sandbox"===r?n.nodes()[0].contentDocument:document,a.select("[id='".concat(e,"']")));s.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),(i=s).append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),i.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),i.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");var c=new(t_().Graph)({multigraph:!0});c.setGraph({isMultiGraph:!0}),c.setDefaultEdgeLabel((function(){return{}}));for(var u=Zb.getClasses(),l=Object.keys(u),h=0;h<l.length;h++){var f=u[l[h]],d=h_(s,f,p_);d_[d.id]=d,c.setNode(d.id,d),o.info("Org height: "+d.height)}Zb.getRelations().forEach((function(t){o.info("tjoho"+g_(t.id1)+g_(t.id2)+JSON.stringify(t)),c.setEdge(g_(t.id1),g_(t.id2),{relation:t},t.title||"DEFAULT")})),Kb().layout(c),c.nodes().forEach((function(t){void 0!==t&&void 0!==c.node(t)&&(o.debug("Node "+t+": "+JSON.stringify(c.node(t))),a.select("#"+$b(t)).attr("transform","translate("+(c.node(t).x-c.node(t).width/2)+","+(c.node(t).y-c.node(t).height/2)+" )"))})),c.edges().forEach((function(t){void 0!==t&&void 0!==c.edge(t)&&(o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(c.edge(t))),function(t,e,n,r){var i=function(t){switch(t){case Vb.AGGREGATION:return"aggregation";case Vb.EXTENSION:return"extension";case Vb.COMPOSITION:return"composition";case Vb.DEPENDENCY:return"dependency"}};e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var a,s,c=e.points,u=Uu().x((function(t){return t.x})).y((function(t){return t.y})).curve(Vu),l=t.append("path").attr("d",u(c)).attr("id","edge"+r_).attr("class","relation"),h="";r.arrowMarkerAbsolute&&(h=(h=(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),1==n.relation.lineType&&l.attr("class","relation dashed-line"),"none"!==n.relation.type1&&l.attr("marker-start","url("+h+"#"+i(n.relation.type1)+"Start)"),"none"!==n.relation.type2&&l.attr("marker-end","url("+h+"#"+i(n.relation.type2)+"End)");var f,d,p,g,y=e.points.length,m=db.calcLabelPosition(e.points);if(a=m.x,s=m.y,y%2!=0&&y>1){var v=db.calcCardinalityPosition("none"!==n.relation.type1,e.points,e.points[0]),b=db.calcCardinalityPosition("none"!==n.relation.type2,e.points,e.points[y-1]);o.debug("cardinality_1_point "+JSON.stringify(v)),o.debug("cardinality_2_point "+JSON.stringify(b)),f=v.x,d=v.y,p=b.x,g=b.y}if(void 0!==n.title){var _=t.append("g").attr("class","classLabel"),x=_.append("text").attr("class","label").attr("x",a).attr("y",s).attr("fill","red").attr("text-anchor","middle").text(n.title);window.label=x;var w=x.node().getBBox();_.insert("rect",":first-child").attr("class","box").attr("x",w.x-r.padding/2).attr("y",w.y-r.padding/2).attr("width",w.width+r.padding).attr("height",w.height+r.padding)}o.info("Rendering relation "+JSON.stringify(n)),void 0!==n.relationTitle1&&"none"!==n.relationTitle1&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",f).attr("y",d).attr("fill","black").attr("font-size","6").text(n.relationTitle1),void 0!==n.relationTitle2&&"none"!==n.relationTitle2&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",p).attr("y",g).attr("fill","black").attr("font-size","6").text(n.relationTitle2),r_++}(s,c.edge(t),c.edge(t).relation,p_))}));var p=s.node().getBBox(),g=p.width+40,y=p.height+40;lb(s,y,g,p_.useMaxWidth);var m="".concat(p.x-20," ").concat(p.y-20," ").concat(g," ").concat(y);o.debug("viewBox ".concat(m)),s.attr("viewBox",m),f_(e_.parser.yy,s,e)};var v_={extension:function(t,e,n){o.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:function(t,e){t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:function(t,e){t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:function(t,e){t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},point:function(t,e){t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:function(t,e){t.append("marker").attr("id",e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:function(t,e){t.append("marker").attr("id",e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:function(t,e){t.append("defs").append("marker").attr("id",e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}};const b_=function(t,e,n,r){e.forEach((function(e){v_[e](t,n,r)}))};function __(t){return __="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},__(t)}const x_=function(t,e,n,r){var i,a,s,c,u,l,h=t||"";if("object"===__(h)&&(h=h[0]),zm(wb().flowchart.htmlLabels))return h=h.replace(/\\n|\n/g,"<br />"),o.info("vertexText"+h),i={isNode:r,label:h.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")})),labelStyle:e.replace("fill:","color:")},s=au(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),c=s.append("xhtml:div"),u=i.label,l=i.isNode?"nodeLabel":"edgeLabel",c.html('<span class="'+l+'" '+(i.labelStyle?'style="'+i.labelStyle+'"':"")+">"+u+"</span>"),(a=i.labelStyle)&&c.attr("style",a),c.style("display","inline-block"),c.style("white-space","nowrap"),c.attr("xmlns","http://www.w3.org/1999/xhtml"),s.node();var f=document.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("style",e.replace("color:","fill:"));var d=[];d="string"==typeof h?h.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(h)?h:[];for(var p=0;p<d.length;p++){var g=document.createElementNS("http://www.w3.org/2000/svg","tspan");g.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),g.setAttribute("dy","1em"),g.setAttribute("x","0"),n?g.setAttribute("class","title-row"):g.setAttribute("class","row"),g.textContent=d[p].trim(),f.appendChild(g)}return f};var w_=function(t,e,n,r){var i;i=n||"node default";var a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=a.insert("g").attr("class","label").attr("style",e.labelStyle),s="string"==typeof e.labelText?e.labelText:e.labelText[0],c=o.node().appendChild(x_(Pm(FE(s),wb()),e.labelStyle,!1,r)),u=c.getBBox();if(zm(wb().flowchart.htmlLabels)){var l=c.children[0],h=au(c);u=l.getBoundingClientRect(),h.attr("width",u.width),h.attr("height",u.height)}var f=e.padding/2;return o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),{shapeSvg:a,bbox:u,halfPadding:f,label:o}},k_=function(t,e){var n=e.node().getBBox();t.width=n.width,t.height=n.height};function T_(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}var C_={},E_={},S_={},A_=function(t,e){return o.trace("In isDecendant",e," ",t," = ",E_[e].indexOf(t)>=0),E_[e].indexOf(t)>=0},M_=function t(e,n,r,i){o.warn("Copying children of ",e,"root",i,"data",n.node(e),i);var a=n.children(e)||[];e!==i&&a.push(e),o.warn("Copying (nodes) clusterId",e,"nodes",a),a.forEach((function(a){if(n.children(a).length>0)t(a,n,r,i);else{var s=n.node(a);o.info("cp ",a," to ",i," with parent ",e),r.setNode(a,s),i!==n.parent(a)&&(o.warn("Setting parent",a,n.parent(a)),r.setParent(a,n.parent(a))),e!==i&&a!==e?(o.debug("Setting parent",a,e),r.setParent(a,e)):(o.info("In copy ",e,"root",i,"data",n.node(e),i),o.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));var c=n.edges(a);o.debug("Copying Edges",c),c.forEach((function(t){o.info("Edge",t);var a=n.edge(t.v,t.w,t.name);o.info("Edge data",a,i);try{!function(t,e){return o.info("Decendants of ",e," is ",E_[e]),o.info("Edge is ",t),t.v!==e&&t.w!==e&&(E_[e]?(o.info("Here "),E_[e].indexOf(t.v)>=0||!!A_(t.v,e)||!!A_(t.w,e)||E_[e].indexOf(t.w)>=0):(o.debug("Tilt, ",e,",not in decendants"),!1))}(t,i)?o.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",i," clusterId:",e):(o.info("Copying as ",t.v,t.w,a,t.name),r.setEdge(t.v,t.w,a,t.name),o.info("newGraph edges ",r.edges(),r.edge(r.edges()[0])))}catch(t){o.error(t)}}))}o.debug("Removing node",a),n.removeNode(a)}))},N_=function t(e,n){for(var r=n.children(e),i=[].concat(r),a=0;a<r.length;a++)S_[r[a]]=e,i=i.concat(t(r[a],n));return i},D_=function t(e,n){o.trace("Searching",e);var r=n.children(e);if(o.trace("Searching children of id ",e,r),r.length<1)return o.trace("This is a valid node",e),e;for(var i=0;i<r.length;i++){var a=t(r[i],n);if(a)return o.trace("Found replacement for",e," => ",a),a}},B_=function(t){return C_[t]&&C_[t].externalConnections&&C_[t]?C_[t].id:t},L_=function(t,e){!t||e>10?o.debug("Opting out, no graph "):(o.debug("Opting in, graph "),t.nodes().forEach((function(e){t.children(e).length>0&&(o.warn("Cluster identified",e," Replacement id in edges: ",D_(e,t)),E_[e]=N_(e,t),C_[e]={id:D_(e,t),clusterData:t.node(e)})})),t.nodes().forEach((function(e){var n=t.children(e),r=t.edges();n.length>0?(o.debug("Cluster identified",e,E_),r.forEach((function(t){t.v!==e&&t.w!==e&&A_(t.v,e)^A_(t.w,e)&&(o.warn("Edge: ",t," leaves cluster ",e),o.warn("Decendants of XXX ",e,": ",E_[e]),C_[e].externalConnections=!0)}))):o.debug("Not a cluster ",e,E_)})),t.edges().forEach((function(e){var n=t.edge(e);o.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),o.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));var r=e.v,i=e.w;o.warn("Fix XXX",C_,"ids:",e.v,e.w,"Translateing: ",C_[e.v]," --- ",C_[e.w]),(C_[e.v]||C_[e.w])&&(o.warn("Fixing and trixing - removing XXX",e.v,e.w,e.name),r=B_(e.v),i=B_(e.w),t.removeEdge(e.v,e.w,e.name),r!==e.v&&(n.fromCluster=e.v),i!==e.w&&(n.toCluster=e.w),o.warn("Fix Replacing with XXX",r,i,e.name),t.setEdge(r,i,n,e.name))})),o.warn("Adjusted Graph",t_().json.write(t)),O_(t,0),o.trace(C_))},O_=function t(e,n){if(o.warn("extractor - ",n,t_().json.write(e),e.children("D")),n>10)o.error("Bailing out");else{for(var r=e.nodes(),i=!1,a=0;a<r.length;a++){var s=r[a],c=e.children(s);i=i||c.length>0}if(i){o.debug("Nodes = ",r,n);for(var u=0;u<r.length;u++){var l=r[u];if(o.debug("Extracting node",l,C_,C_[l]&&!C_[l].externalConnections,!e.parent(l),e.node(l),e.children("D")," Depth ",n),C_[l])if(!C_[l].externalConnections&&e.children(l)&&e.children(l).length>0){o.warn("Cluster without external connections, without a parent and with children",l,n);var h="TB"===e.graph().rankdir?"LR":"TB";C_[l]&&C_[l].clusterData&&C_[l].clusterData.dir&&(h=C_[l].clusterData.dir,o.warn("Fixing dir",C_[l].clusterData.dir,h));var f=new(t_().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:h,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));o.warn("Old graph before copy",t_().json.write(e)),M_(l,e,f,l),e.setNode(l,{clusterNode:!0,id:l,clusterData:C_[l].clusterData,labelText:C_[l].labelText,graph:f}),o.warn("New graph after copy node: (",l,")",t_().json.write(f)),o.debug("Old graph after copy",t_().json.write(e))}else o.warn("Cluster ** ",l," **not meeting the criteria !externalConnections:",!C_[l].externalConnections," no parent: ",!e.parent(l)," children ",e.children(l)&&e.children(l).length>0,e.children("D"),n),o.debug(C_);else o.debug("Not a cluster",l,n)}r=e.nodes(),o.warn("New list of nodes",r);for(var d=0;d<r.length;d++){var p=r[d],g=e.node(p);o.warn(" Now next level",p,g),g.clusterNode&&t(g.graph,n+1)}}else o.debug("Done, no node has children",e.nodes())}},I_=function t(e,n){if(0===n.length)return[];var r=Object.assign(n);return n.forEach((function(n){var i=e.children(n),a=t(e,i);r=r.concat(a)})),r},R_=function(t){return I_(t,t.children())},F_=n(3841);const P_=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),u=Math.abs(e*n*o/c);r.x<i&&(u=-u);var l=Math.abs(e*n*s/c);return r.y<a&&(l=-l),{x:i+u,y:a+l}};function Y_(t,e){return t*e>0}const j_=function(t,e,n,r){var i,a,o,s,c,u,l,h,f,d,p,g,y;if(i=e.y-t.y,o=t.x-e.x,c=e.x*t.y-t.x*e.y,f=i*n.x+o*n.y+c,d=i*r.x+o*r.y+c,!(0!==f&&0!==d&&Y_(f,d)||(a=r.y-n.y,s=n.x-r.x,u=r.x*n.y-n.x*r.y,l=a*t.x+s*t.y+u,h=a*e.x+s*e.y+u,0!==l&&0!==h&&Y_(l,h)||0==(p=i*s-a*o))))return g=Math.abs(p/2),{x:(y=o*u-s*c)<0?(y-g)/p:(y+g)/p,y:(y=a*c-i*u)<0?(y-g)/p:(y+g)/p}},U_=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;return Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=0===s?0:u*o/s,r=u):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o),{x:i+n,y:a+r}},z_=(n.n(F_)(),function(t,e,n){return P_(t,e,e,n)}),$_=function(t,e,n){var r=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)})):(o=Math.min(o,e.x),s=Math.min(s,e.y));for(var c=r-t.width/2-o,u=i-t.height/2-s,l=0;l<e.length;l++){var h=e[l],f=e[l<e.length-1?l+1:0],d=j_(t,n,{x:c+h.x,y:u+h.y},{x:c+f.x,y:u+f.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1})),a[0]):t},q_=U_;function H_(t){return H_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},H_(t)}var W_=function(t,e,n){var r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,a=10;"LR"===n&&(i=10,a=70);var o=r.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return k_(e,o),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return q_(e,t)},r},V_={question:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding+(i.height+e.padding),s=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];o.info("Question main (Circle)");var c=T_(r,a,a,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return o.warn("Intersect called"),$_(e,s,t)},r},rect:function(t,e){var n=w_(t,e,"node "+e.classes,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;o.trace("Classes = ",e.classes);var s=r.insert("rect",":first-child"),c=i.width+e.padding,u=i.height+e.padding;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",c).attr("height",u),e.props){var l=new Set(Object.keys(e.props));e.props.borders&&(function(t,e,n,r){var i=[],a=function(t){i.push(t),i.push(0)},s=function(t){i.push(0),i.push(t)};e.includes("t")?(o.debug("add top border"),a(n)):s(n),e.includes("r")?(o.debug("add right border"),a(r)):s(r),e.includes("b")?(o.debug("add bottom border"),a(n)):s(n),e.includes("l")?(o.debug("add left border"),a(r)):s(r),t.attr("stroke-dasharray",i.join(" "))}(s,e.props.borders,c,u),l.delete("borders")),l.forEach((function(t){o.warn("Unknown node property ".concat(t))}))}return k_(e,s),e.intersect=function(t){return q_(e,t)},r},rectWithTitle:function(t,e){var n;n=e.classes?"node "+e.classes:"node default";var r,i=t.insert("g").attr("class",n).attr("id",e.domId||e.id),a=i.insert("rect",":first-child"),s=i.insert("line"),c=i.insert("g").attr("class","label"),u=e.labelText.flat?e.labelText.flat():e.labelText;r="object"===H_(u)?u[0]:u,o.info("Label text abc79",r,u,"object"===H_(u));var l=c.node().appendChild(x_(r,e.labelStyle,!0,!0)),h={width:0,height:0};if(zm(wb().flowchart.htmlLabels)){var f=l.children[0],d=au(l);h=f.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}o.info("Text 2",u);var p=u.slice(1,u.length),g=l.getBBox(),y=c.node().appendChild(x_(p.join?p.join("<br/>"):p,e.labelStyle,!0,!0));if(zm(wb().flowchart.htmlLabels)){var m=y.children[0],v=au(y);h=m.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}var b=e.padding/2;return au(y).attr("transform","translate( "+(h.width>g.width?0:(g.width-h.width)/2)+", "+(g.height+b+5)+")"),au(l).attr("transform","translate( "+(h.width<g.width?0:-(g.width-h.width)/2)+", 0)"),h=c.node().getBBox(),c.attr("transform","translate("+-h.width/2+", "+(-h.height/2-b+3)+")"),a.attr("class","outer title-state").attr("x",-h.width/2-b).attr("y",-h.height/2-b).attr("width",h.width+e.padding).attr("height",h.height+e.padding),s.attr("class","divider").attr("x1",-h.width/2-b).attr("x2",h.width/2+b).attr("y1",-h.height/2-b+g.height+b).attr("y2",-h.height/2-b+g.height+b),k_(e,a),e.intersect=function(t){return q_(e,t)},i},choice:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);return n.insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map((function(t){return t.x+","+t.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return z_(e,14,t)},n},circle:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding,s=r.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),o.info("Circle main"),k_(e,s),e.intersect=function(t){return o.info("Circle intersect",e,i.width/2+a,t),z_(e,i.width/2+a,t)},r},doublecircle:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding,s=r.insert("g",":first-child"),c=s.insert("circle"),u=s.insert("circle");return c.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+a+5).attr("width",i.width+e.padding+10).attr("height",i.height+e.padding+10),u.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),o.info("DoubleCircle main"),k_(e,c),e.intersect=function(t){return o.info("DoubleCircle intersect",e,i.width/2+a+5,t),z_(e,i.width/2+a+5,t)},r},stadium:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.height+e.padding,o=i.width+a/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",a/2).attr("ry",a/2).attr("x",-o/2).attr("y",-a/2).attr("width",o).attr("height",a);return k_(e,s),e.intersect=function(t){return q_(e,t)},r},hexagon:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.height+e.padding,o=a/4,s=i.width+2*o+e.padding,c=[{x:o,y:0},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}],u=T_(r,s,a,c);return u.attr("style",e.style),k_(e,u),e.intersect=function(t){return $_(e,c,t)},r},rect_left_inv_arrow:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-o/2,y:0},{x:a,y:0},{x:a,y:-o},{x:-o/2,y:-o},{x:0,y:-o/2}];return T_(r,a,o,s).attr("style",e.style),e.width=a+o,e.height=o,e.intersect=function(t){return $_(e,s,t)},r},lean_right:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-2*o/6,y:0},{x:a-o/6,y:0},{x:a+2*o/6,y:-o},{x:o/6,y:-o}],c=T_(r,a,o,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return $_(e,s,t)},r},lean_left:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:2*o/6,y:0},{x:a+o/6,y:0},{x:a-2*o/6,y:-o},{x:-o/6,y:-o}],c=T_(r,a,o,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return $_(e,s,t)},r},trapezoid:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-2*o/6,y:0},{x:a+2*o/6,y:0},{x:a-o/6,y:-o},{x:o/6,y:-o}],c=T_(r,a,o,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return $_(e,s,t)},r},inv_trapezoid:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:o/6,y:0},{x:a-o/6,y:0},{x:a+2*o/6,y:-o},{x:-2*o/6,y:-o}],c=T_(r,a,o,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return $_(e,s,t)},r},rect_right_inv_arrow:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:0,y:0},{x:a+o/2,y:0},{x:a,y:-o/2},{x:a+o/2,y:-o},{x:0,y:-o}],c=T_(r,a,o,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return $_(e,s,t)},r},cylinder:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=a/2,s=o/(2.5+a/50),c=i.height+s+e.padding,u="M 0,"+s+" a "+o+","+s+" 0,0,0 "+a+" 0 a "+o+","+s+" 0,0,0 "+-a+" 0 l 0,"+c+" a "+o+","+s+" 0,0,0 "+a+" 0 l 0,"+-c,l=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",u).attr("transform","translate("+-a/2+","+-(c/2+s)+")");return k_(e,l),e.intersect=function(t){var n=q_(e,t),r=n.x-e.x;if(0!=o&&(Math.abs(r)<e.width/2||Math.abs(r)==e.width/2&&Math.abs(n.y-e.y)>e.height/2-s)){var i=s*s*(1-r*r/(o*o));0!=i&&(i=Math.sqrt(i)),i=s-i,t.y-e.y>0&&(i=-i),n.y+=i}return n},r},start:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),k_(e,r),e.intersect=function(t){return z_(e,7,t)},n},end:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child"),i=n.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),k_(e,i),e.intersect=function(t){return z_(e,7,t)},n},note:function(t,e){var n=w_(t,e,"node "+e.classes,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;o.info("Classes = ",e.classes);var s=r.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),k_(e,s),e.intersect=function(t){return q_(e,t)},r},subroutine:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:0,y:0},{x:a,y:0},{x:a,y:-o},{x:0,y:-o},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-o},{x:-8,y:-o},{x:-8,y:0}],c=T_(r,a,o,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return $_(e,s,t)},r},fork:W_,join:W_,class_box:function(t,e){var n,r=e.padding/2;n=e.classes?"node "+e.classes:"node default";var i=t.insert("g").attr("class",n).attr("id",e.domId||e.id),a=i.insert("rect",":first-child"),o=i.insert("line"),s=i.insert("line"),c=0,u=4,l=i.insert("g").attr("class","label"),h=0,f=e.classData.annotations&&e.classData.annotations[0],d=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",p=l.node().appendChild(x_(d,e.labelStyle,!0,!0)),g=p.getBBox();if(zm(wb().flowchart.htmlLabels)){var y=p.children[0],m=au(p);g=y.getBoundingClientRect(),m.attr("width",g.width),m.attr("height",g.height)}e.classData.annotations[0]&&(u+=g.height+4,c+=g.width);var v=e.classData.id;void 0!==e.classData.type&&""!==e.classData.type&&(wb().flowchart.htmlLabels?v+="&lt;"+e.classData.type+"&gt;":v+="<"+e.classData.type+">");var b=l.node().appendChild(x_(v,e.labelStyle,!0,!0));au(b).attr("class","classTitle");var _=b.getBBox();if(zm(wb().flowchart.htmlLabels)){var x=b.children[0],w=au(b);_=x.getBoundingClientRect(),w.attr("width",_.width),w.attr("height",_.height)}u+=_.height+4,_.width>c&&(c=_.width);var k=[];e.classData.members.forEach((function(t){var n=i_(t),r=n.displayText;wb().flowchart.htmlLabels&&(r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"));var i=l.node().appendChild(x_(r,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0)),a=i.getBBox();if(zm(wb().flowchart.htmlLabels)){var o=i.children[0],s=au(i);a=o.getBoundingClientRect(),s.attr("width",a.width),s.attr("height",a.height)}a.width>c&&(c=a.width),u+=a.height+4,k.push(i)})),u+=8;var T=[];if(e.classData.methods.forEach((function(t){var n=i_(t),r=n.displayText;wb().flowchart.htmlLabels&&(r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"));var i=l.node().appendChild(x_(r,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0)),a=i.getBBox();if(zm(wb().flowchart.htmlLabels)){var o=i.children[0],s=au(i);a=o.getBoundingClientRect(),s.attr("width",a.width),s.attr("height",a.height)}a.width>c&&(c=a.width),u+=a.height+4,T.push(i)})),u+=8,f){var C=(c-g.width)/2;au(p).attr("transform","translate( "+(-1*c/2+C)+", "+-1*u/2+")"),h=g.height+4}var E=(c-_.width)/2;return au(b).attr("transform","translate( "+(-1*c/2+E)+", "+(-1*u/2+h)+")"),h+=_.height+4,o.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-u/2-r+8+h).attr("y2",-u/2-r+8+h),h+=8,k.forEach((function(t){au(t).attr("transform","translate( "+-c/2+", "+(-1*u/2+h+4)+")"),h+=_.height+4})),h+=8,s.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-u/2-r+8+h).attr("y2",-u/2-r+8+h),h+=8,T.forEach((function(t){au(t).attr("transform","translate( "+-c/2+", "+(-1*u/2+h)+")"),h+=_.height+4})),a.attr("class","outer title-state").attr("x",-c/2-r).attr("y",-u/2-r).attr("width",c+e.padding).attr("height",u+e.padding),k_(e,a),e.intersect=function(t){return q_(e,t)},i}},G_={},X_=function(t){var e=G_[t.id];o.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");var n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},Z_={rect:function(t,e){o.trace("Creating subgraph rect for ",e.id,e);var n=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),a=i.node().appendChild(x_(e.labelText,e.labelStyle,void 0,!0)),s=a.getBBox();if(zm(wb().flowchart.htmlLabels)){var c=a.children[0],u=au(a);s=c.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}var l=0*e.padding,h=l/2,f=e.width<=s.width+l?s.width+l:e.width;e.width<=s.width+l?e.diff=(s.width-e.width)/2:e.diff=-e.padding/2,o.trace("Data ",e,JSON.stringify(e)),r.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-f/2).attr("y",e.y-e.height/2-h).attr("width",f).attr("height",e.height+l),i.attr("transform","translate("+(e.x-s.width/2)+", "+(e.y-e.height/2+e.padding/3)+")");var d=r.node().getBBox();return e.width=d.width,e.height=d.height,e.intersect=function(t){return U_(e,t)},n},roundedWithTitle:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),a=n.append("rect"),o=i.node().appendChild(x_(e.labelText,e.labelStyle,void 0,!0)),s=o.getBBox();if(zm(wb().flowchart.htmlLabels)){var c=o.children[0],u=au(o);s=c.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}s=o.getBBox();var l=0*e.padding,h=l/2,f=e.width<=s.width+e.padding?s.width+e.padding:e.width;e.width<=s.width+e.padding?e.diff=(s.width+0*e.padding-e.width)/2:e.diff=-e.padding/2,r.attr("class","outer").attr("x",e.x-f/2-h).attr("y",e.y-e.height/2-h).attr("width",f+l).attr("height",e.height+l),a.attr("class","inner").attr("x",e.x-f/2-h).attr("y",e.y-e.height/2-h+s.height-1).attr("width",f+l).attr("height",e.height+l-s.height-3),i.attr("transform","translate("+(e.x-s.width/2)+", "+(e.y-e.height/2-e.padding/3+(zm(wb().flowchart.htmlLabels)?5:3))+")");var d=r.node().getBBox();return e.height=d.height,e.intersect=function(t){return U_(e,t)},n},noteGroup:function(t,e){var n=t.insert("g").attr("class","note-cluster").attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return U_(e,t)},n},divider:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("class","divider").attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2).attr("width",e.width+i).attr("height",e.height+i);var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.diff=-e.padding/2,e.intersect=function(t){return U_(e,t)},n}},Q_={},K_={},J_={},tx=function(t,e){var n=x_(e.label,e.labelStyle),r=t.insert("g").attr("class","edgeLabel"),i=r.insert("g").attr("class","label");i.node().appendChild(n);var a,o=n.getBBox();if(zm(wb().flowchart.htmlLabels)){var s=n.children[0],c=au(n);o=s.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}if(i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),K_[e.id]=r,e.width=o.width,e.height=o.height,e.startLabelLeft){var u=x_(e.startLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");a=h.node().appendChild(u);var f=u.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),J_[e.id]||(J_[e.id]={}),J_[e.id].startLeft=l,ex(a,e.startLabelLeft)}if(e.startLabelRight){var d=x_(e.startLabelRight,e.labelStyle),p=t.insert("g").attr("class","edgeTerminals"),g=p.insert("g").attr("class","inner");a=p.node().appendChild(d),g.node().appendChild(d);var y=d.getBBox();g.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),J_[e.id]||(J_[e.id]={}),J_[e.id].startRight=p,ex(a,e.startLabelRight)}if(e.endLabelLeft){var m=x_(e.endLabelLeft,e.labelStyle),v=t.insert("g").attr("class","edgeTerminals"),b=v.insert("g").attr("class","inner");a=b.node().appendChild(m);var _=m.getBBox();b.attr("transform","translate("+-_.width/2+", "+-_.height/2+")"),v.node().appendChild(m),J_[e.id]||(J_[e.id]={}),J_[e.id].endLeft=v,ex(a,e.endLabelLeft)}if(e.endLabelRight){var x=x_(e.endLabelRight,e.labelStyle),w=t.insert("g").attr("class","edgeTerminals"),k=w.insert("g").attr("class","inner");a=k.node().appendChild(x);var T=x.getBBox();k.attr("transform","translate("+-T.width/2+", "+-T.height/2+")"),w.node().appendChild(x),J_[e.id]||(J_[e.id]={}),J_[e.id].endRight=w,ex(a,e.endLabelRight)}};function ex(t,e){wb().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}var nx=function(t,e){o.info("Moving label abc78 ",t.id,t.label,K_[t.id]);var n=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){var r=K_[t.id],i=t.x,a=t.y;if(n){var s=db.calcLabelPosition(n);o.info("Moving label from (",i,",",a,") to (",s.x,",",s.y,") abc78")}r.attr("transform","translate("+i+", "+a+")")}if(t.startLabelLeft){var c=J_[t.id].startLeft,u=t.x,l=t.y;if(n){var h=db.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);u=h.x,l=h.y}c.attr("transform","translate("+u+", "+l+")")}if(t.startLabelRight){var f=J_[t.id].startRight,d=t.x,p=t.y;if(n){var g=db.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);d=g.x,p=g.y}f.attr("transform","translate("+d+", "+p+")")}if(t.endLabelLeft){var y=J_[t.id].endLeft,m=t.x,v=t.y;if(n){var b=db.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);m=b.x,v=b.y}y.attr("transform","translate("+m+", "+v+")")}if(t.endLabelRight){var _=J_[t.id].endRight,x=t.x,w=t.y;if(n){var k=db.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);x=k.x,w=k.y}_.attr("transform","translate("+x+", "+w+")")}},rx=function(t,e){o.warn("abc88 cutPathAtIntersect",t,e);var n=[],r=t[0],i=!1;return t.forEach((function(t){if(o.info("abc88 checking point",t,e),function(t,e){var n=t.x,r=t.y,i=Math.abs(e.x-n),a=Math.abs(e.y-r),o=t.width/2,s=t.height/2;return i>=o||a>=s}(e,t)||i)o.warn("abc88 outside",t,r),r=t,i||n.push(t);else{var a=function(t,e,n){o.warn("intersection calc abc89:\n outsidePoint: ".concat(JSON.stringify(e),"\n insidePoint : ").concat(JSON.stringify(n),"\n node : x:").concat(t.x," y:").concat(t.y," w:").concat(t.width," h:").concat(t.height));var r=t.x,i=t.y,a=Math.abs(r-n.x),s=t.width/2,c=n.x<e.x?s-a:s+a,u=t.height/2,l=Math.abs(e.y-n.y),h=Math.abs(e.x-n.x);if(Math.abs(i-e.y)*s>Math.abs(r-e.x)*u){var f=n.y<e.y?e.y-u-i:i-u-e.y;c=h*f/l;var d={x:n.x<e.x?n.x+c:n.x-h+c,y:n.y<e.y?n.y+l-f:n.y-l+f};return 0===c&&(d.x=e.x,d.y=e.y),0===h&&(d.x=e.x),0===l&&(d.y=e.y),o.warn("abc89 topp/bott calc, Q ".concat(l,", q ").concat(f,", R ").concat(h,", r ").concat(c),d),d}var p=l*(c=n.x<e.x?e.x-s-r:r-s-e.x)/h,g=n.x<e.x?n.x+h-c:n.x-h+c,y=n.y<e.y?n.y+p:n.y-p;return o.warn("sides calc abc89, Q ".concat(l,", q ").concat(p,", R ").concat(h,", r ").concat(c),{_x:g,_y:y}),0===c&&(g=e.x,y=e.y),0===h&&(g=e.x),0===l&&(y=e.y),{x:g,y}}(e,r,t);o.warn("abc88 inside",t,r,a),o.warn("abc88 intersection",a);var s=!1;n.forEach((function(t){s=s||t.x===a.x&&t.y===a.y})),n.find((function(t){return t.x===a.x&&t.y===a.y}))?o.warn("abc88 no intersect",a,n):n.push(a),i=!0}})),o.warn("abc88 returning points",n),n},ix=function t(e,n,r,i){o.info("Graph in recursive render: XXX",t_().json.write(n),i);var a=n.graph().rankdir;o.trace("Dir in recursive render - dir:",a);var s=e.insert("g").attr("class","root");n.nodes()?o.info("Recursive render XXX",n.nodes()):o.info("No nodes found for",n),n.edges().length>0&&o.trace("Recursive edges",n.edge(n.edges()[0]));var c=s.insert("g").attr("class","clusters"),u=s.insert("g").attr("class","edgePaths"),l=s.insert("g").attr("class","edgeLabels"),h=s.insert("g").attr("class","nodes");n.nodes().forEach((function(e){var s=n.node(e);if(void 0!==i){var c=JSON.parse(JSON.stringify(i.clusterData));o.info("Setting data for cluster XXX (",e,") ",c,i),n.setNode(i.id,c),n.parent(e)||(o.trace("Setting parent",e,i.id),n.setParent(e,i.id,c))}if(o.info("(Insert) Node XXX"+e+": "+JSON.stringify(n.node(e))),s&&s.clusterNode){o.info("Cluster identified",e,s.width,n.node(e));var u=t(h,s.graph,r,n.node(e)),l=u.elem;k_(s,l),s.diff=u.diff||0,o.info("Node bounds (abc123)",e,s,s.width,s.x,s.y),function(t,e){G_[e.id]=t}(l,s),o.warn("Recursive render complete ",l,s)}else n.children(e).length>0?(o.info("Cluster - the non recursive path XXX",e,s.id,s,n),o.info(D_(s.id,n)),C_[s.id]={id:D_(s.id,n),node:s}):(o.info("Node - the non recursive path",e,s.id,s),function(t,e,n){var r,i,a;e.link?("sandbox"===wb().securityLevel?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),i=V_[e.shape](r,e,n)):r=i=V_[e.shape](t,e,n),e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),G_[e.id]=r,e.haveCallback&&G_[e.id].attr("class",G_[e.id].attr("class")+" clickable")}(h,n.node(e),a))})),n.edges().forEach((function(t){var e=n.edge(t.v,t.w,t.name);o.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(n.edge(t))),o.info("Fix",C_,"ids:",t.v,t.w,"Translateing: ",C_[t.v],C_[t.w]),tx(l,e)})),n.edges().forEach((function(t){o.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))})),o.info("#############################################"),o.info("### Layout ###"),o.info("#############################################"),o.info(n),Kb().layout(n),o.info("Graph after layout:",t_().json.write(n));var f=0;return R_(n).forEach((function(t){var e=n.node(t);o.info("Position "+t+": "+JSON.stringify(n.node(t))),o.info("Position "+t+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e&&e.clusterNode?X_(e):n.children(t).length>0?(function(t,e){o.trace("Inserting cluster");var n=e.shape||"rect";Q_[e.id]=Z_[n](t,e)}(c,e),C_[e.id].node=e):X_(e)})),n.edges().forEach((function(t){var e=n.edge(t);o.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e),e);var i=function(t,e,n,r,i,a){var s=n.points,c=!1,u=a.node(e.v),l=a.node(e.w);o.info("abc88 InsertEdge: ",n),l.intersect&&u.intersect&&((s=s.slice(1,n.points.length-1)).unshift(u.intersect(s[0])),o.info("Last point",s[s.length-1],l,l.intersect(s[s.length-1])),s.push(l.intersect(s[s.length-1]))),n.toCluster&&(o.info("to cluster abc88",r[n.toCluster]),s=rx(n.points,r[n.toCluster].node),c=!0),n.fromCluster&&(o.info("from cluster abc88",r[n.fromCluster]),s=rx(s.reverse(),r[n.fromCluster].node).reverse(),c=!0);var h,f=s.filter((function(t){return!Number.isNaN(t.y)}));h=("graph"===i||"flowchart"===i)&&n.curve||Vu;var d,p=Uu().x((function(t){return t.x})).y((function(t){return t.y})).curve(h);switch(n.thickness){case"normal":d="edge-thickness-normal";break;case"thick":d="edge-thickness-thick";break;default:d=""}switch(n.pattern){case"solid":d+=" edge-pattern-solid";break;case"dotted":d+=" edge-pattern-dotted";break;case"dashed":d+=" edge-pattern-dashed"}var g=t.append("path").attr("d",p(f)).attr("id",n.id).attr("class"," "+d+(n.classes?" "+n.classes:"")).attr("style",n.style),y="";switch(wb().state.arrowMarkerAbsolute&&(y=(y=(y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),o.info("arrowTypeStart",n.arrowTypeStart),o.info("arrowTypeEnd",n.arrowTypeEnd),n.arrowTypeStart){case"arrow_cross":g.attr("marker-start","url("+y+"#"+i+"-crossStart)");break;case"arrow_point":g.attr("marker-start","url("+y+"#"+i+"-pointStart)");break;case"arrow_barb":g.attr("marker-start","url("+y+"#"+i+"-barbStart)");break;case"arrow_circle":g.attr("marker-start","url("+y+"#"+i+"-circleStart)");break;case"aggregation":g.attr("marker-start","url("+y+"#"+i+"-aggregationStart)");break;case"extension":g.attr("marker-start","url("+y+"#"+i+"-extensionStart)");break;case"composition":g.attr("marker-start","url("+y+"#"+i+"-compositionStart)");break;case"dependency":g.attr("marker-start","url("+y+"#"+i+"-dependencyStart)")}switch(n.arrowTypeEnd){case"arrow_cross":g.attr("marker-end","url("+y+"#"+i+"-crossEnd)");break;case"arrow_point":g.attr("marker-end","url("+y+"#"+i+"-pointEnd)");break;case"arrow_barb":g.attr("marker-end","url("+y+"#"+i+"-barbEnd)");break;case"arrow_circle":g.attr("marker-end","url("+y+"#"+i+"-circleEnd)");break;case"aggregation":g.attr("marker-end","url("+y+"#"+i+"-aggregationEnd)");break;case"extension":g.attr("marker-end","url("+y+"#"+i+"-extensionEnd)");break;case"composition":g.attr("marker-end","url("+y+"#"+i+"-compositionEnd)");break;case"dependency":g.attr("marker-end","url("+y+"#"+i+"-dependencyEnd)")}var m={};return c&&(m.updatedPath=s),m.originalPath=n.points,m}(u,t,e,C_,r,n);nx(e,i)})),n.nodes().forEach((function(t){var e=n.node(t);o.info(t,e.type,e.diff),"group"===e.type&&(f=e.diff)})),{elem:s,diff:f}},ax=function(t,e,n,r,i){b_(t,n,r,i),G_={},K_={},J_={},Q_={},E_={},S_={},C_={},o.warn("Graph at first:",t_().json.write(e)),L_(e),o.warn("Graph after:",t_().json.write(e)),ix(t,e,r)};e_.parser.yy=Zb;var ox={dividerMargin:10,padding:5,textHeight:10};function sx(t){var e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;default:e="none"}return e}var cx={},ux=[],lx=function(t){return void 0===cx[t]&&(cx[t]={attributes:[]},o.info("Added new entity :",t)),cx[t]};const hx={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().er},addEntity:lx,addAttributes:function(t,e){var n,r=lx(t);for(n=e.length-1;n>=0;n--)r.attributes.push(e[n]),o.debug("Added attribute ",e[n].attributeName)},getEntities:function(){return cx},addRelationship:function(t,e,n,r){var i={entityA:t,roleA:e,entityB:n,relSpec:r};ux.push(i),o.debug("Added new relationship :",i)},getRelationships:function(){return ux},clear:function(){cx={},ux=[],Mb()},setTitle:Nb,getTitle:Db,setAccDescription:Bb,getAccDescription:Lb};var fx=n(5890),dx=n.n(fx),px={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"};const gx=px;var yx={},mx=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},vx=0;const bx=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)yx[e[n]]=t[e[n]]},_x=function(t,e){o.info("Drawing ER diagram"),hx.clear();var n=dx().parser;n.yy=hx;var r,i=wb().securityLevel;"sandbox"===i&&(r=au("#i"+e));var a=au("sandbox"===i?r.nodes()[0].contentDocument.body:"body");"sandbox"===i?r.nodes()[0].contentDocument:document;try{n.parse(t)}catch(t){o.debug("Parsing failed")}var s,c=a.select("[id='".concat(e,"']"));(function(t,e){var n;t.append("defs").append("marker").attr("id",px.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",px.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",px.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",px.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",px.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",px.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),(n=t.append("defs").append("marker").attr("id",px.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(n=t.append("defs").append("marker").attr("id",px.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")})(c,yx),s=new(t_().Graph)({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:yx.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));var u=function(t,e,n){var r;return Object.keys(e).forEach((function(i){var a=t.append("g").attr("id",i);r=void 0===r?i:r;var o="entity-"+i,s=a.append("text").attr("class","er entityLabel").attr("id",o).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("style","font-family: "+wb().fontFamily+"; font-size: "+yx.fontSize+"px").text(i),c=function(t,e,n){var r=yx.entityPadding/3,i=yx.entityPadding/3,a=.85*yx.fontSize,o=e.node().getBBox(),s=[],c=!1,u=!1,l=0,h=0,f=0,d=0,p=o.height+2*r,g=1;n.forEach((function(t){void 0!==t.attributeKeyType&&(c=!0),void 0!==t.attributeComment&&(u=!0)})),n.forEach((function(n){var i="".concat(e.node().id,"-attr-").concat(g),o=0,y=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-type")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+wb().fontFamily+"; font-size: "+a+"px").text(n.attributeType),m=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-name")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+wb().fontFamily+"; font-size: "+a+"px").text(n.attributeName),v={};v.tn=y,v.nn=m;var b=y.node().getBBox(),_=m.node().getBBox();if(l=Math.max(l,b.width),h=Math.max(h,_.width),o=Math.max(b.height,_.height),c){var x=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-key")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+wb().fontFamily+"; font-size: "+a+"px").text(n.attributeKeyType||"");v.kn=x;var w=x.node().getBBox();f=Math.max(f,w.width),o=Math.max(o,w.height)}if(u){var k=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-comment")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+wb().fontFamily+"; font-size: "+a+"px").text(n.attributeComment||"");v.cn=k;var T=k.node().getBBox();d=Math.max(d,T.width),o=Math.max(o,T.height)}v.height=o,s.push(v),p+=o+2*r,g+=1}));var y=4;c&&(y+=2),u&&(y+=2);var m=l+h+f+d,v={width:Math.max(yx.minEntityWidth,Math.max(o.width+2*yx.entityPadding,m+i*y)),height:n.length>0?p:Math.max(yx.minEntityHeight,o.height+2*yx.entityPadding)};if(n.length>0){var b=Math.max(0,(v.width-m-i*y)/(y/2));e.attr("transform","translate("+v.width/2+","+(r+o.height/2)+")");var _=o.height+2*r,x="attributeBoxOdd";s.forEach((function(e){var n=_+r+e.height/2;e.tn.attr("transform","translate("+i+","+n+")");var a=t.insert("rect","#"+e.tn.node().id).attr("class","er ".concat(x)).attr("fill",yx.fill).attr("fill-opacity","100%").attr("stroke",yx.stroke).attr("x",0).attr("y",_).attr("width",l+2*i+b).attr("height",e.height+2*r),o=parseFloat(a.attr("x"))+parseFloat(a.attr("width"));e.nn.attr("transform","translate("+(o+i)+","+n+")");var s=t.insert("rect","#"+e.nn.node().id).attr("class","er ".concat(x)).attr("fill",yx.fill).attr("fill-opacity","100%").attr("stroke",yx.stroke).attr("x",o).attr("y",_).attr("width",h+2*i+b).attr("height",e.height+2*r),p=parseFloat(s.attr("x"))+parseFloat(s.attr("width"));if(c){e.kn.attr("transform","translate("+(p+i)+","+n+")");var g=t.insert("rect","#"+e.kn.node().id).attr("class","er ".concat(x)).attr("fill",yx.fill).attr("fill-opacity","100%").attr("stroke",yx.stroke).attr("x",p).attr("y",_).attr("width",f+2*i+b).attr("height",e.height+2*r);p=parseFloat(g.attr("x"))+parseFloat(g.attr("width"))}u&&(e.cn.attr("transform","translate("+(p+i)+","+n+")"),t.insert("rect","#"+e.cn.node().id).attr("class","er ".concat(x)).attr("fill",yx.fill).attr("fill-opacity","100%").attr("stroke",yx.stroke).attr("x",p).attr("y",_).attr("width",d+2*i+b).attr("height",e.height+2*r)),_+=e.height+2*r,x="attributeBoxOdd"==x?"attributeBoxEven":"attributeBoxOdd"}))}else v.height=Math.max(yx.minEntityHeight,p),e.attr("transform","translate("+v.width/2+","+v.height/2+")");return v}(a,s,e[i].attributes),u=c.width,l=c.height,h=a.insert("rect","#"+o).attr("class","er entityBox").attr("fill",yx.fill).attr("fill-opacity","100%").attr("stroke",yx.stroke).attr("x",0).attr("y",0).attr("width",u).attr("height",l).node().getBBox();n.setNode(i,{width:h.width,height:h.height,shape:"rect",id:i})})),r}(c,hx.getEntities(),s),l=function(t,e){return t.forEach((function(t){e.setEdge(t.entityA,t.entityB,{relationship:t},mx(t))})),t}(hx.getRelationships(),s);Kb().layout(s),function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&t.select("#"+n).attr("transform","translate("+(e.node(n).x-e.node(n).width/2)+","+(e.node(n).y-e.node(n).height/2)+" )")}))}(c,s),l.forEach((function(t){!function(t,e,n,r){vx++;var i=n.edge(e.entityA,e.entityB,mx(e)),a=Uu().x((function(t){return t.x})).y((function(t){return t.y})).curve(Vu),o=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",a(i.points)).attr("stroke",yx.stroke).attr("fill","none");e.relSpec.relType===hx.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");var s="";switch(yx.arrowMarkerAbsolute&&(s=(s=(s=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e.relSpec.cardA){case hx.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+s+"#"+gx.ZERO_OR_ONE_END+")");break;case hx.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+s+"#"+gx.ZERO_OR_MORE_END+")");break;case hx.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+s+"#"+gx.ONE_OR_MORE_END+")");break;case hx.Cardinality.ONLY_ONE:o.attr("marker-end","url("+s+"#"+gx.ONLY_ONE_END+")")}switch(e.relSpec.cardB){case hx.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+s+"#"+gx.ZERO_OR_ONE_START+")");break;case hx.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+s+"#"+gx.ZERO_OR_MORE_START+")");break;case hx.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+s+"#"+gx.ONE_OR_MORE_START+")");break;case hx.Cardinality.ONLY_ONE:o.attr("marker-start","url("+s+"#"+gx.ONLY_ONE_START+")")}var c=o.node().getTotalLength(),u=o.node().getPointAtLength(.5*c),l="rel"+vx,h=t.append("text").attr("class","er relationshipLabel").attr("id",l).attr("x",u.x).attr("y",u.y).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("style","font-family: "+wb().fontFamily+"; font-size: "+yx.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+l).attr("class","er relationshipLabelBox").attr("x",u.x-h.width/2).attr("y",u.y-h.height/2).attr("width",h.width).attr("height",h.height).attr("fill","white").attr("fill-opacity","85%")}(c,t,s,u)}));var h=yx.diagramPadding,f=c.node().getBBox(),d=f.width+2*h,p=f.height+2*h;lb(c,p,d,yx.useMaxWidth),c.attr("viewBox","".concat(f.x-h," ").concat(f.y-h," ").concat(d," ").concat(p)),f_(n.yy,c,e)};function xx(t){return xx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xx(t)}function wx(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var kx,Tx,Cx="flowchart-",Ex=0,Sx=wb(),Ax={},Mx=[],Nx=[],Dx=[],Bx={},Lx={},Ox=0,Ix=!0,Rx=[],Fx=function(t){return $m.sanitizeText(t,Sx)},Px=function(t){for(var e=Object.keys(Ax),n=0;n<e.length;n++)if(Ax[e[n]].id===t)return Ax[e[n]].domId;return t},Yx=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:""};void 0!==(r=n.text)&&(i.text=Fx(r.trim()),'"'===i.text[0]&&'"'===i.text[i.text.length-1]&&(i.text=i.text.substring(1,i.text.length-1))),void 0!==n&&(i.type=n.type,i.stroke=n.stroke,i.length=n.length),Mx.push(i)},jx=function(t,e){t.split(",").forEach((function(t){var n=t;void 0!==Ax[n]&&Ax[n].classes.push(e),void 0!==Bx[n]&&Bx[n].classes.push(e)}))},Ux=function(t){var e=au(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=au("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),au(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=au(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),au(this).classed("hover",!1)}))};Rx.push(Ux);var zx=function(t){for(var e=0;e<Dx.length;e++)if(Dx[e].id===t)return e;return-1},$x=-1,qx=[],Hx=function t(e,n){var r=Dx[n].nodes;if(!(($x+=1)>2e3)){if(qx[$x]=n,Dx[n].id===e)return{result:!0,count:0};for(var i=0,a=1;i<r.length;){var o=zx(r[i]);if(o>=0){var s=t(e,o);if(s.result)return{result:!0,count:a+s.count};a+=s.count}i+=1}return{result:!1,count:a}}},Wx=function(t,e){var n=!1;return t.forEach((function(t){t.nodes.indexOf(e)>=0&&(n=!0)})),n},Vx=function(t,e){var n=[];return t.nodes.forEach((function(r,i){Wx(e,r)||n.push(t.nodes[i])})),{nodes:n}};const Gx={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},defaultConfig:function(){return yb.flowchart},setTitle:Nb,getTitle:Db,getAccDescription:Lb,setAccDescription:Bb,addVertex:function(t,e,n,r,i,a){var o,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},c=t;void 0!==c&&0!==c.trim().length&&(void 0===Ax[c]&&(Ax[c]={id:c,domId:Cx+c+"-"+Ex,styles:[],classes:[]}),Ex++,void 0!==e?(Sx=wb(),'"'===(o=Fx(e.trim()))[0]&&'"'===o[o.length-1]&&(o=o.substring(1,o.length-1)),Ax[c].text=o):void 0===Ax[c].text&&(Ax[c].text=t),void 0!==n&&(Ax[c].type=n),null!=r&&r.forEach((function(t){Ax[c].styles.push(t)})),null!=i&&i.forEach((function(t){Ax[c].classes.push(t)})),void 0!==a&&(Ax[c].dir=a),Ax[c].props=s)},lookUpDomId:Px,addLink:function(t,e,n,r){var i,a;for(i=0;i<t.length;i++)for(a=0;a<e.length;a++)Yx(t[i],e[a],n,r)},updateLinkInterpolate:function(t,e){t.forEach((function(t){"default"===t?Mx.defaultInterpolate=e:Mx[t].interpolate=e}))},updateLink:function(t,e){t.forEach((function(t){"default"===t?Mx.defaultStyle=e:(-1===db.isSubstringInArray("fill",e)&&e.push("fill:none"),Mx[t].style=e)}))},addClass:function(t,e){void 0===Nx[t]&&(Nx[t]={id:t,styles:[],textStyles:[]}),null!=e&&e.forEach((function(e){if(e.match("color")){var n=e.replace("fill","bgFill").replace("color","fill");Nx[t].textStyles.push(n)}Nx[t].styles.push(e)}))},setDirection:function(t){(kx=t).match(/.*</)&&(kx="RL"),kx.match(/.*\^/)&&(kx="BT"),kx.match(/.*>/)&&(kx="LR"),kx.match(/.*v/)&&(kx="TB")},setClass:jx,setTooltip:function(t,e){t.split(",").forEach((function(t){void 0!==e&&(Lx["gen-1"===Tx?Px(t):t]=Fx(e))}))},getTooltip:function(t){return Lx[t]},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){var r=Px(t);if("loose"===wb().securityLevel&&void 0!==e){var i=[];if("string"==typeof n){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var a=0;a<i.length;a++){var o=i[a].trim();'"'===o.charAt(0)&&'"'===o.charAt(o.length-1)&&(o=o.substr(1,o.length-2)),i[a]=o}}0===i.length&&i.push(t),void 0!==Ax[t]&&(Ax[t].haveCallback=!0,Rx.push((function(){var t=document.querySelector('[id="'.concat(r,'"]'));null!==t&&t.addEventListener("click",(function(){var t;db.runFunc.apply(db,[e].concat(function(t){if(Array.isArray(t))return wx(t)}(t=i)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return wx(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wx(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))}),!1)})))}}(t,e,n)})),jx(t,"clickable")},setLink:function(t,e,n){t.split(",").forEach((function(t){void 0!==Ax[t]&&(Ax[t].link=db.formatUrl(e,Sx),Ax[t].linkTarget=n)})),jx(t,"clickable")},bindFunctions:function(t){Rx.forEach((function(e){e(t)}))},getDirection:function(){return kx.trim()},getVertices:function(){return Ax},getEdges:function(){return Mx},getClasses:function(){return Nx},clear:function(t){Ax={},Nx={},Mx=[],(Rx=[]).push(Ux),Dx=[],Bx={},Ox=0,Lx=[],Ix=!0,Tx=t||"gen-1",Mb()},setGen:function(t){Tx=t||"gen-1"},defaultStyle:function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},addSubGraph:function(t,e,n){var r=t.trim(),i=n;t===n&&n.match(/\s/)&&(r=void 0);var a=[],s=function(t){var e,n={boolean:{},number:{},string:{}},r=[],i=t.filter((function(t){var i=xx(t);return t.stmt&&"dir"===t.stmt?(e=t.value,!1):""!==t.trim()&&(i in n?!n[i].hasOwnProperty(t)&&(n[i][t]=!0):!(r.indexOf(t)>=0)&&r.push(t))}));return{nodeList:i,dir:e}}(a.concat.apply(a,e)),c=s.nodeList,u=s.dir;if(a=c,"gen-1"===Tx){o.warn("LOOKING UP");for(var l=0;l<a.length;l++)a[l]=Px(a[l])}r=r||"subGraph"+Ox,i=Fx(i=i||""),Ox+=1;var h={id:r,nodes:a,title:i.trim(),classes:[],dir:u};return o.info("Adding",h.id,h.nodes,h.dir),h.nodes=Vx(h,Dx).nodes,Dx.push(h),Bx[r]=h,r},getDepthFirstPos:function(t){return qx[t]},indexNodes:function(){$x=-1,Dx.length>0&&Hx("none",Dx.length-1)},getSubGraphs:function(){return Dx},destructLink:function(t,e){var n,r=function(t){var e=t.trim(),n=e.slice(0,-1),r="arrow_open";switch(e.slice(-1)){case"x":r="arrow_cross","x"===e[0]&&(r="double_"+r,n=n.slice(1));break;case">":r="arrow_point","<"===e[0]&&(r="double_"+r,n=n.slice(1));break;case"o":r="arrow_circle","o"===e[0]&&(r="double_"+r,n=n.slice(1))}var i="normal",a=n.length-1;"="===n[0]&&(i="thick");var o=function(t,e){for(var n=e.length,r=0,i=0;i<n;++i)"."===e[i]&&++r;return r}(0,n);return o&&(i="dotted",a=o),{type:r,stroke:i,length:a}}(t);if(e){if(n=function(t){var e=t.trim(),n="arrow_open";switch(e[0]){case"<":n="arrow_point",e=e.slice(1);break;case"x":n="arrow_cross",e=e.slice(1);break;case"o":n="arrow_circle",e=e.slice(1)}var r="normal";return-1!==e.indexOf("=")&&(r="thick"),-1!==e.indexOf(".")&&(r="dotted"),{type:n,stroke:r}}(e),n.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===n.type)n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return"double_arrow"===n.type&&(n.type="double_arrow_point"),n.length=r.length,n}return r},lex:{firstGraph:function(){return!!Ix&&(Ix=!1,!0)}},exists:Wx,makeUniq:Vx};var Xx=n(3602),Zx=n.n(Xx),Qx=n(4949),Kx=n.n(Qx),Jx=n(8284),tw=n.n(Jx);function ew(t,e,n){var r=.9*(e.width+e.height),i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],a=fw(t,r,r,i);return n.intersect=function(t){return Kx().intersect.polygon(n,i,t)},a}function nw(t,e,n){var r=e.height,i=r/4,a=e.width+2*i,o=[{x:i,y:0},{x:a-i,y:0},{x:a,y:-r/2},{x:a-i,y:-r},{x:i,y:-r},{x:0,y:-r/2}],s=fw(t,a,r,o);return n.intersect=function(t){return Kx().intersect.polygon(n,o,t)},s}function rw(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function iw(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:i/6,y:-i}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function aw(t,e,n){var r=e.width,i=e.height,a=[{x:2*i/6,y:0},{x:r+i/6,y:0},{x:r-2*i/6,y:-i},{x:-i/6,y:-i}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function ow(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r+2*i/6,y:0},{x:r-i/6,y:-i},{x:i/6,y:-i}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function sw(t,e,n){var r=e.width,i=e.height,a=[{x:i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:-2*i/6,y:-i}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function cw(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function uw(t,e,n){var r=e.height,i=e.width+r/4,a=t.insert("rect",":first-child").attr("rx",r/2).attr("ry",r/2).attr("x",-i/2).attr("y",-r/2).attr("width",i).attr("height",r);return n.intersect=function(t){return Kx().intersect.rect(n,t)},a}function lw(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r,y:0},{x:r,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:r+8,y:0},{x:r+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function hw(t,e,n){var r=e.width,i=r/2,a=i/(2.5+r/50),o=e.height+a,s="M 0,"+a+" a "+i+","+a+" 0,0,0 "+r+" 0 a "+i+","+a+" 0,0,0 "+-r+" 0 l 0,"+o+" a "+i+","+a+" 0,0,0 "+r+" 0 l 0,"+-o,c=t.attr("label-offset-y",a).insert("path",":first-child").attr("d",s).attr("transform","translate("+-r/2+","+-(o/2+a)+")");return n.intersect=function(t){var e=Kx().intersect.rect(n,t),r=e.x-n.x;if(0!=i&&(Math.abs(r)<n.width/2||Math.abs(r)==n.width/2&&Math.abs(e.y-n.y)>n.height/2-a)){var o=a*a*(1-r*r/(i*i));0!=o&&(o=Math.sqrt(o)),o=a-o,t.y-n.y>0&&(o=-o),e.y+=o}return e},c}function fw(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("transform","translate("+-e/2+","+n/2+")")}const dw=function(t){t.shapes().question=ew,t.shapes().hexagon=nw,t.shapes().stadium=uw,t.shapes().subroutine=lw,t.shapes().cylinder=hw,t.shapes().rect_left_inv_arrow=rw,t.shapes().lean_right=iw,t.shapes().lean_left=aw,t.shapes().trapezoid=ow,t.shapes().inv_trapezoid=sw,t.shapes().rect_right_inv_arrow=cw};var pw={};const gw=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)pw[e[n]]=t[e[n]]},yw=function(t,e){o.info("Drawing flowchart"),Gx.clear(),Gx.setGen("gen-1");var n=Zx().parser;n.yy=Gx;var r,i=wb().securityLevel;"sandbox"===i&&(r=au("#i"+e));var a=au("sandbox"===i?r.nodes()[0].contentDocument.body:"body"),s="sandbox"===i?r.nodes()[0].contentDocument:document;n.parse(t);var c=Gx.getDirection();void 0===c&&(c="TD");for(var u,l=wb().flowchart,h=l.nodeSpacing||50,f=l.rankSpacing||50,d=new(t_().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:h,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),p=Gx.getSubGraphs(),g=p.length-1;g>=0;g--)u=p[g],Gx.addVertex(u.id,u.title,"group",void 0,u.classes);var y=Gx.getVertices();o.warn("Get vertices",y);var m=Gx.getEdges(),v=0;for(v=p.length-1;v>=0;v--){u=p[v],ou("cluster").append("text");for(var b=0;b<u.nodes.length;b++)o.warn("Setting subgraph",u.nodes[b],Gx.lookUpDomId(u.nodes[b]),Gx.lookUpDomId(u.id)),d.setParent(Gx.lookUpDomId(u.nodes[b]),Gx.lookUpDomId(u.id))}(function(t,e,n,r,i){wb().securityLevel;var a=r?r.select('[id="'.concat(n,'"]')):au('[id="'.concat(n,'"]')),s=i||document;Object.keys(t).forEach((function(n){var r=t[n],i="default";r.classes.length>0&&(i=r.classes.join(" "));var c,u=Jv(r.styles),l=void 0!==r.text?r.text:r.id;if(zm(wb().flowchart.htmlLabels)){var h={label:l.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(c=tw()(a,h).node()).parentNode.removeChild(c)}else{var f=s.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("style",u.labelStyle.replace("color:","fill:"));for(var d=l.split($m.lineBreakRegex),p=0;p<d.length;p++){var g=s.createElementNS("http://www.w3.org/2000/svg","tspan");g.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),g.setAttribute("dy","1em"),g.setAttribute("x","1"),g.textContent=d[p],f.appendChild(g)}c=f}var y=0,m="";switch(r.type){case"round":y=5,m="rect";break;case"square":case"group":default:m="rect";break;case"diamond":m="question";break;case"hexagon":m="hexagon";break;case"odd":case"odd_right":m="rect_left_inv_arrow";break;case"lean_right":m="lean_right";break;case"lean_left":m="lean_left";break;case"trapezoid":m="trapezoid";break;case"inv_trapezoid":m="inv_trapezoid";break;case"circle":m="circle";break;case"ellipse":m="ellipse";break;case"stadium":m="stadium";break;case"subroutine":m="subroutine";break;case"cylinder":m="cylinder"}o.warn("Adding node",r.id,r.domId),e.setNode(Gx.lookUpDomId(r.id),{labelType:"svg",labelStyle:u.labelStyle,shape:m,label:c,rx:y,ry:y,class:i,style:u.style,id:Gx.lookUpDomId(r.id)})}))})(y,d,e,a,s),function(t,e){var n,r,i=0;if(void 0!==t.defaultStyle){var a=Jv(t.defaultStyle);n=a.style,r=a.labelStyle}t.forEach((function(a){i++;var o="L-"+a.start+"-"+a.end,s="LS-"+a.start,c="LE-"+a.end,u={};"arrow_open"===a.type?u.arrowhead="none":u.arrowhead="normal";var l="",h="";if(void 0!==a.style){var f=Jv(a.style);l=f.style,h=f.labelStyle}else switch(a.stroke){case"normal":l="fill:none",void 0!==n&&(l=n),void 0!==r&&(h=r);break;case"dotted":l="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":l=" stroke-width: 3.5px;fill:none"}u.style=l,u.labelStyle=h,void 0!==a.interpolate?u.curve=Qv(a.interpolate,Pu):void 0!==t.defaultInterpolate?u.curve=Qv(t.defaultInterpolate,Pu):u.curve=Qv(pw.curve,Pu),void 0===a.text?void 0!==a.style&&(u.arrowheadStyle="fill: #333"):(u.arrowheadStyle="fill: #333",u.labelpos="c",zm(wb().flowchart.htmlLabels)?(u.labelType="html",u.label='<span id="L-'.concat(o,'" class="edgeLabel L-').concat(s,"' L-").concat(c,'" style="').concat(u.labelStyle,'">').concat(a.text.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")})),"</span>")):(u.labelType="text",u.label=a.text.replace($m.lineBreakRegex,"\n"),void 0===a.style&&(u.style=u.style||"stroke: #333; stroke-width: 1.5px;fill:none"),u.labelStyle=u.labelStyle.replace("color:","fill:"))),u.id=o,u.class=s+" "+c,u.minlen=a.length||1,e.setEdge(Gx.lookUpDomId(a.start),Gx.lookUpDomId(a.end),u,i)}))}(m,d);var _=new(0,Kx().render);dw(_),_.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");Kx().util.applyStyle(i,n[r+"Style"])},_.arrows().normal=function(t,e){t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};var x=a.select('[id="'.concat(e,'"]'));x.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),o.warn(d),f_(n.yy,x,e);var w=a.select("#"+e+" g");_(w,d),w.selectAll("g.node").attr("title",(function(){return Gx.getTooltip(this.id)}));var k=l.diagramPadding,T=x.node().getBBox(),C=T.width+2*k,E=T.height+2*k;lb(x,E,C,l.useMaxWidth);var S="".concat(T.x-k," ").concat(T.y-k," ").concat(C," ").concat(E);for(o.debug("viewBox ".concat(S)),x.attr("viewBox",S),Gx.indexNodes("subGraph"+v),v=0;v<p.length;v++)if("undefined"!==(u=p[v]).title){var A=s.querySelectorAll("#"+e+' [id="'+Gx.lookUpDomId(u.id)+'"] rect'),M=s.querySelectorAll("#"+e+' [id="'+Gx.lookUpDomId(u.id)+'"]'),N=A[0].x.baseVal.value,D=A[0].y.baseVal.value,B=A[0].width.baseVal.value,L=au(M[0]).select(".label");L.attr("transform","translate(".concat(N+B/2,", ").concat(D+14,")")),L.attr("id",e+"Text");for(var O=0;O<u.classes.length;O++)M[0].classList.add(u.classes[O])}zm(l.htmlLabels);for(var I=s.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),R=0;R<I.length;R++){var F=I[R],P=F.getBBox(),Y=s.createElementNS("http://www.w3.org/2000/svg","rect");Y.setAttribute("rx",0),Y.setAttribute("ry",0),Y.setAttribute("width",P.width),Y.setAttribute("height",P.height),F.insertBefore(Y,F.firstChild)}Object.keys(y).forEach((function(t){var n=y[t];if(n.link){var r=a.select("#"+e+' [id="'+Gx.lookUpDomId(t)+'"]');if(r){var o=s.createElementNS("http://www.w3.org/2000/svg","a");o.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),o.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),o.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===i?o.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):n.linkTarget&&o.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);var c=r.insert((function(){return o}),":first-child"),u=r.select(".label-container");u&&c.append((function(){return u.node()}));var l=r.select(".label");l&&c.append((function(){return l.node()}))}}}))};var mw={};const vw=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)mw[e[n]]=t[e[n]]},bw=function(t,e){o.info("Drawing flowchart"),Gx.clear(),Gx.setGen("gen-2");var n=Zx().parser;n.yy=Gx,n.parse(t);var r=Gx.getDirection();void 0===r&&(r="TD");var i,a=wb().flowchart,s=a.nodeSpacing||50,c=a.rankSpacing||50,u=wb().securityLevel;"sandbox"===u&&(i=au("#i"+e));var l,h=au("sandbox"===u?i.nodes()[0].contentDocument.body:"body"),f="sandbox"===u?i.nodes()[0].contentDocument:document,d=new(t_().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:s,ranksep:c,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),p=Gx.getSubGraphs();o.info("Subgraphs - ",p);for(var g=p.length-1;g>=0;g--)l=p[g],o.info("Subgraph - ",l),Gx.addVertex(l.id,l.title,"group",void 0,l.classes,l.dir);var y=Gx.getVertices(),m=Gx.getEdges();o.info(m);var v=0;for(v=p.length-1;v>=0;v--){l=p[v],ou("cluster").append("text");for(var b=0;b<l.nodes.length;b++)o.info("Setting up subgraphs",l.nodes[b],l.id),d.setParent(l.nodes[b],l.id)}(function(t,e,n,r,i){var a=r.select('[id="'.concat(n,'"]'));Object.keys(t).forEach((function(n){var r=t[n],s="default";r.classes.length>0&&(s=r.classes.join(" "));var c,u=Jv(r.styles),l=void 0!==r.text?r.text:r.id;if(zm(wb().flowchart.htmlLabels)){var h={label:l.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(c=tw()(a,h).node()).parentNode.removeChild(c)}else{var f=i.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("style",u.labelStyle.replace("color:","fill:"));for(var d=l.split($m.lineBreakRegex),p=0;p<d.length;p++){var g=i.createElementNS("http://www.w3.org/2000/svg","tspan");g.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),g.setAttribute("dy","1em"),g.setAttribute("x","1"),g.textContent=d[p],f.appendChild(g)}c=f}var y=0,m="";switch(r.type){case"round":y=5,m="rect";break;case"square":case"group":default:m="rect";break;case"diamond":m="question";break;case"hexagon":m="hexagon";break;case"odd":case"odd_right":m="rect_left_inv_arrow";break;case"lean_right":m="lean_right";break;case"lean_left":m="lean_left";break;case"trapezoid":m="trapezoid";break;case"inv_trapezoid":m="inv_trapezoid";break;case"circle":m="circle";break;case"ellipse":m="ellipse";break;case"stadium":m="stadium";break;case"subroutine":m="subroutine";break;case"cylinder":m="cylinder";break;case"doublecircle":m="doublecircle"}e.setNode(r.id,{labelStyle:u.labelStyle,shape:m,labelText:l,rx:y,ry:y,class:s,style:u.style,id:r.id,link:r.link,linkTarget:r.linkTarget,tooltip:Gx.getTooltip(r.id)||"",domId:Gx.lookUpDomId(r.id),haveCallback:r.haveCallback,width:"group"===r.type?500:void 0,dir:r.dir,type:r.type,props:r.props,padding:wb().flowchart.padding}),o.info("setNode",{labelStyle:u.labelStyle,shape:m,labelText:l,rx:y,ry:y,class:s,style:u.style,id:r.id,domId:Gx.lookUpDomId(r.id),width:"group"===r.type?500:void 0,type:r.type,dir:r.dir,props:r.props,padding:wb().flowchart.padding})}))})(y,d,e,h,f),function(t,e){o.info("abc78 edges = ",t);var n,r,i=0,a={};if(void 0!==t.defaultStyle){var s=Jv(t.defaultStyle);n=s.style,r=s.labelStyle}t.forEach((function(s){i++;var c="L-"+s.start+"-"+s.end;void 0===a[c]?(a[c]=0,o.info("abc78 new entry",c,a[c])):(a[c]++,o.info("abc78 new entry",c,a[c]));var u=c+"-"+a[c];o.info("abc78 new link id to be used is",c,u,a[c]);var l="LS-"+s.start,h="LE-"+s.end,f={style:"",labelStyle:""};switch(f.minlen=s.length||1,"arrow_open"===s.type?f.arrowhead="none":f.arrowhead="normal",f.arrowTypeStart="arrow_open",f.arrowTypeEnd="arrow_open",s.type){case"double_arrow_cross":f.arrowTypeStart="arrow_cross";case"arrow_cross":f.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":f.arrowTypeStart="arrow_point";case"arrow_point":f.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":f.arrowTypeStart="arrow_circle";case"arrow_circle":f.arrowTypeEnd="arrow_circle"}var d="",p="";switch(s.stroke){case"normal":d="fill:none;",void 0!==n&&(d=n),void 0!==r&&(p=r),f.thickness="normal",f.pattern="solid";break;case"dotted":f.thickness="normal",f.pattern="dotted",f.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f.thickness="thick",f.pattern="solid",f.style="stroke-width: 3.5px;fill:none;"}if(void 0!==s.style){var g=Jv(s.style);d=g.style,p=g.labelStyle}f.style=f.style+=d,f.labelStyle=f.labelStyle+=p,void 0!==s.interpolate?f.curve=Qv(s.interpolate,Pu):void 0!==t.defaultInterpolate?f.curve=Qv(t.defaultInterpolate,Pu):f.curve=Qv(mw.curve,Pu),void 0===s.text?void 0!==s.style&&(f.arrowheadStyle="fill: #333"):(f.arrowheadStyle="fill: #333",f.labelpos="c"),f.labelType="text",f.label=s.text.replace($m.lineBreakRegex,"\n"),void 0===s.style&&(f.style=f.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),f.labelStyle=f.labelStyle.replace("color:","fill:"),f.id=u,f.classes="flowchart-link "+l+" "+h,e.setEdge(s.start,s.end,f,i)}))}(m,d);var _=h.select('[id="'.concat(e,'"]'));_.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),f_(n.yy,_,e);var x=h.select("#"+e+" g");ax(x,d,["point","circle","cross"],"flowchart",e);var w=a.diagramPadding,k=_.node().getBBox(),T=k.width+2*w,C=k.height+2*w;if(o.debug("new ViewBox 0 0 ".concat(T," ").concat(C),"translate(".concat(w-d._label.marginx,", ").concat(w-d._label.marginy,")")),lb(_,C,T,a.useMaxWidth),_.attr("viewBox","0 0 ".concat(T," ").concat(C)),_.select("g").attr("transform","translate(".concat(w-d._label.marginx,", ").concat(w-k.y,")")),Gx.indexNodes("subGraph"+v),!a.htmlLabels)for(var E=f.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),S=0;S<E.length;S++){var A=E[S],M=A.getBBox(),N=f.createElementNS("http://www.w3.org/2000/svg","rect");N.setAttribute("rx",0),N.setAttribute("ry",0),N.setAttribute("width",M.width),N.setAttribute("height",M.height),A.insertBefore(N,A.firstChild)}Object.keys(y).forEach((function(t){var n=y[t];if(n.link){var r=au("#"+e+' [id="'+t+'"]');if(r){var i=f.createElementNS("http://www.w3.org/2000/svg","a");i.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),i.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),i.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===u?i.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):n.linkTarget&&i.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);var a=r.insert((function(){return i}),":first-child"),o=r.select(".label-container");o&&a.append((function(){return o.node()}));var s=r.select(".label");s&&a.append((function(){return s.node()}))}}}))};function _w(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var xw,ww,kw="",Tw="",Cw="",Ew=[],Sw=[],Aw={},Mw=[],Nw=[],Dw="",Bw=["active","done","crit","milestone"],Lw=[],Ow=!1,Iw=!1,Rw=0,Fw=function(t,e,n,r){return!(r.indexOf(t.format(e.trim()))>=0)&&(t.isoWeekday()>=6&&n.indexOf("weekends")>=0||n.indexOf(t.format("dddd").toLowerCase())>=0||n.indexOf(t.format(e.trim()))>=0)},Pw=function(t,e,n,r){if(n.length&&!t.manualEndTime){var a=i()(t.startTime,e,!0);a.add(1,"d");var o=i()(t.endTime,e,!0),s=Yw(a,o,e,n,r);t.endTime=o.toDate(),t.renderEndTime=s}},Yw=function(t,e,n,r,i){for(var a=!1,o=null;t<=e;)a||(o=e.toDate()),(a=Fw(t,n,r,i))&&e.add(1,"d"),t.add(1,"d");return o},jw=function(t,e,n){n=n.trim();var r=/^after\s+([\d\w- ]+)/.exec(n.trim());if(null!==r){var a=null;if(r[1].split(" ").forEach((function(t){var e=Vw(t);void 0!==e&&(a?e.endTime>a.endTime&&(a=e):a=e)})),a)return a.endTime;var s=new Date;return s.setHours(0,0,0,0),s}var c=i()(n,e.trim(),!0);return c.isValid()?c.toDate():(o.debug("Invalid date:"+n),o.debug("With date format:"+e.trim()),new Date)},Uw=function(t,e){if(null!==t)switch(t[2]){case"s":e.add(t[1],"seconds");break;case"m":e.add(t[1],"minutes");break;case"h":e.add(t[1],"hours");break;case"d":e.add(t[1],"days");break;case"w":e.add(t[1],"weeks")}return e.toDate()},zw=function(t,e,n,r){r=r||!1,n=n.trim();var a=i()(n,e.trim(),!0);return a.isValid()?(r&&a.add(1,"d"),a.toDate()):Uw(/^([\d]+)([wdhms])/.exec(n.trim()),i()(t))},$w=0,qw=function(t){return void 0===t?"task"+($w+=1):t},Hw=[],Ww={},Vw=function(t){var e=Ww[t];return Hw[e]},Gw=function(){for(var t=function(t){var e=Hw[t],n="";switch(Hw[t].raw.startTime.type){case"prevTaskEnd":var r=Vw(e.prevTaskId);e.startTime=r.endTime;break;case"getStartDate":(n=jw(0,kw,Hw[t].raw.startTime.startData))&&(Hw[t].startTime=n)}return Hw[t].startTime&&(Hw[t].endTime=zw(Hw[t].startTime,kw,Hw[t].raw.endTime.data,Ow),Hw[t].endTime&&(Hw[t].processed=!0,Hw[t].manualEndTime=i()(Hw[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Pw(Hw[t],kw,Sw,Ew))),Hw[t].processed},e=!0,n=0;n<Hw.length;n++)t(n),e=e&&Hw[n].processed;return e},Xw=function(t,e){t.split(",").forEach((function(t){var n=Vw(t);void 0!==n&&n.classes.push(e)}))},Zw=function(t,e){Lw.push((function(){var n=document.querySelector('[id="'.concat(t,'"]'));null!==n&&n.addEventListener("click",(function(){e()}))})),Lw.push((function(){var n=document.querySelector('[id="'.concat(t,'-text"]'));null!==n&&n.addEventListener("click",(function(){e()}))}))};const Qw={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().gantt},clear:function(){Mw=[],Nw=[],Dw="",Lw=[],$w=0,xw=void 0,ww=void 0,Hw=[],kw="",Tw="",Cw="",Ew=[],Sw=[],Ow=!1,Iw=!1,Rw=0,Aw={},Mb()},setDateFormat:function(t){kw=t},getDateFormat:function(){return kw},enableInclusiveEndDates:function(){Ow=!0},endDatesAreInclusive:function(){return Ow},enableTopAxis:function(){Iw=!0},topAxisEnabled:function(){return Iw},setAxisFormat:function(t){Tw=t},getAxisFormat:function(){return Tw},setTodayMarker:function(t){Cw=t},getTodayMarker:function(){return Cw},setTitle:Nb,getTitle:Db,setAccDescription:Bb,getAccDescription:Lb,addSection:function(t){Dw=t,Mw.push(t)},getSections:function(){return Mw},getTasks:function(){for(var t=Gw(),e=0;!t&&e<10;)t=Gw(),e++;return Nw=Hw},addTask:function(t,e){var n={section:Dw,type:Dw,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};Kw(n,r,Bw);for(var i=0;i<n.length;i++)n[i]=n[i].trim();switch(n.length){case 1:r.id=qw(),r.startTime={type:"prevTaskEnd",id:t},r.endTime={data:n[0]};break;case 2:r.id=qw(),r.startTime={type:"getStartDate",startData:n[0]},r.endTime={data:n[1]};break;case 3:r.id=qw(n[0]),r.startTime={type:"getStartDate",startData:n[1]},r.endTime={data:n[2]}}return r}(ww,e);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=ww,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.order=Rw,Rw++;var i=Hw.push(n);ww=n.id,Ww[n.id]=i-1},findTaskById:Vw,addTaskOrg:function(t,e){var n={section:Dw,type:Dw,description:t,task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};Kw(n,r,Bw);for(var a=0;a<n.length;a++)n[a]=n[a].trim();var o="";switch(n.length){case 1:r.id=qw(),r.startTime=t.endTime,o=n[0];break;case 2:r.id=qw(),r.startTime=jw(0,kw,n[0]),o=n[1];break;case 3:r.id=qw(n[0]),r.startTime=jw(0,kw,n[1]),o=n[2]}return o&&(r.endTime=zw(r.startTime,kw,o,Ow),r.manualEndTime=i()(o,"YYYY-MM-DD",!0).isValid(),Pw(r,kw,Sw,Ew)),r}(xw,e);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,xw=n,Nw.push(n)},setIncludes:function(t){Ew=t.toLowerCase().split(/[\s,]+/)},getIncludes:function(){return Ew},setExcludes:function(t){Sw=t.toLowerCase().split(/[\s,]+/)},getExcludes:function(){return Sw},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){if("loose"===wb().securityLevel&&void 0!==e){var r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var i=0;i<r.length;i++){var a=r[i].trim();'"'===a.charAt(0)&&'"'===a.charAt(a.length-1)&&(a=a.substr(1,a.length-2)),r[i]=a}}0===r.length&&r.push(t),void 0!==Vw(t)&&Zw(t,(function(){var t;db.runFunc.apply(db,[e].concat(function(t){if(Array.isArray(t))return _w(t)}(t=r)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return _w(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_w(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))}))}}(t,e,n)})),Xw(t,"clickable")},setLink:function(t,e){var n=e;"loose"!==wb().securityLevel&&(n=(0,Bm.N)(e)),t.split(",").forEach((function(t){void 0!==Vw(t)&&(Zw(t,(function(){window.open(n,"_self")})),Aw[t]=n)})),Xw(t,"clickable")},getLinks:function(){return Aw},bindFunctions:function(t){Lw.forEach((function(e){e(t)}))},durationToDate:Uw,isInvalidDate:Fw};function Kw(t,e,n){for(var r=!0;r;)r=!1,n.forEach((function(n){var i=new RegExp("^\\s*"+n+"\\s*$");t[0].match(i)&&(e[n]=!0,t.shift(1),r=!0)}))}var Jw,tk=n(9959),ek=n.n(tk);tk.parser.yy=Qw;const nk=function(t,e){var n=wb().gantt;tk.parser.yy.clear(),tk.parser.parse(t);var r,a=wb().securityLevel;"sandbox"===a&&(r=au("#i"+e));var o=au("sandbox"===a?r.nodes()[0].contentDocument.body:"body"),s="sandbox"===a?r.nodes()[0].contentDocument:document,c=s.getElementById(e);void 0===(Jw=c.parentElement.offsetWidth)&&(Jw=1200),void 0!==n.useWidth&&(Jw=n.useWidth);var h=tk.parser.yy.getTasks(),f=h.length*(n.barHeight+n.barGap)+2*n.topPadding;c.setAttribute("viewBox","0 0 "+Jw+" "+f);for(var d=o.select('[id="'.concat(e,'"]')),p=function(){return Zi.apply($s(mo,vo,Ga,Wa,Pa,Ra,Oa,Ba,Na,ko).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}().domain([l(h,(function(t){return t.startTime})),u(h,(function(t){return t.endTime}))]).rangeRound([0,Jw-n.leftPadding-n.rightPadding]),g=[],y=0;y<h.length;y++)g.push(h[y].type);var m=g;g=function(t){for(var e={},n=[],r=0,i=t.length;r<i;++r)Object.prototype.hasOwnProperty.call(e,t[r])||(e[t[r]]=!0,n.push(t[r]));return n}(g),h.sort((function(t,e){var n=t.startTime,r=e.startTime,i=0;return n>r?i=1:n<r&&(i=-1),i})),function(t,r,a){var o=n.barHeight,c=o+n.barGap,u=n.topPadding,l=n.leftPadding;fa().domain([0,g.length]).range(["#00B9FA","#F95002"]).interpolate(Yr),function(t,e,r,a,o,s,c,u){var l=s.reduce((function(t,e){var n=e.startTime;return t?Math.min(t,n):n}),0),h=s.reduce((function(t,e){var n=e.endTime;return t?Math.max(t,n):n}),0),f=tk.parser.yy.getDateFormat();if(l&&h){for(var g=[],y=null,m=i()(l);m.valueOf()<=h;)tk.parser.yy.isInvalidDate(m,f,c,u)?y?y.end=m.clone():y={start:m.clone(),end:m.clone()}:y&&(g.push(y),y=null),m.add(1,"d");d.append("g").selectAll("rect").data(g).enter().append("rect").attr("id",(function(t){return"exclude-"+t.start.format("YYYY-MM-DD")})).attr("x",(function(t){return p(t.start)+r})).attr("y",n.gridLineStartPadding).attr("width",(function(t){var e=t.end.clone().add(1,"day");return p(e)-p(t.start)})).attr("height",o-e-n.gridLineStartPadding).attr("transform-origin",(function(e,n){return(p(e.start)+r+.5*(p(e.end)-p(e.start))).toString()+"px "+(n*t+.5*o).toString()+"px"})).attr("class","exclude-range")}}(c,u,l,0,a,t,tk.parser.yy.getExcludes(),tk.parser.yy.getIncludes()),function(t,e,r,i){var a,o=(a=p,v(3,a)).tickSize(-i+e+n.gridLineStartPadding).tickFormat(jl(tk.parser.yy.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));if(d.append("g").attr("class","grid").attr("transform","translate("+t+", "+(i-50)+")").call(o).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),Qw.topAxisEnabled()||n.topAxis){var s=function(t){return v(1,t)}(p).tickSize(-i+e+n.gridLineStartPadding).tickFormat(jl(tk.parser.yy.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));d.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(s).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}(l,u,0,a),function(t,r,i,a,o,s,c){d.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",(function(t,e){return t.order*r+i-2})).attr("width",(function(){return c-n.rightPadding/2})).attr("height",r).attr("class",(function(t){for(var e=0;e<g.length;e++)if(t.type===g[e])return"section section"+e%n.numberSectionStyles;return"section section0"}));var u=d.append("g").selectAll("rect").data(t).enter(),l=Qw.getLinks();if(u.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?p(t.startTime)+a+.5*(p(t.endTime)-p(t.startTime))-.5*o:p(t.startTime)+a})).attr("y",(function(t,e){return t.order*r+i})).attr("width",(function(t){return t.milestone?o:p(t.renderEndTime||t.endTime)-p(t.startTime)})).attr("height",o).attr("transform-origin",(function(t,e){return e=t.order,(p(t.startTime)+a+.5*(p(t.endTime)-p(t.startTime))).toString()+"px "+(e*r+i+.5*o).toString()+"px"})).attr("class",(function(t){var e="";t.classes.length>0&&(e=t.classes.join(" "));for(var r=0,i=0;i<g.length;i++)t.type===g[i]&&(r=i%n.numberSectionStyles);var a="";return t.active?t.crit?a+=" activeCrit":a=" active":t.done?a=t.crit?" doneCrit":" done":t.crit&&(a+=" crit"),0===a.length&&(a=" task"),t.milestone&&(a=" milestone "+a),"task"+(a+=r)+" "+e})),u.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",n.fontSize).attr("x",(function(t){var e=p(t.startTime),r=p(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(p(t.endTime)-p(t.startTime))-.5*o),t.milestone&&(r=e+o);var i=this.getBBox().width;return i>r-e?r+i+1.5*n.leftPadding>c?e+a-5:r+a+5:(r-e)/2+e+a})).attr("y",(function(t,e){return t.order*r+n.barHeight/2+(n.fontSize/2-2)+i})).attr("text-height",o).attr("class",(function(t){var e=p(t.startTime),r=p(t.endTime);t.milestone&&(r=e+o);var i=this.getBBox().width,a="";t.classes.length>0&&(a=t.classes.join(" "));for(var s=0,u=0;u<g.length;u++)t.type===g[u]&&(s=u%n.numberSectionStyles);var l="";return t.active&&(l=t.crit?"activeCritText"+s:"activeText"+s),t.done?l=t.crit?l+" doneCritText"+s:l+" doneText"+s:t.crit&&(l=l+" critText"+s),t.milestone&&(l+=" milestoneText"),i>r-e?r+i+1.5*n.leftPadding>c?a+" taskTextOutsideLeft taskTextOutside"+s+" "+l:a+" taskTextOutsideRight taskTextOutside"+s+" "+l+" width-"+i:a+" taskText taskText"+s+" "+l+" width-"+i})),"sandbox"===wb().securityLevel){var h;h=au("#i"+e),au(h.nodes()[0].contentDocument.body);var f=h.nodes()[0].contentDocument;u.filter((function(t){return void 0!==l[t.id]})).each((function(t){var e=f.querySelector("#"+t.id),n=f.querySelector("#"+t.id+"-text"),r=e.parentNode,i=f.createElement("a");i.setAttribute("xlink:href",l[t.id]),i.setAttribute("target","_top"),r.appendChild(i),i.appendChild(e),i.appendChild(n)}))}}(t,c,u,l,o,0,r),function(t,e){for(var r=[],i=0,a=0;a<g.length;a++)r[a]=[g[a],(o=g[a],c=m,function(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}(c)[o]||0)];var o,c;d.append("g").selectAll("text").data(r).enter().append((function(t){var e=t[0].split($m.lineBreakRegex),n=-(e.length-1)/2,r=s.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("dy",n+"em");for(var i=0;i<e.length;i++){var a=s.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttribute("alignment-baseline","central"),a.setAttribute("x","10"),i>0&&a.setAttribute("dy","1em"),a.textContent=e[i],r.appendChild(a)}return r})).attr("x",10).attr("y",(function(n,a){if(!(a>0))return n[1]*t/2+e;for(var o=0;o<a;o++)return i+=r[a-1][1],n[1]*t/2+i*t+e})).attr("font-size",n.sectionFontSize).attr("font-size",n.sectionFontSize).attr("class",(function(t){for(var e=0;e<g.length;e++)if(t[0]===g[e])return"sectionTitle sectionTitle"+e%n.numberSectionStyles;return"sectionTitle"}))}(c,u),function(t,e,r,i){var a=Qw.getTodayMarker();if("off"!==a){var o=d.append("g").attr("class","today"),s=new Date,c=o.append("line");c.attr("x1",p(s)+t).attr("x2",p(s)+t).attr("y1",n.titleTopMargin).attr("y2",i-n.titleTopMargin).attr("class","today"),""!==a&&c.attr("style",a.replace(/,/g,";"))}}(l,0,0,a)}(h,Jw,f),lb(d,f,Jw,n.useMaxWidth),d.append("text").text(tk.parser.yy.getTitle()).attr("x",Jw/2).attr("y",n.titleTopMargin).attr("class","titleText"),f_(tk.parser.yy,d,e)};function rk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ik(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?rk(Object(n),!0).forEach((function(e){ak(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rk(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ak(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ok=wb().gitGraph.mainBranchName,sk=wb().gitGraph.mainBranchOrder,ck={},uk=null,lk={};lk[ok]={name:ok,order:sk};var hk={};hk[ok]=uk;var fk=ok,dk="LR",pk=0;function gk(){return nb({length:7})}var yk={},mk=function(t){if(t=$m.sanitizeText(t,wb()),void 0===hk[t]){var e=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+t+'")');throw e.hash={text:"checkout "+t,token:"checkout "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+t+'"']},e}var n=hk[fk=t];uk=ck[n]};function vk(t,e,n){var r=t.indexOf(e);-1===r?t.push(n):t.splice(r,1,n)}function bk(t){var e=t.reduce((function(t,e){return t.seq>e.seq?t:e}),t[0]),n="";t.forEach((function(t){n+=t===e?"\t*":"\t|"}));var r,i,a,s=[n,e.id,e.seq];for(var c in hk)hk[c]===e.id&&s.push(c);if(o.debug(s.join(" ")),e.parents&&2==e.parents.length){var u=ck[e.parents[0]];vk(t,e,u),t.push(ck[e.parents[1]])}else{if(0==e.parents.length)return;var l=ck[e.parents];vk(t,e,l)}r=t,i=function(t){return t.id},a=Object.create(null),bk(t=r.reduce((function(t,e){var n=i(e);return a[n]||(a[n]=!0,t.push(e)),t}),[]))}var _k=function(){var t=Object.keys(ck).map((function(t){return ck[t]}));return t.forEach((function(t){o.debug(t.id)})),t.sort((function(t,e){return t.seq-e.seq})),t},xk={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3};const wk={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().gitGraph},setDirection:function(t){dk=t},setOptions:function(t){o.debug("options str",t),t=(t=t&&t.trim())||"{}";try{yk=JSON.parse(t)}catch(t){o.error("error while parsing gitGraph options",t.message)}},getOptions:function(){return yk},commit:function(t,e,n,r){o.debug("Entering commit:",t,e,n,r),e=$m.sanitizeText(e,wb()),t=$m.sanitizeText(t,wb()),r=$m.sanitizeText(r,wb());var i={id:e||pk+"-"+gk(),message:t,seq:pk++,type:n||xk.NORMAL,tag:r||"",parents:null==uk?[]:[uk.id],branch:fk};uk=i,ck[i.id]=i,hk[fk]=i.id,o.debug("in pushCommit "+i.id)},branch:function(t,e){if(t=$m.sanitizeText(t,wb()),void 0!==hk[t]){var n=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+t+'")');throw n.hash={text:"branch "+t,token:"branch "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+t+'"']},n}hk[t]=null!=uk?uk.id:null,lk[t]={name:t,order:e?parseInt(e,10):null},mk(t),o.debug("in createBranch")},merge:function(t,e){t=$m.sanitizeText(t,wb());var n=ck[hk[fk]],r=ck[hk[t]];if(fk===t){var i=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw i.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},i}if(void 0===n||!n){var a=new Error('Incorrect usage of "merge". Current branch ('+fk+")has no commits");throw a.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},a}if(void 0===hk[t]){var s=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw s.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+t]},s}if(void 0===r||!r){var c=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw c.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},c}if(n===r){var u=new Error('Incorrect usage of "merge". Both branches have same head');throw u.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},u}var l={id:pk+"-"+gk(),message:"merged branch "+t+" into "+fk,seq:pk++,parents:[null==uk?null:uk.id,hk[t]],branch:fk,type:xk.MERGE,tag:e||""};uk=l,ck[l.id]=l,hk[fk]=l.id,o.debug(hk),o.debug("in mergeBranch")},checkout:mk,prettyPrint:function(){o.debug(ck),bk([_k()[0]])},clear:function(){ck={},uk=null;var t=wb().gitGraph.mainBranchName,e=wb().gitGraph.mainBranchOrder;(hk={})[t]=null,(lk={})[t]={name:t,order:e},fk=t,pk=0,Mb()},getBranchesAsObjArray:function(){return Object.values(lk).map((function(t,e){return null!==t.order?t:ik(ik({},t),{},{order:parseFloat("0.".concat(e),10)})})).sort((function(t,e){return t.order-e.order})).map((function(t){return{name:t.name}}))},getBranches:function(){return hk},getCommits:function(){return ck},getCommitsArray:_k,getCurrentBranch:function(){return fk},getDirection:function(){return dk},getHead:function(){return uk},setTitle:Nb,getTitle:Db,getAccDescription:Lb,setAccDescription:Bb,commitType:xk};var kk=n(2553),Tk=n.n(kk),Ck={},Ek={},Sk={},Ak=[],Mk=0,Nk=function(t,e,n){var r=wb().gitGraph,i=t.append("g").attr("class","commit-bullets"),a=t.append("g").attr("class","commit-labels"),o=0;Object.keys(e).sort((function(t,n){return e[t].seq-e[n].seq})).forEach((function(t,s){var c=e[t],u=Ek[c.branch].pos,l=o+10;if(n){var h;switch(c.type){case 0:default:h="commit-normal";break;case 1:h="commit-reverse";break;case 2:h="commit-highlight";break;case 3:h="commit-merge"}if(2===c.type){var f=i.append("rect");f.attr("x",l-10),f.attr("y",u-10),f.attr("height",20),f.attr("width",20),f.attr("class","commit "+c.id+" commit-highlight"+Ek[c.branch].index+" "+h+"-outer"),i.append("rect").attr("x",l-6).attr("y",u-6).attr("height",12).attr("width",12).attr("class","commit "+c.id+" commit"+Ek[c.branch].index+" "+h+"-inner")}else{var d=i.append("circle");if(d.attr("cx",l),d.attr("cy",u),d.attr("r",3===c.type?9:10),d.attr("class","commit "+c.id+" commit"+Ek[c.branch].index),3===c.type){var p=i.append("circle");p.attr("cx",l),p.attr("cy",u),p.attr("r",6),p.attr("class","commit "+h+" "+c.id+" commit"+Ek[c.branch].index)}1===c.type&&i.append("path").attr("d","M ".concat(l-5,",").concat(u-5,"L").concat(l+5,",").concat(u+5,"M").concat(l-5,",").concat(u+5,"L").concat(l+5,",").concat(u-5)).attr("class","commit "+h+" "+c.id+" commit"+Ek[c.branch].index)}}if(Sk[c.id]={x:o+10,y:u},n){if(3!==c.type&&r.showCommitLabel){var g=a.insert("rect").attr("class","commit-label-bkg"),y=a.append("text").attr("x",o).attr("y",u+25).attr("class","commit-label").text(c.id),m=y.node().getBBox();g.attr("x",o+10-m.width/2-2).attr("y",u+13.5).attr("width",m.width+4).attr("height",m.height+4),y.attr("x",o+10-m.width/2)}if(c.tag){var v=a.insert("polygon"),b=a.append("circle"),_=a.append("text").attr("y",u-16).attr("class","tag-label").text(c.tag),x=_.node().getBBox();_.attr("x",o+10-x.width/2);var w=x.height/2,k=u-19.2;v.attr("class","tag-label-bkg").attr("points","\n ".concat(o-x.width/2-2,",").concat(k+2,"\n ").concat(o-x.width/2-2,",").concat(k-2,"\n ").concat(o+10-x.width/2-4,",").concat(k-w-2,"\n ").concat(o+10+x.width/2+4,",").concat(k-w-2,"\n ").concat(o+10+x.width/2+4,",").concat(k+w+2,"\n ").concat(o+10-x.width/2-4,",").concat(k+w+2)),b.attr("cx",o-x.width/2+2).attr("cy",k).attr("r",1.5).attr("class","tag-hole")}}(o+=50)>Mk&&(Mk=o)}))},Dk=function t(e,n,r){var i=r||0,a=e+Math.abs(e-n)/2;if(i>5)return a;for(var o=!0,s=0;s<Ak.length;s++)Math.abs(Ak[s]-a)<10&&(o=!1);return o?(Ak.push(a),a):t(e,n-Math.abs(e-n)/5,i)};const Bk=function(t,e,n){Ek={},Sk={},Ck={},Mk=0,Ak=[];var r=wb(),i=wb().gitGraph,a=Tk().parser;a.yy=wk,a.yy.clear(),o.debug("in gitgraph renderer",t+"\n","id:",e,n),a.parse(t+"\n"),wk.getDirection(),Ck=wk.getCommits();var s=wk.getBranchesAsObjArray(),c=0;s.forEach((function(t,e){Ek[t.name]={pos:c,index:e},c+=50}));var u=au('[id="'.concat(e,'"]'));f_(a.yy,u,e),Nk(u,Ck,!1),i.showBranches&&function(t,e){wb().gitGraph;var n=t.append("g");e.forEach((function(t,e){var r=Ek[t.name].pos,i=n.append("line");i.attr("x1",0),i.attr("y1",r),i.attr("x2",Mk),i.attr("y2",r),i.attr("class","branch branch"+e),Ak.push(r);var a=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","text"),n=[];n="string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(t)?t:[];for(var r=0;r<n.length;r++){var i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=n[r].trim(),e.appendChild(i)}return e}(t.name),o=n.insert("rect"),s=n.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+e);s.node().appendChild(a);var c=a.getBBox();o.attr("class","branchLabelBkg label"+e).attr("rx",4).attr("ry",4).attr("x",-c.width-4).attr("y",-c.height/2+8).attr("width",c.width+18).attr("height",c.height+4),s.attr("transform","translate("+(-c.width-14)+", "+(r-c.height/2-1)+")"),o.attr("transform","translate(-19, "+(r-c.height/2)+")")}))}(u,s),function(t,e){var n=t.append("g").attr("class","commit-arrows");Object.keys(e).forEach((function(t,r){var i=e[t];i.parents&&i.parents.length>0&&i.parents.forEach((function(t){!function(t,e,n,r){var i=wb(),a=Sk[e.id],o=Sk[n.id],s=function(t,e,n){return Sk[e.id],Sk[t.id],Object.keys(n).filter((function(r){return n[r].branch===e.branch&&n[r].seq>t.seq&&n[r].seq<e.seq})).length>0}(e,n,r);i.arrowMarkerAbsolute&&(window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(").replace(/\)/g,"\\)");var c,u="",l="",h=0,f=0,d=Ek[n.branch].index;if(s){u="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",h=10,f=10,d=Ek[n.branch].index;var p=a.y<o.y?Dk(a.y,o.y):Dk(o.y,a.y);c=a.y<o.y?"M ".concat(a.x," ").concat(a.y," L ").concat(a.x," ").concat(p-h," ").concat(u," ").concat(a.x+f," ").concat(p," L ").concat(o.x-h," ").concat(p," ").concat(l," ").concat(o.x," ").concat(p+f," L ").concat(o.x," ").concat(o.y):"M ".concat(a.x," ").concat(a.y," L ").concat(a.x," ").concat(p+h," ").concat(l," ").concat(a.x+f," ").concat(p," L ").concat(o.x-h," ").concat(p," ").concat(u," ").concat(o.x," ").concat(p-f," L ").concat(o.x," ").concat(o.y)}else a.y<o.y&&(u="A 20 20, 0, 0, 0,",h=20,f=20,d=Ek[n.branch].index,c="M ".concat(a.x," ").concat(a.y," L ").concat(a.x," ").concat(o.y-h," ").concat(u," ").concat(a.x+f," ").concat(o.y," L ").concat(o.x," ").concat(o.y)),a.y>o.y&&(u="A 20 20, 0, 0, 0,",h=20,f=20,d=Ek[e.branch].index,c="M ".concat(a.x," ").concat(a.y," L ").concat(o.x-h," ").concat(a.y," ").concat(u," ").concat(o.x," ").concat(a.y-f," L ").concat(o.x," ").concat(o.y)),a.y===o.y&&(d=Ek[e.branch].index,c="M ".concat(a.x," ").concat(a.y," L ").concat(a.x," ").concat(o.y-h," ").concat(u," ").concat(a.x+f," ").concat(o.y," L ").concat(o.x," ").concat(o.y));t.append("path").attr("d",c).attr("class","arrow arrow"+d)}(n,e[t],i,e)}))}))}(u,Ck),Nk(u,Ck,!0);var l=i.diagramPadding,h=u.node().getBBox(),f=h.width+2*l,d=h.height+2*l;lb(u,d,f,r.useMaxWidth);var p="".concat(h.x-l," ").concat(h.y-l," ").concat(f," ").concat(d);u.attr("viewBox",p)};var Lk="",Ok=!1;const Ik={setMessage:function(t){o.debug("Setting message to: "+t),Lk=t},getMessage:function(){return Lk},setInfo:function(t){Ok=t},getInfo:function(){return Ok}};var Rk=n(6765),Fk=n.n(Rk),Pk={};const Yk=function(t){Object.keys(t).forEach((function(e){Pk[e]=t[e]}))};var jk=n(7062),Uk=n.n(jk),zk={},$k="",qk=!1;const Hk={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().pie},addSection:function(t,e){t=$m.sanitizeText(t,wb()),void 0===zk[t]&&(zk[t]=e,o.debug("Added new section :",t))},getSections:function(){return zk},cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){zk={},$k="",qk=!1,Mb()},setTitle:Nb,getTitle:Db,setPieTitle:function(t){var e=$m.sanitizeText(t,wb());$k=e},getPieTitle:function(){return $k},setShowData:function(t){qk=t},getShowData:function(){return qk},getAccDescription:Lb,setAccDescription:Bb};var Wk,Vk=wb();const Gk=function(t,e){try{Vk=wb();var n=Uk().parser;n.yy=Hk,o.debug("Rendering info diagram\n"+t);var r,i=wb().securityLevel;"sandbox"===i&&(r=au("#i"+e));var a=au("sandbox"===i?r.nodes()[0].contentDocument.body:"body"),s="sandbox"===i?r.nodes()[0].contentDocument:document;n.yy.clear(),n.parse(t),o.debug("Parsed info diagram");var c=s.getElementById(e);void 0===(Wk=c.parentElement.offsetWidth)&&(Wk=1200),void 0!==Vk.useWidth&&(Wk=Vk.useWidth),void 0!==Vk.pie.useWidth&&(Wk=Vk.pie.useWidth);var u=a.select("#"+e);lb(u,450,Wk,Vk.pie.useMaxWidth),f_(n.yy,u,e),c.setAttribute("viewBox","0 0 "+Wk+" 450");var l=Math.min(Wk,450)/2-40,h=u.append("g").attr("transform","translate("+Wk/2+",225)"),f=Hk.getSections(),d=0;Object.keys(f).forEach((function(t){d+=f[t]}));var p=Vk.themeVariables,g=[p.pie1,p.pie2,p.pie3,p.pie4,p.pie5,p.pie6,p.pie7,p.pie8,p.pie9,p.pie10,p.pie11,p.pie12],y=ma().range(g),m=function(){var t=$u,e=zu,n=null,r=pu(0),i=pu(Cu),a=pu(0);function o(o){var s,c,u,l,h,f=(o=Ru(o)).length,d=0,p=new Array(f),g=new Array(f),y=+r.apply(this,arguments),m=Math.min(Cu,Math.max(-Cu,i.apply(this,arguments)-y)),v=Math.min(Math.abs(m)/f,a.apply(this,arguments)),b=v*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(o[s],s,o))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),s=0,u=d?(m-f*b)/d:0;s<f;++s,y=l)c=p[s],l=y+((h=g[c])>0?h*u:0)+b,g[c]={data:o[c],index:s,value:h,startAngle:y,endAngle:l,padAngle:v};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:pu(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:pu(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:pu(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:pu(+t),o):a},o}().value((function(t){return t[1]})),v=m(Object.entries(f)),b=Iu().innerRadius(0).outerRadius(l);h.selectAll("mySlices").data(v).enter().append("path").attr("d",b).attr("fill",(function(t){return y(t.data[0])})).attr("class","pieCircle"),h.selectAll("mySlices").data(v).enter().append("text").text((function(t){return(t.data[1]/d*100).toFixed(0)+"%"})).attr("transform",(function(t){return"translate("+b.centroid(t)+")"})).style("text-anchor","middle").attr("class","slice"),h.append("text").text(n.yy.getPieTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");var _=h.selectAll(".legend").data(y.domain()).enter().append("g").attr("class","legend").attr("transform",(function(t,e){return"translate(216,"+(22*e-22*y.domain().length/2)+")"}));_.append("rect").attr("width",18).attr("height",18).style("fill",y).style("stroke",y),_.data(v).append("text").attr("x",22).attr("y",14).text((function(t){return n.yy.getShowData()||Vk.showData||Vk.pie.showData?t.data[0]+" ["+t.data[1]+"]":t.data[0]}))}catch(t){o.error("Error while rendering info diagram"),o.error(t)}};var Xk=n(3176),Zk=n.n(Xk),Qk=[],Kk={},Jk={},tT={},eT={};const nT={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().req},addRequirement:function(t,e){return void 0===Jk[t]&&(Jk[t]={name:t,type:e,id:Kk.id,text:Kk.text,risk:Kk.risk,verifyMethod:Kk.verifyMethod}),Kk={},Jk[t]},getRequirements:function(){return Jk},setNewReqId:function(t){void 0!==Kk&&(Kk.id=t)},setNewReqText:function(t){void 0!==Kk&&(Kk.text=t)},setNewReqRisk:function(t){void 0!==Kk&&(Kk.risk=t)},setNewReqVerifyMethod:function(t){void 0!==Kk&&(Kk.verifyMethod=t)},setTitle:Nb,getTitle:Db,setAccDescription:Bb,getAccDescription:Lb,addElement:function(t){return void 0===eT[t]&&(eT[t]={name:t,type:tT.type,docRef:tT.docRef},o.info("Added new requirement: ",t)),tT={},eT[t]},getElements:function(){return eT},setNewElementType:function(t){void 0!==tT&&(tT.type=t)},setNewElementDocRef:function(t){void 0!==tT&&(tT.docRef=t)},addRelationship:function(t,e,n){Qk.push({type:t,src:e,dst:n})},getRelationships:function(){return Qk},clear:function(){Qk=[],Kk={},Jk={},tT={},eT={},Mb()}};var rT={CONTAINS:"contains",ARROW:"arrow"};const iT=rT;var aT={},oT=0,sT=function(t,e){return t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",aT.rect_min_width+"px").attr("height",aT.rect_min_height+"px")},cT=function(t,e,n){var r=aT.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",r).attr("y",aT.rect_padding).attr("dominant-baseline","hanging"),a=0;n.forEach((function(t){0==a?i.append("tspan").attr("text-anchor","middle").attr("x",aT.rect_min_width/2).attr("dy",0).text(t):i.append("tspan").attr("text-anchor","middle").attr("x",aT.rect_min_width/2).attr("dy",.75*aT.line_height).text(t),a++}));var o=1.5*aT.rect_padding+a*aT.line_height*.75;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",aT.rect_min_width).attr("y1",o).attr("y2",o),{titleNode:i,y:o}},uT=function(t,e,n,r){var i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",aT.rect_padding).attr("y",r).attr("dominant-baseline","hanging"),a=0,o=[];return n.forEach((function(t){for(var e=t.length;e>30&&a<3;){var n=t.substring(0,30);e=(t=t.substring(30,t.length)).length,o[o.length]=n,a++}if(3==a){var r=o[o.length-1];o[o.length-1]=r.substring(0,r.length-4)+"..."}else o[o.length]=t;a=0})),o.forEach((function(t){i.append("tspan").attr("x",aT.rect_padding).attr("dy",aT.line_height).text(t)})),i},lT=function(t){return t.replace(/\s/g,"").replace(/\./g,"_")};const hT=function(t){if(void 0!==t)for(var e=Object.keys(t),n=0;n<e.length;n++)aT[e[n]]=t[e[n]]},fT=function(t,e){Xk.parser.yy=nT,Xk.parser.yy.clear(),Xk.parser.parse(t);var n,r=wb().securityLevel;"sandbox"===r&&(n=au("#i"+e));var i=au("sandbox"===r?n.nodes()[0].contentDocument.body:"body"),a=("sandbox"===r?n.nodes()[0].contentDocument:document,i.select("[id='".concat(e,"']")));!function(t,e){var n=t.append("defs").append("marker").attr("id",rT.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");n.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),n.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),n.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",rT.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d","M0,0\n L".concat(e.line_height,",").concat(e.line_height/2,"\n M").concat(e.line_height,",").concat(e.line_height/2,"\n L0,").concat(e.line_height)).attr("stroke-width",1)}(a,aT);var s=new(t_().Graph)({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:aT.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}})),c=nT.getRequirements(),u=nT.getElements(),l=nT.getRelationships();!function(t,e,n){Object.keys(t).forEach((function(r){var i=t[r];r=lT(r),o.info("Added new requirement: ",r);var a=n.append("g").attr("id",r),s=sT(a,"req-"+r),c=[],u=cT(a,r+"_title",["<<".concat(i.type,">>"),"".concat(i.name)]);c.push(u.titleNode);var l=uT(a,r+"_body",["Id: ".concat(i.id),"Text: ".concat(i.text),"Risk: ".concat(i.risk),"Verification: ".concat(i.verifyMethod)],u.y);c.push(l);var h=s.node().getBBox();e.setNode(r,{width:h.width,height:h.height,shape:"rect",id:r})}))}(c,s,a),function(t,e,n){Object.keys(t).forEach((function(r){var i=t[r],a=lT(r),o=n.append("g").attr("id",a),s="element-"+a,c=sT(o,s),u=[],l=cT(o,s+"_title",["<<Element>>","".concat(r)]);u.push(l.titleNode);var h=uT(o,s+"_body",["Type: ".concat(i.type||"Not Specified"),"Doc Ref: ".concat(i.docRef||"None")],l.y);u.push(h);var f=c.node().getBBox();e.setNode(a,{width:f.width,height:f.height,shape:"rect",id:a})}))}(u,s,a),function(t,e){t.forEach((function(t){var n=lT(t.src),r=lT(t.dst);e.setEdge(n,r,{relationship:t})}))}(l,s),Kb().layout(s),function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&(t.select("#"+n),t.select("#"+n).attr("transform","translate("+(e.node(n).x-e.node(n).width/2)+","+(e.node(n).y-e.node(n).height/2)+" )"))}))}(a,s),l.forEach((function(t){!function(t,e,n,r){var i=n.edge(lT(e.src),lT(e.dst)),a=Uu().x((function(t){return t.x})).y((function(t){return t.y})),o=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",a(i.points)).attr("fill","none");e.type==nT.Relationships.CONTAINS?o.attr("marker-start","url("+$m.getUrl(aT.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+$m.getUrl(aT.arrowMarkerAbsolute)+"#"+iT.ARROW+"_line_ending)")),function(t,e,n,r){var i=e.node().getTotalLength(),a=e.node().getPointAtLength(.5*i),o="rel"+oT;oT++;var s=t.append("text").attr("class","req relationshipLabel").attr("id",o).attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(r).node().getBBox();t.insert("rect","#"+o).attr("class","req reqLabelBox").attr("x",a.x-s.width/2).attr("y",a.y-s.height/2).attr("width",s.width).attr("height",s.height).attr("fill","white").attr("fill-opacity","85%")}(t,o,0,"<<".concat(e.type,">>"))}(a,t,s,e)}));var h=aT.rect_padding,f=a.node().getBBox(),d=f.width+2*h,p=f.height+2*h;lb(a,p,d,aT.useMaxWidth),a.attr("viewBox","".concat(f.x-h," ").concat(f.y-h," ").concat(d," ").concat(p)),f_(Xk.parser.yy,a,e)};var dT=n(6876),pT=n.n(dT),gT=void 0,yT={},mT=[],vT=[],bT="",_T=!1,xT=!1,wT=function(t,e,n,r){var i=yT[t];i&&e===i.name&&null==n||(null!=n&&null!=n.text||(n={text:e,wrap:null,type:r}),null!=r&&null!=n.text||(n={text:e,wrap:null,type:r}),yT[t]={name:e,description:n.text,wrap:void 0===n.wrap&&ET()||!!n.wrap,prevActor:gT,links:{},properties:{},actorCnt:null,rectData:null,type:r||"participant"},gT&&yT[gT]&&(yT[gT].nextActor=t),gT=t)},kT=function(t){var e,n=0;for(e=0;e<mT.length;e++)mT[e].type===ST.ACTIVE_START&&mT[e].from.actor===t&&n++,mT[e].type===ST.ACTIVE_END&&mT[e].from.actor===t&&n--;return n},TT=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{text:void 0,wrap:void 0},r=arguments.length>3?arguments[3]:void 0;if(r===ST.ACTIVE_END){var i=kT(t.actor);if(i<1){var a=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw a.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a}}return mT.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&ET()||!!n.wrap,type:r}),!0},CT=function(t){return yT[t]},ET=function(){return xT},ST={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26},AT=function(t,e,n){var r={actor:t,placement:e,message:n.text,wrap:void 0===n.wrap&&ET()||!!n.wrap},i=[].concat(t,t);vT.push(r),mT.push({from:i[0],to:i[1],message:n.text,wrap:void 0===n.wrap&&ET()||!!n.wrap,type:ST.NOTE,placement:e})},MT=function(t,e){var n=CT(t);try{var r=Pm(e.text,wb());r=(r=r.replace(/&amp;/g,"&")).replace(/&equals;/g,"="),NT(n,JSON.parse(r))}catch(t){o.error("error while parsing actor link text",t)}};function NT(t,e){if(null==t.links)t.links=e;else for(var n in e)t.links[n]=e[n]}var DT=function(t,e){var n=CT(t);try{var r=Pm(e.text,wb());BT(n,JSON.parse(r))}catch(t){o.error("error while parsing actor properties text",t)}};function BT(t,e){if(null==t.properties)t.properties=e;else for(var n in e)t.properties[n]=e[n]}var LT=function(t,e){var n=CT(t),r=document.getElementById(e.text);try{var i=r.innerHTML,a=JSON.parse(i);a.properties&&BT(n,a.properties),a.links&&NT(n,a.links)}catch(t){o.error("error while parsing actor details text",t)}};const OT={addActor:wT,addMessage:function(t,e,n,r){mT.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&ET()||!!n.wrap,answer:r})},addSignal:TT,addLinks:MT,addDetails:LT,addProperties:DT,autoWrap:ET,setWrap:function(t){xT=t},enableSequenceNumbers:function(){_T=!0},disableSequenceNumbers:function(){_T=!1},showSequenceNumbers:function(){return _T},getMessages:function(){return mT},getActors:function(){return yT},getActor:CT,getActorKeys:function(){return Object.keys(yT)},getActorProperty:function(t,e){if(void 0!==t&&void 0!==t.properties)return t.properties[e]},getTitle:Db,getDiagramTitle:function(){return bT},parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().sequence},clear:function(){yT={},mT=[],_T=!1,bT="",Mb()},parseMessage:function(t){var e=t.trim(),n={text:e.replace(/^[:]?(?:no)?wrap:/,"").trim(),wrap:null!==e.match(/^[:]?wrap:/)||null===e.match(/^[:]?nowrap:/)&&void 0};return o.debug("parseMessage:",n),n},LINETYPE:ST,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:AT,setTitle:Nb,setDiagramTitle:function(t){var e=Pm(t,wb());bT=e},apply:function t(e){if(e instanceof Array)e.forEach((function(e){t(e)}));else switch(e.type){case"sequenceIndex":mT.push({from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case"addParticipant":wT(e.actor,e.actor,e.description,"participant");break;case"addActor":wT(e.actor,e.actor,e.description,"actor");break;case"activeStart":case"activeEnd":TT(e.actor,void 0,void 0,e.signalType);break;case"addNote":AT(e.actor,e.placement,e.text);break;case"addLinks":MT(e.actor,e.text);break;case"addALink":!function(t,e){var n=CT(t);try{var r={},i=Pm(e.text,wb()),a=i.indexOf("@"),s=(i=(i=i.replace(/&amp;/g,"&")).replace(/&equals;/g,"=")).slice(0,a-1).trim(),c=i.slice(a+1).trim();r[s]=c,NT(n,r)}catch(t){o.error("error while parsing actor link text",t)}}(e.actor,e.text);break;case"addProperties":DT(e.actor,e.text);break;case"addDetails":LT(e.actor,e.text);break;case"addMessage":TT(e.from,e.to,e.msg,e.signalType);break;case"loopStart":TT(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":TT(void 0,void 0,void 0,e.signalType);break;case"rectStart":TT(void 0,void 0,e.color,e.signalType);break;case"optStart":TT(void 0,void 0,e.optText,e.signalType);break;case"altStart":case"else":TT(void 0,void 0,e.altText,e.signalType);break;case"setTitle":Nb(e.text);break;case"parStart":case"and":TT(void 0,void 0,e.parText,e.signalType)}},setAccDescription:Bb,getAccDescription:Lb};var IT=[],RT=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},FT=function(t,e){var n;n=function(){var n=document.querySelectorAll(t);0!==n.length&&(n[0].addEventListener("mouseover",(function(){jT("actor"+e+"_popup")})),n[0].addEventListener("mouseout",(function(){UT("actor"+e+"_popup")})))},IT.push(n)},PT=function(t,e,n,r){var i=t.append("image");i.attr("x",e),i.attr("y",n);var a=(0,Bm.N)(r);i.attr("xlink:href",a)},YT=function(t,e,n,r){var i=t.append("use");i.attr("x",e),i.attr("y",n);var a=(0,Bm.N)(r);i.attr("xlink:href","#"+a)},jT=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="block")},UT=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="none")},zT=function(t,e){var n=0,r=0,i=e.text.split($m.lineBreakRegex),a=[],o=0,s=function(){return e.y};if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":s=function(){return Math.round(e.y+e.textMargin)};break;case"middle":case"center":s=function(){return Math.round(e.y+(n+r+e.textMargin)/2)};break;case"bottom":case"end":s=function(){return Math.round(e.y+(n+r+2*e.textMargin)-e.textMargin)}}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="text-after-edge",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="text-before-edge",e.alignmentBaseline="middle"}for(var c=0;c<i.length;c++){var u=i[c];void 0!==e.textMargin&&0===e.textMargin&&void 0!==e.fontSize&&(o=c*e.fontSize);var l=t.append("text");if(l.attr("x",e.x),l.attr("y",s()),void 0!==e.anchor&&l.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&l.style("font-family",e.fontFamily),void 0!==e.fontSize&&l.style("font-size",e.fontSize),void 0!==e.fontWeight&&l.style("font-weight",e.fontWeight),void 0!==e.fill&&l.attr("fill",e.fill),void 0!==e.class&&l.attr("class",e.class),void 0!==e.dy?l.attr("dy",e.dy):0!==o&&l.attr("dy",o),e.tspan){var h=l.append("tspan");h.attr("x",e.x),void 0!==e.fill&&h.attr("fill",e.fill),h.text(u)}else l.text(u);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(l._groups||l)[0][0].getBBox().height,n=r),a.push(l)}return a},$T=function(t,e){var n=t.append("polygon");return n.attr("points",function(t,e,n,r,i){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+r-7)+" "+(t+n-8.4)+","+(e+r)+" "+t+","+(e+r)}(e.x,e.y,e.width,e.height)),n.attr("class","labelBox"),e.y=e.y+e.height/2,zT(t,e),n},qT=-1,HT=function(t,e){t.selectAll&&t.selectAll(".actor-line").attr("class","200").attr("y2",e-55)},WT=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},VT=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},GT=function(){function t(t,e,n,i,a,o,s){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c){for(var u=c.actorFontSize,l=c.actorFontFamily,h=c.actorFontWeight,f=t.split($m.lineBreakRegex),d=0;d<f.length;d++){var p=d*u-u*(f.length-1)/2,g=e.append("text").attr("x",n+a/2).attr("y",i).style("text-anchor","middle").style("font-size",u).style("font-weight",h).style("font-family",l);g.append("tspan").attr("x",n+a/2).attr("dy",p).text(f[d]),g.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(g,s)}}function n(t,n,i,a,o,s,c,u){var l=n.append("switch"),h=l.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,i,a,o,s,c,u),r(h,c)}function r(t,e){for(var n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),XT=function(){function t(t,e,n,i,a,o,s){r(e.append("text").attr("x",n).attr("y",i).style("text-anchor","start").text(t),s)}function e(t,e,n,i,a,o,s,c){for(var u=c.actorFontSize,l=c.actorFontFamily,h=c.actorFontWeight,f=t.split($m.lineBreakRegex),d=0;d<f.length;d++){var p=d*u-u*(f.length-1)/2,g=e.append("text").attr("x",n).attr("y",i).style("text-anchor","start").style("font-size",u).style("font-weight",h).style("font-family",l);g.append("tspan").attr("x",n).attr("dy",p).text(f[d]),g.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(g,s)}}function n(t,n,i,a,o,s,c,u){var l=n.append("switch"),h=l.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,i,a,0,s,c,u),r(h,c)}function r(t,e){for(var n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}();const ZT=RT,QT=function(t,e,n){switch(e.type){case"actor":return function(t,e,n){var r=e.x+e.width/2;0===e.y&&(qT++,t.append("line").attr("id","actor"+qT).attr("x1",r).attr("y1",80).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));var i=t.append("g");i.attr("class","actor-man");var a={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};a.x=e.x,a.y=e.y,a.fill="#eaeaea",a.width=e.width,a.height=e.height,a.class="actor",a.rx=3,a.ry=3,i.append("line").attr("id","actor-man-torso"+qT).attr("x1",r).attr("y1",e.y+25).attr("x2",r).attr("y2",e.y+45),i.append("line").attr("id","actor-man-arms"+qT).attr("x1",r-18).attr("y1",e.y+33).attr("x2",r+18).attr("y2",e.y+33),i.append("line").attr("x1",r-18).attr("y1",e.y+60).attr("x2",r).attr("y2",e.y+45),i.append("line").attr("x1",r).attr("y1",e.y+45).attr("x2",r+16).attr("y2",e.y+60);var o=i.append("circle");o.attr("cx",e.x+e.width/2),o.attr("cy",e.y+10),o.attr("r",15),o.attr("width",e.width),o.attr("height",e.height);var s=i.node().getBBox();return e.height=s.height,GT(n)(e.description,i,a.x,a.y+35,a.width,a.height,{class:"actor"},n),e.height}(t,e,n);case"participant":return function(t,e,n){var r=e.x+e.width/2,i=t.append("g"),a=i;0===e.y&&(qT++,a.append("line").attr("id","actor"+qT).attr("x1",r).attr("y1",5).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),a=i.append("g"),e.actorCnt=qT,null!=e.links&&(a.attr("id","root-"+qT),FT("#root-"+qT,qT)));var o={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0},s="actor";null!=e.properties&&e.properties.class?s=e.properties.class:o.fill="#eaeaea",o.x=e.x,o.y=e.y,o.width=e.width,o.height=e.height,o.class=s,o.rx=3,o.ry=3;var c=RT(a,o);if(e.rectData=o,null!=e.properties&&e.properties.icon){var u=e.properties.icon.trim();"@"===u.charAt(0)?YT(a,o.x+o.width-20,o.y+10,u.substr(1)):PT(a,o.x+o.width-20,o.y+10,u)}GT(n)(e.description,a,o.x,o.y,o.width,o.height,{class:"actor"},n);var l=e.height;if(c.node){var h=c.node().getBBox();e.height=h.height,l=h.height}return l}(t,e,n)}},KT=function(t,e,n,r,i){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};var a=e.links,o=e.actorCnt,s=e.rectData,c="none";i&&(c="block !important");var u=t.append("g");u.attr("id","actor"+o+"_popup"),u.attr("class","actorPopupMenu"),u.attr("display",c),FT("#actor"+o+"_popup",o);var l="";void 0!==s.class&&(l=" "+s.class);var h=s.width>n?s.width:n,f=u.append("rect");if(f.attr("class","actorPopupMenuPanel"+l),f.attr("x",s.x),f.attr("y",s.height),f.attr("fill",s.fill),f.attr("stroke",s.stroke),f.attr("width",h),f.attr("height",s.height),f.attr("rx",s.rx),f.attr("ry",s.ry),null!=a){var d=20;for(var p in a){var g=u.append("a"),y=(0,Bm.N)(a[p]);g.attr("xlink:href",y),g.attr("target","_blank"),XT(r)(p,g,s.x+10,s.height+d,h,20,{class:"actor"},r),d+=30}}return f.attr("height",d),{height:s.height+d,width:h}},JT=function(t){return t.append("g")},tC=function(t,e,n,r,i){var a={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0},o=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=n-e.starty,RT(o,a)},eC=function(t,e,n,r){var i=r.boxMargin,a=r.boxTextMargin,o=r.labelBoxHeight,s=r.labelBoxWidth,c=r.messageFontFamily,u=r.messageFontSize,l=r.messageFontWeight,h=t.append("g"),f=function(t,e,n,r){return h.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("class","loopLine")};f(e.startx,e.starty,e.stopx,e.starty),f(e.stopx,e.starty,e.stopx,e.stopy),f(e.startx,e.stopy,e.stopx,e.stopy),f(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){f(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));var d={x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0};d.text=n,d.x=e.startx,d.y=e.starty,d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.anchor="middle",d.valign="middle",d.tspan=!1,d.width=s||50,d.height=o||20,d.textMargin=a,d.class="labelText",$T(h,d),(d={x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}).text=e.title,d.x=e.startx+s/2+(e.stopx-e.startx)/2,d.y=e.starty+i+a,d.anchor="middle",d.valign="middle",d.textMargin=a,d.class="loopText",d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.wrap=!0;var p=zT(h,d);return void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,n){if(t.message){d.text=t.message,d.x=e.startx+(e.stopx-e.startx)/2,d.y=e.sections[n].y+i+a,d.class="loopText",d.anchor="middle",d.valign="middle",d.tspan=!1,d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.wrap=e.wrap,p=zT(h,d);var r=Math.round(p.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));e.sections[n].height+=r-(i+a)}})),e.height=Math.round(e.stopy-e.starty),h},nC=function(t,e){RT(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},rC=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},iC=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},aC=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},oC=function(t){var e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},sC=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},cC=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},uC=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},lC=WT,hC=VT;Bm.N;dT.parser.yy=OT;var fC={},dC={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((function(t){return t.height||0})))+(0===this.loops.length?0:this.loops.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.messages.length?0:this.messages.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.notes.length?0:this.notes.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))},clear:function(){this.actors=[],this.loops=[],this.messages=[],this.notes=[]},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,bC(dT.parser.yy.getConfig())},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i=this,a=0;function o(o){return function(s){a++;var c=i.sequenceItems.length-a+1;i.updateVal(s,"starty",e-c*fC.boxMargin,Math.min),i.updateVal(s,"stopy",r+c*fC.boxMargin,Math.max),i.updateVal(dC.data,"startx",t-c*fC.boxMargin,Math.min),i.updateVal(dC.data,"stopx",n+c*fC.boxMargin,Math.max),"activation"!==o&&(i.updateVal(s,"startx",t-c*fC.boxMargin,Math.min),i.updateVal(s,"stopx",n+c*fC.boxMargin,Math.max),i.updateVal(dC.data,"starty",e-c*fC.boxMargin,Math.min),i.updateVal(dC.data,"stopy",r+c*fC.boxMargin,Math.max))}}this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(dC.data,"startx",i,Math.min),this.updateVal(dC.data,"starty",o,Math.min),this.updateVal(dC.data,"stopx",a,Math.max),this.updateVal(dC.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},newActivation:function(t,e,n){var r=n[t.from.actor],i=_C(t.from.actor).length||0,a=r.x+r.width/2+(i-1)*fC.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+fC.activationWidth,stopy:void 0,actor:t.from.actor,anchored:JT(e)})},endActivation:function(t){var e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:dC.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},pC=function(t){return{fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}},gC=function(t){return{fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}},yC=function(t){return{fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}},mC=function(t,e,n,r,i,a){if(!0===i.hideUnusedParticipants){var o=new Set;a.forEach((function(t){o.add(t.from),o.add(t.to)})),n=n.filter((function(t){return o.has(t)}))}for(var s=0,c=0,u=0,l=0;l<n.length;l++){var h=e[n[l]];h.width=h.width||fC.width,h.height=Math.max(h.height||fC.height,fC.height),h.margin=h.margin||fC.actorMargin,h.x=s+c,h.y=r;var f=QT(t,h,fC);u=Math.max(u,f),dC.insert(h.x,r,h.x+h.width,h.height),s+=h.width,c+=h.margin,dC.models.addActor(h)}dC.bumpVerticalPos(u)},vC=function(t,e,n,r){for(var i=0,a=0,o=0;o<n.length;o++){var s=e[n[o]],c=kC(s),u=KT(t,s,c,fC,fC.forceMenus,r);u.height>i&&(i=u.height),u.width+s.x>a&&(a=u.width+s.x)}return{maxHeight:i,maxWidth:a}},bC=function(t){rb(fC,t),t.fontFamily&&(fC.actorFontFamily=fC.noteFontFamily=fC.messageFontFamily=t.fontFamily),t.fontSize&&(fC.actorFontSize=fC.noteFontSize=fC.messageFontSize=t.fontSize),t.fontWeight&&(fC.actorFontWeight=fC.noteFontWeight=fC.messageFontWeight=t.fontWeight)},_C=function(t){return dC.activations.filter((function(e){return e.actor===t}))},xC=function(t,e){var n=e[t],r=_C(t);return[r.reduce((function(t,e){return Math.min(t,e.startx)}),n.x+n.width/2),r.reduce((function(t,e){return Math.max(t,e.stopx)}),n.x+n.width/2)]};function wC(t,e,n,r,i){dC.bumpVerticalPos(n);var a=r;if(e.id&&e.message&&t[e.id]){var s=t[e.id].width,c=pC(fC);e.message=db.wrapLabel("[".concat(e.message,"]"),s-2*fC.wrapPadding,c),e.width=s,e.wrap=!0;var u=db.calculateTextDimensions(e.message,c),l=Math.max(u.height,fC.labelBoxHeight);a=r+l,o.debug("".concat(l," - ").concat(e.message))}i(e),dC.bumpVerticalPos(a)}var kC=function(t){var e=0,n=yC(fC);for(var r in t.links){var i=db.calculateTextDimensions(r,n).width+2*fC.wrapPadding+2*fC.boxMargin;e<i&&(e=i)}return e};const TC={bounds:dC,drawActors:mC,drawActorsPopup:vC,setConf:bC,draw:function(t,e){fC=wb().sequence;var n,r=wb().securityLevel;"sandbox"===r&&(n=au("#i"+e));var i=au("sandbox"===r?n.nodes()[0].contentDocument.body:"body"),a="sandbox"===r?n.nodes()[0].contentDocument:document;dT.parser.yy.clear(),dT.parser.yy.setWrap(fC.wrap),dT.parser.parse(t+"\n"),dC.init(),o.debug("C:".concat(JSON.stringify(fC,null,2)));var s="sandbox"===r?i.select('[id="'.concat(e,'"]')):au('[id="'.concat(e,'"]')),c=dT.parser.yy.getActors(),u=dT.parser.yy.getActorKeys(),l=dT.parser.yy.getMessages(),h=dT.parser.yy.getDiagramTitle(),f=function(t,e){var n={};return e.forEach((function(e){if(t[e.to]&&t[e.from]){var r=t[e.to];if(e.placement===dT.parser.yy.PLACEMENT.LEFTOF&&!r.prevActor)return;if(e.placement===dT.parser.yy.PLACEMENT.RIGHTOF&&!r.nextActor)return;var i=void 0!==e.placement,a=!i,o=i?gC(fC):pC(fC),s=e.wrap?db.wrapLabel(e.message,fC.width-2*fC.wrapPadding,o):e.message,c=db.calculateTextDimensions(s,o).width+2*fC.wrapPadding;a&&e.from===r.nextActor?n[e.to]=Math.max(n[e.to]||0,c):a&&e.from===r.prevActor?n[e.from]=Math.max(n[e.from]||0,c):a&&e.from===e.to?(n[e.from]=Math.max(n[e.from]||0,c/2),n[e.to]=Math.max(n[e.to]||0,c/2)):e.placement===dT.parser.yy.PLACEMENT.RIGHTOF?n[e.from]=Math.max(n[e.from]||0,c):e.placement===dT.parser.yy.PLACEMENT.LEFTOF?n[r.prevActor]=Math.max(n[r.prevActor]||0,c):e.placement===dT.parser.yy.PLACEMENT.OVER&&(r.prevActor&&(n[r.prevActor]=Math.max(n[r.prevActor]||0,c/2)),r.nextActor&&(n[e.from]=Math.max(n[e.from]||0,c/2)))}})),o.debug("maxMessageWidthPerActor:",n),n}(c,l);fC.height=function(t,e){var n=0;for(var r in Object.keys(t).forEach((function(e){var r=t[e];r.wrap&&(r.description=db.wrapLabel(r.description,fC.width-2*fC.wrapPadding,yC(fC)));var i=db.calculateTextDimensions(r.description,yC(fC));r.width=r.wrap?fC.width:Math.max(fC.width,i.width+2*fC.wrapPadding),r.height=r.wrap?Math.max(i.height,fC.height):fC.height,n=Math.max(n,r.height)})),e){var i=t[r];if(i){var a=t[i.nextActor];if(a){var o=e[r]+fC.actorMargin-i.width/2-a.width/2;i.margin=Math.max(o,fC.actorMargin)}}}return Math.max(n,fC.height)}(c,f),cC(s),sC(s),uC(s),mC(s,c,u,0,fC,l);var d=function(t,e){var n,r,i,a={},s=[];return t.forEach((function(t){switch(t.id=db.random({length:10}),t.type){case dT.parser.yy.LINETYPE.LOOP_START:case dT.parser.yy.LINETYPE.ALT_START:case dT.parser.yy.LINETYPE.OPT_START:case dT.parser.yy.LINETYPE.PAR_START:s.push({id:t.id,msg:t.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case dT.parser.yy.LINETYPE.ALT_ELSE:case dT.parser.yy.LINETYPE.PAR_AND:t.message&&(n=s.pop(),a[n.id]=n,a[t.id]=n,s.push(n));break;case dT.parser.yy.LINETYPE.LOOP_END:case dT.parser.yy.LINETYPE.ALT_END:case dT.parser.yy.LINETYPE.OPT_END:case dT.parser.yy.LINETYPE.PAR_END:n=s.pop(),a[n.id]=n;break;case dT.parser.yy.LINETYPE.ACTIVE_START:var c=e[t.from?t.from.actor:t.to.actor],u=_C(t.from?t.from.actor:t.to.actor).length,l=c.x+c.width/2+(u-1)*fC.activationWidth/2,h={startx:l,stopx:l+fC.activationWidth,actor:t.from.actor,enabled:!0};dC.activations.push(h);break;case dT.parser.yy.LINETYPE.ACTIVE_END:var f=dC.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);delete dC.activations.splice(f,1)[0]}void 0!==t.placement?(r=function(t,e){var n=e[t.from].x,r=e[t.to].x,i=t.wrap&&t.message,a=db.calculateTextDimensions(i?db.wrapLabel(t.message,fC.width,gC(fC)):t.message,gC(fC)),s={width:i?fC.width:Math.max(fC.width,a.width+2*fC.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===dT.parser.yy.PLACEMENT.RIGHTOF?(s.width=i?Math.max(fC.width,a.width):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*fC.noteMargin),s.startx=n+(e[t.from].width+fC.actorMargin)/2):t.placement===dT.parser.yy.PLACEMENT.LEFTOF?(s.width=i?Math.max(fC.width,a.width+2*fC.noteMargin):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*fC.noteMargin),s.startx=n-s.width+(e[t.from].width-fC.actorMargin)/2):t.to===t.from?(a=db.calculateTextDimensions(i?db.wrapLabel(t.message,Math.max(fC.width,e[t.from].width),gC(fC)):t.message,gC(fC)),s.width=i?Math.max(fC.width,e[t.from].width):Math.max(e[t.from].width,fC.width,a.width+2*fC.noteMargin),s.startx=n+(e[t.from].width-s.width)/2):(s.width=Math.abs(n+e[t.from].width/2-(r+e[t.to].width/2))+fC.actorMargin,s.startx=n<r?n+e[t.from].width/2-fC.actorMargin/2:r+e[t.to].width/2-fC.actorMargin/2),i&&(s.message=db.wrapLabel(t.message,s.width-2*fC.wrapPadding,gC(fC))),o.debug("NM:[".concat(s.startx,",").concat(s.stopx,",").concat(s.starty,",").concat(s.stopy,":").concat(s.width,",").concat(s.height,"=").concat(t.message,"]")),s}(t,e),t.noteModel=r,s.forEach((function(t){(n=t).from=Math.min(n.from,r.startx),n.to=Math.max(n.to,r.startx+r.width),n.width=Math.max(n.width,Math.abs(n.from-n.to))-fC.labelBoxWidth}))):(i=function(t,e){var n=!1;if([dT.parser.yy.LINETYPE.SOLID_OPEN,dT.parser.yy.LINETYPE.DOTTED_OPEN,dT.parser.yy.LINETYPE.SOLID,dT.parser.yy.LINETYPE.DOTTED,dT.parser.yy.LINETYPE.SOLID_CROSS,dT.parser.yy.LINETYPE.DOTTED_CROSS,dT.parser.yy.LINETYPE.SOLID_POINT,dT.parser.yy.LINETYPE.DOTTED_POINT].includes(t.type)&&(n=!0),!n)return{};var r=xC(t.from,e),i=xC(t.to,e),a=r[0]<=i[0]?1:0,o=r[0]<i[0]?0:1,s=r.concat(i),c=Math.abs(i[o]-r[a]);t.wrap&&t.message&&(t.message=db.wrapLabel(t.message,Math.max(c+2*fC.wrapPadding,fC.width),pC(fC)));var u=db.calculateTextDimensions(t.message,pC(fC));return{width:Math.max(t.wrap?0:u.width+2*fC.wrapPadding,c+2*fC.wrapPadding,fC.width),height:0,startx:r[a],stopx:i[o],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,s),toBounds:Math.max.apply(null,s)}}(t,e),t.msgModel=i,i.startx&&i.stopx&&s.length>0&&s.forEach((function(r){if(n=r,i.startx===i.stopx){var a=e[t.from],o=e[t.to];n.from=Math.min(a.x-i.width/2,a.x-a.width/2,n.from),n.to=Math.max(o.x+i.width/2,o.x+a.width/2,n.to),n.width=Math.max(n.width,Math.abs(n.to-n.from))-fC.labelBoxWidth}else n.from=Math.min(i.startx,n.from),n.to=Math.max(i.stopx,n.to),n.width=Math.max(n.width,i.width)-fC.labelBoxWidth})))})),dC.activations=[],o.debug("Loop type widths:",a),a}(l,c);rC(s),oC(s),iC(s),aC(s);var p=1,g=1,y=Array();l.forEach((function(t){var e,n,r;switch(t.type){case dT.parser.yy.LINETYPE.NOTE:n=t.noteModel,function(t,e){dC.bumpVerticalPos(fC.boxMargin),e.height=fC.boxMargin,e.starty=dC.getVerticalPos();var n=hC();n.x=e.startx,n.y=e.starty,n.width=e.width||fC.width,n.class="note";var r=t.append("g"),i=ZT(r,n),a=lC();a.x=e.startx,a.y=e.starty,a.width=n.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=fC.noteFontFamily,a.fontSize=fC.noteFontSize,a.fontWeight=fC.noteFontWeight,a.anchor=fC.noteAlign,a.textMargin=fC.noteMargin,a.valign=fC.noteAlign;var o=zT(r,a),s=Math.round(o.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));i.attr("height",s+2*fC.noteMargin),e.height+=s+2*fC.noteMargin,dC.bumpVerticalPos(s+2*fC.noteMargin),e.stopy=e.starty+s+2*fC.noteMargin,e.stopx=e.startx+n.width,dC.insert(e.startx,e.starty,e.stopx,e.stopy),dC.models.addNote(e)}(s,n);break;case dT.parser.yy.LINETYPE.ACTIVE_START:dC.newActivation(t,s,c);break;case dT.parser.yy.LINETYPE.ACTIVE_END:!function(t,e){var n=dC.endActivation(t);n.starty+18>e&&(n.starty=e-6,e+=12),tC(s,n,e,fC,_C(t.from.actor).length),dC.insert(n.startx,e-10,n.stopx,e)}(t,dC.getVerticalPos());break;case dT.parser.yy.LINETYPE.LOOP_START:wC(d,t,fC.boxMargin,fC.boxMargin+fC.boxTextMargin,(function(t){return dC.newLoop(t)}));break;case dT.parser.yy.LINETYPE.LOOP_END:e=dC.endLoop(),eC(s,e,"loop",fC),dC.bumpVerticalPos(e.stopy-dC.getVerticalPos()),dC.models.addLoop(e);break;case dT.parser.yy.LINETYPE.RECT_START:wC(d,t,fC.boxMargin,fC.boxMargin,(function(t){return dC.newLoop(void 0,t.message)}));break;case dT.parser.yy.LINETYPE.RECT_END:e=dC.endLoop(),nC(s,e),dC.models.addLoop(e),dC.bumpVerticalPos(e.stopy-dC.getVerticalPos());break;case dT.parser.yy.LINETYPE.OPT_START:wC(d,t,fC.boxMargin,fC.boxMargin+fC.boxTextMargin,(function(t){return dC.newLoop(t)}));break;case dT.parser.yy.LINETYPE.OPT_END:e=dC.endLoop(),eC(s,e,"opt",fC),dC.bumpVerticalPos(e.stopy-dC.getVerticalPos()),dC.models.addLoop(e);break;case dT.parser.yy.LINETYPE.ALT_START:wC(d,t,fC.boxMargin,fC.boxMargin+fC.boxTextMargin,(function(t){return dC.newLoop(t)}));break;case dT.parser.yy.LINETYPE.ALT_ELSE:wC(d,t,fC.boxMargin+fC.boxTextMargin,fC.boxMargin,(function(t){return dC.addSectionToLoop(t)}));break;case dT.parser.yy.LINETYPE.ALT_END:e=dC.endLoop(),eC(s,e,"alt",fC),dC.bumpVerticalPos(e.stopy-dC.getVerticalPos()),dC.models.addLoop(e);break;case dT.parser.yy.LINETYPE.PAR_START:wC(d,t,fC.boxMargin,fC.boxMargin+fC.boxTextMargin,(function(t){return dC.newLoop(t)}));break;case dT.parser.yy.LINETYPE.PAR_AND:wC(d,t,fC.boxMargin+fC.boxTextMargin,fC.boxMargin,(function(t){return dC.addSectionToLoop(t)}));break;case dT.parser.yy.LINETYPE.PAR_END:e=dC.endLoop(),eC(s,e,"par",fC),dC.bumpVerticalPos(e.stopy-dC.getVerticalPos()),dC.models.addLoop(e);break;case dT.parser.yy.LINETYPE.AUTONUMBER:p=t.message.start||p,g=t.message.step||g,t.message.visible?dT.parser.yy.enableSequenceNumbers():dT.parser.yy.disableSequenceNumbers();break;default:try{(r=t.msgModel).starty=dC.getVerticalPos(),r.sequenceIndex=p,r.sequenceVisible=dT.parser.yy.showSequenceNumbers();var i=function(t,e){dC.bumpVerticalPos(10);var n,r=e.startx,i=e.stopx,a=e.message,o=$m.splitBreaks(a).length,s=db.calculateTextDimensions(a,pC(fC)),c=s.height/o;e.height+=c,dC.bumpVerticalPos(c);var u=s.height-10,l=s.width;if(r===i){n=dC.getVerticalPos()+u,fC.rightAngles||(u+=fC.boxMargin,n=dC.getVerticalPos()+u),u+=30;var h=Math.max(l/2,fC.width/2);dC.insert(r-h,dC.getVerticalPos()-10+u,i+h,dC.getVerticalPos()+30+u)}else u+=fC.boxMargin,n=dC.getVerticalPos()+u,dC.insert(r,n-10,i,n);return dC.bumpVerticalPos(u),e.height+=u,e.stopy=e.starty+e.height,dC.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),n}(0,r);y.push({messageModel:r,lineStarty:i}),dC.models.addMessage(r)}catch(t){o.error("error while drawing message",t)}}[dT.parser.yy.LINETYPE.SOLID_OPEN,dT.parser.yy.LINETYPE.DOTTED_OPEN,dT.parser.yy.LINETYPE.SOLID,dT.parser.yy.LINETYPE.DOTTED,dT.parser.yy.LINETYPE.SOLID_CROSS,dT.parser.yy.LINETYPE.DOTTED_CROSS,dT.parser.yy.LINETYPE.SOLID_POINT,dT.parser.yy.LINETYPE.DOTTED_POINT].includes(t.type)&&(p+=g)})),y.forEach((function(t){return function(t,e,n){var r=e.startx,i=e.stopx,a=e.starty,o=e.message,s=e.type,c=e.sequenceIndex,u=e.sequenceVisible,l=db.calculateTextDimensions(o,pC(fC)),h=lC();h.x=r,h.y=a+10,h.width=i-r,h.class="messageText",h.dy="1em",h.text=o,h.fontFamily=fC.messageFontFamily,h.fontSize=fC.messageFontSize,h.fontWeight=fC.messageFontWeight,h.anchor=fC.messageAlign,h.valign=fC.messageAlign,h.textMargin=fC.wrapPadding,h.tspan=!1,zT(t,h);var f,d=l.width;r===i?f=fC.rightAngles?t.append("path").attr("d","M ".concat(r,",").concat(n," H ").concat(r+Math.max(fC.width/2,d/2)," V ").concat(n+25," H ").concat(r)):t.append("path").attr("d","M "+r+","+n+" C "+(r+60)+","+(n-10)+" "+(r+60)+","+(n+30)+" "+r+","+(n+20)):((f=t.append("line")).attr("x1",r),f.attr("y1",n),f.attr("x2",i),f.attr("y2",n)),s===dT.parser.yy.LINETYPE.DOTTED||s===dT.parser.yy.LINETYPE.DOTTED_CROSS||s===dT.parser.yy.LINETYPE.DOTTED_POINT||s===dT.parser.yy.LINETYPE.DOTTED_OPEN?(f.style("stroke-dasharray","3, 3"),f.attr("class","messageLine1")):f.attr("class","messageLine0");var p="";fC.arrowMarkerAbsolute&&(p=(p=(p=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),f.attr("stroke-width",2),f.attr("stroke","none"),f.style("fill","none"),s!==dT.parser.yy.LINETYPE.SOLID&&s!==dT.parser.yy.LINETYPE.DOTTED||f.attr("marker-end","url("+p+"#arrowhead)"),s!==dT.parser.yy.LINETYPE.SOLID_POINT&&s!==dT.parser.yy.LINETYPE.DOTTED_POINT||f.attr("marker-end","url("+p+"#filled-head)"),s!==dT.parser.yy.LINETYPE.SOLID_CROSS&&s!==dT.parser.yy.LINETYPE.DOTTED_CROSS||f.attr("marker-end","url("+p+"#crosshead)"),(u||fC.showSequenceNumbers)&&(f.attr("marker-start","url("+p+"#sequencenumber)"),t.append("text").attr("x",r).attr("y",n+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("textLength","16px").attr("class","sequenceNumber").text(c))}(s,t.messageModel,t.lineStarty)})),fC.mirrorActors&&(dC.bumpVerticalPos(2*fC.boxMargin),mC(s,c,u,dC.getVerticalPos(),fC,l),dC.bumpVerticalPos(fC.boxMargin),HT(s,dC.getVerticalPos()));var m=vC(s,c,u,a),v=dC.getBounds().bounds;o.debug("For line height fix Querying: #"+e+" .actor-line"),ou("#"+e+" .actor-line").attr("y2",v.stopy);var b=v.stopy-v.starty;b<m.maxHeight&&(b=m.maxHeight);var _=b+2*fC.diagramMarginY;fC.mirrorActors&&(_=_-fC.boxMargin+fC.bottomMarginAdj);var x=v.stopx-v.startx;x<m.maxWidth&&(x=m.maxWidth);var w=x+2*fC.diagramMarginX;h&&s.append("text").text(h).attr("x",(v.stopx-v.startx)/2-2*fC.diagramMarginX).attr("y",-25),lb(s,_,w,fC.useMaxWidth);var k=h?40:0;s.attr("viewBox",v.startx-fC.diagramMarginX+" -"+(fC.diagramMarginY+k)+" "+w+" "+(_+k)),f_(dT.parser.yy,s,e),o.debug("models:",dC.models)}};var CC=n(3584),EC=n.n(CC);function SC(t){return SC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},SC(t)}var AC=function(t){return JSON.parse(JSON.stringify(t))},MC=[],NC=function t(e,n,r){if("relation"===n.stmt)t(e,n.state1,!0),t(e,n.state2,!1);else if("state"===n.stmt&&"[*]"===n.id&&(n.id=r?e.id+"_start":e.id+"_end",n.start=r),n.doc){var i=[],a=0,o=[];for(a=0;a<n.doc.length;a++)if("divider"===n.doc[a].type){var s=AC(n.doc[a]);s.doc=AC(o),i.push(s),o=[]}else o.push(n.doc[a]);if(i.length>0&&o.length>0){var c={stmt:"state",id:eb(),type:"divider",doc:AC(o)};i.push(AC(c)),n.doc=i}n.doc.forEach((function(e){return t(n,e,!0)}))}},DC={root:{relations:[],states:{},documents:{}}},BC=DC.root,LC=0,OC=function(t,e,n,r,i){void 0===BC.states[t]?BC.states[t]={id:t,descriptions:[],type:e,doc:n,note:i}:(BC.states[t].doc||(BC.states[t].doc=n),BC.states[t].type||(BC.states[t].type=e)),r&&(o.info("Adding state ",t,r),"string"==typeof r&&FC(t,r.trim()),"object"===SC(r)&&r.forEach((function(e){return FC(t,e.trim())}))),i&&(BC.states[t].note=i,BC.states[t].note.text=$m.sanitizeText(BC.states[t].note.text,wb()))},IC=function(){BC=(DC={root:{relations:[],states:{},documents:{}}}).root,BC=DC.root,LC=0,YC=[],Mb()},RC=function(t,e,n){var r=t,i=e,a="default",o="default";"[*]"===t&&(r="start"+ ++LC,a="start"),"[*]"===e&&(i="end"+LC,o="end"),OC(r,a),OC(i,o),BC.relations.push({id1:r,id2:i,title:$m.sanitizeText(n,wb())})},FC=function(t,e){var n=BC.states[t],r=e;":"===r[0]&&(r=r.substr(1).trim()),n.descriptions.push($m.sanitizeText(r,wb()))},PC=0,YC=[],jC="TB";const UC={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().state},addState:OC,clear:IC,getState:function(t){return BC.states[t]},getStates:function(){return BC.states},getRelations:function(){return BC.relations},getClasses:function(){return YC},getDirection:function(){return jC},addRelation:RC,getDividerId:function(){return"divider-id-"+ ++PC},setDirection:function(t){jC=t},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:function(){o.info("Documents = ",DC)},getRootDoc:function(){return MC},setRootDoc:function(t){o.info("Setting root doc",t),MC=t},getRootDocV2:function(){return NC({id:"root"},{id:"root",doc:MC},!0),{id:"root",doc:MC}},extract:function(t){var e;e=t.doc?t.doc:t,o.info(e),IC(),o.info("Extract",e),e.forEach((function(t){"state"===t.stmt&&OC(t.id,t.type,t.doc,t.description,t.note),"relation"===t.stmt&&RC(t.state1.id,t.state2.id,t.description)}))},trimColon:function(t){return t&&":"===t[0]?t.substr(1).trim():t.trim()},getTitle:Db,setTitle:Nb,getAccDescription:Lb,setAccDescription:Bb};var zC={};function $C(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var qC,HC=function(t,e,n){var r,i=wb().state.padding,a=2*wb().state.padding,o=t.node().getBBox(),s=o.width,c=o.x,u=t.append("text").attr("x",0).attr("y",wb().state.titleShift).attr("font-size",wb().state.fontSize).attr("class","state-title").text(e.id),l=u.node().getBBox().width+a,h=Math.max(l,s);h===s&&(h+=a);var f=t.node().getBBox();e.doc,r=c-i,l>s&&(r=(s-h)/2+i),Math.abs(c-f.x)<i&&l>s&&(r=c-(l-s)/2);var d=1-wb().state.textHeight;return t.insert("rect",":first-child").attr("x",r).attr("y",d).attr("class",n?"alt-composit":"composit").attr("width",h).attr("height",f.height+wb().state.textHeight+wb().state.titleShift+1).attr("rx","0"),u.attr("x",r+i),l<=s&&u.attr("x",c+(h-a)/2-l/2+i),t.insert("rect",":first-child").attr("x",r).attr("y",wb().state.titleShift-wb().state.textHeight-wb().state.padding).attr("width",h).attr("height",3*wb().state.textHeight).attr("rx",wb().state.radius),t.insert("rect",":first-child").attr("x",r).attr("y",wb().state.titleShift-wb().state.textHeight-wb().state.padding).attr("width",h).attr("height",f.height+3+2*wb().state.textHeight).attr("rx",wb().state.radius),t},WC=function(t,e){e.attr("class","state-note");var n=e.append("rect").attr("x",0).attr("y",wb().state.padding),r=function(t,e,n,r){var i=0,a=r.append("text");a.style("text-anchor","start"),a.attr("class","noteText");var o,s=t.replace(/\r\n/g,"<br/>"),c=(s=s.replace(/\n/g,"<br/>")).split($m.lineBreakRegex),u=1.25*wb().state.noteMargin,l=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return $C(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$C(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}(c);try{for(l.s();!(o=l.n()).done;){var h=o.value.trim();if(h.length>0){var f=a.append("tspan");f.text(h),0===u&&(u+=f.node().getBBox().height),i+=u,f.attr("x",0+wb().state.noteMargin),f.attr("y",0+i+1.25*wb().state.noteMargin)}}}catch(t){l.e(t)}finally{l.f()}return{textWidth:a.node().getBBox().width,textHeight:i}}(t,0,0,e.append("g")),i=r.textWidth,a=r.textHeight;return n.attr("height",a+2*wb().state.noteMargin),n.attr("width",i+2*wb().state.noteMargin),n},VC=function(t,e){var n=e.id,r={id:n,label:e.id,width:0,height:0},i=t.append("g").attr("id",n).attr("class","stateGroup");"start"===e.type&&function(t){t.append("circle").attr("class","start-state").attr("r",wb().state.sizeUnit).attr("cx",wb().state.padding+wb().state.sizeUnit).attr("cy",wb().state.padding+wb().state.sizeUnit)}(i),"end"===e.type&&function(t){t.append("circle").attr("class","end-state-outer").attr("r",wb().state.sizeUnit+wb().state.miniPadding).attr("cx",wb().state.padding+wb().state.sizeUnit+wb().state.miniPadding).attr("cy",wb().state.padding+wb().state.sizeUnit+wb().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",wb().state.sizeUnit).attr("cx",wb().state.padding+wb().state.sizeUnit+2).attr("cy",wb().state.padding+wb().state.sizeUnit+2)}(i),"fork"!==e.type&&"join"!==e.type||function(t,e){var n=wb().state.forkWidth,r=wb().state.forkHeight;if(e.parentId){var i=n;n=r,r=i}t.append("rect").style("stroke","black").style("fill","black").attr("width",n).attr("height",r).attr("x",wb().state.padding).attr("y",wb().state.padding)}(i,e),"note"===e.type&&WC(e.note.text,i),"divider"===e.type&&function(t){t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",wb().state.textHeight).attr("class","divider").attr("x2",2*wb().state.textHeight).attr("y1",0).attr("y2",0)}(i),"default"===e.type&&0===e.descriptions.length&&function(t,e){var n=t.append("text").attr("x",2*wb().state.padding).attr("y",wb().state.textHeight+2*wb().state.padding).attr("font-size",wb().state.fontSize).attr("class","state-title").text(e.id).node().getBBox();t.insert("rect",":first-child").attr("x",wb().state.padding).attr("y",wb().state.padding).attr("width",n.width+2*wb().state.padding).attr("height",n.height+2*wb().state.padding).attr("rx",wb().state.radius)}(i,e),"default"===e.type&&e.descriptions.length>0&&function(t,e){var n=t.append("text").attr("x",2*wb().state.padding).attr("y",wb().state.textHeight+1.3*wb().state.padding).attr("font-size",wb().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),r=n.height,i=t.append("text").attr("x",wb().state.padding).attr("y",r+.4*wb().state.padding+wb().state.dividerMargin+wb().state.textHeight).attr("class","state-description"),a=!0,o=!0;e.descriptions.forEach((function(t){a||(function(t,e,n){var r=t.append("tspan").attr("x",2*wb().state.padding).text(e);n||r.attr("dy",wb().state.textHeight)}(i,t,o),o=!1),a=!1}));var s=t.append("line").attr("x1",wb().state.padding).attr("y1",wb().state.padding+r+wb().state.dividerMargin/2).attr("y2",wb().state.padding+r+wb().state.dividerMargin/2).attr("class","descr-divider"),c=i.node().getBBox(),u=Math.max(c.width,n.width);s.attr("x2",u+3*wb().state.padding),t.insert("rect",":first-child").attr("x",wb().state.padding).attr("y",wb().state.padding).attr("width",u+2*wb().state.padding).attr("height",c.height+r+2*wb().state.padding).attr("rx",wb().state.radius)}(i,e);var a,o=i.node().getBBox();return r.width=o.width+2*wb().state.padding,r.height=o.height+2*wb().state.padding,a=r,zC[n]=a,r},GC=0;CC.parser.yy=UC;var XC={},ZC=function t(e,n,r,i,a,s){var c,u=new(t_().Graph)({compound:!0,multigraph:!0}),l=!0;for(c=0;c<e.length;c++)if("relation"===e[c].stmt){l=!1;break}r?u.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:l?1:qC.edgeLengthFactor,nodeSep:l?1:50,isMultiGraph:!0}):u.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:l?1:qC.edgeLengthFactor,nodeSep:l?1:50,ranker:"tight-tree",isMultiGraph:!0}),u.setDefaultEdgeLabel((function(){return{}})),UC.extract(e);for(var h=UC.getStates(),f=UC.getRelations(),d=Object.keys(h),p=0;p<d.length;p++){var g=h[d[p]];r&&(g.parentId=r);var y=void 0;if(g.doc){var m=n.append("g").attr("id",g.id).attr("class","stateGroup");y=t(g.doc,m,g.id,!i,a,s);var v=(m=HC(m,g,i)).node().getBBox();y.width=v.width,y.height=v.height+qC.padding/2,XC[g.id]={y:qC.compositTitleSize}}else y=VC(n,g);if(g.note){var b={descriptions:[],id:g.id+"-note",note:g.note,type:"note"},_=VC(n,b);"left of"===g.note.position?(u.setNode(y.id+"-note",_),u.setNode(y.id,y)):(u.setNode(y.id,y),u.setNode(y.id+"-note",_)),u.setParent(y.id,y.id+"-group"),u.setParent(y.id+"-note",y.id+"-group")}else u.setNode(y.id,y)}o.debug("Count=",u.nodeCount(),u);var x=0;f.forEach((function(t){var e;x++,o.debug("Setting edge",t),u.setEdge(t.id1,t.id2,{relation:t,width:(e=t.title,e?e.length*qC.fontSizeFactor:1),height:qC.labelHeight*$m.getRows(t.title).length,labelpos:"c"},"id"+x)})),Kb().layout(u),o.debug("Graph after layout",u.nodes());var w=n.node();u.nodes().forEach((function(t){void 0!==t&&void 0!==u.node(t)?(o.warn("Node "+t+": "+JSON.stringify(u.node(t))),a.select("#"+w.id+" #"+t).attr("transform","translate("+(u.node(t).x-u.node(t).width/2)+","+(u.node(t).y+(XC[t]?XC[t].y:0)-u.node(t).height/2)+" )"),a.select("#"+w.id+" #"+t).attr("data-x-shift",u.node(t).x-u.node(t).width/2),s.querySelectorAll("#"+w.id+" #"+t+" .divider").forEach((function(t){var e=t.parentElement,n=0,r=0;e&&(e.parentElement&&(n=e.parentElement.getBBox().width),r=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(r)&&(r=0)),t.setAttribute("x1",0-r+8),t.setAttribute("x2",n-r-8)}))):o.debug("No Node "+t+": "+JSON.stringify(u.node(t)))}));var k=w.getBBox();u.edges().forEach((function(t){void 0!==t&&void 0!==u.edge(t)&&(o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(u.edge(t))),function(t,e,n){e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var r=e.points,i=Uu().x((function(t){return t.x})).y((function(t){return t.y})).curve(Vu),a=t.append("path").attr("d",i(r)).attr("id","edge"+GC).attr("class","transition"),s="";if(wb().state.arrowMarkerAbsolute&&(s=(s=(s=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),a.attr("marker-end","url("+s+"#"+function(t){switch(t){case UC.relationType.AGGREGATION:return"aggregation";case UC.relationType.EXTENSION:return"extension";case UC.relationType.COMPOSITION:return"composition";case UC.relationType.DEPENDENCY:return"dependency"}}(UC.relationType.DEPENDENCY)+"End)"),void 0!==n.title){for(var c=t.append("g").attr("class","stateLabel"),u=db.calcLabelPosition(e.points),l=u.x,h=u.y,f=$m.getRows(n.title),d=0,p=[],g=0,y=0,m=0;m<=f.length;m++){var v=c.append("text").attr("text-anchor","middle").text(f[m]).attr("x",l).attr("y",h+d),b=v.node().getBBox();if(g=Math.max(g,b.width),y=Math.min(y,b.x),o.info(b.x,l,h+d),0===d){var _=v.node().getBBox();d=_.height,o.info("Title height",d,h)}p.push(v)}var x=d*f.length;if(f.length>1){var w=(f.length-1)*d*.5;p.forEach((function(t,e){return t.attr("y",h+e*d-w)})),x=d*f.length}var k=c.node().getBBox();c.insert("rect",":first-child").attr("class","box").attr("x",l-g/2-wb().state.padding/2).attr("y",h-x/2-wb().state.padding/2-3.5).attr("width",g+wb().state.padding).attr("height",x+wb().state.padding),o.info(k)}GC++}(n,u.edge(t),u.edge(t).relation))})),k=w.getBBox();var T={id:r||"root",label:r||"root",width:0,height:0};return T.width=k.width+2*qC.padding,T.height=k.height+2*qC.padding,o.debug("Doc rendered",T,u),T};const QC=function(t,e){qC=wb().state;var n,r=wb().securityLevel;"sandbox"===r&&(n=au("#i"+e));var i=au("sandbox"===r?n.nodes()[0].contentDocument.body:"body"),a="sandbox"===r?n.nodes()[0].contentDocument:document;CC.parser.yy.clear(),CC.parser.parse(t),o.debug("Rendering diagram "+t);var s=i.select("[id='".concat(e,"']"));s.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z"),new(t_().Graph)({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}}));var c=UC.getRootDoc();ZC(c,s,void 0,!1,i,a);var u=qC.padding,l=s.node().getBBox(),h=l.width+2*u,f=l.height+2*u;lb(s,f,1.75*h,qC.useMaxWidth),s.attr("viewBox","".concat(l.x-qC.padding," ").concat(l.y-qC.padding," ")+h+" "+f),f_(CC.parser.yy,s,e)};var KC={},JC={},tE=function(t,e,n,r){if("root"!==n.id){var i="rect";!0===n.start&&(i="start"),!1===n.start&&(i="end"),"default"!==n.type&&(i=n.type),JC[n.id]||(JC[n.id]={id:n.id,shape:i,description:$m.sanitizeText(n.id,wb()),classes:"statediagram-state"}),n.description&&(Array.isArray(JC[n.id].description)?(JC[n.id].shape="rectWithTitle",JC[n.id].description.push(n.description)):JC[n.id].description.length>0?(JC[n.id].shape="rectWithTitle",JC[n.id].description===n.id?JC[n.id].description=[n.description]:JC[n.id].description=[JC[n.id].description,n.description]):(JC[n.id].shape="rect",JC[n.id].description=n.description),JC[n.id].description=$m.sanitizeTextOrArray(JC[n.id].description,wb())),1===JC[n.id].description.length&&"rectWithTitle"===JC[n.id].shape&&(JC[n.id].shape="rect"),!JC[n.id].type&&n.doc&&(o.info("Setting cluster for ",n.id,rE(n)),JC[n.id].type="group",JC[n.id].dir=rE(n),JC[n.id].shape="divider"===n.type?"divider":"roundedWithTitle",JC[n.id].classes=JC[n.id].classes+" "+(r?"statediagram-cluster statediagram-cluster-alt":"statediagram-cluster"));var a={labelStyle:"",shape:JC[n.id].shape,labelText:JC[n.id].description,classes:JC[n.id].classes,style:"",id:n.id,dir:JC[n.id].dir,domId:"state-"+n.id+"-"+eE,type:JC[n.id].type,padding:15};if(n.note){var s={labelStyle:"",shape:"note",labelText:n.note.text,classes:"statediagram-note",style:"",id:n.id+"----note-"+eE,domId:"state-"+n.id+"----note-"+eE,type:JC[n.id].type,padding:15},c={labelStyle:"",shape:"noteGroup",labelText:n.note.text,classes:JC[n.id].classes,style:"",id:n.id+"----parent",domId:"state-"+n.id+"----parent-"+eE,type:"group",padding:0};eE++,t.setNode(n.id+"----parent",c),t.setNode(s.id,s),t.setNode(n.id,a),t.setParent(n.id,n.id+"----parent"),t.setParent(s.id,n.id+"----parent");var u=n.id,l=s.id;"left of"===n.note.position&&(u=s.id,l=n.id),t.setEdge(u,l,{arrowhead:"none",arrowType:"",style:"fill:none",labelStyle:"",classes:"transition note-edge",arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal"})}else t.setNode(n.id,a)}e&&"root"!==e.id&&(o.trace("Setting node ",n.id," to be child of its parent ",e.id),t.setParent(n.id,e.id)),n.doc&&(o.trace("Adding nodes children "),nE(t,n,n.doc,!r))},eE=0,nE=function(t,e,n,r){o.trace("items",n),n.forEach((function(n){if("state"===n.stmt||"default"===n.stmt)tE(t,e,n,r);else if("relation"===n.stmt){tE(t,e,n.state1,r),tE(t,e,n.state2,r);var i={id:"edge"+eE,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:"fill:none",labelStyle:"",label:$m.sanitizeText(n.description,wb()),arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal",classes:"transition"},a=n.state1.id,o=n.state2.id;t.setEdge(a,o,i,eE),eE++}}))},rE=function(t,e){var n=e||"TB";if(t.doc)for(var r=0;r<t.doc.length;r++){var i=t.doc[r];"dir"===i.stmt&&(n=i.value)}return n};const iE=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)KC[e[n]]=t[e[n]]};function aE(t){return function(t){if(Array.isArray(t))return oE(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return oE(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oE(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oE(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var sE="",cE=[],uE=[],lE=[],hE=function(){for(var t=!0,e=0;e<lE.length;e++)lE[e].processed,t=t&&lE[e].processed;return t};const fE={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().journey},clear:function(){cE.length=0,uE.length=0,sE="",lE.length=0,Mb()},setTitle:Nb,getTitle:Db,setAccDescription:Bb,getAccDescription:Lb,addSection:function(t){sE=t,cE.push(t)},getSections:function(){return cE},getTasks:function(){for(var t=hE(),e=0;!t&&e<100;)t=hE(),e++;return uE.push.apply(uE,lE),uE},addTask:function(t,e){var n=e.substr(1).split(":"),r=0,i=[];1===n.length?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(","));var a=i.map((function(t){return t.trim()})),o={section:sE,type:sE,people:a,task:t,score:r};lE.push(o)},addTaskOrg:function(t){var e={section:sE,type:sE,description:t,task:t,classes:[]};uE.push(e)},getActors:function(){return t=[],uE.forEach((function(e){e.people&&t.push.apply(t,aE(e.people))})),aE(new Set(t)).sort();var t}};var dE=n(9763),pE=n.n(dE),gE=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},yE=function(t,e){var n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},mE=-1,vE=function(){function t(t,e,n,i,a,o,s,c){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("font-color",c).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c,u){for(var l=c.taskFontSize,h=c.taskFontFamily,f=t.split(/<br\s*\/?>/gi),d=0;d<f.length;d++){var p=d*l-l*(f.length-1)/2,g=e.append("text").attr("x",n+a/2).attr("y",i).attr("fill",u).style("text-anchor","middle").style("font-size",l).style("font-family",h);g.append("tspan").attr("x",n+a/2).attr("dy",p).text(f[d]),g.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(g,s)}}function n(t,n,i,a,o,s,c,u){var l=n.append("switch"),h=l.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,i,a,o,s,c,u),r(h,c)}function r(t,e){for(var n in e)n in e&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}();const bE=yE,_E=function(t,e,n){var r=t.append("g"),i={x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0};i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,gE(r,i),vE(n)(e.text,r,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},n,e.colour)},xE=function(t,e){var n=e.text.replace(/<br\s*\/?>/gi," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(n),r},wE=function(t,e,n){var r,i,a,o=e.x+n.width/2,s=t.append("g");mE++,s.append("line").attr("id","task"+mE).attr("x1",o).attr("y1",e.y).attr("x2",o).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),r=s,i={cx:o,cy:300+30*(5-e.score),score:e.score},r.append("circle").attr("cx",i.cx).attr("cy",i.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),(a=r.append("g")).append("circle").attr("cx",i.cx-5).attr("cy",i.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),a.append("circle").attr("cx",i.cx+5).attr("cy",i.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.score>3?function(t){var e=Iu().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+i.cx+","+(i.cy+2)+")")}(a):i.score<3?function(t){var e=Iu().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+i.cx+","+(i.cy+7)+")")}(a):function(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",i.cx-5).attr("y1",i.cy+7).attr("x2",i.cx+5).attr("y2",i.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}(a);var c={x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0};c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=n.width,c.height=n.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,gE(s,c);var u=e.x+14;e.people.forEach((function(t){var n=e.actors[t].color,r={cx:u,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};yE(s,r),u+=10})),vE(n)(e.task,s,c.x,c.y,c.width,c.height,{class:"task"},n,e.colour)};dE.parser.yy=fE;var kE={},TE=wb().journey,CE=wb().journey.leftMargin,EE={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i=wb().journey,a=this,o=0;this.sequenceItems.forEach((function(s){o++;var c=a.sequenceItems.length-o+1;a.updateVal(s,"starty",e-c*i.boxMargin,Math.min),a.updateVal(s,"stopy",r+c*i.boxMargin,Math.max),a.updateVal(EE.data,"startx",t-c*i.boxMargin,Math.min),a.updateVal(EE.data,"stopx",n+c*i.boxMargin,Math.max),a.updateVal(s,"startx",t-c*i.boxMargin,Math.min),a.updateVal(s,"stopx",n+c*i.boxMargin,Math.max),a.updateVal(EE.data,"starty",e-c*i.boxMargin,Math.min),a.updateVal(EE.data,"stopy",r+c*i.boxMargin,Math.max)}))},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(EE.data,"startx",i,Math.min),this.updateVal(EE.data,"starty",o,Math.min),this.updateVal(EE.data,"stopx",a,Math.max),this.updateVal(EE.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},SE=TE.sectionFills,AE=TE.sectionColours;const ME=function(t){Object.keys(t).forEach((function(e){TE[e]=t[e]}))},NE=function(t,e){var n=wb().journey;dE.parser.yy.clear(),dE.parser.parse(t+"\n");var r,i=wb().securityLevel;"sandbox"===i&&(r=au("#i"+e));var a=au("sandbox"===i?r.nodes()[0].contentDocument.body:"body");"sandbox"===i?r.nodes()[0].contentDocument:document,EE.init();var o=a.select("#"+e);o.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),o.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z");var s=dE.parser.yy.getTasks(),c=dE.parser.yy.getTitle(),u=dE.parser.yy.getActors();for(var l in kE)delete kE[l];var h=0;u.forEach((function(t){kE[t]={color:n.actorColours[h%n.actorColours.length],position:h},h++})),function(t){var e=wb().journey,n=60;Object.keys(kE).forEach((function(r){var i=kE[r].color,a={cx:20,cy:n,r:7,fill:i,stroke:"#000",pos:kE[r].position};bE(t,a);var o={x:40,y:n+7,fill:"#666",text:r,textMargin:5|e.boxTextMargin};xE(t,o),n+=20}))}(o),EE.insert(0,0,CE,50*Object.keys(kE).length),function(t,e,n){for(var r=wb().journey,i="",a=n+(2*r.height+r.diagramMarginY),o=0,s="#CCC",c="black",u=0,l=0;l<e.length;l++){var h=e[l];if(i!==h.section){s=SE[o%SE.length],u=o%SE.length,c=AE[o%AE.length];var f={x:l*r.taskMargin+l*r.width+CE,y:50,text:h.section,fill:s,num:u,colour:c};_E(t,f,r),i=h.section,o++}var d=h.people.reduce((function(t,e){return kE[e]&&(t[e]=kE[e]),t}),{});h.x=l*r.taskMargin+l*r.width+CE,h.y=a,h.width=r.diagramMarginX,h.height=r.diagramMarginY,h.colour=c,h.fill=s,h.num=u,h.actors=d,wE(t,h,r),EE.insert(h.x,h.y,h.x+h.width+r.taskMargin,450)}}(o,s,0);var f=EE.getBounds();c&&o.append("text").text(c).attr("x",CE).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);var d=f.stopy-f.starty+2*n.diagramMarginY,p=CE+f.stopx+2*n.diagramMarginX;lb(o,d,p,n.useMaxWidth),o.append("line").attr("x1",CE).attr("y1",4*n.height).attr("x2",p-CE-4).attr("y2",4*n.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");var g=c?70:0;o.attr("viewBox","".concat(f.startx," -25 ").concat(p," ").concat(d+g)),o.attr("preserveAspectRatio","xMinYMin meet"),o.attr("height",d+g+25),f_(dE.parser.yy,o,e)};var DE={};const BE=function(t){return"g.classGroup text {\n fill: ".concat(t.nodeBorder,";\n fill: ").concat(t.classText,";\n stroke: none;\n font-family: ").concat(t.fontFamily,";\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ").concat(t.classText,";\n}\n.edgeLabel .label rect {\n fill: ").concat(t.mainBkg,";\n}\n.label text {\n fill: ").concat(t.classText,";\n}\n.edgeLabel .label span {\n background: ").concat(t.mainBkg,";\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ").concat(t.nodeBorder,";\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.classGroup line {\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ").concat(t.nodeBorder,";\n font-size: 10px;\n}\n\n.relation {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n#compositionStart, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n")},LE=function(t){return".label {\n font-family: ".concat(t.fontFamily,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n .cluster-label text {\n fill: ").concat(t.titleColor,";\n }\n .cluster-label span {\n color: ").concat(t.titleColor,";\n }\n\n .label text,span {\n fill: ").concat(t.nodeTextColor||t.textColor,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n background-color: ").concat(t.edgeLabelBackground,";\n fill: ").concat(t.edgeLabelBackground,";\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ").concat(t.clusterBkg,";\n stroke: ").concat(t.clusterBorder,";\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n .cluster span {\n color: ").concat(t.titleColor,";\n }\n /* .cluster div {\n color: ").concat(t.titleColor,";\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ").concat(t.fontFamily,";\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n")},OE=function(t){return"\ndefs #statediagram-barbEnd {\n fill: ".concat(t.transitionColor,";\n stroke: ").concat(t.transitionColor,";\n }\ng.stateGroup text {\n fill: ").concat(t.nodeBorder,";\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ").concat(t.textColor,";\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ").concat(t.stateLabelColor,";\n}\n\ng.stateGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.stateGroup line {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n\n.transition {\n stroke: ").concat(t.transitionColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ").concat(t.background,";\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n\n text {\n fill: ").concat(t.noteTextColor,";\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ").concat(t.labelBackgroundColor,";\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ").concat(t.transitionLabelColor||t.tertiaryTextColor,";\n}\n.label div .edgeLabel {\n color: ").concat(t.transitionLabelColor||t.tertiaryTextColor,";\n}\n\n.stateLabel text {\n fill: ").concat(t.stateLabelColor,";\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ").concat(t.specialStateColor,";\n stroke: ").concat(t.specialStateColor,";\n}\n\n.node .fork-join {\n fill: ").concat(t.specialStateColor,";\n stroke: ").concat(t.specialStateColor,";\n}\n\n.node circle.state-end {\n fill: ").concat(t.innerEndBackground,";\n stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ").concat(t.compositeBackground||t.background,";\n // stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ").concat(t.stateBkg||t.mainBkg,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n stroke-width: 1px;\n}\n.node polygon {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ").concat(t.lineColor,";\n}\n\n.statediagram-cluster rect {\n fill: ").concat(t.compositeTitleBackground,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ").concat(t.stateLabelColor,";\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ").concat(t.compositeBackground||t.background,";\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ").concat(t.altBackground?t.altBackground:"#efefef",";\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ").concat(t.altBackground?t.altBackground:"#efefef",";\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ").concat(t.noteTextColor,";\n}\n\n.statediagram-note .nodeLabel {\n color: ").concat(t.noteTextColor,";\n}\n.statediagram .edgeLabel {\n color: red; // ").concat(t.noteTextColor,";\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ").concat(t.lineColor,";\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n")};var IE={flowchart:LE,"flowchart-v2":LE,sequence:function(t){return".actor {\n stroke: ".concat(t.actorBorder,";\n fill: ").concat(t.actorBkg,";\n }\n\n text.actor > tspan {\n fill: ").concat(t.actorTextColor,";\n stroke: none;\n }\n\n .actor-line {\n stroke: ").concat(t.actorLineColor,";\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ").concat(t.signalColor,";\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.signalColor,";\n }\n\n #arrowhead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .sequenceNumber {\n fill: ").concat(t.sequenceNumberColor,";\n }\n\n #sequencenumber {\n fill: ").concat(t.signalColor,";\n }\n\n #crosshead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .messageText {\n fill: ").concat(t.signalTextColor,";\n stroke: ").concat(t.signalTextColor,";\n }\n\n .labelBox {\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBkgColor,";\n }\n\n .labelText, .labelText > tspan {\n fill: ").concat(t.labelTextColor,";\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ").concat(t.loopTextColor,";\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBorderColor,";\n }\n\n .note {\n //stroke: #decc93;\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n }\n\n .noteText, .noteText > tspan {\n fill: ").concat(t.noteTextColor,";\n stroke: none;\n }\n\n .activation0 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation1 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation2 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ").concat(t.actorBkg,";\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ").concat(t.actorBorder,";\n fill: ").concat(t.actorBkg,";\n }\n .actor-man circle, line {\n stroke: ").concat(t.actorBorder,";\n fill: ").concat(t.actorBkg,";\n stroke-width: 2px;\n }\n")},gantt:function(t){return'\n .mermaid-main-font {\n font-family: "trebuchet ms", verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n .exclude-range {\n fill: '.concat(t.excludeBkgColor,";\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ").concat(t.sectionBkgColor,";\n }\n\n .section2 {\n fill: ").concat(t.sectionBkgColor2,";\n }\n\n .section1,\n .section3 {\n fill: ").concat(t.altSectionBkgColor,";\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle1 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle2 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle3 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle {\n text-anchor: start;\n // font-size: ").concat(t.ganttFontSize,";\n // text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ").concat(t.gridColor,";\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.textColor,";\n }\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ").concat(t.todayLineColor,";\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n // .taskText:not([font-size]) {\n // font-size: ").concat(t.ganttFontSize,";\n // }\n\n .taskTextOutsideRight {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: start;\n // font-size: ").concat(t.ganttFontSize,";\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: end;\n // font-size: ").concat(t.ganttFontSize,";\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ").concat(t.taskTextColor,";\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ").concat(t.taskBkgColor,";\n stroke: ").concat(t.taskBorderColor,";\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ").concat(t.activeTaskBkgColor,";\n stroke: ").concat(t.activeTaskBorderColor,";\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ").concat(t.doneTaskBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.critBkgColor,";\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.activeTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ").concat(t.textColor," ;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n")},classDiagram:BE,"classDiagram-v2":BE,class:BE,stateDiagram:OE,state:OE,gitGraph:function(t){return"\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ".concat([0,1,2,3,4,5,6,7].map((function(e){return"\n .branch-label".concat(e," { fill: ").concat(t["gitBranchLabel"+e],"; }\n .commit").concat(e," { stroke: ").concat(t["git"+e],"; fill: ").concat(t["git"+e],"; }\n .commit-highlight").concat(e," { stroke: ").concat(t["gitInv"+e],"; fill: ").concat(t["gitInv"+e],"; }\n .label").concat(e," { fill: ").concat(t["git"+e],"; }\n .arrow").concat(e," { stroke: ").concat(t["git"+e],"; }\n ")})).join("\n"),"\n\n .branch {\n stroke-width: 1;\n stroke: ").concat(t.lineColor,";\n stroke-dasharray: 2;\n }\n .commit-label { font-size: 10px; fill: ").concat(t.commitLabelColor,";}\n .commit-label-bkg { font-size: 10px; fill: ").concat(t.commitLabelBackground,"; opacity: 0.5; }\n .tag-label { font-size: 10px; fill: ").concat(t.tagLabelColor,";}\n .tag-label-bkg { fill: ").concat(t.tagLabelBackground,"; stroke: ").concat(t.tagLabelBorder,"; }\n .tag-hole { fill: ").concat(t.textColor,"; }\n\n .commit-merge {\n stroke: ").concat(t.primaryColor,";\n fill: ").concat(t.primaryColor,";\n }\n .commit-reverse {\n stroke: ").concat(t.primaryColor,";\n fill: ").concat(t.primaryColor,";\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ").concat(t.primaryColor,";\n fill: ").concat(t.primaryColor,";\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n }\n")},info:function(){return""},pie:function(t){return"\n .pieCircle{\n stroke: ".concat(t.pieStrokeColor,";\n stroke-width : ").concat(t.pieStrokeWidth,";\n opacity : ").concat(t.pieOpacity,";\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ").concat(t.pieTitleTextSize,";\n fill: ").concat(t.pieTitleTextColor,";\n font-family: ").concat(t.fontFamily,";\n }\n .slice {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.pieSectionTextColor,";\n font-size:").concat(t.pieSectionTextSize,";\n // fill: white;\n }\n .legend text {\n fill: ").concat(t.pieLegendTextColor,";\n font-family: ").concat(t.fontFamily,";\n font-size: ").concat(t.pieLegendTextSize,";\n }\n")},er:function(t){return"\n .entityBox {\n fill: ".concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n }\n\n .attributeBoxOdd {\n fill: #ffffff;\n stroke: ").concat(t.nodeBorder,";\n }\n\n .attributeBoxEven {\n fill: #f2f2f2;\n stroke: ").concat(t.nodeBorder,";\n }\n\n .relationshipLabelBox {\n fill: ").concat(t.tertiaryColor,";\n opacity: 0.7;\n background-color: ").concat(t.tertiaryColor,";\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ").concat(t.lineColor,";\n }\n")},journey:function(t){return".label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ".concat(t.textColor,";\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ").concat(t.textColor,"\n }\n\n .legend {\n fill: ").concat(t.textColor,";\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ").concat(t.textColor,"\n }\n\n .face {\n ").concat(t.faceColor?"fill: ".concat(t.faceColor):"fill: #FFF8DC",";\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType0):"",";\n }\n .task-type-1, .section-type-1 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType1):"",";\n }\n .task-type-2, .section-type-2 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType2):"",";\n }\n .task-type-3, .section-type-3 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType3):"",";\n }\n .task-type-4, .section-type-4 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType4):"",";\n }\n .task-type-5, .section-type-5 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType5):"",";\n }\n .task-type-6, .section-type-6 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType6):"",";\n }\n .task-type-7, .section-type-7 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType7):"",";\n }\n\n .actor-0 {\n ").concat(t.actor0?"fill: ".concat(t.actor0):"",";\n }\n .actor-1 {\n ").concat(t.actor1?"fill: ".concat(t.actor1):"",";\n }\n .actor-2 {\n ").concat(t.actor2?"fill: ".concat(t.actor2):"",";\n }\n .actor-3 {\n ").concat(t.actor3?"fill: ".concat(t.actor3):"",";\n }\n .actor-4 {\n ").concat(t.actor4?"fill: ".concat(t.actor4):"",";\n }\n .actor-5 {\n ").concat(t.actor5?"fill: ".concat(t.actor5):"",";\n }\n\n }\n")},requirement:function(t){return"\n\n marker {\n fill: ".concat(t.relationColor,";\n stroke: ").concat(t.relationColor,";\n }\n\n marker.cross {\n stroke: ").concat(t.lineColor,";\n }\n\n svg {\n font-family: ").concat(t.fontFamily,";\n font-size: ").concat(t.fontSize,";\n }\n\n .reqBox {\n fill: ").concat(t.requirementBackground,";\n fill-opacity: 100%;\n stroke: ").concat(t.requirementBorderColor,";\n stroke-width: ").concat(t.requirementBorderSize,";\n }\n \n .reqTitle, .reqLabel{\n fill: ").concat(t.requirementTextColor,";\n }\n .reqLabelBox {\n fill: ").concat(t.relationLabelBackground,";\n fill-opacity: 100%;\n }\n\n .req-title-line {\n stroke: ").concat(t.requirementBorderColor,";\n stroke-width: ").concat(t.requirementBorderSize,";\n }\n .relationshipLine {\n stroke: ").concat(t.relationColor,";\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ").concat(t.relationLabelColor,";\n }\n\n")}};function RE(t){return RE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},RE(t)}var FE=function(t){var e=t;return(e=(e=e.replace(/fl°°/g,(function(){return"&#"}))).replace(/fl°/g,(function(){return"&"}))).replace(/¶ß/g,(function(){return";"}))},PE={};function YE(t){var e;gw(t.flowchart),vw(t.flowchart),void 0!==t.sequenceDiagram&&TC.setConf(rb(t.sequence,t.sequenceDiagram)),TC.setConf(t.sequence),t.gantt,y_(t.class),t.state,iE(t.state),Yk(t.class),bx(t.er),ME(t.journey),hT(t.requirement),e=t.class,Object.keys(e).forEach((function(t){DE[t]=e[t]}))}var jE=Object.freeze({render:function(t,e,n,r){Cb();var i=e.replace(/\r\n?/g,"\n"),a=db.detectInit(i);a&&(hb(a),Tb(a));var s=wb();o.debug(s),e.length>s.maxTextSize&&(i="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");var c=au("body");if(void 0!==r){if("sandbox"===s.securityLevel){var u=au("body").append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");(c=au(u.nodes()[0].contentDocument.body)).node().style.margin=0}if(r.innerHTML="","sandbox"===s.securityLevel){var l=au(r).append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");(c=au(l.nodes()[0].contentDocument.body)).node().style.margin=0}else c=au(r);c.append("div").attr("id","d"+t).attr("style","font-family: "+s.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}else{var h,f=document.getElementById(t);if(f&&f.remove(),(h="sandbox"!==s.securityLevel?document.querySelector("#d"+t):document.querySelector("#i"+t))&&h.remove(),"sandbox"===s.securityLevel){var d=au("body").append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");(c=au(d.nodes()[0].contentDocument.body)).node().style.margin=0}else c=au("body");c.append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}i=i.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})).replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})).replace(/#\w+;/g,(function(t){var e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}));var p=c.select("#d"+t).node(),g=db.detectType(i,s),y=p.firstChild,m=y.firstChild,v="";if(void 0!==s.themeCSS&&(v+="\n".concat(s.themeCSS)),void 0!==s.fontFamily&&(v+="\n:root { --mermaid-font-family: ".concat(s.fontFamily,"}")),void 0!==s.altFontFamily&&(v+="\n:root { --mermaid-alt-font-family: ".concat(s.altFontFamily,"}")),"flowchart"===g||"flowchart-v2"===g||"graph"===g){var b=function(t){o.info("Extracting classes"),Gx.clear();try{var e=Zx().parser;return e.yy=Gx,e.parse(t),Gx.getClasses()}catch(t){return}}(i),_=s.htmlLabels||s.flowchart.htmlLabels;for(var x in b)_?(v+="\n.".concat(x," > * { ").concat(b[x].styles.join(" !important; ")," !important; }"),v+="\n.".concat(x," span { ").concat(b[x].styles.join(" !important; ")," !important; }")):(v+="\n.".concat(x," path { ").concat(b[x].styles.join(" !important; ")," !important; }"),v+="\n.".concat(x," rect { ").concat(b[x].styles.join(" !important; ")," !important; }"),v+="\n.".concat(x," polygon { ").concat(b[x].styles.join(" !important; ")," !important; }"),v+="\n.".concat(x," ellipse { ").concat(b[x].styles.join(" !important; ")," !important; }"),v+="\n.".concat(x," circle { ").concat(b[x].styles.join(" !important; ")," !important; }"),b[x].textStyles&&(v+="\n.".concat(x," tspan { ").concat(b[x].textStyles.join(" !important; ")," !important; }")))}var w=function(t,e){return am(Em("".concat(t,"{").concat(e,"}")),om)}("#".concat(t),function(t,e,n){return" {\n font-family: ".concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n fill: ").concat(n.textColor,"\n }\n\n /* Classes common for multiple diagrams */\n\n .error-icon {\n fill: ").concat(n.errorBkgColor,";\n }\n .error-text {\n fill: ").concat(n.errorTextColor,";\n stroke: ").concat(n.errorTextColor,";\n }\n\n .edge-thickness-normal {\n stroke-width: 2px;\n }\n .edge-thickness-thick {\n stroke-width: 3.5px\n }\n .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n .marker {\n fill: ").concat(n.lineColor,";\n stroke: ").concat(n.lineColor,";\n }\n .marker.cross {\n stroke: ").concat(n.lineColor,";\n }\n\n svg {\n font-family: ").concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n }\n\n ").concat(IE[t](n),"\n\n ").concat(e,"\n")}(g,v,s.themeVariables)),k=document.createElement("style");k.innerHTML="#".concat(t," ")+w,y.insertBefore(k,m);try{switch(g){case"gitGraph":Bk(i,t,!1);break;case"flowchart":s.flowchart.arrowMarkerAbsolute=s.arrowMarkerAbsolute,gw(s.flowchart),yw(i,t);break;case"flowchart-v2":s.flowchart.arrowMarkerAbsolute=s.arrowMarkerAbsolute,vw(s.flowchart),bw(i,t);break;case"sequence":s.sequence.arrowMarkerAbsolute=s.arrowMarkerAbsolute,s.sequenceDiagram?(TC.setConf(Object.assign(s.sequence,s.sequenceDiagram)),console.error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.")):TC.setConf(s.sequence),TC.draw(i,t);break;case"gantt":s.gantt.arrowMarkerAbsolute=s.arrowMarkerAbsolute,s.gantt,nk(i,t);break;case"class":s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,y_(s.class),m_(i,t);break;case"classDiagram":s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,function(t){Object.keys(t).forEach((function(e){ox[e]=t[e]}))}(s.class),function(t,e){o.info("Drawing class - ",e),Zb.clear(),e_.parser.parse(t);var n=wb().flowchart,r=wb().securityLevel;o.info("config:",n);var i,a=n.nodeSpacing||50,s=n.rankSpacing||50,c=new(t_().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:Zb.getDirection(),nodesep:a,ranksep:s,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),u=Zb.getClasses(),l=Zb.getRelations();o.info(l),function(t,e){var n=Object.keys(t);o.info("keys:",n),o.info(t),n.forEach((function(n){var r=t[n],i="";r.cssClasses.length>0&&(i=i+" "+r.cssClasses.join(" "));var a,s,c={labelStyle:""},u=void 0!==r.text?r.text:r.id;r.type,s="class_box",e.setNode(r.id,{labelStyle:c.labelStyle,shape:s,labelText:(a=u,$m.sanitizeText(a,wb())),classData:r,rx:0,ry:0,class:i,style:c.style,id:r.id,domId:r.domId,haveCallback:r.haveCallback,link:r.link,width:"group"===r.type?500:void 0,type:r.type,padding:wb().flowchart.padding}),o.info("setNode",{labelStyle:c.labelStyle,shape:s,labelText:u,rx:0,ry:0,class:i,style:c.style,id:r.id,width:"group"===r.type?500:void 0,type:r.type,padding:wb().flowchart.padding})}))}(u,c),function(t,e){var n=0;t.forEach((function(r){n++;var i={classes:"relation"};i.pattern=1==r.relation.lineType?"dashed":"solid",i.id="id"+n,"arrow_open"===r.type?i.arrowhead="none":i.arrowhead="normal",o.info(i,r),i.startLabelRight="none"===r.relationTitle1?"":r.relationTitle1,i.endLabelLeft="none"===r.relationTitle2?"":r.relationTitle2,i.arrowTypeStart=sx(r.relation.type1),i.arrowTypeEnd=sx(r.relation.type2);var a="",s="";if(void 0!==r.style){var c=Jv(r.style);a=c.style,s=c.labelStyle}else a="fill:none";i.style=a,i.labelStyle=s,void 0!==r.interpolate?i.curve=Qv(r.interpolate,Pu):void 0!==t.defaultInterpolate?i.curve=Qv(t.defaultInterpolate,Pu):i.curve=Qv(ox.curve,Pu),r.text=r.title,void 0===r.text?void 0!==r.style&&(i.arrowheadStyle="fill: #333"):(i.arrowheadStyle="fill: #333",i.labelpos="c",wb().flowchart.htmlLabels?(i.labelType="html",i.label='<span class="edgeLabel">'+r.text+"</span>"):(i.labelType="text",i.label=r.text.replace($m.lineBreakRegex,"\n"),void 0===r.style&&(i.style=i.style||"stroke: #333; stroke-width: 1.5px;fill:none"),i.labelStyle=i.labelStyle.replace("color:","fill:"))),e.setEdge(r.id1,r.id2,i,n)}))}(l,c),"sandbox"===r&&(i=au("#i"+e));var h=au("sandbox"===r?i.nodes()[0].contentDocument.body:"body"),f=h.select('[id="'.concat(e,'"]'));f.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var d=h.select("#"+e+" g");ax(d,c,["aggregation","extension","composition","dependency"],"classDiagram",e);var p=f.node().getBBox(),g=p.width+16,y=p.height+16;if(o.debug("new ViewBox 0 0 ".concat(g," ").concat(y),"translate(".concat(8-c._label.marginx,", ").concat(8-c._label.marginy,")")),lb(f,y,g,n.useMaxWidth),f.attr("viewBox","0 0 ".concat(g," ").concat(y)),f.select("g").attr("transform","translate(".concat(8-c._label.marginx,", ").concat(8-p.y,")")),!n.htmlLabels)for(var m="sandbox"===r?i.nodes()[0].contentDocument:document,v=m.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),b=0;b<v.length;b++){var _=v[b],x=_.getBBox(),w=m.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("rx",0),w.setAttribute("ry",0),w.setAttribute("width",x.width),w.setAttribute("height",x.height),_.insertBefore(w,_.firstChild)}f_(e_.parser.yy,f,e)}(i,t);break;case"state":s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,s.state,QC(i,t);break;case"stateDiagram":s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,iE(s.state),function(t,e){o.info("Drawing state diagram (v2)",e),UC.clear(),JC={};var n=EC().parser;n.yy=UC,n.parse(t);var r=UC.getDirection();void 0===r&&(r="LR");var i=wb().state,a=i.nodeSpacing||50,s=i.rankSpacing||50,c=wb().securityLevel;o.info(UC.getRootDocV2()),UC.extract(UC.getRootDocV2()),o.info(UC.getRootDocV2());var u,l=new(t_().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:rE(UC.getRootDocV2()),nodesep:a,ranksep:s,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));tE(l,void 0,UC.getRootDocV2(),!0),"sandbox"===c&&(u=au("#i"+e));var h=au("sandbox"===c?u.nodes()[0].contentDocument.body:"body"),f=("sandbox"===c?u.nodes()[0].contentDocument:document,h.select('[id="'.concat(e,'"]'))),d=h.select("#"+e+" g");ax(d,l,["barb"],"statediagram",e);var p=f.node().getBBox(),g=p.width+16,y=p.height+16;f.attr("class","statediagram");var m=f.node().getBBox();lb(f,y,1.75*g,i.useMaxWidth);var v="".concat(m.x-8," ").concat(m.y-8," ").concat(g," ").concat(y);o.debug("viewBox ".concat(v)),f.attr("viewBox",v);for(var b=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),_=0;_<b.length;_++){var x=b[_],w=x.getBBox(),k=document.createElementNS("http://www.w3.org/2000/svg","rect");k.setAttribute("rx",0),k.setAttribute("ry",0),k.setAttribute("width",w.width),k.setAttribute("height",w.height),x.insertBefore(k,x.firstChild)}f_(n.yy,f,e)}(i,t);break;case"info":s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,Yk(s.class),function(t,e,n){try{var r=Fk().parser;r.yy=Ik,o.debug("Renering info diagram\n"+t);var i,a=wb().securityLevel;"sandbox"===a&&(i=au("#i"+e));var s=au("sandbox"===a?i.nodes()[0].contentDocument.body:"body");"sandbox"===a?i.nodes()[0].contentDocument:document,r.parse(t),o.debug("Parsed info diagram");var c=s.select("#"+e);c.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+n),c.attr("height",100),c.attr("width",400)}catch(t){o.error("Error while rendering info diagram"),o.error(t.message)}}(i,t,Dm);break;case"pie":Gk(i,t);break;case"er":bx(s.er),_x(i,t);break;case"journey":ME(s.journey),NE(i,t);break;case"requirement":hT(s.requirement),fT(i,t)}}catch(e){throw function(t,e){try{o.debug("Renering svg for syntax error\n");var n=au("#"+t),r=n.append("g");r.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),r.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),r.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),r.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),r.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),r.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),r.append("text").attr("class","error-text").attr("x",1240).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),r.append("text").attr("class","error-text").attr("x",1050).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+e),n.attr("height",100),n.attr("width",400),n.attr("viewBox","768 0 512 512")}catch(t){o.error("Error while rendering info diagram"),o.error(t.message)}}(t,Dm),e}c.select('[id="'.concat(t,'"]')).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");var T=c.select("#d"+t).node().innerHTML;if(o.debug("cnf.arrowMarkerAbsolute",s.arrowMarkerAbsolute),s.arrowMarkerAbsolute&&"false"!==s.arrowMarkerAbsolute||"sandbox"===s.arrowMarkerAbsolute||(T=T.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),T=(T=FE(T)).replace(/<br>/g,"<br/>"),"sandbox"===s.securityLevel){var C=c.select("#d"+t+" svg").node(),E="100%";C&&(E=C.viewBox.baseVal.height+"px"),T='<iframe style="width:'.concat("100%",";height:").concat(E,';border:0;margin:0;" src="data:text/html;base64,').concat(btoa('<body style="margin:0">'+T+"</body>"),'" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The “iframe” tag is not supported by your browser.\n</iframe>')}else"loose"!==s.securityLevel&&(T=Om().sanitize(T,{ADD_TAGS:["foreignobject"],ADD_ATTR:["dominant-baseline"]}));if(void 0!==n)switch(g){case"flowchart":case"flowchart-v2":n(T,Gx.bindFunctions);break;case"gantt":n(T,Qw.bindFunctions);break;case"class":case"classDiagram":n(T,Zb.bindFunctions);break;default:n(T)}else o.debug("CB = undefined!");IT.forEach((function(t){t()})),IT=[];var S="sandbox"===s.securityLevel?"#i"+t:"#d"+t,A=au(S).node();return null!==A&&"function"==typeof A.remove&&au(S).node().remove(),T},parse:function(t){t+="\n";var e=wb(),n=db.detectInit(t,e);n&&o.info("reinit ",n);var r,i=db.detectType(t,e);switch(o.debug("Type "+i),i){case"gitGraph":wk.clear(),(r=Tk()).parser.yy=wk;break;case"flowchart":case"flowchart-v2":Gx.clear(),(r=Zx()).parser.yy=Gx;break;case"sequence":OT.clear(),(r=pT()).parser.yy=OT;break;case"gantt":(r=ek()).parser.yy=Qw;break;case"class":case"classDiagram":(r=n_()).parser.yy=Zb;break;case"state":case"stateDiagram":(r=EC()).parser.yy=UC;break;case"info":o.debug("info info info"),(r=Fk()).parser.yy=Ik;break;case"pie":o.debug("pie"),(r=Uk()).parser.yy=Hk;break;case"er":o.debug("er"),(r=dx()).parser.yy=hx;break;case"journey":o.debug("Journey"),(r=pE()).parser.yy=fE;break;case"requirement":case"requirementDiagram":o.debug("RequirementDiagram"),(r=Zk()).parser.yy=nT}return r.parser.yy.graphType=i,r.parser.yy.parseError=function(t,e){throw{str:t,hash:e}},r.parse(t),r},parseDirective:function(t,e,n,r){try{if(void 0!==e)switch(e=e.trim(),n){case"open_directive":PE={};break;case"type_directive":PE.type=e.toLowerCase();break;case"arg_directive":PE.args=JSON.parse(e);break;case"close_directive":(function(t,e,n){switch(o.debug("Directive type=".concat(e.type," with args:"),e.args),e.type){case"init":case"initialize":["config"].forEach((function(t){void 0!==e.args[t]&&("flowchart-v2"===n&&(n="flowchart"),e.args[n]=e.args[t],delete e.args[t])})),o.debug("sanitize in handleDirective",e.args),hb(e.args),o.debug("sanitize in handleDirective (done)",e.args),e.args,Tb(e.args);break;case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap("wrap"===e.type);break;case"themeCss":o.warn("themeCss encountered");break;default:o.warn("Unhandled directive: source: '%%{".concat(e.type,": ").concat(JSON.stringify(e.args?e.args:{}),"}%%"),e)}})(t,PE,r),PE=null}}catch(t){o.error("Error while rendering sequenceDiagram directive: ".concat(e," jison context: ").concat(n)),o.error(t.message)}},initialize:function(t){t&&t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),function(t){gb=rb({},t)}(t),t&&t.theme&&Mv[t.theme]?t.themeVariables=Mv[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Mv.default.getThemeVariables(t.themeVariables));var e="object"===RE(t)?function(t){return mb=rb({},yb),mb=rb(mb,t),t.theme&&Mv[t.theme]&&(mb.themeVariables=Mv[t.theme].getThemeVariables(t.themeVariables)),bb=_b(mb,vb),mb}(t):xb();YE(e),s(e.logLevel)},reinitialize:function(){},getConfig:wb,setConfig:function(t){return rb(bb,t),wb()},getSiteConfig:xb,updateSiteConfig:function(t){return mb=rb(mb,t),_b(mb,vb),mb},reset:function(){Cb()},globalReset:function(){Cb(),YE(wb())},defaultConfig:yb});s(wb().logLevel),Cb(wb());const UE=jE;var zE=function(){var t,e,n=UE.getConfig();arguments.length>=2?(void 0!==arguments[0]&&(qE.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],"function"==typeof arguments[arguments.length-1]?(e=arguments[arguments.length-1],o.debug("Callback function found")):void 0!==n.mermaid&&("function"==typeof n.mermaid.callback?(e=n.mermaid.callback,o.debug("Callback function found")):o.debug("No Callback function found")),t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof window.Node?[t]:t,o.debug("Start On Load before: "+qE.startOnLoad),void 0!==qE.startOnLoad&&(o.debug("Start On Load inner: "+qE.startOnLoad),UE.updateSiteConfig({startOnLoad:qE.startOnLoad})),void 0!==qE.ganttConfig&&UE.updateSiteConfig({gantt:qE.ganttConfig});for(var r,i=new db.initIdGeneratior(n.deterministicIds,n.deterministicIDSeed),a=function(n){var a=t[n];if(a.getAttribute("data-processed"))return"continue";a.setAttribute("data-processed",!0);var s="mermaid-".concat(i.next());r=a.innerHTML,r=db.entityDecode(r).trim().replace(/<br\s*\/?>/gi,"<br/>");var c=db.detectInit(r);c&&o.debug("Detected early reinit: ",c),UE.render(s,r,(function(t,n){a.innerHTML=t,void 0!==e&&e(s),n&&n(a)}),a)},s=0;s<t.length;s++)a(s)},$E=function(){qE.startOnLoad?UE.getConfig().startOnLoad&&qE.init():void 0===qE.startOnLoad&&(o.debug("In start, no config"),UE.getConfig().startOnLoad&&qE.init())};"undefined"!=typeof document&&window.addEventListener("load",(function(){$E()}),!1);var qE={startOnLoad:!0,htmlLabels:!0,mermaidAPI:UE,parse:UE.parse,render:UE.render,init:function(){try{zE.apply(void 0,arguments)}catch(t){o.warn("Syntax Error rendering"),o.warn(t),this.parseError&&this.parseError(t)}},initialize:function(t){void 0!==t.mermaid&&(void 0!==t.mermaid.startOnLoad&&(qE.startOnLoad=t.mermaid.startOnLoad),void 0!==t.mermaid.htmlLabels&&(qE.htmlLabels="false"!==t.mermaid.htmlLabels&&!1!==t.mermaid.htmlLabels)),UE.initialize(t)},contentLoaded:$E};const HE=qE},4949:(t,e,n)=>{t.exports={graphlib:n(6614),dagre:n(1463),intersect:n(8114),render:n(5787),util:n(8355),version:n(5689)}},9144:(t,e,n)=>{var r=n(8355);function i(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])}t.exports={default:i,normal:i,vee:function(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])},undirected:function(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])}}},5632:(t,e,n)=>{var r=n(8355),i=n(4322),a=n(1322);t.exports=function(t,e){var n,o=e.nodes().filter((function(t){return r.isSubgraph(e,t)})),s=t.selectAll("g.cluster").data(o,(function(t){return t}));return s.selectAll("*").remove(),s.enter().append("g").attr("class","cluster").attr("id",(function(t){return e.node(t).id})).style("opacity",0),s=t.selectAll("g.cluster"),r.applyTransition(s,e).style("opacity",1),s.each((function(t){var n=e.node(t),r=i.select(this);i.select(this).append("rect");var o=r.append("g").attr("class","label");a(o,n,n.clusterLabelPos)})),s.selectAll("rect").each((function(t){var n=e.node(t),a=i.select(this);r.applyStyle(a,n.style)})),n=s.exit?s.exit():s.selectAll(null),r.applyTransition(n,e).style("opacity",0).remove(),s}},6315:(t,e,n)=>{"use strict";var r=n(1034),i=n(1322),a=n(8355),o=n(4322);t.exports=function(t,e){var n,s=t.selectAll("g.edgeLabel").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0);return s.exit().remove(),s.enter().append("g").classed("edgeLabel",!0).style("opacity",0),(s=t.selectAll("g.edgeLabel")).each((function(t){var n=o.select(this);n.select(".label").remove();var a=e.edge(t),s=i(n,e.edge(t),0,0).classed("label",!0),c=s.node().getBBox();a.labelId&&s.attr("id",a.labelId),r.has(a,"width")||(a.width=c.width),r.has(a,"height")||(a.height=c.height)})),n=s.exit?s.exit():s.selectAll(null),a.applyTransition(n,e).style("opacity",0).remove(),s}},940:(t,e,n)=>{"use strict";var r=n(1034),i=n(3042),a=n(8355),o=n(4322);function s(t,e){var n=(o.line||o.svg.line)().x((function(t){return t.x})).y((function(t){return t.y}));return(n.curve||n.interpolate)(t.curve),n(e)}t.exports=function(t,e,n){var c=t.selectAll("g.edgePath").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0),u=function(t,e){var n=t.enter().append("g").attr("class","edgePath").style("opacity",0);return n.append("path").attr("class","path").attr("d",(function(t){var n=e.edge(t),i=e.node(t.v).elem;return s(n,r.range(n.points.length).map((function(){return e=(t=i).getBBox(),{x:(n=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2)).e,y:n.f};var t,e,n})))})),n.append("defs"),n}(c,e);!function(t,e){var n=t.exit();a.applyTransition(n,e).style("opacity",0).remove()}(c,e);var l=void 0!==c.merge?c.merge(u):c;return a.applyTransition(l,e).style("opacity",1),l.each((function(t){var n=o.select(this),r=e.edge(t);r.elem=this,r.id&&n.attr("id",r.id),a.applyClass(n,r.class,(n.classed("update")?"update ":"")+"edgePath")})),l.selectAll("path.path").each((function(t){var n=e.edge(t);n.arrowheadId=r.uniqueId("arrowhead");var c=o.select(this).attr("marker-end",(function(){return"url("+(t=location.href,e=n.arrowheadId,t.split("#")[0]+"#"+e+")");var t,e})).style("fill","none");a.applyTransition(c,e).attr("d",(function(t){return function(t,e){var n=t.edge(e),r=t.node(e.v),a=t.node(e.w),o=n.points.slice(1,n.points.length-1);return o.unshift(i(r,o[0])),o.push(i(a,o[o.length-1])),s(n,o)}(e,t)})),a.applyStyle(c,n.style)})),l.selectAll("defs *").remove(),l.selectAll("defs").each((function(t){var r=e.edge(t);(0,n[r.arrowhead])(o.select(this),r.arrowheadId,r,"arrowhead")})),l}},607:(t,e,n)=>{"use strict";var r=n(1034),i=n(1322),a=n(8355),o=n(4322);t.exports=function(t,e,n){var s,c=e.nodes().filter((function(t){return!a.isSubgraph(e,t)})),u=t.selectAll("g.node").data(c,(function(t){return t})).classed("update",!0);return u.exit().remove(),u.enter().append("g").attr("class","node").style("opacity",0),(u=t.selectAll("g.node")).each((function(t){var s=e.node(t),c=o.select(this);a.applyClass(c,s.class,(c.classed("update")?"update ":"")+"node"),c.select("g.label").remove();var u=c.append("g").attr("class","label"),l=i(u,s),h=n[s.shape],f=r.pick(l.node().getBBox(),"width","height");s.elem=this,s.id&&c.attr("id",s.id),s.labelId&&u.attr("id",s.labelId),r.has(s,"width")&&(f.width=s.width),r.has(s,"height")&&(f.height=s.height),f.width+=s.paddingLeft+s.paddingRight,f.height+=s.paddingTop+s.paddingBottom,u.attr("transform","translate("+(s.paddingLeft-s.paddingRight)/2+","+(s.paddingTop-s.paddingBottom)/2+")");var d=o.select(this);d.select(".label-container").remove();var p=h(d,f,s).classed("label-container",!0);a.applyStyle(p,s.style);var g=p.node().getBBox();s.width=g.width,s.height=g.height})),s=u.exit?u.exit():u.selectAll(null),a.applyTransition(s,e).style("opacity",0).remove(),u}},4322:(t,e,n)=>{var r;if(!r)try{r=n(7188)}catch(t){}r||(r=window.d3),t.exports=r},1463:(t,e,n)=>{var r;try{r=n(681)}catch(t){}r||(r=window.dagre),t.exports=r},6614:(t,e,n)=>{var r;try{r=n(8282)}catch(t){}r||(r=window.graphlib),t.exports=r},8114:(t,e,n)=>{t.exports={node:n(3042),circle:n(6587),ellipse:n(3260),polygon:n(5337),rect:n(8049)}},6587:(t,e,n)=>{var r=n(3260);t.exports=function(t,e,n){return r(t,e,e,n)}},3260:t=>{t.exports=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),u=Math.abs(e*n*o/c);r.x<i&&(u=-u);var l=Math.abs(e*n*s/c);return r.y<a&&(l=-l),{x:i+u,y:a+l}}},6808:t=>{function e(t,e){return t*e>0}t.exports=function(t,n,r,i){var a,o,s,c,u,l,h,f,d,p,g,y,m;if(!(a=n.y-t.y,s=t.x-n.x,u=n.x*t.y-t.x*n.y,d=a*r.x+s*r.y+u,p=a*i.x+s*i.y+u,0!==d&&0!==p&&e(d,p)||(o=i.y-r.y,c=r.x-i.x,l=i.x*r.y-r.x*i.y,h=o*t.x+c*t.y+l,f=o*n.x+c*n.y+l,0!==h&&0!==f&&e(h,f)||0==(g=a*c-o*s))))return y=Math.abs(g/2),{x:(m=s*l-c*u)<0?(m-y)/g:(m+y)/g,y:(m=o*u-a*l)<0?(m-y)/g:(m+y)/g}}},3042:t=>{t.exports=function(t,e){return t.intersect(e)}},5337:(t,e,n)=>{var r=n(6808);t.exports=function(t,e,n){var i=t.x,a=t.y,o=[],s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;e.forEach((function(t){s=Math.min(s,t.x),c=Math.min(c,t.y)}));for(var u=i-t.width/2-s,l=a-t.height/2-c,h=0;h<e.length;h++){var f=e[h],d=e[h<e.length-1?h+1:0],p=r(t,n,{x:u+f.x,y:l+f.y},{x:u+d.x,y:l+d.y});p&&o.push(p)}return o.length?(o.length>1&&o.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1})),o[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}},8049:t=>{t.exports=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;return Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=0===s?0:u*o/s,r=u):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o),{x:i+n,y:a+r}}},8284:(t,e,n)=>{var r=n(8355);t.exports=function(t,e){var n=t.append("foreignObject").attr("width","100000"),i=n.append("xhtml:div");i.attr("xmlns","http://www.w3.org/1999/xhtml");var a=e.label;switch(typeof a){case"function":i.insert(a);break;case"object":i.insert((function(){return a}));break;default:i.html(a)}r.applyStyle(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var o=i.node().getBoundingClientRect();return n.attr("width",o.width).attr("height",o.height),n}},1322:(t,e,n)=>{var r=n(7318),i=n(8284),a=n(8287);t.exports=function(t,e,n){var o=e.label,s=t.append("g");"svg"===e.labelType?a(s,e):"string"!=typeof o||"html"===e.labelType?i(s,e):r(s,e);var c,u=s.node().getBBox();switch(n){case"top":c=-e.height/2;break;case"bottom":c=e.height/2-u.height;break;default:c=-u.height/2}return s.attr("transform","translate("+-u.width/2+","+c+")"),s}},8287:(t,e,n)=>{var r=n(8355);t.exports=function(t,e){var n=t;return n.node().appendChild(e.label),r.applyStyle(n,e.labelStyle),n}},7318:(t,e,n)=>{var r=n(8355);t.exports=function(t,e){for(var n=t.append("text"),i=function(t){for(var e,n="",r=!1,i=0;i<t.length;++i)e=t[i],r?(n+="n"===e?"\n":e,r=!1):"\\"===e?r=!0:n+=e;return n}(e.label).split("\n"),a=0;a<i.length;a++)n.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(i[a]);return r.applyStyle(n,e.labelStyle),n}},1034:(t,e,n)=>{var r;try{r={defaults:n(1747),each:n(6073),isFunction:n(3560),isPlainObject:n(8630),pick:n(9722),has:n(8721),range:n(6026),uniqueId:n(3955)}}catch(t){}r||(r=window._),t.exports=r},6381:(t,e,n)=>{"use strict";var r=n(8355),i=n(4322);t.exports=function(t,e){var n=t.filter((function(){return!i.select(this).classed("update")}));function a(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}n.attr("transform",a),r.applyTransition(t,e).style("opacity",1).attr("transform",a),r.applyTransition(n.selectAll("rect"),e).attr("width",(function(t){return e.node(t).width})).attr("height",(function(t){return e.node(t).height})).attr("x",(function(t){return-e.node(t).width/2})).attr("y",(function(t){return-e.node(t).height/2}))}},4577:(t,e,n)=>{"use strict";var r=n(8355),i=n(4322),a=n(1034);t.exports=function(t,e){function n(t){var n=e.edge(t);return a.has(n,"x")?"translate("+n.x+","+n.y+")":""}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},4849:(t,e,n)=>{"use strict";var r=n(8355),i=n(4322);t.exports=function(t,e){function n(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},5787:(t,e,n)=>{var r=n(1034),i=n(4322),a=n(1463).layout;t.exports=function(){var t=n(607),e=n(5632),i=n(6315),u=n(940),l=n(4849),h=n(4577),f=n(6381),d=n(4418),p=n(9144),g=function(n,g){!function(t){t.nodes().forEach((function(e){var n=t.node(e);r.has(n,"label")||t.children(e).length||(n.label=e),r.has(n,"paddingX")&&r.defaults(n,{paddingLeft:n.paddingX,paddingRight:n.paddingX}),r.has(n,"paddingY")&&r.defaults(n,{paddingTop:n.paddingY,paddingBottom:n.paddingY}),r.has(n,"padding")&&r.defaults(n,{paddingLeft:n.padding,paddingRight:n.padding,paddingTop:n.padding,paddingBottom:n.padding}),r.defaults(n,o),r.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],(function(t){n[t]=Number(n[t])})),r.has(n,"width")&&(n._prevWidth=n.width),r.has(n,"height")&&(n._prevHeight=n.height)})),t.edges().forEach((function(e){var n=t.edge(e);r.has(n,"label")||(n.label=""),r.defaults(n,s)}))}(g);var y=c(n,"output"),m=c(y,"clusters"),v=c(y,"edgePaths"),b=i(c(y,"edgeLabels"),g),_=t(c(y,"nodes"),g,d);a(g),l(_,g),h(b,g),u(v,g,p);var x=e(m,g);f(x,g),function(t){r.each(t.nodes(),(function(e){var n=t.node(e);r.has(n,"_prevWidth")?n.width=n._prevWidth:delete n.width,r.has(n,"_prevHeight")?n.height=n._prevHeight:delete n.height,delete n._prevWidth,delete n._prevHeight}))}(g)};return g.createNodes=function(e){return arguments.length?(t=e,g):t},g.createClusters=function(t){return arguments.length?(e=t,g):e},g.createEdgeLabels=function(t){return arguments.length?(i=t,g):i},g.createEdgePaths=function(t){return arguments.length?(u=t,g):u},g.shapes=function(t){return arguments.length?(d=t,g):d},g.arrows=function(t){return arguments.length?(p=t,g):p},g};var o={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},s={arrowhead:"normal",curve:i.curveLinear};function c(t,e){var n=t.select("g."+e);return n.empty()&&(n=t.append("g").attr("class",e)),n}},4418:(t,e,n)=>{"use strict";var r=n(8049),i=n(3260),a=n(6587),o=n(5337);t.exports={rect:function(t,e,n){var i=t.insert("rect",":first-child").attr("rx",n.rx).attr("ry",n.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return n.intersect=function(t){return r(n,t)},i},ellipse:function(t,e,n){var r=e.width/2,a=e.height/2,o=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",r).attr("ry",a);return n.intersect=function(t){return i(n,r,a,t)},o},circle:function(t,e,n){var r=Math.max(e.width,e.height)/2,i=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",r);return n.intersect=function(t){return a(n,r,t)},i},diamond:function(t,e,n){var r=e.width*Math.SQRT2/2,i=e.height*Math.SQRT2/2,a=[{x:0,y:-i},{x:-r,y:0},{x:0,y:i},{x:r,y:0}],s=t.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" "));return n.intersect=function(t){return o(n,a,t)},s}}},8355:(t,e,n)=>{var r=n(1034);t.exports={isSubgraph:function(t,e){return!!t.children(e).length},edgeToId:function(t){return a(t.v)+":"+a(t.w)+":"+a(t.name)},applyStyle:function(t,e){e&&t.attr("style",e)},applyClass:function(t,e,n){e&&t.attr("class",e).attr("class",n+" "+t.attr("class"))},applyTransition:function(t,e){var n=e.graph();if(r.isPlainObject(n)){var i=n.transition;if(r.isFunction(i))return i(t)}return t}};var i=/:/g;function a(t){return t?String(t).replace(i,"\\:"):""}},5689:t=>{t.exports="0.6.4"},7188:(t,e,n)=>{"use strict";n.r(e),n.d(e,{FormatSpecifier:()=>uc,active:()=>Jr,arc:()=>fx,area:()=>vx,areaRadial:()=>Sx,ascending:()=>i,autoType:()=>Fo,axisBottom:()=>it,axisLeft:()=>at,axisRight:()=>rt,axisTop:()=>nt,bisect:()=>u,bisectLeft:()=>c,bisectRight:()=>s,bisector:()=>a,blob:()=>ms,brush:()=>Ai,brushSelection:()=>Ci,brushX:()=>Ei,brushY:()=>Si,buffer:()=>bs,chord:()=>Fi,clientPoint:()=>Dn,cluster:()=>Sd,color:()=>Ve,contourDensity:()=>oo,contours:()=>to,create:()=>Y_,creator:()=>ie,cross:()=>f,csv:()=>Ts,csvFormat:()=>To,csvFormatBody:()=>Co,csvFormatRow:()=>So,csvFormatRows:()=>Eo,csvFormatValue:()=>Ao,csvParse:()=>wo,csvParseRows:()=>ko,cubehelix:()=>qa,curveBasis:()=>sw,curveBasisClosed:()=>uw,curveBasisOpen:()=>hw,curveBundle:()=>dw,curveCardinal:()=>yw,curveCardinalClosed:()=>vw,curveCardinalOpen:()=>_w,curveCatmullRom:()=>kw,curveCatmullRomClosed:()=>Cw,curveCatmullRomOpen:()=>Sw,curveLinear:()=>px,curveLinearClosed:()=>Mw,curveMonotoneX:()=>Fw,curveMonotoneY:()=>Pw,curveNatural:()=>Uw,curveStep:()=>$w,curveStepAfter:()=>Hw,curveStepBefore:()=>qw,customEvent:()=>ye,descending:()=>d,deviation:()=>y,dispatch:()=>ft,drag:()=>po,dragDisable:()=>Se,dragEnable:()=>Ae,dsv:()=>ks,dsvFormat:()=>_o,easeBack:()=>hs,easeBackIn:()=>us,easeBackInOut:()=>hs,easeBackOut:()=>ls,easeBounce:()=>os,easeBounceIn:()=>as,easeBounceInOut:()=>ss,easeBounceOut:()=>os,easeCircle:()=>rs,easeCircleIn:()=>es,easeCircleInOut:()=>rs,easeCircleOut:()=>ns,easeCubic:()=>Xr,easeCubicIn:()=>Vr,easeCubicInOut:()=>Xr,easeCubicOut:()=>Gr,easeElastic:()=>ps,easeElasticIn:()=>ds,easeElasticInOut:()=>gs,easeElasticOut:()=>ps,easeExp:()=>ts,easeExpIn:()=>Ko,easeExpInOut:()=>ts,easeExpOut:()=>Jo,easeLinear:()=>Yo,easePoly:()=>Ho,easePolyIn:()=>$o,easePolyInOut:()=>Ho,easePolyOut:()=>qo,easeQuad:()=>zo,easeQuadIn:()=>jo,easeQuadInOut:()=>zo,easeQuadOut:()=>Uo,easeSin:()=>Zo,easeSinIn:()=>Go,easeSinInOut:()=>Zo,easeSinOut:()=>Xo,entries:()=>pa,event:()=>le,extent:()=>m,forceCenter:()=>Ls,forceCollide:()=>Ws,forceLink:()=>Xs,forceManyBody:()=>tc,forceRadial:()=>ec,forceSimulation:()=>Js,forceX:()=>nc,forceY:()=>rc,format:()=>pc,formatDefaultLocale:()=>bc,formatLocale:()=>vc,formatPrefix:()=>gc,formatSpecifier:()=>cc,geoAlbers:()=>zf,geoAlbersUsa:()=>$f,geoArea:()=>gu,geoAzimuthalEqualArea:()=>Vf,geoAzimuthalEqualAreaRaw:()=>Wf,geoAzimuthalEquidistant:()=>Xf,geoAzimuthalEquidistantRaw:()=>Gf,geoBounds:()=>sl,geoCentroid:()=>bl,geoCircle:()=>Nl,geoClipAntimeridian:()=>zl,geoClipCircle:()=>$l,geoClipExtent:()=>Vl,geoClipRectangle:()=>Wl,geoConicConformal:()=>ed,geoConicConformalRaw:()=>td,geoConicEqualArea:()=>Uf,geoConicEqualAreaRaw:()=>jf,geoConicEquidistant:()=>ad,geoConicEquidistantRaw:()=>id,geoContains:()=>ph,geoDistance:()=>ah,geoEqualEarth:()=>fd,geoEqualEarthRaw:()=>hd,geoEquirectangular:()=>rd,geoEquirectangularRaw:()=>nd,geoGnomonic:()=>pd,geoGnomonicRaw:()=>dd,geoGraticule:()=>mh,geoGraticule10:()=>vh,geoIdentity:()=>gd,geoInterpolate:()=>bh,geoLength:()=>nh,geoMercator:()=>Qf,geoMercatorRaw:()=>Zf,geoNaturalEarth1:()=>md,geoNaturalEarth1Raw:()=>yd,geoOrthographic:()=>bd,geoOrthographicRaw:()=>vd,geoPath:()=>kf,geoProjection:()=>Ff,geoProjectionMutator:()=>Pf,geoRotation:()=>Sl,geoStereographic:()=>xd,geoStereographicRaw:()=>_d,geoStream:()=>nu,geoTransform:()=>Tf,geoTransverseMercator:()=>kd,geoTransverseMercatorRaw:()=>wd,gray:()=>ka,hcl:()=>Ba,hierarchy:()=>Md,histogram:()=>D,hsl:()=>an,html:()=>Ds,image:()=>Es,interpolate:()=>Mn,interpolateArray:()=>xn,interpolateBasis:()=>un,interpolateBasisClosed:()=>ln,interpolateBlues:()=>f_,interpolateBrBG:()=>Tb,interpolateBuGn:()=>zb,interpolateBuPu:()=>qb,interpolateCividis:()=>k_,interpolateCool:()=>E_,interpolateCubehelix:()=>Up,interpolateCubehelixDefault:()=>T_,interpolateCubehelixLong:()=>zp,interpolateDate:()=>kn,interpolateDiscrete:()=>Sp,interpolateGnBu:()=>Wb,interpolateGreens:()=>p_,interpolateGreys:()=>y_,interpolateHcl:()=>Pp,interpolateHclLong:()=>Yp,interpolateHsl:()=>Op,interpolateHslLong:()=>Ip,interpolateHue:()=>Ap,interpolateInferno:()=>F_,interpolateLab:()=>Rp,interpolateMagma:()=>R_,interpolateNumber:()=>Tn,interpolateNumberArray:()=>bn,interpolateObject:()=>Cn,interpolateOrRd:()=>Gb,interpolateOranges:()=>w_,interpolatePRGn:()=>Eb,interpolatePiYG:()=>Ab,interpolatePlasma:()=>P_,interpolatePuBu:()=>Kb,interpolatePuBuGn:()=>Zb,interpolatePuOr:()=>Nb,interpolatePuRd:()=>t_,interpolatePurples:()=>v_,interpolateRainbow:()=>A_,interpolateRdBu:()=>Bb,interpolateRdGy:()=>Ob,interpolateRdPu:()=>n_,interpolateRdYlBu:()=>Rb,interpolateRdYlGn:()=>Pb,interpolateReds:()=>__,interpolateRgb:()=>gn,interpolateRgbBasis:()=>mn,interpolateRgbBasisClosed:()=>vn,interpolateRound:()=>Mp,interpolateSinebow:()=>B_,interpolateSpectral:()=>jb,interpolateString:()=>An,interpolateTransformCss:()=>pr,interpolateTransformSvg:()=>gr,interpolateTurbo:()=>L_,interpolateViridis:()=>I_,interpolateWarm:()=>C_,interpolateYlGn:()=>o_,interpolateYlGnBu:()=>i_,interpolateYlOrBr:()=>c_,interpolateYlOrRd:()=>l_,interpolateZoom:()=>Bp,interrupt:()=>ar,interval:()=>fk,isoFormat:()=>uk,isoParse:()=>hk,json:()=>As,keys:()=>fa,lab:()=>Ta,lch:()=>Da,line:()=>mx,lineRadial:()=>Ex,linkHorizontal:()=>Rx,linkRadial:()=>Px,linkVertical:()=>Fx,local:()=>U_,map:()=>na,matcher:()=>mt,max:()=>I,mean:()=>R,median:()=>F,merge:()=>P,min:()=>Y,mouse:()=>Ln,namespace:()=>Ct,namespaces:()=>Tt,nest:()=>ra,now:()=>qn,pack:()=>tp,packEnclose:()=>Id,packSiblings:()=>Gd,pairs:()=>l,partition:()=>op,path:()=>Wi,permute:()=>j,pie:()=>xx,piecewise:()=>$p,pointRadial:()=>Ax,polygonArea:()=>Hp,polygonCentroid:()=>Wp,polygonContains:()=>Qp,polygonHull:()=>Zp,polygonLength:()=>Kp,precisionFixed:()=>_c,precisionPrefix:()=>xc,precisionRound:()=>wc,quadtree:()=>js,quantile:()=>B,quantize:()=>qp,radialArea:()=>Sx,radialLine:()=>Ex,randomBates:()=>ig,randomExponential:()=>ag,randomIrwinHall:()=>rg,randomLogNormal:()=>ng,randomNormal:()=>eg,randomUniform:()=>tg,range:()=>k,rgb:()=>Qe,ribbon:()=>Ki,scaleBand:()=>dg,scaleDiverging:()=>ob,scaleDivergingLog:()=>sb,scaleDivergingPow:()=>ub,scaleDivergingSqrt:()=>lb,scaleDivergingSymlog:()=>cb,scaleIdentity:()=>Mg,scaleImplicit:()=>hg,scaleLinear:()=>Ag,scaleLog:()=>Pg,scaleOrdinal:()=>fg,scalePoint:()=>gg,scalePow:()=>Vg,scaleQuantile:()=>Xg,scaleQuantize:()=>Zg,scaleSequential:()=>Jv,scaleSequentialLog:()=>tb,scaleSequentialPow:()=>nb,scaleSequentialQuantile:()=>ib,scaleSequentialSqrt:()=>rb,scaleSequentialSymlog:()=>eb,scaleSqrt:()=>Gg,scaleSymlog:()=>zg,scaleThreshold:()=>Qg,scaleTime:()=>jv,scaleUtc:()=>Zv,scan:()=>U,schemeAccent:()=>db,schemeBlues:()=>h_,schemeBrBG:()=>kb,schemeBuGn:()=>Ub,schemeBuPu:()=>$b,schemeCategory10:()=>fb,schemeDark2:()=>pb,schemeGnBu:()=>Hb,schemeGreens:()=>d_,schemeGreys:()=>g_,schemeOrRd:()=>Vb,schemeOranges:()=>x_,schemePRGn:()=>Cb,schemePaired:()=>gb,schemePastel1:()=>yb,schemePastel2:()=>mb,schemePiYG:()=>Sb,schemePuBu:()=>Qb,schemePuBuGn:()=>Xb,schemePuOr:()=>Mb,schemePuRd:()=>Jb,schemePurples:()=>m_,schemeRdBu:()=>Db,schemeRdGy:()=>Lb,schemeRdPu:()=>e_,schemeRdYlBu:()=>Ib,schemeRdYlGn:()=>Fb,schemeReds:()=>b_,schemeSet1:()=>vb,schemeSet2:()=>bb,schemeSet3:()=>_b,schemeSpectral:()=>Yb,schemeTableau10:()=>xb,schemeYlGn:()=>a_,schemeYlGnBu:()=>r_,schemeYlOrBr:()=>s_,schemeYlOrRd:()=>u_,select:()=>Te,selectAll:()=>$_,selection:()=>ke,selector:()=>pt,selectorAll:()=>yt,set:()=>ha,shuffle:()=>z,stack:()=>Xw,stackOffsetDiverging:()=>Qw,stackOffsetExpand:()=>Zw,stackOffsetNone:()=>Ww,stackOffsetSilhouette:()=>Kw,stackOffsetWiggle:()=>Jw,stackOrderAppearance:()=>tk,stackOrderAscending:()=>nk,stackOrderDescending:()=>ik,stackOrderInsideOut:()=>ak,stackOrderNone:()=>Vw,stackOrderReverse:()=>ok,stratify:()=>hp,style:()=>Rt,sum:()=>$,svg:()=>Bs,symbol:()=>rw,symbolCircle:()=>Yx,symbolCross:()=>jx,symbolDiamond:()=>$x,symbolSquare:()=>Gx,symbolStar:()=>Vx,symbolTriangle:()=>Zx,symbolWye:()=>ew,symbols:()=>nw,text:()=>xs,thresholdFreedmanDiaconis:()=>L,thresholdScott:()=>O,thresholdSturges:()=>N,tickFormat:()=>Eg,tickIncrement:()=>A,tickStep:()=>M,ticks:()=>S,timeDay:()=>Ay,timeDays:()=>My,timeFormat:()=>pm,timeFormatDefaultLocale:()=>Iv,timeFormatLocale:()=>fm,timeFriday:()=>vy,timeFridays:()=>Cy,timeHour:()=>Dy,timeHours:()=>By,timeInterval:()=>ty,timeMillisecond:()=>jy,timeMilliseconds:()=>Uy,timeMinute:()=>Oy,timeMinutes:()=>Iy,timeMonday:()=>py,timeMondays:()=>xy,timeMonth:()=>ay,timeMonths:()=>oy,timeParse:()=>gm,timeSaturday:()=>by,timeSaturdays:()=>Ey,timeSecond:()=>Fy,timeSeconds:()=>Py,timeSunday:()=>dy,timeSundays:()=>_y,timeThursday:()=>my,timeThursdays:()=>Ty,timeTuesday:()=>gy,timeTuesdays:()=>wy,timeWednesday:()=>yy,timeWednesdays:()=>ky,timeWeek:()=>dy,timeWeeks:()=>_y,timeYear:()=>ny,timeYears:()=>ry,timeout:()=>Kn,timer:()=>Vn,timerFlush:()=>Gn,touch:()=>Bn,touches:()=>q_,transition:()=>qr,transpose:()=>q,tree:()=>vp,treemap:()=>kp,treemapBinary:()=>Tp,treemapDice:()=>ap,treemapResquarify:()=>Ep,treemapSlice:()=>bp,treemapSliceDice:()=>Cp,treemapSquarify:()=>wp,tsv:()=>Cs,tsvFormat:()=>Bo,tsvFormatBody:()=>Lo,tsvFormatRow:()=>Io,tsvFormatRows:()=>Oo,tsvFormatValue:()=>Ro,tsvParse:()=>No,tsvParseRows:()=>Do,utcDay:()=>im,utcDays:()=>am,utcFormat:()=>ym,utcFriday:()=>Gy,utcFridays:()=>em,utcHour:()=>Hv,utcHours:()=>Wv,utcMillisecond:()=>jy,utcMilliseconds:()=>Uy,utcMinute:()=>Gv,utcMinutes:()=>Xv,utcMonday:()=>qy,utcMondays:()=>Qy,utcMonth:()=>zv,utcMonths:()=>$v,utcParse:()=>mm,utcSaturday:()=>Xy,utcSaturdays:()=>nm,utcSecond:()=>Fy,utcSeconds:()=>Py,utcSunday:()=>$y,utcSundays:()=>Zy,utcThursday:()=>Vy,utcThursdays:()=>tm,utcTuesday:()=>Hy,utcTuesdays:()=>Ky,utcWednesday:()=>Wy,utcWednesdays:()=>Jy,utcWeek:()=>$y,utcWeeks:()=>Zy,utcYear:()=>sm,utcYears:()=>cm,values:()=>da,variance:()=>g,version:()=>r,voronoi:()=>Kk,window:()=>Bt,xml:()=>Ns,zip:()=>W,zoom:()=>fT,zoomIdentity:()=>nT,zoomTransform:()=>rT});var r="5.16.0";function i(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function a(t){var e;return 1===t.length&&(e=t,t=function(t,n){return i(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}var o=a(i),s=o.right,c=o.left;const u=s;function l(t,e){null==e&&(e=h);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return a}function h(t,e){return[t,e]}function f(t,e,n){var r,i,a,o,s=t.length,c=e.length,u=new Array(s*c);for(null==n&&(n=h),r=a=0;r<s;++r)for(o=t[r],i=0;i<c;++i,++a)u[a]=n(o,e[i]);return u}function d(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function p(t){return null===t?NaN:+t}function g(t,e){var n,r,i=t.length,a=0,o=-1,s=0,c=0;if(null==e)for(;++o<i;)isNaN(n=p(t[o]))||(c+=(r=n-s)*(n-(s+=r/++a)));else for(;++o<i;)isNaN(n=p(e(t[o],o,t)))||(c+=(r=n-s)*(n-(s+=r/++a)));if(a>1)return c/(a-1)}function y(t,e){var n=g(t,e);return n?Math.sqrt(n):n}function m(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}var v=Array.prototype,b=v.slice,_=v.map;function x(t){return function(){return t}}function w(t){return t}function k(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}var T=Math.sqrt(50),C=Math.sqrt(10),E=Math.sqrt(2);function S(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=A(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return r&&a.reverse(),a}function A(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=T?10:a>=C?5:a>=E?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=T?10:a>=C?5:a>=E?2:1)}function M(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=T?i*=10:a>=C?i*=5:a>=E&&(i*=2),e<t?-i:i}function N(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}function D(){var t=w,e=m,n=N;function r(r){var i,a,o=r.length,s=new Array(o);for(i=0;i<o;++i)s[i]=t(r[i],i,r);var c=e(s),l=c[0],h=c[1],f=n(s,l,h);Array.isArray(f)||(f=M(l,h,f),f=k(Math.ceil(l/f)*f,h,f));for(var d=f.length;f[0]<=l;)f.shift(),--d;for(;f[d-1]>h;)f.pop(),--d;var p,g=new Array(d+1);for(i=0;i<=d;++i)(p=g[i]=[]).x0=i>0?f[i-1]:l,p.x1=i<d?f[i]:h;for(i=0;i<o;++i)l<=(a=s[i])&&a<=h&&g[u(f,a,0,d)].push(r[i]);return g}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:x(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:x([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?x(b.call(t)):x(t),r):n},r}function B(t,e,n){if(null==n&&(n=p),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}}function L(t,e,n){return t=_.call(t,p).sort(i),Math.ceil((n-e)/(2*(B(t,.75)-B(t,.25))*Math.pow(t.length,-1/3)))}function O(t,e,n){return Math.ceil((n-e)/(3.5*y(t)*Math.pow(t.length,-1/3)))}function I(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r}function R(t,e){var n,r=t.length,i=r,a=-1,o=0;if(null==e)for(;++a<r;)isNaN(n=p(t[a]))?--i:o+=n;else for(;++a<r;)isNaN(n=p(e(t[a],a,t)))?--i:o+=n;if(i)return o/i}function F(t,e){var n,r=t.length,a=-1,o=[];if(null==e)for(;++a<r;)isNaN(n=p(t[a]))||o.push(n);else for(;++a<r;)isNaN(n=p(e(t[a],a,t)))||o.push(n);return B(o.sort(i),.5)}function P(t){for(var e,n,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(n=new Array(o);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n}function Y(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&r>n&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&r>n&&(r=n);return r}function j(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r}function U(t,e){if(n=t.length){var n,r,a=0,o=0,s=t[o];for(null==e&&(e=i);++a<n;)(e(r=t[a],s)<0||0!==e(s,s))&&(s=r,o=a);return 0===e(s,s)?o:void 0}}function z(t,e,n){for(var r,i,a=(null==n?t.length:n)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,r=t[a+e],t[a+e]=t[i+e],t[i+e]=r;return t}function $(t,e){var n,r=t.length,i=-1,a=0;if(null==e)for(;++i<r;)(n=+t[i])&&(a+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(a+=n);return a}function q(t){if(!(i=t.length))return[];for(var e=-1,n=Y(t,H),r=new Array(n);++e<n;)for(var i,a=-1,o=r[e]=new Array(i);++a<i;)o[a]=t[a][e];return r}function H(t){return t.length}function W(){return q(arguments)}var V=Array.prototype.slice;function G(t){return t}var X=1e-6;function Z(t){return"translate("+(t+.5)+",0)"}function Q(t){return"translate(0,"+(t+.5)+")"}function K(t){return function(e){return+t(e)}}function J(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function tt(){return!this.__axis}function et(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,c=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",l=1===t||3===t?Z:Q;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):G:i,p=Math.max(a,0)+s,g=e.range(),y=+g[0]+.5,m=+g[g.length-1]+.5,v=(e.bandwidth?J:K)(e.copy()),b=h.selection?h.selection():h,_=b.selectAll(".domain").data([null]),x=b.selectAll(".tick").data(f,e).order(),w=x.exit(),k=x.enter().append("g").attr("class","tick"),T=x.select("line"),C=x.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(k),T=T.merge(k.append("line").attr("stroke","currentColor").attr(u+"2",c*a)),C=C.merge(k.append("text").attr("fill","currentColor").attr(u,c*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==b&&(_=_.transition(h),x=x.transition(h),T=T.transition(h),C=C.transition(h),w=w.transition(h).attr("opacity",X).attr("transform",(function(t){return isFinite(t=v(t))?l(t):this.getAttribute("transform")})),k.attr("opacity",X).attr("transform",(function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:v(t))}))),w.remove(),_.attr("d",4===t||2==t?o?"M"+c*o+","+y+"H0.5V"+m+"H"+c*o:"M0.5,"+y+"V"+m:o?"M"+y+","+c*o+"V0.5H"+m+"V"+c*o:"M"+y+",0.5H"+m),x.attr("opacity",1).attr("transform",(function(t){return l(v(t))})),T.attr(u+"2",c*a),C.attr(u,c*p).text(d),b.filter(tt).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each((function(){this.__axis=v}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=V.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:V.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:V.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=o=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(o=+t,h):o},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function nt(t){return et(1,t)}function rt(t){return et(2,t)}function it(t){return et(3,t)}function at(t){return et(4,t)}var ot={value:function(){}};function st(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ct(r)}function ct(t){this._=t}function ut(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function lt(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function ht(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=ot,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ct.prototype=st.prototype={constructor:ct,on:function(t,e){var n,r=this._,i=ut(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=ht(r[n],t.name,e);else if(null==e)for(n in r)r[n]=ht(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=lt(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ct(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};const ft=st;function dt(){}function pt(t){return null==t?dt:function(){return this.querySelector(t)}}function gt(){return[]}function yt(t){return null==t?gt:function(){return this.querySelectorAll(t)}}function mt(t){return function(){return this.matches(t)}}function vt(t){return new Array(t.length)}function bt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function _t(t,e,n,r,i,a){for(var o,s=0,c=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new bt(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function xt(t,e,n,r,i,a,o){var s,c,u,l={},h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(d[s]=u="$"+o.call(c,c.__data__,s,e),u in l?i[s]=c:l[u]=c);for(s=0;s<f;++s)(c=l[u="$"+o.call(t,a[s],s,a)])?(r[s]=c,c.__data__=a[s],l[u]=null):n[s]=new bt(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&l[d[s]]===c&&(i[s]=c)}function wt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}bt.prototype={constructor:bt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var kt="http://www.w3.org/1999/xhtml";const Tt={svg:"http://www.w3.org/2000/svg",xhtml:kt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ct(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Tt.hasOwnProperty(e)?{space:Tt[e],local:t}:t}function Et(t){return function(){this.removeAttribute(t)}}function St(t){return function(){this.removeAttributeNS(t.space,t.local)}}function At(t,e){return function(){this.setAttribute(t,e)}}function Mt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Nt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Dt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Bt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Lt(t){return function(){this.style.removeProperty(t)}}function Ot(t,e,n){return function(){this.style.setProperty(t,e,n)}}function It(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Rt(t,e){return t.style.getPropertyValue(e)||Bt(t).getComputedStyle(t,null).getPropertyValue(e)}function Ft(t){return function(){delete this[t]}}function Pt(t,e){return function(){this[t]=e}}function Yt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function jt(t){return t.trim().split(/^|\s+/)}function Ut(t){return t.classList||new zt(t)}function zt(t){this._node=t,this._names=jt(t.getAttribute("class")||"")}function $t(t,e){for(var n=Ut(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function qt(t,e){for(var n=Ut(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Ht(t){return function(){$t(this,t)}}function Wt(t){return function(){qt(this,t)}}function Vt(t,e){return function(){(e.apply(this,arguments)?$t:qt)(this,t)}}function Gt(){this.textContent=""}function Xt(t){return function(){this.textContent=t}}function Zt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Qt(){this.innerHTML=""}function Kt(t){return function(){this.innerHTML=t}}function Jt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function te(){this.nextSibling&&this.parentNode.appendChild(this)}function ee(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ne(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===kt&&e.documentElement.namespaceURI===kt?e.createElement(t):e.createElementNS(n,t)}}function re(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ie(t){var e=Ct(t);return(e.local?re:ne)(e)}function ae(){return null}function oe(){var t=this.parentNode;t&&t.removeChild(this)}function se(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ce(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}zt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ue={},le=null;function he(t,e,n){return t=fe(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function fe(t,e,n){return function(r){var i=le;le=r;try{t.call(this,this.__data__,e,n)}finally{le=i}}}function de(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function pe(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function ge(t,e,n){var r=ue.hasOwnProperty(t.type)?he:fe;return function(i,a,o){var s,c=this.__on,u=r(e,a,o);if(c)for(var l=0,h=c.length;l<h;++l)if((s=c[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=u,s.capture=n),void(s.value=e);this.addEventListener(t.type,u,n),s={type:t.type,name:t.name,value:e,listener:u,capture:n},c?c.push(s):this.__on=[s]}}function ye(t,e,n,r){var i=le;t.sourceEvent=le,le=t;try{return e.apply(n,r)}finally{le=i}}function me(t,e,n){var r=Bt(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function ve(t,e){return function(){return me(this,t,e)}}function be(t,e){return function(){return me(this,t,e.apply(this,arguments))}}"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(ue={mouseenter:"mouseover",mouseleave:"mouseout"}));var _e=[null];function xe(t,e){this._groups=t,this._parents=e}function we(){return new xe([[document.documentElement]],_e)}xe.prototype=we.prototype={constructor:xe,select:function(t){"function"!=typeof t&&(t=pt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,u=r[i]=new Array(c),l=0;l<c;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),u[l]=o);return new xe(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=yt(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,u=0;u<c;++u)(o=s[u])&&(r.push(t.call(o,o.__data__,u,s)),i.push(o));return new xe(r,i)},filter:function(t){"function"!=typeof t&&(t=mt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new xe(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),l=-1,this.each((function(t){p[++l]=t})),p;var n,r=e?xt:_t,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,s=new Array(o),c=new Array(o),u=new Array(o),l=0;l<o;++l){var h=i[l],f=a[l],d=f.length,p=t.call(h,h&&h.__data__,l,i),g=p.length,y=c[l]=new Array(g),m=s[l]=new Array(g);r(h,f,y,m,u[l]=new Array(d),p,e);for(var v,b,_=0,x=0;_<g;++_)if(v=y[_]){for(_>=x&&(x=_+1);!(b=m[x])&&++x<g;);v._next=b||null}}return(s=new xe(s,i))._enter=c,s._exit=u,s},enter:function(){return new xe(this._enter||this._groups.map(vt),this._parents)},exit:function(){return new xe(this._exit||this._groups.map(vt),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new xe(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=wt);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,u=i[a]=new Array(c),l=0;l<c;++l)(o=s[l])&&(u[l]=o);u.sort(e)}return new xe(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=Ct(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?St:Et:"function"==typeof e?n.local?Dt:Nt:n.local?Mt:At)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Lt:"function"==typeof e?It:Ot)(t,e,null==n?"":n)):Rt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ft:"function"==typeof e?Yt:Pt)(t,e)):this.node()[t]},classed:function(t,e){var n=jt(t+"");if(arguments.length<2){for(var r=Ut(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Vt:e?Ht:Wt)(n,e))},text:function(t){return arguments.length?this.each(null==t?Gt:("function"==typeof t?Zt:Xt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Qt:("function"==typeof t?Jt:Kt)(t)):this.node().innerHTML},raise:function(){return this.each(te)},lower:function(){return this.each(ee)},append:function(t){var e="function"==typeof t?t:ie(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ie(t),r=null==e?ae:"function"==typeof e?e:pt(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(oe)},clone:function(t){return this.select(t?ce:se)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=de(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?ge:pe,null==n&&(n=!1),r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,u=0,l=s.length;u<l;++u)for(r=0,c=s[u];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?be:ve)(t,e))}};const ke=we;function Te(t){return"string"==typeof t?new xe([[document.querySelector(t)]],[document.documentElement]):new xe([[t]],_e)}function Ce(){le.stopImmediatePropagation()}function Ee(){le.preventDefault(),le.stopImmediatePropagation()}function Se(t){var e=t.document.documentElement,n=Te(t).on("dragstart.drag",Ee,!0);"onselectstart"in e?n.on("selectstart.drag",Ee,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Ae(t,e){var n=t.document.documentElement,r=Te(t).on("dragstart.drag",null);e&&(r.on("click.drag",Ee,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Me(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ne(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function De(){}var Be=.7,Le=1/Be,Oe="\\s*([+-]?\\d+)\\s*",Ie="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fe=/^#([0-9a-f]{3,8})$/,Pe=new RegExp("^rgb\\("+[Oe,Oe,Oe]+"\\)$"),Ye=new RegExp("^rgb\\("+[Re,Re,Re]+"\\)$"),je=new RegExp("^rgba\\("+[Oe,Oe,Oe,Ie]+"\\)$"),Ue=new RegExp("^rgba\\("+[Re,Re,Re,Ie]+"\\)$"),ze=new RegExp("^hsl\\("+[Ie,Re,Re]+"\\)$"),$e=new RegExp("^hsla\\("+[Ie,Re,Re,Ie]+"\\)$"),qe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function He(){return this.rgb().formatHex()}function We(){return this.rgb().formatRgb()}function Ve(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Fe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ge(e):3===n?new Ke(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Xe(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Xe(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Pe.exec(t))?new Ke(e[1],e[2],e[3],1):(e=Ye.exec(t))?new Ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=je.exec(t))?Xe(e[1],e[2],e[3],e[4]):(e=Ue.exec(t))?Xe(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ze.exec(t))?nn(e[1],e[2]/100,e[3]/100,1):(e=$e.exec(t))?nn(e[1],e[2]/100,e[3]/100,e[4]):qe.hasOwnProperty(t)?Ge(qe[t]):"transparent"===t?new Ke(NaN,NaN,NaN,0):null}function Ge(t){return new Ke(t>>16&255,t>>8&255,255&t,1)}function Xe(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ke(t,e,n,r)}function Ze(t){return t instanceof De||(t=Ve(t)),t?new Ke((t=t.rgb()).r,t.g,t.b,t.opacity):new Ke}function Qe(t,e,n,r){return 1===arguments.length?Ze(t):new Ke(t,e,n,null==r?1:r)}function Ke(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Je(){return"#"+en(this.r)+en(this.g)+en(this.b)}function tn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function en(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function nn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new on(t,e,n,r)}function rn(t){if(t instanceof on)return new on(t.h,t.s,t.l,t.opacity);if(t instanceof De||(t=Ve(t)),!t)return new on;if(t instanceof on)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new on(o,s,c,t.opacity)}function an(t,e,n,r){return 1===arguments.length?rn(t):new on(t,e,n,null==r?1:r)}function on(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function sn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function cn(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}function un(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return cn((n-r/e)*e,o,i,a,s)}}function ln(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return cn((n-r/e)*e,i,a,o,s)}}function hn(t){return function(){return t}}function fn(t,e){return function(n){return t+n*e}}function dn(t,e){var n=e-t;return n?fn(t,n>180||n<-180?n-360*Math.round(n/360):n):hn(isNaN(t)?e:t)}function pn(t,e){var n=e-t;return n?fn(t,n):hn(isNaN(t)?e:t)}Me(De,Ve,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:He,formatHex:He,formatHsl:function(){return rn(this).formatHsl()},formatRgb:We,toString:We}),Me(Ke,Qe,Ne(De,{brighter:function(t){return t=null==t?Le:Math.pow(Le,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Be:Math.pow(Be,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Je,formatHex:Je,formatRgb:tn,toString:tn})),Me(on,an,Ne(De,{brighter:function(t){return t=null==t?Le:Math.pow(Le,t),new on(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Be:Math.pow(Be,t),new on(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ke(sn(t>=240?t-240:t+120,i,r),sn(t,i,r),sn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const gn=function t(e){var n=function(t){return 1==(t=+t)?pn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):hn(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=Qe(t)).r,(e=Qe(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=pn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function yn(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=Qe(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}var mn=yn(un),vn=yn(ln);function bn(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function _n(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function xn(t,e){return(_n(e)?bn:wn)(t,e)}function wn(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=Mn(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function kn(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Tn(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Cn(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=Mn(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var En=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Sn=new RegExp(En.source,"g");function An(t,e){var n,r,i,a=En.lastIndex=Sn.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=En.exec(t))&&(r=Sn.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:Tn(n,r)})),a=Sn.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function Mn(t,e){var n,r=typeof e;return null==e||"boolean"===r?hn(e):("number"===r?Tn:"string"===r?(n=Ve(e))?(e=n,gn):An:e instanceof Ve?gn:e instanceof Date?kn:_n(e)?bn:Array.isArray(e)?wn:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Cn:Tn)(t,e)}function Nn(){for(var t,e=le;t=e.sourceEvent;)e=t;return e}function Dn(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}function Bn(t,e,n){arguments.length<3&&(n=e,e=Nn().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return Dn(t,r);return null}function Ln(t){var e=Nn();return e.changedTouches&&(e=e.changedTouches[0]),Dn(t,e)}var On,In,Rn=0,Fn=0,Pn=0,Yn=0,jn=0,Un=0,zn="object"==typeof performance&&performance.now?performance:Date,$n="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function qn(){return jn||($n(Hn),jn=zn.now()+Un)}function Hn(){jn=0}function Wn(){this._call=this._time=this._next=null}function Vn(t,e,n){var r=new Wn;return r.restart(t,e,n),r}function Gn(){qn(),++Rn;for(var t,e=On;e;)(t=jn-e._time)>=0&&e._call.call(null,t),e=e._next;--Rn}function Xn(){jn=(Yn=zn.now())+Un,Rn=Fn=0;try{Gn()}finally{Rn=0,function(){for(var t,e,n=On,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:On=e);In=t,Qn(r)}(),jn=0}}function Zn(){var t=zn.now(),e=t-Yn;e>1e3&&(Un-=e,Yn=t)}function Qn(t){Rn||(Fn&&(Fn=clearTimeout(Fn)),t-jn>24?(t<1/0&&(Fn=setTimeout(Xn,t-zn.now()-Un)),Pn&&(Pn=clearInterval(Pn))):(Pn||(Yn=zn.now(),Pn=setInterval(Zn,1e3)),Rn=1,$n(Xn)))}function Kn(t,e,n){var r=new Wn;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Wn.prototype=Vn.prototype={constructor:Wn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?qn():+n)+(null==e?0:+e),this._next||In===this||(In?In._next=this:On=this,In=this),this._call=t,this._time=n,Qn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qn())}};var Jn=ft("start","end","cancel","interrupt"),tr=[];function er(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(c){var u,l,h,f;if(1!==n.state)return s();for(u in i)if((f=i[u]).name===n.name){if(3===f.state)return Kn(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+u<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[u])}if(Kn((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,l=-1;u<h;++u)(f=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Vn((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Jn,tween:tr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function nr(t,e){var n=ir(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function rr(t,e){var n=ir(t,e);if(n.state>3)throw new Error("too late; already running");return n}function ir(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ar(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}var or,sr,cr,ur,lr=180/Math.PI,hr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fr(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*lr,skewX:Math.atan(c)*lr,scaleX:o,scaleY:s}}function dr(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:Tn(t,i)},{i:c-2,x:Tn(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Tn(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Tn(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Tn(t,n)},{i:s-2,x:Tn(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var pr=dr((function(t){return"none"===t?hr:(or||(or=document.createElement("DIV"),sr=document.documentElement,cr=document.defaultView),or.style.transform=t,t=cr.getComputedStyle(sr.appendChild(or),null).getPropertyValue("transform"),sr.removeChild(or),fr(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),gr=dr((function(t){return null==t?hr:(ur||(ur=document.createElementNS("http://www.w3.org/2000/svg","g")),ur.setAttribute("transform",t),(t=ur.transform.baseVal.consolidate())?fr((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):hr)}),", ",")",")");function yr(t,e){var n,r;return function(){var i=rr(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function mr(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=rr(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}a.tween=i}}function vr(t,e,n){var r=t._id;return t.each((function(){var t=rr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return ir(t,r).value[e]}}function br(t,e){var n;return("number"==typeof e?Tn:e instanceof Ve?gn:(n=Ve(e))?(e=n,gn):An)(t,e)}function _r(t){return function(){this.removeAttribute(t)}}function xr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function wr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function kr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function Tr(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function Cr(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function Er(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Sr(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Ar(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Sr(t,i)),n}return i._value=e,i}function Mr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Er(t,i)),n}return i._value=e,i}function Nr(t,e){return function(){nr(this,t).delay=+e.apply(this,arguments)}}function Dr(t,e){return e=+e,function(){nr(this,t).delay=e}}function Br(t,e){return function(){rr(this,t).duration=+e.apply(this,arguments)}}function Lr(t,e){return e=+e,function(){rr(this,t).duration=e}}function Or(t,e){if("function"!=typeof e)throw new Error;return function(){rr(this,t).ease=e}}function Ir(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?nr:rr;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Rr=ke.prototype.constructor;function Fr(t){return function(){this.style.removeProperty(t)}}function Pr(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Yr(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Pr(t,a,n)),r}return a._value=e,a}function jr(t){return function(e){this.textContent=t.call(this,e)}}function Ur(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&jr(r)),e}return r._value=t,r}var zr=0;function $r(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function qr(t){return ke().transition(t)}function Hr(){return++zr}var Wr=ke.prototype;function Vr(t){return t*t*t}function Gr(t){return--t*t*t+1}function Xr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}$r.prototype=qr.prototype={constructor:$r,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=pt(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,u=r[o],l=u.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=u[f])&&(c=t.call(s,s.__data__,f,u))&&("__data__"in s&&(c.__data__=s.__data__),h[f]=c,er(h[f],e,n,f,h,ir(s,n)));return new $r(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=yt(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,u=r[s],l=u.length,h=0;h<l;++h)if(c=u[h]){for(var f,d=t.call(c,c.__data__,h,u),p=ir(c,n),g=0,y=d.length;g<y;++g)(f=d[g])&&er(f,e,n,g,d,p);a.push(d),o.push(c)}return new $r(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=mt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new $r(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new $r(o,this._parents,this._name,this._id)},selection:function(){return new Rr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Hr(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)if(o=s[u]){var l=ir(o,e);er(o,t,n,u,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new $r(r,this._parents,t,n)},call:Wr.call,nodes:Wr.nodes,node:Wr.node,size:Wr.size,empty:Wr.empty,each:Wr.each,on:function(t,e){var n=this._id;return arguments.length<2?ir(this.node(),n).on.on(t):this.each(Ir(n,t,e))},attr:function(t,e){var n=Ct(t),r="transform"===n?gr:br;return this.attrTween(t,"function"==typeof e?(n.local?Cr:Tr)(n,r,vr(this,"attr."+t,e)):null==e?(n.local?xr:_r)(n):(n.local?kr:wr)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Ct(t);return this.tween(n,(r.local?Ar:Mr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?pr:br;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Rt(this,t),o=(this.style.removeProperty(t),Rt(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Fr(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Rt(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=Rt(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,vr(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=rr(this,t),u=c.on,l=null==c.value[o]?a||(a=Fr(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(s,i=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Rt(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Yr(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(vr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Ur(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=ir(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?yr:mr)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Nr:Dr)(e,t)):ir(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Br:Lr)(e,t)):ir(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Or(e,t)):ir(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=rr(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e}))}))}};var Zr={time:null,delay:0,duration:250,ease:Xr};function Qr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Zr.time=qn(),Zr;return n}ke.prototype.interrupt=function(t){return this.each((function(){ar(this,t)}))},ke.prototype.transition=function(t){var e,n;t instanceof $r?(e=t._id,t=t._name):(e=Hr(),(n=Zr).time=qn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)(o=s[u])&&er(o,t,e,u,s,n||Qr(o,e));return new $r(r,this._parents,t,e)};var Kr=[null];function Jr(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+"",i)if((n=i[r]).state>1&&n.name===e)return new $r([[t]],Kr,e,+r);return null}function ti(t){return function(){return t}}function ei(t,e,n){this.target=t,this.type=e,this.selection=n}function ni(){le.stopImmediatePropagation()}function ri(){le.preventDefault(),le.stopImmediatePropagation()}var ii={name:"drag"},ai={name:"space"},oi={name:"handle"},si={name:"center"};function ci(t){return[+t[0],+t[1]]}function ui(t){return[ci(t[0]),ci(t[1])]}function li(t){return function(e){return Bn(e,le.touches,t)}}var hi={name:"x",handles:["w","e"].map(bi),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},fi={name:"y",handles:["n","s"].map(bi),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},di={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(bi),input:function(t){return null==t?null:ui(t)},output:function(t){return t}},pi={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},gi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},yi={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},mi={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},vi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function bi(t){return{type:t}}function _i(){return!le.ctrlKey&&!le.button}function xi(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function wi(){return navigator.maxTouchPoints||"ontouchstart"in this}function ki(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Ti(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Ci(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function Ei(){return Mi(hi)}function Si(){return Mi(fi)}function Ai(){return Mi(di)}function Mi(t){var e,n=xi,r=_i,i=wi,a=!0,o=ft("start","brush","end"),s=6;function c(e){var n=e.property("__brush",g).selectAll(".overlay").data([bi("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",pi.overlay).merge(n).each((function(){var t=ki(this).extent;Te(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([bi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",pi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return pi[t.type]})),e.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(i).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function u(){var t=Te(this),e=ki(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new h(t,e,n):r}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function f(){if((!e||le.touches)&&r.apply(this,arguments)){var n,i,o,s,c,h,f,d,p,g,y,m=this,v=le.target.__data__.type,b="selection"===(a&&le.metaKey?v="overlay":v)?ii:a&&le.altKey?si:oi,_=t===fi?null:mi[v],x=t===hi?null:vi[v],w=ki(m),k=w.extent,T=w.selection,C=k[0][0],E=k[0][1],S=k[1][0],A=k[1][1],M=0,N=0,D=_&&x&&a&&le.shiftKey,B=le.touches?li(le.changedTouches[0].identifier):Ln,L=B(m),O=L,I=l(m,arguments,!0).beforestart();"overlay"===v?(T&&(p=!0),w.selection=T=[[n=t===fi?C:L[0],o=t===hi?E:L[1]],[c=t===fi?S:n,f=t===hi?A:o]]):(n=T[0][0],o=T[0][1],c=T[1][0],f=T[1][1]),i=n,s=o,h=c,d=f;var R=Te(m).attr("pointer-events","none"),F=R.selectAll(".overlay").attr("cursor",pi[v]);if(le.touches)I.moved=Y,I.ended=U;else{var P=Te(le.view).on("mousemove.brush",Y,!0).on("mouseup.brush",U,!0);a&&P.on("keydown.brush",z,!0).on("keyup.brush",$,!0),Se(le.view)}ni(),ar(m),u.call(m),I.start()}function Y(){var t=B(m);!D||g||y||(Math.abs(t[0]-O[0])>Math.abs(t[1]-O[1])?y=!0:g=!0),O=t,p=!0,ri(),j()}function j(){var t;switch(M=O[0]-L[0],N=O[1]-L[1],b){case ai:case ii:_&&(M=Math.max(C-n,Math.min(S-c,M)),i=n+M,h=c+M),x&&(N=Math.max(E-o,Math.min(A-f,N)),s=o+N,d=f+N);break;case oi:_<0?(M=Math.max(C-n,Math.min(S-n,M)),i=n+M,h=c):_>0&&(M=Math.max(C-c,Math.min(S-c,M)),i=n,h=c+M),x<0?(N=Math.max(E-o,Math.min(A-o,N)),s=o+N,d=f):x>0&&(N=Math.max(E-f,Math.min(A-f,N)),s=o,d=f+N);break;case si:_&&(i=Math.max(C,Math.min(S,n-M*_)),h=Math.max(C,Math.min(S,c+M*_))),x&&(s=Math.max(E,Math.min(A,o-N*x)),d=Math.max(E,Math.min(A,f+N*x)))}h<i&&(_*=-1,t=n,n=c,c=t,t=i,i=h,h=t,v in gi&&F.attr("cursor",pi[v=gi[v]])),d<s&&(x*=-1,t=o,o=f,f=t,t=s,s=d,d=t,v in yi&&F.attr("cursor",pi[v=yi[v]])),w.selection&&(T=w.selection),g&&(i=T[0][0],h=T[1][0]),y&&(s=T[0][1],d=T[1][1]),T[0][0]===i&&T[0][1]===s&&T[1][0]===h&&T[1][1]===d||(w.selection=[[i,s],[h,d]],u.call(m),I.brush())}function U(){if(ni(),le.touches){if(le.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else Ae(le.view,p),P.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);R.attr("pointer-events","all"),F.attr("cursor",pi.overlay),w.selection&&(T=w.selection),Ti(T)&&(w.selection=null,u.call(m)),I.end()}function z(){switch(le.keyCode){case 16:D=_&&x;break;case 18:b===oi&&(_&&(c=h-M*_,n=i+M*_),x&&(f=d-N*x,o=s+N*x),b=si,j());break;case 32:b!==oi&&b!==si||(_<0?c=h-M:_>0&&(n=i-M),x<0?f=d-N:x>0&&(o=s-N),b=ai,F.attr("cursor",pi.selection),j());break;default:return}ri()}function $(){switch(le.keyCode){case 16:D&&(g=y=D=!1,j());break;case 18:b===si&&(_<0?c=h:_>0&&(n=i),x<0?f=d:x>0&&(o=s),b=oi,j());break;case 32:b===ai&&(le.altKey?(_&&(c=h-M*_,n=i+M*_),x&&(f=d-N*x,o=s+N*x),b=si):(_<0?c=h:_>0&&(n=i),x<0?f=d:x>0&&(o=s),b=oi),F.attr("cursor",pi[v]),j());break;default:return}ri()}}function d(){l(this,arguments).moved()}function p(){l(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=ui(n.apply(this,arguments)),e.dim=t,e}return c.move=function(e,n){e.selection?e.on("start.brush",(function(){l(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){l(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=l(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=Mn(a,o);function c(t){r.selection=1===t&&null===o?null:s(t),u.call(e),i.brush()}return null!==a&&null!==o?c:c(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,a=t.input("function"==typeof n?n.apply(e,r):n,i.extent),o=l(e,r).beforestart();ar(e),i.selection=null===a?null:a,u.call(e),o.start().brush().end()}))},c.clear=function(t){c.move(t,null)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){ye(new ei(c,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},c.extent=function(t){return arguments.length?(n="function"==typeof t?t:ti(ui(t)),c):n},c.filter=function(t){return arguments.length?(r="function"==typeof t?t:ti(!!t),c):r},c.touchable=function(t){return arguments.length?(i="function"==typeof t?t:ti(!!t),c):i},c.handleSize=function(t){return arguments.length?(s=+t,c):s},c.keyModifiers=function(t){return arguments.length?(a=!!t,c):a},c.on=function(){var t=o.on.apply(o,arguments);return t===o?c:t},c}var Ni=Math.cos,Di=Math.sin,Bi=Math.PI,Li=Bi/2,Oi=2*Bi,Ii=Math.max;function Ri(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function Fi(){var t=0,e=null,n=null,r=null;function i(i){var a,o,s,c,u,l,h=i.length,f=[],d=k(h),p=[],g=[],y=g.groups=new Array(h),m=new Array(h*h);for(a=0,u=-1;++u<h;){for(o=0,l=-1;++l<h;)o+=i[u][l];f.push(o),p.push(k(h)),a+=o}for(e&&d.sort((function(t,n){return e(f[t],f[n])})),n&&p.forEach((function(t,e){t.sort((function(t,r){return n(i[e][t],i[e][r])}))})),c=(a=Ii(0,Oi-t*h)/a)?t:Oi/h,o=0,u=-1;++u<h;){for(s=o,l=-1;++l<h;){var v=d[u],b=p[v][l],_=i[v][b],x=o,w=o+=_*a;m[b*h+v]={index:v,subindex:b,startAngle:x,endAngle:w,value:_}}y[v]={index:v,startAngle:s,endAngle:o,value:f[v]},o+=c}for(u=-1;++u<h;)for(l=u-1;++l<h;){var T=m[l*h+u],C=m[u*h+l];(T.value||C.value)&&g.push(T.value<C.value?{source:C,target:T}:{source:T,target:C})}return r?g.sort(r):g}return i.padAngle=function(e){return arguments.length?(t=Ii(0,e),i):t},i.sortGroups=function(t){return arguments.length?(e=t,i):e},i.sortSubgroups=function(t){return arguments.length?(n=t,i):n},i.sortChords=function(t){return arguments.length?(null==t?r=null:(r=Ri(t))._=t,i):r&&r._},i}var Pi=Array.prototype.slice;function Yi(t){return function(){return t}}var ji=Math.PI,Ui=2*ji,zi=1e-6,$i=Ui-zi;function qi(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Hi(){return new qi}qi.prototype=Hi.prototype={constructor:qi,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,c=r-e,u=a-t,l=o-e,h=u*u+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>zi)if(Math.abs(l*s-c*u)>zi&&i){var f=n-a,d=r-o,p=s*s+c*c,g=f*f+d*d,y=Math.sqrt(p),m=Math.sqrt(h),v=i*Math.tan((ji-Math.acos((p+h-g)/(2*y*m)))/2),b=v/m,_=v/y;Math.abs(b-1)>zi&&(this._+="L"+(t+b*u)+","+(e+b*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>u*d)+","+(this._x1=t+_*s)+","+(this._y1=e+_*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),c=t+o,u=e+s,l=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+u:(Math.abs(this._x1-c)>zi||Math.abs(this._y1-u)>zi)&&(this._+="L"+c+","+u),n&&(h<0&&(h=h%Ui+Ui),h>$i?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=c)+","+(this._y1=u):h>zi&&(this._+="A"+n+","+n+",0,"+ +(h>=ji)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const Wi=Hi;function Vi(t){return t.source}function Gi(t){return t.target}function Xi(t){return t.radius}function Zi(t){return t.startAngle}function Qi(t){return t.endAngle}function Ki(){var t=Vi,e=Gi,n=Xi,r=Zi,i=Qi,a=null;function o(){var o,s=Pi.call(arguments),c=t.apply(this,s),u=e.apply(this,s),l=+n.apply(this,(s[0]=c,s)),h=r.apply(this,s)-Li,f=i.apply(this,s)-Li,d=l*Ni(h),p=l*Di(h),g=+n.apply(this,(s[0]=u,s)),y=r.apply(this,s)-Li,m=i.apply(this,s)-Li;if(a||(a=o=Wi()),a.moveTo(d,p),a.arc(0,0,l,h,f),h===y&&f===m||(a.quadraticCurveTo(0,0,g*Ni(y),g*Di(y)),a.arc(0,0,g,y,m)),a.quadraticCurveTo(0,0,d,p),a.closePath(),o)return a=null,o+""||null}return o.radius=function(t){return arguments.length?(n="function"==typeof t?t:Yi(+t),o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Yi(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Yi(+t),o):i},o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(t){return arguments.length?(e=t,o):e},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}var Ji="$";function ta(){}function ea(t,e){var n=new ta;if(t instanceof ta)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}ta.prototype=ea.prototype={constructor:ta,has:function(t){return Ji+t in this},get:function(t){return this[Ji+t]},set:function(t,e){return this[Ji+t]=e,this},remove:function(t){var e=Ji+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===Ji&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===Ji&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===Ji&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===Ji&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===Ji&&++t;return t},empty:function(){for(var t in this)if(t[0]===Ji)return!1;return!0},each:function(t){for(var e in this)e[0]===Ji&&t(this[e],e.slice(1),this)}};const na=ea;function ra(){var t,e,n,r=[],i=[];function a(n,i,o,s){if(i>=r.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var c,u,l,h=-1,f=n.length,d=r[i++],p=na(),g=o();++h<f;)(l=p.get(c=d(u=n[h])+""))?l.push(u):p.set(c,[u]);return p.each((function(t,e){s(g,e,a(t,i,o,s))})),g}function o(t,n){if(++n>r.length)return t;var a,s=i[n-1];return null!=e&&n>=r.length?a=t.entries():(a=[],t.each((function(t,e){a.push({key:e,values:o(t,n)})}))),null!=s?a.sort((function(t,e){return s(t.key,e.key)})):a}return n={object:function(t){return a(t,0,ia,aa)},map:function(t){return a(t,0,oa,sa)},entries:function(t){return o(a(t,0,oa,sa),0)},key:function(t){return r.push(t),n},sortKeys:function(t){return i[r.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}}function ia(){return{}}function aa(t,e,n){t[e]=n}function oa(){return na()}function sa(t,e,n){t.set(e,n)}function ca(){}var ua=na.prototype;function la(t,e){var n=new ca;if(t instanceof ca)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}ca.prototype=la.prototype={constructor:ca,has:ua.has,add:function(t){return this[Ji+(t+="")]=t,this},remove:ua.remove,clear:ua.clear,values:ua.keys,size:ua.size,empty:ua.empty,each:ua.each};const ha=la;function fa(t){var e=[];for(var n in t)e.push(n);return e}function da(t){var e=[];for(var n in t)e.push(t[n]);return e}function pa(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e}var ga=Math.PI/180,ya=180/Math.PI,ma=.96422,va=.82521,ba=4/29,_a=6/29,xa=3*_a*_a;function wa(t){if(t instanceof Ca)return new Ca(t.l,t.a,t.b,t.opacity);if(t instanceof La)return Oa(t);t instanceof Ke||(t=Ze(t));var e,n,r=Ma(t.r),i=Ma(t.g),a=Ma(t.b),o=Ea((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=Ea((.4360747*r+.3850649*i+.1430804*a)/ma),n=Ea((.0139322*r+.0971045*i+.7141733*a)/va)),new Ca(116*o-16,500*(e-o),200*(o-n),t.opacity)}function ka(t,e){return new Ca(t,0,0,null==e?1:e)}function Ta(t,e,n,r){return 1===arguments.length?wa(t):new Ca(t,e,n,null==r?1:r)}function Ca(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Ea(t){return t>.008856451679035631?Math.pow(t,1/3):t/xa+ba}function Sa(t){return t>_a?t*t*t:xa*(t-ba)}function Aa(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ma(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Na(t){if(t instanceof La)return new La(t.h,t.c,t.l,t.opacity);if(t instanceof Ca||(t=wa(t)),0===t.a&&0===t.b)return new La(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*ya;return new La(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Da(t,e,n,r){return 1===arguments.length?Na(t):new La(n,e,t,null==r?1:r)}function Ba(t,e,n,r){return 1===arguments.length?Na(t):new La(t,e,n,null==r?1:r)}function La(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Oa(t){if(isNaN(t.h))return new Ca(t.l,0,0,t.opacity);var e=t.h*ga;return new Ca(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Me(Ca,Ta,Ne(De,{brighter:function(t){return new Ca(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Ca(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Ke(Aa(3.1338561*(e=ma*Sa(e))-1.6168667*(t=1*Sa(t))-.4906146*(n=va*Sa(n))),Aa(-.9787684*e+1.9161415*t+.033454*n),Aa(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Me(La,Ba,Ne(De,{brighter:function(t){return new La(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new La(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Oa(this).rgb()}}));var Ia=-.14861,Ra=1.78277,Fa=-.29227,Pa=-.90649,Ya=1.97294,ja=Ya*Pa,Ua=Ya*Ra,za=Ra*Fa-Pa*Ia;function $a(t){if(t instanceof Ha)return new Ha(t.h,t.s,t.l,t.opacity);t instanceof Ke||(t=Ze(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(za*r+ja*e-Ua*n)/(za+ja-Ua),a=r-i,o=(Ya*(n-i)-Fa*a)/Pa,s=Math.sqrt(o*o+a*a)/(Ya*i*(1-i)),c=s?Math.atan2(o,a)*ya-120:NaN;return new Ha(c<0?c+360:c,s,i,t.opacity)}function qa(t,e,n,r){return 1===arguments.length?$a(t):new Ha(t,e,n,null==r?1:r)}function Ha(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Me(Ha,qa,Ne(De,{brighter:function(t){return t=null==t?Le:Math.pow(Le,t),new Ha(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Be:Math.pow(Be,t),new Ha(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*ga,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Ke(255*(e+n*(Ia*r+Ra*i)),255*(e+n*(Fa*r+Pa*i)),255*(e+n*(Ya*r)),this.opacity)}}));var Wa=Array.prototype.slice;function Va(t,e){return t-e}function Ga(t){return function(){return t}}function Xa(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=Za(t,e[r]))return n;return 0}function Za(t,e){for(var n=e[0],r=e[1],i=-1,a=0,o=t.length,s=o-1;a<o;s=a++){var c=t[a],u=c[0],l=c[1],h=t[s],f=h[0],d=h[1];if(Qa(c,h,e))return 0;l>r!=d>r&&n<(f-u)*(r-l)/(d-l)+u&&(i=-i)}return i}function Qa(t,e,n){var r,i,a,o;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],a=n[r],o=e[r],i<=a&&a<=o||o<=a&&a<=i)}function Ka(){}var Ja=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function to(){var t=1,e=1,n=N,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Va);else{var r=m(t),i=r[0],o=r[1];e=M(i,o,e),e=k(Math.floor(i/e)*e,Math.floor(o/e)*e,e)}return e.map((function(e){return a(t,e)}))}function a(n,i){var a=[],s=[];return function(n,r,i){var a,s,c,u,l,h,f=new Array,d=new Array;for(a=s=-1,u=n[0]>=r,Ja[u<<1].forEach(p);++a<t-1;)c=u,u=n[a+1]>=r,Ja[c|u<<1].forEach(p);for(Ja[u<<0].forEach(p);++s<e-1;){for(a=-1,u=n[s*t+t]>=r,l=n[s*t]>=r,Ja[u<<1|l<<2].forEach(p);++a<t-1;)c=u,u=n[s*t+t+a+1]>=r,h=l,l=n[s*t+a+1]>=r,Ja[c|u<<1|l<<2|h<<3].forEach(p);Ja[u|l<<3].forEach(p)}for(a=-1,l=n[s*t]>=r,Ja[l<<2].forEach(p);++a<t-1;)h=l,l=n[s*t+a+1]>=r,Ja[l<<2|h<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+a,t[0][1]+s],c=[t[1][0]+a,t[1][1]+s],u=o(r),l=o(c);(e=d[u])?(n=f[l])?(delete d[e.end],delete f[n.start],e===n?(e.ring.push(c),i(e.ring)):f[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete d[e.end],e.ring.push(c),d[e.end=l]=e):(e=f[l])?(n=d[u])?(delete f[e.start],delete d[n.end],e===n?(e.ring.push(c),i(e.ring)):f[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete f[e.start],e.ring.unshift(r),f[e.start=u]=e):f[u]=d[l]={start:u,end:l,ring:[r,c]}}Ja[l<<3].forEach(p)}(n,i,(function(t){r(t,n,i),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?a.push([t]):s.push(t)})),s.forEach((function(t){for(var e,n=0,r=a.length;n<r;++n)if(-1!==Xa((e=a[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:i,coordinates:a}}function o(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,i){n.forEach((function(n){var a,o=n[0],s=n[1],c=0|o,u=0|s,l=r[u*t+c];o>0&&o<t&&c===o&&(a=r[u*t+c-1],n[0]=o+(i-a)/(l-a)-.5),s>0&&s<e&&u===s&&(a=r[(u-1)*t+c],n[1]=s+(i-a)/(l-a)-.5)}))}return i.contour=a,i.size=function(n){if(!arguments.length)return[t,e];var r=Math.ceil(n[0]),a=Math.ceil(n[1]);if(!(r>0&&a>0))throw new Error("invalid size");return t=r,e=a,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Ga(Wa.call(t)):Ga(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:Ka,i):r===s},i}function eo(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<i;++o)for(var s=0,c=0;s<r+n;++s)s<r&&(c+=t.data[s+o*r]),s>=n&&(s>=a&&(c-=t.data[s-a+o*r]),e.data[s-n+o*r]=c/Math.min(s+1,r-1+a-s,a))}function no(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<r;++o)for(var s=0,c=0;s<i+n;++s)s<i&&(c+=t.data[o+s*r]),s>=n&&(s>=a&&(c-=t.data[o+(s-a)*r]),e.data[o+(s-n)*r]=c/Math.min(s+1,i-1+a-s,a))}function ro(t){return t[0]}function io(t){return t[1]}function ao(){return 1}function oo(){var t=ro,e=io,n=ao,r=960,i=500,a=20,o=2,s=3*a,c=r+2*s>>o,u=i+2*s>>o,l=Ga(20);function h(r){var i=new Float32Array(c*u),h=new Float32Array(c*u);r.forEach((function(r,a,l){var h=+t(r,a,l)+s>>o,f=+e(r,a,l)+s>>o,d=+n(r,a,l);h>=0&&h<c&&f>=0&&f<u&&(i[h+f*c]+=d)})),eo({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),no({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o),eo({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),no({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o),eo({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),no({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o);var d=l(i);if(!Array.isArray(d)){var p=I(i);d=M(0,p,d),(d=k(0,Math.floor(p/d)*d,d)).shift()}return to().thresholds(d).size([c,u])(i).map(f)}function f(t){return t.value*=Math.pow(2,-2*o),t.coordinates.forEach(d),t}function d(t){t.forEach(p)}function p(t){t.forEach(g)}function g(t){t[0]=t[0]*Math.pow(2,o)-s,t[1]=t[1]*Math.pow(2,o)-s}function y(){return c=r+2*(s=3*a)>>o,u=i+2*s>>o,h}return h.x=function(e){return arguments.length?(t="function"==typeof e?e:Ga(+e),h):t},h.y=function(t){return arguments.length?(e="function"==typeof t?t:Ga(+t),h):e},h.weight=function(t){return arguments.length?(n="function"==typeof t?t:Ga(+t),h):n},h.size=function(t){if(!arguments.length)return[r,i];var e=Math.ceil(t[0]),n=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return r=e,i=n,y()},h.cellSize=function(t){if(!arguments.length)return 1<<o;if(!((t=+t)>=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(t)/Math.LN2),y()},h.thresholds=function(t){return arguments.length?(l="function"==typeof t?t:Array.isArray(t)?Ga(Wa.call(t)):Ga(t),h):l},h.bandwidth=function(t){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return a=Math.round((Math.sqrt(4*t*t+1)-1)/2),y()},h}function so(t){return function(){return t}}function co(t,e,n,r,i,a,o,s,c,u){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=a,this.y=o,this.dx=s,this.dy=c,this._=u}function uo(){return!le.ctrlKey&&!le.button}function lo(){return this.parentNode}function ho(t){return null==t?{x:le.x,y:le.y}:t}function fo(){return navigator.maxTouchPoints||"ontouchstart"in this}function po(){var t,e,n,r,i=uo,a=lo,o=ho,s=fo,c={},u=ft("start","drag","end"),l=0,h=0;function f(t){t.on("mousedown.drag",d).filter(s).on("touchstart.drag",y).on("touchmove.drag",m).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(){if(!r&&i.apply(this,arguments)){var o=b("mouse",a.apply(this,arguments),Ln,this,arguments);o&&(Te(le.view).on("mousemove.drag",p,!0).on("mouseup.drag",g,!0),Se(le.view),Ce(),n=!1,t=le.clientX,e=le.clientY,o("start"))}}function p(){if(Ee(),!n){var r=le.clientX-t,i=le.clientY-e;n=r*r+i*i>h}c.mouse("drag")}function g(){Te(le.view).on("mousemove.drag mouseup.drag",null),Ae(le.view,n),Ee(),c.mouse("end")}function y(){if(i.apply(this,arguments)){var t,e,n=le.changedTouches,r=a.apply(this,arguments),o=n.length;for(t=0;t<o;++t)(e=b(n[t].identifier,r,Bn,this,arguments))&&(Ce(),e("start"))}}function m(){var t,e,n=le.changedTouches,r=n.length;for(t=0;t<r;++t)(e=c[n[t].identifier])&&(Ee(),e("drag"))}function v(){var t,e,n=le.changedTouches,i=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(e=c[n[t].identifier])&&(Ce(),e("end"))}function b(t,e,n,r,i){var a,s,h,d=n(e,t),p=u.copy();if(ye(new co(f,"beforestart",a,t,l,d[0],d[1],0,0,p),(function(){return null!=(le.subject=a=o.apply(r,i))&&(s=a.x-d[0]||0,h=a.y-d[1]||0,!0)})))return function o(u){var g,y=d;switch(u){case"start":c[t]=o,g=l++;break;case"end":delete c[t],--l;case"drag":d=n(e,t),g=l}ye(new co(f,u,a,t,g,d[0]+s,d[1]+h,d[0]-y[0],d[1]-y[1],p),p.apply,p,[u,r,i])}}return f.filter=function(t){return arguments.length?(i="function"==typeof t?t:so(!!t),f):i},f.container=function(t){return arguments.length?(a="function"==typeof t?t:so(t),f):a},f.subject=function(t){return arguments.length?(o="function"==typeof t?t:so(t),f):o},f.touchable=function(t){return arguments.length?(s="function"==typeof t?t:so(!!t),f):s},f.on=function(){var t=u.on.apply(u,arguments);return t===u?f:t},f.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,f):Math.sqrt(h)},f}co.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var go={},yo={};function mo(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function vo(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function bo(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function _o(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,s=0,c=a<=0,u=!1;function l(){if(c)return yo;if(u)return u=!1,go;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?c=!0:10===(r=t.charCodeAt(o++))?u=!0:13===r&&(u=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))u=!0;else if(13===r)u=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return c=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=l())!==yo;){for(var h=[];r!==go&&r!==yo;)h.push(r),r=l();e&&null==(h=e(h,s++))||i.push(h)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?function(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":function(t){return t<0?"-"+bo(-t,6):t>9999?"+"+bo(t,6):bo(t,4)}(t.getUTCFullYear())+"-"+bo(t.getUTCMonth()+1,2)+"-"+bo(t.getUTCDate(),2)+(i?"T"+bo(e,2)+":"+bo(n,2)+":"+bo(r,2)+"."+bo(i,3)+"Z":r?"T"+bo(e,2)+":"+bo(n,2)+":"+bo(r,2)+"Z":n||e?"T"+bo(e,2)+":"+bo(n,2)+"Z":"")}(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=mo(t);return function(r,i){return e(n(r),i,t)}}(t,e):mo(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=vo(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=vo(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}var xo=_o(","),wo=xo.parse,ko=xo.parseRows,To=xo.format,Co=xo.formatBody,Eo=xo.formatRows,So=xo.formatRow,Ao=xo.formatValue,Mo=_o("\t"),No=Mo.parse,Do=Mo.parseRows,Bo=Mo.format,Lo=Mo.formatBody,Oo=Mo.formatRows,Io=Mo.formatRow,Ro=Mo.formatValue;function Fo(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;Po&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}var Po=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function Yo(t){return+t}function jo(t){return t*t}function Uo(t){return t*(2-t)}function zo(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var $o=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),qo=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),Ho=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Wo=Math.PI,Vo=Wo/2;function Go(t){return 1==+t?1:1-Math.cos(t*Vo)}function Xo(t){return Math.sin(t*Vo)}function Zo(t){return(1-Math.cos(Wo*t))/2}function Qo(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Ko(t){return Qo(1-+t)}function Jo(t){return 1-Qo(t)}function ts(t){return((t*=2)<=1?Qo(1-t):2-Qo(t-1))/2}function es(t){return 1-Math.sqrt(1-t*t)}function ns(t){return Math.sqrt(1- --t*t)}function rs(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var is=7.5625;function as(t){return 1-os(1-t)}function os(t){return(t=+t)<.36363636363636365?is*t*t:t<.7272727272727273?is*(t-=.5454545454545454)*t+.75:t<.9090909090909091?is*(t-=.8181818181818182)*t+.9375:is*(t-=.9545454545454546)*t+.984375}function ss(t){return((t*=2)<=1?1-os(1-t):os(t-1)+1)/2}var cs=1.70158,us=function t(e){function n(t){return(t=+t)*t*(e*(t-1)+t)}return e=+e,n.overshoot=t,n}(cs),ls=function t(e){function n(t){return--t*t*((t+1)*e+t)+1}return e=+e,n.overshoot=t,n}(cs),hs=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(cs),fs=2*Math.PI,ds=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=fs);function i(t){return e*Qo(- --t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*fs)},i.period=function(n){return t(e,n)},i}(1,.3),ps=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=fs);function i(t){return 1-e*Qo(t=+t)*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*fs)},i.period=function(n){return t(e,n)},i}(1,.3),gs=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=fs);function i(t){return((t=2*t-1)<0?e*Qo(-t)*Math.sin((r-t)/n):2-e*Qo(t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*fs)},i.period=function(n){return t(e,n)},i}(1,.3);function ys(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function ms(t,e){return fetch(t,e).then(ys)}function vs(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function bs(t,e){return fetch(t,e).then(vs)}function _s(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function xs(t,e){return fetch(t,e).then(_s)}function ws(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),xs(e,n).then((function(e){return t(e,r)}))}}function ks(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=_o(t);return xs(e,n).then((function(t){return i.parse(t,r)}))}var Ts=ws(wo),Cs=ws(No);function Es(t,e){return new Promise((function(n,r){var i=new Image;for(var a in e)i[a]=e[a];i.onerror=r,i.onload=function(){n(i)},i.src=t}))}function Ss(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function As(t,e){return fetch(t,e).then(Ss)}function Ms(t){return function(e,n){return xs(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}const Ns=Ms("application/xml");var Ds=Ms("text/html"),Bs=Ms("image/svg+xml");function Ls(t,e){var n;function r(){var r,i,a=n.length,o=0,s=0;for(r=0;r<a;++r)o+=(i=n[r]).x,s+=i.y;for(o=o/a-t,s=s/a-e,r=0;r<a;++r)(i=n[r]).x-=o,i.y-=s}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r}function Os(t){return function(){return t}}function Is(){return 1e-6*(Math.random()-.5)}function Rs(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,s,c,u,l,h,f,d=t._root,p={data:r},g=t._x0,y=t._y0,m=t._x1,v=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((u=e>=(a=(g+m)/2))?g=a:m=a,(l=n>=(o=(y+v)/2))?y=o:v=o,i=d,!(d=d[h=l<<1|u]))return i[h]=p,t;if(s=+t._x.call(null,d.data),c=+t._y.call(null,d.data),e===s&&n===c)return p.next=d,i?i[h]=p:t._root=p,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(u=e>=(a=(g+m)/2))?g=a:m=a,(l=n>=(o=(y+v)/2))?y=o:v=o}while((h=l<<1|u)==(f=(c>=o)<<1|s>=a));return i[f]=d,i[h]=p,t}function Fs(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Ps(t){return t[0]}function Ys(t){return t[1]}function js(t,e,n){var r=new Us(null==e?Ps:e,null==n?Ys:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Us(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function zs(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var $s=js.prototype=Us.prototype;function qs(t){return t.x+t.vx}function Hs(t){return t.y+t.vy}function Ws(t){var e,n,r=1,i=1;function a(){for(var t,a,s,c,u,l,h,f=e.length,d=0;d<i;++d)for(a=js(e,qs,Hs).visitAfter(o),t=0;t<f;++t)s=e[t],l=n[s.index],h=l*l,c=s.x+s.vx,u=s.y+s.vy,a.visit(p);function p(t,e,n,i,a){var o=t.data,f=t.r,d=l+f;if(!o)return e>c+d||i<c-d||n>u+d||a<u-d;if(o.index>s.index){var p=c-o.x-o.vx,g=u-o.y-o.vy,y=p*p+g*g;y<d*d&&(0===p&&(y+=(p=Is())*p),0===g&&(y+=(g=Is())*g),y=(d-(y=Math.sqrt(y)))/y*r,s.vx+=(p*=y)*(d=(f*=f)/(h+f)),s.vy+=(g*=y)*d,o.vx-=p*(d=1-d),o.vy-=g*d)}}}function o(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function s(){if(e){var r,i,a=e.length;for(n=new Array(a),r=0;r<a;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=Os(null==t?1:+t)),a.initialize=function(t){e=t,s()},a.iterations=function(t){return arguments.length?(i=+t,a):i},a.strength=function(t){return arguments.length?(r=+t,a):r},a.radius=function(e){return arguments.length?(t="function"==typeof e?e:Os(+e),s(),a):t},a}function Vs(t){return t.index}function Gs(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function Xs(t){var e,n,r,i,a,o=Vs,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},c=Os(30),u=1;function l(r){for(var i=0,o=t.length;i<u;++i)for(var s,c,l,h,f,d,p,g=0;g<o;++g)c=(s=t[g]).source,h=(l=s.target).x+l.vx-c.x-c.vx||Is(),f=l.y+l.vy-c.y-c.vy||Is(),h*=d=((d=Math.sqrt(h*h+f*f))-n[g])/d*r*e[g],f*=d,l.vx-=h*(p=a[g]),l.vy-=f*p,c.vx+=h*(p=1-p),c.vy+=f*p}function h(){if(r){var s,c,u=r.length,l=t.length,h=na(r,o);for(s=0,i=new Array(u);s<l;++s)(c=t[s]).index=s,"object"!=typeof c.source&&(c.source=Gs(h,c.source)),"object"!=typeof c.target&&(c.target=Gs(h,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(s=0,a=new Array(l);s<l;++s)c=t[s],a[s]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);e=new Array(l),f(),n=new Array(l),d()}}function f(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+s(t[n],n,t)}function d(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+c(t[e],e,t)}return null==t&&(t=[]),l.initialize=function(t){r=t,h()},l.links=function(e){return arguments.length?(t=e,h(),l):t},l.id=function(t){return arguments.length?(o=t,l):o},l.iterations=function(t){return arguments.length?(u=+t,l):u},l.strength=function(t){return arguments.length?(s="function"==typeof t?t:Os(+t),f(),l):s},l.distance=function(t){return arguments.length?(c="function"==typeof t?t:Os(+t),d(),l):c},l}function Zs(t){return t.x}function Qs(t){return t.y}$s.copy=function(){var t,e,n=new Us(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=zs(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=zs(e));return n},$s.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Rs(this.cover(e,n),e,n,t)},$s.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),s=new Array(a),c=1/0,u=1/0,l=-1/0,h=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(o[n]=r,s[n]=i,r<c&&(c=r),r>l&&(l=r),i<u&&(u=i),i>h&&(h=i));if(c>l||u>h)return this;for(this.cover(c,u).cover(l,h),n=0;n<a;++n)Rs(this,o[n],s[n],t[n]);return this},$s.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,c=i-n,u=this._root;n>t||t>=i||r>e||e>=a;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=u,u=o,c*=2,s){case 0:i=n+c,a=r+c;break;case 1:n=i-c,a=r+c;break;case 2:i=n+c,r=a-c;break;case 3:n=i-c,r=a-c}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},$s.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},$s.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},$s.find=function(t,e,n){var r,i,a,o,s,c,u,l=this._x0,h=this._y0,f=this._x1,d=this._y1,p=[],g=this._root;for(g&&p.push(new Fs(g,l,h,f,d)),null==n?n=1/0:(l=t-n,h=e-n,f=t+n,d=e+n,n*=n);c=p.pop();)if(!(!(g=c.node)||(i=c.x0)>f||(a=c.y0)>d||(o=c.x1)<l||(s=c.y1)<h))if(g.length){var y=(i+o)/2,m=(a+s)/2;p.push(new Fs(g[3],y,m,o,s),new Fs(g[2],i,m,y,s),new Fs(g[1],y,a,o,m),new Fs(g[0],i,a,y,m)),(u=(e>=m)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-u],p[p.length-1-u]=c)}else{var v=t-+this._x.call(null,g.data),b=e-+this._y.call(null,g.data),_=v*v+b*b;if(_<n){var x=Math.sqrt(n=_);l=t-x,h=e-x,f=t+x,d=e+x,r=g.data}}return r},$s.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,s,c,u,l,h,f,d=this._root,p=this._x0,g=this._y0,y=this._x1,m=this._y1;if(!d)return this;if(d.length)for(;;){if((u=a>=(s=(p+y)/2))?p=s:y=s,(l=o>=(c=(g+m)/2))?g=c:m=c,e=d,!(d=d[h=l<<1|u]))return this;if(!d.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,f=h)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[h]=i:delete e[h],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[f]=d:this._root=d),this):(this._root=i,this)},$s.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},$s.root=function(){return this._root},$s.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},$s.visit=function(t){var e,n,r,i,a,o,s=[],c=this._root;for(c&&s.push(new Fs(c,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(c=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&c.length){var u=(r+a)/2,l=(i+o)/2;(n=c[3])&&s.push(new Fs(n,u,l,a,o)),(n=c[2])&&s.push(new Fs(n,r,l,u,o)),(n=c[1])&&s.push(new Fs(n,u,i,a,l)),(n=c[0])&&s.push(new Fs(n,r,i,u,l))}return this},$s.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Fs(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,s=e.y0,c=e.x1,u=e.y1,l=(o+c)/2,h=(s+u)/2;(a=i[0])&&n.push(new Fs(a,o,s,l,h)),(a=i[1])&&n.push(new Fs(a,l,s,c,h)),(a=i[2])&&n.push(new Fs(a,o,h,l,u)),(a=i[3])&&n.push(new Fs(a,l,h,c,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},$s.x=function(t){return arguments.length?(this._x=t,this):this._x},$s.y=function(t){return arguments.length?(this._y=t,this):this._y};var Ks=Math.PI*(3-Math.sqrt(5));function Js(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=na(),c=Vn(l),u=ft("tick","end");function l(){h(),u.call("tick",e),n<r&&(c.stop(),u.call("end",e))}function h(r){var c,u,l=t.length;void 0===r&&(r=1);for(var h=0;h<r;++h)for(n+=(a-n)*i,s.each((function(t){t(n)})),c=0;c<l;++c)null==(u=t[c]).fx?u.x+=u.vx*=o:(u.x=u.fx,u.vx=0),null==u.fy?u.y+=u.vy*=o:(u.y=u.fy,u.vy=0);return e}function f(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(n),a=n*Ks;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function d(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),f(),e={tick:h,restart:function(){return c.restart(l),e},stop:function(){return c.stop(),e},nodes:function(n){return arguments.length?(t=n,f(),s.each(d),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(a=+t,e):a},velocityDecay:function(t){return arguments.length?(o=1-t,e):1-o},force:function(t,n){return arguments.length>1?(null==n?s.remove(t):s.set(t,d(n)),e):s.get(t)},find:function(e,n,r){var i,a,o,s,c,u=0,l=t.length;for(null==r?r=1/0:r*=r,u=0;u<l;++u)(o=(i=e-(s=t[u]).x)*i+(a=n-s.y)*a)<r&&(c=s,r=o);return c},on:function(t,n){return arguments.length>1?(u.on(t,n),e):u.on(t)}}}function tc(){var t,e,n,r,i=Os(-30),a=1,o=1/0,s=.81;function c(r){var i,a=t.length,o=js(t,Zs,Qs).visitAfter(l);for(n=r,i=0;i<a;++i)e=t[i],o.visit(h)}function u(){if(t){var e,n,a=t.length;for(r=new Array(a),e=0;e<a;++e)n=t[e],r[n.index]=+i(n,e,t)}}function l(t){var e,n,i,a,o,s=0,c=0;if(t.length){for(i=a=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(s+=e.value,c+=n,i+=n*e.x,a+=n*e.y);t.x=i/c,t.y=a/c}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=r[e.data.index]}while(e=e.next)}t.value=s}function h(t,i,c,u){if(!t.value)return!0;var l=t.x-e.x,h=t.y-e.y,f=u-i,d=l*l+h*h;if(f*f/s<d)return d<o&&(0===l&&(d+=(l=Is())*l),0===h&&(d+=(h=Is())*h),d<a&&(d=Math.sqrt(a*d)),e.vx+=l*t.value*n/d,e.vy+=h*t.value*n/d),!0;if(!(t.length||d>=o)){(t.data!==e||t.next)&&(0===l&&(d+=(l=Is())*l),0===h&&(d+=(h=Is())*h),d<a&&(d=Math.sqrt(a*d)));do{t.data!==e&&(f=r[t.data.index]*n/d,e.vx+=l*f,e.vy+=h*f)}while(t=t.next)}}return c.initialize=function(e){t=e,u()},c.strength=function(t){return arguments.length?(i="function"==typeof t?t:Os(+t),u(),c):i},c.distanceMin=function(t){return arguments.length?(a=t*t,c):Math.sqrt(a)},c.distanceMax=function(t){return arguments.length?(o=t*t,c):Math.sqrt(o)},c.theta=function(t){return arguments.length?(s=t*t,c):Math.sqrt(s)},c}function ec(t,e,n){var r,i,a,o=Os(.1);function s(t){for(var o=0,s=r.length;o<s;++o){var c=r[o],u=c.x-e||1e-6,l=c.y-n||1e-6,h=Math.sqrt(u*u+l*l),f=(a[o]-h)*i[o]*t/h;c.vx+=u*f,c.vy+=l*f}}function c(){if(r){var e,n=r.length;for(i=new Array(n),a=new Array(n),e=0;e<n;++e)a[e]=+t(r[e],e,r),i[e]=isNaN(a[e])?0:+o(r[e],e,r)}}return"function"!=typeof t&&(t=Os(+t)),null==e&&(e=0),null==n&&(n=0),s.initialize=function(t){r=t,c()},s.strength=function(t){return arguments.length?(o="function"==typeof t?t:Os(+t),c(),s):o},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:Os(+e),c(),s):t},s.x=function(t){return arguments.length?(e=+t,s):e},s.y=function(t){return arguments.length?(n=+t,s):n},s}function nc(t){var e,n,r,i=Os(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vx+=(r[a]-i.x)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=Os(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:Os(+t),o(),a):i},a.x=function(e){return arguments.length?(t="function"==typeof e?e:Os(+e),o(),a):t},a}function rc(t){var e,n,r,i=Os(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vy+=(r[a]-i.y)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=Os(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:Os(+t),o(),a):i},a.y=function(e){return arguments.length?(t="function"==typeof e?e:Os(+e),o(),a):t},a}function ic(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function ac(t){return(t=ic(Math.abs(t)))?t[1]:NaN}var oc,sc=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function cc(t){if(!(e=sc.exec(t)))throw new Error("invalid format: "+t);var e;return new uc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function uc(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function lc(t,e){var n=ic(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}cc.prototype=uc.prototype,uc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const hc={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return lc(100*t,e)},r:lc,s:function(t,e){var n=ic(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(oc=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+ic(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function fc(t){return t}var dc,pc,gc,yc=Array.prototype.map,mc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function vc(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?fc:(e=yc.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(t.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?fc:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(yc.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=cc(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,y=t.precision,m=t.trim,v=t.type;"n"===v?(g=!0,v="g"):hc[v]||(void 0===y&&(y=12),m=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var b="$"===f?i:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",_="$"===f?a:/[%p]/.test(v)?c:"",x=hc[v],w=/[defgprs%]/.test(v);function k(t){var i,a,c,f=b,k=_;if("c"===v)k=x(t)+k,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:x(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==h&&(T=!1),f=(T?"("===h?h:u:"-"===h||"("===h?"":h)+f,k=("s"===v?mc[8+oc/3]:"")+k+(T&&"("===h?")":""),w)for(i=-1,a=t.length;++i<a;)if(48>(c=t.charCodeAt(i))||c>57){k=(46===c?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var C=f.length+t.length+k.length,E=C<p?new Array(p-C+1).join(e):"";switch(g&&d&&(t=r(E+t,E.length?p-k.length:1/0),E=""),n){case"<":t=f+t+k+E;break;case"=":t=f+E+t+k;break;case"^":t=E.slice(0,C=E.length>>1)+f+t+k+E.slice(C);break;default:t=E+f+t+k}return s(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=cc(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(ac(e)/3))),i=Math.pow(10,-r),a=mc[8+r/3];return function(t){return n(i*t)+a}}}}function bc(t){return dc=vc(t),pc=dc.format,gc=dc.formatPrefix,dc}function _c(t){return Math.max(0,-ac(Math.abs(t)))}function xc(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ac(e)/3)))-ac(Math.abs(t)))}function wc(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ac(e)-ac(t))+1}function kc(){return new Tc}function Tc(){this.reset()}bc({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Tc.prototype={constructor:Tc,reset:function(){this.s=this.t=0},add:function(t){Ec(Cc,t,this.t),Ec(this,Cc.s,this.s),this.s?this.t+=Cc.t:this.s=Cc.t},valueOf:function(){return this.s}};var Cc=new Tc;function Ec(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var Sc=1e-6,Ac=1e-12,Mc=Math.PI,Nc=Mc/2,Dc=Mc/4,Bc=2*Mc,Lc=180/Mc,Oc=Mc/180,Ic=Math.abs,Rc=Math.atan,Fc=Math.atan2,Pc=Math.cos,Yc=Math.ceil,jc=Math.exp,Uc=(Math.floor,Math.log),zc=Math.pow,$c=Math.sin,qc=Math.sign||function(t){return t>0?1:t<0?-1:0},Hc=Math.sqrt,Wc=Math.tan;function Vc(t){return t>1?0:t<-1?Mc:Math.acos(t)}function Gc(t){return t>1?Nc:t<-1?-Nc:Math.asin(t)}function Xc(t){return(t=$c(t/2))*t}function Zc(){}function Qc(t,e){t&&Jc.hasOwnProperty(t.type)&&Jc[t.type](t,e)}var Kc={Feature:function(t,e){Qc(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Qc(n[r].geometry,e)}},Jc={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){tu(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)tu(n[r],e,0)},Polygon:function(t,e){eu(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)eu(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Qc(n[r],e)}};function tu(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function eu(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)tu(t[n],e,1);e.polygonEnd()}function nu(t,e){t&&Kc.hasOwnProperty(t.type)?Kc[t.type](t,e):Qc(t,e)}var ru,iu,au,ou,su,cu=kc(),uu=kc(),lu={point:Zc,lineStart:Zc,lineEnd:Zc,polygonStart:function(){cu.reset(),lu.lineStart=hu,lu.lineEnd=fu},polygonEnd:function(){var t=+cu;uu.add(t<0?Bc+t:t),this.lineStart=this.lineEnd=this.point=Zc},sphere:function(){uu.add(Bc)}};function hu(){lu.point=du}function fu(){pu(ru,iu)}function du(t,e){lu.point=pu,ru=t,iu=e,au=t*=Oc,ou=Pc(e=(e*=Oc)/2+Dc),su=$c(e)}function pu(t,e){var n=(t*=Oc)-au,r=n>=0?1:-1,i=r*n,a=Pc(e=(e*=Oc)/2+Dc),o=$c(e),s=su*o,c=ou*a+s*Pc(i),u=s*r*$c(i);cu.add(Fc(u,c)),au=t,ou=a,su=o}function gu(t){return uu.reset(),nu(t,lu),2*uu}function yu(t){return[Fc(t[1],t[0]),Gc(t[2])]}function mu(t){var e=t[0],n=t[1],r=Pc(n);return[r*Pc(e),r*$c(e),$c(n)]}function vu(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function bu(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function _u(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function xu(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function wu(t){var e=Hc(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var ku,Tu,Cu,Eu,Su,Au,Mu,Nu,Du,Bu,Lu,Ou,Iu,Ru,Fu,Pu,Yu,ju,Uu,zu,$u,qu,Hu,Wu,Vu,Gu,Xu=kc(),Zu={point:Qu,lineStart:Ju,lineEnd:tl,polygonStart:function(){Zu.point=el,Zu.lineStart=nl,Zu.lineEnd=rl,Xu.reset(),lu.polygonStart()},polygonEnd:function(){lu.polygonEnd(),Zu.point=Qu,Zu.lineStart=Ju,Zu.lineEnd=tl,cu<0?(ku=-(Cu=180),Tu=-(Eu=90)):Xu>Sc?Eu=90:Xu<-1e-6&&(Tu=-90),Bu[0]=ku,Bu[1]=Cu},sphere:function(){ku=-(Cu=180),Tu=-(Eu=90)}};function Qu(t,e){Du.push(Bu=[ku=t,Cu=t]),e<Tu&&(Tu=e),e>Eu&&(Eu=e)}function Ku(t,e){var n=mu([t*Oc,e*Oc]);if(Nu){var r=bu(Nu,n),i=bu([r[1],-r[0],0],r);wu(i),i=yu(i);var a,o=t-Su,s=o>0?1:-1,c=i[0]*Lc*s,u=Ic(o)>180;u^(s*Su<c&&c<s*t)?(a=i[1]*Lc)>Eu&&(Eu=a):u^(s*Su<(c=(c+360)%360-180)&&c<s*t)?(a=-i[1]*Lc)<Tu&&(Tu=a):(e<Tu&&(Tu=e),e>Eu&&(Eu=e)),u?t<Su?il(ku,t)>il(ku,Cu)&&(Cu=t):il(t,Cu)>il(ku,Cu)&&(ku=t):Cu>=ku?(t<ku&&(ku=t),t>Cu&&(Cu=t)):t>Su?il(ku,t)>il(ku,Cu)&&(Cu=t):il(t,Cu)>il(ku,Cu)&&(ku=t)}else Du.push(Bu=[ku=t,Cu=t]);e<Tu&&(Tu=e),e>Eu&&(Eu=e),Nu=n,Su=t}function Ju(){Zu.point=Ku}function tl(){Bu[0]=ku,Bu[1]=Cu,Zu.point=Qu,Nu=null}function el(t,e){if(Nu){var n=t-Su;Xu.add(Ic(n)>180?n+(n>0?360:-360):n)}else Au=t,Mu=e;lu.point(t,e),Ku(t,e)}function nl(){lu.lineStart()}function rl(){el(Au,Mu),lu.lineEnd(),Ic(Xu)>Sc&&(ku=-(Cu=180)),Bu[0]=ku,Bu[1]=Cu,Nu=null}function il(t,e){return(e-=t)<0?e+360:e}function al(t,e){return t[0]-e[0]}function ol(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function sl(t){var e,n,r,i,a,o,s;if(Eu=Cu=-(ku=Tu=1/0),Du=[],nu(t,Zu),n=Du.length){for(Du.sort(al),e=1,a=[r=Du[0]];e<n;++e)ol(r,(i=Du[e])[0])||ol(r,i[1])?(il(r[0],i[1])>il(r[0],r[1])&&(r[1]=i[1]),il(i[0],r[1])>il(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,e=0,r=a[n=a.length-1];e<=n;r=i,++e)i=a[e],(s=il(r[1],i[0]))>o&&(o=s,ku=i[0],Cu=r[1])}return Du=Bu=null,ku===1/0||Tu===1/0?[[NaN,NaN],[NaN,NaN]]:[[ku,Tu],[Cu,Eu]]}var cl={sphere:Zc,point:ul,lineStart:hl,lineEnd:pl,polygonStart:function(){cl.lineStart=gl,cl.lineEnd=yl},polygonEnd:function(){cl.lineStart=hl,cl.lineEnd=pl}};function ul(t,e){t*=Oc;var n=Pc(e*=Oc);ll(n*Pc(t),n*$c(t),$c(e))}function ll(t,e,n){++Lu,Iu+=(t-Iu)/Lu,Ru+=(e-Ru)/Lu,Fu+=(n-Fu)/Lu}function hl(){cl.point=fl}function fl(t,e){t*=Oc;var n=Pc(e*=Oc);Wu=n*Pc(t),Vu=n*$c(t),Gu=$c(e),cl.point=dl,ll(Wu,Vu,Gu)}function dl(t,e){t*=Oc;var n=Pc(e*=Oc),r=n*Pc(t),i=n*$c(t),a=$c(e),o=Fc(Hc((o=Vu*a-Gu*i)*o+(o=Gu*r-Wu*a)*o+(o=Wu*i-Vu*r)*o),Wu*r+Vu*i+Gu*a);Ou+=o,Pu+=o*(Wu+(Wu=r)),Yu+=o*(Vu+(Vu=i)),ju+=o*(Gu+(Gu=a)),ll(Wu,Vu,Gu)}function pl(){cl.point=ul}function gl(){cl.point=ml}function yl(){vl(qu,Hu),cl.point=ul}function ml(t,e){qu=t,Hu=e,t*=Oc,e*=Oc,cl.point=vl;var n=Pc(e);Wu=n*Pc(t),Vu=n*$c(t),Gu=$c(e),ll(Wu,Vu,Gu)}function vl(t,e){t*=Oc;var n=Pc(e*=Oc),r=n*Pc(t),i=n*$c(t),a=$c(e),o=Vu*a-Gu*i,s=Gu*r-Wu*a,c=Wu*i-Vu*r,u=Hc(o*o+s*s+c*c),l=Gc(u),h=u&&-l/u;Uu+=h*o,zu+=h*s,$u+=h*c,Ou+=l,Pu+=l*(Wu+(Wu=r)),Yu+=l*(Vu+(Vu=i)),ju+=l*(Gu+(Gu=a)),ll(Wu,Vu,Gu)}function bl(t){Lu=Ou=Iu=Ru=Fu=Pu=Yu=ju=Uu=zu=$u=0,nu(t,cl);var e=Uu,n=zu,r=$u,i=e*e+n*n+r*r;return i<Ac&&(e=Pu,n=Yu,r=ju,Ou<Sc&&(e=Iu,n=Ru,r=Fu),(i=e*e+n*n+r*r)<Ac)?[NaN,NaN]:[Fc(n,e)*Lc,Gc(r/Hc(i))*Lc]}function _l(t){return function(){return t}}function xl(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function wl(t,e){return[Ic(t)>Mc?t+Math.round(-t/Bc)*Bc:t,e]}function kl(t,e,n){return(t%=Bc)?e||n?xl(Cl(t),El(e,n)):Cl(t):e||n?El(e,n):wl}function Tl(t){return function(e,n){return[(e+=t)>Mc?e-Bc:e<-Mc?e+Bc:e,n]}}function Cl(t){var e=Tl(t);return e.invert=Tl(-t),e}function El(t,e){var n=Pc(t),r=$c(t),i=Pc(e),a=$c(e);function o(t,e){var o=Pc(e),s=Pc(t)*o,c=$c(t)*o,u=$c(e),l=u*n+s*r;return[Fc(c*i-l*a,s*n-u*r),Gc(l*i+c*a)]}return o.invert=function(t,e){var o=Pc(e),s=Pc(t)*o,c=$c(t)*o,u=$c(e),l=u*i-c*a;return[Fc(c*i+u*a,s*n+l*r),Gc(l*n-s*r)]},o}function Sl(t){function e(e){return(e=t(e[0]*Oc,e[1]*Oc))[0]*=Lc,e[1]*=Lc,e}return t=kl(t[0]*Oc,t[1]*Oc,t.length>2?t[2]*Oc:0),e.invert=function(e){return(e=t.invert(e[0]*Oc,e[1]*Oc))[0]*=Lc,e[1]*=Lc,e},e}function Al(t,e,n,r,i,a){if(n){var o=Pc(e),s=$c(e),c=r*n;null==i?(i=e+r*Bc,a=e-c/2):(i=Ml(o,i),a=Ml(o,a),(r>0?i<a:i>a)&&(i+=r*Bc));for(var u,l=i;r>0?l>a:l<a;l-=c)u=yu([o,-s*Pc(l),-s*$c(l)]),t.point(u[0],u[1])}}function Ml(t,e){(e=mu(e))[0]-=t,wu(e);var n=Vc(-e[1]);return((-e[2]<0?-n:n)+Bc-Sc)%Bc}function Nl(){var t,e,n=_l([0,0]),r=_l(90),i=_l(6),a={point:function(n,r){t.push(n=e(n,r)),n[0]*=Lc,n[1]*=Lc}};function o(){var o=n.apply(this,arguments),s=r.apply(this,arguments)*Oc,c=i.apply(this,arguments)*Oc;return t=[],e=kl(-o[0]*Oc,-o[1]*Oc,0).invert,Al(a,s,c,1),o={type:"Polygon",coordinates:[t]},t=e=null,o}return o.center=function(t){return arguments.length?(n="function"==typeof t?t:_l([+t[0],+t[1]]),o):n},o.radius=function(t){return arguments.length?(r="function"==typeof t?t:_l(+t),o):r},o.precision=function(t){return arguments.length?(i="function"==typeof t?t:_l(+t),o):i},o}function Dl(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:Zc,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Bl(t,e){return Ic(t[0]-e[0])<Sc&&Ic(t[1]-e[1])<Sc}function Ll(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Ol(t,e,n,r,i){var a,o,s=[],c=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(Bl(r,o)){if(!r[2]&&!o[2]){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);return void i.lineEnd()}o[0]+=2e-6}s.push(n=new Ll(r,t,null,!0)),c.push(n.o=new Ll(r,null,n,!1)),s.push(n=new Ll(o,t,null,!1)),c.push(n.o=new Ll(o,null,n,!0))}})),s.length){for(c.sort(e),Il(s),Il(c),a=0,o=c.length;a<o;++a)c[a].e=n=!n;for(var u,l,h=s[0];;){for(var f=h,d=!0;f.v;)if((f=f.n)===h)return;u=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(a=0,o=u.length;a<o;++a)i.point((l=u[a])[0],l[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(d)for(u=f.p.z,a=u.length-1;a>=0;--a)i.point((l=u[a])[0],l[1]);else r(f.x,f.p.x,-1,i);f=f.p}u=(f=f.o).z,d=!d}while(!f.v);i.lineEnd()}}}function Il(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}wl.invert=wl;var Rl=kc();function Fl(t){return Ic(t[0])<=Mc?t[0]:qc(t[0])*((Ic(t[0])+Mc)%Bc-Mc)}function Pl(t,e){var n=Fl(e),r=e[1],i=$c(r),a=[$c(n),-Pc(n),0],o=0,s=0;Rl.reset(),1===i?r=Nc+Sc:-1===i&&(r=-Nc-Sc);for(var c=0,u=t.length;c<u;++c)if(h=(l=t[c]).length)for(var l,h,f=l[h-1],d=Fl(f),p=f[1]/2+Dc,g=$c(p),y=Pc(p),m=0;m<h;++m,d=b,g=x,y=w,f=v){var v=l[m],b=Fl(v),_=v[1]/2+Dc,x=$c(_),w=Pc(_),k=b-d,T=k>=0?1:-1,C=T*k,E=C>Mc,S=g*x;if(Rl.add(Fc(S*T*$c(C),y*w+S*Pc(C))),o+=E?k+T*Bc:k,E^d>=n^b>=n){var A=bu(mu(f),mu(v));wu(A);var M=bu(a,A);wu(M);var N=(E^k>=0?-1:1)*Gc(M[2]);(r>N||r===N&&(A[0]||A[1]))&&(s+=E^k>=0?1:-1)}}return(o<-1e-6||o<Sc&&Rl<-1e-6)^1&s}function Yl(t,e,n,r){return function(i){var a,o,s,c=e(i),u=Dl(),l=e(u),h=!1,f={point:d,lineStart:g,lineEnd:y,polygonStart:function(){f.point=m,f.lineStart=v,f.lineEnd=b,o=[],a=[]},polygonEnd:function(){f.point=d,f.lineStart=g,f.lineEnd=y,o=P(o);var t=Pl(a,r);o.length?(h||(i.polygonStart(),h=!0),Ol(o,Ul,t,n,i)):t&&(h||(i.polygonStart(),h=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),h&&(i.polygonEnd(),h=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(e,n){t(e,n)&&i.point(e,n)}function p(t,e){c.point(t,e)}function g(){f.point=p,c.lineStart()}function y(){f.point=d,c.lineEnd()}function m(t,e){s.push([t,e]),l.point(t,e)}function v(){l.lineStart(),s=[]}function b(){m(s[0][0],s[0][1]),l.lineEnd();var t,e,n,r,c=l.clean(),f=u.result(),d=f.length;if(s.pop(),a.push(s),s=null,d)if(1&c){if((e=(n=f[0]).length-1)>0){for(h||(i.polygonStart(),h=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else d>1&&2&c&&f.push(f.pop().concat(f.shift())),o.push(f.filter(jl))}return f}}function jl(t){return t.length>1}function Ul(t,e){return((t=t.x)[0]<0?t[1]-Nc-Sc:Nc-t[1])-((e=e.x)[0]<0?e[1]-Nc-Sc:Nc-e[1])}const zl=Yl((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?Mc:-Mc,c=Ic(a-n);Ic(c-Mc)<Sc?(t.point(n,r=(r+o)/2>0?Nc:-Nc),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&c>=Mc&&(Ic(n-i)<Sc&&(n-=i*Sc),Ic(a-s)<Sc&&(a-=s*Sc),r=function(t,e,n,r){var i,a,o=$c(t-n);return Ic(o)>Sc?Rc(($c(e)*(a=Pc(r))*$c(n)-$c(r)*(i=Pc(e))*$c(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=a,r=o),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*Nc,r.point(-Mc,i),r.point(0,i),r.point(Mc,i),r.point(Mc,0),r.point(Mc,-i),r.point(0,-i),r.point(-Mc,-i),r.point(-Mc,0),r.point(-Mc,i);else if(Ic(t[0]-e[0])>Sc){var a=t[0]<e[0]?Mc:-Mc;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-Mc,-Nc]);function $l(t){var e=Pc(t),n=6*Oc,r=e>0,i=Ic(e)>Sc;function a(t,n){return Pc(t)*Pc(n)>e}function o(t,n,r){var i=[1,0,0],a=bu(mu(t),mu(n)),o=vu(a,a),s=a[0],c=o-s*s;if(!c)return!r&&t;var u=e*o/c,l=-e*s/c,h=bu(i,a),f=xu(i,u);_u(f,xu(a,l));var d=h,p=vu(f,d),g=vu(d,d),y=p*p-g*(vu(f,f)-1);if(!(y<0)){var m=Hc(y),v=xu(d,(-p-m)/g);if(_u(v,f),v=yu(v),!r)return v;var b,_=t[0],x=n[0],w=t[1],k=n[1];x<_&&(b=_,_=x,x=b);var T=x-_,C=Ic(T-Mc)<Sc;if(!C&&k<w&&(b=w,w=k,k=b),C||T<Sc?C?w+k>0^v[1]<(Ic(v[0]-_)<Sc?w:k):w<=v[1]&&v[1]<=k:T>Mc^(_<=v[0]&&v[0]<=x)){var E=xu(d,(-p+m)/g);return _u(E,f),[v,yu(E)]}}}function s(e,n){var i=r?t:Mc-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return Yl(a,(function(t){var e,n,c,u,l;return{lineStart:function(){u=c=!1,l=1},point:function(h,f){var d,p=[h,f],g=a(h,f),y=r?g?0:s(h,f):g?s(h+(h<0?Mc:-Mc),f):0;if(!e&&(u=c=g)&&t.lineStart(),g!==c&&(!(d=o(e,p))||Bl(e,d)||Bl(p,d))&&(p[2]=1),g!==c)l=0,g?(t.lineStart(),d=o(p,e),t.point(d[0],d[1])):(d=o(e,p),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&r^g){var m;y&n||!(m=o(p,e,!0))||(l=0,r?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1],3)))}!g||e&&Bl(e,p)||t.point(p[0],p[1]),e=p,c=g,n=y},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return l|(u&&c)<<1}}}),(function(e,r,i,a){Al(a,t,n,i,e,r)}),r?[0,-t]:[-Mc,t-Mc])}var ql=1e9,Hl=-ql;function Wl(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,s,u){var l=0,h=0;if(null==i||(l=o(i,s))!==(h=o(a,s))||c(i,a)<0^s>0)do{u.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+s+4)%4)!==h);else u.point(a[0],a[1])}function o(r,i){return Ic(r[0]-t)<Sc?i>0?0:3:Ic(r[0]-n)<Sc?i>0?2:1:Ic(r[1]-e)<Sc?i>0?1:0:i>0?3:2}function s(t,e){return c(t.x,e.x)}function c(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var c,u,l,h,f,d,p,g,y,m,v,b=o,_=Dl(),x={point:w,lineStart:function(){x.point=k,u&&u.push(l=[]),m=!0,y=!1,p=g=NaN},lineEnd:function(){c&&(k(h,f),d&&y&&_.rejoin(),c.push(_.result())),x.point=w,y&&b.lineEnd()},polygonStart:function(){b=_,c=[],u=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var a,o,s=u[n],c=1,l=s.length,h=s[0],f=h[0],d=h[1];c<l;++c)a=f,o=d,f=(h=s[c])[0],d=h[1],o<=r?d>r&&(f-a)*(r-o)>(d-o)*(t-a)&&++e:d<=r&&(f-a)*(r-o)<(d-o)*(t-a)&&--e;return e}(),n=v&&e,i=(c=P(c)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&Ol(c,s,e,a,o),o.polygonEnd()),b=o,c=u=l=null}};function w(t,e){i(t,e)&&b.point(t,e)}function k(a,o){var s=i(a,o);if(u&&l.push([a,o]),m)h=a,f=o,d=s,m=!1,s&&(b.lineStart(),b.point(a,o));else if(s&&y)b.point(a,o);else{var c=[p=Math.max(Hl,Math.min(ql,p)),g=Math.max(Hl,Math.min(ql,g))],_=[a=Math.max(Hl,Math.min(ql,a)),o=Math.max(Hl,Math.min(ql,o))];!function(t,e,n,r,i,a){var o,s=t[0],c=t[1],u=0,l=1,h=e[0]-s,f=e[1]-c;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<u)return;o<l&&(l=o)}else if(h>0){if(o>l)return;o>u&&(u=o)}if(o=i-s,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>u&&(u=o)}else if(h>0){if(o<u)return;o<l&&(l=o)}if(o=r-c,f||!(o>0)){if(o/=f,f<0){if(o<u)return;o<l&&(l=o)}else if(f>0){if(o>l)return;o>u&&(u=o)}if(o=a-c,f||!(o<0)){if(o/=f,f<0){if(o>l)return;o>u&&(u=o)}else if(f>0){if(o<u)return;o<l&&(l=o)}return u>0&&(t[0]=s+u*h,t[1]=c+u*f),l<1&&(e[0]=s+l*h,e[1]=c+l*f),!0}}}}}(c,_,t,e,n,r)?s&&(b.lineStart(),b.point(a,o),v=!1):(y||(b.lineStart(),b.point(c[0],c[1])),b.point(_[0],_[1]),s||b.lineEnd(),v=!1)}p=a,g=o,y=s}return x}}function Vl(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=Wl(r,i,a,o)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],a=+s[1][0],o=+s[1][1],t=e=null,n):[[r,i],[a,o]]}}}var Gl,Xl,Zl,Ql=kc(),Kl={sphere:Zc,point:Zc,lineStart:function(){Kl.point=th,Kl.lineEnd=Jl},lineEnd:Zc,polygonStart:Zc,polygonEnd:Zc};function Jl(){Kl.point=Kl.lineEnd=Zc}function th(t,e){Gl=t*=Oc,Xl=$c(e*=Oc),Zl=Pc(e),Kl.point=eh}function eh(t,e){t*=Oc;var n=$c(e*=Oc),r=Pc(e),i=Ic(t-Gl),a=Pc(i),o=r*$c(i),s=Zl*n-Xl*r*a,c=Xl*n+Zl*r*a;Ql.add(Fc(Hc(o*o+s*s),c)),Gl=t,Xl=n,Zl=r}function nh(t){return Ql.reset(),nu(t,Kl),+Ql}var rh=[null,null],ih={type:"LineString",coordinates:rh};function ah(t,e){return rh[0]=t,rh[1]=e,nh(ih)}var oh={Feature:function(t,e){return ch(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(ch(n[r].geometry,e))return!0;return!1}},sh={Sphere:function(){return!0},Point:function(t,e){return uh(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(uh(n[r],e))return!0;return!1},LineString:function(t,e){return lh(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(lh(n[r],e))return!0;return!1},Polygon:function(t,e){return hh(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(hh(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(ch(n[r],e))return!0;return!1}};function ch(t,e){return!(!t||!sh.hasOwnProperty(t.type))&&sh[t.type](t,e)}function uh(t,e){return 0===ah(t,e)}function lh(t,e){for(var n,r,i,a=0,o=t.length;a<o;a++){if(0===(r=ah(t[a],e)))return!0;if(a>0&&(i=ah(t[a],t[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Ac*i)return!0;n=r}return!1}function hh(t,e){return!!Pl(t.map(fh),dh(e))}function fh(t){return(t=t.map(dh)).pop(),t}function dh(t){return[t[0]*Oc,t[1]*Oc]}function ph(t,e){return(t&&oh.hasOwnProperty(t.type)?oh[t.type]:ch)(t,e)}function gh(t,e,n){var r=k(t,e-Sc,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function yh(t,e,n){var r=k(t,e-Sc,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function mh(){var t,e,n,r,i,a,o,s,c,u,l,h,f=10,d=f,p=90,g=360,y=2.5;function m(){return{type:"MultiLineString",coordinates:v()}}function v(){return k(Yc(r/p)*p,n,p).map(l).concat(k(Yc(s/g)*g,o,g).map(h)).concat(k(Yc(e/f)*f,t,f).filter((function(t){return Ic(t%p)>Sc})).map(c)).concat(k(Yc(a/d)*d,i,d).filter((function(t){return Ic(t%g)>Sc})).map(u))}return m.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},m.outline=function(){return{type:"Polygon",coordinates:[l(r).concat(h(o).slice(1),l(n).reverse().slice(1),h(s).reverse().slice(1))]}},m.extent=function(t){return arguments.length?m.extentMajor(t).extentMinor(t):m.extentMinor()},m.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),s>o&&(t=s,s=o,o=t),m.precision(y)):[[r,s],[n,o]]},m.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),m.precision(y)):[[e,a],[t,i]]},m.step=function(t){return arguments.length?m.stepMajor(t).stepMinor(t):m.stepMinor()},m.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],m):[p,g]},m.stepMinor=function(t){return arguments.length?(f=+t[0],d=+t[1],m):[f,d]},m.precision=function(f){return arguments.length?(y=+f,c=gh(a,i,90),u=yh(e,t,y),l=gh(s,o,90),h=yh(r,n,y),m):y},m.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function vh(){return mh()()}function bh(t,e){var n=t[0]*Oc,r=t[1]*Oc,i=e[0]*Oc,a=e[1]*Oc,o=Pc(r),s=$c(r),c=Pc(a),u=$c(a),l=o*Pc(n),h=o*$c(n),f=c*Pc(i),d=c*$c(i),p=2*Gc(Hc(Xc(a-r)+o*c*Xc(i-n))),g=$c(p),y=p?function(t){var e=$c(t*=p)/g,n=$c(p-t)/g,r=n*l+e*f,i=n*h+e*d,a=n*s+e*u;return[Fc(i,r)*Lc,Fc(a,Hc(r*r+i*i))*Lc]}:function(){return[n*Lc,r*Lc]};return y.distance=p,y}function _h(t){return t}var xh,wh,kh,Th,Ch=kc(),Eh=kc(),Sh={point:Zc,lineStart:Zc,lineEnd:Zc,polygonStart:function(){Sh.lineStart=Ah,Sh.lineEnd=Dh},polygonEnd:function(){Sh.lineStart=Sh.lineEnd=Sh.point=Zc,Ch.add(Ic(Eh)),Eh.reset()},result:function(){var t=Ch/2;return Ch.reset(),t}};function Ah(){Sh.point=Mh}function Mh(t,e){Sh.point=Nh,xh=kh=t,wh=Th=e}function Nh(t,e){Eh.add(Th*t-kh*e),kh=t,Th=e}function Dh(){Nh(xh,wh)}const Bh=Sh;var Lh=1/0,Oh=Lh,Ih=-Lh,Rh=Ih,Fh={point:function(t,e){t<Lh&&(Lh=t),t>Ih&&(Ih=t),e<Oh&&(Oh=e),e>Rh&&(Rh=e)},lineStart:Zc,lineEnd:Zc,polygonStart:Zc,polygonEnd:Zc,result:function(){var t=[[Lh,Oh],[Ih,Rh]];return Ih=Rh=-(Oh=Lh=1/0),t}};const Ph=Fh;var Yh,jh,Uh,zh,$h=0,qh=0,Hh=0,Wh=0,Vh=0,Gh=0,Xh=0,Zh=0,Qh=0,Kh={point:Jh,lineStart:tf,lineEnd:rf,polygonStart:function(){Kh.lineStart=af,Kh.lineEnd=of},polygonEnd:function(){Kh.point=Jh,Kh.lineStart=tf,Kh.lineEnd=rf},result:function(){var t=Qh?[Xh/Qh,Zh/Qh]:Gh?[Wh/Gh,Vh/Gh]:Hh?[$h/Hh,qh/Hh]:[NaN,NaN];return $h=qh=Hh=Wh=Vh=Gh=Xh=Zh=Qh=0,t}};function Jh(t,e){$h+=t,qh+=e,++Hh}function tf(){Kh.point=ef}function ef(t,e){Kh.point=nf,Jh(Uh=t,zh=e)}function nf(t,e){var n=t-Uh,r=e-zh,i=Hc(n*n+r*r);Wh+=i*(Uh+t)/2,Vh+=i*(zh+e)/2,Gh+=i,Jh(Uh=t,zh=e)}function rf(){Kh.point=Jh}function af(){Kh.point=sf}function of(){cf(Yh,jh)}function sf(t,e){Kh.point=cf,Jh(Yh=Uh=t,jh=zh=e)}function cf(t,e){var n=t-Uh,r=e-zh,i=Hc(n*n+r*r);Wh+=i*(Uh+t)/2,Vh+=i*(zh+e)/2,Gh+=i,Xh+=(i=zh*t-Uh*e)*(Uh+t),Zh+=i*(zh+e),Qh+=3*i,Jh(Uh=t,zh=e)}const uf=Kh;function lf(t){this._context=t}lf.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Bc)}},result:Zc};var hf,ff,df,pf,gf,yf=kc(),mf={point:Zc,lineStart:function(){mf.point=vf},lineEnd:function(){hf&&bf(ff,df),mf.point=Zc},polygonStart:function(){hf=!0},polygonEnd:function(){hf=null},result:function(){var t=+yf;return yf.reset(),t}};function vf(t,e){mf.point=bf,ff=pf=t,df=gf=e}function bf(t,e){pf-=t,gf-=e,yf.add(Hc(pf*pf+gf*gf)),pf=t,gf=e}const _f=mf;function xf(){this._string=[]}function wf(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function kf(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),nu(t,n(r))),r.result()}return a.area=function(t){return nu(t,n(Bh)),Bh.result()},a.measure=function(t){return nu(t,n(_f)),_f.result()},a.bounds=function(t){return nu(t,n(Ph)),Ph.result()},a.centroid=function(t){return nu(t,n(uf)),uf.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,_h):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new xf):new lf(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.projection(t).context(e)}function Tf(t){return{stream:Cf(t)}}function Cf(t){return function(e){var n=new Ef;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Ef(){}function Sf(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),nu(n,t.stream(Ph)),e(Ph.result()),null!=r&&t.clipExtent(r),t}function Af(t,e,n){return Sf(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s])}),n)}function Mf(t,e,n){return Af(t,[[0,0],e],n)}function Nf(t,e,n){return Sf(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])}),n)}function Df(t,e,n){return Sf(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])}),n)}xf.prototype={_radius:4.5,_circle:wf(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=wf(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},Ef.prototype={constructor:Ef,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Bf=Pc(30*Oc);function Lf(t,e){return+e?function(t,e){function n(r,i,a,o,s,c,u,l,h,f,d,p,g,y){var m=u-r,v=l-i,b=m*m+v*v;if(b>4*e&&g--){var _=o+f,x=s+d,w=c+p,k=Hc(_*_+x*x+w*w),T=Gc(w/=k),C=Ic(Ic(w)-1)<Sc||Ic(a-h)<Sc?(a+h)/2:Fc(x,_),E=t(C,T),S=E[0],A=E[1],M=S-r,N=A-i,D=v*M-m*N;(D*D/b>e||Ic((m*M+v*N)/b-.5)>.3||o*f+s*d+c*p<Bf)&&(n(r,i,a,o,s,c,S,A,C,_/=k,x/=k,w,g,y),y.point(S,A),n(S,A,C,_,x,w,u,l,h,f,d,p,g,y))}}return function(e){var r,i,a,o,s,c,u,l,h,f,d,p,g={point:y,lineStart:m,lineEnd:b,polygonStart:function(){e.polygonStart(),g.lineStart=_},polygonEnd:function(){e.polygonEnd(),g.lineStart=m}};function y(n,r){n=t(n,r),e.point(n[0],n[1])}function m(){l=NaN,g.point=v,e.lineStart()}function v(r,i){var a=mu([r,i]),o=t(r,i);n(l,h,u,f,d,p,l=o[0],h=o[1],u=r,f=a[0],d=a[1],p=a[2],16,e),e.point(l,h)}function b(){g.point=y,e.lineEnd()}function _(){m(),g.point=x,g.lineEnd=w}function x(t,e){v(r=t,e),i=l,a=h,o=f,s=d,c=p,g.point=v}function w(){n(l,h,u,f,d,p,i,a,r,o,s,c,16,e),g.lineEnd=b,b()}return g}}(t,e):function(t){return Cf({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var Of=Cf({point:function(t,e){this.stream.point(t*Oc,e*Oc)}});function If(t,e,n,r,i){function a(a,o){return[e+t*(a*=r),n-t*(o*=i)]}return a.invert=function(a,o){return[(a-e)/t*r,(n-o)/t*i]},a}function Rf(t,e,n,r,i,a){var o=Pc(a),s=$c(a),c=o*t,u=s*t,l=o/t,h=s/t,f=(s*n-o*e)/t,d=(s*e+o*n)/t;function p(t,a){return[c*(t*=r)-u*(a*=i)+e,n-u*t-c*a]}return p.invert=function(t,e){return[r*(l*t-h*e+f),i*(d-h*t-l*e)]},p}function Ff(t){return Pf((function(){return t}))()}function Pf(t){var e,n,r,i,a,o,s,c,u,l,h=150,f=480,d=250,p=0,g=0,y=0,m=0,v=0,b=0,_=1,x=1,w=null,k=zl,T=null,C=_h,E=.5;function S(t){return c(t[0]*Oc,t[1]*Oc)}function A(t){return(t=c.invert(t[0],t[1]))&&[t[0]*Lc,t[1]*Lc]}function M(){var t=Rf(h,0,0,_,x,b).apply(null,e(p,g)),r=(b?Rf:If)(h,f-t[0],d-t[1],_,x,b);return n=kl(y,m,v),s=xl(e,r),c=xl(n,s),o=Lf(s,E),N()}function N(){return u=l=null,S}return S.stream=function(t){return u&&l===t?u:u=Of(function(t){return Cf({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(k(o(C(l=t)))))},S.preclip=function(t){return arguments.length?(k=t,w=void 0,N()):k},S.postclip=function(t){return arguments.length?(C=t,T=r=i=a=null,N()):C},S.clipAngle=function(t){return arguments.length?(k=+t?$l(w=t*Oc):(w=null,zl),N()):w*Lc},S.clipExtent=function(t){return arguments.length?(C=null==t?(T=r=i=a=null,_h):Wl(T=+t[0][0],r=+t[0][1],i=+t[1][0],a=+t[1][1]),N()):null==T?null:[[T,r],[i,a]]},S.scale=function(t){return arguments.length?(h=+t,M()):h},S.translate=function(t){return arguments.length?(f=+t[0],d=+t[1],M()):[f,d]},S.center=function(t){return arguments.length?(p=t[0]%360*Oc,g=t[1]%360*Oc,M()):[p*Lc,g*Lc]},S.rotate=function(t){return arguments.length?(y=t[0]%360*Oc,m=t[1]%360*Oc,v=t.length>2?t[2]%360*Oc:0,M()):[y*Lc,m*Lc,v*Lc]},S.angle=function(t){return arguments.length?(b=t%360*Oc,M()):b*Lc},S.reflectX=function(t){return arguments.length?(_=t?-1:1,M()):_<0},S.reflectY=function(t){return arguments.length?(x=t?-1:1,M()):x<0},S.precision=function(t){return arguments.length?(o=Lf(s,E=t*t),N()):Hc(E)},S.fitExtent=function(t,e){return Af(S,t,e)},S.fitSize=function(t,e){return Mf(S,t,e)},S.fitWidth=function(t,e){return Nf(S,t,e)},S.fitHeight=function(t,e){return Df(S,t,e)},function(){return e=t.apply(this,arguments),S.invert=e.invert&&A,M()}}function Yf(t){var e=0,n=Mc/3,r=Pf(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Oc,n=t[1]*Oc):[e*Lc,n*Lc]},i}function jf(t,e){var n=$c(t),r=(n+$c(e))/2;if(Ic(r)<Sc)return function(t){var e=Pc(t);function n(t,n){return[t*e,$c(n)/e]}return n.invert=function(t,n){return[t/e,Gc(n*e)]},n}(t);var i=1+n*(2*r-n),a=Hc(i)/r;function o(t,e){var n=Hc(i-2*r*$c(e))/r;return[n*$c(t*=r),a-n*Pc(t)]}return o.invert=function(t,e){var n=a-e,o=Fc(t,Ic(n))*qc(n);return n*r<0&&(o-=Mc*qc(t)*qc(n)),[o/r,Gc((i-(t*t+n*n)*r*r)/(2*r))]},o}function Uf(){return Yf(jf).scale(155.424).center([0,33.6442])}function zf(){return Uf().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function $f(){var t,e,n,r,i,a,o=zf(),s=Uf().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=Uf().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){a=[t,e]}};function l(t){var e=t[0],o=t[1];return a=null,n.point(e,o),a||(r.point(e,o),a)||(i.point(e,o),a)}function h(){return t=e=null,l}return l.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(t)},l.stream=function(n){return t&&e===n?t:(r=[o.stream(e=n),s.stream(n),c.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},l.precision=function(t){return arguments.length?(o.precision(t),s.precision(t),c.precision(t),h()):o.precision()},l.scale=function(t){return arguments.length?(o.scale(t),s.scale(.35*t),c.scale(t),l.translate(o.translate())):o.scale()},l.translate=function(t){if(!arguments.length)return o.translate();var e=o.scale(),a=+t[0],l=+t[1];return n=o.translate(t).clipExtent([[a-.455*e,l-.238*e],[a+.455*e,l+.238*e]]).stream(u),r=s.translate([a-.307*e,l+.201*e]).clipExtent([[a-.425*e+Sc,l+.12*e+Sc],[a-.214*e-Sc,l+.234*e-Sc]]).stream(u),i=c.translate([a-.205*e,l+.212*e]).clipExtent([[a-.214*e+Sc,l+.166*e+Sc],[a-.115*e-Sc,l+.234*e-Sc]]).stream(u),h()},l.fitExtent=function(t,e){return Af(l,t,e)},l.fitSize=function(t,e){return Mf(l,t,e)},l.fitWidth=function(t,e){return Nf(l,t,e)},l.fitHeight=function(t,e){return Df(l,t,e)},l.scale(1070)}function qf(t){return function(e,n){var r=Pc(e),i=Pc(n),a=t(r*i);return[a*i*$c(e),a*$c(n)]}}function Hf(t){return function(e,n){var r=Hc(e*e+n*n),i=t(r),a=$c(i),o=Pc(i);return[Fc(e*a,r*o),Gc(r&&n*a/r)]}}var Wf=qf((function(t){return Hc(2/(1+t))}));function Vf(){return Ff(Wf).scale(124.75).clipAngle(179.999)}Wf.invert=Hf((function(t){return 2*Gc(t/2)}));var Gf=qf((function(t){return(t=Vc(t))&&t/$c(t)}));function Xf(){return Ff(Gf).scale(79.4188).clipAngle(179.999)}function Zf(t,e){return[t,Uc(Wc((Nc+e)/2))]}function Qf(){return Kf(Zf).scale(961/Bc)}function Kf(t){var e,n,r,i=Ff(t),a=i.center,o=i.scale,s=i.translate,c=i.clipExtent,u=null;function l(){var a=Mc*o(),s=i(Sl(i.rotate()).invert([0,0]));return c(null==u?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:t===Zf?[[Math.max(s[0]-a,u),e],[Math.min(s[0]+a,n),r]]:[[u,Math.max(s[1]-a,e)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(t){return arguments.length?(o(t),l()):o()},i.translate=function(t){return arguments.length?(s(t),l()):s()},i.center=function(t){return arguments.length?(a(t),l()):a()},i.clipExtent=function(t){return arguments.length?(null==t?u=e=n=r=null:(u=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),l()):null==u?null:[[u,e],[n,r]]},l()}function Jf(t){return Wc((Nc+t)/2)}function td(t,e){var n=Pc(t),r=t===e?$c(t):Uc(n/Pc(e))/Uc(Jf(e)/Jf(t)),i=n*zc(Jf(t),r)/r;if(!r)return Zf;function a(t,e){i>0?e<-Nc+Sc&&(e=-Nc+Sc):e>Nc-Sc&&(e=Nc-Sc);var n=i/zc(Jf(e),r);return[n*$c(r*t),i-n*Pc(r*t)]}return a.invert=function(t,e){var n=i-e,a=qc(r)*Hc(t*t+n*n),o=Fc(t,Ic(n))*qc(n);return n*r<0&&(o-=Mc*qc(t)*qc(n)),[o/r,2*Rc(zc(i/a,1/r))-Nc]},a}function ed(){return Yf(td).scale(109.5).parallels([30,30])}function nd(t,e){return[t,e]}function rd(){return Ff(nd).scale(152.63)}function id(t,e){var n=Pc(t),r=t===e?$c(t):(n-Pc(e))/(e-t),i=n/r+t;if(Ic(r)<Sc)return nd;function a(t,e){var n=i-e,a=r*t;return[n*$c(a),i-n*Pc(a)]}return a.invert=function(t,e){var n=i-e,a=Fc(t,Ic(n))*qc(n);return n*r<0&&(a-=Mc*qc(t)*qc(n)),[a/r,i-qc(r)*Hc(t*t+n*n)]},a}function ad(){return Yf(id).scale(131.154).center([0,13.9389])}Gf.invert=Hf((function(t){return t})),Zf.invert=function(t,e){return[t,2*Rc(jc(e))-Nc]},nd.invert=nd;var od=1.340264,sd=-.081106,cd=893e-6,ud=.003796,ld=Hc(3)/2;function hd(t,e){var n=Gc(ld*$c(e)),r=n*n,i=r*r*r;return[t*Pc(n)/(ld*(od+3*sd*r+i*(7*cd+9*ud*r))),n*(od+sd*r+i*(cd+ud*r))]}function fd(){return Ff(hd).scale(177.158)}function dd(t,e){var n=Pc(e),r=Pc(t)*n;return[n*$c(t)/r,$c(e)/r]}function pd(){return Ff(dd).scale(144.049).clipAngle(60)}function gd(){var t,e,n,r,i,a,o,s=1,c=0,u=0,l=1,h=1,f=0,d=null,p=1,g=1,y=Cf({point:function(t,e){var n=b([t,e]);this.stream.point(n[0],n[1])}}),m=_h;function v(){return p=s*l,g=s*h,a=o=null,b}function b(n){var r=n[0]*p,i=n[1]*g;if(f){var a=i*t-r*e;r=r*t+i*e,i=a}return[r+c,i+u]}return b.invert=function(n){var r=n[0]-c,i=n[1]-u;if(f){var a=i*t+r*e;r=r*t-i*e,i=a}return[r/p,i/g]},b.stream=function(t){return a&&o===t?a:a=y(m(o=t))},b.postclip=function(t){return arguments.length?(m=t,d=n=r=i=null,v()):m},b.clipExtent=function(t){return arguments.length?(m=null==t?(d=n=r=i=null,_h):Wl(d=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),v()):null==d?null:[[d,n],[r,i]]},b.scale=function(t){return arguments.length?(s=+t,v()):s},b.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],v()):[c,u]},b.angle=function(n){return arguments.length?(e=$c(f=n%360*Oc),t=Pc(f),v()):f*Lc},b.reflectX=function(t){return arguments.length?(l=t?-1:1,v()):l<0},b.reflectY=function(t){return arguments.length?(h=t?-1:1,v()):h<0},b.fitExtent=function(t,e){return Af(b,t,e)},b.fitSize=function(t,e){return Mf(b,t,e)},b.fitWidth=function(t,e){return Nf(b,t,e)},b.fitHeight=function(t,e){return Df(b,t,e)},b}function yd(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function md(){return Ff(yd).scale(175.295)}function vd(t,e){return[Pc(e)*$c(t),$c(e)]}function bd(){return Ff(vd).scale(249.5).clipAngle(90.000001)}function _d(t,e){var n=Pc(e),r=1+Pc(t)*n;return[n*$c(t)/r,$c(e)/r]}function xd(){return Ff(_d).scale(250).clipAngle(142)}function wd(t,e){return[Uc(Wc((Nc+e)/2)),-t]}function kd(){var t=Kf(wd),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function Td(t,e){return t.parent===e.parent?1:2}function Cd(t,e){return t+e.x}function Ed(t,e){return Math.max(t,e.y)}function Sd(){var t=Td,e=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(Cd,0)/t.length}(n),e.y=function(t){return 1+t.reduce(Ed,0)}(n)):(e.x=a?o+=t(e,a):0,e.y=0,a=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=s.x-t(s,c)/2,l=c.x+t(c,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(l-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function Ad(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function Md(t,e){var n,r,i,a,o,s=new Ld(t),c=+t.value&&(s.value=t.value),u=[s];for(null==e&&(e=Nd);n=u.pop();)if(c&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)u.push(r=n.children[a]=new Ld(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Bd)}function Nd(t){return t.children}function Dd(t){t.data=t.data.data}function Bd(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Ld(t){this.data=t,this.depth=this.height=0,this.parent=null}hd.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(od+sd*i+a*(cd+ud*i))-e)/(od+3*sd*i+a*(7*cd+9*ud*i)))*r)*i*i,!(Ic(n)<Ac));++o);return[ld*t*(od+3*sd*i+a*(7*cd+9*ud*i))/Pc(r),Gc($c(r)/ld)]},dd.invert=Hf(Rc),yd.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(Ic(n)>Sc&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]},vd.invert=Hf(Gc),_d.invert=Hf((function(t){return 2*Rc(t)})),wd.invert=function(t,e){return[-e,2*Rc(jc(t))-Nc]},Ld.prototype=Md.prototype={constructor:Ld,count:function(){return this.eachAfter(Ad)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return Md(this).eachBefore(Dd)}};var Od=Array.prototype.slice;function Id(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(Od.call(t))).length,a=[];r<i;)e=t[r],n&&Pd(n,e)?++r:(n=jd(a=Rd(a,e)),r=0);return n}function Rd(t,e){var n,r;if(Yd(e,t))return[e];for(n=0;n<t.length;++n)if(Fd(e,t[n])&&Yd(Ud(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(Fd(Ud(t[n],t[r]),e)&&Fd(Ud(t[n],e),t[r])&&Fd(Ud(t[r],e),t[n])&&Yd(zd(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Fd(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function Pd(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Yd(t,e){for(var n=0;n<e.length;++n)if(!Pd(t,e[n]))return!1;return!0}function jd(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return Ud(t[0],t[1]);case 3:return zd(t[0],t[1],t[2])}}function Ud(t,e){var n=t.x,r=t.y,i=t.r,a=e.x,o=e.y,s=e.r,c=a-n,u=o-r,l=s-i,h=Math.sqrt(c*c+u*u);return{x:(n+a+c/h*l)/2,y:(r+o+u/h*l)/2,r:(h+i+s)/2}}function zd(t,e,n){var r=t.x,i=t.y,a=t.r,o=e.x,s=e.y,c=e.r,u=n.x,l=n.y,h=n.r,f=r-o,d=r-u,p=i-s,g=i-l,y=c-a,m=h-a,v=r*r+i*i-a*a,b=v-o*o-s*s+c*c,_=v-u*u-l*l+h*h,x=d*p-f*g,w=(p*_-g*b)/(2*x)-r,k=(g*y-p*m)/x,T=(d*b-f*_)/(2*x)-i,C=(f*m-d*y)/x,E=k*k+C*C-1,S=2*(a+w*k+T*C),A=w*w+T*T-a*a,M=-(E?(S+Math.sqrt(S*S-4*E*A))/(2*E):A/S);return{x:r+w+k*M,y:i+T+C*M,r:M}}function $d(t,e,n){var r,i,a,o,s=t.x-e.x,c=t.y-e.y,u=s*s+c*c;u?(i=e.r+n.r,i*=i,o=t.r+n.r,i>(o*=o)?(r=(u+o-i)/(2*u),a=Math.sqrt(Math.max(0,o/u-r*r)),n.x=t.x-r*s-a*c,n.y=t.y-r*c+a*s):(r=(u+i-o)/(2*u),a=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*s-a*c,n.y=e.y+r*c+a*s)):(n.x=e.x+n.r,n.y=e.y)}function qd(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Hd(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function Wd(t){this._=t,this.next=null,this.previous=null}function Vd(t){if(!(i=t.length))return 0;var e,n,r,i,a,o,s,c,u,l,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;$d(n,e,r=t[2]),e=new Wd(e),n=new Wd(n),r=new Wd(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){$d(e._,n._,r=t[s]),r=new Wd(r),c=n.next,u=e.previous,l=n._.r,h=e._.r;do{if(l<=h){if(qd(c._,r._)){n=c,e.next=n,n.previous=e,--s;continue t}l+=c._.r,c=c.next}else{if(qd(u._,r._)){(e=u).next=n,n.previous=e,--s;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,a=Hd(e);(r=r.next)!==n;)(o=Hd(r))<a&&(e=r,a=o);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=Id(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}function Gd(t){return Vd(t),t}function Xd(t){return null==t?null:Zd(t)}function Zd(t){if("function"!=typeof t)throw new Error;return t}function Qd(){return 0}function Kd(t){return function(){return t}}function Jd(t){return Math.sqrt(t.value)}function tp(){var t=null,e=1,n=1,r=Qd;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(ep(t)).eachAfter(np(r,.5)).eachBefore(rp(1)):i.eachBefore(ep(Jd)).eachAfter(np(Qd,1)).eachAfter(np(r,i.r/Math.min(e,n))).eachBefore(rp(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=Xd(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:Kd(+t),i):r},i}function ep(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function np(t,e){return function(n){if(r=n.children){var r,i,a,o=r.length,s=t(n)*e||0;if(s)for(i=0;i<o;++i)r[i].r+=s;if(a=Vd(r),s)for(i=0;i<o;++i)r[i].r-=s;n.r=a+s}}}function rp(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function ip(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function ap(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,u=t.value&&(r-e)/t.value;++s<c;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*u}function op(){var t=1,e=1,n=0,r=!1;function i(i){var a=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(r){r.children&&ap(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=s}}(e,a)),r&&i.eachBefore(ip),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i}var sp={depth:-1},cp={};function up(t){return t.id}function lp(t){return t.parentId}function hp(){var t=up,e=lp;function n(n){var r,i,a,o,s,c,u,l=n.length,h=new Array(l),f={};for(i=0;i<l;++i)r=n[i],s=h[i]=new Ld(r),null!=(c=t(r,i,n))&&(c+="")&&(f[u="$"+(s.id=c)]=u in f?cp:s);for(i=0;i<l;++i)if(s=h[i],null!=(c=e(n[i],i,n))&&(c+="")){if(!(o=f["$"+c]))throw new Error("missing: "+c);if(o===cp)throw new Error("ambiguous: "+c);o.children?o.children.push(s):o.children=[s],s.parent=o}else{if(a)throw new Error("multiple roots");a=s}if(!a)throw new Error("no root");if(a.parent=sp,a.eachBefore((function(t){t.depth=t.parent.depth+1,--l})).eachBefore(Bd),a.parent=null,l>0)throw new Error("cycle");return a}return n.id=function(e){return arguments.length?(t=Zd(e),n):t},n.parentId=function(t){return arguments.length?(e=Zd(t),n):e},n}function fp(t,e){return t.parent===e.parent?1:2}function dp(t){var e=t.children;return e?e[0]:t.t}function pp(t){var e=t.children;return e?e[e.length-1]:t.t}function gp(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function yp(t,e,n){return t.a.parent===e.parent?t.a:n}function mp(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function vp(){var t=fp,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,a,o=new mp(t,0),s=[o];e=s.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=e.children[i]=new mp(r[i],i)),n.parent=e;return(o.parent=new mp(null,0)).children=[o],o}(i);if(c.eachAfter(a),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(s);else{var u=i,l=i,h=i;i.eachBefore((function(t){t.x<u.x&&(u=t),t.x>l.x&&(l=t),t.depth>h.depth&&(h=t)}));var f=u===l?1:t(u,l)/2,d=f-u.x,p=e/(l.x+f+d),g=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*g}))}return i}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,a=e,o=e,s=n,c=a.parent.children[0],u=a.m,l=o.m,h=s.m,f=c.m;s=pp(s),a=dp(a),s&&a;)c=dp(c),(o=pp(o)).a=e,(i=s.z+h-a.z-u+t(s._,a._))>0&&(gp(yp(s,e,r),e,i),u+=i,l+=i),h+=s.m,u+=a.m,f+=c.m,l+=o.m;s&&!pp(o)&&(o.t=s,o.m+=h-l),a&&!dp(c)&&(c.t=a,c.m+=u-f,r=e)}return r}(e,i,e.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function bp(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,u=t.value&&(i-n)/t.value;++s<c;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*u}mp.prototype=Object.create(Ld.prototype);var _p=(1+Math.sqrt(5))/2;function xp(t,e,n,r,i,a){for(var o,s,c,u,l,h,f,d,p,g,y,m=[],v=e.children,b=0,_=0,x=v.length,w=e.value;b<x;){c=i-n,u=a-r;do{l=v[_++].value}while(!l&&_<x);for(h=f=l,y=l*l*(g=Math.max(u/c,c/u)/(w*t)),p=Math.max(f/y,y/h);_<x;++_){if(l+=s=v[_].value,s<h&&(h=s),s>f&&(f=s),y=l*l*g,(d=Math.max(f/y,y/h))>p){l-=s;break}p=d}m.push(o={value:l,dice:c<u,children:v.slice(b,_)}),o.dice?ap(o,n,r,i,w?r+=u*l/w:a):bp(o,n,r,w?n+=c*l/w:i,a),w-=l,b=_}return m}const wp=function t(e){function n(t,n,r,i,a){xp(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(_p);function kp(){var t=wp,e=!1,n=1,r=1,i=[0],a=Qd,o=Qd,s=Qd,c=Qd,u=Qd;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(ip),t}function h(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<l&&(l=f=(l+f)/2),e.x0=r,e.y0=l,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=a(e)/2,r+=u(e)-n,l+=o(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=c(e)-n)<l&&(l=f=(l+f)/2),t(e,r,l,h,f))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=Zd(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:Kd(+t),l):a},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:Kd(+t),l):o},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Kd(+t),l):s},l.paddingBottom=function(t){return arguments.length?(c="function"==typeof t?t:Kd(+t),l):c},l.paddingLeft=function(t){return arguments.length?(u="function"==typeof t?t:Kd(+t),l):u},l}function Tp(t,e,n,r,i){var a,o,s=t.children,c=s.length,u=new Array(c+1);for(u[0]=o=a=0;a<c;++a)u[a+1]=o+=s[a].value;!function t(e,n,r,i,a,o,c){if(e>=n-1){var l=s[e];return l.x0=i,l.y0=a,l.x1=o,void(l.y1=c)}for(var h=u[e],f=r/2+h,d=e+1,p=n-1;d<p;){var g=d+p>>>1;u[g]<f?d=g+1:p=g}f-u[d-1]<u[d]-f&&e+1<d&&--d;var y=u[d]-h,m=r-y;if(o-i>c-a){var v=(i*m+o*y)/r;t(e,d,y,i,a,v,c),t(d,n,m,v,a,o,c)}else{var b=(a*m+c*y)/r;t(e,d,y,i,a,o,b),t(d,n,m,i,b,o,c)}}(0,c,t.value,e,n,r,i)}function Cp(t,e,n,r,i){(1&t.depth?bp:ap)(t,e,n,r,i)}const Ep=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,c,u,l,h=-1,f=o.length,d=t.value;++h<f;){for(c=(s=o[h]).children,u=s.value=0,l=c.length;u<l;++u)s.value+=c[u].value;s.dice?ap(s,n,r,i,r+=(a-r)*s.value/d):bp(s,n,r,n+=(i-n)*s.value/d,a),d-=s.value}else t._squarify=o=xp(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(_p);function Sp(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function Ap(t,e){var n=dn(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}}function Mp(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Np=Math.SQRT2;function Dp(t){return((t=Math.exp(t))+1/t)/2}function Bp(t,e){var n,r,i=t[0],a=t[1],o=t[2],s=e[0],c=e[1],u=e[2],l=s-i,h=c-a,f=l*l+h*h;if(f<1e-12)r=Math.log(u/o)/Np,n=function(t){return[i+t*l,a+t*h,o*Math.exp(Np*t*r)]};else{var d=Math.sqrt(f),p=(u*u-o*o+4*f)/(2*o*2*d),g=(u*u-o*o-4*f)/(2*u*2*d),y=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(g*g+1)-g);r=(m-y)/Np,n=function(t){var e,n=t*r,s=Dp(y),c=o/(2*d)*(s*(e=Np*n+y,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[i+c*l,a+c*h,o*s/Dp(Np*n+y)]}}return n.duration=1e3*r,n}function Lp(t){return function(e,n){var r=t((e=an(e)).h,(n=an(n)).h),i=pn(e.s,n.s),a=pn(e.l,n.l),o=pn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+""}}}const Op=Lp(dn);var Ip=Lp(pn);function Rp(t,e){var n=pn((t=Ta(t)).l,(e=Ta(e)).l),r=pn(t.a,e.a),i=pn(t.b,e.b),a=pn(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+""}}function Fp(t){return function(e,n){var r=t((e=Ba(e)).h,(n=Ba(n)).h),i=pn(e.c,n.c),a=pn(e.l,n.l),o=pn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}const Pp=Fp(dn);var Yp=Fp(pn);function jp(t){return function e(n){function r(e,r){var i=t((e=qa(e)).h,(r=qa(r)).h),a=pn(e.s,r.s),o=pn(e.l,r.l),s=pn(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}const Up=jp(dn);var zp=jp(pn);function $p(t,e){for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n<r;)a[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return a[e](t-e)}}function qp(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}function Hp(t){for(var e,n=-1,r=t.length,i=t[r-1],a=0;++n<r;)e=i,i=t[n],a+=e[1]*i[0]-e[0]*i[1];return a/2}function Wp(t){for(var e,n,r=-1,i=t.length,a=0,o=0,s=t[i-1],c=0;++r<i;)e=s,s=t[r],c+=n=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*n,o+=(e[1]+s[1])*n;return[a/(c*=3),o/c]}function Vp(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function Gp(t,e){return t[0]-e[0]||t[1]-e[1]}function Xp(t){for(var e=t.length,n=[0,1],r=2,i=2;i<e;++i){for(;r>1&&Vp(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function Zp(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(Gp),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var a=Xp(r),o=Xp(i),s=o[0]===a[0],c=o[o.length-1]===a[a.length-1],u=[];for(e=a.length-1;e>=0;--e)u.push(t[r[a[e]][2]]);for(e=+s;e<o.length-c;++e)u.push(t[r[o[e]][2]]);return u}function Qp(t,e){for(var n,r,i=t.length,a=t[i-1],o=e[0],s=e[1],c=a[0],u=a[1],l=!1,h=0;h<i;++h)n=(a=t[h])[0],(r=a[1])>s!=u>s&&o<(c-n)*(s-r)/(u-r)+n&&(l=!l),c=n,u=r;return l}function Kp(t){for(var e,n,r=-1,i=t.length,a=t[i-1],o=a[0],s=a[1],c=0;++r<i;)e=o,n=s,e-=o=(a=t[r])[0],n-=s=a[1],c+=Math.sqrt(e*e+n*n);return c}function Jp(){return Math.random()}const tg=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(Jp),eg=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(Jp),ng=function t(e){function n(){var t=eg.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(Jp),rg=function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(Jp),ig=function t(e){function n(t){var n=rg.source(e)(t);return function(){return n()/t}}return n.source=t,n}(Jp),ag=function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(Jp);function og(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function sg(t,e){switch(arguments.length){case 0:break;case 1:this.interpolator(t);break;default:this.interpolator(e).domain(t)}return this}var cg=Array.prototype,ug=cg.map,lg=cg.slice,hg={name:"implicit"};function fg(){var t=na(),e=[],n=[],r=hg;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==hg)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=na();for(var r,a,o=-1,s=n.length;++o<s;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=lg.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return fg(e,n).unknown(r)},og.apply(i,arguments),i}function dg(){var t,e,n=fg().unknown(void 0),r=n.domain,i=n.range,a=[0,1],o=!1,s=0,c=0,u=.5;function l(){var n=r().length,l=a[1]<a[0],h=a[l-0],f=a[1-l];t=(f-h)/Math.max(1,n-s+2*c),o&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*u,e=t*(1-s),o&&(h=Math.round(h),e=Math.round(e));var d=k(n).map((function(e){return h+t*e}));return i(l?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),l()):r()},n.range=function(t){return arguments.length?(a=[+t[0],+t[1]],l()):a.slice()},n.rangeRound=function(t){return a=[+t[0],+t[1]],o=!0,l()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,l()):o},n.padding=function(t){return arguments.length?(s=Math.min(1,c=+t),l()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),l()):s},n.paddingOuter=function(t){return arguments.length?(c=+t,l()):c},n.align=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),l()):u},n.copy=function(){return dg(r(),a).round(o).paddingInner(s).paddingOuter(c).align(u)},og.apply(l(),arguments)}function pg(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return pg(e())},t}function gg(){return pg(dg.apply(null,arguments).paddingInner(1))}function yg(t){return+t}var mg=[0,1];function vg(t){return t}function bg(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function _g(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function xg(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=bg(i,r),a=n(o,a)):(r=bg(r,i),a=n(a,o)),function(t){return a(r(t))}}function wg(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=bg(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=u(t,e,1,r)-1;return a[n](i[n](e))}}function kg(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Tg(){var t,e,n,r,i,a,o=mg,s=mg,c=Mn,u=vg;function l(){return r=Math.min(o.length,s.length)>2?wg:xg,i=a=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,c)))(t(u(e)))}return h.invert=function(n){return u(e((a||(a=r(s,o.map(t),Tn)))(n)))},h.domain=function(t){return arguments.length?(o=ug.call(t,yg),u===vg||(u=_g(o)),l()):o.slice()},h.range=function(t){return arguments.length?(s=lg.call(t),l()):s.slice()},h.rangeRound=function(t){return s=lg.call(t),c=Mp,l()},h.clamp=function(t){return arguments.length?(u=t?_g(o):vg,h):u!==vg},h.interpolate=function(t){return arguments.length?(c=t,l()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}function Cg(t,e){return Tg()(t,e)}function Eg(t,e,n,r){var i,a=M(t,e,n);switch((r=cc(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=xc(a,o))||(r.precision=i),gc(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=wc(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=_c(a))||(r.precision=i-2*("%"===r.type))}return pc(r)}function Sg(t){var e=t.domain;return t.ticks=function(t){var n=e();return S(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Eg(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,s=i[a],c=i[o];return c<s&&(r=s,s=c,c=r,r=a,a=o,o=r),(r=A(s,c,n))>0?r=A(s=Math.floor(s/r)*r,c=Math.ceil(c/r)*r,n):r<0&&(r=A(s=Math.ceil(s*r)/r,c=Math.floor(c*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(c/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(c*r)/r,e(i)),t},t}function Ag(){var t=Cg(vg,vg);return t.copy=function(){return kg(t,Ag())},og.apply(t,arguments),Sg(t)}function Mg(t){var e;function n(t){return isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=ug.call(e,yg),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return Mg(t).unknown(e)},t=arguments.length?ug.call(t,yg):[0,1],Sg(n)}function Ng(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function Dg(t){return Math.log(t)}function Bg(t){return Math.exp(t)}function Lg(t){return-Math.log(-t)}function Og(t){return-Math.exp(-t)}function Ig(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Rg(t){return function(e){return-t(-e)}}function Fg(t){var e,n,r=t(Dg,Bg),i=r.domain,a=10;function o(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(a),n=function(t){return 10===t?Ig:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=Rg(e),n=Rg(n),t(Lg,Og)):t(Dg,Bg),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),s=o[0],c=o[o.length-1];(r=c<s)&&(f=s,s=c,c=f);var u,l,h,f=e(s),d=e(c),p=null==t?10:+t,g=[];if(!(a%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(l=1,u=n(f);l<a;++l)if(!((h=u*l)<s)){if(h>c)break;g.push(h)}}else for(;f<d;++f)for(l=a-1,u=n(f);l>=1;--l)if(!((h=u*l)<s)){if(h>c)break;g.push(h)}}else g=S(f,d,Math.min(d-f,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=pc(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(Ng(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function Pg(){var t=Fg(Tg()).domain([1,10]);return t.copy=function(){return kg(t,Pg()).base(t.base())},og.apply(t,arguments),t}function Yg(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function jg(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Ug(t){var e=1,n=t(Yg(e),jg(e));return n.constant=function(n){return arguments.length?t(Yg(e=+n),jg(e)):e},Sg(n)}function zg(){var t=Ug(Tg());return t.copy=function(){return kg(t,zg()).constant(t.constant())},og.apply(t,arguments)}function $g(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function qg(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Hg(t){return t<0?-t*t:t*t}function Wg(t){var e=t(vg,vg),n=1;function r(){return 1===n?t(vg,vg):.5===n?t(qg,Hg):t($g(n),$g(1/n))}return e.exponent=function(t){return arguments.length?(n=+t,r()):n},Sg(e)}function Vg(){var t=Wg(Tg());return t.copy=function(){return kg(t,Vg()).exponent(t.exponent())},og.apply(t,arguments),t}function Gg(){return Vg.apply(null,arguments).exponent(.5)}function Xg(){var t,e=[],n=[],r=[];function a(){var t=0,i=Math.max(1,n.length);for(r=new Array(i-1);++t<i;)r[t-1]=B(e,t/i);return o}function o(e){return isNaN(e=+e)?t:n[u(r,e)]}return o.invertExtent=function(t){var i=n.indexOf(t);return i<0?[NaN,NaN]:[i>0?r[i-1]:e[0],i<r.length?r[i]:e[e.length-1]]},o.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var n,r=0,o=t.length;r<o;++r)null==(n=t[r])||isNaN(n=+n)||e.push(n);return e.sort(i),a()},o.range=function(t){return arguments.length?(n=lg.call(t),a()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return r.slice()},o.copy=function(){return Xg().domain(e).range(n).unknown(t)},og.apply(o,arguments)}function Zg(){var t,e=0,n=1,r=1,i=[.5],a=[0,1];function o(e){return e<=e?a[u(i,e,0,r)]:t}function s(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*e)/(r+1);return o}return o.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],s()):[e,n]},o.range=function(t){return arguments.length?(r=(a=lg.call(t)).length-1,s()):a.slice()},o.invertExtent=function(t){var o=a.indexOf(t);return o<0?[NaN,NaN]:o<1?[e,i[0]]:o>=r?[i[r-1],n]:[i[o-1],i[o]]},o.unknown=function(e){return arguments.length?(t=e,o):o},o.thresholds=function(){return i.slice()},o.copy=function(){return Zg().domain([e,n]).range(a).unknown(t)},og.apply(Sg(o),arguments)}function Qg(){var t,e=[.5],n=[0,1],r=1;function i(i){return i<=i?n[u(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=lg.call(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=lg.call(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return Qg().domain(e).range(n).unknown(t)},og.apply(i,arguments)}var Kg=new Date,Jg=new Date;function ty(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return ty((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Kg.setTime(+e),Jg.setTime(+r),t(Kg),t(Jg),Math.floor(n(Kg,Jg))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var ey=ty((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));ey.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ty((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};const ny=ey;var ry=ey.range,iy=ty((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}));const ay=iy;var oy=iy.range,sy=1e3,cy=6e4,uy=36e5,ly=864e5,hy=6048e5;function fy(t){return ty((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*cy)/hy}))}var dy=fy(0),py=fy(1),gy=fy(2),yy=fy(3),my=fy(4),vy=fy(5),by=fy(6),_y=dy.range,xy=py.range,wy=gy.range,ky=yy.range,Ty=my.range,Cy=vy.range,Ey=by.range,Sy=ty((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*cy)/ly}),(function(t){return t.getDate()-1}));const Ay=Sy;var My=Sy.range,Ny=ty((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*sy-t.getMinutes()*cy)}),(function(t,e){t.setTime(+t+e*uy)}),(function(t,e){return(e-t)/uy}),(function(t){return t.getHours()}));const Dy=Ny;var By=Ny.range,Ly=ty((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*sy)}),(function(t,e){t.setTime(+t+e*cy)}),(function(t,e){return(e-t)/cy}),(function(t){return t.getMinutes()}));const Oy=Ly;var Iy=Ly.range,Ry=ty((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*sy)}),(function(t,e){return(e-t)/sy}),(function(t){return t.getUTCSeconds()}));const Fy=Ry;var Py=Ry.range,Yy=ty((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Yy.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ty((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Yy:null};const jy=Yy;var Uy=Yy.range;function zy(t){return ty((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/hy}))}var $y=zy(0),qy=zy(1),Hy=zy(2),Wy=zy(3),Vy=zy(4),Gy=zy(5),Xy=zy(6),Zy=$y.range,Qy=qy.range,Ky=Hy.range,Jy=Wy.range,tm=Vy.range,em=Gy.range,nm=Xy.range,rm=ty((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/ly}),(function(t){return t.getUTCDate()-1}));const im=rm;var am=rm.range,om=ty((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));om.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ty((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};const sm=om;var cm=om.range;function um(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function lm(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function hm(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function fm(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,u=Tm(i),l=Cm(i),h=Tm(a),f=Cm(a),d=Tm(o),p=Cm(o),g=Tm(s),y=Cm(s),m=Tm(c),v=Cm(c),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Wm,e:Wm,f:Qm,g:cv,G:lv,H:Vm,I:Gm,j:Xm,L:Zm,m:Km,M:Jm,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Lv,s:Ov,S:tv,u:ev,U:nv,V:iv,w:av,W:ov,x:null,X:null,y:sv,Y:uv,Z:hv,"%":Bv},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:fv,e:fv,f:mv,g:Av,G:Nv,H:dv,I:pv,j:gv,L:yv,m:vv,M:bv,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Lv,s:Ov,S:_v,u:xv,U:wv,V:Tv,w:Cv,W:Ev,x:null,X:null,y:Sv,Y:Mv,Z:Dv,"%":Bv},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return T(t,e,n,r)},d:Rm,e:Rm,f:zm,g:Bm,G:Dm,H:Pm,I:Pm,j:Fm,L:Um,m:Im,M:Ym,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:Om,Q:qm,s:Hm,S:jm,u:Sm,U:Am,V:Mm,w:Em,W:Nm,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:Bm,Y:Dm,Z:Lm,"%":$m};function w(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===t.charCodeAt(s)&&(o.push(t.slice(c,s)),null!=(i=vm[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),c=s+1);return o.push(t.slice(c,s)),o.join("")}}function k(t,e){return function(n){var r,i,a=hm(1900,void 0,1);if(T(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=lm(hm(a.y,0,1))).getUTCDay(),r=i>4||0===i?qy.ceil(r):qy(r),r=im.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=um(hm(a.y,0,1))).getDay(),r=i>4||0===i?py.ceil(r):py(r),r=Ay.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?lm(hm(a.y,0,1)).getUTCDay():um(hm(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,lm(a)):um(a)}}function T(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o<s;){if(r>=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in vm?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),{format:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}var dm,pm,gm,ym,mm,vm={"-":"",_:" ",0:"0"},bm=/^\s*\d+/,_m=/^%/,xm=/[\\^$*+?|[\]().{}]/g;function wm(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function km(t){return t.replace(xm,"\\$&")}function Tm(t){return new RegExp("^(?:"+t.map(km).join("|")+")","i")}function Cm(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function Em(t,e,n){var r=bm.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Sm(t,e,n){var r=bm.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Am(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Mm(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Nm(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Dm(t,e,n){var r=bm.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Bm(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Lm(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Om(t,e,n){var r=bm.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Im(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Rm(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Fm(t,e,n){var r=bm.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Pm(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ym(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function jm(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Um(t,e,n){var r=bm.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function zm(t,e,n){var r=bm.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function $m(t,e,n){var r=_m.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function qm(t,e,n){var r=bm.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Hm(t,e,n){var r=bm.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Wm(t,e){return wm(t.getDate(),e,2)}function Vm(t,e){return wm(t.getHours(),e,2)}function Gm(t,e){return wm(t.getHours()%12||12,e,2)}function Xm(t,e){return wm(1+Ay.count(ny(t),t),e,3)}function Zm(t,e){return wm(t.getMilliseconds(),e,3)}function Qm(t,e){return Zm(t,e)+"000"}function Km(t,e){return wm(t.getMonth()+1,e,2)}function Jm(t,e){return wm(t.getMinutes(),e,2)}function tv(t,e){return wm(t.getSeconds(),e,2)}function ev(t){var e=t.getDay();return 0===e?7:e}function nv(t,e){return wm(dy.count(ny(t)-1,t),e,2)}function rv(t){var e=t.getDay();return e>=4||0===e?my(t):my.ceil(t)}function iv(t,e){return t=rv(t),wm(my.count(ny(t),t)+(4===ny(t).getDay()),e,2)}function av(t){return t.getDay()}function ov(t,e){return wm(py.count(ny(t)-1,t),e,2)}function sv(t,e){return wm(t.getFullYear()%100,e,2)}function cv(t,e){return wm((t=rv(t)).getFullYear()%100,e,2)}function uv(t,e){return wm(t.getFullYear()%1e4,e,4)}function lv(t,e){var n=t.getDay();return wm((t=n>=4||0===n?my(t):my.ceil(t)).getFullYear()%1e4,e,4)}function hv(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+wm(e/60|0,"0",2)+wm(e%60,"0",2)}function fv(t,e){return wm(t.getUTCDate(),e,2)}function dv(t,e){return wm(t.getUTCHours(),e,2)}function pv(t,e){return wm(t.getUTCHours()%12||12,e,2)}function gv(t,e){return wm(1+im.count(sm(t),t),e,3)}function yv(t,e){return wm(t.getUTCMilliseconds(),e,3)}function mv(t,e){return yv(t,e)+"000"}function vv(t,e){return wm(t.getUTCMonth()+1,e,2)}function bv(t,e){return wm(t.getUTCMinutes(),e,2)}function _v(t,e){return wm(t.getUTCSeconds(),e,2)}function xv(t){var e=t.getUTCDay();return 0===e?7:e}function wv(t,e){return wm($y.count(sm(t)-1,t),e,2)}function kv(t){var e=t.getUTCDay();return e>=4||0===e?Vy(t):Vy.ceil(t)}function Tv(t,e){return t=kv(t),wm(Vy.count(sm(t),t)+(4===sm(t).getUTCDay()),e,2)}function Cv(t){return t.getUTCDay()}function Ev(t,e){return wm(qy.count(sm(t)-1,t),e,2)}function Sv(t,e){return wm(t.getUTCFullYear()%100,e,2)}function Av(t,e){return wm((t=kv(t)).getUTCFullYear()%100,e,2)}function Mv(t,e){return wm(t.getUTCFullYear()%1e4,e,4)}function Nv(t,e){var n=t.getUTCDay();return wm((t=n>=4||0===n?Vy(t):Vy.ceil(t)).getUTCFullYear()%1e4,e,4)}function Dv(){return"+0000"}function Bv(){return"%"}function Lv(t){return+t}function Ov(t){return Math.floor(+t/1e3)}function Iv(t){return dm=fm(t),pm=dm.format,gm=dm.parse,ym=dm.utcFormat,mm=dm.utcParse,dm}Iv({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Rv=31536e6;function Fv(t){return new Date(t)}function Pv(t){return t instanceof Date?+t:+new Date(+t)}function Yv(t,e,n,r,i,o,s,c,u){var l=Cg(vg,vg),h=l.invert,f=l.domain,d=u(".%L"),p=u(":%S"),g=u("%I:%M"),y=u("%I %p"),m=u("%a %d"),v=u("%b %d"),b=u("%B"),_=u("%Y"),x=[[s,1,1e3],[s,5,5e3],[s,15,15e3],[s,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,Rv]];function w(a){return(s(a)<a?d:o(a)<a?p:i(a)<a?g:r(a)<a?y:e(a)<a?n(a)<a?m:v:t(a)<a?b:_)(a)}function k(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,s=a((function(t){return t[2]})).right(x,o);s===x.length?(i=M(n/Rv,r/Rv,e),e=t):s?(i=(s=x[o/x[s-1][2]<x[s][2]/o?s-1:s])[1],e=s[0]):(i=Math.max(M(n,r,e),1),e=c)}return null==i?e:e.every(i)}return l.invert=function(t){return new Date(h(t))},l.domain=function(t){return arguments.length?f(ug.call(t,Pv)):f().map(Fv)},l.ticks=function(t,e){var n,r=f(),i=r[0],a=r[r.length-1],o=a<i;return o&&(n=i,i=a,a=n),n=(n=k(t,i,a,e))?n.range(i,a+1):[],o?n.reverse():n},l.tickFormat=function(t,e){return null==e?w:u(e)},l.nice=function(t,e){var n=f();return(t=k(t,n[0],n[n.length-1],e))?f(Ng(n,t)):l},l.copy=function(){return kg(l,Yv(t,e,n,r,i,o,s,c,u))},l}function jv(){return og.apply(Yv(ny,ay,dy,Ay,Dy,Oy,Fy,jy,pm).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var Uv=ty((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}));const zv=Uv;var $v=Uv.range,qv=ty((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*uy)}),(function(t,e){return(e-t)/uy}),(function(t){return t.getUTCHours()}));const Hv=qv;var Wv=qv.range,Vv=ty((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*cy)}),(function(t,e){return(e-t)/cy}),(function(t){return t.getUTCMinutes()}));const Gv=Vv;var Xv=Vv.range;function Zv(){return og.apply(Yv(sm,zv,$y,im,Hv,Gv,Fy,jy,ym).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Qv(){var t,e,n,r,i,a=0,o=1,s=vg,c=!1;function u(e){return isNaN(e=+e)?i:s(0===n?.5:(e=(r(e)-t)*n,c?Math.max(0,Math.min(1,e)):e))}return u.domain=function(i){return arguments.length?(t=r(a=+i[0]),e=r(o=+i[1]),n=t===e?0:1/(e-t),u):[a,o]},u.clamp=function(t){return arguments.length?(c=!!t,u):c},u.interpolator=function(t){return arguments.length?(s=t,u):s},u.unknown=function(t){return arguments.length?(i=t,u):i},function(i){return r=i,t=i(a),e=i(o),n=t===e?0:1/(e-t),u}}function Kv(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Jv(){var t=Sg(Qv()(vg));return t.copy=function(){return Kv(t,Jv())},sg.apply(t,arguments)}function tb(){var t=Fg(Qv()).domain([1,10]);return t.copy=function(){return Kv(t,tb()).base(t.base())},sg.apply(t,arguments)}function eb(){var t=Ug(Qv());return t.copy=function(){return Kv(t,eb()).constant(t.constant())},sg.apply(t,arguments)}function nb(){var t=Wg(Qv());return t.copy=function(){return Kv(t,nb()).exponent(t.exponent())},sg.apply(t,arguments)}function rb(){return nb.apply(null,arguments).exponent(.5)}function ib(){var t=[],e=vg;function n(n){if(!isNaN(n=+n))return e((u(t,n)-1)/(t.length-1))}return n.domain=function(e){if(!arguments.length)return t.slice();t=[];for(var r,a=0,o=e.length;a<o;++a)null==(r=e[a])||isNaN(r=+r)||t.push(r);return t.sort(i),n},n.interpolator=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return ib(e).domain(t)},sg.apply(n,arguments)}function ab(){var t,e,n,r,i,a,o,s=0,c=.5,u=1,l=vg,h=!1;function f(t){return isNaN(t=+t)?o:(t=.5+((t=+a(t))-e)*(t<e?r:i),l(h?Math.max(0,Math.min(1,t)):t))}return f.domain=function(o){return arguments.length?(t=a(s=+o[0]),e=a(c=+o[1]),n=a(u=+o[2]),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),f):[s,c,u]},f.clamp=function(t){return arguments.length?(h=!!t,f):h},f.interpolator=function(t){return arguments.length?(l=t,f):l},f.unknown=function(t){return arguments.length?(o=t,f):o},function(o){return a=o,t=o(s),e=o(c),n=o(u),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),f}}function ob(){var t=Sg(ab()(vg));return t.copy=function(){return Kv(t,ob())},sg.apply(t,arguments)}function sb(){var t=Fg(ab()).domain([.1,1,10]);return t.copy=function(){return Kv(t,sb()).base(t.base())},sg.apply(t,arguments)}function cb(){var t=Ug(ab());return t.copy=function(){return Kv(t,cb()).constant(t.constant())},sg.apply(t,arguments)}function ub(){var t=Wg(ab());return t.copy=function(){return Kv(t,ub()).exponent(t.exponent())},sg.apply(t,arguments)}function lb(){return ub.apply(null,arguments).exponent(.5)}function hb(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}const fb=hb("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),db=hb("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),pb=hb("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),gb=hb("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),yb=hb("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),mb=hb("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),vb=hb("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),bb=hb("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),_b=hb("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),xb=hb("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function wb(t){return mn(t[t.length-1])}var kb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(hb);const Tb=wb(kb);var Cb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(hb);const Eb=wb(Cb);var Sb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(hb);const Ab=wb(Sb);var Mb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(hb);const Nb=wb(Mb);var Db=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(hb);const Bb=wb(Db);var Lb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(hb);const Ob=wb(Lb);var Ib=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(hb);const Rb=wb(Ib);var Fb=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(hb);const Pb=wb(Fb);var Yb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(hb);const jb=wb(Yb);var Ub=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(hb);const zb=wb(Ub);var $b=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(hb);const qb=wb($b);var Hb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(hb);const Wb=wb(Hb);var Vb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(hb);const Gb=wb(Vb);var Xb=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(hb);const Zb=wb(Xb);var Qb=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(hb);const Kb=wb(Qb);var Jb=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(hb);const t_=wb(Jb);var e_=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(hb);const n_=wb(e_);var r_=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(hb);const i_=wb(r_);var a_=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(hb);const o_=wb(a_);var s_=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(hb);const c_=wb(s_);var u_=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(hb);const l_=wb(u_);var h_=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(hb);const f_=wb(h_);var d_=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(hb);const p_=wb(d_);var g_=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(hb);const y_=wb(g_);var m_=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(hb);const v_=wb(m_);var b_=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(hb);const __=wb(b_);var x_=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(hb);const w_=wb(x_);function k_(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"}const T_=zp(qa(300,.5,0),qa(-240,.5,1));var C_=zp(qa(-100,.75,.35),qa(80,1.5,.8)),E_=zp(qa(260,.75,.35),qa(80,1.5,.8)),S_=qa();function A_(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return S_.h=360*t-100,S_.s=1.5-1.5*e,S_.l=.8-.9*e,S_+""}var M_=Qe(),N_=Math.PI/3,D_=2*Math.PI/3;function B_(t){var e;return t=(.5-t)*Math.PI,M_.r=255*(e=Math.sin(t))*e,M_.g=255*(e=Math.sin(t+N_))*e,M_.b=255*(e=Math.sin(t+D_))*e,M_+""}function L_(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"}function O_(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const I_=O_(hb("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var R_=O_(hb("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),F_=O_(hb("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),P_=O_(hb("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function Y_(t){return Te(ie(t).call(document.documentElement))}var j_=0;function U_(){return new z_}function z_(){this._="@"+(++j_).toString(36)}function $_(t){return"string"==typeof t?new xe([document.querySelectorAll(t)],[document.documentElement]):new xe([null==t?[]:t],_e)}function q_(t,e){null==e&&(e=Nn().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=Dn(t,e[n]);return i}function H_(t){return function(){return t}}z_.prototype=U_.prototype={constructor:z_,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var W_=Math.abs,V_=Math.atan2,G_=Math.cos,X_=Math.max,Z_=Math.min,Q_=Math.sin,K_=Math.sqrt,J_=1e-12,tx=Math.PI,ex=tx/2,nx=2*tx;function rx(t){return t>1?0:t<-1?tx:Math.acos(t)}function ix(t){return t>=1?ex:t<=-1?-ex:Math.asin(t)}function ax(t){return t.innerRadius}function ox(t){return t.outerRadius}function sx(t){return t.startAngle}function cx(t){return t.endAngle}function ux(t){return t&&t.padAngle}function lx(t,e,n,r,i,a,o,s){var c=n-t,u=r-e,l=o-i,h=s-a,f=h*c-l*u;if(!(f*f<J_))return[t+(f=(l*(e-a)-h*(t-i))/f)*c,e+f*u]}function hx(t,e,n,r,i,a,o){var s=t-n,c=e-r,u=(o?a:-a)/K_(s*s+c*c),l=u*c,h=-u*s,f=t+l,d=e+h,p=n+l,g=r+h,y=(f+p)/2,m=(d+g)/2,v=p-f,b=g-d,_=v*v+b*b,x=i-a,w=f*g-p*d,k=(b<0?-1:1)*K_(X_(0,x*x*_-w*w)),T=(w*b-v*k)/_,C=(-w*v-b*k)/_,E=(w*b+v*k)/_,S=(-w*v+b*k)/_,A=T-y,M=C-m,N=E-y,D=S-m;return A*A+M*M>N*N+D*D&&(T=E,C=S),{cx:T,cy:C,x01:-l,y01:-h,x11:T*(i/x-1),y11:C*(i/x-1)}}function fx(){var t=ax,e=ox,n=H_(0),r=null,i=sx,a=cx,o=ux,s=null;function c(){var c,u,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-ex,d=a.apply(this,arguments)-ex,p=W_(d-f),g=d>f;if(s||(s=c=Wi()),h<l&&(u=h,h=l,l=u),h>J_)if(p>nx-J_)s.moveTo(h*G_(f),h*Q_(f)),s.arc(0,0,h,f,d,!g),l>J_&&(s.moveTo(l*G_(d),l*Q_(d)),s.arc(0,0,l,d,f,g));else{var y,m,v=f,b=d,_=f,x=d,w=p,k=p,T=o.apply(this,arguments)/2,C=T>J_&&(r?+r.apply(this,arguments):K_(l*l+h*h)),E=Z_(W_(h-l)/2,+n.apply(this,arguments)),S=E,A=E;if(C>J_){var M=ix(C/l*Q_(T)),N=ix(C/h*Q_(T));(w-=2*M)>J_?(_+=M*=g?1:-1,x-=M):(w=0,_=x=(f+d)/2),(k-=2*N)>J_?(v+=N*=g?1:-1,b-=N):(k=0,v=b=(f+d)/2)}var D=h*G_(v),B=h*Q_(v),L=l*G_(x),O=l*Q_(x);if(E>J_){var I,R=h*G_(b),F=h*Q_(b),P=l*G_(_),Y=l*Q_(_);if(p<tx&&(I=lx(D,B,P,Y,R,F,L,O))){var j=D-I[0],U=B-I[1],z=R-I[0],$=F-I[1],q=1/Q_(rx((j*z+U*$)/(K_(j*j+U*U)*K_(z*z+$*$)))/2),H=K_(I[0]*I[0]+I[1]*I[1]);S=Z_(E,(l-H)/(q-1)),A=Z_(E,(h-H)/(q+1))}}k>J_?A>J_?(y=hx(P,Y,D,B,h,A,g),m=hx(R,F,L,O,h,A,g),s.moveTo(y.cx+y.x01,y.cy+y.y01),A<E?s.arc(y.cx,y.cy,A,V_(y.y01,y.x01),V_(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,A,V_(y.y01,y.x01),V_(y.y11,y.x11),!g),s.arc(0,0,h,V_(y.cy+y.y11,y.cx+y.x11),V_(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,V_(m.y11,m.x11),V_(m.y01,m.x01),!g))):(s.moveTo(D,B),s.arc(0,0,h,v,b,!g)):s.moveTo(D,B),l>J_&&w>J_?S>J_?(y=hx(L,O,R,F,l,-S,g),m=hx(D,B,P,Y,l,-S,g),s.lineTo(y.cx+y.x01,y.cy+y.y01),S<E?s.arc(y.cx,y.cy,S,V_(y.y01,y.x01),V_(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,S,V_(y.y01,y.x01),V_(y.y11,y.x11),!g),s.arc(0,0,l,V_(y.cy+y.y11,y.cx+y.x11),V_(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,S,V_(m.y11,m.x11),V_(m.y01,m.x01),!g))):s.arc(0,0,l,x,_,g):s.lineTo(L,O)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-tx/2;return[G_(r)*n,Q_(r)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:H_(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:H_(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:H_(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:H_(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:H_(+t),c):i},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:H_(+t),c):a},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:H_(+t),c):o},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c}function dx(t){this._context=t}function px(t){return new dx(t)}function gx(t){return t[0]}function yx(t){return t[1]}function mx(){var t=gx,e=yx,n=H_(!0),r=null,i=px,a=null;function o(o){var s,c,u,l=o.length,h=!1;for(null==r&&(a=i(u=Wi())),s=0;s<=l;++s)!(s<l&&n(c=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(c,s,o),+e(c,s,o));if(u)return a=null,u+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:H_(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:H_(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:H_(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}function vx(){var t=gx,e=null,n=H_(0),r=yx,i=H_(!0),a=null,o=px,s=null;function c(c){var u,l,h,f,d,p=c.length,g=!1,y=new Array(p),m=new Array(p);for(null==a&&(s=o(d=Wi())),u=0;u<=p;++u){if(!(u<p&&i(f=c[u],u,c))===g)if(g=!g)l=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=u-1;h>=l;--h)s.point(y[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(y[u]=+t(f,u,c),m[u]=+n(f,u,c),s.point(e?+e(f,u,c):y[u],r?+r(f,u,c):m[u]))}if(d)return s=null,d+""||null}function u(){return mx().defined(i).curve(o).context(a)}return c.x=function(n){return arguments.length?(t="function"==typeof n?n:H_(+n),e=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:H_(+e),c):t},c.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:H_(+t),c):e},c.y=function(t){return arguments.length?(n="function"==typeof t?t:H_(+t),r=null,c):n},c.y0=function(t){return arguments.length?(n="function"==typeof t?t:H_(+t),c):n},c.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:H_(+t),c):r},c.lineX0=c.lineY0=function(){return u().x(t).y(n)},c.lineY1=function(){return u().x(t).y(r)},c.lineX1=function(){return u().x(e).y(n)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:H_(!!t),c):i},c.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),c):a},c}function bx(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function _x(t){return t}function xx(){var t=_x,e=bx,n=null,r=H_(0),i=H_(nx),a=H_(0);function o(o){var s,c,u,l,h,f=o.length,d=0,p=new Array(f),g=new Array(f),y=+r.apply(this,arguments),m=Math.min(nx,Math.max(-nx,i.apply(this,arguments)-y)),v=Math.min(Math.abs(m)/f,a.apply(this,arguments)),b=v*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(o[s],s,o))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),s=0,u=d?(m-f*b)/d:0;s<f;++s,y=l)c=p[s],l=y+((h=g[c])>0?h*u:0)+b,g[c]={data:o[c],index:s,value:h,startAngle:y,endAngle:l,padAngle:v};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:H_(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:H_(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:H_(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:H_(+t),o):a},o}dx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var wx=Tx(px);function kx(t){this._curve=t}function Tx(t){function e(e){return new kx(t(e))}return e._curve=t,e}function Cx(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(Tx(t)):e()._curve},t}function Ex(){return Cx(mx().curve(wx))}function Sx(){var t=vx().curve(wx),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Cx(n())},delete t.lineX0,t.lineEndAngle=function(){return Cx(r())},delete t.lineX1,t.lineInnerRadius=function(){return Cx(i())},delete t.lineY0,t.lineOuterRadius=function(){return Cx(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(Tx(t)):e()._curve},t}function Ax(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}kx.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var Mx=Array.prototype.slice;function Nx(t){return t.source}function Dx(t){return t.target}function Bx(t){var e=Nx,n=Dx,r=gx,i=yx,a=null;function o(){var o,s=Mx.call(arguments),c=e.apply(this,s),u=n.apply(this,s);if(a||(a=o=Wi()),t(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=u,s)),+i.apply(this,s)),o)return a=null,o+""||null}return o.source=function(t){return arguments.length?(e=t,o):e},o.target=function(t){return arguments.length?(n=t,o):n},o.x=function(t){return arguments.length?(r="function"==typeof t?t:H_(+t),o):r},o.y=function(t){return arguments.length?(i="function"==typeof t?t:H_(+t),o):i},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}function Lx(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function Ox(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function Ix(t,e,n,r,i){var a=Ax(e,n),o=Ax(e,n=(n+i)/2),s=Ax(r,n),c=Ax(r,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],c[0],c[1])}function Rx(){return Bx(Lx)}function Fx(){return Bx(Ox)}function Px(){var t=Bx(Ix);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const Yx={draw:function(t,e){var n=Math.sqrt(e/tx);t.moveTo(n,0),t.arc(0,0,n,0,nx)}},jx={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}};var Ux=Math.sqrt(1/3),zx=2*Ux;const $x={draw:function(t,e){var n=Math.sqrt(e/zx),r=n*Ux;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}};var qx=Math.sin(tx/10)/Math.sin(7*tx/10),Hx=Math.sin(nx/10)*qx,Wx=-Math.cos(nx/10)*qx;const Vx={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=Hx*n,i=Wx*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=nx*a/5,s=Math.cos(o),c=Math.sin(o);t.lineTo(c*n,-s*n),t.lineTo(s*r-c*i,c*r+s*i)}t.closePath()}},Gx={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}};var Xx=Math.sqrt(3);const Zx={draw:function(t,e){var n=-Math.sqrt(e/(3*Xx));t.moveTo(0,2*n),t.lineTo(-Xx*n,-n),t.lineTo(Xx*n,-n),t.closePath()}};var Qx=-.5,Kx=Math.sqrt(3)/2,Jx=1/Math.sqrt(12),tw=3*(Jx/2+1);const ew={draw:function(t,e){var n=Math.sqrt(e/tw),r=n/2,i=n*Jx,a=r,o=n*Jx+n,s=-a,c=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,c),t.lineTo(Qx*r-Kx*i,Kx*r+Qx*i),t.lineTo(Qx*a-Kx*o,Kx*a+Qx*o),t.lineTo(Qx*s-Kx*c,Kx*s+Qx*c),t.lineTo(Qx*r+Kx*i,Qx*i-Kx*r),t.lineTo(Qx*a+Kx*o,Qx*o-Kx*a),t.lineTo(Qx*s+Kx*c,Qx*c-Kx*s),t.closePath()}};var nw=[Yx,jx,$x,Gx,Vx,Zx,ew];function rw(){var t=H_(Yx),e=H_(64),n=null;function r(){var r;if(n||(n=r=Wi()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:H_(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:H_(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r}function iw(){}function aw(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function ow(t){this._context=t}function sw(t){return new ow(t)}function cw(t){this._context=t}function uw(t){return new cw(t)}function lw(t){this._context=t}function hw(t){return new lw(t)}function fw(t,e){this._basis=new ow(t),this._beta=e}ow.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:aw(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:aw(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},cw.prototype={areaStart:iw,areaEnd:iw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:aw(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},lw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:aw(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},fw.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,s=e[n]-a,c=-1;++c<=n;)r=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*e[c]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const dw=function t(e){function n(t){return 1===e?new ow(t):new fw(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function pw(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function gw(t,e){this._context=t,this._k=(1-e)/6}gw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:pw(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:pw(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const yw=function t(e){function n(t){return new gw(t,e)}return n.tension=function(e){return t(+e)},n}(0);function mw(t,e){this._context=t,this._k=(1-e)/6}mw.prototype={areaStart:iw,areaEnd:iw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:pw(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const vw=function t(e){function n(t){return new mw(t,e)}return n.tension=function(e){return t(+e)},n}(0);function bw(t,e){this._context=t,this._k=(1-e)/6}bw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:pw(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const _w=function t(e){function n(t){return new bw(t,e)}return n.tension=function(e){return t(+e)},n}(0);function xw(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>J_){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>J_){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function ww(t,e){this._context=t,this._alpha=e}ww.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:xw(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const kw=function t(e){function n(t){return e?new ww(t,e):new gw(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Tw(t,e){this._context=t,this._alpha=e}Tw.prototype={areaStart:iw,areaEnd:iw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:xw(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Cw=function t(e){function n(t){return e?new Tw(t,e):new mw(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ew(t,e){this._context=t,this._alpha=e}Ew.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:xw(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Sw=function t(e){function n(t){return e?new Ew(t,e):new bw(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Aw(t){this._context=t}function Mw(t){return new Aw(t)}function Nw(t){return t<0?-1:1}function Dw(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Nw(a)+Nw(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Bw(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Lw(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function Ow(t){this._context=t}function Iw(t){this._context=new Rw(t)}function Rw(t){this._context=t}function Fw(t){return new Ow(t)}function Pw(t){return new Iw(t)}function Yw(t){this._context=t}function jw(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function Uw(t){return new Yw(t)}function zw(t,e){this._context=t,this._t=e}function $w(t){return new zw(t,.5)}function qw(t){return new zw(t,0)}function Hw(t){return new zw(t,1)}function Ww(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a<i;++a)for(r=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Vw(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Gw(t,e){return t[e]}function Xw(){var t=H_([]),e=Vw,n=Ww,r=Gw;function i(i){var a,o,s=t.apply(this,arguments),c=i.length,u=s.length,l=new Array(u);for(a=0;a<u;++a){for(var h,f=s[a],d=l[a]=new Array(c),p=0;p<c;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.key=f}for(a=0,o=e(l);a<u;++a)l[o[a]].index=a;return n(l,o),l}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:H_(Mx.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:H_(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?Vw:"function"==typeof t?t:H_(Mx.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?Ww:t,i):n},i}function Zw(t,e){if((r=t.length)>0){for(var n,r,i,a=0,o=t[0].length;a<o;++a){for(i=n=0;n<r;++n)i+=t[n][a][1]||0;if(i)for(n=0;n<r;++n)t[n][a][1]/=i}Ww(t,e)}}function Qw(t,e){if((s=t.length)>0)for(var n,r,i,a,o,s,c=0,u=t[e[0]].length;c<u;++c)for(a=o=0,n=0;n<s;++n)(i=(r=t[e[n]][c])[1]-r[0])>0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)}function Kw(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],a=i.length;r<a;++r){for(var o=0,s=0;o<n;++o)s+=t[o][r][1]||0;i[r][1]+=i[r][0]=-s/2}Ww(t,e)}}function Jw(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,a=0,o=1;o<r;++o){for(var s=0,c=0,u=0;s<i;++s){for(var l=t[e[s]],h=l[o][1]||0,f=(h-(l[o-1][1]||0))/2,d=0;d<s;++d){var p=t[e[d]];f+=(p[o][1]||0)-(p[o-1][1]||0)}c+=h,u+=f*h}n[o-1][1]+=n[o-1][0]=a,c&&(a-=u/c)}n[o-1][1]+=n[o-1][0]=a,Ww(t,e)}}function tk(t){var e=t.map(ek);return Vw(t).sort((function(t,n){return e[t]-e[n]}))}function ek(t){for(var e,n=-1,r=0,i=t.length,a=-1/0;++n<i;)(e=+t[n][1])>a&&(a=e,r=n);return r}function nk(t){var e=t.map(rk);return Vw(t).sort((function(t,n){return e[t]-e[n]}))}function rk(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}function ik(t){return nk(t).reverse()}function ak(t){var e,n,r=t.length,i=t.map(rk),a=tk(t),o=0,s=0,c=[],u=[];for(e=0;e<r;++e)n=a[e],o<s?(o+=i[n],c.push(n)):(s+=i[n],u.push(n));return u.reverse().concat(c)}function ok(t){return Vw(t).reverse()}Aw.prototype={areaStart:iw,areaEnd:iw,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},Ow.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Lw(this,this._t0,Bw(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Lw(this,Bw(this,n=Dw(this,t,e)),n);break;default:Lw(this,this._t0,n=Dw(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Iw.prototype=Object.create(Ow.prototype)).point=function(t,e){Ow.prototype.point.call(this,e,t)},Rw.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},Yw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=jw(t),i=jw(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},zw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var sk="%Y-%m-%dT%H:%M:%S.%LZ",ck=Date.prototype.toISOString?function(t){return t.toISOString()}:ym(sk);const uk=ck;var lk=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:mm(sk);const hk=lk;function fk(t,e,n){var r=new Wn,i=e;return null==e?(r.restart(t,e,n),r):(e=+e,n=null==n?qn():+n,r.restart((function a(o){o+=i,r.restart(a,i+=e,n),t(o)}),e,n),r)}function dk(t){return function(){return t}}function pk(t){return t[0]}function gk(t){return t[1]}function yk(){this._=null}function mk(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function vk(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function bk(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function _k(t){for(;t.L;)t=t.L;return t}yk.prototype={constructor:yk,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=_k(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(vk(this,n),n=(t=n).U),n.C=!1,r.C=!0,bk(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(bk(this,n),n=(t=n).U),n.C=!1,r.C=!0,vk(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,a=t.L,o=t.R;if(n=a?o?_k(o):a:o,i?i.L===t?i.L=n:i.R=n:this._=n,a&&o?(r=n.C,n.C=t.C,n.L=a,a.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,vk(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,bk(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,vk(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,bk(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,vk(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,bk(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};const xk=yk;function wk(t,e,n,r){var i=[null,null],a=Wk.push(i)-1;return i.left=t,i.right=e,n&&Tk(i,t,e,n),r&&Tk(i,e,t,r),qk[t.index].halfedges.push(a),qk[e.index].halfedges.push(a),i}function kk(t,e,n){var r=[e,n];return r.left=t,r}function Tk(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function Ck(t,e,n,r,i){var a,o=t[0],s=t[1],c=o[0],u=o[1],l=0,h=1,f=s[0]-c,d=s[1]-u;if(a=e-c,f||!(a>0)){if(a/=f,f<0){if(a<l)return;a<h&&(h=a)}else if(f>0){if(a>h)return;a>l&&(l=a)}if(a=r-c,f||!(a<0)){if(a/=f,f<0){if(a>h)return;a>l&&(l=a)}else if(f>0){if(a<l)return;a<h&&(h=a)}if(a=n-u,d||!(a>0)){if(a/=d,d<0){if(a<l)return;a<h&&(h=a)}else if(d>0){if(a>h)return;a>l&&(l=a)}if(a=i-u,d||!(a<0)){if(a/=d,d<0){if(a>h)return;a>l&&(l=a)}else if(d>0){if(a<l)return;a<h&&(h=a)}return!(l>0||h<1)||(l>0&&(t[0]=[c+l*f,u+l*d]),h<1&&(t[1]=[c+h*f,u+h*d]),!0)}}}}}function Ek(t,e,n,r,i){var a=t[1];if(a)return!0;var o,s,c=t[0],u=t.left,l=t.right,h=u[0],f=u[1],d=l[0],p=l[1],g=(h+d)/2,y=(f+p)/2;if(p===f){if(g<e||g>=r)return;if(h>d){if(c){if(c[1]>=i)return}else c=[g,n];a=[g,i]}else{if(c){if(c[1]<n)return}else c=[g,i];a=[g,n]}}else if(s=y-(o=(h-d)/(p-f))*g,o<-1||o>1)if(h>d){if(c){if(c[1]>=i)return}else c=[(n-s)/o,n];a=[(i-s)/o,i]}else{if(c){if(c[1]<n)return}else c=[(i-s)/o,i];a=[(n-s)/o,n]}else if(f<p){if(c){if(c[0]>=r)return}else c=[e,o*e+s];a=[r,o*r+s]}else{if(c){if(c[0]<e)return}else c=[r,o*r+s];a=[e,o*e+s]}return t[0]=c,t[1]=a,!0}function Sk(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function Ak(t,e){return e[+(e.left!==t.site)]}function Mk(t,e){return e[+(e.left===t.site)]}var Nk,Dk=[];function Bk(){mk(this),this.x=this.y=this.arc=this.site=this.cy=null}function Lk(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,a=n.site;if(r!==a){var o=i[0],s=i[1],c=r[0]-o,u=r[1]-s,l=a[0]-o,h=a[1]-s,f=2*(c*h-u*l);if(!(f>=-Gk)){var d=c*c+u*u,p=l*l+h*h,g=(h*d-u*p)/f,y=(c*p-l*d)/f,m=Dk.pop()||new Bk;m.arc=t,m.site=i,m.x=g+o,m.y=(m.cy=y+s)+Math.sqrt(g*g+y*y),t.circle=m;for(var v=null,b=Hk._;b;)if(m.y<b.y||m.y===b.y&&m.x<=b.x){if(!b.L){v=b.P;break}b=b.L}else{if(!b.R){v=b;break}b=b.R}Hk.insert(v,m),v||(Nk=m)}}}}function Ok(t){var e=t.circle;e&&(e.P||(Nk=e.N),Hk.remove(e),Dk.push(e),mk(e),t.circle=null)}var Ik=[];function Rk(){mk(this),this.edge=this.site=this.circle=null}function Fk(t){var e=Ik.pop()||new Rk;return e.site=t,e}function Pk(t){Ok(t),$k.remove(t),Ik.push(t),mk(t)}function Yk(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,s=[t];Pk(t);for(var c=a;c.circle&&Math.abs(n-c.circle.x)<Vk&&Math.abs(r-c.circle.cy)<Vk;)a=c.P,s.unshift(c),Pk(c),c=a;s.unshift(c),Ok(c);for(var u=o;u.circle&&Math.abs(n-u.circle.x)<Vk&&Math.abs(r-u.circle.cy)<Vk;)o=u.N,s.push(u),Pk(u),u=o;s.push(u),Ok(u);var l,h=s.length;for(l=1;l<h;++l)u=s[l],c=s[l-1],Tk(u.edge,c.site,u.site,i);c=s[0],(u=s[h-1]).edge=wk(c.site,u.site,null,i),Lk(c),Lk(u)}function jk(t){for(var e,n,r,i,a=t[0],o=t[1],s=$k._;s;)if((r=Uk(s,o)-a)>Vk)s=s.L;else{if(!((i=a-zk(s,o))>Vk)){r>-Vk?(e=s.P,n=s):i>-Vk?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){qk[t.index]={site:t,halfedges:[]}}(t);var c=Fk(t);if($k.insert(e,c),e||n){if(e===n)return Ok(e),n=Fk(e.site),$k.insert(c,n),c.edge=n.edge=wk(e.site,c.site),Lk(e),void Lk(n);if(n){Ok(e),Ok(n);var u=e.site,l=u[0],h=u[1],f=t[0]-l,d=t[1]-h,p=n.site,g=p[0]-l,y=p[1]-h,m=2*(f*y-d*g),v=f*f+d*d,b=g*g+y*y,_=[(y*v-d*b)/m+l,(f*b-g*v)/m+h];Tk(n.edge,u,p,_),c.edge=wk(u,t,null,_),n.edge=wk(t,p,null,_),Lk(e),Lk(n)}else c.edge=wk(e.site,c.site)}}function Uk(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var s=(n=o.site)[0],c=n[1],u=c-e;if(!u)return s;var l=s-r,h=1/a-1/u,f=l/u;return h?(-f+Math.sqrt(f*f-2*h*(l*l/(-2*u)-c+u/2+i-a/2)))/h+r:(r+s)/2}function zk(t,e){var n=t.N;if(n)return Uk(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var $k,qk,Hk,Wk,Vk=1e-6,Gk=1e-12;function Xk(t,e,n){return(t[0]-n[0])*(e[1]-t[1])-(t[0]-e[0])*(n[1]-t[1])}function Zk(t,e){return e[1]-t[1]||e[0]-t[0]}function Qk(t,e){var n,r,i,a=t.sort(Zk).pop();for(Wk=[],qk=new Array(t.length),$k=new xk,Hk=new xk;;)if(i=Nk,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(jk(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;Yk(i.arc)}if(function(){for(var t,e,n,r,i=0,a=qk.length;i<a;++i)if((t=qk[i])&&(r=(e=t.halfedges).length)){var o=new Array(r),s=new Array(r);for(n=0;n<r;++n)o[n]=n,s[n]=Sk(t,Wk[e[n]]);for(o.sort((function(t,e){return s[e]-s[t]})),n=0;n<r;++n)s[n]=e[o[n]];for(n=0;n<r;++n)e[n]=s[n]}}(),e){var o=+e[0][0],s=+e[0][1],c=+e[1][0],u=+e[1][1];!function(t,e,n,r){for(var i,a=Wk.length;a--;)Ek(i=Wk[a],t,e,n,r)&&Ck(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>Vk||Math.abs(i[0][1]-i[1][1])>Vk)||delete Wk[a]}(o,s,c,u),function(t,e,n,r){var i,a,o,s,c,u,l,h,f,d,p,g,y=qk.length,m=!0;for(i=0;i<y;++i)if(a=qk[i]){for(o=a.site,s=(c=a.halfedges).length;s--;)Wk[c[s]]||c.splice(s,1);for(s=0,u=c.length;s<u;)p=(d=Mk(a,Wk[c[s]]))[0],g=d[1],h=(l=Ak(a,Wk[c[++s%u]]))[0],f=l[1],(Math.abs(p-h)>Vk||Math.abs(g-f)>Vk)&&(c.splice(s,0,Wk.push(kk(o,d,Math.abs(p-t)<Vk&&r-g>Vk?[t,Math.abs(h-t)<Vk?f:r]:Math.abs(g-r)<Vk&&n-p>Vk?[Math.abs(f-r)<Vk?h:n,r]:Math.abs(p-n)<Vk&&g-e>Vk?[n,Math.abs(h-n)<Vk?f:e]:Math.abs(g-e)<Vk&&p-t>Vk?[Math.abs(f-e)<Vk?h:t,e]:null))-1),++u);u&&(m=!1)}if(m){var v,b,_,x=1/0;for(i=0,m=null;i<y;++i)(a=qk[i])&&(_=(v=(o=a.site)[0]-t)*v+(b=o[1]-e)*b)<x&&(x=_,m=a);if(m){var w=[t,e],k=[t,r],T=[n,r],C=[n,e];m.halfedges.push(Wk.push(kk(o=m.site,w,k))-1,Wk.push(kk(o,k,T))-1,Wk.push(kk(o,T,C))-1,Wk.push(kk(o,C,w))-1)}}for(i=0;i<y;++i)(a=qk[i])&&(a.halfedges.length||delete qk[i])}(o,s,c,u)}this.edges=Wk,this.cells=qk,$k=Hk=Wk=qk=null}function Kk(){var t=pk,e=gk,n=null;function r(r){return new Qk(r.map((function(n,i){var a=[Math.round(t(n,i,r)/Vk)*Vk,Math.round(e(n,i,r)/Vk)*Vk];return a.index=i,a.data=n,a})),n)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(e){return arguments.length?(t="function"==typeof e?e:dk(+e),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:dk(+t),r):e},r.extent=function(t){return arguments.length?(n=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(t){return arguments.length?(n=null==t?null:[[0,0],[+t[0],+t[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r}function Jk(t){return function(){return t}}function tT(t,e,n){this.target=t,this.type=e,this.transform=n}function eT(t,e,n){this.k=t,this.x=e,this.y=n}Qk.prototype={constructor:Qk,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return Ak(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(a=(i=n.halfedges).length)for(var i,a,o,s=n.site,c=-1,u=e[i[a-1]],l=u.left===s?u.right:u.left;++c<a;)o=l,l=(u=e[i[c]]).left===s?u.right:u.left,o&&l&&r<o.index&&r<l.index&&Xk(s,o,l)<0&&t.push([s.data,o.data,l.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,a=this,o=a._found||0,s=a.cells.length;!(i=a.cells[o]);)if(++o>=s)return null;var c=t-i.site[0],u=e-i.site[1],l=c*c+u*u;do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var c=t-s[0],u=e-s[1],h=c*c+u*u;h<l&&(l=h,o=s.index)}}))}while(null!==o);return a._found=r,null==n||l<=n*n?i.site:null}},eT.prototype={constructor:eT,scale:function(t){return 1===t?this:new eT(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new eT(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var nT=new eT(1,0,0);function rT(t){for(;!t.__zoom;)if(!(t=t.parentNode))return nT;return t.__zoom}function iT(){le.stopImmediatePropagation()}function aT(){le.preventDefault(),le.stopImmediatePropagation()}function oT(){return!le.ctrlKey&&!le.button}function sT(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function cT(){return this.__zoom||nT}function uT(){return-le.deltaY*(1===le.deltaMode?.05:le.deltaMode?1:.002)}function lT(){return navigator.maxTouchPoints||"ontouchstart"in this}function hT(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function fT(){var t,e,n=oT,r=sT,i=hT,a=uT,o=lT,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,l=Bp,h=ft("start","zoom","end"),f=500,d=0;function p(t){t.property("__zoom",cT).on("wheel.zoom",x).on("mousedown.zoom",w).on("dblclick.zoom",k).filter(o).on("touchstart.zoom",T).on("touchmove.zoom",C).on("touchend.zoom touchcancel.zoom",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new eT(e,t.x,t.y)}function y(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new eT(t.k,r,i)}function m(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function v(t,e,n){t.on("start.zoom",(function(){b(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,a=b(t,i),o=r.apply(t,i),s=null==n?m(o):"function"==typeof n?n.apply(t,i):n,c=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),u=t.__zoom,h="function"==typeof e?e.apply(t,i):e,f=l(u.invert(s).concat(c/u.k),h.invert(s).concat(c/h.k));return function(t){if(1===t)t=h;else{var e=f(t),n=c/e[2];t=new eT(n,s[0]-e[0]*n,s[1]-e[1]*n)}a.zoom(null,t)}}))}function b(t,e,n){return!n&&t.__zooming||new _(t,e)}function _(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function x(){if(n.apply(this,arguments)){var t=b(this,arguments),e=this.__zoom,r=Math.max(s[0],Math.min(s[1],e.k*Math.pow(2,a.apply(this,arguments)))),o=Ln(this);if(t.wheel)t.mouse[0][0]===o[0]&&t.mouse[0][1]===o[1]||(t.mouse[1]=e.invert(t.mouse[0]=o)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[o,e.invert(o)],ar(this),t.start()}aT(),t.wheel=setTimeout(u,150),t.zoom("mouse",i(y(g(e,r),t.mouse[0],t.mouse[1]),t.extent,c))}function u(){t.wheel=null,t.end()}}function w(){if(!e&&n.apply(this,arguments)){var t=b(this,arguments,!0),r=Te(le.view).on("mousemove.zoom",u,!0).on("mouseup.zoom",l,!0),a=Ln(this),o=le.clientX,s=le.clientY;Se(le.view),iT(),t.mouse=[a,this.__zoom.invert(a)],ar(this),t.start()}function u(){if(aT(),!t.moved){var e=le.clientX-o,n=le.clientY-s;t.moved=e*e+n*n>d}t.zoom("mouse",i(y(t.that.__zoom,t.mouse[0]=Ln(t.that),t.mouse[1]),t.extent,c))}function l(){r.on("mousemove.zoom mouseup.zoom",null),Ae(le.view,t.moved),aT(),t.end()}}function k(){if(n.apply(this,arguments)){var t=this.__zoom,e=Ln(this),a=t.invert(e),o=t.k*(le.shiftKey?.5:2),s=i(y(g(t,o),e,a),r.apply(this,arguments),c);aT(),u>0?Te(this).transition().duration(u).call(v,s,e):Te(this).call(p.transform,s)}}function T(){if(n.apply(this,arguments)){var e,r,i,a,o=le.touches,s=o.length,c=b(this,arguments,le.changedTouches.length===s);for(iT(),r=0;r<s;++r)a=[a=Bn(this,o,(i=o[r]).identifier),this.__zoom.invert(a),i.identifier],c.touch0?c.touch1||c.touch0[2]===a[2]||(c.touch1=a,c.taps=0):(c.touch0=a,e=!0,c.taps=1+!!t);t&&(t=clearTimeout(t)),e&&(c.taps<2&&(t=setTimeout((function(){t=null}),f)),ar(this),c.start())}}function C(){if(this.__zooming){var e,n,r,a,o=b(this,arguments),s=le.changedTouches,u=s.length;for(aT(),t&&(t=clearTimeout(t)),o.taps=0,e=0;e<u;++e)r=Bn(this,s,(n=s[e]).identifier),o.touch0&&o.touch0[2]===n.identifier?o.touch0[0]=r:o.touch1&&o.touch1[2]===n.identifier&&(o.touch1[0]=r);if(n=o.that.__zoom,o.touch1){var l=o.touch0[0],h=o.touch0[1],f=o.touch1[0],d=o.touch1[1],p=(p=f[0]-l[0])*p+(p=f[1]-l[1])*p,m=(m=d[0]-h[0])*m+(m=d[1]-h[1])*m;n=g(n,Math.sqrt(p/m)),r=[(l[0]+f[0])/2,(l[1]+f[1])/2],a=[(h[0]+d[0])/2,(h[1]+d[1])/2]}else{if(!o.touch0)return;r=o.touch0[0],a=o.touch0[1]}o.zoom("touch",i(y(n,r,a),o.extent,c))}}function E(){if(this.__zooming){var t,n,r=b(this,arguments),i=le.changedTouches,a=i.length;for(iT(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),f),t=0;t<a;++t)n=i[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),2===r.taps){var o=Te(this).on("dblclick.zoom");o&&o.apply(this,arguments)}}}return p.transform=function(t,e,n){var r=t.selection?t.selection():t;r.property("__zoom",cT),t!==r?v(t,e,n):r.interrupt().each((function(){b(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},p.scaleBy=function(t,e,n){p.scaleTo(t,(function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n}),n)},p.scaleTo=function(t,e,n){p.transform(t,(function(){var t=r.apply(this,arguments),a=this.__zoom,o=null==n?m(t):"function"==typeof n?n.apply(this,arguments):n,s=a.invert(o),u="function"==typeof e?e.apply(this,arguments):e;return i(y(g(a,u),o,s),t,c)}),n)},p.translateBy=function(t,e,n){p.transform(t,(function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),c)}))},p.translateTo=function(t,e,n,a){p.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,s=null==a?m(t):"function"==typeof a?a.apply(this,arguments):a;return i(nT.translate(s[0],s[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)}),a)},_.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){ye(new tT(p,t,this.that.__zoom),h.apply,h,[t,this.that,this.args])}},p.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:Jk(+t),p):a},p.filter=function(t){return arguments.length?(n="function"==typeof t?t:Jk(!!t),p):n},p.touchable=function(t){return arguments.length?(o="function"==typeof t?t:Jk(!!t),p):o},p.extent=function(t){return arguments.length?(r="function"==typeof t?t:Jk([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),p):r},p.scaleExtent=function(t){return arguments.length?(s[0]=+t[0],s[1]=+t[1],p):[s[0],s[1]]},p.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],p):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},p.constrain=function(t){return arguments.length?(i=t,p):i},p.duration=function(t){return arguments.length?(u=+t,p):u},p.interpolate=function(t){return arguments.length?(l=t,p):l},p.on=function(){var t=h.on.apply(h,arguments);return t===h?p:t},p.clickDistance=function(t){return arguments.length?(d=(t=+t)*t,p):Math.sqrt(d)},p}rT.prototype=eT.prototype},681:(t,e,n)=>{t.exports={graphlib:n(574),layout:n(8123),debug:n(7570),util:{time:n(1138).time,notime:n(1138).notime},version:n(8177)}},2188:(t,e,n)=>{"use strict";var r=n(8436),i=n(4079);t.exports={run:function(t){var e="greedy"===t.graph().acyclicer?i(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},i={};return r.forEach(t.nodes(),(function a(o){r.has(i,o)||(i[o]=!0,n[o]=!0,r.forEach(t.outEdges(o),(function(t){r.has(n,t.w)?e.push(t):a(t.w)})),delete n[o])})),e}(t);r.forEach(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.uniqueId("rev"))}))},undo:function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}}},1133:(t,e,n)=>{var r=n(8436),i=n(1138);function a(t,e,n,r,a,o){var s={width:0,height:0,rank:o,borderType:e},c=a[e][o-1],u=i.addDummyNode(t,"border",s,n);a[e][o]=u,t.setParent(u,r),c&&t.setEdge(c,u,{weight:1})}t.exports=function(t){r.forEach(t.children(),(function e(n){var i=t.children(n),o=t.node(n);if(i.length&&r.forEach(i,e),r.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var s=o.minRank,c=o.maxRank+1;s<c;++s)a(t,"borderLeft","_bl",n,o,s),a(t,"borderRight","_br",n,o,s)}}))}},3258:(t,e,n)=>{"use strict";var r=n(8436);function i(t){r.forEach(t.nodes(),(function(e){a(t.node(e))})),r.forEach(t.edges(),(function(e){a(t.edge(e))}))}function a(t){var e=t.width;t.width=t.height,t.height=e}function o(t){t.y=-t.y}function s(t){var e=t.x;t.x=t.y,t.y=e}t.exports={adjust:function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||i(t)},undo:function(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){r.forEach(t.nodes(),(function(e){o(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,o),r.has(n,"y")&&o(n)}))}(t),"lr"!==e&&"rl"!==e||(function(t){r.forEach(t.nodes(),(function(e){s(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,s),r.has(n,"x")&&s(n)}))}(t),i(t))}}},7822:t=>{function e(){var t={};t._next=t._prev=t,this._sentinel=t}function n(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function r(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=e,e.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return n(e),e},e.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&n(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},e.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,r)),n=n._prev;return"["+t.join(", ")+"]"}},7570:(t,e,n)=>{var r=n(8436),i=n(1138),a=n(574).Graph;t.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),(function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),r.forEach(t.edges(),(function(t){n.setEdge(t.v,t.w,{},t.name)})),r.forEach(e,(function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,(function(t,e){return n.setEdge(t,e,{style:"invis"}),e}))})),n}}},574:(t,e,n)=>{var r;try{r=n(8282)}catch(t){}r||(r=window.graphlib),t.exports=r},4079:(t,e,n)=>{var r=n(8436),i=n(574).Graph,a=n(7822);t.exports=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new i,o=0,s=0;r.forEach(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),r.forEach(t.edges(),(function(t){var r=n.edge(t.v,t.w)||0,i=e(t),a=r+i;n.setEdge(t.v,t.w,a),s=Math.max(s,n.node(t.v).out+=i),o=Math.max(o,n.node(t.w).in+=i)}));var u=r.range(s+o+3).map((function(){return new a})),l=o+1;return r.forEach(n.nodes(),(function(t){c(u,l,n.node(t))})),{graph:n,buckets:u,zeroIdx:l}}(t,e||o),u=function(t,e,n){for(var r,i=[],a=e[e.length-1],o=e[0];t.nodeCount();){for(;r=o.dequeue();)s(t,e,n,r);for(;r=a.dequeue();)s(t,e,n,r);if(t.nodeCount())for(var c=e.length-2;c>0;--c)if(r=e[c].dequeue()){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(u,(function(e){return t.outEdges(e.v,e.w)})),!0)};var o=r.constant(1);function s(t,e,n,i,a){var o=a?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),s=t.node(r.v);a&&o.push({v:r.v,w:r.w}),s.out-=i,c(e,n,s)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),a=r.w,o=t.node(a);o.in-=i,c(e,n,o)})),t.removeNode(i.v),o}function c(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},8123:(t,e,n)=>{"use strict";var r=n(8436),i=n(2188),a=n(5995),o=n(8093),s=n(1138).normalizeRanks,c=n(4219),u=n(1138).removeEmptyRanks,l=n(2981),h=n(1133),f=n(3258),d=n(3408),p=n(7873),g=n(1138),y=n(574).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?g.time:g.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new y({multigraph:!0,compound:!0}),n=E(t.graph());return e.setGraph(r.merge({},v,C(n,m),r.pick(n,b))),r.forEach(t.nodes(),(function(n){var i=E(t.node(n));e.setNode(n,r.defaults(C(i,_),x)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=E(t.edge(n));e.setEdge(n,r.merge({},k,C(i,w),r.pick(i,T)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){i.run(t)})),e(" nestingGraph.run",(function(){l.run(t)})),e(" rank",(function(){o(g.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e};g.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){u(t)})),e(" nestingGraph.cleanup",(function(){l.cleanup(t)})),e(" normalizeRanks",(function(){s(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){a.run(t)})),e(" parentDummyChains",(function(){c(t)})),e(" addBorderSegments",(function(){h(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=g.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var a=t.node(e);a.order=i+n,r.forEach(a.selfEdges,(function(e){g.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:a.rank,order:i+ ++n,e:e.e,label:e.label},"_se")})),delete a.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){f.adjust(t)})),e(" position",(function(){p(t)})),e(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),a=t.node(n.borderBottom),o=t.node(r.last(n.borderLeft)),s=t.node(r.last(n.borderRight));n.width=Math.abs(s.x-o.x),n.height=Math.abs(a.y-i.y),n.x=o.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){a.undo(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){f.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),s=o.marginx||0,c=o.marginy||0;function u(t){var r=t.x,o=t.y,s=t.width,c=t.height;e=Math.min(e,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}r.forEach(t.nodes(),(function(e){u(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&u(n)})),e-=s,i-=c,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i})),r.forEach(t.edges(),(function(n){var a=t.edge(n);r.forEach(a.points,(function(t){t.x-=e,t.y-=i})),r.has(a,"x")&&(a.x-=e),r.has(a,"y")&&(a.y-=i)})),o.width=n-e+s,o.height=a-i+c}(t)})),e(" assignNodeIntersects",(function(){!function(t){r.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=a),i.points.unshift(g.intersectRect(a,n)),i.points.push(g.intersectRect(o,r))}))}(t)})),e(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){i.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(t.edges(),(function(n){var i=t.edge(n),a=e.edge(n);i.points=a.points,r.has(a,"x")&&(i.x=a.x,i.y=a.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};var m=["nodesep","edgesep","ranksep","marginx","marginy"],v={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],_=["width","height"],x={width:0,height:0},w=["minlen","weight","width","height","labeloffset"],k={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},T=["labelpos"];function C(t,e){return r.mapValues(r.pick(t,e),Number)}function E(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},8436:(t,e,n)=>{var r;try{r={cloneDeep:n(361),constant:n(5703),defaults:n(1747),each:n(6073),filter:n(3105),find:n(3311),flatten:n(5564),forEach:n(4486),forIn:n(2620),has:n(8721),isUndefined:n(2353),last:n(928),map:n(5161),mapValues:n(6604),max:n(6162),merge:n(3857),min:n(3632),minBy:n(2762),now:n(7771),pick:n(9722),range:n(6026),reduce:n(4061),sortBy:n(9734),uniqueId:n(3955),values:n(2628),zipObject:n(7287)}}catch(t){}r||(r=window._),t.exports=r},2981:(t,e,n)=>{var r=n(8436),i=n(1138);function a(t,e,n,o,s,c,u){var l=t.children(u);if(l.length){var h=i.addBorderNode(t,"_bt"),f=i.addBorderNode(t,"_bb"),d=t.node(u);t.setParent(h,u),d.borderTop=h,t.setParent(f,u),d.borderBottom=f,r.forEach(l,(function(r){a(t,e,n,o,s,c,r);var i=t.node(r),l=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,p=i.borderTop?o:2*o,g=l!==d?1:s-c[u]+1;t.setEdge(h,l,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,f,{weight:p,minlen:g,nestingEdge:!0})})),t.parent(u)||t.setEdge(e,h,{weight:0,minlen:s+c[u]})}else u!==e&&t.setEdge(e,u,{weight:0,minlen:n})}t.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};function n(i,a){var o=t.children(i);o&&o.length&&r.forEach(o,(function(t){n(t,a+1)})),e[i]=a}return r.forEach(t.children(),(function(t){n(t,1)})),e}(t),o=r.max(r.values(n))-1,s=2*o+1;t.graph().nestingRoot=e,r.forEach(t.edges(),(function(e){t.edge(e).minlen*=s}));var c=function(t){return r.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;r.forEach(t.children(),(function(r){a(t,e,s,c,o,n,r)})),t.graph().nodeRankFactor=s},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},5995:(t,e,n)=>{"use strict";var r=n(8436),i=n(1138);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,a,o=e.v,s=t.node(o).rank,c=e.w,u=t.node(c).rank,l=e.name,h=t.edge(e),f=h.labelRank;if(u!==s+1){for(t.removeEdge(e),a=0,++s;s<u;++a,++s)h.points=[],r={width:0,height:0,edgeLabel:h,edgeObj:e,rank:s},n=i.addDummyNode(t,"edge",r,"_d"),s===f&&(r.width=h.width,r.height=h.height,r.dummy="edge-label",r.labelpos=h.labelpos),t.setEdge(o,n,{weight:h.weight},l),0===a&&t.graph().dummyChains.push(n),o=n;t.setEdge(o,c,{weight:h.weight},l)}}(t,e)}))},undo:function(t){r.forEach(t.graph().dummyChains,(function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}}},5093:(t,e,n)=>{var r=n(8436);t.exports=function(t,e,n){var i,a={};r.forEach(n,(function(n){for(var r,o,s=t.parent(n);s;){if((r=t.parent(s))?(o=a[r],a[r]=s):(o=i,i=s),o&&o!==s)return void e.setEdge(o,s);s=r}}))}},5439:(t,e,n)=>{var r=n(8436);t.exports=function(t,e){return r.map(e,(function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,(function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}}))}},3128:(t,e,n)=>{var r=n(8436),i=n(574).Graph;t.exports=function(t,e,n){var a=function(t){for(var e;t.hasNode(e=r.uniqueId("_root")););return e}(t),o=new i({compound:!0}).setGraph({root:a}).setDefaultNodeLabel((function(e){return t.node(e)}));return r.forEach(t.nodes(),(function(i){var s=t.node(i),c=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(o.setNode(i),o.setParent(i,c||a),r.forEach(t[n](i),(function(e){var n=e.v===i?e.w:e.v,a=o.edge(n,i),s=r.isUndefined(a)?0:a.weight;o.setEdge(n,i,{weight:t.edge(e).weight+s})})),r.has(s,"minRank")&&o.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))})),o}},6630:(t,e,n)=>{"use strict";var r=n(8436);function i(t,e,n){for(var i=r.zipObject(n,r.map(n,(function(t,e){return e}))),a=r.flatten(r.map(e,(function(e){return r.sortBy(r.map(t.outEdges(e),(function(e){return{pos:i[e.w],weight:t.edge(e).weight}})),"pos")})),!0),o=1;o<n.length;)o<<=1;var s=2*o-1;o-=1;var c=r.map(new Array(s),(function(){return 0})),u=0;return r.forEach(a.forEach((function(t){var e=t.pos+o;c[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=c[e+1]),c[e=e-1>>1]+=t.weight;u+=t.weight*n}))),u}t.exports=function(t,e){for(var n=0,r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n}},3408:(t,e,n)=>{"use strict";var r=n(8436),i=n(2588),a=n(6630),o=n(1026),s=n(3128),c=n(5093),u=n(574).Graph,l=n(1138);function h(t,e,n){return r.map(e,(function(e){return s(t,e,n)}))}function f(t,e){var n=new u;r.forEach(t,(function(t){var i=t.graph().root,a=o(t,i,n,e);r.forEach(a.vs,(function(e,n){t.node(e).order=n})),c(t,n,a.vs)}))}function d(t,e){r.forEach(e,(function(e){r.forEach(e,(function(e,n){t.node(e).order=n}))}))}t.exports=function(t){var e=l.maxRank(t),n=h(t,r.range(1,e+1),"inEdges"),o=h(t,r.range(e-1,-1,-1),"outEdges"),s=i(t);d(t,s);for(var c,u=Number.POSITIVE_INFINITY,p=0,g=0;g<4;++p,++g){f(p%2?n:o,p%4>=2),s=l.buildLayerMatrix(t);var y=a(t,s);y<u&&(g=0,c=r.cloneDeep(s),u=y)}d(t,c)}},2588:(t,e,n)=>{"use strict";var r=n(8436);t.exports=function(t){var e={},n=r.filter(t.nodes(),(function(e){return!t.children(e).length})),i=r.max(r.map(n,(function(e){return t.node(e).rank}))),a=r.map(r.range(i+1),(function(){return[]})),o=r.sortBy(n,(function(e){return t.node(e).rank}));return r.forEach(o,(function n(i){if(!r.has(e,i)){e[i]=!0;var o=t.node(i);a[o.rank].push(i),r.forEach(t.successors(i),n)}})),a}},9567:(t,e,n)=>{"use strict";var r=n(8436);t.exports=function(t,e){var n={};return r.forEach(t,(function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};r.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)})),r.forEach(e.edges(),(function(t){var e=n[t.v],i=n[t.w];r.isUndefined(e)||r.isUndefined(i)||(i.indegree++,e.out.push(n[t.w]))})),function(t){var e=[];function n(t){return function(e){var n,i,a,o;e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&(i=e,a=0,o=0,(n=t).weight&&(a+=n.barycenter*n.weight,o+=n.weight),i.weight&&(a+=i.barycenter*i.weight,o+=i.weight),n.vs=i.vs.concat(n.vs),n.barycenter=a/o,n.weight=o,n.i=Math.min(i.i,n.i),i.merged=!0)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var a=t.pop();e.push(a),r.forEach(a.in.reverse(),n(a)),r.forEach(a.out,i(a))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(t){return!t.indegree})))}},1026:(t,e,n)=>{var r=n(8436),i=n(5439),a=n(9567),o=n(7304);t.exports=function t(e,n,s,c){var u=e.children(n),l=e.node(n),h=l?l.borderLeft:void 0,f=l?l.borderRight:void 0,d={};h&&(u=r.filter(u,(function(t){return t!==h&&t!==f})));var p=i(e,u);r.forEach(p,(function(n){if(e.children(n.v).length){var i=t(e,n.v,s,c);d[n.v]=i,r.has(i,"barycenter")&&(a=n,o=i,r.isUndefined(a.barycenter)?(a.barycenter=o.barycenter,a.weight=o.weight):(a.barycenter=(a.barycenter*a.weight+o.barycenter*o.weight)/(a.weight+o.weight),a.weight+=o.weight))}var a,o}));var g=a(p,s);!function(t,e){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(g,d);var y=o(g,c);if(h&&(y.vs=r.flatten([h,y.vs,f],!0),e.predecessors(h).length)){var m=e.node(e.predecessors(h)[0]),v=e.node(e.predecessors(f)[0]);r.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+m.order+v.order)/(y.weight+2),y.weight+=2}return y}},7304:(t,e,n)=>{var r=n(8436),i=n(1138);function a(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){var n,o=i.partition(t,(function(t){return r.has(t,"barycenter")})),s=o.lhs,c=r.sortBy(o.rhs,(function(t){return-t.i})),u=[],l=0,h=0,f=0;s.sort((n=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:n?e.i-t.i:t.i-e.i})),f=a(u,c,f),r.forEach(s,(function(t){f+=t.vs.length,u.push(t.vs),l+=t.barycenter*t.weight,h+=t.weight,f=a(u,c,f)}));var d={vs:r.flatten(u,!0)};return h&&(d.barycenter=l/h,d.weight=h),d}},4219:(t,e,n)=>{var r=n(8436);t.exports=function(t){var e=function(t){var e={},n=0;return r.forEach(t.children(),(function i(a){var o=n;r.forEach(t.children(a),i),e[a]={low:o,lim:n++}})),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,a=function(t,e,n,r){var i,a,o=[],s=[],c=Math.min(e[n].low,e[r].low),u=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),o.push(i)}while(i&&(e[i].low>c||u>e[i].lim));for(a=i,i=r;(i=t.parent(i))!==a;)s.push(i);return{path:o.concat(s.reverse()),lca:a}}(t,e,i.v,i.w),o=a.path,s=a.lca,c=0,u=o[c],l=!0;n!==i.w;){if(r=t.node(n),l){for(;(u=o[c])!==s&&t.node(u).maxRank<r.rank;)c++;u===s&&(l=!1)}if(!l){for(;c<o.length-1&&t.node(u=o[c+1]).minRank<=r.rank;)c++;u=o[c]}t.setParent(n,u),n=t.successors(n)[0]}}))}},3573:(t,e,n)=>{"use strict";var r=n(8436),i=n(574).Graph,a=n(1138);function o(t,e){var n={};return r.reduce(e,(function(e,i){var a=0,o=0,s=e.length,u=r.last(i);return r.forEach(i,(function(e,l){var h=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),f=h?t.node(h).order:s;(h||e===u)&&(r.forEach(i.slice(o,l+1),(function(e){r.forEach(t.predecessors(e),(function(r){var i=t.node(r),o=i.order;!(o<a||f<o)||i.dummy&&t.node(e).dummy||c(n,r,e)}))})),o=l+1,a=f)})),i})),n}function s(t,e){var n={};function i(e,i,a,o,s){var u;r.forEach(r.range(i,a),(function(i){u=e[i],t.node(u).dummy&&r.forEach(t.predecessors(u),(function(e){var r=t.node(e);r.dummy&&(r.order<o||r.order>s)&&c(n,e,u)}))}))}return r.reduce(e,(function(e,n){var a,o=-1,s=0;return r.forEach(n,(function(r,c){if("border"===t.node(r).dummy){var u=t.predecessors(r);u.length&&(a=t.node(u[0]).order,i(n,s,c,o,a),s=c,o=a)}i(n,s,n.length,a,e.length)})),n})),n}function c(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function u(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function l(t,e,n,i){var a={},o={},s={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){a[t]=t,o[t]=t,s[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var c=i(t);if(c.length){c=r.sortBy(c,(function(t){return s[t]}));for(var l=(c.length-1)/2,h=Math.floor(l),f=Math.ceil(l);h<=f;++h){var d=c[h];o[t]===t&&e<s[d]&&!u(n,t,d)&&(o[d]=t,o[t]=a[t]=a[d],e=s[d])}}}))})),{root:a,align:o}}function h(t,e,n,a,o){var s={},c=function(t,e,n,a){var o=new i,s=t.graph(),c=function(t,e,n){return function(i,a,o){var s,c=i.node(a),u=i.node(o),l=0;if(l+=c.width/2,r.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=-c.width/2;break;case"r":s=c.width/2}if(s&&(l+=n?s:-s),s=0,l+=(c.dummy?e:t)/2,l+=(u.dummy?e:t)/2,l+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=u.width/2;break;case"r":s=-u.width/2}return s&&(l+=n?s:-s),s=0,l}}(s.nodesep,s.edgesep,a);return r.forEach(e,(function(e){var i;r.forEach(e,(function(e){var r=n[e];if(o.setNode(r),i){var a=n[i],s=o.edge(a,r);o.setEdge(a,r,Math.max(c(t,e,i),s||0))}i=e}))})),o}(t,e,n,o),u=o?"borderLeft":"borderRight";function l(t,e){for(var n=c.nodes(),r=n.pop(),i={};r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return l((function(t){s[t]=c.inEdges(t).reduce((function(t,e){return Math.max(t,s[e.v]+c.edge(e))}),0)}),c.predecessors.bind(c)),l((function(e){var n=c.outEdges(e).reduce((function(t,e){return Math.min(t,s[e.w]-c.edge(e))}),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(s[e]=Math.max(s[e],n))}),c.successors.bind(c)),r.forEach(a,(function(t){s[t]=s[n[t]]})),s}function f(t,e){return r.minBy(r.values(e),(function(e){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return r.forIn(e,(function(e,r){var a=function(t,e){return t.node(e).width}(t,r)/2;n=Math.max(e+a,n),i=Math.min(e-a,i)})),n-i}))}function d(t,e){var n=r.values(e),i=r.min(n),a=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(o){var s,c=n+o,u=t[c];if(u!==e){var l=r.values(u);(s="l"===o?i-r.min(l):a-r.max(l))&&(t[c]=r.mapValues(u,(function(t){return t+s})))}}))}))}function p(t,e){return r.mapValues(t.ul,(function(n,i){if(e)return t[e.toLowerCase()][i];var a=r.sortBy(r.map(t,i));return(a[1]+a[2])/2}))}t.exports={positionX:function(t){var e,n=a.buildLayerMatrix(t),i=r.merge(o(t,n),s(t,n)),c={};r.forEach(["u","d"],(function(a){e="u"===a?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(e=r.map(e,(function(t){return r.values(t).reverse()})));var o=("u"===a?t.predecessors:t.successors).bind(t),s=l(0,e,i,o),u=h(t,e,s.root,s.align,"r"===n);"r"===n&&(u=r.mapValues(u,(function(t){return-t}))),c[a+n]=u}))}));var u=f(t,c);return d(c,u),p(c,t.graph().align)},findType1Conflicts:o,findType2Conflicts:s,addConflict:c,hasConflict:u,verticalAlignment:l,horizontalCompaction:h,alignCoordinates:d,findSmallestWidthAlignment:f,balance:p}},7873:(t,e,n)=>{"use strict";var r=n(8436),i=n(1138),a=n(3573).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,a=0;r.forEach(e,(function(e){var i=r.max(r.map(e,(function(e){return t.node(e).height})));r.forEach(e,(function(e){t.node(e).y=a+i/2})),a+=i+n}))})(t=i.asNonCompoundGraph(t)),r.forEach(a(t),(function(e,n){t.node(n).x=e}))}},300:(t,e,n)=>{"use strict";var r=n(8436),i=n(574).Graph,a=n(6681).slack;function o(t,e){return r.forEach(t.nodes(),(function n(i){r.forEach(e.nodeEdges(i),(function(r){var o=r.v,s=i===o?r.w:o;t.hasNode(s)||a(e,r)||(t.setNode(s,{}),t.setEdge(i,s,{}),n(s))}))})),t.nodeCount()}function s(t,e){return r.minBy(e.edges(),(function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return a(e,n)}))}function c(t,e,n){r.forEach(t.nodes(),(function(t){e.node(t).rank+=n}))}t.exports=function(t){var e,n,r=new i({directed:!1}),u=t.nodes()[0],l=t.nodeCount();for(r.setNode(u,{});o(r,t)<l;)e=s(r,t),n=r.hasNode(e.v)?a(t,e):-a(t,e),c(r,t,n);return r}},8093:(t,e,n)=>{"use strict";var r=n(6681).longestPath,i=n(300),a=n(2472);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":default:!function(t){a(t)}(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":o(t)}};var o=r},2472:(t,e,n)=>{"use strict";var r=n(8436),i=n(300),a=n(6681).slack,o=n(6681).longestPath,s=n(574).alg.preorder,c=n(574).alg.postorder,u=n(1138).simplify;function l(t){t=u(t),o(t);var e,n=i(t);for(d(n),h(n,t);e=g(n);)m(n,t,e,y(n,t,e))}function h(t,e){var n=c(t,t.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=f(t,e,n)}(t,e,n)}))}function f(t,e,n){var i=t.node(n).parent,a=!0,o=e.edge(n,i),s=0;return o||(a=!1,o=e.edge(i,n)),s=o.weight,r.forEach(e.nodeEdges(n),(function(r){var o,c,u=r.v===n,l=u?r.w:r.v;if(l!==i){var h=u===a,f=e.edge(r).weight;if(s+=h?f:-f,o=n,c=l,t.hasEdge(o,c)){var d=t.edge(n,l).cutvalue;s+=h?-d:d}}})),s}function d(t,e){arguments.length<2&&(e=t.nodes()[0]),p(t,{},1,e)}function p(t,e,n,i,a){var o=n,s=t.node(i);return e[i]=!0,r.forEach(t.neighbors(i),(function(a){r.has(e,a)||(n=p(t,e,n,a,i))})),s.low=o,s.lim=n++,a?s.parent=a:delete s.parent,n}function g(t){return r.find(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function y(t,e,n){var i=n.v,o=n.w;e.hasEdge(i,o)||(i=n.w,o=n.v);var s=t.node(i),c=t.node(o),u=s,l=!1;s.lim>c.lim&&(u=c,l=!0);var h=r.filter(e.edges(),(function(e){return l===v(0,t.node(e.v),u)&&l!==v(0,t.node(e.w),u)}));return r.minBy(h,(function(t){return a(e,t)}))}function m(t,e,n,i){var a=n.v,o=n.w;t.removeEdge(a,o),t.setEdge(i.v,i.w,{}),d(t),h(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=s(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)}))}(t,e)}function v(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=l,l.initLowLimValues=d,l.initCutValues=h,l.calcCutValue=f,l.leaveEdge=g,l.enterEdge=y,l.exchangeEdges=m},6681:(t,e,n)=>{"use strict";var r=n(8436);t.exports={longestPath:function(t){var e={};r.forEach(t.sources(),(function n(i){var a=t.node(i);if(r.has(e,i))return a.rank;e[i]=!0;var o=r.min(r.map(t.outEdges(i),(function(e){return n(e.w)-t.edge(e).minlen})));return o!==Number.POSITIVE_INFINITY&&null!=o||(o=0),a.rank=o}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},1138:(t,e,n)=>{"use strict";var r=n(8436),i=n(574).Graph;function a(t,e,n,i){var a;do{a=r.uniqueId(i)}while(t.hasNode(a));return n.dummy=e,t.setNode(a,n),a}function o(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}t.exports={addDummyNode:a,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=u*o/s,r=u):(o<0&&(c=-c),n=c,r=c*s/o),{x:i+n,y:a+r}},buildLayerMatrix:function(t){var e=r.map(r.range(o(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),a=i.rank;r.isUndefined(a)||(e[a][i.order]=n)})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,a=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%a!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),a(t,"border",i,e)},maxRank:o,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},8177:t=>{t.exports="0.8.5"},7856:function(t){t.exports=function(){"use strict";var t=Object.hasOwnProperty,e=Object.setPrototypeOf,n=Object.isFrozen,r=Object.getPrototypeOf,i=Object.getOwnPropertyDescriptor,a=Object.freeze,o=Object.seal,s=Object.create,c="undefined"!=typeof Reflect&&Reflect,u=c.apply,l=c.construct;u||(u=function(t,e,n){return t.apply(e,n)}),a||(a=function(t){return t}),o||(o=function(t){return t}),l||(l=function(t,e){return new(Function.prototype.bind.apply(t,[null].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(e))))});var h,f=w(Array.prototype.forEach),d=w(Array.prototype.pop),p=w(Array.prototype.push),g=w(String.prototype.toLowerCase),y=w(String.prototype.match),m=w(String.prototype.replace),v=w(String.prototype.indexOf),b=w(String.prototype.trim),_=w(RegExp.prototype.test),x=(h=TypeError,function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return l(h,e)});function w(t){return function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return u(t,e,r)}}function k(t,r){e&&e(t,null);for(var i=r.length;i--;){var a=r[i];if("string"==typeof a){var o=g(a);o!==a&&(n(r)||(r[i]=o),a=o)}t[a]=!0}return t}function T(e){var n=s(null),r=void 0;for(r in e)u(t,e,[r])&&(n[r]=e[r]);return n}function C(t,e){for(;null!==t;){var n=i(t,e);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}t=r(t)}return function(t){return console.warn("fallback value for",t),null}}var E=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),S=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),A=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),M=a(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),N=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),D=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),B=a(["#text"]),L=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),O=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),I=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),R=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),F=o(/\{\{[\s\S]*|[\s\S]*\}\}/gm),P=o(/<%[\s\S]*|[\s\S]*%>/gm),Y=o(/^data-[\-\w.\u00B7-\uFFFF]/),j=o(/^aria-[\-\w]+$/),U=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),z=o(/^(?:\w+script|data):/i),$=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=o(/^html$/i),H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function W(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var V=function(){return"undefined"==typeof window?null:window},G=function(t,e){if("object"!==(void 0===t?"undefined":H(t))||"function"!=typeof t.createPolicy)return null;var n=null,r="data-tt-policy-suffix";e.currentScript&&e.currentScript.hasAttribute(r)&&(n=e.currentScript.getAttribute(r));var i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:function(t){return t}})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};return function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V(),n=function(e){return t(e)};if(n.version="2.3.6",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;var r=e.document,i=e.document,o=e.DocumentFragment,s=e.HTMLTemplateElement,c=e.Node,u=e.Element,l=e.NodeFilter,h=e.NamedNodeMap,w=void 0===h?e.NamedNodeMap||e.MozNamedAttrMap:h,X=e.HTMLFormElement,Z=e.DOMParser,Q=e.trustedTypes,K=u.prototype,J=C(K,"cloneNode"),tt=C(K,"nextSibling"),et=C(K,"childNodes"),nt=C(K,"parentNode");if("function"==typeof s){var rt=i.createElement("template");rt.content&&rt.content.ownerDocument&&(i=rt.content.ownerDocument)}var it=G(Q,r),at=it?it.createHTML(""):"",ot=i,st=ot.implementation,ct=ot.createNodeIterator,ut=ot.createDocumentFragment,lt=ot.getElementsByTagName,ht=r.importNode,ft={};try{ft=T(i).documentMode?i.documentMode:{}}catch(t){}var dt={};n.isSupported="function"==typeof nt&&st&&void 0!==st.createHTMLDocument&&9!==ft;var pt=F,gt=P,yt=Y,mt=j,vt=z,bt=$,_t=U,xt=null,wt=k({},[].concat(W(E),W(S),W(A),W(N),W(B))),kt=null,Tt=k({},[].concat(W(L),W(O),W(I),W(R))),Ct=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Et=null,St=null,At=!0,Mt=!0,Nt=!1,Dt=!1,Bt=!1,Lt=!1,Ot=!1,It=!1,Rt=!1,Ft=!1,Pt=!0,Yt=!0,jt=!1,Ut={},zt=null,$t=k({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),qt=null,Ht=k({},["audio","video","img","source","image","track"]),Wt=null,Vt=k({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Gt="http://www.w3.org/1998/Math/MathML",Xt="http://www.w3.org/2000/svg",Zt="http://www.w3.org/1999/xhtml",Qt=Zt,Kt=!1,Jt=void 0,te=["application/xhtml+xml","text/html"],ee="text/html",ne=void 0,re=null,ie=i.createElement("form"),ae=function(t){return t instanceof RegExp||t instanceof Function},oe=function(t){re&&re===t||(t&&"object"===(void 0===t?"undefined":H(t))||(t={}),t=T(t),xt="ALLOWED_TAGS"in t?k({},t.ALLOWED_TAGS):wt,kt="ALLOWED_ATTR"in t?k({},t.ALLOWED_ATTR):Tt,Wt="ADD_URI_SAFE_ATTR"in t?k(T(Vt),t.ADD_URI_SAFE_ATTR):Vt,qt="ADD_DATA_URI_TAGS"in t?k(T(Ht),t.ADD_DATA_URI_TAGS):Ht,zt="FORBID_CONTENTS"in t?k({},t.FORBID_CONTENTS):$t,Et="FORBID_TAGS"in t?k({},t.FORBID_TAGS):{},St="FORBID_ATTR"in t?k({},t.FORBID_ATTR):{},Ut="USE_PROFILES"in t&&t.USE_PROFILES,At=!1!==t.ALLOW_ARIA_ATTR,Mt=!1!==t.ALLOW_DATA_ATTR,Nt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Dt=t.SAFE_FOR_TEMPLATES||!1,Bt=t.WHOLE_DOCUMENT||!1,It=t.RETURN_DOM||!1,Rt=t.RETURN_DOM_FRAGMENT||!1,Ft=t.RETURN_TRUSTED_TYPE||!1,Ot=t.FORCE_BODY||!1,Pt=!1!==t.SANITIZE_DOM,Yt=!1!==t.KEEP_CONTENT,jt=t.IN_PLACE||!1,_t=t.ALLOWED_URI_REGEXP||_t,Qt=t.NAMESPACE||Zt,t.CUSTOM_ELEMENT_HANDLING&&ae(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ct.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ae(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ct.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ct.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Jt=Jt=-1===te.indexOf(t.PARSER_MEDIA_TYPE)?ee:t.PARSER_MEDIA_TYPE,ne="application/xhtml+xml"===Jt?function(t){return t}:g,Dt&&(Mt=!1),Rt&&(It=!0),Ut&&(xt=k({},[].concat(W(B))),kt=[],!0===Ut.html&&(k(xt,E),k(kt,L)),!0===Ut.svg&&(k(xt,S),k(kt,O),k(kt,R)),!0===Ut.svgFilters&&(k(xt,A),k(kt,O),k(kt,R)),!0===Ut.mathMl&&(k(xt,N),k(kt,I),k(kt,R))),t.ADD_TAGS&&(xt===wt&&(xt=T(xt)),k(xt,t.ADD_TAGS)),t.ADD_ATTR&&(kt===Tt&&(kt=T(kt)),k(kt,t.ADD_ATTR)),t.ADD_URI_SAFE_ATTR&&k(Wt,t.ADD_URI_SAFE_ATTR),t.FORBID_CONTENTS&&(zt===$t&&(zt=T(zt)),k(zt,t.FORBID_CONTENTS)),Yt&&(xt["#text"]=!0),Bt&&k(xt,["html","head","body"]),xt.table&&(k(xt,["tbody"]),delete Et.tbody),a&&a(t),re=t)},se=k({},["mi","mo","mn","ms","mtext"]),ce=k({},["foreignobject","desc","title","annotation-xml"]),ue=k({},S);k(ue,A),k(ue,M);var le=k({},N);k(le,D);var he=function(t){var e=nt(t);e&&e.tagName||(e={namespaceURI:Zt,tagName:"template"});var n=g(t.tagName),r=g(e.tagName);if(t.namespaceURI===Xt)return e.namespaceURI===Zt?"svg"===n:e.namespaceURI===Gt?"svg"===n&&("annotation-xml"===r||se[r]):Boolean(ue[n]);if(t.namespaceURI===Gt)return e.namespaceURI===Zt?"math"===n:e.namespaceURI===Xt?"math"===n&&ce[r]:Boolean(le[n]);if(t.namespaceURI===Zt){if(e.namespaceURI===Xt&&!ce[r])return!1;if(e.namespaceURI===Gt&&!se[r])return!1;var i=k({},["title","style","font","a","script"]);return!le[n]&&(i[n]||!ue[n])}return!1},fe=function(t){p(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){try{t.outerHTML=at}catch(e){t.remove()}}},de=function(t,e){try{p(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){p(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!kt[t])if(It||Rt)try{fe(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},pe=function(t){var e=void 0,n=void 0;if(Ot)t="<remove></remove>"+t;else{var r=y(t,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===Jt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");var a=it?it.createHTML(t):t;if(Qt===Zt)try{e=(new Z).parseFromString(a,Jt)}catch(t){}if(!e||!e.documentElement){e=st.createDocument(Qt,"template",null);try{e.documentElement.innerHTML=Kt?"":a}catch(t){}}var o=e.body||e.documentElement;return t&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),Qt===Zt?lt.call(e,Bt?"html":"body")[0]:Bt?e.documentElement:o},ge=function(t){return ct.call(t.ownerDocument||t,t,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},ye=function(t){return t instanceof X&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof w)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore)},me=function(t){return"object"===(void 0===c?"undefined":H(c))?t instanceof c:t&&"object"===(void 0===t?"undefined":H(t))&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},ve=function(t,e,r){dt[t]&&f(dt[t],(function(t){t.call(n,e,r,re)}))},be=function(t){var e=void 0;if(ve("beforeSanitizeElements",t,null),ye(t))return fe(t),!0;if(y(t.nodeName,/[\u0080-\uFFFF]/))return fe(t),!0;var r=ne(t.nodeName);if(ve("uponSanitizeElement",t,{tagName:r,allowedTags:xt}),!me(t.firstElementChild)&&(!me(t.content)||!me(t.content.firstElementChild))&&_(/<[/\w]/g,t.innerHTML)&&_(/<[/\w]/g,t.textContent))return fe(t),!0;if("select"===r&&_(/<template/i,t.innerHTML))return fe(t),!0;if(!xt[r]||Et[r]){if(!Et[r]&&xe(r)){if(Ct.tagNameCheck instanceof RegExp&&_(Ct.tagNameCheck,r))return!1;if(Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(r))return!1}if(Yt&&!zt[r]){var i=nt(t)||t.parentNode,a=et(t)||t.childNodes;if(a&&i)for(var o=a.length-1;o>=0;--o)i.insertBefore(J(a[o],!0),tt(t))}return fe(t),!0}return t instanceof u&&!he(t)?(fe(t),!0):"noscript"!==r&&"noembed"!==r||!_(/<\/no(script|embed)/i,t.innerHTML)?(Dt&&3===t.nodeType&&(e=t.textContent,e=m(e,pt," "),e=m(e,gt," "),t.textContent!==e&&(p(n.removed,{element:t.cloneNode()}),t.textContent=e)),ve("afterSanitizeElements",t,null),!1):(fe(t),!0)},_e=function(t,e,n){if(Pt&&("id"===e||"name"===e)&&(n in i||n in ie))return!1;if(Mt&&!St[e]&&_(yt,e));else if(At&&_(mt,e));else if(!kt[e]||St[e]){if(!(xe(t)&&(Ct.tagNameCheck instanceof RegExp&&_(Ct.tagNameCheck,t)||Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(t))&&(Ct.attributeNameCheck instanceof RegExp&&_(Ct.attributeNameCheck,e)||Ct.attributeNameCheck instanceof Function&&Ct.attributeNameCheck(e))||"is"===e&&Ct.allowCustomizedBuiltInElements&&(Ct.tagNameCheck instanceof RegExp&&_(Ct.tagNameCheck,n)||Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(n))))return!1}else if(Wt[e]);else if(_(_t,m(n,bt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==v(n,"data:")||!qt[t])if(Nt&&!_(vt,m(n,bt,"")));else if(n)return!1;return!0},xe=function(t){return t.indexOf("-")>0},we=function(t){var e=void 0,r=void 0,i=void 0,a=void 0;ve("beforeSanitizeAttributes",t,null);var o=t.attributes;if(o){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:kt};for(a=o.length;a--;){var c=e=o[a],u=c.name,l=c.namespaceURI;if(r=b(e.value),i=ne(u),s.attrName=i,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,ve("uponSanitizeAttribute",t,s),r=s.attrValue,!s.forceKeepAttr&&(de(u,t),s.keepAttr))if(_(/\/>/i,r))de(u,t);else{Dt&&(r=m(r,pt," "),r=m(r,gt," "));var h=ne(t.nodeName);if(_e(h,i,r))try{l?t.setAttributeNS(l,u,r):t.setAttribute(u,r),d(n.removed)}catch(t){}}}ve("afterSanitizeAttributes",t,null)}},ke=function t(e){var n=void 0,r=ge(e);for(ve("beforeSanitizeShadowDOM",e,null);n=r.nextNode();)ve("uponSanitizeShadowNode",n,null),be(n)||(n.content instanceof o&&t(n.content),we(n));ve("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(t,i){var a=void 0,s=void 0,u=void 0,l=void 0,h=void 0;if((Kt=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!me(t)){if("function"!=typeof t.toString)throw x("toString is not a function");if("string"!=typeof(t=t.toString()))throw x("dirty is not a string, aborting")}if(!n.isSupported){if("object"===H(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof t)return e.toStaticHTML(t);if(me(t))return e.toStaticHTML(t.outerHTML)}return t}if(Lt||oe(i),n.removed=[],"string"==typeof t&&(jt=!1),jt){if(t.nodeName){var f=ne(t.nodeName);if(!xt[f]||Et[f])throw x("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof c)1===(s=(a=pe("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?a=s:a.appendChild(s);else{if(!It&&!Dt&&!Bt&&-1===t.indexOf("<"))return it&&Ft?it.createHTML(t):t;if(!(a=pe(t)))return It?null:Ft?at:""}a&&Ot&&fe(a.firstChild);for(var d=ge(jt?t:a);u=d.nextNode();)3===u.nodeType&&u===l||be(u)||(u.content instanceof o&&ke(u.content),we(u),l=u);if(l=null,jt)return t;if(It){if(Rt)for(h=ut.call(a.ownerDocument);a.firstChild;)h.appendChild(a.firstChild);else h=a;return kt.shadowroot&&(h=ht.call(r,h,!0)),h}var p=Bt?a.outerHTML:a.innerHTML;return Bt&&xt["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&_(q,a.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+a.ownerDocument.doctype.name+">\n"+p),Dt&&(p=m(p,pt," "),p=m(p,gt," ")),it&&Ft?it.createHTML(p):p},n.setConfig=function(t){oe(t),Lt=!0},n.clearConfig=function(){re=null,Lt=!1},n.isValidAttribute=function(t,e,n){re||oe({});var r=ne(t),i=ne(e);return _e(r,i,n)},n.addHook=function(t,e){"function"==typeof e&&(dt[t]=dt[t]||[],p(dt[t],e))},n.removeHook=function(t){dt[t]&&d(dt[t])},n.removeHooks=function(t){dt[t]&&(dt[t]=[])},n.removeAllHooks=function(){dt={}},n}()}()},8282:(t,e,n)=>{var r=n(2354);t.exports={Graph:r.Graph,json:n(8974),alg:n(2440),version:r.version}},2842:(t,e,n)=>{var r=n(9126);t.exports=function(t){var e,n={},i=[];function a(i){r.has(n,i)||(n[i]=!0,e.push(i),r.each(t.successors(i),a),r.each(t.predecessors(i),a))}return r.each(t.nodes(),(function(t){e=[],a(t),e.length&&i.push(e)})),i}},3984:(t,e,n)=>{var r=n(9126);function i(t,e,n,a,o,s){r.has(a,e)||(a[e]=!0,n||s.push(e),r.each(o(e),(function(e){i(t,e,n,a,o,s)})),n&&s.push(e))}t.exports=function(t,e,n){r.isArray(e)||(e=[e]);var a=(t.isDirected()?t.successors:t.neighbors).bind(t),o=[],s={};return r.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);i(t,e,"post"===n,s,a,o)})),o}},4847:(t,e,n)=>{var r=n(3763),i=n(9126);t.exports=function(t,e,n){return i.transform(t.nodes(),(function(i,a){i[a]=r(t,a,e,n)}),{})}},3763:(t,e,n)=>{var r=n(9126),i=n(9675);t.exports=function(t,e,n,r){return function(t,e,n,r){var a,o,s={},c=new i,u=function(t){var e=t.v!==a?t.v:t.w,r=s[e],i=n(t),u=o.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);u<r.distance&&(r.distance=u,r.predecessor=a,c.decrease(e,u))};for(t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;s[t]={distance:n},c.add(t,n)}));c.size()>0&&(a=c.removeMin(),(o=s[a]).distance!==Number.POSITIVE_INFINITY);)r(a).forEach(u);return s}(t,String(e),n||a,r||function(e){return t.outEdges(e)})};var a=r.constant(1)},9096:(t,e,n)=>{var r=n(9126),i=n(5023);t.exports=function(t){return r.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},8924:(t,e,n)=>{var r=n(9126);t.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,a=e(n);r[t][i]={distance:a,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var a=r[n];i.forEach((function(n){var r=a[t],i=e[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)}))}))})),r}(t,e||i,n||function(e){return t.outEdges(e)})};var i=r.constant(1)},2440:(t,e,n)=>{t.exports={components:n(2842),dijkstra:n(3763),dijkstraAll:n(4847),findCycles:n(9096),floydWarshall:n(8924),isAcyclic:n(2707),postorder:n(8828),preorder:n(2648),prim:n(514),tarjan:n(5023),topsort:n(2166)}},2707:(t,e,n)=>{var r=n(2166);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},8828:(t,e,n)=>{var r=n(3984);t.exports=function(t,e){return r(t,e,"post")}},2648:(t,e,n)=>{var r=n(3984);t.exports=function(t,e){return r(t,e,"pre")}},514:(t,e,n)=>{var r=n(9126),i=n(771),a=n(9675);t.exports=function(t,e){var n,o=new i,s={},c=new a;function u(t){var r=t.v===n?t.w:t.v,i=c.priority(r);if(void 0!==i){var a=e(t);a<i&&(s[r]=n,c.decrease(r,a))}}if(0===t.nodeCount())return o;r.each(t.nodes(),(function(t){c.add(t,Number.POSITIVE_INFINITY),o.setNode(t)})),c.decrease(t.nodes()[0],0);for(var l=!1;c.size()>0;){if(n=c.removeMin(),r.has(s,n))o.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(n).forEach(u)}return o}},5023:(t,e,n)=>{var r=n(9126);t.exports=function(t){var e=0,n=[],i={},a=[];function o(s){var c=i[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach((function(t){r.has(i,t)?i[t].onStack&&(c.lowlink=Math.min(c.lowlink,i[t].index)):(o(t),c.lowlink=Math.min(c.lowlink,i[t].lowlink))})),c.lowlink===c.index){var u,l=[];do{u=n.pop(),i[u].onStack=!1,l.push(u)}while(s!==u);a.push(l)}}return t.nodes().forEach((function(t){r.has(i,t)||o(t)})),a}},2166:(t,e,n)=>{var r=n(9126);function i(t){var e={},n={},i=[];if(r.each(t.sinks(),(function o(s){if(r.has(n,s))throw new a;r.has(e,s)||(n[s]=!0,e[s]=!0,r.each(t.predecessors(s),o),delete n[s],i.push(s))})),r.size(e)!==t.nodeCount())throw new a;return i}function a(){}t.exports=i,i.CycleException=a,a.prototype=new Error},9675:(t,e,n)=>{var r=n(9126);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,a=i.length;return n[t]=a,i.push({key:t,priority:e}),this._decrease(a),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},i.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e},i.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,i=n[t],a=n[e];n[t]=a,n[e]=i,r[a.key]=t,r[i.key]=e}},771:(t,e,n)=>{"use strict";var r=n(9126);t.exports=a;var i="\0";function a(t){this._isDirected=!r.has(t,"directed")||t.directed,this._isMultigraph=!!r.has(t,"multigraph")&&t.multigraph,this._isCompound=!!r.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function o(t,e){t[e]?t[e]++:t[e]=1}function s(t,e){--t[e]||delete t[e]}function c(t,e,n,i){var a=""+e,o=""+n;if(!t&&a>o){var s=a;a=o,o=s}return a+""+o+""+(r.isUndefined(i)?"\0":i)}function u(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function l(t,e){return c(t,e.v,e.w,e.name)}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(t){return this._label=t,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultNodeLabelFn=t,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return r.keys(this._nodes)},a.prototype.sources=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._in[e])}))},a.prototype.sinks=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._out[e])}))},a.prototype.setNodes=function(t,e){var n=arguments,i=this;return r.each(t,(function(t){n.length>1?i.setNode(t,e):i.setNode(t)})),this},a.prototype.setNode=function(t,e){return r.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=i,this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},a.prototype.node=function(t){return this._nodes[t]},a.prototype.hasNode=function(t){return r.has(this._nodes,t)},a.prototype.removeNode=function(t){var e=this;if(r.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],r.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),r.each(r.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],r.each(r.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},a.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(e))e=i;else{for(var n=e+="";!r.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},a.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},a.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==i)return e}},a.prototype.children=function(t){if(r.isUndefined(t)&&(t=i),this._isCompound){var e=this._children[t];if(e)return r.keys(e)}else{if(t===i)return this.nodes();if(this.hasNode(t))return[]}},a.prototype.predecessors=function(t){var e=this._preds[t];if(e)return r.keys(e)},a.prototype.successors=function(t){var e=this._sucs[t];if(e)return r.keys(e)},a.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return r.union(e,this.successors(t))},a.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},a.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),r.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var i={};function a(t){var r=n.parent(t);return void 0===r||e.hasNode(r)?(i[t]=r,r):r in i?i[r]:a(r)}return this._isCompound&&r.each(e.nodes(),(function(t){e.setParent(t,a(t))})),e},a.prototype.setDefaultEdgeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultEdgeLabelFn=t,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return r.values(this._edgeObjs)},a.prototype.setPath=function(t,e){var n=this,i=arguments;return r.reduce(t,(function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r})),this},a.prototype.setEdge=function(){var t,e,n,i,a=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(t=s.v,e=s.w,n=s.name,2===arguments.length&&(i=arguments[1],a=!0)):(t=s,e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),t=""+t,e=""+e,r.isUndefined(n)||(n=""+n);var l=c(this._isDirected,t,e,n);if(r.has(this._edgeLabels,l))return a&&(this._edgeLabels[l]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[l]=a?i:this._defaultEdgeLabelFn(t,e,n);var h=u(this._isDirected,t,e,n);return t=h.v,e=h.w,Object.freeze(h),this._edgeObjs[l]=h,o(this._preds[e],t),o(this._sucs[t],e),this._in[e][l]=h,this._out[t][l]=h,this._edgeCount++,this},a.prototype.edge=function(t,e,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return this._edgeLabels[r]},a.prototype.hasEdge=function(t,e,n){var i=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return r.has(this._edgeLabels,i)},a.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[e],t),s(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},a.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.v===e})):i}},a.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.w===e})):i}},a.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},2354:(t,e,n)=>{t.exports={Graph:n(771),version:n(9631)}},8974:(t,e,n)=>{var r=n(9126),i=n(771);function a(t){return r.map(t.nodes(),(function(e){var n=t.node(e),i=t.parent(e),a={v:e};return r.isUndefined(n)||(a.value=n),r.isUndefined(i)||(a.parent=i),a}))}function o(t){return r.map(t.edges(),(function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:a(t),edges:o(t)};return r.isUndefined(t.graph())||(e.value=r.clone(t.graph())),e},read:function(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),r.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},9126:(t,e,n)=>{var r;try{r={clone:n(6678),constant:n(5703),each:n(6073),filter:n(3105),has:n(8721),isArray:n(1469),isEmpty:n(1609),isFunction:n(3560),isUndefined:n(2353),keys:n(3674),map:n(5161),reduce:n(4061),size:n(4238),transform:n(8718),union:n(3386),values:n(2628)}}catch(t){}r||(r=window._),t.exports=r},9631:t=>{t.exports="2.1.8"},8552:(t,e,n)=>{var r=n(852)(n(5639),"DataView");t.exports=r},1989:(t,e,n)=>{var r=n(1789),i=n(401),a=n(7667),o=n(1327),s=n(1866);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},8407:(t,e,n)=>{var r=n(7040),i=n(4125),a=n(2117),o=n(7518),s=n(4705);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},7071:(t,e,n)=>{var r=n(852)(n(5639),"Map");t.exports=r},3369:(t,e,n)=>{var r=n(4785),i=n(1285),a=n(6e3),o=n(9916),s=n(5265);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},3818:(t,e,n)=>{var r=n(852)(n(5639),"Promise");t.exports=r},8525:(t,e,n)=>{var r=n(852)(n(5639),"Set");t.exports=r},8668:(t,e,n)=>{var r=n(3369),i=n(619),a=n(2385);function o(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}o.prototype.add=o.prototype.push=i,o.prototype.has=a,t.exports=o},6384:(t,e,n)=>{var r=n(8407),i=n(7465),a=n(3779),o=n(7599),s=n(4758),c=n(4309);function u(t){var e=this.__data__=new r(t);this.size=e.size}u.prototype.clear=i,u.prototype.delete=a,u.prototype.get=o,u.prototype.has=s,u.prototype.set=c,t.exports=u},2705:(t,e,n)=>{var r=n(5639).Symbol;t.exports=r},1149:(t,e,n)=>{var r=n(5639).Uint8Array;t.exports=r},577:(t,e,n)=>{var r=n(852)(n(5639),"WeakMap");t.exports=r},6874:t=>{t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},7412:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},4963:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}},7443:(t,e,n)=>{var r=n(2118);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},1196:t=>{t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},4636:(t,e,n)=>{var r=n(2545),i=n(5694),a=n(1469),o=n(4144),s=n(5776),c=n(6719),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=a(t),l=!n&&i(t),h=!n&&!l&&o(t),f=!n&&!l&&!h&&c(t),d=n||l||h||f,p=d?r(t.length,String):[],g=p.length;for(var y in t)!e&&!u.call(t,y)||d&&("length"==y||h&&("offset"==y||"parent"==y)||f&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,g))||p.push(y);return p}},9932:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},2488:t=>{t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},2663:t=>{t.exports=function(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}},2908:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},8983:(t,e,n)=>{var r=n(371)("length");t.exports=r},6556:(t,e,n)=>{var r=n(9465),i=n(7813);t.exports=function(t,e,n){(void 0!==n&&!i(t[e],n)||void 0===n&&!(e in t))&&r(t,e,n)}},4865:(t,e,n)=>{var r=n(9465),i=n(7813),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var o=t[e];a.call(t,e)&&i(o,n)&&(void 0!==n||e in t)||r(t,e,n)}},8470:(t,e,n)=>{var r=n(7813);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},4037:(t,e,n)=>{var r=n(8363),i=n(3674);t.exports=function(t,e){return t&&r(e,i(e),t)}},3886:(t,e,n)=>{var r=n(8363),i=n(1704);t.exports=function(t,e){return t&&r(e,i(e),t)}},9465:(t,e,n)=>{var r=n(8777);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},5990:(t,e,n)=>{var r=n(6384),i=n(7412),a=n(4865),o=n(4037),s=n(3886),c=n(4626),u=n(278),l=n(8805),h=n(1911),f=n(8234),d=n(6904),p=n(4160),g=n(3824),y=n(9148),m=n(8517),v=n(1469),b=n(4144),_=n(6688),x=n(3218),w=n(2928),k=n(3674),T=n(1704),C="[object Arguments]",E="[object Function]",S="[object Object]",A={};A[C]=A["[object Array]"]=A["[object ArrayBuffer]"]=A["[object DataView]"]=A["[object Boolean]"]=A["[object Date]"]=A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Map]"]=A["[object Number]"]=A[S]=A["[object RegExp]"]=A["[object Set]"]=A["[object String]"]=A["[object Symbol]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A["[object Error]"]=A[E]=A["[object WeakMap]"]=!1,t.exports=function t(e,n,M,N,D,B){var L,O=1&n,I=2&n,R=4&n;if(M&&(L=D?M(e,N,D,B):M(e)),void 0!==L)return L;if(!x(e))return e;var F=v(e);if(F){if(L=g(e),!O)return u(e,L)}else{var P=p(e),Y=P==E||"[object GeneratorFunction]"==P;if(b(e))return c(e,O);if(P==S||P==C||Y&&!D){if(L=I||Y?{}:m(e),!O)return I?h(e,s(L,e)):l(e,o(L,e))}else{if(!A[P])return D?e:{};L=y(e,P,O)}}B||(B=new r);var j=B.get(e);if(j)return j;B.set(e,L),w(e)?e.forEach((function(r){L.add(t(r,n,M,r,e,B))})):_(e)&&e.forEach((function(r,i){L.set(i,t(r,n,M,i,e,B))}));var U=F?void 0:(R?I?d:f:I?T:k)(e);return i(U||e,(function(r,i){U&&(r=e[i=r]),a(L,i,t(r,n,M,i,e,B))})),L}},3118:(t,e,n)=>{var r=n(3218),i=Object.create,a=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=a},9881:(t,e,n)=>{var r=n(7816),i=n(9291)(r);t.exports=i},6029:(t,e,n)=>{var r=n(3448);t.exports=function(t,e,n){for(var i=-1,a=t.length;++i<a;){var o=t[i],s=e(o);if(null!=s&&(void 0===c?s==s&&!r(s):n(s,c)))var c=s,u=o}return u}},760:(t,e,n)=>{var r=n(9881);t.exports=function(t,e){var n=[];return r(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}},1848:t=>{t.exports=function(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}},1078:(t,e,n)=>{var r=n(2488),i=n(7285);t.exports=function t(e,n,a,o,s){var c=-1,u=e.length;for(a||(a=i),s||(s=[]);++c<u;){var l=e[c];n>0&&a(l)?n>1?t(l,n-1,a,o,s):r(s,l):o||(s[s.length]=l)}return s}},8483:(t,e,n)=>{var r=n(5063)();t.exports=r},7816:(t,e,n)=>{var r=n(8483),i=n(3674);t.exports=function(t,e){return t&&r(t,e,i)}},7786:(t,e,n)=>{var r=n(1811),i=n(327);t.exports=function(t,e){for(var n=0,a=(e=r(e,t)).length;null!=t&&n<a;)t=t[i(e[n++])];return n&&n==a?t:void 0}},8866:(t,e,n)=>{var r=n(2488),i=n(1469);t.exports=function(t,e,n){var a=e(t);return i(t)?a:r(a,n(t))}},4239:(t,e,n)=>{var r=n(2705),i=n(9607),a=n(2333),o=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?i(t):a(t)}},3325:t=>{t.exports=function(t,e){return t>e}},8565:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&e.call(t,n)}},13:t=>{t.exports=function(t,e){return null!=t&&e in Object(t)}},2118:(t,e,n)=>{var r=n(1848),i=n(2722),a=n(2351);t.exports=function(t,e,n){return e==e?a(t,e,n):r(t,i,n)}},9454:(t,e,n)=>{var r=n(4239),i=n(7005);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},939:(t,e,n)=>{var r=n(2492),i=n(7005);t.exports=function t(e,n,a,o,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,a,o,t,s))}},2492:(t,e,n)=>{var r=n(6384),i=n(7114),a=n(8351),o=n(6096),s=n(4160),c=n(1469),u=n(4144),l=n(6719),h="[object Arguments]",f="[object Array]",d="[object Object]",p=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,g,y,m){var v=c(t),b=c(e),_=v?f:s(t),x=b?f:s(e),w=(_=_==h?d:_)==d,k=(x=x==h?d:x)==d,T=_==x;if(T&&u(t)){if(!u(e))return!1;v=!0,w=!1}if(T&&!w)return m||(m=new r),v||l(t)?i(t,e,n,g,y,m):a(t,e,_,n,g,y,m);if(!(1&n)){var C=w&&p.call(t,"__wrapped__"),E=k&&p.call(e,"__wrapped__");if(C||E){var S=C?t.value():t,A=E?e.value():e;return m||(m=new r),y(S,A,n,g,m)}}return!!T&&(m||(m=new r),o(t,e,n,g,y,m))}},5588:(t,e,n)=>{var r=n(4160),i=n(7005);t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},2958:(t,e,n)=>{var r=n(6384),i=n(939);t.exports=function(t,e,n,a){var o=n.length,s=o,c=!a;if(null==t)return!s;for(t=Object(t);o--;){var u=n[o];if(c&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<s;){var l=(u=n[o])[0],h=t[l],f=u[1];if(c&&u[2]){if(void 0===h&&!(l in t))return!1}else{var d=new r;if(a)var p=a(h,f,l,t,e,d);if(!(void 0===p?i(f,h,3,a,d):p))return!1}}return!0}},2722:t=>{t.exports=function(t){return t!=t}},8458:(t,e,n)=>{var r=n(3560),i=n(5346),a=n(3218),o=n(346),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,h=u.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||i(t))&&(r(t)?f:s).test(o(t))}},9221:(t,e,n)=>{var r=n(4160),i=n(7005);t.exports=function(t){return i(t)&&"[object Set]"==r(t)}},8749:(t,e,n)=>{var r=n(4239),i=n(1780),a=n(7005),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,t.exports=function(t){return a(t)&&i(t.length)&&!!o[r(t)]}},7206:(t,e,n)=>{var r=n(1573),i=n(6432),a=n(6557),o=n(1469),s=n(9601);t.exports=function(t){return"function"==typeof t?t:null==t?a:"object"==typeof t?o(t)?i(t[0],t[1]):r(t):s(t)}},280:(t,e,n)=>{var r=n(5726),i=n(6916),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}},313:(t,e,n)=>{var r=n(3218),i=n(5726),a=n(3498),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return a(t);var e=i(t),n=[];for(var s in t)("constructor"!=s||!e&&o.call(t,s))&&n.push(s);return n}},433:t=>{t.exports=function(t,e){return t<e}},9199:(t,e,n)=>{var r=n(9881),i=n(8612);t.exports=function(t,e){var n=-1,a=i(t)?Array(t.length):[];return r(t,(function(t,r,i){a[++n]=e(t,r,i)})),a}},1573:(t,e,n)=>{var r=n(2958),i=n(1499),a=n(2634);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?a(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},6432:(t,e,n)=>{var r=n(939),i=n(7361),a=n(9095),o=n(5403),s=n(9162),c=n(2634),u=n(327);t.exports=function(t,e){return o(t)&&s(e)?c(u(t),e):function(n){var o=i(n,t);return void 0===o&&o===e?a(n,t):r(e,o,3)}}},2980:(t,e,n)=>{var r=n(6384),i=n(6556),a=n(8483),o=n(9783),s=n(3218),c=n(1704),u=n(6390);t.exports=function t(e,n,l,h,f){e!==n&&a(n,(function(a,c){if(f||(f=new r),s(a))o(e,n,c,l,t,h,f);else{var d=h?h(u(e,c),a,c+"",e,n,f):void 0;void 0===d&&(d=a),i(e,c,d)}}),c)}},9783:(t,e,n)=>{var r=n(6556),i=n(4626),a=n(7133),o=n(278),s=n(8517),c=n(5694),u=n(1469),l=n(9246),h=n(4144),f=n(3560),d=n(3218),p=n(8630),g=n(6719),y=n(6390),m=n(3678);t.exports=function(t,e,n,v,b,_,x){var w=y(t,n),k=y(e,n),T=x.get(k);if(T)r(t,n,T);else{var C=_?_(w,k,n+"",t,e,x):void 0,E=void 0===C;if(E){var S=u(k),A=!S&&h(k),M=!S&&!A&&g(k);C=k,S||A||M?u(w)?C=w:l(w)?C=o(w):A?(E=!1,C=i(k,!0)):M?(E=!1,C=a(k,!0)):C=[]:p(k)||c(k)?(C=w,c(w)?C=m(w):d(w)&&!f(w)||(C=s(k))):E=!1}E&&(x.set(k,C),b(C,k,v,_,x),x.delete(k)),r(t,n,C)}}},9556:(t,e,n)=>{var r=n(9932),i=n(7786),a=n(7206),o=n(9199),s=n(1131),c=n(1717),u=n(5022),l=n(6557),h=n(1469);t.exports=function(t,e,n){e=e.length?r(e,(function(t){return h(t)?function(e){return i(e,1===t.length?t[0]:t)}:t})):[l];var f=-1;e=r(e,c(a));var d=o(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++f,value:t}}));return s(d,(function(t,e){return u(t,e,n)}))}},5970:(t,e,n)=>{var r=n(3012),i=n(9095);t.exports=function(t,e){return r(t,e,(function(e,n){return i(t,n)}))}},3012:(t,e,n)=>{var r=n(7786),i=n(611),a=n(1811);t.exports=function(t,e,n){for(var o=-1,s=e.length,c={};++o<s;){var u=e[o],l=r(t,u);n(l,u)&&i(c,a(u,t),l)}return c}},371:t=>{t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},9152:(t,e,n)=>{var r=n(7786);t.exports=function(t){return function(e){return r(e,t)}}},98:t=>{var e=Math.ceil,n=Math.max;t.exports=function(t,r,i,a){for(var o=-1,s=n(e((r-t)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=t,t+=i;return c}},107:t=>{t.exports=function(t,e,n,r,i){return i(t,(function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)})),n}},5976:(t,e,n)=>{var r=n(6557),i=n(5357),a=n(61);t.exports=function(t,e){return a(i(t,e,r),t+"")}},611:(t,e,n)=>{var r=n(4865),i=n(1811),a=n(5776),o=n(3218),s=n(327);t.exports=function(t,e,n,c){if(!o(t))return t;for(var u=-1,l=(e=i(e,t)).length,h=l-1,f=t;null!=f&&++u<l;){var d=s(e[u]),p=n;if("__proto__"===d||"constructor"===d||"prototype"===d)return t;if(u!=h){var g=f[d];void 0===(p=c?c(g,d,f):void 0)&&(p=o(g)?g:a(e[u+1])?[]:{})}r(f,d,p),f=f[d]}return t}},6560:(t,e,n)=>{var r=n(5703),i=n(8777),a=n(6557),o=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:a;t.exports=o},1131:t=>{t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},2545:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},531:(t,e,n)=>{var r=n(2705),i=n(9932),a=n(1469),o=n(3448),s=r?r.prototype:void 0,c=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(a(e))return i(e,t)+"";if(o(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},7561:(t,e,n)=>{var r=n(7990),i=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(i,""):t}},1717:t=>{t.exports=function(t){return function(e){return t(e)}}},5652:(t,e,n)=>{var r=n(8668),i=n(7443),a=n(1196),o=n(4757),s=n(3593),c=n(1814);t.exports=function(t,e,n){var u=-1,l=i,h=t.length,f=!0,d=[],p=d;if(n)f=!1,l=a;else if(h>=200){var g=e?null:s(t);if(g)return c(g);f=!1,l=o,p=new r}else p=e?[]:d;t:for(;++u<h;){var y=t[u],m=e?e(y):y;if(y=n||0!==y?y:0,f&&m==m){for(var v=p.length;v--;)if(p[v]===m)continue t;e&&p.push(m),d.push(y)}else l(p,m,n)||(p!==d&&p.push(m),d.push(y))}return d}},7415:(t,e,n)=>{var r=n(9932);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},1757:t=>{t.exports=function(t,e,n){for(var r=-1,i=t.length,a=e.length,o={};++r<i;){var s=r<a?e[r]:void 0;n(o,t[r],s)}return o}},4757:t=>{t.exports=function(t,e){return t.has(e)}},4290:(t,e,n)=>{var r=n(6557);t.exports=function(t){return"function"==typeof t?t:r}},1811:(t,e,n)=>{var r=n(1469),i=n(5403),a=n(5514),o=n(9833);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:a(o(t))}},4318:(t,e,n)=>{var r=n(1149);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},4626:(t,e,n)=>{t=n.nmd(t);var r=n(5639),i=e&&!e.nodeType&&e,a=i&&t&&!t.nodeType&&t,o=a&&a.exports===i?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}},7157:(t,e,n)=>{var r=n(4318);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},3147:t=>{var e=/\w*$/;t.exports=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}},419:(t,e,n)=>{var r=n(2705),i=r?r.prototype:void 0,a=i?i.valueOf:void 0;t.exports=function(t){return a?Object(a.call(t)):{}}},7133:(t,e,n)=>{var r=n(4318);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},6393:(t,e,n)=>{var r=n(3448);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,a=t==t,o=r(t),s=void 0!==e,c=null===e,u=e==e,l=r(e);if(!c&&!l&&!o&&t>e||o&&s&&u&&!c&&!l||i&&s&&u||!n&&u||!a)return 1;if(!i&&!o&&!l&&t<e||l&&n&&a&&!i&&!o||c&&n&&a||!s&&a||!u)return-1}return 0}},5022:(t,e,n)=>{var r=n(6393);t.exports=function(t,e,n){for(var i=-1,a=t.criteria,o=e.criteria,s=a.length,c=n.length;++i<s;){var u=r(a[i],o[i]);if(u)return i>=c?u:u*("desc"==n[i]?-1:1)}return t.index-e.index}},278:t=>{t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},8363:(t,e,n)=>{var r=n(4865),i=n(9465);t.exports=function(t,e,n,a){var o=!n;n||(n={});for(var s=-1,c=e.length;++s<c;){var u=e[s],l=a?a(n[u],t[u],u,n,t):void 0;void 0===l&&(l=t[u]),o?i(n,u,l):r(n,u,l)}return n}},8805:(t,e,n)=>{var r=n(8363),i=n(9551);t.exports=function(t,e){return r(t,i(t),e)}},1911:(t,e,n)=>{var r=n(8363),i=n(1442);t.exports=function(t,e){return r(t,i(t),e)}},4429:(t,e,n)=>{var r=n(5639)["__core-js_shared__"];t.exports=r},1750:(t,e,n)=>{var r=n(5976),i=n(6612);t.exports=function(t){return r((function(e,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&i(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++r<a;){var c=n[r];c&&t(e,c,r,o)}return e}))}},9291:(t,e,n)=>{var r=n(8612);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var a=n.length,o=e?a:-1,s=Object(n);(e?o--:++o<a)&&!1!==i(s[o],o,s););return n}}},5063:t=>{t.exports=function(t){return function(e,n,r){for(var i=-1,a=Object(e),o=r(e),s=o.length;s--;){var c=o[t?s:++i];if(!1===n(a[c],c,a))break}return e}}},7740:(t,e,n)=>{var r=n(7206),i=n(8612),a=n(3674);t.exports=function(t){return function(e,n,o){var s=Object(e);if(!i(e)){var c=r(n,3);e=a(e),n=function(t){return c(s[t],t,s)}}var u=t(e,n,o);return u>-1?s[c?e[u]:u]:void 0}}},7445:(t,e,n)=>{var r=n(98),i=n(6612),a=n(8601);t.exports=function(t){return function(e,n,o){return o&&"number"!=typeof o&&i(e,n,o)&&(n=o=void 0),e=a(e),void 0===n?(n=e,e=0):n=a(n),o=void 0===o?e<n?1:-1:a(o),r(e,n,o,t)}}},3593:(t,e,n)=>{var r=n(8525),i=n(308),a=n(1814),o=r&&1/a(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=o},8777:(t,e,n)=>{var r=n(852),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},7114:(t,e,n)=>{var r=n(8668),i=n(2908),a=n(4757);t.exports=function(t,e,n,o,s,c){var u=1&n,l=t.length,h=e.length;if(l!=h&&!(u&&h>l))return!1;var f=c.get(t),d=c.get(e);if(f&&d)return f==e&&d==t;var p=-1,g=!0,y=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++p<l;){var m=t[p],v=e[p];if(o)var b=u?o(v,m,p,e,t,c):o(m,v,p,t,e,c);if(void 0!==b){if(b)continue;g=!1;break}if(y){if(!i(e,(function(t,e){if(!a(y,e)&&(m===t||s(m,t,n,o,c)))return y.push(e)}))){g=!1;break}}else if(m!==v&&!s(m,v,n,o,c)){g=!1;break}}return c.delete(t),c.delete(e),g}},8351:(t,e,n)=>{var r=n(2705),i=n(1149),a=n(7813),o=n(7114),s=n(8776),c=n(1814),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;t.exports=function(t,e,n,r,u,h,f){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!h(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=s;case"[object Set]":var p=1&r;if(d||(d=c),t.size!=e.size&&!p)return!1;var g=f.get(t);if(g)return g==e;r|=2,f.set(t,e);var y=o(d(t),d(e),r,u,h,f);return f.delete(t),y;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},6096:(t,e,n)=>{var r=n(8234),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,a,o,s){var c=1&n,u=r(t),l=u.length;if(l!=r(e).length&&!c)return!1;for(var h=l;h--;){var f=u[h];if(!(c?f in e:i.call(e,f)))return!1}var d=s.get(t),p=s.get(e);if(d&&p)return d==e&&p==t;var g=!0;s.set(t,e),s.set(e,t);for(var y=c;++h<l;){var m=t[f=u[h]],v=e[f];if(a)var b=c?a(v,m,f,e,t,s):a(m,v,f,t,e,s);if(!(void 0===b?m===v||o(m,v,n,a,s):b)){g=!1;break}y||(y="constructor"==f)}if(g&&!y){var _=t.constructor,x=e.constructor;_==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x||(g=!1)}return s.delete(t),s.delete(e),g}},9021:(t,e,n)=>{var r=n(5564),i=n(5357),a=n(61);t.exports=function(t){return a(i(t,void 0,r),t+"")}},1957:(t,e,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},8234:(t,e,n)=>{var r=n(8866),i=n(9551),a=n(3674);t.exports=function(t){return r(t,a,i)}},6904:(t,e,n)=>{var r=n(8866),i=n(1442),a=n(1704);t.exports=function(t){return r(t,a,i)}},5050:(t,e,n)=>{var r=n(7019);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},1499:(t,e,n)=>{var r=n(9162),i=n(3674);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var a=e[n],o=t[a];e[n]=[a,o,r(o)]}return e}},852:(t,e,n)=>{var r=n(8458),i=n(7801);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},5924:(t,e,n)=>{var r=n(5569)(Object.getPrototypeOf,Object);t.exports=r},9607:(t,e,n)=>{var r=n(2705),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=a.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=o.call(t);return r&&(e?t[s]=n:delete t[s]),i}},9551:(t,e,n)=>{var r=n(4963),i=n(479),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(t){return null==t?[]:(t=Object(t),r(o(t),(function(e){return a.call(t,e)})))}:i;t.exports=s},1442:(t,e,n)=>{var r=n(2488),i=n(5924),a=n(9551),o=n(479),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,a(t)),t=i(t);return e}:o;t.exports=s},4160:(t,e,n)=>{var r=n(8552),i=n(7071),a=n(3818),o=n(8525),s=n(577),c=n(4239),u=n(346),l="[object Map]",h="[object Promise]",f="[object Set]",d="[object WeakMap]",p="[object DataView]",g=u(r),y=u(i),m=u(a),v=u(o),b=u(s),_=c;(r&&_(new r(new ArrayBuffer(1)))!=p||i&&_(new i)!=l||a&&_(a.resolve())!=h||o&&_(new o)!=f||s&&_(new s)!=d)&&(_=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,r=n?u(n):"";if(r)switch(r){case g:return p;case y:return l;case m:return h;case v:return f;case b:return d}return e}),t.exports=_},7801:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},222:(t,e,n)=>{var r=n(1811),i=n(5694),a=n(1469),o=n(5776),s=n(1780),c=n(327);t.exports=function(t,e,n){for(var u=-1,l=(e=r(e,t)).length,h=!1;++u<l;){var f=c(e[u]);if(!(h=null!=t&&n(t,f)))break;t=t[f]}return h||++u!=l?h:!!(l=null==t?0:t.length)&&s(l)&&o(f,l)&&(a(t)||i(t))}},2689:t=>{var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return e.test(t)}},1789:(t,e,n)=>{var r=n(4536);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},7667:(t,e,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},1327:(t,e,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},1866:(t,e,n)=>{var r=n(4536);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},3824:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},9148:(t,e,n)=>{var r=n(4318),i=n(7157),a=n(3147),o=n(419),s=n(7133);t.exports=function(t,e,n){var c=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return i(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(t,n);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return a(t);case"[object Symbol]":return o(t)}}},8517:(t,e,n)=>{var r=n(3118),i=n(5924),a=n(5726);t.exports=function(t){return"function"!=typeof t.constructor||a(t)?{}:r(i(t))}},7285:(t,e,n)=>{var r=n(2705),i=n(5694),a=n(1469),o=r?r.isConcatSpreadable:void 0;t.exports=function(t){return a(t)||i(t)||!!(o&&t&&t[o])}},5776:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}},6612:(t,e,n)=>{var r=n(7813),i=n(8612),a=n(5776),o=n(3218);t.exports=function(t,e,n){if(!o(n))return!1;var s=typeof e;return!!("number"==s?i(n)&&a(e,n.length):"string"==s&&e in n)&&r(n[e],t)}},5403:(t,e,n)=>{var r=n(1469),i=n(3448),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||o.test(t)||!a.test(t)||null!=e&&t in Object(e)}},7019:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},5346:(t,e,n)=>{var r,i=n(4429),a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!a&&a in t}},5726:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},9162:(t,e,n)=>{var r=n(3218);t.exports=function(t){return t==t&&!r(t)}},7040:t=>{t.exports=function(){this.__data__=[],this.size=0}},4125:(t,e,n)=>{var r=n(8470),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))}},2117:(t,e,n)=>{var r=n(8470);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},7518:(t,e,n)=>{var r=n(8470);t.exports=function(t){return r(this.__data__,t)>-1}},4705:(t,e,n)=>{var r=n(8470);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},4785:(t,e,n)=>{var r=n(1989),i=n(8407),a=n(7071);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},1285:(t,e,n)=>{var r=n(5050);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},6e3:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).get(t)}},9916:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).has(t)}},5265:(t,e,n)=>{var r=n(5050);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},8776:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},2634:t=>{t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},4523:(t,e,n)=>{var r=n(8306);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},4536:(t,e,n)=>{var r=n(852)(Object,"create");t.exports=r},6916:(t,e,n)=>{var r=n(5569)(Object.keys,Object);t.exports=r},3498:t=>{t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},1167:(t,e,n)=>{t=n.nmd(t);var r=n(1957),i=e&&!e.nodeType&&e,a=i&&t&&!t.nodeType&&t,o=a&&a.exports===i&&r.process,s=function(){try{return a&&a.require&&a.require("util").types||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=s},2333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5569:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},5357:(t,e,n)=>{var r=n(6874),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var a=arguments,o=-1,s=i(a.length-e,0),c=Array(s);++o<s;)c[o]=a[e+o];o=-1;for(var u=Array(e+1);++o<e;)u[o]=a[o];return u[e]=n(c),r(t,this,u)}}},5639:(t,e,n)=>{var r=n(1957),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();t.exports=a},6390:t=>{t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},619:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},2385:t=>{t.exports=function(t){return this.__data__.has(t)}},1814:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},61:(t,e,n)=>{var r=n(6560),i=n(1275)(r);t.exports=i},1275:t=>{var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var i=e(),a=16-(i-r);if(r=i,a>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},7465:(t,e,n)=>{var r=n(8407);t.exports=function(){this.__data__=new r,this.size=0}},3779:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},7599:t=>{t.exports=function(t){return this.__data__.get(t)}},4758:t=>{t.exports=function(t){return this.__data__.has(t)}},4309:(t,e,n)=>{var r=n(8407),i=n(7071),a=n(3369);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new a(o)}return n.set(t,e),this.size=n.size,this}},2351:t=>{t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}},8016:(t,e,n)=>{var r=n(8983),i=n(2689),a=n(1903);t.exports=function(t){return i(t)?a(t):r(t)}},5514:(t,e,n)=>{var r=n(4523),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(a,"$1"):n||t)})),e}));t.exports=o},327:(t,e,n)=>{var r=n(3448);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},346:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},7990:t=>{var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},1903:t=>{var e="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",r="[^\\ud800-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",o="(?:"+e+"|"+n+")?",s="[\\ufe0e\\ufe0f]?",c=s+o+"(?:\\u200d(?:"+[r,i,a].join("|")+")"+s+o+")*",u="(?:"+[r+e+"?",e,i,a,"[\\ud800-\\udfff]"].join("|")+")",l=RegExp(n+"(?="+n+")|"+u+c,"g");t.exports=function(t){for(var e=l.lastIndex=0;l.test(t);)++e;return e}},6678:(t,e,n)=>{var r=n(5990);t.exports=function(t){return r(t,4)}},361:(t,e,n)=>{var r=n(5990);t.exports=function(t){return r(t,5)}},5703:t=>{t.exports=function(t){return function(){return t}}},1747:(t,e,n)=>{var r=n(5976),i=n(7813),a=n(6612),o=n(1704),s=Object.prototype,c=s.hasOwnProperty,u=r((function(t,e){t=Object(t);var n=-1,r=e.length,u=r>2?e[2]:void 0;for(u&&a(e[0],e[1],u)&&(r=1);++n<r;)for(var l=e[n],h=o(l),f=-1,d=h.length;++f<d;){var p=h[f],g=t[p];(void 0===g||i(g,s[p])&&!c.call(t,p))&&(t[p]=l[p])}return t}));t.exports=u},6073:(t,e,n)=>{t.exports=n(4486)},7813:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},3105:(t,e,n)=>{var r=n(4963),i=n(760),a=n(7206),o=n(1469);t.exports=function(t,e){return(o(t)?r:i)(t,a(e,3))}},3311:(t,e,n)=>{var r=n(7740)(n(998));t.exports=r},998:(t,e,n)=>{var r=n(1848),i=n(7206),a=n(554),o=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var c=null==n?0:a(n);return c<0&&(c=o(s+c,0)),r(t,i(e,3),c)}},5564:(t,e,n)=>{var r=n(1078);t.exports=function(t){return null!=t&&t.length?r(t,1):[]}},4486:(t,e,n)=>{var r=n(7412),i=n(9881),a=n(4290),o=n(1469);t.exports=function(t,e){return(o(t)?r:i)(t,a(e))}},2620:(t,e,n)=>{var r=n(8483),i=n(4290),a=n(1704);t.exports=function(t,e){return null==t?t:r(t,i(e),a)}},7361:(t,e,n)=>{var r=n(7786);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},8721:(t,e,n)=>{var r=n(8565),i=n(222);t.exports=function(t,e){return null!=t&&i(t,e,r)}},9095:(t,e,n)=>{var r=n(13),i=n(222);t.exports=function(t,e){return null!=t&&i(t,e,r)}},6557:t=>{t.exports=function(t){return t}},5694:(t,e,n)=>{var r=n(9454),i=n(7005),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return i(t)&&o.call(t,"callee")&&!s.call(t,"callee")};t.exports=c},1469:t=>{var e=Array.isArray;t.exports=e},8612:(t,e,n)=>{var r=n(3560),i=n(1780);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},9246:(t,e,n)=>{var r=n(8612),i=n(7005);t.exports=function(t){return i(t)&&r(t)}},4144:(t,e,n)=>{t=n.nmd(t);var r=n(5639),i=n(5062),a=e&&!e.nodeType&&e,o=a&&t&&!t.nodeType&&t,s=o&&o.exports===a?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||i;t.exports=c},1609:(t,e,n)=>{var r=n(280),i=n(4160),a=n(5694),o=n(1469),s=n(8612),c=n(4144),u=n(5726),l=n(6719),h=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(o(t)||"string"==typeof t||"function"==typeof t.splice||c(t)||l(t)||a(t)))return!t.length;var e=i(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(u(t))return!r(t).length;for(var n in t)if(h.call(t,n))return!1;return!0}},3560:(t,e,n)=>{var r=n(4239),i=n(3218);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1780:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},6688:(t,e,n)=>{var r=n(5588),i=n(1717),a=n(1167),o=a&&a.isMap,s=o?i(o):r;t.exports=s},3218:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},7005:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},8630:(t,e,n)=>{var r=n(4239),i=n(5924),a=n(7005),o=Function.prototype,s=Object.prototype,c=o.toString,u=s.hasOwnProperty,l=c.call(Object);t.exports=function(t){if(!a(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=u.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},2928:(t,e,n)=>{var r=n(9221),i=n(1717),a=n(1167),o=a&&a.isSet,s=o?i(o):r;t.exports=s},7037:(t,e,n)=>{var r=n(4239),i=n(1469),a=n(7005);t.exports=function(t){return"string"==typeof t||!i(t)&&a(t)&&"[object String]"==r(t)}},3448:(t,e,n)=>{var r=n(4239),i=n(7005);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},6719:(t,e,n)=>{var r=n(8749),i=n(1717),a=n(1167),o=a&&a.isTypedArray,s=o?i(o):r;t.exports=s},2353:t=>{t.exports=function(t){return void 0===t}},3674:(t,e,n)=>{var r=n(4636),i=n(280),a=n(8612);t.exports=function(t){return a(t)?r(t):i(t)}},1704:(t,e,n)=>{var r=n(4636),i=n(313),a=n(8612);t.exports=function(t){return a(t)?r(t,!0):i(t)}},928:t=>{t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},5161:(t,e,n)=>{var r=n(9932),i=n(7206),a=n(9199),o=n(1469);t.exports=function(t,e){return(o(t)?r:a)(t,i(e,3))}},6604:(t,e,n)=>{var r=n(9465),i=n(7816),a=n(7206);t.exports=function(t,e){var n={};return e=a(e,3),i(t,(function(t,i,a){r(n,i,e(t,i,a))})),n}},6162:(t,e,n)=>{var r=n(6029),i=n(3325),a=n(6557);t.exports=function(t){return t&&t.length?r(t,a,i):void 0}},8306:(t,e,n)=>{var r=n(3369);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},3857:(t,e,n)=>{var r=n(2980),i=n(1750)((function(t,e,n){r(t,e,n)}));t.exports=i},3632:(t,e,n)=>{var r=n(6029),i=n(433),a=n(6557);t.exports=function(t){return t&&t.length?r(t,a,i):void 0}},2762:(t,e,n)=>{var r=n(6029),i=n(7206),a=n(433);t.exports=function(t,e){return t&&t.length?r(t,i(e,2),a):void 0}},308:t=>{t.exports=function(){}},7771:(t,e,n)=>{var r=n(5639);t.exports=function(){return r.Date.now()}},9722:(t,e,n)=>{var r=n(5970),i=n(9021)((function(t,e){return null==t?{}:r(t,e)}));t.exports=i},9601:(t,e,n)=>{var r=n(371),i=n(9152),a=n(5403),o=n(327);t.exports=function(t){return a(t)?r(o(t)):i(t)}},6026:(t,e,n)=>{var r=n(7445)();t.exports=r},4061:(t,e,n)=>{var r=n(2663),i=n(9881),a=n(7206),o=n(107),s=n(1469);t.exports=function(t,e,n){var c=s(t)?r:o,u=arguments.length<3;return c(t,a(e,4),n,u,i)}},4238:(t,e,n)=>{var r=n(280),i=n(4160),a=n(8612),o=n(7037),s=n(8016);t.exports=function(t){if(null==t)return 0;if(a(t))return o(t)?s(t):t.length;var e=i(t);return"[object Map]"==e||"[object Set]"==e?t.size:r(t).length}},9734:(t,e,n)=>{var r=n(1078),i=n(9556),a=n(5976),o=n(6612),s=a((function(t,e){if(null==t)return[];var n=e.length;return n>1&&o(t,e[0],e[1])?e=[]:n>2&&o(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=s},479:t=>{t.exports=function(){return[]}},5062:t=>{t.exports=function(){return!1}},8601:(t,e,n)=>{var r=n(4841);t.exports=function(t){return t?Infinity===(t=r(t))||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},554:(t,e,n)=>{var r=n(8601);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},4841:(t,e,n)=>{var r=n(7561),i=n(3218),a=n(3448),o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(a(t))return NaN;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=s.test(t);return n||c.test(t)?u(t.slice(2),n?2:8):o.test(t)?NaN:+t}},3678:(t,e,n)=>{var r=n(8363),i=n(1704);t.exports=function(t){return r(t,i(t))}},9833:(t,e,n)=>{var r=n(531);t.exports=function(t){return null==t?"":r(t)}},8718:(t,e,n)=>{var r=n(7412),i=n(3118),a=n(7816),o=n(7206),s=n(5924),c=n(1469),u=n(4144),l=n(3560),h=n(3218),f=n(6719);t.exports=function(t,e,n){var d=c(t),p=d||u(t)||f(t);if(e=o(e,4),null==n){var g=t&&t.constructor;n=p?d?new g:[]:h(t)&&l(g)?i(s(t)):{}}return(p?r:a)(t,(function(t,r,i){return e(n,t,r,i)})),n}},3386:(t,e,n)=>{var r=n(1078),i=n(5976),a=n(5652),o=n(9246),s=i((function(t){return a(r(t,1,o,!0))}));t.exports=s},3955:(t,e,n)=>{var r=n(9833),i=0;t.exports=function(t){var e=++i;return r(t)+e}},2628:(t,e,n)=>{var r=n(7415),i=n(3674);t.exports=function(t){return null==t?[]:r(t,i(t))}},7287:(t,e,n)=>{var r=n(4865),i=n(1757);t.exports=function(t,e){return i(t||[],e||[],r)}},9234:()=>{},1748:(t,e,n)=>{var r={"./locale":9234,"./locale.js":9234};function i(t){var e=a(t);return n(e)}function a(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=a,t.exports=i,i.id=1748},1941:function(t,e,n){(t=n.nmd(t)).exports=function(){"use strict";var e,r;function i(){return e.apply(null,arguments)}function a(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return void 0===t}function c(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function u(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function l(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function f(t,e){for(var n in e)h(e,n)&&(t[n]=e[n]);return h(e,"toString")&&(t.toString=e.toString),h(e,"valueOf")&&(t.valueOf=e.valueOf),t}function d(t,e,n,r){return be(t,e,n,r,!0).utc()}function p(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function g(t){if(null==t._isValid){var e=p(t),n=r.call(e.parsedDateParts,(function(t){return null!=t})),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i}return t._isValid}function y(t){var e=d(NaN);return null!=t?f(p(e),t):p(e).userInvalidated=!0,e}r=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};var m=i.momentProperties=[];function v(t,e){var n,r,i;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=p(e)),s(e._locale)||(t._locale=e._locale),0<m.length)for(n=0;n<m.length;n++)s(i=e[r=m[n]])||(t[r]=i);return t}var b=!1;function _(t){v(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,i.updateOffset(this),b=!1)}function x(t){return t instanceof _||null!=t&&null!=t._isAMomentObject}function w(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function k(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=w(e)),n}function T(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&&k(t[r])!==k(e[r]))&&o++;return o+a}function C(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function E(t,e){var n=!0;return f((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var r,a=[],o=0;o<arguments.length;o++){if(r="","object"==typeof arguments[o]){for(var s in r+="\n["+o+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[o];a.push(r)}C(t+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var S,A={};function M(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),A[t]||(C(e),A[t]=!0)}function N(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function D(t,e){var n,r=f({},t);for(n in e)h(e,n)&&(o(t[n])&&o(e[n])?(r[n]={},f(r[n],t[n]),f(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)h(t,n)&&!h(e,n)&&o(t[n])&&(r[n]=f({},r[n]));return r}function B(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,S=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)h(t,e)&&n.push(e);return n};var L={};function O(t,e){var n=t.toLowerCase();L[n]=L[n+"s"]=L[e]=t}function I(t){return"string"==typeof t?L[t]||L[t.toLowerCase()]:void 0}function R(t){var e,n,r={};for(n in t)h(t,n)&&(e=I(n))&&(r[e]=t[n]);return r}var F={};function P(t,e){F[t]=e}function Y(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(0<=t?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var j=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,U=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,z={},$={};function q(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&($[t]=i),e&&($[e[0]]=function(){return Y(i.apply(this,arguments),e[1],e[2])}),n&&($[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function H(t,e){return t.isValid()?(e=W(e,t.localeData()),z[e]=z[e]||function(t){var e,n,r,i=t.match(j);for(e=0,n=i.length;e<n;e++)$[i[e]]?i[e]=$[i[e]]:i[e]=(r=i[e]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(e){var r,a="";for(r=0;r<n;r++)a+=N(i[r])?i[r].call(e,t):i[r];return a}}(e),z[e](t)):t.localeData().invalidDate()}function W(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for(U.lastIndex=0;0<=n&&U.test(t);)t=t.replace(U,r),U.lastIndex=0,n-=1;return t}var V=/\d/,G=/\d\d/,X=/\d{3}/,Z=/\d{4}/,Q=/[+-]?\d{6}/,K=/\d\d?/,J=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,et=/\d{1,3}/,nt=/\d{1,4}/,rt=/[+-]?\d{1,6}/,it=/\d+/,at=/[+-]?\d+/,ot=/Z|[+-]\d\d:?\d\d/gi,st=/Z|[+-]\d\d(?::?\d\d)?/gi,ct=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut={};function lt(t,e,n){ut[t]=N(e)?e:function(t,r){return t&&n?n:e}}function ht(t,e){return h(ut,t)?ut[t](e._strict,e._locale):new RegExp(ft(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,r,i){return e||n||r||i}))))}function ft(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var dt={};function pt(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),c(e)&&(r=function(t,n){n[e]=k(t)}),n=0;n<t.length;n++)dt[t[n]]=r}function gt(t,e){pt(t,(function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)}))}function yt(t){return mt(t)?366:365}function mt(t){return t%4==0&&t%100!=0||t%400==0}q("Y",0,0,(function(){var t=this.year();return t<=9999?""+t:"+"+t})),q(0,["YY",2],0,(function(){return this.year()%100})),q(0,["YYYY",4],0,"year"),q(0,["YYYYY",5],0,"year"),q(0,["YYYYYY",6,!0],0,"year"),O("year","y"),P("year",1),lt("Y",at),lt("YY",K,G),lt("YYYY",nt,Z),lt("YYYYY",rt,Q),lt("YYYYYY",rt,Q),pt(["YYYYY","YYYYYY"],0),pt("YYYY",(function(t,e){e[0]=2===t.length?i.parseTwoDigitYear(t):k(t)})),pt("YY",(function(t,e){e[0]=i.parseTwoDigitYear(t)})),pt("Y",(function(t,e){e[0]=parseInt(t,10)})),i.parseTwoDigitYear=function(t){return k(t)+(68<k(t)?1900:2e3)};var vt,bt=_t("FullYear",!0);function _t(t,e){return function(n){return null!=n?(wt(this,t,n),i.updateOffset(this,e),this):xt(this,t)}}function xt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function wt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&mt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),kt(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function kt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=(e%12+12)%12;return t+=(e-n)/12,1===n?mt(t)?29:28:31-n%7%2}vt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},q("M",["MM",2],"Mo",(function(){return this.month()+1})),q("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),q("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),O("month","M"),P("month",8),lt("M",K),lt("MM",K,G),lt("MMM",(function(t,e){return e.monthsShortRegex(t)})),lt("MMMM",(function(t,e){return e.monthsRegex(t)})),pt(["M","MM"],(function(t,e){e[1]=k(t)-1})),pt(["MMM","MMMM"],(function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[1]=i:p(n).invalidMonth=t}));var Tt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ct="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Et="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function St(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=k(e);else if(!c(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),kt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function At(t){return null!=t?(St(this,t),i.updateOffset(this,!0),this):xt(this,"Month")}var Mt=ct,Nt=ct;function Dt(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],a=[];for(e=0;e<12;e++)n=d([2e3,e]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(t),i.sort(t),a.sort(t),e=0;e<12;e++)r[e]=ft(r[e]),i[e]=ft(i[e]);for(e=0;e<24;e++)a[e]=ft(a[e]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Bt(t){var e;if(t<100&&0<=t){var n=Array.prototype.slice.call(arguments);n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function Lt(t,e,n){var r=7+e-n;return-(7+Bt(t,0,r).getUTCDay()-e)%7+r-1}function Ot(t,e,n,r,i){var a,o,s=1+7*(e-1)+(7+n-r)%7+Lt(t,r,i);return o=s<=0?yt(a=t-1)+s:s>yt(t)?(a=t+1,s-yt(t)):(a=t,s),{year:a,dayOfYear:o}}function It(t,e,n){var r,i,a=Lt(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+Rt(i=t.year()-1,e,n):o>Rt(t.year(),e,n)?(r=o-Rt(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function Rt(t,e,n){var r=Lt(t,e,n),i=Lt(t+1,e,n);return(yt(t)-r+i)/7}function Ft(t,e){return t.slice(e,7).concat(t.slice(0,e))}q("w",["ww",2],"wo","week"),q("W",["WW",2],"Wo","isoWeek"),O("week","w"),O("isoWeek","W"),P("week",5),P("isoWeek",5),lt("w",K),lt("ww",K,G),lt("W",K),lt("WW",K,G),gt(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=k(t)})),q("d",0,"do","day"),q("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),q("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),q("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),q("e",0,0,"weekday"),q("E",0,0,"isoWeekday"),O("day","d"),O("weekday","e"),O("isoWeekday","E"),P("day",11),P("weekday",11),P("isoWeekday",11),lt("d",K),lt("e",K),lt("E",K),lt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),lt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),lt("dddd",(function(t,e){return e.weekdaysRegex(t)})),gt(["dd","ddd","dddd"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:p(n).invalidWeekday=t})),gt(["d","e","E"],(function(t,e,n,r){e[r]=k(t)}));var Pt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Yt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),jt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ut=ct,zt=ct,$t=ct;function qt(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],c=[],u=[];for(e=0;e<7;e++)n=d([2e3,1]).day(e),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),a=this.weekdays(n,""),o.push(r),s.push(i),c.push(a),u.push(r),u.push(i),u.push(a);for(o.sort(t),s.sort(t),c.sort(t),u.sort(t),e=0;e<7;e++)s[e]=ft(s[e]),c[e]=ft(c[e]),u[e]=ft(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Ht(){return this.hours()%12||12}function Wt(t,e){q(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Vt(t,e){return e._meridiemParse}q("H",["HH",2],0,"hour"),q("h",["hh",2],0,Ht),q("k",["kk",2],0,(function(){return this.hours()||24})),q("hmm",0,0,(function(){return""+Ht.apply(this)+Y(this.minutes(),2)})),q("hmmss",0,0,(function(){return""+Ht.apply(this)+Y(this.minutes(),2)+Y(this.seconds(),2)})),q("Hmm",0,0,(function(){return""+this.hours()+Y(this.minutes(),2)})),q("Hmmss",0,0,(function(){return""+this.hours()+Y(this.minutes(),2)+Y(this.seconds(),2)})),Wt("a",!0),Wt("A",!1),O("hour","h"),P("hour",13),lt("a",Vt),lt("A",Vt),lt("H",K),lt("h",K),lt("k",K),lt("HH",K,G),lt("hh",K,G),lt("kk",K,G),lt("hmm",J),lt("hmmss",tt),lt("Hmm",J),lt("Hmmss",tt),pt(["H","HH"],3),pt(["k","kk"],(function(t,e,n){var r=k(t);e[3]=24===r?0:r})),pt(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),pt(["h","hh"],(function(t,e,n){e[3]=k(t),p(n).bigHour=!0})),pt("hmm",(function(t,e,n){var r=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r)),p(n).bigHour=!0})),pt("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r,2)),e[5]=k(t.substr(i)),p(n).bigHour=!0})),pt("Hmm",(function(t,e,n){var r=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r))})),pt("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r,2)),e[5]=k(t.substr(i))}));var Gt,Xt=_t("Hours",!0),Zt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ct,monthsShort:Et,week:{dow:0,doy:6},weekdays:Pt,weekdaysMin:jt,weekdaysShort:Yt,meridiemParse:/[ap]\.?m?\.?/i},Qt={},Kt={};function Jt(t){return t?t.toLowerCase().replace("_","-"):t}function te(e){var r=null;if(!Qt[e]&&t&&t.exports)try{r=Gt._abbr,n(1748)("./"+e),ee(r)}catch(e){}return Qt[e]}function ee(t,e){var n;return t&&((n=s(e)?re(t):ne(t,e))?Gt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Gt._abbr}function ne(t,e){if(null===e)return delete Qt[t],null;var n,r=Zt;if(e.abbr=t,null!=Qt[t])M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Qt[t]._config;else if(null!=e.parentLocale)if(null!=Qt[e.parentLocale])r=Qt[e.parentLocale]._config;else{if(null==(n=te(e.parentLocale)))return Kt[e.parentLocale]||(Kt[e.parentLocale]=[]),Kt[e.parentLocale].push({name:t,config:e}),null;r=n._config}return Qt[t]=new B(D(r,e)),Kt[t]&&Kt[t].forEach((function(t){ne(t.name,t.config)})),ee(t),Qt[t]}function re(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Gt;if(!a(t)){if(e=te(t))return e;t=[t]}return function(t){for(var e,n,r,i,a=0;a<t.length;){for(e=(i=Jt(t[a]).split("-")).length,n=(n=Jt(t[a+1]))?n.split("-"):null;0<e;){if(r=te(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&T(i,n,!0)>=e-1)break;e--}a++}return Gt}(t)}function ie(t){var e,n=t._a;return n&&-2===p(t).overflow&&(e=n[1]<0||11<n[1]?1:n[2]<1||n[2]>kt(n[0],n[1])?2:n[3]<0||24<n[3]||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||59<n[4]?4:n[5]<0||59<n[5]?5:n[6]<0||999<n[6]?6:-1,p(t)._overflowDayOfYear&&(e<0||2<e)&&(e=2),p(t)._overflowWeeks&&-1===e&&(e=7),p(t)._overflowWeekday&&-1===e&&(e=8),p(t).overflow=e),t}function ae(t,e,n){return null!=t?t:null!=e?e:n}function oe(t){var e,n,r,a,o,s=[];if(!t._d){var c,u;for(c=t,u=new Date(i.now()),r=c._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,n,r,i,a,o,s,c;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)a=1,o=4,n=ae(e.GG,t._a[0],It(_e(),1,4).year),r=ae(e.W,1),((i=ae(e.E,1))<1||7<i)&&(c=!0);else{a=t._locale._week.dow,o=t._locale._week.doy;var u=It(_e(),a,o);n=ae(e.gg,t._a[0],u.year),r=ae(e.w,u.week),null!=e.d?((i=e.d)<0||6<i)&&(c=!0):null!=e.e?(i=e.e+a,(e.e<0||6<e.e)&&(c=!0)):i=a}r<1||r>Rt(n,a,o)?p(t)._overflowWeeks=!0:null!=c?p(t)._overflowWeekday=!0:(s=Ot(n,r,i,a,o),t._a[0]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=ae(t._a[0],r[0]),(t._dayOfYear>yt(o)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),n=Bt(o,0,t._dayOfYear),t._a[1]=n.getUTCMonth(),t._a[2]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=r[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Bt:function(t,e,n,r,i,a,o){var s;return t<100&&0<=t?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,a,o),s}).apply(null,s),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(p(t).weekdayMismatch=!0)}}var se=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ce=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ue=/Z|[+-]\d\d(?::?\d\d)?/,le=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],he=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],fe=/^\/?Date\((\-?\d+)/i;function de(t){var e,n,r,i,a,o,s=t._i,c=se.exec(s)||ce.exec(s);if(c){for(p(t).iso=!0,e=0,n=le.length;e<n;e++)if(le[e][1].exec(c[1])){i=le[e][0],r=!1!==le[e][2];break}if(null==i)return void(t._isValid=!1);if(c[3]){for(e=0,n=he.length;e<n;e++)if(he[e][1].exec(c[3])){a=(c[2]||" ")+he[e][0];break}if(null==a)return void(t._isValid=!1)}if(!r&&null!=a)return void(t._isValid=!1);if(c[4]){if(!ue.exec(c[4]))return void(t._isValid=!1);o="Z"}t._f=i+(a||"")+(o||""),me(t)}else t._isValid=!1}var pe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;var ge={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ye(t){var e,n,r,i=pe.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(i){var a=function(t,e,n,r,i,a){var o=[function(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}(t),Et.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}(i[4],i[3],i[2],i[5],i[6],i[7]);if(n=a,r=t,(e=i[1])&&Yt.indexOf(e)!==new Date(n[0],n[1],n[2]).getDay()&&(p(r).weekdayMismatch=!0,!(r._isValid=!1)))return;t._a=a,t._tzm=function(t,e,n){if(t)return ge[t];if(e)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(i[8],i[9],i[10]),t._d=Bt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),p(t).rfc2822=!0}else t._isValid=!1}function me(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],p(t).empty=!0;var e,n,r,a,o,s,c,u,l=""+t._i,f=l.length,d=0;for(r=W(t._f,t._locale).match(j)||[],e=0;e<r.length;e++)a=r[e],(n=(l.match(ht(a,t))||[])[0])&&(0<(o=l.substr(0,l.indexOf(n))).length&&p(t).unusedInput.push(o),l=l.slice(l.indexOf(n)+n.length),d+=n.length),$[a]?(n?p(t).empty=!1:p(t).unusedTokens.push(a),s=a,u=t,null!=(c=n)&&h(dt,s)&&dt[s](c,u._a,u,s)):t._strict&&!n&&p(t).unusedTokens.push(a);p(t).charsLeftOver=f-d,0<l.length&&p(t).unusedInput.push(l),t._a[3]<=12&&!0===p(t).bigHour&&0<t._a[3]&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[3]=function(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):(null!=t.isPM&&((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0)),e)}(t._locale,t._a[3],t._meridiem),oe(t),ie(t)}else ye(t);else de(t)}function ve(t){var e,n,r,h,d=t._i,m=t._f;return t._locale=t._locale||re(t._l),null===d||void 0===m&&""===d?y({nullInput:!0}):("string"==typeof d&&(t._i=d=t._locale.preparse(d)),x(d)?new _(ie(d)):(u(d)?t._d=d:a(m)?function(t){var e,n,r,i,a;if(0===t._f.length)return p(t).invalidFormat=!0,t._d=new Date(NaN);for(i=0;i<t._f.length;i++)a=0,e=v({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],me(e),g(e)&&(a+=p(e).charsLeftOver,a+=10*p(e).unusedTokens.length,p(e).score=a,(null==r||a<r)&&(r=a,n=e));f(t,n||e)}(t):m?me(t):s(n=(e=t)._i)?e._d=new Date(i.now()):u(n)?e._d=new Date(n.valueOf()):"string"==typeof n?(r=e,null===(h=fe.exec(r._i))?(de(r),!1===r._isValid&&(delete r._isValid,ye(r),!1===r._isValid&&(delete r._isValid,i.createFromInputFallback(r)))):r._d=new Date(+h[1])):a(n)?(e._a=l(n.slice(0),(function(t){return parseInt(t,10)})),oe(e)):o(n)?function(t){if(!t._d){var e=R(t._i);t._a=l([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),oe(t)}}(e):c(n)?e._d=new Date(n):i.createFromInputFallback(e),g(t)||(t._d=null),t))}function be(t,e,n,r,i){var s,c={};return!0!==n&&!1!==n||(r=n,n=void 0),(o(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||a(t)&&0===t.length)&&(t=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=i,c._l=n,c._i=t,c._f=e,c._strict=r,(s=new _(ie(ve(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function _e(t,e,n,r){return be(t,e,n,r,!1)}i.createFromInputFallback=E("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var xe=E("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=_e.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:y()})),we=E("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=_e.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:y()}));function ke(t,e){var n,r;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return _e();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}var Te=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ce(t){var e=R(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,c=e.minute||0,u=e.second||0,l=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===vt.call(Te,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,r=0;r<Te.length;++r)if(t[Te[r]]){if(n)return!1;parseFloat(t[Te[r]])!==k(t[Te[r]])&&(n=!0)}return!0}(e),this._milliseconds=+l+1e3*u+6e4*c+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=re(),this._bubble()}function Ee(t){return t instanceof Ce}function Se(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Ae(t,e){q(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+Y(~~(t/60),2)+e+Y(~~t%60,2)}))}Ae("Z",":"),Ae("ZZ",""),lt("Z",st),lt("ZZ",st),pt(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=Ne(st,t)}));var Me=/([\+\-]|\d\d)/gi;function Ne(t,e){var n=(e||"").match(t);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Me)||["-",0,0],i=60*r[1]+k(r[2]);return 0===i?0:"+"===r[0]?i:-i}function De(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(x(t)||u(t)?t.valueOf():_e(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):_e(t).local()}function Be(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Le(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Oe=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ie=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Re(t,e){var n,r,i,a=t,o=null;return Ee(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:c(t)?(a={},e?a[e]=t:a.milliseconds=t):(o=Oe.exec(t))?(n="-"===o[1]?-1:1,a={y:0,d:k(o[2])*n,h:k(o[3])*n,m:k(o[4])*n,s:k(o[5])*n,ms:k(Se(1e3*o[6]))*n}):(o=Ie.exec(t))?(n="-"===o[1]?-1:1,a={y:Fe(o[2],n),M:Fe(o[3],n),w:Fe(o[4],n),d:Fe(o[5],n),h:Fe(o[6],n),m:Fe(o[7],n),s:Fe(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=function(t,e){var n;return t.isValid()&&e.isValid()?(e=De(e,t),t.isBefore(e)?n=Pe(t,e):((n=Pe(e,t)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}(_e(a.from),_e(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new Ce(a),Ee(t)&&h(t,"_locale")&&(r._locale=t._locale),r}function Fe(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Pe(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Ye(t,e){return function(n,r){var i;return null===r||isNaN(+r)||(M(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),je(this,Re(n="string"==typeof n?+n:n,r),t),this}}function je(t,e,n,r){var a=e._milliseconds,o=Se(e._days),s=Se(e._months);t.isValid()&&(r=null==r||r,s&&St(t,xt(t,"Month")+s*n),o&&wt(t,"Date",xt(t,"Date")+o*n),a&&t._d.setTime(t._d.valueOf()+a*n),r&&i.updateOffset(t,o||s))}Re.fn=Ce.prototype,Re.invalid=function(){return Re(NaN)};var Ue=Ye(1,"add"),ze=Ye(-1,"subtract");function $e(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,"months");return-(n+(e-r<0?(e-r)/(r-t.clone().add(n-1,"months")):(e-r)/(t.clone().add(n+1,"months")-r)))||0}function qe(t){var e;return void 0===t?this._locale._abbr:(null!=(e=re(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var He=E("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function We(){return this._locale}var Ve=126227808e5;function Ge(t,e){return(t%e+e)%e}function Xe(t,e,n){return t<100&&0<=t?new Date(t+400,e,n)-Ve:new Date(t,e,n).valueOf()}function Ze(t,e,n){return t<100&&0<=t?Date.UTC(t+400,e,n)-Ve:Date.UTC(t,e,n)}function Qe(t,e){q(0,[t,t.length],0,e)}function Ke(t,e,n,r,i){var a;return null==t?It(this,r,i).year:((a=Rt(t,r,i))<e&&(e=a),function(t,e,n,r,i){var a=Ot(t,e,n,r,i),o=Bt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,t,e,n,r,i))}q(0,["gg",2],0,(function(){return this.weekYear()%100})),q(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Qe("gggg","weekYear"),Qe("ggggg","weekYear"),Qe("GGGG","isoWeekYear"),Qe("GGGGG","isoWeekYear"),O("weekYear","gg"),O("isoWeekYear","GG"),P("weekYear",1),P("isoWeekYear",1),lt("G",at),lt("g",at),lt("GG",K,G),lt("gg",K,G),lt("GGGG",nt,Z),lt("gggg",nt,Z),lt("GGGGG",rt,Q),lt("ggggg",rt,Q),gt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,r){e[r.substr(0,2)]=k(t)})),gt(["gg","GG"],(function(t,e,n,r){e[r]=i.parseTwoDigitYear(t)})),q("Q",0,"Qo","quarter"),O("quarter","Q"),P("quarter",7),lt("Q",V),pt("Q",(function(t,e){e[1]=3*(k(t)-1)})),q("D",["DD",2],"Do","date"),O("date","D"),P("date",9),lt("D",K),lt("DD",K,G),lt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),pt(["D","DD"],2),pt("Do",(function(t,e){e[2]=k(t.match(K)[0])}));var Je=_t("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear"),O("dayOfYear","DDD"),P("dayOfYear",4),lt("DDD",et),lt("DDDD",X),pt(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=k(t)})),q("m",["mm",2],0,"minute"),O("minute","m"),P("minute",14),lt("m",K),lt("mm",K,G),pt(["m","mm"],4);var tn=_t("Minutes",!1);q("s",["ss",2],0,"second"),O("second","s"),P("second",15),lt("s",K),lt("ss",K,G),pt(["s","ss"],5);var en,nn=_t("Seconds",!1);for(q("S",0,0,(function(){return~~(this.millisecond()/100)})),q(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),q(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),q(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),q(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),q(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),q(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),O("millisecond","ms"),P("millisecond",16),lt("S",et,V),lt("SS",et,G),lt("SSS",et,X),en="SSSS";en.length<=9;en+="S")lt(en,it);function rn(t,e){e[6]=k(1e3*("0."+t))}for(en="S";en.length<=9;en+="S")pt(en,rn);var an=_t("Milliseconds",!1);q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");var on=_.prototype;function sn(t){return t}on.add=Ue,on.calendar=function(t,e){var n=t||_e(),r=De(n,this).startOf("day"),a=i.calendarFormat(this,r)||"sameElse",o=e&&(N(e[a])?e[a].call(this,n):e[a]);return this.format(o||this.localeData().calendar(a,this,_e(n)))},on.clone=function(){return new _(this)},on.diff=function(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=De(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=I(e)){case"year":a=$e(this,r)/12;break;case"month":a=$e(this,r);break;case"quarter":a=$e(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:w(a)},on.endOf=function(t){var e;if(void 0===(t=I(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-Ge(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-Ge(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-Ge(e,1e3)-1}return this._d.setTime(e),i.updateOffset(this,!0),this},on.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=H(this,t);return this.localeData().postformat(e)},on.from=function(t,e){return this.isValid()&&(x(t)&&t.isValid()||_e(t).isValid())?Re({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.fromNow=function(t){return this.from(_e(),t)},on.to=function(t,e){return this.isValid()&&(x(t)&&t.isValid()||_e(t).isValid())?Re({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.toNow=function(t){return this.to(_e(),t)},on.get=function(t){return N(this[t=I(t)])?this[t]():this},on.invalidAt=function(){return p(this).overflow},on.isAfter=function(t,e){var n=x(t)?t:_e(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},on.isBefore=function(t,e){var n=x(t)?t:_e(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},on.isBetween=function(t,e,n,r){var i=x(t)?t:_e(t),a=x(e)?e:_e(e);return!!(this.isValid()&&i.isValid()&&a.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))},on.isSame=function(t,e){var n,r=x(t)?t:_e(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},on.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},on.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},on.isValid=function(){return g(this)},on.lang=He,on.locale=qe,on.localeData=We,on.max=we,on.min=xe,on.parsingFlags=function(){return f({},p(this))},on.set=function(t,e){if("object"==typeof t)for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:F[n]});return e.sort((function(t,e){return t.priority-e.priority})),e}(t=R(t)),r=0;r<n.length;r++)this[n[r].unit](t[n[r].unit]);else if(N(this[t=I(t)]))return this[t](e);return this},on.startOf=function(t){var e;if(void 0===(t=I(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Ge(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=Ge(e,6e4);break;case"second":e=this._d.valueOf(),e-=Ge(e,1e3)}return this._d.setTime(e),i.updateOffset(this,!0),this},on.subtract=ze,on.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},on.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},on.toDate=function(){return new Date(this.valueOf())},on.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||9999<n.year()?H(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):N(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",H(n,"Z")):H(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},on.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=e+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},on.toJSON=function(){return this.isValid()?this.toISOString():null},on.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},on.unix=function(){return Math.floor(this.valueOf()/1e3)},on.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},on.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},on.year=bt,on.isLeapYear=function(){return mt(this.year())},on.weekYear=function(t){return Ke.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},on.isoWeekYear=function(t){return Ke.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},on.quarter=on.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},on.month=At,on.daysInMonth=function(){return kt(this.year(),this.month())},on.week=on.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},on.isoWeek=on.isoWeeks=function(t){var e=It(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},on.weeksInYear=function(){var t=this.localeData()._week;return Rt(this.year(),t.dow,t.doy)},on.isoWeeksInYear=function(){return Rt(this.year(),1,4)},on.date=Je,on.day=on.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,n,r=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,n=this.localeData(),t="string"!=typeof e?e:isNaN(e)?"number"==typeof(e=n.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-r,"d")):r},on.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},on.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null==t)return this.day()||7;var e,n,r=(e=t,n=this.localeData(),"string"==typeof e?n.weekdaysParse(e)%7||7:isNaN(e)?null:e);return this.day(this.day()%7?r:r-7)},on.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},on.hour=on.hours=Xt,on.minute=on.minutes=tn,on.second=on.seconds=nn,on.millisecond=on.milliseconds=an,on.utcOffset=function(t,e,n){var r,a=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null==t)return this._isUTC?a:Be(this);if("string"==typeof t){if(null===(t=Ne(st,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(r=Be(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==t&&(!e||this._changeInProgress?je(this,Re(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this},on.utc=function(t){return this.utcOffset(0,t)},on.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Be(this),"m")),this},on.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Ne(ot,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},on.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?_e(t).utcOffset():0,(this.utcOffset()-t)%60==0)},on.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},on.isLocal=function(){return!!this.isValid()&&!this._isUTC},on.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},on.isUtc=Le,on.isUTC=Le,on.zoneAbbr=function(){return this._isUTC?"UTC":""},on.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},on.dates=E("dates accessor is deprecated. Use date instead.",Je),on.months=E("months accessor is deprecated. Use month instead",At),on.years=E("years accessor is deprecated. Use year instead",bt),on.zone=E("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),on.isDSTShifted=E("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),(t=ve(t))._a){var e=t._isUTC?d(t._a):_e(t._a);this._isDSTShifted=this.isValid()&&0<T(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted}));var cn=B.prototype;function un(t,e,n,r){var i=re(),a=d().set(r,e);return i[n](a,t)}function ln(t,e,n){if(c(t)&&(e=t,t=void 0),t=t||"",null!=e)return un(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=un(t,r,n,"month");return i}function hn(t,e,n,r){"boolean"==typeof t?c(e)&&(n=e,e=void 0):(e=t,t=!1,c(n=e)&&(n=e,e=void 0)),e=e||"";var i,a=re(),o=t?a._week.dow:0;if(null!=n)return un(e,(n+o)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=un(e,(i+o)%7,r,"day");return s}cn.calendar=function(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return N(r)?r.call(e,n):r},cn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},cn.invalidDate=function(){return this._invalidDate},cn.ordinal=function(t){return this._ordinal.replace("%d",t)},cn.preparse=sn,cn.postformat=sn,cn.relativeTime=function(t,e,n,r){var i=this._relativeTime[n];return N(i)?i(t,e,n,r):i.replace(/%d/i,t)},cn.pastFuture=function(t,e){var n=this._relativeTime[0<t?"future":"past"];return N(n)?n(e):n.replace(/%s/i,e)},cn.set=function(t){var e,n;for(n in t)N(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},cn.months=function(t,e){return t?a(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Tt).test(e)?"format":"standalone"][t.month()]:a(this._months)?this._months:this._months.standalone},cn.monthsShort=function(t,e){return t?a(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Tt.test(e)?"format":"standalone"][t.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},cn.monthsParse=function(t,e,n){var r,i,a;if(this._monthsParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=d([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=vt.call(this._shortMonthsParse,o))?i:null:-1!==(i=vt.call(this._longMonthsParse,o))?i:null:"MMM"===e?-1!==(i=vt.call(this._shortMonthsParse,o))||-1!==(i=vt.call(this._longMonthsParse,o))?i:null:-1!==(i=vt.call(this._longMonthsParse,o))||-1!==(i=vt.call(this._shortMonthsParse,o))?i:null}.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=d([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},cn.monthsRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||Dt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=Nt),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},cn.monthsShortRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||Dt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Mt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},cn.week=function(t){return It(t,this._week.dow,this._week.doy).week},cn.firstDayOfYear=function(){return this._week.doy},cn.firstDayOfWeek=function(){return this._week.dow},cn.weekdays=function(t,e){var n=a(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Ft(n,this._week.dow):t?n[t.day()]:n},cn.weekdaysMin=function(t){return!0===t?Ft(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},cn.weekdaysShort=function(t){return!0===t?Ft(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},cn.weekdaysParse=function(t,e,n){var r,i,a;if(this._weekdaysParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=d([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=vt.call(this._weekdaysParse,o))?i:null:"ddd"===e?-1!==(i=vt.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=vt.call(this._minWeekdaysParse,o))?i:null:"dddd"===e?-1!==(i=vt.call(this._weekdaysParse,o))||-1!==(i=vt.call(this._shortWeekdaysParse,o))||-1!==(i=vt.call(this._minWeekdaysParse,o))?i:null:"ddd"===e?-1!==(i=vt.call(this._shortWeekdaysParse,o))||-1!==(i=vt.call(this._weekdaysParse,o))||-1!==(i=vt.call(this._minWeekdaysParse,o))?i:null:-1!==(i=vt.call(this._minWeekdaysParse,o))||-1!==(i=vt.call(this._weekdaysParse,o))||-1!==(i=vt.call(this._shortWeekdaysParse,o))?i:null}.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=d([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}},cn.weekdaysRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=Ut),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},cn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=zt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},cn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$t),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},cn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},cn.meridiem=function(t,e,n){return 11<t?n?"pm":"PM":n?"am":"AM"},ee("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===k(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=E("moment.lang is deprecated. Use moment.locale instead.",ee),i.langData=E("moment.langData is deprecated. Use moment.localeData instead.",re);var fn=Math.abs;function dn(t,e,n,r){var i=Re(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function pn(t){return t<0?Math.floor(t):Math.ceil(t)}function gn(t){return 4800*t/146097}function yn(t){return 146097*t/4800}function mn(t){return function(){return this.as(t)}}var vn=mn("ms"),bn=mn("s"),_n=mn("m"),xn=mn("h"),wn=mn("d"),kn=mn("w"),Tn=mn("M"),Cn=mn("Q"),En=mn("y");function Sn(t){return function(){return this.isValid()?this._data[t]:NaN}}var An=Sn("milliseconds"),Mn=Sn("seconds"),Nn=Sn("minutes"),Dn=Sn("hours"),Bn=Sn("days"),Ln=Sn("months"),On=Sn("years"),In=Math.round,Rn={ss:44,s:45,m:45,h:22,d:26,M:11},Fn=Math.abs;function Pn(t){return(0<t)-(t<0)||+t}function Yn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=Fn(this._milliseconds)/1e3,r=Fn(this._days),i=Fn(this._months);e=w((t=w(n/60))/60),n%=60,t%=60;var a=w(i/12),o=i%=12,s=r,c=e,u=t,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var f=h<0?"-":"",d=Pn(this._months)!==Pn(h)?"-":"",p=Pn(this._days)!==Pn(h)?"-":"",g=Pn(this._milliseconds)!==Pn(h)?"-":"";return f+"P"+(a?d+a+"Y":"")+(o?d+o+"M":"")+(s?p+s+"D":"")+(c||u||l?"T":"")+(c?g+c+"H":"")+(u?g+u+"M":"")+(l?g+l+"S":"")}var jn=Ce.prototype;return jn.isValid=function(){return this._isValid},jn.abs=function(){var t=this._data;return this._milliseconds=fn(this._milliseconds),this._days=fn(this._days),this._months=fn(this._months),t.milliseconds=fn(t.milliseconds),t.seconds=fn(t.seconds),t.minutes=fn(t.minutes),t.hours=fn(t.hours),t.months=fn(t.months),t.years=fn(t.years),this},jn.add=function(t,e){return dn(this,t,e,1)},jn.subtract=function(t,e){return dn(this,t,e,-1)},jn.as=function(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=I(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+gn(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(yn(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}},jn.asMilliseconds=vn,jn.asSeconds=bn,jn.asMinutes=_n,jn.asHours=xn,jn.asDays=wn,jn.asWeeks=kn,jn.asMonths=Tn,jn.asQuarters=Cn,jn.asYears=En,jn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},jn._bubble=function(){var t,e,n,r,i,a=this._milliseconds,o=this._days,s=this._months,c=this._data;return 0<=a&&0<=o&&0<=s||a<=0&&o<=0&&s<=0||(a+=864e5*pn(yn(s)+o),s=o=0),c.milliseconds=a%1e3,t=w(a/1e3),c.seconds=t%60,e=w(t/60),c.minutes=e%60,n=w(e/60),c.hours=n%24,s+=i=w(gn(o+=w(n/24))),o-=pn(yn(i)),r=w(s/12),s%=12,c.days=o,c.months=s,c.years=r,this},jn.clone=function(){return Re(this)},jn.get=function(t){return t=I(t),this.isValid()?this[t+"s"]():NaN},jn.milliseconds=An,jn.seconds=Mn,jn.minutes=Nn,jn.hours=Dn,jn.days=Bn,jn.weeks=function(){return w(this.days()/7)},jn.months=Ln,jn.years=On,jn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,n,r,i,a,o,s,c,u,l,h=this.localeData(),f=(e=!t,n=h,r=Re(this).abs(),i=In(r.as("s")),a=In(r.as("m")),o=In(r.as("h")),s=In(r.as("d")),c=In(r.as("M")),u=In(r.as("y")),(l=i<=Rn.ss&&["s",i]||i<Rn.s&&["ss",i]||a<=1&&["m"]||a<Rn.m&&["mm",a]||o<=1&&["h"]||o<Rn.h&&["hh",o]||s<=1&&["d"]||s<Rn.d&&["dd",s]||c<=1&&["M"]||c<Rn.M&&["MM",c]||u<=1&&["y"]||["yy",u])[2]=e,l[3]=0<+this,l[4]=n,function(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}.apply(null,l));return t&&(f=h.pastFuture(+this,f)),h.postformat(f)},jn.toISOString=Yn,jn.toString=Yn,jn.toJSON=Yn,jn.locale=qe,jn.localeData=We,jn.toIsoString=E("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Yn),jn.lang=He,q("X",0,0,"unix"),q("x",0,0,"valueOf"),lt("x",at),lt("X",/[+-]?\d+(\.\d{1,3})?/),pt("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))})),pt("x",(function(t,e,n){n._d=new Date(k(t))})),i.version="2.24.0",e=_e,i.fn=on,i.min=function(){return ke("isBefore",[].slice.call(arguments,0))},i.max=function(){return ke("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=d,i.unix=function(t){return _e(1e3*t)},i.months=function(t,e){return ln(t,e,"months")},i.isDate=u,i.locale=ee,i.invalid=y,i.duration=Re,i.isMoment=x,i.weekdays=function(t,e,n){return hn(t,e,n,"weekdays")},i.parseZone=function(){return _e.apply(null,arguments).parseZone()},i.localeData=re,i.isDuration=Ee,i.monthsShort=function(t,e){return ln(t,e,"monthsShort")},i.weekdaysMin=function(t,e,n){return hn(t,e,n,"weekdaysMin")},i.defineLocale=ne,i.updateLocale=function(t,e){if(null!=e){var n,r,i=Zt;null!=(r=te(t))&&(i=r._config),(n=new B(e=D(i,e))).parentLocale=Qt[t],Qt[t]=n,ee(t)}else null!=Qt[t]&&(null!=Qt[t].parentLocale?Qt[t]=Qt[t].parentLocale:null!=Qt[t]&&delete Qt[t]);return Qt[t]},i.locales=function(){return S(Qt)},i.weekdaysShort=function(t,e,n){return hn(t,e,n,"weekdaysShort")},i.normalizeUnits=I,i.relativeTimeRounding=function(t){return void 0===t?In:"function"==typeof t&&(In=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==Rn[t]&&(void 0===e?Rn[t]:(Rn[t]=e,"s"===t&&(Rn.ss=e-1),!0))},i.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=on,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()},6470:t=>{"use strict";function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function n(t,e){for(var n,r="",i=0,a=-1,o=0,s=0;s<=t.length;++s){if(s<t.length)n=t.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(a===s-1||1===o);else if(a!==s-1&&2===o){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),a=s,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,a=s,o=0;continue}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+t.slice(a+1,s):r=t.slice(a+1,s),i=s-a-1;a=s,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var t,r="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(void 0===t&&(t=process.cwd()),o=t),e(o),0!==o.length&&(r=o+"/"+r,i=47===o.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(t){if(e(t),0===t.length)return".";var r=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=n(t,!r)).length||r||(t="."),t.length>0&&i&&(t+="/"),r?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,n=0;n<arguments.length;++n){var i=arguments[n];e(i),i.length>0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":r.normalize(t)},relative:function(t,n){if(e(t),e(n),t===n)return"";if((t=r.resolve(t))===(n=r.resolve(n)))return"";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var a=t.length,o=a-i,s=1;s<n.length&&47===n.charCodeAt(s);++s);for(var c=n.length-s,u=o<c?o:c,l=-1,h=0;h<=u;++h){if(h===u){if(c>u){if(47===n.charCodeAt(s+h))return n.slice(s+h+1);if(0===h)return n.slice(s+h)}else o>u&&(47===t.charCodeAt(i+h)?l=h:0===h&&(l=0));break}var f=t.charCodeAt(i+h);if(f!==n.charCodeAt(s+h))break;47===f&&(l=h)}var d="";for(h=i+l+1;h<=a;++h)h!==a&&47!==t.charCodeAt(h)||(0===d.length?d+="..":d+="/..");return d.length>0?d+n.slice(s+l):(s+=l,47===n.charCodeAt(s)&&++s,n.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var n=t.charCodeAt(0),r=47===n,i=-1,a=!0,o=t.length-1;o>=1;--o)if(47===(n=t.charCodeAt(o))){if(!a){i=o;break}}else a=!1;return-1===i?r?"/":".":r&&1===i?"//":t.slice(0,i)},basename:function(t,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');e(t);var r,i=0,a=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return"";var s=n.length-1,c=-1;for(r=t.length-1;r>=0;--r){var u=t.charCodeAt(r);if(47===u){if(!o){i=r+1;break}}else-1===c&&(o=!1,c=r+1),s>=0&&(u===n.charCodeAt(s)?-1==--s&&(a=r):(s=-1,a=c))}return i===a?a=c:-1===a&&(a=t.length),t.slice(i,a)}for(r=t.length-1;r>=0;--r)if(47===t.charCodeAt(r)){if(!o){i=r+1;break}}else-1===a&&(o=!1,a=r+1);return-1===a?"":t.slice(i,a)},extname:function(t){e(t);for(var n=-1,r=0,i=-1,a=!0,o=0,s=t.length-1;s>=0;--s){var c=t.charCodeAt(s);if(47!==c)-1===i&&(a=!1,i=s+1),46===c?-1===n?n=s:1!==o&&(o=1):-1!==n&&(o=-1);else if(!a){r=s+1;break}}return-1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":t.slice(n,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+"/"+r:r}(0,t)},parse:function(t){e(t);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return n;var r,i=t.charCodeAt(0),a=47===i;a?(n.root="/",r=1):r=0;for(var o=-1,s=0,c=-1,u=!0,l=t.length-1,h=0;l>=r;--l)if(47!==(i=t.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===i?-1===o?o=l:1!==h&&(h=1):-1!==o&&(h=-1);else if(!u){s=l+1;break}return-1===o||-1===c||0===h||1===h&&o===c-1&&o===s+1?-1!==c&&(n.base=n.name=0===s&&a?t.slice(1,c):t.slice(s,c)):(0===s&&a?(n.name=t.slice(1,o),n.base=t.slice(1,c)):(n.name=t.slice(s,o),n.base=t.slice(s,c)),n.ext=t.slice(o,c)),s>0?n.dir=t.slice(0,s-1):a&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,t.exports=r},8218:()=>{},8009:()=>{},5354:()=>{},6878:()=>{},8183:()=>{},1428:()=>{},4551:()=>{},8800:()=>{},1993:()=>{},3069:()=>{},9143:()=>{}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var a=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.c=e,n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r=n(n.s=8968);return r.default})()));
+//# sourceMappingURL=mermaid.min.js.map
/**
* @version : 15.6.0 - Bridge.NET
* @author : Object.NET, Inc. http://bridge.net/
diff --git a/src/main/webapp/js/mermaid/README.md b/src/main/webapp/js/mermaid/README.md
deleted file mode 100644
index f06ca16d..00000000
--- a/src/main/webapp/js/mermaid/README.md
+++ /dev/null
@@ -1,29 +0,0 @@
-# To change mermaid.min.js for IE11
-
-1. Clone Mermaid source from Github
-1. Change the file `webpack.config.base.js`. Look for `const jsRule = {` and replace that block with
-
-```
-const jsRule = {
- test: /\.js$/,
- include: [
- path.resolve(__dirname, './src'),
- path.resolve(__dirname, './node_modules/dagre-d3-renderer/lib'),
- path.resolve(__dirname, './node_modules/@braintree/sanitize-url'),
- path.resolve(__dirname, './node_modules/dagre'),
- path.resolve(__dirname, './node_modules/graphlib'),
- path.resolve(__dirname, './node_modules/he'),
- path.resolve(__dirname, './node_modules/entity-decode'),
- path.resolve(__dirname, './node_modules/khroma/dist'),
- path.resolve(__dirname, './node_modules/stylis')
- ],
- use: {
- loader: 'babel-loader'
- }
-};
-```
-
-The idea is to add any library used in package.json that is not compatible with IE11
-Then polyfill any JS error in IE11 (e.g, version 8.10.1 needs Number.isInteger polyfill such that js loads without errors)
-
-All trials to polyfill other errors failed (using useBuiltIns: 'usage', corejs: {version: '2.0'} or polyfill.io). IE11 has basic support for flowchart, sequence and er only \ No newline at end of file
diff --git a/src/main/webapp/js/mermaid/mermaid.min.js b/src/main/webapp/js/mermaid/mermaid.min.js
index e15ee79a..02a60732 100644
--- a/src/main/webapp/js/mermaid/mermaid.min.js
+++ b/src/main/webapp/js/mermaid/mermaid.min.js
@@ -1,36 +1,3 @@
-Number.isInteger = Number.isInteger || function(value) {
- return typeof value === 'number' &&
- isFinite(value) &&
- Math.floor(value) === value;
-};
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mermaid=e():t.mermaid=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=384)}([function(t,e,n){"use strict";n.r(e);var r=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},i=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return r(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}};var a=i(r),o=a.right,s=a.left,c=o,u=function(t,e){null==e&&(e=l);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return a};function l(t,e){return[t,e]}var h=function(t,e,n){var r,i,a,o,s=t.length,c=e.length,u=new Array(s*c);for(null==n&&(n=l),r=a=0;r<s;++r)for(o=t[r],i=0;i<c;++i,++a)u[a]=n(o,e[i]);return u},f=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,e){var n,r,i=t.length,a=0,o=-1,s=0,c=0;if(null==e)for(;++o<i;)isNaN(n=d(t[o]))||(c+=(r=n-s)*(n-(s+=r/++a)));else for(;++o<i;)isNaN(n=d(e(t[o],o,t)))||(c+=(r=n-s)*(n-(s+=r/++a)));if(a>1)return c/(a-1)},y=function(t,e){var n=p(t,e);return n?Math.sqrt(n):n},g=function(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]},v=Array.prototype,m=v.slice,b=v.map,x=function(t){return function(){return t}},_=function(t){return t},k=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a},w=Math.sqrt(50),E=Math.sqrt(10),T=Math.sqrt(2),C=function(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=S(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return r&&a.reverse(),a};function S(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=w?10:a>=E?5:a>=T?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=w?10:a>=E?5:a>=T?2:1)}function A(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=w?i*=10:a>=E?i*=5:a>=T&&(i*=2),e<t?-i:i}var M=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},O=function(){var t=_,e=g,n=M;function r(r){var i,a,o=r.length,s=new Array(o);for(i=0;i<o;++i)s[i]=t(r[i],i,r);var u=e(s),l=u[0],h=u[1],f=n(s,l,h);Array.isArray(f)||(f=A(l,h,f),f=k(Math.ceil(l/f)*f,h,f));for(var d=f.length;f[0]<=l;)f.shift(),--d;for(;f[d-1]>h;)f.pop(),--d;var p,y=new Array(d+1);for(i=0;i<=d;++i)(p=y[i]=[]).x0=i>0?f[i-1]:l,p.x1=i<d?f[i]:h;for(i=0;i<o;++i)l<=(a=s[i])&&a<=h&&y[c(f,a,0,d)].push(r[i]);return y}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:x(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:x([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?x(m.call(t)):x(t),r):n},r},B=function(t,e,n){if(null==n&&(n=d),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}},N=function(t,e,n){return t=b.call(t,d).sort(r),Math.ceil((n-e)/(2*(B(t,.75)-B(t,.25))*Math.pow(t.length,-1/3)))},D=function(t,e,n){return Math.ceil((n-e)/(3.5*y(t)*Math.pow(t.length,-1/3)))},L=function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r},I=function(t,e){var n,r=t.length,i=r,a=-1,o=0;if(null==e)for(;++a<r;)isNaN(n=d(t[a]))?--i:o+=n;else for(;++a<r;)isNaN(n=d(e(t[a],a,t)))?--i:o+=n;if(i)return o/i},R=function(t,e){var n,i=t.length,a=-1,o=[];if(null==e)for(;++a<i;)isNaN(n=d(t[a]))||o.push(n);else for(;++a<i;)isNaN(n=d(e(t[a],a,t)))||o.push(n);return B(o.sort(r),.5)},F=function(t){for(var e,n,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(n=new Array(o);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n},P=function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&r>n&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&r>n&&(r=n);return r},j=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},Y=function(t,e){if(n=t.length){var n,i,a=0,o=0,s=t[o];for(null==e&&(e=r);++a<n;)(e(i=t[a],s)<0||0!==e(s,s))&&(s=i,o=a);return 0===e(s,s)?o:void 0}},z=function(t,e,n){for(var r,i,a=(null==n?t.length:n)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,r=t[a+e],t[a+e]=t[i+e],t[i+e]=r;return t},U=function(t,e){var n,r=t.length,i=-1,a=0;if(null==e)for(;++i<r;)(n=+t[i])&&(a+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(a+=n);return a},$=function(t){if(!(i=t.length))return[];for(var e=-1,n=P(t,q),r=new Array(n);++e<n;)for(var i,a=-1,o=r[e]=new Array(i);++a<i;)o[a]=t[a][e];return r};function q(t){return t.length}var W=function(){return $(arguments)},V=Array.prototype.slice,H=function(t){return t};function G(t){return"translate("+(t+.5)+",0)"}function X(t){return"translate(0,"+(t+.5)+")"}function Z(t){return function(e){return+t(e)}}function Q(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function K(){return!this.__axis}function J(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,c=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",l=1===t||3===t?G:X;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):H:i,p=Math.max(a,0)+s,y=e.range(),g=+y[0]+.5,v=+y[y.length-1]+.5,m=(e.bandwidth?Q:Z)(e.copy()),b=h.selection?h.selection():h,x=b.selectAll(".domain").data([null]),_=b.selectAll(".tick").data(f,e).order(),k=_.exit(),w=_.enter().append("g").attr("class","tick"),E=_.select("line"),T=_.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(w),E=E.merge(w.append("line").attr("stroke","currentColor").attr(u+"2",c*a)),T=T.merge(w.append("text").attr("fill","currentColor").attr(u,c*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==b&&(x=x.transition(h),_=_.transition(h),E=E.transition(h),T=T.transition(h),k=k.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=m(t))?l(t):this.getAttribute("transform")})),w.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:m(t))}))),k.remove(),x.attr("d",4===t||2==t?o?"M"+c*o+","+g+"H0.5V"+v+"H"+c*o:"M0.5,"+g+"V"+v:o?"M"+g+","+c*o+"V0.5H"+v+"V"+c*o:"M"+g+",0.5H"+v),_.attr("opacity",1).attr("transform",(function(t){return l(m(t))})),E.attr(u+"2",c*a),T.attr(u,c*p).text(d),b.filter(K).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each((function(){this.__axis=m}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=V.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:V.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:V.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=o=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(o=+t,h):o},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function tt(t){return J(1,t)}function et(t){return J(2,t)}function nt(t){return J(3,t)}function rt(t){return J(4,t)}var it={value:function(){}};function at(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ot(r)}function ot(t){this._=t}function st(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function ct(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function ut(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=it,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ot.prototype=at.prototype={constructor:ot,on:function(t,e){var n,r=this._,i=st(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=ut(r[n],t.name,e);else if(null==e)for(n in r)r[n]=ut(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=ct(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ot(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var lt=at;function ht(){}var ft=function(t){return null==t?ht:function(){return this.querySelector(t)}};function dt(){return[]}var pt=function(t){return null==t?dt:function(){return this.querySelectorAll(t)}},yt=function(t){return function(){return this.matches(t)}},gt=function(t){return new Array(t.length)};function vt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}vt.prototype={constructor:vt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function mt(t,e,n,r,i,a){for(var o,s=0,c=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new vt(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function bt(t,e,n,r,i,a,o){var s,c,u,l={},h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(d[s]=u="$"+o.call(c,c.__data__,s,e),u in l?i[s]=c:l[u]=c);for(s=0;s<f;++s)(c=l[u="$"+o.call(t,a[s],s,a)])?(r[s]=c,c.__data__=a[s],l[u]=null):n[s]=new vt(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&l[d[s]]===c&&(i[s]=c)}function xt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var _t="http://www.w3.org/1999/xhtml",kt={svg:"http://www.w3.org/2000/svg",xhtml:_t,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},wt=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),kt.hasOwnProperty(e)?{space:kt[e],local:t}:t};function Et(t){return function(){this.removeAttribute(t)}}function Tt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ct(t,e){return function(){this.setAttribute(t,e)}}function St(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function At(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Mt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var Ot=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function Bt(t){return function(){this.style.removeProperty(t)}}function Nt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Dt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Lt(t,e){return t.style.getPropertyValue(e)||Ot(t).getComputedStyle(t,null).getPropertyValue(e)}function It(t){return function(){delete this[t]}}function Rt(t,e){return function(){this[t]=e}}function Ft(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Pt(t){return t.trim().split(/^|\s+/)}function jt(t){return t.classList||new Yt(t)}function Yt(t){this._node=t,this._names=Pt(t.getAttribute("class")||"")}function zt(t,e){for(var n=jt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Ut(t,e){for(var n=jt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function $t(t){return function(){zt(this,t)}}function qt(t){return function(){Ut(this,t)}}function Wt(t,e){return function(){(e.apply(this,arguments)?zt:Ut)(this,t)}}Yt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Vt(){this.textContent=""}function Ht(t){return function(){this.textContent=t}}function Gt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Xt(){this.innerHTML=""}function Zt(t){return function(){this.innerHTML=t}}function Qt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Kt(){this.nextSibling&&this.parentNode.appendChild(this)}function Jt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function te(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===_t&&e.documentElement.namespaceURI===_t?e.createElement(t):e.createElementNS(n,t)}}function ee(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var ne=function(t){var e=wt(t);return(e.local?ee:te)(e)};function re(){return null}function ie(){var t=this.parentNode;t&&t.removeChild(this)}function ae(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function oe(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}var se={},ce=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(se={mouseenter:"mouseover",mouseleave:"mouseout"}));function ue(t,e,n){return t=le(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function le(t,e,n){return function(r){var i=ce;ce=r;try{t.call(this,this.__data__,e,n)}finally{ce=i}}}function he(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function fe(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function de(t,e,n){var r=se.hasOwnProperty(t.type)?ue:le;return function(i,a,o){var s,c=this.__on,u=r(e,a,o);if(c)for(var l=0,h=c.length;l<h;++l)if((s=c[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=u,s.capture=n),void(s.value=e);this.addEventListener(t.type,u,n),s={type:t.type,name:t.name,value:e,listener:u,capture:n},c?c.push(s):this.__on=[s]}}function pe(t,e,n,r){var i=ce;t.sourceEvent=ce,ce=t;try{return e.apply(n,r)}finally{ce=i}}function ye(t,e,n){var r=Ot(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function ge(t,e){return function(){return ye(this,t,e)}}function ve(t,e){return function(){return ye(this,t,e.apply(this,arguments))}}var me=[null];function be(t,e){this._groups=t,this._parents=e}function xe(){return new be([[document.documentElement]],me)}be.prototype=xe.prototype={constructor:be,select:function(t){"function"!=typeof t&&(t=ft(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,u=r[i]=new Array(c),l=0;l<c;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),u[l]=o);return new be(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=pt(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,u=0;u<c;++u)(o=s[u])&&(r.push(t.call(o,o.__data__,u,s)),i.push(o));return new be(r,i)},filter:function(t){"function"!=typeof t&&(t=yt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new be(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),l=-1,this.each((function(t){p[++l]=t})),p;var n,r=e?bt:mt,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,s=new Array(o),c=new Array(o),u=new Array(o),l=0;l<o;++l){var h=i[l],f=a[l],d=f.length,p=t.call(h,h&&h.__data__,l,i),y=p.length,g=c[l]=new Array(y),v=s[l]=new Array(y);r(h,f,g,v,u[l]=new Array(d),p,e);for(var m,b,x=0,_=0;x<y;++x)if(m=g[x]){for(x>=_&&(_=x+1);!(b=v[_])&&++_<y;);m._next=b||null}}return(s=new be(s,i))._enter=c,s._exit=u,s},enter:function(){return new be(this._enter||this._groups.map(gt),this._parents)},exit:function(){return new be(this._exit||this._groups.map(gt),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new be(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=xt);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,u=i[a]=new Array(c),l=0;l<c;++l)(o=s[l])&&(u[l]=o);u.sort(e)}return new be(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=wt(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Tt:Et:"function"==typeof e?n.local?Mt:At:n.local?St:Ct)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Bt:"function"==typeof e?Dt:Nt)(t,e,null==n?"":n)):Lt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?It:"function"==typeof e?Ft:Rt)(t,e)):this.node()[t]},classed:function(t,e){var n=Pt(t+"");if(arguments.length<2){for(var r=jt(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Wt:e?$t:qt)(n,e))},text:function(t){return arguments.length?this.each(null==t?Vt:("function"==typeof t?Gt:Ht)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Xt:("function"==typeof t?Qt:Zt)(t)):this.node().innerHTML},raise:function(){return this.each(Kt)},lower:function(){return this.each(Jt)},append:function(t){var e="function"==typeof t?t:ne(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ne(t),r=null==e?re:"function"==typeof e?e:ft(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ie)},clone:function(t){return this.select(t?oe:ae)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=he(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?de:fe,null==n&&(n=!1),r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,u=0,l=s.length;u<l;++u)for(r=0,c=s[u];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?ve:ge)(t,e))}};var _e=xe,ke=function(t){return"string"==typeof t?new be([[document.querySelector(t)]],[document.documentElement]):new be([[t]],me)};function we(){ce.stopImmediatePropagation()}var Ee=function(){ce.preventDefault(),ce.stopImmediatePropagation()},Te=function(t){var e=t.document.documentElement,n=ke(t).on("dragstart.drag",Ee,!0);"onselectstart"in e?n.on("selectstart.drag",Ee,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")};function Ce(t,e){var n=t.document.documentElement,r=ke(t).on("dragstart.drag",null);e&&(r.on("click.drag",Ee,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Se=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function Ae(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Me(){}var Oe="\\s*([+-]?\\d+)\\s*",Be="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ne="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",De=/^#([0-9a-f]{3,8})$/,Le=new RegExp("^rgb\\("+[Oe,Oe,Oe]+"\\)$"),Ie=new RegExp("^rgb\\("+[Ne,Ne,Ne]+"\\)$"),Re=new RegExp("^rgba\\("+[Oe,Oe,Oe,Be]+"\\)$"),Fe=new RegExp("^rgba\\("+[Ne,Ne,Ne,Be]+"\\)$"),Pe=new RegExp("^hsl\\("+[Be,Ne,Ne]+"\\)$"),je=new RegExp("^hsla\\("+[Be,Ne,Ne,Be]+"\\)$"),Ye={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ze(){return this.rgb().formatHex()}function Ue(){return this.rgb().formatRgb()}function $e(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=De.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?qe(e):3===n?new Ge(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new Ge(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new Ge(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Le.exec(t))?new Ge(e[1],e[2],e[3],1):(e=Ie.exec(t))?new Ge(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Re.exec(t))?We(e[1],e[2],e[3],e[4]):(e=Fe.exec(t))?We(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Pe.exec(t))?Ke(e[1],e[2]/100,e[3]/100,1):(e=je.exec(t))?Ke(e[1],e[2]/100,e[3]/100,e[4]):Ye.hasOwnProperty(t)?qe(Ye[t]):"transparent"===t?new Ge(NaN,NaN,NaN,0):null}function qe(t){return new Ge(t>>16&255,t>>8&255,255&t,1)}function We(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ge(t,e,n,r)}function Ve(t){return t instanceof Me||(t=$e(t)),t?new Ge((t=t.rgb()).r,t.g,t.b,t.opacity):new Ge}function He(t,e,n,r){return 1===arguments.length?Ve(t):new Ge(t,e,n,null==r?1:r)}function Ge(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Xe(){return"#"+Qe(this.r)+Qe(this.g)+Qe(this.b)}function Ze(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Qe(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ke(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new en(t,e,n,r)}function Je(t){if(t instanceof en)return new en(t.h,t.s,t.l,t.opacity);if(t instanceof Me||(t=$e(t)),!t)return new en;if(t instanceof en)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new en(o,s,c,t.opacity)}function tn(t,e,n,r){return 1===arguments.length?Je(t):new en(t,e,n,null==r?1:r)}function en(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function nn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function rn(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}Se(Me,$e,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:ze,formatHex:ze,formatHsl:function(){return Je(this).formatHsl()},formatRgb:Ue,toString:Ue}),Se(Ge,He,Ae(Me,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ge(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ge(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Xe,formatHex:Xe,formatRgb:Ze,toString:Ze})),Se(en,tn,Ae(Me,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new en(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new en(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ge(nn(t>=240?t-240:t+120,i,r),nn(t,i,r),nn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var an=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return rn((n-r/e)*e,o,i,a,s)}},on=function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return rn((n-r/e)*e,i,a,o,s)}},sn=function(t){return function(){return t}};function cn(t,e){return function(n){return t+n*e}}function un(t,e){var n=e-t;return n?cn(t,n>180||n<-180?n-360*Math.round(n/360):n):sn(isNaN(t)?e:t)}function ln(t){return 1==(t=+t)?hn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):sn(isNaN(e)?n:e)}}function hn(t,e){var n=e-t;return n?cn(t,n):sn(isNaN(t)?e:t)}var fn=function t(e){var n=ln(e);function r(t,e){var r=n((t=He(t)).r,(e=He(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=hn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function dn(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=He(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}var pn=dn(an),yn=dn(on),gn=function(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}};function vn(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}var mn=function(t,e){return(vn(e)?gn:bn)(t,e)};function bn(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=An(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}var xn=function(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}},_n=function(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}},kn=function(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=An(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}},wn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,En=new RegExp(wn.source,"g");var Tn,Cn,Sn=function(t,e){var n,r,i,a=wn.lastIndex=En.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=wn.exec(t))&&(r=En.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:_n(n,r)})),a=En.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})},An=function(t,e){var n,r=typeof e;return null==e||"boolean"===r?sn(e):("number"===r?_n:"string"===r?(n=$e(e))?(e=n,fn):Sn:e instanceof $e?fn:e instanceof Date?xn:vn(e)?gn:Array.isArray(e)?bn:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?kn:_n)(t,e)},Mn=function(){for(var t,e=ce;t=e.sourceEvent;)e=t;return e},On=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]},Bn=function(t,e,n){arguments.length<3&&(n=e,e=Mn().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return On(t,r);return null},Nn=function(t){var e=Mn();return e.changedTouches&&(e=e.changedTouches[0]),On(t,e)},Dn=0,Ln=0,In=0,Rn=0,Fn=0,Pn=0,jn="object"==typeof performance&&performance.now?performance:Date,Yn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function zn(){return Fn||(Yn(Un),Fn=jn.now()+Pn)}function Un(){Fn=0}function $n(){this._call=this._time=this._next=null}function qn(t,e,n){var r=new $n;return r.restart(t,e,n),r}function Wn(){zn(),++Dn;for(var t,e=Tn;e;)(t=Fn-e._time)>=0&&e._call.call(null,t),e=e._next;--Dn}function Vn(){Fn=(Rn=jn.now())+Pn,Dn=Ln=0;try{Wn()}finally{Dn=0,function(){var t,e,n=Tn,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Tn=e);Cn=t,Gn(r)}(),Fn=0}}function Hn(){var t=jn.now(),e=t-Rn;e>1e3&&(Pn-=e,Rn=t)}function Gn(t){Dn||(Ln&&(Ln=clearTimeout(Ln)),t-Fn>24?(t<1/0&&(Ln=setTimeout(Vn,t-jn.now()-Pn)),In&&(In=clearInterval(In))):(In||(Rn=jn.now(),In=setInterval(Hn,1e3)),Dn=1,Yn(Vn)))}$n.prototype=qn.prototype={constructor:$n,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?zn():+n)+(null==e?0:+e),this._next||Cn===this||(Cn?Cn._next=this:Tn=this,Cn=this),this._call=t,this._time=n,Gn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Gn())}};var Xn=function(t,e,n){var r=new $n;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},Zn=lt("start","end","cancel","interrupt"),Qn=[],Kn=function(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(c){var u,l,h,f;if(1!==n.state)return s();for(u in i)if((f=i[u]).name===n.name){if(3===f.state)return Xn(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+u<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[u])}if(Xn((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,l=-1;u<h;++u)(f=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=qn((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Zn,tween:Qn,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})};function Jn(t,e){var n=er(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function tr(t,e){var n=er(t,e);if(n.state>3)throw new Error("too late; already running");return n}function er(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var nr,rr,ir,ar,or=function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}},sr=180/Math.PI,cr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},ur=function(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*sr,skewX:Math.atan(c)*sr,scaleX:o,scaleY:s}};function lr(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:_n(t,i)},{i:c-2,x:_n(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:_n(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:_n(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:_n(t,n)},{i:s-2,x:_n(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var hr=lr((function(t){return"none"===t?cr:(nr||(nr=document.createElement("DIV"),rr=document.documentElement,ir=document.defaultView),nr.style.transform=t,t=ir.getComputedStyle(rr.appendChild(nr),null).getPropertyValue("transform"),rr.removeChild(nr),t=t.slice(7,-1).split(","),ur(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),fr=lr((function(t){return null==t?cr:(ar||(ar=document.createElementNS("http://www.w3.org/2000/svg","g")),ar.setAttribute("transform",t),(t=ar.transform.baseVal.consolidate())?(t=t.matrix,ur(t.a,t.b,t.c,t.d,t.e,t.f)):cr)}),", ",")",")");function dr(t,e){var n,r;return function(){var i=tr(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function pr(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=tr(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}a.tween=i}}function yr(t,e,n){var r=t._id;return t.each((function(){var t=tr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return er(t,r).value[e]}}var gr=function(t,e){var n;return("number"==typeof e?_n:e instanceof $e?fn:(n=$e(e))?(e=n,fn):Sn)(t,e)};function vr(t){return function(){this.removeAttribute(t)}}function mr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function br(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function xr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function _r(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function kr(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function wr(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Er(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Tr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Er(t,i)),n}return i._value=e,i}function Cr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&wr(t,i)),n}return i._value=e,i}function Sr(t,e){return function(){Jn(this,t).delay=+e.apply(this,arguments)}}function Ar(t,e){return e=+e,function(){Jn(this,t).delay=e}}function Mr(t,e){return function(){tr(this,t).duration=+e.apply(this,arguments)}}function Or(t,e){return e=+e,function(){tr(this,t).duration=e}}function Br(t,e){if("function"!=typeof e)throw new Error;return function(){tr(this,t).ease=e}}function Nr(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Jn:tr;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Dr=_e.prototype.constructor;function Lr(t){return function(){this.style.removeProperty(t)}}function Ir(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Rr(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Ir(t,a,n)),r}return a._value=e,a}function Fr(t){return function(e){this.textContent=t.call(this,e)}}function Pr(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Fr(r)),e}return r._value=t,r}var jr=0;function Yr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function zr(t){return _e().transition(t)}function Ur(){return++jr}var $r=_e.prototype;function qr(t){return t*t*t}function Wr(t){return--t*t*t+1}function Vr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Yr.prototype=zr.prototype={constructor:Yr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ft(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,u=r[o],l=u.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=u[f])&&(c=t.call(s,s.__data__,f,u))&&("__data__"in s&&(c.__data__=s.__data__),h[f]=c,Kn(h[f],e,n,f,h,er(s,n)));return new Yr(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=pt(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,u=r[s],l=u.length,h=0;h<l;++h)if(c=u[h]){for(var f,d=t.call(c,c.__data__,h,u),p=er(c,n),y=0,g=d.length;y<g;++y)(f=d[y])&&Kn(f,e,n,y,d,p);a.push(d),o.push(c)}return new Yr(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=yt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new Yr(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new Yr(o,this._parents,this._name,this._id)},selection:function(){return new Dr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Ur(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)if(o=s[u]){var l=er(o,e);Kn(o,t,n,u,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Yr(r,this._parents,t,n)},call:$r.call,nodes:$r.nodes,node:$r.node,size:$r.size,empty:$r.empty,each:$r.each,on:function(t,e){var n=this._id;return arguments.length<2?er(this.node(),n).on.on(t):this.each(Nr(n,t,e))},attr:function(t,e){var n=wt(t),r="transform"===n?fr:gr;return this.attrTween(t,"function"==typeof e?(n.local?kr:_r)(n,r,yr(this,"attr."+t,e)):null==e?(n.local?mr:vr)(n):(n.local?xr:br)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=wt(t);return this.tween(n,(r.local?Tr:Cr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?hr:gr;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Lt(this,t),o=(this.style.removeProperty(t),Lt(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Lr(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Lt(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=Lt(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,yr(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=tr(this,t),u=c.on,l=null==c.value[o]?a||(a=Lr(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(s,i=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Lt(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Rr(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(yr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Pr(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=er(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?dr:pr)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Sr:Ar)(e,t)):er(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Mr:Or)(e,t)):er(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Br(e,t)):er(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=tr(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e}))}))}};var Hr={time:null,delay:0,duration:250,ease:Vr};function Gr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Hr.time=zn(),Hr;return n}_e.prototype.interrupt=function(t){return this.each((function(){or(this,t)}))},_e.prototype.transition=function(t){var e,n;t instanceof Yr?(e=t._id,t=t._name):(e=Ur(),(n=Hr).time=zn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)(o=s[u])&&Kn(o,t,e,u,s,n||Gr(o,e));return new Yr(r,this._parents,t,e)};var Xr=[null],Zr=function(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+"",i)if((n=i[r]).state>1&&n.name===e)return new Yr([[t]],Xr,e,+r);return null},Qr=function(t){return function(){return t}},Kr=function(t,e,n){this.target=t,this.type=e,this.selection=n};function Jr(){ce.stopImmediatePropagation()}var ti=function(){ce.preventDefault(),ce.stopImmediatePropagation()},ei={name:"drag"},ni={name:"space"},ri={name:"handle"},ii={name:"center"};function ai(t){return[+t[0],+t[1]]}function oi(t){return[ai(t[0]),ai(t[1])]}function si(t){return function(e){return Bn(e,ce.touches,t)}}var ci={name:"x",handles:["w","e"].map(gi),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ui={name:"y",handles:["n","s"].map(gi),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},li={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(gi),input:function(t){return null==t?null:oi(t)},output:function(t){return t}},hi={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},fi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},di={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},pi={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},yi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function gi(t){return{type:t}}function vi(){return!ce.ctrlKey&&!ce.button}function mi(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function bi(){return navigator.maxTouchPoints||"ontouchstart"in this}function xi(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function _i(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function ki(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function wi(){return Ci(ci)}function Ei(){return Ci(ui)}var Ti=function(){return Ci(li)};function Ci(t){var e,n=mi,r=vi,i=bi,a=!0,o=lt("start","brush","end"),s=6;function c(e){var n=e.property("__brush",y).selectAll(".overlay").data([gi("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",hi.overlay).merge(n).each((function(){var t=xi(this).extent;ke(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([gi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",hi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return hi[t.type]})),e.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(i).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function u(){var t=ke(this),e=xi(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(t,e,n){return!n&&t.__brush.emitter||new h(t,e)}function h(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function f(){if((!e||ce.touches)&&r.apply(this,arguments)){var n,i,o,s,c,h,f,d,p,y,g,v=this,m=ce.target.__data__.type,b="selection"===(a&&ce.metaKey?m="overlay":m)?ei:a&&ce.altKey?ii:ri,x=t===ui?null:pi[m],_=t===ci?null:yi[m],k=xi(v),w=k.extent,E=k.selection,T=w[0][0],C=w[0][1],S=w[1][0],A=w[1][1],M=0,O=0,B=x&&_&&a&&ce.shiftKey,N=ce.touches?si(ce.changedTouches[0].identifier):Nn,D=N(v),L=D,I=l(v,arguments,!0).beforestart();"overlay"===m?(E&&(p=!0),k.selection=E=[[n=t===ui?T:D[0],o=t===ci?C:D[1]],[c=t===ui?S:n,f=t===ci?A:o]]):(n=E[0][0],o=E[0][1],c=E[1][0],f=E[1][1]),i=n,s=o,h=c,d=f;var R=ke(v).attr("pointer-events","none"),F=R.selectAll(".overlay").attr("cursor",hi[m]);if(ce.touches)I.moved=j,I.ended=z;else{var P=ke(ce.view).on("mousemove.brush",j,!0).on("mouseup.brush",z,!0);a&&P.on("keydown.brush",U,!0).on("keyup.brush",$,!0),Te(ce.view)}Jr(),or(v),u.call(v),I.start()}function j(){var t=N(v);!B||y||g||(Math.abs(t[0]-L[0])>Math.abs(t[1]-L[1])?g=!0:y=!0),L=t,p=!0,ti(),Y()}function Y(){var t;switch(M=L[0]-D[0],O=L[1]-D[1],b){case ni:case ei:x&&(M=Math.max(T-n,Math.min(S-c,M)),i=n+M,h=c+M),_&&(O=Math.max(C-o,Math.min(A-f,O)),s=o+O,d=f+O);break;case ri:x<0?(M=Math.max(T-n,Math.min(S-n,M)),i=n+M,h=c):x>0&&(M=Math.max(T-c,Math.min(S-c,M)),i=n,h=c+M),_<0?(O=Math.max(C-o,Math.min(A-o,O)),s=o+O,d=f):_>0&&(O=Math.max(C-f,Math.min(A-f,O)),s=o,d=f+O);break;case ii:x&&(i=Math.max(T,Math.min(S,n-M*x)),h=Math.max(T,Math.min(S,c+M*x))),_&&(s=Math.max(C,Math.min(A,o-O*_)),d=Math.max(C,Math.min(A,f+O*_)))}h<i&&(x*=-1,t=n,n=c,c=t,t=i,i=h,h=t,m in fi&&F.attr("cursor",hi[m=fi[m]])),d<s&&(_*=-1,t=o,o=f,f=t,t=s,s=d,d=t,m in di&&F.attr("cursor",hi[m=di[m]])),k.selection&&(E=k.selection),y&&(i=E[0][0],h=E[1][0]),g&&(s=E[0][1],d=E[1][1]),E[0][0]===i&&E[0][1]===s&&E[1][0]===h&&E[1][1]===d||(k.selection=[[i,s],[h,d]],u.call(v),I.brush())}function z(){if(Jr(),ce.touches){if(ce.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else Ce(ce.view,p),P.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);R.attr("pointer-events","all"),F.attr("cursor",hi.overlay),k.selection&&(E=k.selection),_i(E)&&(k.selection=null,u.call(v)),I.end()}function U(){switch(ce.keyCode){case 16:B=x&&_;break;case 18:b===ri&&(x&&(c=h-M*x,n=i+M*x),_&&(f=d-O*_,o=s+O*_),b=ii,Y());break;case 32:b!==ri&&b!==ii||(x<0?c=h-M:x>0&&(n=i-M),_<0?f=d-O:_>0&&(o=s-O),b=ni,F.attr("cursor",hi.selection),Y());break;default:return}ti()}function $(){switch(ce.keyCode){case 16:B&&(y=g=B=!1,Y());break;case 18:b===ii&&(x<0?c=h:x>0&&(n=i),_<0?f=d:_>0&&(o=s),b=ri,Y());break;case 32:b===ni&&(ce.altKey?(x&&(c=h-M*x,n=i+M*x),_&&(f=d-O*_,o=s+O*_),b=ii):(x<0?c=h:x>0&&(n=i),_<0?f=d:_>0&&(o=s),b=ri),F.attr("cursor",hi[m]),Y());break;default:return}ti()}}function d(){l(this,arguments).moved()}function p(){l(this,arguments).ended()}function y(){var e=this.__brush||{selection:null};return e.extent=oi(n.apply(this,arguments)),e.dim=t,e}return c.move=function(e,n){e.selection?e.on("start.brush",(function(){l(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){l(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=l(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=An(a,o);function c(t){r.selection=1===t&&null===o?null:s(t),u.call(e),i.brush()}return null!==a&&null!==o?c:c(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,a=t.input("function"==typeof n?n.apply(e,r):n,i.extent),o=l(e,r).beforestart();or(e),i.selection=null===a?null:a,u.call(e),o.start().brush().end()}))},c.clear=function(t){c.move(t,null)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){pe(new Kr(c,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},c.extent=function(t){return arguments.length?(n="function"==typeof t?t:Qr(oi(t)),c):n},c.filter=function(t){return arguments.length?(r="function"==typeof t?t:Qr(!!t),c):r},c.touchable=function(t){return arguments.length?(i="function"==typeof t?t:Qr(!!t),c):i},c.handleSize=function(t){return arguments.length?(s=+t,c):s},c.keyModifiers=function(t){return arguments.length?(a=!!t,c):a},c.on=function(){var t=o.on.apply(o,arguments);return t===o?c:t},c}var Si=Math.cos,Ai=Math.sin,Mi=Math.PI,Oi=Mi/2,Bi=2*Mi,Ni=Math.max;function Di(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}var Li=function(){var t=0,e=null,n=null,r=null;function i(i){var a,o,s,c,u,l,h=i.length,f=[],d=k(h),p=[],y=[],g=y.groups=new Array(h),v=new Array(h*h);for(a=0,u=-1;++u<h;){for(o=0,l=-1;++l<h;)o+=i[u][l];f.push(o),p.push(k(h)),a+=o}for(e&&d.sort((function(t,n){return e(f[t],f[n])})),n&&p.forEach((function(t,e){t.sort((function(t,r){return n(i[e][t],i[e][r])}))})),c=(a=Ni(0,Bi-t*h)/a)?t:Bi/h,o=0,u=-1;++u<h;){for(s=o,l=-1;++l<h;){var m=d[u],b=p[m][l],x=i[m][b],_=o,w=o+=x*a;v[b*h+m]={index:m,subindex:b,startAngle:_,endAngle:w,value:x}}g[m]={index:m,startAngle:s,endAngle:o,value:f[m]},o+=c}for(u=-1;++u<h;)for(l=u-1;++l<h;){var E=v[l*h+u],T=v[u*h+l];(E.value||T.value)&&y.push(E.value<T.value?{source:T,target:E}:{source:E,target:T})}return r?y.sort(r):y}return i.padAngle=function(e){return arguments.length?(t=Ni(0,e),i):t},i.sortGroups=function(t){return arguments.length?(e=t,i):e},i.sortSubgroups=function(t){return arguments.length?(n=t,i):n},i.sortChords=function(t){return arguments.length?(null==t?r=null:(r=Di(t))._=t,i):r&&r._},i},Ii=Array.prototype.slice,Ri=function(t){return function(){return t}},Fi=Math.PI,Pi=2*Fi,ji=Pi-1e-6;function Yi(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function zi(){return new Yi}Yi.prototype=zi.prototype={constructor:Yi,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,c=r-e,u=a-t,l=o-e,h=u*u+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(l*s-c*u)>1e-6&&i){var f=n-a,d=r-o,p=s*s+c*c,y=f*f+d*d,g=Math.sqrt(p),v=Math.sqrt(h),m=i*Math.tan((Fi-Math.acos((p+h-y)/(2*g*v)))/2),b=m/v,x=m/g;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*u)+","+(e+b*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>u*d)+","+(this._x1=t+x*s)+","+(this._y1=e+x*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),c=t+o,u=e+s,l=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+u:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-u)>1e-6)&&(this._+="L"+c+","+u),n&&(h<0&&(h=h%Pi+Pi),h>ji?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=c)+","+(this._y1=u):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Fi)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Ui=zi;function $i(t){return t.source}function qi(t){return t.target}function Wi(t){return t.radius}function Vi(t){return t.startAngle}function Hi(t){return t.endAngle}var Gi=function(){var t=$i,e=qi,n=Wi,r=Vi,i=Hi,a=null;function o(){var o,s=Ii.call(arguments),c=t.apply(this,s),u=e.apply(this,s),l=+n.apply(this,(s[0]=c,s)),h=r.apply(this,s)-Oi,f=i.apply(this,s)-Oi,d=l*Si(h),p=l*Ai(h),y=+n.apply(this,(s[0]=u,s)),g=r.apply(this,s)-Oi,v=i.apply(this,s)-Oi;if(a||(a=o=Ui()),a.moveTo(d,p),a.arc(0,0,l,h,f),h===g&&f===v||(a.quadraticCurveTo(0,0,y*Si(g),y*Ai(g)),a.arc(0,0,y,g,v)),a.quadraticCurveTo(0,0,d,p),a.closePath(),o)return a=null,o+""||null}return o.radius=function(t){return arguments.length?(n="function"==typeof t?t:Ri(+t),o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Ri(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ri(+t),o):i},o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(t){return arguments.length?(e=t,o):e},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o};function Xi(){}function Zi(t,e){var n=new Xi;if(t instanceof Xi)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}Xi.prototype=Zi.prototype={constructor:Xi,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var Qi=Zi,Ki=function(){var t,e,n,r=[],i=[];function a(n,i,o,s){if(i>=r.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var c,u,l,h=-1,f=n.length,d=r[i++],p=Qi(),y=o();++h<f;)(l=p.get(c=d(u=n[h])+""))?l.push(u):p.set(c,[u]);return p.each((function(t,e){s(y,e,a(t,i,o,s))})),y}return n={object:function(t){return a(t,0,Ji,ta)},map:function(t){return a(t,0,ea,na)},entries:function(t){return function t(n,a){if(++a>r.length)return n;var o,s=i[a-1];return null!=e&&a>=r.length?o=n.entries():(o=[],n.each((function(e,n){o.push({key:n,values:t(e,a)})}))),null!=s?o.sort((function(t,e){return s(t.key,e.key)})):o}(a(t,0,ea,na),0)},key:function(t){return r.push(t),n},sortKeys:function(t){return i[r.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}};function Ji(){return{}}function ta(t,e,n){t[e]=n}function ea(){return Qi()}function na(t,e,n){t.set(e,n)}function ra(){}var ia=Qi.prototype;function aa(t,e){var n=new ra;if(t instanceof ra)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}ra.prototype=aa.prototype={constructor:ra,has:ia.has,add:function(t){return this["$"+(t+="")]=t,this},remove:ia.remove,clear:ia.clear,values:ia.keys,size:ia.size,empty:ia.empty,each:ia.each};var oa=aa,sa=function(t){var e=[];for(var n in t)e.push(n);return e},ca=function(t){var e=[];for(var n in t)e.push(t[n]);return e},ua=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},la=Math.PI/180,ha=180/Math.PI;function fa(t){if(t instanceof ya)return new ya(t.l,t.a,t.b,t.opacity);if(t instanceof wa)return Ea(t);t instanceof Ge||(t=Ve(t));var e,n,r=ba(t.r),i=ba(t.g),a=ba(t.b),o=ga((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=ga((.4360747*r+.3850649*i+.1430804*a)/.96422),n=ga((.0139322*r+.0971045*i+.7141733*a)/.82521)),new ya(116*o-16,500*(e-o),200*(o-n),t.opacity)}function da(t,e){return new ya(t,0,0,null==e?1:e)}function pa(t,e,n,r){return 1===arguments.length?fa(t):new ya(t,e,n,null==r?1:r)}function ya(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function ga(t){return t>6/29*(6/29)*(6/29)?Math.pow(t,1/3):t/(6/29*3*(6/29))+4/29}function va(t){return t>6/29?t*t*t:6/29*3*(6/29)*(t-4/29)}function ma(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ba(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function xa(t){if(t instanceof wa)return new wa(t.h,t.c,t.l,t.opacity);if(t instanceof ya||(t=fa(t)),0===t.a&&0===t.b)return new wa(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*ha;return new wa(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function _a(t,e,n,r){return 1===arguments.length?xa(t):new wa(n,e,t,null==r?1:r)}function ka(t,e,n,r){return 1===arguments.length?xa(t):new wa(t,e,n,null==r?1:r)}function wa(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Ea(t){if(isNaN(t.h))return new ya(t.l,0,0,t.opacity);var e=t.h*la;return new ya(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Se(ya,pa,Ae(Me,{brighter:function(t){return new ya(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new ya(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Ge(ma(3.1338561*(e=.96422*va(e))-1.6168667*(t=1*va(t))-.4906146*(n=.82521*va(n))),ma(-.9787684*e+1.9161415*t+.033454*n),ma(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Se(wa,ka,Ae(Me,{brighter:function(t){return new wa(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new wa(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Ea(this).rgb()}}));var Ta=-.29227,Ca=-1.7884503806,Sa=3.5172982438,Aa=-.6557636667999999;function Ma(t){if(t instanceof Ba)return new Ba(t.h,t.s,t.l,t.opacity);t instanceof Ge||(t=Ve(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Aa*r+Ca*e-Sa*n)/(Aa+Ca-Sa),a=r-i,o=(1.97294*(n-i)-Ta*a)/-.90649,s=Math.sqrt(o*o+a*a)/(1.97294*i*(1-i)),c=s?Math.atan2(o,a)*ha-120:NaN;return new Ba(c<0?c+360:c,s,i,t.opacity)}function Oa(t,e,n,r){return 1===arguments.length?Ma(t):new Ba(t,e,n,null==r?1:r)}function Ba(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Se(Ba,Oa,Ae(Me,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ba(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Ba(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*la,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Ge(255*(e+n*(-.14861*r+1.78277*i)),255*(e+n*(Ta*r+-.90649*i)),255*(e+n*(1.97294*r)),this.opacity)}}));var Na=Array.prototype.slice,Da=function(t,e){return t-e},La=function(t){return function(){return t}},Ia=function(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=Ra(t,e[r]))return n;return 0};function Ra(t,e){for(var n=e[0],r=e[1],i=-1,a=0,o=t.length,s=o-1;a<o;s=a++){var c=t[a],u=c[0],l=c[1],h=t[s],f=h[0],d=h[1];if(Fa(c,h,e))return 0;l>r!=d>r&&n<(f-u)*(r-l)/(d-l)+u&&(i=-i)}return i}function Fa(t,e,n){var r,i,a,o;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],a=n[r],o=e[r],i<=a&&a<=o||o<=a&&a<=i)}var Pa=function(){},ja=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]],Ya=function(){var t=1,e=1,n=M,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Da);else{var r=g(t),i=r[0],o=r[1];e=A(i,o,e),e=k(Math.floor(i/e)*e,Math.floor(o/e)*e,e)}return e.map((function(e){return a(t,e)}))}function a(n,i){var a=[],s=[];return function(n,r,i){var a,s,c,u,l,h,f=new Array,d=new Array;a=s=-1,u=n[0]>=r,ja[u<<1].forEach(p);for(;++a<t-1;)c=u,u=n[a+1]>=r,ja[c|u<<1].forEach(p);ja[u<<0].forEach(p);for(;++s<e-1;){for(a=-1,u=n[s*t+t]>=r,l=n[s*t]>=r,ja[u<<1|l<<2].forEach(p);++a<t-1;)c=u,u=n[s*t+t+a+1]>=r,h=l,l=n[s*t+a+1]>=r,ja[c|u<<1|l<<2|h<<3].forEach(p);ja[u|l<<3].forEach(p)}a=-1,l=n[s*t]>=r,ja[l<<2].forEach(p);for(;++a<t-1;)h=l,l=n[s*t+a+1]>=r,ja[l<<2|h<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+a,t[0][1]+s],c=[t[1][0]+a,t[1][1]+s],u=o(r),l=o(c);(e=d[u])?(n=f[l])?(delete d[e.end],delete f[n.start],e===n?(e.ring.push(c),i(e.ring)):f[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete d[e.end],e.ring.push(c),d[e.end=l]=e):(e=f[l])?(n=d[u])?(delete f[e.start],delete d[n.end],e===n?(e.ring.push(c),i(e.ring)):f[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete f[e.start],e.ring.unshift(r),f[e.start=u]=e):f[u]=d[l]={start:u,end:l,ring:[r,c]}}ja[l<<3].forEach(p)}(n,i,(function(t){r(t,n,i),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?a.push([t]):s.push(t)})),s.forEach((function(t){for(var e,n=0,r=a.length;n<r;++n)if(-1!==Ia((e=a[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:i,coordinates:a}}function o(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,i){n.forEach((function(n){var a,o=n[0],s=n[1],c=0|o,u=0|s,l=r[u*t+c];o>0&&o<t&&c===o&&(a=r[u*t+c-1],n[0]=o+(i-a)/(l-a)-.5),s>0&&s<e&&u===s&&(a=r[(u-1)*t+c],n[1]=s+(i-a)/(l-a)-.5)}))}return i.contour=a,i.size=function(n){if(!arguments.length)return[t,e];var r=Math.ceil(n[0]),a=Math.ceil(n[1]);if(!(r>0&&a>0))throw new Error("invalid size");return t=r,e=a,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?La(Na.call(t)):La(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:Pa,i):r===s},i};function za(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<i;++o)for(var s=0,c=0;s<r+n;++s)s<r&&(c+=t.data[s+o*r]),s>=n&&(s>=a&&(c-=t.data[s-a+o*r]),e.data[s-n+o*r]=c/Math.min(s+1,r-1+a-s,a))}function Ua(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<r;++o)for(var s=0,c=0;s<i+n;++s)s<i&&(c+=t.data[o+s*r]),s>=n&&(s>=a&&(c-=t.data[o+(s-a)*r]),e.data[o+(s-n)*r]=c/Math.min(s+1,i-1+a-s,a))}function $a(t){return t[0]}function qa(t){return t[1]}function Wa(){return 1}var Va=function(){var t=$a,e=qa,n=Wa,r=960,i=500,a=20,o=2,s=3*a,c=r+2*s>>o,u=i+2*s>>o,l=La(20);function h(r){var i=new Float32Array(c*u),h=new Float32Array(c*u);r.forEach((function(r,a,l){var h=+t(r,a,l)+s>>o,f=+e(r,a,l)+s>>o,d=+n(r,a,l);h>=0&&h<c&&f>=0&&f<u&&(i[h+f*c]+=d)})),za({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),Ua({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o),za({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),Ua({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o),za({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),Ua({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o);var d=l(i);if(!Array.isArray(d)){var p=L(i);d=A(0,p,d),(d=k(0,Math.floor(p/d)*d,d)).shift()}return Ya().thresholds(d).size([c,u])(i).map(f)}function f(t){return t.value*=Math.pow(2,-2*o),t.coordinates.forEach(d),t}function d(t){t.forEach(p)}function p(t){t.forEach(y)}function y(t){t[0]=t[0]*Math.pow(2,o)-s,t[1]=t[1]*Math.pow(2,o)-s}function g(){return c=r+2*(s=3*a)>>o,u=i+2*s>>o,h}return h.x=function(e){return arguments.length?(t="function"==typeof e?e:La(+e),h):t},h.y=function(t){return arguments.length?(e="function"==typeof t?t:La(+t),h):e},h.weight=function(t){return arguments.length?(n="function"==typeof t?t:La(+t),h):n},h.size=function(t){if(!arguments.length)return[r,i];var e=Math.ceil(t[0]),n=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return r=e,i=n,g()},h.cellSize=function(t){if(!arguments.length)return 1<<o;if(!((t=+t)>=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(t)/Math.LN2),g()},h.thresholds=function(t){return arguments.length?(l="function"==typeof t?t:Array.isArray(t)?La(Na.call(t)):La(t),h):l},h.bandwidth=function(t){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return a=Math.round((Math.sqrt(4*t*t+1)-1)/2),g()},h},Ha=function(t){return function(){return t}};function Ga(t,e,n,r,i,a,o,s,c,u){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=a,this.y=o,this.dx=s,this.dy=c,this._=u}function Xa(){return!ce.ctrlKey&&!ce.button}function Za(){return this.parentNode}function Qa(t){return null==t?{x:ce.x,y:ce.y}:t}function Ka(){return navigator.maxTouchPoints||"ontouchstart"in this}Ga.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Ja=function(){var t,e,n,r,i=Xa,a=Za,o=Qa,s=Ka,c={},u=lt("start","drag","end"),l=0,h=0;function f(t){t.on("mousedown.drag",d).filter(s).on("touchstart.drag",g).on("touchmove.drag",v).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(){if(!r&&i.apply(this,arguments)){var o=b("mouse",a.apply(this,arguments),Nn,this,arguments);o&&(ke(ce.view).on("mousemove.drag",p,!0).on("mouseup.drag",y,!0),Te(ce.view),we(),n=!1,t=ce.clientX,e=ce.clientY,o("start"))}}function p(){if(Ee(),!n){var r=ce.clientX-t,i=ce.clientY-e;n=r*r+i*i>h}c.mouse("drag")}function y(){ke(ce.view).on("mousemove.drag mouseup.drag",null),Ce(ce.view,n),Ee(),c.mouse("end")}function g(){if(i.apply(this,arguments)){var t,e,n=ce.changedTouches,r=a.apply(this,arguments),o=n.length;for(t=0;t<o;++t)(e=b(n[t].identifier,r,Bn,this,arguments))&&(we(),e("start"))}}function v(){var t,e,n=ce.changedTouches,r=n.length;for(t=0;t<r;++t)(e=c[n[t].identifier])&&(Ee(),e("drag"))}function m(){var t,e,n=ce.changedTouches,i=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(e=c[n[t].identifier])&&(we(),e("end"))}function b(t,e,n,r,i){var a,s,h,d=n(e,t),p=u.copy();if(pe(new Ga(f,"beforestart",a,t,l,d[0],d[1],0,0,p),(function(){return null!=(ce.subject=a=o.apply(r,i))&&(s=a.x-d[0]||0,h=a.y-d[1]||0,!0)})))return function o(u){var y,g=d;switch(u){case"start":c[t]=o,y=l++;break;case"end":delete c[t],--l;case"drag":d=n(e,t),y=l}pe(new Ga(f,u,a,t,y,d[0]+s,d[1]+h,d[0]-g[0],d[1]-g[1],p),p.apply,p,[u,r,i])}}return f.filter=function(t){return arguments.length?(i="function"==typeof t?t:Ha(!!t),f):i},f.container=function(t){return arguments.length?(a="function"==typeof t?t:Ha(t),f):a},f.subject=function(t){return arguments.length?(o="function"==typeof t?t:Ha(t),f):o},f.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Ha(!!t),f):s},f.on=function(){var t=u.on.apply(u,arguments);return t===u?f:t},f.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,f):Math.sqrt(h)},f},to={},eo={};function no(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function ro(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function io(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function ao(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+io(-e,6):e>9999?"+"+io(e,6):io(e,4))+"-"+io(t.getUTCMonth()+1,2)+"-"+io(t.getUTCDate(),2)+(a?"T"+io(n,2)+":"+io(r,2)+":"+io(i,2)+"."+io(a,3)+"Z":i?"T"+io(n,2)+":"+io(r,2)+":"+io(i,2)+"Z":r||n?"T"+io(n,2)+":"+io(r,2)+"Z":"")}var oo=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,s=0,c=a<=0,u=!1;function l(){if(c)return eo;if(u)return u=!1,to;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?c=!0:10===(r=t.charCodeAt(o++))?u=!0:13===r&&(u=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))u=!0;else if(13===r)u=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return c=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=l())!==eo;){for(var h=[];r!==to&&r!==eo;)h.push(r),r=l();e&&null==(h=e(h,s++))||i.push(h)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?ao(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=no(t);return function(r,i){return e(n(r),i,t)}}(t,e):no(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=ro(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=ro(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}},so=oo(","),co=so.parse,uo=so.parseRows,lo=so.format,ho=so.formatBody,fo=so.formatRows,po=so.formatRow,yo=so.formatValue,go=oo("\t"),vo=go.parse,mo=go.parseRows,bo=go.format,xo=go.formatBody,_o=go.formatRows,ko=go.formatRow,wo=go.formatValue;function Eo(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;To&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}var To=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function Co(t){return+t}function So(t){return t*t}function Ao(t){return t*(2-t)}function Mo(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var Oo=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),Bo=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),No=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Do=Math.PI,Lo=Do/2;function Io(t){return 1-Math.cos(t*Lo)}function Ro(t){return Math.sin(t*Lo)}function Fo(t){return(1-Math.cos(Do*t))/2}function Po(t){return Math.pow(2,10*t-10)}function jo(t){return 1-Math.pow(2,-10*t)}function Yo(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function zo(t){return 1-Math.sqrt(1-t*t)}function Uo(t){return Math.sqrt(1- --t*t)}function $o(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}function qo(t){return 1-Wo(1-t)}function Wo(t){return(t=+t)<4/11?7.5625*t*t:t<8/11?7.5625*(t-=6/11)*t+.75:t<10/11?7.5625*(t-=9/11)*t+.9375:7.5625*(t-=21/22)*t+63/64}function Vo(t){return((t*=2)<=1?1-Wo(1-t):Wo(t-1)+1)/2}var Ho=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),Go=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),Xo=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),Zo=2*Math.PI,Qo=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Zo);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Zo)},i.period=function(n){return t(e,n)},i}(1,.3),Ko=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Zo);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Zo)},i.period=function(n){return t(e,n)},i}(1,.3),Jo=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Zo);function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Zo)},i.period=function(n){return t(e,n)},i}(1,.3);function ts(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}var es=function(t,e){return fetch(t,e).then(ts)};function ns(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}var rs=function(t,e){return fetch(t,e).then(ns)};function is(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var as=function(t,e){return fetch(t,e).then(is)};function os(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),as(e,n).then((function(e){return t(e,r)}))}}function ss(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=oo(t);return as(e,n).then((function(t){return i.parse(t,r)}))}var cs=os(co),us=os(vo),ls=function(t,e){return new Promise((function(n,r){var i=new Image;for(var a in e)i[a]=e[a];i.onerror=r,i.onload=function(){n(i)},i.src=t}))};function hs(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}var fs=function(t,e){return fetch(t,e).then(hs)};function ds(t){return function(e,n){return as(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}var ps=ds("application/xml"),ys=ds("text/html"),gs=ds("image/svg+xml"),vs=function(t,e){var n;function r(){var r,i,a=n.length,o=0,s=0;for(r=0;r<a;++r)o+=(i=n[r]).x,s+=i.y;for(o=o/a-t,s=s/a-e,r=0;r<a;++r)(i=n[r]).x-=o,i.y-=s}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r},ms=function(t){return function(){return t}},bs=function(){return 1e-6*(Math.random()-.5)};function xs(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,s,c,u,l,h,f,d=t._root,p={data:r},y=t._x0,g=t._y0,v=t._x1,m=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((u=e>=(a=(y+v)/2))?y=a:v=a,(l=n>=(o=(g+m)/2))?g=o:m=o,i=d,!(d=d[h=l<<1|u]))return i[h]=p,t;if(s=+t._x.call(null,d.data),c=+t._y.call(null,d.data),e===s&&n===c)return p.next=d,i?i[h]=p:t._root=p,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(u=e>=(a=(y+v)/2))?y=a:v=a,(l=n>=(o=(g+m)/2))?g=o:m=o}while((h=l<<1|u)==(f=(c>=o)<<1|s>=a));return i[f]=d,i[h]=p,t}var _s=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function ks(t){return t[0]}function ws(t){return t[1]}function Es(t,e,n){var r=new Ts(null==e?ks:e,null==n?ws:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Ts(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Cs(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var Ss=Es.prototype=Ts.prototype;function As(t){return t.x+t.vx}function Ms(t){return t.y+t.vy}Ss.copy=function(){var t,e,n=new Ts(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=Cs(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Cs(e));return n},Ss.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return xs(this.cover(e,n),e,n,t)},Ss.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),s=new Array(a),c=1/0,u=1/0,l=-1/0,h=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(o[n]=r,s[n]=i,r<c&&(c=r),r>l&&(l=r),i<u&&(u=i),i>h&&(h=i));if(c>l||u>h)return this;for(this.cover(c,u).cover(l,h),n=0;n<a;++n)xs(this,o[n],s[n],t[n]);return this},Ss.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,c=i-n,u=this._root;n>t||t>=i||r>e||e>=a;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=u,u=o,c*=2,s){case 0:i=n+c,a=r+c;break;case 1:n=i-c,a=r+c;break;case 2:i=n+c,r=a-c;break;case 3:n=i-c,r=a-c}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},Ss.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},Ss.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Ss.find=function(t,e,n){var r,i,a,o,s,c,u,l=this._x0,h=this._y0,f=this._x1,d=this._y1,p=[],y=this._root;for(y&&p.push(new _s(y,l,h,f,d)),null==n?n=1/0:(l=t-n,h=e-n,f=t+n,d=e+n,n*=n);c=p.pop();)if(!(!(y=c.node)||(i=c.x0)>f||(a=c.y0)>d||(o=c.x1)<l||(s=c.y1)<h))if(y.length){var g=(i+o)/2,v=(a+s)/2;p.push(new _s(y[3],g,v,o,s),new _s(y[2],i,v,g,s),new _s(y[1],g,a,o,v),new _s(y[0],i,a,g,v)),(u=(e>=v)<<1|t>=g)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-u],p[p.length-1-u]=c)}else{var m=t-+this._x.call(null,y.data),b=e-+this._y.call(null,y.data),x=m*m+b*b;if(x<n){var _=Math.sqrt(n=x);l=t-_,h=e-_,f=t+_,d=e+_,r=y.data}}return r},Ss.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,s,c,u,l,h,f,d=this._root,p=this._x0,y=this._y0,g=this._x1,v=this._y1;if(!d)return this;if(d.length)for(;;){if((u=a>=(s=(p+g)/2))?p=s:g=s,(l=o>=(c=(y+v)/2))?y=c:v=c,e=d,!(d=d[h=l<<1|u]))return this;if(!d.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,f=h)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[h]=i:delete e[h],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[f]=d:this._root=d),this):(this._root=i,this)},Ss.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},Ss.root=function(){return this._root},Ss.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},Ss.visit=function(t){var e,n,r,i,a,o,s=[],c=this._root;for(c&&s.push(new _s(c,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(c=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&c.length){var u=(r+a)/2,l=(i+o)/2;(n=c[3])&&s.push(new _s(n,u,l,a,o)),(n=c[2])&&s.push(new _s(n,r,l,u,o)),(n=c[1])&&s.push(new _s(n,u,i,a,l)),(n=c[0])&&s.push(new _s(n,r,i,u,l))}return this},Ss.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new _s(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,s=e.y0,c=e.x1,u=e.y1,l=(o+c)/2,h=(s+u)/2;(a=i[0])&&n.push(new _s(a,o,s,l,h)),(a=i[1])&&n.push(new _s(a,l,s,c,h)),(a=i[2])&&n.push(new _s(a,o,h,l,u)),(a=i[3])&&n.push(new _s(a,l,h,c,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},Ss.x=function(t){return arguments.length?(this._x=t,this):this._x},Ss.y=function(t){return arguments.length?(this._y=t,this):this._y};var Os=function(t){var e,n,r=1,i=1;function a(){for(var t,a,s,c,u,l,h,f=e.length,d=0;d<i;++d)for(a=Es(e,As,Ms).visitAfter(o),t=0;t<f;++t)s=e[t],l=n[s.index],h=l*l,c=s.x+s.vx,u=s.y+s.vy,a.visit(p);function p(t,e,n,i,a){var o=t.data,f=t.r,d=l+f;if(!o)return e>c+d||i<c-d||n>u+d||a<u-d;if(o.index>s.index){var p=c-o.x-o.vx,y=u-o.y-o.vy,g=p*p+y*y;g<d*d&&(0===p&&(g+=(p=bs())*p),0===y&&(g+=(y=bs())*y),g=(d-(g=Math.sqrt(g)))/g*r,s.vx+=(p*=g)*(d=(f*=f)/(h+f)),s.vy+=(y*=g)*d,o.vx-=p*(d=1-d),o.vy-=y*d)}}}function o(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function s(){if(e){var r,i,a=e.length;for(n=new Array(a),r=0;r<a;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=ms(null==t?1:+t)),a.initialize=function(t){e=t,s()},a.iterations=function(t){return arguments.length?(i=+t,a):i},a.strength=function(t){return arguments.length?(r=+t,a):r},a.radius=function(e){return arguments.length?(t="function"==typeof e?e:ms(+e),s(),a):t},a};function Bs(t){return t.index}function Ns(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}var Ds=function(t){var e,n,r,i,a,o=Bs,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},c=ms(30),u=1;function l(r){for(var i=0,o=t.length;i<u;++i)for(var s,c,l,h,f,d,p,y=0;y<o;++y)c=(s=t[y]).source,h=(l=s.target).x+l.vx-c.x-c.vx||bs(),f=l.y+l.vy-c.y-c.vy||bs(),h*=d=((d=Math.sqrt(h*h+f*f))-n[y])/d*r*e[y],f*=d,l.vx-=h*(p=a[y]),l.vy-=f*p,c.vx+=h*(p=1-p),c.vy+=f*p}function h(){if(r){var s,c,u=r.length,l=t.length,h=Qi(r,o);for(s=0,i=new Array(u);s<l;++s)(c=t[s]).index=s,"object"!=typeof c.source&&(c.source=Ns(h,c.source)),"object"!=typeof c.target&&(c.target=Ns(h,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(s=0,a=new Array(l);s<l;++s)c=t[s],a[s]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);e=new Array(l),f(),n=new Array(l),d()}}function f(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+s(t[n],n,t)}function d(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+c(t[e],e,t)}return null==t&&(t=[]),l.initialize=function(t){r=t,h()},l.links=function(e){return arguments.length?(t=e,h(),l):t},l.id=function(t){return arguments.length?(o=t,l):o},l.iterations=function(t){return arguments.length?(u=+t,l):u},l.strength=function(t){return arguments.length?(s="function"==typeof t?t:ms(+t),f(),l):s},l.distance=function(t){return arguments.length?(c="function"==typeof t?t:ms(+t),d(),l):c},l};function Ls(t){return t.x}function Is(t){return t.y}var Rs=Math.PI*(3-Math.sqrt(5)),Fs=function(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=Qi(),c=qn(l),u=lt("tick","end");function l(){h(),u.call("tick",e),n<r&&(c.stop(),u.call("end",e))}function h(r){var c,u,l=t.length;void 0===r&&(r=1);for(var h=0;h<r;++h)for(n+=(a-n)*i,s.each((function(t){t(n)})),c=0;c<l;++c)null==(u=t[c]).fx?u.x+=u.vx*=o:(u.x=u.fx,u.vx=0),null==u.fy?u.y+=u.vy*=o:(u.y=u.fy,u.vy=0);return e}function f(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(n),a=n*Rs;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function d(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),f(),e={tick:h,restart:function(){return c.restart(l),e},stop:function(){return c.stop(),e},nodes:function(n){return arguments.length?(t=n,f(),s.each(d),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(a=+t,e):a},velocityDecay:function(t){return arguments.length?(o=1-t,e):1-o},force:function(t,n){return arguments.length>1?(null==n?s.remove(t):s.set(t,d(n)),e):s.get(t)},find:function(e,n,r){var i,a,o,s,c,u=0,l=t.length;for(null==r?r=1/0:r*=r,u=0;u<l;++u)(o=(i=e-(s=t[u]).x)*i+(a=n-s.y)*a)<r&&(c=s,r=o);return c},on:function(t,n){return arguments.length>1?(u.on(t,n),e):u.on(t)}}},Ps=function(){var t,e,n,r,i=ms(-30),a=1,o=1/0,s=.81;function c(r){var i,a=t.length,o=Es(t,Ls,Is).visitAfter(l);for(n=r,i=0;i<a;++i)e=t[i],o.visit(h)}function u(){if(t){var e,n,a=t.length;for(r=new Array(a),e=0;e<a;++e)n=t[e],r[n.index]=+i(n,e,t)}}function l(t){var e,n,i,a,o,s=0,c=0;if(t.length){for(i=a=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(s+=e.value,c+=n,i+=n*e.x,a+=n*e.y);t.x=i/c,t.y=a/c}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=r[e.data.index]}while(e=e.next)}t.value=s}function h(t,i,c,u){if(!t.value)return!0;var l=t.x-e.x,h=t.y-e.y,f=u-i,d=l*l+h*h;if(f*f/s<d)return d<o&&(0===l&&(d+=(l=bs())*l),0===h&&(d+=(h=bs())*h),d<a&&(d=Math.sqrt(a*d)),e.vx+=l*t.value*n/d,e.vy+=h*t.value*n/d),!0;if(!(t.length||d>=o)){(t.data!==e||t.next)&&(0===l&&(d+=(l=bs())*l),0===h&&(d+=(h=bs())*h),d<a&&(d=Math.sqrt(a*d)));do{t.data!==e&&(f=r[t.data.index]*n/d,e.vx+=l*f,e.vy+=h*f)}while(t=t.next)}}return c.initialize=function(e){t=e,u()},c.strength=function(t){return arguments.length?(i="function"==typeof t?t:ms(+t),u(),c):i},c.distanceMin=function(t){return arguments.length?(a=t*t,c):Math.sqrt(a)},c.distanceMax=function(t){return arguments.length?(o=t*t,c):Math.sqrt(o)},c.theta=function(t){return arguments.length?(s=t*t,c):Math.sqrt(s)},c},js=function(t,e,n){var r,i,a,o=ms(.1);function s(t){for(var o=0,s=r.length;o<s;++o){var c=r[o],u=c.x-e||1e-6,l=c.y-n||1e-6,h=Math.sqrt(u*u+l*l),f=(a[o]-h)*i[o]*t/h;c.vx+=u*f,c.vy+=l*f}}function c(){if(r){var e,n=r.length;for(i=new Array(n),a=new Array(n),e=0;e<n;++e)a[e]=+t(r[e],e,r),i[e]=isNaN(a[e])?0:+o(r[e],e,r)}}return"function"!=typeof t&&(t=ms(+t)),null==e&&(e=0),null==n&&(n=0),s.initialize=function(t){r=t,c()},s.strength=function(t){return arguments.length?(o="function"==typeof t?t:ms(+t),c(),s):o},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:ms(+e),c(),s):t},s.x=function(t){return arguments.length?(e=+t,s):e},s.y=function(t){return arguments.length?(n=+t,s):n},s},Ys=function(t){var e,n,r,i=ms(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vx+=(r[a]-i.x)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=ms(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:ms(+t),o(),a):i},a.x=function(e){return arguments.length?(t="function"==typeof e?e:ms(+e),o(),a):t},a},zs=function(t){var e,n,r,i=ms(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vy+=(r[a]-i.y)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=ms(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:ms(+t),o(),a):i},a.y=function(e){return arguments.length?(t="function"==typeof e?e:ms(+e),o(),a):t},a},Us=function(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]},$s=function(t){return(t=Us(Math.abs(t)))?t[1]:NaN},qs=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ws(t){if(!(e=qs.exec(t)))throw new Error("invalid format: "+t);var e;return new Vs({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Vs(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}Ws.prototype=Vs.prototype,Vs.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Hs,Gs,Xs,Zs,Qs=function(t,e){var n=Us(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},Ks={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Qs(100*t,e)},r:Qs,s:function(t,e){var n=Us(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Hs=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Us(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Js=function(t){return t},tc=Array.prototype.map,ec=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],nc=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Js:(e=tc.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(t.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Js:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(tc.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Ws(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,y=t.comma,g=t.precision,v=t.trim,m=t.type;"n"===m?(y=!0,m="g"):Ks[m]||(void 0===g&&(g=12),v=!0,m="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var b="$"===f?i:"#"===f&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",x="$"===f?a:/[%p]/.test(m)?c:"",_=Ks[m],k=/[defgprs%]/.test(m);function w(t){var i,a,c,f=b,w=x;if("c"===m)w=_(t)+w,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?l:_(Math.abs(t),g),v&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),E&&0==+t&&(E=!1),f=(E?"("===h?h:u:"-"===h||"("===h?"":h)+f,w=("s"===m?ec[8+Hs/3]:"")+w+(E&&"("===h?")":""),k)for(i=-1,a=t.length;++i<a;)if(48>(c=t.charCodeAt(i))||c>57){w=(46===c?o+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}y&&!d&&(t=r(t,1/0));var T=f.length+t.length+w.length,C=T<p?new Array(p-T+1).join(e):"";switch(y&&d&&(t=r(C+t,C.length?p-w.length:1/0),C=""),n){case"<":t=f+t+w+C;break;case"=":t=f+C+t+w;break;case"^":t=C.slice(0,T=C.length>>1)+f+t+w+C.slice(T);break;default:t=C+f+t+w}return s(t)}return g=void 0===g?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,g)):Math.max(0,Math.min(20,g)),w.toString=function(){return t+""},w}return{format:h,formatPrefix:function(t,e){var n=h(((t=Ws(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor($s(e)/3))),i=Math.pow(10,-r),a=ec[8+r/3];return function(t){return n(i*t)+a}}}};function rc(t){return Gs=nc(t),Xs=Gs.format,Zs=Gs.formatPrefix,Gs}rc({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var ic=function(t){return Math.max(0,-$s(Math.abs(t)))},ac=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor($s(e)/3)))-$s(Math.abs(t)))},oc=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,$s(e)-$s(t))+1},sc=function(){return new cc};function cc(){this.reset()}cc.prototype={constructor:cc,reset:function(){this.s=this.t=0},add:function(t){lc(uc,t,this.t),lc(this,uc.s,this.s),this.s?this.t+=uc.t:this.s=uc.t},valueOf:function(){return this.s}};var uc=new cc;function lc(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var hc=Math.PI,fc=hc/2,dc=hc/4,pc=2*hc,yc=180/hc,gc=hc/180,vc=Math.abs,mc=Math.atan,bc=Math.atan2,xc=Math.cos,_c=Math.ceil,kc=Math.exp,wc=(Math.floor,Math.log),Ec=Math.pow,Tc=Math.sin,Cc=Math.sign||function(t){return t>0?1:t<0?-1:0},Sc=Math.sqrt,Ac=Math.tan;function Mc(t){return t>1?0:t<-1?hc:Math.acos(t)}function Oc(t){return t>1?fc:t<-1?-fc:Math.asin(t)}function Bc(t){return(t=Tc(t/2))*t}function Nc(){}function Dc(t,e){t&&Ic.hasOwnProperty(t.type)&&Ic[t.type](t,e)}var Lc={Feature:function(t,e){Dc(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Dc(n[r].geometry,e)}},Ic={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Rc(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Rc(n[r],e,0)},Polygon:function(t,e){Fc(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Fc(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Dc(n[r],e)}};function Rc(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function Fc(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Rc(t[n],e,1);e.polygonEnd()}var Pc,jc,Yc,zc,Uc,$c=function(t,e){t&&Lc.hasOwnProperty(t.type)?Lc[t.type](t,e):Dc(t,e)},qc=sc(),Wc=sc(),Vc={point:Nc,lineStart:Nc,lineEnd:Nc,polygonStart:function(){qc.reset(),Vc.lineStart=Hc,Vc.lineEnd=Gc},polygonEnd:function(){var t=+qc;Wc.add(t<0?pc+t:t),this.lineStart=this.lineEnd=this.point=Nc},sphere:function(){Wc.add(pc)}};function Hc(){Vc.point=Xc}function Gc(){Zc(Pc,jc)}function Xc(t,e){Vc.point=Zc,Pc=t,jc=e,Yc=t*=gc,zc=xc(e=(e*=gc)/2+dc),Uc=Tc(e)}function Zc(t,e){var n=(t*=gc)-Yc,r=n>=0?1:-1,i=r*n,a=xc(e=(e*=gc)/2+dc),o=Tc(e),s=Uc*o,c=zc*a+s*xc(i),u=s*r*Tc(i);qc.add(bc(u,c)),Yc=t,zc=a,Uc=o}var Qc=function(t){return Wc.reset(),$c(t,Vc),2*Wc};function Kc(t){return[bc(t[1],t[0]),Oc(t[2])]}function Jc(t){var e=t[0],n=t[1],r=xc(n);return[r*xc(e),r*Tc(e),Tc(n)]}function tu(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function eu(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function nu(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function ru(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function iu(t){var e=Sc(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var au,ou,su,cu,uu,lu,hu,fu,du,pu,yu=sc(),gu={point:vu,lineStart:bu,lineEnd:xu,polygonStart:function(){gu.point=_u,gu.lineStart=ku,gu.lineEnd=wu,yu.reset(),Vc.polygonStart()},polygonEnd:function(){Vc.polygonEnd(),gu.point=vu,gu.lineStart=bu,gu.lineEnd=xu,qc<0?(au=-(su=180),ou=-(cu=90)):yu>1e-6?cu=90:yu<-1e-6&&(ou=-90),pu[0]=au,pu[1]=su},sphere:function(){au=-(su=180),ou=-(cu=90)}};function vu(t,e){du.push(pu=[au=t,su=t]),e<ou&&(ou=e),e>cu&&(cu=e)}function mu(t,e){var n=Jc([t*gc,e*gc]);if(fu){var r=eu(fu,n),i=eu([r[1],-r[0],0],r);iu(i),i=Kc(i);var a,o=t-uu,s=o>0?1:-1,c=i[0]*yc*s,u=vc(o)>180;u^(s*uu<c&&c<s*t)?(a=i[1]*yc)>cu&&(cu=a):u^(s*uu<(c=(c+360)%360-180)&&c<s*t)?(a=-i[1]*yc)<ou&&(ou=a):(e<ou&&(ou=e),e>cu&&(cu=e)),u?t<uu?Eu(au,t)>Eu(au,su)&&(su=t):Eu(t,su)>Eu(au,su)&&(au=t):su>=au?(t<au&&(au=t),t>su&&(su=t)):t>uu?Eu(au,t)>Eu(au,su)&&(su=t):Eu(t,su)>Eu(au,su)&&(au=t)}else du.push(pu=[au=t,su=t]);e<ou&&(ou=e),e>cu&&(cu=e),fu=n,uu=t}function bu(){gu.point=mu}function xu(){pu[0]=au,pu[1]=su,gu.point=vu,fu=null}function _u(t,e){if(fu){var n=t-uu;yu.add(vc(n)>180?n+(n>0?360:-360):n)}else lu=t,hu=e;Vc.point(t,e),mu(t,e)}function ku(){Vc.lineStart()}function wu(){_u(lu,hu),Vc.lineEnd(),vc(yu)>1e-6&&(au=-(su=180)),pu[0]=au,pu[1]=su,fu=null}function Eu(t,e){return(e-=t)<0?e+360:e}function Tu(t,e){return t[0]-e[0]}function Cu(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var Su,Au,Mu,Ou,Bu,Nu,Du,Lu,Iu,Ru,Fu,Pu,ju,Yu,zu,Uu,$u=function(t){var e,n,r,i,a,o,s;if(cu=su=-(au=ou=1/0),du=[],$c(t,gu),n=du.length){for(du.sort(Tu),e=1,a=[r=du[0]];e<n;++e)Cu(r,(i=du[e])[0])||Cu(r,i[1])?(Eu(r[0],i[1])>Eu(r[0],r[1])&&(r[1]=i[1]),Eu(i[0],r[1])>Eu(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,e=0,r=a[n=a.length-1];e<=n;r=i,++e)i=a[e],(s=Eu(r[1],i[0]))>o&&(o=s,au=i[0],su=r[1])}return du=pu=null,au===1/0||ou===1/0?[[NaN,NaN],[NaN,NaN]]:[[au,ou],[su,cu]]},qu={sphere:Nc,point:Wu,lineStart:Hu,lineEnd:Zu,polygonStart:function(){qu.lineStart=Qu,qu.lineEnd=Ku},polygonEnd:function(){qu.lineStart=Hu,qu.lineEnd=Zu}};function Wu(t,e){t*=gc;var n=xc(e*=gc);Vu(n*xc(t),n*Tc(t),Tc(e))}function Vu(t,e,n){++Su,Mu+=(t-Mu)/Su,Ou+=(e-Ou)/Su,Bu+=(n-Bu)/Su}function Hu(){qu.point=Gu}function Gu(t,e){t*=gc;var n=xc(e*=gc);Yu=n*xc(t),zu=n*Tc(t),Uu=Tc(e),qu.point=Xu,Vu(Yu,zu,Uu)}function Xu(t,e){t*=gc;var n=xc(e*=gc),r=n*xc(t),i=n*Tc(t),a=Tc(e),o=bc(Sc((o=zu*a-Uu*i)*o+(o=Uu*r-Yu*a)*o+(o=Yu*i-zu*r)*o),Yu*r+zu*i+Uu*a);Au+=o,Nu+=o*(Yu+(Yu=r)),Du+=o*(zu+(zu=i)),Lu+=o*(Uu+(Uu=a)),Vu(Yu,zu,Uu)}function Zu(){qu.point=Wu}function Qu(){qu.point=Ju}function Ku(){tl(Pu,ju),qu.point=Wu}function Ju(t,e){Pu=t,ju=e,t*=gc,e*=gc,qu.point=tl;var n=xc(e);Yu=n*xc(t),zu=n*Tc(t),Uu=Tc(e),Vu(Yu,zu,Uu)}function tl(t,e){t*=gc;var n=xc(e*=gc),r=n*xc(t),i=n*Tc(t),a=Tc(e),o=zu*a-Uu*i,s=Uu*r-Yu*a,c=Yu*i-zu*r,u=Sc(o*o+s*s+c*c),l=Oc(u),h=u&&-l/u;Iu+=h*o,Ru+=h*s,Fu+=h*c,Au+=l,Nu+=l*(Yu+(Yu=r)),Du+=l*(zu+(zu=i)),Lu+=l*(Uu+(Uu=a)),Vu(Yu,zu,Uu)}var el=function(t){Su=Au=Mu=Ou=Bu=Nu=Du=Lu=Iu=Ru=Fu=0,$c(t,qu);var e=Iu,n=Ru,r=Fu,i=e*e+n*n+r*r;return i<1e-12&&(e=Nu,n=Du,r=Lu,Au<1e-6&&(e=Mu,n=Ou,r=Bu),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[bc(n,e)*yc,Oc(r/Sc(i))*yc]},nl=function(t){return function(){return t}},rl=function(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n};function il(t,e){return[vc(t)>hc?t+Math.round(-t/pc)*pc:t,e]}function al(t,e,n){return(t%=pc)?e||n?rl(sl(t),cl(e,n)):sl(t):e||n?cl(e,n):il}function ol(t){return function(e,n){return[(e+=t)>hc?e-pc:e<-hc?e+pc:e,n]}}function sl(t){var e=ol(t);return e.invert=ol(-t),e}function cl(t,e){var n=xc(t),r=Tc(t),i=xc(e),a=Tc(e);function o(t,e){var o=xc(e),s=xc(t)*o,c=Tc(t)*o,u=Tc(e),l=u*n+s*r;return[bc(c*i-l*a,s*n-u*r),Oc(l*i+c*a)]}return o.invert=function(t,e){var o=xc(e),s=xc(t)*o,c=Tc(t)*o,u=Tc(e),l=u*i-c*a;return[bc(c*i+u*a,s*n+l*r),Oc(l*n-s*r)]},o}il.invert=il;var ul=function(t){function e(e){return(e=t(e[0]*gc,e[1]*gc))[0]*=yc,e[1]*=yc,e}return t=al(t[0]*gc,t[1]*gc,t.length>2?t[2]*gc:0),e.invert=function(e){return(e=t.invert(e[0]*gc,e[1]*gc))[0]*=yc,e[1]*=yc,e},e};function ll(t,e,n,r,i,a){if(n){var o=xc(e),s=Tc(e),c=r*n;null==i?(i=e+r*pc,a=e-c/2):(i=hl(o,i),a=hl(o,a),(r>0?i<a:i>a)&&(i+=r*pc));for(var u,l=i;r>0?l>a:l<a;l-=c)u=Kc([o,-s*xc(l),-s*Tc(l)]),t.point(u[0],u[1])}}function hl(t,e){(e=Jc(e))[0]-=t,iu(e);var n=Mc(-e[1]);return((-e[2]<0?-n:n)+pc-1e-6)%pc}var fl=function(){var t,e,n=nl([0,0]),r=nl(90),i=nl(6),a={point:function(n,r){t.push(n=e(n,r)),n[0]*=yc,n[1]*=yc}};function o(){var o=n.apply(this,arguments),s=r.apply(this,arguments)*gc,c=i.apply(this,arguments)*gc;return t=[],e=al(-o[0]*gc,-o[1]*gc,0).invert,ll(a,s,c,1),o={type:"Polygon",coordinates:[t]},t=e=null,o}return o.center=function(t){return arguments.length?(n="function"==typeof t?t:nl([+t[0],+t[1]]),o):n},o.radius=function(t){return arguments.length?(r="function"==typeof t?t:nl(+t),o):r},o.precision=function(t){return arguments.length?(i="function"==typeof t?t:nl(+t),o):i},o},dl=function(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:Nc,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},pl=function(t,e){return vc(t[0]-e[0])<1e-6&&vc(t[1]-e[1])<1e-6};function yl(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var gl=function(t,e,n,r,i){var a,o,s=[],c=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(pl(r,o)){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);i.lineEnd()}else s.push(n=new yl(r,t,null,!0)),c.push(n.o=new yl(r,null,n,!1)),s.push(n=new yl(o,t,null,!1)),c.push(n.o=new yl(o,null,n,!0))}})),s.length){for(c.sort(e),vl(s),vl(c),a=0,o=c.length;a<o;++a)c[a].e=n=!n;for(var u,l,h=s[0];;){for(var f=h,d=!0;f.v;)if((f=f.n)===h)return;u=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(a=0,o=u.length;a<o;++a)i.point((l=u[a])[0],l[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(d)for(u=f.p.z,a=u.length-1;a>=0;--a)i.point((l=u[a])[0],l[1]);else r(f.x,f.p.x,-1,i);f=f.p}u=(f=f.o).z,d=!d}while(!f.v);i.lineEnd()}}};function vl(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}var ml=sc();function bl(t){return vc(t[0])<=hc?t[0]:Cc(t[0])*((vc(t[0])+hc)%pc-hc)}var xl=function(t,e){var n=bl(e),r=e[1],i=Tc(r),a=[Tc(n),-xc(n),0],o=0,s=0;ml.reset(),1===i?r=fc+1e-6:-1===i&&(r=-fc-1e-6);for(var c=0,u=t.length;c<u;++c)if(h=(l=t[c]).length)for(var l,h,f=l[h-1],d=bl(f),p=f[1]/2+dc,y=Tc(p),g=xc(p),v=0;v<h;++v,d=b,y=_,g=k,f=m){var m=l[v],b=bl(m),x=m[1]/2+dc,_=Tc(x),k=xc(x),w=b-d,E=w>=0?1:-1,T=E*w,C=T>hc,S=y*_;if(ml.add(bc(S*E*Tc(T),g*k+S*xc(T))),o+=C?w+E*pc:w,C^d>=n^b>=n){var A=eu(Jc(f),Jc(m));iu(A);var M=eu(a,A);iu(M);var O=(C^w>=0?-1:1)*Oc(M[2]);(r>O||r===O&&(A[0]||A[1]))&&(s+=C^w>=0?1:-1)}}return(o<-1e-6||o<1e-6&&ml<-1e-6)^1&s},_l=function(t,e,n,r){return function(i){var a,o,s,c=e(i),u=dl(),l=e(u),h=!1,f={point:d,lineStart:y,lineEnd:g,polygonStart:function(){f.point=v,f.lineStart=m,f.lineEnd=b,o=[],a=[]},polygonEnd:function(){f.point=d,f.lineStart=y,f.lineEnd=g,o=F(o);var t=xl(a,r);o.length?(h||(i.polygonStart(),h=!0),gl(o,wl,t,n,i)):t&&(h||(i.polygonStart(),h=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),h&&(i.polygonEnd(),h=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(e,n){t(e,n)&&i.point(e,n)}function p(t,e){c.point(t,e)}function y(){f.point=p,c.lineStart()}function g(){f.point=d,c.lineEnd()}function v(t,e){s.push([t,e]),l.point(t,e)}function m(){l.lineStart(),s=[]}function b(){v(s[0][0],s[0][1]),l.lineEnd();var t,e,n,r,c=l.clean(),f=u.result(),d=f.length;if(s.pop(),a.push(s),s=null,d)if(1&c){if((e=(n=f[0]).length-1)>0){for(h||(i.polygonStart(),h=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else d>1&&2&c&&f.push(f.pop().concat(f.shift())),o.push(f.filter(kl))}return f}};function kl(t){return t.length>1}function wl(t,e){return((t=t.x)[0]<0?t[1]-fc-1e-6:fc-t[1])-((e=e.x)[0]<0?e[1]-fc-1e-6:fc-e[1])}var El=_l((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?hc:-hc,c=vc(a-n);vc(c-hc)<1e-6?(t.point(n,r=(r+o)/2>0?fc:-fc),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&c>=hc&&(vc(n-i)<1e-6&&(n-=1e-6*i),vc(a-s)<1e-6&&(a-=1e-6*s),r=function(t,e,n,r){var i,a,o=Tc(t-n);return vc(o)>1e-6?mc((Tc(e)*(a=xc(r))*Tc(n)-Tc(r)*(i=xc(e))*Tc(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=a,r=o),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*fc,r.point(-hc,i),r.point(0,i),r.point(hc,i),r.point(hc,0),r.point(hc,-i),r.point(0,-i),r.point(-hc,-i),r.point(-hc,0),r.point(-hc,i);else if(vc(t[0]-e[0])>1e-6){var a=t[0]<e[0]?hc:-hc;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-hc,-fc]);var Tl=function(t){var e=xc(t),n=6*gc,r=e>0,i=vc(e)>1e-6;function a(t,n){return xc(t)*xc(n)>e}function o(t,n,r){var i=[1,0,0],a=eu(Jc(t),Jc(n)),o=tu(a,a),s=a[0],c=o-s*s;if(!c)return!r&&t;var u=e*o/c,l=-e*s/c,h=eu(i,a),f=ru(i,u);nu(f,ru(a,l));var d=h,p=tu(f,d),y=tu(d,d),g=p*p-y*(tu(f,f)-1);if(!(g<0)){var v=Sc(g),m=ru(d,(-p-v)/y);if(nu(m,f),m=Kc(m),!r)return m;var b,x=t[0],_=n[0],k=t[1],w=n[1];_<x&&(b=x,x=_,_=b);var E=_-x,T=vc(E-hc)<1e-6;if(!T&&w<k&&(b=k,k=w,w=b),T||E<1e-6?T?k+w>0^m[1]<(vc(m[0]-x)<1e-6?k:w):k<=m[1]&&m[1]<=w:E>hc^(x<=m[0]&&m[0]<=_)){var C=ru(d,(-p+v)/y);return nu(C,f),[m,Kc(C)]}}}function s(e,n){var i=r?t:hc-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return _l(a,(function(t){var e,n,c,u,l;return{lineStart:function(){u=c=!1,l=1},point:function(h,f){var d,p=[h,f],y=a(h,f),g=r?y?0:s(h,f):y?s(h+(h<0?hc:-hc),f):0;if(!e&&(u=c=y)&&t.lineStart(),y!==c&&(!(d=o(e,p))||pl(e,d)||pl(p,d))&&(p[0]+=1e-6,p[1]+=1e-6,y=a(p[0],p[1])),y!==c)l=0,y?(t.lineStart(),d=o(p,e),t.point(d[0],d[1])):(d=o(e,p),t.point(d[0],d[1]),t.lineEnd()),e=d;else if(i&&e&&r^y){var v;g&n||!(v=o(p,e,!0))||(l=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!y||e&&pl(e,p)||t.point(p[0],p[1]),e=p,c=y,n=g},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return l|(u&&c)<<1}}}),(function(e,r,i,a){ll(a,t,n,i,e,r)}),r?[0,-t]:[-hc,t-hc])};function Cl(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,s,u){var l=0,h=0;if(null==i||(l=o(i,s))!==(h=o(a,s))||c(i,a)<0^s>0)do{u.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+s+4)%4)!==h);else u.point(a[0],a[1])}function o(r,i){return vc(r[0]-t)<1e-6?i>0?0:3:vc(r[0]-n)<1e-6?i>0?2:1:vc(r[1]-e)<1e-6?i>0?1:0:i>0?3:2}function s(t,e){return c(t.x,e.x)}function c(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var c,u,l,h,f,d,p,y,g,v,m,b=o,x=dl(),_={point:k,lineStart:function(){_.point=w,u&&u.push(l=[]);v=!0,g=!1,p=y=NaN},lineEnd:function(){c&&(w(h,f),d&&g&&x.rejoin(),c.push(x.result()));_.point=k,g&&b.lineEnd()},polygonStart:function(){b=x,c=[],u=[],m=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var a,o,s=u[n],c=1,l=s.length,h=s[0],f=h[0],d=h[1];c<l;++c)a=f,o=d,h=s[c],f=h[0],d=h[1],o<=r?d>r&&(f-a)*(r-o)>(d-o)*(t-a)&&++e:d<=r&&(f-a)*(r-o)<(d-o)*(t-a)&&--e;return e}(),n=m&&e,i=(c=F(c)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&gl(c,s,e,a,o),o.polygonEnd());b=o,c=u=l=null}};function k(t,e){i(t,e)&&b.point(t,e)}function w(a,o){var s=i(a,o);if(u&&l.push([a,o]),v)h=a,f=o,d=s,v=!1,s&&(b.lineStart(),b.point(a,o));else if(s&&g)b.point(a,o);else{var c=[p=Math.max(-1e9,Math.min(1e9,p)),y=Math.max(-1e9,Math.min(1e9,y))],x=[a=Math.max(-1e9,Math.min(1e9,a)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,n,r,i,a){var o,s=t[0],c=t[1],u=0,l=1,h=e[0]-s,f=e[1]-c;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<u)return;o<l&&(l=o)}else if(h>0){if(o>l)return;o>u&&(u=o)}if(o=i-s,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>u&&(u=o)}else if(h>0){if(o<u)return;o<l&&(l=o)}if(o=r-c,f||!(o>0)){if(o/=f,f<0){if(o<u)return;o<l&&(l=o)}else if(f>0){if(o>l)return;o>u&&(u=o)}if(o=a-c,f||!(o<0)){if(o/=f,f<0){if(o>l)return;o>u&&(u=o)}else if(f>0){if(o<u)return;o<l&&(l=o)}return u>0&&(t[0]=s+u*h,t[1]=c+u*f),l<1&&(e[0]=s+l*h,e[1]=c+l*f),!0}}}}}(c,x,t,e,n,r)?s&&(b.lineStart(),b.point(a,o),m=!1):(g||(b.lineStart(),b.point(c[0],c[1])),b.point(x[0],x[1]),s||b.lineEnd(),m=!1)}p=a,y=o,g=s}return _}}var Sl,Al,Ml,Ol=function(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=Cl(r,i,a,o)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],a=+s[1][0],o=+s[1][1],t=e=null,n):[[r,i],[a,o]]}}},Bl=sc(),Nl={sphere:Nc,point:Nc,lineStart:function(){Nl.point=Ll,Nl.lineEnd=Dl},lineEnd:Nc,polygonStart:Nc,polygonEnd:Nc};function Dl(){Nl.point=Nl.lineEnd=Nc}function Ll(t,e){Sl=t*=gc,Al=Tc(e*=gc),Ml=xc(e),Nl.point=Il}function Il(t,e){t*=gc;var n=Tc(e*=gc),r=xc(e),i=vc(t-Sl),a=xc(i),o=r*Tc(i),s=Ml*n-Al*r*a,c=Al*n+Ml*r*a;Bl.add(bc(Sc(o*o+s*s),c)),Sl=t,Al=n,Ml=r}var Rl=function(t){return Bl.reset(),$c(t,Nl),+Bl},Fl=[null,null],Pl={type:"LineString",coordinates:Fl},jl=function(t,e){return Fl[0]=t,Fl[1]=e,Rl(Pl)},Yl={Feature:function(t,e){return Ul(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Ul(n[r].geometry,e))return!0;return!1}},zl={Sphere:function(){return!0},Point:function(t,e){return $l(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if($l(n[r],e))return!0;return!1},LineString:function(t,e){return ql(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(ql(n[r],e))return!0;return!1},Polygon:function(t,e){return Wl(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Wl(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Ul(n[r],e))return!0;return!1}};function Ul(t,e){return!(!t||!zl.hasOwnProperty(t.type))&&zl[t.type](t,e)}function $l(t,e){return 0===jl(t,e)}function ql(t,e){for(var n,r,i,a=0,o=t.length;a<o;a++){if(0===(r=jl(t[a],e)))return!0;if(a>0&&(i=jl(t[a],t[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<1e-12*i)return!0;n=r}return!1}function Wl(t,e){return!!xl(t.map(Vl),Hl(e))}function Vl(t){return(t=t.map(Hl)).pop(),t}function Hl(t){return[t[0]*gc,t[1]*gc]}var Gl=function(t,e){return(t&&Yl.hasOwnProperty(t.type)?Yl[t.type]:Ul)(t,e)};function Xl(t,e,n){var r=k(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function Zl(t,e,n){var r=k(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function Ql(){var t,e,n,r,i,a,o,s,c,u,l,h,f=10,d=f,p=90,y=360,g=2.5;function v(){return{type:"MultiLineString",coordinates:m()}}function m(){return k(_c(r/p)*p,n,p).map(l).concat(k(_c(s/y)*y,o,y).map(h)).concat(k(_c(e/f)*f,t,f).filter((function(t){return vc(t%p)>1e-6})).map(c)).concat(k(_c(a/d)*d,i,d).filter((function(t){return vc(t%y)>1e-6})).map(u))}return v.lines=function(){return m().map((function(t){return{type:"LineString",coordinates:t}}))},v.outline=function(){return{type:"Polygon",coordinates:[l(r).concat(h(o).slice(1),l(n).reverse().slice(1),h(s).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),s>o&&(t=s,s=o,o=t),v.precision(g)):[[r,s],[n,o]]},v.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),v.precision(g)):[[e,a],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(p=+t[0],y=+t[1],v):[p,y]},v.stepMinor=function(t){return arguments.length?(f=+t[0],d=+t[1],v):[f,d]},v.precision=function(f){return arguments.length?(g=+f,c=Xl(a,i,90),u=Zl(e,t,g),l=Xl(s,o,90),h=Zl(r,n,g),v):g},v.extentMajor([[-180,1e-6-90],[180,90-1e-6]]).extentMinor([[-180,-80-1e-6],[180,80+1e-6]])}function Kl(){return Ql()()}var Jl,th,eh,nh,rh=function(t,e){var n=t[0]*gc,r=t[1]*gc,i=e[0]*gc,a=e[1]*gc,o=xc(r),s=Tc(r),c=xc(a),u=Tc(a),l=o*xc(n),h=o*Tc(n),f=c*xc(i),d=c*Tc(i),p=2*Oc(Sc(Bc(a-r)+o*c*Bc(i-n))),y=Tc(p),g=p?function(t){var e=Tc(t*=p)/y,n=Tc(p-t)/y,r=n*l+e*f,i=n*h+e*d,a=n*s+e*u;return[bc(i,r)*yc,bc(a,Sc(r*r+i*i))*yc]}:function(){return[n*yc,r*yc]};return g.distance=p,g},ih=function(t){return t},ah=sc(),oh=sc(),sh={point:Nc,lineStart:Nc,lineEnd:Nc,polygonStart:function(){sh.lineStart=ch,sh.lineEnd=hh},polygonEnd:function(){sh.lineStart=sh.lineEnd=sh.point=Nc,ah.add(vc(oh)),oh.reset()},result:function(){var t=ah/2;return ah.reset(),t}};function ch(){sh.point=uh}function uh(t,e){sh.point=lh,Jl=eh=t,th=nh=e}function lh(t,e){oh.add(nh*t-eh*e),eh=t,nh=e}function hh(){lh(Jl,th)}var fh=sh,dh=1/0,ph=dh,yh=-dh,gh=yh;var vh,mh,bh,xh,_h={point:function(t,e){t<dh&&(dh=t);t>yh&&(yh=t);e<ph&&(ph=e);e>gh&&(gh=e)},lineStart:Nc,lineEnd:Nc,polygonStart:Nc,polygonEnd:Nc,result:function(){var t=[[dh,ph],[yh,gh]];return yh=gh=-(ph=dh=1/0),t}},kh=0,wh=0,Eh=0,Th=0,Ch=0,Sh=0,Ah=0,Mh=0,Oh=0,Bh={point:Nh,lineStart:Dh,lineEnd:Rh,polygonStart:function(){Bh.lineStart=Fh,Bh.lineEnd=Ph},polygonEnd:function(){Bh.point=Nh,Bh.lineStart=Dh,Bh.lineEnd=Rh},result:function(){var t=Oh?[Ah/Oh,Mh/Oh]:Sh?[Th/Sh,Ch/Sh]:Eh?[kh/Eh,wh/Eh]:[NaN,NaN];return kh=wh=Eh=Th=Ch=Sh=Ah=Mh=Oh=0,t}};function Nh(t,e){kh+=t,wh+=e,++Eh}function Dh(){Bh.point=Lh}function Lh(t,e){Bh.point=Ih,Nh(bh=t,xh=e)}function Ih(t,e){var n=t-bh,r=e-xh,i=Sc(n*n+r*r);Th+=i*(bh+t)/2,Ch+=i*(xh+e)/2,Sh+=i,Nh(bh=t,xh=e)}function Rh(){Bh.point=Nh}function Fh(){Bh.point=jh}function Ph(){Yh(vh,mh)}function jh(t,e){Bh.point=Yh,Nh(vh=bh=t,mh=xh=e)}function Yh(t,e){var n=t-bh,r=e-xh,i=Sc(n*n+r*r);Th+=i*(bh+t)/2,Ch+=i*(xh+e)/2,Sh+=i,Ah+=(i=xh*t-bh*e)*(bh+t),Mh+=i*(xh+e),Oh+=3*i,Nh(bh=t,xh=e)}var zh=Bh;function Uh(t){this._context=t}Uh.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,pc)}},result:Nc};var $h,qh,Wh,Vh,Hh,Gh=sc(),Xh={point:Nc,lineStart:function(){Xh.point=Zh},lineEnd:function(){$h&&Qh(qh,Wh),Xh.point=Nc},polygonStart:function(){$h=!0},polygonEnd:function(){$h=null},result:function(){var t=+Gh;return Gh.reset(),t}};function Zh(t,e){Xh.point=Qh,qh=Vh=t,Wh=Hh=e}function Qh(t,e){Vh-=t,Hh-=e,Gh.add(Sc(Vh*Vh+Hh*Hh)),Vh=t,Hh=e}var Kh=Xh;function Jh(){this._string=[]}function tf(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Jh.prototype={_radius:4.5,_circle:tf(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=tf(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var ef=function(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),$c(t,n(r))),r.result()}return a.area=function(t){return $c(t,n(fh)),fh.result()},a.measure=function(t){return $c(t,n(Kh)),Kh.result()},a.bounds=function(t){return $c(t,n(_h)),_h.result()},a.centroid=function(t){return $c(t,n(zh)),zh.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,ih):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new Jh):new Uh(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.projection(t).context(e)},nf=function(t){return{stream:rf(t)}};function rf(t){return function(e){var n=new af;for(var r in t)n[r]=t[r];return n.stream=e,n}}function af(){}function of(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),$c(n,t.stream(_h)),e(_h.result()),null!=r&&t.clipExtent(r),t}function sf(t,e,n){return of(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s])}),n)}function cf(t,e,n){return sf(t,[[0,0],e],n)}function uf(t,e,n){return of(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])}),n)}function lf(t,e,n){return of(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])}),n)}af.prototype={constructor:af,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var hf=xc(30*gc),ff=function(t,e){return+e?function(t,e){function n(r,i,a,o,s,c,u,l,h,f,d,p,y,g){var v=u-r,m=l-i,b=v*v+m*m;if(b>4*e&&y--){var x=o+f,_=s+d,k=c+p,w=Sc(x*x+_*_+k*k),E=Oc(k/=w),T=vc(vc(k)-1)<1e-6||vc(a-h)<1e-6?(a+h)/2:bc(_,x),C=t(T,E),S=C[0],A=C[1],M=S-r,O=A-i,B=m*M-v*O;(B*B/b>e||vc((v*M+m*O)/b-.5)>.3||o*f+s*d+c*p<hf)&&(n(r,i,a,o,s,c,S,A,T,x/=w,_/=w,k,y,g),g.point(S,A),n(S,A,T,x,_,k,u,l,h,f,d,p,y,g))}}return function(e){var r,i,a,o,s,c,u,l,h,f,d,p,y={point:g,lineStart:v,lineEnd:b,polygonStart:function(){e.polygonStart(),y.lineStart=x},polygonEnd:function(){e.polygonEnd(),y.lineStart=v}};function g(n,r){n=t(n,r),e.point(n[0],n[1])}function v(){l=NaN,y.point=m,e.lineStart()}function m(r,i){var a=Jc([r,i]),o=t(r,i);n(l,h,u,f,d,p,l=o[0],h=o[1],u=r,f=a[0],d=a[1],p=a[2],16,e),e.point(l,h)}function b(){y.point=g,e.lineEnd()}function x(){v(),y.point=_,y.lineEnd=k}function _(t,e){m(r=t,e),i=l,a=h,o=f,s=d,c=p,y.point=m}function k(){n(l,h,u,f,d,p,i,a,r,o,s,c,16,e),y.lineEnd=b,b()}return y}}(t,e):function(t){return rf({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)};var df=rf({point:function(t,e){this.stream.point(t*gc,e*gc)}});function pf(t,e,n){function r(r,i){return[e+t*r,n-t*i]}return r.invert=function(r,i){return[(r-e)/t,(n-i)/t]},r}function yf(t,e,n,r){var i=xc(r),a=Tc(r),o=i*t,s=a*t,c=i/t,u=a/t,l=(a*n-i*e)/t,h=(a*e+i*n)/t;function f(t,r){return[o*t-s*r+e,n-s*t-o*r]}return f.invert=function(t,e){return[c*t-u*e+l,h-u*t-c*e]},f}function gf(t){return vf((function(){return t}))()}function vf(t){var e,n,r,i,a,o,s,c,u,l,h=150,f=480,d=250,p=0,y=0,g=0,v=0,m=0,b=0,x=null,_=El,k=null,w=ih,E=.5;function T(t){return c(t[0]*gc,t[1]*gc)}function C(t){return(t=c.invert(t[0],t[1]))&&[t[0]*yc,t[1]*yc]}function S(){var t=yf(h,0,0,b).apply(null,e(p,y)),r=(b?yf:pf)(h,f-t[0],d-t[1],b);return n=al(g,v,m),s=rl(e,r),c=rl(n,s),o=ff(s,E),A()}function A(){return u=l=null,T}return T.stream=function(t){return u&&l===t?u:u=df(function(t){return rf({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(_(o(w(l=t)))))},T.preclip=function(t){return arguments.length?(_=t,x=void 0,A()):_},T.postclip=function(t){return arguments.length?(w=t,k=r=i=a=null,A()):w},T.clipAngle=function(t){return arguments.length?(_=+t?Tl(x=t*gc):(x=null,El),A()):x*yc},T.clipExtent=function(t){return arguments.length?(w=null==t?(k=r=i=a=null,ih):Cl(k=+t[0][0],r=+t[0][1],i=+t[1][0],a=+t[1][1]),A()):null==k?null:[[k,r],[i,a]]},T.scale=function(t){return arguments.length?(h=+t,S()):h},T.translate=function(t){return arguments.length?(f=+t[0],d=+t[1],S()):[f,d]},T.center=function(t){return arguments.length?(p=t[0]%360*gc,y=t[1]%360*gc,S()):[p*yc,y*yc]},T.rotate=function(t){return arguments.length?(g=t[0]%360*gc,v=t[1]%360*gc,m=t.length>2?t[2]%360*gc:0,S()):[g*yc,v*yc,m*yc]},T.angle=function(t){return arguments.length?(b=t%360*gc,S()):b*yc},T.precision=function(t){return arguments.length?(o=ff(s,E=t*t),A()):Sc(E)},T.fitExtent=function(t,e){return sf(T,t,e)},T.fitSize=function(t,e){return cf(T,t,e)},T.fitWidth=function(t,e){return uf(T,t,e)},T.fitHeight=function(t,e){return lf(T,t,e)},function(){return e=t.apply(this,arguments),T.invert=e.invert&&C,S()}}function mf(t){var e=0,n=hc/3,r=vf(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*gc,n=t[1]*gc):[e*yc,n*yc]},i}function bf(t,e){var n=Tc(t),r=(n+Tc(e))/2;if(vc(r)<1e-6)return function(t){var e=xc(t);function n(t,n){return[t*e,Tc(n)/e]}return n.invert=function(t,n){return[t/e,Oc(n*e)]},n}(t);var i=1+n*(2*r-n),a=Sc(i)/r;function o(t,e){var n=Sc(i-2*r*Tc(e))/r;return[n*Tc(t*=r),a-n*xc(t)]}return o.invert=function(t,e){var n=a-e;return[bc(t,vc(n))/r*Cc(n),Oc((i-(t*t+n*n)*r*r)/(2*r))]},o}var xf=function(){return mf(bf).scale(155.424).center([0,33.6442])},_f=function(){return xf().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};var kf=function(){var t,e,n,r,i,a,o=_f(),s=xf().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=xf().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){a=[t,e]}};function l(t){var e=t[0],o=t[1];return a=null,n.point(e,o),a||(r.point(e,o),a)||(i.point(e,o),a)}function h(){return t=e=null,l}return l.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(t)},l.stream=function(n){return t&&e===n?t:(r=[o.stream(e=n),s.stream(n),c.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},l.precision=function(t){return arguments.length?(o.precision(t),s.precision(t),c.precision(t),h()):o.precision()},l.scale=function(t){return arguments.length?(o.scale(t),s.scale(.35*t),c.scale(t),l.translate(o.translate())):o.scale()},l.translate=function(t){if(!arguments.length)return o.translate();var e=o.scale(),a=+t[0],l=+t[1];return n=o.translate(t).clipExtent([[a-.455*e,l-.238*e],[a+.455*e,l+.238*e]]).stream(u),r=s.translate([a-.307*e,l+.201*e]).clipExtent([[a-.425*e+1e-6,l+.12*e+1e-6],[a-.214*e-1e-6,l+.234*e-1e-6]]).stream(u),i=c.translate([a-.205*e,l+.212*e]).clipExtent([[a-.214*e+1e-6,l+.166*e+1e-6],[a-.115*e-1e-6,l+.234*e-1e-6]]).stream(u),h()},l.fitExtent=function(t,e){return sf(l,t,e)},l.fitSize=function(t,e){return cf(l,t,e)},l.fitWidth=function(t,e){return uf(l,t,e)},l.fitHeight=function(t,e){return lf(l,t,e)},l.scale(1070)};function wf(t){return function(e,n){var r=xc(e),i=xc(n),a=t(r*i);return[a*i*Tc(e),a*Tc(n)]}}function Ef(t){return function(e,n){var r=Sc(e*e+n*n),i=t(r),a=Tc(i),o=xc(i);return[bc(e*a,r*o),Oc(r&&n*a/r)]}}var Tf=wf((function(t){return Sc(2/(1+t))}));Tf.invert=Ef((function(t){return 2*Oc(t/2)}));var Cf=function(){return gf(Tf).scale(124.75).clipAngle(179.999)},Sf=wf((function(t){return(t=Mc(t))&&t/Tc(t)}));Sf.invert=Ef((function(t){return t}));var Af=function(){return gf(Sf).scale(79.4188).clipAngle(179.999)};function Mf(t,e){return[t,wc(Ac((fc+e)/2))]}Mf.invert=function(t,e){return[t,2*mc(kc(e))-fc]};var Of=function(){return Bf(Mf).scale(961/pc)};function Bf(t){var e,n,r,i=gf(t),a=i.center,o=i.scale,s=i.translate,c=i.clipExtent,u=null;function l(){var a=hc*o(),s=i(ul(i.rotate()).invert([0,0]));return c(null==u?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:t===Mf?[[Math.max(s[0]-a,u),e],[Math.min(s[0]+a,n),r]]:[[u,Math.max(s[1]-a,e)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(t){return arguments.length?(o(t),l()):o()},i.translate=function(t){return arguments.length?(s(t),l()):s()},i.center=function(t){return arguments.length?(a(t),l()):a()},i.clipExtent=function(t){return arguments.length?(null==t?u=e=n=r=null:(u=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),l()):null==u?null:[[u,e],[n,r]]},l()}function Nf(t){return Ac((fc+t)/2)}function Df(t,e){var n=xc(t),r=t===e?Tc(t):wc(n/xc(e))/wc(Nf(e)/Nf(t)),i=n*Ec(Nf(t),r)/r;if(!r)return Mf;function a(t,e){i>0?e<1e-6-fc&&(e=1e-6-fc):e>fc-1e-6&&(e=fc-1e-6);var n=i/Ec(Nf(e),r);return[n*Tc(r*t),i-n*xc(r*t)]}return a.invert=function(t,e){var n=i-e,a=Cc(r)*Sc(t*t+n*n);return[bc(t,vc(n))/r*Cc(n),2*mc(Ec(i/a,1/r))-fc]},a}var Lf=function(){return mf(Df).scale(109.5).parallels([30,30])};function If(t,e){return[t,e]}If.invert=If;var Rf=function(){return gf(If).scale(152.63)};function Ff(t,e){var n=xc(t),r=t===e?Tc(t):(n-xc(e))/(e-t),i=n/r+t;if(vc(r)<1e-6)return If;function a(t,e){var n=i-e,a=r*t;return[n*Tc(a),i-n*xc(a)]}return a.invert=function(t,e){var n=i-e;return[bc(t,vc(n))/r*Cc(n),i-Cc(r)*Sc(t*t+n*n)]},a}var Pf=function(){return mf(Ff).scale(131.154).center([0,13.9389])},jf=1.340264,Yf=-.081106,zf=893e-6,Uf=.003796,$f=Sc(3)/2;function qf(t,e){var n=Oc($f*Tc(e)),r=n*n,i=r*r*r;return[t*xc(n)/($f*(jf+3*Yf*r+i*(7*zf+9*Uf*r))),n*(jf+Yf*r+i*(zf+Uf*r))]}qf.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(jf+Yf*i+a*(zf+Uf*i))-e)/(jf+3*Yf*i+a*(7*zf+9*Uf*i)))*r)*i*i,!(vc(n)<1e-12));++o);return[$f*t*(jf+3*Yf*i+a*(7*zf+9*Uf*i))/xc(r),Oc(Tc(r)/$f)]};var Wf=function(){return gf(qf).scale(177.158)};function Vf(t,e){var n=xc(e),r=xc(t)*n;return[n*Tc(t)/r,Tc(e)/r]}Vf.invert=Ef(mc);var Hf=function(){return gf(Vf).scale(144.049).clipAngle(60)};function Gf(t,e,n,r){return 1===t&&1===e&&0===n&&0===r?ih:rf({point:function(i,a){this.stream.point(i*t+n,a*e+r)}})}var Xf=function(){var t,e,n,r,i,a,o=1,s=0,c=0,u=1,l=1,h=ih,f=null,d=ih;function p(){return r=i=null,a}return a={stream:function(t){return r&&i===t?r:r=h(d(i=t))},postclip:function(r){return arguments.length?(d=r,f=t=e=n=null,p()):d},clipExtent:function(r){return arguments.length?(d=null==r?(f=t=e=n=null,ih):Cl(f=+r[0][0],t=+r[0][1],e=+r[1][0],n=+r[1][1]),p()):null==f?null:[[f,t],[e,n]]},scale:function(t){return arguments.length?(h=Gf((o=+t)*u,o*l,s,c),p()):o},translate:function(t){return arguments.length?(h=Gf(o*u,o*l,s=+t[0],c=+t[1]),p()):[s,c]},reflectX:function(t){return arguments.length?(h=Gf(o*(u=t?-1:1),o*l,s,c),p()):u<0},reflectY:function(t){return arguments.length?(h=Gf(o*u,o*(l=t?-1:1),s,c),p()):l<0},fitExtent:function(t,e){return sf(a,t,e)},fitSize:function(t,e){return cf(a,t,e)},fitWidth:function(t,e){return uf(a,t,e)},fitHeight:function(t,e){return lf(a,t,e)}}};function Zf(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}Zf.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(vc(n)>1e-6&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]};var Qf=function(){return gf(Zf).scale(175.295)};function Kf(t,e){return[xc(e)*Tc(t),Tc(e)]}Kf.invert=Ef(Oc);var Jf=function(){return gf(Kf).scale(249.5).clipAngle(90+1e-6)};function td(t,e){var n=xc(e),r=1+xc(t)*n;return[n*Tc(t)/r,Tc(e)/r]}td.invert=Ef((function(t){return 2*mc(t)}));var ed=function(){return gf(td).scale(250).clipAngle(142)};function nd(t,e){return[wc(Ac((fc+e)/2)),-t]}nd.invert=function(t,e){return[-e,2*mc(kc(t))-fc]};var rd=function(){var t=Bf(nd),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)};function id(t,e){return t.parent===e.parent?1:2}function ad(t,e){return t+e.x}function od(t,e){return Math.max(t,e.y)}var sd=function(){var t=id,e=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(ad,0)/t.length}(n),e.y=function(t){return 1+t.reduce(od,0)}(n)):(e.x=a?o+=t(e,a):0,e.y=0,a=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=s.x-t(s,c)/2,l=c.x+t(c,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(l-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i};function cd(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function ud(t,e){var n,r,i,a,o,s=new dd(t),c=+t.value&&(s.value=t.value),u=[s];for(null==e&&(e=ld);n=u.pop();)if(c&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)u.push(r=n.children[a]=new dd(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(fd)}function ld(t){return t.children}function hd(t){t.data=t.data.data}function fd(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function dd(t){this.data=t,this.depth=this.height=0,this.parent=null}dd.prototype=ud.prototype={constructor:dd,count:function(){return this.eachAfter(cd)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return ud(this).eachBefore(hd)}};var pd=Array.prototype.slice;var yd=function(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(pd.call(t))).length,a=[];r<i;)e=t[r],n&&md(n,e)?++r:(n=xd(a=gd(a,e)),r=0);return n};function gd(t,e){var n,r;if(bd(e,t))return[e];for(n=0;n<t.length;++n)if(vd(e,t[n])&&bd(_d(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(vd(_d(t[n],t[r]),e)&&vd(_d(t[n],e),t[r])&&vd(_d(t[r],e),t[n])&&bd(kd(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function vd(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function md(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function bd(t,e){for(var n=0;n<e.length;++n)if(!md(t,e[n]))return!1;return!0}function xd(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return _d(t[0],t[1]);case 3:return kd(t[0],t[1],t[2])}var e}function _d(t,e){var n=t.x,r=t.y,i=t.r,a=e.x,o=e.y,s=e.r,c=a-n,u=o-r,l=s-i,h=Math.sqrt(c*c+u*u);return{x:(n+a+c/h*l)/2,y:(r+o+u/h*l)/2,r:(h+i+s)/2}}function kd(t,e,n){var r=t.x,i=t.y,a=t.r,o=e.x,s=e.y,c=e.r,u=n.x,l=n.y,h=n.r,f=r-o,d=r-u,p=i-s,y=i-l,g=c-a,v=h-a,m=r*r+i*i-a*a,b=m-o*o-s*s+c*c,x=m-u*u-l*l+h*h,_=d*p-f*y,k=(p*x-y*b)/(2*_)-r,w=(y*g-p*v)/_,E=(d*b-f*x)/(2*_)-i,T=(f*v-d*g)/_,C=w*w+T*T-1,S=2*(a+k*w+E*T),A=k*k+E*E-a*a,M=-(C?(S+Math.sqrt(S*S-4*C*A))/(2*C):A/S);return{x:r+k+w*M,y:i+E+T*M,r:M}}function wd(t,e,n){var r,i,a,o,s=t.x-e.x,c=t.y-e.y,u=s*s+c*c;u?(i=e.r+n.r,i*=i,o=t.r+n.r,i>(o*=o)?(r=(u+o-i)/(2*u),a=Math.sqrt(Math.max(0,o/u-r*r)),n.x=t.x-r*s-a*c,n.y=t.y-r*c+a*s):(r=(u+i-o)/(2*u),a=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*s-a*c,n.y=e.y+r*c+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Ed(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Td(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function Cd(t){this._=t,this.next=null,this.previous=null}function Sd(t){if(!(i=t.length))return 0;var e,n,r,i,a,o,s,c,u,l,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;wd(n,e,r=t[2]),e=new Cd(e),n=new Cd(n),r=new Cd(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){wd(e._,n._,r=t[s]),r=new Cd(r),c=n.next,u=e.previous,l=n._.r,h=e._.r;do{if(l<=h){if(Ed(c._,r._)){n=c,e.next=n,n.previous=e,--s;continue t}l+=c._.r,c=c.next}else{if(Ed(u._,r._)){(e=u).next=n,n.previous=e,--s;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,a=Td(e);(r=r.next)!==n;)(o=Td(r))<a&&(e=r,a=o);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=yd(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}var Ad=function(t){return Sd(t),t};function Md(t){return null==t?null:Od(t)}function Od(t){if("function"!=typeof t)throw new Error;return t}function Bd(){return 0}var Nd=function(t){return function(){return t}};function Dd(t){return Math.sqrt(t.value)}var Ld=function(){var t=null,e=1,n=1,r=Bd;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(Id(t)).eachAfter(Rd(r,.5)).eachBefore(Fd(1)):i.eachBefore(Id(Dd)).eachAfter(Rd(Bd,1)).eachAfter(Rd(r,i.r/Math.min(e,n))).eachBefore(Fd(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=Md(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:Nd(+t),i):r},i};function Id(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Rd(t,e){return function(n){if(r=n.children){var r,i,a,o=r.length,s=t(n)*e||0;if(s)for(i=0;i<o;++i)r[i].r+=s;if(a=Sd(r),s)for(i=0;i<o;++i)r[i].r-=s;n.r=a+s}}}function Fd(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}var Pd=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)},jd=function(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,u=t.value&&(r-e)/t.value;++s<c;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*u},Yd=function(){var t=1,e=1,n=0,r=!1;function i(i){var a=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(r){r.children&&jd(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=s}}(e,a)),r&&i.eachBefore(Pd),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i},zd={depth:-1},Ud={};function $d(t){return t.id}function qd(t){return t.parentId}var Wd=function(){var t=$d,e=qd;function n(n){var r,i,a,o,s,c,u,l=n.length,h=new Array(l),f={};for(i=0;i<l;++i)r=n[i],s=h[i]=new dd(r),null!=(c=t(r,i,n))&&(c+="")&&(f[u="$"+(s.id=c)]=u in f?Ud:s);for(i=0;i<l;++i)if(s=h[i],null!=(c=e(n[i],i,n))&&(c+="")){if(!(o=f["$"+c]))throw new Error("missing: "+c);if(o===Ud)throw new Error("ambiguous: "+c);o.children?o.children.push(s):o.children=[s],s.parent=o}else{if(a)throw new Error("multiple roots");a=s}if(!a)throw new Error("no root");if(a.parent=zd,a.eachBefore((function(t){t.depth=t.parent.depth+1,--l})).eachBefore(fd),a.parent=null,l>0)throw new Error("cycle");return a}return n.id=function(e){return arguments.length?(t=Od(e),n):t},n.parentId=function(t){return arguments.length?(e=Od(t),n):e},n};function Vd(t,e){return t.parent===e.parent?1:2}function Hd(t){var e=t.children;return e?e[0]:t.t}function Gd(t){var e=t.children;return e?e[e.length-1]:t.t}function Xd(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Zd(t,e,n){return t.a.parent===e.parent?t.a:n}function Qd(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}Qd.prototype=Object.create(dd.prototype);var Kd=function(){var t=Vd,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,a,o=new Qd(t,0),s=[o];e=s.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=e.children[i]=new Qd(r[i],i)),n.parent=e;return(o.parent=new Qd(null,0)).children=[o],o}(i);if(c.eachAfter(a),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(s);else{var u=i,l=i,h=i;i.eachBefore((function(t){t.x<u.x&&(u=t),t.x>l.x&&(l=t),t.depth>h.depth&&(h=t)}));var f=u===l?1:t(u,l)/2,d=f-u.x,p=e/(l.x+f+d),y=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*y}))}return i}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,a=e,o=e,s=n,c=a.parent.children[0],u=a.m,l=o.m,h=s.m,f=c.m;s=Gd(s),a=Hd(a),s&&a;)c=Hd(c),(o=Gd(o)).a=e,(i=s.z+h-a.z-u+t(s._,a._))>0&&(Xd(Zd(s,e,r),e,i),u+=i,l+=i),h+=s.m,u+=a.m,f+=c.m,l+=o.m;s&&!Gd(o)&&(o.t=s,o.m+=h-l),a&&!Hd(c)&&(c.t=a,c.m+=u-f,r=e)}return r}(e,i,e.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},Jd=function(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,u=t.value&&(i-n)/t.value;++s<c;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*u},tp=(1+Math.sqrt(5))/2;function ep(t,e,n,r,i,a){for(var o,s,c,u,l,h,f,d,p,y,g,v=[],m=e.children,b=0,x=0,_=m.length,k=e.value;b<_;){c=i-n,u=a-r;do{l=m[x++].value}while(!l&&x<_);for(h=f=l,g=l*l*(y=Math.max(u/c,c/u)/(k*t)),p=Math.max(f/g,g/h);x<_;++x){if(l+=s=m[x].value,s<h&&(h=s),s>f&&(f=s),g=l*l*y,(d=Math.max(f/g,g/h))>p){l-=s;break}p=d}v.push(o={value:l,dice:c<u,children:m.slice(b,x)}),o.dice?jd(o,n,r,i,k?r+=u*l/k:a):Jd(o,n,r,k?n+=c*l/k:i,a),k-=l,b=x}return v}var np=function t(e){function n(t,n,r,i,a){ep(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(tp),rp=function(){var t=np,e=!1,n=1,r=1,i=[0],a=Bd,o=Bd,s=Bd,c=Bd,u=Bd;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Pd),t}function h(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<l&&(l=f=(l+f)/2),e.x0=r,e.y0=l,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=a(e)/2,r+=u(e)-n,l+=o(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=c(e)-n)<l&&(l=f=(l+f)/2),t(e,r,l,h,f))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=Od(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:Nd(+t),l):a},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:Nd(+t),l):o},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Nd(+t),l):s},l.paddingBottom=function(t){return arguments.length?(c="function"==typeof t?t:Nd(+t),l):c},l.paddingLeft=function(t){return arguments.length?(u="function"==typeof t?t:Nd(+t),l):u},l},ip=function(t,e,n,r,i){var a,o,s=t.children,c=s.length,u=new Array(c+1);for(u[0]=o=a=0;a<c;++a)u[a+1]=o+=s[a].value;!function t(e,n,r,i,a,o,c){if(e>=n-1){var l=s[e];return l.x0=i,l.y0=a,l.x1=o,void(l.y1=c)}var h=u[e],f=r/2+h,d=e+1,p=n-1;for(;d<p;){var y=d+p>>>1;u[y]<f?d=y+1:p=y}f-u[d-1]<u[d]-f&&e+1<d&&--d;var g=u[d]-h,v=r-g;if(o-i>c-a){var m=(i*v+o*g)/r;t(e,d,g,i,a,m,c),t(d,n,v,m,a,o,c)}else{var b=(a*v+c*g)/r;t(e,d,g,i,a,o,b),t(d,n,v,i,b,o,c)}}(0,c,t.value,e,n,r,i)},ap=function(t,e,n,r,i){(1&t.depth?Jd:jd)(t,e,n,r,i)},op=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,c,u,l,h=-1,f=o.length,d=t.value;++h<f;){for(c=(s=o[h]).children,u=s.value=0,l=c.length;u<l;++u)s.value+=c[u].value;s.dice?jd(s,n,r,i,r+=(a-r)*s.value/d):Jd(s,n,r,n+=(i-n)*s.value/d,a),d-=s.value}else t._squarify=o=ep(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(tp),sp=function(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}},cp=function(t,e){var n=un(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}},up=function(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}},lp=Math.SQRT2;function hp(t){return((t=Math.exp(t))+1/t)/2}var fp=function(t,e){var n,r,i=t[0],a=t[1],o=t[2],s=e[0],c=e[1],u=e[2],l=s-i,h=c-a,f=l*l+h*h;if(f<1e-12)r=Math.log(u/o)/lp,n=function(t){return[i+t*l,a+t*h,o*Math.exp(lp*t*r)]};else{var d=Math.sqrt(f),p=(u*u-o*o+4*f)/(2*o*2*d),y=(u*u-o*o-4*f)/(2*u*2*d),g=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(y*y+1)-y);r=(v-g)/lp,n=function(t){var e,n=t*r,s=hp(g),c=o/(2*d)*(s*(e=lp*n+g,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(g));return[i+c*l,a+c*h,o*s/hp(lp*n+g)]}}return n.duration=1e3*r,n};function dp(t){return function(e,n){var r=t((e=tn(e)).h,(n=tn(n)).h),i=hn(e.s,n.s),a=hn(e.l,n.l),o=hn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+""}}}var pp=dp(un),yp=dp(hn);function gp(t,e){var n=hn((t=pa(t)).l,(e=pa(e)).l),r=hn(t.a,e.a),i=hn(t.b,e.b),a=hn(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+""}}function vp(t){return function(e,n){var r=t((e=ka(e)).h,(n=ka(n)).h),i=hn(e.c,n.c),a=hn(e.l,n.l),o=hn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}var mp=vp(un),bp=vp(hn);function xp(t){return function e(n){function r(e,r){var i=t((e=Oa(e)).h,(r=Oa(r)).h),a=hn(e.s,r.s),o=hn(e.l,r.l),s=hn(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}var _p=xp(un),kp=xp(hn);function wp(t,e){for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n<r;)a[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return a[e](t-e)}}var Ep=function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n},Tp=function(t){for(var e,n=-1,r=t.length,i=t[r-1],a=0;++n<r;)e=i,i=t[n],a+=e[1]*i[0]-e[0]*i[1];return a/2},Cp=function(t){for(var e,n,r=-1,i=t.length,a=0,o=0,s=t[i-1],c=0;++r<i;)e=s,s=t[r],c+=n=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*n,o+=(e[1]+s[1])*n;return[a/(c*=3),o/c]};function Sp(t,e){return t[0]-e[0]||t[1]-e[1]}function Ap(t){for(var e,n,r,i=t.length,a=[0,1],o=2,s=2;s<i;++s){for(;o>1&&(e=t[a[o-2]],n=t[a[o-1]],r=t[s],(n[0]-e[0])*(r[1]-e[1])-(n[1]-e[1])*(r[0]-e[0])<=0);)--o;a[o++]=s}return a.slice(0,o)}var Mp=function(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(Sp),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var a=Ap(r),o=Ap(i),s=o[0]===a[0],c=o[o.length-1]===a[a.length-1],u=[];for(e=a.length-1;e>=0;--e)u.push(t[r[a[e]][2]]);for(e=+s;e<o.length-c;++e)u.push(t[r[o[e]][2]]);return u},Op=function(t,e){for(var n,r,i=t.length,a=t[i-1],o=e[0],s=e[1],c=a[0],u=a[1],l=!1,h=0;h<i;++h)n=(a=t[h])[0],(r=a[1])>s!=u>s&&o<(c-n)*(s-r)/(u-r)+n&&(l=!l),c=n,u=r;return l},Bp=function(t){for(var e,n,r=-1,i=t.length,a=t[i-1],o=a[0],s=a[1],c=0;++r<i;)e=o,n=s,e-=o=(a=t[r])[0],n-=s=a[1],c+=Math.sqrt(e*e+n*n);return c},Np=function(){return Math.random()},Dp=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(Np),Lp=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(Np),Ip=function t(e){function n(){var t=Lp.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(Np),Rp=function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(Np),Fp=function t(e){function n(t){var n=Rp.source(e)(t);return function(){return n()/t}}return n.source=t,n}(Np),Pp=function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(Np);function jp(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Yp(t,e){switch(arguments.length){case 0:break;case 1:this.interpolator(t);break;default:this.interpolator(e).domain(t)}return this}var zp=Array.prototype,Up=zp.map,$p=zp.slice,qp={name:"implicit"};function Wp(){var t=Qi(),e=[],n=[],r=qp;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==qp)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Qi();for(var r,a,o=-1,s=n.length;++o<s;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=$p.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Wp(e,n).unknown(r)},jp.apply(i,arguments),i}function Vp(){var t,e,n=Wp().unknown(void 0),r=n.domain,i=n.range,a=[0,1],o=!1,s=0,c=0,u=.5;function l(){var n=r().length,l=a[1]<a[0],h=a[l-0],f=a[1-l];t=(f-h)/Math.max(1,n-s+2*c),o&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*u,e=t*(1-s),o&&(h=Math.round(h),e=Math.round(e));var d=k(n).map((function(e){return h+t*e}));return i(l?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),l()):r()},n.range=function(t){return arguments.length?(a=[+t[0],+t[1]],l()):a.slice()},n.rangeRound=function(t){return a=[+t[0],+t[1]],o=!0,l()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,l()):o},n.padding=function(t){return arguments.length?(s=Math.min(1,c=+t),l()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),l()):s},n.paddingOuter=function(t){return arguments.length?(c=+t,l()):c},n.align=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),l()):u},n.copy=function(){return Vp(r(),a).round(o).paddingInner(s).paddingOuter(c).align(u)},jp.apply(l(),arguments)}function Hp(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Hp(e())},t}function Gp(){return Hp(Vp.apply(null,arguments).paddingInner(1))}var Xp=function(t){return+t},Zp=[0,1];function Qp(t){return t}function Kp(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function Jp(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function ty(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=Kp(i,r),a=n(o,a)):(r=Kp(r,i),a=n(a,o)),function(t){return a(r(t))}}function ey(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Kp(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=c(t,e,1,r)-1;return a[n](i[n](e))}}function ny(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function ry(){var t,e,n,r,i,a,o=Zp,s=Zp,c=An,u=Qp;function l(){return r=Math.min(o.length,s.length)>2?ey:ty,i=a=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,c)))(t(u(e)))}return h.invert=function(n){return u(e((a||(a=r(s,o.map(t),_n)))(n)))},h.domain=function(t){return arguments.length?(o=Up.call(t,Xp),u===Qp||(u=Jp(o)),l()):o.slice()},h.range=function(t){return arguments.length?(s=$p.call(t),l()):s.slice()},h.rangeRound=function(t){return s=$p.call(t),c=up,l()},h.clamp=function(t){return arguments.length?(u=t?Jp(o):Qp,h):u!==Qp},h.interpolate=function(t){return arguments.length?(c=t,l()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}function iy(t,e){return ry()(t,e)}var ay=function(t,e,n,r){var i,a=A(t,e,n);switch((r=Ws(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=ac(a,o))||(r.precision=i),Zs(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=oc(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=ic(a))||(r.precision=i-2*("%"===r.type))}return Xs(r)};function oy(t){var e=t.domain;return t.ticks=function(t){var n=e();return C(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return ay(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,s=i[a],c=i[o];return c<s&&(r=s,s=c,c=r,r=a,a=o,o=r),(r=S(s,c,n))>0?r=S(s=Math.floor(s/r)*r,c=Math.ceil(c/r)*r,n):r<0&&(r=S(s=Math.ceil(s*r)/r,c=Math.floor(c*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(c/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(c*r)/r,e(i)),t},t}function sy(){var t=iy(Qp,Qp);return t.copy=function(){return ny(t,sy())},jp.apply(t,arguments),oy(t)}function cy(t){var e;function n(t){return isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Up.call(e,Xp),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return cy(t).unknown(e)},t=arguments.length?Up.call(t,Xp):[0,1],oy(n)}var uy=function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t};function ly(t){return Math.log(t)}function hy(t){return Math.exp(t)}function fy(t){return-Math.log(-t)}function dy(t){return-Math.exp(-t)}function py(t){return isFinite(t)?+("1e"+t):t<0?0:t}function yy(t){return function(e){return-t(-e)}}function gy(t){var e,n,r=t(ly,hy),i=r.domain,a=10;function o(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(a),n=function(t){return 10===t?py:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=yy(e),n=yy(n),t(fy,dy)):t(ly,hy),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),s=o[0],c=o[o.length-1];(r=c<s)&&(f=s,s=c,c=f);var u,l,h,f=e(s),d=e(c),p=null==t?10:+t,y=[];if(!(a%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(l=1,u=n(f);l<a;++l)if(!((h=u*l)<s)){if(h>c)break;y.push(h)}}else for(;f<d;++f)for(l=a-1,u=n(f);l>=1;--l)if(!((h=u*l)<s)){if(h>c)break;y.push(h)}}else y=C(f,d,Math.min(d-f,p)).map(n);return r?y.reverse():y},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=Xs(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(uy(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function vy(){var t=gy(ry()).domain([1,10]);return t.copy=function(){return ny(t,vy()).base(t.base())},jp.apply(t,arguments),t}function my(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function by(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function xy(t){var e=1,n=t(my(e),by(e));return n.constant=function(n){return arguments.length?t(my(e=+n),by(e)):e},oy(n)}function _y(){var t=xy(ry());return t.copy=function(){return ny(t,_y()).constant(t.constant())},jp.apply(t,arguments)}function ky(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function wy(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Ey(t){return t<0?-t*t:t*t}function Ty(t){var e=t(Qp,Qp),n=1;function r(){return 1===n?t(Qp,Qp):.5===n?t(wy,Ey):t(ky(n),ky(1/n))}return e.exponent=function(t){return arguments.length?(n=+t,r()):n},oy(e)}function Cy(){var t=Ty(ry());return t.copy=function(){return ny(t,Cy()).exponent(t.exponent())},jp.apply(t,arguments),t}function Sy(){return Cy.apply(null,arguments).exponent(.5)}function Ay(){var t,e=[],n=[],i=[];function a(){var t=0,r=Math.max(1,n.length);for(i=new Array(r-1);++t<r;)i[t-1]=B(e,t/r);return o}function o(e){return isNaN(e=+e)?t:n[c(i,e)]}return o.invertExtent=function(t){var r=n.indexOf(t);return r<0?[NaN,NaN]:[r>0?i[r-1]:e[0],r<i.length?i[r]:e[e.length-1]]},o.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var n,i=0,o=t.length;i<o;++i)null==(n=t[i])||isNaN(n=+n)||e.push(n);return e.sort(r),a()},o.range=function(t){return arguments.length?(n=$p.call(t),a()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return i.slice()},o.copy=function(){return Ay().domain(e).range(n).unknown(t)},jp.apply(o,arguments)}function My(){var t,e=0,n=1,r=1,i=[.5],a=[0,1];function o(e){return e<=e?a[c(i,e,0,r)]:t}function s(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*e)/(r+1);return o}return o.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],s()):[e,n]},o.range=function(t){return arguments.length?(r=(a=$p.call(t)).length-1,s()):a.slice()},o.invertExtent=function(t){var o=a.indexOf(t);return o<0?[NaN,NaN]:o<1?[e,i[0]]:o>=r?[i[r-1],n]:[i[o-1],i[o]]},o.unknown=function(e){return arguments.length?(t=e,o):o},o.thresholds=function(){return i.slice()},o.copy=function(){return My().domain([e,n]).range(a).unknown(t)},jp.apply(oy(o),arguments)}function Oy(){var t,e=[.5],n=[0,1],r=1;function i(i){return i<=i?n[c(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=$p.call(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=$p.call(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return Oy().domain(e).range(n).unknown(t)},jp.apply(i,arguments)}var By=new Date,Ny=new Date;function Dy(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return Dy((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return By.setTime(+e),Ny.setTime(+r),t(By),t(Ny),Math.floor(n(By,Ny))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Ly=Dy((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Ly.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Dy((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var Iy=Ly,Ry=Ly.range,Fy=Dy((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),Py=Fy,jy=Fy.range;function Yy(t){return Dy((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var zy=Yy(0),Uy=Yy(1),$y=Yy(2),qy=Yy(3),Wy=Yy(4),Vy=Yy(5),Hy=Yy(6),Gy=zy.range,Xy=Uy.range,Zy=$y.range,Qy=qy.range,Ky=Wy.range,Jy=Vy.range,tg=Hy.range,eg=Dy((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),ng=eg,rg=eg.range,ig=Dy((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),ag=ig,og=ig.range,sg=Dy((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),cg=sg,ug=sg.range,lg=Dy((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),hg=lg,fg=lg.range,dg=Dy((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));dg.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Dy((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):dg:null};var pg=dg,yg=dg.range;function gg(t){return Dy((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var vg=gg(0),mg=gg(1),bg=gg(2),xg=gg(3),_g=gg(4),kg=gg(5),wg=gg(6),Eg=vg.range,Tg=mg.range,Cg=bg.range,Sg=xg.range,Ag=_g.range,Mg=kg.range,Og=wg.range,Bg=Dy((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1})),Ng=Bg,Dg=Bg.range,Lg=Dy((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));Lg.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Dy((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var Ig=Lg,Rg=Lg.range;function Fg(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Pg(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function jg(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Yg(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,u=Kg(i),l=Jg(i),h=Kg(a),f=Jg(a),d=Kg(o),p=Jg(o),y=Kg(s),g=Jg(s),v=Kg(c),m=Jg(c),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:xv,e:xv,f:Tv,H:_v,I:kv,j:wv,L:Ev,m:Cv,M:Sv,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:em,s:nm,S:Av,u:Mv,U:Ov,V:Bv,w:Nv,W:Dv,x:null,X:null,y:Lv,Y:Iv,Z:Rv,"%":tm},x={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Fv,e:Fv,f:Uv,H:Pv,I:jv,j:Yv,L:zv,m:$v,M:qv,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:em,s:nm,S:Wv,u:Vv,U:Hv,V:Gv,w:Xv,W:Zv,x:null,X:null,y:Qv,Y:Kv,Z:Jv,"%":tm},_={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=m[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=y.exec(e.slice(n));return r?(t.m=g[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:lv,e:lv,f:gv,H:fv,I:fv,j:hv,L:yv,m:uv,M:dv,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:cv,Q:mv,s:bv,S:pv,u:ev,U:nv,V:rv,w:tv,W:iv,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:ov,Y:av,Z:sv,"%":vv};function k(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===t.charCodeAt(s)&&(o.push(t.slice(c,s)),null!=(i=Vg[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),c=s+1);return o.push(t.slice(c,s)),o.join("")}}function w(t,e){return function(n){var r,i,a=jg(1900,void 0,1);if(E(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(!e||"Z"in a||(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Pg(jg(a.y,0,1))).getUTCDay(),r=i>4||0===i?mg.ceil(r):mg(r),r=Ng.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Fg(jg(a.y,0,1))).getDay(),r=i>4||0===i?Uy.ceil(r):Uy(r),r=ng.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Pg(jg(a.y,0,1)).getUTCDay():Fg(jg(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Pg(a)):Fg(a)}}function E(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o<s;){if(r>=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=_[i in Vg?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(b.x=k(n,b),b.X=k(r,b),b.c=k(e,b),x.x=k(n,x),x.X=k(r,x),x.c=k(e,x),{format:function(t){var e=k(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=w(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=k(t+="",x);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t+="",!0);return e.toString=function(){return t},e}})}var zg,Ug,$g,qg,Wg,Vg={"-":"",_:" ",0:"0"},Hg=/^\s*\d+/,Gg=/^%/,Xg=/[\\^$*+?|[\]().{}]/g;function Zg(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function Qg(t){return t.replace(Xg,"\\$&")}function Kg(t){return new RegExp("^(?:"+t.map(Qg).join("|")+")","i")}function Jg(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function tv(t,e,n){var r=Hg.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function ev(t,e,n){var r=Hg.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function nv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function rv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function iv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function av(t,e,n){var r=Hg.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function ov(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function sv(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function cv(t,e,n){var r=Hg.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function uv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function lv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function hv(t,e,n){var r=Hg.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function fv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function dv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function pv(t,e,n){var r=Hg.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function yv(t,e,n){var r=Hg.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function gv(t,e,n){var r=Hg.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function vv(t,e,n){var r=Gg.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function mv(t,e,n){var r=Hg.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function bv(t,e,n){var r=Hg.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function xv(t,e){return Zg(t.getDate(),e,2)}function _v(t,e){return Zg(t.getHours(),e,2)}function kv(t,e){return Zg(t.getHours()%12||12,e,2)}function wv(t,e){return Zg(1+ng.count(Iy(t),t),e,3)}function Ev(t,e){return Zg(t.getMilliseconds(),e,3)}function Tv(t,e){return Ev(t,e)+"000"}function Cv(t,e){return Zg(t.getMonth()+1,e,2)}function Sv(t,e){return Zg(t.getMinutes(),e,2)}function Av(t,e){return Zg(t.getSeconds(),e,2)}function Mv(t){var e=t.getDay();return 0===e?7:e}function Ov(t,e){return Zg(zy.count(Iy(t)-1,t),e,2)}function Bv(t,e){var n=t.getDay();return t=n>=4||0===n?Wy(t):Wy.ceil(t),Zg(Wy.count(Iy(t),t)+(4===Iy(t).getDay()),e,2)}function Nv(t){return t.getDay()}function Dv(t,e){return Zg(Uy.count(Iy(t)-1,t),e,2)}function Lv(t,e){return Zg(t.getFullYear()%100,e,2)}function Iv(t,e){return Zg(t.getFullYear()%1e4,e,4)}function Rv(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Zg(e/60|0,"0",2)+Zg(e%60,"0",2)}function Fv(t,e){return Zg(t.getUTCDate(),e,2)}function Pv(t,e){return Zg(t.getUTCHours(),e,2)}function jv(t,e){return Zg(t.getUTCHours()%12||12,e,2)}function Yv(t,e){return Zg(1+Ng.count(Ig(t),t),e,3)}function zv(t,e){return Zg(t.getUTCMilliseconds(),e,3)}function Uv(t,e){return zv(t,e)+"000"}function $v(t,e){return Zg(t.getUTCMonth()+1,e,2)}function qv(t,e){return Zg(t.getUTCMinutes(),e,2)}function Wv(t,e){return Zg(t.getUTCSeconds(),e,2)}function Vv(t){var e=t.getUTCDay();return 0===e?7:e}function Hv(t,e){return Zg(vg.count(Ig(t)-1,t),e,2)}function Gv(t,e){var n=t.getUTCDay();return t=n>=4||0===n?_g(t):_g.ceil(t),Zg(_g.count(Ig(t),t)+(4===Ig(t).getUTCDay()),e,2)}function Xv(t){return t.getUTCDay()}function Zv(t,e){return Zg(mg.count(Ig(t)-1,t),e,2)}function Qv(t,e){return Zg(t.getUTCFullYear()%100,e,2)}function Kv(t,e){return Zg(t.getUTCFullYear()%1e4,e,4)}function Jv(){return"+0000"}function tm(){return"%"}function em(t){return+t}function nm(t){return Math.floor(+t/1e3)}function rm(t){return zg=Yg(t),Ug=zg.format,$g=zg.parse,qg=zg.utcFormat,Wg=zg.utcParse,zg}rm({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function im(t){return new Date(t)}function am(t){return t instanceof Date?+t:+new Date(+t)}function om(t,e,n,r,a,o,s,c,u){var l=iy(Qp,Qp),h=l.invert,f=l.domain,d=u(".%L"),p=u(":%S"),y=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),m=u("%b %d"),b=u("%B"),x=u("%Y"),_=[[s,1,1e3],[s,5,5e3],[s,15,15e3],[s,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[a,1,36e5],[a,3,108e5],[a,6,216e5],[a,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function k(i){return(s(i)<i?d:o(i)<i?p:a(i)<i?y:r(i)<i?g:e(i)<i?n(i)<i?v:m:t(i)<i?b:x)(i)}function w(e,n,r,a){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,s=i((function(t){return t[2]})).right(_,o);s===_.length?(a=A(n/31536e6,r/31536e6,e),e=t):s?(a=(s=_[o/_[s-1][2]<_[s][2]/o?s-1:s])[1],e=s[0]):(a=Math.max(A(n,r,e),1),e=c)}return null==a?e:e.every(a)}return l.invert=function(t){return new Date(h(t))},l.domain=function(t){return arguments.length?f(Up.call(t,am)):f().map(im)},l.ticks=function(t,e){var n,r=f(),i=r[0],a=r[r.length-1],o=a<i;return o&&(n=i,i=a,a=n),n=(n=w(t,i,a,e))?n.range(i,a+1):[],o?n.reverse():n},l.tickFormat=function(t,e){return null==e?k:u(e)},l.nice=function(t,e){var n=f();return(t=w(t,n[0],n[n.length-1],e))?f(uy(n,t)):l},l.copy=function(){return ny(l,om(t,e,n,r,a,o,s,c,u))},l}var sm=function(){return jp.apply(om(Iy,Py,zy,ng,ag,cg,hg,pg,Ug).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},cm=Dy((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),um=cm,lm=cm.range,hm=Dy((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()})),fm=hm,dm=hm.range,pm=Dy((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()})),ym=pm,gm=pm.range,vm=function(){return jp.apply(om(Ig,um,vg,Ng,fm,ym,hg,pg,qg).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)};function mm(){var t,e,n,r,i,a=0,o=1,s=Qp,c=!1;function u(e){return isNaN(e=+e)?i:s(0===n?.5:(e=(r(e)-t)*n,c?Math.max(0,Math.min(1,e)):e))}return u.domain=function(i){return arguments.length?(t=r(a=+i[0]),e=r(o=+i[1]),n=t===e?0:1/(e-t),u):[a,o]},u.clamp=function(t){return arguments.length?(c=!!t,u):c},u.interpolator=function(t){return arguments.length?(s=t,u):s},u.unknown=function(t){return arguments.length?(i=t,u):i},function(i){return r=i,t=i(a),e=i(o),n=t===e?0:1/(e-t),u}}function bm(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function xm(){var t=oy(mm()(Qp));return t.copy=function(){return bm(t,xm())},Yp.apply(t,arguments)}function _m(){var t=gy(mm()).domain([1,10]);return t.copy=function(){return bm(t,_m()).base(t.base())},Yp.apply(t,arguments)}function km(){var t=xy(mm());return t.copy=function(){return bm(t,km()).constant(t.constant())},Yp.apply(t,arguments)}function wm(){var t=Ty(mm());return t.copy=function(){return bm(t,wm()).exponent(t.exponent())},Yp.apply(t,arguments)}function Em(){return wm.apply(null,arguments).exponent(.5)}function Tm(){var t=[],e=Qp;function n(n){if(!isNaN(n=+n))return e((c(t,n)-1)/(t.length-1))}return n.domain=function(e){if(!arguments.length)return t.slice();t=[];for(var i,a=0,o=e.length;a<o;++a)null==(i=e[a])||isNaN(i=+i)||t.push(i);return t.sort(r),n},n.interpolator=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return Tm(e).domain(t)},Yp.apply(n,arguments)}function Cm(){var t,e,n,r,i,a,o,s=0,c=.5,u=1,l=Qp,h=!1;function f(t){return isNaN(t=+t)?o:(t=.5+((t=+a(t))-e)*(t<e?r:i),l(h?Math.max(0,Math.min(1,t)):t))}return f.domain=function(o){return arguments.length?(t=a(s=+o[0]),e=a(c=+o[1]),n=a(u=+o[2]),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),f):[s,c,u]},f.clamp=function(t){return arguments.length?(h=!!t,f):h},f.interpolator=function(t){return arguments.length?(l=t,f):l},f.unknown=function(t){return arguments.length?(o=t,f):o},function(o){return a=o,t=o(s),e=o(c),n=o(u),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),f}}function Sm(){var t=oy(Cm()(Qp));return t.copy=function(){return bm(t,Sm())},Yp.apply(t,arguments)}function Am(){var t=gy(Cm()).domain([.1,1,10]);return t.copy=function(){return bm(t,Am()).base(t.base())},Yp.apply(t,arguments)}function Mm(){var t=xy(Cm());return t.copy=function(){return bm(t,Mm()).constant(t.constant())},Yp.apply(t,arguments)}function Om(){var t=Ty(Cm());return t.copy=function(){return bm(t,Om()).exponent(t.exponent())},Yp.apply(t,arguments)}function Bm(){return Om.apply(null,arguments).exponent(.5)}var Nm=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n},Dm=Nm("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Lm=Nm("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Im=Nm("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Rm=Nm("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Fm=Nm("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Pm=Nm("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),jm=Nm("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Ym=Nm("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),zm=Nm("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Um=Nm("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),$m=function(t){return pn(t[t.length-1])},qm=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Nm),Wm=$m(qm),Vm=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Nm),Hm=$m(Vm),Gm=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Nm),Xm=$m(Gm),Zm=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Nm),Qm=$m(Zm),Km=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Nm),Jm=$m(Km),tb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Nm),eb=$m(tb),nb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Nm),rb=$m(nb),ib=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Nm),ab=$m(ib),ob=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Nm),sb=$m(ob),cb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Nm),ub=$m(cb),lb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Nm),hb=$m(lb),fb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Nm),db=$m(fb),pb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Nm),yb=$m(pb),gb=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Nm),vb=$m(gb),mb=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Nm),bb=$m(mb),xb=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Nm),_b=$m(xb),kb=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Nm),wb=$m(kb),Eb=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Nm),Tb=$m(Eb),Cb=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Nm),Sb=$m(Cb),Ab=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Nm),Mb=$m(Ab),Ob=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Nm),Bb=$m(Ob),Nb=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Nm),Db=$m(Nb),Lb=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Nm),Ib=$m(Lb),Rb=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Nm),Fb=$m(Rb),Pb=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Nm),jb=$m(Pb),Yb=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Nm),zb=$m(Yb),Ub=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Nm),$b=$m(Ub),qb=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},Wb=kp(Oa(300,.5,0),Oa(-240,.5,1)),Vb=kp(Oa(-100,.75,.35),Oa(80,1.5,.8)),Hb=kp(Oa(260,.75,.35),Oa(80,1.5,.8)),Gb=Oa(),Xb=function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return Gb.h=360*t-100,Gb.s=1.5-1.5*e,Gb.l=.8-.9*e,Gb+""},Zb=He(),Qb=Math.PI/3,Kb=2*Math.PI/3,Jb=function(t){var e;return t=(.5-t)*Math.PI,Zb.r=255*(e=Math.sin(t))*e,Zb.g=255*(e=Math.sin(t+Qb))*e,Zb.b=255*(e=Math.sin(t+Kb))*e,Zb+""},tx=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"};function ex(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var nx=ex(Nm("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),rx=ex(Nm("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),ix=ex(Nm("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ax=ex(Nm("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),ox=function(t){return ke(ne(t).call(document.documentElement))},sx=0;function cx(){return new ux}function ux(){this._="@"+(++sx).toString(36)}ux.prototype=cx.prototype={constructor:ux,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var lx=function(t){return"string"==typeof t?new be([document.querySelectorAll(t)],[document.documentElement]):new be([null==t?[]:t],me)},hx=function(t,e){null==e&&(e=Mn().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=On(t,e[n]);return i},fx=function(t){return function(){return t}},dx=Math.abs,px=Math.atan2,yx=Math.cos,gx=Math.max,vx=Math.min,mx=Math.sin,bx=Math.sqrt,xx=Math.PI,_x=xx/2,kx=2*xx;function wx(t){return t>1?0:t<-1?xx:Math.acos(t)}function Ex(t){return t>=1?_x:t<=-1?-_x:Math.asin(t)}function Tx(t){return t.innerRadius}function Cx(t){return t.outerRadius}function Sx(t){return t.startAngle}function Ax(t){return t.endAngle}function Mx(t){return t&&t.padAngle}function Ox(t,e,n,r,i,a,o,s){var c=n-t,u=r-e,l=o-i,h=s-a,f=h*c-l*u;if(!(f*f<1e-12))return[t+(f=(l*(e-a)-h*(t-i))/f)*c,e+f*u]}function Bx(t,e,n,r,i,a,o){var s=t-n,c=e-r,u=(o?a:-a)/bx(s*s+c*c),l=u*c,h=-u*s,f=t+l,d=e+h,p=n+l,y=r+h,g=(f+p)/2,v=(d+y)/2,m=p-f,b=y-d,x=m*m+b*b,_=i-a,k=f*y-p*d,w=(b<0?-1:1)*bx(gx(0,_*_*x-k*k)),E=(k*b-m*w)/x,T=(-k*m-b*w)/x,C=(k*b+m*w)/x,S=(-k*m+b*w)/x,A=E-g,M=T-v,O=C-g,B=S-v;return A*A+M*M>O*O+B*B&&(E=C,T=S),{cx:E,cy:T,x01:-l,y01:-h,x11:E*(i/_-1),y11:T*(i/_-1)}}var Nx=function(){var t=Tx,e=Cx,n=fx(0),r=null,i=Sx,a=Ax,o=Mx,s=null;function c(){var c,u,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-_x,d=a.apply(this,arguments)-_x,p=dx(d-f),y=d>f;if(s||(s=c=Ui()),h<l&&(u=h,h=l,l=u),h>1e-12)if(p>kx-1e-12)s.moveTo(h*yx(f),h*mx(f)),s.arc(0,0,h,f,d,!y),l>1e-12&&(s.moveTo(l*yx(d),l*mx(d)),s.arc(0,0,l,d,f,y));else{var g,v,m=f,b=d,x=f,_=d,k=p,w=p,E=o.apply(this,arguments)/2,T=E>1e-12&&(r?+r.apply(this,arguments):bx(l*l+h*h)),C=vx(dx(h-l)/2,+n.apply(this,arguments)),S=C,A=C;if(T>1e-12){var M=Ex(T/l*mx(E)),O=Ex(T/h*mx(E));(k-=2*M)>1e-12?(x+=M*=y?1:-1,_-=M):(k=0,x=_=(f+d)/2),(w-=2*O)>1e-12?(m+=O*=y?1:-1,b-=O):(w=0,m=b=(f+d)/2)}var B=h*yx(m),N=h*mx(m),D=l*yx(_),L=l*mx(_);if(C>1e-12){var I,R=h*yx(b),F=h*mx(b),P=l*yx(x),j=l*mx(x);if(p<xx&&(I=Ox(B,N,P,j,R,F,D,L))){var Y=B-I[0],z=N-I[1],U=R-I[0],$=F-I[1],q=1/mx(wx((Y*U+z*$)/(bx(Y*Y+z*z)*bx(U*U+$*$)))/2),W=bx(I[0]*I[0]+I[1]*I[1]);S=vx(C,(l-W)/(q-1)),A=vx(C,(h-W)/(q+1))}}w>1e-12?A>1e-12?(g=Bx(P,j,B,N,h,A,y),v=Bx(R,F,D,L,h,A,y),s.moveTo(g.cx+g.x01,g.cy+g.y01),A<C?s.arc(g.cx,g.cy,A,px(g.y01,g.x01),px(v.y01,v.x01),!y):(s.arc(g.cx,g.cy,A,px(g.y01,g.x01),px(g.y11,g.x11),!y),s.arc(0,0,h,px(g.cy+g.y11,g.cx+g.x11),px(v.cy+v.y11,v.cx+v.x11),!y),s.arc(v.cx,v.cy,A,px(v.y11,v.x11),px(v.y01,v.x01),!y))):(s.moveTo(B,N),s.arc(0,0,h,m,b,!y)):s.moveTo(B,N),l>1e-12&&k>1e-12?S>1e-12?(g=Bx(D,L,R,F,l,-S,y),v=Bx(B,N,P,j,l,-S,y),s.lineTo(g.cx+g.x01,g.cy+g.y01),S<C?s.arc(g.cx,g.cy,S,px(g.y01,g.x01),px(v.y01,v.x01),!y):(s.arc(g.cx,g.cy,S,px(g.y01,g.x01),px(g.y11,g.x11),!y),s.arc(0,0,l,px(g.cy+g.y11,g.cx+g.x11),px(v.cy+v.y11,v.cx+v.x11),y),s.arc(v.cx,v.cy,S,px(v.y11,v.x11),px(v.y01,v.x01),!y))):s.arc(0,0,l,_,x,y):s.lineTo(D,L)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-xx/2;return[yx(r)*n,mx(r)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:fx(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:fx(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:fx(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:fx(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:fx(+t),c):i},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:fx(+t),c):a},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:fx(+t),c):o},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c};function Dx(t){this._context=t}Dx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var Lx=function(t){return new Dx(t)};function Ix(t){return t[0]}function Rx(t){return t[1]}var Fx=function(){var t=Ix,e=Rx,n=fx(!0),r=null,i=Lx,a=null;function o(o){var s,c,u,l=o.length,h=!1;for(null==r&&(a=i(u=Ui())),s=0;s<=l;++s)!(s<l&&n(c=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(c,s,o),+e(c,s,o));if(u)return a=null,u+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:fx(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:fx(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:fx(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o},Px=function(){var t=Ix,e=null,n=fx(0),r=Rx,i=fx(!0),a=null,o=Lx,s=null;function c(c){var u,l,h,f,d,p=c.length,y=!1,g=new Array(p),v=new Array(p);for(null==a&&(s=o(d=Ui())),u=0;u<=p;++u){if(!(u<p&&i(f=c[u],u,c))===y)if(y=!y)l=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=u-1;h>=l;--h)s.point(g[h],v[h]);s.lineEnd(),s.areaEnd()}y&&(g[u]=+t(f,u,c),v[u]=+n(f,u,c),s.point(e?+e(f,u,c):g[u],r?+r(f,u,c):v[u]))}if(d)return s=null,d+""||null}function u(){return Fx().defined(i).curve(o).context(a)}return c.x=function(n){return arguments.length?(t="function"==typeof n?n:fx(+n),e=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:fx(+e),c):t},c.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:fx(+t),c):e},c.y=function(t){return arguments.length?(n="function"==typeof t?t:fx(+t),r=null,c):n},c.y0=function(t){return arguments.length?(n="function"==typeof t?t:fx(+t),c):n},c.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:fx(+t),c):r},c.lineX0=c.lineY0=function(){return u().x(t).y(n)},c.lineY1=function(){return u().x(t).y(r)},c.lineX1=function(){return u().x(e).y(n)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:fx(!!t),c):i},c.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),c):a},c},jx=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},Yx=function(t){return t},zx=function(){var t=Yx,e=jx,n=null,r=fx(0),i=fx(kx),a=fx(0);function o(o){var s,c,u,l,h,f=o.length,d=0,p=new Array(f),y=new Array(f),g=+r.apply(this,arguments),v=Math.min(kx,Math.max(-kx,i.apply(this,arguments)-g)),m=Math.min(Math.abs(v)/f,a.apply(this,arguments)),b=m*(v<0?-1:1);for(s=0;s<f;++s)(h=y[p[s]=s]=+t(o[s],s,o))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(y[t],y[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),s=0,u=d?(v-f*b)/d:0;s<f;++s,g=l)c=p[s],l=g+((h=y[c])>0?h*u:0)+b,y[c]={data:o[c],index:s,value:h,startAngle:g,endAngle:l,padAngle:m};return y}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:fx(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:fx(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:fx(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:fx(+t),o):a},o},Ux=qx(Lx);function $x(t){this._curve=t}function qx(t){function e(e){return new $x(t(e))}return e._curve=t,e}function Wx(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(qx(t)):e()._curve},t}$x.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var Vx=function(){return Wx(Fx().curve(Ux))},Hx=function(){var t=Px().curve(Ux),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Wx(n())},delete t.lineX0,t.lineEndAngle=function(){return Wx(r())},delete t.lineX1,t.lineInnerRadius=function(){return Wx(i())},delete t.lineY0,t.lineOuterRadius=function(){return Wx(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(qx(t)):e()._curve},t},Gx=function(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]},Xx=Array.prototype.slice;function Zx(t){return t.source}function Qx(t){return t.target}function Kx(t){var e=Zx,n=Qx,r=Ix,i=Rx,a=null;function o(){var o,s=Xx.call(arguments),c=e.apply(this,s),u=n.apply(this,s);if(a||(a=o=Ui()),t(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=u,s)),+i.apply(this,s)),o)return a=null,o+""||null}return o.source=function(t){return arguments.length?(e=t,o):e},o.target=function(t){return arguments.length?(n=t,o):n},o.x=function(t){return arguments.length?(r="function"==typeof t?t:fx(+t),o):r},o.y=function(t){return arguments.length?(i="function"==typeof t?t:fx(+t),o):i},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}function Jx(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function t_(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function e_(t,e,n,r,i){var a=Gx(e,n),o=Gx(e,n=(n+i)/2),s=Gx(r,n),c=Gx(r,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],c[0],c[1])}function n_(){return Kx(Jx)}function r_(){return Kx(t_)}function i_(){var t=Kx(e_);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var a_={draw:function(t,e){var n=Math.sqrt(e/xx);t.moveTo(n,0),t.arc(0,0,n,0,kx)}},o_={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},s_=Math.sqrt(1/3),c_=2*s_,u_={draw:function(t,e){var n=Math.sqrt(e/c_),r=n*s_;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},l_=Math.sin(xx/10)/Math.sin(7*xx/10),h_=Math.sin(kx/10)*l_,f_=-Math.cos(kx/10)*l_,d_={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=h_*n,i=f_*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=kx*a/5,s=Math.cos(o),c=Math.sin(o);t.lineTo(c*n,-s*n),t.lineTo(s*r-c*i,c*r+s*i)}t.closePath()}},p_={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},y_=Math.sqrt(3),g_={draw:function(t,e){var n=-Math.sqrt(e/(3*y_));t.moveTo(0,2*n),t.lineTo(-y_*n,-n),t.lineTo(y_*n,-n),t.closePath()}},v_=Math.sqrt(3)/2,m_=1/Math.sqrt(12),b_=3*(m_/2+1),x_={draw:function(t,e){var n=Math.sqrt(e/b_),r=n/2,i=n*m_,a=r,o=n*m_+n,s=-a,c=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,c),t.lineTo(-.5*r-v_*i,v_*r+-.5*i),t.lineTo(-.5*a-v_*o,v_*a+-.5*o),t.lineTo(-.5*s-v_*c,v_*s+-.5*c),t.lineTo(-.5*r+v_*i,-.5*i-v_*r),t.lineTo(-.5*a+v_*o,-.5*o-v_*a),t.lineTo(-.5*s+v_*c,-.5*c-v_*s),t.closePath()}},__=[a_,o_,u_,p_,d_,g_,x_],k_=function(){var t=fx(a_),e=fx(64),n=null;function r(){var r;if(n||(n=r=Ui()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:fx(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:fx(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r},w_=function(){};function E_(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function T_(t){this._context=t}T_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:E_(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:E_(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var C_=function(t){return new T_(t)};function S_(t){this._context=t}S_.prototype={areaStart:w_,areaEnd:w_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:E_(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var A_=function(t){return new S_(t)};function M_(t){this._context=t}M_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:E_(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var O_=function(t){return new M_(t)};function B_(t,e){this._basis=new T_(t),this._beta=e}B_.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,s=e[n]-a,c=-1;++c<=n;)r=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*e[c]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var N_=function t(e){function n(t){return 1===e?new T_(t):new B_(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function D_(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function L_(t,e){this._context=t,this._k=(1-e)/6}L_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:D_(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:D_(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var I_=function t(e){function n(t){return new L_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function R_(t,e){this._context=t,this._k=(1-e)/6}R_.prototype={areaStart:w_,areaEnd:w_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:D_(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var F_=function t(e){function n(t){return new R_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function P_(t,e){this._context=t,this._k=(1-e)/6}P_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:D_(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var j_=function t(e){function n(t){return new P_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Y_(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>1e-12){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function z_(t,e){this._context=t,this._alpha=e}z_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Y_(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var U_=function t(e){function n(t){return e?new z_(t,e):new L_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function $_(t,e){this._context=t,this._alpha=e}$_.prototype={areaStart:w_,areaEnd:w_,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Y_(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var q_=function t(e){function n(t){return e?new $_(t,e):new R_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function W_(t,e){this._context=t,this._alpha=e}W_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Y_(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var V_=function t(e){function n(t){return e?new W_(t,e):new P_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function H_(t){this._context=t}H_.prototype={areaStart:w_,areaEnd:w_,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};var G_=function(t){return new H_(t)};function X_(t){return t<0?-1:1}function Z_(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(X_(a)+X_(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Q_(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function K_(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function J_(t){this._context=t}function tk(t){this._context=new ek(t)}function ek(t){this._context=t}function nk(t){return new J_(t)}function rk(t){return new tk(t)}function ik(t){this._context=t}function ak(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}J_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:K_(this,this._t0,Q_(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,K_(this,Q_(this,n=Z_(this,t,e)),n);break;default:K_(this,this._t0,n=Z_(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(tk.prototype=Object.create(J_.prototype)).point=function(t,e){J_.prototype.point.call(this,e,t)},ek.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},ik.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=ak(t),i=ak(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var ok=function(t){return new ik(t)};function sk(t,e){this._context=t,this._t=e}sk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var ck=function(t){return new sk(t,.5)};function uk(t){return new sk(t,0)}function lk(t){return new sk(t,1)}var hk=function(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a<i;++a)for(r=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]},fk=function(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n};function dk(t,e){return t[e]}var pk=function(){var t=fx([]),e=fk,n=hk,r=dk;function i(i){var a,o,s=t.apply(this,arguments),c=i.length,u=s.length,l=new Array(u);for(a=0;a<u;++a){for(var h,f=s[a],d=l[a]=new Array(c),p=0;p<c;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.key=f}for(a=0,o=e(l);a<u;++a)l[o[a]].index=a;return n(l,o),l}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:fx(Xx.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:fx(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?fk:"function"==typeof t?t:fx(Xx.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?hk:t,i):n},i},yk=function(t,e){if((r=t.length)>0){for(var n,r,i,a=0,o=t[0].length;a<o;++a){for(i=n=0;n<r;++n)i+=t[n][a][1]||0;if(i)for(n=0;n<r;++n)t[n][a][1]/=i}hk(t,e)}},gk=function(t,e){if((s=t.length)>0)for(var n,r,i,a,o,s,c=0,u=t[e[0]].length;c<u;++c)for(a=o=0,n=0;n<s;++n)(i=(r=t[e[n]][c])[1]-r[0])>0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)},vk=function(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],a=i.length;r<a;++r){for(var o=0,s=0;o<n;++o)s+=t[o][r][1]||0;i[r][1]+=i[r][0]=-s/2}hk(t,e)}},mk=function(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,a=0,o=1;o<r;++o){for(var s=0,c=0,u=0;s<i;++s){for(var l=t[e[s]],h=l[o][1]||0,f=(h-(l[o-1][1]||0))/2,d=0;d<s;++d){var p=t[e[d]];f+=(p[o][1]||0)-(p[o-1][1]||0)}c+=h,u+=f*h}n[o-1][1]+=n[o-1][0]=a,c&&(a-=u/c)}n[o-1][1]+=n[o-1][0]=a,hk(t,e)}},bk=function(t){var e=t.map(xk);return fk(t).sort((function(t,n){return e[t]-e[n]}))};function xk(t){for(var e,n=-1,r=0,i=t.length,a=-1/0;++n<i;)(e=+t[n][1])>a&&(a=e,r=n);return r}var _k=function(t){var e=t.map(kk);return fk(t).sort((function(t,n){return e[t]-e[n]}))};function kk(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}var wk=function(t){return _k(t).reverse()},Ek=function(t){var e,n,r=t.length,i=t.map(kk),a=bk(t),o=0,s=0,c=[],u=[];for(e=0;e<r;++e)n=a[e],o<s?(o+=i[n],c.push(n)):(s+=i[n],u.push(n));return u.reverse().concat(c)},Tk=function(t){return fk(t).reverse()};var Ck=Date.prototype.toISOString?function(t){return t.toISOString()}:qg("%Y-%m-%dT%H:%M:%S.%LZ");var Sk=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:Wg("%Y-%m-%dT%H:%M:%S.%LZ"),Ak=function(t,e,n){var r=new $n,i=e;return null==e?(r.restart(t,e,n),r):(e=+e,n=null==n?zn():+n,r.restart((function a(o){o+=i,r.restart(a,i+=e,n),t(o)}),e,n),r)},Mk=function(t){return function(){return t}};function Ok(t){return t[0]}function Bk(t){return t[1]}function Nk(){this._=null}function Dk(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Lk(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Ik(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Rk(t){for(;t.L;)t=t.L;return t}Nk.prototype={constructor:Nk,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=Rk(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(Lk(this,n),n=(t=n).U),n.C=!1,r.C=!0,Ik(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(Ik(this,n),n=(t=n).U),n.C=!1,r.C=!0,Lk(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,a=t.L,o=t.R;if(n=a?o?Rk(o):a:o,i?i.L===t?i.L=n:i.R=n:this._=n,a&&o?(r=n.C,n.C=t.C,n.L=a,a.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Lk(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Ik(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Lk(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Ik(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Lk(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Ik(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Fk=Nk;function Pk(t,e,n,r){var i=[null,null],a=cw.push(i)-1;return i.left=t,i.right=e,n&&Yk(i,t,e,n),r&&Yk(i,e,t,r),ow[t.index].halfedges.push(a),ow[e.index].halfedges.push(a),i}function jk(t,e,n){var r=[e,n];return r.left=t,r}function Yk(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function zk(t,e,n,r,i){var a,o=t[0],s=t[1],c=o[0],u=o[1],l=0,h=1,f=s[0]-c,d=s[1]-u;if(a=e-c,f||!(a>0)){if(a/=f,f<0){if(a<l)return;a<h&&(h=a)}else if(f>0){if(a>h)return;a>l&&(l=a)}if(a=r-c,f||!(a<0)){if(a/=f,f<0){if(a>h)return;a>l&&(l=a)}else if(f>0){if(a<l)return;a<h&&(h=a)}if(a=n-u,d||!(a>0)){if(a/=d,d<0){if(a<l)return;a<h&&(h=a)}else if(d>0){if(a>h)return;a>l&&(l=a)}if(a=i-u,d||!(a<0)){if(a/=d,d<0){if(a>h)return;a>l&&(l=a)}else if(d>0){if(a<l)return;a<h&&(h=a)}return!(l>0||h<1)||(l>0&&(t[0]=[c+l*f,u+l*d]),h<1&&(t[1]=[c+h*f,u+h*d]),!0)}}}}}function Uk(t,e,n,r,i){var a=t[1];if(a)return!0;var o,s,c=t[0],u=t.left,l=t.right,h=u[0],f=u[1],d=l[0],p=l[1],y=(h+d)/2,g=(f+p)/2;if(p===f){if(y<e||y>=r)return;if(h>d){if(c){if(c[1]>=i)return}else c=[y,n];a=[y,i]}else{if(c){if(c[1]<n)return}else c=[y,i];a=[y,n]}}else if(s=g-(o=(h-d)/(p-f))*y,o<-1||o>1)if(h>d){if(c){if(c[1]>=i)return}else c=[(n-s)/o,n];a=[(i-s)/o,i]}else{if(c){if(c[1]<n)return}else c=[(i-s)/o,i];a=[(n-s)/o,n]}else if(f<p){if(c){if(c[0]>=r)return}else c=[e,o*e+s];a=[r,o*r+s]}else{if(c){if(c[0]<e)return}else c=[r,o*r+s];a=[e,o*e+s]}return t[0]=c,t[1]=a,!0}function $k(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function qk(t,e){return e[+(e.left!==t.site)]}function Wk(t,e){return e[+(e.left===t.site)]}var Vk,Hk=[];function Gk(){Dk(this),this.x=this.y=this.arc=this.site=this.cy=null}function Xk(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,a=n.site;if(r!==a){var o=i[0],s=i[1],c=r[0]-o,u=r[1]-s,l=a[0]-o,h=a[1]-s,f=2*(c*h-u*l);if(!(f>=-lw)){var d=c*c+u*u,p=l*l+h*h,y=(h*d-u*p)/f,g=(c*p-l*d)/f,v=Hk.pop()||new Gk;v.arc=t,v.site=i,v.x=y+o,v.y=(v.cy=g+s)+Math.sqrt(y*y+g*g),t.circle=v;for(var m=null,b=sw._;b;)if(v.y<b.y||v.y===b.y&&v.x<=b.x){if(!b.L){m=b.P;break}b=b.L}else{if(!b.R){m=b;break}b=b.R}sw.insert(m,v),m||(Vk=v)}}}}function Zk(t){var e=t.circle;e&&(e.P||(Vk=e.N),sw.remove(e),Hk.push(e),Dk(e),t.circle=null)}var Qk=[];function Kk(){Dk(this),this.edge=this.site=this.circle=null}function Jk(t){var e=Qk.pop()||new Kk;return e.site=t,e}function tw(t){Zk(t),aw.remove(t),Qk.push(t),Dk(t)}function ew(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,s=[t];tw(t);for(var c=a;c.circle&&Math.abs(n-c.circle.x)<uw&&Math.abs(r-c.circle.cy)<uw;)a=c.P,s.unshift(c),tw(c),c=a;s.unshift(c),Zk(c);for(var u=o;u.circle&&Math.abs(n-u.circle.x)<uw&&Math.abs(r-u.circle.cy)<uw;)o=u.N,s.push(u),tw(u),u=o;s.push(u),Zk(u);var l,h=s.length;for(l=1;l<h;++l)u=s[l],c=s[l-1],Yk(u.edge,c.site,u.site,i);c=s[0],(u=s[h-1]).edge=Pk(c.site,u.site,null,i),Xk(c),Xk(u)}function nw(t){for(var e,n,r,i,a=t[0],o=t[1],s=aw._;s;)if((r=rw(s,o)-a)>uw)s=s.L;else{if(!((i=a-iw(s,o))>uw)){r>-uw?(e=s.P,n=s):i>-uw?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){ow[t.index]={site:t,halfedges:[]}}(t);var c=Jk(t);if(aw.insert(e,c),e||n){if(e===n)return Zk(e),n=Jk(e.site),aw.insert(c,n),c.edge=n.edge=Pk(e.site,c.site),Xk(e),void Xk(n);if(n){Zk(e),Zk(n);var u=e.site,l=u[0],h=u[1],f=t[0]-l,d=t[1]-h,p=n.site,y=p[0]-l,g=p[1]-h,v=2*(f*g-d*y),m=f*f+d*d,b=y*y+g*g,x=[(g*m-d*b)/v+l,(f*b-y*m)/v+h];Yk(n.edge,u,p,x),c.edge=Pk(u,t,null,x),n.edge=Pk(t,p,null,x),Xk(e),Xk(n)}else c.edge=Pk(e.site,c.site)}}function rw(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var s=(n=o.site)[0],c=n[1],u=c-e;if(!u)return s;var l=s-r,h=1/a-1/u,f=l/u;return h?(-f+Math.sqrt(f*f-2*h*(l*l/(-2*u)-c+u/2+i-a/2)))/h+r:(r+s)/2}function iw(t,e){var n=t.N;if(n)return rw(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var aw,ow,sw,cw,uw=1e-6,lw=1e-12;function hw(t,e){return e[1]-t[1]||e[0]-t[0]}function fw(t,e){var n,r,i,a=t.sort(hw).pop();for(cw=[],ow=new Array(t.length),aw=new Fk,sw=new Fk;;)if(i=Vk,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(nw(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;ew(i.arc)}if(function(){for(var t,e,n,r,i=0,a=ow.length;i<a;++i)if((t=ow[i])&&(r=(e=t.halfedges).length)){var o=new Array(r),s=new Array(r);for(n=0;n<r;++n)o[n]=n,s[n]=$k(t,cw[e[n]]);for(o.sort((function(t,e){return s[e]-s[t]})),n=0;n<r;++n)s[n]=e[o[n]];for(n=0;n<r;++n)e[n]=s[n]}}(),e){var o=+e[0][0],s=+e[0][1],c=+e[1][0],u=+e[1][1];!function(t,e,n,r){for(var i,a=cw.length;a--;)Uk(i=cw[a],t,e,n,r)&&zk(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>uw||Math.abs(i[0][1]-i[1][1])>uw)||delete cw[a]}(o,s,c,u),function(t,e,n,r){var i,a,o,s,c,u,l,h,f,d,p,y,g=ow.length,v=!0;for(i=0;i<g;++i)if(a=ow[i]){for(o=a.site,s=(c=a.halfedges).length;s--;)cw[c[s]]||c.splice(s,1);for(s=0,u=c.length;s<u;)p=(d=Wk(a,cw[c[s]]))[0],y=d[1],h=(l=qk(a,cw[c[++s%u]]))[0],f=l[1],(Math.abs(p-h)>uw||Math.abs(y-f)>uw)&&(c.splice(s,0,cw.push(jk(o,d,Math.abs(p-t)<uw&&r-y>uw?[t,Math.abs(h-t)<uw?f:r]:Math.abs(y-r)<uw&&n-p>uw?[Math.abs(f-r)<uw?h:n,r]:Math.abs(p-n)<uw&&y-e>uw?[n,Math.abs(h-n)<uw?f:e]:Math.abs(y-e)<uw&&p-t>uw?[Math.abs(f-e)<uw?h:t,e]:null))-1),++u);u&&(v=!1)}if(v){var m,b,x,_=1/0;for(i=0,v=null;i<g;++i)(a=ow[i])&&(x=(m=(o=a.site)[0]-t)*m+(b=o[1]-e)*b)<_&&(_=x,v=a);if(v){var k=[t,e],w=[t,r],E=[n,r],T=[n,e];v.halfedges.push(cw.push(jk(o=v.site,k,w))-1,cw.push(jk(o,w,E))-1,cw.push(jk(o,E,T))-1,cw.push(jk(o,T,k))-1)}}for(i=0;i<g;++i)(a=ow[i])&&(a.halfedges.length||delete ow[i])}(o,s,c,u)}this.edges=cw,this.cells=ow,aw=sw=cw=ow=null}fw.prototype={constructor:fw,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return qk(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(a=(i=n.halfedges).length)for(var i,a,o,s,c,u,l=n.site,h=-1,f=e[i[a-1]],d=f.left===l?f.right:f.left;++h<a;)o=d,d=(f=e[i[h]]).left===l?f.right:f.left,o&&d&&r<o.index&&r<d.index&&(c=o,u=d,((s=l)[0]-u[0])*(c[1]-s[1])-(s[0]-c[0])*(u[1]-s[1])<0)&&t.push([l.data,o.data,d.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,a=this,o=a._found||0,s=a.cells.length;!(i=a.cells[o]);)if(++o>=s)return null;var c=t-i.site[0],u=e-i.site[1],l=c*c+u*u;do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var c=t-s[0],u=e-s[1],h=c*c+u*u;h<l&&(l=h,o=s.index)}}))}while(null!==o);return a._found=r,null==n||l<=n*n?i.site:null}};var dw=function(){var t=Ok,e=Bk,n=null;function r(r){return new fw(r.map((function(n,i){var a=[Math.round(t(n,i,r)/uw)*uw,Math.round(e(n,i,r)/uw)*uw];return a.index=i,a.data=n,a})),n)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(e){return arguments.length?(t="function"==typeof e?e:Mk(+e),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:Mk(+t),r):e},r.extent=function(t){return arguments.length?(n=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(t){return arguments.length?(n=null==t?null:[[0,0],[+t[0],+t[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r},pw=function(t){return function(){return t}};function yw(t,e,n){this.target=t,this.type=e,this.transform=n}function gw(t,e,n){this.k=t,this.x=e,this.y=n}gw.prototype={constructor:gw,scale:function(t){return 1===t?this:new gw(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new gw(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var vw=new gw(1,0,0);function mw(t){for(;!t.__zoom;)if(!(t=t.parentNode))return vw;return t.__zoom}function bw(){ce.stopImmediatePropagation()}mw.prototype=gw.prototype;var xw=function(){ce.preventDefault(),ce.stopImmediatePropagation()};function _w(){return!ce.ctrlKey&&!ce.button}function kw(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function ww(){return this.__zoom||vw}function Ew(){return-ce.deltaY*(1===ce.deltaMode?.05:ce.deltaMode?1:.002)}function Tw(){return navigator.maxTouchPoints||"ontouchstart"in this}function Cw(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}var Sw=function(){var t,e,n=_w,r=kw,i=Cw,a=Ew,o=Tw,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,l=fp,h=lt("start","zoom","end"),f=0;function d(t){t.property("__zoom",ww).on("wheel.zoom",x).on("mousedown.zoom",_).on("dblclick.zoom",k).filter(o).on("touchstart.zoom",w).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new gw(e,t.x,t.y)}function y(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new gw(t.k,r,i)}function g(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function v(t,e,n){t.on("start.zoom",(function(){m(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){m(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,a=m(t,i),o=r.apply(t,i),s=null==n?g(o):"function"==typeof n?n.apply(t,i):n,c=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),u=t.__zoom,h="function"==typeof e?e.apply(t,i):e,f=l(u.invert(s).concat(c/u.k),h.invert(s).concat(c/h.k));return function(t){if(1===t)t=h;else{var e=f(t),n=c/e[2];t=new gw(n,s[0]-e[0]*n,s[1]-e[1]*n)}a.zoom(null,t)}}))}function m(t,e,n){return!n&&t.__zooming||new b(t,e)}function b(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function x(){if(n.apply(this,arguments)){var t=m(this,arguments),e=this.__zoom,r=Math.max(s[0],Math.min(s[1],e.k*Math.pow(2,a.apply(this,arguments)))),o=Nn(this);if(t.wheel)t.mouse[0][0]===o[0]&&t.mouse[0][1]===o[1]||(t.mouse[1]=e.invert(t.mouse[0]=o)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[o,e.invert(o)],or(this),t.start()}xw(),t.wheel=setTimeout(u,150),t.zoom("mouse",i(y(p(e,r),t.mouse[0],t.mouse[1]),t.extent,c))}function u(){t.wheel=null,t.end()}}function _(){if(!e&&n.apply(this,arguments)){var t=m(this,arguments,!0),r=ke(ce.view).on("mousemove.zoom",u,!0).on("mouseup.zoom",l,!0),a=Nn(this),o=ce.clientX,s=ce.clientY;Te(ce.view),bw(),t.mouse=[a,this.__zoom.invert(a)],or(this),t.start()}function u(){if(xw(),!t.moved){var e=ce.clientX-o,n=ce.clientY-s;t.moved=e*e+n*n>f}t.zoom("mouse",i(y(t.that.__zoom,t.mouse[0]=Nn(t.that),t.mouse[1]),t.extent,c))}function l(){r.on("mousemove.zoom mouseup.zoom",null),Ce(ce.view,t.moved),xw(),t.end()}}function k(){if(n.apply(this,arguments)){var t=this.__zoom,e=Nn(this),a=t.invert(e),o=t.k*(ce.shiftKey?.5:2),s=i(y(p(t,o),e,a),r.apply(this,arguments),c);xw(),u>0?ke(this).transition().duration(u).call(v,s,e):ke(this).call(d.transform,s)}}function w(){if(n.apply(this,arguments)){var e,r,i,a,o=ce.touches,s=o.length,c=m(this,arguments,ce.changedTouches.length===s);for(bw(),r=0;r<s;++r)i=o[r],a=[a=Bn(this,o,i.identifier),this.__zoom.invert(a),i.identifier],c.touch0?c.touch1||c.touch0[2]===a[2]||(c.touch1=a,c.taps=0):(c.touch0=a,e=!0,c.taps=1+!!t);t&&(t=clearTimeout(t)),e&&(c.taps<2&&(t=setTimeout((function(){t=null}),500)),or(this),c.start())}}function E(){if(this.__zooming){var e,n,r,a,o=m(this,arguments),s=ce.changedTouches,u=s.length;for(xw(),t&&(t=clearTimeout(t)),o.taps=0,e=0;e<u;++e)n=s[e],r=Bn(this,s,n.identifier),o.touch0&&o.touch0[2]===n.identifier?o.touch0[0]=r:o.touch1&&o.touch1[2]===n.identifier&&(o.touch1[0]=r);if(n=o.that.__zoom,o.touch1){var l=o.touch0[0],h=o.touch0[1],f=o.touch1[0],d=o.touch1[1],g=(g=f[0]-l[0])*g+(g=f[1]-l[1])*g,v=(v=d[0]-h[0])*v+(v=d[1]-h[1])*v;n=p(n,Math.sqrt(g/v)),r=[(l[0]+f[0])/2,(l[1]+f[1])/2],a=[(h[0]+d[0])/2,(h[1]+d[1])/2]}else{if(!o.touch0)return;r=o.touch0[0],a=o.touch0[1]}o.zoom("touch",i(y(n,r,a),o.extent,c))}}function T(){if(this.__zooming){var t,n,r=m(this,arguments),i=ce.changedTouches,a=i.length;for(bw(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),500),t=0;t<a;++t)n=i[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),2===r.taps){var o=ke(this).on("dblclick.zoom");o&&o.apply(this,arguments)}}}return d.transform=function(t,e,n){var r=t.selection?t.selection():t;r.property("__zoom",ww),t!==r?v(t,e,n):r.interrupt().each((function(){m(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},d.scaleBy=function(t,e,n){d.scaleTo(t,(function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n}),n)},d.scaleTo=function(t,e,n){d.transform(t,(function(){var t=r.apply(this,arguments),a=this.__zoom,o=null==n?g(t):"function"==typeof n?n.apply(this,arguments):n,s=a.invert(o),u="function"==typeof e?e.apply(this,arguments):e;return i(y(p(a,u),o,s),t,c)}),n)},d.translateBy=function(t,e,n){d.transform(t,(function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),c)}))},d.translateTo=function(t,e,n,a){d.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,s=null==a?g(t):"function"==typeof a?a.apply(this,arguments):a;return i(vw.translate(s[0],s[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)}),a)},b.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){pe(new yw(d,t,this.that.__zoom),h.apply,h,[t,this.that,this.args])}},d.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:pw(+t),d):a},d.filter=function(t){return arguments.length?(n="function"==typeof t?t:pw(!!t),d):n},d.touchable=function(t){return arguments.length?(o="function"==typeof t?t:pw(!!t),d):o},d.extent=function(t){return arguments.length?(r="function"==typeof t?t:pw([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),d):r},d.scaleExtent=function(t){return arguments.length?(s[0]=+t[0],s[1]=+t[1],d):[s[0],s[1]]},d.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],d):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},d.constrain=function(t){return arguments.length?(i=t,d):i},d.duration=function(t){return arguments.length?(u=+t,d):u},d.interpolate=function(t){return arguments.length?(l=t,d):l},d.on=function(){var t=h.on.apply(h,arguments);return t===h?d:t},d.clickDistance=function(t){return arguments.length?(f=(t=+t)*t,d):Math.sqrt(f)},d};n.d(e,"version",(function(){return"5.15.0"})),n.d(e,"bisect",(function(){return c})),n.d(e,"bisectRight",(function(){return o})),n.d(e,"bisectLeft",(function(){return s})),n.d(e,"ascending",(function(){return r})),n.d(e,"bisector",(function(){return i})),n.d(e,"cross",(function(){return h})),n.d(e,"descending",(function(){return f})),n.d(e,"deviation",(function(){return y})),n.d(e,"extent",(function(){return g})),n.d(e,"histogram",(function(){return O})),n.d(e,"thresholdFreedmanDiaconis",(function(){return N})),n.d(e,"thresholdScott",(function(){return D})),n.d(e,"thresholdSturges",(function(){return M})),n.d(e,"max",(function(){return L})),n.d(e,"mean",(function(){return I})),n.d(e,"median",(function(){return R})),n.d(e,"merge",(function(){return F})),n.d(e,"min",(function(){return P})),n.d(e,"pairs",(function(){return u})),n.d(e,"permute",(function(){return j})),n.d(e,"quantile",(function(){return B})),n.d(e,"range",(function(){return k})),n.d(e,"scan",(function(){return Y})),n.d(e,"shuffle",(function(){return z})),n.d(e,"sum",(function(){return U})),n.d(e,"ticks",(function(){return C})),n.d(e,"tickIncrement",(function(){return S})),n.d(e,"tickStep",(function(){return A})),n.d(e,"transpose",(function(){return $})),n.d(e,"variance",(function(){return p})),n.d(e,"zip",(function(){return W})),n.d(e,"axisTop",(function(){return tt})),n.d(e,"axisRight",(function(){return et})),n.d(e,"axisBottom",(function(){return nt})),n.d(e,"axisLeft",(function(){return rt})),n.d(e,"brush",(function(){return Ti})),n.d(e,"brushX",(function(){return wi})),n.d(e,"brushY",(function(){return Ei})),n.d(e,"brushSelection",(function(){return ki})),n.d(e,"chord",(function(){return Li})),n.d(e,"ribbon",(function(){return Gi})),n.d(e,"nest",(function(){return Ki})),n.d(e,"set",(function(){return oa})),n.d(e,"map",(function(){return Qi})),n.d(e,"keys",(function(){return sa})),n.d(e,"values",(function(){return ca})),n.d(e,"entries",(function(){return ua})),n.d(e,"color",(function(){return $e})),n.d(e,"rgb",(function(){return He})),n.d(e,"hsl",(function(){return tn})),n.d(e,"lab",(function(){return pa})),n.d(e,"hcl",(function(){return ka})),n.d(e,"lch",(function(){return _a})),n.d(e,"gray",(function(){return da})),n.d(e,"cubehelix",(function(){return Oa})),n.d(e,"contours",(function(){return Ya})),n.d(e,"contourDensity",(function(){return Va})),n.d(e,"dispatch",(function(){return lt})),n.d(e,"drag",(function(){return Ja})),n.d(e,"dragDisable",(function(){return Te})),n.d(e,"dragEnable",(function(){return Ce})),n.d(e,"dsvFormat",(function(){return oo})),n.d(e,"csvParse",(function(){return co})),n.d(e,"csvParseRows",(function(){return uo})),n.d(e,"csvFormat",(function(){return lo})),n.d(e,"csvFormatBody",(function(){return ho})),n.d(e,"csvFormatRows",(function(){return fo})),n.d(e,"csvFormatRow",(function(){return po})),n.d(e,"csvFormatValue",(function(){return yo})),n.d(e,"tsvParse",(function(){return vo})),n.d(e,"tsvParseRows",(function(){return mo})),n.d(e,"tsvFormat",(function(){return bo})),n.d(e,"tsvFormatBody",(function(){return xo})),n.d(e,"tsvFormatRows",(function(){return _o})),n.d(e,"tsvFormatRow",(function(){return ko})),n.d(e,"tsvFormatValue",(function(){return wo})),n.d(e,"autoType",(function(){return Eo})),n.d(e,"easeLinear",(function(){return Co})),n.d(e,"easeQuad",(function(){return Mo})),n.d(e,"easeQuadIn",(function(){return So})),n.d(e,"easeQuadOut",(function(){return Ao})),n.d(e,"easeQuadInOut",(function(){return Mo})),n.d(e,"easeCubic",(function(){return Vr})),n.d(e,"easeCubicIn",(function(){return qr})),n.d(e,"easeCubicOut",(function(){return Wr})),n.d(e,"easeCubicInOut",(function(){return Vr})),n.d(e,"easePoly",(function(){return No})),n.d(e,"easePolyIn",(function(){return Oo})),n.d(e,"easePolyOut",(function(){return Bo})),n.d(e,"easePolyInOut",(function(){return No})),n.d(e,"easeSin",(function(){return Fo})),n.d(e,"easeSinIn",(function(){return Io})),n.d(e,"easeSinOut",(function(){return Ro})),n.d(e,"easeSinInOut",(function(){return Fo})),n.d(e,"easeExp",(function(){return Yo})),n.d(e,"easeExpIn",(function(){return Po})),n.d(e,"easeExpOut",(function(){return jo})),n.d(e,"easeExpInOut",(function(){return Yo})),n.d(e,"easeCircle",(function(){return $o})),n.d(e,"easeCircleIn",(function(){return zo})),n.d(e,"easeCircleOut",(function(){return Uo})),n.d(e,"easeCircleInOut",(function(){return $o})),n.d(e,"easeBounce",(function(){return Wo})),n.d(e,"easeBounceIn",(function(){return qo})),n.d(e,"easeBounceOut",(function(){return Wo})),n.d(e,"easeBounceInOut",(function(){return Vo})),n.d(e,"easeBack",(function(){return Xo})),n.d(e,"easeBackIn",(function(){return Ho})),n.d(e,"easeBackOut",(function(){return Go})),n.d(e,"easeBackInOut",(function(){return Xo})),n.d(e,"easeElastic",(function(){return Ko})),n.d(e,"easeElasticIn",(function(){return Qo})),n.d(e,"easeElasticOut",(function(){return Ko})),n.d(e,"easeElasticInOut",(function(){return Jo})),n.d(e,"blob",(function(){return es})),n.d(e,"buffer",(function(){return rs})),n.d(e,"dsv",(function(){return ss})),n.d(e,"csv",(function(){return cs})),n.d(e,"tsv",(function(){return us})),n.d(e,"image",(function(){return ls})),n.d(e,"json",(function(){return fs})),n.d(e,"text",(function(){return as})),n.d(e,"xml",(function(){return ps})),n.d(e,"html",(function(){return ys})),n.d(e,"svg",(function(){return gs})),n.d(e,"forceCenter",(function(){return vs})),n.d(e,"forceCollide",(function(){return Os})),n.d(e,"forceLink",(function(){return Ds})),n.d(e,"forceManyBody",(function(){return Ps})),n.d(e,"forceRadial",(function(){return js})),n.d(e,"forceSimulation",(function(){return Fs})),n.d(e,"forceX",(function(){return Ys})),n.d(e,"forceY",(function(){return zs})),n.d(e,"formatDefaultLocale",(function(){return rc})),n.d(e,"format",(function(){return Xs})),n.d(e,"formatPrefix",(function(){return Zs})),n.d(e,"formatLocale",(function(){return nc})),n.d(e,"formatSpecifier",(function(){return Ws})),n.d(e,"FormatSpecifier",(function(){return Vs})),n.d(e,"precisionFixed",(function(){return ic})),n.d(e,"precisionPrefix",(function(){return ac})),n.d(e,"precisionRound",(function(){return oc})),n.d(e,"geoArea",(function(){return Qc})),n.d(e,"geoBounds",(function(){return $u})),n.d(e,"geoCentroid",(function(){return el})),n.d(e,"geoCircle",(function(){return fl})),n.d(e,"geoClipAntimeridian",(function(){return El})),n.d(e,"geoClipCircle",(function(){return Tl})),n.d(e,"geoClipExtent",(function(){return Ol})),n.d(e,"geoClipRectangle",(function(){return Cl})),n.d(e,"geoContains",(function(){return Gl})),n.d(e,"geoDistance",(function(){return jl})),n.d(e,"geoGraticule",(function(){return Ql})),n.d(e,"geoGraticule10",(function(){return Kl})),n.d(e,"geoInterpolate",(function(){return rh})),n.d(e,"geoLength",(function(){return Rl})),n.d(e,"geoPath",(function(){return ef})),n.d(e,"geoAlbers",(function(){return _f})),n.d(e,"geoAlbersUsa",(function(){return kf})),n.d(e,"geoAzimuthalEqualArea",(function(){return Cf})),n.d(e,"geoAzimuthalEqualAreaRaw",(function(){return Tf})),n.d(e,"geoAzimuthalEquidistant",(function(){return Af})),n.d(e,"geoAzimuthalEquidistantRaw",(function(){return Sf})),n.d(e,"geoConicConformal",(function(){return Lf})),n.d(e,"geoConicConformalRaw",(function(){return Df})),n.d(e,"geoConicEqualArea",(function(){return xf})),n.d(e,"geoConicEqualAreaRaw",(function(){return bf})),n.d(e,"geoConicEquidistant",(function(){return Pf})),n.d(e,"geoConicEquidistantRaw",(function(){return Ff})),n.d(e,"geoEqualEarth",(function(){return Wf})),n.d(e,"geoEqualEarthRaw",(function(){return qf})),n.d(e,"geoEquirectangular",(function(){return Rf})),n.d(e,"geoEquirectangularRaw",(function(){return If})),n.d(e,"geoGnomonic",(function(){return Hf})),n.d(e,"geoGnomonicRaw",(function(){return Vf})),n.d(e,"geoIdentity",(function(){return Xf})),n.d(e,"geoProjection",(function(){return gf})),n.d(e,"geoProjectionMutator",(function(){return vf})),n.d(e,"geoMercator",(function(){return Of})),n.d(e,"geoMercatorRaw",(function(){return Mf})),n.d(e,"geoNaturalEarth1",(function(){return Qf})),n.d(e,"geoNaturalEarth1Raw",(function(){return Zf})),n.d(e,"geoOrthographic",(function(){return Jf})),n.d(e,"geoOrthographicRaw",(function(){return Kf})),n.d(e,"geoStereographic",(function(){return ed})),n.d(e,"geoStereographicRaw",(function(){return td})),n.d(e,"geoTransverseMercator",(function(){return rd})),n.d(e,"geoTransverseMercatorRaw",(function(){return nd})),n.d(e,"geoRotation",(function(){return ul})),n.d(e,"geoStream",(function(){return $c})),n.d(e,"geoTransform",(function(){return nf})),n.d(e,"cluster",(function(){return sd})),n.d(e,"hierarchy",(function(){return ud})),n.d(e,"pack",(function(){return Ld})),n.d(e,"packSiblings",(function(){return Ad})),n.d(e,"packEnclose",(function(){return yd})),n.d(e,"partition",(function(){return Yd})),n.d(e,"stratify",(function(){return Wd})),n.d(e,"tree",(function(){return Kd})),n.d(e,"treemap",(function(){return rp})),n.d(e,"treemapBinary",(function(){return ip})),n.d(e,"treemapDice",(function(){return jd})),n.d(e,"treemapSlice",(function(){return Jd})),n.d(e,"treemapSliceDice",(function(){return ap})),n.d(e,"treemapSquarify",(function(){return np})),n.d(e,"treemapResquarify",(function(){return op})),n.d(e,"interpolate",(function(){return An})),n.d(e,"interpolateArray",(function(){return mn})),n.d(e,"interpolateBasis",(function(){return an})),n.d(e,"interpolateBasisClosed",(function(){return on})),n.d(e,"interpolateDate",(function(){return xn})),n.d(e,"interpolateDiscrete",(function(){return sp})),n.d(e,"interpolateHue",(function(){return cp})),n.d(e,"interpolateNumber",(function(){return _n})),n.d(e,"interpolateNumberArray",(function(){return gn})),n.d(e,"interpolateObject",(function(){return kn})),n.d(e,"interpolateRound",(function(){return up})),n.d(e,"interpolateString",(function(){return Sn})),n.d(e,"interpolateTransformCss",(function(){return hr})),n.d(e,"interpolateTransformSvg",(function(){return fr})),n.d(e,"interpolateZoom",(function(){return fp})),n.d(e,"interpolateRgb",(function(){return fn})),n.d(e,"interpolateRgbBasis",(function(){return pn})),n.d(e,"interpolateRgbBasisClosed",(function(){return yn})),n.d(e,"interpolateHsl",(function(){return pp})),n.d(e,"interpolateHslLong",(function(){return yp})),n.d(e,"interpolateLab",(function(){return gp})),n.d(e,"interpolateHcl",(function(){return mp})),n.d(e,"interpolateHclLong",(function(){return bp})),n.d(e,"interpolateCubehelix",(function(){return _p})),n.d(e,"interpolateCubehelixLong",(function(){return kp})),n.d(e,"piecewise",(function(){return wp})),n.d(e,"quantize",(function(){return Ep})),n.d(e,"path",(function(){return Ui})),n.d(e,"polygonArea",(function(){return Tp})),n.d(e,"polygonCentroid",(function(){return Cp})),n.d(e,"polygonHull",(function(){return Mp})),n.d(e,"polygonContains",(function(){return Op})),n.d(e,"polygonLength",(function(){return Bp})),n.d(e,"quadtree",(function(){return Es})),n.d(e,"randomUniform",(function(){return Dp})),n.d(e,"randomNormal",(function(){return Lp})),n.d(e,"randomLogNormal",(function(){return Ip})),n.d(e,"randomBates",(function(){return Fp})),n.d(e,"randomIrwinHall",(function(){return Rp})),n.d(e,"randomExponential",(function(){return Pp})),n.d(e,"scaleBand",(function(){return Vp})),n.d(e,"scalePoint",(function(){return Gp})),n.d(e,"scaleIdentity",(function(){return cy})),n.d(e,"scaleLinear",(function(){return sy})),n.d(e,"scaleLog",(function(){return vy})),n.d(e,"scaleSymlog",(function(){return _y})),n.d(e,"scaleOrdinal",(function(){return Wp})),n.d(e,"scaleImplicit",(function(){return qp})),n.d(e,"scalePow",(function(){return Cy})),n.d(e,"scaleSqrt",(function(){return Sy})),n.d(e,"scaleQuantile",(function(){return Ay})),n.d(e,"scaleQuantize",(function(){return My})),n.d(e,"scaleThreshold",(function(){return Oy})),n.d(e,"scaleTime",(function(){return sm})),n.d(e,"scaleUtc",(function(){return vm})),n.d(e,"scaleSequential",(function(){return xm})),n.d(e,"scaleSequentialLog",(function(){return _m})),n.d(e,"scaleSequentialPow",(function(){return wm})),n.d(e,"scaleSequentialSqrt",(function(){return Em})),n.d(e,"scaleSequentialSymlog",(function(){return km})),n.d(e,"scaleSequentialQuantile",(function(){return Tm})),n.d(e,"scaleDiverging",(function(){return Sm})),n.d(e,"scaleDivergingLog",(function(){return Am})),n.d(e,"scaleDivergingPow",(function(){return Om})),n.d(e,"scaleDivergingSqrt",(function(){return Bm})),n.d(e,"scaleDivergingSymlog",(function(){return Mm})),n.d(e,"tickFormat",(function(){return ay})),n.d(e,"schemeCategory10",(function(){return Dm})),n.d(e,"schemeAccent",(function(){return Lm})),n.d(e,"schemeDark2",(function(){return Im})),n.d(e,"schemePaired",(function(){return Rm})),n.d(e,"schemePastel1",(function(){return Fm})),n.d(e,"schemePastel2",(function(){return Pm})),n.d(e,"schemeSet1",(function(){return jm})),n.d(e,"schemeSet2",(function(){return Ym})),n.d(e,"schemeSet3",(function(){return zm})),n.d(e,"schemeTableau10",(function(){return Um})),n.d(e,"interpolateBrBG",(function(){return Wm})),n.d(e,"schemeBrBG",(function(){return qm})),n.d(e,"interpolatePRGn",(function(){return Hm})),n.d(e,"schemePRGn",(function(){return Vm})),n.d(e,"interpolatePiYG",(function(){return Xm})),n.d(e,"schemePiYG",(function(){return Gm})),n.d(e,"interpolatePuOr",(function(){return Qm})),n.d(e,"schemePuOr",(function(){return Zm})),n.d(e,"interpolateRdBu",(function(){return Jm})),n.d(e,"schemeRdBu",(function(){return Km})),n.d(e,"interpolateRdGy",(function(){return eb})),n.d(e,"schemeRdGy",(function(){return tb})),n.d(e,"interpolateRdYlBu",(function(){return rb})),n.d(e,"schemeRdYlBu",(function(){return nb})),n.d(e,"interpolateRdYlGn",(function(){return ab})),n.d(e,"schemeRdYlGn",(function(){return ib})),n.d(e,"interpolateSpectral",(function(){return sb})),n.d(e,"schemeSpectral",(function(){return ob})),n.d(e,"interpolateBuGn",(function(){return ub})),n.d(e,"schemeBuGn",(function(){return cb})),n.d(e,"interpolateBuPu",(function(){return hb})),n.d(e,"schemeBuPu",(function(){return lb})),n.d(e,"interpolateGnBu",(function(){return db})),n.d(e,"schemeGnBu",(function(){return fb})),n.d(e,"interpolateOrRd",(function(){return yb})),n.d(e,"schemeOrRd",(function(){return pb})),n.d(e,"interpolatePuBuGn",(function(){return vb})),n.d(e,"schemePuBuGn",(function(){return gb})),n.d(e,"interpolatePuBu",(function(){return bb})),n.d(e,"schemePuBu",(function(){return mb})),n.d(e,"interpolatePuRd",(function(){return _b})),n.d(e,"schemePuRd",(function(){return xb})),n.d(e,"interpolateRdPu",(function(){return wb})),n.d(e,"schemeRdPu",(function(){return kb})),n.d(e,"interpolateYlGnBu",(function(){return Tb})),n.d(e,"schemeYlGnBu",(function(){return Eb})),n.d(e,"interpolateYlGn",(function(){return Sb})),n.d(e,"schemeYlGn",(function(){return Cb})),n.d(e,"interpolateYlOrBr",(function(){return Mb})),n.d(e,"schemeYlOrBr",(function(){return Ab})),n.d(e,"interpolateYlOrRd",(function(){return Bb})),n.d(e,"schemeYlOrRd",(function(){return Ob})),n.d(e,"interpolateBlues",(function(){return Db})),n.d(e,"schemeBlues",(function(){return Nb})),n.d(e,"interpolateGreens",(function(){return Ib})),n.d(e,"schemeGreens",(function(){return Lb})),n.d(e,"interpolateGreys",(function(){return Fb})),n.d(e,"schemeGreys",(function(){return Rb})),n.d(e,"interpolatePurples",(function(){return jb})),n.d(e,"schemePurples",(function(){return Pb})),n.d(e,"interpolateReds",(function(){return zb})),n.d(e,"schemeReds",(function(){return Yb})),n.d(e,"interpolateOranges",(function(){return $b})),n.d(e,"schemeOranges",(function(){return Ub})),n.d(e,"interpolateCividis",(function(){return qb})),n.d(e,"interpolateCubehelixDefault",(function(){return Wb})),n.d(e,"interpolateRainbow",(function(){return Xb})),n.d(e,"interpolateWarm",(function(){return Vb})),n.d(e,"interpolateCool",(function(){return Hb})),n.d(e,"interpolateSinebow",(function(){return Jb})),n.d(e,"interpolateTurbo",(function(){return tx})),n.d(e,"interpolateViridis",(function(){return nx})),n.d(e,"interpolateMagma",(function(){return rx})),n.d(e,"interpolateInferno",(function(){return ix})),n.d(e,"interpolatePlasma",(function(){return ax})),n.d(e,"create",(function(){return ox})),n.d(e,"creator",(function(){return ne})),n.d(e,"local",(function(){return cx})),n.d(e,"matcher",(function(){return yt})),n.d(e,"mouse",(function(){return Nn})),n.d(e,"namespace",(function(){return wt})),n.d(e,"namespaces",(function(){return kt})),n.d(e,"clientPoint",(function(){return On})),n.d(e,"select",(function(){return ke})),n.d(e,"selectAll",(function(){return lx})),n.d(e,"selection",(function(){return _e})),n.d(e,"selector",(function(){return ft})),n.d(e,"selectorAll",(function(){return pt})),n.d(e,"style",(function(){return Lt})),n.d(e,"touch",(function(){return Bn})),n.d(e,"touches",(function(){return hx})),n.d(e,"window",(function(){return Ot})),n.d(e,"event",(function(){return ce})),n.d(e,"customEvent",(function(){return pe})),n.d(e,"arc",(function(){return Nx})),n.d(e,"area",(function(){return Px})),n.d(e,"line",(function(){return Fx})),n.d(e,"pie",(function(){return zx})),n.d(e,"areaRadial",(function(){return Hx})),n.d(e,"radialArea",(function(){return Hx})),n.d(e,"lineRadial",(function(){return Vx})),n.d(e,"radialLine",(function(){return Vx})),n.d(e,"pointRadial",(function(){return Gx})),n.d(e,"linkHorizontal",(function(){return n_})),n.d(e,"linkVertical",(function(){return r_})),n.d(e,"linkRadial",(function(){return i_})),n.d(e,"symbol",(function(){return k_})),n.d(e,"symbols",(function(){return __})),n.d(e,"symbolCircle",(function(){return a_})),n.d(e,"symbolCross",(function(){return o_})),n.d(e,"symbolDiamond",(function(){return u_})),n.d(e,"symbolSquare",(function(){return p_})),n.d(e,"symbolStar",(function(){return d_})),n.d(e,"symbolTriangle",(function(){return g_})),n.d(e,"symbolWye",(function(){return x_})),n.d(e,"curveBasisClosed",(function(){return A_})),n.d(e,"curveBasisOpen",(function(){return O_})),n.d(e,"curveBasis",(function(){return C_})),n.d(e,"curveBundle",(function(){return N_})),n.d(e,"curveCardinalClosed",(function(){return F_})),n.d(e,"curveCardinalOpen",(function(){return j_})),n.d(e,"curveCardinal",(function(){return I_})),n.d(e,"curveCatmullRomClosed",(function(){return q_})),n.d(e,"curveCatmullRomOpen",(function(){return V_})),n.d(e,"curveCatmullRom",(function(){return U_})),n.d(e,"curveLinearClosed",(function(){return G_})),n.d(e,"curveLinear",(function(){return Lx})),n.d(e,"curveMonotoneX",(function(){return nk})),n.d(e,"curveMonotoneY",(function(){return rk})),n.d(e,"curveNatural",(function(){return ok})),n.d(e,"curveStep",(function(){return ck})),n.d(e,"curveStepAfter",(function(){return lk})),n.d(e,"curveStepBefore",(function(){return uk})),n.d(e,"stack",(function(){return pk})),n.d(e,"stackOffsetExpand",(function(){return yk})),n.d(e,"stackOffsetDiverging",(function(){return gk})),n.d(e,"stackOffsetNone",(function(){return hk})),n.d(e,"stackOffsetSilhouette",(function(){return vk})),n.d(e,"stackOffsetWiggle",(function(){return mk})),n.d(e,"stackOrderAppearance",(function(){return bk})),n.d(e,"stackOrderAscending",(function(){return _k})),n.d(e,"stackOrderDescending",(function(){return wk})),n.d(e,"stackOrderInsideOut",(function(){return Ek})),n.d(e,"stackOrderNone",(function(){return fk})),n.d(e,"stackOrderReverse",(function(){return Tk})),n.d(e,"timeInterval",(function(){return Dy})),n.d(e,"timeMillisecond",(function(){return pg})),n.d(e,"timeMilliseconds",(function(){return yg})),n.d(e,"utcMillisecond",(function(){return pg})),n.d(e,"utcMilliseconds",(function(){return yg})),n.d(e,"timeSecond",(function(){return hg})),n.d(e,"timeSeconds",(function(){return fg})),n.d(e,"utcSecond",(function(){return hg})),n.d(e,"utcSeconds",(function(){return fg})),n.d(e,"timeMinute",(function(){return cg})),n.d(e,"timeMinutes",(function(){return ug})),n.d(e,"timeHour",(function(){return ag})),n.d(e,"timeHours",(function(){return og})),n.d(e,"timeDay",(function(){return ng})),n.d(e,"timeDays",(function(){return rg})),n.d(e,"timeWeek",(function(){return zy})),n.d(e,"timeWeeks",(function(){return Gy})),n.d(e,"timeSunday",(function(){return zy})),n.d(e,"timeSundays",(function(){return Gy})),n.d(e,"timeMonday",(function(){return Uy})),n.d(e,"timeMondays",(function(){return Xy})),n.d(e,"timeTuesday",(function(){return $y})),n.d(e,"timeTuesdays",(function(){return Zy})),n.d(e,"timeWednesday",(function(){return qy})),n.d(e,"timeWednesdays",(function(){return Qy})),n.d(e,"timeThursday",(function(){return Wy})),n.d(e,"timeThursdays",(function(){return Ky})),n.d(e,"timeFriday",(function(){return Vy})),n.d(e,"timeFridays",(function(){return Jy})),n.d(e,"timeSaturday",(function(){return Hy})),n.d(e,"timeSaturdays",(function(){return tg})),n.d(e,"timeMonth",(function(){return Py})),n.d(e,"timeMonths",(function(){return jy})),n.d(e,"timeYear",(function(){return Iy})),n.d(e,"timeYears",(function(){return Ry})),n.d(e,"utcMinute",(function(){return ym})),n.d(e,"utcMinutes",(function(){return gm})),n.d(e,"utcHour",(function(){return fm})),n.d(e,"utcHours",(function(){return dm})),n.d(e,"utcDay",(function(){return Ng})),n.d(e,"utcDays",(function(){return Dg})),n.d(e,"utcWeek",(function(){return vg})),n.d(e,"utcWeeks",(function(){return Eg})),n.d(e,"utcSunday",(function(){return vg})),n.d(e,"utcSundays",(function(){return Eg})),n.d(e,"utcMonday",(function(){return mg})),n.d(e,"utcMondays",(function(){return Tg})),n.d(e,"utcTuesday",(function(){return bg})),n.d(e,"utcTuesdays",(function(){return Cg})),n.d(e,"utcWednesday",(function(){return xg})),n.d(e,"utcWednesdays",(function(){return Sg})),n.d(e,"utcThursday",(function(){return _g})),n.d(e,"utcThursdays",(function(){return Ag})),n.d(e,"utcFriday",(function(){return kg})),n.d(e,"utcFridays",(function(){return Mg})),n.d(e,"utcSaturday",(function(){return wg})),n.d(e,"utcSaturdays",(function(){return Og})),n.d(e,"utcMonth",(function(){return um})),n.d(e,"utcMonths",(function(){return lm})),n.d(e,"utcYear",(function(){return Ig})),n.d(e,"utcYears",(function(){return Rg})),n.d(e,"timeFormatDefaultLocale",(function(){return rm})),n.d(e,"timeFormat",(function(){return Ug})),n.d(e,"timeParse",(function(){return $g})),n.d(e,"utcFormat",(function(){return qg})),n.d(e,"utcParse",(function(){return Wg})),n.d(e,"timeFormatLocale",(function(){return Yg})),n.d(e,"isoFormat",(function(){return Ck})),n.d(e,"isoParse",(function(){return Sk})),n.d(e,"now",(function(){return zn})),n.d(e,"timer",(function(){return qn})),n.d(e,"timerFlush",(function(){return Wn})),n.d(e,"timeout",(function(){return Xn})),n.d(e,"interval",(function(){return Ak})),n.d(e,"transition",(function(){return zr})),n.d(e,"active",(function(){return Zr})),n.d(e,"interrupt",(function(){return or})),n.d(e,"voronoi",(function(){return dw})),n.d(e,"zoom",(function(){return Sw})),n.d(e,"zoomTransform",(function(){return mw})),n.d(e,"zoomIdentity",(function(){return vw}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(n(172))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,18],u=[1,20],l=[1,21],h=[1,22],f=[1,24],d=[1,25],p=[1,26],y=[1,27],g=[1,28],v=[1,29],m=[1,32],b=[1,33],x=[1,36],_=[1,4,5,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,58],k=[1,44],w=[4,5,16,21,22,23,25,27,28,29,30,31,33,37,48,58],E=[4,5,16,21,22,23,25,27,28,29,30,31,33,36,37,48,58],T=[4,5,16,21,22,23,25,27,28,29,30,31,33,35,37,48,58],C=[46,47,48],S=[1,4,5,7,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,58],A={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,":":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,signal:20,autonumber:21,activate:22,deactivate:23,note_statement:24,title:25,text2:26,loop:27,end:28,rect:29,opt:30,alt:31,else_sections:32,par:33,par_sections:34,and:35,else:36,note:37,placement:38,over:39,actor_pair:40,spaceList:41,",":42,left_of:43,right_of:44,signaltype:45,"+":46,"-":47,ACTOR:48,SOLID_OPEN_ARROW:49,DOTTED_OPEN_ARROW:50,SOLID_ARROW:51,DOTTED_ARROW:52,SOLID_CROSS:53,DOTTED_CROSS:54,SOLID_POINT:55,DOTTED_POINT:56,TXT:57,open_directive:58,type_directive:59,arg_directive:60,close_directive:61,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",21:"autonumber",22:"activate",23:"deactivate",25:"title",27:"loop",28:"end",29:"rect",30:"opt",31:"alt",33:"par",35:"and",36:"else",37:"note",39:"over",42:",",43:"left_of",44:"right_of",46:"+",47:"-",48:"ACTOR",49:"SOLID_OPEN_ARROW",50:"DOTTED_OPEN_ARROW",51:"SOLID_ARROW",52:"DOTTED_ARROW",53:"SOLID_CROSS",54:"DOTTED_CROSS",55:"SOLID_POINT",56:"DOTTED_POINT",57:"TXT",58:"open_directive",59:"type_directive",60:"arg_directive",61:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,2],[10,1],[10,3],[10,3],[10,2],[10,3],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[34,1],[34,4],[32,1],[32,4],[24,4],[24,4],[41,2],[41,1],[40,3],[40,1],[38,1],[38,1],[20,5],[20,5],[20,4],[17,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[26,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.apply(a[s]),a[s];case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:this.$=[];break;case 12:a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 13:this.$=a[s-1];break;case 15:r.enableSequenceNumbers();break;case 16:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]};break;case 17:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1]};break;case 19:this.$=[{type:"setTitle",text:a[s-1]}];break;case 20:a[s-1].unshift({type:"loopStart",loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:"loopEnd",loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 21:a[s-1].unshift({type:"rectStart",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:"rectEnd",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 22:a[s-1].unshift({type:"optStart",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:"optEnd",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 23:a[s-1].unshift({type:"altStart",altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 24:a[s-1].unshift({type:"parStart",parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 27:this.$=a[s-3].concat([{type:"and",parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 29:this.$=a[s-3].concat([{type:"else",altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 30:this.$=[a[s-1],{type:"addNote",placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 31:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 34:this.$=[a[s-2],a[s]];break;case 35:this.$=a[s];break;case 36:this.$=r.PLACEMENT.LEFTOF;break;case 37:this.$=r.PLACEMENT.RIGHTOF;break;case 38:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]}];break;case 39:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4]}];break;case 40:this.$=[a[s-3],a[s-1],{type:"addMessage",from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 41:this.$={type:"addActor",actor:a[s]};break;case 42:this.$=r.LINETYPE.SOLID_OPEN;break;case 43:this.$=r.LINETYPE.DOTTED_OPEN;break;case 44:this.$=r.LINETYPE.SOLID;break;case 45:this.$=r.LINETYPE.DOTTED;break;case 46:this.$=r.LINETYPE.SOLID_CROSS;break;case 47:this.$=r.LINETYPE.DOTTED_CROSS;break;case 48:this.$=r.LINETYPE.SOLID_POINT;break;case 49:this.$=r.LINETYPE.DOTTED_POINT;break;case 50:this.$=r.parseMessage(a[s].trim().substring(1));break;case 51:r.parseDirective("%%{","open_directive");break;case 52:r.parseDirective(a[s],"type_directive");break;case 53:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 54:r.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:e,5:n,6:4,7:r,11:6,58:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,11:6,58:i},{3:9,4:e,5:n,6:4,7:r,11:6,58:i},{3:10,4:e,5:n,6:4,7:r,11:6,58:i},t([1,4,5,16,21,22,23,25,27,29,30,31,33,37,48,58],a,{8:11}),{12:12,59:[1,13]},{59:[2,51]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,29:p,30:y,31:g,33:v,37:m,48:b,58:i},{13:34,14:[1,35],61:x},t([14,61],[2,52]),t(_,[2,6]),{6:30,10:37,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,29:p,30:y,31:g,33:v,37:m,48:b,58:i},t(_,[2,8]),t(_,[2,9]),{17:38,48:b},{5:[1,39]},t(_,[2,15]),{17:40,48:b},{17:41,48:b},{5:[1,42]},{26:43,57:k},{19:[1,45]},{19:[1,46]},{19:[1,47]},{19:[1,48]},{19:[1,49]},t(_,[2,25]),{45:50,49:[1,51],50:[1,52],51:[1,53],52:[1,54],53:[1,55],54:[1,56],55:[1,57],56:[1,58]},{38:59,39:[1,60],43:[1,61],44:[1,62]},t([5,18,42,49,50,51,52,53,54,55,56,57],[2,41]),{5:[1,63]},{15:64,60:[1,65]},{5:[2,54]},t(_,[2,7]),{5:[1,67],18:[1,66]},t(_,[2,14]),{5:[1,68]},{5:[1,69]},t(_,[2,18]),{5:[1,70]},{5:[2,50]},t(w,a,{8:71}),t(w,a,{8:72}),t(w,a,{8:73}),t(E,a,{32:74,8:75}),t(T,a,{34:76,8:77}),{17:80,46:[1,78],47:[1,79],48:b},t(C,[2,42]),t(C,[2,43]),t(C,[2,44]),t(C,[2,45]),t(C,[2,46]),t(C,[2,47]),t(C,[2,48]),t(C,[2,49]),{17:81,48:b},{17:83,40:82,48:b},{48:[2,36]},{48:[2,37]},t(S,[2,10]),{13:84,61:x},{61:[2,53]},{19:[1,85]},t(_,[2,13]),t(_,[2,16]),t(_,[2,17]),t(_,[2,19]),{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[1,86],29:p,30:y,31:g,33:v,37:m,48:b,58:i},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[1,87],29:p,30:y,31:g,33:v,37:m,48:b,58:i},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[1,88],29:p,30:y,31:g,33:v,37:m,48:b,58:i},{28:[1,89]},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[2,28],29:p,30:y,31:g,33:v,36:[1,90],37:m,48:b,58:i},{28:[1,91]},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[2,26],29:p,30:y,31:g,33:v,35:[1,92],37:m,48:b,58:i},{17:93,48:b},{17:94,48:b},{26:95,57:k},{26:96,57:k},{26:97,57:k},{42:[1,98],57:[2,35]},{5:[1,99]},{5:[1,100]},t(_,[2,20]),t(_,[2,21]),t(_,[2,22]),t(_,[2,23]),{19:[1,101]},t(_,[2,24]),{19:[1,102]},{26:103,57:k},{26:104,57:k},{5:[2,40]},{5:[2,30]},{5:[2,31]},{17:105,48:b},t(S,[2,11]),t(_,[2,12]),t(E,a,{8:75,32:106}),t(T,a,{8:77,34:107}),{5:[2,38]},{5:[2,39]},{57:[2,34]},{28:[2,29]},{28:[2,27]}],defaultActions:{7:[2,51],8:[2,1],9:[2,2],10:[2,3],36:[2,54],44:[2,50],61:[2,36],62:[2,37],65:[2,53],95:[2,40],96:[2,30],97:[2,31],103:[2,38],104:[2,39],105:[2,34],106:[2,29],107:[2,27]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},M={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),58;case 1:return this.begin("type_directive"),59;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),61;case 4:return 60;case 5:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return this.begin("ID"),16;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),48;case 13:return this.popState(),this.popState(),this.begin("LINE"),18;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),27;case 16:return this.begin("LINE"),29;case 17:return this.begin("LINE"),30;case 18:return this.begin("LINE"),31;case 19:return this.begin("LINE"),36;case 20:return this.begin("LINE"),33;case 21:return this.begin("LINE"),35;case 22:return this.popState(),19;case 23:return 28;case 24:return 43;case 25:return 44;case 26:return 39;case 27:return 37;case 28:return this.begin("ID"),22;case 29:return this.begin("ID"),23;case 30:return 25;case 31:return 7;case 32:return 21;case 33:return 42;case 34:return 5;case 35:return e.yytext=e.yytext.trim(),48;case 36:return 51;case 37:return 52;case 38:return 49;case 39:return 50;case 40:return 53;case 41:return 54;case 42:return 55;case 43:return 56;case 44:return 57;case 45:return 46;case 46:return 47;case 47:return 5;case 48:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:participant\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,12],inclusive:!1},ALIAS:{rules:[7,8,13,14],inclusive:!1},LINE:{rules:[7,8,22],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}};function O(){this.yy={}}return A.lexer=M,O.prototype=A,A.Parser=O,new O}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){var r=n(199);t.exports={Graph:r.Graph,json:n(302),alg:n(303),version:r.version}},function(t,e,n){var r;try{r={cloneDeep:n(314),constant:n(87),defaults:n(155),each:n(88),filter:n(129),find:n(315),flatten:n(157),forEach:n(127),forIn:n(320),has:n(94),isUndefined:n(140),last:n(321),map:n(141),mapValues:n(322),max:n(323),merge:n(325),min:n(330),minBy:n(331),now:n(332),pick:n(162),range:n(163),reduce:n(143),sortBy:n(339),uniqueId:n(164),values:n(148),zipObject:n(344)}}catch(t){}r||(r=window._),t.exports=r},function(t,e){var n=Array.isArray;t.exports=n},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){
-/**
- * @license
- * Copyright (c) 2012-2013 Chris Pettitt
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-t.exports={graphlib:n(312),dagre:n(154),intersect:n(369),render:n(371),util:n(14),version:n(383)}},function(t,e,n){"use strict";var r=n(4),i=n(20).Graph;function a(t,e,n,i){var a;do{a=r.uniqueId(i)}while(t.hasNode(a));return n.dummy=e,t.setNode(a,n),a}function o(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}t.exports={addDummyNode:a,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=u*o/s,r=u):(o<0&&(c=-c),n=c,r=c*s/o);return{x:i+n,y:a+r}},buildLayerMatrix:function(t){var e=r.map(r.range(o(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),a=i.rank;r.isUndefined(a)||(e[a][i.order]=n)})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,a=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%a!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return a(t,"border",i,e)},maxRank:o,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},function(t,e,n){t.exports={graphlib:n(20),layout:n(313),debug:n(367),util:{time:n(8).time,notime:n(8).notime},version:n(368)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(173),i=n(174),a=n(175),o={channel:r.default,lang:i.default,unit:a.default};e.default=o},function(t,e){var n,r,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(t){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var c,u=[],l=!1,h=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(f);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function y(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new p(t,e)),1!==u.length||l||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){var r;try{r={clone:n(200),constant:n(87),each:n(88),filter:n(129),has:n(94),isArray:n(5),isEmpty:n(277),isFunction:n(38),isUndefined:n(140),keys:n(30),map:n(141),reduce:n(143),size:n(280),transform:n(286),union:n(287),values:n(148)}}catch(t){}r||(r=window._),t.exports=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(44);t.exports={isSubgraph:function(t,e){return!!t.children(e).length},edgeToId:function(t){return a(t.v)+":"+a(t.w)+":"+a(t.name)},applyStyle:function(t,e){e&&t.attr("style",e)},applyClass:function(t,e,n){e&&t.attr("class",e).attr("class",n+" "+t.attr("class"))},applyTransition:function(t,e){var n=e.graph();if(r.isPlainObject(n)){var i=n.transition;if(r.isFunction(i))return i(t)}return t}};var i=/:/g;function a(t){return t?String(t).replace(i,"\\:"):""}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,7],n=[1,6],r=[1,14],i=[1,25],a=[1,28],o=[1,26],s=[1,27],c=[1,29],u=[1,30],l=[1,31],h=[1,32],f=[1,35],d=[1,36],p=[1,37],y=[1,38],g=[10,19],v=[1,50],m=[1,51],b=[1,52],x=[1,53],_=[1,54],k=[1,55],w=[10,19,26,33,34,42,45,46,47,48,49,50,55,57],E=[10,19,24,26,33,34,38,42,45,46,47,48,49,50,55,57,72,73,74,75],T=[10,13,17,19],C=[42,72,73,74,75],S=[42,49,50,72,73,74,75],A=[42,45,46,47,48,72,73,74,75],M=[10,19,26],O=[1,87],B={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,graphConfig:6,openDirective:7,typeDirective:8,closeDirective:9,NEWLINE:10,":":11,argDirective:12,open_directive:13,type_directive:14,arg_directive:15,close_directive:16,CLASS_DIAGRAM:17,statements:18,EOF:19,statement:20,className:21,alphaNumToken:22,classLiteralName:23,GENERICTYPE:24,relationStatement:25,LABEL:26,classStatement:27,methodStatement:28,annotationStatement:29,clickStatement:30,cssClassStatement:31,CLASS:32,STYLE_SEPARATOR:33,STRUCT_START:34,members:35,STRUCT_STOP:36,ANNOTATION_START:37,ANNOTATION_END:38,MEMBER:39,SEPARATOR:40,relation:41,STR:42,relationType:43,lineType:44,AGGREGATION:45,EXTENSION:46,COMPOSITION:47,DEPENDENCY:48,LINE:49,DOTTED_LINE:50,CALLBACK:51,LINK:52,LINK_TARGET:53,CLICK:54,CALLBACK_NAME:55,CALLBACK_ARGS:56,HREF:57,CSSCLASS:58,commentToken:59,textToken:60,graphCodeTokens:61,textNoTagsToken:62,TAGSTART:63,TAGEND:64,"==":65,"--":66,PCT:67,DEFAULT:68,SPACE:69,MINUS:70,keywords:71,UNICODE_TEXT:72,NUM:73,ALPHA:74,BQUOTE_STR:75,$accept:0,$end:1},terminals_:{2:"error",10:"NEWLINE",11:":",13:"open_directive",14:"type_directive",15:"arg_directive",16:"close_directive",17:"CLASS_DIAGRAM",19:"EOF",24:"GENERICTYPE",26:"LABEL",32:"CLASS",33:"STYLE_SEPARATOR",34:"STRUCT_START",36:"STRUCT_STOP",37:"ANNOTATION_START",38:"ANNOTATION_END",39:"MEMBER",40:"SEPARATOR",42:"STR",45:"AGGREGATION",46:"EXTENSION",47:"COMPOSITION",48:"DEPENDENCY",49:"LINE",50:"DOTTED_LINE",51:"CALLBACK",52:"LINK",53:"LINK_TARGET",54:"CLICK",55:"CALLBACK_NAME",56:"CALLBACK_ARGS",57:"HREF",58:"CSSCLASS",61:"graphCodeTokens",63:"TAGSTART",64:"TAGEND",65:"==",66:"--",67:"PCT",68:"DEFAULT",69:"SPACE",70:"MINUS",71:"keywords",72:"UNICODE_TEXT",73:"NUM",74:"ALPHA",75:"BQUOTE_STR"},productions_:[0,[3,1],[3,2],[4,1],[5,4],[5,6],[7,1],[8,1],[12,1],[9,1],[6,4],[18,1],[18,2],[18,3],[21,1],[21,1],[21,2],[21,2],[21,2],[20,1],[20,2],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[27,2],[27,4],[27,5],[27,7],[29,4],[35,1],[35,2],[28,1],[28,2],[28,1],[28,1],[25,3],[25,4],[25,4],[25,5],[41,3],[41,2],[41,2],[41,1],[43,1],[43,1],[43,1],[43,1],[44,1],[44,1],[30,3],[30,4],[30,3],[30,4],[30,4],[30,5],[30,3],[30,4],[30,4],[30,5],[30,3],[30,4],[30,4],[30,5],[31,3],[59,1],[59,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[60,1],[62,1],[62,1],[62,1],[62,1],[22,1],[22,1],[22,1],[23,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:r.parseDirective("%%{","open_directive");break;case 7:r.parseDirective(a[s],"type_directive");break;case 8:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 9:r.parseDirective("}%%","close_directive","class");break;case 14:case 15:this.$=a[s];break;case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+"~"+a[s];break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 27:r.addClass(a[s]);break;case 28:r.addClass(a[s-2]),r.setCssClass(a[s-2],a[s]);break;case 29:r.addClass(a[s-3]),r.addMembers(a[s-3],a[s-1]);break;case 30:r.addClass(a[s-5]),r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 31:r.addAnnotation(a[s],a[s-2]);break;case 32:this.$=[a[s]];break;case 33:a[s].push(a[s-1]),this.$=a[s];break;case 34:break;case 35:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 36:case 37:break;case 38:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 39:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:"none"};break;case 40:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:"none",relationTitle2:a[s-1]};break;case 41:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 42:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 43:this.$={type1:"none",type2:a[s],lineType:a[s-1]};break;case 44:this.$={type1:a[s-1],type2:"none",lineType:a[s]};break;case 45:this.$={type1:"none",type2:"none",lineType:a[s]};break;case 46:this.$=r.relationType.AGGREGATION;break;case 47:this.$=r.relationType.EXTENSION;break;case 48:this.$=r.relationType.COMPOSITION;break;case 49:this.$=r.relationType.DEPENDENCY;break;case 50:this.$=r.lineType.LINE;break;case 51:this.$=r.lineType.DOTTED_LINE;break;case 52:case 58:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 53:case 59:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 54:case 62:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 55:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 56:case 64:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 57:case 65:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 60:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 61:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 63:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 66:r.setCssClass(a[s-1],a[s])}},table:[{3:1,4:2,5:3,6:4,7:5,13:e,17:n},{1:[3]},{1:[2,1]},{3:8,4:2,5:3,6:4,7:5,13:e,17:n},{1:[2,3]},{8:9,14:[1,10]},{10:[1,11]},{14:[2,6]},{1:[2,2]},{9:12,11:[1,13],16:r},t([11,16],[2,7]),{5:23,7:5,13:e,18:15,20:16,21:24,22:33,23:34,25:17,27:18,28:19,29:20,30:21,31:22,32:i,37:a,39:o,40:s,51:c,52:u,54:l,58:h,72:f,73:d,74:p,75:y},{10:[1,39]},{12:40,15:[1,41]},{10:[2,9]},{19:[1,42]},{10:[1,43],19:[2,11]},t(g,[2,19],{26:[1,44]}),t(g,[2,21]),t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),t(g,[2,26]),t(g,[2,34],{41:45,43:48,44:49,26:[1,47],42:[1,46],45:v,46:m,47:b,48:x,49:_,50:k}),{21:56,22:33,23:34,72:f,73:d,74:p,75:y},t(g,[2,36]),t(g,[2,37]),{22:57,72:f,73:d,74:p},{21:58,22:33,23:34,72:f,73:d,74:p,75:y},{21:59,22:33,23:34,72:f,73:d,74:p,75:y},{21:60,22:33,23:34,72:f,73:d,74:p,75:y},{42:[1,61]},t(w,[2,14],{22:33,23:34,21:62,24:[1,63],72:f,73:d,74:p,75:y}),t(w,[2,15],{24:[1,64]}),t(E,[2,80]),t(E,[2,81]),t(E,[2,82]),t([10,19,24,26,33,34,42,45,46,47,48,49,50,55,57],[2,83]),t(T,[2,4]),{9:65,16:r},{16:[2,8]},{1:[2,10]},{5:23,7:5,13:e,18:66,19:[2,12],20:16,21:24,22:33,23:34,25:17,27:18,28:19,29:20,30:21,31:22,32:i,37:a,39:o,40:s,51:c,52:u,54:l,58:h,72:f,73:d,74:p,75:y},t(g,[2,20]),{21:67,22:33,23:34,42:[1,68],72:f,73:d,74:p,75:y},{41:69,43:48,44:49,45:v,46:m,47:b,48:x,49:_,50:k},t(g,[2,35]),{44:70,49:_,50:k},t(C,[2,45],{43:71,45:v,46:m,47:b,48:x}),t(S,[2,46]),t(S,[2,47]),t(S,[2,48]),t(S,[2,49]),t(A,[2,50]),t(A,[2,51]),t(g,[2,27],{33:[1,72],34:[1,73]}),{38:[1,74]},{42:[1,75]},{42:[1,76]},{55:[1,77],57:[1,78]},{22:79,72:f,73:d,74:p},t(w,[2,16]),t(w,[2,17]),t(w,[2,18]),{10:[1,80]},{19:[2,13]},t(M,[2,38]),{21:81,22:33,23:34,72:f,73:d,74:p,75:y},{21:82,22:33,23:34,42:[1,83],72:f,73:d,74:p,75:y},t(C,[2,44],{43:84,45:v,46:m,47:b,48:x}),t(C,[2,43]),{22:85,72:f,73:d,74:p},{35:86,39:O},{21:88,22:33,23:34,72:f,73:d,74:p,75:y},t(g,[2,52],{42:[1,89]}),t(g,[2,54],{42:[1,91],53:[1,90]}),t(g,[2,58],{42:[1,92],56:[1,93]}),t(g,[2,62],{42:[1,95],53:[1,94]}),t(g,[2,66]),t(T,[2,5]),t(M,[2,40]),t(M,[2,39]),{21:96,22:33,23:34,72:f,73:d,74:p,75:y},t(C,[2,42]),t(g,[2,28],{34:[1,97]}),{36:[1,98]},{35:99,36:[2,32],39:O},t(g,[2,31]),t(g,[2,53]),t(g,[2,55]),t(g,[2,56],{53:[1,100]}),t(g,[2,59]),t(g,[2,60],{42:[1,101]}),t(g,[2,63]),t(g,[2,64],{53:[1,102]}),t(M,[2,41]),{35:103,39:O},t(g,[2,29]),{36:[2,33]},t(g,[2,57]),t(g,[2,61]),t(g,[2,65]),{36:[1,104]},t(g,[2,30])],defaultActions:{2:[2,1],4:[2,3],7:[2,6],8:[2,2],14:[2,9],41:[2,8],42:[2,10],66:[2,13],99:[2,33]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},N={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),13;case 1:return this.begin("type_directive"),14;case 2:return this.popState(),this.begin("arg_directive"),11;case 3:return this.popState(),this.popState(),16;case 4:return 15;case 5:case 6:break;case 7:return 10;case 8:break;case 9:case 10:return 17;case 11:return this.begin("struct"),34;case 12:return"EOF_IN_STRUCT";case 13:return"OPEN_IN_STRUCT";case 14:return this.popState(),36;case 15:break;case 16:return"MEMBER";case 17:return 32;case 18:return 58;case 19:return 51;case 20:return 52;case 21:return 54;case 22:return 37;case 23:return 38;case 24:this.begin("generic");break;case 25:this.popState();break;case 26:return"GENERICTYPE";case 27:this.begin("string");break;case 28:this.popState();break;case 29:return"STR";case 30:this.begin("bqstring");break;case 31:this.popState();break;case 32:return"BQUOTE_STR";case 33:this.begin("href");break;case 34:this.popState();break;case 35:return 57;case 36:this.begin("callback_name");break;case 37:this.popState();break;case 38:this.popState(),this.begin("callback_args");break;case 39:return 55;case 40:this.popState();break;case 41:return 56;case 42:case 43:case 44:case 45:return 53;case 46:case 47:return 46;case 48:case 49:return 48;case 50:return 47;case 51:return 45;case 52:return 49;case 53:return 50;case 54:return 26;case 55:return 33;case 56:return 70;case 57:return"DOT";case 58:return"PLUS";case 59:return 67;case 60:case 61:return"EQUALS";case 62:return 74;case 63:return"PUNCTUATION";case 64:return 73;case 65:return 72;case 66:return 69;case 67:return 19}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callback_args:{rules:[40,41],inclusive:!1},callback_name:{rules:[37,38,39],inclusive:!1},href:{rules:[34,35],inclusive:!1},struct:{rules:[12,13,14,15,16],inclusive:!1},generic:{rules:[25,26],inclusive:!1},bqstring:{rules:[31,32],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,17,18,19,20,21,22,23,24,27,30,33,36,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};function D(){this.yy={}}return B.lexer=N,D.prototype=B,B.Parser=D,new D}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(76),i=n(99),a=n(179),o=n(180),s=n(181),c={format:{keyword:a.default,hex:i.default,rgb:o.default,rgba:o.default,hsl:s.default,hsla:s.default},parse:function(t){if("string"!=typeof t)return t;var e=i.default.parse(t)||o.default.parse(t)||s.default.parse(t)||a.default.parse(t);if(e)return e;throw new Error('Unsupported color format: "'+t+'"')},stringify:function(t){return!t.changed&&t.color?t.color:t.type.is(r.TYPE.HSL)||void 0===t.data.r?s.default.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?o.default.stringify(t):i.default.stringify(t)}};e.default=c},function(t,e){},function(t,e,n){(function(t){function n(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}e.resolve=function(){for(var e="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(e=o+"/"+e,i="/"===o.charAt(0))}return(i?"/":"")+(e=n(r(e.split("/"),(function(t){return!!t})),!i).join("/"))||"."},e.normalize=function(t){var a=e.isAbsolute(t),o="/"===i(t,-1);return(t=n(r(t.split("/"),(function(t){return!!t})),!a).join("/"))||a||(t="."),t&&o&&(t+="/"),(a?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,n){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var i=r(t.split("/")),a=r(n.split("/")),o=Math.min(i.length,a.length),s=o,c=0;c<o;c++)if(i[c]!==a[c]){s=c;break}var u=[];for(c=s;c<i.length;c++)u.push("..");return(u=u.concat(a.slice(s))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,r=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":t.slice(0,r)},e.basename=function(t,e){var n=function(t){"string"!=typeof t&&(t+="");var e,n=0,r=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){n=e+1;break}}else-1===r&&(i=!1,r=e+1);return-1===r?"":t.slice(n,r)}(t);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,n=0,r=-1,i=!0,a=0,o=t.length-1;o>=0;--o){var s=t.charCodeAt(o);if(47!==s)-1===r&&(i=!1,r=o+1),46===s?-1===e?e=o:1!==a&&(a=1):-1!==e&&(a=-1);else if(!i){n=o+1;break}}return-1===e||-1===r||0===a||1===a&&e===r-1&&e===n+1?"":t.slice(e,r)};var i="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,n(11))},function(t,e,n){var r=n(110),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();t.exports=a},function(t,e,n){var r;try{r=n(3)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,19],u=[1,20],l=[1,21],h=[1,22],f=[1,30],d=[1,23],p=[1,24],y=[1,25],g=[1,26],v=[1,27],m=[1,32],b=[1,33],x=[1,34],_=[1,35],k=[1,31],w=[1,38],E=[1,4,5,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],T=[1,4,5,12,13,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],C=[1,4,5,7,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],S=[4,5,14,15,17,19,20,22,23,24,25,26,27,36,37,38,39,42,45],A={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,idStatement:11,DESCR:12,"--\x3e":13,HIDE_EMPTY:14,scale:15,WIDTH:16,COMPOSIT_STATE:17,STRUCT_START:18,STRUCT_STOP:19,STATE_DESCR:20,AS:21,ID:22,FORK:23,JOIN:24,CHOICE:25,CONCURRENT:26,note:27,notePosition:28,NOTE_TEXT:29,direction:30,openDirective:31,typeDirective:32,closeDirective:33,":":34,argDirective:35,direction_tb:36,direction_bt:37,direction_rl:38,direction_lr:39,eol:40,";":41,EDGE_STATE:42,left_of:43,right_of:44,open_directive:45,type_directive:46,arg_directive:47,close_directive:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",12:"DESCR",13:"--\x3e",14:"HIDE_EMPTY",15:"scale",16:"WIDTH",17:"COMPOSIT_STATE",18:"STRUCT_START",19:"STRUCT_STOP",20:"STATE_DESCR",21:"AS",22:"ID",23:"FORK",24:"JOIN",25:"CHOICE",26:"CONCURRENT",27:"note",29:"NOTE_TEXT",34:":",36:"direction_tb",37:"direction_bt",38:"direction_rl",39:"direction_lr",41:";",42:"EDGE_STATE",43:"left_of",44:"right_of",45:"open_directive",46:"type_directive",47:"arg_directive",48:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[6,3],[6,5],[30,1],[30,1],[30,1],[30,1],[40,1],[40,1],[11,1],[11,1],[28,1],[28,1],[31,1],[32,1],[35,1],[33,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.setRootDoc(a[s]),a[s];case 5:this.$=[];break;case 6:"nl"!=a[s]&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 7:case 8:this.$=a[s];break;case 9:this.$="nl";break;case 10:this.$={stmt:"state",id:a[s],type:"default",description:""};break;case 11:this.$={stmt:"state",id:a[s-1],type:"default",description:r.trimColon(a[s])};break;case 12:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-2],type:"default",description:""},state2:{stmt:"state",id:a[s],type:"default",description:""}};break;case 13:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-3],type:"default",description:""},state2:{stmt:"state",id:a[s-1],type:"default",description:""},description:a[s].substr(1).trim()};break;case 17:this.$={stmt:"state",id:a[s-3],type:"default",description:"",doc:a[s-1]};break;case 18:var c=a[s],u=a[s-2].trim();if(a[s].match(":")){var l=a[s].split(":");c=l[0],u=[u,l[1]]}this.$={stmt:"state",id:c,type:"default",description:u};break;case 19:this.$={stmt:"state",id:a[s-3],type:"default",description:a[s-5],doc:a[s-1]};break;case 20:this.$={stmt:"state",id:a[s],type:"fork"};break;case 21:this.$={stmt:"state",id:a[s],type:"join"};break;case 22:this.$={stmt:"state",id:a[s],type:"choice"};break;case 23:this.$={stmt:"state",id:r.getDividerId(),type:"divider"};break;case 24:this.$={stmt:"state",id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 30:r.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 31:r.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 32:r.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 33:r.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 36:case 37:this.$=a[s];break;case 40:r.parseDirective("%%{","open_directive");break;case 41:r.parseDirective(a[s],"type_directive");break;case 42:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 43:r.parseDirective("}%%","close_directive","state")}},table:[{3:1,4:e,5:n,6:4,7:r,31:6,45:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,31:6,45:i},{3:9,4:e,5:n,6:4,7:r,31:6,45:i},{3:10,4:e,5:n,6:4,7:r,31:6,45:i},t([1,4,5,14,15,17,20,22,23,24,25,26,27,36,37,38,39,42,45],a,{8:11}),{32:12,46:[1,13]},{46:[2,40]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:u,17:l,20:h,22:f,23:d,24:p,25:y,26:g,27:v,30:29,31:6,36:m,37:b,38:x,39:_,42:k,45:i},{33:36,34:[1,37],48:w},t([34,48],[2,41]),t(E,[2,6]),{6:28,10:39,11:18,14:c,15:u,17:l,20:h,22:f,23:d,24:p,25:y,26:g,27:v,30:29,31:6,36:m,37:b,38:x,39:_,42:k,45:i},t(E,[2,8]),t(E,[2,9]),t(E,[2,10],{12:[1,40],13:[1,41]}),t(E,[2,14]),{16:[1,42]},t(E,[2,16],{18:[1,43]}),{21:[1,44]},t(E,[2,20]),t(E,[2,21]),t(E,[2,22]),t(E,[2,23]),{28:45,29:[1,46],43:[1,47],44:[1,48]},t(E,[2,26]),t(E,[2,27]),t(T,[2,36]),t(T,[2,37]),t(E,[2,30]),t(E,[2,31]),t(E,[2,32]),t(E,[2,33]),t(C,[2,28]),{35:49,47:[1,50]},t(C,[2,43]),t(E,[2,7]),t(E,[2,11]),{11:51,22:f,42:k},t(E,[2,15]),t(S,a,{8:52}),{22:[1,53]},{22:[1,54]},{21:[1,55]},{22:[2,38]},{22:[2,39]},{33:56,48:w},{48:[2,42]},t(E,[2,12],{12:[1,57]}),{4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:u,17:l,19:[1,58],20:h,22:f,23:d,24:p,25:y,26:g,27:v,30:29,31:6,36:m,37:b,38:x,39:_,42:k,45:i},t(E,[2,18],{18:[1,59]}),{29:[1,60]},{22:[1,61]},t(C,[2,29]),t(E,[2,13]),t(E,[2,17]),t(S,a,{8:62}),t(E,[2,24]),t(E,[2,25]),{4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:u,17:l,19:[1,63],20:h,22:f,23:d,24:p,25:y,26:g,27:v,30:29,31:6,36:m,37:b,38:x,39:_,42:k,45:i},t(E,[2,19])],defaultActions:{7:[2,40],8:[2,1],9:[2,2],10:[2,3],47:[2,38],48:[2,39],50:[2,42]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},M={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 36;case 1:return 37;case 2:return 38;case 3:return 39;case 4:return this.begin("open_directive"),45;case 5:return this.begin("type_directive"),46;case 6:return this.popState(),this.begin("arg_directive"),34;case 7:return this.popState(),this.popState(),48;case 8:return 47;case 9:case 10:break;case 11:return 5;case 12:case 13:case 14:case 15:break;case 16:return this.pushState("SCALE"),15;case 17:return 16;case 18:this.popState();break;case 19:this.pushState("STATE");break;case 20:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 21:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 22:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),25;case 23:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 24:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 25:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),25;case 26:return 36;case 27:return 37;case 28:return 38;case 29:return 39;case 30:this.begin("STATE_STRING");break;case 31:return this.popState(),this.pushState("STATE_ID"),"AS";case 32:return this.popState(),"ID";case 33:this.popState();break;case 34:return"STATE_DESCR";case 35:return 17;case 36:this.popState();break;case 37:return this.popState(),this.pushState("struct"),18;case 38:return this.popState(),19;case 39:break;case 40:return this.begin("NOTE"),27;case 41:return this.popState(),this.pushState("NOTE_ID"),43;case 42:return this.popState(),this.pushState("NOTE_ID"),44;case 43:this.popState(),this.pushState("FLOATING_NOTE");break;case 44:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 45:break;case 46:return"NOTE_TEXT";case 47:return this.popState(),"ID";case 48:return this.popState(),this.pushState("NOTE_TEXT"),22;case 49:return this.popState(),e.yytext=e.yytext.substr(2).trim(),29;case 50:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),29;case 51:case 52:return 7;case 53:return 14;case 54:return 42;case 55:return 22;case 56:return e.yytext=e.yytext.trim(),12;case 57:return 13;case 58:return 26;case 59:return 5;case 60:return"INVALID"}},rules:[/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[13,14],inclusive:!1},close_directive:{rules:[13,14],inclusive:!1},arg_directive:{rules:[7,8,13,14],inclusive:!1},type_directive:{rules:[6,7,13,14],inclusive:!1},open_directive:{rules:[5,13,14],inclusive:!1},struct:{rules:[13,14,19,26,27,28,29,38,39,40,54,55,56,57,58],inclusive:!1},FLOATING_NOTE_ID:{rules:[47],inclusive:!1},FLOATING_NOTE:{rules:[44,45,46],inclusive:!1},NOTE_TEXT:{rules:[49,50],inclusive:!1},NOTE_ID:{rules:[48],inclusive:!1},NOTE:{rules:[41,42,43],inclusive:!1},SCALE:{rules:[17,18],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[32],inclusive:!1},STATE_STRING:{rules:[33,34],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[13,14,20,21,22,23,24,25,30,31,35,36,37],inclusive:!1},ID:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,12,14,15,16,19,37,40,51,52,53,54,55,56,57,59,60],inclusive:!0}}};function O(){this.yy={}}return A.lexer=M,O.prototype=A,A.Parser=O,new O}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t){t.exports=function(){"use strict";var e,r;function i(){return e.apply(null,arguments)}function a(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return void 0===t}function c(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function u(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function l(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function f(t,e){for(var n in e)h(e,n)&&(t[n]=e[n]);return h(e,"toString")&&(t.toString=e.toString),h(e,"valueOf")&&(t.valueOf=e.valueOf),t}function d(t,e,n,r){return be(t,e,n,r,!0).utc()}function p(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function y(t){if(null==t._isValid){var e=p(t),n=r.call(e.parsedDateParts,(function(t){return null!=t})),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i}return t._isValid}function g(t){var e=d(NaN);return null!=t?f(p(e),t):p(e).userInvalidated=!0,e}r=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};var v=i.momentProperties=[];function m(t,e){var n,r,i;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=p(e)),s(e._locale)||(t._locale=e._locale),0<v.length)for(n=0;n<v.length;n++)s(i=e[r=v[n]])||(t[r]=i);return t}var b=!1;function x(t){m(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,i.updateOffset(this),b=!1)}function _(t){return t instanceof x||null!=t&&null!=t._isAMomentObject}function k(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function w(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=k(e)),n}function E(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&&w(t[r])!==w(e[r]))&&o++;return o+a}function T(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function C(t,e){var n=!0;return f((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var r,a=[],o=0;o<arguments.length;o++){if(r="","object"==typeof arguments[o]){for(var s in r+="\n["+o+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[o];a.push(r)}T(t+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var S,A={};function M(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),A[t]||(T(e),A[t]=!0)}function O(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function B(t,e){var n,r=f({},t);for(n in e)h(e,n)&&(o(t[n])&&o(e[n])?(r[n]={},f(r[n],t[n]),f(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)h(t,n)&&!h(e,n)&&o(t[n])&&(r[n]=f({},r[n]));return r}function N(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,S=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)h(t,e)&&n.push(e);return n};var D={};function L(t,e){var n=t.toLowerCase();D[n]=D[n+"s"]=D[e]=t}function I(t){return"string"==typeof t?D[t]||D[t.toLowerCase()]:void 0}function R(t){var e,n,r={};for(n in t)h(t,n)&&(e=I(n))&&(r[e]=t[n]);return r}var F={};function P(t,e){F[t]=e}function j(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(0<=t?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Y=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,U={},$={};function q(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&($[t]=i),e&&($[e[0]]=function(){return j(i.apply(this,arguments),e[1],e[2])}),n&&($[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function W(t,e){return t.isValid()?(e=V(e,t.localeData()),U[e]=U[e]||function(t){var e,n,r,i=t.match(Y);for(e=0,n=i.length;e<n;e++)$[i[e]]?i[e]=$[i[e]]:i[e]=(r=i[e]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(e){var r,a="";for(r=0;r<n;r++)a+=O(i[r])?i[r].call(e,t):i[r];return a}}(e),U[e](t)):t.localeData().invalidDate()}function V(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for(z.lastIndex=0;0<=n&&z.test(t);)t=t.replace(z,r),z.lastIndex=0,n-=1;return t}var H=/\d/,G=/\d\d/,X=/\d{3}/,Z=/\d{4}/,Q=/[+-]?\d{6}/,K=/\d\d?/,J=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,et=/\d{1,3}/,nt=/\d{1,4}/,rt=/[+-]?\d{1,6}/,it=/\d+/,at=/[+-]?\d+/,ot=/Z|[+-]\d\d:?\d\d/gi,st=/Z|[+-]\d\d(?::?\d\d)?/gi,ct=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut={};function lt(t,e,n){ut[t]=O(e)?e:function(t,r){return t&&n?n:e}}function ht(t,e){return h(ut,t)?ut[t](e._strict,e._locale):new RegExp(ft(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,r,i){return e||n||r||i}))))}function ft(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var dt={};function pt(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),c(e)&&(r=function(t,n){n[e]=w(t)}),n=0;n<t.length;n++)dt[t[n]]=r}function yt(t,e){pt(t,(function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)}))}function gt(t){return vt(t)?366:365}function vt(t){return t%4==0&&t%100!=0||t%400==0}q("Y",0,0,(function(){var t=this.year();return t<=9999?""+t:"+"+t})),q(0,["YY",2],0,(function(){return this.year()%100})),q(0,["YYYY",4],0,"year"),q(0,["YYYYY",5],0,"year"),q(0,["YYYYYY",6,!0],0,"year"),L("year","y"),P("year",1),lt("Y",at),lt("YY",K,G),lt("YYYY",nt,Z),lt("YYYYY",rt,Q),lt("YYYYYY",rt,Q),pt(["YYYYY","YYYYYY"],0),pt("YYYY",(function(t,e){e[0]=2===t.length?i.parseTwoDigitYear(t):w(t)})),pt("YY",(function(t,e){e[0]=i.parseTwoDigitYear(t)})),pt("Y",(function(t,e){e[0]=parseInt(t,10)})),i.parseTwoDigitYear=function(t){return w(t)+(68<w(t)?1900:2e3)};var mt,bt=xt("FullYear",!0);function xt(t,e){return function(n){return null!=n?(kt(this,t,n),i.updateOffset(this,e),this):_t(this,t)}}function _t(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function kt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&vt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),wt(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function wt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=(e%12+12)%12;return t+=(e-n)/12,1===n?vt(t)?29:28:31-n%7%2}mt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},q("M",["MM",2],"Mo",(function(){return this.month()+1})),q("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),q("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),L("month","M"),P("month",8),lt("M",K),lt("MM",K,G),lt("MMM",(function(t,e){return e.monthsShortRegex(t)})),lt("MMMM",(function(t,e){return e.monthsRegex(t)})),pt(["M","MM"],(function(t,e){e[1]=w(t)-1})),pt(["MMM","MMMM"],(function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[1]=i:p(n).invalidMonth=t}));var Et=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Tt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ct="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function St(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=w(e);else if(!c(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),wt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function At(t){return null!=t?(St(this,t),i.updateOffset(this,!0),this):_t(this,"Month")}var Mt=ct,Ot=ct;function Bt(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],a=[];for(e=0;e<12;e++)n=d([2e3,e]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(t),i.sort(t),a.sort(t),e=0;e<12;e++)r[e]=ft(r[e]),i[e]=ft(i[e]);for(e=0;e<24;e++)a[e]=ft(a[e]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Nt(t){var e;if(t<100&&0<=t){var n=Array.prototype.slice.call(arguments);n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function Dt(t,e,n){var r=7+e-n;return-(7+Nt(t,0,r).getUTCDay()-e)%7+r-1}function Lt(t,e,n,r,i){var a,o,s=1+7*(e-1)+(7+n-r)%7+Dt(t,r,i);return o=s<=0?gt(a=t-1)+s:s>gt(t)?(a=t+1,s-gt(t)):(a=t,s),{year:a,dayOfYear:o}}function It(t,e,n){var r,i,a=Dt(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+Rt(i=t.year()-1,e,n):o>Rt(t.year(),e,n)?(r=o-Rt(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function Rt(t,e,n){var r=Dt(t,e,n),i=Dt(t+1,e,n);return(gt(t)-r+i)/7}function Ft(t,e){return t.slice(e,7).concat(t.slice(0,e))}q("w",["ww",2],"wo","week"),q("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),P("week",5),P("isoWeek",5),lt("w",K),lt("ww",K,G),lt("W",K),lt("WW",K,G),yt(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=w(t)})),q("d",0,"do","day"),q("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),q("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),q("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),q("e",0,0,"weekday"),q("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),P("day",11),P("weekday",11),P("isoWeekday",11),lt("d",K),lt("e",K),lt("E",K),lt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),lt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),lt("dddd",(function(t,e){return e.weekdaysRegex(t)})),yt(["dd","ddd","dddd"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:p(n).invalidWeekday=t})),yt(["d","e","E"],(function(t,e,n,r){e[r]=w(t)}));var Pt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),jt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Yt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zt=ct,Ut=ct,$t=ct;function qt(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],c=[],u=[];for(e=0;e<7;e++)n=d([2e3,1]).day(e),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),a=this.weekdays(n,""),o.push(r),s.push(i),c.push(a),u.push(r),u.push(i),u.push(a);for(o.sort(t),s.sort(t),c.sort(t),u.sort(t),e=0;e<7;e++)s[e]=ft(s[e]),c[e]=ft(c[e]),u[e]=ft(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Wt(){return this.hours()%12||12}function Vt(t,e){q(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Ht(t,e){return e._meridiemParse}q("H",["HH",2],0,"hour"),q("h",["hh",2],0,Wt),q("k",["kk",2],0,(function(){return this.hours()||24})),q("hmm",0,0,(function(){return""+Wt.apply(this)+j(this.minutes(),2)})),q("hmmss",0,0,(function(){return""+Wt.apply(this)+j(this.minutes(),2)+j(this.seconds(),2)})),q("Hmm",0,0,(function(){return""+this.hours()+j(this.minutes(),2)})),q("Hmmss",0,0,(function(){return""+this.hours()+j(this.minutes(),2)+j(this.seconds(),2)})),Vt("a",!0),Vt("A",!1),L("hour","h"),P("hour",13),lt("a",Ht),lt("A",Ht),lt("H",K),lt("h",K),lt("k",K),lt("HH",K,G),lt("hh",K,G),lt("kk",K,G),lt("hmm",J),lt("hmmss",tt),lt("Hmm",J),lt("Hmmss",tt),pt(["H","HH"],3),pt(["k","kk"],(function(t,e,n){var r=w(t);e[3]=24===r?0:r})),pt(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),pt(["h","hh"],(function(t,e,n){e[3]=w(t),p(n).bigHour=!0})),pt("hmm",(function(t,e,n){var r=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r)),p(n).bigHour=!0})),pt("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r,2)),e[5]=w(t.substr(i)),p(n).bigHour=!0})),pt("Hmm",(function(t,e,n){var r=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r))})),pt("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r,2)),e[5]=w(t.substr(i))}));var Gt,Xt=xt("Hours",!0),Zt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Tt,monthsShort:Ct,week:{dow:0,doy:6},weekdays:Pt,weekdaysMin:Yt,weekdaysShort:jt,meridiemParse:/[ap]\.?m?\.?/i},Qt={},Kt={};function Jt(t){return t?t.toLowerCase().replace("_","-"):t}function te(e){var r=null;if(!Qt[e]&&void 0!==t&&t&&t.exports)try{r=Gt._abbr,n(198)("./"+e),ee(r)}catch(e){}return Qt[e]}function ee(t,e){var n;return t&&((n=s(e)?re(t):ne(t,e))?Gt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Gt._abbr}function ne(t,e){if(null===e)return delete Qt[t],null;var n,r=Zt;if(e.abbr=t,null!=Qt[t])M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Qt[t]._config;else if(null!=e.parentLocale)if(null!=Qt[e.parentLocale])r=Qt[e.parentLocale]._config;else{if(null==(n=te(e.parentLocale)))return Kt[e.parentLocale]||(Kt[e.parentLocale]=[]),Kt[e.parentLocale].push({name:t,config:e}),null;r=n._config}return Qt[t]=new N(B(r,e)),Kt[t]&&Kt[t].forEach((function(t){ne(t.name,t.config)})),ee(t),Qt[t]}function re(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Gt;if(!a(t)){if(e=te(t))return e;t=[t]}return function(t){for(var e,n,r,i,a=0;a<t.length;){for(e=(i=Jt(t[a]).split("-")).length,n=(n=Jt(t[a+1]))?n.split("-"):null;0<e;){if(r=te(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&E(i,n,!0)>=e-1)break;e--}a++}return Gt}(t)}function ie(t){var e,n=t._a;return n&&-2===p(t).overflow&&(e=n[1]<0||11<n[1]?1:n[2]<1||n[2]>wt(n[0],n[1])?2:n[3]<0||24<n[3]||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||59<n[4]?4:n[5]<0||59<n[5]?5:n[6]<0||999<n[6]?6:-1,p(t)._overflowDayOfYear&&(e<0||2<e)&&(e=2),p(t)._overflowWeeks&&-1===e&&(e=7),p(t)._overflowWeekday&&-1===e&&(e=8),p(t).overflow=e),t}function ae(t,e,n){return null!=t?t:null!=e?e:n}function oe(t){var e,n,r,a,o,s=[];if(!t._d){var c,u;for(c=t,u=new Date(i.now()),r=c._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,n,r,i,a,o,s,c;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)a=1,o=4,n=ae(e.GG,t._a[0],It(xe(),1,4).year),r=ae(e.W,1),((i=ae(e.E,1))<1||7<i)&&(c=!0);else{a=t._locale._week.dow,o=t._locale._week.doy;var u=It(xe(),a,o);n=ae(e.gg,t._a[0],u.year),r=ae(e.w,u.week),null!=e.d?((i=e.d)<0||6<i)&&(c=!0):null!=e.e?(i=e.e+a,(e.e<0||6<e.e)&&(c=!0)):i=a}r<1||r>Rt(n,a,o)?p(t)._overflowWeeks=!0:null!=c?p(t)._overflowWeekday=!0:(s=Lt(n,r,i,a,o),t._a[0]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=ae(t._a[0],r[0]),(t._dayOfYear>gt(o)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),n=Nt(o,0,t._dayOfYear),t._a[1]=n.getUTCMonth(),t._a[2]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=r[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Nt:function(t,e,n,r,i,a,o){var s;return t<100&&0<=t?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,a,o),s}).apply(null,s),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(p(t).weekdayMismatch=!0)}}var se=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ce=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ue=/Z|[+-]\d\d(?::?\d\d)?/,le=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],he=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],fe=/^\/?Date\((\-?\d+)/i;function de(t){var e,n,r,i,a,o,s=t._i,c=se.exec(s)||ce.exec(s);if(c){for(p(t).iso=!0,e=0,n=le.length;e<n;e++)if(le[e][1].exec(c[1])){i=le[e][0],r=!1!==le[e][2];break}if(null==i)return void(t._isValid=!1);if(c[3]){for(e=0,n=he.length;e<n;e++)if(he[e][1].exec(c[3])){a=(c[2]||" ")+he[e][0];break}if(null==a)return void(t._isValid=!1)}if(!r&&null!=a)return void(t._isValid=!1);if(c[4]){if(!ue.exec(c[4]))return void(t._isValid=!1);o="Z"}t._f=i+(a||"")+(o||""),ve(t)}else t._isValid=!1}var pe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,ye={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ge(t){var e,n,r,i=pe.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(i){var a=function(t,e,n,r,i,a){var o=[function(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}(t),Ct.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}(i[4],i[3],i[2],i[5],i[6],i[7]);if(n=a,r=t,(e=i[1])&&jt.indexOf(e)!==new Date(n[0],n[1],n[2]).getDay()&&(p(r).weekdayMismatch=!0,!(r._isValid=!1)))return;t._a=a,t._tzm=function(t,e,n){if(t)return ye[t];if(e)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(i[8],i[9],i[10]),t._d=Nt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),p(t).rfc2822=!0}else t._isValid=!1}function ve(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],p(t).empty=!0;var e,n,r,a,o,s,c,u,l=""+t._i,f=l.length,d=0;for(r=V(t._f,t._locale).match(Y)||[],e=0;e<r.length;e++)a=r[e],(n=(l.match(ht(a,t))||[])[0])&&(0<(o=l.substr(0,l.indexOf(n))).length&&p(t).unusedInput.push(o),l=l.slice(l.indexOf(n)+n.length),d+=n.length),$[a]?(n?p(t).empty=!1:p(t).unusedTokens.push(a),s=a,u=t,null!=(c=n)&&h(dt,s)&&dt[s](c,u._a,u,s)):t._strict&&!n&&p(t).unusedTokens.push(a);p(t).charsLeftOver=f-d,0<l.length&&p(t).unusedInput.push(l),t._a[3]<=12&&!0===p(t).bigHour&&0<t._a[3]&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[3]=function(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):(null!=t.isPM&&((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0)),e)}(t._locale,t._a[3],t._meridiem),oe(t),ie(t)}else ge(t);else de(t)}function me(t){var e,n,r,h,d=t._i,v=t._f;return t._locale=t._locale||re(t._l),null===d||void 0===v&&""===d?g({nullInput:!0}):("string"==typeof d&&(t._i=d=t._locale.preparse(d)),_(d)?new x(ie(d)):(u(d)?t._d=d:a(v)?function(t){var e,n,r,i,a;if(0===t._f.length)return p(t).invalidFormat=!0,t._d=new Date(NaN);for(i=0;i<t._f.length;i++)a=0,e=m({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],ve(e),y(e)&&(a+=p(e).charsLeftOver,a+=10*p(e).unusedTokens.length,p(e).score=a,(null==r||a<r)&&(r=a,n=e));f(t,n||e)}(t):v?ve(t):s(n=(e=t)._i)?e._d=new Date(i.now()):u(n)?e._d=new Date(n.valueOf()):"string"==typeof n?(r=e,null===(h=fe.exec(r._i))?(de(r),!1===r._isValid&&(delete r._isValid,ge(r),!1===r._isValid&&(delete r._isValid,i.createFromInputFallback(r)))):r._d=new Date(+h[1])):a(n)?(e._a=l(n.slice(0),(function(t){return parseInt(t,10)})),oe(e)):o(n)?function(t){if(!t._d){var e=R(t._i);t._a=l([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),oe(t)}}(e):c(n)?e._d=new Date(n):i.createFromInputFallback(e),y(t)||(t._d=null),t))}function be(t,e,n,r,i){var s,c={};return!0!==n&&!1!==n||(r=n,n=void 0),(o(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||a(t)&&0===t.length)&&(t=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=i,c._l=n,c._i=t,c._f=e,c._strict=r,(s=new x(ie(me(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function xe(t,e,n,r){return be(t,e,n,r,!1)}i.createFromInputFallback=C("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var _e=C("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=xe.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:g()})),ke=C("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=xe.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:g()}));function we(t,e){var n,r;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return xe();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}var Ee=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Te(t){var e=R(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,c=e.minute||0,u=e.second||0,l=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===mt.call(Ee,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,r=0;r<Ee.length;++r)if(t[Ee[r]]){if(n)return!1;parseFloat(t[Ee[r]])!==w(t[Ee[r]])&&(n=!0)}return!0}(e),this._milliseconds=+l+1e3*u+6e4*c+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=re(),this._bubble()}function Ce(t){return t instanceof Te}function Se(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Ae(t,e){q(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+j(~~(t/60),2)+e+j(~~t%60,2)}))}Ae("Z",":"),Ae("ZZ",""),lt("Z",st),lt("ZZ",st),pt(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=Oe(st,t)}));var Me=/([\+\-]|\d\d)/gi;function Oe(t,e){var n=(e||"").match(t);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Me)||["-",0,0],i=60*r[1]+w(r[2]);return 0===i?0:"+"===r[0]?i:-i}function Be(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(_(t)||u(t)?t.valueOf():xe(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):xe(t).local()}function Ne(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function De(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Le=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ie=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Re(t,e){var n,r,i,a=t,o=null;return Ce(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:c(t)?(a={},e?a[e]=t:a.milliseconds=t):(o=Le.exec(t))?(n="-"===o[1]?-1:1,a={y:0,d:w(o[2])*n,h:w(o[3])*n,m:w(o[4])*n,s:w(o[5])*n,ms:w(Se(1e3*o[6]))*n}):(o=Ie.exec(t))?(n="-"===o[1]?-1:1,a={y:Fe(o[2],n),M:Fe(o[3],n),w:Fe(o[4],n),d:Fe(o[5],n),h:Fe(o[6],n),m:Fe(o[7],n),s:Fe(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=function(t,e){var n;return t.isValid()&&e.isValid()?(e=Be(e,t),t.isBefore(e)?n=Pe(t,e):((n=Pe(e,t)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}(xe(a.from),xe(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new Te(a),Ce(t)&&h(t,"_locale")&&(r._locale=t._locale),r}function Fe(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Pe(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function je(t,e){return function(n,r){var i;return null===r||isNaN(+r)||(M(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Ye(this,Re(n="string"==typeof n?+n:n,r),t),this}}function Ye(t,e,n,r){var a=e._milliseconds,o=Se(e._days),s=Se(e._months);t.isValid()&&(r=null==r||r,s&&St(t,_t(t,"Month")+s*n),o&&kt(t,"Date",_t(t,"Date")+o*n),a&&t._d.setTime(t._d.valueOf()+a*n),r&&i.updateOffset(t,o||s))}Re.fn=Te.prototype,Re.invalid=function(){return Re(NaN)};var ze=je(1,"add"),Ue=je(-1,"subtract");function $e(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,"months");return-(n+(e-r<0?(e-r)/(r-t.clone().add(n-1,"months")):(e-r)/(t.clone().add(n+1,"months")-r)))||0}function qe(t){var e;return void 0===t?this._locale._abbr:(null!=(e=re(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var We=C("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function Ve(){return this._locale}var He=126227808e5;function Ge(t,e){return(t%e+e)%e}function Xe(t,e,n){return t<100&&0<=t?new Date(t+400,e,n)-He:new Date(t,e,n).valueOf()}function Ze(t,e,n){return t<100&&0<=t?Date.UTC(t+400,e,n)-He:Date.UTC(t,e,n)}function Qe(t,e){q(0,[t,t.length],0,e)}function Ke(t,e,n,r,i){var a;return null==t?It(this,r,i).year:((a=Rt(t,r,i))<e&&(e=a),function(t,e,n,r,i){var a=Lt(t,e,n,r,i),o=Nt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,t,e,n,r,i))}q(0,["gg",2],0,(function(){return this.weekYear()%100})),q(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Qe("gggg","weekYear"),Qe("ggggg","weekYear"),Qe("GGGG","isoWeekYear"),Qe("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),P("weekYear",1),P("isoWeekYear",1),lt("G",at),lt("g",at),lt("GG",K,G),lt("gg",K,G),lt("GGGG",nt,Z),lt("gggg",nt,Z),lt("GGGGG",rt,Q),lt("ggggg",rt,Q),yt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,r){e[r.substr(0,2)]=w(t)})),yt(["gg","GG"],(function(t,e,n,r){e[r]=i.parseTwoDigitYear(t)})),q("Q",0,"Qo","quarter"),L("quarter","Q"),P("quarter",7),lt("Q",H),pt("Q",(function(t,e){e[1]=3*(w(t)-1)})),q("D",["DD",2],"Do","date"),L("date","D"),P("date",9),lt("D",K),lt("DD",K,G),lt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),pt(["D","DD"],2),pt("Do",(function(t,e){e[2]=w(t.match(K)[0])}));var Je=xt("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),P("dayOfYear",4),lt("DDD",et),lt("DDDD",X),pt(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=w(t)})),q("m",["mm",2],0,"minute"),L("minute","m"),P("minute",14),lt("m",K),lt("mm",K,G),pt(["m","mm"],4);var tn=xt("Minutes",!1);q("s",["ss",2],0,"second"),L("second","s"),P("second",15),lt("s",K),lt("ss",K,G),pt(["s","ss"],5);var en,nn=xt("Seconds",!1);for(q("S",0,0,(function(){return~~(this.millisecond()/100)})),q(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),q(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),q(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),q(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),q(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),q(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),L("millisecond","ms"),P("millisecond",16),lt("S",et,H),lt("SS",et,G),lt("SSS",et,X),en="SSSS";en.length<=9;en+="S")lt(en,it);function rn(t,e){e[6]=w(1e3*("0."+t))}for(en="S";en.length<=9;en+="S")pt(en,rn);var an=xt("Milliseconds",!1);q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");var on=x.prototype;function sn(t){return t}on.add=ze,on.calendar=function(t,e){var n=t||xe(),r=Be(n,this).startOf("day"),a=i.calendarFormat(this,r)||"sameElse",o=e&&(O(e[a])?e[a].call(this,n):e[a]);return this.format(o||this.localeData().calendar(a,this,xe(n)))},on.clone=function(){return new x(this)},on.diff=function(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=Be(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=I(e)){case"year":a=$e(this,r)/12;break;case"month":a=$e(this,r);break;case"quarter":a=$e(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:k(a)},on.endOf=function(t){var e;if(void 0===(t=I(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-Ge(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-Ge(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-Ge(e,1e3)-1}return this._d.setTime(e),i.updateOffset(this,!0),this},on.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=W(this,t);return this.localeData().postformat(e)},on.from=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||xe(t).isValid())?Re({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.fromNow=function(t){return this.from(xe(),t)},on.to=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||xe(t).isValid())?Re({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.toNow=function(t){return this.to(xe(),t)},on.get=function(t){return O(this[t=I(t)])?this[t]():this},on.invalidAt=function(){return p(this).overflow},on.isAfter=function(t,e){var n=_(t)?t:xe(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},on.isBefore=function(t,e){var n=_(t)?t:xe(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},on.isBetween=function(t,e,n,r){var i=_(t)?t:xe(t),a=_(e)?e:xe(e);return!!(this.isValid()&&i.isValid()&&a.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))},on.isSame=function(t,e){var n,r=_(t)?t:xe(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},on.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},on.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},on.isValid=function(){return y(this)},on.lang=We,on.locale=qe,on.localeData=Ve,on.max=ke,on.min=_e,on.parsingFlags=function(){return f({},p(this))},on.set=function(t,e){if("object"==typeof t)for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:F[n]});return e.sort((function(t,e){return t.priority-e.priority})),e}(t=R(t)),r=0;r<n.length;r++)this[n[r].unit](t[n[r].unit]);else if(O(this[t=I(t)]))return this[t](e);return this},on.startOf=function(t){var e;if(void 0===(t=I(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Ge(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=Ge(e,6e4);break;case"second":e=this._d.valueOf(),e-=Ge(e,1e3)}return this._d.setTime(e),i.updateOffset(this,!0),this},on.subtract=Ue,on.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},on.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},on.toDate=function(){return new Date(this.valueOf())},on.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||9999<n.year()?W(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",W(n,"Z")):W(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},on.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=e+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},on.toJSON=function(){return this.isValid()?this.toISOString():null},on.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},on.unix=function(){return Math.floor(this.valueOf()/1e3)},on.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},on.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},on.year=bt,on.isLeapYear=function(){return vt(this.year())},on.weekYear=function(t){return Ke.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},on.isoWeekYear=function(t){return Ke.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},on.quarter=on.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},on.month=At,on.daysInMonth=function(){return wt(this.year(),this.month())},on.week=on.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},on.isoWeek=on.isoWeeks=function(t){var e=It(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},on.weeksInYear=function(){var t=this.localeData()._week;return Rt(this.year(),t.dow,t.doy)},on.isoWeeksInYear=function(){return Rt(this.year(),1,4)},on.date=Je,on.day=on.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,n,r=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,n=this.localeData(),t="string"!=typeof e?e:isNaN(e)?"number"==typeof(e=n.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-r,"d")):r},on.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},on.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null==t)return this.day()||7;var e,n,r=(e=t,n=this.localeData(),"string"==typeof e?n.weekdaysParse(e)%7||7:isNaN(e)?null:e);return this.day(this.day()%7?r:r-7)},on.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},on.hour=on.hours=Xt,on.minute=on.minutes=tn,on.second=on.seconds=nn,on.millisecond=on.milliseconds=an,on.utcOffset=function(t,e,n){var r,a=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null==t)return this._isUTC?a:Ne(this);if("string"==typeof t){if(null===(t=Oe(st,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(r=Ne(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==t&&(!e||this._changeInProgress?Ye(this,Re(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this},on.utc=function(t){return this.utcOffset(0,t)},on.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ne(this),"m")),this},on.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Oe(ot,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},on.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?xe(t).utcOffset():0,(this.utcOffset()-t)%60==0)},on.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},on.isLocal=function(){return!!this.isValid()&&!this._isUTC},on.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},on.isUtc=De,on.isUTC=De,on.zoneAbbr=function(){return this._isUTC?"UTC":""},on.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},on.dates=C("dates accessor is deprecated. Use date instead.",Je),on.months=C("months accessor is deprecated. Use month instead",At),on.years=C("years accessor is deprecated. Use year instead",bt),on.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),on.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(m(t,this),(t=me(t))._a){var e=t._isUTC?d(t._a):xe(t._a);this._isDSTShifted=this.isValid()&&0<E(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted}));var cn=N.prototype;function un(t,e,n,r){var i=re(),a=d().set(r,e);return i[n](a,t)}function ln(t,e,n){if(c(t)&&(e=t,t=void 0),t=t||"",null!=e)return un(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=un(t,r,n,"month");return i}function hn(t,e,n,r){"boolean"==typeof t?c(e)&&(n=e,e=void 0):(e=t,t=!1,c(n=e)&&(n=e,e=void 0)),e=e||"";var i,a=re(),o=t?a._week.dow:0;if(null!=n)return un(e,(n+o)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=un(e,(i+o)%7,r,"day");return s}cn.calendar=function(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return O(r)?r.call(e,n):r},cn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},cn.invalidDate=function(){return this._invalidDate},cn.ordinal=function(t){return this._ordinal.replace("%d",t)},cn.preparse=sn,cn.postformat=sn,cn.relativeTime=function(t,e,n,r){var i=this._relativeTime[n];return O(i)?i(t,e,n,r):i.replace(/%d/i,t)},cn.pastFuture=function(t,e){var n=this._relativeTime[0<t?"future":"past"];return O(n)?n(e):n.replace(/%s/i,e)},cn.set=function(t){var e,n;for(n in t)O(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},cn.months=function(t,e){return t?a(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Et).test(e)?"format":"standalone"][t.month()]:a(this._months)?this._months:this._months.standalone},cn.monthsShort=function(t,e){return t?a(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Et.test(e)?"format":"standalone"][t.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},cn.monthsParse=function(t,e,n){var r,i,a;if(this._monthsParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=d([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=mt.call(this._shortMonthsParse,o))?i:null:-1!==(i=mt.call(this._longMonthsParse,o))?i:null:"MMM"===e?-1!==(i=mt.call(this._shortMonthsParse,o))?i:-1!==(i=mt.call(this._longMonthsParse,o))?i:null:-1!==(i=mt.call(this._longMonthsParse,o))?i:-1!==(i=mt.call(this._shortMonthsParse,o))?i:null}.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=d([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},cn.monthsRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||Bt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=Ot),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},cn.monthsShortRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||Bt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Mt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},cn.week=function(t){return It(t,this._week.dow,this._week.doy).week},cn.firstDayOfYear=function(){return this._week.doy},cn.firstDayOfWeek=function(){return this._week.dow},cn.weekdays=function(t,e){var n=a(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Ft(n,this._week.dow):t?n[t.day()]:n},cn.weekdaysMin=function(t){return!0===t?Ft(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},cn.weekdaysShort=function(t){return!0===t?Ft(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},cn.weekdaysParse=function(t,e,n){var r,i,a;if(this._weekdaysParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=d([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=mt.call(this._weekdaysParse,o))?i:null:"ddd"===e?-1!==(i=mt.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=mt.call(this._minWeekdaysParse,o))?i:null:"dddd"===e?-1!==(i=mt.call(this._weekdaysParse,o))?i:-1!==(i=mt.call(this._shortWeekdaysParse,o))?i:-1!==(i=mt.call(this._minWeekdaysParse,o))?i:null:"ddd"===e?-1!==(i=mt.call(this._shortWeekdaysParse,o))?i:-1!==(i=mt.call(this._weekdaysParse,o))?i:-1!==(i=mt.call(this._minWeekdaysParse,o))?i:null:-1!==(i=mt.call(this._minWeekdaysParse,o))?i:-1!==(i=mt.call(this._weekdaysParse,o))?i:-1!==(i=mt.call(this._shortWeekdaysParse,o))?i:null}.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=d([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}},cn.weekdaysRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=zt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},cn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ut),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},cn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$t),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},cn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},cn.meridiem=function(t,e,n){return 11<t?n?"pm":"PM":n?"am":"AM"},ee("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===w(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=C("moment.lang is deprecated. Use moment.locale instead.",ee),i.langData=C("moment.langData is deprecated. Use moment.localeData instead.",re);var fn=Math.abs;function dn(t,e,n,r){var i=Re(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function pn(t){return t<0?Math.floor(t):Math.ceil(t)}function yn(t){return 4800*t/146097}function gn(t){return 146097*t/4800}function vn(t){return function(){return this.as(t)}}var mn=vn("ms"),bn=vn("s"),xn=vn("m"),_n=vn("h"),kn=vn("d"),wn=vn("w"),En=vn("M"),Tn=vn("Q"),Cn=vn("y");function Sn(t){return function(){return this.isValid()?this._data[t]:NaN}}var An=Sn("milliseconds"),Mn=Sn("seconds"),On=Sn("minutes"),Bn=Sn("hours"),Nn=Sn("days"),Dn=Sn("months"),Ln=Sn("years"),In=Math.round,Rn={ss:44,s:45,m:45,h:22,d:26,M:11},Fn=Math.abs;function Pn(t){return(0<t)-(t<0)||+t}function jn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=Fn(this._milliseconds)/1e3,r=Fn(this._days),i=Fn(this._months);e=k((t=k(n/60))/60),n%=60,t%=60;var a=k(i/12),o=i%=12,s=r,c=e,u=t,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var f=h<0?"-":"",d=Pn(this._months)!==Pn(h)?"-":"",p=Pn(this._days)!==Pn(h)?"-":"",y=Pn(this._milliseconds)!==Pn(h)?"-":"";return f+"P"+(a?d+a+"Y":"")+(o?d+o+"M":"")+(s?p+s+"D":"")+(c||u||l?"T":"")+(c?y+c+"H":"")+(u?y+u+"M":"")+(l?y+l+"S":"")}var Yn=Te.prototype;return Yn.isValid=function(){return this._isValid},Yn.abs=function(){var t=this._data;return this._milliseconds=fn(this._milliseconds),this._days=fn(this._days),this._months=fn(this._months),t.milliseconds=fn(t.milliseconds),t.seconds=fn(t.seconds),t.minutes=fn(t.minutes),t.hours=fn(t.hours),t.months=fn(t.months),t.years=fn(t.years),this},Yn.add=function(t,e){return dn(this,t,e,1)},Yn.subtract=function(t,e){return dn(this,t,e,-1)},Yn.as=function(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=I(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+yn(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(gn(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}},Yn.asMilliseconds=mn,Yn.asSeconds=bn,Yn.asMinutes=xn,Yn.asHours=_n,Yn.asDays=kn,Yn.asWeeks=wn,Yn.asMonths=En,Yn.asQuarters=Tn,Yn.asYears=Cn,Yn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},Yn._bubble=function(){var t,e,n,r,i,a=this._milliseconds,o=this._days,s=this._months,c=this._data;return 0<=a&&0<=o&&0<=s||a<=0&&o<=0&&s<=0||(a+=864e5*pn(gn(s)+o),s=o=0),c.milliseconds=a%1e3,t=k(a/1e3),c.seconds=t%60,e=k(t/60),c.minutes=e%60,n=k(e/60),c.hours=n%24,s+=i=k(yn(o+=k(n/24))),o-=pn(gn(i)),r=k(s/12),s%=12,c.days=o,c.months=s,c.years=r,this},Yn.clone=function(){return Re(this)},Yn.get=function(t){return t=I(t),this.isValid()?this[t+"s"]():NaN},Yn.milliseconds=An,Yn.seconds=Mn,Yn.minutes=On,Yn.hours=Bn,Yn.days=Nn,Yn.weeks=function(){return k(this.days()/7)},Yn.months=Dn,Yn.years=Ln,Yn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,n,r,i,a,o,s,c,u,l,h=this.localeData(),f=(e=!t,n=h,r=Re(this).abs(),i=In(r.as("s")),a=In(r.as("m")),o=In(r.as("h")),s=In(r.as("d")),c=In(r.as("M")),u=In(r.as("y")),(l=i<=Rn.ss&&["s",i]||i<Rn.s&&["ss",i]||a<=1&&["m"]||a<Rn.m&&["mm",a]||o<=1&&["h"]||o<Rn.h&&["hh",o]||s<=1&&["d"]||s<Rn.d&&["dd",s]||c<=1&&["M"]||c<Rn.M&&["MM",c]||u<=1&&["y"]||["yy",u])[2]=e,l[3]=0<+this,l[4]=n,function(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}.apply(null,l));return t&&(f=h.pastFuture(+this,f)),h.postformat(f)},Yn.toISOString=jn,Yn.toString=jn,Yn.toJSON=jn,Yn.locale=qe,Yn.localeData=Ve,Yn.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",jn),Yn.lang=We,q("X",0,0,"unix"),q("x",0,0,"valueOf"),lt("x",at),lt("X",/[+-]?\d+(\.\d{1,3})?/),pt("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))})),pt("x",(function(t,e,n){n._d=new Date(w(t))})),i.version="2.24.0",e=xe,i.fn=on,i.min=function(){return we("isBefore",[].slice.call(arguments,0))},i.max=function(){return we("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=d,i.unix=function(t){return xe(1e3*t)},i.months=function(t,e){return ln(t,e,"months")},i.isDate=u,i.locale=ee,i.invalid=g,i.duration=Re,i.isMoment=_,i.weekdays=function(t,e,n){return hn(t,e,n,"weekdays")},i.parseZone=function(){return xe.apply(null,arguments).parseZone()},i.localeData=re,i.isDuration=Ce,i.monthsShort=function(t,e){return ln(t,e,"monthsShort")},i.weekdaysMin=function(t,e,n){return hn(t,e,n,"weekdaysMin")},i.defineLocale=ne,i.updateLocale=function(t,e){if(null!=e){var n,r,i=Zt;null!=(r=te(t))&&(i=r._config),(n=new N(e=B(i,e))).parentLocale=Qt[t],Qt[t]=n,ee(t)}else null!=Qt[t]&&(null!=Qt[t].parentLocale?Qt[t]=Qt[t].parentLocale:null!=Qt[t]&&delete Qt[t]);return Qt[t]},i.locales=function(){return S(Qt)},i.weekdaysShort=function(t,e,n){return hn(t,e,n,"weekdaysShort")},i.normalizeUnits=I,i.relativeTimeRounding=function(t){return void 0===t?In:"function"==typeof t&&(In=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==Rn[t]&&(void 0===e?Rn[t]:(Rn[t]=e,"s"===t&&(Rn.ss=e-1),!0))},i.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=on,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}).call(this,n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,5],r=[7,9,11,12,13,14,15,16,17,18,19,21,28,33],i=[1,15],a=[1,16],o=[1,17],s=[1,18],c=[1,19],u=[1,20],l=[1,21],h=[1,22],f=[1,24],d=[1,26],p=[1,29],y=[5,7,9,11,12,13,14,15,16,17,18,19,21,28,33],g={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,excludes:16,todayMarker:17,title:18,section:19,clickStatement:20,taskTxt:21,taskData:22,openDirective:23,typeDirective:24,closeDirective:25,":":26,argDirective:27,click:28,callbackname:29,callbackargs:30,href:31,clickStatementDebug:32,open_directive:33,type_directive:34,arg_directive:35,close_directive:36,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"excludes",17:"todayMarker",18:"title",19:"section",21:"taskTxt",22:"taskData",26:":",28:"click",29:"callbackname",30:"callbackargs",31:"href",33:"open_directive",34:"type_directive",35:"arg_directive",36:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[20,2],[20,3],[20,3],[20,4],[20,3],[20,4],[20,2],[32,2],[32,3],[32,3],[32,4],[32,3],[32,4],[32,2],[23,1],[24,1],[27,1],[25,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 2:return a[s-1];case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 9:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 10:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 11:r.TopAxis(),this.$=a[s].substr(8);break;case 12:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 13:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 14:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 15:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 16:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s-1],a[s]),this.$="task";break;case 22:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 23:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 24:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 25:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 26:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 27:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 28:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 29:case 35:this.$=a[s-1]+" "+a[s];break;case 30:case 31:case 33:this.$=a[s-2]+" "+a[s-1]+" "+a[s];break;case 32:case 34:this.$=a[s-3]+" "+a[s-2]+" "+a[s-1]+" "+a[s];break;case 36:r.parseDirective("%%{","open_directive");break;case 37:r.parseDirective(a[s],"type_directive");break;case 38:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 39:r.parseDirective("}%%","close_directive","gantt")}},table:[{3:1,4:2,5:e,23:4,33:n},{1:[3]},{3:6,4:2,5:e,23:4,33:n},t(r,[2,3],{6:7}),{24:8,34:[1,9]},{34:[2,36]},{1:[2,1]},{4:25,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:i,13:a,14:o,15:s,16:c,17:u,18:l,19:h,20:23,21:f,23:4,28:d,33:n},{25:27,26:[1,28],36:p},t([26,36],[2,37]),t(r,[2,8],{1:[2,2]}),t(r,[2,4]),{4:25,10:30,12:i,13:a,14:o,15:s,16:c,17:u,18:l,19:h,20:23,21:f,23:4,28:d,33:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),t(r,[2,17]),{22:[1,31]},t(r,[2,19]),{29:[1,32],31:[1,33]},{11:[1,34]},{27:35,35:[1,36]},{11:[2,39]},t(r,[2,5]),t(r,[2,18]),t(r,[2,22],{30:[1,37],31:[1,38]}),t(r,[2,28],{29:[1,39]}),t(y,[2,20]),{25:40,36:p},{36:[2,38]},t(r,[2,23],{31:[1,41]}),t(r,[2,24]),t(r,[2,26],{30:[1,42]}),{11:[1,43]},t(r,[2,25]),t(r,[2,27]),t(y,[2,21])],defaultActions:{5:[2,36],6:[2,1],29:[2,39],36:[2,38]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},v={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),33;case 1:return this.begin("type_directive"),34;case 2:return this.popState(),this.begin("arg_directive"),26;case 3:return this.popState(),this.popState(),36;case 4:return 35;case 5:case 6:case 7:break;case 8:return 11;case 9:case 10:case 11:break;case 12:this.begin("href");break;case 13:this.popState();break;case 14:return 31;case 15:this.begin("callbackname");break;case 16:this.popState();break;case 17:this.popState(),this.begin("callbackargs");break;case 18:return 29;case 19:this.popState();break;case 20:return 30;case 21:this.begin("click");break;case 22:this.popState();break;case 23:return 28;case 24:return 5;case 25:return 12;case 26:return 13;case 27:return 14;case 28:return 15;case 29:return 16;case 30:return 17;case 31:return"date";case 32:return 18;case 33:return 19;case 34:return 21;case 35:return 22;case 36:return 26;case 37:return 7;case 38:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[19,20],inclusive:!1},callbackname:{rules:[16,17,18],inclusive:!1},href:{rules:[13,14],inclusive:!1},click:{rules:[22,23],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,15,21,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],inclusive:!0}}};function m(){this.yy={}}return g.lexer=v,m.prototype=g,g.Parser=m,new m}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){var r=n(38),i=n(81);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e,n){var r=n(257),i=n(267),a=n(35),o=n(5),s=n(274);t.exports=function(t){return"function"==typeof t?t:null==t?a:"object"==typeof t?o(t)?i(t[0],t[1]):r(t):s(t)}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,9],n=[1,7],r=[1,6],i=[1,8],a=[1,20,21,22,23,38,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],o=[2,10],s=[1,20],c=[1,21],u=[1,22],l=[1,23],h=[1,30],f=[1,54],d=[1,32],p=[1,33],y=[1,34],g=[1,35],v=[1,36],m=[1,48],b=[1,43],x=[1,45],_=[1,40],k=[1,44],w=[1,47],E=[1,51],T=[1,52],C=[1,53],S=[1,42],A=[1,46],M=[1,49],O=[1,50],B=[1,41],N=[1,57],D=[1,62],L=[1,20,21,22,23,38,42,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],I=[1,66],R=[1,65],F=[1,67],P=[20,21,23,69,70],j=[1,88],Y=[1,93],z=[1,90],U=[1,95],$=[1,98],q=[1,96],W=[1,97],V=[1,91],H=[1,103],G=[1,102],X=[1,92],Z=[1,94],Q=[1,99],K=[1,100],J=[1,101],tt=[1,104],et=[20,21,22,23,69,70],nt=[20,21,22,23,47,69,70],rt=[20,21,22,23,40,46,47,49,51,53,55,57,59,61,62,64,69,70,80,94,95,98,99,100,102,103,109,110,111,112,113,114],it=[20,21,23],at=[20,21,23,46,69,70,80,94,95,98,99,100,102,103,109,110,111,112,113,114],ot=[1,12,20,21,22,23,24,38,42,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],st=[46,80,94,95,98,99,100,102,103,109,110,111,112,113,114],ct=[1,136],ut=[1,144],lt=[1,145],ht=[1,146],ft=[1,147],dt=[1,131],pt=[1,132],yt=[1,128],gt=[1,139],vt=[1,140],mt=[1,141],bt=[1,142],xt=[1,143],_t=[1,148],kt=[1,149],wt=[1,134],Et=[1,137],Tt=[1,133],Ct=[1,130],St=[20,21,22,23,38,42,46,75,76,77,78,79,80,94,95,98,99,100,102,103,109,110,111,112,113,114],At=[1,152],Mt=[20,21,22,23,26,46,80,94,95,98,99,100,102,103,109,110,111,112,113,114],Ot=[20,21,22,23,24,26,38,40,41,42,46,50,52,54,56,58,60,61,63,65,69,70,71,75,76,77,78,79,80,81,84,94,95,98,99,100,102,103,104,105,109,110,111,112,113,114],Bt=[12,21,22,24],Nt=[22,95],Dt=[1,233],Lt=[1,237],It=[1,234],Rt=[1,231],Ft=[1,228],Pt=[1,229],jt=[1,230],Yt=[1,232],zt=[1,235],Ut=[1,236],$t=[1,238],qt=[1,255],Wt=[20,21,23,95],Vt=[20,21,22,23,75,91,94,95,98,99,100,101,102,103,104],Ht={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,link:43,node:44,vertex:45,AMP:46,STYLE_SEPARATOR:47,idString:48,PS:49,PE:50,"(-":51,"-)":52,STADIUMSTART:53,STADIUMEND:54,SUBROUTINESTART:55,SUBROUTINEEND:56,CYLINDERSTART:57,CYLINDEREND:58,DIAMOND_START:59,DIAMOND_STOP:60,TAGEND:61,TRAPSTART:62,TRAPEND:63,INVTRAPSTART:64,INVTRAPEND:65,linkStatement:66,arrowText:67,TESTSTR:68,START_LINK:69,LINK:70,PIPE:71,textToken:72,STR:73,keywords:74,STYLE:75,LINKSTYLE:76,CLASSDEF:77,CLASS:78,CLICK:79,DOWN:80,UP:81,textNoTags:82,textNoTagsToken:83,DEFAULT:84,stylesOpt:85,alphaNum:86,CALLBACKNAME:87,CALLBACKARGS:88,HREF:89,LINK_TARGET:90,HEX:91,numList:92,INTERPOLATE:93,NUM:94,COMMA:95,style:96,styleComponent:97,ALPHA:98,COLON:99,MINUS:100,UNIT:101,BRKT:102,DOT:103,PCT:104,TAGSTART:105,alphaNumToken:106,idStringToken:107,alphaNumStatement:108,PUNCTUATION:109,UNICODE_TEXT:110,PLUS:111,EQUALS:112,MULT:113,UNDERSCORE:114,graphCodeTokens:115,ARROW_CROSS:116,ARROW_POINT:117,ARROW_CIRCLE:118,ARROW_OPEN:119,QUOTE:120,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",46:"AMP",47:"STYLE_SEPARATOR",49:"PS",50:"PE",51:"(-",52:"-)",53:"STADIUMSTART",54:"STADIUMEND",55:"SUBROUTINESTART",56:"SUBROUTINEEND",57:"CYLINDERSTART",58:"CYLINDEREND",59:"DIAMOND_START",60:"DIAMOND_STOP",61:"TAGEND",62:"TRAPSTART",63:"TRAPEND",64:"INVTRAPSTART",65:"INVTRAPEND",68:"TESTSTR",69:"START_LINK",70:"LINK",71:"PIPE",73:"STR",75:"STYLE",76:"LINKSTYLE",77:"CLASSDEF",78:"CLASS",79:"CLICK",80:"DOWN",81:"UP",84:"DEFAULT",87:"CALLBACKNAME",88:"CALLBACKARGS",89:"HREF",90:"LINK_TARGET",91:"HEX",93:"INTERPOLATE",94:"NUM",95:"COMMA",98:"ALPHA",99:"COLON",100:"MINUS",101:"UNIT",102:"BRKT",103:"DOT",104:"PCT",105:"TAGSTART",109:"PUNCTUATION",110:"UNICODE_TEXT",111:"PLUS",112:"EQUALS",113:"MULT",114:"UNDERSCORE",116:"ARROW_CROSS",117:"ARROW_POINT",118:"ARROW_CIRCLE",119:"ARROW_OPEN",120:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[44,1],[44,5],[44,3],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[43,2],[43,3],[43,3],[43,1],[43,3],[66,1],[67,3],[39,1],[39,2],[39,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[82,1],[82,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[92,1],[92,3],[85,1],[85,3],[96,1],[96,2],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[97,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[83,1],[83,1],[83,1],[83,1],[48,1],[48,2],[86,1],[86,2],[108,1],[108,1],[108,1],[108,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[106,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[107,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.parseDirective("%%{","open_directive");break;case 6:r.parseDirective(a[s],"type_directive");break;case 7:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 8:r.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:a[s]!==[]&&a[s-1].push(a[s]),this.$=a[s-1];break;case 12:case 76:case 78:case 90:case 146:case 148:case 149:this.$=a[s];break;case 19:r.setDirection("TB"),this.$="TB";break;case 20:r.setDirection(a[s-1]),this.$=a[s-1];break;case 35:this.$=a[s-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 42:this.$=r.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 43:this.$=r.addSubGraph(void 0,a[s-1],void 0);break;case 47:r.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 48:r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 49:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 50:this.$={stmt:a[s],nodes:a[s]};break;case 51:this.$=[a[s]];break;case 52:this.$=a[s-4].concat(a[s]);break;case 53:this.$=[a[s-2]],r.setClass(a[s-2],a[s]);break;case 54:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"square");break;case 55:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"circle");break;case 56:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"ellipse");break;case 57:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"stadium");break;case 58:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"subroutine");break;case 59:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"cylinder");break;case 60:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"round");break;case 61:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"diamond");break;case 62:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"hexagon");break;case 63:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"odd");break;case 64:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"trapezoid");break;case 65:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"inv_trapezoid");break;case 66:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_right");break;case 67:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_left");break;case 68:this.$=a[s],r.addVertex(a[s]);break;case 69:a[s-1].text=a[s],this.$=a[s-1];break;case 70:case 71:a[s-2].text=a[s-1],this.$=a[s-2];break;case 72:this.$=a[s];break;case 73:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1]};break;case 74:c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 75:this.$=a[s-1];break;case 77:case 91:case 147:this.$=a[s-1]+""+a[s];break;case 92:case 93:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 94:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 95:case 103:this.$=a[s-1],r.setClickEvent(a[s-1],a[s]);break;case 96:case 104:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 97:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 98:this.$=a[s-4],r.setClickEvent(a[s-4],a[s-3],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 99:case 105:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 100:case 106:this.$=a[s-3],r.setLink(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 101:case 107:this.$=a[s-3],r.setLink(a[s-3],a[s-2],a[s]);break;case 102:case 108:this.$=a[s-5],r.setLink(a[s-5],a[s-4],a[s]),r.setTooltip(a[s-5],a[s-2]);break;case 109:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 110:case 112:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 111:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 113:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 114:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 115:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 116:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 117:case 119:this.$=[a[s]];break;case 118:case 120:a[s-2].push(a[s]),this.$=a[s-2];break;case 122:this.$=a[s-1]+a[s];break;case 144:this.$=a[s];break;case 145:this.$=a[s-1]+""+a[s];break;case 150:this.$="v";break;case 151:this.$="-"}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},t(a,o,{17:11}),{7:12,13:[1,13]},{16:14,21:n,22:r,24:i},{16:15,21:n,22:r,24:i},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,44:31,45:37,46:f,48:38,75:d,76:p,77:y,78:g,79:v,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},{8:55,10:[1,56],15:N},t([10,15],[2,6]),t(a,[2,17]),t(a,[2,18]),t(a,[2,19]),{20:[1,59],21:[1,60],22:D,27:58,30:61},t(L,[2,11]),t(L,[2,12]),t(L,[2,13]),t(L,[2,14]),t(L,[2,15]),t(L,[2,16]),{9:63,20:I,21:R,23:F,43:64,66:68,69:[1,69],70:[1,70]},{9:71,20:I,21:R,23:F},{9:72,20:I,21:R,23:F},{9:73,20:I,21:R,23:F},{9:74,20:I,21:R,23:F},{9:75,20:I,21:R,23:F},{9:77,20:I,21:R,22:[1,76],23:F},t(P,[2,50],{30:78,22:D}),{22:[1,79]},{22:[1,80]},{22:[1,81]},{22:[1,82]},{26:j,46:Y,73:[1,86],80:z,86:85,87:[1,83],89:[1,84],94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(et,[2,51],{47:[1,105]}),t(nt,[2,68],{107:116,40:[1,106],46:f,49:[1,107],51:[1,108],53:[1,109],55:[1,110],57:[1,111],59:[1,112],61:[1,113],62:[1,114],64:[1,115],80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,109:C,110:S,111:A,112:M,113:O,114:B}),t(rt,[2,144]),t(rt,[2,165]),t(rt,[2,166]),t(rt,[2,167]),t(rt,[2,168]),t(rt,[2,169]),t(rt,[2,170]),t(rt,[2,171]),t(rt,[2,172]),t(rt,[2,173]),t(rt,[2,174]),t(rt,[2,175]),t(rt,[2,176]),t(rt,[2,177]),t(rt,[2,178]),t(rt,[2,179]),{9:117,20:I,21:R,23:F},{11:118,14:[1,119]},t(it,[2,8]),t(a,[2,20]),t(a,[2,26]),t(a,[2,27]),{21:[1,120]},t(at,[2,34],{30:121,22:D}),t(L,[2,35]),{44:122,45:37,46:f,48:38,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},t(ot,[2,44]),t(ot,[2,45]),t(ot,[2,46]),t(st,[2,72],{67:123,68:[1,124],71:[1,125]}),{22:ct,24:ut,26:lt,38:ht,39:126,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t([46,68,71,80,94,95,98,99,100,102,103,109,110,111,112,113,114],[2,74]),t(L,[2,36]),t(L,[2,37]),t(L,[2,38]),t(L,[2,39]),t(L,[2,40]),{22:ct,24:ut,26:lt,38:ht,39:150,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(St,o,{17:151}),t(P,[2,49],{46:At}),{26:j,46:Y,80:z,86:153,91:[1,154],94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},{84:[1,155],92:156,94:[1,157]},{26:j,46:Y,80:z,84:[1,158],86:159,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},{26:j,46:Y,80:z,86:160,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(it,[2,95],{22:[1,161],88:[1,162]}),t(it,[2,99],{22:[1,163]}),t(it,[2,103],{106:89,108:165,22:[1,164],26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,109:X,110:Z,111:Q,112:K,113:J,114:tt}),t(it,[2,105],{22:[1,166]}),t(Mt,[2,146]),t(Mt,[2,148]),t(Mt,[2,149]),t(Mt,[2,150]),t(Mt,[2,151]),t(Ot,[2,152]),t(Ot,[2,153]),t(Ot,[2,154]),t(Ot,[2,155]),t(Ot,[2,156]),t(Ot,[2,157]),t(Ot,[2,158]),t(Ot,[2,159]),t(Ot,[2,160]),t(Ot,[2,161]),t(Ot,[2,162]),t(Ot,[2,163]),t(Ot,[2,164]),{46:f,48:167,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},{22:ct,24:ut,26:lt,38:ht,39:168,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:170,42:ft,46:Y,49:[1,169],61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:171,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:172,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:173,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:174,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:175,42:ft,46:Y,59:[1,176],61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:177,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:178,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:179,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(rt,[2,145]),t(Bt,[2,3]),{8:180,15:N},{15:[2,7]},t(a,[2,28]),t(at,[2,33]),t(P,[2,47],{30:181,22:D}),t(st,[2,69],{22:[1,182]}),{22:[1,183]},{22:ct,24:ut,26:lt,38:ht,39:184,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,61:dt,69:pt,70:[1,185],72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(Ot,[2,76]),t(Ot,[2,78]),t(Ot,[2,134]),t(Ot,[2,135]),t(Ot,[2,136]),t(Ot,[2,137]),t(Ot,[2,138]),t(Ot,[2,139]),t(Ot,[2,140]),t(Ot,[2,141]),t(Ot,[2,142]),t(Ot,[2,143]),t(Ot,[2,79]),t(Ot,[2,80]),t(Ot,[2,81]),t(Ot,[2,82]),t(Ot,[2,83]),t(Ot,[2,84]),t(Ot,[2,85]),t(Ot,[2,86]),t(Ot,[2,87]),t(Ot,[2,88]),t(Ot,[2,89]),{9:188,20:I,21:R,22:ct,23:F,24:ut,26:lt,38:ht,40:[1,187],42:ft,46:Y,61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,189],44:31,45:37,46:f,48:38,75:d,76:p,77:y,78:g,79:v,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},{22:D,30:190},{22:[1,191],26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:165,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:[1,192]},{22:[1,193]},{22:[1,194],95:[1,195]},t(Nt,[2,117]),{22:[1,196]},{22:[1,197],26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:165,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:[1,198],26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:165,109:X,110:Z,111:Q,112:K,113:J,114:tt},{73:[1,199]},t(it,[2,97],{22:[1,200]}),{73:[1,201],90:[1,202]},{73:[1,203]},t(Mt,[2,147]),{73:[1,204],90:[1,205]},t(et,[2,53],{107:116,46:f,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,109:C,110:S,111:A,112:M,113:O,114:B}),{22:ct,24:ut,26:lt,38:ht,41:[1,206],42:ft,46:Y,61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:207,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,50:[1,208],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,52:[1,209],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,54:[1,210],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,56:[1,211],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,58:[1,212],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,60:[1,213],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,39:214,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,41:[1,215],42:ft,46:Y,61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,61:dt,63:[1,216],65:[1,217],69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,61:dt,63:[1,219],65:[1,218],69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{9:220,20:I,21:R,23:F},t(P,[2,48],{46:At}),t(st,[2,71]),t(st,[2,70]),{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,61:dt,69:pt,71:[1,221],72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(st,[2,73]),t(Ot,[2,77]),{22:ct,24:ut,26:lt,38:ht,39:222,42:ft,46:Y,61:dt,69:pt,72:127,73:yt,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(St,o,{17:223}),t(L,[2,43]),{45:224,46:f,48:38,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},{22:Dt,75:Lt,85:225,91:It,94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{22:Dt,75:Lt,85:239,91:It,94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{22:Dt,75:Lt,85:240,91:It,93:[1,241],94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{22:Dt,75:Lt,85:242,91:It,93:[1,243],94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{94:[1,244]},{22:Dt,75:Lt,85:245,91:It,94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{22:Dt,75:Lt,85:246,91:It,94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{26:j,46:Y,80:z,86:247,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(it,[2,96]),{73:[1,248]},t(it,[2,100],{22:[1,249]}),t(it,[2,101]),t(it,[2,104]),t(it,[2,106],{22:[1,250]}),t(it,[2,107]),t(nt,[2,54]),{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,50:[1,251],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(nt,[2,60]),t(nt,[2,56]),t(nt,[2,57]),t(nt,[2,58]),t(nt,[2,59]),t(nt,[2,61]),{22:ct,24:ut,26:lt,38:ht,42:ft,46:Y,60:[1,252],61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(nt,[2,63]),t(nt,[2,64]),t(nt,[2,66]),t(nt,[2,65]),t(nt,[2,67]),t(Bt,[2,4]),t([22,46,80,94,95,98,99,100,102,103,109,110,111,112,113,114],[2,75]),{22:ct,24:ut,26:lt,38:ht,41:[1,253],42:ft,46:Y,61:dt,69:pt,72:186,74:138,75:gt,76:vt,77:mt,78:bt,79:xt,80:_t,81:kt,83:129,84:wt,94:U,95:$,98:q,99:W,100:Et,102:H,103:G,104:Tt,105:Ct,106:135,109:X,110:Z,111:Q,112:K,113:J,114:tt},{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,254],44:31,45:37,46:f,48:38,75:d,76:p,77:y,78:g,79:v,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},t(et,[2,52]),t(it,[2,109],{95:qt}),t(Wt,[2,119],{97:256,22:Dt,75:Lt,91:It,94:Rt,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t}),t(Vt,[2,121]),t(Vt,[2,123]),t(Vt,[2,124]),t(Vt,[2,125]),t(Vt,[2,126]),t(Vt,[2,127]),t(Vt,[2,128]),t(Vt,[2,129]),t(Vt,[2,130]),t(Vt,[2,131]),t(Vt,[2,132]),t(Vt,[2,133]),t(it,[2,110],{95:qt}),t(it,[2,111],{95:qt}),{22:[1,257]},t(it,[2,112],{95:qt}),{22:[1,258]},t(Nt,[2,118]),t(it,[2,92],{95:qt}),t(it,[2,93],{95:qt}),t(it,[2,94],{106:89,108:165,26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,109:X,110:Z,111:Q,112:K,113:J,114:tt}),t(it,[2,98]),{90:[1,259]},{90:[1,260]},{50:[1,261]},{60:[1,262]},{9:263,20:I,21:R,23:F},t(L,[2,42]),{22:Dt,75:Lt,91:It,94:Rt,96:264,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},t(Vt,[2,122]),{26:j,46:Y,80:z,86:265,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},{26:j,46:Y,80:z,86:266,94:U,95:$,98:q,99:W,100:V,102:H,103:G,106:89,108:87,109:X,110:Z,111:Q,112:K,113:J,114:tt},t(it,[2,102]),t(it,[2,108]),t(nt,[2,55]),t(nt,[2,62]),t(St,o,{17:267}),t(Wt,[2,120],{97:256,22:Dt,75:Lt,91:It,94:Rt,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t}),t(it,[2,115],{106:89,108:165,22:[1,268],26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,109:X,110:Z,111:Q,112:K,113:J,114:tt}),t(it,[2,116],{106:89,108:165,22:[1,269],26:j,46:Y,80:z,94:U,95:$,98:q,99:W,100:V,102:H,103:G,109:X,110:Z,111:Q,112:K,113:J,114:tt}),{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,270],44:31,45:37,46:f,48:38,75:d,76:p,77:y,78:g,79:v,80:m,94:b,95:x,98:_,99:k,100:w,102:E,103:T,107:39,109:C,110:S,111:A,112:M,113:O,114:B},{22:Dt,75:Lt,85:271,91:It,94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},{22:Dt,75:Lt,85:272,91:It,94:Rt,96:226,97:227,98:Ft,99:Pt,100:jt,101:Yt,102:zt,103:Ut,104:$t},t(L,[2,41]),t(it,[2,113],{95:qt}),t(it,[2,114],{95:qt})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],119:[2,7]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},Gt={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:case 6:break;case 7:this.begin("string");break;case 8:this.popState();break;case 9:return"STR";case 10:return 75;case 11:return 84;case 12:return 76;case 13:return 93;case 14:return 77;case 15:return 78;case 16:this.begin("href");break;case 17:this.popState();break;case 18:return 89;case 19:this.begin("callbackname");break;case 20:this.popState();break;case 21:this.popState(),this.begin("callbackargs");break;case 22:return 87;case 23:this.popState();break;case 24:return 88;case 25:this.begin("click");break;case 26:this.popState();break;case 27:return 79;case 28:case 29:return t.lex.firstGraph()&&this.begin("dir"),24;case 30:return 38;case 31:return 42;case 32:case 33:case 34:case 35:return 90;case 36:return this.popState(),25;case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:return this.popState(),26;case 47:return 94;case 48:return 102;case 49:return 47;case 50:return 99;case 51:return 46;case 52:return 20;case 53:return 95;case 54:return 113;case 55:case 56:case 57:return 70;case 58:case 59:case 60:return 69;case 61:return 51;case 62:return 52;case 63:return 53;case 64:return 54;case 65:return 55;case 66:return 56;case 67:return 57;case 68:return 58;case 69:return 100;case 70:return 103;case 71:return 114;case 72:return 111;case 73:return 104;case 74:case 75:return 112;case 76:return 105;case 77:return 61;case 78:return 81;case 79:return"SEP";case 80:return 80;case 81:return 98;case 82:return 63;case 83:return 62;case 84:return 65;case 85:return 64;case 86:return 109;case 87:return 110;case 88:return 71;case 89:return 49;case 90:return 50;case 91:return 40;case 92:return 41;case 93:return 59;case 94:return 60;case 95:return 120;case 96:return 21;case 97:return 22;case 98:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\()/,/^(?:\)\])/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_\/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[23,24],inclusive:!1},callbackname:{rules:[20,21,22],inclusive:!1},href:{rules:[17,18],inclusive:!1},click:{rules:[26,27],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[36,37,38,39,40,41,42,43,44,45,46],inclusive:!1},string:{rules:[8,9],inclusive:!1},INITIAL:{rules:[0,5,6,7,10,11,12,13,14,15,16,19,25,28,29,30,31,32,33,34,35,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98],inclusive:!0}}};function Xt(){this.yy={}}return Ht.lexer=Gt,Xt.prototype=Ht,Ht.Parser=Xt,new Xt}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,17,18,19,21],i=[1,15],a=[1,16],o=[1,17],s=[1,21],c=[4,6,9,11,17,18,19,21],u={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,section:18,taskName:19,taskData:20,open_directive:21,type_directive:22,arg_directive:23,close_directive:24,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"section",19:"taskName",20:"taskData",21:"open_directive",22:"type_directive",23:"arg_directive",24:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 11:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$="task";break;case 15:r.parseDirective("%%{","open_directive");break;case 16:r.parseDirective(a[s],"type_directive");break;case 17:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 18:r.parseDirective("}%%","close_directive","journey")}},table:[{3:1,4:e,7:3,12:4,21:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,21:n},{13:8,22:[1,9]},{22:[2,15]},{6:[1,10],7:18,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:a,19:o,21:n},{1:[2,2]},{14:19,15:[1,20],24:s},t([15,24],[2,16]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:18,10:22,12:4,17:i,18:a,19:o,21:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,12]),{20:[1,23]},t(r,[2,14]),{11:[1,24]},{16:25,23:[1,26]},{11:[2,18]},t(r,[2,5]),t(r,[2,13]),t(c,[2,9]),{14:27,24:s},{24:[2,17]},{11:[1,28]},t(c,[2,10])],defaultActions:{5:[2,15],7:[2,2],21:[2,18],26:[2,17]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},l={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),21;case 1:return this.begin("type_directive"),22;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),24;case 4:return 23;case 5:case 6:break;case 7:return 11;case 8:case 9:break;case 10:return 4;case 11:return 17;case 12:return 18;case 13:return 19;case 14:return 20;case 15:return 15;case 16:return 6;case 17:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}}};function h(){this.yy={}}return u.lexer=l,h.prototype=u,u.Parser=h,new h}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(16);e.default=function(t,e){return r.default.lang.round(i.default.parse(t)[e])}},function(t,e,n){var r=n(113),i=n(83),a=n(25);t.exports=function(t){return a(t)?r(t):i(t)}},function(t,e,n){var r;if(!r)try{r=n(0)}catch(t){}r||(r=window.d3),t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(16);e.default=function(t,e,n){var a=i.default.parse(t),o=a[e],s=r.default.channel.clamp[e](o+n);return o!==s&&(a[e]=s),i.default.stringify(a)}},function(t,e,n){var r=n(211),i=n(217);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(39),i=n(213),a=n(214),o=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?i(t):a(t)}},function(t,e){t.exports=function(t){return t}},function(t){t.exports=JSON.parse('{"name":"mermaid","version":"8.9.3","description":"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.","main":"dist/mermaid.core.js","keywords":["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],"scripts":{"build:development":"webpack --progress --colors","build:production":"yarn build:development -p --config webpack.config.prod.babel.js","build":"yarn build:development && yarn build:production","postbuild":"documentation build src/mermaidAPI.js src/config.js src/defaultConfig.js --shallow -f md --markdown-toc false > docs/Setup.md","build:watch":"yarn build --watch","minify":"minify ./dist/mermaid.js > ./dist/mermaid.min.js","release":"yarn build","lint":"eslint src","e2e:depr":"yarn lint && jest e2e --config e2e/jest.config.js","cypress":"percy exec -- cypress run","e2e":"start-server-and-test dev http://localhost:9000/ cypress","e2e-upd":"yarn lint && jest e2e -u --config e2e/jest.config.js","dev":"webpack-dev-server --config webpack.config.e2e.js","test":"yarn lint && jest src/.*","test:watch":"jest --watch src","prepublishOnly":"yarn build && yarn test","prepare":"yarn build"},"repository":{"type":"git","url":"https://github.com/knsv/mermaid"},"author":"Knut Sveidqvist","license":"MIT","standard":{"ignore":["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],"globals":["page"]},"dependencies":{"@braintree/sanitize-url":"^3.1.0","d3":"^5.7.0","dagre":"^0.8.4","dagre-d3":"^0.6.4","entity-decode":"^2.0.2","graphlib":"^2.1.7","he":"^1.2.0","khroma":"^1.1.0","minify":"^4.1.1","moment-mini":"^2.22.1","stylis":"^3.5.2"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.8.4","@babel/register":"^7.0.0","@percy/cypress":"*","babel-core":"7.0.0-bridge.0","babel-eslint":"^10.1.0","babel-jest":"^24.9.0","babel-loader":"^8.0.4","coveralls":"^3.0.2","css-loader":"^2.0.1","css-to-string-loader":"^0.1.3","cypress":"4.0.1","documentation":"^12.0.1","eslint":"^6.3.0","eslint-config-prettier":"^6.3.0","eslint-plugin-prettier":"^3.1.0","husky":"^1.2.1","identity-obj-proxy":"^3.0.0","jest":"^24.9.0","jison":"^0.4.18","moment":"^2.23.0","node-sass":"^5.0.0","prettier":"^1.18.2","puppeteer":"^1.17.0","sass-loader":"^7.1.0","start-server-and-test":"^1.10.6","terser-webpack-plugin":"^2.2.2","webpack":"^4.41.2","webpack-bundle-analyzer":"^3.7.0","webpack-cli":"^3.1.2","webpack-dev-server":"^3.4.1","webpack-node-externals":"^1.7.2","yarn-upgrade-all":"^0.5.0"},"files":["dist"],"yarn-upgrade-all":{"ignore":["babel-core"]},"sideEffects":["**/*.css","**/*.scss"],"husky":{"hooks":{"pre-push":"yarn test"}}}')},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(34),i=n(13);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(19).Symbol;t.exports=r},function(t,e,n){(function(t){var r=n(19),i=n(233),a=e&&!e.nodeType&&e,o=a&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===a?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||i;t.exports=c}).call(this,n(6)(t))},function(t,e,n){var r=n(113),i=n(237),a=n(25);t.exports=function(t){return a(t)?r(t,!0):i(t)}},function(t,e,n){var r=n(242),i=n(78),a=n(243),o=n(122),s=n(244),c=n(34),u=n(111),l=u(r),h=u(i),f=u(a),d=u(o),p=u(s),y=c;(r&&"[object DataView]"!=y(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=y(new i)||a&&"[object Promise]"!=y(a.resolve())||o&&"[object Set]"!=y(new o)||s&&"[object WeakMap]"!=y(new s))&&(y=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,r=n?u(n):"";if(r)switch(r){case l:return"[object DataView]";case h:return"[object Map]";case f:return"[object Promise]";case d:return"[object Set]";case p:return"[object WeakMap]"}return e}),t.exports=y},function(t,e,n){var r=n(34),i=n(21);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,e,n){var r;try{r={defaults:n(155),each:n(88),isFunction:n(38),isPlainObject:n(159),pick:n(162),has:n(94),range:n(163),uniqueId:n(164)}}catch(t){}r||(r=window._),t.exports=r},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,5],r=[1,17],i=[2,10],a=[1,21],o=[1,22],s=[1,23],c=[1,24],u=[1,25],l=[1,26],h=[1,19],f=[1,27],d=[1,28],p=[1,31],y=[66,67],g=[5,8,14,35,36,37,38,39,40,48,55,57,66,67],v=[5,6,8,14,35,36,37,38,39,40,48,66,67],m=[1,51],b=[1,52],x=[1,53],_=[1,54],k=[1,55],w=[1,56],E=[1,57],T=[57,58],C=[1,69],S=[1,65],A=[1,66],M=[1,67],O=[1,68],B=[1,70],N=[1,74],D=[1,75],L=[1,72],I=[1,73],R=[5,8,14,35,36,37,38,39,40,48,66,67],F={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,open_directive:14,type_directive:15,arg_directive:16,close_directive:17,requirementDef:18,elementDef:19,relationshipDef:20,requirementType:21,requirementName:22,STRUCT_START:23,requirementBody:24,ID:25,COLONSEP:26,id:27,TEXT:28,text:29,RISK:30,riskLevel:31,VERIFYMTHD:32,verifyType:33,STRUCT_STOP:34,REQUIREMENT:35,FUNCTIONAL_REQUIREMENT:36,INTERFACE_REQUIREMENT:37,PERFORMANCE_REQUIREMENT:38,PHYSICAL_REQUIREMENT:39,DESIGN_CONSTRAINT:40,LOW_RISK:41,MED_RISK:42,HIGH_RISK:43,VERIFY_ANALYSIS:44,VERIFY_DEMONSTRATION:45,VERIFY_INSPECTION:46,VERIFY_TEST:47,ELEMENT:48,elementName:49,elementBody:50,TYPE:51,type:52,DOCREF:53,ref:54,END_ARROW_L:55,relationship:56,LINE:57,END_ARROW_R:58,CONTAINS:59,COPIES:60,DERIVES:61,SATISFIES:62,VERIFIES:63,REFINES:64,TRACES:65,unqString:66,qString:67,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"open_directive",15:"type_directive",16:"arg_directive",17:"close_directive",23:"STRUCT_START",25:"ID",26:"COLONSEP",28:"TEXT",30:"RISK",32:"VERIFYMTHD",34:"STRUCT_STOP",35:"REQUIREMENT",36:"FUNCTIONAL_REQUIREMENT",37:"INTERFACE_REQUIREMENT",38:"PERFORMANCE_REQUIREMENT",39:"PHYSICAL_REQUIREMENT",40:"DESIGN_CONSTRAINT",41:"LOW_RISK",42:"MED_RISK",43:"HIGH_RISK",44:"VERIFY_ANALYSIS",45:"VERIFY_DEMONSTRATION",46:"VERIFY_INSPECTION",47:"VERIFY_TEST",48:"ELEMENT",51:"TYPE",53:"DOCREF",55:"END_ARROW_L",57:"LINE",58:"END_ARROW_R",59:"CONTAINS",60:"COPIES",61:"DERIVES",62:"SATISFIES",63:"VERIFIES",64:"REFINES",65:"TRACES",66:"unqString",67:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[18,5],[24,5],[24,5],[24,5],[24,5],[24,2],[24,1],[21,1],[21,1],[21,1],[21,1],[21,1],[21,1],[31,1],[31,1],[31,1],[33,1],[33,1],[33,1],[33,1],[19,5],[50,5],[50,5],[50,2],[50,1],[20,5],[20,5],[56,1],[56,1],[56,1],[56,1],[56,1],[56,1],[56,1],[22,1],[22,1],[27,1],[27,1],[29,1],[29,1],[49,1],[49,1],[52,1],[52,1],[54,1],[54,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:r.parseDirective("%%{","open_directive");break;case 7:r.parseDirective(a[s],"type_directive");break;case 8:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 9:r.parseDirective("}%%","close_directive","pie");break;case 10:this.$=[];break;case 16:r.addRequirement(a[s-3],a[s-4]);break;case 17:r.setNewReqId(a[s-2]);break;case 18:r.setNewReqText(a[s-2]);break;case 19:r.setNewReqRisk(a[s-2]);break;case 20:r.setNewReqVerifyMethod(a[s-2]);break;case 23:this.$=r.RequirementType.REQUIREMENT;break;case 24:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 25:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 26:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 27:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 28:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 29:this.$=r.RiskLevel.LOW_RISK;break;case 30:this.$=r.RiskLevel.MED_RISK;break;case 31:this.$=r.RiskLevel.HIGH_RISK;break;case 32:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 33:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 34:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 35:this.$=r.VerifyType.VERIFY_TEST;break;case 36:r.addElement(a[s-3]);break;case 37:r.setNewElementType(a[s-2]);break;case 38:r.setNewElementDocRef(a[s-2]);break;case 41:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 42:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 43:this.$=r.Relationships.CONTAINS;break;case 44:this.$=r.Relationships.COPIES;break;case 45:this.$=r.Relationships.DERIVES;break;case 46:this.$=r.Relationships.SATISFIES;break;case 47:this.$=r.Relationships.VERIFIES;break;case 48:this.$=r.Relationships.REFINES;break;case 49:this.$=r.Relationships.TRACES}},table:[{3:1,4:2,6:e,9:4,14:n},{1:[3]},{3:7,4:2,5:[1,6],6:e,9:4,14:n},{5:[1,8]},{10:9,15:[1,10]},{15:[2,6]},{3:11,4:2,6:e,9:4,14:n},{1:[2,2]},{4:16,5:r,7:12,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:u,40:l,48:h,66:f,67:d},{11:29,12:[1,30],17:p},t([12,17],[2,7]),{1:[2,1]},{8:[1,32]},{4:16,5:r,7:33,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:u,40:l,48:h,66:f,67:d},{4:16,5:r,7:34,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:u,40:l,48:h,66:f,67:d},{4:16,5:r,7:35,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:u,40:l,48:h,66:f,67:d},{4:16,5:r,7:36,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:u,40:l,48:h,66:f,67:d},{4:16,5:r,7:37,8:i,9:4,14:n,18:13,19:14,20:15,21:18,27:20,35:a,36:o,37:s,38:c,39:u,40:l,48:h,66:f,67:d},{22:38,66:[1,39],67:[1,40]},{49:41,66:[1,42],67:[1,43]},{55:[1,44],57:[1,45]},t(y,[2,23]),t(y,[2,24]),t(y,[2,25]),t(y,[2,26]),t(y,[2,27]),t(y,[2,28]),t(g,[2,52]),t(g,[2,53]),t(v,[2,4]),{13:46,16:[1,47]},t(v,[2,9]),{1:[2,3]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{23:[1,48]},{23:[2,50]},{23:[2,51]},{23:[1,49]},{23:[2,56]},{23:[2,57]},{56:50,59:m,60:b,61:x,62:_,63:k,64:w,65:E},{56:58,59:m,60:b,61:x,62:_,63:k,64:w,65:E},{11:59,17:p},{17:[2,8]},{5:[1,60]},{5:[1,61]},{57:[1,62]},t(T,[2,43]),t(T,[2,44]),t(T,[2,45]),t(T,[2,46]),t(T,[2,47]),t(T,[2,48]),t(T,[2,49]),{58:[1,63]},t(v,[2,5]),{5:C,24:64,25:S,28:A,30:M,32:O,34:B},{5:N,34:D,50:71,51:L,53:I},{27:76,66:f,67:d},{27:77,66:f,67:d},t(R,[2,16]),{26:[1,78]},{26:[1,79]},{26:[1,80]},{26:[1,81]},{5:C,24:82,25:S,28:A,30:M,32:O,34:B},t(R,[2,22]),t(R,[2,36]),{26:[1,83]},{26:[1,84]},{5:N,34:D,50:85,51:L,53:I},t(R,[2,40]),t(R,[2,41]),t(R,[2,42]),{27:86,66:f,67:d},{29:87,66:[1,88],67:[1,89]},{31:90,41:[1,91],42:[1,92],43:[1,93]},{33:94,44:[1,95],45:[1,96],46:[1,97],47:[1,98]},t(R,[2,21]),{52:99,66:[1,100],67:[1,101]},{54:102,66:[1,103],67:[1,104]},t(R,[2,39]),{5:[1,105]},{5:[1,106]},{5:[2,54]},{5:[2,55]},{5:[1,107]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[1,108]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[2,35]},{5:[1,109]},{5:[2,58]},{5:[2,59]},{5:[1,110]},{5:[2,60]},{5:[2,61]},{5:C,24:111,25:S,28:A,30:M,32:O,34:B},{5:C,24:112,25:S,28:A,30:M,32:O,34:B},{5:C,24:113,25:S,28:A,30:M,32:O,34:B},{5:C,24:114,25:S,28:A,30:M,32:O,34:B},{5:N,34:D,50:115,51:L,53:I},{5:N,34:D,50:116,51:L,53:I},t(R,[2,17]),t(R,[2,18]),t(R,[2,19]),t(R,[2,20]),t(R,[2,37]),t(R,[2,38])],defaultActions:{5:[2,6],7:[2,2],11:[2,1],32:[2,3],33:[2,11],34:[2,12],35:[2,13],36:[2,14],37:[2,15],39:[2,50],40:[2,51],42:[2,56],43:[2,57],47:[2,8],88:[2,54],89:[2,55],91:[2,29],92:[2,30],93:[2,31],95:[2,32],96:[2,33],97:[2,34],98:[2,35],100:[2,58],101:[2,59],103:[2,60],104:[2,61]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},P={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),14;case 1:return this.begin("type_directive"),15;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),17;case 4:return 16;case 5:return 5;case 6:case 7:case 8:break;case 9:return 8;case 10:return 6;case 11:return 23;case 12:return 34;case 13:return 26;case 14:return 25;case 15:return 28;case 16:return 30;case 17:return 32;case 18:return 35;case 19:return 36;case 20:return 37;case 21:return 38;case 22:return 39;case 23:return 40;case 24:return 41;case 25:return 42;case 26:return 43;case 27:return 44;case 28:return 45;case 29:return 46;case 30:return 47;case 31:return 48;case 32:return 59;case 33:return 60;case 34:return 61;case 35:return 62;case 36:return 63;case 37:return 64;case 38:return 65;case 39:return 51;case 40:return 53;case 41:return 55;case 42:return 58;case 43:return 57;case 44:this.begin("string");break;case 45:this.popState();break;case 46:return"qString";case 47:return e.yytext=e.yytext.trim(),66}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[45,46],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,47],inclusive:!0}}};function j(){this.yy={}}return F.lexer=P,j.prototype=F,F.Parser=j,new j}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=new(n(176).default)({r:0,g:0,b:0,a:0},"transparent");e.default=r},function(t,e,n){var r=n(59),i=n(60);t.exports=function(t,e,n,a){var o=!n;n||(n={});for(var s=-1,c=e.length;++s<c;){var u=e[s],l=a?a(n[u],t[u],u,n,t):void 0;void 0===l&&(l=t[u]),o?i(n,u,l):r(n,u,l)}return n}},function(t,e,n){var r=n(232),i=n(21),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return i(t)&&o.call(t,"callee")&&!s.call(t,"callee")};t.exports=c},function(t,e,n){var r=n(234),i=n(62),a=n(82),o=a&&a.isTypedArray,s=o?i(o):r;t.exports=s},function(t,e,n){var r=n(43);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(14);t.exports=function(t,e){var n=t.append("foreignObject").attr("width","100000"),a=n.append("xhtml:div");a.attr("xmlns","http://www.w3.org/1999/xhtml");var o=e.label;switch(r(o)){case"function":a.insert(o);break;case"object":a.insert((function(){return o}));break;default:a.html(o)}i.applyStyle(a,e.labelStyle),a.style("display","inline-block"),a.style("white-space","nowrap");var s=a.node().getBoundingClientRect();return n.attr("width",s.width).attr("height",s.height),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(46),a=n(16),o=n(53);e.default=function(t,e,n,s){if(void 0===n&&(n=0),void 0===s&&(s=1),"number"!=typeof t)return o.default(t,{a:e});var c=i.default.set({r:r.default.channel.clamp.r(t),g:r.default.channel.clamp.g(e),b:r.default.channel.clamp.b(n),a:r.default.channel.clamp.a(s)});return a.default.stringify(c)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(16);e.default=function(t,e){var n=i.default.parse(t);for(var a in e)n[a]=r.default.channel.clamp[a](e[a]);return i.default.stringify(n)}},function(t,e,n){var r=n(55),i=n(206),a=n(207),o=n(208),s=n(209),c=n(210);function u(t){var e=this.__data__=new r(t);this.size=e.size}u.prototype.clear=i,u.prototype.delete=a,u.prototype.get=o,u.prototype.has=s,u.prototype.set=c,t.exports=u},function(t,e,n){var r=n(201),i=n(202),a=n(203),o=n(204),s=n(205);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},function(t,e,n){var r=n(37);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(33)(Object,"create");t.exports=r},function(t,e,n){var r=n(226);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(60),i=n(37),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var o=t[e];a.call(t,e)&&i(o,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(112);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(114)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(89),i=n(255)(r);t.exports=i},function(t,e,n){var r=n(5),i=n(93),a=n(269),o=n(136);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:a(o(t))}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},function(t,e,n){var r=n(35),i=n(144),a=n(145);t.exports=function(t,e){return a(i(t,e,r),t+"")}},function(t,e,n){var r=n(37),i=n(25),a=n(61),o=n(13);t.exports=function(t,e,n){if(!o(n))return!1;var s=typeof e;return!!("number"==s?i(n)&&a(e,n.length):"string"==s&&e in n)&&r(n[e],t)}},function(t,e,n){"use strict";var r=n(4);t.exports={longestPath:function(t){var e={};r.forEach(t.sources(),(function n(i){var a=t.node(i);if(r.has(e,i))return a.rank;e[i]=!0;var o=r.min(r.map(t.outEdges(i),(function(e){return n(e.w)-t.edge(e).minlen})));return o!==Number.POSITIVE_INFINITY&&null!=o||(o=0),a.rank=o}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},function(t,e,n){"use strict";var r=/^(%20|\s)*(javascript|data)/im,i=/[^\x20-\x7E]/gim,a=/^([^:]+):/gm,o=[".","/"];t.exports={sanitizeUrl:function(t){if(!t)return"about:blank";var e,n,s=t.replace(i,"").trim();return function(t){return o.indexOf(t[0])>-1}(s)?s:(n=s.match(a))?(e=n[0],r.test(e)?"about:blank":s):"about:blank"}}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[2,3],n=[1,7],r=[7,12,15,17,19,20,21],i=[7,11,12,15,17,19,20,21],a=[2,20],o=[1,32],s={trace:function(){},yy:{},symbols_:{error:2,start:3,GG:4,":":5,document:6,EOF:7,DIR:8,options:9,body:10,OPT:11,NL:12,line:13,statement:14,COMMIT:15,commit_arg:16,BRANCH:17,ID:18,CHECKOUT:19,MERGE:20,RESET:21,reset_arg:22,STR:23,HEAD:24,reset_parents:25,CARET:26,$accept:0,$end:1},terminals_:{2:"error",4:"GG",5:":",7:"EOF",8:"DIR",11:"OPT",12:"NL",15:"COMMIT",17:"BRANCH",18:"ID",19:"CHECKOUT",20:"MERGE",21:"RESET",23:"STR",24:"HEAD",26:"CARET"},productions_:[0,[3,4],[3,5],[6,0],[6,2],[9,2],[9,1],[10,0],[10,2],[13,2],[13,1],[14,2],[14,2],[14,2],[14,2],[14,2],[16,0],[16,1],[22,2],[22,2],[25,0],[25,2]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:return r.setDirection(a[s-3]),a[s-1];case 4:r.setOptions(a[s-1]),this.$=a[s];break;case 5:a[s-1]+=a[s],this.$=a[s-1];break;case 7:this.$=[];break;case 8:a[s-1].push(a[s]),this.$=a[s-1];break;case 9:this.$=a[s-1];break;case 11:r.commit(a[s]);break;case 12:r.branch(a[s]);break;case 13:r.checkout(a[s]);break;case 14:r.merge(a[s]);break;case 15:r.reset(a[s]);break;case 16:this.$="";break;case 17:this.$=a[s];break;case 18:this.$=a[s-1]+":"+a[s];break;case 19:this.$=a[s-1]+":"+r.count,r.count=0;break;case 20:r.count=0;break;case 21:r.count+=1}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:e,9:6,12:n},{5:[1,8]},{7:[1,9]},t(r,[2,7],{10:10,11:[1,11]}),t(i,[2,6]),{6:12,7:e,9:6,12:n},{1:[2,1]},{7:[2,4],12:[1,15],13:13,14:14,15:[1,16],17:[1,17],19:[1,18],20:[1,19],21:[1,20]},t(i,[2,5]),{7:[1,21]},t(r,[2,8]),{12:[1,22]},t(r,[2,10]),{12:[2,16],16:23,23:[1,24]},{18:[1,25]},{18:[1,26]},{18:[1,27]},{18:[1,30],22:28,24:[1,29]},{1:[2,2]},t(r,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:a,25:31,26:o},{12:a,25:33,26:o},{12:[2,18]},{12:a,25:34,26:o},{12:[2,19]},{12:[2,21]}],defaultActions:{9:[2,1],21:[2,2],23:[2,11],24:[2,17],25:[2,12],26:[2,13],27:[2,14],28:[2,15],31:[2,18],33:[2,19],34:[2,21]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},c={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 12;case 1:case 2:case 3:break;case 4:return 4;case 5:return 15;case 6:return 17;case 7:return 20;case 8:return 21;case 9:return 19;case 10:case 11:return 8;case 12:return 5;case 13:return 26;case 14:this.begin("options");break;case 15:this.popState();break;case 16:return 11;case 17:this.begin("string");break;case 18:this.popState();break;case 19:return 23;case 20:return 18;case 21:return 7}},rules:[/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:branch\b)/i,/^(?:merge\b)/i,/^(?:reset\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:end\r?\n)/i,/^(?:[^\n]+\r?\n)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[a-zA-Z][-_\.a-zA-Z0-9]*[-_a-zA-Z0-9])/i,/^(?:$)/i],conditions:{options:{rules:[15,16],inclusive:!1},string:{rules:[18,19],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,21],inclusive:!0}}};function u(){this.yy={}}return s.lexer=c,u.prototype=s,s.Parser=u,new u}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,9,10],n={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,r,i,a,o){a.length;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function i(){this.yy={}}return n.lexer=r,i.prototype=n,n.Parser=i,new i}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,4],n=[1,5],r=[1,6],i=[1,7],a=[1,9],o=[1,11,13,20,21,22,23],s=[2,5],c=[1,6,11,13,20,21,22,23],u=[20,21,22],l=[2,8],h=[1,18],f=[1,19],d=[1,24],p=[6,20,21,22,23],y={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,openDirective:15,typeDirective:16,closeDirective:17,":":18,argDirective:19,NEWLINE:20,";":21,EOF:22,open_directive:23,type_directive:24,arg_directive:25,close_directive:26,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",18:":",20:"NEWLINE",21:";",22:"EOF",23:"open_directive",24:"type_directive",25:"arg_directive",26:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[15,1],[16,1],[19,1],[17,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.setShowData(!0);break;case 7:this.$=a[s-1];break;case 9:r.addSection(a[s-1],r.cleanupValue(a[s]));break;case 10:this.$=a[s].trim(),r.setTitle(this.$);break;case 17:r.parseDirective("%%{","open_directive");break;case 18:r.parseDirective(a[s],"type_directive");break;case 19:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 20:r.parseDirective("}%%","close_directive","pie")}},table:[{3:1,4:2,5:3,6:e,15:8,20:n,21:r,22:i,23:a},{1:[3]},{3:10,4:2,5:3,6:e,15:8,20:n,21:r,22:i,23:a},{3:11,4:2,5:3,6:e,15:8,20:n,21:r,22:i,23:a},t(o,s,{7:12,8:[1,13]}),t(c,[2,14]),t(c,[2,15]),t(c,[2,16]),{16:14,24:[1,15]},{24:[2,17]},{1:[2,1]},{1:[2,2]},t(u,l,{15:8,9:16,10:17,5:20,1:[2,3],11:h,13:f,23:a}),t(o,s,{7:21}),{17:22,18:[1,23],26:d},t([18,26],[2,18]),t(o,[2,6]),{4:25,20:n,21:r,22:i},{12:[1,26]},{14:[1,27]},t(u,[2,11]),t(u,l,{15:8,9:16,10:17,5:20,1:[2,4],11:h,13:f,23:a}),t(p,[2,12]),{19:28,25:[1,29]},t(p,[2,20]),t(o,[2,7]),t(u,[2,9]),t(u,[2,10]),{17:30,26:d},{26:[2,19]},t(p,[2,13])],defaultActions:{9:[2,17],10:[2,1],11:[2,2],29:[2,19]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},g={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),23;case 1:return this.begin("type_directive"),24;case 2:return this.popState(),this.begin("arg_directive"),18;case 3:return this.popState(),this.popState(),26;case 4:return 25;case 5:case 6:break;case 7:return 20;case 8:case 9:break;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:this.begin("string");break;case 13:this.popState();break;case 14:return"txt";case 15:return 6;case 16:return 8;case 17:return"value";case 18:return 22}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,15,16,17,18],inclusive:!0}}};function v(){this.yy={}}return y.lexer=g,v.prototype=y,y.Parser=v,new v}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,23,37],i=[1,17],a=[1,20],o=[1,25],s=[1,26],c=[1,27],u=[1,28],l=[1,37],h=[23,34,35],f=[4,6,9,11,23,37],d=[30,31,32,33],p=[22,27],y={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,ALPHANUM:23,attribute:24,attributeType:25,attributeName:26,ATTRIBUTE_WORD:27,cardinality:28,relType:29,ZERO_OR_ONE:30,ZERO_OR_MORE:31,ONE_OR_MORE:32,ONLY_ONE:33,NON_IDENTIFYING:34,IDENTIFYING:35,WORD:36,open_directive:37,type_directive:38,arg_directive:39,close_directive:40,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"ALPHANUM",27:"ATTRIBUTE_WORD",30:"ZERO_OR_ONE",31:"ZERO_OR_MORE",32:"ONE_OR_MORE",33:"ONLY_ONE",34:"NON_IDENTIFYING",35:"IDENTIFYING",36:"WORD",37:"open_directive",38:"type_directive",39:"arg_directive",40:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[17,1],[21,1],[21,2],[24,2],[25,1],[26,1],[18,3],[28,1],[28,1],[28,1],[28,1],[29,1],[29,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 12:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 13:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s]);break;case 16:this.$=a[s];break;case 17:this.$=[a[s]];break;case 18:a[s].push(a[s-1]),this.$=a[s];break;case 19:this.$={attributeType:a[s-1],attributeName:a[s]};break;case 20:case 21:this.$=a[s];break;case 22:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 23:this.$=r.Cardinality.ZERO_OR_ONE;break;case 24:this.$=r.Cardinality.ZERO_OR_MORE;break;case 25:this.$=r.Cardinality.ONE_OR_MORE;break;case 26:this.$=r.Cardinality.ONLY_ONE;break;case 27:this.$=r.Identification.NON_IDENTIFYING;break;case 28:this.$=r.Identification.IDENTIFYING;break;case 29:this.$=a[s].replace(/"/g,"");break;case 30:this.$=a[s];break;case 31:r.parseDirective("%%{","open_directive");break;case 32:r.parseDirective(a[s],"type_directive");break;case 33:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 34:r.parseDirective("}%%","close_directive","er")}},table:[{3:1,4:e,7:3,12:4,37:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,37:n},{13:8,38:[1,9]},{38:[2,31]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:i,37:n},{1:[2,2]},{14:18,15:[1,19],40:a},t([15,40],[2,32]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:15,10:21,12:4,17:16,23:i,37:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,15],{18:22,28:24,20:[1,23],30:o,31:s,32:c,33:u}),t([6,9,11,15,20,23,30,31,32,33,37],[2,16]),{11:[1,29]},{16:30,39:[1,31]},{11:[2,34]},t(r,[2,5]),{17:32,23:i},{21:33,22:[1,34],24:35,25:36,27:l},{29:38,34:[1,39],35:[1,40]},t(h,[2,23]),t(h,[2,24]),t(h,[2,25]),t(h,[2,26]),t(f,[2,9]),{14:41,40:a},{40:[2,33]},{15:[1,42]},{22:[1,43]},t(r,[2,14]),{21:44,22:[2,17],24:35,25:36,27:l},{26:45,27:[1,46]},{27:[2,20]},{28:47,30:o,31:s,32:c,33:u},t(d,[2,27]),t(d,[2,28]),{11:[1,48]},{19:49,23:[1,51],36:[1,50]},t(r,[2,13]),{22:[2,18]},t(p,[2,19]),t(p,[2,21]),{23:[2,22]},t(f,[2,10]),t(r,[2,12]),t(r,[2,29]),t(r,[2,30])],defaultActions:{5:[2,31],7:[2,2],20:[2,34],31:[2,33],37:[2,20],44:[2,18],47:[2,22]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),y={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y.yy[g]=this.yy[g]);p.setInput(t,y.yy),y.yy.lexer=p,y.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,S,A,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in A=[],o[k])this.terminals_[T]&&T>h&&A.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:A})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,y.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},g={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),37;case 1:return this.begin("type_directive"),38;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),40;case 4:return 39;case 5:case 6:break;case 7:return 11;case 8:break;case 9:return 9;case 10:return 36;case 11:return 4;case 12:return this.begin("block"),20;case 13:break;case 14:return 27;case 15:break;case 16:return this.popState(),22;case 17:return e.yytext[0];case 18:return 30;case 19:return 31;case 20:return 32;case 21:return 33;case 22:return 30;case 23:return 31;case 24:return 32;case 25:return 34;case 26:return 35;case 27:case 28:return 34;case 29:return 23;case 30:return e.yytext[0];case 31:return 6}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\|o\b)/i,/^(?:\}o\b)/i,/^(?:\}\|)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},block:{rules:[13,14,15,16,17],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,18,19,20,21,22,23,24,25,26,27,28,29,30,31],inclusive:!0}}};function v(){this.yy={}}return y.lexer=g,v.prototype=y,y.Parser=v,new v}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(17).readFileSync(n(18).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(11),n(6)(t))},function(t,e,n){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.ALL=0]="ALL",t[t.RGB=1]="RGB",t[t.HSL=2]="HSL"}(r||(r={})),e.TYPE=r},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var i=n(12);t.exports=a;function a(t){this._isDirected=!i.has(t,"directed")||t.directed,this._isMultigraph=!!i.has(t,"multigraph")&&t.multigraph,this._isCompound=!!i.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=i.constant(void 0),this._defaultEdgeLabelFn=i.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function o(t,e){t[e]?t[e]++:t[e]=1}function s(t,e){--t[e]||delete t[e]}function c(t,e,n,r){var a=""+e,o=""+n;if(!t&&a>o){var s=a;a=o,o=s}return a+""+o+""+(i.isUndefined(r)?"\0":r)}function u(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function l(t,e){return c(t,e.v,e.w,e.name)}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(t){return this._label=t,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(t){return i.isFunction(t)||(t=i.constant(t)),this._defaultNodeLabelFn=t,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return i.keys(this._nodes)},a.prototype.sources=function(){var t=this;return i.filter(this.nodes(),(function(e){return i.isEmpty(t._in[e])}))},a.prototype.sinks=function(){var t=this;return i.filter(this.nodes(),(function(e){return i.isEmpty(t._out[e])}))},a.prototype.setNodes=function(t,e){var n=arguments,r=this;return i.each(t,(function(t){n.length>1?r.setNode(t,e):r.setNode(t)})),this},a.prototype.setNode=function(t,e){return i.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]="\0",this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},a.prototype.node=function(t){return this._nodes[t]},a.prototype.hasNode=function(t){return i.has(this._nodes,t)},a.prototype.removeNode=function(t){var e=this;if(i.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],i.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),i.each(i.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],i.each(i.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},a.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(i.isUndefined(e))e="\0";else{for(var n=e+="";!i.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},a.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},a.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if("\0"!==e)return e}},a.prototype.children=function(t){if(i.isUndefined(t)&&(t="\0"),this._isCompound){var e=this._children[t];if(e)return i.keys(e)}else{if("\0"===t)return this.nodes();if(this.hasNode(t))return[]}},a.prototype.predecessors=function(t){var e=this._preds[t];if(e)return i.keys(e)},a.prototype.successors=function(t){var e=this._sucs[t];if(e)return i.keys(e)},a.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return i.union(e,this.successors(t))},a.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},a.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;i.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),i.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var r={};return this._isCompound&&i.each(e.nodes(),(function(t){e.setParent(t,function t(i){var a=n.parent(i);return void 0===a||e.hasNode(a)?(r[i]=a,a):a in r?r[a]:t(a)}(t))})),e},a.prototype.setDefaultEdgeLabel=function(t){return i.isFunction(t)||(t=i.constant(t)),this._defaultEdgeLabelFn=t,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return i.values(this._edgeObjs)},a.prototype.setPath=function(t,e){var n=this,r=arguments;return i.reduce(t,(function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i})),this},a.prototype.setEdge=function(){var t,e,n,a,s=!1,l=arguments[0];"object"===r(l)&&null!==l&&"v"in l?(t=l.v,e=l.w,n=l.name,2===arguments.length&&(a=arguments[1],s=!0)):(t=l,e=arguments[1],n=arguments[3],arguments.length>2&&(a=arguments[2],s=!0)),t=""+t,e=""+e,i.isUndefined(n)||(n=""+n);var h=c(this._isDirected,t,e,n);if(i.has(this._edgeLabels,h))return s&&(this._edgeLabels[h]=a),this;if(!i.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[h]=s?a:this._defaultEdgeLabelFn(t,e,n);var f=u(this._isDirected,t,e,n);return t=f.v,e=f.w,Object.freeze(f),this._edgeObjs[h]=f,o(this._preds[e],t),o(this._sucs[t],e),this._in[e][h]=f,this._out[t][h]=f,this._edgeCount++,this},a.prototype.edge=function(t,e,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return this._edgeLabels[r]},a.prototype.hasEdge=function(t,e,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return i.has(this._edgeLabels,r)},a.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[e],t),s(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},a.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var r=i.values(n);return e?i.filter(r,(function(t){return t.v===e})):r}},a.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var r=i.values(n);return e?i.filter(r,(function(t){return t.w===e})):r}},a.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},function(t,e,n){var r=n(33)(n(19),"Map");t.exports=r},function(t,e,n){var r=n(218),i=n(225),a=n(227),o=n(228),s=n(229);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){(function(t){var r=n(110),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i&&r.process,s=function(){try{var t=a&&a.require&&a.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=s}).call(this,n(6)(t))},function(t,e,n){var r=n(63),i=n(235),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){var r=n(117),i=n(118),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(t){return null==t?[]:(t=Object(t),r(o(t),(function(e){return a.call(t,e)})))}:i;t.exports=s},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},function(t,e,n){var r=n(123);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e,n){t.exports=n(127)},function(t,e,n){var r=n(90),i=n(30);t.exports=function(t,e){return t&&r(t,e,i)}},function(t,e,n){var r=n(254)();t.exports=r},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},function(t,e,n){var r=n(66),i=n(50);t.exports=function(t,e){for(var n=0,a=(e=r(e,t)).length;null!=t&&n<a;)t=t[i(e[n++])];return n&&n==a?t:void 0}},function(t,e,n){var r=n(5),i=n(43),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||(o.test(t)||!a.test(t)||null!=e&&t in Object(e))}},function(t,e,n){var r=n(276),i=n(138);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e,n){var r=n(85),i=n(288);t.exports=function t(e,n,a,o,s){var c=-1,u=e.length;for(a||(a=i),s||(s=[]);++c<u;){var l=e[c];n>0&&a(l)?n>1?t(l,n-1,a,o,s):r(s,l):o||(s[s.length]=l)}return s}},function(t,e,n){var r=n(43);t.exports=function(t,e,n){for(var i=-1,a=t.length;++i<a;){var o=t[i],s=e(o);if(null!=s&&(void 0===c?s==s&&!r(s):n(s,c)))var c=s,u=o}return u}},function(t,e){t.exports=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),u=Math.abs(e*n*o/c);r.x<i&&(u=-u);var l=Math.abs(e*n*s/c);r.y<a&&(l=-l);return{x:i+u,y:a+l}}},function(t,e,n){var r=n(373),i=n(51),a=n(374);t.exports=function(t,e,n){var o=e.label,s=t.append("g");"svg"===e.labelType?a(s,e):"string"!=typeof o||"html"===e.labelType?i(s,e):r(s,e);var c,u=s.node().getBBox();switch(n){case"top":c=-e.height/2;break;case"bottom":c=e.height/2-u.height;break;default:c=-u.height/2}return s.attr("transform","translate("+-u.width/2+","+c+")"),s}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(46),a=n(178),o={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:function(t){if(35===t.charCodeAt(0)){var e=t.match(o.re);if(e){var n=e[1],r=parseInt(n,16),a=n.length,s=a%4==0,c=a>4,u=c?1:17,l=c?8:4,h=s?0:-1,f=c?255:15;return i.default.set({r:(r>>l*(h+3)&f)*u,g:(r>>l*(h+2)&f)*u,b:(r>>l*(h+1)&f)*u,a:s?(r&f)*u/255:1},t)}}},stringify:function(t){return t.a<1?"#"+a.DEC2HEX[Math.round(t.r)]+a.DEC2HEX[Math.round(t.g)]+a.DEC2HEX[Math.round(t.b)]+r.default.unit.frac2hex(t.a):"#"+a.DEC2HEX[Math.round(t.r)]+a.DEC2HEX[Math.round(t.g)]+a.DEC2HEX[Math.round(t.b)]}};e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(46),a=n(16);e.default=function(t,e,n,o){void 0===o&&(o=1);var s=i.default.set({h:r.default.channel.clamp.h(t),s:r.default.channel.clamp.s(e),l:r.default.channel.clamp.l(n),a:r.default.channel.clamp.a(o)});return a.default.stringify(s)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"a")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(16);e.default=function(t){var e=i.default.parse(t),n=e.r,a=e.g,o=e.b,s=.2126*r.default.channel.toLinear(n)+.7152*r.default.channel.toLinear(a)+.0722*r.default.channel.toLinear(o);return r.default.lang.round(s)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(102);e.default=function(t){return r.default(t)>=.5}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"a",e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"a",-e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(16),i=n(53);e.default=function(t,e){var n=r.default.parse(t),a={};for(var o in e)e[o]&&(a[o]=n[o]+e[o]);return i.default(t,a)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(16),i=n(52);e.default=function(t,e,n){void 0===n&&(n=50);var a=r.default.parse(t),o=a.r,s=a.g,c=a.b,u=a.a,l=r.default.parse(e),h=l.r,f=l.g,d=l.b,p=l.a,y=n/100,g=2*y-1,v=u-p,m=((g*v==-1?g:(g+v)/(1+g*v))+1)/2,b=1-m,x=o*m+h*b,_=s*m+f*b,k=c*m+d*b,w=u*y+p*(1-y);return i.default(x,_,k,w)}},function(t,e){},function(t,e,n){var r=n(54),i=n(80),a=n(59),o=n(230),s=n(236),c=n(115),u=n(116),l=n(239),h=n(240),f=n(120),d=n(241),p=n(42),y=n(245),g=n(246),v=n(125),m=n(5),b=n(40),x=n(250),_=n(13),k=n(252),w=n(30),E={};E["[object Arguments]"]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E["[object Object]"]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E["[object Function]"]=E["[object WeakMap]"]=!1,t.exports=function t(e,n,T,C,S,A){var M,O=1&n,B=2&n,N=4&n;if(T&&(M=S?T(e,C,S,A):T(e)),void 0!==M)return M;if(!_(e))return e;var D=m(e);if(D){if(M=y(e),!O)return u(e,M)}else{var L=p(e),I="[object Function]"==L||"[object GeneratorFunction]"==L;if(b(e))return c(e,O);if("[object Object]"==L||"[object Arguments]"==L||I&&!S){if(M=B||I?{}:v(e),!O)return B?h(e,s(M,e)):l(e,o(M,e))}else{if(!E[L])return S?e:{};M=g(e,L,O)}}A||(A=new r);var R=A.get(e);if(R)return R;A.set(e,M),k(e)?e.forEach((function(r){M.add(t(r,n,T,r,e,A))})):x(e)&&e.forEach((function(r,i){M.set(i,t(r,n,T,i,e,A))}));var F=N?B?d:f:B?keysIn:w,P=D?void 0:F(e);return i(P||e,(function(r,i){P&&(r=e[i=r]),a(M,i,t(r,n,T,i,e,A))})),M}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(212))},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var r=n(33),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,n){var r=n(231),i=n(48),a=n(5),o=n(40),s=n(61),c=n(49),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=a(t),l=!n&&i(t),h=!n&&!l&&o(t),f=!n&&!l&&!h&&c(t),d=n||l||h||f,p=d?r(t.length,String):[],y=p.length;for(var g in t)!e&&!u.call(t,g)||d&&("length"==g||h&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,y))||p.push(g);return p}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){(function(t){var r=n(19),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(6)(t))},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(85),i=n(64),a=n(84),o=n(118),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,a(t)),t=i(t);return e}:o;t.exports=s},function(t,e,n){var r=n(121),i=n(84),a=n(30);t.exports=function(t){return r(t,a,i)}},function(t,e,n){var r=n(85),i=n(5);t.exports=function(t,e,n){var a=e(t);return i(t)?a:r(a,n(t))}},function(t,e,n){var r=n(33)(n(19),"Set");t.exports=r},function(t,e,n){var r=n(19).Uint8Array;t.exports=r},function(t,e,n){var r=n(86);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){var r=n(126),i=n(64),a=n(63);t.exports=function(t){return"function"!=typeof t.constructor||a(t)?{}:r(i(t))}},function(t,e,n){var r=n(13),i=Object.create,a=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=a},function(t,e,n){var r=n(80),i=n(65),a=n(128),o=n(5);t.exports=function(t,e){return(o(t)?r:i)(t,a(e))}},function(t,e,n){var r=n(35);t.exports=function(t){return"function"==typeof t?t:r}},function(t,e,n){var r=n(117),i=n(256),a=n(26),o=n(5);t.exports=function(t,e){return(o(t)?r:i)(t,a(e,3))}},function(t,e,n){var r=n(259),i=n(21);t.exports=function t(e,n,a,o,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,a,o,t,s))}},function(t,e,n){var r=n(132),i=n(262),a=n(133);t.exports=function(t,e,n,o,s,c){var u=1&n,l=t.length,h=e.length;if(l!=h&&!(u&&h>l))return!1;var f=c.get(t);if(f&&c.get(e))return f==e;var d=-1,p=!0,y=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++d<l;){var g=t[d],v=e[d];if(o)var m=u?o(v,g,d,e,t,c):o(g,v,d,t,e,c);if(void 0!==m){if(m)continue;p=!1;break}if(y){if(!i(e,(function(t,e){if(!a(y,e)&&(g===t||s(g,t,n,o,c)))return y.push(e)}))){p=!1;break}}else if(g!==v&&!s(g,v,n,o,c)){p=!1;break}}return c.delete(t),c.delete(e),p}},function(t,e,n){var r=n(79),i=n(260),a=n(261);function o(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}o.prototype.add=o.prototype.push=i,o.prototype.has=a,t.exports=o},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(13);t.exports=function(t){return t==t&&!r(t)}},function(t,e){t.exports=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}},function(t,e,n){var r=n(272);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(273),i=n(138);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e,n){var r=n(66),i=n(48),a=n(5),o=n(61),s=n(81),c=n(50);t.exports=function(t,e,n){for(var u=-1,l=(e=r(e,t)).length,h=!1;++u<l;){var f=c(e[u]);if(!(h=null!=t&&n(t,f)))break;t=t[f]}return h||++u!=l?h:!!(l=null==t?0:t.length)&&s(l)&&o(f,l)&&(a(t)||i(t))}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e){t.exports=function(t){return void 0===t}},function(t,e,n){var r=n(67),i=n(26),a=n(142),o=n(5);t.exports=function(t,e){return(o(t)?r:a)(t,i(e,3))}},function(t,e,n){var r=n(65),i=n(25);t.exports=function(t,e){var n=-1,a=i(t)?Array(t.length):[];return r(t,(function(t,r,i){a[++n]=e(t,r,i)})),a}},function(t,e,n){var r=n(278),i=n(65),a=n(26),o=n(279),s=n(5);t.exports=function(t,e,n){var c=s(t)?r:o,u=arguments.length<3;return c(t,a(e,4),n,u,i)}},function(t,e,n){var r=n(289),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var a=arguments,o=-1,s=i(a.length-e,0),c=Array(s);++o<s;)c[o]=a[e+o];o=-1;for(var u=Array(e+1);++o<e;)u[o]=a[o];return u[e]=n(c),r(t,this,u)}}},function(t,e,n){var r=n(290),i=n(291)(r);t.exports=i},function(t,e){t.exports=function(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}},function(t,e,n){var r=n(25),i=n(21);t.exports=function(t){return i(t)&&r(t)}},function(t,e,n){var r=n(300),i=n(30);t.exports=function(t){return null==t?[]:r(t,i(t))}},function(t,e,n){var r=n(12),i=n(150);t.exports=function(t,e,n,r){return function(t,e,n,r){var a,o,s={},c=new i,u=function(t){var e=t.v!==a?t.v:t.w,r=s[e],i=n(t),u=o.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);u<r.distance&&(r.distance=u,r.predecessor=a,c.decrease(e,u))};t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;s[t]={distance:n},c.add(t,n)}));for(;c.size()>0&&(a=c.removeMin(),(o=s[a]).distance!==Number.POSITIVE_INFINITY);)r(a).forEach(u);return s}(t,String(e),n||a,r||function(e){return t.outEdges(e)})};var a=r.constant(1)},function(t,e,n){var r=n(12);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,a=i.length;return n[t]=a,i.push({key:t,priority:e}),this._decrease(a),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},i.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e},i.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,i=n[t],a=n[e];n[t]=a,n[e]=i,r[a.key]=t,r[i.key]=e}},function(t,e,n){var r=n(12);t.exports=function(t){var e=0,n=[],i={},a=[];return t.nodes().forEach((function(o){r.has(i,o)||function o(s){var c=i[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach((function(t){r.has(i,t)?i[t].onStack&&(c.lowlink=Math.min(c.lowlink,i[t].index)):(o(t),c.lowlink=Math.min(c.lowlink,i[t].lowlink))})),c.lowlink===c.index){var u,l=[];do{u=n.pop(),i[u].onStack=!1,l.push(u)}while(s!==u);a.push(l)}}(o)})),a}},function(t,e,n){var r=n(12);function i(t){var e={},n={},i=[];if(r.each(t.sinks(),(function o(s){if(r.has(n,s))throw new a;r.has(e,s)||(n[s]=!0,e[s]=!0,r.each(t.predecessors(s),o),delete n[s],i.push(s))})),r.size(e)!==t.nodeCount())throw new a;return i}function a(){}t.exports=i,i.CycleException=a,a.prototype=new Error},function(t,e,n){var r=n(12);t.exports=function(t,e,n){r.isArray(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],o={};return r.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);!function t(e,n,i,a,o,s){r.has(a,n)||(a[n]=!0,i||s.push(n),r.each(o(n),(function(n){t(e,n,i,a,o,s)})),i&&s.push(n))}(t,e,"post"===n,o,i,a)})),a}},function(t,e,n){var r;try{r=n(9)}catch(t){}r||(r=window.dagre),t.exports=r},function(t,e,n){var r=n(68),i=n(37),a=n(69),o=n(41),s=Object.prototype,c=s.hasOwnProperty,u=r((function(t,e){t=Object(t);var n=-1,r=e.length,u=r>2?e[2]:void 0;for(u&&a(e[0],e[1],u)&&(r=1);++n<r;)for(var l=e[n],h=o(l),f=-1,d=h.length;++f<d;){var p=h[f],y=t[p];(void 0===y||i(y,s[p])&&!c.call(t,p))&&(t[p]=l[p])}return t}));t.exports=u},function(t,e,n){var r=n(319);t.exports=function(t){return t?(t=r(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},function(t,e,n){var r=n(95);t.exports=function(t){return(null==t?0:t.length)?r(t,1):[]}},function(t,e,n){var r=n(60),i=n(37);t.exports=function(t,e,n){(void 0===n||i(t[e],n))&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(34),i=n(64),a=n(21),o=Function.prototype,s=Object.prototype,c=o.toString,u=s.hasOwnProperty,l=c.call(Object);t.exports=function(t){if(!a(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=u.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},function(t,e){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},function(t,e){t.exports=function(t,e){return t<e}},function(t,e,n){var r=n(333),i=n(336)((function(t,e){return null==t?{}:r(t,e)}));t.exports=i},function(t,e,n){var r=n(337)();t.exports=r},function(t,e,n){var r=n(136),i=0;t.exports=function(t){var e=++i;return r(t)+e}},function(t,e,n){"use strict";var r=n(4),i=n(20).Graph,a=n(70).slack;function o(t,e){return r.forEach(t.nodes(),(function n(i){r.forEach(e.nodeEdges(i),(function(r){var o=r.v,s=i===o?r.w:o;t.hasNode(s)||a(e,r)||(t.setNode(s,{}),t.setEdge(i,s,{}),n(s))}))})),t.nodeCount()}function s(t,e){return r.minBy(e.edges(),(function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return a(e,n)}))}function c(t,e,n){r.forEach(t.nodes(),(function(t){e.node(t).rank+=n}))}t.exports=function(t){var e,n,r=new i({directed:!1}),u=t.nodes()[0],l=t.nodeCount();r.setNode(u,{});for(;o(r,t)<l;)e=s(r,t),n=r.hasNode(e.v)?a(t,e):-a(t,e),c(r,t,n);return r}},function(t,e){t.exports=function(t,e){return t.intersect(e)}},function(t,e,n){var r=n(97);t.exports=function(t,e,n){return r(t,e,e,n)}},function(t,e,n){var r=n(370);t.exports=function(t,e,n){var i=t.x,a=t.y,o=[],s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;e.forEach((function(t){s=Math.min(s,t.x),c=Math.min(c,t.y)}));for(var u=i-t.width/2-s,l=a-t.height/2-c,h=0;h<e.length;h++){var f=e[h],d=e[h<e.length-1?h+1:0],p=r(t,n,{x:u+f.x,y:l+f.y},{x:u+d.x,y:l+d.y});p&&o.push(p)}if(!o.length)return console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t;o.length>1&&o.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}));return o[0]}},function(t,e){t.exports=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=0===s?0:u*o/s,r=u):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o);return{x:i+n,y:a+r}}},function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(n){"object"===r(e)&&void 0!==t?t.exports=n(null):"function"==typeof define&&define.amd?define(n(null)):window.stylis=n(null)}((function t(e){"use strict";var n=/^\0+/g,i=/[\0\r\f]/g,a=/: */g,o=/zoo|gra/,s=/([,: ])(transform)/g,c=/,+\s*(?![^(]*[)])/g,u=/ +\s*(?![^(]*[)])/g,l=/ *[\0] */g,h=/,\r+?/g,f=/([\t\r\n ])*\f?&/g,d=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,p=/\W+/g,y=/@(k\w+)\s*(\S*)\s*/,g=/::(place)/g,v=/:(read-only)/g,m=/\s+(?=[{\];=:>])/g,b=/([[}=:>])\s+/g,x=/(\{[^{]+?);(?=\})/g,_=/\s{2,}/g,k=/([^\(])(:+) */g,w=/[svh]\w+-[tblr]{2}/,E=/\(\s*(.*)\s*\)/g,T=/([\s\S]*?);/g,C=/-self|flex-/g,S=/[^]*?(:[rp][el]a[\w-]+)[^]*/,A=/stretch|:\s*\w+\-(?:conte|avail)/,M=/([^-])(image-set\()/,O="-webkit-",B="-moz-",N="-ms-",D=1,L=1,I=0,R=1,F=1,P=1,j=0,Y=0,z=0,U=[],$=[],q=0,W=null,V=0,H=1,G="",X="",Z="";function Q(t,e,r,a,o){for(var s,c,u=0,h=0,f=0,d=0,p=0,m=0,b=0,x=0,_=0,w=0,T=0,C=0,S=0,A=0,M=0,B=0,N=0,j=0,$=0,W=r.length,J=W-1,at="",ot="",st="",ct="",ut="",lt="";M<W;){if(b=r.charCodeAt(M),M===J&&h+d+f+u!==0&&(0!==h&&(b=47===h?10:47),d=f=u=0,W++,J++),h+d+f+u===0){if(M===J&&(B>0&&(ot=ot.replace(i,"")),ot.trim().length>0)){switch(b){case 32:case 9:case 59:case 13:case 10:break;default:ot+=r.charAt(M)}b=59}if(1===N)switch(b){case 123:case 125:case 59:case 34:case 39:case 40:case 41:case 44:N=0;case 9:case 13:case 10:case 32:break;default:for(N=0,$=M,p=b,M--,b=59;$<W;)switch(r.charCodeAt($++)){case 10:case 13:case 59:++M,b=p,$=W;break;case 58:B>0&&(++M,b=p);case 123:$=W}}switch(b){case 123:for(p=(ot=ot.trim()).charCodeAt(0),T=1,$=++M;M<W;){switch(b=r.charCodeAt(M)){case 123:T++;break;case 125:T--;break;case 47:switch(m=r.charCodeAt(M+1)){case 42:case 47:M=it(m,M,J,r)}break;case 91:b++;case 40:b++;case 34:case 39:for(;M++<J&&r.charCodeAt(M)!==b;);}if(0===T)break;M++}switch(st=r.substring($,M),0===p&&(p=(ot=ot.replace(n,"").trim()).charCodeAt(0)),p){case 64:switch(B>0&&(ot=ot.replace(i,"")),m=ot.charCodeAt(1)){case 100:case 109:case 115:case 45:s=e;break;default:s=U}if($=(st=Q(e,s,st,m,o+1)).length,z>0&&0===$&&($=ot.length),q>0&&(c=rt(3,st,s=K(U,ot,j),e,L,D,$,m,o,a),ot=s.join(""),void 0!==c&&0===($=(st=c.trim()).length)&&(m=0,st="")),$>0)switch(m){case 115:ot=ot.replace(E,nt);case 100:case 109:case 45:st=ot+"{"+st+"}";break;case 107:st=(ot=ot.replace(y,"$1 $2"+(H>0?G:"")))+"{"+st+"}",st=1===F||2===F&&et("@"+st,3)?"@"+O+st+"@"+st:"@"+st;break;default:st=ot+st,112===a&&(ct+=st,st="")}else st="";break;default:st=Q(e,K(e,ot,j),st,a,o+1)}ut+=st,C=0,N=0,A=0,B=0,j=0,S=0,ot="",st="",b=r.charCodeAt(++M);break;case 125:case 59:if(($=(ot=(B>0?ot.replace(i,""):ot).trim()).length)>1)switch(0===A&&(45===(p=ot.charCodeAt(0))||p>96&&p<123)&&($=(ot=ot.replace(" ",":")).length),q>0&&void 0!==(c=rt(1,ot,e,t,L,D,ct.length,a,o,a))&&0===($=(ot=c.trim()).length)&&(ot="\0\0"),p=ot.charCodeAt(0),m=ot.charCodeAt(1),p){case 0:break;case 64:if(105===m||99===m){lt+=ot+r.charAt(M);break}default:if(58===ot.charCodeAt($-1))break;ct+=tt(ot,p,m,ot.charCodeAt(2))}C=0,N=0,A=0,B=0,j=0,ot="",b=r.charCodeAt(++M)}}switch(b){case 13:case 10:if(h+d+f+u+Y===0)switch(w){case 41:case 39:case 34:case 64:case 126:case 62:case 42:case 43:case 47:case 45:case 58:case 44:case 59:case 123:case 125:break;default:A>0&&(N=1)}47===h?h=0:R+C===0&&107!==a&&ot.length>0&&(B=1,ot+="\0"),q*V>0&&rt(0,ot,e,t,L,D,ct.length,a,o,a),D=1,L++;break;case 59:case 125:if(h+d+f+u===0){D++;break}default:switch(D++,at=r.charAt(M),b){case 9:case 32:if(d+u+h===0)switch(x){case 44:case 58:case 9:case 32:at="";break;default:32!==b&&(at=" ")}break;case 0:at="\\0";break;case 12:at="\\f";break;case 11:at="\\v";break;case 38:d+h+u===0&&R>0&&(j=1,B=1,at="\f"+at);break;case 108:if(d+h+u+I===0&&A>0)switch(M-A){case 2:112===x&&58===r.charCodeAt(M-3)&&(I=x);case 8:111===_&&(I=_)}break;case 58:d+h+u===0&&(A=M);break;case 44:h+f+d+u===0&&(B=1,at+="\r");break;case 34:case 39:0===h&&(d=d===b?0:0===d?b:d);break;case 91:d+h+f===0&&u++;break;case 93:d+h+f===0&&u--;break;case 41:d+h+u===0&&f--;break;case 40:if(d+h+u===0){if(0===C)switch(2*x+3*_){case 533:break;default:T=0,C=1}f++}break;case 64:h+f+d+u+A+S===0&&(S=1);break;case 42:case 47:if(d+u+f>0)break;switch(h){case 0:switch(2*b+3*r.charCodeAt(M+1)){case 235:h=47;break;case 220:$=M,h=42}break;case 42:47===b&&42===x&&$+2!==M&&(33===r.charCodeAt($+2)&&(ct+=r.substring($,M+1)),at="",h=0)}}if(0===h){if(R+d+u+S===0&&107!==a&&59!==b)switch(b){case 44:case 126:case 62:case 43:case 41:case 40:if(0===C){switch(x){case 9:case 32:case 10:case 13:at+="\0";break;default:at="\0"+at+(44===b?"":"\0")}B=1}else switch(b){case 40:A+7===M&&108===x&&(A=0),C=++T;break;case 41:0==(C=--T)&&(B=1,at+="\0")}break;case 9:case 32:switch(x){case 0:case 123:case 125:case 59:case 44:case 12:case 9:case 32:case 10:case 13:break;default:0===C&&(B=1,at+="\0")}}ot+=at,32!==b&&9!==b&&(w=b)}}_=x,x=b,M++}if($=ct.length,z>0&&0===$&&0===ut.length&&0===e[0].length==!1&&(109!==a||1===e.length&&(R>0?X:Z)===e[0])&&($=e.join(",").length+2),$>0){if(s=0===R&&107!==a?function(t){for(var e,n,r=0,a=t.length,o=Array(a);r<a;++r){for(var s=t[r].split(l),c="",u=0,h=0,f=0,d=0,p=s.length;u<p;++u)if(!(0===(h=(n=s[u]).length)&&p>1)){if(f=c.charCodeAt(c.length-1),d=n.charCodeAt(0),e="",0!==u)switch(f){case 42:case 126:case 62:case 43:case 32:case 40:break;default:e=" "}switch(d){case 38:n=e+X;case 126:case 62:case 43:case 32:case 41:case 40:break;case 91:n=e+n+X;break;case 58:switch(2*n.charCodeAt(1)+3*n.charCodeAt(2)){case 530:if(P>0){n=e+n.substring(8,h-1);break}default:(u<1||s[u-1].length<1)&&(n=e+X+n)}break;case 44:e="";default:n=h>1&&n.indexOf(":")>0?e+n.replace(k,"$1"+X+"$2"):e+n+X}c+=n}o[r]=c.replace(i,"").trim()}return o}(e):e,q>0&&void 0!==(c=rt(2,ct,s,t,L,D,$,a,o,a))&&0===(ct=c).length)return lt+ct+ut;if(ct=s.join(",")+"{"+ct+"}",F*I!=0){switch(2!==F||et(ct,2)||(I=0),I){case 111:ct=ct.replace(v,":-moz-$1")+ct;break;case 112:ct=ct.replace(g,"::-webkit-input-$1")+ct.replace(g,"::-moz-$1")+ct.replace(g,":-ms-input-$1")+ct}I=0}}return lt+ct+ut}function K(t,e,n){var r=e.trim().split(h),i=r,a=r.length,o=t.length;switch(o){case 0:case 1:for(var s=0,c=0===o?"":t[0]+" ";s<a;++s)i[s]=J(c,i[s],n,o).trim();break;default:s=0;var u=0;for(i=[];s<a;++s)for(var l=0;l<o;++l)i[u++]=J(t[l]+" ",r[s],n,o).trim()}return i}function J(t,e,n,r){var i=e,a=i.charCodeAt(0);switch(a<33&&(a=(i=i.trim()).charCodeAt(0)),a){case 38:switch(R+r){case 0:case 1:if(0===t.trim().length)break;default:return i.replace(f,"$1"+t.trim())}break;case 58:switch(i.charCodeAt(1)){case 103:if(P>0&&R>0)return i.replace(d,"$1").replace(f,"$1"+Z);break;default:return t.trim()+i.replace(f,"$1"+t.trim())}default:if(n*R>0&&i.indexOf("\f")>0)return i.replace(f,(58===t.charCodeAt(0)?"":"$1")+t.trim())}return t+i}function tt(t,e,n,r){var i,l=0,h=t+";",f=2*e+3*n+4*r;if(944===f)return function(t){var e=t.length,n=t.indexOf(":",9)+1,r=t.substring(0,n).trim(),i=t.substring(n,e-1).trim();switch(t.charCodeAt(9)*H){case 0:break;case 45:if(110!==t.charCodeAt(10))break;default:var a=i.split((i="",c)),o=0;for(n=0,e=a.length;o<e;n=0,++o){for(var s=a[o],l=s.split(u);s=l[n];){var h=s.charCodeAt(0);if(1===H&&(h>64&&h<90||h>96&&h<123||95===h||45===h&&45!==s.charCodeAt(1)))switch(isNaN(parseFloat(s))+(-1!==s.indexOf("("))){case 1:switch(s){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:s+=G}}l[n++]=s}i+=(0===o?"":",")+l.join(" ")}}return i=r+i+";",1===F||2===F&&et(i,1)?O+i+i:i}(h);if(0===F||2===F&&!et(h,1))return h;switch(f){case 1015:return 97===h.charCodeAt(10)?O+h+h:h;case 951:return 116===h.charCodeAt(3)?O+h+h:h;case 963:return 110===h.charCodeAt(5)?O+h+h:h;case 1009:if(100!==h.charCodeAt(4))break;case 969:case 942:return O+h+h;case 978:return O+h+B+h+h;case 1019:case 983:return O+h+B+h+N+h+h;case 883:return 45===h.charCodeAt(8)?O+h+h:h.indexOf("image-set(",11)>0?h.replace(M,"$1-webkit-$2")+h:h;case 932:if(45===h.charCodeAt(4))switch(h.charCodeAt(5)){case 103:return O+"box-"+h.replace("-grow","")+O+h+N+h.replace("grow","positive")+h;case 115:return O+h+N+h.replace("shrink","negative")+h;case 98:return O+h+N+h.replace("basis","preferred-size")+h}return O+h+N+h+h;case 964:return O+h+N+"flex-"+h+h;case 1023:if(99!==h.charCodeAt(8))break;return i=h.substring(h.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),O+"box-pack"+i+O+h+N+"flex-pack"+i+h;case 1005:return o.test(h)?h.replace(a,":"+O)+h.replace(a,":"+B)+h:h;case 1e3:switch(l=(i=h.substring(13).trim()).indexOf("-")+1,i.charCodeAt(0)+i.charCodeAt(l)){case 226:i=h.replace(w,"tb");break;case 232:i=h.replace(w,"tb-rl");break;case 220:i=h.replace(w,"lr");break;default:return h}return O+h+N+i+h;case 1017:if(-1===h.indexOf("sticky",9))return h;case 975:switch(l=(h=t).length-10,f=(i=(33===h.charCodeAt(l)?h.substring(0,l):h).substring(t.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|i.charCodeAt(7))){case 203:if(i.charCodeAt(8)<111)break;case 115:h=h.replace(i,O+i)+";"+h;break;case 207:case 102:h=h.replace(i,O+(f>102?"inline-":"")+"box")+";"+h.replace(i,O+i)+";"+h.replace(i,N+i+"box")+";"+h}return h+";";case 938:if(45===h.charCodeAt(5))switch(h.charCodeAt(6)){case 105:return i=h.replace("-items",""),O+h+O+"box-"+i+N+"flex-"+i+h;case 115:return O+h+N+"flex-item-"+h.replace(C,"")+h;default:return O+h+N+"flex-line-pack"+h.replace("align-content","").replace(C,"")+h}break;case 973:case 989:if(45!==h.charCodeAt(3)||122===h.charCodeAt(4))break;case 931:case 953:if(!0===A.test(t))return 115===(i=t.substring(t.indexOf(":")+1)).charCodeAt(0)?tt(t.replace("stretch","fill-available"),e,n,r).replace(":fill-available",":stretch"):h.replace(i,O+i)+h.replace(i,B+i.replace("fill-",""))+h;break;case 962:if(h=O+h+(102===h.charCodeAt(5)?N+h:"")+h,n+r===211&&105===h.charCodeAt(13)&&h.indexOf("transform",10)>0)return h.substring(0,h.indexOf(";",27)+1).replace(s,"$1-webkit-$2")+h}return h}function et(t,e){var n=t.indexOf(1===e?":":"{"),r=t.substring(0,3!==e?n:10),i=t.substring(n+1,t.length-1);return W(2!==e?r:r.replace(S,"$1"),i,e)}function nt(t,e){var n=tt(e,e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2));return n!==e+";"?n.replace(T," or ($1)").substring(4):"("+e+")"}function rt(t,e,n,r,i,a,o,s,c,u){for(var l,h=0,f=e;h<q;++h)switch(l=$[h].call(ot,t,f,n,r,i,a,o,s,c,u)){case void 0:case!1:case!0:case null:break;default:f=l}if(f!==e)return f}function it(t,e,n,r){for(var i=e+1;i<n;++i)switch(r.charCodeAt(i)){case 47:if(42===t&&42===r.charCodeAt(i-1)&&e+2!==i)return i+1;break;case 10:if(47===t)return i+1}return i}function at(t){for(var e in t){var n=t[e];switch(e){case"keyframe":H=0|n;break;case"global":P=0|n;break;case"cascade":R=0|n;break;case"compress":j=0|n;break;case"semicolon":Y=0|n;break;case"preserve":z=0|n;break;case"prefix":W=null,n?"function"!=typeof n?F=1:(F=2,W=n):F=0}}return at}function ot(e,n){if(void 0!==this&&this.constructor===ot)return t(e);var r=e,a=r.charCodeAt(0);a<33&&(a=(r=r.trim()).charCodeAt(0)),H>0&&(G=r.replace(p,91===a?"":"-")),a=1,1===R?Z=r:X=r;var o,s=[Z];q>0&&void 0!==(o=rt(-1,n,s,s,L,D,0,0,0,0))&&"string"==typeof o&&(n=o);var c=Q(U,s,n,0,0);return q>0&&void 0!==(o=rt(-2,c,s,s,L,D,c.length,0,0,0))&&"string"!=typeof(c=o)&&(a=0),G="",Z="",X="",I=0,L=1,D=1,j*a==0?c:function(t){return t.replace(i,"").replace(m,"").replace(b,"$1").replace(x,"$1").replace(_," ")}(c)}return ot.use=function t(e){switch(e){case void 0:case null:q=$.length=0;break;default:if("function"==typeof e)$[q++]=e;else if("object"===r(e))for(var n=0,i=e.length;n<i;++n)t(e[n]);else V=0|!!e}return t},ot.set=at,void 0!==e&&at(e),ot}))},function(t,e){t.exports=function(t,e){return t.intersect(e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(52);e.hex=r.default;var i=n(52);e.rgb=i.default;var a=n(52);e.rgba=a.default;var o=n(100);e.hsl=o.default;var s=n(100);e.hsla=s.default;var c=n(29);e.channel=c.default;var u=n(182);e.red=u.default;var l=n(183);e.green=l.default;var h=n(184);e.blue=h.default;var f=n(185);e.hue=f.default;var d=n(186);e.saturation=d.default;var p=n(187);e.lightness=p.default;var y=n(101);e.alpha=y.default;var g=n(101);e.opacity=g.default;var v=n(102);e.luminance=v.default;var m=n(188);e.isDark=m.default;var b=n(103);e.isLight=b.default;var x=n(189);e.isValid=x.default;var _=n(190);e.saturate=_.default;var k=n(191);e.desaturate=k.default;var w=n(192);e.lighten=w.default;var E=n(193);e.darken=E.default;var T=n(104);e.opacify=T.default;var C=n(104);e.fadeIn=C.default;var S=n(105);e.transparentize=S.default;var A=n(105);e.fadeOut=A.default;var M=n(194);e.complement=M.default;var O=n(195);e.grayscale=O.default;var B=n(106);e.adjust=B.default;var N=n(53);e.change=N.default;var D=n(196);e.invert=D.default;var L=n(107);e.mix=L.default;var I=n(197);e.scale=I.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:function(t){return t>=255?255:t<0?0:t},g:function(t){return t>=255?255:t<0?0:t},b:function(t){return t>=255?255:t<0?0:t},h:function(t){return t%360},s:function(t){return t>=100?100:t<0?0:t},l:function(t){return t>=100?100:t<0?0:t},a:function(t){return t>=1?1:t<0?0:t}},toLinear:function(t){var e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:function(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t},hsl2rgb:function(t,e){var n=t.h,i=t.s,a=t.l;if(100===i)return 2.55*a;n/=360,i/=100;var o=(a/=100)<.5?a*(1+i):a+i-a*i,s=2*a-o;switch(e){case"r":return 255*r.hue2rgb(s,o,n+1/3);case"g":return 255*r.hue2rgb(s,o,n);case"b":return 255*r.hue2rgb(s,o,n-1/3)}},rgb2hsl:function(t,e){var n=t.r,r=t.g,i=t.b;n/=255,r/=255,i/=255;var a=Math.max(n,r,i),o=Math.min(n,r,i),s=(a+o)/2;if("l"===e)return 100*s;if(a===o)return 0;var c=a-o;if("s"===e)return 100*(s>.5?c/(2-a-o):c/(a+o));switch(a){case n:return 60*((r-i)/c+(r<i?6:0));case r:return 60*((i-n)/c+2);case i:return 60*((n-r)/c+4);default:return-1}}};e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={round:function(t){return Math.round(1e10*t)/1e10}};e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={frac2hex:function(t){var e=Math.round(255*t).toString(16);return e.length>1?e:"0"+e},dec2hex:function(t){var e=Math.round(t).toString(16);return e.length>1?e:"0"+e}};e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(76),a=n(177),o=function(){function t(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a.default}return t.prototype.set=function(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=i.TYPE.ALL,this},t.prototype._ensureHSL=function(){void 0===this.data.h&&(this.data.h=r.default.channel.rgb2hsl(this.data,"h")),void 0===this.data.s&&(this.data.s=r.default.channel.rgb2hsl(this.data,"s")),void 0===this.data.l&&(this.data.l=r.default.channel.rgb2hsl(this.data,"l"))},t.prototype._ensureRGB=function(){void 0===this.data.r&&(this.data.r=r.default.channel.hsl2rgb(this.data,"r")),void 0===this.data.g&&(this.data.g=r.default.channel.hsl2rgb(this.data,"g")),void 0===this.data.b&&(this.data.b=r.default.channel.hsl2rgb(this.data,"b"))},Object.defineProperty(t.prototype,"r",{get:function(){return this.type.is(i.TYPE.HSL)||void 0===this.data.r?(this._ensureHSL(),r.default.channel.hsl2rgb(this.data,"r")):this.data.r},set:function(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.r=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"g",{get:function(){return this.type.is(i.TYPE.HSL)||void 0===this.data.g?(this._ensureHSL(),r.default.channel.hsl2rgb(this.data,"g")):this.data.g},set:function(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.g=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){return this.type.is(i.TYPE.HSL)||void 0===this.data.b?(this._ensureHSL(),r.default.channel.hsl2rgb(this.data,"b")):this.data.b},set:function(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.b=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"h",{get:function(){return this.type.is(i.TYPE.RGB)||void 0===this.data.h?(this._ensureRGB(),r.default.channel.rgb2hsl(this.data,"h")):this.data.h},set:function(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.h=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"s",{get:function(){return this.type.is(i.TYPE.RGB)||void 0===this.data.s?(this._ensureRGB(),r.default.channel.rgb2hsl(this.data,"s")):this.data.s},set:function(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.s=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"l",{get:function(){return this.type.is(i.TYPE.RGB)||void 0===this.data.l?(this._ensureRGB(),r.default.channel.rgb2hsl(this.data,"l")):this.data.l},set:function(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.l=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"a",{get:function(){return this.data.a},set:function(t){this.changed=!0,this.data.a=t},enumerable:!0,configurable:!0}),t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(76),i=function(){function t(){this.type=r.TYPE.ALL}return t.prototype.get=function(){return this.type},t.prototype.set=function(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t},t.prototype.reset=function(){this.type=r.TYPE.ALL},t.prototype.is=function(t){return this.type===t},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i={};e.DEC2HEX=i;for(var a=0;a<=255;a++)i[a]=r.default.unit.dec2hex(a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(99),i={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:function(t){t=t.toLowerCase();var e=i.colors[t];if(e)return r.default.parse(e)},stringify:function(t){var e=r.default.stringify(t);for(var n in i.colors)if(i.colors[n]===e)return n}};e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(46),a={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:function(t){var e=t.charCodeAt(0);if(114===e||82===e){var n=t.match(a.re);if(n){var o=n[1],s=n[2],c=n[3],u=n[4],l=n[5],h=n[6],f=n[7],d=n[8];return i.default.set({r:r.default.channel.clamp.r(s?2.55*parseFloat(o):parseFloat(o)),g:r.default.channel.clamp.g(u?2.55*parseFloat(c):parseFloat(c)),b:r.default.channel.clamp.b(h?2.55*parseFloat(l):parseFloat(l)),a:f?r.default.channel.clamp.a(d?parseFloat(f)/100:parseFloat(f)):1},t)}}},stringify:function(t){return t.a<1?"rgba("+r.default.lang.round(t.r)+", "+r.default.lang.round(t.g)+", "+r.default.lang.round(t.b)+", "+r.default.lang.round(t.a)+")":"rgb("+r.default.lang.round(t.r)+", "+r.default.lang.round(t.g)+", "+r.default.lang.round(t.b)+")"}};e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(46),a={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:function(t){var e=t.match(a.hueRe);if(e){var n=e[1];switch(e[2]){case"grad":return r.default.channel.clamp.h(.9*parseFloat(n));case"rad":return r.default.channel.clamp.h(180*parseFloat(n)/Math.PI);case"turn":return r.default.channel.clamp.h(360*parseFloat(n))}}return r.default.channel.clamp.h(parseFloat(t))},parse:function(t){var e=t.charCodeAt(0);if(104===e||72===e){var n=t.match(a.re);if(n){var o=n[1],s=n[2],c=n[3],u=n[4],l=n[5];return i.default.set({h:a._hue2deg(o),s:r.default.channel.clamp.s(parseFloat(s)),l:r.default.channel.clamp.l(parseFloat(c)),a:u?r.default.channel.clamp.a(l?parseFloat(u)/100:parseFloat(u)):1},t)}}},stringify:function(t){return t.a<1?"hsla("+r.default.lang.round(t.h)+", "+r.default.lang.round(t.s)+"%, "+r.default.lang.round(t.l)+"%, "+t.a+")":"hsl("+r.default.lang.round(t.h)+", "+r.default.lang.round(t.s)+"%, "+r.default.lang.round(t.l)+"%)"}};e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"r")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"g")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"b")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"h")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"s")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"l")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(103);e.default=function(t){return!r.default(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(16);e.default=function(t){try{return r.default.parse(t),!0}catch(t){return!1}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"s",e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"s",-e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"l",e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"l",-e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t){return r.default(t,"h",180)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(53);e.default=function(t){return r.default(t,{s:0})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(16),i=n(107);e.default=function(t,e){void 0===e&&(e=100);var n=r.default.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,i.default(n,t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(10),i=n(16),a=n(106);e.default=function(t,e){var n,o,s,c=i.default.parse(t),u={};for(var l in e)u[l]=(n=c[l],o=e[l],s=r.default.channel.max[l],o>0?(s-n)*o/100:n*o/100);return a.default(t,u)}},function(t,e,n){var r={"./locale":108,"./locale.js":108};function i(t){var e=a(t);return n(e)}function a(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=a,t.exports=i,i.id=198},function(t,e,n){t.exports={Graph:n(77),version:n(301)}},function(t,e,n){var r=n(109);t.exports=function(t){return r(t,4)}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(56),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():i.call(e,n,1),--this.size,!0)}},function(t,e,n){var r=n(56);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(56);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(56);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(55);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(55),i=n(78),a=n(79);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new a(o)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(38),i=n(215),a=n(13),o=n(111),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,h=u.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||i(t))&&(r(t)?f:s).test(o(t))}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(39),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=a.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=o.call(t);return r&&(e?t[s]=n:delete t[s]),i}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r,i=n(216),a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!a&&a in t}},function(t,e,n){var r=n(19)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(219),i=n(55),a=n(78);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},function(t,e,n){var r=n(220),i=n(221),a=n(222),o=n(223),s=n(224);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},function(t,e,n){var r=n(57);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(57),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(57),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},function(t,e,n){var r=n(57);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,n){var r=n(58);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(58);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(58);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(58);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},function(t,e,n){var r=n(47),i=n(30);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(34),i=n(21);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(34),i=n(81),a=n(21),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,t.exports=function(t){return a(t)&&i(t.length)&&!!o[r(t)]}},function(t,e,n){var r=n(114)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(47),i=n(41);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e,n){var r=n(13),i=n(63),a=n(238),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return a(t);var e=i(t),n=[];for(var s in t)("constructor"!=s||!e&&o.call(t,s))&&n.push(s);return n}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){var r=n(47),i=n(84);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(47),i=n(119);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(121),i=n(119),a=n(41);t.exports=function(t){return r(t,a,i)}},function(t,e,n){var r=n(33)(n(19),"DataView");t.exports=r},function(t,e,n){var r=n(33)(n(19),"Promise");t.exports=r},function(t,e,n){var r=n(33)(n(19),"WeakMap");t.exports=r},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&n.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},function(t,e,n){var r=n(86),i=n(247),a=n(248),o=n(249),s=n(124);t.exports=function(t,e,n){var c=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return i(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(t,n);case"[object Map]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return a(t);case"[object Set]":return new c;case"[object Symbol]":return o(t)}}},function(t,e,n){var r=n(86);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},function(t,e){var n=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,n){var r=n(39),i=r?r.prototype:void 0,a=i?i.valueOf:void 0;t.exports=function(t){return a?Object(a.call(t)):{}}},function(t,e,n){var r=n(251),i=n(62),a=n(82),o=a&&a.isMap,s=o?i(o):r;t.exports=s},function(t,e,n){var r=n(42),i=n(21);t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},function(t,e,n){var r=n(253),i=n(62),a=n(82),o=a&&a.isSet,s=o?i(o):r;t.exports=s},function(t,e,n){var r=n(42),i=n(21);t.exports=function(t){return i(t)&&"[object Set]"==r(t)}},function(t,e){t.exports=function(t){return function(e,n,r){for(var i=-1,a=Object(e),o=r(e),s=o.length;s--;){var c=o[t?s:++i];if(!1===n(a[c],c,a))break}return e}}},function(t,e,n){var r=n(25);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var a=n.length,o=e?a:-1,s=Object(n);(e?o--:++o<a)&&!1!==i(s[o],o,s););return n}}},function(t,e,n){var r=n(65);t.exports=function(t,e){var n=[];return r(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}},function(t,e,n){var r=n(258),i=n(266),a=n(135);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?a(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(54),i=n(130);t.exports=function(t,e,n,a){var o=n.length,s=o,c=!a;if(null==t)return!s;for(t=Object(t);o--;){var u=n[o];if(c&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<s;){var l=(u=n[o])[0],h=t[l],f=u[1];if(c&&u[2]){if(void 0===h&&!(l in t))return!1}else{var d=new r;if(a)var p=a(h,f,l,t,e,d);if(!(void 0===p?i(f,h,3,a,d):p))return!1}}return!0}},function(t,e,n){var r=n(54),i=n(131),a=n(263),o=n(265),s=n(42),c=n(5),u=n(40),l=n(49),h="[object Object]",f=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,d,p,y){var g=c(t),v=c(e),m=g?"[object Array]":s(t),b=v?"[object Array]":s(e),x=(m="[object Arguments]"==m?h:m)==h,_=(b="[object Arguments]"==b?h:b)==h,k=m==b;if(k&&u(t)){if(!u(e))return!1;g=!0,x=!1}if(k&&!x)return y||(y=new r),g||l(t)?i(t,e,n,d,p,y):a(t,e,m,n,d,p,y);if(!(1&n)){var w=x&&f.call(t,"__wrapped__"),E=_&&f.call(e,"__wrapped__");if(w||E){var T=w?t.value():t,C=E?e.value():e;return y||(y=new r),p(T,C,n,d,y)}}return!!k&&(y||(y=new r),o(t,e,n,d,p,y))}},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e,n){var r=n(39),i=n(123),a=n(37),o=n(131),s=n(264),c=n(91),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;t.exports=function(t,e,n,r,u,h,f){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!h(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=s;case"[object Set]":var p=1&r;if(d||(d=c),t.size!=e.size&&!p)return!1;var y=f.get(t);if(y)return y==e;r|=2,f.set(t,e);var g=o(d(t),d(e),r,u,h,f);return f.delete(t),g;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},function(t,e,n){var r=n(120),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,a,o,s){var c=1&n,u=r(t),l=u.length;if(l!=r(e).length&&!c)return!1;for(var h=l;h--;){var f=u[h];if(!(c?f in e:i.call(e,f)))return!1}var d=s.get(t);if(d&&s.get(e))return d==e;var p=!0;s.set(t,e),s.set(e,t);for(var y=c;++h<l;){var g=t[f=u[h]],v=e[f];if(a)var m=c?a(v,g,f,e,t,s):a(g,v,f,t,e,s);if(!(void 0===m?g===v||o(g,v,n,a,s):m)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){var b=t.constructor,x=e.constructor;b!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x)&&(p=!1)}return s.delete(t),s.delete(e),p}},function(t,e,n){var r=n(134),i=n(30);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var a=e[n],o=t[a];e[n]=[a,o,r(o)]}return e}},function(t,e,n){var r=n(130),i=n(268),a=n(137),o=n(93),s=n(134),c=n(135),u=n(50);t.exports=function(t,e){return o(t)&&s(e)?c(u(t),e):function(n){var o=i(n,t);return void 0===o&&o===e?a(n,t):r(e,o,3)}}},function(t,e,n){var r=n(92);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},function(t,e,n){var r=n(270),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(a,"$1"):n||t)})),e}));t.exports=o},function(t,e,n){var r=n(271);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},function(t,e,n){var r=n(79);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},function(t,e,n){var r=n(39),i=n(67),a=n(5),o=n(43),s=r?r.prototype:void 0,c=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(a(e))return i(e,t)+"";if(o(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,n){var r=n(139),i=n(275),a=n(93),o=n(50);t.exports=function(t){return a(t)?r(o(t)):i(t)}},function(t,e,n){var r=n(92);t.exports=function(t){return function(e){return r(e,t)}}},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&n.call(t,e)}},function(t,e,n){var r=n(83),i=n(42),a=n(48),o=n(5),s=n(25),c=n(40),u=n(63),l=n(49),h=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(o(t)||"string"==typeof t||"function"==typeof t.splice||c(t)||l(t)||a(t)))return!t.length;var e=i(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(u(t))return!r(t).length;for(var n in t)if(h.call(t,n))return!1;return!0}},function(t,e){t.exports=function(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}},function(t,e){t.exports=function(t,e,n,r,i){return i(t,(function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)})),n}},function(t,e,n){var r=n(83),i=n(42),a=n(25),o=n(281),s=n(282);t.exports=function(t){if(null==t)return 0;if(a(t))return o(t)?s(t):t.length;var e=i(t);return"[object Map]"==e||"[object Set]"==e?t.size:r(t).length}},function(t,e,n){var r=n(34),i=n(5),a=n(21);t.exports=function(t){return"string"==typeof t||!i(t)&&a(t)&&"[object String]"==r(t)}},function(t,e,n){var r=n(283),i=n(284),a=n(285);t.exports=function(t){return i(t)?a(t):r(t)}},function(t,e,n){var r=n(139)("length");t.exports=r},function(t,e){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return n.test(t)}},function(t,e){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",a="[^\\ud800-\\udfff]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+r+"|"+i+")"+"?",u="[\\ufe0e\\ufe0f]?"+c+("(?:\\u200d(?:"+[a,o,s].join("|")+")[\\ufe0e\\ufe0f]?"+c+")*"),l="(?:"+[a+r+"?",r,o,s,n].join("|")+")",h=RegExp(i+"(?="+i+")|"+l+u,"g");t.exports=function(t){for(var e=h.lastIndex=0;h.test(t);)++e;return e}},function(t,e,n){var r=n(80),i=n(126),a=n(89),o=n(26),s=n(64),c=n(5),u=n(40),l=n(38),h=n(13),f=n(49);t.exports=function(t,e,n){var d=c(t),p=d||u(t)||f(t);if(e=o(e,4),null==n){var y=t&&t.constructor;n=p?d?new y:[]:h(t)&&l(y)?i(s(t)):{}}return(p?r:a)(t,(function(t,r,i){return e(n,t,r,i)})),n}},function(t,e,n){var r=n(95),i=n(68),a=n(292),o=n(147),s=i((function(t){return a(r(t,1,o,!0))}));t.exports=s},function(t,e,n){var r=n(39),i=n(48),a=n(5),o=r?r.isConcatSpreadable:void 0;t.exports=function(t){return a(t)||i(t)||!!(o&&t&&t[o])}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(87),i=n(112),a=n(35),o=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:a;t.exports=o},function(t,e){var n=Date.now;t.exports=function(t){var e=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(132),i=n(293),a=n(297),o=n(133),s=n(298),c=n(91);t.exports=function(t,e,n){var u=-1,l=i,h=t.length,f=!0,d=[],p=d;if(n)f=!1,l=a;else if(h>=200){var y=e?null:s(t);if(y)return c(y);f=!1,l=o,p=new r}else p=e?[]:d;t:for(;++u<h;){var g=t[u],v=e?e(g):g;if(g=n||0!==g?g:0,f&&v==v){for(var m=p.length;m--;)if(p[m]===v)continue t;e&&p.push(v),d.push(g)}else l(p,v,n)||(p!==d&&p.push(v),d.push(g))}return d}},function(t,e,n){var r=n(294);t.exports=function(t,e){return!!(null==t?0:t.length)&&r(t,e,0)>-1}},function(t,e,n){var r=n(146),i=n(295),a=n(296);t.exports=function(t,e,n){return e==e?a(t,e,n):r(t,i,n)}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},function(t,e,n){var r=n(122),i=n(299),a=n(91),o=r&&1/a(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=o},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(67);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},function(t,e){t.exports="2.1.8"},function(t,e,n){var r=n(12),i=n(77);function a(t){return r.map(t.nodes(),(function(e){var n=t.node(e),i=t.parent(e),a={v:e};return r.isUndefined(n)||(a.value=n),r.isUndefined(i)||(a.parent=i),a}))}function o(t){return r.map(t.edges(),(function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:a(t),edges:o(t)};r.isUndefined(t.graph())||(e.value=r.clone(t.graph()));return e},read:function(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),r.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},function(t,e,n){t.exports={components:n(304),dijkstra:n(149),dijkstraAll:n(305),findCycles:n(306),floydWarshall:n(307),isAcyclic:n(308),postorder:n(309),preorder:n(310),prim:n(311),tarjan:n(151),topsort:n(152)}},function(t,e,n){var r=n(12);t.exports=function(t){var e,n={},i=[];function a(i){r.has(n,i)||(n[i]=!0,e.push(i),r.each(t.successors(i),a),r.each(t.predecessors(i),a))}return r.each(t.nodes(),(function(t){e=[],a(t),e.length&&i.push(e)})),i}},function(t,e,n){var r=n(149),i=n(12);t.exports=function(t,e,n){return i.transform(t.nodes(),(function(i,a){i[a]=r(t,a,e,n)}),{})}},function(t,e,n){var r=n(12),i=n(151);t.exports=function(t){return r.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},function(t,e,n){var r=n(12);t.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,a=e(n);r[t][i]={distance:a,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var a=r[n];i.forEach((function(n){var r=a[t],i=e[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)}))}))})),r}(t,e||i,n||function(e){return t.outEdges(e)})};var i=r.constant(1)},function(t,e,n){var r=n(152);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},function(t,e,n){var r=n(153);t.exports=function(t,e){return r(t,e,"post")}},function(t,e,n){var r=n(153);t.exports=function(t,e){return r(t,e,"pre")}},function(t,e,n){var r=n(12),i=n(77),a=n(150);t.exports=function(t,e){var n,o=new i,s={},c=new a;function u(t){var r=t.v===n?t.w:t.v,i=c.priority(r);if(void 0!==i){var a=e(t);a<i&&(s[r]=n,c.decrease(r,a))}}if(0===t.nodeCount())return o;r.each(t.nodes(),(function(t){c.add(t,Number.POSITIVE_INFINITY),o.setNode(t)})),c.decrease(t.nodes()[0],0);var l=!1;for(;c.size()>0;){if(n=c.removeMin(),r.has(s,n))o.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(n).forEach(u)}return o}},function(t,e,n){var r;try{r=n(3)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,e,n){"use strict";var r=n(4),i=n(346),a=n(349),o=n(350),s=n(8).normalizeRanks,c=n(352),u=n(8).removeEmptyRanks,l=n(353),h=n(354),f=n(355),d=n(356),p=n(365),y=n(8),g=n(20).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?y.time:y.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new g({multigraph:!0,compound:!0}),n=C(t.graph());return e.setGraph(r.merge({},m,T(n,v),r.pick(n,b))),r.forEach(t.nodes(),(function(n){var i=C(t.node(n));e.setNode(n,r.defaults(T(i,x),_)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=C(t.edge(n));e.setEdge(n,r.merge({},w,T(i,k),r.pick(i,E)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){i.run(t)})),e(" nestingGraph.run",(function(){l.run(t)})),e(" rank",(function(){o(y.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};y.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){u(t)})),e(" nestingGraph.cleanup",(function(){l.cleanup(t)})),e(" normalizeRanks",(function(){s(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){a.run(t)})),e(" parentDummyChains",(function(){c(t)})),e(" addBorderSegments",(function(){h(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=y.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var a=t.node(e);a.order=i+n,r.forEach(a.selfEdges,(function(e){y.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:a.rank,order:i+ ++n,e:e.e,label:e.label},"_se")})),delete a.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){f.adjust(t)})),e(" position",(function(){p(t)})),e(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),a=t.node(n.borderBottom),o=t.node(r.last(n.borderLeft)),s=t.node(r.last(n.borderRight));n.width=Math.abs(s.x-o.x),n.height=Math.abs(a.y-i.y),n.x=o.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){a.undo(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){f.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),s=o.marginx||0,c=o.marginy||0;function u(t){var r=t.x,o=t.y,s=t.width,c=t.height;e=Math.min(e,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}r.forEach(t.nodes(),(function(e){u(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&u(n)})),e-=s,i-=c,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i})),r.forEach(t.edges(),(function(n){var a=t.edge(n);r.forEach(a.points,(function(t){t.x-=e,t.y-=i})),r.has(a,"x")&&(a.x-=e),r.has(a,"y")&&(a.y-=i)})),o.width=n-e+s,o.height=a-i+c}(t)})),e(" assignNodeIntersects",(function(){!function(t){r.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=a),i.points.unshift(y.intersectRect(a,n)),i.points.push(y.intersectRect(o,r))}))}(t)})),e(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){i.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(t.edges(),(function(n){var i=t.edge(n),a=e.edge(n);i.points=a.points,r.has(a,"x")&&(i.x=a.x,i.y=a.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};var v=["nodesep","edgesep","ranksep","marginx","marginy"],m={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],x=["width","height"],_={width:0,height:0},k=["minlen","weight","width","height","labeloffset"],w={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},E=["labelpos"];function T(t,e){return r.mapValues(r.pick(t,e),Number)}function C(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},function(t,e,n){var r=n(109);t.exports=function(t){return r(t,5)}},function(t,e,n){var r=n(316)(n(317));t.exports=r},function(t,e,n){var r=n(26),i=n(25),a=n(30);t.exports=function(t){return function(e,n,o){var s=Object(e);if(!i(e)){var c=r(n,3);e=a(e),n=function(t){return c(s[t],t,s)}}var u=t(e,n,o);return u>-1?s[c?e[u]:u]:void 0}}},function(t,e,n){var r=n(146),i=n(26),a=n(318),o=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var c=null==n?0:a(n);return c<0&&(c=o(s+c,0)),r(t,i(e,3),c)}},function(t,e,n){var r=n(156);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},function(t,e,n){var r=n(13),i=n(43),a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(a,"");var n=s.test(t);return n||c.test(t)?u(t.slice(2),n?2:8):o.test(t)?NaN:+t}},function(t,e,n){var r=n(90),i=n(128),a=n(41);t.exports=function(t,e){return null==t?t:r(t,i(e),a)}},function(t,e){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},function(t,e,n){var r=n(60),i=n(89),a=n(26);t.exports=function(t,e){var n={};return e=a(e,3),i(t,(function(t,i,a){r(n,i,e(t,i,a))})),n}},function(t,e,n){var r=n(96),i=n(324),a=n(35);t.exports=function(t){return t&&t.length?r(t,a,i):void 0}},function(t,e){t.exports=function(t,e){return t>e}},function(t,e,n){var r=n(326),i=n(329)((function(t,e,n){r(t,e,n)}));t.exports=i},function(t,e,n){var r=n(54),i=n(158),a=n(90),o=n(327),s=n(13),c=n(41),u=n(160);t.exports=function t(e,n,l,h,f){e!==n&&a(n,(function(a,c){if(f||(f=new r),s(a))o(e,n,c,l,t,h,f);else{var d=h?h(u(e,c),a,c+"",e,n,f):void 0;void 0===d&&(d=a),i(e,c,d)}}),c)}},function(t,e,n){var r=n(158),i=n(115),a=n(124),o=n(116),s=n(125),c=n(48),u=n(5),l=n(147),h=n(40),f=n(38),d=n(13),p=n(159),y=n(49),g=n(160),v=n(328);t.exports=function(t,e,n,m,b,x,_){var k=g(t,n),w=g(e,n),E=_.get(w);if(E)r(t,n,E);else{var T=x?x(k,w,n+"",t,e,_):void 0,C=void 0===T;if(C){var S=u(w),A=!S&&h(w),M=!S&&!A&&y(w);T=w,S||A||M?u(k)?T=k:l(k)?T=o(k):A?(C=!1,T=i(w,!0)):M?(C=!1,T=a(w,!0)):T=[]:p(w)||c(w)?(T=k,c(k)?T=v(k):d(k)&&!f(k)||(T=s(w))):C=!1}C&&(_.set(w,T),b(T,w,m,x,_),_.delete(w)),r(t,n,T)}}},function(t,e,n){var r=n(47),i=n(41);t.exports=function(t){return r(t,i(t))}},function(t,e,n){var r=n(68),i=n(69);t.exports=function(t){return r((function(e,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&i(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++r<a;){var c=n[r];c&&t(e,c,r,o)}return e}))}},function(t,e,n){var r=n(96),i=n(161),a=n(35);t.exports=function(t){return t&&t.length?r(t,a,i):void 0}},function(t,e,n){var r=n(96),i=n(26),a=n(161);t.exports=function(t,e){return t&&t.length?r(t,i(e,2),a):void 0}},function(t,e,n){var r=n(19);t.exports=function(){return r.Date.now()}},function(t,e,n){var r=n(334),i=n(137);t.exports=function(t,e){return r(t,e,(function(e,n){return i(t,n)}))}},function(t,e,n){var r=n(92),i=n(335),a=n(66);t.exports=function(t,e,n){for(var o=-1,s=e.length,c={};++o<s;){var u=e[o],l=r(t,u);n(l,u)&&i(c,a(u,t),l)}return c}},function(t,e,n){var r=n(59),i=n(66),a=n(61),o=n(13),s=n(50);t.exports=function(t,e,n,c){if(!o(t))return t;for(var u=-1,l=(e=i(e,t)).length,h=l-1,f=t;null!=f&&++u<l;){var d=s(e[u]),p=n;if(u!=h){var y=f[d];void 0===(p=c?c(y,d,f):void 0)&&(p=o(y)?y:a(e[u+1])?[]:{})}r(f,d,p),f=f[d]}return t}},function(t,e,n){var r=n(157),i=n(144),a=n(145);t.exports=function(t){return a(i(t,void 0,r),t+"")}},function(t,e,n){var r=n(338),i=n(69),a=n(156);t.exports=function(t){return function(e,n,o){return o&&"number"!=typeof o&&i(e,n,o)&&(n=o=void 0),e=a(e),void 0===n?(n=e,e=0):n=a(n),o=void 0===o?e<n?1:-1:a(o),r(e,n,o,t)}}},function(t,e){var n=Math.ceil,r=Math.max;t.exports=function(t,e,i,a){for(var o=-1,s=r(n((e-t)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=t,t+=i;return c}},function(t,e,n){var r=n(95),i=n(340),a=n(68),o=n(69),s=a((function(t,e){if(null==t)return[];var n=e.length;return n>1&&o(t,e[0],e[1])?e=[]:n>2&&o(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=s},function(t,e,n){var r=n(67),i=n(26),a=n(142),o=n(341),s=n(62),c=n(342),u=n(35);t.exports=function(t,e,n){var l=-1;e=r(e.length?e:[u],s(i));var h=a(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++l,value:t}}));return o(h,(function(t,e){return c(t,e,n)}))}},function(t,e){t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},function(t,e,n){var r=n(343);t.exports=function(t,e,n){for(var i=-1,a=t.criteria,o=e.criteria,s=a.length,c=n.length;++i<s;){var u=r(a[i],o[i]);if(u)return i>=c?u:u*("desc"==n[i]?-1:1)}return t.index-e.index}},function(t,e,n){var r=n(43);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,a=t==t,o=r(t),s=void 0!==e,c=null===e,u=e==e,l=r(e);if(!c&&!l&&!o&&t>e||o&&s&&u&&!c&&!l||i&&s&&u||!n&&u||!a)return 1;if(!i&&!o&&!l&&t<e||l&&n&&a&&!i&&!o||c&&n&&a||!s&&a||!u)return-1}return 0}},function(t,e,n){var r=n(59),i=n(345);t.exports=function(t,e){return i(t||[],e||[],r)}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=t.length,a=e.length,o={};++r<i;){var s=r<a?e[r]:void 0;n(o,t[r],s)}return o}},function(t,e,n){"use strict";var r=n(4),i=n(347);t.exports={run:function(t){var e="greedy"===t.graph().acyclicer?i(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},i={};function a(o){r.has(i,o)||(i[o]=!0,n[o]=!0,r.forEach(t.outEdges(o),(function(t){r.has(n,t.w)?e.push(t):a(t.w)})),delete n[o])}return r.forEach(t.nodes(),a),e}(t);r.forEach(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.uniqueId("rev"))}))},undo:function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}}},function(t,e,n){var r=n(4),i=n(20).Graph,a=n(348);t.exports=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new i,o=0,s=0;r.forEach(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),r.forEach(t.edges(),(function(t){var r=n.edge(t.v,t.w)||0,i=e(t),a=r+i;n.setEdge(t.v,t.w,a),s=Math.max(s,n.node(t.v).out+=i),o=Math.max(o,n.node(t.w).in+=i)}));var u=r.range(s+o+3).map((function(){return new a})),l=o+1;return r.forEach(n.nodes(),(function(t){c(u,l,n.node(t))})),{graph:n,buckets:u,zeroIdx:l}}(t,e||o),u=function(t,e,n){var r,i=[],a=e[e.length-1],o=e[0];for(;t.nodeCount();){for(;r=o.dequeue();)s(t,e,n,r);for(;r=a.dequeue();)s(t,e,n,r);if(t.nodeCount())for(var c=e.length-2;c>0;--c)if(r=e[c].dequeue()){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(u,(function(e){return t.outEdges(e.v,e.w)})),!0)};var o=r.constant(1);function s(t,e,n,i,a){var o=a?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),s=t.node(r.v);a&&o.push({v:r.v,w:r.w}),s.out-=i,c(e,n,s)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),a=r.w,o=t.node(a);o.in-=i,c(e,n,o)})),t.removeNode(i.v),o}function c(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},function(t,e){function n(){var t={};t._next=t._prev=t,this._sentinel=t}function r(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=n,n.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return r(e),e},n.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&r(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},n.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,i)),n=n._prev;return"["+t.join(", ")+"]"}},function(t,e,n){"use strict";var r=n(4),i=n(8);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,a,o=e.v,s=t.node(o).rank,c=e.w,u=t.node(c).rank,l=e.name,h=t.edge(e),f=h.labelRank;if(u===s+1)return;for(t.removeEdge(e),a=0,++s;s<u;++a,++s)h.points=[],r={width:0,height:0,edgeLabel:h,edgeObj:e,rank:s},n=i.addDummyNode(t,"edge",r,"_d"),s===f&&(r.width=h.width,r.height=h.height,r.dummy="edge-label",r.labelpos=h.labelpos),t.setEdge(o,n,{weight:h.weight},l),0===a&&t.graph().dummyChains.push(n),o=n;t.setEdge(o,c,{weight:h.weight},l)}(t,e)}))},undo:function(t){r.forEach(t.graph().dummyChains,(function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}}},function(t,e,n){"use strict";var r=n(70).longestPath,i=n(165),a=n(351);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":s(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":o(t);break;default:s(t)}};var o=r;function s(t){a(t)}},function(t,e,n){"use strict";var r=n(4),i=n(165),a=n(70).slack,o=n(70).longestPath,s=n(20).alg.preorder,c=n(20).alg.postorder,u=n(8).simplify;function l(t){t=u(t),o(t);var e,n=i(t);for(d(n),h(n,t);e=y(n);)v(n,t,e,g(n,t,e))}function h(t,e){var n=c(t,t.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=f(t,e,n)}(t,e,n)}))}function f(t,e,n){var i=t.node(n).parent,a=!0,o=e.edge(n,i),s=0;return o||(a=!1,o=e.edge(i,n)),s=o.weight,r.forEach(e.nodeEdges(n),(function(r){var o,c,u=r.v===n,l=u?r.w:r.v;if(l!==i){var h=u===a,f=e.edge(r).weight;if(s+=h?f:-f,o=n,c=l,t.hasEdge(o,c)){var d=t.edge(n,l).cutvalue;s+=h?-d:d}}})),s}function d(t,e){arguments.length<2&&(e=t.nodes()[0]),p(t,{},1,e)}function p(t,e,n,i,a){var o=n,s=t.node(i);return e[i]=!0,r.forEach(t.neighbors(i),(function(a){r.has(e,a)||(n=p(t,e,n,a,i))})),s.low=o,s.lim=n++,a?s.parent=a:delete s.parent,n}function y(t){return r.find(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function g(t,e,n){var i=n.v,o=n.w;e.hasEdge(i,o)||(i=n.w,o=n.v);var s=t.node(i),c=t.node(o),u=s,l=!1;s.lim>c.lim&&(u=c,l=!0);var h=r.filter(e.edges(),(function(e){return l===m(t,t.node(e.v),u)&&l!==m(t,t.node(e.w),u)}));return r.minBy(h,(function(t){return a(e,t)}))}function v(t,e,n,i){var a=n.v,o=n.w;t.removeEdge(a,o),t.setEdge(i.v,i.w,{}),d(t),h(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=s(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)}))}(t,e)}function m(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=l,l.initLowLimValues=d,l.initCutValues=h,l.calcCutValue=f,l.leaveEdge=y,l.enterEdge=g,l.exchangeEdges=v},function(t,e,n){var r=n(4);t.exports=function(t){var e=function(t){var e={},n=0;function i(a){var o=n;r.forEach(t.children(a),i),e[a]={low:o,lim:n++}}return r.forEach(t.children(),i),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,a=function(t,e,n,r){var i,a,o=[],s=[],c=Math.min(e[n].low,e[r].low),u=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),o.push(i)}while(i&&(e[i].low>c||u>e[i].lim));a=i,i=r;for(;(i=t.parent(i))!==a;)s.push(i);return{path:o.concat(s.reverse()),lca:a}}(t,e,i.v,i.w),o=a.path,s=a.lca,c=0,u=o[c],l=!0;n!==i.w;){if(r=t.node(n),l){for(;(u=o[c])!==s&&t.node(u).maxRank<r.rank;)c++;u===s&&(l=!1)}if(!l){for(;c<o.length-1&&t.node(u=o[c+1]).minRank<=r.rank;)c++;u=o[c]}t.setParent(n,u),n=t.successors(n)[0]}}))}},function(t,e,n){var r=n(4),i=n(8);t.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};return r.forEach(t.children(),(function(n){!function n(i,a){var o=t.children(i);o&&o.length&&r.forEach(o,(function(t){n(t,a+1)}));e[i]=a}(n,1)})),e}(t),a=r.max(r.values(n))-1,o=2*a+1;t.graph().nestingRoot=e,r.forEach(t.edges(),(function(e){t.edge(e).minlen*=o}));var s=function(t){return r.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;r.forEach(t.children(),(function(c){!function t(e,n,a,o,s,c,u){var l=e.children(u);if(!l.length)return void(u!==n&&e.setEdge(n,u,{weight:0,minlen:a}));var h=i.addBorderNode(e,"_bt"),f=i.addBorderNode(e,"_bb"),d=e.node(u);e.setParent(h,u),d.borderTop=h,e.setParent(f,u),d.borderBottom=f,r.forEach(l,(function(r){t(e,n,a,o,s,c,r);var i=e.node(r),l=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,p=i.borderTop?o:2*o,y=l!==d?1:s-c[u]+1;e.setEdge(h,l,{weight:p,minlen:y,nestingEdge:!0}),e.setEdge(d,f,{weight:p,minlen:y,nestingEdge:!0})})),e.parent(u)||e.setEdge(n,h,{weight:0,minlen:s+c[u]})}(t,e,o,s,a,n,c)})),t.graph().nodeRankFactor=o},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},function(t,e,n){var r=n(4),i=n(8);function a(t,e,n,r,a,o){var s={width:0,height:0,rank:o,borderType:e},c=a[e][o-1],u=i.addDummyNode(t,"border",s,n);a[e][o]=u,t.setParent(u,r),c&&t.setEdge(c,u,{weight:1})}t.exports=function(t){r.forEach(t.children(),(function e(n){var i=t.children(n),o=t.node(n);if(i.length&&r.forEach(i,e),r.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var s=o.minRank,c=o.maxRank+1;s<c;++s)a(t,"borderLeft","_bl",n,o,s),a(t,"borderRight","_br",n,o,s)}}))}},function(t,e,n){"use strict";var r=n(4);function i(t){r.forEach(t.nodes(),(function(e){a(t.node(e))})),r.forEach(t.edges(),(function(e){a(t.edge(e))}))}function a(t){var e=t.width;t.width=t.height,t.height=e}function o(t){t.y=-t.y}function s(t){var e=t.x;t.x=t.y,t.y=e}t.exports={adjust:function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||i(t)},undo:function(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){r.forEach(t.nodes(),(function(e){o(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,o),r.has(n,"y")&&o(n)}))}(t);"lr"!==e&&"rl"!==e||(!function(t){r.forEach(t.nodes(),(function(e){s(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,s),r.has(n,"x")&&s(n)}))}(t),i(t))}}},function(t,e,n){"use strict";var r=n(4),i=n(357),a=n(358),o=n(359),s=n(363),c=n(364),u=n(20).Graph,l=n(8);function h(t,e,n){return r.map(e,(function(e){return s(t,e,n)}))}function f(t,e){var n=new u;r.forEach(t,(function(t){var i=t.graph().root,a=o(t,i,n,e);r.forEach(a.vs,(function(e,n){t.node(e).order=n})),c(t,n,a.vs)}))}function d(t,e){r.forEach(e,(function(e){r.forEach(e,(function(e,n){t.node(e).order=n}))}))}t.exports=function(t){var e=l.maxRank(t),n=h(t,r.range(1,e+1),"inEdges"),o=h(t,r.range(e-1,-1,-1),"outEdges"),s=i(t);d(t,s);for(var c,u=Number.POSITIVE_INFINITY,p=0,y=0;y<4;++p,++y){f(p%2?n:o,p%4>=2),s=l.buildLayerMatrix(t);var g=a(t,s);g<u&&(y=0,c=r.cloneDeep(s),u=g)}d(t,c)}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t){var e={},n=r.filter(t.nodes(),(function(e){return!t.children(e).length})),i=r.max(r.map(n,(function(e){return t.node(e).rank}))),a=r.map(r.range(i+1),(function(){return[]}));var o=r.sortBy(n,(function(e){return t.node(e).rank}));return r.forEach(o,(function n(i){if(r.has(e,i))return;e[i]=!0;var o=t.node(i);a[o.rank].push(i),r.forEach(t.successors(i),n)})),a}},function(t,e,n){"use strict";var r=n(4);function i(t,e,n){for(var i=r.zipObject(n,r.map(n,(function(t,e){return e}))),a=r.flatten(r.map(e,(function(e){return r.sortBy(r.map(t.outEdges(e),(function(e){return{pos:i[e.w],weight:t.edge(e).weight}})),"pos")})),!0),o=1;o<n.length;)o<<=1;var s=2*o-1;o-=1;var c=r.map(new Array(s),(function(){return 0})),u=0;return r.forEach(a.forEach((function(t){var e=t.pos+o;c[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=c[e+1]),c[e=e-1>>1]+=t.weight;u+=t.weight*n}))),u}t.exports=function(t,e){for(var n=0,r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n}},function(t,e,n){var r=n(4),i=n(360),a=n(361),o=n(362);t.exports=function t(e,n,s,c){var u=e.children(n),l=e.node(n),h=l?l.borderLeft:void 0,f=l?l.borderRight:void 0,d={};h&&(u=r.filter(u,(function(t){return t!==h&&t!==f})));var p=i(e,u);r.forEach(p,(function(n){if(e.children(n.v).length){var i=t(e,n.v,s,c);d[n.v]=i,r.has(i,"barycenter")&&(a=n,o=i,r.isUndefined(a.barycenter)?(a.barycenter=o.barycenter,a.weight=o.weight):(a.barycenter=(a.barycenter*a.weight+o.barycenter*o.weight)/(a.weight+o.weight),a.weight+=o.weight))}var a,o}));var y=a(p,s);!function(t,e){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(y,d);var g=o(y,c);if(h&&(g.vs=r.flatten([h,g.vs,f],!0),e.predecessors(h).length)){var v=e.node(e.predecessors(h)[0]),m=e.node(e.predecessors(f)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+v.order+m.order)/(g.weight+2),g.weight+=2}return g}},function(t,e,n){var r=n(4);t.exports=function(t,e){return r.map(e,(function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,(function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}}))}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t,e){var n={};return r.forEach(t,(function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};r.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)})),r.forEach(e.edges(),(function(t){var e=n[t.v],i=n[t.w];r.isUndefined(e)||r.isUndefined(i)||(i.indegree++,e.out.push(n[t.w]))})),function(t){var e=[];function n(t){return function(e){e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&function(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var a=t.pop();e.push(a),r.forEach(a.in.reverse(),n(a)),r.forEach(a.out,i(a))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(t){return!t.indegree})))}},function(t,e,n){var r=n(4),i=n(8);function a(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){var n=i.partition(t,(function(t){return r.has(t,"barycenter")})),o=n.lhs,s=r.sortBy(n.rhs,(function(t){return-t.i})),c=[],u=0,l=0,h=0;o.sort((f=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:f?e.i-t.i:t.i-e.i})),h=a(c,s,h),r.forEach(o,(function(t){h+=t.vs.length,c.push(t.vs),u+=t.barycenter*t.weight,l+=t.weight,h=a(c,s,h)}));var f;var d={vs:r.flatten(c,!0)};l&&(d.barycenter=u/l,d.weight=l);return d}},function(t,e,n){var r=n(4),i=n(20).Graph;t.exports=function(t,e,n){var a=function(t){var e;for(;t.hasNode(e=r.uniqueId("_root")););return e}(t),o=new i({compound:!0}).setGraph({root:a}).setDefaultNodeLabel((function(e){return t.node(e)}));return r.forEach(t.nodes(),(function(i){var s=t.node(i),c=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(o.setNode(i),o.setParent(i,c||a),r.forEach(t[n](i),(function(e){var n=e.v===i?e.w:e.v,a=o.edge(n,i),s=r.isUndefined(a)?0:a.weight;o.setEdge(n,i,{weight:t.edge(e).weight+s})})),r.has(s,"minRank")&&o.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))})),o}},function(t,e,n){var r=n(4);t.exports=function(t,e,n){var i,a={};r.forEach(n,(function(n){for(var r,o,s=t.parent(n);s;){if((r=t.parent(s))?(o=a[r],a[r]=s):(o=i,i=s),o&&o!==s)return void e.setEdge(o,s);s=r}}))}},function(t,e,n){"use strict";var r=n(4),i=n(8),a=n(366).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,a=0;r.forEach(e,(function(e){var i=r.max(r.map(e,(function(e){return t.node(e).height})));r.forEach(e,(function(e){t.node(e).y=a+i/2})),a+=i+n}))})(t=i.asNonCompoundGraph(t)),r.forEach(a(t),(function(e,n){t.node(n).x=e}))}},function(t,e,n){"use strict";var r=n(4),i=n(20).Graph,a=n(8);function o(t,e){var n={};return r.reduce(e,(function(e,i){var a=0,o=0,s=e.length,u=r.last(i);return r.forEach(i,(function(e,l){var h=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),f=h?t.node(h).order:s;(h||e===u)&&(r.forEach(i.slice(o,l+1),(function(e){r.forEach(t.predecessors(e),(function(r){var i=t.node(r),o=i.order;!(o<a||f<o)||i.dummy&&t.node(e).dummy||c(n,r,e)}))})),o=l+1,a=f)})),i})),n}function s(t,e){var n={};function i(e,i,a,o,s){var u;r.forEach(r.range(i,a),(function(i){u=e[i],t.node(u).dummy&&r.forEach(t.predecessors(u),(function(e){var r=t.node(e);r.dummy&&(r.order<o||r.order>s)&&c(n,e,u)}))}))}return r.reduce(e,(function(e,n){var a,o=-1,s=0;return r.forEach(n,(function(r,c){if("border"===t.node(r).dummy){var u=t.predecessors(r);u.length&&(a=t.node(u[0]).order,i(n,s,c,o,a),s=c,o=a)}i(n,s,n.length,a,e.length)})),n})),n}function c(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function u(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function l(t,e,n,i){var a={},o={},s={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){a[t]=t,o[t]=t,s[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var c=i(t);if(c.length)for(var l=((c=r.sortBy(c,(function(t){return s[t]}))).length-1)/2,h=Math.floor(l),f=Math.ceil(l);h<=f;++h){var d=c[h];o[t]===t&&e<s[d]&&!u(n,t,d)&&(o[d]=t,o[t]=a[t]=a[d],e=s[d])}}))})),{root:a,align:o}}function h(t,e,n,a,o){var s={},c=function(t,e,n,a){var o=new i,s=t.graph(),c=function(t,e,n){return function(i,a,o){var s,c=i.node(a),u=i.node(o),l=0;if(l+=c.width/2,r.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=-c.width/2;break;case"r":s=c.width/2}if(s&&(l+=n?s:-s),s=0,l+=(c.dummy?e:t)/2,l+=(u.dummy?e:t)/2,l+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=u.width/2;break;case"r":s=-u.width/2}return s&&(l+=n?s:-s),s=0,l}}(s.nodesep,s.edgesep,a);return r.forEach(e,(function(e){var i;r.forEach(e,(function(e){var r=n[e];if(o.setNode(r),i){var a=n[i],s=o.edge(a,r);o.setEdge(a,r,Math.max(c(t,e,i),s||0))}i=e}))})),o}(t,e,n,o),u=o?"borderLeft":"borderRight";function l(t,e){for(var n=c.nodes(),r=n.pop(),i={};r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return l((function(t){s[t]=c.inEdges(t).reduce((function(t,e){return Math.max(t,s[e.v]+c.edge(e))}),0)}),c.predecessors.bind(c)),l((function(e){var n=c.outEdges(e).reduce((function(t,e){return Math.min(t,s[e.w]-c.edge(e))}),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(s[e]=Math.max(s[e],n))}),c.successors.bind(c)),r.forEach(a,(function(t){s[t]=s[n[t]]})),s}function f(t,e){return r.minBy(r.values(e),(function(e){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return r.forIn(e,(function(e,r){var a=function(t,e){return t.node(e).width}(t,r)/2;n=Math.max(e+a,n),i=Math.min(e-a,i)})),n-i}))}function d(t,e){var n=r.values(e),i=r.min(n),a=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(o){var s,c=n+o,u=t[c];if(u!==e){var l=r.values(u);(s="l"===o?i-r.min(l):a-r.max(l))&&(t[c]=r.mapValues(u,(function(t){return t+s})))}}))}))}function p(t,e){return r.mapValues(t.ul,(function(n,i){if(e)return t[e.toLowerCase()][i];var a=r.sortBy(r.map(t,i));return(a[1]+a[2])/2}))}t.exports={positionX:function(t){var e,n=a.buildLayerMatrix(t),i=r.merge(o(t,n),s(t,n)),c={};r.forEach(["u","d"],(function(a){e="u"===a?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(e=r.map(e,(function(t){return r.values(t).reverse()})));var o=("u"===a?t.predecessors:t.successors).bind(t),s=l(t,e,i,o),u=h(t,e,s.root,s.align,"r"===n);"r"===n&&(u=r.mapValues(u,(function(t){return-t}))),c[a+n]=u}))}));var u=f(t,c);return d(c,u),p(c,t.graph().align)},findType1Conflicts:o,findType2Conflicts:s,addConflict:c,hasConflict:u,verticalAlignment:l,horizontalCompaction:h,alignCoordinates:d,findSmallestWidthAlignment:f,balance:p}},function(t,e,n){var r=n(4),i=n(8),a=n(20).Graph;t.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),(function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),r.forEach(t.edges(),(function(t){n.setEdge(t.v,t.w,{},t.name)})),r.forEach(e,(function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,(function(t,e){return n.setEdge(t,e,{style:"invis"}),e}))})),n}}},function(t,e){t.exports="0.8.5"},function(t,e,n){t.exports={node:n(166),circle:n(167),ellipse:n(97),polygon:n(168),rect:n(169)}},function(t,e){function n(t,e){return t*e>0}t.exports=function(t,e,r,i){var a,o,s,c,u,l,h,f,d,p,y,g,v;if(a=e.y-t.y,s=t.x-e.x,u=e.x*t.y-t.x*e.y,d=a*r.x+s*r.y+u,p=a*i.x+s*i.y+u,0!==d&&0!==p&&n(d,p))return;if(o=i.y-r.y,c=r.x-i.x,l=i.x*r.y-r.x*i.y,h=o*t.x+c*t.y+l,f=o*e.x+c*e.y+l,0!==h&&0!==f&&n(h,f))return;if(0===(y=a*c-o*s))return;return g=Math.abs(y/2),{x:(v=s*l-c*u)<0?(v-g)/y:(v+g)/y,y:(v=o*u-a*l)<0?(v-g)/y:(v+g)/y}}},function(t,e,n){var r=n(44),i=n(31),a=n(154).layout;t.exports=function(){var t=n(372),e=n(375),i=n(376),u=n(377),l=n(378),h=n(379),f=n(380),d=n(381),p=n(382),y=function(n,y){!function(t){t.nodes().forEach((function(e){var n=t.node(e);r.has(n,"label")||t.children(e).length||(n.label=e),r.has(n,"paddingX")&&r.defaults(n,{paddingLeft:n.paddingX,paddingRight:n.paddingX}),r.has(n,"paddingY")&&r.defaults(n,{paddingTop:n.paddingY,paddingBottom:n.paddingY}),r.has(n,"padding")&&r.defaults(n,{paddingLeft:n.padding,paddingRight:n.padding,paddingTop:n.padding,paddingBottom:n.padding}),r.defaults(n,o),r.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],(function(t){n[t]=Number(n[t])})),r.has(n,"width")&&(n._prevWidth=n.width),r.has(n,"height")&&(n._prevHeight=n.height)})),t.edges().forEach((function(e){var n=t.edge(e);r.has(n,"label")||(n.label=""),r.defaults(n,s)}))}(y);var g=c(n,"output"),v=c(g,"clusters"),m=c(g,"edgePaths"),b=i(c(g,"edgeLabels"),y),x=t(c(g,"nodes"),y,d);a(y),l(x,y),h(b,y),u(m,y,p);var _=e(v,y);f(_,y),function(t){r.each(t.nodes(),(function(e){var n=t.node(e);r.has(n,"_prevWidth")?n.width=n._prevWidth:delete n.width,r.has(n,"_prevHeight")?n.height=n._prevHeight:delete n.height,delete n._prevWidth,delete n._prevHeight}))}(y)};return y.createNodes=function(e){return arguments.length?(t=e,y):t},y.createClusters=function(t){return arguments.length?(e=t,y):e},y.createEdgeLabels=function(t){return arguments.length?(i=t,y):i},y.createEdgePaths=function(t){return arguments.length?(u=t,y):u},y.shapes=function(t){return arguments.length?(d=t,y):d},y.arrows=function(t){return arguments.length?(p=t,y):p},y};var o={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},s={arrowhead:"normal",curve:i.curveLinear};function c(t,e){var n=t.select("g."+e);return n.empty()&&(n=t.append("g").attr("class",e)),n}},function(t,e,n){"use strict";var r=n(44),i=n(98),a=n(14),o=n(31);t.exports=function(t,e,n){var s,c=e.nodes().filter((function(t){return!a.isSubgraph(e,t)})),u=t.selectAll("g.node").data(c,(function(t){return t})).classed("update",!0);u.exit().remove(),u.enter().append("g").attr("class","node").style("opacity",0),(u=t.selectAll("g.node")).each((function(t){var s=e.node(t),c=o.select(this);a.applyClass(c,s.class,(c.classed("update")?"update ":"")+"node"),c.select("g.label").remove();var u=c.append("g").attr("class","label"),l=i(u,s),h=n[s.shape],f=r.pick(l.node().getBBox(),"width","height");s.elem=this,s.id&&c.attr("id",s.id),s.labelId&&u.attr("id",s.labelId),r.has(s,"width")&&(f.width=s.width),r.has(s,"height")&&(f.height=s.height),f.width+=s.paddingLeft+s.paddingRight,f.height+=s.paddingTop+s.paddingBottom,u.attr("transform","translate("+(s.paddingLeft-s.paddingRight)/2+","+(s.paddingTop-s.paddingBottom)/2+")");var d=o.select(this);d.select(".label-container").remove();var p=h(d,f,s).classed("label-container",!0);a.applyStyle(p,s.style);var y=p.node().getBBox();s.width=y.width,s.height=y.height})),s=u.exit?u.exit():u.selectAll(null);return a.applyTransition(s,e).style("opacity",0).remove(),u}},function(t,e,n){var r=n(14);t.exports=function(t,e){for(var n=t.append("text"),i=function(t){for(var e,n="",r=!1,i=0;i<t.length;++i)if(e=t[i],r){switch(e){case"n":n+="\n";break;default:n+=e}r=!1}else"\\"===e?r=!0:n+=e;return n}(e.label).split("\n"),a=0;a<i.length;a++)n.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(i[a]);return r.applyStyle(n,e.labelStyle),n}},function(t,e,n){var r=n(14);t.exports=function(t,e){var n=t;return n.node().appendChild(e.label),r.applyStyle(n,e.labelStyle),n}},function(t,e,n){var r=n(14),i=n(31),a=n(98);t.exports=function(t,e){var n,o=e.nodes().filter((function(t){return r.isSubgraph(e,t)})),s=t.selectAll("g.cluster").data(o,(function(t){return t}));s.selectAll("*").remove(),s.enter().append("g").attr("class","cluster").attr("id",(function(t){return e.node(t).id})).style("opacity",0),s=t.selectAll("g.cluster"),r.applyTransition(s,e).style("opacity",1),s.each((function(t){var n=e.node(t),r=i.select(this);i.select(this).append("rect");var o=r.append("g").attr("class","label");a(o,n,n.clusterLabelPos)})),s.selectAll("rect").each((function(t){var n=e.node(t),a=i.select(this);r.applyStyle(a,n.style)})),n=s.exit?s.exit():s.selectAll(null);return r.applyTransition(n,e).style("opacity",0).remove(),s}},function(t,e,n){"use strict";var r=n(44),i=n(98),a=n(14),o=n(31);t.exports=function(t,e){var n,s=t.selectAll("g.edgeLabel").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0);s.exit().remove(),s.enter().append("g").classed("edgeLabel",!0).style("opacity",0),(s=t.selectAll("g.edgeLabel")).each((function(t){var n=o.select(this);n.select(".label").remove();var a=e.edge(t),s=i(n,e.edge(t),0,0).classed("label",!0),c=s.node().getBBox();a.labelId&&s.attr("id",a.labelId),r.has(a,"width")||(a.width=c.width),r.has(a,"height")||(a.height=c.height)})),n=s.exit?s.exit():s.selectAll(null);return a.applyTransition(n,e).style("opacity",0).remove(),s}},function(t,e,n){"use strict";var r=n(44),i=n(166),a=n(14),o=n(31);function s(t,e){var n=(o.line||o.svg.line)().x((function(t){return t.x})).y((function(t){return t.y}));return(n.curve||n.interpolate)(t.curve),n(e)}t.exports=function(t,e,n){var c=t.selectAll("g.edgePath").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0),u=function(t,e){var n=t.enter().append("g").attr("class","edgePath").style("opacity",0);return n.append("path").attr("class","path").attr("d",(function(t){var n=e.edge(t),i=e.node(t.v).elem;return s(n,r.range(n.points.length).map((function(){return e=(t=i).getBBox(),{x:(n=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2)).e,y:n.f};var t,e,n})))})),n.append("defs"),n}(c,e);!function(t,e){var n=t.exit();a.applyTransition(n,e).style("opacity",0).remove()}(c,e);var l=void 0!==c.merge?c.merge(u):c;return a.applyTransition(l,e).style("opacity",1),l.each((function(t){var n=o.select(this),r=e.edge(t);r.elem=this,r.id&&n.attr("id",r.id),a.applyClass(n,r.class,(n.classed("update")?"update ":"")+"edgePath")})),l.selectAll("path.path").each((function(t){var n=e.edge(t);n.arrowheadId=r.uniqueId("arrowhead");var c=o.select(this).attr("marker-end",(function(){return"url("+(t=location.href,e=n.arrowheadId,t.split("#")[0]+"#"+e)+")";var t,e})).style("fill","none");a.applyTransition(c,e).attr("d",(function(t){return function(t,e){var n=t.edge(e),r=t.node(e.v),a=t.node(e.w),o=n.points.slice(1,n.points.length-1);return o.unshift(i(r,o[0])),o.push(i(a,o[o.length-1])),s(n,o)}(e,t)})),a.applyStyle(c,n.style)})),l.selectAll("defs *").remove(),l.selectAll("defs").each((function(t){var r=e.edge(t);(0,n[r.arrowhead])(o.select(this),r.arrowheadId,r,"arrowhead")})),l}},function(t,e,n){"use strict";var r=n(14),i=n(31);t.exports=function(t,e){function n(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},function(t,e,n){"use strict";var r=n(14),i=n(31),a=n(44);t.exports=function(t,e){function n(t){var n=e.edge(t);return a.has(n,"x")?"translate("+n.x+","+n.y+")":""}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},function(t,e,n){"use strict";var r=n(14),i=n(31);t.exports=function(t,e){var n=t.filter((function(){return!i.select(this).classed("update")}));function a(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}n.attr("transform",a),r.applyTransition(t,e).style("opacity",1).attr("transform",a),r.applyTransition(n.selectAll("rect"),e).attr("width",(function(t){return e.node(t).width})).attr("height",(function(t){return e.node(t).height})).attr("x",(function(t){return-e.node(t).width/2})).attr("y",(function(t){return-e.node(t).height/2}))}},function(t,e,n){"use strict";var r=n(169),i=n(97),a=n(167),o=n(168);t.exports={rect:function(t,e,n){var i=t.insert("rect",":first-child").attr("rx",n.rx).attr("ry",n.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return n.intersect=function(t){return r(n,t)},i},ellipse:function(t,e,n){var r=e.width/2,a=e.height/2,o=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",r).attr("ry",a);return n.intersect=function(t){return i(n,r,a,t)},o},circle:function(t,e,n){var r=Math.max(e.width,e.height)/2,i=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",r);return n.intersect=function(t){return a(n,r,t)},i},diamond:function(t,e,n){var r=e.width*Math.SQRT2/2,i=e.height*Math.SQRT2/2,a=[{x:0,y:-i},{x:-r,y:0},{x:0,y:i},{x:r,y:0}],s=t.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" "));return n.intersect=function(t){return o(n,a,t)},s}}},function(t,e,n){var r=n(14);function i(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])}t.exports={default:i,normal:i,vee:function(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])},undirected:function(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])}}},function(t,e){t.exports="0.6.4"},function(t,e,n){"use strict";var r;function i(t){return r=r||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),r.innerHTML=t,unescape(r.textContent)}n.r(e);var a=n(23),o=n.n(a),s={debug:1,info:2,warn:3,error:4,fatal:5},c={debug:function(){},info:function(){},warn:function(){},error:function(){},fatal:function(){}},u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"fatal";isNaN(t)&&(t=t.toLowerCase(),void 0!==s[t]&&(t=s[t])),c.trace=function(){},c.debug=function(){},c.info=function(){},c.warn=function(){},c.error=function(){},c.fatal=function(){},t<=s.fatal&&(c.fatal=console.error?console.error.bind(console,l("FATAL"),"color: orange"):console.log.bind(console,"",l("FATAL"))),t<=s.error&&(c.error=console.error?console.error.bind(console,l("ERROR"),"color: orange"):console.log.bind(console,"",l("ERROR"))),t<=s.warn&&(c.warn=console.warn?console.warn.bind(console,l("WARN"),"color: orange"):console.log.bind(console,"",l("WARN"))),t<=s.info&&(c.info=console.info?console.info.bind(console,l("INFO"),"color: lightblue"):console.log.bind(console,"",l("INFO"))),t<=s.debug&&(c.debug=console.debug?console.debug.bind(console,l("DEBUG"),"color: lightgreen"):console.log.bind(console,"",l("DEBUG")))},l=function(t){var e=o()().format("ss.SSS");return"%c".concat(e," : ").concat(t," : ")},h=n(0),f=n(170),d=n.n(f),p=n(36),y=n(71),g=function(t){for(var e="",n=0;n>=0;){if(!((n=t.indexOf("<script"))>=0)){e+=t,n=-1;break}e+=t.substr(0,n),(n=(t=t.substr(n+1)).indexOf("<\/script>"))>=0&&(n+=9,t=t.substr(n))}return e},v=/<br\s*\/?>/gi,m=function(t){return t.replace(v,"#br#")},b=function(t){return t.replace(/#br#/g,"<br/>")},x={getRows:function(t){if(!t)return 1;var e=m(t);return(e=e.replace(/\\n/g,"#br#")).split("#br#")},sanitizeText:function(t,e){var n=t,r=!0;if(!e.flowchart||!1!==e.flowchart.htmlLabels&&"false"!==e.flowchart.htmlLabels||(r=!1),r){var i=e.securityLevel;"antiscript"===i?n=g(n):"loose"!==i&&(n=(n=(n=m(n)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),n=b(n))}return n},hasBreaks:function(t){return/<br\s*[/]?>/gi.test(t)},splitBreaks:function(t){return t.split(/<br\s*[/]?>/gi)},lineBreakRegex:v,removeScript:g,getUrl:function(t){var e="";return t&&(e=(e=(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e}};function _(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function k(t){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function w(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var E={curveBasis:h.curveBasis,curveBasisClosed:h.curveBasisClosed,curveBasisOpen:h.curveBasisOpen,curveLinear:h.curveLinear,curveLinearClosed:h.curveLinearClosed,curveMonotoneX:h.curveMonotoneX,curveMonotoneY:h.curveMonotoneY,curveNatural:h.curveNatural,curveStep:h.curveStep,curveStepAfter:h.curveStepAfter,curveStepBefore:h.curveStepBefore},T=/[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,C=/\s*(?:(?:(\w+)(?=:):|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,S=/\s*%%.*\n/gm,A=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var n=new RegExp("[%]{2}(?![{]".concat(C.source,")(?=[}][%]{2}).*\n"),"ig");t=t.trim().replace(n,"").replace(/'/gm,'"'),c.debug("Detecting diagram directive".concat(null!==e?" type:"+e:""," based on the text:").concat(t));for(var r,i=[];null!==(r=T.exec(t));)if(r.index===T.lastIndex&&T.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){var a=r[1]?r[1]:r[2],o=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:a,args:o})}return 0===i.length&&i.push({type:t,args:null}),1===i.length?i[0]:i}catch(n){return c.error("ERROR: ".concat(n.message," - Unable to parse directive\n ").concat(null!==e?" type:"+e:""," based on the text:").concat(t)),{type:null,args:null}}},M=function(t,e){return t=t.replace(T,"").replace(S,"\n"),c.debug("Detecting diagram type based on the text "+t),t.match(/^\s*sequenceDiagram/)?"sequence":t.match(/^\s*gantt/)?"gantt":t.match(/^\s*classDiagram-v2/)?"classDiagram":t.match(/^\s*classDiagram/)?e&&e.class&&"dagre-wrapper"===e.class.defaultRenderer?"classDiagram":"class":t.match(/^\s*stateDiagram-v2/)?"stateDiagram":t.match(/^\s*stateDiagram/)?e&&e.class&&"dagre-wrapper"===e.state.defaultRenderer?"stateDiagram":"state":t.match(/^\s*gitGraph/)?"git":t.match(/^\s*flowchart/)?"flowchart-v2":t.match(/^\s*info/)?"info":t.match(/^\s*pie/)?"pie":t.match(/^\s*erDiagram/)?"er":t.match(/^\s*journey/)?"journey":t.match(/^\s*requirement/)||t.match(/^\s*requirementDiagram/)?"requirement":e&&e.flowchart&&"dagre-wrapper"===e.flowchart.defaultRenderer?"flowchart-v2":"flowchart"},O=function(t,e){var n={};return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=e?e.apply(void 0,i):i[0];if(o in n)return n[o];var s=t.apply(void 0,i);return n[o]=s,s}},B=function(t,e){if(!t)return e;var n="curve".concat(t.charAt(0).toUpperCase()+t.slice(1));return E[n]||e},N=function(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0},D=function(t){for(var e="",n="",r=0;r<t.length;r++)void 0!==t[r]&&(t[r].startsWith("color:")||t[r].startsWith("text-align:")?n=n+t[r]+";":e=e+t[r]+";");return{style:e,labelStyle:n}},L=0,I=function(){return L++,"id-"+Math.random().toString(36).substr(2,12)+"-"+L};var R=function(t){return function(t){for(var e="",n="0123456789abcdef".length,r=0;r<t;r++)e+="0123456789abcdef".charAt(Math.floor(Math.random()*n));return e}(t.length)},F=function t(e,n,r){var i=Object.assign({depth:2,clobber:!1},r),a=i.depth,o=i.clobber;return Array.isArray(n)&&!Array.isArray(e)?(n.forEach((function(n){return t(e,n,r)})),e):Array.isArray(n)&&Array.isArray(e)?(n.forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),e):void 0===e||a<=0?null!=e&&"object"===k(e)&&"object"===k(n)?Object.assign(e,n):n:(void 0!==n&&"object"===k(e)&&"object"===k(n)&&Object.keys(n).forEach((function(r){"object"!==k(n[r])||void 0!==e[r]&&"object"!==k(e[r])?(o||"object"!==k(e[r])&&"object"!==k(n[r]))&&(e[r]=n[r]):(void 0===e[r]&&(e[r]=Array.isArray(n[r])?[]:{}),e[r]=t(e[r],n[r],{depth:a-1,clobber:o}))})),e)},P=function(t,e){var n=e.text.replace(x.lineBreakRegex," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.style("text-anchor",e.anchor),r.style("font-family",e.fontFamily),r.style("font-size",e.fontSize),r.style("font-weight",e.fontWeight),r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.attr("fill",e.fill),i.text(n),r},j=O((function(t,e,n){if(!t)return t;if(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},n),x.lineBreakRegex.test(t))return t;var r=t.split(" "),i=[],a="";return r.forEach((function(t,o){var s=z("".concat(t," "),n),c=z(a,n);if(s>e){var u=Y(t,e,"-",n),l=u.hyphenatedStrings,h=u.remainingWord;i.push.apply(i,[a].concat(w(l))),a=h}else c+s>=e?(i.push(a),a=t):a=[a,t].filter(Boolean).join(" ");o+1===r.length&&i.push(a)})),i.filter((function(t){return""!==t})).join(n.joinWith)}),(function(t,e,n){return"".concat(t,"-").concat(e,"-").concat(n.fontSize,"-").concat(n.fontWeight,"-").concat(n.fontFamily,"-").concat(n.joinWith)})),Y=O((function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);var i=t.split(""),a=[],o="";return i.forEach((function(t,s){var c="".concat(o).concat(t);if(z(c,r)>=e){var u=s+1,l=i.length===u,h="".concat(c).concat(n);a.push(l?c:h),o=""}else o=c})),{hyphenatedStrings:a,remainingWord:o}}),(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;return"".concat(t,"-").concat(e,"-").concat(n,"-").concat(r.fontSize,"-").concat(r.fontWeight,"-").concat(r.fontFamily)})),z=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),U(t,e).width},U=O((function(t,e){var n=e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),r=n.fontSize,i=n.fontFamily,a=n.fontWeight;if(!t)return{width:0,height:0};var o=["sans-serif",i],s=t.split(x.lineBreakRegex),c=[],u=Object(h.select)("body");if(!u.remove)return{width:0,height:0,lineHeight:0};for(var l=u.append("svg"),f=0,d=o;f<d.length;f++){var p=d[f],y=0,g={width:0,height:0,lineHeight:0},v=!0,m=!1,b=void 0;try{for(var _,k=s[Symbol.iterator]();!(v=(_=k.next()).done);v=!0){var w=_.value,E={x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0};E.text=w;var T=P(l,E).style("font-size",r).style("font-weight",a).style("font-family",p),C=(T._groups||T)[0][0].getBBox();g.width=Math.round(Math.max(g.width,C.width)),y=Math.round(C.height),g.height+=y,g.lineHeight=Math.round(Math.max(g.lineHeight,y))}}catch(t){m=!0,b=t}finally{try{v||null==k.return||k.return()}finally{if(m)throw b}}c.push(g)}return l.remove(),c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]}),(function(t,e){return"".concat(t,"-").concat(e.fontSize,"-").concat(e.fontWeight,"-").concat(e.fontFamily)})),$=function(t,e,n){var r=new Map;return r.set("height",t),n?(r.set("width","100%"),r.set("style","max-width: ".concat(e,"px;"))):r.set("width",e),r},q=function(t,e,n,r){!function(t,e){var n=!0,r=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;t.attr(s[0],s[1])}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}}(t,$(e,n,r))},W={assignWithDepth:F,wrapLabel:j,calculateTextHeight:function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),U(t,e).height},calculateTextWidth:z,calculateTextDimensions:U,calculateSvgSizeAttrs:$,configureSvgSize:q,detectInit:function(t,e){var n=A(t,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){var i=n.map((function(t){return t.args}));r=F(r,w(i))}else r=n.args;if(r){var a=M(t,e);["config"].forEach((function(t){void 0!==r[t]&&("flowchart-v2"===a&&(a="flowchart"),r[a]=r[t],delete r[t])}))}return r},detectDirective:A,detectType:M,isSubstringInArray:function(t,e){for(var n=0;n<e.length;n++)if(e[n].match(t))return n;return-1},interpolateToCurve:B,calcLabelPosition:function(t){return function(t){var e,n=0;t.forEach((function(t){n+=N(t,e),e=t}));var r=n/2,i=void 0;return e=void 0,t.forEach((function(t){if(e&&!i){var n=N(t,e);if(n<r)r-=n;else{var a=r/n;a<=0&&(i=e),a>=1&&(i={x:t.x,y:t.y}),a>0&&a<1&&(i={x:(1-a)*e.x+a*t.x,y:(1-a)*e.y+a*t.y})}}e=t})),i}(t)},calcCardinalityPosition:function(t,e,n){var r;c.info("our points",e),e[0]!==n&&(e=e.reverse()),e.forEach((function(t){N(t,r),r=t}));var i,a=25;r=void 0,e.forEach((function(t){if(r&&!i){var e=N(t,r);if(e<a)a-=e;else{var n=a/e;n<=0&&(i=r),n>=1&&(i={x:t.x,y:t.y}),n>0&&n<1&&(i={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));var o=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),u={x:0,y:0};return u.x=Math.sin(s)*o+(e[0].x+i.x)/2,u.y=-Math.cos(s)*o+(e[0].y+i.y)/2,u},calcTerminalLabelPosition:function(t,e,n){var r,i=JSON.parse(JSON.stringify(n));c.info("our points",i),"start_left"!==e&&"start_right"!==e&&(i=i.reverse()),i.forEach((function(t){N(t,r),r=t}));var a,o=25;r=void 0,i.forEach((function(t){if(r&&!a){var e=N(t,r);if(e<o)o-=e;else{var n=o/e;n<=0&&(a=r),n>=1&&(a={x:t.x,y:t.y}),n>0&&n<1&&(a={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));var s=10,u=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return l.x=Math.sin(u)*s+(i[0].x+a.x)/2,l.y=-Math.cos(u)*s+(i[0].y+a.y)/2,"start_left"===e&&(l.x=Math.sin(u+Math.PI)*s+(i[0].x+a.x)/2,l.y=-Math.cos(u+Math.PI)*s+(i[0].y+a.y)/2),"end_right"===e&&(l.x=Math.sin(u-Math.PI)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(u-Math.PI)*s+(i[0].y+a.y)/2-5),"end_left"===e&&(l.x=Math.sin(u)*s+(i[0].x+a.x)/2-5,l.y=-Math.cos(u)*s+(i[0].y+a.y)/2-5),l},formatUrl:function(t,e){var n=t.trim();if(n)return"loose"!==e.securityLevel?Object(y.sanitizeUrl)(n):n},getStylesFromArray:D,generateId:I,random:R,memoize:O,runFunc:function(t){for(var e,n=t.split("."),r=n.length-1,i=n[r],a=window,o=0;o<r;o++)if(!(a=a[n[o]]))return;for(var s=arguments.length,c=new Array(s>1?s-1:0),u=1;u<s;u++)c[u-1]=arguments[u];(e=a)[i].apply(e,c)},initIdGeneratior:function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.deterministic=e,this.seed=n,this.count=n?n.length:0}var e,n,r;return e=t,(n=[{key:"next",value:function(){return this.deterministic?this.count++:Date.now()}}])&&_(e.prototype,n),r&&_(e,r),t}()},V=n(1),H=function(t,e){return e?Object(V.adjust)(t,{s:-40,l:10}):Object(V.adjust)(t,{s:-40,l:-10})};function G(t){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function X(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Z=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.darkMode=!1,this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#ddd":"#333"),this.secondaryColor=this.secondaryColor||Object(V.adjust)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Object(V.adjust)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||H(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||H(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||H(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Object(V.invert)(this.tertiaryColor),this.lineColor=this.lineColor||Object(V.invert)(this.background),this.textColor=this.textColor||this.primaryTextColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Object(V.darken)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Object(V.darken)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Object(V.invert)(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Object(V.lighten)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Object(V.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Object(V.adjust)(this.primaryColor,{l:-10}),this.pie5=this.pie5||Object(V.adjust)(this.secondaryColor,{l:-10}),this.pie6=this.pie6||Object(V.adjust)(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||Object(V.adjust)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Object(V.adjust)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Object(V.adjust)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Object(V.adjust)(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||Object(V.adjust)(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||Object(V.adjust)(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Object(V.darken)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===G(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&X(e.prototype,n),r&&X(e,r),t}();function Q(t){return(Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function K(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var J=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Object(V.lighten)(this.primaryColor,16),this.tertiaryColor=Object(V.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=H(this.primaryColor,this.darkMode),this.secondaryBorderColor=H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=H(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(V.invert)(this.primaryColor),this.secondaryTextColor=Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=Object(V.invert)(this.tertiaryColor),this.lineColor=Object(V.invert)(this.background),this.textColor=Object(V.invert)(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Object(V.lighten)(Object(V.invert)("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=Object(V.rgba)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Object(V.darken)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=Object(V.rgba)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Object(V.rgba)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){this.secondBkg=Object(V.lighten)(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=Object(V.lighten)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=Object(V.lighten)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(V.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||"#0b0000",this.pie2=this.pie2||"#4d1037",this.pie3=this.pie3||"#3f5258",this.pie4=this.pie4||"#4f2f1b",this.pie5=this.pie5||"#6e0a0a",this.pie6=this.pie6||"#3b0048",this.pie7=this.pie7||"#995a01",this.pie8=this.pie8||"#154706",this.pie9=this.pie9||"#161722",this.pie10=this.pie10||"#00296f",this.pie11=this.pie11||"#01629c",this.pie12=this.pie12||"#010029",this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?Object(V.darken)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===Q(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&K(e.prototype,n),r&&K(e,r),t}();function tt(t){return(tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function et(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var nt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Object(V.adjust)(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Object(V.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=H(this.primaryColor,this.darkMode),this.secondaryBorderColor=H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=H(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(V.invert)(this.primaryColor),this.secondaryTextColor=Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=Object(V.invert)(this.tertiaryColor),this.lineColor=Object(V.invert)(this.background),this.textColor=Object(V.invert)(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=Object(V.rgba)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=Object(V.lighten)(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(V.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||Object(V.adjust)(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||Object(V.adjust)(this.primaryColor,{l:-10}),this.pie5=this.pie5||Object(V.adjust)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Object(V.adjust)(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||Object(V.adjust)(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||Object(V.adjust)(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||Object(V.adjust)(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||Object(V.adjust)(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||Object(V.adjust)(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||Object(V.adjust)(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===tt(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&et(e.prototype,n),r&&et(e,r),t}();function rt(t){return(rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function it(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var at=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=Object(V.lighten)("#cde498",10),this.primaryBorderColor=H(this.primaryColor,this.darkMode),this.secondaryBorderColor=H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=H(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(V.invert)(this.primaryColor),this.secondaryTextColor=Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=Object(V.invert)(this.primaryColor),this.lineColor=Object(V.invert)(this.background),this.textColor=Object(V.invert)(this.background),this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=Object(V.darken)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(V.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||Object(V.adjust)(this.primaryColor,{l:-30}),this.pie5=this.pie5||Object(V.adjust)(this.secondaryColor,{l:-30}),this.pie6=this.pie6||Object(V.adjust)(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||Object(V.adjust)(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||Object(V.adjust)(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||Object(V.adjust)(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||Object(V.adjust)(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||Object(V.adjust)(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||Object(V.adjust)(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===rt(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&it(e.prototype,n),r&&it(e,r),t}();function ot(t){return(ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function st(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var ct=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Object(V.lighten)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Object(V.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=H(this.primaryColor,this.darkMode),this.secondaryBorderColor=H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=H(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(V.invert)(this.primaryColor),this.secondaryTextColor=Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=Object(V.invert)(this.tertiaryColor),this.lineColor=Object(V.invert)(this.background),this.textColor=Object(V.invert)(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){this.secondBkg=Object(V.lighten)(this.contrast,55),this.border2=this.contrast,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=Object(V.lighten)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.sectionBkgColor=Object(V.lighten)(this.contrast,30),this.sectionBkgColor2=Object(V.lighten)(this.contrast,30),this.taskBorderColor=Object(V.darken)(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=Object(V.lighten)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Object(V.darken)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(V.adjust)(this.secondaryColor,{h:128}),this.pie1=this.pie1||"#F4F4F4",this.pie2=this.pie2||"#555",this.pie3=this.pie3||"#BBB",this.pie4=this.pie4||"#777",this.pie5=this.pie5||"#999",this.pie6=this.pie6||"#DDD",this.pie7=this.pie7||"#FFF",this.pie8=this.pie8||"#DDD",this.pie9=this.pie9||"#BBB",this.pie10=this.pie10||"#999",this.pie11=this.pie11||"#777",this.pie12=this.pie12||"#555",this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===ot(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&st(e.prototype,n),r&&st(e,r),t}(),ut={base:{getThemeVariables:function(t){var e=new Z;return e.calculate(t),e}},dark:{getThemeVariables:function(t){var e=new J;return e.calculate(t),e}},default:{getThemeVariables:function(t){var e=new nt;return e.calculate(t),e}},forest:{getThemeVariables:function(t){var e=new at;return e.calculate(t),e}},neutral:{getThemeVariables:function(t){var e=new ct;return e.calculate(t),e}}},lt={theme:"default",themeVariables:ut.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-d3"},sequence:{activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open-Sans", "sans-serif"',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open-Sans", "sans-serif"',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{arrowMarkerAbsolute:!1,useMaxWidth:!0,defaultRenderer:"dagre-d3"},git:{arrowMarkerAbsolute:!1,useWidth:void 0,useMaxWidth:!0},state:{dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,useMaxWidth:!0,defaultRenderer:"dagre-d3"},er:{diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20}};lt.class.arrowMarkerAbsolute=lt.arrowMarkerAbsolute,lt.git.arrowMarkerAbsolute=lt.arrowMarkerAbsolute;var ht=lt;function ft(t){return(ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var dt,pt=Object.freeze(ht),yt=F({},pt),gt=[],vt=F({},pt),mt=function(t,e){for(var n=F({},t),r={},i=0;i<e.length;i++){var a=e[i];_t(a),r=F(r,a)}if(n=F(n,r),r.theme){var o=F({},dt),s=F(o.themeVariables||{},r.themeVariables);n.themeVariables=ut[n.theme].getThemeVariables(s)}return vt=n,n},bt=function(){return F({},yt)},xt=function(){return F({},vt)},_t=function t(e){Object.keys(yt.secure).forEach((function(t){void 0!==e[yt.secure[t]]&&(c.debug("Denied attempt to modify a secure key ".concat(yt.secure[t]),e[yt.secure[t]]),delete e[yt.secure[t]])})),Object.keys(e).forEach((function(t){0===t.indexOf("__")&&delete e[t]})),Object.keys(e).forEach((function(n){"string"==typeof e[n]&&(e[n].indexOf("<")>-1||e[n].indexOf(">")>-1||e[n].indexOf("url(data:")>-1)&&delete e[n],"object"===ft(e[n])&&t(e[n])}))},kt=function(t){t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),gt.push(t),mt(yt,gt)},wt=function(){mt(yt,gt=[])};function Et(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Tt=[],Ct={},St=0,At=[],Mt=function(t){var e="",n=t;if(t.indexOf("~")>0){var r=t.split("~");n=r[0],e=r[1]}return{className:n,type:e}},Ot=function(t){var e=Mt(t);void 0===Ct[e.className]&&(Ct[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:"classid-"+e.className+"-"+St},St++)},Bt=function(t){for(var e=Object.keys(Ct),n=0;n<e.length;n++)if(Ct[e[n]].id===t)return Ct[e[n]].domId},Nt=function(t,e){var n=Mt(t).className,r=Ct[n];if("string"==typeof e){var i=e.trim();i.startsWith("<<")&&i.endsWith(">>")?r.annotations.push(i.substring(2,i.length-2)):i.indexOf(")")>0?r.methods.push(i):i&&r.members.push(i)}},Dt=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n="classid-"+n),void 0!==Ct[n]&&Ct[n].cssClasses.push(e)}))},Lt=function(t,e,n){var r=xt(),i=t,a=Bt(i);if("loose"===r.securityLevel&&void 0!==e&&void 0!==Ct[i]){var o=[];if("string"==typeof n){o=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var s=0;s<o.length;s++){var c=o[s].trim();'"'===c.charAt(0)&&'"'===c.charAt(c.length-1)&&(c=c.substr(1,c.length-2)),o[s]=c}}0===o.length&&o.push(a),At.push((function(){var t=document.querySelector('[id="'.concat(a,'"]'));null!==t&&t.addEventListener("click",(function(){W.runFunc.apply(W,[e].concat(Et(o)))}),!1)}))}},It={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},Rt=function(t){var e=Object(h.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(h.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(h.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(h.select)(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(h.select)(this).classed("hover",!1)}))};At.push(Rt);var Ft={parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().class},addClass:Ot,bindFunctions:function(t){At.forEach((function(e){e(t)}))},clear:function(){Tt=[],Ct={},(At=[]).push(Rt)},getClass:function(t){return Ct[t]},getClasses:function(){return Ct},addAnnotation:function(t,e){var n=Mt(t).className;Ct[n].annotations.push(e)},getRelations:function(){return Tt},addRelation:function(t){c.debug("Adding relation: "+JSON.stringify(t)),Ot(t.id1),Ot(t.id2),t.id1=Mt(t.id1).className,t.id2=Mt(t.id2).className,Tt.push(t)},addMember:Nt,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((function(e){return Nt(t,e)})))},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(1).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:It,setClickEvent:function(t,e,n){t.split(",").forEach((function(t){Lt(t,e,n),Ct[t].haveCallback=!0})),Dt(t,"clickable")},setCssClass:Dt,setLink:function(t,e,n){var r=xt();t.split(",").forEach((function(t){var i=t;t[0].match(/\d/)&&(i="classid-"+i),void 0!==Ct[i]&&(Ct[i].link=W.formatUrl(e,r),Ct[i].linkTarget="string"==typeof n?n:"_blank")})),Dt(t,"clickable")},setTooltip:function(t,e){var n=xt();t.split(",").forEach((function(t){void 0!==e&&(Ct[t].tooltip=x.sanitizeText(e,n))}))},lookUpDomId:Bt},Pt=n(9),jt=n.n(Pt),Yt=n(3),zt=n.n(Yt),Ut=n(15),$t=n.n(Ut),qt=0,Wt=function(t){var e=t.match(/(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+)/),n=t.match(/^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/);return e&&!n?Vt(e):n?Ht(n):Gt(t)},Vt=function(t){var e="";try{e=(t[1]?t[1].trim():"")+(t[2]?t[2].trim():"")+(t[3]?Zt(t[3].trim()):"")+" "+(t[4]?t[4].trim():"")}catch(n){e=t}return{displayText:e,cssStyle:""}},Ht=function(t){var e="",n="";try{var r=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",a=t[3]?Zt(t[3].trim()):"",o=t[4]?t[4].trim():"";n=r+i+"("+a+")"+(t[5]?" : "+Zt(t[5]).trim():""),e=Qt(o)}catch(e){n=t}return{displayText:n,cssStyle:e}},Gt=function(t){var e="",n="",r="",i=t.indexOf("("),a=t.indexOf(")");if(i>1&&a>i&&a<=t.length){var o="",s="",c=t.substring(0,1);c.match(/\w/)?s=t.substring(0,i).trim():(c.match(/\+|-|~|#/)&&(o=c),s=t.substring(1,i).trim());var u=t.substring(i+1,a),l=t.substring(a+1,1);n=Qt(l),e=o+s+"("+Zt(u.trim())+")",a<"".length&&""!==(r=t.substring(a+2).trim())&&(r=" : "+Zt(r))}else e=Zt(t);return{displayText:e,cssStyle:n}},Xt=function(t,e,n,r){var i=Wt(e),a=t.append("tspan").attr("x",r.padding).text(i.displayText);""!==i.cssStyle&&a.attr("style",i.cssStyle),n||a.attr("dy",r.textHeight)},Zt=function t(e){var n=e;return-1!=e.indexOf("~")?t(n=(n=n.replace("~","<")).replace("~",">")):n},Qt=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},Kt=function(t,e,n){c.info("Rendering class "+e);var r,i=e.id,a={id:i,label:e.id,width:0,height:0},o=t.append("g").attr("id",Bt(i)).attr("class","classGroup");r=e.link?o.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",n.textHeight+n.padding).attr("x",0):o.append("text").attr("y",n.textHeight+n.padding).attr("x",0);var s=!0;e.annotations.forEach((function(t){var e=r.append("tspan").text("«"+t+"»");s||e.attr("dy",n.textHeight),s=!1}));var u=e.id;void 0!==e.type&&""!==e.type&&(u+="<"+e.type+">");var l=r.append("tspan").text(u).attr("class","title");s||l.attr("dy",n.textHeight);var h=r.node().getBBox().height,f=o.append("line").attr("x1",0).attr("y1",n.padding+h+n.dividerMargin/2).attr("y2",n.padding+h+n.dividerMargin/2),d=o.append("text").attr("x",n.padding).attr("y",h+n.dividerMargin+n.textHeight).attr("fill","white").attr("class","classText");s=!0,e.members.forEach((function(t){Xt(d,t,s,n),s=!1}));var p=d.node().getBBox(),y=o.append("line").attr("x1",0).attr("y1",n.padding+h+n.dividerMargin+p.height).attr("y2",n.padding+h+n.dividerMargin+p.height),g=o.append("text").attr("x",n.padding).attr("y",h+2*n.dividerMargin+p.height+n.textHeight).attr("fill","white").attr("class","classText");s=!0,e.methods.forEach((function(t){Xt(g,t,s,n),s=!1}));var v=o.node().getBBox(),m=" ";e.cssClasses.length>0&&(m+=e.cssClasses.join(" "));var b=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",v.width+2*n.padding).attr("height",v.height+n.padding+.5*n.dividerMargin).attr("class",m).node().getBBox().width;return r.node().childNodes.forEach((function(t){t.setAttribute("x",(b-t.getBBox().width)/2)})),e.tooltip&&r.insert("title").text(e.tooltip),f.attr("x2",b),y.attr("x2",b),a.width=b,a.height=v.height+n.padding+.5*n.dividerMargin,a},Jt=function(t,e,n,r){var i=function(t){switch(t){case It.AGGREGATION:return"aggregation";case It.EXTENSION:return"extension";case It.COMPOSITION:return"composition";case It.DEPENDENCY:return"dependency"}};e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var a,o,s=e.points,u=Object(h.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(h.curveBasis),l=t.append("path").attr("d",u(s)).attr("id","edge"+qt).attr("class","relation"),f="";r.arrowMarkerAbsolute&&(f=(f=(f=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),1==n.relation.lineType&&l.attr("class","relation dashed-line"),"none"!==n.relation.type1&&l.attr("marker-start","url("+f+"#"+i(n.relation.type1)+"Start)"),"none"!==n.relation.type2&&l.attr("marker-end","url("+f+"#"+i(n.relation.type2)+"End)");var d,p,y,g,v=e.points.length,m=W.calcLabelPosition(e.points);if(a=m.x,o=m.y,v%2!=0&&v>1){var b=W.calcCardinalityPosition("none"!==n.relation.type1,e.points,e.points[0]),x=W.calcCardinalityPosition("none"!==n.relation.type2,e.points,e.points[v-1]);c.debug("cardinality_1_point "+JSON.stringify(b)),c.debug("cardinality_2_point "+JSON.stringify(x)),d=b.x,p=b.y,y=x.x,g=x.y}if(void 0!==n.title){var _=t.append("g").attr("class","classLabel"),k=_.append("text").attr("class","label").attr("x",a).attr("y",o).attr("fill","red").attr("text-anchor","middle").text(n.title);window.label=k;var w=k.node().getBBox();_.insert("rect",":first-child").attr("class","box").attr("x",w.x-r.padding/2).attr("y",w.y-r.padding/2).attr("width",w.width+r.padding).attr("height",w.height+r.padding)}(c.info("Rendering relation "+JSON.stringify(n)),void 0!==n.relationTitle1&&"none"!==n.relationTitle1)&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",d).attr("y",p).attr("fill","black").attr("font-size","6").text(n.relationTitle1);void 0!==n.relationTitle2&&"none"!==n.relationTitle2&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",y).attr("y",g).attr("fill","black").attr("font-size","6").text(n.relationTitle2);qt++};Ut.parser.yy=Ft;var te={},ee={dividerMargin:10,padding:5,textHeight:10},ne=function(t){for(var e=Object.keys(te),n=0;n<e.length;n++)if(te[e[n]].label===t)return e[n]},re=function(t){Object.keys(t).forEach((function(e){ee[e]=t[e]}))},ie=function(t,e){te={},Ut.parser.yy.clear(),Ut.parser.parse(t),c.info("Rendering diagram "+t);var n,r=Object(h.select)("[id='".concat(e,"']"));r.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),(n=r).append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),n.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),n.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");var i=new zt.a.Graph({multigraph:!0});i.setGraph({isMultiGraph:!0}),i.setDefaultEdgeLabel((function(){return{}}));for(var a=Ft.getClasses(),o=Object.keys(a),s=0;s<o.length;s++){var u=a[o[s]],l=Kt(r,u,ee);te[l.id]=l,i.setNode(l.id,l),c.info("Org height: "+l.height)}Ft.getRelations().forEach((function(t){c.info("tjoho"+ne(t.id1)+ne(t.id2)+JSON.stringify(t)),i.setEdge(ne(t.id1),ne(t.id2),{relation:t},t.title||"DEFAULT")})),jt.a.layout(i),i.nodes().forEach((function(t){void 0!==t&&void 0!==i.node(t)&&(c.debug("Node "+t+": "+JSON.stringify(i.node(t))),Object(h.select)("#"+Bt(t)).attr("transform","translate("+(i.node(t).x-i.node(t).width/2)+","+(i.node(t).y-i.node(t).height/2)+" )"))})),i.edges().forEach((function(t){void 0!==t&&void 0!==i.edge(t)&&(c.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(i.edge(t))),Jt(r,i.edge(t),i.edge(t).relation,ee))}));var f=r.node().getBBox(),d=f.width+40,p=f.height+40;q(r,p,d,ee.useMaxWidth);var y="".concat(f.x-20," ").concat(f.y-20," ").concat(d," ").concat(p);c.debug("viewBox ".concat(y)),r.attr("viewBox",y)},ae={extension:function(t,e,n){c.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:function(t,e){t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:function(t,e){t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:function(t,e){t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},point:function(t,e){t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:function(t,e){t.append("marker").attr("id",e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:function(t,e){t.append("marker").attr("id",e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:function(t,e){t.append("defs").append("marker").attr("id",e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}},oe=function(t,e,n,r){e.forEach((function(e){ae[e](t,n,r)}))};function se(t){return(se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var ce=function(t,e,n,r){var i=t||"";if("object"===se(i)&&(i=i[0]),xt().flowchart.htmlLabels)return i=i.replace(/\\n|\n/g,"<br />"),c.info("vertexText"+i),function(t){var e,n,r=Object(h.select)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),i=r.append("xhtml:div"),a=t.label,o=t.isNode?"nodeLabel":"edgeLabel";return i.html('<span class="'+o+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+a+"</span>"),e=i,(n=t.labelStyle)&&e.attr("style",n),i.style("display","inline-block"),i.style("white-space","nowrap"),i.attr("xmlns","http://www.w3.org/1999/xhtml"),r.node()}({isNode:r,label:i.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")})),labelStyle:e.replace("fill:","color:")});var a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));var o=[];o="string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[];for(var s=0;s<o.length;s++){var u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),n?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=o[s].trim(),a.appendChild(u)}return a},ue=function(t,e,n,r){var i;i=n||"node default";var a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=a.insert("g").attr("class","label").attr("style",e.labelStyle),s=o.node().appendChild(ce(e.labelText,e.labelStyle,!1,r)),c=s.getBBox();if(xt().flowchart.htmlLabels){var u=s.children[0],l=Object(h.select)(s);c=u.getBoundingClientRect(),l.attr("width",c.width),l.attr("height",c.height)}var f=e.padding/2;return o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),{shapeSvg:a,bbox:c,halfPadding:f,label:o}},le=function(t,e){var n=e.node().getBBox();t.width=n.width,t.height=n.height};function he(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}var fe={},de={},pe={},ye=function(t,e){return c.trace("In isDecendant",e," ",t," = ",de[e].indexOf(t)>=0),de[e].indexOf(t)>=0},ge=function t(e,n,r,i){c.warn("Copying children of ",e,"root",i,"data",n.node(e),i);var a=n.children(e)||[];e!==i&&a.push(e),c.warn("Copying (nodes) clusterId",e,"nodes",a),a.forEach((function(a){if(n.children(a).length>0)t(a,n,r,i);else{var o=n.node(a);c.info("cp ",a," to ",i," with parent ",e),r.setNode(a,o),i!==n.parent(a)&&(c.warn("Setting parent",a,n.parent(a)),r.setParent(a,n.parent(a))),e!==i&&a!==e?(c.debug("Setting parent",a,e),r.setParent(a,e)):(c.info("In copy ",e,"root",i,"data",n.node(e),i),c.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));var s=n.edges(a);c.debug("Copying Edges",s),s.forEach((function(t){c.info("Edge",t);var a=n.edge(t.v,t.w,t.name);c.info("Edge data",a,i);try{!function(t,e){return c.info("Decendants of ",e," is ",de[e]),c.info("Edge is ",t),t.v!==e&&(t.w!==e&&(de[e]?(c.info("Here "),de[e].indexOf(t.v)>=0||(!!ye(t.v,e)||(!!ye(t.w,e)||de[e].indexOf(t.w)>=0))):(c.debug("Tilt, ",e,",not in decendants"),!1)))}(t,i)?c.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",i," clusterId:",e):(c.info("Copying as ",t.v,t.w,a,t.name),r.setEdge(t.v,t.w,a,t.name),c.info("newGraph edges ",r.edges(),r.edge(r.edges()[0])))}catch(t){c.error(t)}}))}c.debug("Removing node",a),n.removeNode(a)}))},ve=function t(e,n){c.trace("Searching",e);var r=n.children(e);if(c.trace("Searching children of id ",e,r),r.length<1)return c.trace("This is a valid node",e),e;for(var i=0;i<r.length;i++){var a=t(r[i],n);if(a)return c.trace("Found replacement for",e," => ",a),a}},me=function(t){return fe[t]&&fe[t].externalConnections&&fe[t]?fe[t].id:t},be=function(t,e){!t||e>10?c.debug("Opting out, no graph "):(c.debug("Opting in, graph "),t.nodes().forEach((function(e){t.children(e).length>0&&(c.warn("Cluster identified",e," Replacement id in edges: ",ve(e,t)),de[e]=function t(e,n){for(var r=n.children(e),i=[].concat(r),a=0;a<r.length;a++)pe[r[a]]=e,i=i.concat(t(r[a],n));return i}(e,t),fe[e]={id:ve(e,t),clusterData:t.node(e)})})),t.nodes().forEach((function(e){var n=t.children(e),r=t.edges();n.length>0?(c.debug("Cluster identified",e,de),r.forEach((function(t){t.v!==e&&t.w!==e&&(ye(t.v,e)^ye(t.w,e)&&(c.warn("Edge: ",t," leaves cluster ",e),c.warn("Decendants of XXX ",e,": ",de[e]),fe[e].externalConnections=!0))}))):c.debug("Not a cluster ",e,de)})),t.edges().forEach((function(e){var n=t.edge(e);c.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),c.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));var r=e.v,i=e.w;c.warn("Fix XXX",fe,"ids:",e.v,e.w,"Translateing: ",fe[e.v]," --- ",fe[e.w]),(fe[e.v]||fe[e.w])&&(c.warn("Fixing and trixing - removing XXX",e.v,e.w,e.name),r=me(e.v),i=me(e.w),t.removeEdge(e.v,e.w,e.name),r!==e.v&&(n.fromCluster=e.v),i!==e.w&&(n.toCluster=e.w),c.warn("Fix Replacing with XXX",r,i,e.name),t.setEdge(r,i,n,e.name))})),c.warn("Adjusted Graph",zt.a.json.write(t)),xe(t,0),c.trace(fe))},xe=function t(e,n){if(c.warn("extractor - ",n,zt.a.json.write(e),e.children("D")),n>10)c.error("Bailing out");else{for(var r=e.nodes(),i=!1,a=0;a<r.length;a++){var o=r[a],s=e.children(o);i=i||s.length>0}if(i){c.debug("Nodes = ",r,n);for(var u=0;u<r.length;u++){var l=r[u];if(c.debug("Extracting node",l,fe,fe[l]&&!fe[l].externalConnections,!e.parent(l),e.node(l),e.children("D")," Depth ",n),fe[l])if(!fe[l].externalConnections&&e.children(l)&&e.children(l).length>0){c.warn("Cluster without external connections, without a parent and with children",l,n);var h="TB"===e.graph().rankdir?"LR":"TB";fe[l]&&fe[l].clusterData&&fe[l].clusterData.dir&&(h=fe[l].clusterData.dir,c.warn("Fixing dir",fe[l].clusterData.dir,h));var f=new zt.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:h,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));c.warn("Old graph before copy",zt.a.json.write(e)),ge(l,e,f,l),e.setNode(l,{clusterNode:!0,id:l,clusterData:fe[l].clusterData,labelText:fe[l].labelText,graph:f}),c.warn("New graph after copy node: (",l,")",zt.a.json.write(f)),c.debug("Old graph after copy",zt.a.json.write(e))}else c.warn("Cluster ** ",l," **not meeting the criteria !externalConnections:",!fe[l].externalConnections," no parent: ",!e.parent(l)," children ",e.children(l)&&e.children(l).length>0,e.children("D"),n),c.debug(fe);else c.debug("Not a cluster",l,n)}r=e.nodes(),c.warn("New list of nodes",r);for(var d=0;d<r.length;d++){var p=r[d],y=e.node(p);c.warn(" Now next level",p,y),y.clusterNode&&t(y.graph,n+1)}}else c.debug("Done, no node has children",e.nodes())}},_e=function(t){return function t(e,n){if(0===n.length)return[];var r=Object.assign(n);return n.forEach((function(n){var i=e.children(n),a=t(e,i);r=r.concat(a)})),r}(t,t.children())},ke=n(171);var we=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),u=Math.abs(e*n*o/c);r.x<i&&(u=-u);var l=Math.abs(e*n*s/c);return r.y<a&&(l=-l),{x:i+u,y:a+l}};var Ee=function(t,e,n){return we(t,e,e,n)};function Te(t,e){return t*e>0}var Ce=function(t,e,n,r){var i,a,o,s,c,u,l,h,f,d,p,y,g;if(i=e.y-t.y,o=t.x-e.x,c=e.x*t.y-t.x*e.y,f=i*n.x+o*n.y+c,d=i*r.x+o*r.y+c,!(0!==f&&0!==d&&Te(f,d)||(a=r.y-n.y,s=n.x-r.x,u=r.x*n.y-n.x*r.y,l=a*t.x+s*t.y+u,h=a*e.x+s*e.y+u,0!==l&&0!==h&&Te(l,h)||0==(p=i*s-a*o))))return y=Math.abs(p/2),{x:(g=o*u-s*c)<0?(g-y)/p:(g+y)/p,y:(g=a*c-i*u)<0?(g-y)/p:(g+y)/p}},Se=function(t,e,n){var r=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)})):(o=Math.min(o,e.x),s=Math.min(s,e.y));for(var c=r-t.width/2-o,u=i-t.height/2-s,l=0;l<e.length;l++){var h=e[l],f=e[l<e.length-1?l+1:0],d=Ce(t,n,{x:c+h.x,y:u+h.y},{x:c+f.x,y:u+f.y});d&&a.push(d)}if(!a.length)return t;a.length>1&&a.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}));return a[0]};var Ae=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;return Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=0===s?0:u*o/s,r=u):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o),{x:i+n,y:a+r}},Me={node:n.n(ke).a,circle:Ee,ellipse:we,polygon:Se,rect:Ae};function Oe(t){return(Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Be=function(t,e,n){var r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,a=10;"LR"===n&&(i=10,a=70);var o=r.append("rect").style("stroke","black").style("fill","black").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return le(e,o),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Me.rect(e,t)},r},Ne={question:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding+(i.height+e.padding),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];c.info("Question main (Circle)");var s=he(r,a,a,o);return s.attr("style",e.style),le(e,s),e.intersect=function(t){return c.warn("Intersect called"),Me.polygon(e,o,t)},r},rect:function(t,e){var n=ue(t,e,"node "+e.classes,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;c.trace("Classes = ",e.classes);var o=r.insert("rect",":first-child");return o.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),le(e,o),e.intersect=function(t){return Me.rect(e,t)},r},rectWithTitle:function(t,e){var n;n=e.classes?"node "+e.classes:"node default";var r=t.insert("g").attr("class",n).attr("id",e.domId||e.id),i=r.insert("rect",":first-child"),a=r.insert("line"),o=r.insert("g").attr("class","label"),s=e.labelText.flat?e.labelText.flat():e.labelText,u="";u="object"===Oe(s)?s[0]:s,c.info("Label text abc79",u,s,"object"===Oe(s));var l,f=o.node().appendChild(ce(u,e.labelStyle,!0,!0));if(xt().flowchart.htmlLabels){var d=f.children[0],p=Object(h.select)(f);l=d.getBoundingClientRect(),p.attr("width",l.width),p.attr("height",l.height)}c.info("Text 2",s);var y=s.slice(1,s.length),g=f.getBBox(),v=o.node().appendChild(ce(y.join?y.join("<br/>"):y,e.labelStyle,!0,!0));if(xt().flowchart.htmlLabels){var m=v.children[0],b=Object(h.select)(v);l=m.getBoundingClientRect(),b.attr("width",l.width),b.attr("height",l.height)}var x=e.padding/2;return Object(h.select)(v).attr("transform","translate( "+(l.width>g.width?0:(g.width-l.width)/2)+", "+(g.height+x+5)+")"),Object(h.select)(f).attr("transform","translate( "+(l.width<g.width?0:-(g.width-l.width)/2)+", 0)"),l=o.node().getBBox(),o.attr("transform","translate("+-l.width/2+", "+(-l.height/2-x+3)+")"),i.attr("class","outer title-state").attr("x",-l.width/2-x).attr("y",-l.height/2-x).attr("width",l.width+e.padding).attr("height",l.height+e.padding),a.attr("class","divider").attr("x1",-l.width/2-x).attr("x2",l.width/2+x).attr("y1",-l.height/2-x+g.height+x).attr("y2",-l.height/2-x+g.height+x),le(e,i),e.intersect=function(t){return Me.rect(e,t)},r},choice:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}],i=n.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" "));return i.attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return Me.circle(e,14,t)},n},circle:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding,o=r.insert("circle",":first-child");return o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),c.info("Circle main"),le(e,o),e.intersect=function(t){return c.info("Circle intersect",e,i.width/2+a,t),Me.circle(e,i.width/2+a,t)},r},stadium:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.height+e.padding,o=i.width+a/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",a/2).attr("ry",a/2).attr("x",-o/2).attr("y",-a/2).attr("width",o).attr("height",a);return le(e,s),e.intersect=function(t){return Me.rect(e,t)},r},hexagon:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.height+e.padding,o=a/4,s=i.width+2*o+e.padding,c=[{x:o,y:0},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}],u=he(r,s,a,c);return u.attr("style",e.style),le(e,u),e.intersect=function(t){return Me.polygon(e,c,t)},r},rect_left_inv_arrow:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-o/2,y:0},{x:a,y:0},{x:a,y:-o},{x:-o/2,y:-o},{x:0,y:-o/2}];return he(r,a,o,s).attr("style",e.style),e.width=a+o,e.height=o,e.intersect=function(t){return Me.polygon(e,s,t)},r},lean_right:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-2*o/6,y:0},{x:a-o/6,y:0},{x:a+2*o/6,y:-o},{x:o/6,y:-o}],c=he(r,a,o,s);return c.attr("style",e.style),le(e,c),e.intersect=function(t){return Me.polygon(e,s,t)},r},lean_left:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:2*o/6,y:0},{x:a+o/6,y:0},{x:a-2*o/6,y:-o},{x:-o/6,y:-o}],c=he(r,a,o,s);return c.attr("style",e.style),le(e,c),e.intersect=function(t){return Me.polygon(e,s,t)},r},trapezoid:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-2*o/6,y:0},{x:a+2*o/6,y:0},{x:a-o/6,y:-o},{x:o/6,y:-o}],c=he(r,a,o,s);return c.attr("style",e.style),le(e,c),e.intersect=function(t){return Me.polygon(e,s,t)},r},inv_trapezoid:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:o/6,y:0},{x:a-o/6,y:0},{x:a+2*o/6,y:-o},{x:-2*o/6,y:-o}],c=he(r,a,o,s);return c.attr("style",e.style),le(e,c),e.intersect=function(t){return Me.polygon(e,s,t)},r},rect_right_inv_arrow:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:0,y:0},{x:a+o/2,y:0},{x:a,y:-o/2},{x:a+o/2,y:-o},{x:0,y:-o}],c=he(r,a,o,s);return c.attr("style",e.style),le(e,c),e.intersect=function(t){return Me.polygon(e,s,t)},r},cylinder:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=a/2,s=o/(2.5+a/50),c=i.height+s+e.padding,u="M 0,"+s+" a "+o+","+s+" 0,0,0 "+a+" 0 a "+o+","+s+" 0,0,0 "+-a+" 0 l 0,"+c+" a "+o+","+s+" 0,0,0 "+a+" 0 l 0,"+-c,l=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",u).attr("transform","translate("+-a/2+","+-(c/2+s)+")");return le(e,l),e.intersect=function(t){var n=Me.rect(e,t),r=n.x-e.x;if(0!=o&&(Math.abs(r)<e.width/2||Math.abs(r)==e.width/2&&Math.abs(n.y-e.y)>e.height/2-s)){var i=s*s*(1-r*r/(o*o));0!=i&&(i=Math.sqrt(i)),i=s-i,t.y-e.y>0&&(i=-i),n.y+=i}return n},r},start:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),le(e,r),e.intersect=function(t){return Me.circle(e,7,t)},n},end:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child"),i=n.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),le(e,i),e.intersect=function(t){return Me.circle(e,7,t)},n},note:function(t,e){var n=ue(t,e,"node "+e.classes,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;c.info("Classes = ",e.classes);var o=r.insert("rect",":first-child");return o.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),le(e,o),e.intersect=function(t){return Me.rect(e,t)},r},subroutine:function(t,e){var n=ue(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:0,y:0},{x:a,y:0},{x:a,y:-o},{x:0,y:-o},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-o},{x:-8,y:-o},{x:-8,y:0}],c=he(r,a,o,s);return c.attr("style",e.style),le(e,c),e.intersect=function(t){return Me.polygon(e,s,t)},r},fork:Be,join:Be,class_box:function(t,e){var n,r=e.padding/2;n=e.classes?"node "+e.classes:"node default";var i=t.insert("g").attr("class",n).attr("id",e.domId||e.id),a=i.insert("rect",":first-child"),o=i.insert("line"),s=i.insert("line"),c=0,u=4,l=i.insert("g").attr("class","label"),f=0,d=e.classData.annotations&&e.classData.annotations[0],p=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",y=l.node().appendChild(ce(p,e.labelStyle,!0,!0)),g=y.getBBox();if(xt().flowchart.htmlLabels){var v=y.children[0],m=Object(h.select)(y);g=v.getBoundingClientRect(),m.attr("width",g.width),m.attr("height",g.height)}e.classData.annotations[0]&&(u+=g.height+4,c+=g.width);var b=e.classData.id;void 0!==e.classData.type&&""!==e.classData.type&&(b+="<"+e.classData.type+">");var x=l.node().appendChild(ce(b,e.labelStyle,!0,!0));Object(h.select)(x).attr("class","classTitle");var _=x.getBBox();if(xt().flowchart.htmlLabels){var k=x.children[0],w=Object(h.select)(x);_=k.getBoundingClientRect(),w.attr("width",_.width),w.attr("height",_.height)}u+=_.height+4,_.width>c&&(c=_.width);var E=[];e.classData.members.forEach((function(t){var n=Wt(t).displayText,r=l.node().appendChild(ce(n,e.labelStyle,!0,!0)),i=r.getBBox();if(xt().flowchart.htmlLabels){var a=r.children[0],o=Object(h.select)(r);i=a.getBoundingClientRect(),o.attr("width",i.width),o.attr("height",i.height)}i.width>c&&(c=i.width),u+=i.height+4,E.push(r)})),u+=8;var T=[];if(e.classData.methods.forEach((function(t){var n=Wt(t).displayText,r=l.node().appendChild(ce(n,e.labelStyle,!0,!0)),i=r.getBBox();if(xt().flowchart.htmlLabels){var a=r.children[0],o=Object(h.select)(r);i=a.getBoundingClientRect(),o.attr("width",i.width),o.attr("height",i.height)}i.width>c&&(c=i.width),u+=i.height+4,T.push(r)})),u+=8,d){var C=(c-g.width)/2;Object(h.select)(y).attr("transform","translate( "+(-1*c/2+C)+", "+-1*u/2+")"),f=g.height+4}var S=(c-_.width)/2;return Object(h.select)(x).attr("transform","translate( "+(-1*c/2+S)+", "+(-1*u/2+f)+")"),f+=_.height+4,o.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-u/2-r+8+f).attr("y2",-u/2-r+8+f),f+=8,E.forEach((function(t){Object(h.select)(t).attr("transform","translate( "+-c/2+", "+(-1*u/2+f+4)+")"),f+=_.height+4})),f+=8,s.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-u/2-r+8+f).attr("y2",-u/2-r+8+f),f+=8,T.forEach((function(t){Object(h.select)(t).attr("transform","translate( "+-c/2+", "+(-1*u/2+f)+")"),f+=_.height+4})),a.attr("class","outer title-state").attr("x",-c/2-r).attr("y",-u/2-r).attr("width",c+e.padding).attr("height",u+e.padding),le(e,a),e.intersect=function(t){return Me.rect(e,t)},i}},De={},Le=function(t){var e=De[t.id];c.trace("Transforming node",t,"translate("+(t.x-t.width/2-5)+", "+(t.y-t.height/2-5)+")");t.clusterNode?e.attr("transform","translate("+(t.x-t.width/2-8)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")")},Ie={rect:function(t,e){c.trace("Creating subgraph rect for ",e.id,e);var n=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),a=i.node().appendChild(ce(e.labelText,e.labelStyle,void 0,!0)),o=a.getBBox();if(xt().flowchart.htmlLabels){var s=a.children[0],u=Object(h.select)(a);o=s.getBoundingClientRect(),u.attr("width",o.width),u.attr("height",o.height)}var l=0*e.padding,f=l/2;c.trace("Data ",e,JSON.stringify(e)),r.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-f).attr("y",e.y-e.height/2-f).attr("width",e.width+l).attr("height",e.height+l),i.attr("transform","translate("+(e.x-o.width/2)+", "+(e.y-e.height/2+e.padding/3)+")");var d=r.node().getBBox();return e.width=d.width,e.height=d.height,e.intersect=function(t){return Ae(e,t)},n},roundedWithTitle:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),a=n.append("rect"),o=i.node().appendChild(ce(e.labelText,e.labelStyle,void 0,!0)),s=o.getBBox();if(xt().flowchart.htmlLabels){var c=o.children[0],u=Object(h.select)(o);s=c.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}s=o.getBBox();var l=0*e.padding,f=l/2,d=e.width>s.width?e.width:s.width+e.padding;r.attr("class","outer").attr("x",e.x-d/2-f).attr("y",e.y-e.height/2-f).attr("width",d+l).attr("height",e.height+l),a.attr("class","inner").attr("x",e.x-d/2-f).attr("y",e.y-e.height/2-f+s.height-1).attr("width",d+l).attr("height",e.height+l-s.height-3),i.attr("transform","translate("+(e.x-s.width/2)+", "+(e.y-e.height/2-e.padding/3+(xt().flowchart.htmlLabels?5:3))+")");var p=r.node().getBBox();return e.width=p.width,e.height=p.height,e.intersect=function(t){return Ae(e,t)},n},noteGroup:function(t,e){var n=t.insert("g").attr("class","note-cluster").attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return Ae(e,t)},n},divider:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("class","divider").attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2).attr("width",e.width+i).attr("height",e.height+i);var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return Ae(e,t)},n}},Re={},Fe={},Pe={},je=function(t,e){c.warn("abc88 cutPathAtIntersect",t,e);var n=[],r=t[0],i=!1;return t.forEach((function(t){if(c.info("abc88 checking point",t,e),function(t,e){var n=t.x,r=t.y,i=Math.abs(e.x-n),a=Math.abs(e.y-r),o=t.width/2,s=t.height/2;return i>=o||a>=s}(e,t)||i)c.warn("abc88 outside",t,r),r=t,i||n.push(t);else{var a=function(t,e,n){c.warn("intersection calc abc89:\n outsidePoint: ".concat(JSON.stringify(e),"\n insidePoint : ").concat(JSON.stringify(n),"\n node : x:").concat(t.x," y:").concat(t.y," w:").concat(t.width," h:").concat(t.height));var r=t.x,i=t.y,a=Math.abs(r-n.x),o=t.width/2,s=n.x<e.x?o-a:o+a,u=t.height/2,l=Math.abs(e.y-n.y),h=Math.abs(e.x-n.x);if(Math.abs(i-e.y)*o>Math.abs(r-e.x)*u){var f=n.y<e.y?e.y-u-i:i-u-e.y;s=h*f/l;var d={x:n.x<e.x?n.x+s:n.x-h+s,y:n.y<e.y?n.y+l-f:n.y-l+f};return 0===s&&(d.x=e.x,d.y=e.y),0===h&&(d.x=e.x),0===l&&(d.y=e.y),c.warn("abc89 topp/bott calc, Q ".concat(l,", q ").concat(f,", R ").concat(h,", r ").concat(s),d),d}var p=l*(s=n.x<e.x?e.x-o-r:r-o-e.x)/h,y=n.x<e.x?n.x+h-s:n.x-h+s,g=n.y<e.y?n.y+p:n.y-p;return c.warn("sides calc abc89, Q ".concat(l,", q ").concat(p,", R ").concat(h,", r ").concat(s),{_x:y,_y:g}),0===s&&(y=e.x,g=e.y),0===h&&(y=e.x),0===l&&(g=e.y),{x:y,y:g}}(e,r,t);c.warn("abc88 inside",t,r,a),c.warn("abc88 intersection",a);var o=!1;n.forEach((function(t){o=o||t.x===a.x&&t.y===a.y})),n.find((function(t){return t.x===a.x&&t.y===a.y}))?c.warn("abc88 no intersect",a,n):n.push(a),i=!0}})),c.warn("abc88 returning points",n),n},Ye=function t(e,n,r,i){c.info("Graph in recursive render: XXX",zt.a.json.write(n),i);var a=n.graph().rankdir;c.trace("Dir in recursive render - dir:",a);var o=e.insert("g").attr("class","root");n.nodes()?c.info("Recursive render XXX",n.nodes()):c.info("No nodes found for",n),n.edges().length>0&&c.trace("Recursive edges",n.edge(n.edges()[0]));var s=o.insert("g").attr("class","clusters"),u=o.insert("g").attr("class","edgePaths"),l=o.insert("g").attr("class","edgeLabels"),f=o.insert("g").attr("class","nodes");return n.nodes().forEach((function(e){var o=n.node(e);if(void 0!==i){var s=JSON.parse(JSON.stringify(i.clusterData));c.info("Setting data for cluster XXX (",e,") ",s,i),n.setNode(i.id,s),n.parent(e)||(c.trace("Setting parent",e,i.id),n.setParent(e,i.id,s))}if(c.info("(Insert) Node XXX"+e+": "+JSON.stringify(n.node(e))),o&&o.clusterNode){c.info("Cluster identified",e,o,n.node(e));var u=t(f,o.graph,r,n.node(e));le(o,u),function(t,e){De[e.id]=t}(u,o),c.warn("Recursive render complete",u,o)}else n.children(e).length>0?(c.info("Cluster - the non recursive path XXX",e,o.id,o,n),c.info(ve(o.id,n)),fe[o.id]={id:ve(o.id,n),node:o}):(c.info("Node - the non recursive path",e,o.id,o),function(t,e,n){var r,i;e.link?(r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget||"_blank"),i=Ne[e.shape](r,e,n)):r=i=Ne[e.shape](t,e,n),e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),De[e.id]=r,e.haveCallback&&De[e.id].attr("class",De[e.id].attr("class")+" clickable")}(f,n.node(e),a))})),n.edges().forEach((function(t){var e=n.edge(t.v,t.w,t.name);c.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),c.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(n.edge(t))),c.info("Fix",fe,"ids:",t.v,t.w,"Translateing: ",fe[t.v],fe[t.w]),function(t,e){var n=ce(e.label,e.labelStyle),r=t.insert("g").attr("class","edgeLabel"),i=r.insert("g").attr("class","label");i.node().appendChild(n);var a=n.getBBox();if(xt().flowchart.htmlLabels){var o=n.children[0],s=Object(h.select)(n);a=o.getBoundingClientRect(),s.attr("width",a.width),s.attr("height",a.height)}if(i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),Fe[e.id]=r,e.width=a.width,e.height=a.height,e.startLabelLeft){var c=ce(e.startLabelLeft,e.labelStyle),u=t.insert("g").attr("class","edgeTerminals"),l=u.insert("g").attr("class","inner");l.node().appendChild(c);var f=c.getBBox();l.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),Pe[e.id]||(Pe[e.id]={}),Pe[e.id].startLeft=u}if(e.startLabelRight){var d=ce(e.startLabelRight,e.labelStyle),p=t.insert("g").attr("class","edgeTerminals"),y=p.insert("g").attr("class","inner");p.node().appendChild(d),y.node().appendChild(d);var g=d.getBBox();y.attr("transform","translate("+-g.width/2+", "+-g.height/2+")"),Pe[e.id]||(Pe[e.id]={}),Pe[e.id].startRight=p}if(e.endLabelLeft){var v=ce(e.endLabelLeft,e.labelStyle),m=t.insert("g").attr("class","edgeTerminals"),b=m.insert("g").attr("class","inner");b.node().appendChild(v);var x=v.getBBox();b.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"),m.node().appendChild(v),Pe[e.id]||(Pe[e.id]={}),Pe[e.id].endLeft=m}if(e.endLabelRight){var _=ce(e.endLabelRight,e.labelStyle),k=t.insert("g").attr("class","edgeTerminals"),w=k.insert("g").attr("class","inner");w.node().appendChild(_);var E=_.getBBox();w.attr("transform","translate("+-E.width/2+", "+-E.height/2+")"),k.node().appendChild(_),Pe[e.id]||(Pe[e.id]={}),Pe[e.id].endRight=k}}(l,e)})),n.edges().forEach((function(t){c.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))})),c.info("#############################################"),c.info("### Layout ###"),c.info("#############################################"),c.info(n),jt.a.layout(n),c.info("Graph after layout:",zt.a.json.write(n)),_e(n).forEach((function(t){var e=n.node(t);c.info("Position "+t+": "+JSON.stringify(n.node(t))),c.info("Position "+t+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e&&e.clusterNode?Le(e):n.children(t).length>0?(!function(t,e){c.trace("Inserting cluster");var n=e.shape||"rect";Re[e.id]=Ie[n](t,e)}(s,e),fe[e.id].node=e):Le(e)})),n.edges().forEach((function(t){var e=n.edge(t);c.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e),e),function(t,e){c.info("Moving label abc78 ",t.id,t.label,Fe[t.id]);var n=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){var r=Fe[t.id],i=t.x,a=t.y;if(n){var o=W.calcLabelPosition(n);c.info("Moving label from (",i,",",a,") to (",o.x,",",o.y,") abc78")}r.attr("transform","translate("+i+", "+a+")")}if(t.startLabelLeft){var s=Pe[t.id].startLeft,u=t.x,l=t.y;if(n){var h=W.calcTerminalLabelPosition(0,"start_left",n);u=h.x,l=h.y}s.attr("transform","translate("+u+", "+l+")")}if(t.startLabelRight){var f=Pe[t.id].startRight,d=t.x,p=t.y;if(n){var y=W.calcTerminalLabelPosition(0,"start_right",n);d=y.x,p=y.y}f.attr("transform","translate("+d+", "+p+")")}if(t.endLabelLeft){var g=Pe[t.id].endLeft,v=t.x,m=t.y;if(n){var b=W.calcTerminalLabelPosition(0,"end_left",n);v=b.x,m=b.y}g.attr("transform","translate("+v+", "+m+")")}if(t.endLabelRight){var x=Pe[t.id].endRight,_=t.x,k=t.y;if(n){var w=W.calcTerminalLabelPosition(0,"end_right",n);_=w.x,k=w.y}x.attr("transform","translate("+_+", "+k+")")}}(e,function(t,e,n,r,i,a){var o=n.points,s=!1,u=a.node(e.v),l=a.node(e.w);c.info("abc88 InsertEdge: ",n),l.intersect&&u.intersect&&((o=o.slice(1,n.points.length-1)).unshift(u.intersect(o[0])),c.info("Last point",o[o.length-1],l,l.intersect(o[o.length-1])),o.push(l.intersect(o[o.length-1]))),n.toCluster&&(c.info("to cluster abc88",r[n.toCluster]),o=je(n.points,r[n.toCluster].node),s=!0),n.fromCluster&&(c.info("from cluster abc88",r[n.fromCluster]),o=je(o.reverse(),r[n.fromCluster].node).reverse(),s=!0);var f,d=o.filter((function(t){return!Number.isNaN(t.y)}));f=("graph"===i||"flowchart"===i)&&n.curve||h.curveBasis;var p,y=Object(h.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(f);switch(n.thickness){case"normal":p="edge-thickness-normal";break;case"thick":p="edge-thickness-thick";break;default:p=""}switch(n.pattern){case"solid":p+=" edge-pattern-solid";break;case"dotted":p+=" edge-pattern-dotted";break;case"dashed":p+=" edge-pattern-dashed"}var g=t.append("path").attr("d",y(d)).attr("id",n.id).attr("class"," "+p+(n.classes?" "+n.classes:"")).attr("style",n.style),v="";switch(xt().state.arrowMarkerAbsolute&&(v=(v=(v=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),c.info("arrowTypeStart",n.arrowTypeStart),c.info("arrowTypeEnd",n.arrowTypeEnd),n.arrowTypeStart){case"arrow_cross":g.attr("marker-start","url("+v+"#"+i+"-crossStart)");break;case"arrow_point":g.attr("marker-start","url("+v+"#"+i+"-pointStart)");break;case"arrow_barb":g.attr("marker-start","url("+v+"#"+i+"-barbStart)");break;case"arrow_circle":g.attr("marker-start","url("+v+"#"+i+"-circleStart)");break;case"aggregation":g.attr("marker-start","url("+v+"#"+i+"-aggregationStart)");break;case"extension":g.attr("marker-start","url("+v+"#"+i+"-extensionStart)");break;case"composition":g.attr("marker-start","url("+v+"#"+i+"-compositionStart)");break;case"dependency":g.attr("marker-start","url("+v+"#"+i+"-dependencyStart)")}switch(n.arrowTypeEnd){case"arrow_cross":g.attr("marker-end","url("+v+"#"+i+"-crossEnd)");break;case"arrow_point":g.attr("marker-end","url("+v+"#"+i+"-pointEnd)");break;case"arrow_barb":g.attr("marker-end","url("+v+"#"+i+"-barbEnd)");break;case"arrow_circle":g.attr("marker-end","url("+v+"#"+i+"-circleEnd)");break;case"aggregation":g.attr("marker-end","url("+v+"#"+i+"-aggregationEnd)");break;case"extension":g.attr("marker-end","url("+v+"#"+i+"-extensionEnd)");break;case"composition":g.attr("marker-end","url("+v+"#"+i+"-compositionEnd)");break;case"dependency":g.attr("marker-end","url("+v+"#"+i+"-dependencyEnd)")}var m={};return s&&(m.updatedPath=o),m.originalPath=n.points,m}(u,t,e,fe,r,n))})),o},ze=function(t,e,n,r,i){oe(t,n,r,i),De={},Fe={},Pe={},Re={},de={},pe={},fe={},c.warn("Graph at first:",zt.a.json.write(e)),be(e),c.warn("Graph after:",zt.a.json.write(e)),Ye(t,e,r)};Ut.parser.yy=Ft;var Ue={dividerMargin:10,padding:5,textHeight:10},$e=function(t){Object.keys(t).forEach((function(e){Ue[e]=t[e]}))},qe=function(t,e){c.info("Drawing class"),Ft.clear(),Ut.parser.parse(t);var n=xt().flowchart;c.info("config:",n);var r=n.nodeSpacing||50,i=n.rankSpacing||50,a=new zt.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:"TD",nodesep:r,ranksep:i,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),o=Ft.getClasses(),s=Ft.getRelations();c.info(s),function(t,e){var n=Object.keys(t);c.info("keys:",n),c.info(t),n.forEach((function(n){var r=t[n],i="";r.cssClasses.length>0&&(i=i+" "+r.cssClasses.join(" "));var a={labelStyle:""},o=void 0!==r.text?r.text:r.id,s="";switch(r.type){case"class":s="class_box";break;default:s="class_box"}e.setNode(r.id,{labelStyle:a.labelStyle,shape:s,labelText:o,classData:r,rx:0,ry:0,class:i,style:a.style,id:r.id,domId:r.domId,haveCallback:r.haveCallback,link:r.link,width:"group"===r.type?500:void 0,type:r.type,padding:xt().flowchart.padding}),c.info("setNode",{labelStyle:a.labelStyle,shape:s,labelText:o,rx:0,ry:0,class:i,style:a.style,id:r.id,width:"group"===r.type?500:void 0,type:r.type,padding:xt().flowchart.padding})}))}(o,a),function(t,e){var n=0;t.forEach((function(r){n++;var i={classes:"relation"};i.pattern=1==r.relation.lineType?"dashed":"solid",i.id="id"+n,"arrow_open"===r.type?i.arrowhead="none":i.arrowhead="normal",c.info(i,r),i.startLabelRight="none"===r.relationTitle1?"":r.relationTitle1,i.endLabelLeft="none"===r.relationTitle2?"":r.relationTitle2,i.arrowTypeStart=We(r.relation.type1),i.arrowTypeEnd=We(r.relation.type2);var a="",o="";if(void 0!==r.style){var s=D(r.style);a=s.style,o=s.labelStyle}else a="fill:none";i.style=a,i.labelStyle=o,void 0!==r.interpolate?i.curve=B(r.interpolate,h.curveLinear):void 0!==t.defaultInterpolate?i.curve=B(t.defaultInterpolate,h.curveLinear):i.curve=B(Ue.curve,h.curveLinear),r.text=r.title,void 0===r.text?void 0!==r.style&&(i.arrowheadStyle="fill: #333"):(i.arrowheadStyle="fill: #333",i.labelpos="c",xt().flowchart.htmlLabels,i.labelType="text",i.label=r.text.replace(x.lineBreakRegex,"\n"),void 0===r.style&&(i.style=i.style||"stroke: #333; stroke-width: 1.5px;fill:none"),i.labelStyle=i.labelStyle.replace("color:","fill:")),e.setEdge(r.id1,r.id2,i,n)}))}(s,a);var u=Object(h.select)('[id="'.concat(e,'"]'));u.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var l=Object(h.select)("#"+e+" g");ze(l,a,["aggregation","extension","composition","dependency"],"classDiagram",e);var f=u.node().getBBox(),d=f.width+16,p=f.height+16;if(c.debug("new ViewBox 0 0 ".concat(d," ").concat(p),"translate(".concat(8-a._label.marginx,", ").concat(8-a._label.marginy,")")),q(u,p,d,n.useMaxWidth),u.attr("viewBox","0 0 ".concat(d," ").concat(p)),u.select("g").attr("transform","translate(".concat(8-a._label.marginx,", ").concat(8-f.y,")")),!n.htmlLabels)for(var y=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),g=0;g<y.length;g++){var v=y[g],m=v.getBBox(),b=document.createElementNS("http://www.w3.org/2000/svg","rect");b.setAttribute("rx",0),b.setAttribute("ry",0),b.setAttribute("width",m.width),b.setAttribute("height",m.height),b.setAttribute("style","fill:#e8e8e8;"),v.insertBefore(b,v.firstChild)}};function We(t){var e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;default:e="none"}return e}var Ve={},He=[],Ge="",Xe=function(t){return void 0===Ve[t]&&(Ve[t]={attributes:[]},c.info("Added new entity :",t)),Ve[t]},Ze={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().er},addEntity:Xe,addAttributes:function(t,e){var n,r=Xe(t);for(n=e.length-1;n>=0;n--)r.attributes.push(e[n]),c.debug("Added attribute ",e[n].attributeName)},getEntities:function(){return Ve},addRelationship:function(t,e,n,r){var i={entityA:t,roleA:e,entityB:n,relSpec:r};He.push(i),c.debug("Added new relationship :",i)},getRelationships:function(){return He},clear:function(){Ve={},He=[],Ge=""},setTitle:function(t){Ge=t},getTitle:function(){return Ge}},Qe=n(75),Ke=n.n(Qe),Je={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"},tn=Je,en=function(t,e){var n;t.append("defs").append("marker").attr("id",Je.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",Je.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",Je.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",Je.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",Je.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",Je.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),(n=t.append("defs").append("marker").attr("id",Je.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(n=t.append("defs").append("marker").attr("id",Je.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},nn={},rn=function(t,e,n){var r;return Object.keys(e).forEach((function(i){var a=t.append("g").attr("id",i);r=void 0===r?i:r;var o="entity-"+i,s=a.append("text").attr("class","er entityLabel").attr("id",o).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("style","font-family: "+xt().fontFamily+"; font-size: "+nn.fontSize+"px").text(i),c=function(t,e,n){var r=nn.entityPadding/3,i=nn.entityPadding/3,a=.85*nn.fontSize,o=e.node().getBBox(),s=[],c=0,u=0,l=o.height+2*r,h=1;n.forEach((function(n){var i="".concat(e.node().id,"-attr-").concat(h),o=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-type")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+xt().fontFamily+"; font-size: "+a+"px").text(n.attributeType),f=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-name")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+xt().fontFamily+"; font-size: "+a+"px").text(n.attributeName);s.push({tn:o,nn:f});var d=o.node().getBBox(),p=f.node().getBBox();c=Math.max(c,d.width),u=Math.max(u,p.width),l+=Math.max(d.height,p.height)+2*r,h+=1}));var f={width:Math.max(nn.minEntityWidth,Math.max(o.width+2*nn.entityPadding,c+u+4*i)),height:n.length>0?l:Math.max(nn.minEntityHeight,o.height+2*nn.entityPadding)},d=Math.max(0,f.width-(c+u)-4*i);if(n.length>0){e.attr("transform","translate("+f.width/2+","+(r+o.height/2)+")");var p=o.height+2*r,y="attributeBoxOdd";s.forEach((function(e){var n=p+r+Math.max(e.tn.node().getBBox().height,e.nn.node().getBBox().height)/2;e.tn.attr("transform","translate("+i+","+n+")");var a=t.insert("rect","#"+e.tn.node().id).attr("class","er ".concat(y)).attr("fill",nn.fill).attr("fill-opacity","100%").attr("stroke",nn.stroke).attr("x",0).attr("y",p).attr("width",c+2*i+d/2).attr("height",e.tn.node().getBBox().height+2*r);e.nn.attr("transform","translate("+(parseFloat(a.attr("width"))+i)+","+n+")"),t.insert("rect","#"+e.nn.node().id).attr("class","er ".concat(y)).attr("fill",nn.fill).attr("fill-opacity","100%").attr("stroke",nn.stroke).attr("x","".concat(a.attr("x")+a.attr("width"))).attr("y",p).attr("width",u+2*i+d/2).attr("height",e.nn.node().getBBox().height+2*r),p+=Math.max(e.tn.node().getBBox().height,e.nn.node().getBBox().height)+2*r,y="attributeBoxOdd"==y?"attributeBoxEven":"attributeBoxOdd"}))}else f.height=Math.max(nn.minEntityHeight,l),e.attr("transform","translate("+f.width/2+","+f.height/2+")");return f}(a,s,e[i].attributes),u=c.width,l=c.height,h=a.insert("rect","#"+o).attr("class","er entityBox").attr("fill",nn.fill).attr("fill-opacity","100%").attr("stroke",nn.stroke).attr("x",0).attr("y",0).attr("width",u).attr("height",l).node().getBBox();n.setNode(i,{width:h.width,height:h.height,shape:"rect",id:i})})),r},an=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},on=0,sn=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)nn[e[n]]=t[e[n]]},cn=function(t,e){c.info("Drawing ER diagram"),Ze.clear();var n=Ke.a.parser;n.yy=Ze;try{n.parse(t)}catch(t){c.debug("Parsing failed")}var r,i=Object(h.select)("[id='".concat(e,"']"));en(i,nn),r=new zt.a.Graph({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:nn.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));var a,o,s=rn(i,Ze.getEntities(),r),u=function(t,e){return t.forEach((function(t){e.setEdge(t.entityA,t.entityB,{relationship:t},an(t))})),t}(Ze.getRelationships(),r);jt.a.layout(r),a=i,(o=r).nodes().forEach((function(t){void 0!==t&&void 0!==o.node(t)&&a.select("#"+t).attr("transform","translate("+(o.node(t).x-o.node(t).width/2)+","+(o.node(t).y-o.node(t).height/2)+" )")})),u.forEach((function(t){!function(t,e,n,r){on++;var i=n.edge(e.entityA,e.entityB,an(e)),a=Object(h.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(h.curveBasis),o=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",a(i.points)).attr("stroke",nn.stroke).attr("fill","none");e.relSpec.relType===Ze.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");var s="";switch(nn.arrowMarkerAbsolute&&(s=(s=(s=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e.relSpec.cardA){case Ze.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+s+"#"+tn.ZERO_OR_ONE_END+")");break;case Ze.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+s+"#"+tn.ZERO_OR_MORE_END+")");break;case Ze.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+s+"#"+tn.ONE_OR_MORE_END+")");break;case Ze.Cardinality.ONLY_ONE:o.attr("marker-end","url("+s+"#"+tn.ONLY_ONE_END+")")}switch(e.relSpec.cardB){case Ze.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+s+"#"+tn.ZERO_OR_ONE_START+")");break;case Ze.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+s+"#"+tn.ZERO_OR_MORE_START+")");break;case Ze.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+s+"#"+tn.ONE_OR_MORE_START+")");break;case Ze.Cardinality.ONLY_ONE:o.attr("marker-start","url("+s+"#"+tn.ONLY_ONE_START+")")}var c=o.node().getTotalLength(),u=o.node().getPointAtLength(.5*c),l="rel"+on,f=t.append("text").attr("class","er relationshipLabel").attr("id",l).attr("x",u.x).attr("y",u.y).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("style","font-family: "+xt().fontFamily+"; font-size: "+nn.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+l).attr("class","er relationshipLabelBox").attr("x",u.x-f.width/2).attr("y",u.y-f.height/2).attr("width",f.width).attr("height",f.height).attr("fill","white").attr("fill-opacity","85%")}(i,t,r,s)}));var l=nn.diagramPadding,f=i.node().getBBox(),d=f.width+2*l,p=f.height+2*l;q(i,p,d,nn.useMaxWidth),i.attr("viewBox","".concat(f.x-l," ").concat(f.y-l," ").concat(d," ").concat(p))};function un(t){return(un="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ln(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var hn,fn,dn=0,pn=xt(),yn={},gn=[],vn=[],mn=[],bn={},xn={},_n=0,kn=!0,wn=[],En=function(t){for(var e=Object.keys(yn),n=0;n<e.length;n++)if(yn[e[n]].id===t)return yn[e[n]].domId;return t},Tn=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:""};void 0!==(r=n.text)&&(i.text=x.sanitizeText(r.trim(),pn),'"'===i.text[0]&&'"'===i.text[i.text.length-1]&&(i.text=i.text.substring(1,i.text.length-1))),void 0!==n&&(i.type=n.type,i.stroke=n.stroke,i.length=n.length),gn.push(i)},Cn=function(t,e){t.split(",").forEach((function(t){var n=t;void 0!==yn[n]&&yn[n].classes.push(e),void 0!==bn[n]&&bn[n].classes.push(e)}))},Sn=function(t){var e=Object(h.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(h.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(h.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(h.select)(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(h.select)(this).classed("hover",!1)}))};wn.push(Sn);var An=function(t){for(var e=0;e<mn.length;e++)if(mn[e].id===t)return e;return-1},Mn=-1,On=[],Bn=function(t,e){var n=!1;return t.forEach((function(t){t.nodes.indexOf(e)>=0&&(n=!0)})),n},Nn=function(t,e){var n=[];return t.nodes.forEach((function(r,i){Bn(e,r)||n.push(t.nodes[i])})),{nodes:n}},Dn={parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},defaultConfig:function(){return pt.flowchart},addVertex:function(t,e,n,r,i){var a,o=t;void 0!==o&&0!==o.trim().length&&(void 0===yn[o]&&(yn[o]={id:o,domId:"flowchart-"+o+"-"+dn,styles:[],classes:[]}),dn++,void 0!==e?(pn=xt(),'"'===(a=x.sanitizeText(e.trim(),pn))[0]&&'"'===a[a.length-1]&&(a=a.substring(1,a.length-1)),yn[o].text=a):void 0===yn[o].text&&(yn[o].text=t),void 0!==n&&(yn[o].type=n),null!=r&&r.forEach((function(t){yn[o].styles.push(t)})),null!=i&&i.forEach((function(t){yn[o].classes.push(t)})))},lookUpDomId:En,addLink:function(t,e,n,r){var i,a;for(i=0;i<t.length;i++)for(a=0;a<e.length;a++)Tn(t[i],e[a],n,r)},updateLinkInterpolate:function(t,e){t.forEach((function(t){"default"===t?gn.defaultInterpolate=e:gn[t].interpolate=e}))},updateLink:function(t,e){t.forEach((function(t){"default"===t?gn.defaultStyle=e:(-1===W.isSubstringInArray("fill",e)&&e.push("fill:none"),gn[t].style=e)}))},addClass:function(t,e){void 0===vn[t]&&(vn[t]={id:t,styles:[],textStyles:[]}),null!=e&&e.forEach((function(e){if(e.match("color")){var n=e.replace("fill","bgFill").replace("color","fill");vn[t].textStyles.push(n)}vn[t].styles.push(e)}))},setDirection:function(t){(hn=t).match(/.*</)&&(hn="RL"),hn.match(/.*\^/)&&(hn="BT"),hn.match(/.*>/)&&(hn="LR"),hn.match(/.*v/)&&(hn="TB")},setClass:Cn,setTooltip:function(t,e){t.split(",").forEach((function(t){void 0!==e&&(xn["gen-1"===fn?En(t):t]=x.sanitizeText(e,pn))}))},getTooltip:function(t){return xn[t]},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){var r=En(t);if("loose"===xt().securityLevel&&void 0!==e){var i=[];if("string"==typeof n){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var a=0;a<i.length;a++){var o=i[a].trim();'"'===o.charAt(0)&&'"'===o.charAt(o.length-1)&&(o=o.substr(1,o.length-2)),i[a]=o}}0===i.length&&i.push(t),void 0!==yn[t]&&(yn[t].haveCallback=!0,wn.push((function(){var t=document.querySelector('[id="'.concat(r,'"]'));null!==t&&t.addEventListener("click",(function(){W.runFunc.apply(W,[e].concat(ln(i)))}),!1)})))}}(t,e,n)})),Cn(t,"clickable")},setLink:function(t,e,n){t.split(",").forEach((function(t){void 0!==yn[t]&&(yn[t].link=W.formatUrl(e,pn),yn[t].linkTarget=n)})),Cn(t,"clickable")},bindFunctions:function(t){wn.forEach((function(e){e(t)}))},getDirection:function(){return hn.trim()},getVertices:function(){return yn},getEdges:function(){return gn},getClasses:function(){return vn},clear:function(t){yn={},vn={},gn=[],(wn=[]).push(Sn),mn=[],bn={},_n=0,xn=[],kn=!0,fn=t||"gen-1"},setGen:function(t){fn=t||"gen-1"},defaultStyle:function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},addSubGraph:function(t,e,n){var r=t.trim(),i=n;t===n&&n.match(/\s/)&&(r=void 0);var a,o,s,u=[];if(a=u.concat.apply(u,e),o={boolean:{},number:{},string:{}},s=[],u=a.filter((function(t){var e=un(t);return""!==t.trim()&&(e in o?!o[e].hasOwnProperty(t)&&(o[e][t]=!0):!(s.indexOf(t)>=0)&&s.push(t))})),"gen-1"===fn){c.warn("LOOKING UP");for(var l=0;l<u.length;l++)u[l]=En(u[l])}r=r||"subGraph"+_n,i=i||"",i=x.sanitizeText(i,pn),_n+=1;var h={id:r,nodes:u,title:i.trim(),classes:[]};return c.info("Adding",h.id,h.nodes),h.nodes=Nn(h,mn).nodes,mn.push(h),bn[r]=h,r},getDepthFirstPos:function(t){return On[t]},indexNodes:function(){Mn=-1,mn.length>0&&function t(e,n){var r=mn[n].nodes;if(!((Mn+=1)>2e3)){if(On[Mn]=n,mn[n].id===e)return{result:!0,count:0};for(var i=0,a=1;i<r.length;){var o=An(r[i]);if(o>=0){var s=t(e,o);if(s.result)return{result:!0,count:a+s.count};a+=s.count}i+=1}return{result:!1,count:a}}}("none",mn.length-1)},getSubGraphs:function(){return mn},destructLink:function(t,e){var n,r=function(t){var e=t.trim(),n=e.slice(0,-1),r="arrow_open";switch(e.slice(-1)){case"x":r="arrow_cross","x"===e[0]&&(r="double_"+r,n=n.slice(1));break;case">":r="arrow_point","<"===e[0]&&(r="double_"+r,n=n.slice(1));break;case"o":r="arrow_circle","o"===e[0]&&(r="double_"+r,n=n.slice(1))}var i="normal",a=n.length-1;"="===n[0]&&(i="thick");var o=function(t,e){for(var n=e.length,r=0,i=0;i<n;++i)e[i]===t&&++r;return r}(".",n);return o&&(i="dotted",a=o),{type:r,stroke:i,length:a}}(t);if(e){if((n=function(t){var e=t.trim(),n="arrow_open";switch(e[0]){case"<":n="arrow_point",e=e.slice(1);break;case"x":n="arrow_cross",e=e.slice(1);break;case"o":n="arrow_circle",e=e.slice(1)}var r="normal";return-1!==e.indexOf("=")&&(r="thick"),-1!==e.indexOf(".")&&(r="dotted"),{type:n,stroke:r}}(e)).stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===n.type)n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return"double_arrow"===n.type&&(n.type="double_arrow_point"),n.length=r.length,n}return r},lex:{firstGraph:function(){return!!kn&&(kn=!1,!0)}},exists:Bn,makeUniq:Nn},Ln=n(27),In=n.n(Ln),Rn=n(7),Fn=n.n(Rn),Pn=n(51),jn=n.n(Pn);function Yn(t,e,n){var r=.9*(e.width+e.height),i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],a=Qn(t,r,r,i);return n.intersect=function(t){return Fn.a.intersect.polygon(n,i,t)},a}function zn(t,e,n){var r=e.height,i=r/4,a=e.width+2*i,o=[{x:i,y:0},{x:a-i,y:0},{x:a,y:-r/2},{x:a-i,y:-r},{x:i,y:-r},{x:0,y:-r/2}],s=Qn(t,a,r,o);return n.intersect=function(t){return Fn.a.intersect.polygon(n,o,t)},s}function Un(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function $n(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:i/6,y:-i}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function qn(t,e,n){var r=e.width,i=e.height,a=[{x:2*i/6,y:0},{x:r+i/6,y:0},{x:r-2*i/6,y:-i},{x:-i/6,y:-i}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function Wn(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r+2*i/6,y:0},{x:r-i/6,y:-i},{x:i/6,y:-i}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function Vn(t,e,n){var r=e.width,i=e.height,a=[{x:i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:-2*i/6,y:-i}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function Hn(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function Gn(t,e,n){var r=e.height,i=e.width+r/4,a=t.insert("rect",":first-child").attr("rx",r/2).attr("ry",r/2).attr("x",-i/2).attr("y",-r/2).attr("width",i).attr("height",r);return n.intersect=function(t){return Fn.a.intersect.rect(n,t)},a}function Xn(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r,y:0},{x:r,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:r+8,y:0},{x:r+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],o=Qn(t,r,i,a);return n.intersect=function(t){return Fn.a.intersect.polygon(n,a,t)},o}function Zn(t,e,n){var r=e.width,i=r/2,a=i/(2.5+r/50),o=e.height+a,s="M 0,"+a+" a "+i+","+a+" 0,0,0 "+r+" 0 a "+i+","+a+" 0,0,0 "+-r+" 0 l 0,"+o+" a "+i+","+a+" 0,0,0 "+r+" 0 l 0,"+-o,c=t.attr("label-offset-y",a).insert("path",":first-child").attr("d",s).attr("transform","translate("+-r/2+","+-(o/2+a)+")");return n.intersect=function(t){var e=Fn.a.intersect.rect(n,t),r=e.x-n.x;if(0!=i&&(Math.abs(r)<n.width/2||Math.abs(r)==n.width/2&&Math.abs(e.y-n.y)>n.height/2-a)){var o=a*a*(1-r*r/(i*i));0!=o&&(o=Math.sqrt(o)),o=a-o,t.y-n.y>0&&(o=-o),e.y+=o}return e},c}function Qn(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("transform","translate("+-e/2+","+n/2+")")}var Kn={addToRender:function(t){t.shapes().question=Yn,t.shapes().hexagon=zn,t.shapes().stadium=Gn,t.shapes().subroutine=Xn,t.shapes().cylinder=Zn,t.shapes().rect_left_inv_arrow=Un,t.shapes().lean_right=$n,t.shapes().lean_left=qn,t.shapes().trapezoid=Wn,t.shapes().inv_trapezoid=Vn,t.shapes().rect_right_inv_arrow=Hn},addToRenderV2:function(t){t({question:Yn}),t({hexagon:zn}),t({stadium:Gn}),t({subroutine:Xn}),t({cylinder:Zn}),t({rect_left_inv_arrow:Un}),t({lean_right:$n}),t({lean_left:qn}),t({trapezoid:Wn}),t({inv_trapezoid:Vn}),t({rect_right_inv_arrow:Hn})}},Jn={},tr=function(t,e,n){var r=Object(h.select)('[id="'.concat(n,'"]'));Object.keys(t).forEach((function(n){var i=t[n],a="default";i.classes.length>0&&(a=i.classes.join(" "));var o,s=D(i.styles),u=void 0!==i.text?i.text:i.id;if(xt().flowchart.htmlLabels){var l={label:u.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(o=jn()(r,l).node()).parentNode.removeChild(o)}else{var h=document.createElementNS("http://www.w3.org/2000/svg","text");h.setAttribute("style",s.labelStyle.replace("color:","fill:"));for(var f=u.split(x.lineBreakRegex),d=0;d<f.length;d++){var p=document.createElementNS("http://www.w3.org/2000/svg","tspan");p.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),p.setAttribute("dy","1em"),p.setAttribute("x","1"),p.textContent=f[d],h.appendChild(p)}o=h}var y=0,g="";switch(i.type){case"round":y=5,g="rect";break;case"square":g="rect";break;case"diamond":g="question";break;case"hexagon":g="hexagon";break;case"odd":g="rect_left_inv_arrow";break;case"lean_right":g="lean_right";break;case"lean_left":g="lean_left";break;case"trapezoid":g="trapezoid";break;case"inv_trapezoid":g="inv_trapezoid";break;case"odd_right":g="rect_left_inv_arrow";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"stadium":g="stadium";break;case"subroutine":g="subroutine";break;case"cylinder":g="cylinder";break;case"group":g="rect";break;default:g="rect"}c.warn("Adding node",i.id,i.domId),e.setNode(Dn.lookUpDomId(i.id),{labelType:"svg",labelStyle:s.labelStyle,shape:g,label:o,rx:y,ry:y,class:a,style:s.style,id:Dn.lookUpDomId(i.id)})}))},er=function(t,e){var n,r,i=0;if(void 0!==t.defaultStyle){var a=D(t.defaultStyle);n=a.style,r=a.labelStyle}t.forEach((function(a){i++;var o="L-"+a.start+"-"+a.end,s="LS-"+a.start,c="LE-"+a.end,u={};"arrow_open"===a.type?u.arrowhead="none":u.arrowhead="normal";var l="",f="";if(void 0!==a.style){var d=D(a.style);l=d.style,f=d.labelStyle}else switch(a.stroke){case"normal":l="fill:none",void 0!==n&&(l=n),void 0!==r&&(f=r);break;case"dotted":l="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":l=" stroke-width: 3.5px;fill:none"}u.style=l,u.labelStyle=f,void 0!==a.interpolate?u.curve=B(a.interpolate,h.curveLinear):void 0!==t.defaultInterpolate?u.curve=B(t.defaultInterpolate,h.curveLinear):u.curve=B(Jn.curve,h.curveLinear),void 0===a.text?void 0!==a.style&&(u.arrowheadStyle="fill: #333"):(u.arrowheadStyle="fill: #333",u.labelpos="c",xt().flowchart.htmlLabels?(u.labelType="html",u.label='<span id="L-'.concat(o,'" class="edgeLabel L-').concat(s,"' L-").concat(c,'">').concat(a.text.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")})),"</span>")):(u.labelType="text",u.label=a.text.replace(x.lineBreakRegex,"\n"),void 0===a.style&&(u.style=u.style||"stroke: #333; stroke-width: 1.5px;fill:none"),u.labelStyle=u.labelStyle.replace("color:","fill:"))),u.id=o,u.class=s+" "+c,u.minlen=a.length||1,e.setEdge(Dn.lookUpDomId(a.start),Dn.lookUpDomId(a.end),u,i)}))},nr=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)Jn[e[n]]=t[e[n]]},rr=function(t){c.info("Extracting classes"),Dn.clear();try{var e=In.a.parser;return e.yy=Dn,e.parse(t),Dn.getClasses()}catch(t){return}},ir=function(t,e){c.info("Drawing flowchart"),Dn.clear(),Dn.setGen("gen-1");var n=In.a.parser;n.yy=Dn,n.parse(t);var r=Dn.getDirection();void 0===r&&(r="TD");for(var i,a=xt().flowchart,o=a.nodeSpacing||50,s=a.rankSpacing||50,u=new zt.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:o,ranksep:s,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),l=Dn.getSubGraphs(),f=l.length-1;f>=0;f--)i=l[f],Dn.addVertex(i.id,i.title,"group",void 0,i.classes);var d=Dn.getVertices();c.warn("Get vertices",d);var p=Dn.getEdges(),y=0;for(y=l.length-1;y>=0;y--){i=l[y],Object(h.selectAll)("cluster").append("text");for(var g=0;g<i.nodes.length;g++)c.warn("Setting subgraph",i.nodes[g],Dn.lookUpDomId(i.nodes[g]),Dn.lookUpDomId(i.id)),u.setParent(Dn.lookUpDomId(i.nodes[g]),Dn.lookUpDomId(i.id))}tr(d,u,e),er(p,u);var v=new(0,Fn.a.render);Kn.addToRender(v),v.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");Fn.a.util.applyStyle(i,n[r+"Style"])},v.arrows().normal=function(t,e){t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};var m=Object(h.select)('[id="'.concat(e,'"]'));m.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),c.warn(u);var b=Object(h.select)("#"+e+" g");v(b,u),b.selectAll("g.node").attr("title",(function(){return Dn.getTooltip(this.id)}));var x=a.diagramPadding,_=m.node().getBBox(),k=_.width+2*x,w=_.height+2*x;q(m,w,k,a.useMaxWidth);var E="".concat(_.x-x," ").concat(_.y-x," ").concat(k," ").concat(w);for(c.debug("viewBox ".concat(E)),m.attr("viewBox",E),Dn.indexNodes("subGraph"+y),y=0;y<l.length;y++)if("undefined"!==(i=l[y]).title){var T=document.querySelectorAll("#"+e+' [id="'+Dn.lookUpDomId(i.id)+'"] rect'),C=document.querySelectorAll("#"+e+' [id="'+Dn.lookUpDomId(i.id)+'"]'),S=T[0].x.baseVal.value,A=T[0].y.baseVal.value,M=T[0].width.baseVal.value,O=Object(h.select)(C[0]).select(".label");O.attr("transform","translate(".concat(S+M/2,", ").concat(A+14,")")),O.attr("id",e+"Text");for(var B=0;B<i.classes.length;B++)C[0].classList.add(i.classes[B])}a.htmlLabels;for(var N=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),D=0;D<N.length;D++){var L=N[D],I=L.getBBox(),R=document.createElementNS("http://www.w3.org/2000/svg","rect");R.setAttribute("rx",0),R.setAttribute("ry",0),R.setAttribute("width",I.width),R.setAttribute("height",I.height),L.insertBefore(R,L.firstChild)}Object.keys(d).forEach((function(t){var n=d[t];if(n.link){var r=Object(h.select)("#"+e+' [id="'+Dn.lookUpDomId(t)+'"]');if(r){var i=document.createElementNS("http://www.w3.org/2000/svg","a");i.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),i.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),i.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),n.linkTarget&&i.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);var a=r.insert((function(){return i}),":first-child"),o=r.select(".label-container");o&&a.append((function(){return o.node()}));var s=r.select(".label");s&&a.append((function(){return s.node()}))}}}))},ar={},or=function(t,e,n){var r=Object(h.select)('[id="'.concat(n,'"]'));Object.keys(t).forEach((function(n){var i=t[n],a="default";i.classes.length>0&&(a=i.classes.join(" "));var o,s=D(i.styles),u=void 0!==i.text?i.text:i.id;if(xt().flowchart.htmlLabels){var l={label:u.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(o=jn()(r,l).node()).parentNode.removeChild(o)}else{var h=document.createElementNS("http://www.w3.org/2000/svg","text");h.setAttribute("style",s.labelStyle.replace("color:","fill:"));for(var f=u.split(x.lineBreakRegex),d=0;d<f.length;d++){var p=document.createElementNS("http://www.w3.org/2000/svg","tspan");p.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),p.setAttribute("dy","1em"),p.setAttribute("x","1"),p.textContent=f[d],h.appendChild(p)}o=h}var y=0,g="";switch(i.type){case"round":y=5,g="rect";break;case"square":g="rect";break;case"diamond":g="question";break;case"hexagon":g="hexagon";break;case"odd":g="rect_left_inv_arrow";break;case"lean_right":g="lean_right";break;case"lean_left":g="lean_left";break;case"trapezoid":g="trapezoid";break;case"inv_trapezoid":g="inv_trapezoid";break;case"odd_right":g="rect_left_inv_arrow";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"stadium":g="stadium";break;case"subroutine":g="subroutine";break;case"cylinder":g="cylinder";break;case"group":g="rect";break;default:g="rect"}e.setNode(i.id,{labelStyle:s.labelStyle,shape:g,labelText:u,rx:y,ry:y,class:a,style:s.style,id:i.id,link:i.link,linkTarget:i.linkTarget,tooltip:Dn.getTooltip(i.id)||"",domId:Dn.lookUpDomId(i.id),haveCallback:i.haveCallback,width:"group"===i.type?500:void 0,type:i.type,padding:xt().flowchart.padding}),c.info("setNode",{labelStyle:s.labelStyle,shape:g,labelText:u,rx:y,ry:y,class:a,style:s.style,id:i.id,domId:Dn.lookUpDomId(i.id),width:"group"===i.type?500:void 0,type:i.type,padding:xt().flowchart.padding})}))},sr=function(t,e){c.info("abc78 edges = ",t);var n,r,i=0,a={};if(void 0!==t.defaultStyle){var o=D(t.defaultStyle);n=o.style,r=o.labelStyle}t.forEach((function(o){i++;var s="L-"+o.start+"-"+o.end;void 0===a[s]?(a[s]=0,c.info("abc78 new entry",s,a[s])):(a[s]++,c.info("abc78 new entry",s,a[s]));var u=s+"-"+a[s];c.info("abc78 new link id to be used is",s,u,a[s]);var l="LS-"+o.start,f="LE-"+o.end,d={style:"",labelStyle:""};switch(d.minlen=o.length||1,"arrow_open"===o.type?d.arrowhead="none":d.arrowhead="normal",d.arrowTypeStart="arrow_open",d.arrowTypeEnd="arrow_open",o.type){case"double_arrow_cross":d.arrowTypeStart="arrow_cross";case"arrow_cross":d.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":d.arrowTypeStart="arrow_point";case"arrow_point":d.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":d.arrowTypeStart="arrow_circle";case"arrow_circle":d.arrowTypeEnd="arrow_circle"}var p="",y="";switch(o.stroke){case"normal":p="fill:none;",void 0!==n&&(p=n),void 0!==r&&(y=r),d.thickness="normal",d.pattern="solid";break;case"dotted":d.thickness="normal",d.pattern="dotted",d.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":d.thickness="thick",d.pattern="solid",d.style="stroke-width: 3.5px;fill:none;"}if(void 0!==o.style){var g=D(o.style);p=g.style,y=g.labelStyle}d.style=d.style+=p,d.labelStyle=d.labelStyle+=y,void 0!==o.interpolate?d.curve=B(o.interpolate,h.curveLinear):void 0!==t.defaultInterpolate?d.curve=B(t.defaultInterpolate,h.curveLinear):d.curve=B(ar.curve,h.curveLinear),void 0===o.text?void 0!==o.style&&(d.arrowheadStyle="fill: #333"):(d.arrowheadStyle="fill: #333",d.labelpos="c"),d.labelType="text",d.label=o.text.replace(x.lineBreakRegex,"\n"),void 0===o.style&&(d.style=d.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),d.labelStyle=d.labelStyle.replace("color:","fill:"),d.id=u,d.classes="flowchart-link "+l+" "+f,e.setEdge(o.start,o.end,d,i)}))},cr=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)ar[e[n]]=t[e[n]]},ur=function(t,e){c.info("Drawing flowchart"),Dn.clear(),Dn.setGen("gen-2");var n=In.a.parser;n.yy=Dn,n.parse(t);var r=Dn.getDirection();void 0===r&&(r="TD");var i,a=xt().flowchart,o=a.nodeSpacing||50,s=a.rankSpacing||50,u=new zt.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:o,ranksep:s,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),l=Dn.getSubGraphs();c.info("Subgraphs - ",l);for(var f=l.length-1;f>=0;f--)i=l[f],c.info("Subgraph - ",i),Dn.addVertex(i.id,i.title,"group",void 0,i.classes);var d=Dn.getVertices(),p=Dn.getEdges();c.info(p);var y=0;for(y=l.length-1;y>=0;y--){i=l[y],Object(h.selectAll)("cluster").append("text");for(var g=0;g<i.nodes.length;g++)c.info("Setting up subgraphs",i.nodes[g],i.id),u.setParent(i.nodes[g],i.id)}or(d,u,e),sr(p,u);var v=Object(h.select)('[id="'.concat(e,'"]'));v.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var m=Object(h.select)("#"+e+" g");ze(m,u,["point","circle","cross"],"flowchart",e);var b=a.diagramPadding,x=v.node().getBBox(),_=x.width+2*b,k=x.height+2*b;if(c.debug("new ViewBox 0 0 ".concat(_," ").concat(k),"translate(".concat(b-u._label.marginx,", ").concat(b-u._label.marginy,")")),q(v,k,_,a.useMaxWidth),v.attr("viewBox","0 0 ".concat(_," ").concat(k)),v.select("g").attr("transform","translate(".concat(b-u._label.marginx,", ").concat(b-x.y,")")),Dn.indexNodes("subGraph"+y),!a.htmlLabels)for(var w=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),E=0;E<w.length;E++){var T=w[E],C=T.getBBox(),S=document.createElementNS("http://www.w3.org/2000/svg","rect");S.setAttribute("rx",0),S.setAttribute("ry",0),S.setAttribute("width",C.width),S.setAttribute("height",C.height),T.insertBefore(S,T.firstChild)}Object.keys(d).forEach((function(t){var n=d[t];if(n.link){var r=Object(h.select)("#"+e+' [id="'+t+'"]');if(r){var i=document.createElementNS("http://www.w3.org/2000/svg","a");i.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),i.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),i.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),n.linkTarget&&i.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);var a=r.insert((function(){return i}),":first-child"),o=r.select(".label-container");o&&a.append((function(){return o.node()}));var s=r.select(".label");s&&a.append((function(){return s.node()}))}}}))};function lr(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var hr,fr,dr="",pr="",yr="",gr=[],vr="",mr=[],br=[],xr="",_r=["active","done","crit","milestone"],kr=[],wr=!1,Er=!1,Tr=0,Cr=function(t,e,n){return t.isoWeekday()>=6&&n.indexOf("weekends")>=0||(n.indexOf(t.format("dddd").toLowerCase())>=0||n.indexOf(t.format(e.trim()))>=0)},Sr=function(t,e,n){if(n.length&&!t.manualEndTime){var r=o()(t.startTime,e,!0);r.add(1,"d");var i=o()(t.endTime,e,!0),a=Ar(r,i,e,n);t.endTime=i.toDate(),t.renderEndTime=a}},Ar=function(t,e,n,r){for(var i=!1,a=null;t<=e;)i||(a=e.toDate()),(i=Cr(t,n,r))&&e.add(1,"d"),t.add(1,"d");return a},Mr=function(t,e,n){n=n.trim();var r=/^after\s+([\d\w- ]+)/.exec(n.trim());if(null!==r){var i=null;if(r[1].split(" ").forEach((function(t){var e=Rr(t);void 0!==e&&(i?e.endTime>i.endTime&&(i=e):i=e)})),i)return i.endTime;var a=new Date;return a.setHours(0,0,0,0),a}var s=o()(n,e.trim(),!0);return s.isValid()?s.toDate():(c.debug("Invalid date:"+n),c.debug("With date format:"+e.trim()),new Date)},Or=function(t,e){if(null!==t)switch(t[2]){case"s":e.add(t[1],"seconds");break;case"m":e.add(t[1],"minutes");break;case"h":e.add(t[1],"hours");break;case"d":e.add(t[1],"days");break;case"w":e.add(t[1],"weeks")}return e.toDate()},Br=function(t,e,n,r){r=r||!1,n=n.trim();var i=o()(n,e.trim(),!0);return i.isValid()?(r&&i.add(1,"d"),i.toDate()):Or(/^([\d]+)([wdhms])/.exec(n.trim()),o()(t))},Nr=0,Dr=function(t){return void 0===t?"task"+(Nr+=1):t},Lr=[],Ir={},Rr=function(t){var e=Ir[t];return Lr[e]},Fr=function(){for(var t=function(t){var e=Lr[t],n="";switch(Lr[t].raw.startTime.type){case"prevTaskEnd":var r=Rr(e.prevTaskId);e.startTime=r.endTime;break;case"getStartDate":(n=Mr(0,dr,Lr[t].raw.startTime.startData))&&(Lr[t].startTime=n)}return Lr[t].startTime&&(Lr[t].endTime=Br(Lr[t].startTime,dr,Lr[t].raw.endTime.data,wr),Lr[t].endTime&&(Lr[t].processed=!0,Lr[t].manualEndTime=o()(Lr[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Sr(Lr[t],dr,gr))),Lr[t].processed},e=!0,n=0;n<Lr.length;n++)t(n),e=e&&Lr[n].processed;return e},Pr=function(t,e){t.split(",").forEach((function(t){var n=Rr(t);void 0!==n&&n.classes.push(e)}))},jr=function(t,e){kr.push((function(){var n=document.querySelector('[id="'.concat(t,'"]'));null!==n&&n.addEventListener("click",(function(){e()}))})),kr.push((function(){var n=document.querySelector('[id="'.concat(t,'-text"]'));null!==n&&n.addEventListener("click",(function(){e()}))}))},Yr={parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().gantt},clear:function(){mr=[],br=[],xr="",kr=[],vr="",Nr=0,hr=void 0,fr=void 0,Lr=[],dr="",pr="",yr="",gr=[],wr=!1,Er=!1,Tr=0},setDateFormat:function(t){dr=t},getDateFormat:function(){return dr},enableInclusiveEndDates:function(){wr=!0},endDatesAreInclusive:function(){return wr},enableTopAxis:function(){Er=!0},topAxisEnabled:function(){return Er},setAxisFormat:function(t){pr=t},getAxisFormat:function(){return pr},setTodayMarker:function(t){yr=t},getTodayMarker:function(){return yr},setTitle:function(t){vr=t},getTitle:function(){return vr},addSection:function(t){xr=t,mr.push(t)},getSections:function(){return mr},getTasks:function(){for(var t=Fr(),e=0;!t&&e<10;)t=Fr(),e++;return br=Lr},addTask:function(t,e){var n={section:xr,type:xr,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};zr(n,r,_r);for(var i=0;i<n.length;i++)n[i]=n[i].trim();switch(n.length){case 1:r.id=Dr(),r.startTime={type:"prevTaskEnd",id:t},r.endTime={data:n[0]};break;case 2:r.id=Dr(),r.startTime={type:"getStartDate",startData:n[0]},r.endTime={data:n[1]};break;case 3:r.id=Dr(n[0]),r.startTime={type:"getStartDate",startData:n[1]},r.endTime={data:n[2]}}return r}(fr,e);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=fr,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.order=Tr,Tr++;var i=Lr.push(n);fr=n.id,Ir[n.id]=i-1},findTaskById:Rr,addTaskOrg:function(t,e){var n={section:xr,type:xr,description:t,task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};zr(n,r,_r);for(var i=0;i<n.length;i++)n[i]=n[i].trim();var a="";switch(n.length){case 1:r.id=Dr(),r.startTime=t.endTime,a=n[0];break;case 2:r.id=Dr(),r.startTime=Mr(0,dr,n[0]),a=n[1];break;case 3:r.id=Dr(n[0]),r.startTime=Mr(0,dr,n[1]),a=n[2]}return a&&(r.endTime=Br(r.startTime,dr,a,wr),r.manualEndTime=o()(a,"YYYY-MM-DD",!0).isValid(),Sr(r,dr,gr)),r}(hr,e);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,hr=n,br.push(n)},setExcludes:function(t){gr=t.toLowerCase().split(/[\s,]+/)},getExcludes:function(){return gr},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){if("loose"===xt().securityLevel&&void 0!==e){var r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var i=0;i<r.length;i++){var a=r[i].trim();'"'===a.charAt(0)&&'"'===a.charAt(a.length-1)&&(a=a.substr(1,a.length-2)),r[i]=a}}0===r.length&&r.push(t),void 0!==Rr(t)&&jr(t,(function(){W.runFunc.apply(W,[e].concat(lr(r)))}))}}(t,e,n)})),Pr(t,"clickable")},setLink:function(t,e){var n=e;"loose"!==xt().securityLevel&&(n=Object(y.sanitizeUrl)(e)),t.split(",").forEach((function(t){void 0!==Rr(t)&&jr(t,(function(){window.open(n,"_self")}))})),Pr(t,"clickable")},bindFunctions:function(t){kr.forEach((function(e){e(t)}))},durationToDate:Or};function zr(t,e,n){for(var r=!0;r;)r=!1,n.forEach((function(n){var i=new RegExp("^\\s*"+n+"\\s*$");t[0].match(i)&&(e[n]=!0,t.shift(1),r=!0)}))}var Ur=n(24),$r=n.n(Ur);Ur.parser.yy=Yr;var qr,Wr=function(){},Vr=function(t,e){var n=xt().gantt;Ur.parser.yy.clear(),Ur.parser.parse(t);var r=document.getElementById(e);void 0===(qr=r.parentElement.offsetWidth)&&(qr=1200),void 0!==n.useWidth&&(qr=n.useWidth);var i=Ur.parser.yy.getTasks(),a=i.length*(n.barHeight+n.barGap)+2*n.topPadding;r.setAttribute("viewBox","0 0 "+qr+" "+a);for(var o=Object(h.select)('[id="'.concat(e,'"]')),s=Object(h.scaleTime)().domain([Object(h.min)(i,(function(t){return t.startTime})),Object(h.max)(i,(function(t){return t.endTime}))]).rangeRound([0,qr-n.leftPadding-n.rightPadding]),c=[],u=0;u<i.length;u++)c.push(i[u].type);var l=c;function f(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}c=function(t){for(var e={},n=[],r=0,i=t.length;r<i;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}(c),i.sort((function(t,e){var n=t.startTime,r=e.startTime,i=0;return n>r?i=1:n<r&&(i=-1),i})),function(t,e,r){var i=n.barHeight,a=i+n.barGap,u=n.topPadding,d=n.leftPadding;Object(h.scaleLinear)().domain([0,c.length]).range(["#00B9FA","#F95002"]).interpolate(h.interpolateHcl);(function(t,e,r,i){var a=Object(h.axisBottom)(s).tickSize(-i+e+n.gridLineStartPadding).tickFormat(Object(h.timeFormat)(Ur.parser.yy.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));if(o.append("g").attr("class","grid").attr("transform","translate("+t+", "+(i-50)+")").call(a).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),Yr.topAxisEnabled()||n.topAxis){var c=Object(h.axisTop)(s).tickSize(-i+e+n.gridLineStartPadding).tickFormat(Object(h.timeFormat)(Ur.parser.yy.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));o.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(c).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}})(d,u,0,r),function(t,e,r,i,a,u,l){o.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",(function(t,n){return t.order*e+r-2})).attr("width",(function(){return l-n.rightPadding/2})).attr("height",e).attr("class",(function(t){for(var e=0;e<c.length;e++)if(t.type===c[e])return"section section"+e%n.numberSectionStyles;return"section section0"}));var h=o.append("g").selectAll("rect").data(t).enter();h.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?s(t.startTime)+i+.5*(s(t.endTime)-s(t.startTime))-.5*a:s(t.startTime)+i})).attr("y",(function(t,n){return t.order*e+r})).attr("width",(function(t){return t.milestone?a:s(t.renderEndTime||t.endTime)-s(t.startTime)})).attr("height",a).attr("transform-origin",(function(t,n){return n=t.order,(s(t.startTime)+i+.5*(s(t.endTime)-s(t.startTime))).toString()+"px "+(n*e+r+.5*a).toString()+"px"})).attr("class",(function(t){var e="";t.classes.length>0&&(e=t.classes.join(" "));for(var r=0,i=0;i<c.length;i++)t.type===c[i]&&(r=i%n.numberSectionStyles);var a="";return t.active?t.crit?a+=" activeCrit":a=" active":t.done?a=t.crit?" doneCrit":" done":t.crit&&(a+=" crit"),0===a.length&&(a=" task"),t.milestone&&(a=" milestone "+a),a+=r,"task"+(a+=" "+e)})),h.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",n.fontSize).attr("x",(function(t){var e=s(t.startTime),r=s(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(s(t.endTime)-s(t.startTime))-.5*a),t.milestone&&(r=e+a);var o=this.getBBox().width;return o>r-e?r+o+1.5*n.leftPadding>l?e+i-5:r+i+5:(r-e)/2+e+i})).attr("y",(function(t,i){return t.order*e+n.barHeight/2+(n.fontSize/2-2)+r})).attr("text-height",a).attr("class",(function(t){var e=s(t.startTime),r=s(t.endTime);t.milestone&&(r=e+a);var i=this.getBBox().width,o="";t.classes.length>0&&(o=t.classes.join(" "));for(var u=0,h=0;h<c.length;h++)t.type===c[h]&&(u=h%n.numberSectionStyles);var f="";return t.active&&(f=t.crit?"activeCritText"+u:"activeText"+u),t.done?f=t.crit?f+" doneCritText"+u:f+" doneText"+u:t.crit&&(f=f+" critText"+u),t.milestone&&(f+=" milestoneText"),i>r-e?r+i+1.5*n.leftPadding>l?o+" taskTextOutsideLeft taskTextOutside"+u+" "+f:o+" taskTextOutsideRight taskTextOutside"+u+" "+f+" width-"+i:o+" taskText taskText"+u+" "+f+" width-"+i}))}(t,a,u,d,i,0,e),function(t,e){for(var r=[],i=0,a=0;a<c.length;a++)r[a]=[c[a],(s=c[a],u=l,f(u)[s]||0)];var s,u;o.append("g").selectAll("text").data(r).enter().append((function(t){var e=t[0].split(x.lineBreakRegex),n=-(e.length-1)/2,r=document.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("dy",n+"em");for(var i=0;i<e.length;i++){var a=document.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttribute("alignment-baseline","central"),a.setAttribute("x","10"),i>0&&a.setAttribute("dy","1em"),a.textContent=e[i],r.appendChild(a)}return r})).attr("x",10).attr("y",(function(n,a){if(!(a>0))return n[1]*t/2+e;for(var o=0;o<a;o++)return i+=r[a-1][1],n[1]*t/2+i*t+e})).attr("font-size",n.sectionFontSize).attr("font-size",n.sectionFontSize).attr("class",(function(t){for(var e=0;e<c.length;e++)if(t[0]===c[e])return"sectionTitle sectionTitle"+e%n.numberSectionStyles;return"sectionTitle"}))}(a,u),function(t,e,r,i){var a=Yr.getTodayMarker();if("off"===a)return;var c=o.append("g").attr("class","today"),u=new Date,l=c.append("line");l.attr("x1",s(u)+t).attr("x2",s(u)+t).attr("y1",n.titleTopMargin).attr("y2",i-n.titleTopMargin).attr("class","today"),""!==a&&l.attr("style",a.replace(/,/g,";"))}(d,0,0,r)}(i,qr,a),q(o,a,qr,n.useMaxWidth),o.append("text").text(Ur.parser.yy.getTitle()).attr("x",qr/2).attr("y",n.titleTopMargin).attr("class","titleText")},Hr={},Gr=null,Xr={master:Gr},Zr="master",Qr="LR",Kr=0;function Jr(){return R({length:7})}function ti(t,e){for(c.debug("Entering isfastforwardable:",t.id,e.id);t.seq<=e.seq&&t!==e&&null!=e.parent;){if(Array.isArray(e.parent))return c.debug("In merge commit:",e.parent),ti(t,Hr[e.parent[0]])||ti(t,Hr[e.parent[1]]);e=Hr[e.parent]}return c.debug(t.id,e.id),t.id===e.id}var ei={};function ni(t,e,n){var r=t.indexOf(e);-1===r?t.push(n):t.splice(r,1,n)}function ri(t){var e=t.reduce((function(t,e){return t.seq>e.seq?t:e}),t[0]),n="";t.forEach((function(t){n+=t===e?"\t*":"\t|"}));var r,i,a,o=[n,e.id,e.seq];for(var s in Xr)Xr[s]===e.id&&o.push(s);if(c.debug(o.join(" ")),Array.isArray(e.parent)){var u=Hr[e.parent[0]];ni(t,e,u),t.push(Hr[e.parent[1]])}else{if(null==e.parent)return;var l=Hr[e.parent];ni(t,e,l)}r=t,i=function(t){return t.id},a=Object.create(null),ri(t=r.reduce((function(t,e){var n=i(e);return a[n]||(a[n]=!0,t.push(e)),t}),[]))}var ii,ai=function(){var t=Object.keys(Hr).map((function(t){return Hr[t]}));return t.forEach((function(t){c.debug(t.id)})),t.sort((function(t,e){return e.seq-t.seq})),t},oi={setDirection:function(t){Qr=t},setOptions:function(t){c.debug("options str",t),t=(t=t&&t.trim())||"{}";try{ei=JSON.parse(t)}catch(t){c.error("error while parsing gitGraph options",t.message)}},getOptions:function(){return ei},commit:function(t){var e={id:Jr(),message:t,seq:Kr++,parent:null==Gr?null:Gr.id};Gr=e,Hr[e.id]=e,Xr[Zr]=e.id,c.debug("in pushCommit "+e.id)},branch:function(t){Xr[t]=null!=Gr?Gr.id:null,c.debug("in createBranch")},merge:function(t){var e=Hr[Xr[Zr]],n=Hr[Xr[t]];if(function(t,e){return t.seq>e.seq&&ti(e,t)}(e,n))c.debug("Already merged");else{if(ti(e,n))Xr[Zr]=Xr[t],Gr=Hr[Xr[Zr]];else{var r={id:Jr(),message:"merged branch "+t+" into "+Zr,seq:Kr++,parent:[null==Gr?null:Gr.id,Xr[t]]};Gr=r,Hr[r.id]=r,Xr[Zr]=r.id}c.debug(Xr),c.debug("in mergeBranch")}},checkout:function(t){c.debug("in checkout");var e=Xr[Zr=t];Gr=Hr[e]},reset:function(t){c.debug("in reset",t);var e=t.split(":")[0],n=parseInt(t.split(":")[1]),r="HEAD"===e?Gr:Hr[Xr[e]];for(c.debug(r,n);n>0;)if(n--,!(r=Hr[r.parent])){var i="Critical error - unique parent commit not found during reset";throw c.error(i),i}Gr=r,Xr[Zr]=r.id},prettyPrint:function(){c.debug(Hr),ri([ai()[0]])},clear:function(){Hr={},Xr={master:Gr=null},Zr="master",Kr=0},getBranchesAsObjArray:function(){var t=[];for(var e in Xr)t.push({name:e,commit:Hr[Xr[e]]});return t},getBranches:function(){return Xr},getCommits:function(){return Hr},getCommitsArray:ai,getCurrentBranch:function(){return Zr},getDirection:function(){return Qr},getHead:function(){return Gr}},si=n(72),ci=n.n(si),ui={},li={nodeSpacing:150,nodeFillColor:"yellow",nodeStrokeWidth:2,nodeStrokeColor:"grey",lineStrokeWidth:4,branchOffset:50,lineColor:"grey",leftMargin:50,branchColors:["#442f74","#983351","#609732","#AA9A39"],nodeRadius:10,nodeLabel:{width:75,height:100,x:-25,y:0}},hi={};function fi(t,e,n,r){var i=B(r,h.curveBasis),a=li.branchColors[n%li.branchColors.length],o=Object(h.line)().x((function(t){return Math.round(t.x)})).y((function(t){return Math.round(t.y)})).curve(i);t.append("svg:path").attr("d",o(e)).style("stroke",a).style("stroke-width",li.lineStrokeWidth).style("fill","none")}function di(t,e){e=e||t.node().getBBox();var n=t.node().getCTM();return{left:n.e+e.x*n.a,top:n.f+e.y*n.d,width:e.width,height:e.height}}function pi(t,e,n,r,i){c.debug("svgDrawLineForCommits: ",e,n);var a=di(t.select("#node-"+e+" circle")),o=di(t.select("#node-"+n+" circle"));switch(r){case"LR":if(a.left-o.left>li.nodeSpacing){var s={x:a.left-li.nodeSpacing,y:o.top+o.height/2};fi(t,[s,{x:o.left+o.width,y:o.top+o.height/2}],i,"linear"),fi(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-li.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-li.nodeSpacing/2,y:s.y},s],i)}else fi(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-li.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-li.nodeSpacing/2,y:o.top+o.height/2},{x:o.left+o.width,y:o.top+o.height/2}],i);break;case"BT":if(o.top-a.top>li.nodeSpacing){var u={x:o.left+o.width/2,y:a.top+a.height+li.nodeSpacing};fi(t,[u,{x:o.left+o.width/2,y:o.top}],i,"linear"),fi(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+a.height+li.nodeSpacing/2},{x:o.left+o.width/2,y:u.y-li.nodeSpacing/2},u],i)}else fi(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+li.nodeSpacing/2},{x:o.left+o.width/2,y:o.top-li.nodeSpacing/2},{x:o.left+o.width/2,y:o.top}],i)}}function yi(t,e){return t.select(e).node().cloneNode(!0)}function gi(t,e,n,r){var i,a=Object.keys(ui).length;if("string"==typeof e)do{if(i=ui[e],c.debug("in renderCommitHistory",i.id,i.seq),t.select("#node-"+e).size()>0)return;t.append((function(){return yi(t,"#def-commit")})).attr("class","commit").attr("id",(function(){return"node-"+i.id})).attr("transform",(function(){switch(r){case"LR":return"translate("+(i.seq*li.nodeSpacing+li.leftMargin)+", "+ii*li.branchOffset+")";case"BT":return"translate("+(ii*li.branchOffset+li.leftMargin)+", "+(a-i.seq)*li.nodeSpacing+")"}})).attr("fill",li.nodeFillColor).attr("stroke",li.nodeStrokeColor).attr("stroke-width",li.nodeStrokeWidth);var o=void 0;for(var s in n)if(n[s].commit===i){o=n[s];break}o&&(c.debug("found branch ",o.name),t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","branch-label").text(o.name+", ")),t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","commit-id").text(i.id),""!==i.message&&"BT"===r&&t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","commit-msg").text(", "+i.message),e=i.parent}while(e&&ui[e]);Array.isArray(e)&&(c.debug("found merge commmit",e),gi(t,e[0],n,r),ii++,gi(t,e[1],n,r),ii--)}function vi(t,e,n,r){for(r=r||0;e.seq>0&&!e.lineDrawn;)"string"==typeof e.parent?(pi(t,e.id,e.parent,n,r),e.lineDrawn=!0,e=ui[e.parent]):Array.isArray(e.parent)&&(pi(t,e.id,e.parent[0],n,r),pi(t,e.id,e.parent[1],n,r+1),vi(t,ui[e.parent[1]],n,r+1),e.lineDrawn=!0,e=ui[e.parent[0]])}var mi,bi=function(t){hi=t},xi=function(t,e,n){try{var r=ci.a.parser;r.yy=oi,r.yy.clear(),c.debug("in gitgraph renderer",t+"\n","id:",e,n),r.parse(t+"\n"),li=Object.assign(li,hi,oi.getOptions()),c.debug("effective options",li);var i=oi.getDirection();ui=oi.getCommits();var a=oi.getBranchesAsObjArray();"BT"===i&&(li.nodeLabel.x=a.length*li.branchOffset,li.nodeLabel.width="100%",li.nodeLabel.y=-2*li.nodeRadius);var o=Object(h.select)('[id="'.concat(e,'"]'));for(var s in function(t){t.append("defs").append("g").attr("id","def-commit").append("circle").attr("r",li.nodeRadius).attr("cx",0).attr("cy",0),t.select("#def-commit").append("foreignObject").attr("width",li.nodeLabel.width).attr("height",li.nodeLabel.height).attr("x",li.nodeLabel.x).attr("y",li.nodeLabel.y).attr("class","node-label").attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").append("p").html("")}(o),ii=1,a){var u=a[s];gi(o,u.commit.id,a,i),vi(o,u.commit,i),ii++}o.attr("height",(function(){return"BT"===i?Object.keys(ui).length*li.nodeSpacing:(a.length+1)*li.branchOffset}))}catch(t){c.error("Error while rendering gitgraph"),c.error(t.message)}},_i="",ki=!1,wi={setMessage:function(t){c.debug("Setting message to: "+t),_i=t},getMessage:function(){return _i},setInfo:function(t){ki=t},getInfo:function(){return ki}},Ei=n(73),Ti=n.n(Ei),Ci={},Si=function(t){Object.keys(t).forEach((function(e){Ci[e]=t[e]}))},Ai=function(t,e,n){try{var r=Ti.a.parser;r.yy=wi,c.debug("Renering info diagram\n"+t),r.parse(t),c.debug("Parsed info diagram");var i=Object(h.select)("#"+e);i.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+n),i.attr("height",100),i.attr("width",400)}catch(t){c.error("Error while rendering info diagram"),c.error(t.message)}},Mi=n(74),Oi=n.n(Mi),Bi={},Ni="",Di=!1,Li={parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().pie},addSection:function(t,e){void 0===Bi[t]&&(Bi[t]=e,c.debug("Added new section :",t))},getSections:function(){return Bi},cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){Bi={},Ni="",Di=!1},setTitle:function(t){Ni=t},getTitle:function(){return Ni},setShowData:function(t){Di=t},getShowData:function(){return Di}},Ii=xt(),Ri=function(t,e){try{Ii=xt();var n=Oi.a.parser;n.yy=Li,c.debug("Rendering info diagram\n"+t),n.yy.clear(),n.parse(t),c.debug("Parsed info diagram");var r=document.getElementById(e);void 0===(mi=r.parentElement.offsetWidth)&&(mi=1200),void 0!==Ii.useWidth&&(mi=Ii.useWidth),void 0!==Ii.pie.useWidth&&(mi=Ii.pie.useWidth);var i=Object(h.select)("#"+e);q(i,450,mi,Ii.pie.useMaxWidth),r.setAttribute("viewBox","0 0 "+mi+" 450");var a=Math.min(mi,450)/2-40,o=i.append("g").attr("transform","translate("+mi/2+",225)"),s=Li.getSections(),u=0;Object.keys(s).forEach((function(t){u+=s[t]}));var l=Ii.themeVariables,f=[l.pie1,l.pie2,l.pie3,l.pie4,l.pie5,l.pie6,l.pie7,l.pie8,l.pie9,l.pie10,l.pie11,l.pie12],d=Object(h.scaleOrdinal)().domain(s).range(f),p=Object(h.pie)().value((function(t){return t.value}))(Object(h.entries)(s)),y=Object(h.arc)().innerRadius(0).outerRadius(a);o.selectAll("mySlices").data(p).enter().append("path").attr("d",y).attr("fill",(function(t){return d(t.data.key)})).attr("class","pieCircle"),o.selectAll("mySlices").data(p.filter((function(t){return 0!==t.data.value}))).enter().append("text").text((function(t){return(t.data.value/u*100).toFixed(0)+"%"})).attr("transform",(function(t){return"translate("+y.centroid(t)+")"})).style("text-anchor","middle").attr("class","slice"),o.append("text").text(n.yy.getTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");var g=o.selectAll(".legend").data(d.domain()).enter().append("g").attr("class","legend").attr("transform",(function(t,e){return"translate(216,"+(22*e-22*d.domain().length/2)+")"}));g.append("rect").attr("width",18).attr("height",18).style("fill",d).style("stroke",d),g.data(p.filter((function(t){return 0!==t.data.value}))).append("text").attr("x",22).attr("y",14).text((function(t){return n.yy.getShowData()||Ii.showData||Ii.pie.showData?t.data.key+" ["+t.data.value+"]":t.data.key}))}catch(t){c.error("Error while rendering info diagram"),c.error(t)}},Fi=n(45),Pi=n.n(Fi),ji=[],Yi={},zi={},Ui={},$i={},qi={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().req},addRequirement:function(t,e){return void 0===zi[t]&&(zi[t]={name:t,type:e,id:Yi.id,text:Yi.text,risk:Yi.risk,verifyMethod:Yi.verifyMethod}),Yi={},zi[t]},getRequirements:function(){return zi},setNewReqId:function(t){void 0!==Yi&&(Yi.id=t)},setNewReqText:function(t){void 0!==Yi&&(Yi.text=t)},setNewReqRisk:function(t){void 0!==Yi&&(Yi.risk=t)},setNewReqVerifyMethod:function(t){void 0!==Yi&&(Yi.verifyMethod=t)},addElement:function(t){return void 0===$i[t]&&($i[t]={name:t,type:Ui.type,docRef:Ui.docRef},c.info("Added new requirement: ",t)),Ui={},$i[t]},getElements:function(){return $i},setNewElementType:function(t){void 0!==Ui&&(Ui.type=t)},setNewElementDocRef:function(t){void 0!==Ui&&(Ui.docRef=t)},addRelationship:function(t,e,n){ji.push({type:t,src:e,dst:n})},getRelationships:function(){return ji},clear:function(){ji=[],Yi={},zi={},Ui={},$i={}}},Wi={CONTAINS:"contains",ARROW:"arrow"},Vi=Wi,Hi=function(t,e){var n=t.append("defs").append("marker").attr("id",Wi.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");n.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),n.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),n.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",Wi.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d","M0,0\n L".concat(e.line_height,",").concat(e.line_height/2,"\n M").concat(e.line_height,",").concat(e.line_height/2,"\n L0,").concat(e.line_height)).attr("stroke-width",1)},Gi={},Xi=0,Zi=function(t,e){return t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",Gi.rect_min_width+"px").attr("height",Gi.rect_min_height+"px")},Qi=function(t,e,n){var r=Gi.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",r).attr("y",Gi.rect_padding).attr("dominant-baseline","hanging"),a=0;n.forEach((function(t){0==a?i.append("tspan").attr("text-anchor","middle").attr("x",Gi.rect_min_width/2).attr("dy",0).text(t):i.append("tspan").attr("text-anchor","middle").attr("x",Gi.rect_min_width/2).attr("dy",.75*Gi.line_height).text(t),a++}));var o=1.5*Gi.rect_padding+a*Gi.line_height*.75;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",Gi.rect_min_width).attr("y1",o).attr("y2",o),{titleNode:i,y:o}},Ki=function(t,e,n,r){var i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",Gi.rect_padding).attr("y",r).attr("dominant-baseline","hanging"),a=0,o=[];return n.forEach((function(t){for(var e=t.length;e>30&&a<3;){var n=t.substring(0,30);e=(t=t.substring(30,t.length)).length,o[o.length]=n,a++}if(3==a){var r=o[o.length-1];o[o.length-1]=r.substring(0,r.length-4)+"..."}else o[o.length]=t;a=0})),o.forEach((function(t){i.append("tspan").attr("x",Gi.rect_padding).attr("dy",Gi.line_height).text(t)})),i},Ji=function(t,e,n,r){var i=n.edge(ta(e.src),ta(e.dst)),a=Object(h.line)().x((function(t){return t.x})).y((function(t){return t.y})),o=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",a(i.points)).attr("fill","none");e.type==qi.Relationships.CONTAINS?o.attr("marker-start","url("+x.getUrl(Gi.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+x.getUrl(Gi.arrowMarkerAbsolute)+"#"+Vi.ARROW+"_line_ending)")),function(t,e,n,r){var i=e.node().getTotalLength(),a=e.node().getPointAtLength(.5*i),o="rel"+Xi;Xi++;var s=t.append("text").attr("class","req relationshipLabel").attr("id",o).attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(r).node().getBBox();t.insert("rect","#"+o).attr("class","req reqLabelBox").attr("x",a.x-s.width/2).attr("y",a.y-s.height/2).attr("width",s.width).attr("height",s.height).attr("fill","white").attr("fill-opacity","85%")}(t,o,0,"<<".concat(e.type,">>"))},ta=function(t){return t.replace(/\s/g,"").replace(/\./g,"_")},ea=function(t){if(void 0!==t)for(var e=Object.keys(t),n=0;n<e.length;n++)Gi[e[n]]=t[e[n]]},na=function(t,e){Fi.parser.yy=qi,Fi.parser.yy.clear(),Fi.parser.parse(t);var n=Object(h.select)("[id='".concat(e,"']"));Hi(n,Gi);var r,i,a,o=new zt.a.Graph({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:Gi.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}})),s=qi.getRequirements(),u=qi.getElements(),l=qi.getRelationships();r=s,i=o,a=n,Object.keys(r).forEach((function(t){var e=r[t];t=ta(t),c.info("Added new requirement: ",t);var n=a.append("g").attr("id",t),o=Zi(n,"req-"+t),s=[],u=Qi(n,t+"_title",["<<".concat(e.type,">>"),"".concat(e.name)]);s.push(u.titleNode);var l=Ki(n,t+"_body",["Id: ".concat(e.id),"Text: ".concat(e.text),"Risk: ".concat(e.risk),"Verification: ".concat(e.verifyMethod)],u.y);s.push(l);var h=o.node().getBBox();i.setNode(t,{width:h.width,height:h.height,shape:"rect",id:t})})),function(t,e,n){Object.keys(t).forEach((function(r){var i=t[r],a=ta(r),o=n.append("g").attr("id",a),s="element-"+a,c=Zi(o,s),u=[],l=Qi(o,s+"_title",["<<Element>>","".concat(r)]);u.push(l.titleNode);var h=Ki(o,s+"_body",["Type: ".concat(i.type||"Not Specified"),"Doc Ref: ".concat(i.docRef||"None")],l.y);u.push(h);var f=c.node().getBBox();e.setNode(a,{width:f.width,height:f.height,shape:"rect",id:a})}))}(u,o,n),function(t,e){t.forEach((function(t){var n=ta(t.src),r=ta(t.dst);e.setEdge(n,r,{relationship:t})}))}(l,o),jt.a.layout(o),function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&(t.select("#"+n),t.select("#"+n).attr("transform","translate("+(e.node(n).x-e.node(n).width/2)+","+(e.node(n).y-e.node(n).height/2)+" )"))}))}(n,o),l.forEach((function(t){Ji(n,t,o,e)}));var f=Gi.rect_padding,d=n.node().getBBox(),p=d.width+2*f,y=d.height+2*f;q(n,y,p,Gi.useMaxWidth),n.attr("viewBox","".concat(d.x-f," ").concat(d.y-f," ").concat(p," ").concat(y))},ra=n(2),ia=n.n(ra),aa=void 0,oa={},sa=[],ca=[],ua="",la=!1,ha=!1,fa=!1,da=function(t,e,n){var r=oa[t];r&&e===r.name&&null==n||(null!=n&&null!=n.text||(n={text:e,wrap:null}),oa[t]={name:e,description:n.text,wrap:void 0===n.wrap&&ga()||!!n.wrap,prevActor:aa},aa&&oa[aa]&&(oa[aa].nextActor=t),aa=t)},pa=function(t){var e,n=0;for(e=0;e<sa.length;e++)sa[e].type===va.ACTIVE_START&&sa[e].from.actor===t&&n++,sa[e].type===va.ACTIVE_END&&sa[e].from.actor===t&&n--;return n},ya=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{text:void 0,wrap:void 0},r=arguments.length>3?arguments[3]:void 0;if(r===va.ACTIVE_END){var i=pa(t.actor);if(i<1){var a=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw a.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a}}return sa.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&ga()||!!n.wrap,type:r}),!0},ga=function(){return fa},va={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ma=function(t,e,n){var r={actor:t,placement:e,message:n.text,wrap:void 0===n.wrap&&ga()||!!n.wrap},i=[].concat(t,t);ca.push(r),sa.push({from:i[0],to:i[1],message:n.text,wrap:void 0===n.wrap&&ga()||!!n.wrap,type:va.NOTE,placement:e})},ba=function(t){ua=t.text,la=void 0===t.wrap&&ga()||!!t.wrap},xa={addActor:da,addMessage:function(t,e,n,r){sa.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&ga()||!!n.wrap,answer:r})},addSignal:ya,autoWrap:ga,setWrap:function(t){fa=t},enableSequenceNumbers:function(){ha=!0},showSequenceNumbers:function(){return ha},getMessages:function(){return sa},getActors:function(){return oa},getActor:function(t){return oa[t]},getActorKeys:function(){return Object.keys(oa)},getTitle:function(){return ua},parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().sequence},getTitleWrapped:function(){return la},clear:function(){oa={},sa=[]},parseMessage:function(t){var e=t.trim(),n={text:e.replace(/^[:]?(?:no)?wrap:/,"").trim(),wrap:null!==e.match(/^[:]?wrap:/)||null===e.match(/^[:]?nowrap:/)&&void 0};return c.debug("parseMessage:",n),n},LINETYPE:va,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:ma,setTitle:ba,apply:function t(e){if(e instanceof Array)e.forEach((function(e){t(e)}));else switch(e.type){case"addActor":da(e.actor,e.actor,e.description);break;case"activeStart":case"activeEnd":ya(e.actor,void 0,void 0,e.signalType);break;case"addNote":ma(e.actor,e.placement,e.text);break;case"addMessage":ya(e.from,e.to,e.msg,e.signalType);break;case"loopStart":ya(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":ya(void 0,void 0,void 0,e.signalType);break;case"rectStart":ya(void 0,void 0,e.color,e.signalType);break;case"rectEnd":ya(void 0,void 0,void 0,e.signalType);break;case"optStart":ya(void 0,void 0,e.optText,e.signalType);break;case"optEnd":ya(void 0,void 0,void 0,e.signalType);break;case"altStart":case"else":ya(void 0,void 0,e.altText,e.signalType);break;case"altEnd":ya(void 0,void 0,void 0,e.signalType);break;case"setTitle":ba(e.text);break;case"parStart":case"and":ya(void 0,void 0,e.parText,e.signalType);break;case"parEnd":ya(void 0,void 0,void 0,e.signalType)}}},_a=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},ka=function(t,e){var n=0,r=0,i=e.text.split(x.lineBreakRegex),a=[],o=0,s=function(){return e.y};if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":s=function(){return Math.round(e.y+e.textMargin)};break;case"middle":case"center":s=function(){return Math.round(e.y+(n+r+e.textMargin)/2)};break;case"bottom":case"end":s=function(){return Math.round(e.y+(n+r+2*e.textMargin)-e.textMargin)}}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="text-after-edge",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="text-before-edge",e.alignmentBaseline="middle"}for(var c=0;c<i.length;c++){var u=i[c];void 0!==e.textMargin&&0===e.textMargin&&void 0!==e.fontSize&&(o=c*e.fontSize);var l=t.append("text");if(l.attr("x",e.x),l.attr("y",s()),void 0!==e.anchor&&l.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&l.style("font-family",e.fontFamily),void 0!==e.fontSize&&l.style("font-size",e.fontSize),void 0!==e.fontWeight&&l.style("font-weight",e.fontWeight),void 0!==e.fill&&l.attr("fill",e.fill),void 0!==e.class&&l.attr("class",e.class),void 0!==e.dy?l.attr("dy",e.dy):0!==o&&l.attr("dy",o),e.tspan){var h=l.append("tspan");h.attr("x",e.x),void 0!==e.fill&&h.attr("fill",e.fill),h.text(u)}else l.text(u);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(l._groups||l)[0][0].getBBox().height,n=r),a.push(l)}return a},wa=function(t,e){var n,r,i,a,o,s=t.append("polygon");return s.attr("points",(n=e.x,r=e.y,i=e.width,a=e.height,n+","+r+" "+(n+i)+","+r+" "+(n+i)+","+(r+a-(o=7))+" "+(n+i-1.2*o)+","+(r+a)+" "+n+","+(r+a))),s.attr("class","labelBox"),e.y=e.y+e.height/2,ka(t,e),s},Ea=-1,Ta=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},Ca=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},Sa=function(){function t(t,e,n,i,a,o,s){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c){for(var u=c.actorFontSize,l=c.actorFontFamily,h=c.actorFontWeight,f=t.split(x.lineBreakRegex),d=0;d<f.length;d++){var p=d*u-u*(f.length-1)/2,y=e.append("text").attr("x",n+a/2).attr("y",i).style("text-anchor","middle").style("font-size",u).style("font-weight",h).style("font-family",l);y.append("tspan").attr("x",n+a/2).attr("dy",p).text(f[d]),y.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(y,s)}}function n(t,n,i,a,o,s,c,u){var l=n.append("switch"),h=l.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).append("div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,i,a,o,s,c,u),r(h,c)}function r(t,e){for(var n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),Aa={drawRect:_a,drawText:ka,drawLabel:wa,drawActor:function(t,e,n){var r=e.x+e.width/2,i=t.append("g");0===e.y&&(Ea++,i.append("line").attr("id","actor"+Ea).attr("x1",r).attr("y1",5).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));var a=Ca();a.x=e.x,a.y=e.y,a.fill="#eaeaea",a.width=e.width,a.height=e.height,a.class="actor",a.rx=3,a.ry=3,_a(i,a),Sa(n)(e.description,i,a.x,a.y,a.width,a.height,{class:"actor"},n)},anchorElement:function(t){return t.append("g")},drawActivation:function(t,e,n,r,i){var a=Ca(),o=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=n-e.starty,_a(o,a)},drawLoop:function(t,e,n,r){var i=r.boxMargin,a=r.boxTextMargin,o=r.labelBoxHeight,s=r.labelBoxWidth,c=r.messageFontFamily,u=r.messageFontSize,l=r.messageFontWeight,h=t.append("g"),f=function(t,e,n,r){return h.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("class","loopLine")};f(e.startx,e.starty,e.stopx,e.starty),f(e.stopx,e.starty,e.stopx,e.stopy),f(e.startx,e.stopy,e.stopx,e.stopy),f(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){f(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));var d=Ta();d.text=n,d.x=e.startx,d.y=e.starty,d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.anchor="middle",d.valign="middle",d.tspan=!1,d.width=s||50,d.height=o||20,d.textMargin=a,d.class="labelText",wa(h,d),(d=Ta()).text=e.title,d.x=e.startx+s/2+(e.stopx-e.startx)/2,d.y=e.starty+i+a,d.anchor="middle",d.valign="middle",d.textMargin=a,d.class="loopText",d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.wrap=!0;var p=ka(h,d);return void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,n){if(t.message){d.text=t.message,d.x=e.startx+(e.stopx-e.startx)/2,d.y=e.sections[n].y+i+a,d.class="loopText",d.anchor="middle",d.valign="middle",d.tspan=!1,d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.wrap=e.wrap,p=ka(h,d);var r=Math.round(p.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));e.sections[n].height+=r-(i+a)}})),e.height=Math.round(e.stopy-e.starty),h},drawBackgroundRect:function(t,e){_a(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},insertArrowHead:function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},insertArrowFilledHead:function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},insertSequenceNumber:function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},insertArrowCrossHead:function(t){var e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},getTextObj:Ta,getNoteRect:Ca};ra.parser.yy=xa;var Ma={},Oa={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((function(t){return t.height||0})))+(0===this.loops.length?0:this.loops.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.messages.length?0:this.messages.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.notes.length?0:this.notes.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))},clear:function(){this.actors=[],this.loops=[],this.messages=[],this.notes=[]},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Ia(ra.parser.yy.getConfig())},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i=this,a=0;function o(o){return function(s){a++;var c=i.sequenceItems.length-a+1;i.updateVal(s,"starty",e-c*Ma.boxMargin,Math.min),i.updateVal(s,"stopy",r+c*Ma.boxMargin,Math.max),i.updateVal(Oa.data,"startx",t-c*Ma.boxMargin,Math.min),i.updateVal(Oa.data,"stopx",n+c*Ma.boxMargin,Math.max),"activation"!==o&&(i.updateVal(s,"startx",t-c*Ma.boxMargin,Math.min),i.updateVal(s,"stopx",n+c*Ma.boxMargin,Math.max),i.updateVal(Oa.data,"starty",e-c*Ma.boxMargin,Math.min),i.updateVal(Oa.data,"stopy",r+c*Ma.boxMargin,Math.max))}}this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(Oa.data,"startx",i,Math.min),this.updateVal(Oa.data,"starty",o,Math.min),this.updateVal(Oa.data,"stopx",a,Math.max),this.updateVal(Oa.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},newActivation:function(t,e,n){var r=n[t.from.actor],i=Ra(t.from.actor).length||0,a=r.x+r.width/2+(i-1)*Ma.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+Ma.activationWidth,stopy:void 0,actor:t.from.actor,anchored:Aa.anchorElement(e)})},endActivation:function(t){var e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Oa.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},Ba=function(t){return{fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}},Na=function(t){return{fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}},Da=function(t){return{fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}},La=function(t,e,n,r){for(var i=0,a=0,o=0;o<n.length;o++){var s=e[n[o]];s.width=s.width||Ma.width,s.height=Math.max(s.height||Ma.height,Ma.height),s.margin=s.margin||Ma.actorMargin,s.x=i+a,s.y=r,Aa.drawActor(t,s,Ma),Oa.insert(s.x,r,s.x+s.width,s.height),i+=s.width,a+=s.margin,Oa.models.addActor(s)}Oa.bumpVerticalPos(Ma.height)},Ia=function(t){F(Ma,t),t.fontFamily&&(Ma.actorFontFamily=Ma.noteFontFamily=Ma.messageFontFamily=t.fontFamily),t.fontSize&&(Ma.actorFontSize=Ma.noteFontSize=Ma.messageFontSize=t.fontSize),t.fontWeight&&(Ma.actorFontWeight=Ma.noteFontWeight=Ma.messageFontWeight=t.fontWeight)},Ra=function(t){return Oa.activations.filter((function(e){return e.actor===t}))},Fa=function(t,e){var n=e[t],r=Ra(t);return[r.reduce((function(t,e){return Math.min(t,e.startx)}),n.x+n.width/2),r.reduce((function(t,e){return Math.max(t,e.stopx)}),n.x+n.width/2)]};function Pa(t,e,n,r,i){Oa.bumpVerticalPos(n);var a=r;if(e.id&&e.message&&t[e.id]){var o=t[e.id].width,s=Ba(Ma);e.message=W.wrapLabel("[".concat(e.message,"]"),o-2*Ma.wrapPadding,s),e.width=o,e.wrap=!0;var u=W.calculateTextDimensions(e.message,s),l=Math.max(u.height,Ma.labelBoxHeight);a=r+l,c.debug("".concat(l," - ").concat(e.message))}i(e),Oa.bumpVerticalPos(a)}var ja=function(t,e){var n={};return e.forEach((function(e){if(t[e.to]&&t[e.from]){var r=t[e.to];if(e.placement===ra.parser.yy.PLACEMENT.LEFTOF&&!r.prevActor)return;if(e.placement===ra.parser.yy.PLACEMENT.RIGHTOF&&!r.nextActor)return;var i=void 0!==e.placement,a=!i,o=i?Na(Ma):Ba(Ma),s=e.wrap?W.wrapLabel(e.message,Ma.width-2*Ma.wrapPadding,o):e.message,c=W.calculateTextDimensions(s,o).width+2*Ma.wrapPadding;a&&e.from===r.nextActor?n[e.to]=Math.max(n[e.to]||0,c):a&&e.from===r.prevActor?n[e.from]=Math.max(n[e.from]||0,c):a&&e.from===e.to?(n[e.from]=Math.max(n[e.from]||0,c/2),n[e.to]=Math.max(n[e.to]||0,c/2)):e.placement===ra.parser.yy.PLACEMENT.RIGHTOF?n[e.from]=Math.max(n[e.from]||0,c):e.placement===ra.parser.yy.PLACEMENT.LEFTOF?n[r.prevActor]=Math.max(n[r.prevActor]||0,c):e.placement===ra.parser.yy.PLACEMENT.OVER&&(r.prevActor&&(n[r.prevActor]=Math.max(n[r.prevActor]||0,c/2)),r.nextActor&&(n[e.from]=Math.max(n[e.from]||0,c/2)))}})),c.debug("maxMessageWidthPerActor:",n),n},Ya=function(t,e){var n=0;for(var r in Object.keys(t).forEach((function(e){var r=t[e];r.wrap&&(r.description=W.wrapLabel(r.description,Ma.width-2*Ma.wrapPadding,Da(Ma)));var i=W.calculateTextDimensions(r.description,Da(Ma));r.width=r.wrap?Ma.width:Math.max(Ma.width,i.width+2*Ma.wrapPadding),r.height=r.wrap?Math.max(i.height,Ma.height):Ma.height,n=Math.max(n,r.height)})),e){var i=t[r];if(i){var a=t[i.nextActor];if(a){var o=e[r]+Ma.actorMargin-i.width/2-a.width/2;i.margin=Math.max(o,Ma.actorMargin)}}}return Math.max(n,Ma.height)},za=function(t,e){var n,r,i,a={},o=[];return t.forEach((function(t){switch(t.id=W.random({length:10}),t.type){case ra.parser.yy.LINETYPE.LOOP_START:case ra.parser.yy.LINETYPE.ALT_START:case ra.parser.yy.LINETYPE.OPT_START:case ra.parser.yy.LINETYPE.PAR_START:o.push({id:t.id,msg:t.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case ra.parser.yy.LINETYPE.ALT_ELSE:case ra.parser.yy.LINETYPE.PAR_AND:t.message&&(n=o.pop(),a[n.id]=n,a[t.id]=n,o.push(n));break;case ra.parser.yy.LINETYPE.LOOP_END:case ra.parser.yy.LINETYPE.ALT_END:case ra.parser.yy.LINETYPE.OPT_END:case ra.parser.yy.LINETYPE.PAR_END:n=o.pop(),a[n.id]=n;break;case ra.parser.yy.LINETYPE.ACTIVE_START:var s=e[t.from?t.from.actor:t.to.actor],u=Ra(t.from?t.from.actor:t.to.actor).length,l=s.x+s.width/2+(u-1)*Ma.activationWidth/2,h={startx:l,stopx:l+Ma.activationWidth,actor:t.from.actor,enabled:!0};Oa.activations.push(h);break;case ra.parser.yy.LINETYPE.ACTIVE_END:var f=Oa.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);delete Oa.activations.splice(f,1)[0]}void 0!==t.placement?(r=function(t,e){var n=e[t.from].x,r=e[t.to].x,i=t.wrap&&t.message,a=W.calculateTextDimensions(i?W.wrapLabel(t.message,Ma.width,Na(Ma)):t.message,Na(Ma)),o={width:i?Ma.width:Math.max(Ma.width,a.width+2*Ma.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===ra.parser.yy.PLACEMENT.RIGHTOF?(o.width=i?Math.max(Ma.width,a.width):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*Ma.noteMargin),o.startx=n+(e[t.from].width+Ma.actorMargin)/2):t.placement===ra.parser.yy.PLACEMENT.LEFTOF?(o.width=i?Math.max(Ma.width,a.width+2*Ma.noteMargin):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*Ma.noteMargin),o.startx=n-o.width+(e[t.from].width-Ma.actorMargin)/2):t.to===t.from?(a=W.calculateTextDimensions(i?W.wrapLabel(t.message,Math.max(Ma.width,e[t.from].width),Na(Ma)):t.message,Na(Ma)),o.width=i?Math.max(Ma.width,e[t.from].width):Math.max(e[t.from].width,Ma.width,a.width+2*Ma.noteMargin),o.startx=n+(e[t.from].width-o.width)/2):(o.width=Math.abs(n+e[t.from].width/2-(r+e[t.to].width/2))+Ma.actorMargin,o.startx=n<r?n+e[t.from].width/2-Ma.actorMargin/2:r+e[t.to].width/2-Ma.actorMargin/2),i&&(o.message=W.wrapLabel(t.message,o.width-2*Ma.wrapPadding,Na(Ma))),c.debug("NM:[".concat(o.startx,",").concat(o.stopx,",").concat(o.starty,",").concat(o.stopy,":").concat(o.width,",").concat(o.height,"=").concat(t.message,"]")),o}(t,e),t.noteModel=r,o.forEach((function(t){(n=t).from=Math.min(n.from,r.startx),n.to=Math.max(n.to,r.startx+r.width),n.width=Math.max(n.width,Math.abs(n.from-n.to))-Ma.labelBoxWidth}))):(i=function(t,e){var n=!1;if([ra.parser.yy.LINETYPE.SOLID_OPEN,ra.parser.yy.LINETYPE.DOTTED_OPEN,ra.parser.yy.LINETYPE.SOLID,ra.parser.yy.LINETYPE.DOTTED,ra.parser.yy.LINETYPE.SOLID_CROSS,ra.parser.yy.LINETYPE.DOTTED_CROSS,ra.parser.yy.LINETYPE.SOLID_POINT,ra.parser.yy.LINETYPE.DOTTED_POINT].includes(t.type)&&(n=!0),!n)return{};var r=Fa(t.from,e),i=Fa(t.to,e),a=r[0]<=i[0]?1:0,o=r[0]<i[0]?0:1,s=r.concat(i),c=Math.abs(i[o]-r[a]);t.wrap&&t.message&&(t.message=W.wrapLabel(t.message,Math.max(c+2*Ma.wrapPadding,Ma.width),Ba(Ma)));var u=W.calculateTextDimensions(t.message,Ba(Ma));return{width:Math.max(t.wrap?0:u.width+2*Ma.wrapPadding,c+2*Ma.wrapPadding,Ma.width),height:0,startx:r[a],stopx:i[o],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,s),toBounds:Math.max.apply(null,s)}}(t,e),t.msgModel=i,i.startx&&i.stopx&&o.length>0&&o.forEach((function(r){if(n=r,i.startx===i.stopx){var a=e[t.from],o=e[t.to];n.from=Math.min(a.x-i.width/2,a.x-a.width/2,n.from),n.to=Math.max(o.x+i.width/2,o.x+a.width/2,n.to),n.width=Math.max(n.width,Math.abs(n.to-n.from))-Ma.labelBoxWidth}else n.from=Math.min(i.startx,n.from),n.to=Math.max(i.stopx,n.to),n.width=Math.max(n.width,i.width)-Ma.labelBoxWidth})))})),Oa.activations=[],c.debug("Loop type widths:",a),a},Ua={bounds:Oa,drawActors:La,setConf:Ia,draw:function(t,e){Ma=xt().sequence,ra.parser.yy.clear(),ra.parser.yy.setWrap(Ma.wrap),ra.parser.parse(t+"\n"),Oa.init(),c.debug("C:".concat(JSON.stringify(Ma,null,2)));var n=Object(h.select)('[id="'.concat(e,'"]')),r=ra.parser.yy.getActors(),i=ra.parser.yy.getActorKeys(),a=ra.parser.yy.getMessages(),o=ra.parser.yy.getTitle(),s=ja(r,a);Ma.height=Ya(r,s),La(n,r,i,0);var u=za(a,r,s);Aa.insertArrowHead(n),Aa.insertArrowCrossHead(n),Aa.insertArrowFilledHead(n),Aa.insertSequenceNumber(n);var l=1;a.forEach((function(t){var e,i,a;switch(t.type){case ra.parser.yy.LINETYPE.NOTE:i=t.noteModel,function(t,e){Oa.bumpVerticalPos(Ma.boxMargin),e.height=Ma.boxMargin,e.starty=Oa.getVerticalPos();var n=Aa.getNoteRect();n.x=e.startx,n.y=e.starty,n.width=e.width||Ma.width,n.class="note";var r=t.append("g"),i=Aa.drawRect(r,n),a=Aa.getTextObj();a.x=e.startx,a.y=e.starty,a.width=n.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=Ma.noteFontFamily,a.fontSize=Ma.noteFontSize,a.fontWeight=Ma.noteFontWeight,a.anchor=Ma.noteAlign,a.textMargin=Ma.noteMargin,a.valign=Ma.noteAlign;var o=ka(r,a),s=Math.round(o.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));i.attr("height",s+2*Ma.noteMargin),e.height+=s+2*Ma.noteMargin,Oa.bumpVerticalPos(s+2*Ma.noteMargin),e.stopy=e.starty+s+2*Ma.noteMargin,e.stopx=e.startx+n.width,Oa.insert(e.startx,e.starty,e.stopx,e.stopy),Oa.models.addNote(e)}(n,i);break;case ra.parser.yy.LINETYPE.ACTIVE_START:Oa.newActivation(t,n,r);break;case ra.parser.yy.LINETYPE.ACTIVE_END:!function(t,e){var r=Oa.endActivation(t);r.starty+18>e&&(r.starty=e-6,e+=12),Aa.drawActivation(n,r,e,Ma,Ra(t.from.actor).length),Oa.insert(r.startx,e-10,r.stopx,e)}(t,Oa.getVerticalPos());break;case ra.parser.yy.LINETYPE.LOOP_START:Pa(u,t,Ma.boxMargin,Ma.boxMargin+Ma.boxTextMargin,(function(t){return Oa.newLoop(t)}));break;case ra.parser.yy.LINETYPE.LOOP_END:e=Oa.endLoop(),Aa.drawLoop(n,e,"loop",Ma),Oa.bumpVerticalPos(e.stopy-Oa.getVerticalPos()),Oa.models.addLoop(e);break;case ra.parser.yy.LINETYPE.RECT_START:Pa(u,t,Ma.boxMargin,Ma.boxMargin,(function(t){return Oa.newLoop(void 0,t.message)}));break;case ra.parser.yy.LINETYPE.RECT_END:e=Oa.endLoop(),Aa.drawBackgroundRect(n,e),Oa.models.addLoop(e),Oa.bumpVerticalPos(e.stopy-Oa.getVerticalPos());break;case ra.parser.yy.LINETYPE.OPT_START:Pa(u,t,Ma.boxMargin,Ma.boxMargin+Ma.boxTextMargin,(function(t){return Oa.newLoop(t)}));break;case ra.parser.yy.LINETYPE.OPT_END:e=Oa.endLoop(),Aa.drawLoop(n,e,"opt",Ma),Oa.bumpVerticalPos(e.stopy-Oa.getVerticalPos()),Oa.models.addLoop(e);break;case ra.parser.yy.LINETYPE.ALT_START:Pa(u,t,Ma.boxMargin,Ma.boxMargin+Ma.boxTextMargin,(function(t){return Oa.newLoop(t)}));break;case ra.parser.yy.LINETYPE.ALT_ELSE:Pa(u,t,Ma.boxMargin+Ma.boxTextMargin,Ma.boxMargin,(function(t){return Oa.addSectionToLoop(t)}));break;case ra.parser.yy.LINETYPE.ALT_END:e=Oa.endLoop(),Aa.drawLoop(n,e,"alt",Ma),Oa.bumpVerticalPos(e.stopy-Oa.getVerticalPos()),Oa.models.addLoop(e);break;case ra.parser.yy.LINETYPE.PAR_START:Pa(u,t,Ma.boxMargin,Ma.boxMargin+Ma.boxTextMargin,(function(t){return Oa.newLoop(t)}));break;case ra.parser.yy.LINETYPE.PAR_AND:Pa(u,t,Ma.boxMargin+Ma.boxTextMargin,Ma.boxMargin,(function(t){return Oa.addSectionToLoop(t)}));break;case ra.parser.yy.LINETYPE.PAR_END:e=Oa.endLoop(),Aa.drawLoop(n,e,"par",Ma),Oa.bumpVerticalPos(e.stopy-Oa.getVerticalPos()),Oa.models.addLoop(e);break;default:try{(a=t.msgModel).starty=Oa.getVerticalPos(),a.sequenceIndex=l,function(t,e){Oa.bumpVerticalPos(10);var n=e.startx,r=e.stopx,i=e.starty,a=e.message,o=e.type,s=e.sequenceIndex,c=x.splitBreaks(a).length,u=W.calculateTextDimensions(a,Ba(Ma)),l=u.height/c;e.height+=l,Oa.bumpVerticalPos(l);var h=Aa.getTextObj();h.x=n,h.y=i+10,h.width=r-n,h.class="messageText",h.dy="1em",h.text=a,h.fontFamily=Ma.messageFontFamily,h.fontSize=Ma.messageFontSize,h.fontWeight=Ma.messageFontWeight,h.anchor=Ma.messageAlign,h.valign=Ma.messageAlign,h.textMargin=Ma.wrapPadding,h.tspan=!1,ka(t,h);var f,d,p=u.height-10,y=u.width;if(n===r){d=Oa.getVerticalPos()+p,Ma.rightAngles?f=t.append("path").attr("d","M ".concat(n,",").concat(d," H ").concat(n+Math.max(Ma.width/2,y/2)," V ").concat(d+25," H ").concat(n)):(p+=Ma.boxMargin,d=Oa.getVerticalPos()+p,f=t.append("path").attr("d","M "+n+","+d+" C "+(n+60)+","+(d-10)+" "+(n+60)+","+(d+30)+" "+n+","+(d+20))),p+=30;var g=Math.max(y/2,Ma.width/2);Oa.insert(n-g,Oa.getVerticalPos()-10+p,r+g,Oa.getVerticalPos()+30+p)}else p+=Ma.boxMargin,d=Oa.getVerticalPos()+p,(f=t.append("line")).attr("x1",n),f.attr("y1",d),f.attr("x2",r),f.attr("y2",d),Oa.insert(n,d-10,r,d);o===ra.parser.yy.LINETYPE.DOTTED||o===ra.parser.yy.LINETYPE.DOTTED_CROSS||o===ra.parser.yy.LINETYPE.DOTTED_POINT||o===ra.parser.yy.LINETYPE.DOTTED_OPEN?(f.style("stroke-dasharray","3, 3"),f.attr("class","messageLine1")):f.attr("class","messageLine0");var v="";Ma.arrowMarkerAbsolute&&(v=(v=(v=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),f.attr("stroke-width",2),f.attr("stroke","none"),f.style("fill","none"),o!==ra.parser.yy.LINETYPE.SOLID&&o!==ra.parser.yy.LINETYPE.DOTTED||f.attr("marker-end","url("+v+"#arrowhead)"),o!==ra.parser.yy.LINETYPE.SOLID_POINT&&o!==ra.parser.yy.LINETYPE.DOTTED_POINT||f.attr("marker-end","url("+v+"#filled-head)"),o!==ra.parser.yy.LINETYPE.SOLID_CROSS&&o!==ra.parser.yy.LINETYPE.DOTTED_CROSS||f.attr("marker-end","url("+v+"#crosshead)"),(xa.showSequenceNumbers()||Ma.showSequenceNumbers)&&(f.attr("marker-start","url("+v+"#sequencenumber)"),t.append("text").attr("x",n).attr("y",d+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("textLength","16px").attr("class","sequenceNumber").text(s)),Oa.bumpVerticalPos(p),e.height+=p,e.stopy=e.starty+e.height,Oa.insert(e.fromBounds,e.starty,e.toBounds,e.stopy)}(n,a),Oa.models.addMessage(a)}catch(t){c.error("error while drawing message",t)}}[ra.parser.yy.LINETYPE.SOLID_OPEN,ra.parser.yy.LINETYPE.DOTTED_OPEN,ra.parser.yy.LINETYPE.SOLID,ra.parser.yy.LINETYPE.DOTTED,ra.parser.yy.LINETYPE.SOLID_CROSS,ra.parser.yy.LINETYPE.DOTTED_CROSS,ra.parser.yy.LINETYPE.SOLID_POINT,ra.parser.yy.LINETYPE.DOTTED_POINT].includes(t.type)&&l++})),Ma.mirrorActors&&(Oa.bumpVerticalPos(2*Ma.boxMargin),La(n,r,i,Oa.getVerticalPos()));var f=Oa.getBounds().bounds;c.debug("For line height fix Querying: #"+e+" .actor-line"),Object(h.selectAll)("#"+e+" .actor-line").attr("y2",f.stopy);var d=f.stopy-f.starty+2*Ma.diagramMarginY;Ma.mirrorActors&&(d=d-Ma.boxMargin+Ma.bottomMarginAdj);var p=f.stopx-f.startx+2*Ma.diagramMarginX;o&&n.append("text").text(o).attr("x",(f.stopx-f.startx)/2-2*Ma.diagramMarginX).attr("y",-25),q(n,d,p,Ma.useMaxWidth);var y=o?40:0;n.attr("viewBox",f.startx-Ma.diagramMarginX+" -"+(Ma.diagramMarginY+y)+" "+p+" "+(d+y)),c.debug("models:",Oa.models)}},$a=n(22),qa=n.n($a);function Wa(t){return(Wa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Va,Ha=function(t){return JSON.parse(JSON.stringify(t))},Ga=[],Xa={root:{relations:[],states:{},documents:{}}},Za=Xa.root,Qa=0,Ka=function(t,e,n,r,i){void 0===Za.states[t]?Za.states[t]={id:t,descriptions:[],type:e,doc:n,note:i}:(Za.states[t].doc||(Za.states[t].doc=n),Za.states[t].type||(Za.states[t].type=e)),r&&(c.info("Adding state ",t,r),"string"==typeof r&&eo(t,r.trim()),"object"===Wa(r)&&r.forEach((function(e){return eo(t,e.trim())}))),i&&(Za.states[t].note=i)},Ja=function(){Za=(Xa={root:{relations:[],states:{},documents:{}}}).root,Za=Xa.root,Qa=0,0,ro=[]},to=function(t,e,n){var r=t,i=e,a="default",o="default";"[*]"===t&&(r="start"+ ++Qa,a="start"),"[*]"===e&&(i="end"+Qa,o="end"),Ka(r,a),Ka(i,o),Za.relations.push({id1:r,id2:i,title:n})},eo=function(t,e){var n=Za.states[t],r=e;":"===r[0]&&(r=r.substr(1).trim()),n.descriptions.push(r)},no=0,ro=[],io="TB",ao={parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().state},addState:Ka,clear:Ja,getState:function(t){return Za.states[t]},getStates:function(){return Za.states},getRelations:function(){return Za.relations},getClasses:function(){return ro},getDirection:function(){return io},addRelation:to,getDividerId:function(){return"divider-id-"+ ++no},setDirection:function(t){io=t},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:function(){c.info("Documents = ",Xa)},getRootDoc:function(){return Ga},setRootDoc:function(t){c.info("Setting root doc",t),Ga=t},getRootDocV2:function(){return function t(e,n,r){if("relation"===n.stmt)t(e,n.state1,!0),t(e,n.state2,!1);else if("state"===n.stmt&&"[*]"===n.id&&(n.id=r?e.id+"_start":e.id+"_end",n.start=r),n.doc){var i=[],a=0,o=[];for(a=0;a<n.doc.length;a++)if("divider"===n.doc[a].type){var s=Ha(n.doc[a]);s.doc=Ha(o),i.push(s),o=[]}else o.push(n.doc[a]);if(i.length>0&&o.length>0){var c={stmt:"state",id:I(),type:"divider",doc:Ha(o)};i.push(Ha(c)),n.doc=i}n.doc.forEach((function(e){return t(n,e,!0)}))}}({id:"root"},{id:"root",doc:Ga},!0),{id:"root",doc:Ga}},extract:function(t){var e;e=t.doc?t.doc:t,c.info(e),Ja(),c.info("Extract",e),e.forEach((function(t){"state"===t.stmt&&Ka(t.id,t.type,t.doc,t.description,t.note),"relation"===t.stmt&&to(t.state1.id,t.state2.id,t.description)}))},trimColon:function(t){return t&&":"===t[0]?t.substr(1).trim():t.trim()}},oo={},so=function(t,e){oo[t]=e},co=function(t,e){var n=t.append("text").attr("x",2*xt().state.padding).attr("y",xt().state.textHeight+1.3*xt().state.padding).attr("font-size",xt().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),r=n.height,i=t.append("text").attr("x",xt().state.padding).attr("y",r+.4*xt().state.padding+xt().state.dividerMargin+xt().state.textHeight).attr("class","state-description"),a=!0,o=!0;e.descriptions.forEach((function(t){a||(!function(t,e,n){var r=t.append("tspan").attr("x",2*xt().state.padding).text(e);n||r.attr("dy",xt().state.textHeight)}(i,t,o),o=!1),a=!1}));var s=t.append("line").attr("x1",xt().state.padding).attr("y1",xt().state.padding+r+xt().state.dividerMargin/2).attr("y2",xt().state.padding+r+xt().state.dividerMargin/2).attr("class","descr-divider"),c=i.node().getBBox(),u=Math.max(c.width,n.width);return s.attr("x2",u+3*xt().state.padding),t.insert("rect",":first-child").attr("x",xt().state.padding).attr("y",xt().state.padding).attr("width",u+2*xt().state.padding).attr("height",c.height+r+2*xt().state.padding).attr("rx",xt().state.radius),t},uo=function(t,e,n){var r,i=xt().state.padding,a=2*xt().state.padding,o=t.node().getBBox(),s=o.width,c=o.x,u=t.append("text").attr("x",0).attr("y",xt().state.titleShift).attr("font-size",xt().state.fontSize).attr("class","state-title").text(e.id),l=u.node().getBBox().width+a,h=Math.max(l,s);h===s&&(h+=a);var f=t.node().getBBox();e.doc,r=c-i,l>s&&(r=(s-h)/2+i),Math.abs(c-f.x)<i&&l>s&&(r=c-(l-s)/2);var d=1-xt().state.textHeight;return t.insert("rect",":first-child").attr("x",r).attr("y",d).attr("class",n?"alt-composit":"composit").attr("width",h).attr("height",f.height+xt().state.textHeight+xt().state.titleShift+1).attr("rx","0"),u.attr("x",r+i),l<=s&&u.attr("x",c+(h-a)/2-l/2+i),t.insert("rect",":first-child").attr("x",r).attr("y",xt().state.titleShift-xt().state.textHeight-xt().state.padding).attr("width",h).attr("height",3*xt().state.textHeight).attr("rx",xt().state.radius),t.insert("rect",":first-child").attr("x",r).attr("y",xt().state.titleShift-xt().state.textHeight-xt().state.padding).attr("width",h).attr("height",f.height+3+2*xt().state.textHeight).attr("rx",xt().state.radius),t},lo=function(t,e){e.attr("class","state-note");var n=e.append("rect").attr("x",0).attr("y",xt().state.padding),r=function(t,e,n,r){var i=0,a=r.append("text");a.style("text-anchor","start"),a.attr("class","noteText");var o=t.replace(/\r\n/g,"<br/>"),s=(o=o.replace(/\n/g,"<br/>")).split(x.lineBreakRegex),c=1.25*xt().state.noteMargin,u=!0,l=!1,h=void 0;try{for(var f,d=s[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var p=f.value.trim();if(p.length>0){var y=a.append("tspan");if(y.text(p),0===c)c+=y.node().getBBox().height;i+=c,y.attr("x",e+xt().state.noteMargin),y.attr("y",n+i+1.25*xt().state.noteMargin)}}}catch(t){l=!0,h=t}finally{try{u||null==d.return||d.return()}finally{if(l)throw h}}return{textWidth:a.node().getBBox().width,textHeight:i}}(t,0,0,e.append("g")),i=r.textWidth,a=r.textHeight;return n.attr("height",a+2*xt().state.noteMargin),n.attr("width",i+2*xt().state.noteMargin),n},ho=function(t,e){var n=e.id,r={id:n,label:e.id,width:0,height:0},i=t.append("g").attr("id",n).attr("class","stateGroup");"start"===e.type&&function(t){t.append("circle").attr("class","start-state").attr("r",xt().state.sizeUnit).attr("cx",xt().state.padding+xt().state.sizeUnit).attr("cy",xt().state.padding+xt().state.sizeUnit)}(i),"end"===e.type&&function(t){t.append("circle").attr("class","end-state-outer").attr("r",xt().state.sizeUnit+xt().state.miniPadding).attr("cx",xt().state.padding+xt().state.sizeUnit+xt().state.miniPadding).attr("cy",xt().state.padding+xt().state.sizeUnit+xt().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",xt().state.sizeUnit).attr("cx",xt().state.padding+xt().state.sizeUnit+2).attr("cy",xt().state.padding+xt().state.sizeUnit+2)}(i),"fork"!==e.type&&"join"!==e.type||function(t,e){var n=xt().state.forkWidth,r=xt().state.forkHeight;if(e.parentId){var i=n;n=r,r=i}t.append("rect").style("stroke","black").style("fill","black").attr("width",n).attr("height",r).attr("x",xt().state.padding).attr("y",xt().state.padding)}(i,e),"note"===e.type&&lo(e.note.text,i),"divider"===e.type&&function(t){t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",xt().state.textHeight).attr("class","divider").attr("x2",2*xt().state.textHeight).attr("y1",0).attr("y2",0)}(i),"default"===e.type&&0===e.descriptions.length&&function(t,e){var n=t.append("text").attr("x",2*xt().state.padding).attr("y",xt().state.textHeight+2*xt().state.padding).attr("font-size",xt().state.fontSize).attr("class","state-title").text(e.id),r=n.node().getBBox();t.insert("rect",":first-child").attr("x",xt().state.padding).attr("y",xt().state.padding).attr("width",r.width+2*xt().state.padding).attr("height",r.height+2*xt().state.padding).attr("rx",xt().state.radius)}(i,e),"default"===e.type&&e.descriptions.length>0&&co(i,e);var a=i.node().getBBox();return r.width=a.width+2*xt().state.padding,r.height=a.height+2*xt().state.padding,so(n,r),r},fo=0;$a.parser.yy=ao;var po={},yo=function t(e,n,r,i){var a,o=new zt.a.Graph({compound:!0,multigraph:!0}),s=!0;for(a=0;a<e.length;a++)if("relation"===e[a].stmt){s=!1;break}r?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:s?1:Va.edgeLengthFactor,nodeSep:s?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:s?1:Va.edgeLengthFactor,nodeSep:s?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel((function(){return{}})),ao.extract(e);for(var u=ao.getStates(),l=ao.getRelations(),f=Object.keys(u),d=0;d<f.length;d++){var p=u[f[d]];r&&(p.parentId=r);var y=void 0;if(p.doc){var g=n.append("g").attr("id",p.id).attr("class","stateGroup");y=t(p.doc,g,p.id,!i);var v=(g=uo(g,p,i)).node().getBBox();y.width=v.width,y.height=v.height+Va.padding/2,po[p.id]={y:Va.compositTitleSize}}else y=ho(n,p);if(p.note){var m={descriptions:[],id:p.id+"-note",note:p.note,type:"note"},b=ho(n,m);"left of"===p.note.position?(o.setNode(y.id+"-note",b),o.setNode(y.id,y)):(o.setNode(y.id,y),o.setNode(y.id+"-note",b)),o.setParent(y.id,y.id+"-group"),o.setParent(y.id+"-note",y.id+"-group")}else o.setNode(y.id,y)}c.debug("Count=",o.nodeCount(),o);var _=0;l.forEach((function(t){var e;_++,c.debug("Setting edge",t),o.setEdge(t.id1,t.id2,{relation:t,width:(e=t.title,e?e.length*Va.fontSizeFactor:1),height:Va.labelHeight*x.getRows(t.title).length,labelpos:"c"},"id"+_)})),jt.a.layout(o),c.debug("Graph after layout",o.nodes());var k=n.node();o.nodes().forEach((function(t){void 0!==t&&void 0!==o.node(t)?(c.warn("Node "+t+": "+JSON.stringify(o.node(t))),Object(h.select)("#"+k.id+" #"+t).attr("transform","translate("+(o.node(t).x-o.node(t).width/2)+","+(o.node(t).y+(po[t]?po[t].y:0)-o.node(t).height/2)+" )"),Object(h.select)("#"+k.id+" #"+t).attr("data-x-shift",o.node(t).x-o.node(t).width/2),document.querySelectorAll("#"+k.id+" #"+t+" .divider").forEach((function(t){var e=t.parentElement,n=0,r=0;e&&(e.parentElement&&(n=e.parentElement.getBBox().width),r=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(r)&&(r=0)),t.setAttribute("x1",0-r+8),t.setAttribute("x2",n-r-8)}))):c.debug("No Node "+t+": "+JSON.stringify(o.node(t)))}));var w=k.getBBox();o.edges().forEach((function(t){void 0!==t&&void 0!==o.edge(t)&&(c.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(o.edge(t))),function(t,e,n){e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var r=e.points,i=Object(h.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(h.curveBasis),a=t.append("path").attr("d",i(r)).attr("id","edge"+fo).attr("class","transition"),o="";if(xt().state.arrowMarkerAbsolute&&(o=(o=(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),a.attr("marker-end","url("+o+"#"+function(t){switch(t){case ao.relationType.AGGREGATION:return"aggregation";case ao.relationType.EXTENSION:return"extension";case ao.relationType.COMPOSITION:return"composition";case ao.relationType.DEPENDENCY:return"dependency"}}(ao.relationType.DEPENDENCY)+"End)"),void 0!==n.title){for(var s=t.append("g").attr("class","stateLabel"),u=W.calcLabelPosition(e.points),l=u.x,f=u.y,d=x.getRows(n.title),p=0,y=[],g=0,v=0,m=0;m<=d.length;m++){var b=s.append("text").attr("text-anchor","middle").text(d[m]).attr("x",l).attr("y",f+p),_=b.node().getBBox();if(g=Math.max(g,_.width),v=Math.min(v,_.x),c.info(_.x,l,f+p),0===p){var k=b.node().getBBox();p=k.height,c.info("Title height",p,f)}y.push(b)}var w=p*d.length;if(d.length>1){var E=(d.length-1)*p*.5;y.forEach((function(t,e){return t.attr("y",f+e*p-E)})),w=p*d.length}var T=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",l-g/2-xt().state.padding/2).attr("y",f-w/2-xt().state.padding/2-3.5).attr("width",g+xt().state.padding).attr("height",w+xt().state.padding),c.info(T)}fo++}(n,o.edge(t),o.edge(t).relation))})),w=k.getBBox();var E={id:r||"root",label:r||"root",width:0,height:0};return E.width=w.width+2*Va.padding,E.height=w.height+2*Va.padding,c.debug("Doc rendered",E,o),E},go=function(){},vo=function(t,e){Va=xt().state,$a.parser.yy.clear(),$a.parser.parse(t),c.debug("Rendering diagram "+t);var n=Object(h.select)("[id='".concat(e,"']"));n.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z"),new zt.a.Graph({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}}));var r=ao.getRootDoc();yo(r,n,void 0,!1);var i=Va.padding,a=n.node().getBBox(),o=a.width+2*i,s=a.height+2*i;q(n,s,1.75*o,Va.useMaxWidth),n.attr("viewBox","".concat(a.x-Va.padding," ").concat(a.y-Va.padding," ")+o+" "+s)},mo={},bo={},xo=function(t,e,n,r){if("root"!==n.id){var i="rect";!0===n.start&&(i="start"),!1===n.start&&(i="end"),"default"!==n.type&&(i=n.type),bo[n.id]||(bo[n.id]={id:n.id,shape:i,description:n.id,classes:"statediagram-state"}),n.description&&(Array.isArray(bo[n.id].description)?(bo[n.id].shape="rectWithTitle",bo[n.id].description.push(n.description)):bo[n.id].description.length>0?(bo[n.id].shape="rectWithTitle",bo[n.id].description===n.id?bo[n.id].description=[n.description]:bo[n.id].description=[bo[n.id].description,n.description]):(bo[n.id].shape="rect",bo[n.id].description=n.description)),!bo[n.id].type&&n.doc&&(c.info("Setting cluster for ",n.id,wo(n)),bo[n.id].type="group",bo[n.id].dir=wo(n),bo[n.id].shape="divider"===n.type?"divider":"roundedWithTitle",bo[n.id].classes=bo[n.id].classes+" "+(r?"statediagram-cluster statediagram-cluster-alt":"statediagram-cluster"));var a={labelStyle:"",shape:bo[n.id].shape,labelText:bo[n.id].description,classes:bo[n.id].classes,style:"",id:n.id,dir:bo[n.id].dir,domId:"state-"+n.id+"-"+_o,type:bo[n.id].type,padding:15};if(n.note){var o={labelStyle:"",shape:"note",labelText:n.note.text,classes:"statediagram-note",style:"",id:n.id+"----note-"+_o,domId:"state-"+n.id+"----note-"+_o,type:bo[n.id].type,padding:15},s={labelStyle:"",shape:"noteGroup",labelText:n.note.text,classes:bo[n.id].classes,style:"",id:n.id+"----parent",domId:"state-"+n.id+"----parent-"+_o,type:"group",padding:0};_o++,t.setNode(n.id+"----parent",s),t.setNode(o.id,o),t.setNode(n.id,a),t.setParent(n.id,n.id+"----parent"),t.setParent(o.id,n.id+"----parent");var u=n.id,l=o.id;"left of"===n.note.position&&(u=o.id,l=n.id),t.setEdge(u,l,{arrowhead:"none",arrowType:"",style:"fill:none",labelStyle:"",classes:"transition note-edge",arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal"})}else t.setNode(n.id,a)}e&&"root"!==e.id&&(c.trace("Setting node ",n.id," to be child of its parent ",e.id),t.setParent(n.id,e.id)),n.doc&&(c.trace("Adding nodes children "),ko(t,n,n.doc,!r))},_o=0,ko=function(t,e,n,r){c.trace("items",n),n.forEach((function(n){if("state"===n.stmt||"default"===n.stmt)xo(t,e,n,r);else if("relation"===n.stmt){xo(t,e,n.state1,r),xo(t,e,n.state2,r);var i={id:"edge"+_o,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:"fill:none",labelStyle:"",label:n.description,arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal",classes:"transition"},a=n.state1.id,o=n.state2.id;t.setEdge(a,o,i,_o),_o++}}))},wo=function(t,e){var n=e||"TB";if(t.doc)for(var r=0;r<t.doc.length;r++){var i=t.doc[r];"dir"===i.stmt&&(n=i.value)}return n},Eo=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)mo[e[n]]=t[e[n]]},To=function(t,e){c.info("Drawing state diagram (v2)",e),ao.clear(),bo={};var n=qa.a.parser;n.yy=ao,n.parse(t);var r=ao.getDirection();void 0===r&&(r="LR");var i=xt().state,a=i.nodeSpacing||50,o=i.rankSpacing||50;c.info(ao.getRootDocV2()),ao.extract(ao.getRootDocV2()),c.info(ao.getRootDocV2());var s=new zt.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:wo(ao.getRootDocV2()),nodesep:a,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));xo(s,void 0,ao.getRootDocV2(),!0);var u=Object(h.select)('[id="'.concat(e,'"]')),l=Object(h.select)("#"+e+" g");ze(l,s,["barb"],"statediagram",e);var f=u.node().getBBox(),d=f.width+16,p=f.height+16;u.attr("class","statediagram");var y=u.node().getBBox();q(u,p,1.75*d,i.useMaxWidth);var g="".concat(y.x-8," ").concat(y.y-8," ").concat(d," ").concat(p);if(c.debug("viewBox ".concat(g)),u.attr("viewBox",g),!i.htmlLabels)for(var v=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),m=0;m<v.length;m++){var b=v[m],x=b.getBBox(),_=document.createElementNS("http://www.w3.org/2000/svg","rect");_.setAttribute("rx",0),_.setAttribute("ry",0),_.setAttribute("width",x.width),_.setAttribute("height",x.height),b.insertBefore(_,b.firstChild)}};function Co(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var So="",Ao="",Mo=[],Oo=[],Bo=[],No=function(){for(var t=!0,e=0;e<Bo.length;e++)Bo[e].processed,t=t&&Bo[e].processed;return t},Do={parseDirective:function(t,e,n){gs.parseDirective(this,t,e,n)},getConfig:function(){return xt().journey},clear:function(){Mo.length=0,Oo.length=0,Ao="",So="",Bo.length=0},setTitle:function(t){So=t},getTitle:function(){return So},addSection:function(t){Ao=t,Mo.push(t)},getSections:function(){return Mo},getTasks:function(){for(var t=No(),e=0;!t&&e<100;)t=No(),e++;return Oo.push.apply(Oo,Bo),Oo},addTask:function(t,e){var n=e.substr(1).split(":"),r=0,i=[];1===n.length?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(","));var a=i.map((function(t){return t.trim()})),o={section:Ao,type:Ao,people:a,task:t,score:r};Bo.push(o)},addTaskOrg:function(t){var e={section:Ao,type:Ao,description:t,task:t,classes:[]};Oo.push(e)},getActors:function(){return t=[],Oo.forEach((function(e){e.people&&t.push.apply(t,Co(e.people))})),Co(new Set(t)).sort();var t}},Lo=n(28),Io=n.n(Lo),Ro=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},Fo=function(t,e){var n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},Po=function(t,e){var n=e.text.replace(/<br\s*\/?>/gi," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(n),r},jo=-1,Yo=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},zo=function(){function t(t,e,n,i,a,o,s,c){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("font-color",c).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c,u){for(var l=c.taskFontSize,h=c.taskFontFamily,f=t.split(/<br\s*\/?>/gi),d=0;d<f.length;d++){var p=d*l-l*(f.length-1)/2,y=e.append("text").attr("x",n+a/2).attr("y",i).attr("fill",u).style("text-anchor","middle").style("font-size",l).style("font-family",h);y.append("tspan").attr("x",n+a/2).attr("dy",p).text(f[d]),y.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(y,s)}}function n(t,n,i,a,o,s,c,u){var l=n.append("switch"),h=l.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).attr("position","fixed").append("div").style("display","table").style("height","100%").style("width","100%");h.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,i,a,o,s,c,u),r(h,c)}function r(t,e){for(var n in e)n in e&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),Uo=Fo,$o=function(t,e,n){var r=t.append("g"),i=Yo();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,Ro(r,i),zo(n)(e.text,r,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},n,e.colour)},qo=Po,Wo=function(t,e,n){var r=e.x+n.width/2,i=t.append("g");jo++;var a,o,s;i.append("line").attr("id","task"+jo).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),a=i,o={cx:r,cy:300+30*(5-e.score),score:e.score},a.append("circle").attr("cx",o.cx).attr("cy",o.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),(s=a.append("g")).append("circle").attr("cx",o.cx-5).attr("cy",o.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),s.append("circle").attr("cx",o.cx+5).attr("cy",o.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),o.score>3?function(t){var e=Object(h.arc)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+o.cx+","+(o.cy+2)+")")}(s):o.score<3?function(t){var e=Object(h.arc)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+o.cx+","+(o.cy+7)+")")}(s):function(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",o.cx-5).attr("y1",o.cy+7).attr("x2",o.cx+5).attr("y2",o.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}(s);var c=Yo();c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=n.width,c.height=n.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,Ro(i,c);var u=e.x+14;e.people.forEach((function(t){var n=e.actors[t],r={cx:u,cy:e.y,r:7,fill:n,stroke:"#000",title:t};Fo(i,r),u+=10})),zo(n)(e.task,i,c.x,c.y,c.width,c.height,{class:"task"},n,e.colour)},Vo=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")};Lo.parser.yy=Do;var Ho={};var Go=xt().journey,Xo=xt().journey.leftMargin,Zo={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i,a=xt().journey,o=this,s=0;this.sequenceItems.forEach((function(c){s++;var u=o.sequenceItems.length-s+1;o.updateVal(c,"starty",e-u*a.boxMargin,Math.min),o.updateVal(c,"stopy",r+u*a.boxMargin,Math.max),o.updateVal(Zo.data,"startx",t-u*a.boxMargin,Math.min),o.updateVal(Zo.data,"stopx",n+u*a.boxMargin,Math.max),"activation"!==i&&(o.updateVal(c,"startx",t-u*a.boxMargin,Math.min),o.updateVal(c,"stopx",n+u*a.boxMargin,Math.max),o.updateVal(Zo.data,"starty",e-u*a.boxMargin,Math.min),o.updateVal(Zo.data,"stopy",r+u*a.boxMargin,Math.max))}))},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(Zo.data,"startx",i,Math.min),this.updateVal(Zo.data,"starty",o,Math.min),this.updateVal(Zo.data,"stopx",a,Math.max),this.updateVal(Zo.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},Qo=Go.sectionFills,Ko=Go.sectionColours,Jo=function(t,e,n){for(var r=xt().journey,i="",a=n+(2*r.height+r.diagramMarginY),o=0,s="#CCC",c="black",u=0,l=0;l<e.length;l++){var h=e[l];if(i!==h.section){s=Qo[o%Qo.length],u=o%Qo.length,c=Ko[o%Ko.length];var f={x:l*r.taskMargin+l*r.width+Xo,y:50,text:h.section,fill:s,num:u,colour:c};$o(t,f,r),i=h.section,o++}var d=h.people.reduce((function(t,e){return Ho[e]&&(t[e]=Ho[e]),t}),{});h.x=l*r.taskMargin+l*r.width+Xo,h.y=a,h.width=r.diagramMarginX,h.height=r.diagramMarginY,h.colour=c,h.fill=s,h.num=u,h.actors=d,Wo(t,h,r),Zo.insert(h.x,h.y,h.x+h.width+r.taskMargin,450)}},ts=function(t){Object.keys(t).forEach((function(e){Go[e]=t[e]}))},es=function(t,e){var n=xt().journey;Lo.parser.yy.clear(),Lo.parser.parse(t+"\n"),Zo.init();var r=Object(h.select)("#"+e);r.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),Vo(r);var i=Lo.parser.yy.getTasks(),a=Lo.parser.yy.getTitle(),o=Lo.parser.yy.getActors();for(var s in Ho)delete Ho[s];var c=0;o.forEach((function(t){Ho[t]=n.actorColours[c%n.actorColours.length],c++})),function(t){var e=xt().journey,n=60;Object.keys(Ho).forEach((function(r){var i=Ho[r];Uo(t,{cx:20,cy:n,r:7,fill:i,stroke:"#000"});var a={x:40,y:n+7,fill:"#666",text:r,textMargin:5|e.boxTextMargin};qo(t,a),n+=20}))}(r),Zo.insert(0,0,Xo,50*Object.keys(Ho).length),Jo(r,i,0);var u=Zo.getBounds();a&&r.append("text").text(a).attr("x",Xo).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);var l=u.stopy-u.starty+2*n.diagramMarginY,f=Xo+u.stopx+2*n.diagramMarginX;q(r,l,f,n.useMaxWidth),r.append("line").attr("x1",Xo).attr("y1",4*n.height).attr("x2",f-Xo-4).attr("y2",4*n.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");var d=a?70:0;r.attr("viewBox","".concat(u.startx," -25 ").concat(f," ").concat(l+d)),r.attr("preserveAspectRatio","xMinYMin meet"),r.attr("height",l+d+25)},ns={},rs=function(t){Object.keys(t).forEach((function(e){ns[e]=t[e]}))},is=function(t,e){try{c.debug("Renering svg for syntax error\n");var n=Object(h.select)("#"+t),r=n.append("g");r.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),r.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),r.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),r.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),r.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),r.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),r.append("text").attr("class","error-text").attr("x",1240).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),r.append("text").attr("class","error-text").attr("x",1050).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+e),n.attr("height",100),n.attr("width",400),n.attr("viewBox","768 0 512 512")}catch(t){c.error("Error while rendering info diagram"),c.error(t.message)}},as=function(t){return"g.classGroup text {\n fill: ".concat(t.nodeBorder,";\n fill: ").concat(t.classText,";\n stroke: none;\n font-family: ").concat(t.fontFamily,";\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ").concat(t.nodeBorder,";\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.classGroup line {\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ").concat(t.nodeBorder,";\n font-size: 10px;\n}\n\n.relation {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n#compositionStart, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n")},os=function(t){return".label {\n font-family: ".concat(t.fontFamily,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n .cluster-label text {\n fill: ").concat(t.titleColor,";\n }\n .cluster-label span {\n color: ").concat(t.titleColor,";\n }\n\n .label text,span {\n fill: ").concat(t.nodeTextColor||t.textColor,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n background-color: ").concat(t.edgeLabelBackground,";\n fill: ").concat(t.edgeLabelBackground,";\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ").concat(t.clusterBkg,";\n stroke: ").concat(t.clusterBorder,";\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n .cluster span {\n color: ").concat(t.titleColor,";\n }\n // .cluster div {\n // color: ").concat(t.titleColor,";\n // }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ").concat(t.fontFamily,";\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n")},ss=function(t){return"\ndefs #statediagram-barbEnd {\n fill: ".concat(t.transitionColor,";\n stroke: ").concat(t.transitionColor,";\n }\ng.stateGroup text {\n fill: ").concat(t.nodeBorder,";\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ").concat(t.textColor,";\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ").concat(t.stateLabelColor,";\n}\n\ng.stateGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.stateGroup line {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n\n.transition {\n stroke: ").concat(t.transitionColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ").concat(t.background,";\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n\n text {\n fill: ").concat(t.noteTextColor,";\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ").concat(t.labelBackgroundColor,";\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ").concat(t.transitionLabelColor||t.tertiaryTextColor,";\n}\n.label div .edgeLabel {\n color: ").concat(t.transitionLabelColor||t.tertiaryTextColor,";\n}\n\n.stateLabel text {\n fill: ").concat(t.stateLabelColor,";\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ").concat(t.lineColor,";\n stroke: black;\n}\n.node circle.state-end {\n fill: ").concat(t.primaryBorderColor,";\n stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ").concat(t.compositeBackground||t.background,";\n // stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ").concat(t.stateBkg||t.mainBkg,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n stroke-width: 1px;\n}\n.node polygon {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ").concat(t.lineColor,";\n}\n\n.statediagram-cluster rect {\n fill: ").concat(t.compositeTitleBackground,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ").concat(t.stateLabelColor,";\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ").concat(t.compositeBackground||t.background,";\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ").concat(t.altBackground?t.altBackground:"#efefef",";\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ").concat(t.altBackground?t.altBackground:"#efefef",";\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ").concat(t.noteTextColor,";\n}\n\n.statediagram-note .nodeLabel {\n color: ").concat(t.noteTextColor,";\n}\n.statediagram .edgeLabel {\n color: red; // ").concat(t.noteTextColor,";\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ").concat(t.lineColor,";\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n")},cs={flowchart:os,"flowchart-v2":os,sequence:function(t){return".actor {\n stroke: ".concat(t.actorBorder,";\n fill: ").concat(t.actorBkg,";\n }\n\n text.actor > tspan {\n fill: ").concat(t.actorTextColor,";\n stroke: none;\n }\n\n .actor-line {\n stroke: ").concat(t.actorLineColor,";\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ").concat(t.signalColor,";\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.signalColor,";\n }\n\n #arrowhead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .sequenceNumber {\n fill: ").concat(t.sequenceNumberColor,";\n }\n\n #sequencenumber {\n fill: ").concat(t.signalColor,";\n }\n\n #crosshead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .messageText {\n fill: ").concat(t.signalTextColor,";\n stroke: ").concat(t.signalTextColor,";\n }\n\n .labelBox {\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBkgColor,";\n }\n\n .labelText, .labelText > tspan {\n fill: ").concat(t.labelTextColor,";\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ").concat(t.loopTextColor,";\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBorderColor,";\n }\n\n .note {\n //stroke: #decc93;\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n }\n\n .noteText, .noteText > tspan {\n fill: ").concat(t.noteTextColor,";\n stroke: none;\n }\n\n .activation0 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation1 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation2 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n")},gantt:function(t){return'\n .mermaid-main-font {\n font-family: "trebuchet ms", verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: '.concat(t.sectionBkgColor,";\n }\n\n .section2 {\n fill: ").concat(t.sectionBkgColor2,";\n }\n\n .section1,\n .section3 {\n fill: ").concat(t.altSectionBkgColor,";\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle1 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle2 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle3 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle {\n text-anchor: start;\n // font-size: ").concat(t.ganttFontSize,";\n // text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ").concat(t.gridColor,";\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.textColor,";\n }\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ").concat(t.todayLineColor,";\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n // .taskText:not([font-size]) {\n // font-size: ").concat(t.ganttFontSize,";\n // }\n\n .taskTextOutsideRight {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: start;\n // font-size: ").concat(t.ganttFontSize,";\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: end;\n // font-size: ").concat(t.ganttFontSize,";\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ").concat(t.taskTextColor,";\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ").concat(t.taskBkgColor,";\n stroke: ").concat(t.taskBorderColor,";\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ").concat(t.activeTaskBkgColor,";\n stroke: ").concat(t.activeTaskBorderColor,";\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ").concat(t.doneTaskBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.critBkgColor,";\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.activeTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ").concat(t.textColor," ;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n")},classDiagram:as,"classDiagram-v2":as,class:as,stateDiagram:ss,state:ss,git:function(){return"\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n"},info:function(){return""},pie:function(t){return"\n .pieCircle{\n stroke: ".concat(t.pieStrokeColor,";\n stroke-width : ").concat(t.pieStrokeWidth,";\n opacity : ").concat(t.pieOpacity,";\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ").concat(t.pieTitleTextSize,";\n fill: ").concat(t.pieTitleTextColor,";\n font-family: ").concat(t.fontFamily,";\n }\n .slice {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.pieSectionTextColor,";\n font-size:").concat(t.pieSectionTextSize,";\n // fill: white;\n }\n .legend text {\n fill: ").concat(t.pieLegendTextColor,";\n font-family: ").concat(t.fontFamily,";\n font-size: ").concat(t.pieLegendTextSize,";\n }\n")},er:function(t){return"\n .entityBox {\n fill: ".concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n }\n\n .attributeBoxOdd {\n fill: #ffffff;\n stroke: ").concat(t.nodeBorder,";\n }\n\n .attributeBoxEven {\n fill: #f2f2f2;\n stroke: ").concat(t.nodeBorder,";\n }\n\n .relationshipLabelBox {\n fill: ").concat(t.tertiaryColor,";\n opacity: 0.7;\n background-color: ").concat(t.tertiaryColor,";\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ").concat(t.lineColor,";\n }\n")},journey:function(t){return".label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ".concat(t.textColor,";\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ").concat(t.textColor,"\n }\n\n .legend {\n fill: ").concat(t.textColor,";\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ").concat(t.textColor,"\n }\n\n .face {\n fill: #FFF8DC;\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType0):"",";\n }\n .task-type-1, .section-type-1 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType1):"",";\n }\n .task-type-2, .section-type-2 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType2):"",";\n }\n .task-type-3, .section-type-3 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType3):"",";\n }\n .task-type-4, .section-type-4 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType4):"",";\n }\n .task-type-5, .section-type-5 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType5):"",";\n }\n .task-type-6, .section-type-6 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType6):"",";\n }\n .task-type-7, .section-type-7 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType7):"",";\n }\n")},requirement:function(t){return"\n\n marker {\n fill: ".concat(t.relationColor,";\n stroke: ").concat(t.relationColor,";\n }\n\n marker.cross {\n stroke: ").concat(t.lineColor,";\n }\n\n svg {\n font-family: ").concat(t.fontFamily,";\n font-size: ").concat(t.fontSize,";\n }\n\n .reqBox {\n fill: ").concat(t.requirementBackground,";\n fill-opacity: 100%;\n stroke: ").concat(t.requirementBorderColor,";\n stroke-width: ").concat(t.requirementBorderSize,";\n }\n \n .reqTitle, .reqLabel{\n fill: ").concat(t.requirementTextColor,";\n }\n .reqLabelBox {\n fill: ").concat(t.relationLabelBackground,";\n fill-opacity: 100%;\n }\n\n .req-title-line {\n stroke: ").concat(t.requirementBorderColor,";\n stroke-width: ").concat(t.requirementBorderSize,";\n }\n .relationshipLine {\n stroke: ").concat(t.relationColor,";\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ").concat(t.relationLabelColor,";\n }\n\n")}},us=function(t,e,n){return" {\n font-family: ".concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n fill: ").concat(n.textColor,"\n }\n\n /* Classes common for multiple diagrams */\n\n .error-icon {\n fill: ").concat(n.errorBkgColor,";\n }\n .error-text {\n fill: ").concat(n.errorTextColor,";\n stroke: ").concat(n.errorTextColor,";\n }\n\n .edge-thickness-normal {\n stroke-width: 2px;\n }\n .edge-thickness-thick {\n stroke-width: 3.5px\n }\n .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n .marker {\n fill: ").concat(n.lineColor,";\n stroke: ").concat(n.lineColor,";\n }\n .marker.cross {\n stroke: ").concat(n.lineColor,";\n }\n\n svg {\n font-family: ").concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n }\n\n ").concat(cs[t](n),"\n\n ").concat(e,"\n")};function ls(t){return(ls="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var hs={},fs=function(t,e,n){switch(c.debug("Directive type=".concat(e.type," with args:"),e.args),e.type){case"init":case"initialize":["config"].forEach((function(t){void 0!==e.args[t]&&("flowchart-v2"===n&&(n="flowchart"),e.args[n]=e.args[t],delete e.args[t])})),e.args,kt(e.args);break;case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap("wrap"===e.type);break;default:c.warn("Unhandled directive: source: '%%{".concat(e.type,": ").concat(JSON.stringify(e.args?e.args:{}),"}%%"),e)}};function ds(t){bi(t.git),nr(t.flowchart),cr(t.flowchart),void 0!==t.sequenceDiagram&&Ua.setConf(F(t.sequence,t.sequenceDiagram)),Ua.setConf(t.sequence),Wr(t.gantt),re(t.class),go(t.state),Eo(t.state),Si(t.class),sn(t.er),ts(t.journey),ea(t.requirement),rs(t.class)}function ps(){}var ys=Object.freeze({render:function(t,e,n,r){wt();var i=e,a=W.detectInit(i);a&&kt(a);var o=xt();if(e.length>o.maxTextSize&&(i="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa"),void 0!==r)r.innerHTML="",Object(h.select)(r).append("div").attr("id","d"+t).attr("style","font-family: "+o.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g");else{var s=document.getElementById(t);s&&s.remove();var u=document.querySelector("#d"+t);u&&u.remove(),Object(h.select)("body").append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}window.txt=i,i=function(t){var e=t;return e=(e=(e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)}))).replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)}))).replace(/#\w+;/g,(function(t){var e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}))}(i);var l=Object(h.select)("#d"+t).node(),f=W.detectType(i,o),y=l.firstChild,g=y.firstChild,v="";if(void 0!==o.themeCSS&&(v+="\n".concat(o.themeCSS)),void 0!==o.fontFamily&&(v+="\n:root { --mermaid-font-family: ".concat(o.fontFamily,"}")),void 0!==o.altFontFamily&&(v+="\n:root { --mermaid-alt-font-family: ".concat(o.altFontFamily,"}")),"flowchart"===f||"flowchart-v2"===f||"graph"===f){var m=rr(i);for(var b in m)o.htmlLabels||o.flowchart.htmlLabels?(v+="\n.".concat(b," > * { ").concat(m[b].styles.join(" !important; ")," !important; }"),v+="\n.".concat(b," span { ").concat(m[b].styles.join(" !important; ")," !important; }")):(v+="\n.".concat(b," path { ").concat(m[b].styles.join(" !important; ")," !important; }"),v+="\n.".concat(b," rect { ").concat(m[b].styles.join(" !important; ")," !important; }"),v+="\n.".concat(b," polygon { ").concat(m[b].styles.join(" !important; ")," !important; }"),v+="\n.".concat(b," ellipse { ").concat(m[b].styles.join(" !important; ")," !important; }"),v+="\n.".concat(b," circle { ").concat(m[b].styles.join(" !important; ")," !important; }"),m[b].textStyles&&(v+="\n.".concat(b," tspan { ").concat(m[b].textStyles.join(" !important; ")," !important; }")))}var x=(new d.a)("#".concat(t),us(f,v,o.themeVariables)),_=document.createElement("style");_.innerHTML=x,y.insertBefore(_,g);try{switch(f){case"git":o.flowchart.arrowMarkerAbsolute=o.arrowMarkerAbsolute,bi(o.git),xi(i,t,!1);break;case"flowchart":o.flowchart.arrowMarkerAbsolute=o.arrowMarkerAbsolute,nr(o.flowchart),ir(i,t,!1);break;case"flowchart-v2":o.flowchart.arrowMarkerAbsolute=o.arrowMarkerAbsolute,cr(o.flowchart),ur(i,t,!1);break;case"sequence":o.sequence.arrowMarkerAbsolute=o.arrowMarkerAbsolute,o.sequenceDiagram?(Ua.setConf(Object.assign(o.sequence,o.sequenceDiagram)),console.error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.")):Ua.setConf(o.sequence),Ua.draw(i,t);break;case"gantt":o.gantt.arrowMarkerAbsolute=o.arrowMarkerAbsolute,Wr(o.gantt),Vr(i,t);break;case"class":o.class.arrowMarkerAbsolute=o.arrowMarkerAbsolute,re(o.class),ie(i,t);break;case"classDiagram":o.class.arrowMarkerAbsolute=o.arrowMarkerAbsolute,$e(o.class),qe(i,t);break;case"state":o.class.arrowMarkerAbsolute=o.arrowMarkerAbsolute,go(o.state),vo(i,t);break;case"stateDiagram":o.class.arrowMarkerAbsolute=o.arrowMarkerAbsolute,Eo(o.state),To(i,t);break;case"info":o.class.arrowMarkerAbsolute=o.arrowMarkerAbsolute,Si(o.class),Ai(i,t,p.version);break;case"pie":Ri(i,t,p.version);break;case"er":sn(o.er),cn(i,t,p.version);break;case"journey":ts(o.journey),es(i,t,p.version);break;case"requirement":ea(o.requirement),na(i,t,p.version)}}catch(e){throw is(t,p.version),e}Object(h.select)('[id="'.concat(t,'"]')).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");var k=Object(h.select)("#d"+t).node().innerHTML;if(c.debug("cnf.arrowMarkerAbsolute",o.arrowMarkerAbsolute),o.arrowMarkerAbsolute&&"false"!==o.arrowMarkerAbsolute||(k=k.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),k=(k=function(t){var e=t;return e=(e=(e=e.replace(/fl°°/g,(function(){return"&#"}))).replace(/fl°/g,(function(){return"&"}))).replace(/¶ß/g,(function(){return";"}))}(k)).replace(/<br>/g,"<br/>"),void 0!==n)switch(f){case"flowchart":case"flowchart-v2":n(k,Dn.bindFunctions);break;case"gantt":n(k,Yr.bindFunctions);break;case"class":case"classDiagram":n(k,Ft.bindFunctions);break;default:n(k)}else c.debug("CB = undefined!");var w=Object(h.select)("#d"+t).node();return null!==w&&"function"==typeof w.remove&&Object(h.select)("#d"+t).node().remove(),k},parse:function(t){var e=xt(),n=W.detectInit(t,e);n&&c.debug("reinit ",n);var r,i=W.detectType(t,e);switch(c.debug("Type "+i),i){case"git":(r=ci.a).parser.yy=oi;break;case"flowchart":case"flowchart-v2":Dn.clear(),(r=In.a).parser.yy=Dn;break;case"sequence":(r=ia.a).parser.yy=xa;break;case"gantt":(r=$r.a).parser.yy=Yr;break;case"class":case"classDiagram":(r=$t.a).parser.yy=Ft;break;case"state":case"stateDiagram":(r=qa.a).parser.yy=ao;break;case"info":c.debug("info info info"),(r=Ti.a).parser.yy=wi;break;case"pie":c.debug("pie"),(r=Oi.a).parser.yy=Li;break;case"er":c.debug("er"),(r=Ke.a).parser.yy=Ze;break;case"journey":c.debug("Journey"),(r=Io.a).parser.yy=Do;break;case"requirement":case"requirementDiagram":c.debug("RequirementDiagram"),(r=Pi.a).parser.yy=qi}return r.parser.yy.graphType=i,r.parser.yy.parseError=function(t,e){throw{str:t,hash:e}},r.parse(t),r},parseDirective:function(t,e,n,r){try{if(void 0!==e)switch(e=e.trim(),n){case"open_directive":hs={};break;case"type_directive":hs.type=e.toLowerCase();break;case"arg_directive":hs.args=JSON.parse(e);break;case"close_directive":fs(t,hs,r),hs=null}}catch(t){c.error("Error while rendering sequenceDiagram directive: ".concat(e," jison context: ").concat(n)),c.error(t.message)}},initialize:function(t){t&&t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),dt=F({},t),t&&t.theme&&ut[t.theme]?t.themeVariables=ut[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ut.default.getThemeVariables(t.themeVariables));var e="object"===ls(t)?function(t){return yt=F({},pt),yt=F(yt,t),t.theme&&(yt.themeVariables=ut[t.theme].getThemeVariables(t.themeVariables)),vt=mt(yt,gt),yt}(t):bt();ds(e),u(e.logLevel)},reinitialize:ps,getConfig:xt,setConfig:function(t){return F(vt,t),xt()},getSiteConfig:bt,updateSiteConfig:function(t){return yt=F(yt,t),mt(yt,gt),yt},reset:function(){wt()},globalReset:function(){wt(),ds(xt())},defaultConfig:pt});u(xt().logLevel),wt(xt());var gs=ys,vs=function(){ms.startOnLoad?gs.getConfig().startOnLoad&&ms.init():void 0===ms.startOnLoad&&(c.debug("In start, no config"),gs.getConfig().startOnLoad&&ms.init())};"undefined"!=typeof document&&
-/*!
- * Wait for document loaded before starting the execution
- */
-window.addEventListener("load",(function(){vs()}),!1);var ms={startOnLoad:!0,htmlLabels:!0,mermaidAPI:gs,parse:gs.parse,render:gs.render,init:function(){var t,e,n=this,r=gs.getConfig();arguments.length>=2?(
-/*! sequence config was passed as #1 */
-void 0!==arguments[0]&&(ms.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],"function"==typeof arguments[arguments.length-1]?(e=arguments[arguments.length-1],c.debug("Callback function found")):void 0!==r.mermaid&&("function"==typeof r.mermaid.callback?(e=r.mermaid.callback,c.debug("Callback function found")):c.debug("No Callback function found")),t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof window.Node?[t]:t,c.debug("Start On Load before: "+ms.startOnLoad),void 0!==ms.startOnLoad&&(c.debug("Start On Load inner: "+ms.startOnLoad),gs.updateSiteConfig({startOnLoad:ms.startOnLoad})),void 0!==ms.ganttConfig&&gs.updateSiteConfig({gantt:ms.ganttConfig});for(var a,o=new W.initIdGeneratior(r.deterministicIds,r.deterministicIDSeed),s=function(r){var s=t[r];
-/*! Check if previously processed */if(s.getAttribute("data-processed"))return"continue";s.setAttribute("data-processed",!0);var u="mermaid-".concat(o.next());a=i(a=s.innerHTML).trim().replace(/<br\s*\/?>/gi,"<br/>");var l=W.detectInit(a);l&&c.debug("Detected early reinit: ",l);try{gs.render(u,a,(function(t,n){s.innerHTML=t,void 0!==e&&e(u),n&&n(s)}),s)}catch(t){c.warn("Syntax Error rendering"),c.warn(t),n.parseError&&n.parseError(t)}},u=0;u<t.length;u++)s(u)},initialize:function(t){void 0!==t.mermaid&&(void 0!==t.mermaid.startOnLoad&&(ms.startOnLoad=t.mermaid.startOnLoad),void 0!==t.mermaid.htmlLabels&&(ms.htmlLabels=t.mermaid.htmlLabels)),gs.initialize(t)},contentLoaded:vs};e.default=ms}]).default}));
+/*! For license information please see mermaid.min.js.LICENSE.txt */
+!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mermaid=e():t.mermaid=e()}("undefined"!=typeof self?self:this,(()=>(()=>{var t={1362:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,7],r=[1,8],i=[1,9],a=[1,10],o=[1,13],s=[1,12],c=[1,16,25],u=[1,20],l=[1,31],h=[1,32],f=[1,33],d=[1,35],p=[1,38],g=[1,36],y=[1,37],m=[1,39],v=[1,40],b=[1,41],_=[1,42],x=[1,45],w=[1,46],k=[1,47],T=[1,48],C=[16,25],E=[1,62],S=[1,63],A=[1,64],M=[1,65],N=[1,66],D=[1,67],B=[16,25,32,44,45,53,56,57,58,59,60,61,66,68],L=[16,25,30,32,44,45,49,53,56,57,58,59,60,61,66,68,83,84,85,86],O=[5,8,9,10,11,16,19,23,25],I=[53,83,84,85,86],R=[53,60,61,83,84,85,86],F=[53,56,57,58,59,83,84,85,86],P=[16,25,32],Y=[1,99],j={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statments:5,direction:6,directive:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,statements:24,EOF:25,statement:26,className:27,alphaNumToken:28,classLiteralName:29,GENERICTYPE:30,relationStatement:31,LABEL:32,classStatement:33,methodStatement:34,annotationStatement:35,clickStatement:36,cssClassStatement:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,CLASS:43,STYLE_SEPARATOR:44,STRUCT_START:45,members:46,STRUCT_STOP:47,ANNOTATION_START:48,ANNOTATION_END:49,MEMBER:50,SEPARATOR:51,relation:52,STR:53,relationType:54,lineType:55,AGGREGATION:56,EXTENSION:57,COMPOSITION:58,DEPENDENCY:59,LINE:60,DOTTED_LINE:61,CALLBACK:62,LINK:63,LINK_TARGET:64,CLICK:65,CALLBACK_NAME:66,CALLBACK_ARGS:67,HREF:68,CSSCLASS:69,commentToken:70,textToken:71,graphCodeTokens:72,textNoTagsToken:73,TAGSTART:74,TAGEND:75,"==":76,"--":77,PCT:78,DEFAULT:79,SPACE:80,MINUS:81,keywords:82,UNICODE_TEXT:83,NUM:84,ALPHA:85,BQUOTE_STR:86,$accept:0,$end:1},terminals_:{2:"error",5:"statments",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",25:"EOF",30:"GENERICTYPE",32:"LABEL",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"CLASS",44:"STYLE_SEPARATOR",45:"STRUCT_START",47:"STRUCT_STOP",48:"ANNOTATION_START",49:"ANNOTATION_END",50:"MEMBER",51:"SEPARATOR",53:"STR",56:"AGGREGATION",57:"EXTENSION",58:"COMPOSITION",59:"DEPENDENCY",60:"LINE",61:"DOTTED_LINE",62:"CALLBACK",63:"LINK",64:"LINK_TARGET",65:"CLICK",66:"CALLBACK_NAME",67:"CALLBACK_ARGS",68:"HREF",69:"CSSCLASS",72:"graphCodeTokens",74:"TAGSTART",75:"TAGEND",76:"==",77:"--",78:"PCT",79:"DEFAULT",80:"SPACE",81:"MINUS",82:"keywords",83:"UNICODE_TEXT",84:"NUM",85:"ALPHA",86:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[3,1],[3,2],[6,1],[6,1],[6,1],[6,1],[4,1],[7,4],[7,6],[13,1],[14,1],[18,1],[15,1],[12,4],[24,1],[24,2],[24,3],[27,1],[27,1],[27,2],[27,2],[27,2],[26,1],[26,2],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,2],[26,2],[26,1],[33,2],[33,4],[33,5],[33,7],[35,4],[46,1],[46,2],[34,1],[34,2],[34,1],[34,1],[31,3],[31,4],[31,4],[31,5],[52,3],[52,2],[52,2],[52,1],[54,1],[54,1],[54,1],[54,1],[55,1],[55,1],[36,3],[36,4],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[37,3],[70,1],[70,1],[71,1],[71,1],[71,1],[71,1],[71,1],[71,1],[71,1],[73,1],[73,1],[73,1],[73,1],[28,1],[28,1],[28,1],[29,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.setDirection("TB");break;case 6:r.setDirection("BT");break;case 7:r.setDirection("RL");break;case 8:r.setDirection("LR");break;case 12:r.parseDirective("%%{","open_directive");break;case 13:r.parseDirective(a[s],"type_directive");break;case 14:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 15:r.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=a[s];break;case 22:this.$=a[s-1]+a[s];break;case 23:case 24:this.$=a[s-1]+"~"+a[s];break;case 25:r.addRelation(a[s]);break;case 26:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 34:this.$=a[s].trim(),r.setTitle(this.$);break;case 35:case 36:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 37:r.addClass(a[s]);break;case 38:r.addClass(a[s-2]),r.setCssClass(a[s-2],a[s]);break;case 39:r.addClass(a[s-3]),r.addMembers(a[s-3],a[s-1]);break;case 40:r.addClass(a[s-5]),r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 41:r.addAnnotation(a[s],a[s-2]);break;case 42:this.$=[a[s]];break;case 43:a[s].push(a[s-1]),this.$=a[s];break;case 44:case 46:case 47:break;case 45:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 48:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 49:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:"none"};break;case 50:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:"none",relationTitle2:a[s-1]};break;case 51:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 52:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 53:this.$={type1:"none",type2:a[s],lineType:a[s-1]};break;case 54:this.$={type1:a[s-1],type2:"none",lineType:a[s]};break;case 55:this.$={type1:"none",type2:"none",lineType:a[s]};break;case 56:this.$=r.relationType.AGGREGATION;break;case 57:this.$=r.relationType.EXTENSION;break;case 58:this.$=r.relationType.COMPOSITION;break;case 59:this.$=r.relationType.DEPENDENCY;break;case 60:this.$=r.lineType.LINE;break;case 61:this.$=r.lineType.DOTTED_LINE;break;case 62:case 68:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 63:case 69:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 64:case 72:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 65:case 73:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 66:case 74:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 67:case 75:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 70:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 71:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 76:r.setCssClass(a[s-1],a[s])}},table:[{3:1,4:2,5:e,6:4,7:5,8:n,9:r,10:i,11:a,12:6,13:11,19:o,23:s},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:e,6:4,7:5,8:n,9:r,10:i,11:a,12:6,13:11,19:o,23:s},{1:[2,9]},t(c,[2,5]),t(c,[2,6]),t(c,[2,7]),t(c,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:u},t([17,22],[2,13]),{6:30,7:29,8:n,9:r,10:i,11:a,13:11,19:o,24:21,26:22,27:34,28:43,29:44,31:23,33:24,34:25,35:26,36:27,37:28,38:l,40:h,42:f,43:d,48:p,50:g,51:y,62:m,63:v,65:b,69:_,83:x,84:w,85:k,86:T},{16:[1,49]},{18:50,21:[1,51]},{16:[2,15]},{25:[1,52]},{16:[1,53],25:[2,17]},t(C,[2,25],{32:[1,54]}),t(C,[2,27]),t(C,[2,28]),t(C,[2,29]),t(C,[2,30]),t(C,[2,31]),t(C,[2,32]),t(C,[2,33]),{39:[1,55]},{41:[1,56]},t(C,[2,36]),t(C,[2,44],{52:57,54:60,55:61,32:[1,59],53:[1,58],56:E,57:S,58:A,59:M,60:N,61:D}),{27:68,28:43,29:44,83:x,84:w,85:k,86:T},t(C,[2,46]),t(C,[2,47]),{28:69,83:x,84:w,85:k},{27:70,28:43,29:44,83:x,84:w,85:k,86:T},{27:71,28:43,29:44,83:x,84:w,85:k,86:T},{27:72,28:43,29:44,83:x,84:w,85:k,86:T},{53:[1,73]},t(B,[2,20],{28:43,29:44,27:74,30:[1,75],83:x,84:w,85:k,86:T}),t(B,[2,21],{30:[1,76]}),t(L,[2,90]),t(L,[2,91]),t(L,[2,92]),t([16,25,30,32,44,45,53,56,57,58,59,60,61,66,68],[2,93]),t(O,[2,10]),{15:77,22:u},{22:[2,14]},{1:[2,16]},{6:30,7:29,8:n,9:r,10:i,11:a,13:11,19:o,24:78,25:[2,18],26:22,27:34,28:43,29:44,31:23,33:24,34:25,35:26,36:27,37:28,38:l,40:h,42:f,43:d,48:p,50:g,51:y,62:m,63:v,65:b,69:_,83:x,84:w,85:k,86:T},t(C,[2,26]),t(C,[2,34]),t(C,[2,35]),{27:79,28:43,29:44,53:[1,80],83:x,84:w,85:k,86:T},{52:81,54:60,55:61,56:E,57:S,58:A,59:M,60:N,61:D},t(C,[2,45]),{55:82,60:N,61:D},t(I,[2,55],{54:83,56:E,57:S,58:A,59:M}),t(R,[2,56]),t(R,[2,57]),t(R,[2,58]),t(R,[2,59]),t(F,[2,60]),t(F,[2,61]),t(C,[2,37],{44:[1,84],45:[1,85]}),{49:[1,86]},{53:[1,87]},{53:[1,88]},{66:[1,89],68:[1,90]},{28:91,83:x,84:w,85:k},t(B,[2,22]),t(B,[2,23]),t(B,[2,24]),{16:[1,92]},{25:[2,19]},t(P,[2,48]),{27:93,28:43,29:44,83:x,84:w,85:k,86:T},{27:94,28:43,29:44,53:[1,95],83:x,84:w,85:k,86:T},t(I,[2,54],{54:96,56:E,57:S,58:A,59:M}),t(I,[2,53]),{28:97,83:x,84:w,85:k},{46:98,50:Y},{27:100,28:43,29:44,83:x,84:w,85:k,86:T},t(C,[2,62],{53:[1,101]}),t(C,[2,64],{53:[1,103],64:[1,102]}),t(C,[2,68],{53:[1,104],67:[1,105]}),t(C,[2,72],{53:[1,107],64:[1,106]}),t(C,[2,76]),t(O,[2,11]),t(P,[2,50]),t(P,[2,49]),{27:108,28:43,29:44,83:x,84:w,85:k,86:T},t(I,[2,52]),t(C,[2,38],{45:[1,109]}),{47:[1,110]},{46:111,47:[2,42],50:Y},t(C,[2,41]),t(C,[2,63]),t(C,[2,65]),t(C,[2,66],{64:[1,112]}),t(C,[2,69]),t(C,[2,70],{53:[1,113]}),t(C,[2,73]),t(C,[2,74],{64:[1,114]}),t(P,[2,51]),{46:115,50:Y},t(C,[2,39]),{47:[2,43]},t(C,[2,67]),t(C,[2,71]),t(C,[2,75]),{47:[1,116]},t(C,[2,40])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],6:[2,9],13:[2,12],14:[2,4],20:[2,15],51:[2,14],52:[2,16],78:[2,19],111:[2,43]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},U={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:case 10:case 19:case 26:break;case 11:return this.begin("acc_title"),38;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),40;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:case 36:case 39:case 42:case 45:case 48:case 51:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 20:case 21:return 23;case 22:return this.begin("struct"),45;case 23:return"EOF_IN_STRUCT";case 24:return"OPEN_IN_STRUCT";case 25:return this.popState(),47;case 27:return"MEMBER";case 28:return 43;case 29:return 69;case 30:return 62;case 31:return 63;case 32:return 65;case 33:return 48;case 34:return 49;case 35:this.begin("generic");break;case 37:return"GENERICTYPE";case 38:this.begin("string");break;case 40:return"STR";case 41:this.begin("bqstring");break;case 43:return"BQUOTE_STR";case 44:this.begin("href");break;case 46:return 68;case 47:this.begin("callback_name");break;case 49:this.popState(),this.begin("callback_args");break;case 50:return 66;case 52:return 67;case 53:case 54:case 55:case 56:return 64;case 57:case 58:return 57;case 59:case 60:return 59;case 61:return 58;case 62:return 56;case 63:return 60;case 64:return 61;case 65:return 32;case 66:return 44;case 67:return 81;case 68:return"DOT";case 69:return"PLUS";case 70:return 78;case 71:case 72:return"EQUALS";case 73:return 85;case 74:return"PUNCTUATION";case 75:return 84;case 76:return 83;case 77:return 80;case 78:return 25}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},callback_args:{rules:[51,52],inclusive:!1},callback_name:{rules:[48,49,50],inclusive:!1},href:{rules:[45,46],inclusive:!1},struct:{rules:[23,24,25,26,27],inclusive:!1},generic:{rules:[36,37],inclusive:!1},bqstring:{rules:[42,43],inclusive:!1},string:{rules:[39,40],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,28,29,30,31,32,33,34,35,38,41,44,47,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78],inclusive:!0}}};function z(){this.yy={}}return j.lexer=U,z.prototype=j,j.Parser=z,new z}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8218).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},5890:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,23,25,27,29,30,48],i=[1,17],a=[1,18],o=[1,19],s=[1,20],c=[1,21],u=[1,24],l=[1,29],h=[1,30],f=[1,31],d=[1,32],p=[1,44],g=[30,45,46],y=[4,6,9,11,23,25,27,29,30,48],m=[41,42,43,44],v=[22,36],b=[1,62],_={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,attribute:31,attributeType:32,attributeName:33,attributeKeyType:34,attributeComment:35,ATTRIBUTE_WORD:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,NON_IDENTIFYING:45,IDENTIFYING:46,WORD:47,open_directive:48,type_directive:49,arg_directive:50,close_directive:51,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",36:"ATTRIBUTE_WORD",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"NON_IDENTIFYING",46:"IDENTIFYING",47:"WORD",48:"open_directive",49:"type_directive",50:"arg_directive",51:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[21,1],[21,2],[31,2],[31,3],[31,3],[31,4],[32,1],[33,1],[34,1],[35,1],[18,3],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 3:case 7:case 8:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:case 20:case 27:case 28:case 29:case 39:this.$=a[s];break;case 12:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 13:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s]);break;case 16:case 17:this.$=a[s].trim(),r.setTitle(this.$);break;case 18:case 19:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 21:this.$=[a[s]];break;case 22:a[s].push(a[s-1]),this.$=a[s];break;case 23:this.$={attributeType:a[s-1],attributeName:a[s]};break;case 24:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeKeyType:a[s]};break;case 25:this.$={attributeType:a[s-2],attributeName:a[s-1],attributeComment:a[s]};break;case 26:this.$={attributeType:a[s-3],attributeName:a[s-2],attributeKeyType:a[s-1],attributeComment:a[s]};break;case 30:case 38:this.$=a[s].replace(/"/g,"");break;case 31:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 32:this.$=r.Cardinality.ZERO_OR_ONE;break;case 33:this.$=r.Cardinality.ZERO_OR_MORE;break;case 34:this.$=r.Cardinality.ONE_OR_MORE;break;case 35:this.$=r.Cardinality.ONLY_ONE;break;case 36:this.$=r.Identification.NON_IDENTIFYING;break;case 37:this.$=r.Identification.IDENTIFYING;break;case 40:r.parseDirective("%%{","open_directive");break;case 41:r.parseDirective(a[s],"type_directive");break;case 42:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 43:r.parseDirective("}%%","close_directive","er")}},table:[{3:1,4:e,7:3,12:4,48:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,48:n},{13:8,49:[1,9]},{49:[2,40]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:i,25:a,27:o,29:s,30:c,48:n},{1:[2,2]},{14:22,15:[1,23],51:u},t([15,51],[2,41]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:15,10:25,12:4,17:16,23:i,25:a,27:o,29:s,30:c,48:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,15],{18:26,39:28,20:[1,27],41:l,42:h,43:f,44:d}),{24:[1,33]},{26:[1,34]},{28:[1,35]},t(r,[2,19]),t([6,9,11,15,20,23,25,27,29,30,41,42,43,44,48],[2,20]),{11:[1,36]},{16:37,50:[1,38]},{11:[2,43]},t(r,[2,5]),{17:39,30:c},{21:40,22:[1,41],31:42,32:43,36:p},{40:45,45:[1,46],46:[1,47]},t(g,[2,32]),t(g,[2,33]),t(g,[2,34]),t(g,[2,35]),t(r,[2,16]),t(r,[2,17]),t(r,[2,18]),t(y,[2,9]),{14:48,51:u},{51:[2,42]},{15:[1,49]},{22:[1,50]},t(r,[2,14]),{21:51,22:[2,21],31:42,32:43,36:p},{33:52,36:[1,53]},{36:[2,27]},{39:54,41:l,42:h,43:f,44:d},t(m,[2,36]),t(m,[2,37]),{11:[1,55]},{19:56,30:[1,58],47:[1,57]},t(r,[2,13]),{22:[2,22]},t(v,[2,23],{34:59,35:60,37:[1,61],38:b}),t([22,36,37,38],[2,28]),{30:[2,31]},t(y,[2,10]),t(r,[2,12]),t(r,[2,38]),t(r,[2,39]),t(v,[2,24],{35:63,38:b}),t(v,[2,25]),t([22,36,38],[2,29]),t(v,[2,30]),t(v,[2,26])],defaultActions:{5:[2,40],7:[2,2],24:[2,43],38:[2,42],44:[2,27],51:[2,22],54:[2,31]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},x={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.begin("open_directive"),48;case 8:return this.begin("type_directive"),49;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),51;case 11:return 50;case 12:case 13:case 15:case 20:case 24:break;case 14:return 11;case 16:return 9;case 17:return 47;case 18:return 4;case 19:return this.begin("block"),20;case 21:return 37;case 22:return 36;case 23:return 38;case 25:return this.popState(),22;case 26:case 39:return e.yytext[0];case 27:case 31:return 41;case 28:case 32:return 42;case 29:case 33:return 43;case 30:return 44;case 34:case 36:case 37:return 45;case 35:return 46;case 38:return 30;case 40:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:(?:PK)|(?:FK))/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\|o\b)/i,/^(?:\}o\b)/i,/^(?:\}\|)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[20,21,22,23,24,25,26],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,27,28,29,30,31,32,33,34,35,36,37,38,39,40],inclusive:!0}}};function w(){this.yy={}}return _.lexer=x,w.prototype=_,_.Parser=w,new w}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8009).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},3602:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,9],n=[1,7],r=[1,6],i=[1,8],a=[1,20,21,22,23,38,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],o=[2,10],s=[1,20],c=[1,21],u=[1,22],l=[1,23],h=[1,30],f=[1,32],d=[1,33],p=[1,34],g=[1,62],y=[1,48],m=[1,52],v=[1,36],b=[1,37],_=[1,38],x=[1,39],w=[1,40],k=[1,56],T=[1,63],C=[1,51],E=[1,53],S=[1,55],A=[1,59],M=[1,60],N=[1,41],D=[1,42],B=[1,43],L=[1,44],O=[1,61],I=[1,50],R=[1,54],F=[1,57],P=[1,58],Y=[1,49],j=[1,66],U=[1,71],z=[1,20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],$=[1,75],q=[1,74],H=[1,76],W=[20,21,23,81,82],V=[1,99],G=[1,104],X=[1,107],Z=[1,108],Q=[1,101],K=[1,106],J=[1,109],tt=[1,102],et=[1,114],nt=[1,113],rt=[1,103],it=[1,105],at=[1,110],ot=[1,111],st=[1,112],ct=[1,115],ut=[20,21,22,23,81,82],lt=[20,21,22,23,53,81,82],ht=[20,21,22,23,40,52,53,55,57,59,61,63,65,66,67,69,71,73,74,76,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],ft=[20,21,23],dt=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],pt=[1,12,20,21,22,23,24,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],gt=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],yt=[1,149],mt=[1,157],vt=[1,158],bt=[1,159],_t=[1,160],xt=[1,144],wt=[1,145],kt=[1,141],Tt=[1,152],Ct=[1,153],Et=[1,154],St=[1,155],At=[1,156],Mt=[1,161],Nt=[1,162],Dt=[1,147],Bt=[1,150],Lt=[1,146],Ot=[1,143],It=[20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Rt=[1,165],Ft=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],Pt=[20,21,22,23,24,26,38,40,41,42,52,56,58,60,62,64,66,67,68,70,72,73,75,77,81,82,86,87,88,89,90,91,92,95,105,106,109,111,112,113,114,122,123,124,125,126,127],Yt=[12,21,22,24],jt=[22,106],Ut=[1,250],zt=[1,245],$t=[1,246],qt=[1,254],Ht=[1,251],Wt=[1,248],Vt=[1,247],Gt=[1,249],Xt=[1,252],Zt=[1,253],Qt=[1,255],Kt=[1,273],Jt=[20,21,23,106],te=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],ee={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,link:49,node:50,vertex:51,AMP:52,STYLE_SEPARATOR:53,idString:54,DOUBLECIRCLESTART:55,DOUBLECIRCLEEND:56,PS:57,PE:58,"(-":59,"-)":60,STADIUMSTART:61,STADIUMEND:62,SUBROUTINESTART:63,SUBROUTINEEND:64,VERTEX_WITH_PROPS_START:65,ALPHA:66,COLON:67,PIPE:68,CYLINDERSTART:69,CYLINDEREND:70,DIAMOND_START:71,DIAMOND_STOP:72,TAGEND:73,TRAPSTART:74,TRAPEND:75,INVTRAPSTART:76,INVTRAPEND:77,linkStatement:78,arrowText:79,TESTSTR:80,START_LINK:81,LINK:82,textToken:83,STR:84,keywords:85,STYLE:86,LINKSTYLE:87,CLASSDEF:88,CLASS:89,CLICK:90,DOWN:91,UP:92,textNoTags:93,textNoTagsToken:94,DEFAULT:95,stylesOpt:96,alphaNum:97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,HEX:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,MINUS:109,UNIT:110,BRKT:111,DOT:112,PCT:113,TAGSTART:114,alphaNumToken:115,idStringToken:116,alphaNumStatement:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,PUNCTUATION:122,UNICODE_TEXT:123,PLUS:124,EQUALS:125,MULT:126,UNDERSCORE:127,graphCodeTokens:128,ARROW_CROSS:129,ARROW_POINT:130,ARROW_CIRCLE:131,ARROW_OPEN:132,QUOTE:133,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",52:"AMP",53:"STYLE_SEPARATOR",55:"DOUBLECIRCLESTART",56:"DOUBLECIRCLEEND",57:"PS",58:"PE",59:"(-",60:"-)",61:"STADIUMSTART",62:"STADIUMEND",63:"SUBROUTINESTART",64:"SUBROUTINEEND",65:"VERTEX_WITH_PROPS_START",66:"ALPHA",67:"COLON",68:"PIPE",69:"CYLINDERSTART",70:"CYLINDEREND",71:"DIAMOND_START",72:"DIAMOND_STOP",73:"TAGEND",74:"TRAPSTART",75:"TRAPEND",76:"INVTRAPSTART",77:"INVTRAPEND",80:"TESTSTR",81:"START_LINK",82:"LINK",84:"STR",86:"STYLE",87:"LINKSTYLE",88:"CLASSDEF",89:"CLASS",90:"CLICK",91:"DOWN",92:"UP",95:"DEFAULT",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"HEX",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"MINUS",110:"UNIT",111:"BRKT",112:"DOT",113:"PCT",114:"TAGSTART",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr",122:"PUNCTUATION",123:"UNICODE_TEXT",124:"PLUS",125:"EQUALS",126:"MULT",127:"UNDERSCORE",129:"ARROW_CROSS",130:"ARROW_POINT",131:"ARROW_CIRCLE",132:"ARROW_OPEN",133:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[50,1],[50,5],[50,3],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,8],[51,4],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,4],[51,4],[51,1],[49,2],[49,3],[49,3],[49,1],[49,3],[78,1],[79,3],[39,1],[39,2],[39,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[93,1],[93,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[103,1],[103,3],[96,1],[96,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[94,1],[94,1],[94,1],[94,1],[54,1],[54,2],[97,1],[97,2],[117,1],[117,1],[117,1],[117,1],[43,1],[43,1],[43,1],[43,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.parseDirective("%%{","open_directive");break;case 6:r.parseDirective(a[s],"type_directive");break;case 7:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 8:r.parseDirective("}%%","close_directive","flowchart");break;case 10:case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 11:a[s]!==[]&&a[s-1].push(a[s]),this.$=a[s-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:case 78:case 150:this.$=a[s];break;case 19:r.setDirection("TB"),this.$="TB";break;case 20:r.setDirection(a[s-1]),this.$=a[s-1];break;case 35:this.$=a[s-1].nodes;break;case 41:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 42:this.$=r.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 43:this.$=r.addSubGraph(void 0,a[s-1],void 0);break;case 45:this.$=a[s].trim(),r.setTitle(this.$);break;case 46:case 47:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 51:r.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 52:r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 53:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 54:this.$={stmt:a[s],nodes:a[s]};break;case 55:case 123:case 125:this.$=[a[s]];break;case 56:this.$=a[s-4].concat(a[s]);break;case 57:this.$=[a[s-2]],r.setClass(a[s-2],a[s]);break;case 58:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"square");break;case 59:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"doublecircle");break;case 60:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"circle");break;case 61:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"ellipse");break;case 62:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"stadium");break;case 63:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"subroutine");break;case 64:this.$=a[s-7],r.addVertex(a[s-7],a[s-1],"rect",void 0,void 0,void 0,Object.fromEntries([[a[s-5],a[s-3]]]));break;case 65:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"cylinder");break;case 66:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"round");break;case 67:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"diamond");break;case 68:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"hexagon");break;case 69:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"odd");break;case 70:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"trapezoid");break;case 71:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"inv_trapezoid");break;case 72:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_right");break;case 73:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_left");break;case 74:this.$=a[s],r.addVertex(a[s]);break;case 75:a[s-1].text=a[s],this.$=a[s-1];break;case 76:case 77:a[s-2].text=a[s-1],this.$=a[s-2];break;case 79:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1]};break;case 80:c=r.destructLink(a[s]),this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 81:this.$=a[s-1];break;case 83:case 97:case 153:case 151:this.$=a[s-1]+""+a[s];break;case 98:case 99:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 100:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 101:case 109:this.$=a[s-1],r.setClickEvent(a[s-1],a[s]);break;case 102:case 110:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 103:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 104:this.$=a[s-4],r.setClickEvent(a[s-4],a[s-3],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 105:case 111:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 106:case 112:this.$=a[s-3],r.setLink(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 107:case 113:this.$=a[s-3],r.setLink(a[s-3],a[s-2],a[s]);break;case 108:case 114:this.$=a[s-5],r.setLink(a[s-5],a[s-4],a[s]),r.setTooltip(a[s-5],a[s-2]);break;case 115:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 116:case 118:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 117:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 119:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 120:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 121:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 122:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 124:case 126:a[s-2].push(a[s]),this.$=a[s-2];break;case 128:this.$=a[s-1]+a[s];break;case 156:this.$="v";break;case 157:this.$="-";break;case 158:this.$={stmt:"dir",value:"TB"};break;case 159:this.$={stmt:"dir",value:"BT"};break;case 160:this.$={stmt:"dir",value:"RL"};break;case 161:this.$={stmt:"dir",value:"LR"}}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},t(a,o,{17:11}),{7:12,13:[1,13]},{16:14,21:n,22:r,24:i},{16:15,21:n,22:r,24:i},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,43:31,44:f,46:d,48:p,50:35,51:45,52:g,54:46,66:y,67:m,86:v,87:b,88:_,89:x,90:w,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,118:N,119:D,120:B,121:L,122:O,123:I,124:R,125:F,126:P,127:Y},{8:64,10:[1,65],15:j},t([10,15],[2,6]),t(a,[2,17]),t(a,[2,18]),t(a,[2,19]),{20:[1,68],21:[1,69],22:U,27:67,30:70},t(z,[2,11]),t(z,[2,12]),t(z,[2,13]),t(z,[2,14]),t(z,[2,15]),t(z,[2,16]),{9:72,20:$,21:q,23:H,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:$,21:q,23:H},{9:81,20:$,21:q,23:H},{9:82,20:$,21:q,23:H},{9:83,20:$,21:q,23:H},{9:84,20:$,21:q,23:H},{9:86,20:$,21:q,22:[1,85],23:H},t(z,[2,44]),{45:[1,87]},{47:[1,88]},t(z,[2,47]),t(W,[2,54],{30:89,22:U}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:V,52:G,66:X,67:Z,84:[1,97],91:Q,97:96,98:[1,94],100:[1,95],105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(z,[2,158]),t(z,[2,159]),t(z,[2,160]),t(z,[2,161]),t(ut,[2,55],{53:[1,116]}),t(lt,[2,74],{116:129,40:[1,117],52:g,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:y,67:m,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:k,95:T,105:C,106:E,109:S,111:A,112:M,122:O,123:I,124:R,125:F,126:P,127:Y}),t(ht,[2,150]),t(ht,[2,175]),t(ht,[2,176]),t(ht,[2,177]),t(ht,[2,178]),t(ht,[2,179]),t(ht,[2,180]),t(ht,[2,181]),t(ht,[2,182]),t(ht,[2,183]),t(ht,[2,184]),t(ht,[2,185]),t(ht,[2,186]),t(ht,[2,187]),t(ht,[2,188]),t(ht,[2,189]),t(ht,[2,190]),{9:130,20:$,21:q,23:H},{11:131,14:[1,132]},t(ft,[2,8]),t(a,[2,20]),t(a,[2,26]),t(a,[2,27]),{21:[1,133]},t(dt,[2,34],{30:134,22:U}),t(z,[2,35]),{50:135,51:45,52:g,54:46,66:y,67:m,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,122:O,123:I,124:R,125:F,126:P,127:Y},t(pt,[2,48]),t(pt,[2,49]),t(pt,[2,50]),t(gt,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:yt,24:mt,26:vt,38:bt,39:139,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),t(z,[2,36]),t(z,[2,37]),t(z,[2,38]),t(z,[2,39]),t(z,[2,40]),{22:yt,24:mt,26:vt,38:bt,39:163,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(It,o,{17:164}),t(z,[2,45]),t(z,[2,46]),t(W,[2,53],{52:Rt}),{26:V,52:G,66:X,67:Z,91:Q,97:166,102:[1,167],105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},{95:[1,168],103:169,105:[1,170]},{26:V,52:G,66:X,67:Z,91:Q,95:[1,171],97:172,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},{26:V,52:G,66:X,67:Z,91:Q,97:173,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(ft,[2,101],{22:[1,174],99:[1,175]}),t(ft,[2,105],{22:[1,176]}),t(ft,[2,109],{115:100,117:178,22:[1,177],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,122:rt,123:it,124:at,125:ot,126:st,127:ct}),t(ft,[2,111],{22:[1,179]}),t(Ft,[2,152]),t(Ft,[2,154]),t(Ft,[2,155]),t(Ft,[2,156]),t(Ft,[2,157]),t(Pt,[2,162]),t(Pt,[2,163]),t(Pt,[2,164]),t(Pt,[2,165]),t(Pt,[2,166]),t(Pt,[2,167]),t(Pt,[2,168]),t(Pt,[2,169]),t(Pt,[2,170]),t(Pt,[2,171]),t(Pt,[2,172]),t(Pt,[2,173]),t(Pt,[2,174]),{52:g,54:180,66:y,67:m,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,122:O,123:I,124:R,125:F,126:P,127:Y},{22:yt,24:mt,26:vt,38:bt,39:181,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:182,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:184,42:_t,52:G,57:[1,183],66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:185,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:186,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:187,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{66:[1,188]},{22:yt,24:mt,26:vt,38:bt,39:189,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:190,42:_t,52:G,66:X,67:Z,71:[1,191],73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:192,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:193,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:194,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(ht,[2,151]),t(Yt,[2,3]),{8:195,15:j},{15:[2,7]},t(a,[2,28]),t(dt,[2,33]),t(W,[2,51],{30:196,22:U}),t(gt,[2,75],{22:[1,197]}),{22:[1,198]},{22:yt,24:mt,26:vt,38:bt,39:199,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,73:xt,81:wt,82:[1,200],83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(Pt,[2,82]),t(Pt,[2,84]),t(Pt,[2,140]),t(Pt,[2,141]),t(Pt,[2,142]),t(Pt,[2,143]),t(Pt,[2,144]),t(Pt,[2,145]),t(Pt,[2,146]),t(Pt,[2,147]),t(Pt,[2,148]),t(Pt,[2,149]),t(Pt,[2,85]),t(Pt,[2,86]),t(Pt,[2,87]),t(Pt,[2,88]),t(Pt,[2,89]),t(Pt,[2,90]),t(Pt,[2,91]),t(Pt,[2,92]),t(Pt,[2,93]),t(Pt,[2,94]),t(Pt,[2,95]),{9:203,20:$,21:q,22:yt,23:H,24:mt,26:vt,38:bt,40:[1,202],42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,204],43:31,44:f,46:d,48:p,50:35,51:45,52:g,54:46,66:y,67:m,86:v,87:b,88:_,89:x,90:w,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,118:N,119:D,120:B,121:L,122:O,123:I,124:R,125:F,126:P,127:Y},{22:U,30:205},{22:[1,206],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,115:100,117:178,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},t(jt,[2,123]),{22:[1,211]},{22:[1,212],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,115:100,117:178,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:[1,213],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,115:100,117:178,122:rt,123:it,124:at,125:ot,126:st,127:ct},{84:[1,214]},t(ft,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},t(Ft,[2,153]),{84:[1,219],101:[1,220]},t(ut,[2,57],{116:129,52:g,66:y,67:m,91:k,95:T,105:C,106:E,109:S,111:A,112:M,122:O,123:I,124:R,125:F,126:P,127:Y}),{22:yt,24:mt,26:vt,38:bt,41:[1,221],42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,56:[1,222],66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:223,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,58:[1,224],66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,60:[1,225],66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,62:[1,226],66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,64:[1,227],66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{67:[1,228]},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,70:[1,229],73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,72:[1,230],73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,39:231,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,41:[1,232],42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,73:xt,75:[1,233],77:[1,234],81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,73:xt,75:[1,236],77:[1,235],81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{9:237,20:$,21:q,23:H},t(W,[2,52],{52:Rt}),t(gt,[2,77]),t(gt,[2,76]),{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,68:[1,238],73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(gt,[2,79]),t(Pt,[2,83]),{22:yt,24:mt,26:vt,38:bt,39:239,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(It,o,{17:240}),t(z,[2,43]),{51:241,52:g,54:46,66:y,67:m,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,122:O,123:I,124:R,125:F,126:P,127:Y},{22:Ut,66:zt,67:$t,86:qt,96:242,102:Ht,105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Ut,66:zt,67:$t,86:qt,96:256,102:Ht,105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Ut,66:zt,67:$t,86:qt,96:257,102:Ht,104:[1,258],105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Ut,66:zt,67:$t,86:qt,96:259,102:Ht,104:[1,260],105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{105:[1,261]},{22:Ut,66:zt,67:$t,86:qt,96:262,102:Ht,105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Ut,66:zt,67:$t,86:qt,96:263,102:Ht,105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{26:V,52:G,66:X,67:Z,91:Q,97:264,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(ft,[2,102]),{84:[1,265]},t(ft,[2,106],{22:[1,266]}),t(ft,[2,107]),t(ft,[2,110]),t(ft,[2,112],{22:[1,267]}),t(ft,[2,113]),t(lt,[2,58]),t(lt,[2,59]),{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,58:[1,268],66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(lt,[2,66]),t(lt,[2,61]),t(lt,[2,62]),t(lt,[2,63]),{66:[1,269]},t(lt,[2,65]),t(lt,[2,67]),{22:yt,24:mt,26:vt,38:bt,42:_t,52:G,66:X,67:Z,72:[1,270],73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(lt,[2,69]),t(lt,[2,70]),t(lt,[2,72]),t(lt,[2,71]),t(lt,[2,73]),t(Yt,[2,4]),t([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:yt,24:mt,26:vt,38:bt,41:[1,271],42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,272],43:31,44:f,46:d,48:p,50:35,51:45,52:g,54:46,66:y,67:m,86:v,87:b,88:_,89:x,90:w,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,118:N,119:D,120:B,121:L,122:O,123:I,124:R,125:F,126:P,127:Y},t(ut,[2,56]),t(ft,[2,115],{106:Kt}),t(Jt,[2,125],{108:274,22:Ut,66:zt,67:$t,86:qt,102:Ht,105:Wt,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt}),t(te,[2,127]),t(te,[2,129]),t(te,[2,130]),t(te,[2,131]),t(te,[2,132]),t(te,[2,133]),t(te,[2,134]),t(te,[2,135]),t(te,[2,136]),t(te,[2,137]),t(te,[2,138]),t(te,[2,139]),t(ft,[2,116],{106:Kt}),t(ft,[2,117],{106:Kt}),{22:[1,275]},t(ft,[2,118],{106:Kt}),{22:[1,276]},t(jt,[2,124]),t(ft,[2,98],{106:Kt}),t(ft,[2,99],{106:Kt}),t(ft,[2,100],{115:100,117:178,26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,122:rt,123:it,124:at,125:ot,126:st,127:ct}),t(ft,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:$,21:q,23:H},t(z,[2,42]),{22:Ut,66:zt,67:$t,86:qt,102:Ht,105:Wt,107:283,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},t(te,[2,128]),{26:V,52:G,66:X,67:Z,91:Q,97:284,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},{26:V,52:G,66:X,67:Z,91:Q,97:285,105:K,106:J,109:tt,111:et,112:nt,115:100,117:98,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(ft,[2,108]),t(ft,[2,114]),t(lt,[2,60]),{22:yt,24:mt,26:vt,38:bt,39:286,42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:140,84:kt,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},t(lt,[2,68]),t(It,o,{17:287}),t(Jt,[2,126],{108:274,22:Ut,66:zt,67:$t,86:qt,102:Ht,105:Wt,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt}),t(ft,[2,121],{115:100,117:178,22:[1,288],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,122:rt,123:it,124:at,125:ot,126:st,127:ct}),t(ft,[2,122],{115:100,117:178,22:[1,289],26:V,52:G,66:X,67:Z,91:Q,105:K,106:J,109:tt,111:et,112:nt,122:rt,123:it,124:at,125:ot,126:st,127:ct}),{22:yt,24:mt,26:vt,38:bt,41:[1,290],42:_t,52:G,66:X,67:Z,73:xt,81:wt,83:201,85:151,86:Tt,87:Ct,88:Et,89:St,90:At,91:Mt,92:Nt,94:142,95:Dt,105:K,106:J,109:Bt,111:et,112:nt,113:Lt,114:Ot,115:148,122:rt,123:it,124:at,125:ot,126:st,127:ct},{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,291],43:31,44:f,46:d,48:p,50:35,51:45,52:g,54:46,66:y,67:m,86:v,87:b,88:_,89:x,90:w,91:k,95:T,105:C,106:E,109:S,111:A,112:M,116:47,118:N,119:D,120:B,121:L,122:O,123:I,124:R,125:F,126:P,127:Y},{22:Ut,66:zt,67:$t,86:qt,96:292,102:Ht,105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},{22:Ut,66:zt,67:$t,86:qt,96:293,102:Ht,105:Wt,107:243,108:244,109:Vt,110:Gt,111:Xt,112:Zt,113:Qt},t(lt,[2,64]),t(z,[2,41]),t(ft,[2,119],{106:Kt}),t(ft,[2,120],{106:Kt})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},ne={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:case 6:break;case 7:return this.begin("acc_title"),44;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),46;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:case 15:case 24:case 27:case 30:case 33:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 16:return"STR";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin("href");break;case 25:return 100;case 26:this.begin("callbackname");break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 31:return 99;case 32:this.begin("click");break;case 34:return 90;case 35:case 36:return t.lex.firstGraph()&&this.begin("dir"),24;case 37:return 38;case 38:return 42;case 39:case 40:case 41:case 42:return 101;case 43:return this.popState(),25;case 44:case 45:case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:return this.popState(),26;case 54:return 118;case 55:return 119;case 56:return 120;case 57:return 121;case 58:return 105;case 59:return 111;case 60:return 53;case 61:return 67;case 62:return 52;case 63:return 20;case 64:return 106;case 65:return 126;case 66:case 67:case 68:return 82;case 69:case 70:case 71:return 81;case 72:return 59;case 73:return 60;case 74:return 61;case 75:return 62;case 76:return 63;case 77:return 64;case 78:return 65;case 79:return 69;case 80:return 70;case 81:return 55;case 82:return 56;case 83:return 109;case 84:return 112;case 85:return 127;case 86:return 124;case 87:return 113;case 88:case 89:return 125;case 90:return 114;case 91:return 73;case 92:return 92;case 93:return"SEP";case 94:return 91;case 95:return 66;case 96:return 75;case 97:return 74;case 98:return 77;case 99:return 76;case 100:return 122;case 101:return 123;case 102:return 68;case 103:return 57;case 104:return 58;case 105:return 40;case 106:return 41;case 107:return 71;case 108:return 72;case 109:return 133;case 110:return 21;case 111:return 22;case 112:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\])/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[30,31],inclusive:!1},callbackname:{rules:[27,28,29],inclusive:!1},href:{rules:[24,25],inclusive:!1},click:{rules:[33,34],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[43,44,45,46,47,48,49,50,51,52,53],inclusive:!1},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,5,6,7,9,11,14,17,18,19,20,21,22,23,26,32,35,36,37,38,39,40,41,42,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112],inclusive:!0}}};function re(){this.yy={}}return ee.lexer=ne,re.prototype=ee,ee.Parser=re,new re}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(5354).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},9959:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,5],r=[7,9,11,12,13,14,15,16,17,18,19,20,22,24,25,27,34,39],i=[1,15],a=[1,16],o=[1,17],s=[1,18],c=[1,19],u=[1,20],l=[1,21],h=[1,22],f=[1,23],d=[1,24],p=[1,25],g=[1,26],y=[1,28],m=[1,30],v=[1,33],b=[5,7,9,11,12,13,14,15,16,17,18,19,20,22,24,25,27,34,39],_={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,excludes:16,includes:17,todayMarker:18,title:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,clickStatement:26,taskTxt:27,taskData:28,openDirective:29,typeDirective:30,closeDirective:31,":":32,argDirective:33,click:34,callbackname:35,callbackargs:36,href:37,clickStatementDebug:38,open_directive:39,type_directive:40,arg_directive:41,close_directive:42,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"excludes",17:"includes",18:"todayMarker",19:"title",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"taskTxt",28:"taskData",32:":",34:"click",35:"callbackname",36:"callbackargs",37:"href",39:"open_directive",40:"type_directive",41:"arg_directive",42:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[26,2],[26,3],[26,3],[26,4],[26,3],[26,4],[26,2],[38,2],[38,3],[38,3],[38,4],[38,3],[38,4],[38,2],[29,1],[30,1],[33,1],[31,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 2:return a[s-1];case 3:case 7:case 8:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 9:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 10:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 11:r.TopAxis(),this.$=a[s].substr(8);break;case 12:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 13:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 14:r.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 15:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 16:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 17:this.$=a[s].trim(),r.setTitle(this.$);break;case 18:case 19:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 20:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 22:r.addTask(a[s-1],a[s]),this.$="task";break;case 26:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 27:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 28:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 29:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 30:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 31:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 32:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 33:case 39:this.$=a[s-1]+" "+a[s];break;case 34:case 35:case 37:this.$=a[s-2]+" "+a[s-1]+" "+a[s];break;case 36:case 38:this.$=a[s-3]+" "+a[s-2]+" "+a[s-1]+" "+a[s];break;case 40:r.parseDirective("%%{","open_directive");break;case 41:r.parseDirective(a[s],"type_directive");break;case 42:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 43:r.parseDirective("}%%","close_directive","gantt")}},table:[{3:1,4:2,5:e,29:4,39:n},{1:[3]},{3:6,4:2,5:e,29:4,39:n},t(r,[2,3],{6:7}),{30:8,40:[1,9]},{40:[2,40]},{1:[2,1]},{4:29,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:i,13:a,14:o,15:s,16:c,17:u,18:l,19:h,20:f,22:d,24:p,25:g,26:27,27:y,29:4,34:m,39:n},{31:31,32:[1,32],42:v},t([32,42],[2,41]),t(r,[2,8],{1:[2,2]}),t(r,[2,4]),{4:29,10:34,12:i,13:a,14:o,15:s,16:c,17:u,18:l,19:h,20:f,22:d,24:p,25:g,26:27,27:y,29:4,34:m,39:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),{21:[1,35]},{23:[1,36]},t(r,[2,19]),t(r,[2,20]),t(r,[2,21]),{28:[1,37]},t(r,[2,23]),{35:[1,38],37:[1,39]},{11:[1,40]},{33:41,41:[1,42]},{11:[2,43]},t(r,[2,5]),t(r,[2,17]),t(r,[2,18]),t(r,[2,22]),t(r,[2,26],{36:[1,43],37:[1,44]}),t(r,[2,32],{35:[1,45]}),t(b,[2,24]),{31:46,42:v},{42:[2,42]},t(r,[2,27],{37:[1,47]}),t(r,[2,28]),t(r,[2,30],{36:[1,48]}),{11:[1,49]},t(r,[2,29]),t(r,[2,31]),t(b,[2,25])],defaultActions:{5:[2,40],6:[2,1],33:[2,43],42:[2,42]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},x={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),39;case 1:return this.begin("type_directive"),40;case 2:return this.popState(),this.begin("arg_directive"),32;case 3:return this.popState(),this.popState(),42;case 4:return 41;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:case 20:case 23:case 26:case 29:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:case 13:case 14:case 16:case 17:case 18:break;case 15:return 11;case 19:this.begin("href");break;case 21:return 37;case 22:this.begin("callbackname");break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 35;case 27:return 36;case 28:this.begin("click");break;case 30:return 34;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 17;case 37:return 16;case 38:return 18;case 39:return"date";case 40:return 19;case 41:return"accDescription";case 42:return 25;case 43:return 27;case 44:return 28;case 45:return 32;case 46:return 7;case 47:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],inclusive:!0}}};function w(){this.yy={}}return _.lexer=x,w.prototype=_,_.Parser=w,new w}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(6878).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},2553:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,4],n=[1,7],r=[1,5],i=[1,9],a=[1,6],o=[2,6],s=[1,16],c=[6,8,14,19,21,23,24,26,28,31,34,47,51],u=[8,14,19,21,23,24,26,28,31,34],l=[8,13,14,19,21,23,24,26,28,31,34],h=[1,26],f=[6,8,14,47,51],d=[8,14,51],p=[1,61],g=[1,62],y=[1,63],m=[8,14,32,38,39,51],v={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,section:24,branchStatement:25,CHECKOUT:26,ID:27,BRANCH:28,ORDER:29,NUM:30,MERGE:31,COMMIT_TAG:32,STR:33,COMMIT:34,commit_arg:35,COMMIT_TYPE:36,commitType:37,COMMIT_ID:38,COMMIT_MSG:39,NORMAL:40,REVERSE:41,HIGHLIGHT:42,openDirective:43,typeDirective:44,closeDirective:45,argDirective:46,open_directive:47,type_directive:48,arg_directive:49,close_directive:50,";":51,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"section",26:"CHECKOUT",27:"ID",28:"BRANCH",29:"ORDER",30:"NUM",31:"MERGE",32:"COMMIT_TAG",33:"STR",34:"COMMIT",36:"COMMIT_TYPE",38:"COMMIT_ID",39:"COMMIT_MSG",40:"NORMAL",41:"REVERSE",42:"HIGHLIGHT",47:"open_directive",48:"type_directive",49:"arg_directive",50:"close_directive",51:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[25,2],[25,4],[18,2],[18,4],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[35,0],[35,1],[37,1],[37,1],[37,1],[5,3],[5,5],[43,1],[44,1],[46,1],[45,1],[4,1],[4,1],[4,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return a[s];case 4:return a[s-1];case 5:return r.setDirection(a[s-3]),a[s-1];case 7:r.setOptions(a[s-1]),this.$=a[s];break;case 8:a[s-1]+=a[s],this.$=a[s-1];break;case 10:this.$=[];break;case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 12:this.$=a[s-1];break;case 16:this.$=a[s].trim(),r.setTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 19:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 21:r.checkout(a[s]);break;case 22:r.branch(a[s]);break;case 23:r.branch(a[s-2],a[s]);break;case 24:r.merge(a[s]);break;case 25:r.merge(a[s-2],a[s]);break;case 26:r.commit(a[s]);break;case 27:r.commit("","",r.commitType.NORMAL,a[s]);break;case 28:r.commit("","",a[s],"");break;case 29:r.commit("","",a[s],a[s-2]);break;case 30:r.commit("","",a[s-2],a[s]);break;case 31:r.commit("",a[s],r.commitType.NORMAL,"");break;case 32:r.commit("",a[s-2],r.commitType.NORMAL,a[s]);break;case 33:r.commit("",a[s],r.commitType.NORMAL,a[s-2]);break;case 34:r.commit("",a[s-2],a[s],"");break;case 35:r.commit("",a[s],a[s-2],"");break;case 36:r.commit("",a[s-4],a[s-2],a[s]);break;case 37:r.commit("",a[s-4],a[s],a[s-2]);break;case 38:r.commit("",a[s-2],a[s-4],a[s]);break;case 39:r.commit("",a[s],a[s-4],a[s-2]);break;case 40:r.commit("",a[s],a[s-2],a[s-4]);break;case 41:r.commit("",a[s-2],a[s],a[s-4]);break;case 42:r.commit(a[s],"",r.commitType.NORMAL,"");break;case 43:r.commit(a[s],"",r.commitType.NORMAL,a[s-2]);break;case 44:r.commit(a[s-2],"",r.commitType.NORMAL,a[s]);break;case 45:r.commit(a[s-2],"",a[s],"");break;case 46:r.commit(a[s],"",a[s-2],"");break;case 47:r.commit(a[s],a[s-2],r.commitType.NORMAL,"");break;case 48:r.commit(a[s-2],a[s],r.commitType.NORMAL,"");break;case 49:r.commit(a[s-4],"",a[s-2],a[s]);break;case 50:r.commit(a[s-4],"",a[s],a[s-2]);break;case 51:r.commit(a[s-2],"",a[s-4],a[s]);break;case 52:r.commit(a[s],"",a[s-4],a[s-2]);break;case 53:r.commit(a[s],"",a[s-2],a[s-4]);break;case 54:r.commit(a[s-2],"",a[s],a[s-4]);break;case 55:r.commit(a[s-4],a[s],a[s-2],"");break;case 56:r.commit(a[s-4],a[s-2],a[s],"");break;case 57:r.commit(a[s-2],a[s],a[s-4],"");break;case 58:r.commit(a[s],a[s-2],a[s-4],"");break;case 59:r.commit(a[s],a[s-4],a[s-2],"");break;case 60:r.commit(a[s-2],a[s-4],a[s],"");break;case 61:r.commit(a[s-4],a[s],r.commitType.NORMAL,a[s-2]);break;case 62:r.commit(a[s-4],a[s-2],r.commitType.NORMAL,a[s]);break;case 63:r.commit(a[s-2],a[s],r.commitType.NORMAL,a[s-4]);break;case 64:r.commit(a[s],a[s-2],r.commitType.NORMAL,a[s-4]);break;case 65:r.commit(a[s],a[s-4],r.commitType.NORMAL,a[s-2]);break;case 66:r.commit(a[s-2],a[s-4],r.commitType.NORMAL,a[s]);break;case 67:r.commit(a[s-6],a[s-4],a[s-2],a[s]);break;case 68:r.commit(a[s-6],a[s-4],a[s],a[s-2]);break;case 69:r.commit(a[s-6],a[s-2],a[s-4],a[s]);break;case 70:r.commit(a[s-6],a[s],a[s-4],a[s-2]);break;case 71:r.commit(a[s-6],a[s-2],a[s],a[s-4]);break;case 72:r.commit(a[s-6],a[s],a[s-2],a[s-4]);break;case 73:r.commit(a[s-4],a[s-6],a[s-2],a[s]);break;case 74:r.commit(a[s-4],a[s-6],a[s],a[s-2]);break;case 75:r.commit(a[s-2],a[s-6],a[s-4],a[s]);break;case 76:r.commit(a[s],a[s-6],a[s-4],a[s-2]);break;case 77:r.commit(a[s-2],a[s-6],a[s],a[s-4]);break;case 78:r.commit(a[s],a[s-6],a[s-2],a[s-4]);break;case 79:r.commit(a[s],a[s-4],a[s-2],a[s-6]);break;case 80:r.commit(a[s-2],a[s-4],a[s],a[s-6]);break;case 81:r.commit(a[s],a[s-2],a[s-4],a[s-6]);break;case 82:r.commit(a[s-2],a[s],a[s-4],a[s-6]);break;case 83:r.commit(a[s-4],a[s-2],a[s],a[s-6]);break;case 84:r.commit(a[s-4],a[s],a[s-2],a[s-6]);break;case 85:r.commit(a[s-2],a[s-4],a[s-6],a[s]);break;case 86:r.commit(a[s],a[s-4],a[s-6],a[s-2]);break;case 87:r.commit(a[s-2],a[s],a[s-6],a[s-4]);break;case 88:r.commit(a[s],a[s-2],a[s-6],a[s-4]);break;case 89:r.commit(a[s-4],a[s-2],a[s-6],a[s]);break;case 90:r.commit(a[s-4],a[s],a[s-6],a[s-2]);break;case 91:this.$="";break;case 92:this.$=a[s];break;case 93:this.$=r.commitType.NORMAL;break;case 94:this.$=r.commitType.REVERSE;break;case 95:this.$=r.commitType.HIGHLIGHT;break;case 98:r.parseDirective("%%{","open_directive");break;case 99:r.parseDirective(a[s],"type_directive");break;case 100:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 101:r.parseDirective("}%%","close_directive","gitGraph")}},table:[{3:1,4:2,5:3,6:e,8:n,14:r,43:8,47:i,51:a},{1:[3]},{3:10,4:2,5:3,6:e,8:n,14:r,43:8,47:i,51:a},{3:11,4:2,5:3,6:e,8:n,14:r,43:8,47:i,51:a},{7:12,8:o,9:[1,13],10:[1,14],11:15,14:s},t(c,[2,102]),t(c,[2,103]),t(c,[2,104]),{44:17,48:[1,18]},{48:[2,98]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:o,11:15,14:s},{9:[1,21]},t(u,[2,10],{12:22,13:[1,23]}),t(l,[2,9]),{9:[1,25],45:24,50:h},t([9,50],[2,99]),{1:[2,3]},{8:[1,27]},{7:28,8:o,11:15,14:s},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:[1,34],21:[1,35],23:[1,36],24:[1,37],25:38,26:[1,39],28:[1,42],31:[1,41],34:[1,40]},t(l,[2,8]),t(f,[2,96]),{46:43,49:[1,44]},t(f,[2,101]),{1:[2,4]},{8:[1,45]},t(u,[2,11]),{4:46,8:n,14:r,51:a},t(u,[2,13]),t(d,[2,14]),t(d,[2,15]),{20:[1,47]},{22:[1,48]},t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),{27:[1,49]},t(d,[2,91],{35:50,32:[1,51],33:[1,55],36:[1,52],38:[1,53],39:[1,54]}),{27:[1,56]},{27:[1,57]},{45:58,50:h},{50:[2,100]},{1:[2,5]},t(u,[2,12]),t(d,[2,16]),t(d,[2,17]),t(d,[2,21]),t(d,[2,26]),{33:[1,59]},{37:60,40:p,41:g,42:y},{33:[1,64]},{33:[1,65]},t(d,[2,92]),t(d,[2,24],{32:[1,66]}),t(d,[2,22],{29:[1,67]}),t(f,[2,97]),t(d,[2,27],{36:[1,68],38:[1,69],39:[1,70]}),t(d,[2,28],{32:[1,71],38:[1,72],39:[1,73]}),t(m,[2,93]),t(m,[2,94]),t(m,[2,95]),t(d,[2,31],{32:[1,74],36:[1,75],39:[1,76]}),t(d,[2,42],{32:[1,77],36:[1,78],38:[1,79]}),{33:[1,80]},{30:[1,81]},{37:82,40:p,41:g,42:y},{33:[1,83]},{33:[1,84]},{33:[1,85]},{33:[1,86]},{33:[1,87]},{33:[1,88]},{37:89,40:p,41:g,42:y},{33:[1,90]},{33:[1,91]},{37:92,40:p,41:g,42:y},{33:[1,93]},t(d,[2,25]),t(d,[2,23]),t(d,[2,29],{38:[1,94],39:[1,95]}),t(d,[2,33],{36:[1,96],39:[1,97]}),t(d,[2,43],{36:[1,98],38:[1,99]}),t(d,[2,30],{38:[1,100],39:[1,101]}),t(d,[2,35],{32:[1,102],39:[1,103]}),t(d,[2,46],{32:[1,104],38:[1,105]}),t(d,[2,32],{36:[1,106],39:[1,107]}),t(d,[2,34],{32:[1,108],39:[1,109]}),t(d,[2,47],{32:[1,111],36:[1,110]}),t(d,[2,44],{36:[1,112],38:[1,113]}),t(d,[2,45],{32:[1,114],38:[1,115]}),t(d,[2,48],{32:[1,117],36:[1,116]}),{33:[1,118]},{33:[1,119]},{37:120,40:p,41:g,42:y},{33:[1,121]},{37:122,40:p,41:g,42:y},{33:[1,123]},{33:[1,124]},{33:[1,125]},{33:[1,126]},{33:[1,127]},{33:[1,128]},{33:[1,129]},{37:130,40:p,41:g,42:y},{33:[1,131]},{33:[1,132]},{33:[1,133]},{37:134,40:p,41:g,42:y},{33:[1,135]},{37:136,40:p,41:g,42:y},{33:[1,137]},{33:[1,138]},{33:[1,139]},{37:140,40:p,41:g,42:y},{33:[1,141]},t(d,[2,40],{39:[1,142]}),t(d,[2,53],{38:[1,143]}),t(d,[2,41],{39:[1,144]}),t(d,[2,64],{36:[1,145]}),t(d,[2,54],{38:[1,146]}),t(d,[2,63],{36:[1,147]}),t(d,[2,39],{39:[1,148]}),t(d,[2,52],{38:[1,149]}),t(d,[2,38],{39:[1,150]}),t(d,[2,58],{32:[1,151]}),t(d,[2,51],{38:[1,152]}),t(d,[2,57],{32:[1,153]}),t(d,[2,37],{39:[1,154]}),t(d,[2,65],{36:[1,155]}),t(d,[2,36],{39:[1,156]}),t(d,[2,59],{32:[1,157]}),t(d,[2,60],{32:[1,158]}),t(d,[2,66],{36:[1,159]}),t(d,[2,50],{38:[1,160]}),t(d,[2,61],{36:[1,161]}),t(d,[2,49],{38:[1,162]}),t(d,[2,55],{32:[1,163]}),t(d,[2,56],{32:[1,164]}),t(d,[2,62],{36:[1,165]}),{33:[1,166]},{33:[1,167]},{33:[1,168]},{37:169,40:p,41:g,42:y},{33:[1,170]},{37:171,40:p,41:g,42:y},{33:[1,172]},{33:[1,173]},{33:[1,174]},{33:[1,175]},{33:[1,176]},{33:[1,177]},{33:[1,178]},{37:179,40:p,41:g,42:y},{33:[1,180]},{33:[1,181]},{33:[1,182]},{37:183,40:p,41:g,42:y},{33:[1,184]},{37:185,40:p,41:g,42:y},{33:[1,186]},{33:[1,187]},{33:[1,188]},{37:189,40:p,41:g,42:y},t(d,[2,81]),t(d,[2,82]),t(d,[2,79]),t(d,[2,80]),t(d,[2,84]),t(d,[2,83]),t(d,[2,88]),t(d,[2,87]),t(d,[2,86]),t(d,[2,85]),t(d,[2,90]),t(d,[2,89]),t(d,[2,78]),t(d,[2,77]),t(d,[2,76]),t(d,[2,75]),t(d,[2,73]),t(d,[2,74]),t(d,[2,72]),t(d,[2,71]),t(d,[2,70]),t(d,[2,69]),t(d,[2,67]),t(d,[2,68])],defaultActions:{9:[2,98],10:[2,1],11:[2,2],19:[2,3],27:[2,4],44:[2,100],45:[2,5]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},b={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),47;case 1:return this.begin("type_directive"),48;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),50;case 4:return 49;case 5:return this.begin("acc_title"),19;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),21;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:case 34:case 37:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:case 14:case 15:break;case 16:return 6;case 17:return 34;case 18:return 38;case 19:return 36;case 20:return 39;case 21:return 40;case 22:return 41;case 23:return 42;case 24:return 32;case 25:return 28;case 26:return 29;case 27:return 31;case 28:return 26;case 29:case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 35:return 13;case 36:this.begin("string");break;case 38:return 33;case 39:return 30;case 40:return 27;case 41:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch\b)/i,/^(?:order:)/i,/^(?:merge\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+)/i,/^(?:[a-zA-Z][-_\./a-zA-Z0-9]*[-_a-zA-Z0-9])/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[34,35],inclusive:!1},string:{rules:[37,38],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,39,40,41],inclusive:!0}}};function _(){this.yy={}}return v.lexer=b,_.prototype=v,v.Parser=_,new _}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8183).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},6765:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,9,10],n={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,r,i,a,o){switch(a.length,i){case 1:return r;case 4:break;case 6:r.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function i(){this.yy={}}return n.lexer=r,i.prototype=n,n.Parser=i,new i}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(1428).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},7062:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,4],n=[1,5],r=[1,6],i=[1,7],a=[1,9],o=[1,11,13,15,17,19,20,26,27,28,29],s=[2,5],c=[1,6,11,13,15,17,19,20,26,27,28,29],u=[26,27,28],l=[2,8],h=[1,18],f=[1,19],d=[1,20],p=[1,21],g=[1,22],y=[1,23],m=[1,28],v=[6,26,27,28,29],b={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:r.setShowData(!0);break;case 7:this.$=a[s-1];break;case 9:r.addSection(a[s-1],r.cleanupValue(a[s]));break;case 10:this.$=a[s].trim(),r.setPieTitle(this.$);break;case 11:this.$=a[s].trim(),r.setTitle(this.$);break;case 12:case 13:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 14:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 21:r.parseDirective("%%{","open_directive");break;case 22:r.parseDirective(a[s],"type_directive");break;case 23:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 24:r.parseDirective("}%%","close_directive","pie")}},table:[{3:1,4:2,5:3,6:e,21:8,26:n,27:r,28:i,29:a},{1:[3]},{3:10,4:2,5:3,6:e,21:8,26:n,27:r,28:i,29:a},{3:11,4:2,5:3,6:e,21:8,26:n,27:r,28:i,29:a},t(o,s,{7:12,8:[1,13]}),t(c,[2,18]),t(c,[2,19]),t(c,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},t(u,l,{21:8,9:16,10:17,5:24,1:[2,3],11:h,13:f,15:d,17:p,19:g,20:y,29:a}),t(o,s,{7:25}),{23:26,24:[1,27],32:m},t([24,32],[2,22]),t(o,[2,6]),{4:29,26:n,27:r,28:i},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},t(u,[2,13]),t(u,[2,14]),t(u,[2,15]),t(u,l,{21:8,9:16,10:17,5:24,1:[2,4],11:h,13:f,15:d,17:p,19:g,20:y,29:a}),t(v,[2,16]),{25:34,31:[1,35]},t(v,[2,24]),t(o,[2,7]),t(u,[2,9]),t(u,[2,10]),t(u,[2,11]),t(u,[2,12]),{23:36,32:m},{32:[2,23]},t(v,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},_={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:case 6:case 8:case 9:break;case 7:return 26;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:case 20:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}};function x(){this.yy={}}return b.lexer=_,x.prototype=b,b.Parser=x,new x}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(4551).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},3176:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,5],r=[1,6],i=[1,7],a=[1,8],o=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],s=[1,22],c=[2,13],u=[1,26],l=[1,27],h=[1,28],f=[1,29],d=[1,30],p=[1,31],g=[1,24],y=[1,32],m=[1,33],v=[1,36],b=[71,72],_=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],x=[1,56],w=[1,57],k=[1,58],T=[1,59],C=[1,60],E=[1,61],S=[1,62],A=[62,63],M=[1,74],N=[1,70],D=[1,71],B=[1,72],L=[1,73],O=[1,75],I=[1,79],R=[1,80],F=[1,77],P=[1,78],Y=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],j={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",39:"STRUCT_STOP",40:"REQUIREMENT",41:"FUNCTIONAL_REQUIREMENT",42:"INTERFACE_REQUIREMENT",43:"PERFORMANCE_REQUIREMENT",44:"PHYSICAL_REQUIREMENT",45:"DESIGN_CONSTRAINT",46:"LOW_RISK",47:"MED_RISK",48:"HIGH_RISK",49:"VERIFY_ANALYSIS",50:"VERIFY_DEMONSTRATION",51:"VERIFY_INSPECTION",52:"VERIFY_TEST",53:"ELEMENT",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:this.$=a[s].trim(),r.setTitle(this.$);break;case 7:case 8:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 9:r.parseDirective("%%{","open_directive");break;case 10:r.parseDirective(a[s],"type_directive");break;case 11:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 12:r.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:r.addRequirement(a[s-3],a[s-4]);break;case 20:r.setNewReqId(a[s-2]);break;case 21:r.setNewReqText(a[s-2]);break;case 22:r.setNewReqRisk(a[s-2]);break;case 23:r.setNewReqVerifyMethod(a[s-2]);break;case 26:this.$=r.RequirementType.REQUIREMENT;break;case 27:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=r.RiskLevel.LOW_RISK;break;case 33:this.$=r.RiskLevel.MED_RISK;break;case 34:this.$=r.RiskLevel.HIGH_RISK;break;case 35:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=r.VerifyType.VERIFY_TEST;break;case 39:r.addElement(a[s-3]);break;case 40:r.setNewElementType(a[s-2]);break;case 41:r.setNewElementDocRef(a[s-2]);break;case 44:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 45:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 46:this.$=r.Relationships.CONTAINS;break;case 47:this.$=r.Relationships.COPIES;break;case 48:this.$=r.Relationships.DERIVES;break;case 49:this.$=r.Relationships.SATISFIES;break;case 50:this.$=r.Relationships.VERIFIES;break;case 51:this.$=r.Relationships.REFINES;break;case 52:this.$=r.Relationships.TRACES}},table:[{3:1,4:2,6:e,9:4,14:n,16:r,18:i,19:a},{1:[3]},{3:10,4:2,5:[1,9],6:e,9:4,14:n,16:r,18:i,19:a},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},t(o,[2,8]),{20:[2,9]},{3:16,4:2,6:e,9:4,14:n,16:r,18:i,19:a},{1:[2,2]},{4:21,5:s,7:17,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:l,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{11:34,12:[1,35],22:v},t([12,22],[2,10]),t(o,[2,6]),t(o,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:s,7:38,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:l,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{4:21,5:s,7:39,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:l,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{4:21,5:s,7:40,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:l,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{4:21,5:s,7:41,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:l,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{4:21,5:s,7:42,8:c,9:4,14:n,16:r,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:l,42:h,43:f,44:d,45:p,53:g,71:y,72:m},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},t(b,[2,26]),t(b,[2,27]),t(b,[2,28]),t(b,[2,29]),t(b,[2,30]),t(b,[2,31]),t(_,[2,55]),t(_,[2,56]),t(o,[2,4]),{13:51,21:[1,52]},t(o,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:x,65:w,66:k,67:T,68:C,69:E,70:S},{61:63,64:x,65:w,66:k,67:T,68:C,69:E,70:S},{11:64,22:v},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},t(A,[2,46]),t(A,[2,47]),t(A,[2,48]),t(A,[2,49]),t(A,[2,50]),t(A,[2,51]),t(A,[2,52]),{63:[1,68]},t(o,[2,5]),{5:M,29:69,30:N,33:D,35:B,37:L,39:O},{5:I,39:R,55:76,56:F,58:P},{32:81,71:y,72:m},{32:82,71:y,72:m},t(Y,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:M,29:87,30:N,33:D,35:B,37:L,39:O},t(Y,[2,25]),t(Y,[2,39]),{31:[1,88]},{31:[1,89]},{5:I,39:R,55:90,56:F,58:P},t(Y,[2,43]),t(Y,[2,44]),t(Y,[2,45]),{32:91,71:y,72:m},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},t(Y,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},t(Y,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:M,29:116,30:N,33:D,35:B,37:L,39:O},{5:M,29:117,30:N,33:D,35:B,37:L,39:O},{5:M,29:118,30:N,33:D,35:B,37:L,39:O},{5:M,29:119,30:N,33:D,35:B,37:L,39:O},{5:I,39:R,55:120,56:F,58:P},{5:I,39:R,55:121,56:F,58:P},t(Y,[2,20]),t(Y,[2,21]),t(Y,[2,22]),t(Y,[2,23]),t(Y,[2,40]),t(Y,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},U={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:case 53:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:case 15:case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 54:return"qString";case 55:return e.yytext=e.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55],inclusive:!0}}};function z(){this.yy={}}return j.lexer=U,z.prototype=j,j.Parser=z,new z}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(8800).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},6876:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,18],u=[1,19],l=[1,21],h=[1,22],f=[1,23],d=[1,29],p=[1,30],g=[1,31],y=[1,32],m=[1,33],v=[1,34],b=[1,35],_=[1,36],x=[1,37],w=[1,38],k=[1,41],T=[1,42],C=[1,43],E=[1,44],S=[1,45],A=[1,46],M=[1,49],N=[1,4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,48,49,54,55,56,57,65,75],D=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,49,54,55,56,57,65,75],B=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,48,49,54,55,56,57,65,75],L=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,54,55,56,57,65,75],O=[63,64,65],I=[1,114],R=[1,4,5,7,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,48,49,54,55,56,57,65,75],F={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,":":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,participant_actor:20,signal:21,autonumber:22,NUM:23,off:24,activate:25,deactivate:26,note_statement:27,links_statement:28,link_statement:29,properties_statement:30,details_statement:31,title:32,legacy_title:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,loop:39,end:40,rect:41,opt:42,alt:43,else_sections:44,par:45,par_sections:46,and:47,else:48,note:49,placement:50,text2:51,over:52,actor_pair:53,links:54,link:55,properties:56,details:57,spaceList:58,",":59,left_of:60,right_of:61,signaltype:62,"+":63,"-":64,ACTOR:65,SOLID_OPEN_ARROW:66,DOTTED_OPEN_ARROW:67,SOLID_ARROW:68,DOTTED_ARROW:69,SOLID_CROSS:70,DOTTED_CROSS:71,SOLID_POINT:72,DOTTED_POINT:73,TXT:74,open_directive:75,type_directive:76,arg_directive:77,close_directive:78,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",20:"participant_actor",22:"autonumber",23:"NUM",24:"off",25:"activate",26:"deactivate",32:"title",33:"legacy_title",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",39:"loop",40:"end",41:"rect",42:"opt",43:"alt",45:"par",47:"and",48:"else",49:"note",52:"over",54:"links",55:"link",56:"properties",57:"details",59:",",60:"left_of",61:"right_of",63:"+",64:"-",65:"ACTOR",66:"SOLID_OPEN_ARROW",67:"DOTTED_OPEN_ARROW",68:"SOLID_ARROW",69:"DOTTED_ARROW",70:"SOLID_CROSS",71:"DOTTED_CROSS",72:"SOLID_POINT",73:"DOTTED_POINT",74:"TXT",75:"open_directive",76:"type_directive",77:"arg_directive",78:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,5],[10,3],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[46,1],[46,4],[44,1],[44,4],[27,4],[27,4],[28,3],[29,3],[30,3],[31,3],[58,2],[58,1],[53,3],[53,1],[50,1],[50,1],[21,5],[21,5],[21,4],[17,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[51,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.apply(a[s]),a[s];case 5:case 9:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:case 52:this.$=a[s];break;case 12:a[s-3].type="addParticipant",a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 13:a[s-1].type="addParticipant",this.$=a[s-1];break;case 14:a[s-3].type="addActor",a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 15:a[s-1].type="addActor",this.$=a[s-1];break;case 17:this.$={type:"sequenceIndex",sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]};break;case 22:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1]};break;case 28:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 29:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 30:this.$=a[s].trim(),r.setTitle(this.$);break;case 31:case 32:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 33:a[s-1].unshift({type:"loopStart",loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:"loopEnd",loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 34:a[s-1].unshift({type:"rectStart",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:"rectEnd",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 35:a[s-1].unshift({type:"optStart",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:"optEnd",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:"altStart",altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:"parStart",parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:this.$=a[s-3].concat([{type:"and",parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 42:this.$=a[s-3].concat([{type:"else",altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 43:this.$=[a[s-1],{type:"addNote",placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 44:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 45:this.$=[a[s-1],{type:"addLinks",actor:a[s-1].actor,text:a[s]}];break;case 46:this.$=[a[s-1],{type:"addALink",actor:a[s-1].actor,text:a[s]}];break;case 47:this.$=[a[s-1],{type:"addProperties",actor:a[s-1].actor,text:a[s]}];break;case 48:this.$=[a[s-1],{type:"addDetails",actor:a[s-1].actor,text:a[s]}];break;case 51:this.$=[a[s-2],a[s]];break;case 53:this.$=r.PLACEMENT.LEFTOF;break;case 54:this.$=r.PLACEMENT.RIGHTOF;break;case 55:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]}];break;case 56:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4]}];break;case 57:this.$=[a[s-3],a[s-1],{type:"addMessage",from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 58:this.$={type:"addParticipant",actor:a[s]};break;case 59:this.$=r.LINETYPE.SOLID_OPEN;break;case 60:this.$=r.LINETYPE.DOTTED_OPEN;break;case 61:this.$=r.LINETYPE.SOLID;break;case 62:this.$=r.LINETYPE.DOTTED;break;case 63:this.$=r.LINETYPE.SOLID_CROSS;break;case 64:this.$=r.LINETYPE.DOTTED_CROSS;break;case 65:this.$=r.LINETYPE.SOLID_POINT;break;case 66:this.$=r.LINETYPE.DOTTED_POINT;break;case 67:this.$=r.parseMessage(a[s].trim().substring(1));break;case 68:r.parseDirective("%%{","open_directive");break;case 69:r.parseDirective(a[s],"type_directive");break;case 70:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 71:r.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:e,5:n,6:4,7:r,11:6,75:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,11:6,75:i},{3:9,4:e,5:n,6:4,7:r,11:6,75:i},{3:10,4:e,5:n,6:4,7:r,11:6,75:i},t([1,4,5,16,20,22,25,26,32,33,34,36,38,39,41,42,43,45,49,54,55,56,57,65,75],a,{8:11}),{12:12,76:[1,13]},{76:[2,68]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:39,9:14,10:16,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,41:b,42:_,43:x,45:w,49:k,54:T,55:C,56:E,57:S,65:A,75:i},{13:47,14:[1,48],78:M},t([14,78],[2,69]),t(N,[2,6]),{6:39,10:50,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,41:b,42:_,43:x,45:w,49:k,54:T,55:C,56:E,57:S,65:A,75:i},t(N,[2,8]),t(N,[2,9]),{17:51,65:A},{17:52,65:A},{5:[1,53]},{5:[1,56],23:[1,54],24:[1,55]},{17:57,65:A},{17:58,65:A},{5:[1,59]},{5:[1,60]},{5:[1,61]},{5:[1,62]},{5:[1,63]},t(N,[2,28]),t(N,[2,29]),{35:[1,64]},{37:[1,65]},t(N,[2,32]),{19:[1,66]},{19:[1,67]},{19:[1,68]},{19:[1,69]},{19:[1,70]},t(N,[2,38]),{62:71,66:[1,72],67:[1,73],68:[1,74],69:[1,75],70:[1,76],71:[1,77],72:[1,78],73:[1,79]},{50:80,52:[1,81],60:[1,82],61:[1,83]},{17:84,65:A},{17:85,65:A},{17:86,65:A},{17:87,65:A},t([5,18,59,66,67,68,69,70,71,72,73,74],[2,58]),{5:[1,88]},{15:89,77:[1,90]},{5:[2,71]},t(N,[2,7]),{5:[1,92],18:[1,91]},{5:[1,94],18:[1,93]},t(N,[2,16]),{5:[1,96],23:[1,95]},{5:[1,97]},t(N,[2,20]),{5:[1,98]},{5:[1,99]},t(N,[2,23]),t(N,[2,24]),t(N,[2,25]),t(N,[2,26]),t(N,[2,27]),t(N,[2,30]),t(N,[2,31]),t(D,a,{8:100}),t(D,a,{8:101}),t(D,a,{8:102}),t(B,a,{44:103,8:104}),t(L,a,{46:105,8:106}),{17:109,63:[1,107],64:[1,108],65:A},t(O,[2,59]),t(O,[2,60]),t(O,[2,61]),t(O,[2,62]),t(O,[2,63]),t(O,[2,64]),t(O,[2,65]),t(O,[2,66]),{17:110,65:A},{17:112,53:111,65:A},{65:[2,53]},{65:[2,54]},{51:113,74:I},{51:115,74:I},{51:116,74:I},{51:117,74:I},t(R,[2,10]),{13:118,78:M},{78:[2,70]},{19:[1,119]},t(N,[2,13]),{19:[1,120]},t(N,[2,15]),{5:[1,121]},t(N,[2,18]),t(N,[2,19]),t(N,[2,21]),t(N,[2,22]),{4:o,5:s,6:39,9:14,10:16,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,40:[1,122],41:b,42:_,43:x,45:w,49:k,54:T,55:C,56:E,57:S,65:A,75:i},{4:o,5:s,6:39,9:14,10:16,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,40:[1,123],41:b,42:_,43:x,45:w,49:k,54:T,55:C,56:E,57:S,65:A,75:i},{4:o,5:s,6:39,9:14,10:16,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,40:[1,124],41:b,42:_,43:x,45:w,49:k,54:T,55:C,56:E,57:S,65:A,75:i},{40:[1,125]},{4:o,5:s,6:39,9:14,10:16,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,40:[2,41],41:b,42:_,43:x,45:w,48:[1,126],49:k,54:T,55:C,56:E,57:S,65:A,75:i},{40:[1,127]},{4:o,5:s,6:39,9:14,10:16,11:6,16:c,17:40,20:u,21:20,22:l,25:h,26:f,27:24,28:25,29:26,30:27,31:28,32:d,33:p,34:g,36:y,38:m,39:v,40:[2,39],41:b,42:_,43:x,45:w,47:[1,128],49:k,54:T,55:C,56:E,57:S,65:A,75:i},{17:129,65:A},{17:130,65:A},{51:131,74:I},{51:132,74:I},{51:133,74:I},{59:[1,134],74:[2,52]},{5:[2,45]},{5:[2,67]},{5:[2,46]},{5:[2,47]},{5:[2,48]},{5:[1,135]},{5:[1,136]},{5:[1,137]},t(N,[2,17]),t(N,[2,33]),t(N,[2,34]),t(N,[2,35]),t(N,[2,36]),{19:[1,138]},t(N,[2,37]),{19:[1,139]},{51:140,74:I},{51:141,74:I},{5:[2,57]},{5:[2,43]},{5:[2,44]},{17:142,65:A},t(R,[2,11]),t(N,[2,12]),t(N,[2,14]),t(B,a,{8:104,44:143}),t(L,a,{8:106,46:144}),{5:[2,55]},{5:[2,56]},{74:[2,51]},{40:[2,42]},{40:[2,40]}],defaultActions:{7:[2,68],8:[2,1],9:[2,2],10:[2,3],49:[2,71],82:[2,53],83:[2,54],90:[2,70],113:[2,45],114:[2,67],115:[2,46],116:[2,47],117:[2,48],131:[2,57],132:[2,43],133:[2,44],140:[2,55],141:[2,56],142:[2,51],143:[2,42],144:[2,40]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},P={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),75;case 1:return this.begin("type_directive"),76;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),78;case 4:return 77;case 5:case 49:case 62:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return 23;case 12:return this.begin("ID"),16;case 13:return this.begin("ID"),20;case 14:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),65;case 15:return this.popState(),this.popState(),this.begin("LINE"),18;case 16:return this.popState(),this.popState(),5;case 17:return this.begin("LINE"),39;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),48;case 22:return this.begin("LINE"),45;case 23:return this.begin("LINE"),47;case 24:return this.popState(),19;case 25:return 40;case 26:return 60;case 27:return 61;case 28:return 54;case 29:return 55;case 30:return 56;case 31:return 57;case 32:return 52;case 33:return 49;case 34:return this.begin("ID"),25;case 35:return this.begin("ID"),26;case 36:return 32;case 37:return 33;case 38:return this.begin("acc_title"),34;case 39:return this.popState(),"acc_title_value";case 40:return this.begin("acc_descr"),36;case 41:return this.popState(),"acc_descr_value";case 42:this.begin("acc_descr_multiline");break;case 43:this.popState();break;case 44:return"acc_descr_multiline_value";case 45:return 7;case 46:return 22;case 47:return 24;case 48:return 59;case 50:return e.yytext=e.yytext.trim(),65;case 51:return 68;case 52:return 69;case 53:return 66;case 54:return 67;case 55:return 70;case 56:return 71;case 57:return 72;case 58:return 73;case 59:return 74;case 60:return 63;case 61:return 64;case 63:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[43,44],inclusive:!1},acc_descr:{rules:[41],inclusive:!1},acc_title:{rules:[39],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,14],inclusive:!1},ALIAS:{rules:[7,8,15,16],inclusive:!1},LINE:{rules:[7,8,24],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,17,18,19,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,40,42,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63],inclusive:!0}}};function Y(){this.yy={}}return F.lexer=P,Y.prototype=F,F.Parser=Y,new Y}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(1993).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},3584:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,19],u=[1,20],l=[1,21],h=[1,22],f=[1,33],d=[1,23],p=[1,24],g=[1,25],y=[1,26],m=[1,27],v=[1,30],b=[1,31],_=[1,32],x=[1,35],w=[1,36],k=[1,37],T=[1,38],C=[1,34],E=[1,41],S=[1,4,5,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],A=[1,4,5,12,13,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],M=[1,4,5,7,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],N=[4,5,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],D={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,idStatement:11,DESCR:12,"--\x3e":13,HIDE_EMPTY:14,scale:15,WIDTH:16,COMPOSIT_STATE:17,STRUCT_START:18,STRUCT_STOP:19,STATE_DESCR:20,AS:21,ID:22,FORK:23,JOIN:24,CHOICE:25,CONCURRENT:26,note:27,notePosition:28,NOTE_TEXT:29,direction:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,openDirective:36,typeDirective:37,closeDirective:38,":":39,argDirective:40,direction_tb:41,direction_bt:42,direction_rl:43,direction_lr:44,eol:45,";":46,EDGE_STATE:47,left_of:48,right_of:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",12:"DESCR",13:"--\x3e",14:"HIDE_EMPTY",15:"scale",16:"WIDTH",17:"COMPOSIT_STATE",18:"STRUCT_START",19:"STRUCT_STOP",20:"STATE_DESCR",21:"AS",22:"ID",23:"FORK",24:"JOIN",25:"CHOICE",26:"CONCURRENT",27:"note",29:"NOTE_TEXT",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",39:":",41:"direction_tb",42:"direction_bt",43:"direction_rl",44:"direction_lr",46:";",47:"EDGE_STATE",48:"left_of",49:"right_of",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[10,2],[10,2],[10,1],[6,3],[6,5],[30,1],[30,1],[30,1],[30,1],[45,1],[45,1],[11,1],[11,1],[28,1],[28,1],[36,1],[37,1],[40,1],[38,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.setRootDoc(a[s]),a[s];case 5:this.$=[];break;case 6:"nl"!=a[s]&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 7:case 8:case 39:case 40:this.$=a[s];break;case 9:this.$="nl";break;case 10:this.$={stmt:"state",id:a[s],type:"default",description:""};break;case 11:this.$={stmt:"state",id:a[s-1],type:"default",description:r.trimColon(a[s])};break;case 12:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-2],type:"default",description:""},state2:{stmt:"state",id:a[s],type:"default",description:""}};break;case 13:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-3],type:"default",description:""},state2:{stmt:"state",id:a[s-1],type:"default",description:""},description:a[s].substr(1).trim()};break;case 17:this.$={stmt:"state",id:a[s-3],type:"default",description:"",doc:a[s-1]};break;case 18:var c=a[s],u=a[s-2].trim();if(a[s].match(":")){var l=a[s].split(":");c=l[0],u=[u,l[1]]}this.$={stmt:"state",id:c,type:"default",description:u};break;case 19:this.$={stmt:"state",id:a[s-3],type:"default",description:a[s-5],doc:a[s-1]};break;case 20:this.$={stmt:"state",id:a[s],type:"fork"};break;case 21:this.$={stmt:"state",id:a[s],type:"join"};break;case 22:this.$={stmt:"state",id:a[s],type:"choice"};break;case 23:this.$={stmt:"state",id:r.getDividerId(),type:"divider"};break;case 24:this.$={stmt:"state",id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 28:this.$=a[s].trim(),r.setTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 33:r.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 34:r.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 35:r.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 36:r.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 43:r.parseDirective("%%{","open_directive");break;case 44:r.parseDirective(a[s],"type_directive");break;case 45:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 46:r.parseDirective("}%%","close_directive","state")}},table:[{3:1,4:e,5:n,6:4,7:r,36:6,50:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,36:6,50:i},{3:9,4:e,5:n,6:4,7:r,36:6,50:i},{3:10,4:e,5:n,6:4,7:r,36:6,50:i},t([1,4,5,14,15,17,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],a,{8:11}),{37:12,51:[1,13]},{51:[2,43]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:u,17:l,20:h,22:f,23:d,24:p,25:g,26:y,27:m,30:29,31:v,33:b,35:_,36:6,41:x,42:w,43:k,44:T,47:C,50:i},{38:39,39:[1,40],53:E},t([39,53],[2,44]),t(S,[2,6]),{6:28,10:42,11:18,14:c,15:u,17:l,20:h,22:f,23:d,24:p,25:g,26:y,27:m,30:29,31:v,33:b,35:_,36:6,41:x,42:w,43:k,44:T,47:C,50:i},t(S,[2,8]),t(S,[2,9]),t(S,[2,10],{12:[1,43],13:[1,44]}),t(S,[2,14]),{16:[1,45]},t(S,[2,16],{18:[1,46]}),{21:[1,47]},t(S,[2,20]),t(S,[2,21]),t(S,[2,22]),t(S,[2,23]),{28:48,29:[1,49],48:[1,50],49:[1,51]},t(S,[2,26]),t(S,[2,27]),{32:[1,52]},{34:[1,53]},t(S,[2,30]),t(A,[2,39]),t(A,[2,40]),t(S,[2,33]),t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(M,[2,31]),{40:54,52:[1,55]},t(M,[2,46]),t(S,[2,7]),t(S,[2,11]),{11:56,22:f,47:C},t(S,[2,15]),t(N,a,{8:57}),{22:[1,58]},{22:[1,59]},{21:[1,60]},{22:[2,41]},{22:[2,42]},t(S,[2,28]),t(S,[2,29]),{38:61,53:E},{53:[2,45]},t(S,[2,12],{12:[1,62]}),{4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:u,17:l,19:[1,63],20:h,22:f,23:d,24:p,25:g,26:y,27:m,30:29,31:v,33:b,35:_,36:6,41:x,42:w,43:k,44:T,47:C,50:i},t(S,[2,18],{18:[1,64]}),{29:[1,65]},{22:[1,66]},t(M,[2,32]),t(S,[2,13]),t(S,[2,17]),t(N,a,{8:67}),t(S,[2,24]),t(S,[2,25]),{4:o,5:s,6:28,9:14,10:16,11:18,14:c,15:u,17:l,19:[1,68],20:h,22:f,23:d,24:p,25:g,26:y,27:m,30:29,31:v,33:b,35:_,36:6,41:x,42:w,43:k,44:T,47:C,50:i},t(S,[2,19])],defaultActions:{7:[2,43],8:[2,1],9:[2,2],10:[2,3],50:[2,41],51:[2,42],55:[2,45]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},B={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:case 33:return 41;case 1:case 34:return 42;case 2:case 35:return 43;case 3:case 36:return 44;case 4:return this.begin("open_directive"),50;case 5:return this.begin("type_directive"),51;case 6:return this.popState(),this.begin("arg_directive"),39;case 7:return this.popState(),this.popState(),53;case 8:return 52;case 9:case 10:case 12:case 13:case 14:case 15:case 46:case 52:break;case 11:case 66:return 5;case 16:return this.pushState("SCALE"),15;case 17:return 16;case 18:case 24:case 40:case 43:this.popState();break;case 19:return this.begin("acc_title"),31;case 20:return this.popState(),"acc_title_value";case 21:return this.begin("acc_descr"),33;case 22:return this.popState(),"acc_descr_value";case 23:this.begin("acc_descr_multiline");break;case 25:return"acc_descr_multiline_value";case 26:this.pushState("STATE");break;case 27:case 30:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 28:case 31:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 29:case 32:return this.popState(),e.yytext=e.yytext.slice(0,-10).trim(),25;case 37:this.begin("STATE_STRING");break;case 38:return this.popState(),this.pushState("STATE_ID"),"AS";case 39:case 54:return this.popState(),"ID";case 41:return"STATE_DESCR";case 42:return 17;case 44:return this.popState(),this.pushState("struct"),18;case 45:return this.popState(),19;case 47:return this.begin("NOTE"),27;case 48:return this.popState(),this.pushState("NOTE_ID"),48;case 49:return this.popState(),this.pushState("NOTE_ID"),49;case 50:this.popState(),this.pushState("FLOATING_NOTE");break;case 51:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 53:return"NOTE_TEXT";case 55:return this.popState(),this.pushState("NOTE_TEXT"),22;case 56:return this.popState(),e.yytext=e.yytext.substr(2).trim(),29;case 57:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),29;case 58:case 59:return 7;case 60:return 14;case 61:return 47;case 62:return 22;case 63:return e.yytext=e.yytext.trim(),12;case 64:return 13;case 65:return 26;case 67:return"INVALID"}},rules:[/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[13,14],inclusive:!1},close_directive:{rules:[13,14],inclusive:!1},arg_directive:{rules:[7,8,13,14],inclusive:!1},type_directive:{rules:[6,7,13,14],inclusive:!1},open_directive:{rules:[5,13,14],inclusive:!1},struct:{rules:[13,14,26,33,34,35,36,45,46,47,61,62,63,64,65],inclusive:!1},FLOATING_NOTE_ID:{rules:[54],inclusive:!1},FLOATING_NOTE:{rules:[51,52,53],inclusive:!1},NOTE_TEXT:{rules:[56,57],inclusive:!1},NOTE_ID:{rules:[55],inclusive:!1},NOTE:{rules:[48,49,50],inclusive:!1},acc_descr_multiline:{rules:[24,25],inclusive:!1},acc_descr:{rules:[22],inclusive:!1},acc_title:{rules:[20],inclusive:!1},SCALE:{rules:[17,18],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[39],inclusive:!1},STATE_STRING:{rules:[40,41],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[13,14,27,28,29,30,31,32,37,38,42,43,44],inclusive:!1},ID:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,12,14,15,16,19,21,23,26,44,47,58,59,60,61,62,63,64,66,67],inclusive:!0}}};function L(){this.yy={}}return D.lexer=B,L.prototype=D,D.Parser=L,new L}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(3069).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},9763:(t,e,n)=>{t=n.nmd(t);var r=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,17,18,20,22,23,24,26],i=[1,15],a=[1,16],o=[1,17],s=[1,18],c=[1,19],u=[1,20],l=[1,24],h=[4,6,9,11,17,18,20,22,23,24,26],f={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:case 7:case 8:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 11:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.setTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 16:r.addTask(a[s-1],a[s]),this.$="task";break;case 18:r.parseDirective("%%{","open_directive");break;case 19:r.parseDirective(a[s],"type_directive");break;case 20:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 21:r.parseDirective("}%%","close_directive","journey")}},table:[{3:1,4:e,7:3,12:4,26:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,26:n},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:a,20:o,22:s,23:c,24:u,26:n},{1:[2,2]},{14:22,15:[1,23],29:l},t([15,29],[2,19]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:21,10:25,12:4,17:i,18:a,20:o,22:s,23:c,24:u,26:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),{19:[1,26]},{21:[1,27]},t(r,[2,14]),t(r,[2,15]),{25:[1,28]},t(r,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},t(r,[2,5]),t(r,[2,12]),t(r,[2,13]),t(r,[2,16]),t(h,[2,9]),{14:32,29:l},{29:[2,20]},{11:[1,33]},t(h,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var _,x,w,k,T,C,E,S,A,M={};;){if(w=n[n.length-1],this.defaultActions[w]?k=this.defaultActions[w]:(null==_&&(_=b()),k=o[w]&&o[w][_]),void 0===k||!k.length||!k[0]){var N="";for(C in A=[],o[w])this.terminals_[C]&&C>h&&A.push("'"+this.terminals_[C]+"'");N=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(c+1)+": Unexpected "+(_==f?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(N,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(k[0]){case 1:n.push(_),i.push(p.yytext),a.push(p.yylloc),n.push(k[1]),_=null,x?(_=x,x=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[k[1]][1],M.$=i[i.length-E],M._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(M._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),void 0!==(T=this.performAction.apply(M,[s,u,c,g.yy,k[1],i,a].concat(d))))return T;E&&(n=n.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),n.push(this.productions_[k[1]][0]),i.push(M.$),a.push(M._$),S=o[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0}},d={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:case 6:case 8:case 9:break;case 7:return 11;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};function p(){this.yy={}}return f.lexer=d,p.prototype=f,f.Parser=p,new p}();e.parser=r,e.Parser=r.Parser,e.parse=function(){return r.parse.apply(r,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var r=n(9143).readFileSync(n(6470).normalize(t[1]),"utf8");return e.parser.parse(r)},n.c[n.s]===t&&e.main(process.argv.slice(1))},7967:(t,e)=>{"use strict";e.N=void 0;var n=/^([^\w]*)(javascript|data|vbscript)/im,r=/&#(\w+)(^\w|;)?/g,i=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,a=/^([^:]+):/gm,o=[".","/"];e.N=function(t){var e,s=(e=t||"",e.replace(r,(function(t,e){return String.fromCharCode(e)}))).replace(i,"").trim();if(!s)return"about:blank";if(function(t){return o.indexOf(t[0])>-1}(s))return s;var c=s.match(a);if(!c)return s;var u=c[0];return n.test(u)?"about:blank":s}},3841:t=>{t.exports=function(t,e){return t.intersect(e)}},8968:(t,e,n)=>{"use strict";n.d(e,{default:()=>HE});var r=n(1941),i=n.n(r),a={debug:1,info:2,warn:3,error:4,fatal:5},o={debug:function(){},info:function(){},warn:function(){},error:function(){},fatal:function(){}},s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"fatal";isNaN(t)&&(t=t.toLowerCase(),void 0!==a[t]&&(t=a[t])),o.trace=function(){},o.debug=function(){},o.info=function(){},o.warn=function(){},o.error=function(){},o.fatal=function(){},t<=a.fatal&&(o.fatal=console.error?console.error.bind(console,c("FATAL"),"color: orange"):console.log.bind(console,"",c("FATAL"))),t<=a.error&&(o.error=console.error?console.error.bind(console,c("ERROR"),"color: orange"):console.log.bind(console,"",c("ERROR"))),t<=a.warn&&(o.warn=console.warn?console.warn.bind(console,c("WARN"),"color: orange"):console.log.bind(console,"",c("WARN"))),t<=a.info&&(o.info=console.info?console.info.bind(console,c("INFO"),"color: lightblue"):console.log.bind(console,"",c("INFO"))),t<=a.debug&&(o.debug=console.debug?console.debug.bind(console,c("DEBUG"),"color: lightgreen"):console.log.bind(console,"",c("DEBUG")))},c=function(t){var e=i()().format("ss.SSS");return"%c".concat(e," : ").concat(t," : ")};function u(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function l(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function h(t){return t}var f=1e-6;function d(t){return"translate("+t+",0)"}function p(t){return"translate(0,"+t+")"}function g(t){return e=>+t(e)}function y(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function m(){return!this.__axis}function v(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,c="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,u=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",v=1===t||3===t?d:p;function b(d){var p=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,b=null==i?e.tickFormat?e.tickFormat.apply(e,n):h:i,_=Math.max(a,0)+s,x=e.range(),w=+x[0]+c,k=+x[x.length-1]+c,T=(e.bandwidth?y:g)(e.copy(),c),C=d.selection?d.selection():d,E=C.selectAll(".domain").data([null]),S=C.selectAll(".tick").data(p,e).order(),A=S.exit(),M=S.enter().append("g").attr("class","tick"),N=S.select("line"),D=S.select("text");E=E.merge(E.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge(M),N=N.merge(M.append("line").attr("stroke","currentColor").attr(l+"2",u*a)),D=D.merge(M.append("text").attr("fill","currentColor").attr(l,u*_).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),d!==C&&(E=E.transition(d),S=S.transition(d),N=N.transition(d),D=D.transition(d),A=A.transition(d).attr("opacity",f).attr("transform",(function(t){return isFinite(t=T(t))?v(t+c):this.getAttribute("transform")})),M.attr("opacity",f).attr("transform",(function(t){var e=this.parentNode.__axis;return v((e&&isFinite(e=e(t))?e:T(t))+c)}))),A.remove(),E.attr("d",4===t||2===t?o?"M"+u*o+","+w+"H"+c+"V"+k+"H"+u*o:"M"+c+","+w+"V"+k:o?"M"+w+","+u*o+"V"+c+"H"+k+"V"+u*o:"M"+w+","+c+"H"+k),S.attr("opacity",1).attr("transform",(function(t){return v(T(t)+c)})),N.attr(l+"2",u*a),D.attr(l,u*_).text(b),C.filter(m).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),C.each((function(){this.__axis=T}))}return b.scale=function(t){return arguments.length?(e=t,b):e},b.ticks=function(){return n=Array.from(arguments),b},b.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),b):n.slice()},b.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),b):r&&r.slice()},b.tickFormat=function(t){return arguments.length?(i=t,b):i},b.tickSize=function(t){return arguments.length?(a=o=+t,b):a},b.tickSizeInner=function(t){return arguments.length?(a=+t,b):a},b.tickSizeOuter=function(t){return arguments.length?(o=+t,b):o},b.tickPadding=function(t){return arguments.length?(s=+t,b):s},b.offset=function(t){return arguments.length?(c=+t,b):c},b}function b(){}function _(t){return null==t?b:function(){return this.querySelector(t)}}function x(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function w(){return[]}function k(t){return null==t?w:function(){return this.querySelectorAll(t)}}function T(t){return function(){return this.matches(t)}}function C(t){return function(e){return e.matches(t)}}var E=Array.prototype.find;function S(){return this.firstElementChild}var A=Array.prototype.filter;function M(){return Array.from(this.children)}function N(t){return new Array(t.length)}function D(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function B(t){return function(){return t}}function L(t,e,n,r,i,a){for(var o,s=0,c=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new D(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function O(t,e,n,r,i,a,o){var s,c,u,l=new Map,h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(d[s]=u=o.call(c,c.__data__,s,e)+"",l.has(u)?i[s]=c:l.set(u,c));for(s=0;s<f;++s)u=o.call(t,a[s],s,a)+"",(c=l.get(u))?(r[s]=c,c.__data__=a[s],l.delete(u)):n[s]=new D(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&l.get(d[s])===c&&(i[s]=c)}function I(t){return t.__data__}function R(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function F(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}D.prototype={constructor:D,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var P="http://www.w3.org/1999/xhtml";const Y={svg:"http://www.w3.org/2000/svg",xhtml:P,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function j(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Y.hasOwnProperty(e)?{space:Y[e],local:t}:t}function U(t){return function(){this.removeAttribute(t)}}function z(t){return function(){this.removeAttributeNS(t.space,t.local)}}function $(t,e){return function(){this.setAttribute(t,e)}}function q(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function H(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function W(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function V(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function G(t){return function(){this.style.removeProperty(t)}}function X(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Z(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Q(t,e){return t.style.getPropertyValue(e)||V(t).getComputedStyle(t,null).getPropertyValue(e)}function K(t){return function(){delete this[t]}}function J(t,e){return function(){this[t]=e}}function tt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function et(t){return t.trim().split(/^|\s+/)}function nt(t){return t.classList||new rt(t)}function rt(t){this._node=t,this._names=et(t.getAttribute("class")||"")}function it(t,e){for(var n=nt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function at(t,e){for(var n=nt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function ot(t){return function(){it(this,t)}}function st(t){return function(){at(this,t)}}function ct(t,e){return function(){(e.apply(this,arguments)?it:at)(this,t)}}function ut(){this.textContent=""}function lt(t){return function(){this.textContent=t}}function ht(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ft(){this.innerHTML=""}function dt(t){return function(){this.innerHTML=t}}function pt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function gt(){this.nextSibling&&this.parentNode.appendChild(this)}function yt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mt(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===P&&e.documentElement.namespaceURI===P?e.createElement(t):e.createElementNS(n,t)}}function vt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function bt(t){var e=j(t);return(e.local?vt:mt)(e)}function _t(){return null}function xt(){var t=this.parentNode;t&&t.removeChild(this)}function wt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function kt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Tt(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Ct(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Et(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function St(t,e,n){var r=V(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function At(t,e){return function(){return St(this,t,e)}}function Mt(t,e){return function(){return St(this,t,e.apply(this,arguments))}}rt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Nt=[null];function Dt(t,e){this._groups=t,this._parents=e}function Bt(){return new Dt([[document.documentElement]],Nt)}Dt.prototype=Bt.prototype={constructor:Dt,select:function(t){"function"!=typeof t&&(t=_(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,u=r[i]=new Array(c),l=0;l<c;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),u[l]=o);return new Dt(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return x(t.apply(this,arguments))}}(t):k(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,u=0;u<c;++u)(o=s[u])&&(r.push(t.call(o,o.__data__,u,s)),i.push(o));return new Dt(r,i)},selectChild:function(t){return this.select(null==t?S:function(t){return function(){return E.call(this.children,t)}}("function"==typeof t?t:C(t)))},selectChildren:function(t){return this.selectAll(null==t?M:function(t){return function(){return A.call(this.children,t)}}("function"==typeof t?t:C(t)))},filter:function(t){"function"!=typeof t&&(t=T(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new Dt(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,I);var n=e?O:L,r=this._parents,i=this._groups;"function"!=typeof t&&(t=B(t));for(var a=i.length,o=new Array(a),s=new Array(a),c=new Array(a),u=0;u<a;++u){var l=r[u],h=i[u],f=h.length,d=R(t.call(l,l&&l.__data__,u,r)),p=d.length,g=s[u]=new Array(p),y=o[u]=new Array(p),m=c[u]=new Array(f);n(l,h,g,y,m,d,e);for(var v,b,_=0,x=0;_<p;++_)if(v=g[_]){for(_>=x&&(x=_+1);!(b=y[x])&&++x<p;);v._next=b||null}}return(o=new Dt(o,r))._enter=s,o._exit=c,o},enter:function(){return new Dt(this._enter||this._groups.map(N),this._parents)},exit:function(){return new Dt(this._exit||this._groups.map(N),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),c=0;c<o;++c)for(var u,l=n[c],h=r[c],f=l.length,d=s[c]=new Array(f),p=0;p<f;++p)(u=l[p]||h[p])&&(d[p]=u);for(;c<i;++c)s[c]=n[c];return new Dt(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=F);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,u=i[a]=new Array(c),l=0;l<c;++l)(o=s[l])&&(u[l]=o);u.sort(e)}return new Dt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=j(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?z:U:"function"==typeof e?n.local?W:H:n.local?q:$)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?G:"function"==typeof e?Z:X)(t,e,null==n?"":n)):Q(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?K:"function"==typeof e?tt:J)(t,e)):this.node()[t]},classed:function(t,e){var n=et(t+"");if(arguments.length<2){for(var r=nt(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?ct:e?ot:st)(n,e))},text:function(t){return arguments.length?this.each(null==t?ut:("function"==typeof t?ht:lt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ft:("function"==typeof t?pt:dt)(t)):this.node().innerHTML},raise:function(){return this.each(gt)},lower:function(){return this.each(yt)},append:function(t){var e="function"==typeof t?t:bt(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:bt(t),r=null==e?_t:"function"==typeof e?e:_(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(xt)},clone:function(t){return this.select(t?kt:wt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=Tt(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?Et:Ct,r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,u=0,l=s.length;u<l;++u)for(r=0,c=s[u];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?Mt:At)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};const Lt=Bt;var Ot={value:()=>{}};function It(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Rt(r)}function Rt(t){this._=t}function Ft(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function Pt(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Yt(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Ot,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Rt.prototype=It.prototype={constructor:Rt,on:function(t,e){var n,r=this._,i=Ft(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=Yt(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Yt(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=Pt(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Rt(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};const jt=It;var Ut,zt,$t=0,qt=0,Ht=0,Wt=0,Vt=0,Gt=0,Xt="object"==typeof performance&&performance.now?performance:Date,Zt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Qt(){return Vt||(Zt(Kt),Vt=Xt.now()+Gt)}function Kt(){Vt=0}function Jt(){this._call=this._time=this._next=null}function te(t,e,n){var r=new Jt;return r.restart(t,e,n),r}function ee(){Vt=(Wt=Xt.now())+Gt,$t=qt=0;try{!function(){Qt(),++$t;for(var t,e=Ut;e;)(t=Vt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--$t}()}finally{$t=0,function(){for(var t,e,n=Ut,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Ut=e);zt=t,re(r)}(),Vt=0}}function ne(){var t=Xt.now(),e=t-Wt;e>1e3&&(Gt-=e,Wt=t)}function re(t){$t||(qt&&(qt=clearTimeout(qt)),t-Vt>24?(t<1/0&&(qt=setTimeout(ee,t-Xt.now()-Gt)),Ht&&(Ht=clearInterval(Ht))):(Ht||(Wt=Xt.now(),Ht=setInterval(ne,1e3)),$t=1,Zt(ee)))}function ie(t,e,n){var r=new Jt;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}Jt.prototype=te.prototype={constructor:Jt,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Qt():+n)+(null==e?0:+e),this._next||zt===this||(zt?zt._next=this:Ut=this,zt=this),this._call=t,this._time=n,re()},stop:function(){this._call&&(this._call=null,this._time=1/0,re())}};var ae=jt("start","end","cancel","interrupt"),oe=[];function se(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(c){var u,l,h,f;if(1!==n.state)return s();for(u in i)if((f=i[u]).name===n.name){if(3===f.state)return ie(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+u<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[u])}if(ie((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,l=-1;u<h;++u)(f=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=te((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:ae,tween:oe,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function ce(t,e){var n=le(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function ue(t,e){var n=le(t,e);if(n.state>3)throw new Error("too late; already running");return n}function le(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function he(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var fe,de=180/Math.PI,pe={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ge(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*de,skewX:Math.atan(c)*de,scaleX:o,scaleY:s}}function ye(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:he(t,i)},{i:c-2,x:he(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:he(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:he(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:he(t,n)},{i:s-2,x:he(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var me=ye((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?pe:ge(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),ve=ye((function(t){return null==t?pe:(fe||(fe=document.createElementNS("http://www.w3.org/2000/svg","g")),fe.setAttribute("transform",t),(t=fe.transform.baseVal.consolidate())?ge((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):pe)}),", ",")",")");function be(t,e){var n,r;return function(){var i=ue(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function _e(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=ue(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}a.tween=i}}function xe(t,e,n){var r=t._id;return t.each((function(){var t=ue(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return le(t,r).value[e]}}function we(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ke(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Te(){}var Ce=.7,Ee=1/Ce,Se="\\s*([+-]?\\d+)\\s*",Ae="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Me="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ne=/^#([0-9a-f]{3,8})$/,De=new RegExp("^rgb\\("+[Se,Se,Se]+"\\)$"),Be=new RegExp("^rgb\\("+[Me,Me,Me]+"\\)$"),Le=new RegExp("^rgba\\("+[Se,Se,Se,Ae]+"\\)$"),Oe=new RegExp("^rgba\\("+[Me,Me,Me,Ae]+"\\)$"),Ie=new RegExp("^hsl\\("+[Ae,Me,Me]+"\\)$"),Re=new RegExp("^hsla\\("+[Ae,Me,Me,Ae]+"\\)$"),Fe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Pe(){return this.rgb().formatHex()}function Ye(){return this.rgb().formatRgb()}function je(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ne.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ue(e):3===n?new He(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ze(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ze(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=De.exec(t))?new He(e[1],e[2],e[3],1):(e=Be.exec(t))?new He(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Le.exec(t))?ze(e[1],e[2],e[3],e[4]):(e=Oe.exec(t))?ze(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ie.exec(t))?Xe(e[1],e[2]/100,e[3]/100,1):(e=Re.exec(t))?Xe(e[1],e[2]/100,e[3]/100,e[4]):Fe.hasOwnProperty(t)?Ue(Fe[t]):"transparent"===t?new He(NaN,NaN,NaN,0):null}function Ue(t){return new He(t>>16&255,t>>8&255,255&t,1)}function ze(t,e,n,r){return r<=0&&(t=e=n=NaN),new He(t,e,n,r)}function $e(t){return t instanceof Te||(t=je(t)),t?new He((t=t.rgb()).r,t.g,t.b,t.opacity):new He}function qe(t,e,n,r){return 1===arguments.length?$e(t):new He(t,e,n,null==r?1:r)}function He(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function We(){return"#"+Ge(this.r)+Ge(this.g)+Ge(this.b)}function Ve(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Ge(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Xe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Qe(t,e,n,r)}function Ze(t){if(t instanceof Qe)return new Qe(t.h,t.s,t.l,t.opacity);if(t instanceof Te||(t=je(t)),!t)return new Qe;if(t instanceof Qe)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Qe(o,s,c,t.opacity)}function Qe(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ke(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Je(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}we(Te,je,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Pe,formatHex:Pe,formatHsl:function(){return Ze(this).formatHsl()},formatRgb:Ye,toString:Ye}),we(He,qe,ke(Te,{brighter:function(t){return t=null==t?Ee:Math.pow(Ee,t),new He(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Ce:Math.pow(Ce,t),new He(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:We,formatHex:We,formatRgb:Ve,toString:Ve})),we(Qe,(function(t,e,n,r){return 1===arguments.length?Ze(t):new Qe(t,e,n,null==r?1:r)}),ke(Te,{brighter:function(t){return t=null==t?Ee:Math.pow(Ee,t),new Qe(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Ce:Math.pow(Ce,t),new Qe(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new He(Ke(t>=240?t-240:t+120,i,r),Ke(t,i,r),Ke(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const tn=t=>()=>t;function en(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):tn(isNaN(t)?e:t)}const nn=function t(e){var n=function(t){return 1==(t=+t)?en:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):tn(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=qe(t)).r,(e=qe(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=en(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function rn(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=qe(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}rn((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return Je((n-r/e)*e,o,i,a,s)}})),rn((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return Je((n-r/e)*e,i,a,o,s)}}));var an=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,on=new RegExp(an.source,"g");function sn(t,e){var n,r,i,a=an.lastIndex=on.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=an.exec(t))&&(r=on.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:he(n,r)})),a=on.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function cn(t,e){var n;return("number"==typeof e?he:e instanceof je?nn:(n=je(e))?(e=n,nn):sn)(t,e)}function un(t){return function(){this.removeAttribute(t)}}function ln(t){return function(){this.removeAttributeNS(t.space,t.local)}}function hn(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function fn(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function dn(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function pn(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function gn(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function yn(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function mn(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&yn(t,i)),n}return i._value=e,i}function vn(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&gn(t,i)),n}return i._value=e,i}function bn(t,e){return function(){ce(this,t).delay=+e.apply(this,arguments)}}function _n(t,e){return e=+e,function(){ce(this,t).delay=e}}function xn(t,e){return function(){ue(this,t).duration=+e.apply(this,arguments)}}function wn(t,e){return e=+e,function(){ue(this,t).duration=e}}function kn(t,e){if("function"!=typeof e)throw new Error;return function(){ue(this,t).ease=e}}function Tn(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?ce:ue;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Cn=Lt.prototype.constructor;function En(t){return function(){this.style.removeProperty(t)}}function Sn(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function An(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Sn(t,a,n)),r}return a._value=e,a}function Mn(t){return function(e){this.textContent=t.call(this,e)}}function Nn(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Mn(r)),e}return r._value=t,r}var Dn=0;function Bn(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ln(){return++Dn}var On=Lt.prototype;Bn.prototype=function(t){return Lt().transition(t)}.prototype={constructor:Bn,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=_(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,u=r[o],l=u.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=u[f])&&(c=t.call(s,s.__data__,f,u))&&("__data__"in s&&(c.__data__=s.__data__),h[f]=c,se(h[f],e,n,f,h,le(s,n)));return new Bn(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=k(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,u=r[s],l=u.length,h=0;h<l;++h)if(c=u[h]){for(var f,d=t.call(c,c.__data__,h,u),p=le(c,n),g=0,y=d.length;g<y;++g)(f=d[g])&&se(f,e,n,g,d,p);a.push(d),o.push(c)}return new Bn(a,o,e,n)},selectChild:On.selectChild,selectChildren:On.selectChildren,filter:function(t){"function"!=typeof t&&(t=T(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new Bn(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new Bn(o,this._parents,this._name,this._id)},selection:function(){return new Cn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Ln(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)if(o=s[u]){var l=le(o,e);se(o,t,n,u,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Bn(r,this._parents,t,n)},call:On.call,nodes:On.nodes,node:On.node,size:On.size,empty:On.empty,each:On.each,on:function(t,e){var n=this._id;return arguments.length<2?le(this.node(),n).on.on(t):this.each(Tn(n,t,e))},attr:function(t,e){var n=j(t),r="transform"===n?ve:cn;return this.attrTween(t,"function"==typeof e?(n.local?pn:dn)(n,r,xe(this,"attr."+t,e)):null==e?(n.local?ln:un)(n):(n.local?fn:hn)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=j(t);return this.tween(n,(r.local?mn:vn)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?me:cn;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Q(this,t),o=(this.style.removeProperty(t),Q(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,En(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Q(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=Q(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,xe(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=ue(this,t),u=c.on,l=null==c.value[o]?a||(a=En(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(s,i=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Q(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,An(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(xe(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Nn(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=le(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?be:_e)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?bn:_n)(e,t)):le(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?xn:wn)(e,t)):le(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(kn(e,t)):le(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;ue(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=ue(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e})),0===i&&a()}))},[Symbol.iterator]:On[Symbol.iterator]};var In={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Rn(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Lt.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}(this,t)}))},Lt.prototype.transition=function(t){var e,n;t instanceof Bn?(e=t._id,t=t._name):(e=Ln(),(n=In).time=Qt(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)(o=s[u])&&se(o,t,e,u,s,n||Rn(o,e));return new Bn(r,this._parents,t,e)};const{abs:Fn,max:Pn,min:Yn}=Math;function jn(t){return{type:t}}function Un(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function zn(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function $n(){}["w","e"].map(jn),["n","s"].map(jn),["n","w","e","s","nw","ne","sw","se"].map(jn);var qn=.7,Hn=1/qn,Wn="\\s*([+-]?\\d+)\\s*",Vn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Gn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Xn=/^#([0-9a-f]{3,8})$/,Zn=new RegExp("^rgb\\("+[Wn,Wn,Wn]+"\\)$"),Qn=new RegExp("^rgb\\("+[Gn,Gn,Gn]+"\\)$"),Kn=new RegExp("^rgba\\("+[Wn,Wn,Wn,Vn]+"\\)$"),Jn=new RegExp("^rgba\\("+[Gn,Gn,Gn,Vn]+"\\)$"),tr=new RegExp("^hsl\\("+[Vn,Gn,Gn]+"\\)$"),er=new RegExp("^hsla\\("+[Vn,Gn,Gn,Vn]+"\\)$"),nr={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function rr(){return this.rgb().formatHex()}function ir(){return this.rgb().formatRgb()}function ar(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Xn.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?or(e):3===n?new lr(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?sr(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?sr(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Zn.exec(t))?new lr(e[1],e[2],e[3],1):(e=Qn.exec(t))?new lr(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Kn.exec(t))?sr(e[1],e[2],e[3],e[4]):(e=Jn.exec(t))?sr(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=tr.exec(t))?pr(e[1],e[2]/100,e[3]/100,1):(e=er.exec(t))?pr(e[1],e[2]/100,e[3]/100,e[4]):nr.hasOwnProperty(t)?or(nr[t]):"transparent"===t?new lr(NaN,NaN,NaN,0):null}function or(t){return new lr(t>>16&255,t>>8&255,255&t,1)}function sr(t,e,n,r){return r<=0&&(t=e=n=NaN),new lr(t,e,n,r)}function cr(t){return t instanceof $n||(t=ar(t)),t?new lr((t=t.rgb()).r,t.g,t.b,t.opacity):new lr}function ur(t,e,n,r){return 1===arguments.length?cr(t):new lr(t,e,n,null==r?1:r)}function lr(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function hr(){return"#"+dr(this.r)+dr(this.g)+dr(this.b)}function fr(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function dr(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function pr(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new yr(t,e,n,r)}function gr(t){if(t instanceof yr)return new yr(t.h,t.s,t.l,t.opacity);if(t instanceof $n||(t=ar(t)),!t)return new yr;if(t instanceof yr)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new yr(o,s,c,t.opacity)}function yr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function mr(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Un($n,ar,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:rr,formatHex:rr,formatHsl:function(){return gr(this).formatHsl()},formatRgb:ir,toString:ir}),Un(lr,ur,zn($n,{brighter:function(t){return t=null==t?Hn:Math.pow(Hn,t),new lr(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?qn:Math.pow(qn,t),new lr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:hr,formatHex:hr,formatRgb:fr,toString:fr})),Un(yr,(function(t,e,n,r){return 1===arguments.length?gr(t):new yr(t,e,n,null==r?1:r)}),zn($n,{brighter:function(t){return t=null==t?Hn:Math.pow(Hn,t),new yr(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?qn:Math.pow(qn,t),new yr(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new lr(mr(t>=240?t-240:t+120,i,r),mr(t,i,r),mr(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const vr=Math.PI/180,br=180/Math.PI,_r=.96422,xr=.82521,wr=4/29,kr=6/29,Tr=3*kr*kr;function Cr(t){if(t instanceof Er)return new Er(t.l,t.a,t.b,t.opacity);if(t instanceof Lr)return Or(t);t instanceof lr||(t=cr(t));var e,n,r=Nr(t.r),i=Nr(t.g),a=Nr(t.b),o=Sr((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=Sr((.4360747*r+.3850649*i+.1430804*a)/_r),n=Sr((.0139322*r+.0971045*i+.7141733*a)/xr)),new Er(116*o-16,500*(e-o),200*(o-n),t.opacity)}function Er(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Sr(t){return t>.008856451679035631?Math.pow(t,1/3):t/Tr+wr}function Ar(t){return t>kr?t*t*t:Tr*(t-wr)}function Mr(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Nr(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Dr(t){if(t instanceof Lr)return new Lr(t.h,t.c,t.l,t.opacity);if(t instanceof Er||(t=Cr(t)),0===t.a&&0===t.b)return new Lr(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*br;return new Lr(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Br(t,e,n,r){return 1===arguments.length?Dr(t):new Lr(t,e,n,null==r?1:r)}function Lr(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Or(t){if(isNaN(t.h))return new Er(t.l,0,0,t.opacity);var e=t.h*vr;return new Er(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Un(Er,(function(t,e,n,r){return 1===arguments.length?Cr(t):new Er(t,e,n,null==r?1:r)}),zn($n,{brighter:function(t){return new Er(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Er(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new lr(Mr(3.1338561*(e=_r*Ar(e))-1.6168667*(t=1*Ar(t))-.4906146*(n=xr*Ar(n))),Mr(-.9787684*e+1.9161415*t+.033454*n),Mr(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Un(Lr,Br,zn($n,{brighter:function(t){return new Lr(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Lr(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Or(this).rgb()}}));const Ir=t=>()=>t;function Rr(t,e){return function(n){return t+n*e}}function Fr(t,e){var n=e-t;return n?Rr(t,n):Ir(isNaN(t)?e:t)}function Pr(t){return function(e,n){var r=t((e=Br(e)).h,(n=Br(n)).h),i=Fr(e.c,n.c),a=Fr(e.l,n.l),o=Fr(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}const Yr=Pr((function(t,e){var n=e-t;return n?Rr(t,n>180||n<-180?n-360*Math.round(n/360):n):Ir(isNaN(t)?e:t)}));Pr(Fr);var jr=Math.sqrt(50),Ur=Math.sqrt(10),zr=Math.sqrt(2);function $r(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=jr?10:a>=Ur?5:a>=zr?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=jr?10:a>=Ur?5:a>=zr?2:1)}function qr(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=jr?i*=10:a>=Ur?i*=5:a>=zr&&(i*=2),e<t?-i:i}function Hr(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Wr(t){let e=t,n=t,r=t;function i(t,e,i=0,a=t.length){if(i<a){if(0!==n(e,e))return a;do{const n=i+a>>>1;r(t[n],e)<0?i=n+1:a=n}while(i<a)}return i}return 2!==t.length&&(e=(e,n)=>t(e)-n,n=Hr,r=(e,n)=>Hr(t(e),n)),{left:i,center:function(t,n,r=0,a=t.length){const o=i(t,n,r,a-1);return o>r&&e(t[o-1],n)>-e(t[o],n)?o-1:o},right:function(t,e,i=0,a=t.length){if(i<a){if(0!==n(e,e))return a;do{const n=i+a>>>1;r(t[n],e)<=0?i=n+1:a=n}while(i<a)}return i}}}const Vr=Wr(Hr),Gr=Vr.right,Xr=(Vr.left,Wr((function(t){return null===t?NaN:+t})).center,Gr);function Zr(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Qr(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Kr(){}var Jr=.7,ti=1.4285714285714286,ei="\\s*([+-]?\\d+)\\s*",ni="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ri="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ii=/^#([0-9a-f]{3,8})$/,ai=new RegExp("^rgb\\("+[ei,ei,ei]+"\\)$"),oi=new RegExp("^rgb\\("+[ri,ri,ri]+"\\)$"),si=new RegExp("^rgba\\("+[ei,ei,ei,ni]+"\\)$"),ci=new RegExp("^rgba\\("+[ri,ri,ri,ni]+"\\)$"),ui=new RegExp("^hsl\\("+[ni,ri,ri]+"\\)$"),li=new RegExp("^hsla\\("+[ni,ri,ri,ni]+"\\)$"),hi={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function fi(){return this.rgb().formatHex()}function di(){return this.rgb().formatRgb()}function pi(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ii.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?gi(e):3===n?new bi(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?yi(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?yi(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=ai.exec(t))?new bi(e[1],e[2],e[3],1):(e=oi.exec(t))?new bi(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=si.exec(t))?yi(e[1],e[2],e[3],e[4]):(e=ci.exec(t))?yi(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ui.exec(t))?ki(e[1],e[2]/100,e[3]/100,1):(e=li.exec(t))?ki(e[1],e[2]/100,e[3]/100,e[4]):hi.hasOwnProperty(t)?gi(hi[t]):"transparent"===t?new bi(NaN,NaN,NaN,0):null}function gi(t){return new bi(t>>16&255,t>>8&255,255&t,1)}function yi(t,e,n,r){return r<=0&&(t=e=n=NaN),new bi(t,e,n,r)}function mi(t){return t instanceof Kr||(t=pi(t)),t?new bi((t=t.rgb()).r,t.g,t.b,t.opacity):new bi}function vi(t,e,n,r){return 1===arguments.length?mi(t):new bi(t,e,n,null==r?1:r)}function bi(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function _i(){return"#"+wi(this.r)+wi(this.g)+wi(this.b)}function xi(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function wi(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function ki(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ci(t,e,n,r)}function Ti(t){if(t instanceof Ci)return new Ci(t.h,t.s,t.l,t.opacity);if(t instanceof Kr||(t=pi(t)),!t)return new Ci;if(t instanceof Ci)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Ci(o,s,c,t.opacity)}function Ci(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ei(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Si(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}Zr(Kr,pi,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:fi,formatHex:fi,formatHsl:function(){return Ti(this).formatHsl()},formatRgb:di,toString:di}),Zr(bi,vi,Qr(Kr,{brighter:function(t){return t=null==t?ti:Math.pow(ti,t),new bi(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Jr:Math.pow(Jr,t),new bi(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:_i,formatHex:_i,formatRgb:xi,toString:xi})),Zr(Ci,(function(t,e,n,r){return 1===arguments.length?Ti(t):new Ci(t,e,n,null==r?1:r)}),Qr(Kr,{brighter:function(t){return t=null==t?ti:Math.pow(ti,t),new Ci(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Jr:Math.pow(Jr,t),new Ci(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new bi(Ei(t>=240?t-240:t+120,i,r),Ei(t,i,r),Ei(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const Ai=t=>()=>t;function Mi(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Ai(isNaN(t)?e:t)}const Ni=function t(e){var n=function(t){return 1==(t=+t)?Mi:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ai(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=vi(t)).r,(e=vi(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Mi(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function Di(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=vi(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}function Bi(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=ji(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function Li(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Oi(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Ii(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=ji(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}Di((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return Si((n-r/e)*e,o,i,a,s)}})),Di((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return Si((n-r/e)*e,i,a,o,s)}}));var Ri=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fi=new RegExp(Ri.source,"g");function Pi(t,e){var n,r,i,a=Ri.lastIndex=Fi.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=Ri.exec(t))&&(r=Fi.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:Oi(n,r)})),a=Fi.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function Yi(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function ji(t,e){var n,r,i=typeof e;return null==e||"boolean"===i?Ai(e):("number"===i?Oi:"string"===i?(n=pi(e))?(e=n,Ni):Pi:e instanceof pi?Ni:e instanceof Date?Li:(r=e,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(e)?Bi:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Ii:Oi:Yi))(t,e)}function Ui(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function zi(t){return+t}var $i=[0,1];function qi(t){return t}function Hi(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function Wi(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=Hi(i,r),a=n(o,a)):(r=Hi(r,i),a=n(a,o)),function(t){return a(r(t))}}function Vi(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Hi(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=Xr(t,e,1,r)-1;return a[n](i[n](e))}}function Gi(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Xi(){return function(){var t,e,n,r,i,a,o=$i,s=$i,c=ji,u=qi;function l(){var t,e,n,c=Math.min(o.length,s.length);return u!==qi&&(t=o[0],e=o[c-1],t>e&&(n=t,t=e,e=n),u=function(n){return Math.max(t,Math.min(e,n))}),r=c>2?Vi:Wi,i=a=null,h}function h(e){return null==e||isNaN(e=+e)?n:(i||(i=r(o.map(t),s,c)))(t(u(e)))}return h.invert=function(n){return u(e((a||(a=r(s,o.map(t),Oi)))(n)))},h.domain=function(t){return arguments.length?(o=Array.from(t,zi),l()):o.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),l()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),c=Ui,l()},h.clamp=function(t){return arguments.length?(u=!!t||qi,l()):u!==qi},h.interpolate=function(t){return arguments.length?(c=t,l()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}()(qi,qi)}function Zi(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Qi,Ki=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ji(t){if(!(e=Ki.exec(t)))throw new Error("invalid format: "+t);var e;return new ta({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function ta(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function ea(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function na(t){return(t=ea(Math.abs(t)))?t[1]:NaN}function ra(t,e){var n=ea(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Ji.prototype=ta.prototype,ta.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const ia={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>ra(100*t,e),r:ra,s:function(t,e){var n=ea(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Qi=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+ea(t,Math.max(0,e+a-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function aa(t){return t}var oa,sa,ca,ua=Array.prototype.map,la=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ha(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=$r(t,e,n))||!isFinite(o))return[];if(o>0){let n=Math.round(t/o),r=Math.round(e/o);for(n*o<t&&++n,r*o>e&&--r,a=new Array(i=r-n+1);++s<i;)a[s]=(n+s)*o}else{o=-o;let n=Math.round(t*o),r=Math.round(e*o);for(n/o<t&&++n,r/o>e&&--r,a=new Array(i=r-n+1);++s<i;)a[s]=(n+s)/o}return r&&a.reverse(),a}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return function(t,e,n,r){var i,a=qr(t,e,n);switch((r=Ji(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(na(e)/3)))-na(Math.abs(t)))}(a,o))||(r.precision=i),ca(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,na(e)-na(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-na(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return sa(r)}(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,a=e(),o=0,s=a.length-1,c=a[o],u=a[s],l=10;for(u<c&&(i=c,c=u,u=i,i=o,o=s,s=i);l-- >0;){if((i=$r(c,u,n))===r)return a[o]=c,a[s]=u,e(a);if(i>0)c=Math.floor(c/i)*i,u=Math.ceil(u/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,u=Math.floor(u*i)/i}r=i}return t},t}function fa(){var t=Xi();return t.copy=function(){return Gi(t,fa())},Zi.apply(t,arguments),ha(t)}oa=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?aa:(e=ua.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(t.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?aa:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(ua.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Ji(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,y=t.precision,m=t.trim,v=t.type;"n"===v?(g=!0,v="g"):ia[v]||(void 0===y&&(y=12),m=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var b="$"===f?i:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",_="$"===f?a:/[%p]/.test(v)?c:"",x=ia[v],w=/[defgprs%]/.test(v);function k(t){var i,a,c,f=b,k=_;if("c"===v)k=x(t)+k,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:x(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==h&&(T=!1),f=(T?"("===h?h:u:"-"===h||"("===h?"":h)+f,k=("s"===v?la[8+Qi/3]:"")+k+(T&&"("===h?")":""),w)for(i=-1,a=t.length;++i<a;)if(48>(c=t.charCodeAt(i))||c>57){k=(46===c?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var C=f.length+t.length+k.length,E=C<p?new Array(p-C+1).join(e):"";switch(g&&d&&(t=r(E+t,E.length?p-k.length:1/0),E=""),n){case"<":t=f+t+k+E;break;case"=":t=f+E+t+k;break;case"^":t=E.slice(0,C=E.length>>1)+f+t+k+E.slice(C);break;default:t=E+f+t+k}return s(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=Ji(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(na(e)/3))),i=Math.pow(10,-r),a=la[8+r/3];return function(t){return n(i*t)+a}}}}({thousands:",",grouping:[3],currency:["$",""]}),sa=oa.format,ca=oa.formatPrefix;class da extends Map{constructor(t,e=ga){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(pa(this,t))}has(t){return super.has(pa(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}(this,t))}}function pa({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function ga(t){return null!==t&&"object"==typeof t?t.valueOf():t}Set;const ya=Symbol("implicit");function ma(){var t=new da,e=[],n=[],r=ya;function i(i){let a=t.get(i);if(void 0===a){if(r!==ya)return r;t.set(i,a=e.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new da;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return ma(e,n).unknown(r)},Zi.apply(i,arguments),i}const va=1e3,ba=6e4,_a=36e5,xa=864e5,wa=6048e5,ka=31536e6;var Ta=new Date,Ca=new Date;function Ea(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return Ea((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Ta.setTime(+e),Ca.setTime(+r),t(Ta),t(Ca),Math.floor(n(Ta,Ca))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Sa=Ea((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Sa.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Ea((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Sa:null};const Aa=Sa;Sa.range;var Ma=Ea((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*va)}),(function(t,e){return(e-t)/va}),(function(t){return t.getUTCSeconds()}));const Na=Ma;Ma.range;var Da=Ea((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*va)}),(function(t,e){t.setTime(+t+e*ba)}),(function(t,e){return(e-t)/ba}),(function(t){return t.getMinutes()}));const Ba=Da;Da.range;var La=Ea((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*va-t.getMinutes()*ba)}),(function(t,e){t.setTime(+t+e*_a)}),(function(t,e){return(e-t)/_a}),(function(t){return t.getHours()}));const Oa=La;La.range;var Ia=Ea((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ba)/xa),(t=>t.getDate()-1));const Ra=Ia;function Fa(t){return Ea((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ba)/wa}))}Ia.range;var Pa=Fa(0),Ya=Fa(1),ja=Fa(2),Ua=Fa(3),za=Fa(4),$a=Fa(5),qa=Fa(6),Ha=(Pa.range,Ya.range,ja.range,Ua.range,za.range,$a.range,qa.range,Ea((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})));const Wa=Ha;Ha.range;var Va=Ea((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Va.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ea((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};const Ga=Va;Va.range;var Xa=Ea((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*ba)}),(function(t,e){return(e-t)/ba}),(function(t){return t.getUTCMinutes()}));const Za=Xa;Xa.range;var Qa=Ea((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*_a)}),(function(t,e){return(e-t)/_a}),(function(t){return t.getUTCHours()}));const Ka=Qa;Qa.range;var Ja=Ea((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/xa}),(function(t){return t.getUTCDate()-1}));const to=Ja;function eo(t){return Ea((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/wa}))}Ja.range;var no=eo(0),ro=eo(1),io=eo(2),ao=eo(3),oo=eo(4),so=eo(5),co=eo(6),uo=(no.range,ro.range,io.range,ao.range,oo.range,so.range,co.range,Ea((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})));const lo=uo;uo.range;var ho=Ea((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));ho.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ea((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};const fo=ho;function po(t,e,n,r,i,a){const o=[[Na,1,va],[Na,5,5e3],[Na,15,15e3],[Na,30,3e4],[a,1,ba],[a,5,3e5],[a,15,9e5],[a,30,18e5],[i,1,_a],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,xa],[r,2,1728e5],[n,1,wa],[e,1,2592e6],[e,3,7776e6],[t,1,ka]];function s(e,n,r){const i=Math.abs(n-e)/r,a=Wr((([,,t])=>t)).right(o,i);if(a===o.length)return t.every(qr(e/ka,n/ka,r));if(0===a)return Aa.every(Math.max(qr(e,n,r),1));const[s,c]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(c)}return[function(t,e,n){const r=e<t;r&&([t,e]=[e,t]);const i=n&&"function"==typeof n.range?n:s(t,e,n),a=i?i.range(t,+e+1):[];return r?a.reverse():a},s]}ho.range;const[go,yo]=po(fo,lo,no,to,Ka,Za),[mo,vo]=po(Ga,Wa,Pa,Ra,Oa,Ba);function bo(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function _o(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function xo(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var wo,ko,To={"-":"",_:" ",0:"0"},Co=/^\s*\d+/,Eo=/^%/,So=/[\\^$*+?|[\]().{}]/g;function Ao(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function Mo(t){return t.replace(So,"\\$&")}function No(t){return new RegExp("^(?:"+t.map(Mo).join("|")+")","i")}function Do(t){return new Map(t.map(((t,e)=>[t.toLowerCase(),e])))}function Bo(t,e,n){var r=Co.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Lo(t,e,n){var r=Co.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Oo(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Io(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Ro(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Fo(t,e,n){var r=Co.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Po(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Yo(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function jo(t,e,n){var r=Co.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Uo(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function zo(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function $o(t,e,n){var r=Co.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function qo(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ho(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Wo(t,e,n){var r=Co.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Vo(t,e,n){var r=Co.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Go(t,e,n){var r=Co.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Xo(t,e,n){var r=Eo.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Zo(t,e,n){var r=Co.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Qo(t,e,n){var r=Co.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Ko(t,e){return Ao(t.getDate(),e,2)}function Jo(t,e){return Ao(t.getHours(),e,2)}function ts(t,e){return Ao(t.getHours()%12||12,e,2)}function es(t,e){return Ao(1+Ra.count(Ga(t),t),e,3)}function ns(t,e){return Ao(t.getMilliseconds(),e,3)}function rs(t,e){return ns(t,e)+"000"}function is(t,e){return Ao(t.getMonth()+1,e,2)}function as(t,e){return Ao(t.getMinutes(),e,2)}function os(t,e){return Ao(t.getSeconds(),e,2)}function ss(t){var e=t.getDay();return 0===e?7:e}function cs(t,e){return Ao(Pa.count(Ga(t)-1,t),e,2)}function us(t){var e=t.getDay();return e>=4||0===e?za(t):za.ceil(t)}function ls(t,e){return t=us(t),Ao(za.count(Ga(t),t)+(4===Ga(t).getDay()),e,2)}function hs(t){return t.getDay()}function fs(t,e){return Ao(Ya.count(Ga(t)-1,t),e,2)}function ds(t,e){return Ao(t.getFullYear()%100,e,2)}function ps(t,e){return Ao((t=us(t)).getFullYear()%100,e,2)}function gs(t,e){return Ao(t.getFullYear()%1e4,e,4)}function ys(t,e){var n=t.getDay();return Ao((t=n>=4||0===n?za(t):za.ceil(t)).getFullYear()%1e4,e,4)}function ms(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Ao(e/60|0,"0",2)+Ao(e%60,"0",2)}function vs(t,e){return Ao(t.getUTCDate(),e,2)}function bs(t,e){return Ao(t.getUTCHours(),e,2)}function _s(t,e){return Ao(t.getUTCHours()%12||12,e,2)}function xs(t,e){return Ao(1+to.count(fo(t),t),e,3)}function ws(t,e){return Ao(t.getUTCMilliseconds(),e,3)}function ks(t,e){return ws(t,e)+"000"}function Ts(t,e){return Ao(t.getUTCMonth()+1,e,2)}function Cs(t,e){return Ao(t.getUTCMinutes(),e,2)}function Es(t,e){return Ao(t.getUTCSeconds(),e,2)}function Ss(t){var e=t.getUTCDay();return 0===e?7:e}function As(t,e){return Ao(no.count(fo(t)-1,t),e,2)}function Ms(t){var e=t.getUTCDay();return e>=4||0===e?oo(t):oo.ceil(t)}function Ns(t,e){return t=Ms(t),Ao(oo.count(fo(t),t)+(4===fo(t).getUTCDay()),e,2)}function Ds(t){return t.getUTCDay()}function Bs(t,e){return Ao(ro.count(fo(t)-1,t),e,2)}function Ls(t,e){return Ao(t.getUTCFullYear()%100,e,2)}function Os(t,e){return Ao((t=Ms(t)).getUTCFullYear()%100,e,2)}function Is(t,e){return Ao(t.getUTCFullYear()%1e4,e,4)}function Rs(t,e){var n=t.getUTCDay();return Ao((t=n>=4||0===n?oo(t):oo.ceil(t)).getUTCFullYear()%1e4,e,4)}function Fs(){return"+0000"}function Ps(){return"%"}function Ys(t){return+t}function js(t){return Math.floor(+t/1e3)}function Us(t){return new Date(t)}function zs(t){return t instanceof Date?+t:+new Date(+t)}function $s(t,e,n,r,i,a,o,s,c,u){var l=Xi(),h=l.invert,f=l.domain,d=u(".%L"),p=u(":%S"),g=u("%I:%M"),y=u("%I %p"),m=u("%a %d"),v=u("%b %d"),b=u("%B"),_=u("%Y");function x(t){return(c(t)<t?d:s(t)<t?p:o(t)<t?g:a(t)<t?y:r(t)<t?i(t)<t?m:v:n(t)<t?b:_)(t)}return l.invert=function(t){return new Date(h(t))},l.domain=function(t){return arguments.length?f(Array.from(t,zs)):f().map(Us)},l.ticks=function(e){var n=f();return t(n[0],n[n.length-1],null==e?10:e)},l.tickFormat=function(t,e){return null==e?x:u(e)},l.nice=function(t){var n=f();return t&&"function"==typeof t.range||(t=e(n[0],n[n.length-1],null==t?10:t)),t?f(function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}(n,t)):l},l.copy=function(){return Gi(l,$s(t,e,n,r,i,a,o,s,c,u))},l}function qs(){}function Hs(t){return null==t?qs:function(){return this.querySelector(t)}}function Ws(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Vs(){return[]}function Gs(t){return null==t?Vs:function(){return this.querySelectorAll(t)}}function Xs(t){return function(){return this.matches(t)}}function Zs(t){return function(e){return e.matches(t)}}wo=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,u=No(i),l=Do(i),h=No(a),f=Do(a),d=No(o),p=Do(o),g=No(s),y=Do(s),m=No(c),v=Do(c),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Ko,e:Ko,f:rs,g:ps,G:ys,H:Jo,I:ts,j:es,L:ns,m:is,M:as,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Ys,s:js,S:os,u:ss,U:cs,V:ls,w:hs,W:fs,x:null,X:null,y:ds,Y:gs,Z:ms,"%":Ps},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:vs,e:vs,f:ks,g:Os,G:Rs,H:bs,I:_s,j:xs,L:ws,m:Ts,M:Cs,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Ys,s:js,S:Es,u:Ss,U:As,V:Ns,w:Ds,W:Bs,x:null,X:null,y:Ls,Y:Is,Z:Fs,"%":Ps},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return T(t,e,n,r)},d:zo,e:zo,f:Go,g:Po,G:Fo,H:qo,I:qo,j:$o,L:Vo,m:Uo,M:Ho,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=l.get(r[0].toLowerCase()),n+r[0].length):-1},q:jo,Q:Zo,s:Qo,S:Wo,u:Lo,U:Oo,V:Io,w:Bo,W:Ro,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:Po,Y:Fo,Z:Yo,"%":Xo};function w(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===t.charCodeAt(s)&&(o.push(t.slice(c,s)),null!=(i=To[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),c=s+1);return o.push(t.slice(c,s)),o.join("")}}function k(t,e){return function(n){var r,i,a=xo(1900,void 0,1);if(T(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=_o(xo(a.y,0,1))).getUTCDay(),r=i>4||0===i?ro.ceil(r):ro(r),r=to.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=bo(xo(a.y,0,1))).getDay(),r=i>4||0===i?Ya.ceil(r):Ya(r),r=Ra.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?_o(xo(a.y,0,1)).getUTCDay():bo(xo(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,_o(a)):bo(a)}}function T(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o<s;){if(r>=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in To?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),{format:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),ko=wo.format,wo.parse,wo.utcFormat,wo.utcParse;var Qs=Array.prototype.find;function Ks(){return this.firstElementChild}var Js=Array.prototype.filter;function tc(){return Array.from(this.children)}function ec(t){return new Array(t.length)}function nc(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function rc(t){return function(){return t}}function ic(t,e,n,r,i,a){for(var o,s=0,c=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new nc(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function ac(t,e,n,r,i,a,o){var s,c,u,l=new Map,h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(d[s]=u=o.call(c,c.__data__,s,e)+"",l.has(u)?i[s]=c:l.set(u,c));for(s=0;s<f;++s)u=o.call(t,a[s],s,a)+"",(c=l.get(u))?(r[s]=c,c.__data__=a[s],l.delete(u)):n[s]=new nc(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&l.get(d[s])===c&&(i[s]=c)}function oc(t){return t.__data__}function sc(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function cc(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}nc.prototype={constructor:nc,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var uc="http://www.w3.org/1999/xhtml";const lc={svg:"http://www.w3.org/2000/svg",xhtml:uc,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function hc(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),lc.hasOwnProperty(e)?{space:lc[e],local:t}:t}function fc(t){return function(){this.removeAttribute(t)}}function dc(t){return function(){this.removeAttributeNS(t.space,t.local)}}function pc(t,e){return function(){this.setAttribute(t,e)}}function gc(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function yc(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function mc(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function vc(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function bc(t){return function(){this.style.removeProperty(t)}}function _c(t,e,n){return function(){this.style.setProperty(t,e,n)}}function xc(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function wc(t,e){return t.style.getPropertyValue(e)||vc(t).getComputedStyle(t,null).getPropertyValue(e)}function kc(t){return function(){delete this[t]}}function Tc(t,e){return function(){this[t]=e}}function Cc(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Ec(t){return t.trim().split(/^|\s+/)}function Sc(t){return t.classList||new Ac(t)}function Ac(t){this._node=t,this._names=Ec(t.getAttribute("class")||"")}function Mc(t,e){for(var n=Sc(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Nc(t,e){for(var n=Sc(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Dc(t){return function(){Mc(this,t)}}function Bc(t){return function(){Nc(this,t)}}function Lc(t,e){return function(){(e.apply(this,arguments)?Mc:Nc)(this,t)}}function Oc(){this.textContent=""}function Ic(t){return function(){this.textContent=t}}function Rc(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Fc(){this.innerHTML=""}function Pc(t){return function(){this.innerHTML=t}}function Yc(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function jc(){this.nextSibling&&this.parentNode.appendChild(this)}function Uc(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function zc(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===uc&&e.documentElement.namespaceURI===uc?e.createElement(t):e.createElementNS(n,t)}}function $c(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function qc(t){var e=hc(t);return(e.local?$c:zc)(e)}function Hc(){return null}function Wc(){var t=this.parentNode;t&&t.removeChild(this)}function Vc(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Gc(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Xc(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Zc(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Qc(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function Kc(t,e,n){var r=vc(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Jc(t,e){return function(){return Kc(this,t,e)}}function tu(t,e){return function(){return Kc(this,t,e.apply(this,arguments))}}Ac.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var eu=[null];function nu(t,e){this._groups=t,this._parents=e}function ru(){return new nu([[document.documentElement]],eu)}nu.prototype=ru.prototype={constructor:nu,select:function(t){"function"!=typeof t&&(t=Hs(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,u=r[i]=new Array(c),l=0;l<c;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),u[l]=o);return new nu(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return Ws(t.apply(this,arguments))}}(t):Gs(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,u=0;u<c;++u)(o=s[u])&&(r.push(t.call(o,o.__data__,u,s)),i.push(o));return new nu(r,i)},selectChild:function(t){return this.select(null==t?Ks:function(t){return function(){return Qs.call(this.children,t)}}("function"==typeof t?t:Zs(t)))},selectChildren:function(t){return this.selectAll(null==t?tc:function(t){return function(){return Js.call(this.children,t)}}("function"==typeof t?t:Zs(t)))},filter:function(t){"function"!=typeof t&&(t=Xs(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new nu(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,oc);var n=e?ac:ic,r=this._parents,i=this._groups;"function"!=typeof t&&(t=rc(t));for(var a=i.length,o=new Array(a),s=new Array(a),c=new Array(a),u=0;u<a;++u){var l=r[u],h=i[u],f=h.length,d=sc(t.call(l,l&&l.__data__,u,r)),p=d.length,g=s[u]=new Array(p),y=o[u]=new Array(p),m=c[u]=new Array(f);n(l,h,g,y,m,d,e);for(var v,b,_=0,x=0;_<p;++_)if(v=g[_]){for(_>=x&&(x=_+1);!(b=y[x])&&++x<p;);v._next=b||null}}return(o=new nu(o,r))._enter=s,o._exit=c,o},enter:function(){return new nu(this._enter||this._groups.map(ec),this._parents)},exit:function(){return new nu(this._exit||this._groups.map(ec),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),c=0;c<o;++c)for(var u,l=n[c],h=r[c],f=l.length,d=s[c]=new Array(f),p=0;p<f;++p)(u=l[p]||h[p])&&(d[p]=u);for(;c<i;++c)s[c]=n[c];return new nu(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=cc);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,u=i[a]=new Array(c),l=0;l<c;++l)(o=s[l])&&(u[l]=o);u.sort(e)}return new nu(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=hc(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?dc:fc:"function"==typeof e?n.local?mc:yc:n.local?gc:pc)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?bc:"function"==typeof e?xc:_c)(t,e,null==n?"":n)):wc(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?kc:"function"==typeof e?Cc:Tc)(t,e)):this.node()[t]},classed:function(t,e){var n=Ec(t+"");if(arguments.length<2){for(var r=Sc(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Lc:e?Dc:Bc)(n,e))},text:function(t){return arguments.length?this.each(null==t?Oc:("function"==typeof t?Rc:Ic)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Fc:("function"==typeof t?Yc:Pc)(t)):this.node().innerHTML},raise:function(){return this.each(jc)},lower:function(){return this.each(Uc)},append:function(t){var e="function"==typeof t?t:qc(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:qc(t),r=null==e?Hc:"function"==typeof e?e:Hs(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Wc)},clone:function(t){return this.select(t?Gc:Vc)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=Xc(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?Qc:Zc,r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,u=0,l=s.length;u<l;++u)for(r=0,c=s[u];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?tu:Jc)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};const iu=ru;function au(t){return"string"==typeof t?new nu([[document.querySelector(t)]],[document.documentElement]):new nu([[t]],eu)}function ou(t){return"string"==typeof t?new nu([document.querySelectorAll(t)],[document.documentElement]):new nu([Ws(t)],eu)}const su=Math.PI,cu=2*su,uu=1e-6,lu=cu-uu;function hu(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function fu(){return new hu}hu.prototype=fu.prototype={constructor:hu,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,c=r-e,u=a-t,l=o-e,h=u*u+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>uu)if(Math.abs(l*s-c*u)>uu&&i){var f=n-a,d=r-o,p=s*s+c*c,g=f*f+d*d,y=Math.sqrt(p),m=Math.sqrt(h),v=i*Math.tan((su-Math.acos((p+h-g)/(2*y*m)))/2),b=v/m,_=v/y;Math.abs(b-1)>uu&&(this._+="L"+(t+b*u)+","+(e+b*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>u*d)+","+(this._x1=t+_*s)+","+(this._y1=e+_*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),c=t+o,u=e+s,l=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+u:(Math.abs(this._x1-c)>uu||Math.abs(this._y1-u)>uu)&&(this._+="L"+c+","+u),n&&(h<0&&(h=h%cu+cu),h>lu?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=c)+","+(this._y1=u):h>uu&&(this._+="A"+n+","+n+",0,"+ +(h>=su)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const du=fu;function pu(t){return function(){return t}}var gu=Math.abs,yu=Math.atan2,mu=Math.cos,vu=Math.max,bu=Math.min,_u=Math.sin,xu=Math.sqrt,wu=1e-12,ku=Math.PI,Tu=ku/2,Cu=2*ku;function Eu(t){return t>1?0:t<-1?ku:Math.acos(t)}function Su(t){return t>=1?Tu:t<=-1?-Tu:Math.asin(t)}function Au(t){return t.innerRadius}function Mu(t){return t.outerRadius}function Nu(t){return t.startAngle}function Du(t){return t.endAngle}function Bu(t){return t&&t.padAngle}function Lu(t,e,n,r,i,a,o,s){var c=n-t,u=r-e,l=o-i,h=s-a,f=h*c-l*u;if(!(f*f<wu))return[t+(f=(l*(e-a)-h*(t-i))/f)*c,e+f*u]}function Ou(t,e,n,r,i,a,o){var s=t-n,c=e-r,u=(o?a:-a)/xu(s*s+c*c),l=u*c,h=-u*s,f=t+l,d=e+h,p=n+l,g=r+h,y=(f+p)/2,m=(d+g)/2,v=p-f,b=g-d,_=v*v+b*b,x=i-a,w=f*g-p*d,k=(b<0?-1:1)*xu(vu(0,x*x*_-w*w)),T=(w*b-v*k)/_,C=(-w*v-b*k)/_,E=(w*b+v*k)/_,S=(-w*v+b*k)/_,A=T-y,M=C-m,N=E-y,D=S-m;return A*A+M*M>N*N+D*D&&(T=E,C=S),{cx:T,cy:C,x01:-l,y01:-h,x11:T*(i/x-1),y11:C*(i/x-1)}}function Iu(){var t=Au,e=Mu,n=pu(0),r=null,i=Nu,a=Du,o=Bu,s=null;function c(){var c,u,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-Tu,d=a.apply(this,arguments)-Tu,p=gu(d-f),g=d>f;if(s||(s=c=du()),h<l&&(u=h,h=l,l=u),h>wu)if(p>Cu-wu)s.moveTo(h*mu(f),h*_u(f)),s.arc(0,0,h,f,d,!g),l>wu&&(s.moveTo(l*mu(d),l*_u(d)),s.arc(0,0,l,d,f,g));else{var y,m,v=f,b=d,_=f,x=d,w=p,k=p,T=o.apply(this,arguments)/2,C=T>wu&&(r?+r.apply(this,arguments):xu(l*l+h*h)),E=bu(gu(h-l)/2,+n.apply(this,arguments)),S=E,A=E;if(C>wu){var M=Su(C/l*_u(T)),N=Su(C/h*_u(T));(w-=2*M)>wu?(_+=M*=g?1:-1,x-=M):(w=0,_=x=(f+d)/2),(k-=2*N)>wu?(v+=N*=g?1:-1,b-=N):(k=0,v=b=(f+d)/2)}var D=h*mu(v),B=h*_u(v),L=l*mu(x),O=l*_u(x);if(E>wu){var I,R=h*mu(b),F=h*_u(b),P=l*mu(_),Y=l*_u(_);if(p<ku&&(I=Lu(D,B,P,Y,R,F,L,O))){var j=D-I[0],U=B-I[1],z=R-I[0],$=F-I[1],q=1/_u(Eu((j*z+U*$)/(xu(j*j+U*U)*xu(z*z+$*$)))/2),H=xu(I[0]*I[0]+I[1]*I[1]);S=bu(E,(l-H)/(q-1)),A=bu(E,(h-H)/(q+1))}}k>wu?A>wu?(y=Ou(P,Y,D,B,h,A,g),m=Ou(R,F,L,O,h,A,g),s.moveTo(y.cx+y.x01,y.cy+y.y01),A<E?s.arc(y.cx,y.cy,A,yu(y.y01,y.x01),yu(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,A,yu(y.y01,y.x01),yu(y.y11,y.x11),!g),s.arc(0,0,h,yu(y.cy+y.y11,y.cx+y.x11),yu(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,yu(m.y11,m.x11),yu(m.y01,m.x01),!g))):(s.moveTo(D,B),s.arc(0,0,h,v,b,!g)):s.moveTo(D,B),l>wu&&w>wu?S>wu?(y=Ou(L,O,R,F,l,-S,g),m=Ou(D,B,P,Y,l,-S,g),s.lineTo(y.cx+y.x01,y.cy+y.y01),S<E?s.arc(y.cx,y.cy,S,yu(y.y01,y.x01),yu(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,S,yu(y.y01,y.x01),yu(y.y11,y.x11),!g),s.arc(0,0,l,yu(y.cy+y.y11,y.cx+y.x11),yu(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,S,yu(m.y11,m.x11),yu(m.y01,m.x01),!g))):s.arc(0,0,l,x,_,g):s.lineTo(L,O)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-ku/2;return[mu(r)*n,_u(r)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:pu(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:pu(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:pu(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:pu(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:pu(+t),c):i},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:pu(+t),c):a},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:pu(+t),c):o},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c}function Ru(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Fu(t){this._context=t}function Pu(t){return new Fu(t)}function Yu(t){return t[0]}function ju(t){return t[1]}function Uu(t,e){var n=pu(!0),r=null,i=Pu,a=null;function o(o){var s,c,u,l=(o=Ru(o)).length,h=!1;for(null==r&&(a=i(u=du())),s=0;s<=l;++s)!(s<l&&n(c=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(c,s,o),+e(c,s,o));if(u)return a=null,u+""||null}return t="function"==typeof t?t:void 0===t?Yu:pu(t),e="function"==typeof e?e:void 0===e?ju:pu(e),o.x=function(e){return arguments.length?(t="function"==typeof e?e:pu(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:pu(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:pu(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}function zu(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function $u(t){return t}function qu(){}function Hu(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Wu(t){this._context=t}function Vu(t){return new Wu(t)}function Gu(t){this._context=t}function Xu(t){this._context=t}function Zu(t){this._context=t}function Qu(t){return t<0?-1:1}function Ku(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Qu(a)+Qu(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Ju(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function tl(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function el(t){this._context=t}function nl(t){this._context=new rl(t)}function rl(t){this._context=t}function il(t){this._context=t}function al(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function ol(t,e){this._context=t,this._t=e}Array.prototype.slice,Fu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},Wu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Hu(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Hu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Gu.prototype={areaStart:qu,areaEnd:qu,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Hu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Xu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Hu(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Zu.prototype={areaStart:qu,areaEnd:qu,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},el.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:tl(this,this._t0,Ju(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,tl(this,Ju(this,n=Ku(this,t,e)),n);break;default:tl(this,this._t0,n=Ku(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(nl.prototype=Object.create(el.prototype)).point=function(t,e){el.prototype.point.call(this,e,t)},rl.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},il.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=al(t),i=al(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},ol.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var sl=new Date,cl=new Date;function ul(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return ul((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return sl.setTime(+e),cl.setTime(+r),t(sl),t(cl),Math.floor(n(sl,cl))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}const ll=864e5,hl=6048e5;function fl(t){return ul((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/hl}))}var dl=fl(0),pl=fl(1),gl=fl(2),yl=fl(3),ml=fl(4),vl=fl(5),bl=fl(6),_l=(dl.range,pl.range,gl.range,yl.range,ml.range,vl.range,bl.range,ul((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/ll}),(function(t){return t.getUTCDate()-1})));const xl=_l;function wl(t){return ul((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/hl}))}_l.range;var kl=wl(0),Tl=wl(1),Cl=wl(2),El=wl(3),Sl=wl(4),Al=wl(5),Ml=wl(6),Nl=(kl.range,Tl.range,Cl.range,El.range,Sl.range,Al.range,Ml.range,ul((t=>t.setHours(0,0,0,0)),((t,e)=>t.setDate(t.getDate()+e)),((t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/ll),(t=>t.getDate()-1)));const Dl=Nl;Nl.range;var Bl=ul((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Bl.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ul((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};const Ll=Bl;Bl.range;var Ol=ul((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));Ol.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ul((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};const Il=Ol;function Rl(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Fl(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Pl(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Ol.range;var Yl,jl,Ul={"-":"",_:" ",0:"0"},zl=/^\s*\d+/,$l=/^%/,ql=/[\\^$*+?|[\]().{}]/g;function Hl(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function Wl(t){return t.replace(ql,"\\$&")}function Vl(t){return new RegExp("^(?:"+t.map(Wl).join("|")+")","i")}function Gl(t){return new Map(t.map(((t,e)=>[t.toLowerCase(),e])))}function Xl(t,e,n){var r=zl.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Zl(t,e,n){var r=zl.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ql(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Kl(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Jl(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function th(t,e,n){var r=zl.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function eh(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function nh(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function rh(t,e,n){var r=zl.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function ih(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ah(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function oh(t,e,n){var r=zl.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function sh(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ch(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function uh(t,e,n){var r=zl.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function lh(t,e,n){var r=zl.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function hh(t,e,n){var r=zl.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function fh(t,e,n){var r=$l.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function dh(t,e,n){var r=zl.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function ph(t,e,n){var r=zl.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function gh(t,e){return Hl(t.getDate(),e,2)}function yh(t,e){return Hl(t.getHours(),e,2)}function mh(t,e){return Hl(t.getHours()%12||12,e,2)}function vh(t,e){return Hl(1+Dl.count(Ll(t),t),e,3)}function bh(t,e){return Hl(t.getMilliseconds(),e,3)}function _h(t,e){return bh(t,e)+"000"}function xh(t,e){return Hl(t.getMonth()+1,e,2)}function wh(t,e){return Hl(t.getMinutes(),e,2)}function kh(t,e){return Hl(t.getSeconds(),e,2)}function Th(t){var e=t.getDay();return 0===e?7:e}function Ch(t,e){return Hl(kl.count(Ll(t)-1,t),e,2)}function Eh(t){var e=t.getDay();return e>=4||0===e?Sl(t):Sl.ceil(t)}function Sh(t,e){return t=Eh(t),Hl(Sl.count(Ll(t),t)+(4===Ll(t).getDay()),e,2)}function Ah(t){return t.getDay()}function Mh(t,e){return Hl(Tl.count(Ll(t)-1,t),e,2)}function Nh(t,e){return Hl(t.getFullYear()%100,e,2)}function Dh(t,e){return Hl((t=Eh(t)).getFullYear()%100,e,2)}function Bh(t,e){return Hl(t.getFullYear()%1e4,e,4)}function Lh(t,e){var n=t.getDay();return Hl((t=n>=4||0===n?Sl(t):Sl.ceil(t)).getFullYear()%1e4,e,4)}function Oh(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Hl(e/60|0,"0",2)+Hl(e%60,"0",2)}function Ih(t,e){return Hl(t.getUTCDate(),e,2)}function Rh(t,e){return Hl(t.getUTCHours(),e,2)}function Fh(t,e){return Hl(t.getUTCHours()%12||12,e,2)}function Ph(t,e){return Hl(1+xl.count(Il(t),t),e,3)}function Yh(t,e){return Hl(t.getUTCMilliseconds(),e,3)}function jh(t,e){return Yh(t,e)+"000"}function Uh(t,e){return Hl(t.getUTCMonth()+1,e,2)}function zh(t,e){return Hl(t.getUTCMinutes(),e,2)}function $h(t,e){return Hl(t.getUTCSeconds(),e,2)}function qh(t){var e=t.getUTCDay();return 0===e?7:e}function Hh(t,e){return Hl(dl.count(Il(t)-1,t),e,2)}function Wh(t){var e=t.getUTCDay();return e>=4||0===e?ml(t):ml.ceil(t)}function Vh(t,e){return t=Wh(t),Hl(ml.count(Il(t),t)+(4===Il(t).getUTCDay()),e,2)}function Gh(t){return t.getUTCDay()}function Xh(t,e){return Hl(pl.count(Il(t)-1,t),e,2)}function Zh(t,e){return Hl(t.getUTCFullYear()%100,e,2)}function Qh(t,e){return Hl((t=Wh(t)).getUTCFullYear()%100,e,2)}function Kh(t,e){return Hl(t.getUTCFullYear()%1e4,e,4)}function Jh(t,e){var n=t.getUTCDay();return Hl((t=n>=4||0===n?ml(t):ml.ceil(t)).getUTCFullYear()%1e4,e,4)}function tf(){return"+0000"}function ef(){return"%"}function nf(t){return+t}function rf(t){return Math.floor(+t/1e3)}Yl=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,u=Vl(i),l=Gl(i),h=Vl(a),f=Gl(a),d=Vl(o),p=Gl(o),g=Vl(s),y=Gl(s),m=Vl(c),v=Gl(c),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:gh,e:gh,f:_h,g:Dh,G:Lh,H:yh,I:mh,j:vh,L:bh,m:xh,M:wh,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:nf,s:rf,S:kh,u:Th,U:Ch,V:Sh,w:Ah,W:Mh,x:null,X:null,y:Nh,Y:Bh,Z:Oh,"%":ef},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Ih,e:Ih,f:jh,g:Qh,G:Jh,H:Rh,I:Fh,j:Ph,L:Yh,m:Uh,M:zh,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:nf,s:rf,S:$h,u:qh,U:Hh,V:Vh,w:Gh,W:Xh,x:null,X:null,y:Zh,Y:Kh,Z:tf,"%":ef},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return T(t,e,n,r)},d:ah,e:ah,f:hh,g:eh,G:th,H:sh,I:sh,j:oh,L:lh,m:ih,M:ch,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=l.get(r[0].toLowerCase()),n+r[0].length):-1},q:rh,Q:dh,s:ph,S:uh,u:Zl,U:Ql,V:Kl,w:Xl,W:Jl,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:eh,Y:th,Z:nh,"%":fh};function w(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===t.charCodeAt(s)&&(o.push(t.slice(c,s)),null!=(i=Ul[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),c=s+1);return o.push(t.slice(c,s)),o.join("")}}function k(t,e){return function(n){var r,i,a=Pl(1900,void 0,1);if(T(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Fl(Pl(a.y,0,1))).getUTCDay(),r=i>4||0===i?pl.ceil(r):pl(r),r=xl.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Rl(Pl(a.y,0,1))).getDay(),r=i>4||0===i?Tl.ceil(r):Tl(r),r=Dl.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Fl(Pl(a.y,0,1)).getUTCDay():Rl(Pl(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Fl(a)):Rl(a)}}function T(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o<s;){if(r>=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in Ul?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),{format:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),jl=Yl.format,Yl.parse,Yl.utcFormat,Yl.utcParse;var af={value:()=>{}};function of(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new sf(r)}function sf(t){this._=t}function cf(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function uf(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function lf(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=af,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}sf.prototype=of.prototype={constructor:sf,on:function(t,e){var n,r=this._,i=cf(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=lf(r[n],t.name,e);else if(null==e)for(n in r)r[n]=lf(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=uf(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new sf(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};const hf=of;var ff,df,pf=0,gf=0,yf=0,mf=0,vf=0,bf=0,_f="object"==typeof performance&&performance.now?performance:Date,xf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function wf(){return vf||(xf(kf),vf=_f.now()+bf)}function kf(){vf=0}function Tf(){this._call=this._time=this._next=null}function Cf(t,e,n){var r=new Tf;return r.restart(t,e,n),r}function Ef(){vf=(mf=_f.now())+bf,pf=gf=0;try{!function(){wf(),++pf;for(var t,e=ff;e;)(t=vf-e._time)>=0&&e._call.call(void 0,t),e=e._next;--pf}()}finally{pf=0,function(){for(var t,e,n=ff,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:ff=e);df=t,Af(r)}(),vf=0}}function Sf(){var t=_f.now(),e=t-mf;e>1e3&&(bf-=e,mf=t)}function Af(t){pf||(gf&&(gf=clearTimeout(gf)),t-vf>24?(t<1/0&&(gf=setTimeout(Ef,t-_f.now()-bf)),yf&&(yf=clearInterval(yf))):(yf||(mf=_f.now(),yf=setInterval(Sf,1e3)),pf=1,xf(Ef)))}function Mf(t,e,n){var r=new Tf;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}Tf.prototype=Cf.prototype={constructor:Tf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?wf():+n)+(null==e?0:+e),this._next||df===this||(df?df._next=this:ff=this,df=this),this._call=t,this._time=n,Af()},stop:function(){this._call&&(this._call=null,this._time=1/0,Af())}};var Nf=hf("start","end","cancel","interrupt"),Df=[];function Bf(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(c){var u,l,h,f;if(1!==n.state)return s();for(u in i)if((f=i[u]).name===n.name){if(3===f.state)return Mf(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+u<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[u])}if(Mf((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,l=-1;u<h;++u)(f=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Cf((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Nf,tween:Df,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Lf(t,e){var n=If(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Of(t,e){var n=If(t,e);if(n.state>3)throw new Error("too late; already running");return n}function If(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Rf(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Ff,Pf=180/Math.PI,Yf={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function jf(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*Pf,skewX:Math.atan(c)*Pf,scaleX:o,scaleY:s}}function Uf(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:Rf(t,i)},{i:c-2,x:Rf(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Rf(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Rf(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Rf(t,n)},{i:s-2,x:Rf(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var zf=Uf((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Yf:jf(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),$f=Uf((function(t){return null==t?Yf:(Ff||(Ff=document.createElementNS("http://www.w3.org/2000/svg","g")),Ff.setAttribute("transform",t),(t=Ff.transform.baseVal.consolidate())?jf((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Yf)}),", ",")",")");function qf(t,e){var n,r;return function(){var i=Of(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function Hf(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=Of(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}a.tween=i}}function Wf(t,e,n){var r=t._id;return t.each((function(){var t=Of(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return If(t,r).value[e]}}function Vf(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}const Gf=function t(e){var n=function(t){return 1==(t=+t)?Fr:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Ir(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=ur(t)).r,(e=ur(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Fr(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function Xf(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=ur(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}Xf((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return Vf((n-r/e)*e,o,i,a,s)}})),Xf((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return Vf((n-r/e)*e,i,a,o,s)}}));var Zf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qf=new RegExp(Zf.source,"g");function Kf(t,e){var n,r,i,a=Zf.lastIndex=Qf.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=Zf.exec(t))&&(r=Qf.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:Rf(n,r)})),a=Qf.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function Jf(t,e){var n;return("number"==typeof e?Rf:e instanceof ar?Gf:(n=ar(e))?(e=n,Gf):Kf)(t,e)}function td(t){return function(){this.removeAttribute(t)}}function ed(t){return function(){this.removeAttributeNS(t.space,t.local)}}function nd(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function rd(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function id(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function ad(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function od(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function sd(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function cd(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&sd(t,i)),n}return i._value=e,i}function ud(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&od(t,i)),n}return i._value=e,i}function ld(t,e){return function(){Lf(this,t).delay=+e.apply(this,arguments)}}function hd(t,e){return e=+e,function(){Lf(this,t).delay=e}}function fd(t,e){return function(){Of(this,t).duration=+e.apply(this,arguments)}}function dd(t,e){return e=+e,function(){Of(this,t).duration=e}}function pd(t,e){if("function"!=typeof e)throw new Error;return function(){Of(this,t).ease=e}}function gd(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?Lf:Of;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var yd=iu.prototype.constructor;function md(t){return function(){this.style.removeProperty(t)}}function vd(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function bd(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&vd(t,a,n)),r}return a._value=e,a}function _d(t){return function(e){this.textContent=t.call(this,e)}}function xd(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&_d(r)),e}return r._value=t,r}var wd=0;function kd(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Td(){return++wd}var Cd=iu.prototype;kd.prototype=function(t){return iu().transition(t)}.prototype={constructor:kd,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Hs(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,u=r[o],l=u.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=u[f])&&(c=t.call(s,s.__data__,f,u))&&("__data__"in s&&(c.__data__=s.__data__),h[f]=c,Bf(h[f],e,n,f,h,If(s,n)));return new kd(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Gs(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,u=r[s],l=u.length,h=0;h<l;++h)if(c=u[h]){for(var f,d=t.call(c,c.__data__,h,u),p=If(c,n),g=0,y=d.length;g<y;++g)(f=d[g])&&Bf(f,e,n,g,d,p);a.push(d),o.push(c)}return new kd(a,o,e,n)},selectChild:Cd.selectChild,selectChildren:Cd.selectChildren,filter:function(t){"function"!=typeof t&&(t=Xs(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new kd(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new kd(o,this._parents,this._name,this._id)},selection:function(){return new yd(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Td(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)if(o=s[u]){var l=If(o,e);Bf(o,t,n,u,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new kd(r,this._parents,t,n)},call:Cd.call,nodes:Cd.nodes,node:Cd.node,size:Cd.size,empty:Cd.empty,each:Cd.each,on:function(t,e){var n=this._id;return arguments.length<2?If(this.node(),n).on.on(t):this.each(gd(n,t,e))},attr:function(t,e){var n=hc(t),r="transform"===n?$f:Jf;return this.attrTween(t,"function"==typeof e?(n.local?ad:id)(n,r,Wf(this,"attr."+t,e)):null==e?(n.local?ed:td)(n):(n.local?rd:nd)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=hc(t);return this.tween(n,(r.local?cd:ud)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?zf:Jf;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=wc(this,t),o=(this.style.removeProperty(t),wc(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,md(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=wc(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=wc(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,Wf(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=Of(this,t),u=c.on,l=null==c.value[o]?a||(a=md(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(s,i=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=wc(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,bd(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Wf(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,xd(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=If(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?qf:Hf)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ld:hd)(e,t)):If(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?fd:dd)(e,t)):If(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(pd(e,t)):If(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;Of(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=Of(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e})),0===i&&a()}))},[Symbol.iterator]:Cd[Symbol.iterator]};var Ed={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Sd(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Ad(){}function Md(t){return null==t?Ad:function(){return this.querySelector(t)}}function Nd(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Dd(){return[]}function Bd(t){return null==t?Dd:function(){return this.querySelectorAll(t)}}function Ld(t){return function(){return this.matches(t)}}function Od(t){return function(e){return e.matches(t)}}iu.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}(this,t)}))},iu.prototype.transition=function(t){var e,n;t instanceof kd?(e=t._id,t=t._name):(e=Td(),(n=Ed).time=wf(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)(o=s[u])&&Bf(o,t,e,u,s,n||Sd(o,e));return new kd(r,this._parents,t,e)};var Id=Array.prototype.find;function Rd(){return this.firstElementChild}var Fd=Array.prototype.filter;function Pd(){return Array.from(this.children)}function Yd(t){return new Array(t.length)}function jd(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Ud(t){return function(){return t}}function zd(t,e,n,r,i,a){for(var o,s=0,c=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new jd(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function $d(t,e,n,r,i,a,o){var s,c,u,l=new Map,h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(d[s]=u=o.call(c,c.__data__,s,e)+"",l.has(u)?i[s]=c:l.set(u,c));for(s=0;s<f;++s)u=o.call(t,a[s],s,a)+"",(c=l.get(u))?(r[s]=c,c.__data__=a[s],l.delete(u)):n[s]=new jd(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&l.get(d[s])===c&&(i[s]=c)}function qd(t){return t.__data__}function Hd(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Wd(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}jd.prototype={constructor:jd,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var Vd="http://www.w3.org/1999/xhtml";const Gd={svg:"http://www.w3.org/2000/svg",xhtml:Vd,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Xd(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Gd.hasOwnProperty(e)?{space:Gd[e],local:t}:t}function Zd(t){return function(){this.removeAttribute(t)}}function Qd(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Kd(t,e){return function(){this.setAttribute(t,e)}}function Jd(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function tp(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function ep(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function np(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function rp(t){return function(){this.style.removeProperty(t)}}function ip(t,e,n){return function(){this.style.setProperty(t,e,n)}}function ap(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function op(t,e){return t.style.getPropertyValue(e)||np(t).getComputedStyle(t,null).getPropertyValue(e)}function sp(t){return function(){delete this[t]}}function cp(t,e){return function(){this[t]=e}}function up(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function lp(t){return t.trim().split(/^|\s+/)}function hp(t){return t.classList||new fp(t)}function fp(t){this._node=t,this._names=lp(t.getAttribute("class")||"")}function dp(t,e){for(var n=hp(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function pp(t,e){for(var n=hp(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function gp(t){return function(){dp(this,t)}}function yp(t){return function(){pp(this,t)}}function mp(t,e){return function(){(e.apply(this,arguments)?dp:pp)(this,t)}}function vp(){this.textContent=""}function bp(t){return function(){this.textContent=t}}function _p(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function xp(){this.innerHTML=""}function wp(t){return function(){this.innerHTML=t}}function kp(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Tp(){this.nextSibling&&this.parentNode.appendChild(this)}function Cp(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ep(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Vd&&e.documentElement.namespaceURI===Vd?e.createElement(t):e.createElementNS(n,t)}}function Sp(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ap(t){var e=Xd(t);return(e.local?Sp:Ep)(e)}function Mp(){return null}function Np(){var t=this.parentNode;t&&t.removeChild(this)}function Dp(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Bp(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Lp(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Op(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Ip(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function Rp(t,e,n){var r=np(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Fp(t,e){return function(){return Rp(this,t,e)}}function Pp(t,e){return function(){return Rp(this,t,e.apply(this,arguments))}}fp.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Yp=[null];function jp(t,e){this._groups=t,this._parents=e}function Up(){return new jp([[document.documentElement]],Yp)}jp.prototype=Up.prototype={constructor:jp,select:function(t){"function"!=typeof t&&(t=Md(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,u=r[i]=new Array(c),l=0;l<c;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),u[l]=o);return new jp(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return Nd(t.apply(this,arguments))}}(t):Bd(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,u=0;u<c;++u)(o=s[u])&&(r.push(t.call(o,o.__data__,u,s)),i.push(o));return new jp(r,i)},selectChild:function(t){return this.select(null==t?Rd:function(t){return function(){return Id.call(this.children,t)}}("function"==typeof t?t:Od(t)))},selectChildren:function(t){return this.selectAll(null==t?Pd:function(t){return function(){return Fd.call(this.children,t)}}("function"==typeof t?t:Od(t)))},filter:function(t){"function"!=typeof t&&(t=Ld(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new jp(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,qd);var n=e?$d:zd,r=this._parents,i=this._groups;"function"!=typeof t&&(t=Ud(t));for(var a=i.length,o=new Array(a),s=new Array(a),c=new Array(a),u=0;u<a;++u){var l=r[u],h=i[u],f=h.length,d=Hd(t.call(l,l&&l.__data__,u,r)),p=d.length,g=s[u]=new Array(p),y=o[u]=new Array(p),m=c[u]=new Array(f);n(l,h,g,y,m,d,e);for(var v,b,_=0,x=0;_<p;++_)if(v=g[_]){for(_>=x&&(x=_+1);!(b=y[x])&&++x<p;);v._next=b||null}}return(o=new jp(o,r))._enter=s,o._exit=c,o},enter:function(){return new jp(this._enter||this._groups.map(Yd),this._parents)},exit:function(){return new jp(this._exit||this._groups.map(Yd),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),c=0;c<o;++c)for(var u,l=n[c],h=r[c],f=l.length,d=s[c]=new Array(f),p=0;p<f;++p)(u=l[p]||h[p])&&(d[p]=u);for(;c<i;++c)s[c]=n[c];return new jp(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=Wd);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,u=i[a]=new Array(c),l=0;l<c;++l)(o=s[l])&&(u[l]=o);u.sort(e)}return new jp(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=Xd(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Qd:Zd:"function"==typeof e?n.local?ep:tp:n.local?Jd:Kd)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?rp:"function"==typeof e?ap:ip)(t,e,null==n?"":n)):op(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?sp:"function"==typeof e?up:cp)(t,e)):this.node()[t]},classed:function(t,e){var n=lp(t+"");if(arguments.length<2){for(var r=hp(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?mp:e?gp:yp)(n,e))},text:function(t){return arguments.length?this.each(null==t?vp:("function"==typeof t?_p:bp)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?xp:("function"==typeof t?kp:wp)(t)):this.node().innerHTML},raise:function(){return this.each(Tp)},lower:function(){return this.each(Cp)},append:function(t){var e="function"==typeof t?t:Ap(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Ap(t),r=null==e?Mp:"function"==typeof e?e:Md(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Np)},clone:function(t){return this.select(t?Bp:Dp)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=Lp(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?Ip:Op,r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,u=0,l=s.length;u<l;++u)for(r=0,c=s[u];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?Pp:Fp)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};const zp=Up;var $p={value:()=>{}};function qp(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Hp(r)}function Hp(t){this._=t}function Wp(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function Vp(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Gp(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=$p,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Hp.prototype=qp.prototype={constructor:Hp,on:function(t,e){var n,r=this._,i=Wp(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=Gp(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Gp(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=Vp(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Hp(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};const Xp=qp;var Zp,Qp,Kp=0,Jp=0,tg=0,eg=0,ng=0,rg=0,ig="object"==typeof performance&&performance.now?performance:Date,ag="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function og(){return ng||(ag(sg),ng=ig.now()+rg)}function sg(){ng=0}function cg(){this._call=this._time=this._next=null}function ug(t,e,n){var r=new cg;return r.restart(t,e,n),r}function lg(){ng=(eg=ig.now())+rg,Kp=Jp=0;try{!function(){og(),++Kp;for(var t,e=Zp;e;)(t=ng-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Kp}()}finally{Kp=0,function(){for(var t,e,n=Zp,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Zp=e);Qp=t,fg(r)}(),ng=0}}function hg(){var t=ig.now(),e=t-eg;e>1e3&&(rg-=e,eg=t)}function fg(t){Kp||(Jp&&(Jp=clearTimeout(Jp)),t-ng>24?(t<1/0&&(Jp=setTimeout(lg,t-ig.now()-rg)),tg&&(tg=clearInterval(tg))):(tg||(eg=ig.now(),tg=setInterval(hg,1e3)),Kp=1,ag(lg)))}function dg(t,e,n){var r=new cg;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}cg.prototype=ug.prototype={constructor:cg,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?og():+n)+(null==e?0:+e),this._next||Qp===this||(Qp?Qp._next=this:Zp=this,Qp=this),this._call=t,this._time=n,fg()},stop:function(){this._call&&(this._call=null,this._time=1/0,fg())}};var pg=Xp("start","end","cancel","interrupt"),gg=[];function yg(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(c){var u,l,h,f;if(1!==n.state)return s();for(u in i)if((f=i[u]).name===n.name){if(3===f.state)return dg(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+u<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[u])}if(dg((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,l=-1;u<h;++u)(f=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=ug((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:pg,tween:gg,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function mg(t,e){var n=bg(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function vg(t,e){var n=bg(t,e);if(n.state>3)throw new Error("too late; already running");return n}function bg(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function _g(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var xg,wg=180/Math.PI,kg={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Tg(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*wg,skewX:Math.atan(c)*wg,scaleX:o,scaleY:s}}function Cg(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:_g(t,i)},{i:c-2,x:_g(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:_g(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:_g(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:_g(t,n)},{i:s-2,x:_g(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var Eg=Cg((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?kg:Tg(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Sg=Cg((function(t){return null==t?kg:(xg||(xg=document.createElementNS("http://www.w3.org/2000/svg","g")),xg.setAttribute("transform",t),(t=xg.transform.baseVal.consolidate())?Tg((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):kg)}),", ",")",")");function Ag(t,e){var n,r;return function(){var i=vg(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function Mg(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=vg(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}a.tween=i}}function Ng(t,e,n){var r=t._id;return t.each((function(){var t=vg(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return bg(t,r).value[e]}}function Dg(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Bg(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Lg(){}var Og=.7,Ig=1.4285714285714286,Rg="\\s*([+-]?\\d+)\\s*",Fg="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pg="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Yg=/^#([0-9a-f]{3,8})$/,jg=new RegExp("^rgb\\("+[Rg,Rg,Rg]+"\\)$"),Ug=new RegExp("^rgb\\("+[Pg,Pg,Pg]+"\\)$"),zg=new RegExp("^rgba\\("+[Rg,Rg,Rg,Fg]+"\\)$"),$g=new RegExp("^rgba\\("+[Pg,Pg,Pg,Fg]+"\\)$"),qg=new RegExp("^hsl\\("+[Fg,Pg,Pg]+"\\)$"),Hg=new RegExp("^hsla\\("+[Fg,Pg,Pg,Fg]+"\\)$"),Wg={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Vg(){return this.rgb().formatHex()}function Gg(){return this.rgb().formatRgb()}function Xg(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Yg.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Zg(e):3===n?new ty(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Qg(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Qg(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=jg.exec(t))?new ty(e[1],e[2],e[3],1):(e=Ug.exec(t))?new ty(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=zg.exec(t))?Qg(e[1],e[2],e[3],e[4]):(e=$g.exec(t))?Qg(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=qg.exec(t))?iy(e[1],e[2]/100,e[3]/100,1):(e=Hg.exec(t))?iy(e[1],e[2]/100,e[3]/100,e[4]):Wg.hasOwnProperty(t)?Zg(Wg[t]):"transparent"===t?new ty(NaN,NaN,NaN,0):null}function Zg(t){return new ty(t>>16&255,t>>8&255,255&t,1)}function Qg(t,e,n,r){return r<=0&&(t=e=n=NaN),new ty(t,e,n,r)}function Kg(t){return t instanceof Lg||(t=Xg(t)),t?new ty((t=t.rgb()).r,t.g,t.b,t.opacity):new ty}function Jg(t,e,n,r){return 1===arguments.length?Kg(t):new ty(t,e,n,null==r?1:r)}function ty(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ey(){return"#"+ry(this.r)+ry(this.g)+ry(this.b)}function ny(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function ry(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function iy(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new oy(t,e,n,r)}function ay(t){if(t instanceof oy)return new oy(t.h,t.s,t.l,t.opacity);if(t instanceof Lg||(t=Xg(t)),!t)return new oy;if(t instanceof oy)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new oy(o,s,c,t.opacity)}function oy(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function sy(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function cy(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}Dg(Lg,Xg,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Vg,formatHex:Vg,formatHsl:function(){return ay(this).formatHsl()},formatRgb:Gg,toString:Gg}),Dg(ty,Jg,Bg(Lg,{brighter:function(t){return t=null==t?Ig:Math.pow(Ig,t),new ty(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Og:Math.pow(Og,t),new ty(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:ey,formatHex:ey,formatRgb:ny,toString:ny})),Dg(oy,(function(t,e,n,r){return 1===arguments.length?ay(t):new oy(t,e,n,null==r?1:r)}),Bg(Lg,{brighter:function(t){return t=null==t?Ig:Math.pow(Ig,t),new oy(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Og:Math.pow(Og,t),new oy(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ty(sy(t>=240?t-240:t+120,i,r),sy(t,i,r),sy(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const uy=t=>()=>t;function ly(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):uy(isNaN(t)?e:t)}const hy=function t(e){var n=function(t){return 1==(t=+t)?ly:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):uy(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=Jg(t)).r,(e=Jg(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=ly(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function fy(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=Jg(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}fy((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return cy((n-r/e)*e,o,i,a,s)}})),fy((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return cy((n-r/e)*e,i,a,o,s)}}));var dy=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,py=new RegExp(dy.source,"g");function gy(t,e){var n,r,i,a=dy.lastIndex=py.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=dy.exec(t))&&(r=py.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:_g(n,r)})),a=py.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function yy(t,e){var n;return("number"==typeof e?_g:e instanceof Xg?hy:(n=Xg(e))?(e=n,hy):gy)(t,e)}function my(t){return function(){this.removeAttribute(t)}}function vy(t){return function(){this.removeAttributeNS(t.space,t.local)}}function by(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function _y(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function xy(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function wy(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function ky(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Ty(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Cy(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Ty(t,i)),n}return i._value=e,i}function Ey(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&ky(t,i)),n}return i._value=e,i}function Sy(t,e){return function(){mg(this,t).delay=+e.apply(this,arguments)}}function Ay(t,e){return e=+e,function(){mg(this,t).delay=e}}function My(t,e){return function(){vg(this,t).duration=+e.apply(this,arguments)}}function Ny(t,e){return e=+e,function(){vg(this,t).duration=e}}function Dy(t,e){if("function"!=typeof e)throw new Error;return function(){vg(this,t).ease=e}}function By(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?mg:vg;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Ly=zp.prototype.constructor;function Oy(t){return function(){this.style.removeProperty(t)}}function Iy(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Ry(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Iy(t,a,n)),r}return a._value=e,a}function Fy(t){return function(e){this.textContent=t.call(this,e)}}function Py(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Fy(r)),e}return r._value=t,r}var Yy=0;function jy(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Uy(){return++Yy}var zy=zp.prototype;jy.prototype=function(t){return zp().transition(t)}.prototype={constructor:jy,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Md(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,u=r[o],l=u.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=u[f])&&(c=t.call(s,s.__data__,f,u))&&("__data__"in s&&(c.__data__=s.__data__),h[f]=c,yg(h[f],e,n,f,h,bg(s,n)));return new jy(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Bd(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,u=r[s],l=u.length,h=0;h<l;++h)if(c=u[h]){for(var f,d=t.call(c,c.__data__,h,u),p=bg(c,n),g=0,y=d.length;g<y;++g)(f=d[g])&&yg(f,e,n,g,d,p);a.push(d),o.push(c)}return new jy(a,o,e,n)},selectChild:zy.selectChild,selectChildren:zy.selectChildren,filter:function(t){"function"!=typeof t&&(t=Ld(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new jy(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new jy(o,this._parents,this._name,this._id)},selection:function(){return new Ly(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Uy(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)if(o=s[u]){var l=bg(o,e);yg(o,t,n,u,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new jy(r,this._parents,t,n)},call:zy.call,nodes:zy.nodes,node:zy.node,size:zy.size,empty:zy.empty,each:zy.each,on:function(t,e){var n=this._id;return arguments.length<2?bg(this.node(),n).on.on(t):this.each(By(n,t,e))},attr:function(t,e){var n=Xd(t),r="transform"===n?Sg:yy;return this.attrTween(t,"function"==typeof e?(n.local?wy:xy)(n,r,Ng(this,"attr."+t,e)):null==e?(n.local?vy:my)(n):(n.local?_y:by)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Xd(t);return this.tween(n,(r.local?Cy:Ey)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Eg:yy;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=op(this,t),o=(this.style.removeProperty(t),op(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Oy(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=op(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=op(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,Ng(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=vg(this,t),u=c.on,l=null==c.value[o]?a||(a=Oy(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(s,i=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=op(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Ry(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Ng(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Py(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=bg(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?Ag:Mg)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Sy:Ay)(e,t)):bg(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?My:Ny)(e,t)):bg(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Dy(e,t)):bg(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;vg(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=vg(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e})),0===i&&a()}))},[Symbol.iterator]:zy[Symbol.iterator]};var $y={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function qy(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Hy(t,e,n){this.k=t,this.x=e,this.y=n}zp.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}(this,t)}))},zp.prototype.transition=function(t){var e,n;t instanceof jy?(e=t._id,t=t._name):(e=Uy(),(n=$y).time=og(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)(o=s[u])&&yg(o,t,e,u,s,n||qy(o,e));return new jy(r,this._parents,t,e)},Hy.prototype={constructor:Hy,scale:function(t){return 1===t?this:new Hy(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Hy(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new Hy(1,0,0),Hy.prototype;var Wy="comm",Vy="rule",Gy="decl",Xy=Math.abs,Zy=String.fromCharCode;function Qy(t){return t.trim()}function Ky(t,e,n){return t.replace(e,n)}function Jy(t,e){return t.indexOf(e)}function tm(t,e){return 0|t.charCodeAt(e)}function em(t,e,n){return t.slice(e,n)}function nm(t){return t.length}function rm(t){return t.length}function im(t,e){return e.push(t),t}function am(t,e){for(var n="",r=rm(t),i=0;i<r;i++)n+=e(t[i],i,t,e)||"";return n}function om(t,e,n,r){switch(t.type){case"@import":case Gy:return t.return=t.return||t.value;case Wy:return"";case"@keyframes":return t.return=t.value+"{"+am(t.children,r)+"}";case Vy:t.value=t.props.join(",")}return nm(n=am(t.children,r))?t.return=t.value+"{"+n+"}":""}Object.assign;var sm=1,cm=1,um=0,lm=0,hm=0,fm="";function dm(t,e,n,r,i,a,o){return{value:t,root:e,parent:n,type:r,props:i,children:a,line:sm,column:cm,length:o,return:""}}function pm(){return hm=lm>0?tm(fm,--lm):0,cm--,10===hm&&(cm=1,sm--),hm}function gm(){return hm=lm<um?tm(fm,lm++):0,cm++,10===hm&&(cm=1,sm++),hm}function ym(){return tm(fm,lm)}function mm(){return lm}function vm(t,e){return em(fm,t,e)}function bm(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function _m(t){return Qy(vm(lm-1,km(91===t?t+2:40===t?t+1:t)))}function xm(t){for(;(hm=ym())&&hm<33;)gm();return bm(t)>2||bm(hm)>3?"":" "}function wm(t,e){for(;--e&&gm()&&!(hm<48||hm>102||hm>57&&hm<65||hm>70&&hm<97););return vm(t,mm()+(e<6&&32==ym()&&32==gm()))}function km(t){for(;gm();)switch(hm){case t:return lm;case 34:case 39:34!==t&&39!==t&&km(hm);break;case 40:41===t&&km(t);break;case 92:gm()}return lm}function Tm(t,e){for(;gm()&&t+hm!==57&&(t+hm!==84||47!==ym()););return"/*"+vm(e,lm-1)+"*"+Zy(47===t?t:gm())}function Cm(t){for(;!bm(ym());)gm();return vm(t,lm)}function Em(t){return function(t){return fm="",t}(Sm("",null,null,null,[""],t=function(t){return sm=cm=1,um=nm(fm=t),lm=0,[]}(t),0,[0],t))}function Sm(t,e,n,r,i,a,o,s,c){for(var u=0,l=0,h=o,f=0,d=0,p=0,g=1,y=1,m=1,v=0,b="",_=i,x=a,w=r,k=b;y;)switch(p=v,v=gm()){case 40:if(108!=p&&58==k.charCodeAt(h-1)){-1!=Jy(k+=Ky(_m(v),"&","&\f"),"&\f")&&(m=-1);break}case 34:case 39:case 91:k+=_m(v);break;case 9:case 10:case 13:case 32:k+=xm(p);break;case 92:k+=wm(mm()-1,7);continue;case 47:switch(ym()){case 42:case 47:im(Mm(Tm(gm(),mm()),e,n),c);break;default:k+="/"}break;case 123*g:s[u++]=nm(k)*m;case 125*g:case 59:case 0:switch(v){case 0:case 125:y=0;case 59+l:d>0&&nm(k)-h&&im(d>32?Nm(k+";",r,n,h-1):Nm(Ky(k," ","")+";",r,n,h-2),c);break;case 59:k+=";";default:if(im(w=Am(k,e,n,u,l,i,s,b,_=[],x=[],h),a),123===v)if(0===l)Sm(k,e,w,w,_,a,h,s,x);else switch(f){case 100:case 109:case 115:Sm(t,w,w,r&&im(Am(t,w,w,0,0,i,s,b,i,_=[],h),x),i,x,h,s,r?_:x);break;default:Sm(k,w,w,w,[""],x,0,s,x)}}u=l=d=0,g=m=1,b=k="",h=o;break;case 58:h=1+nm(k),d=p;default:if(g<1)if(123==v)--g;else if(125==v&&0==g++&&125==pm())continue;switch(k+=Zy(v),v*g){case 38:m=l>0?1:(k+="\f",-1);break;case 44:s[u++]=(nm(k)-1)*m,m=1;break;case 64:45===ym()&&(k+=_m(gm())),f=ym(),l=h=nm(b=k+=Cm(mm())),v++;break;case 45:45===p&&2==nm(k)&&(g=0)}}return a}function Am(t,e,n,r,i,a,o,s,c,u,l){for(var h=i-1,f=0===i?a:[""],d=rm(f),p=0,g=0,y=0;p<r;++p)for(var m=0,v=em(t,h+1,h=Xy(g=o[p])),b=t;m<d;++m)(b=Qy(g>0?f[m]+" "+v:Ky(v,/&\f/g,f[m])))&&(c[y++]=b);return dm(t,e,n,0===i?Vy:s,c,u,l)}function Mm(t,e,n){return dm(t,e,n,Wy,Zy(hm),em(t,2,-2),0)}function Nm(t,e,n,r){return dm(t,e,n,Gy,em(t,0,r),em(t,r+1,-1),r)}const Dm="9.1.1";var Bm=n(7967),Lm=n(7856),Om=n.n(Lm),Im=function(t){var e=t.replace(/\\u[\dA-F]{4}/gi,(function(t){return String.fromCharCode(parseInt(t.replace(/\\u/g,""),16))}));return e=(e=(e=e.replace(/\\x([0-9a-f]{2})/gi,(function(t,e){return String.fromCharCode(parseInt(e,16))}))).replace(/\\[\d\d\d]{3}/gi,(function(t){return String.fromCharCode(parseInt(t.replace(/\\/g,""),8))}))).replace(/\\[\d\d\d]{2}/gi,(function(t){return String.fromCharCode(parseInt(t.replace(/\\/g,""),8))}))},Rm=function(t){for(var e="",n=0;n>=0;){if(!((n=t.indexOf("<script"))>=0)){e+=t,n=-1;break}e+=t.substr(0,n),(n=(t=t.substr(n+1)).indexOf("<\/script>"))>=0&&(n+=9,t=t.substr(n))}var r=Im(e);return(r=(r=(r=(r=r.replaceAll(/script>/gi,"#")).replaceAll(/javascript:/gi,"#")).replaceAll(/javascript&colon/gi,"#")).replaceAll(/onerror=/gi,"onerror:")).replaceAll(/<iframe/gi,"")},Fm=function(t,e){var n=t,r=!0;if(!e.flowchart||!1!==e.flowchart.htmlLabels&&"false"!==e.flowchart.htmlLabels||(r=!1),r){var i=e.securityLevel;"antiscript"===i||"strict"===i?n=Rm(n):"loose"!==i&&(n=(n=(n=Um(n)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),n=jm(n))}return n},Pm=function(t,e){return t?e.dompurifyConfig?Om().sanitize(Fm(t,e),e.dompurifyConfig):Om().sanitize(Fm(t,e)):t},Ym=/<br\s*\/?>/gi,jm=function(t){return t.replace(/#br#/g,"<br/>")},Um=function(t){return t.replace(Ym,"#br#")},zm=function(t){return"false"!==t&&!1!==t};const $m={getRows:function(t){if(!t)return 1;var e=Um(t);return(e=e.replace(/\\n/g,"#br#")).split("#br#")},sanitizeText:Pm,sanitizeTextOrArray:function(t,e){return"string"==typeof t?Pm(t,e):t.flat().map((function(t){return Pm(t,e)}))},hasBreaks:function(t){return Ym.test(t)},splitBreaks:function(t){return t.split(Ym)},lineBreakRegex:Ym,removeScript:Rm,getUrl:function(t){var e="";return t&&(e=(e=(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e},evaluate:zm,removeEscapes:Im},qm={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,n)=>(n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t),hsl2rgb:({h:t,s:e,l:n},r)=>{if(!e)return 2.55*n;t/=360,e/=100;const i=(n/=100)<.5?n*(1+e):n+e-n*e,a=2*n-i;switch(r){case"r":return 255*qm.hue2rgb(a,i,t+1/3);case"g":return 255*qm.hue2rgb(a,i,t);case"b":return 255*qm.hue2rgb(a,i,t-1/3)}},rgb2hsl:({r:t,g:e,b:n},r)=>{t/=255,e/=255,n/=255;const i=Math.max(t,e,n),a=Math.min(t,e,n),o=(i+a)/2;if("l"===r)return 100*o;if(i===a)return 0;const s=i-a;if("s"===r)return 100*(o>.5?s/(2-i-a):s/(i+a));switch(i){case t:return 60*((e-n)/s+(e<n?6:0));case e:return 60*((n-t)/s+2);case n:return 60*((t-e)/s+4);default:return-1}}},Hm={clamp:(t,e,n)=>e>n?Math.min(e,Math.max(n,t)):Math.min(n,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},Wm={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},Vm={channel:qm,lang:Hm,unit:Wm},Gm={};for(let t=0;t<=255;t++)Gm[t]=Vm.unit.dec2hex(t);const Xm=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new class{constructor(){this.type=0}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=0}is(t){return this.type===t}}}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=0,this}_ensureHSL(){const t=this.data,{h:e,s:n,l:r}=t;void 0===e&&(t.h=Vm.channel.rgb2hsl(t,"h")),void 0===n&&(t.s=Vm.channel.rgb2hsl(t,"s")),void 0===r&&(t.l=Vm.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:n,b:r}=t;void 0===e&&(t.r=Vm.channel.hsl2rgb(t,"r")),void 0===n&&(t.g=Vm.channel.hsl2rgb(t,"g")),void 0===r&&(t.b=Vm.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(2)||void 0===e?(this._ensureHSL(),Vm.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(2)||void 0===e?(this._ensureHSL(),Vm.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(2)||void 0===e?(this._ensureHSL(),Vm.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(1)||void 0===e?(this._ensureRGB(),Vm.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(1)||void 0===e?(this._ensureRGB(),Vm.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(1)||void 0===e?(this._ensureRGB(),Vm.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(1),this.changed=!0,this.data.r=t}set g(t){this.type.set(1),this.changed=!0,this.data.g=t}set b(t){this.type.set(1),this.changed=!0,this.data.b=t}set h(t){this.type.set(2),this.changed=!0,this.data.h=t}set s(t){this.type.set(2),this.changed=!0,this.data.s=t}set l(t){this.type.set(2),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent"),Zm={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(Zm.re);if(!e)return;const n=e[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,c=o?8:4,u=a?0:-1,l=o?255:15;return Xm.set({r:(r>>c*(u+3)&l)*s,g:(r>>c*(u+2)&l)*s,b:(r>>c*(u+1)&l)*s,a:a?(r&l)*s/255:1},t)},stringify:t=>{const{r:e,g:n,b:r,a:i}=t;return i<1?`#${Gm[Math.round(e)]}${Gm[Math.round(n)]}${Gm[Math.round(r)]}${Gm[Math.round(255*i)]}`:`#${Gm[Math.round(e)]}${Gm[Math.round(n)]}${Gm[Math.round(r)]}`}},Qm=Zm,Km={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:t=>{const e=t.match(Km.hueRe);if(e){const[,t,n]=e;switch(n){case"grad":return Vm.channel.clamp.h(.9*parseFloat(t));case"rad":return Vm.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return Vm.channel.clamp.h(360*parseFloat(t))}}return Vm.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const n=t.match(Km.re);if(!n)return;const[,r,i,a,o,s]=n;return Xm.set({h:Km._hue2deg(r),s:Vm.channel.clamp.s(parseFloat(i)),l:Vm.channel.clamp.l(parseFloat(a)),a:o?Vm.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},t)},stringify:t=>{const{h:e,s:n,l:r,a:i}=t;return i<1?`hsla(${Vm.lang.round(e)}, ${Vm.lang.round(n)}%, ${Vm.lang.round(r)}%, ${i})`:`hsl(${Vm.lang.round(e)}, ${Vm.lang.round(n)}%, ${Vm.lang.round(r)}%)`}},Jm=Km,tv={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:t=>{t=t.toLowerCase();const e=tv.colors[t];if(e)return Qm.parse(e)},stringify:t=>{const e=Qm.stringify(t);for(const t in tv.colors)if(tv.colors[t]===e)return t}},ev=tv,nv={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(114!==e&&82!==e)return;const n=t.match(nv.re);if(!n)return;const[,r,i,a,o,s,c,u,l]=n;return Xm.set({r:Vm.channel.clamp.r(i?2.55*parseFloat(r):parseFloat(r)),g:Vm.channel.clamp.g(o?2.55*parseFloat(a):parseFloat(a)),b:Vm.channel.clamp.b(c?2.55*parseFloat(s):parseFloat(s)),a:u?Vm.channel.clamp.a(l?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:n,b:r,a:i}=t;return i<1?`rgba(${Vm.lang.round(e)}, ${Vm.lang.round(n)}, ${Vm.lang.round(r)}, ${Vm.lang.round(i)})`:`rgb(${Vm.lang.round(e)}, ${Vm.lang.round(n)}, ${Vm.lang.round(r)})`}},rv=nv,iv={format:{keyword:ev,hex:Qm,rgb:rv,rgba:rv,hsl:Jm,hsla:Jm},parse:t=>{if("string"!=typeof t)return t;const e=Qm.parse(t)||rv.parse(t)||Jm.parse(t)||ev.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(2)||void 0===t.data.r?Jm.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?rv.stringify(t):Qm.stringify(t)},av=iv,ov=(t,e)=>{const n=av.parse(t);for(const t in e)n[t]=Vm.channel.clamp[t](e[t]);return av.stringify(n)},sv=(t,e)=>{const n=av.parse(t),r={};for(const t in e)e[t]&&(r[t]=n[t]+e[t]);return ov(t,r)},cv=(t,e,n=0,r=1)=>{if("number"!=typeof t)return ov(t,{a:e});const i=Xm.set({r:Vm.channel.clamp.r(t),g:Vm.channel.clamp.g(e),b:Vm.channel.clamp.b(n),a:Vm.channel.clamp.a(r)});return av.stringify(i)},uv=(t,e=100)=>{const n=av.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,((t,e,n=50)=>{const{r,g:i,b:a,a:o}=av.parse(t),{r:s,g:c,b:u,a:l}=av.parse(e),h=n/100,f=2*h-1,d=o-l,p=((f*d==-1?f:(f+d)/(1+f*d))+1)/2,g=1-p;return cv(r*p+s*g,i*p+c*g,a*p+u*g,o*h+l*(1-h))})(n,t,e)},lv=(t,e,n)=>{const r=av.parse(t),i=r[e],a=Vm.channel.clamp[e](i+n);return i!==a&&(r[e]=a),av.stringify(r)},hv=(t,e)=>lv(t,"l",-e),fv=(t,e)=>lv(t,"l",e);var dv=function(t,e){return sv(t,e?{s:-40,l:10}:{s:-40,l:-10})};function pv(t){return pv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pv(t)}function gv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var yv=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.darkMode=!1,this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}var e,n;return e=t,n=[{key:"updateColors",value:function(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||sv(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||sv(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||dv(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||dv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||dv(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||dv(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||uv(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||uv(this.tertiaryColor),this.lineColor=this.lineColor||uv(this.background),this.textColor=this.textColor||this.primaryTextColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?hv(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||hv(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||uv(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||fv(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||sv(this.primaryColor,{h:64}),this.fillType3=this.fillType3||sv(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||sv(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||sv(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||sv(this.primaryColor,{h:128}),this.fillType7=this.fillType7||sv(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||sv(this.primaryColor,{l:-10}),this.pie5=this.pie5||sv(this.secondaryColor,{l:-10}),this.pie6=this.pie6||sv(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||sv(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||sv(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||sv(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||sv(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||sv(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||sv(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?hv(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||sv(this.primaryColor,{h:-30}),this.git4=this.git4||sv(this.primaryColor,{h:-60}),this.git5=this.git5||sv(this.primaryColor,{h:-90}),this.git6=this.git6||sv(this.primaryColor,{h:60}),this.git7=this.git7||sv(this.primaryColor,{h:120}),this.darkMode?(this.git0=fv(this.git0,25),this.git1=fv(this.git1,25),this.git2=fv(this.git2,25),this.git3=fv(this.git3,25),this.git4=fv(this.git4,25),this.git5=fv(this.git5,25),this.git6=fv(this.git6,25),this.git7=fv(this.git7,25)):(this.git0=hv(this.git0,25),this.git1=hv(this.git1,25),this.git2=hv(this.git2,25),this.git3=hv(this.git3,25),this.git4=hv(this.git4,25),this.git5=hv(this.git5,25),this.git6=hv(this.git6,25),this.git7=hv(this.git7,25)),this.gitInv0=this.gitInv0||uv(this.git0),this.gitInv1=this.gitInv1||uv(this.git1),this.gitInv2=this.gitInv2||uv(this.git2),this.gitInv3=this.gitInv3||uv(this.git3),this.gitInv4=this.gitInv4||uv(this.git4),this.gitInv5=this.gitInv5||uv(this.git5),this.gitInv6=this.gitInv6||uv(this.git6),this.gitInv7=this.gitInv7||uv(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor}},{key:"calculate",value:function(t){var e=this;if("object"===pv(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}],n&&gv(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function mv(t){return mv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mv(t)}function vv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var bv=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=fv(this.primaryColor,16),this.tertiaryColor=sv(this.primaryColor,{h:-160}),this.primaryBorderColor=uv(this.background),this.secondaryBorderColor=dv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dv(this.tertiaryColor,this.darkMode),this.primaryTextColor=uv(this.primaryColor),this.secondaryTextColor=uv(this.secondaryColor),this.tertiaryTextColor=uv(this.tertiaryColor),this.lineColor=uv(this.background),this.textColor=uv(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=fv(uv("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=cv(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=hv("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=cv(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=cv(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}var e,n;return e=t,n=[{key:"updateColors",value:function(){this.secondBkg=fv(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=fv(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=fv(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=sv(this.primaryColor,{h:64}),this.fillType3=sv(this.secondaryColor,{h:64}),this.fillType4=sv(this.primaryColor,{h:-64}),this.fillType5=sv(this.secondaryColor,{h:-64}),this.fillType6=sv(this.primaryColor,{h:128}),this.fillType7=sv(this.secondaryColor,{h:128}),this.pie1=this.pie1||"#0b0000",this.pie2=this.pie2||"#4d1037",this.pie3=this.pie3||"#3f5258",this.pie4=this.pie4||"#4f2f1b",this.pie5=this.pie5||"#6e0a0a",this.pie6=this.pie6||"#3b0048",this.pie7=this.pie7||"#995a01",this.pie8=this.pie8||"#154706",this.pie9=this.pie9||"#161722",this.pie10=this.pie10||"#00296f",this.pie11=this.pie11||"#01629c",this.pie12=this.pie12||"#010029",this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?hv(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=fv(this.secondaryColor,20),this.git1=fv(this.pie2||this.secondaryColor,20),this.git2=fv(this.pie3||this.tertiaryColor,20),this.git3=fv(this.pie4||sv(this.primaryColor,{h:-30}),20),this.git4=fv(this.pie5||sv(this.primaryColor,{h:-60}),20),this.git5=fv(this.pie6||sv(this.primaryColor,{h:-90}),10),this.git6=fv(this.pie7||sv(this.primaryColor,{h:60}),10),this.git7=fv(this.pie8||sv(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||uv(this.git0),this.gitInv1=this.gitInv1||uv(this.git1),this.gitInv2=this.gitInv2||uv(this.git2),this.gitInv3=this.gitInv3||uv(this.git3),this.gitInv4=this.gitInv4||uv(this.git4),this.gitInv5=this.gitInv5||uv(this.git5),this.gitInv6=this.gitInv6||uv(this.git6),this.gitInv7=this.gitInv7||uv(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor}},{key:"calculate",value:function(t){var e=this;if("object"===mv(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}],n&&vv(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function _v(t){return _v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_v(t)}function xv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var wv=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=sv(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=sv(this.primaryColor,{h:-160}),this.primaryBorderColor=dv(this.primaryColor,this.darkMode),this.secondaryBorderColor=dv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dv(this.tertiaryColor,this.darkMode),this.primaryTextColor=uv(this.primaryColor),this.secondaryTextColor=uv(this.secondaryColor),this.tertiaryTextColor=uv(this.tertiaryColor),this.lineColor=uv(this.background),this.textColor=uv(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=cv(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}var e,n;return e=t,n=[{key:"updateColors",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=fv(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=sv(this.primaryColor,{h:64}),this.fillType3=sv(this.secondaryColor,{h:64}),this.fillType4=sv(this.primaryColor,{h:-64}),this.fillType5=sv(this.secondaryColor,{h:-64}),this.fillType6=sv(this.primaryColor,{h:128}),this.fillType7=sv(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||sv(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||sv(this.primaryColor,{l:-10}),this.pie5=this.pie5||sv(this.secondaryColor,{l:-30}),this.pie6=this.pie6||sv(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||sv(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||sv(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||sv(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||sv(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||sv(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||sv(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||sv(this.primaryColor,{h:-30}),this.git4=this.git4||sv(this.primaryColor,{h:-60}),this.git5=this.git5||sv(this.primaryColor,{h:-90}),this.git6=this.git6||sv(this.primaryColor,{h:60}),this.git7=this.git7||sv(this.primaryColor,{h:120}),this.darkMode?(this.git0=fv(this.git0,25),this.git1=fv(this.git1,25),this.git2=fv(this.git2,25),this.git3=fv(this.git3,25),this.git4=fv(this.git4,25),this.git5=fv(this.git5,25),this.git6=fv(this.git6,25),this.git7=fv(this.git7,25)):(this.git0=hv(this.git0,25),this.git1=hv(this.git1,25),this.git2=hv(this.git2,25),this.git3=hv(this.git3,25),this.git4=hv(this.git4,25),this.git5=hv(this.git5,25),this.git6=hv(this.git6,25),this.git7=hv(this.git7,25)),this.gitInv0=this.gitInv0||hv(uv(this.git0),25),this.gitInv1=this.gitInv1||uv(this.git1),this.gitInv2=this.gitInv2||uv(this.git2),this.gitInv3=this.gitInv3||uv(this.git3),this.gitInv4=this.gitInv4||uv(this.git4),this.gitInv5=this.gitInv5||uv(this.git5),this.gitInv6=this.gitInv6||uv(this.git6),this.gitInv7=this.gitInv7||uv(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||uv(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||uv(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor}},{key:"calculate",value:function(t){var e=this;if("object"===_v(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}],n&&xv(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function kv(t){return kv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kv(t)}function Tv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Cv=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=fv("#cde498",10),this.primaryBorderColor=dv(this.primaryColor,this.darkMode),this.secondaryBorderColor=dv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dv(this.tertiaryColor,this.darkMode),this.primaryTextColor=uv(this.primaryColor),this.secondaryTextColor=uv(this.secondaryColor),this.tertiaryTextColor=uv(this.primaryColor),this.lineColor=uv(this.background),this.textColor=uv(this.background),this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,n;return e=t,n=[{key:"updateColors",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=hv(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=sv(this.primaryColor,{h:64}),this.fillType3=sv(this.secondaryColor,{h:64}),this.fillType4=sv(this.primaryColor,{h:-64}),this.fillType5=sv(this.secondaryColor,{h:-64}),this.fillType6=sv(this.primaryColor,{h:128}),this.fillType7=sv(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||sv(this.primaryColor,{l:-30}),this.pie5=this.pie5||sv(this.secondaryColor,{l:-30}),this.pie6=this.pie6||sv(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||sv(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||sv(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||sv(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||sv(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||sv(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||sv(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||sv(this.primaryColor,{h:-30}),this.git4=this.git4||sv(this.primaryColor,{h:-60}),this.git5=this.git5||sv(this.primaryColor,{h:-90}),this.git6=this.git6||sv(this.primaryColor,{h:60}),this.git7=this.git7||sv(this.primaryColor,{h:120}),this.darkMode?(this.git0=fv(this.git0,25),this.git1=fv(this.git1,25),this.git2=fv(this.git2,25),this.git3=fv(this.git3,25),this.git4=fv(this.git4,25),this.git5=fv(this.git5,25),this.git6=fv(this.git6,25),this.git7=fv(this.git7,25)):(this.git0=hv(this.git0,25),this.git1=hv(this.git1,25),this.git2=hv(this.git2,25),this.git3=hv(this.git3,25),this.git4=hv(this.git4,25),this.git5=hv(this.git5,25),this.git6=hv(this.git6,25),this.git7=hv(this.git7,25)),this.gitInv0=this.gitInv0||uv(this.git0),this.gitInv1=this.gitInv1||uv(this.git1),this.gitInv2=this.gitInv2||uv(this.git2),this.gitInv3=this.gitInv3||uv(this.git3),this.gitInv4=this.gitInv4||uv(this.git4),this.gitInv5=this.gitInv5||uv(this.git5),this.gitInv6=this.gitInv6||uv(this.git6),this.gitInv7=this.gitInv7||uv(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor}},{key:"calculate",value:function(t){var e=this;if("object"===kv(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}],n&&Tv(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ev(t){return Ev="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ev(t)}function Sv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Av=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=fv(this.contrast,55),this.background="#ffffff",this.tertiaryColor=sv(this.primaryColor,{h:-160}),this.primaryBorderColor=dv(this.primaryColor,this.darkMode),this.secondaryBorderColor=dv(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=dv(this.tertiaryColor,this.darkMode),this.primaryTextColor=uv(this.primaryColor),this.secondaryTextColor=uv(this.secondaryColor),this.tertiaryTextColor=uv(this.tertiaryColor),this.lineColor=uv(this.background),this.textColor=uv(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,n;return e=t,n=[{key:"updateColors",value:function(){this.secondBkg=fv(this.contrast,55),this.border2=this.contrast,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=fv(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.sectionBkgColor=fv(this.contrast,30),this.sectionBkgColor2=fv(this.contrast,30),this.taskBorderColor=hv(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=fv(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=hv(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=sv(this.primaryColor,{h:64}),this.fillType3=sv(this.secondaryColor,{h:64}),this.fillType4=sv(this.primaryColor,{h:-64}),this.fillType5=sv(this.secondaryColor,{h:-64}),this.fillType6=sv(this.primaryColor,{h:128}),this.fillType7=sv(this.secondaryColor,{h:128}),this.pie1=this.pie1||"#F4F4F4",this.pie2=this.pie2||"#555",this.pie3=this.pie3||"#BBB",this.pie4=this.pie4||"#777",this.pie5=this.pie5||"#999",this.pie6=this.pie6||"#DDD",this.pie7=this.pie7||"#FFF",this.pie8=this.pie8||"#DDD",this.pie9=this.pie9||"#BBB",this.pie10=this.pie10||"#999",this.pie11=this.pie11||"#777",this.pie12=this.pie12||"#555",this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=hv(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||sv(this.primaryColor,{h:-30}),this.git4=this.pie5||sv(this.primaryColor,{h:-60}),this.git5=this.pie6||sv(this.primaryColor,{h:-90}),this.git6=this.pie7||sv(this.primaryColor,{h:60}),this.git7=this.pie8||sv(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||uv(this.git0),this.gitInv1=this.gitInv1||uv(this.git1),this.gitInv2=this.gitInv2||uv(this.git2),this.gitInv3=this.gitInv3||uv(this.git3),this.gitInv4=this.gitInv4||uv(this.git4),this.gitInv5=this.gitInv5||uv(this.git5),this.gitInv6=this.gitInv6||uv(this.git6),this.gitInv7=this.gitInv7||uv(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor}},{key:"calculate",value:function(t){var e=this;if("object"===Ev(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}],n&&Sv(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Mv={base:{getThemeVariables:function(t){var e=new yv;return e.calculate(t),e}},dark:{getThemeVariables:function(t){var e=new bv;return e.calculate(t),e}},default:{getThemeVariables:function(t){var e=new wv;return e.calculate(t),e}},forest:{getThemeVariables:function(t){var e=new Cv;return e.calculate(t),e}},neutral:{getThemeVariables:function(t){var e=new Av;return e.calculate(t),e}}};function Nv(t){return function(t){if(Array.isArray(t))return Dv(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Dv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dv(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Bv(t){return Bv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bv(t)}var Lv={theme:"default",themeVariables:Mv.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-d3"},sequence:{hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{arrowMarkerAbsolute:!1,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},state:{dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},gitGraph:{diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0}};Lv.class.arrowMarkerAbsolute=Lv.arrowMarkerAbsolute,Lv.gitGraph.arrowMarkerAbsolute=Lv.arrowMarkerAbsolute;var Ov=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return Object.keys(e).reduce((function(r,i){return Array.isArray(e[i])?r:"object"===Bv(e[i])&&null!==e[i]?[].concat(Nv(r),[n+i],Nv(t(e[i],""))):[].concat(Nv(r),[n+i])}),[])}(Lv,"");const Iv=Lv;var Rv=void 0;function Fv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Pv(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Uv(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}function Yv(t){return Yv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yv(t)}function jv(t){return function(t){if(Array.isArray(t))return zv(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Uv(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Uv(t,e){if(t){if("string"==typeof t)return zv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?zv(t,e):void 0}}function zv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var $v,qv={curveBasis:Vu,curveBasisClosed:function(t){return new Gu(t)},curveBasisOpen:function(t){return new Xu(t)},curveLinear:Pu,curveLinearClosed:function(t){return new Zu(t)},curveMonotoneX:function(t){return new el(t)},curveMonotoneY:function(t){return new nl(t)},curveNatural:function(t){return new il(t)},curveStep:function(t){return new ol(t,.5)},curveStepAfter:function(t){return new ol(t,1)},curveStepBefore:function(t){return new ol(t,0)}},Hv=/[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,Wv=/\s*(?:(?:(\w+)(?=:):|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,Vv=/\s*%%.*\n/gm,Gv=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var n=new RegExp("[%]{2}(?![{]".concat(Wv.source,")(?=[}][%]{2}).*\n"),"ig");t=t.trim().replace(n,"").replace(/'/gm,'"'),o.debug("Detecting diagram directive".concat(null!==e?" type:"+e:""," based on the text:").concat(t));for(var r,i=[];null!==(r=Hv.exec(t));)if(r.index===Hv.lastIndex&&Hv.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){var a=r[1]?r[1]:r[2],s=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:a,args:s})}return 0===i.length&&i.push({type:t,args:null}),1===i.length?i[0]:i}catch(n){return o.error("ERROR: ".concat(n.message," - Unable to parse directive\n ").concat(null!==e?" type:"+e:""," based on the text:").concat(t)),{type:null,args:null}}},Xv=function(t,e){return(t=t.replace(Hv,"").replace(Vv,"\n")).match(/^\s*sequenceDiagram/)?"sequence":t.match(/^\s*gantt/)?"gantt":t.match(/^\s*classDiagram-v2/)?"classDiagram":t.match(/^\s*classDiagram/)?e&&e.class&&"dagre-wrapper"===e.class.defaultRenderer?"classDiagram":"class":t.match(/^\s*stateDiagram-v2/)?"stateDiagram":t.match(/^\s*stateDiagram/)?e&&e.class&&"dagre-wrapper"===e.state.defaultRenderer?"stateDiagram":"state":t.match(/^\s*gitGraph/)?"gitGraph":t.match(/^\s*flowchart/)?"flowchart-v2":t.match(/^\s*info/)?"info":t.match(/^\s*pie/)?"pie":t.match(/^\s*erDiagram/)?"er":t.match(/^\s*journey/)?"journey":t.match(/^\s*requirement/)||t.match(/^\s*requirementDiagram/)?"requirement":e&&e.flowchart&&"dagre-wrapper"===e.flowchart.defaultRenderer?"flowchart-v2":"flowchart"},Zv=function(t,e){var n={};return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=e?e.apply(Rv,i):i[0];if(o in n)return n[o];var s=t.apply(void 0,i);return n[o]=s,s}},Qv=function(t,e){if(!t)return e;var n="curve".concat(t.charAt(0).toUpperCase()+t.slice(1));return qv[n]||e},Kv=function(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0},Jv=function(t){for(var e="",n="",r=0;r<t.length;r++)void 0!==t[r]&&(t[r].startsWith("color:")||t[r].startsWith("text-align:")?n=n+t[r]+";":e=e+t[r]+";");return{style:e,labelStyle:n}},tb=0,eb=function(){return tb++,"id-"+Math.random().toString(36).substr(2,12)+"-"+tb},nb=function(t){return function(t){for(var e="",n="0123456789abcdef",r=n.length,i=0;i<t;i++)e+=n.charAt(Math.floor(Math.random()*r));return e}(t.length)},rb=function t(e,n,r){var i=Object.assign({depth:2,clobber:!1},r),a=i.depth,o=i.clobber;return Array.isArray(n)&&!Array.isArray(e)?(n.forEach((function(n){return t(e,n,r)})),e):Array.isArray(n)&&Array.isArray(e)?(n.forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),e):void 0===e||a<=0?null!=e&&"object"===Yv(e)&&"object"===Yv(n)?Object.assign(e,n):n:(void 0!==n&&"object"===Yv(e)&&"object"===Yv(n)&&Object.keys(n).forEach((function(r){"object"!==Yv(n[r])||void 0!==e[r]&&"object"!==Yv(e[r])?(o||"object"!==Yv(e[r])&&"object"!==Yv(n[r]))&&(e[r]=n[r]):(void 0===e[r]&&(e[r]=Array.isArray(n[r])?[]:{}),e[r]=t(e[r],n[r],{depth:a-1,clobber:o}))})),e)},ib=function(t,e){var n=e.text.replace($m.lineBreakRegex," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.style("text-anchor",e.anchor),r.style("font-family",e.fontFamily),r.style("font-size",e.fontSize),r.style("font-weight",e.fontWeight),r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.attr("fill",e.fill),i.text(n),r},ab=Zv((function(t,e,n){if(!t)return t;if(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},n),$m.lineBreakRegex.test(t))return t;var r=t.split(" "),i=[],a="";return r.forEach((function(t,o){var s=sb("".concat(t," "),n),c=sb(a,n);if(s>e){var u=ob(t,e,"-",n),l=u.hyphenatedStrings,h=u.remainingWord;i.push.apply(i,[a].concat(jv(l))),a=h}else c+s>=e?(i.push(a),a=t):a=[a,t].filter(Boolean).join(" ");o+1===r.length&&i.push(a)})),i.filter((function(t){return""!==t})).join(n.joinWith)}),(function(t,e,n){return"".concat(t,"-").concat(e,"-").concat(n.fontSize,"-").concat(n.fontWeight,"-").concat(n.fontFamily,"-").concat(n.joinWith)})),ob=Zv((function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);var i=t.split(""),a=[],o="";return i.forEach((function(t,s){var c="".concat(o).concat(t);if(sb(c,r)>=e){var u=s+1,l=i.length===u,h="".concat(c).concat(n);a.push(l?c:h),o=""}else o=c})),{hyphenatedStrings:a,remainingWord:o}}),(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;return"".concat(t,"-").concat(e,"-").concat(n,"-").concat(r.fontSize,"-").concat(r.fontWeight,"-").concat(r.fontFamily)})),sb=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),cb(t,e).width},cb=Zv((function(t,e){var n=e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),r=n.fontSize,i=n.fontFamily,a=n.fontWeight;if(!t)return{width:0,height:0};var o=["sans-serif",i],s=t.split($m.lineBreakRegex),c=[],u=au("body");if(!u.remove)return{width:0,height:0,lineHeight:0};for(var l=u.append("svg"),h=0,f=o;h<f.length;h++){var d,p=f[h],g=0,y={width:0,height:0,lineHeight:0},m=Pv(s);try{for(m.s();!(d=m.n()).done;){var v=d.value,b={x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0};b.text=v;var _=ib(l,b).style("font-size",r).style("font-weight",a).style("font-family",p),x=(_._groups||_)[0][0].getBBox();y.width=Math.round(Math.max(y.width,x.width)),g=Math.round(x.height),y.height+=g,y.lineHeight=Math.round(Math.max(y.lineHeight,g))}}catch(t){m.e(t)}finally{m.f()}c.push(y)}return l.remove(),c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]}),(function(t,e){return"".concat(t,"-").concat(e.fontSize,"-").concat(e.fontWeight,"-").concat(e.fontFamily)})),ub=function(t,e,n){var r=new Map;return r.set("height",t),n?(r.set("width","100%"),r.set("style","max-width: ".concat(e,"px;"))):r.set("width",e),r},lb=function(t,e,n,r){!function(t,e){var n,r=Pv(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;t.attr(i[0],i[1])}}catch(t){r.e(t)}finally{r.f()}}(t,ub(e,n,r))},hb=function t(e){o.debug("directiveSanitizer called with",e),"object"===Yv(e)&&(e.length?e.forEach((function(e){return t(e)})):Object.keys(e).forEach((function(n){o.debug("Checking key",n),0===n.indexOf("__")&&(o.debug("sanitize deleting __ option",n),delete e[n]),n.indexOf("proto")>=0&&(o.debug("sanitize deleting proto option",n),delete e[n]),n.indexOf("constr")>=0&&(o.debug("sanitize deleting constr option",n),delete e[n]),n.indexOf("themeCSS")>=0&&(o.debug("sanitizing themeCss option"),e[n]=fb(e[n])),Ov.indexOf(n)<0?(o.debug("sanitize deleting option",n),delete e[n]):"object"===Yv(e[n])&&(o.debug("sanitize deleting object",n),t(e[n]))})))},fb=function(t){return(t.match(/\{/g)||[]).length!==(t.match(/\}/g)||[]).length?"{ /* ERROR: Unbalanced CSS */ }":t};const db={assignWithDepth:rb,wrapLabel:ab,calculateTextHeight:function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),cb(t,e).height},calculateTextWidth:sb,calculateTextDimensions:cb,calculateSvgSizeAttrs:ub,configureSvgSize:lb,detectInit:function(t,e){var n=Gv(t,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){var i=n.map((function(t){return t.args}));hb(i),r=rb(r,jv(i))}else r=n.args;if(r){var a=Xv(t,e);["config"].forEach((function(t){void 0!==r[t]&&("flowchart-v2"===a&&(a="flowchart"),r[a]=r[t],delete r[t])}))}return r},detectDirective:Gv,detectType:Xv,isSubstringInArray:function(t,e){for(var n=0;n<e.length;n++)if(e[n].match(t))return n;return-1},interpolateToCurve:Qv,calcLabelPosition:function(t){return function(t){var e,n=0;t.forEach((function(t){n+=Kv(t,e),e=t}));var r=n/2,i=void 0;return e=void 0,t.forEach((function(t){if(e&&!i){var n=Kv(t,e);if(n<r)r-=n;else{var a=r/n;a<=0&&(i=e),a>=1&&(i={x:t.x,y:t.y}),a>0&&a<1&&(i={x:(1-a)*e.x+a*t.x,y:(1-a)*e.y+a*t.y})}}e=t})),i}(t)},calcCardinalityPosition:function(t,e,n){var r;o.info("our points",e),e[0]!==n&&(e=e.reverse()),e.forEach((function(t){Kv(t,r),r=t}));var i,a=25;r=void 0,e.forEach((function(t){if(r&&!i){var e=Kv(t,r);if(e<a)a-=e;else{var n=a/e;n<=0&&(i=r),n>=1&&(i={x:t.x,y:t.y}),n>0&&n<1&&(i={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));var s=t?10:5,c=Math.atan2(e[0].y-i.y,e[0].x-i.x),u={x:0,y:0};return u.x=Math.sin(c)*s+(e[0].x+i.x)/2,u.y=-Math.cos(c)*s+(e[0].y+i.y)/2,u},calcTerminalLabelPosition:function(t,e,n){var r,i=JSON.parse(JSON.stringify(n));o.info("our points",i),"start_left"!==e&&"start_right"!==e&&(i=i.reverse()),i.forEach((function(t){Kv(t,r),r=t}));var a,s=25+t;r=void 0,i.forEach((function(t){if(r&&!a){var e=Kv(t,r);if(e<s)s-=e;else{var n=s/e;n<=0&&(a=r),n>=1&&(a={x:t.x,y:t.y}),n>0&&n<1&&(a={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));var c=10+.5*t,u=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return l.x=Math.sin(u)*c+(i[0].x+a.x)/2,l.y=-Math.cos(u)*c+(i[0].y+a.y)/2,"start_left"===e&&(l.x=Math.sin(u+Math.PI)*c+(i[0].x+a.x)/2,l.y=-Math.cos(u+Math.PI)*c+(i[0].y+a.y)/2),"end_right"===e&&(l.x=Math.sin(u-Math.PI)*c+(i[0].x+a.x)/2-5,l.y=-Math.cos(u-Math.PI)*c+(i[0].y+a.y)/2-5),"end_left"===e&&(l.x=Math.sin(u)*c+(i[0].x+a.x)/2-5,l.y=-Math.cos(u)*c+(i[0].y+a.y)/2-5),l},formatUrl:function(t,e){var n=t.trim();if(n)return"loose"!==e.securityLevel?(0,Bm.N)(n):n},getStylesFromArray:Jv,generateId:eb,random:nb,memoize:Zv,runFunc:function(t){for(var e,n=t.split("."),r=n.length-1,i=n[r],a=window,o=0;o<r;o++)if(!(a=a[n[o]]))return;for(var s=arguments.length,c=new Array(s>1?s-1:0),u=1;u<s;u++)c[u-1]=arguments[u];(e=a)[i].apply(e,c)},entityDecode:function(t){return $v=$v||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),$v.innerHTML=t,unescape($v.textContent)},initIdGeneratior:function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.deterministic=e,this.seed=n,this.count=n?n.length:0}var e,n;return e=t,(n=[{key:"next",value:function(){return this.deterministic?this.count++:Date.now()}}])&&Fv(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),directiveSanitizer:hb,sanitizeCss:fb};function pb(t){return pb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pb(t)}var gb,yb=Object.freeze(Iv),mb=rb({},yb),vb=[],bb=rb({},yb),_b=function(t,e){for(var n=rb({},t),r={},i=0;i<e.length;i++){var a=e[i];kb(a),r=rb(r,a)}if(n=rb(n,r),r.theme&&Mv[r.theme]){var o=rb({},gb),s=rb(o.themeVariables||{},r.themeVariables);n.themeVariables=Mv[n.theme].getThemeVariables(s)}return bb=n,n},xb=function(){return rb({},mb)},wb=function(){return rb({},bb)},kb=function t(e){Object.keys(mb.secure).forEach((function(t){void 0!==e[mb.secure[t]]&&(o.debug("Denied attempt to modify a secure key ".concat(mb.secure[t]),e[mb.secure[t]]),delete e[mb.secure[t]])})),Object.keys(e).forEach((function(t){0===t.indexOf("__")&&delete e[t]})),Object.keys(e).forEach((function(n){"string"==typeof e[n]&&(e[n].indexOf("<")>-1||e[n].indexOf(">")>-1||e[n].indexOf("url(data:")>-1)&&delete e[n],"object"===pb(e[n])&&t(e[n])}))},Tb=function(t){t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),vb.push(t),_b(mb,vb)},Cb=function(){_b(mb,vb=[])},Eb="",Sb="",Ab=function(t){return Pm(t,wb())},Mb=function(){Eb="",Sb=""},Nb=function(t){Eb=Ab(t).replace(/^\s+/g,"")},Db=function(){return Eb},Bb=function(t){Sb=Ab(t).replace(/\n\s+/g,"\n")},Lb=function(){return Sb};function Ob(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var Ib="classid-",Rb=[],Fb={},Pb=0,Yb=[],jb=function(t){return $m.sanitizeText(t,wb())},Ub=function(t){var e="",n=t;if(t.indexOf("~")>0){var r=t.split("~");n=r[0],e=$m.sanitizeText(r[1],wb())}return{className:n,type:e}},zb=function(t){var e=Ub(t);void 0===Fb[e.className]&&(Fb[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:Ib+e.className+"-"+Pb},Pb++)},$b=function(t){for(var e=Object.keys(Fb),n=0;n<e.length;n++)if(Fb[e[n]].id===t)return Fb[e[n]].domId},qb=function(t,e){console.log(t,e);var n=Ub(t).className,r=Fb[n];if("string"==typeof e){var i=e.trim();i.startsWith("<<")&&i.endsWith(">>")?r.annotations.push(jb(i.substring(2,i.length-2))):i.indexOf(")")>0?r.methods.push(jb(i)):i&&r.members.push(jb(i))}},Hb=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n=Ib+n),void 0!==Fb[n]&&Fb[n].cssClasses.push(e)}))},Wb=function(t,e,n){var r=wb(),i=t,a=$b(i);if("loose"===r.securityLevel&&void 0!==e&&void 0!==Fb[i]){var o=[];if("string"==typeof n){o=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var s=0;s<o.length;s++){var c=o[s].trim();'"'===c.charAt(0)&&'"'===c.charAt(c.length-1)&&(c=c.substr(1,c.length-2)),o[s]=c}}0===o.length&&o.push(a),Yb.push((function(){var t=document.querySelector('[id="'.concat(a,'"]'));null!==t&&t.addEventListener("click",(function(){var t;db.runFunc.apply(db,[e].concat(function(t){if(Array.isArray(t))return Ob(t)}(t=o)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ob(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ob(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))}),!1)}))}},Vb={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},Gb=function(t){var e=au(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=au("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),au(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=au(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),au(this).classed("hover",!1)}))};Yb.push(Gb);var Xb="TB";const Zb={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},setTitle:Nb,getTitle:Db,getAccDescription:Lb,setAccDescription:Bb,getConfig:function(){return wb().class},addClass:zb,bindFunctions:function(t){Yb.forEach((function(e){e(t)}))},clear:function(){Rb=[],Fb={},(Yb=[]).push(Gb),Mb()},getClass:function(t){return Fb[t]},getClasses:function(){return Fb},addAnnotation:function(t,e){var n=Ub(t).className;Fb[n].annotations.push(e)},getRelations:function(){return Rb},addRelation:function(t){o.debug("Adding relation: "+JSON.stringify(t)),zb(t.id1),zb(t.id2),t.id1=Ub(t.id1).className,t.id2=Ub(t.id2).className,t.relationTitle1=$m.sanitizeText(t.relationTitle1.trim(),wb()),t.relationTitle2=$m.sanitizeText(t.relationTitle2.trim(),wb()),Rb.push(t)},getDirection:function(){return Xb},setDirection:function(t){Xb=t},addMember:qb,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((function(e){return qb(t,e)})))},cleanupLabel:function(t){return":"===t.substring(0,1)?$m.sanitizeText(t.substr(1).trim(),wb()):jb(t.trim())},lineType:{LINE:0,DOTTED_LINE:1},relationType:Vb,setClickEvent:function(t,e,n){t.split(",").forEach((function(t){Wb(t,e,n),Fb[t].haveCallback=!0})),Hb(t,"clickable")},setCssClass:Hb,setLink:function(t,e,n){var r=wb();t.split(",").forEach((function(t){var i=t;t[0].match(/\d/)&&(i=Ib+i),void 0!==Fb[i]&&(Fb[i].link=db.formatUrl(e,r),"sandbox"===r.securityLevel?Fb[i].linkTarget="_top":Fb[i].linkTarget="string"==typeof n?jb(n):"_blank")})),Hb(t,"clickable")},setTooltip:function(t,e){var n=wb();t.split(",").forEach((function(t){void 0!==e&&(Fb[t].tooltip=$m.sanitizeText(e,n))}))},lookUpDomId:$b};var Qb=n(681),Kb=n.n(Qb),Jb=n(8282),t_=n.n(Jb),e_=n(1362),n_=n.n(e_),r_=0,i_=function(t){var e=t.match(/^(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+) *(\*|\$)?$/),n=t.match(/^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/);return e&&!n?a_(e):n?o_(n):s_(t)},a_=function(t){var e="",n="";try{var r=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",a=t[3]?u_(t[3].trim()):"",o=t[4]?t[4].trim():"",s=t[5]?t[5].trim():"";n=r+i+a+" "+o,e=l_(s)}catch(e){n=t}return{displayText:n,cssStyle:e}},o_=function(t){var e="",n="";try{var r=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",a=t[3]?u_(t[3].trim()):"",o=t[4]?t[4].trim():"";n=r+i+"("+a+")"+(t[5]?" : "+u_(t[5]).trim():""),e=l_(o)}catch(e){n=t}return{displayText:n,cssStyle:e}},s_=function(t){var e="",n="",r="",i=t.indexOf("("),a=t.indexOf(")");if(i>1&&a>i&&a<=t.length){var o="",s="",c=t.substring(0,1);c.match(/\w/)?s=t.substring(0,i).trim():(c.match(/\+|-|~|#/)&&(o=c),s=t.substring(1,i).trim());var u=t.substring(i+1,a),l=t.substring(a+1,1);n=l_(l),e=o+s+"("+u_(u.trim())+")",a<"".length&&""!==(r=t.substring(a+2).trim())&&(r=" : "+u_(r))}else e=u_(t);return{displayText:e,cssStyle:n}},c_=function(t,e,n,r){var i=i_(e),a=t.append("tspan").attr("x",r.padding).text(i.displayText);""!==i.cssStyle&&a.attr("style",i.cssStyle),n||a.attr("dy",r.textHeight)},u_=function t(e){var n=e;return-1!=e.indexOf("~")?t(n=(n=n.replace("~","<")).replace("~",">")):n},l_=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}};const h_=function(t,e,n){o.info("Rendering class "+e);var r,i=e.id,a={id:i,label:e.id,width:0,height:0},s=t.append("g").attr("id",$b(i)).attr("class","classGroup");r=e.link?s.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",n.textHeight+n.padding).attr("x",0):s.append("text").attr("y",n.textHeight+n.padding).attr("x",0);var c=!0;e.annotations.forEach((function(t){var e=r.append("tspan").text("«"+t+"»");c||e.attr("dy",n.textHeight),c=!1}));var u=e.id;void 0!==e.type&&""!==e.type&&(u+="<"+e.type+">");var l=r.append("tspan").text(u).attr("class","title");c||l.attr("dy",n.textHeight);var h=r.node().getBBox().height,f=s.append("line").attr("x1",0).attr("y1",n.padding+h+n.dividerMargin/2).attr("y2",n.padding+h+n.dividerMargin/2),d=s.append("text").attr("x",n.padding).attr("y",h+n.dividerMargin+n.textHeight).attr("fill","white").attr("class","classText");c=!0,e.members.forEach((function(t){c_(d,t,c,n),c=!1}));var p=d.node().getBBox(),g=s.append("line").attr("x1",0).attr("y1",n.padding+h+n.dividerMargin+p.height).attr("y2",n.padding+h+n.dividerMargin+p.height),y=s.append("text").attr("x",n.padding).attr("y",h+2*n.dividerMargin+p.height+n.textHeight).attr("fill","white").attr("class","classText");c=!0,e.methods.forEach((function(t){c_(y,t,c,n),c=!1}));var m=s.node().getBBox(),v=" ";e.cssClasses.length>0&&(v+=e.cssClasses.join(" "));var b=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",m.width+2*n.padding).attr("height",m.height+n.padding+.5*n.dividerMargin).attr("class",v).node().getBBox().width;return r.node().childNodes.forEach((function(t){t.setAttribute("x",(b-t.getBBox().width)/2)})),e.tooltip&&r.insert("title").text(e.tooltip),f.attr("x2",b),g.attr("x2",b),a.width=b,a.height=m.height+n.padding+.5*n.dividerMargin,a};function f_(t,e,n){if(void 0!==e.insert){var r=t.getTitle(),i=t.getAccDescription();e.attr("role","img").attr("aria-labelledby","chart-title-"+n+" chart-desc-"+n),e.insert("desc",":first-child").attr("id","chart-desc-"+n).text(i),e.insert("title",":first-child").attr("id","chart-title-"+n).text(r)}}e_.parser.yy=Zb;var d_={},p_={dividerMargin:10,padding:5,textHeight:10},g_=function(t){var e=Object.entries(d_).find((function(e){return e[1].label===t}));if(e)return e[0]};const y_=function(t){Object.keys(t).forEach((function(e){p_[e]=t[e]}))},m_=function(t,e){d_={},e_.parser.yy.clear(),e_.parser.parse(t),o.info("Rendering diagram "+t);var n,r=wb().securityLevel;"sandbox"===r&&(n=au("#i"+e));var i,a=au("sandbox"===r?n.nodes()[0].contentDocument.body:"body"),s=("sandbox"===r?n.nodes()[0].contentDocument:document,a.select("[id='".concat(e,"']")));s.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),(i=s).append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),i.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),i.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),i.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");var c=new(t_().Graph)({multigraph:!0});c.setGraph({isMultiGraph:!0}),c.setDefaultEdgeLabel((function(){return{}}));for(var u=Zb.getClasses(),l=Object.keys(u),h=0;h<l.length;h++){var f=u[l[h]],d=h_(s,f,p_);d_[d.id]=d,c.setNode(d.id,d),o.info("Org height: "+d.height)}Zb.getRelations().forEach((function(t){o.info("tjoho"+g_(t.id1)+g_(t.id2)+JSON.stringify(t)),c.setEdge(g_(t.id1),g_(t.id2),{relation:t},t.title||"DEFAULT")})),Kb().layout(c),c.nodes().forEach((function(t){void 0!==t&&void 0!==c.node(t)&&(o.debug("Node "+t+": "+JSON.stringify(c.node(t))),a.select("#"+$b(t)).attr("transform","translate("+(c.node(t).x-c.node(t).width/2)+","+(c.node(t).y-c.node(t).height/2)+" )"))})),c.edges().forEach((function(t){void 0!==t&&void 0!==c.edge(t)&&(o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(c.edge(t))),function(t,e,n,r){var i=function(t){switch(t){case Vb.AGGREGATION:return"aggregation";case Vb.EXTENSION:return"extension";case Vb.COMPOSITION:return"composition";case Vb.DEPENDENCY:return"dependency"}};e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var a,s,c=e.points,u=Uu().x((function(t){return t.x})).y((function(t){return t.y})).curve(Vu),l=t.append("path").attr("d",u(c)).attr("id","edge"+r_).attr("class","relation"),h="";r.arrowMarkerAbsolute&&(h=(h=(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),1==n.relation.lineType&&l.attr("class","relation dashed-line"),"none"!==n.relation.type1&&l.attr("marker-start","url("+h+"#"+i(n.relation.type1)+"Start)"),"none"!==n.relation.type2&&l.attr("marker-end","url("+h+"#"+i(n.relation.type2)+"End)");var f,d,p,g,y=e.points.length,m=db.calcLabelPosition(e.points);if(a=m.x,s=m.y,y%2!=0&&y>1){var v=db.calcCardinalityPosition("none"!==n.relation.type1,e.points,e.points[0]),b=db.calcCardinalityPosition("none"!==n.relation.type2,e.points,e.points[y-1]);o.debug("cardinality_1_point "+JSON.stringify(v)),o.debug("cardinality_2_point "+JSON.stringify(b)),f=v.x,d=v.y,p=b.x,g=b.y}if(void 0!==n.title){var _=t.append("g").attr("class","classLabel"),x=_.append("text").attr("class","label").attr("x",a).attr("y",s).attr("fill","red").attr("text-anchor","middle").text(n.title);window.label=x;var w=x.node().getBBox();_.insert("rect",":first-child").attr("class","box").attr("x",w.x-r.padding/2).attr("y",w.y-r.padding/2).attr("width",w.width+r.padding).attr("height",w.height+r.padding)}o.info("Rendering relation "+JSON.stringify(n)),void 0!==n.relationTitle1&&"none"!==n.relationTitle1&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",f).attr("y",d).attr("fill","black").attr("font-size","6").text(n.relationTitle1),void 0!==n.relationTitle2&&"none"!==n.relationTitle2&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",p).attr("y",g).attr("fill","black").attr("font-size","6").text(n.relationTitle2),r_++}(s,c.edge(t),c.edge(t).relation,p_))}));var p=s.node().getBBox(),g=p.width+40,y=p.height+40;lb(s,y,g,p_.useMaxWidth);var m="".concat(p.x-20," ").concat(p.y-20," ").concat(g," ").concat(y);o.debug("viewBox ".concat(m)),s.attr("viewBox",m),f_(e_.parser.yy,s,e)};var v_={extension:function(t,e,n){o.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:function(t,e){t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:function(t,e){t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:function(t,e){t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},point:function(t,e){t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:function(t,e){t.append("marker").attr("id",e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:function(t,e){t.append("marker").attr("id",e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:function(t,e){t.append("defs").append("marker").attr("id",e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}};const b_=function(t,e,n,r){e.forEach((function(e){v_[e](t,n,r)}))};function __(t){return __="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},__(t)}const x_=function(t,e,n,r){var i,a,s,c,u,l,h=t||"";if("object"===__(h)&&(h=h[0]),zm(wb().flowchart.htmlLabels))return h=h.replace(/\\n|\n/g,"<br />"),o.info("vertexText"+h),i={isNode:r,label:h.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")})),labelStyle:e.replace("fill:","color:")},s=au(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),c=s.append("xhtml:div"),u=i.label,l=i.isNode?"nodeLabel":"edgeLabel",c.html('<span class="'+l+'" '+(i.labelStyle?'style="'+i.labelStyle+'"':"")+">"+u+"</span>"),(a=i.labelStyle)&&c.attr("style",a),c.style("display","inline-block"),c.style("white-space","nowrap"),c.attr("xmlns","http://www.w3.org/1999/xhtml"),s.node();var f=document.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("style",e.replace("color:","fill:"));var d=[];d="string"==typeof h?h.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(h)?h:[];for(var p=0;p<d.length;p++){var g=document.createElementNS("http://www.w3.org/2000/svg","tspan");g.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),g.setAttribute("dy","1em"),g.setAttribute("x","0"),n?g.setAttribute("class","title-row"):g.setAttribute("class","row"),g.textContent=d[p].trim(),f.appendChild(g)}return f};var w_=function(t,e,n,r){var i;i=n||"node default";var a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),o=a.insert("g").attr("class","label").attr("style",e.labelStyle),s="string"==typeof e.labelText?e.labelText:e.labelText[0],c=o.node().appendChild(x_(Pm(FE(s),wb()),e.labelStyle,!1,r)),u=c.getBBox();if(zm(wb().flowchart.htmlLabels)){var l=c.children[0],h=au(c);u=l.getBoundingClientRect(),h.attr("width",u.width),h.attr("height",u.height)}var f=e.padding/2;return o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),{shapeSvg:a,bbox:u,halfPadding:f,label:o}},k_=function(t,e){var n=e.node().getBBox();t.width=n.width,t.height=n.height};function T_(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}var C_={},E_={},S_={},A_=function(t,e){return o.trace("In isDecendant",e," ",t," = ",E_[e].indexOf(t)>=0),E_[e].indexOf(t)>=0},M_=function t(e,n,r,i){o.warn("Copying children of ",e,"root",i,"data",n.node(e),i);var a=n.children(e)||[];e!==i&&a.push(e),o.warn("Copying (nodes) clusterId",e,"nodes",a),a.forEach((function(a){if(n.children(a).length>0)t(a,n,r,i);else{var s=n.node(a);o.info("cp ",a," to ",i," with parent ",e),r.setNode(a,s),i!==n.parent(a)&&(o.warn("Setting parent",a,n.parent(a)),r.setParent(a,n.parent(a))),e!==i&&a!==e?(o.debug("Setting parent",a,e),r.setParent(a,e)):(o.info("In copy ",e,"root",i,"data",n.node(e),i),o.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));var c=n.edges(a);o.debug("Copying Edges",c),c.forEach((function(t){o.info("Edge",t);var a=n.edge(t.v,t.w,t.name);o.info("Edge data",a,i);try{!function(t,e){return o.info("Decendants of ",e," is ",E_[e]),o.info("Edge is ",t),t.v!==e&&t.w!==e&&(E_[e]?(o.info("Here "),E_[e].indexOf(t.v)>=0||!!A_(t.v,e)||!!A_(t.w,e)||E_[e].indexOf(t.w)>=0):(o.debug("Tilt, ",e,",not in decendants"),!1))}(t,i)?o.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",i," clusterId:",e):(o.info("Copying as ",t.v,t.w,a,t.name),r.setEdge(t.v,t.w,a,t.name),o.info("newGraph edges ",r.edges(),r.edge(r.edges()[0])))}catch(t){o.error(t)}}))}o.debug("Removing node",a),n.removeNode(a)}))},N_=function t(e,n){for(var r=n.children(e),i=[].concat(r),a=0;a<r.length;a++)S_[r[a]]=e,i=i.concat(t(r[a],n));return i},D_=function t(e,n){o.trace("Searching",e);var r=n.children(e);if(o.trace("Searching children of id ",e,r),r.length<1)return o.trace("This is a valid node",e),e;for(var i=0;i<r.length;i++){var a=t(r[i],n);if(a)return o.trace("Found replacement for",e," => ",a),a}},B_=function(t){return C_[t]&&C_[t].externalConnections&&C_[t]?C_[t].id:t},L_=function(t,e){!t||e>10?o.debug("Opting out, no graph "):(o.debug("Opting in, graph "),t.nodes().forEach((function(e){t.children(e).length>0&&(o.warn("Cluster identified",e," Replacement id in edges: ",D_(e,t)),E_[e]=N_(e,t),C_[e]={id:D_(e,t),clusterData:t.node(e)})})),t.nodes().forEach((function(e){var n=t.children(e),r=t.edges();n.length>0?(o.debug("Cluster identified",e,E_),r.forEach((function(t){t.v!==e&&t.w!==e&&A_(t.v,e)^A_(t.w,e)&&(o.warn("Edge: ",t," leaves cluster ",e),o.warn("Decendants of XXX ",e,": ",E_[e]),C_[e].externalConnections=!0)}))):o.debug("Not a cluster ",e,E_)})),t.edges().forEach((function(e){var n=t.edge(e);o.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),o.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));var r=e.v,i=e.w;o.warn("Fix XXX",C_,"ids:",e.v,e.w,"Translateing: ",C_[e.v]," --- ",C_[e.w]),(C_[e.v]||C_[e.w])&&(o.warn("Fixing and trixing - removing XXX",e.v,e.w,e.name),r=B_(e.v),i=B_(e.w),t.removeEdge(e.v,e.w,e.name),r!==e.v&&(n.fromCluster=e.v),i!==e.w&&(n.toCluster=e.w),o.warn("Fix Replacing with XXX",r,i,e.name),t.setEdge(r,i,n,e.name))})),o.warn("Adjusted Graph",t_().json.write(t)),O_(t,0),o.trace(C_))},O_=function t(e,n){if(o.warn("extractor - ",n,t_().json.write(e),e.children("D")),n>10)o.error("Bailing out");else{for(var r=e.nodes(),i=!1,a=0;a<r.length;a++){var s=r[a],c=e.children(s);i=i||c.length>0}if(i){o.debug("Nodes = ",r,n);for(var u=0;u<r.length;u++){var l=r[u];if(o.debug("Extracting node",l,C_,C_[l]&&!C_[l].externalConnections,!e.parent(l),e.node(l),e.children("D")," Depth ",n),C_[l])if(!C_[l].externalConnections&&e.children(l)&&e.children(l).length>0){o.warn("Cluster without external connections, without a parent and with children",l,n);var h="TB"===e.graph().rankdir?"LR":"TB";C_[l]&&C_[l].clusterData&&C_[l].clusterData.dir&&(h=C_[l].clusterData.dir,o.warn("Fixing dir",C_[l].clusterData.dir,h));var f=new(t_().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:h,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));o.warn("Old graph before copy",t_().json.write(e)),M_(l,e,f,l),e.setNode(l,{clusterNode:!0,id:l,clusterData:C_[l].clusterData,labelText:C_[l].labelText,graph:f}),o.warn("New graph after copy node: (",l,")",t_().json.write(f)),o.debug("Old graph after copy",t_().json.write(e))}else o.warn("Cluster ** ",l," **not meeting the criteria !externalConnections:",!C_[l].externalConnections," no parent: ",!e.parent(l)," children ",e.children(l)&&e.children(l).length>0,e.children("D"),n),o.debug(C_);else o.debug("Not a cluster",l,n)}r=e.nodes(),o.warn("New list of nodes",r);for(var d=0;d<r.length;d++){var p=r[d],g=e.node(p);o.warn(" Now next level",p,g),g.clusterNode&&t(g.graph,n+1)}}else o.debug("Done, no node has children",e.nodes())}},I_=function t(e,n){if(0===n.length)return[];var r=Object.assign(n);return n.forEach((function(n){var i=e.children(n),a=t(e,i);r=r.concat(a)})),r},R_=function(t){return I_(t,t.children())},F_=n(3841);const P_=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),u=Math.abs(e*n*o/c);r.x<i&&(u=-u);var l=Math.abs(e*n*s/c);return r.y<a&&(l=-l),{x:i+u,y:a+l}};function Y_(t,e){return t*e>0}const j_=function(t,e,n,r){var i,a,o,s,c,u,l,h,f,d,p,g,y;if(i=e.y-t.y,o=t.x-e.x,c=e.x*t.y-t.x*e.y,f=i*n.x+o*n.y+c,d=i*r.x+o*r.y+c,!(0!==f&&0!==d&&Y_(f,d)||(a=r.y-n.y,s=n.x-r.x,u=r.x*n.y-n.x*r.y,l=a*t.x+s*t.y+u,h=a*e.x+s*e.y+u,0!==l&&0!==h&&Y_(l,h)||0==(p=i*s-a*o))))return g=Math.abs(p/2),{x:(y=o*u-s*c)<0?(y-g)/p:(y+g)/p,y:(y=a*c-i*u)<0?(y-g)/p:(y+g)/p}},U_=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;return Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=0===s?0:u*o/s,r=u):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o),{x:i+n,y:a+r}},z_=(n.n(F_)(),function(t,e,n){return P_(t,e,e,n)}),$_=function(t,e,n){var r=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)})):(o=Math.min(o,e.x),s=Math.min(s,e.y));for(var c=r-t.width/2-o,u=i-t.height/2-s,l=0;l<e.length;l++){var h=e[l],f=e[l<e.length-1?l+1:0],d=j_(t,n,{x:c+h.x,y:u+h.y},{x:c+f.x,y:u+f.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1})),a[0]):t},q_=U_;function H_(t){return H_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},H_(t)}var W_=function(t,e,n){var r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,a=10;"LR"===n&&(i=10,a=70);var o=r.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return k_(e,o),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return q_(e,t)},r},V_={question:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding+(i.height+e.padding),s=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];o.info("Question main (Circle)");var c=T_(r,a,a,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return o.warn("Intersect called"),$_(e,s,t)},r},rect:function(t,e){var n=w_(t,e,"node "+e.classes,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;o.trace("Classes = ",e.classes);var s=r.insert("rect",":first-child"),c=i.width+e.padding,u=i.height+e.padding;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",c).attr("height",u),e.props){var l=new Set(Object.keys(e.props));e.props.borders&&(function(t,e,n,r){var i=[],a=function(t){i.push(t),i.push(0)},s=function(t){i.push(0),i.push(t)};e.includes("t")?(o.debug("add top border"),a(n)):s(n),e.includes("r")?(o.debug("add right border"),a(r)):s(r),e.includes("b")?(o.debug("add bottom border"),a(n)):s(n),e.includes("l")?(o.debug("add left border"),a(r)):s(r),t.attr("stroke-dasharray",i.join(" "))}(s,e.props.borders,c,u),l.delete("borders")),l.forEach((function(t){o.warn("Unknown node property ".concat(t))}))}return k_(e,s),e.intersect=function(t){return q_(e,t)},r},rectWithTitle:function(t,e){var n;n=e.classes?"node "+e.classes:"node default";var r,i=t.insert("g").attr("class",n).attr("id",e.domId||e.id),a=i.insert("rect",":first-child"),s=i.insert("line"),c=i.insert("g").attr("class","label"),u=e.labelText.flat?e.labelText.flat():e.labelText;r="object"===H_(u)?u[0]:u,o.info("Label text abc79",r,u,"object"===H_(u));var l=c.node().appendChild(x_(r,e.labelStyle,!0,!0)),h={width:0,height:0};if(zm(wb().flowchart.htmlLabels)){var f=l.children[0],d=au(l);h=f.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}o.info("Text 2",u);var p=u.slice(1,u.length),g=l.getBBox(),y=c.node().appendChild(x_(p.join?p.join("<br/>"):p,e.labelStyle,!0,!0));if(zm(wb().flowchart.htmlLabels)){var m=y.children[0],v=au(y);h=m.getBoundingClientRect(),v.attr("width",h.width),v.attr("height",h.height)}var b=e.padding/2;return au(y).attr("transform","translate( "+(h.width>g.width?0:(g.width-h.width)/2)+", "+(g.height+b+5)+")"),au(l).attr("transform","translate( "+(h.width<g.width?0:-(g.width-h.width)/2)+", 0)"),h=c.node().getBBox(),c.attr("transform","translate("+-h.width/2+", "+(-h.height/2-b+3)+")"),a.attr("class","outer title-state").attr("x",-h.width/2-b).attr("y",-h.height/2-b).attr("width",h.width+e.padding).attr("height",h.height+e.padding),s.attr("class","divider").attr("x1",-h.width/2-b).attr("x2",h.width/2+b).attr("y1",-h.height/2-b+g.height+b).attr("y2",-h.height/2-b+g.height+b),k_(e,a),e.intersect=function(t){return q_(e,t)},i},choice:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);return n.insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map((function(t){return t.x+","+t.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return z_(e,14,t)},n},circle:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding,s=r.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),o.info("Circle main"),k_(e,s),e.intersect=function(t){return o.info("Circle intersect",e,i.width/2+a,t),z_(e,i.width/2+a,t)},r},doublecircle:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding,s=r.insert("g",":first-child"),c=s.insert("circle"),u=s.insert("circle");return c.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+a+5).attr("width",i.width+e.padding+10).attr("height",i.height+e.padding+10),u.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),o.info("DoubleCircle main"),k_(e,c),e.intersect=function(t){return o.info("DoubleCircle intersect",e,i.width/2+a+5,t),z_(e,i.width/2+a+5,t)},r},stadium:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.height+e.padding,o=i.width+a/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",a/2).attr("ry",a/2).attr("x",-o/2).attr("y",-a/2).attr("width",o).attr("height",a);return k_(e,s),e.intersect=function(t){return q_(e,t)},r},hexagon:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.height+e.padding,o=a/4,s=i.width+2*o+e.padding,c=[{x:o,y:0},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}],u=T_(r,s,a,c);return u.attr("style",e.style),k_(e,u),e.intersect=function(t){return $_(e,c,t)},r},rect_left_inv_arrow:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-o/2,y:0},{x:a,y:0},{x:a,y:-o},{x:-o/2,y:-o},{x:0,y:-o/2}];return T_(r,a,o,s).attr("style",e.style),e.width=a+o,e.height=o,e.intersect=function(t){return $_(e,s,t)},r},lean_right:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-2*o/6,y:0},{x:a-o/6,y:0},{x:a+2*o/6,y:-o},{x:o/6,y:-o}],c=T_(r,a,o,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return $_(e,s,t)},r},lean_left:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:2*o/6,y:0},{x:a+o/6,y:0},{x:a-2*o/6,y:-o},{x:-o/6,y:-o}],c=T_(r,a,o,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return $_(e,s,t)},r},trapezoid:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:-2*o/6,y:0},{x:a+2*o/6,y:0},{x:a-o/6,y:-o},{x:o/6,y:-o}],c=T_(r,a,o,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return $_(e,s,t)},r},inv_trapezoid:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:o/6,y:0},{x:a-o/6,y:0},{x:a+2*o/6,y:-o},{x:-2*o/6,y:-o}],c=T_(r,a,o,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return $_(e,s,t)},r},rect_right_inv_arrow:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:0,y:0},{x:a+o/2,y:0},{x:a,y:-o/2},{x:a+o/2,y:-o},{x:0,y:-o}],c=T_(r,a,o,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return $_(e,s,t)},r},cylinder:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=a/2,s=o/(2.5+a/50),c=i.height+s+e.padding,u="M 0,"+s+" a "+o+","+s+" 0,0,0 "+a+" 0 a "+o+","+s+" 0,0,0 "+-a+" 0 l 0,"+c+" a "+o+","+s+" 0,0,0 "+a+" 0 l 0,"+-c,l=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",u).attr("transform","translate("+-a/2+","+-(c/2+s)+")");return k_(e,l),e.intersect=function(t){var n=q_(e,t),r=n.x-e.x;if(0!=o&&(Math.abs(r)<e.width/2||Math.abs(r)==e.width/2&&Math.abs(n.y-e.y)>e.height/2-s)){var i=s*s*(1-r*r/(o*o));0!=i&&(i=Math.sqrt(i)),i=s-i,t.y-e.y>0&&(i=-i),n.y+=i}return n},r},start:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),k_(e,r),e.intersect=function(t){return z_(e,7,t)},n},end:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=n.insert("circle",":first-child"),i=n.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),k_(e,i),e.intersect=function(t){return z_(e,7,t)},n},note:function(t,e){var n=w_(t,e,"node "+e.classes,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;o.info("Classes = ",e.classes);var s=r.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),k_(e,s),e.intersect=function(t){return q_(e,t)},r},subroutine:function(t,e){var n=w_(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=[{x:0,y:0},{x:a,y:0},{x:a,y:-o},{x:0,y:-o},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-o},{x:-8,y:-o},{x:-8,y:0}],c=T_(r,a,o,s);return c.attr("style",e.style),k_(e,c),e.intersect=function(t){return $_(e,s,t)},r},fork:W_,join:W_,class_box:function(t,e){var n,r=e.padding/2;n=e.classes?"node "+e.classes:"node default";var i=t.insert("g").attr("class",n).attr("id",e.domId||e.id),a=i.insert("rect",":first-child"),o=i.insert("line"),s=i.insert("line"),c=0,u=4,l=i.insert("g").attr("class","label"),h=0,f=e.classData.annotations&&e.classData.annotations[0],d=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",p=l.node().appendChild(x_(d,e.labelStyle,!0,!0)),g=p.getBBox();if(zm(wb().flowchart.htmlLabels)){var y=p.children[0],m=au(p);g=y.getBoundingClientRect(),m.attr("width",g.width),m.attr("height",g.height)}e.classData.annotations[0]&&(u+=g.height+4,c+=g.width);var v=e.classData.id;void 0!==e.classData.type&&""!==e.classData.type&&(wb().flowchart.htmlLabels?v+="&lt;"+e.classData.type+"&gt;":v+="<"+e.classData.type+">");var b=l.node().appendChild(x_(v,e.labelStyle,!0,!0));au(b).attr("class","classTitle");var _=b.getBBox();if(zm(wb().flowchart.htmlLabels)){var x=b.children[0],w=au(b);_=x.getBoundingClientRect(),w.attr("width",_.width),w.attr("height",_.height)}u+=_.height+4,_.width>c&&(c=_.width);var k=[];e.classData.members.forEach((function(t){var n=i_(t),r=n.displayText;wb().flowchart.htmlLabels&&(r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"));var i=l.node().appendChild(x_(r,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0)),a=i.getBBox();if(zm(wb().flowchart.htmlLabels)){var o=i.children[0],s=au(i);a=o.getBoundingClientRect(),s.attr("width",a.width),s.attr("height",a.height)}a.width>c&&(c=a.width),u+=a.height+4,k.push(i)})),u+=8;var T=[];if(e.classData.methods.forEach((function(t){var n=i_(t),r=n.displayText;wb().flowchart.htmlLabels&&(r=r.replace(/</g,"&lt;").replace(/>/g,"&gt;"));var i=l.node().appendChild(x_(r,n.cssStyle?n.cssStyle:e.labelStyle,!0,!0)),a=i.getBBox();if(zm(wb().flowchart.htmlLabels)){var o=i.children[0],s=au(i);a=o.getBoundingClientRect(),s.attr("width",a.width),s.attr("height",a.height)}a.width>c&&(c=a.width),u+=a.height+4,T.push(i)})),u+=8,f){var C=(c-g.width)/2;au(p).attr("transform","translate( "+(-1*c/2+C)+", "+-1*u/2+")"),h=g.height+4}var E=(c-_.width)/2;return au(b).attr("transform","translate( "+(-1*c/2+E)+", "+(-1*u/2+h)+")"),h+=_.height+4,o.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-u/2-r+8+h).attr("y2",-u/2-r+8+h),h+=8,k.forEach((function(t){au(t).attr("transform","translate( "+-c/2+", "+(-1*u/2+h+4)+")"),h+=_.height+4})),h+=8,s.attr("class","divider").attr("x1",-c/2-r).attr("x2",c/2+r).attr("y1",-u/2-r+8+h).attr("y2",-u/2-r+8+h),h+=8,T.forEach((function(t){au(t).attr("transform","translate( "+-c/2+", "+(-1*u/2+h)+")"),h+=_.height+4})),a.attr("class","outer title-state").attr("x",-c/2-r).attr("y",-u/2-r).attr("width",c+e.padding).attr("height",u+e.padding),k_(e,a),e.intersect=function(t){return q_(e,t)},i}},G_={},X_=function(t){var e=G_[t.id];o.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");var n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},Z_={rect:function(t,e){o.trace("Creating subgraph rect for ",e.id,e);var n=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),a=i.node().appendChild(x_(e.labelText,e.labelStyle,void 0,!0)),s=a.getBBox();if(zm(wb().flowchart.htmlLabels)){var c=a.children[0],u=au(a);s=c.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}var l=0*e.padding,h=l/2,f=e.width<=s.width+l?s.width+l:e.width;e.width<=s.width+l?e.diff=(s.width-e.width)/2:e.diff=-e.padding/2,o.trace("Data ",e,JSON.stringify(e)),r.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-f/2).attr("y",e.y-e.height/2-h).attr("width",f).attr("height",e.height+l),i.attr("transform","translate("+(e.x-s.width/2)+", "+(e.y-e.height/2+e.padding/3)+")");var d=r.node().getBBox();return e.width=d.width,e.height=d.height,e.intersect=function(t){return U_(e,t)},n},roundedWithTitle:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),a=n.append("rect"),o=i.node().appendChild(x_(e.labelText,e.labelStyle,void 0,!0)),s=o.getBBox();if(zm(wb().flowchart.htmlLabels)){var c=o.children[0],u=au(o);s=c.getBoundingClientRect(),u.attr("width",s.width),u.attr("height",s.height)}s=o.getBBox();var l=0*e.padding,h=l/2,f=e.width<=s.width+e.padding?s.width+e.padding:e.width;e.width<=s.width+e.padding?e.diff=(s.width+0*e.padding-e.width)/2:e.diff=-e.padding/2,r.attr("class","outer").attr("x",e.x-f/2-h).attr("y",e.y-e.height/2-h).attr("width",f+l).attr("height",e.height+l),a.attr("class","inner").attr("x",e.x-f/2-h).attr("y",e.y-e.height/2-h+s.height-1).attr("width",f+l).attr("height",e.height+l-s.height-3),i.attr("transform","translate("+(e.x-s.width/2)+", "+(e.y-e.height/2-e.padding/3+(zm(wb().flowchart.htmlLabels)?5:3))+")");var d=r.node().getBBox();return e.height=d.height,e.intersect=function(t){return U_(e,t)},n},noteGroup:function(t,e){var n=t.insert("g").attr("class","note-cluster").attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return U_(e,t)},n},divider:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("class","divider").attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2).attr("width",e.width+i).attr("height",e.height+i);var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.diff=-e.padding/2,e.intersect=function(t){return U_(e,t)},n}},Q_={},K_={},J_={},tx=function(t,e){var n=x_(e.label,e.labelStyle),r=t.insert("g").attr("class","edgeLabel"),i=r.insert("g").attr("class","label");i.node().appendChild(n);var a,o=n.getBBox();if(zm(wb().flowchart.htmlLabels)){var s=n.children[0],c=au(n);o=s.getBoundingClientRect(),c.attr("width",o.width),c.attr("height",o.height)}if(i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),K_[e.id]=r,e.width=o.width,e.height=o.height,e.startLabelLeft){var u=x_(e.startLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),h=l.insert("g").attr("class","inner");a=h.node().appendChild(u);var f=u.getBBox();h.attr("transform","translate("+-f.width/2+", "+-f.height/2+")"),J_[e.id]||(J_[e.id]={}),J_[e.id].startLeft=l,ex(a,e.startLabelLeft)}if(e.startLabelRight){var d=x_(e.startLabelRight,e.labelStyle),p=t.insert("g").attr("class","edgeTerminals"),g=p.insert("g").attr("class","inner");a=p.node().appendChild(d),g.node().appendChild(d);var y=d.getBBox();g.attr("transform","translate("+-y.width/2+", "+-y.height/2+")"),J_[e.id]||(J_[e.id]={}),J_[e.id].startRight=p,ex(a,e.startLabelRight)}if(e.endLabelLeft){var m=x_(e.endLabelLeft,e.labelStyle),v=t.insert("g").attr("class","edgeTerminals"),b=v.insert("g").attr("class","inner");a=b.node().appendChild(m);var _=m.getBBox();b.attr("transform","translate("+-_.width/2+", "+-_.height/2+")"),v.node().appendChild(m),J_[e.id]||(J_[e.id]={}),J_[e.id].endLeft=v,ex(a,e.endLabelLeft)}if(e.endLabelRight){var x=x_(e.endLabelRight,e.labelStyle),w=t.insert("g").attr("class","edgeTerminals"),k=w.insert("g").attr("class","inner");a=k.node().appendChild(x);var T=x.getBBox();k.attr("transform","translate("+-T.width/2+", "+-T.height/2+")"),w.node().appendChild(x),J_[e.id]||(J_[e.id]={}),J_[e.id].endRight=w,ex(a,e.endLabelRight)}};function ex(t,e){wb().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}var nx=function(t,e){o.info("Moving label abc78 ",t.id,t.label,K_[t.id]);var n=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){var r=K_[t.id],i=t.x,a=t.y;if(n){var s=db.calcLabelPosition(n);o.info("Moving label from (",i,",",a,") to (",s.x,",",s.y,") abc78")}r.attr("transform","translate("+i+", "+a+")")}if(t.startLabelLeft){var c=J_[t.id].startLeft,u=t.x,l=t.y;if(n){var h=db.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);u=h.x,l=h.y}c.attr("transform","translate("+u+", "+l+")")}if(t.startLabelRight){var f=J_[t.id].startRight,d=t.x,p=t.y;if(n){var g=db.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);d=g.x,p=g.y}f.attr("transform","translate("+d+", "+p+")")}if(t.endLabelLeft){var y=J_[t.id].endLeft,m=t.x,v=t.y;if(n){var b=db.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);m=b.x,v=b.y}y.attr("transform","translate("+m+", "+v+")")}if(t.endLabelRight){var _=J_[t.id].endRight,x=t.x,w=t.y;if(n){var k=db.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);x=k.x,w=k.y}_.attr("transform","translate("+x+", "+w+")")}},rx=function(t,e){o.warn("abc88 cutPathAtIntersect",t,e);var n=[],r=t[0],i=!1;return t.forEach((function(t){if(o.info("abc88 checking point",t,e),function(t,e){var n=t.x,r=t.y,i=Math.abs(e.x-n),a=Math.abs(e.y-r),o=t.width/2,s=t.height/2;return i>=o||a>=s}(e,t)||i)o.warn("abc88 outside",t,r),r=t,i||n.push(t);else{var a=function(t,e,n){o.warn("intersection calc abc89:\n outsidePoint: ".concat(JSON.stringify(e),"\n insidePoint : ").concat(JSON.stringify(n),"\n node : x:").concat(t.x," y:").concat(t.y," w:").concat(t.width," h:").concat(t.height));var r=t.x,i=t.y,a=Math.abs(r-n.x),s=t.width/2,c=n.x<e.x?s-a:s+a,u=t.height/2,l=Math.abs(e.y-n.y),h=Math.abs(e.x-n.x);if(Math.abs(i-e.y)*s>Math.abs(r-e.x)*u){var f=n.y<e.y?e.y-u-i:i-u-e.y;c=h*f/l;var d={x:n.x<e.x?n.x+c:n.x-h+c,y:n.y<e.y?n.y+l-f:n.y-l+f};return 0===c&&(d.x=e.x,d.y=e.y),0===h&&(d.x=e.x),0===l&&(d.y=e.y),o.warn("abc89 topp/bott calc, Q ".concat(l,", q ").concat(f,", R ").concat(h,", r ").concat(c),d),d}var p=l*(c=n.x<e.x?e.x-s-r:r-s-e.x)/h,g=n.x<e.x?n.x+h-c:n.x-h+c,y=n.y<e.y?n.y+p:n.y-p;return o.warn("sides calc abc89, Q ".concat(l,", q ").concat(p,", R ").concat(h,", r ").concat(c),{_x:g,_y:y}),0===c&&(g=e.x,y=e.y),0===h&&(g=e.x),0===l&&(y=e.y),{x:g,y}}(e,r,t);o.warn("abc88 inside",t,r,a),o.warn("abc88 intersection",a);var s=!1;n.forEach((function(t){s=s||t.x===a.x&&t.y===a.y})),n.find((function(t){return t.x===a.x&&t.y===a.y}))?o.warn("abc88 no intersect",a,n):n.push(a),i=!0}})),o.warn("abc88 returning points",n),n},ix=function t(e,n,r,i){o.info("Graph in recursive render: XXX",t_().json.write(n),i);var a=n.graph().rankdir;o.trace("Dir in recursive render - dir:",a);var s=e.insert("g").attr("class","root");n.nodes()?o.info("Recursive render XXX",n.nodes()):o.info("No nodes found for",n),n.edges().length>0&&o.trace("Recursive edges",n.edge(n.edges()[0]));var c=s.insert("g").attr("class","clusters"),u=s.insert("g").attr("class","edgePaths"),l=s.insert("g").attr("class","edgeLabels"),h=s.insert("g").attr("class","nodes");n.nodes().forEach((function(e){var s=n.node(e);if(void 0!==i){var c=JSON.parse(JSON.stringify(i.clusterData));o.info("Setting data for cluster XXX (",e,") ",c,i),n.setNode(i.id,c),n.parent(e)||(o.trace("Setting parent",e,i.id),n.setParent(e,i.id,c))}if(o.info("(Insert) Node XXX"+e+": "+JSON.stringify(n.node(e))),s&&s.clusterNode){o.info("Cluster identified",e,s.width,n.node(e));var u=t(h,s.graph,r,n.node(e)),l=u.elem;k_(s,l),s.diff=u.diff||0,o.info("Node bounds (abc123)",e,s,s.width,s.x,s.y),function(t,e){G_[e.id]=t}(l,s),o.warn("Recursive render complete ",l,s)}else n.children(e).length>0?(o.info("Cluster - the non recursive path XXX",e,s.id,s,n),o.info(D_(s.id,n)),C_[s.id]={id:D_(s.id,n),node:s}):(o.info("Node - the non recursive path",e,s.id,s),function(t,e,n){var r,i,a;e.link?("sandbox"===wb().securityLevel?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),i=V_[e.shape](r,e,n)):r=i=V_[e.shape](t,e,n),e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),G_[e.id]=r,e.haveCallback&&G_[e.id].attr("class",G_[e.id].attr("class")+" clickable")}(h,n.node(e),a))})),n.edges().forEach((function(t){var e=n.edge(t.v,t.w,t.name);o.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),o.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(n.edge(t))),o.info("Fix",C_,"ids:",t.v,t.w,"Translateing: ",C_[t.v],C_[t.w]),tx(l,e)})),n.edges().forEach((function(t){o.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))})),o.info("#############################################"),o.info("### Layout ###"),o.info("#############################################"),o.info(n),Kb().layout(n),o.info("Graph after layout:",t_().json.write(n));var f=0;return R_(n).forEach((function(t){var e=n.node(t);o.info("Position "+t+": "+JSON.stringify(n.node(t))),o.info("Position "+t+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e&&e.clusterNode?X_(e):n.children(t).length>0?(function(t,e){o.trace("Inserting cluster");var n=e.shape||"rect";Q_[e.id]=Z_[n](t,e)}(c,e),C_[e.id].node=e):X_(e)})),n.edges().forEach((function(t){var e=n.edge(t);o.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e),e);var i=function(t,e,n,r,i,a){var s=n.points,c=!1,u=a.node(e.v),l=a.node(e.w);o.info("abc88 InsertEdge: ",n),l.intersect&&u.intersect&&((s=s.slice(1,n.points.length-1)).unshift(u.intersect(s[0])),o.info("Last point",s[s.length-1],l,l.intersect(s[s.length-1])),s.push(l.intersect(s[s.length-1]))),n.toCluster&&(o.info("to cluster abc88",r[n.toCluster]),s=rx(n.points,r[n.toCluster].node),c=!0),n.fromCluster&&(o.info("from cluster abc88",r[n.fromCluster]),s=rx(s.reverse(),r[n.fromCluster].node).reverse(),c=!0);var h,f=s.filter((function(t){return!Number.isNaN(t.y)}));h=("graph"===i||"flowchart"===i)&&n.curve||Vu;var d,p=Uu().x((function(t){return t.x})).y((function(t){return t.y})).curve(h);switch(n.thickness){case"normal":d="edge-thickness-normal";break;case"thick":d="edge-thickness-thick";break;default:d=""}switch(n.pattern){case"solid":d+=" edge-pattern-solid";break;case"dotted":d+=" edge-pattern-dotted";break;case"dashed":d+=" edge-pattern-dashed"}var g=t.append("path").attr("d",p(f)).attr("id",n.id).attr("class"," "+d+(n.classes?" "+n.classes:"")).attr("style",n.style),y="";switch(wb().state.arrowMarkerAbsolute&&(y=(y=(y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),o.info("arrowTypeStart",n.arrowTypeStart),o.info("arrowTypeEnd",n.arrowTypeEnd),n.arrowTypeStart){case"arrow_cross":g.attr("marker-start","url("+y+"#"+i+"-crossStart)");break;case"arrow_point":g.attr("marker-start","url("+y+"#"+i+"-pointStart)");break;case"arrow_barb":g.attr("marker-start","url("+y+"#"+i+"-barbStart)");break;case"arrow_circle":g.attr("marker-start","url("+y+"#"+i+"-circleStart)");break;case"aggregation":g.attr("marker-start","url("+y+"#"+i+"-aggregationStart)");break;case"extension":g.attr("marker-start","url("+y+"#"+i+"-extensionStart)");break;case"composition":g.attr("marker-start","url("+y+"#"+i+"-compositionStart)");break;case"dependency":g.attr("marker-start","url("+y+"#"+i+"-dependencyStart)")}switch(n.arrowTypeEnd){case"arrow_cross":g.attr("marker-end","url("+y+"#"+i+"-crossEnd)");break;case"arrow_point":g.attr("marker-end","url("+y+"#"+i+"-pointEnd)");break;case"arrow_barb":g.attr("marker-end","url("+y+"#"+i+"-barbEnd)");break;case"arrow_circle":g.attr("marker-end","url("+y+"#"+i+"-circleEnd)");break;case"aggregation":g.attr("marker-end","url("+y+"#"+i+"-aggregationEnd)");break;case"extension":g.attr("marker-end","url("+y+"#"+i+"-extensionEnd)");break;case"composition":g.attr("marker-end","url("+y+"#"+i+"-compositionEnd)");break;case"dependency":g.attr("marker-end","url("+y+"#"+i+"-dependencyEnd)")}var m={};return c&&(m.updatedPath=s),m.originalPath=n.points,m}(u,t,e,C_,r,n);nx(e,i)})),n.nodes().forEach((function(t){var e=n.node(t);o.info(t,e.type,e.diff),"group"===e.type&&(f=e.diff)})),{elem:s,diff:f}},ax=function(t,e,n,r,i){b_(t,n,r,i),G_={},K_={},J_={},Q_={},E_={},S_={},C_={},o.warn("Graph at first:",t_().json.write(e)),L_(e),o.warn("Graph after:",t_().json.write(e)),ix(t,e,r)};e_.parser.yy=Zb;var ox={dividerMargin:10,padding:5,textHeight:10};function sx(t){var e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;default:e="none"}return e}var cx={},ux=[],lx=function(t){return void 0===cx[t]&&(cx[t]={attributes:[]},o.info("Added new entity :",t)),cx[t]};const hx={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().er},addEntity:lx,addAttributes:function(t,e){var n,r=lx(t);for(n=e.length-1;n>=0;n--)r.attributes.push(e[n]),o.debug("Added attribute ",e[n].attributeName)},getEntities:function(){return cx},addRelationship:function(t,e,n,r){var i={entityA:t,roleA:e,entityB:n,relSpec:r};ux.push(i),o.debug("Added new relationship :",i)},getRelationships:function(){return ux},clear:function(){cx={},ux=[],Mb()},setTitle:Nb,getTitle:Db,setAccDescription:Bb,getAccDescription:Lb};var fx=n(5890),dx=n.n(fx),px={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"};const gx=px;var yx={},mx=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},vx=0;const bx=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)yx[e[n]]=t[e[n]]},_x=function(t,e){o.info("Drawing ER diagram"),hx.clear();var n=dx().parser;n.yy=hx;var r,i=wb().securityLevel;"sandbox"===i&&(r=au("#i"+e));var a=au("sandbox"===i?r.nodes()[0].contentDocument.body:"body");"sandbox"===i?r.nodes()[0].contentDocument:document;try{n.parse(t)}catch(t){o.debug("Parsing failed")}var s,c=a.select("[id='".concat(e,"']"));(function(t,e){var n;t.append("defs").append("marker").attr("id",px.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",px.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",px.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",px.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",px.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",px.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),(n=t.append("defs").append("marker").attr("id",px.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(n=t.append("defs").append("marker").attr("id",px.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")})(c,yx),s=new(t_().Graph)({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:yx.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));var u=function(t,e,n){var r;return Object.keys(e).forEach((function(i){var a=t.append("g").attr("id",i);r=void 0===r?i:r;var o="entity-"+i,s=a.append("text").attr("class","er entityLabel").attr("id",o).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("style","font-family: "+wb().fontFamily+"; font-size: "+yx.fontSize+"px").text(i),c=function(t,e,n){var r=yx.entityPadding/3,i=yx.entityPadding/3,a=.85*yx.fontSize,o=e.node().getBBox(),s=[],c=!1,u=!1,l=0,h=0,f=0,d=0,p=o.height+2*r,g=1;n.forEach((function(t){void 0!==t.attributeKeyType&&(c=!0),void 0!==t.attributeComment&&(u=!0)})),n.forEach((function(n){var i="".concat(e.node().id,"-attr-").concat(g),o=0,y=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-type")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+wb().fontFamily+"; font-size: "+a+"px").text(n.attributeType),m=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-name")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+wb().fontFamily+"; font-size: "+a+"px").text(n.attributeName),v={};v.tn=y,v.nn=m;var b=y.node().getBBox(),_=m.node().getBBox();if(l=Math.max(l,b.width),h=Math.max(h,_.width),o=Math.max(b.height,_.height),c){var x=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-key")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+wb().fontFamily+"; font-size: "+a+"px").text(n.attributeKeyType||"");v.kn=x;var w=x.node().getBBox();f=Math.max(f,w.width),o=Math.max(o,w.height)}if(u){var k=t.append("text").attr("class","er entityLabel").attr("id","".concat(i,"-comment")).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+wb().fontFamily+"; font-size: "+a+"px").text(n.attributeComment||"");v.cn=k;var T=k.node().getBBox();d=Math.max(d,T.width),o=Math.max(o,T.height)}v.height=o,s.push(v),p+=o+2*r,g+=1}));var y=4;c&&(y+=2),u&&(y+=2);var m=l+h+f+d,v={width:Math.max(yx.minEntityWidth,Math.max(o.width+2*yx.entityPadding,m+i*y)),height:n.length>0?p:Math.max(yx.minEntityHeight,o.height+2*yx.entityPadding)};if(n.length>0){var b=Math.max(0,(v.width-m-i*y)/(y/2));e.attr("transform","translate("+v.width/2+","+(r+o.height/2)+")");var _=o.height+2*r,x="attributeBoxOdd";s.forEach((function(e){var n=_+r+e.height/2;e.tn.attr("transform","translate("+i+","+n+")");var a=t.insert("rect","#"+e.tn.node().id).attr("class","er ".concat(x)).attr("fill",yx.fill).attr("fill-opacity","100%").attr("stroke",yx.stroke).attr("x",0).attr("y",_).attr("width",l+2*i+b).attr("height",e.height+2*r),o=parseFloat(a.attr("x"))+parseFloat(a.attr("width"));e.nn.attr("transform","translate("+(o+i)+","+n+")");var s=t.insert("rect","#"+e.nn.node().id).attr("class","er ".concat(x)).attr("fill",yx.fill).attr("fill-opacity","100%").attr("stroke",yx.stroke).attr("x",o).attr("y",_).attr("width",h+2*i+b).attr("height",e.height+2*r),p=parseFloat(s.attr("x"))+parseFloat(s.attr("width"));if(c){e.kn.attr("transform","translate("+(p+i)+","+n+")");var g=t.insert("rect","#"+e.kn.node().id).attr("class","er ".concat(x)).attr("fill",yx.fill).attr("fill-opacity","100%").attr("stroke",yx.stroke).attr("x",p).attr("y",_).attr("width",f+2*i+b).attr("height",e.height+2*r);p=parseFloat(g.attr("x"))+parseFloat(g.attr("width"))}u&&(e.cn.attr("transform","translate("+(p+i)+","+n+")"),t.insert("rect","#"+e.cn.node().id).attr("class","er ".concat(x)).attr("fill",yx.fill).attr("fill-opacity","100%").attr("stroke",yx.stroke).attr("x",p).attr("y",_).attr("width",d+2*i+b).attr("height",e.height+2*r)),_+=e.height+2*r,x="attributeBoxOdd"==x?"attributeBoxEven":"attributeBoxOdd"}))}else v.height=Math.max(yx.minEntityHeight,p),e.attr("transform","translate("+v.width/2+","+v.height/2+")");return v}(a,s,e[i].attributes),u=c.width,l=c.height,h=a.insert("rect","#"+o).attr("class","er entityBox").attr("fill",yx.fill).attr("fill-opacity","100%").attr("stroke",yx.stroke).attr("x",0).attr("y",0).attr("width",u).attr("height",l).node().getBBox();n.setNode(i,{width:h.width,height:h.height,shape:"rect",id:i})})),r}(c,hx.getEntities(),s),l=function(t,e){return t.forEach((function(t){e.setEdge(t.entityA,t.entityB,{relationship:t},mx(t))})),t}(hx.getRelationships(),s);Kb().layout(s),function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&t.select("#"+n).attr("transform","translate("+(e.node(n).x-e.node(n).width/2)+","+(e.node(n).y-e.node(n).height/2)+" )")}))}(c,s),l.forEach((function(t){!function(t,e,n,r){vx++;var i=n.edge(e.entityA,e.entityB,mx(e)),a=Uu().x((function(t){return t.x})).y((function(t){return t.y})).curve(Vu),o=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",a(i.points)).attr("stroke",yx.stroke).attr("fill","none");e.relSpec.relType===hx.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");var s="";switch(yx.arrowMarkerAbsolute&&(s=(s=(s=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e.relSpec.cardA){case hx.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+s+"#"+gx.ZERO_OR_ONE_END+")");break;case hx.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+s+"#"+gx.ZERO_OR_MORE_END+")");break;case hx.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+s+"#"+gx.ONE_OR_MORE_END+")");break;case hx.Cardinality.ONLY_ONE:o.attr("marker-end","url("+s+"#"+gx.ONLY_ONE_END+")")}switch(e.relSpec.cardB){case hx.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+s+"#"+gx.ZERO_OR_ONE_START+")");break;case hx.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+s+"#"+gx.ZERO_OR_MORE_START+")");break;case hx.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+s+"#"+gx.ONE_OR_MORE_START+")");break;case hx.Cardinality.ONLY_ONE:o.attr("marker-start","url("+s+"#"+gx.ONLY_ONE_START+")")}var c=o.node().getTotalLength(),u=o.node().getPointAtLength(.5*c),l="rel"+vx,h=t.append("text").attr("class","er relationshipLabel").attr("id",l).attr("x",u.x).attr("y",u.y).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("style","font-family: "+wb().fontFamily+"; font-size: "+yx.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+l).attr("class","er relationshipLabelBox").attr("x",u.x-h.width/2).attr("y",u.y-h.height/2).attr("width",h.width).attr("height",h.height).attr("fill","white").attr("fill-opacity","85%")}(c,t,s,u)}));var h=yx.diagramPadding,f=c.node().getBBox(),d=f.width+2*h,p=f.height+2*h;lb(c,p,d,yx.useMaxWidth),c.attr("viewBox","".concat(f.x-h," ").concat(f.y-h," ").concat(d," ").concat(p)),f_(n.yy,c,e)};function xx(t){return xx="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xx(t)}function wx(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var kx,Tx,Cx="flowchart-",Ex=0,Sx=wb(),Ax={},Mx=[],Nx=[],Dx=[],Bx={},Lx={},Ox=0,Ix=!0,Rx=[],Fx=function(t){return $m.sanitizeText(t,Sx)},Px=function(t){for(var e=Object.keys(Ax),n=0;n<e.length;n++)if(Ax[e[n]].id===t)return Ax[e[n]].domId;return t},Yx=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:""};void 0!==(r=n.text)&&(i.text=Fx(r.trim()),'"'===i.text[0]&&'"'===i.text[i.text.length-1]&&(i.text=i.text.substring(1,i.text.length-1))),void 0!==n&&(i.type=n.type,i.stroke=n.stroke,i.length=n.length),Mx.push(i)},jx=function(t,e){t.split(",").forEach((function(t){var n=t;void 0!==Ax[n]&&Ax[n].classes.push(e),void 0!==Bx[n]&&Bx[n].classes.push(e)}))},Ux=function(t){var e=au(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=au("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),au(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=au(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),au(this).classed("hover",!1)}))};Rx.push(Ux);var zx=function(t){for(var e=0;e<Dx.length;e++)if(Dx[e].id===t)return e;return-1},$x=-1,qx=[],Hx=function t(e,n){var r=Dx[n].nodes;if(!(($x+=1)>2e3)){if(qx[$x]=n,Dx[n].id===e)return{result:!0,count:0};for(var i=0,a=1;i<r.length;){var o=zx(r[i]);if(o>=0){var s=t(e,o);if(s.result)return{result:!0,count:a+s.count};a+=s.count}i+=1}return{result:!1,count:a}}},Wx=function(t,e){var n=!1;return t.forEach((function(t){t.nodes.indexOf(e)>=0&&(n=!0)})),n},Vx=function(t,e){var n=[];return t.nodes.forEach((function(r,i){Wx(e,r)||n.push(t.nodes[i])})),{nodes:n}};const Gx={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},defaultConfig:function(){return yb.flowchart},setTitle:Nb,getTitle:Db,getAccDescription:Lb,setAccDescription:Bb,addVertex:function(t,e,n,r,i,a){var o,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{},c=t;void 0!==c&&0!==c.trim().length&&(void 0===Ax[c]&&(Ax[c]={id:c,domId:Cx+c+"-"+Ex,styles:[],classes:[]}),Ex++,void 0!==e?(Sx=wb(),'"'===(o=Fx(e.trim()))[0]&&'"'===o[o.length-1]&&(o=o.substring(1,o.length-1)),Ax[c].text=o):void 0===Ax[c].text&&(Ax[c].text=t),void 0!==n&&(Ax[c].type=n),null!=r&&r.forEach((function(t){Ax[c].styles.push(t)})),null!=i&&i.forEach((function(t){Ax[c].classes.push(t)})),void 0!==a&&(Ax[c].dir=a),Ax[c].props=s)},lookUpDomId:Px,addLink:function(t,e,n,r){var i,a;for(i=0;i<t.length;i++)for(a=0;a<e.length;a++)Yx(t[i],e[a],n,r)},updateLinkInterpolate:function(t,e){t.forEach((function(t){"default"===t?Mx.defaultInterpolate=e:Mx[t].interpolate=e}))},updateLink:function(t,e){t.forEach((function(t){"default"===t?Mx.defaultStyle=e:(-1===db.isSubstringInArray("fill",e)&&e.push("fill:none"),Mx[t].style=e)}))},addClass:function(t,e){void 0===Nx[t]&&(Nx[t]={id:t,styles:[],textStyles:[]}),null!=e&&e.forEach((function(e){if(e.match("color")){var n=e.replace("fill","bgFill").replace("color","fill");Nx[t].textStyles.push(n)}Nx[t].styles.push(e)}))},setDirection:function(t){(kx=t).match(/.*</)&&(kx="RL"),kx.match(/.*\^/)&&(kx="BT"),kx.match(/.*>/)&&(kx="LR"),kx.match(/.*v/)&&(kx="TB")},setClass:jx,setTooltip:function(t,e){t.split(",").forEach((function(t){void 0!==e&&(Lx["gen-1"===Tx?Px(t):t]=Fx(e))}))},getTooltip:function(t){return Lx[t]},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){var r=Px(t);if("loose"===wb().securityLevel&&void 0!==e){var i=[];if("string"==typeof n){i=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var a=0;a<i.length;a++){var o=i[a].trim();'"'===o.charAt(0)&&'"'===o.charAt(o.length-1)&&(o=o.substr(1,o.length-2)),i[a]=o}}0===i.length&&i.push(t),void 0!==Ax[t]&&(Ax[t].haveCallback=!0,Rx.push((function(){var t=document.querySelector('[id="'.concat(r,'"]'));null!==t&&t.addEventListener("click",(function(){var t;db.runFunc.apply(db,[e].concat(function(t){if(Array.isArray(t))return wx(t)}(t=i)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return wx(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wx(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))}),!1)})))}}(t,e,n)})),jx(t,"clickable")},setLink:function(t,e,n){t.split(",").forEach((function(t){void 0!==Ax[t]&&(Ax[t].link=db.formatUrl(e,Sx),Ax[t].linkTarget=n)})),jx(t,"clickable")},bindFunctions:function(t){Rx.forEach((function(e){e(t)}))},getDirection:function(){return kx.trim()},getVertices:function(){return Ax},getEdges:function(){return Mx},getClasses:function(){return Nx},clear:function(t){Ax={},Nx={},Mx=[],(Rx=[]).push(Ux),Dx=[],Bx={},Ox=0,Lx=[],Ix=!0,Tx=t||"gen-1",Mb()},setGen:function(t){Tx=t||"gen-1"},defaultStyle:function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},addSubGraph:function(t,e,n){var r=t.trim(),i=n;t===n&&n.match(/\s/)&&(r=void 0);var a=[],s=function(t){var e,n={boolean:{},number:{},string:{}},r=[],i=t.filter((function(t){var i=xx(t);return t.stmt&&"dir"===t.stmt?(e=t.value,!1):""!==t.trim()&&(i in n?!n[i].hasOwnProperty(t)&&(n[i][t]=!0):!(r.indexOf(t)>=0)&&r.push(t))}));return{nodeList:i,dir:e}}(a.concat.apply(a,e)),c=s.nodeList,u=s.dir;if(a=c,"gen-1"===Tx){o.warn("LOOKING UP");for(var l=0;l<a.length;l++)a[l]=Px(a[l])}r=r||"subGraph"+Ox,i=Fx(i=i||""),Ox+=1;var h={id:r,nodes:a,title:i.trim(),classes:[],dir:u};return o.info("Adding",h.id,h.nodes,h.dir),h.nodes=Vx(h,Dx).nodes,Dx.push(h),Bx[r]=h,r},getDepthFirstPos:function(t){return qx[t]},indexNodes:function(){$x=-1,Dx.length>0&&Hx("none",Dx.length-1)},getSubGraphs:function(){return Dx},destructLink:function(t,e){var n,r=function(t){var e=t.trim(),n=e.slice(0,-1),r="arrow_open";switch(e.slice(-1)){case"x":r="arrow_cross","x"===e[0]&&(r="double_"+r,n=n.slice(1));break;case">":r="arrow_point","<"===e[0]&&(r="double_"+r,n=n.slice(1));break;case"o":r="arrow_circle","o"===e[0]&&(r="double_"+r,n=n.slice(1))}var i="normal",a=n.length-1;"="===n[0]&&(i="thick");var o=function(t,e){for(var n=e.length,r=0,i=0;i<n;++i)"."===e[i]&&++r;return r}(0,n);return o&&(i="dotted",a=o),{type:r,stroke:i,length:a}}(t);if(e){if(n=function(t){var e=t.trim(),n="arrow_open";switch(e[0]){case"<":n="arrow_point",e=e.slice(1);break;case"x":n="arrow_cross",e=e.slice(1);break;case"o":n="arrow_circle",e=e.slice(1)}var r="normal";return-1!==e.indexOf("=")&&(r="thick"),-1!==e.indexOf(".")&&(r="dotted"),{type:n,stroke:r}}(e),n.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===n.type)n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return"double_arrow"===n.type&&(n.type="double_arrow_point"),n.length=r.length,n}return r},lex:{firstGraph:function(){return!!Ix&&(Ix=!1,!0)}},exists:Wx,makeUniq:Vx};var Xx=n(3602),Zx=n.n(Xx),Qx=n(4949),Kx=n.n(Qx),Jx=n(8284),tw=n.n(Jx);function ew(t,e,n){var r=.9*(e.width+e.height),i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],a=fw(t,r,r,i);return n.intersect=function(t){return Kx().intersect.polygon(n,i,t)},a}function nw(t,e,n){var r=e.height,i=r/4,a=e.width+2*i,o=[{x:i,y:0},{x:a-i,y:0},{x:a,y:-r/2},{x:a-i,y:-r},{x:i,y:-r},{x:0,y:-r/2}],s=fw(t,a,r,o);return n.intersect=function(t){return Kx().intersect.polygon(n,o,t)},s}function rw(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function iw(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:i/6,y:-i}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function aw(t,e,n){var r=e.width,i=e.height,a=[{x:2*i/6,y:0},{x:r+i/6,y:0},{x:r-2*i/6,y:-i},{x:-i/6,y:-i}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function ow(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r+2*i/6,y:0},{x:r-i/6,y:-i},{x:i/6,y:-i}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function sw(t,e,n){var r=e.width,i=e.height,a=[{x:i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:-2*i/6,y:-i}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function cw(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function uw(t,e,n){var r=e.height,i=e.width+r/4,a=t.insert("rect",":first-child").attr("rx",r/2).attr("ry",r/2).attr("x",-i/2).attr("y",-r/2).attr("width",i).attr("height",r);return n.intersect=function(t){return Kx().intersect.rect(n,t)},a}function lw(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r,y:0},{x:r,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:r+8,y:0},{x:r+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],o=fw(t,r,i,a);return n.intersect=function(t){return Kx().intersect.polygon(n,a,t)},o}function hw(t,e,n){var r=e.width,i=r/2,a=i/(2.5+r/50),o=e.height+a,s="M 0,"+a+" a "+i+","+a+" 0,0,0 "+r+" 0 a "+i+","+a+" 0,0,0 "+-r+" 0 l 0,"+o+" a "+i+","+a+" 0,0,0 "+r+" 0 l 0,"+-o,c=t.attr("label-offset-y",a).insert("path",":first-child").attr("d",s).attr("transform","translate("+-r/2+","+-(o/2+a)+")");return n.intersect=function(t){var e=Kx().intersect.rect(n,t),r=e.x-n.x;if(0!=i&&(Math.abs(r)<n.width/2||Math.abs(r)==n.width/2&&Math.abs(e.y-n.y)>n.height/2-a)){var o=a*a*(1-r*r/(i*i));0!=o&&(o=Math.sqrt(o)),o=a-o,t.y-n.y>0&&(o=-o),e.y+=o}return e},c}function fw(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("transform","translate("+-e/2+","+n/2+")")}const dw=function(t){t.shapes().question=ew,t.shapes().hexagon=nw,t.shapes().stadium=uw,t.shapes().subroutine=lw,t.shapes().cylinder=hw,t.shapes().rect_left_inv_arrow=rw,t.shapes().lean_right=iw,t.shapes().lean_left=aw,t.shapes().trapezoid=ow,t.shapes().inv_trapezoid=sw,t.shapes().rect_right_inv_arrow=cw};var pw={};const gw=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)pw[e[n]]=t[e[n]]},yw=function(t,e){o.info("Drawing flowchart"),Gx.clear(),Gx.setGen("gen-1");var n=Zx().parser;n.yy=Gx;var r,i=wb().securityLevel;"sandbox"===i&&(r=au("#i"+e));var a=au("sandbox"===i?r.nodes()[0].contentDocument.body:"body"),s="sandbox"===i?r.nodes()[0].contentDocument:document;n.parse(t);var c=Gx.getDirection();void 0===c&&(c="TD");for(var u,l=wb().flowchart,h=l.nodeSpacing||50,f=l.rankSpacing||50,d=new(t_().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:c,nodesep:h,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),p=Gx.getSubGraphs(),g=p.length-1;g>=0;g--)u=p[g],Gx.addVertex(u.id,u.title,"group",void 0,u.classes);var y=Gx.getVertices();o.warn("Get vertices",y);var m=Gx.getEdges(),v=0;for(v=p.length-1;v>=0;v--){u=p[v],ou("cluster").append("text");for(var b=0;b<u.nodes.length;b++)o.warn("Setting subgraph",u.nodes[b],Gx.lookUpDomId(u.nodes[b]),Gx.lookUpDomId(u.id)),d.setParent(Gx.lookUpDomId(u.nodes[b]),Gx.lookUpDomId(u.id))}(function(t,e,n,r,i){wb().securityLevel;var a=r?r.select('[id="'.concat(n,'"]')):au('[id="'.concat(n,'"]')),s=i||document;Object.keys(t).forEach((function(n){var r=t[n],i="default";r.classes.length>0&&(i=r.classes.join(" "));var c,u=Jv(r.styles),l=void 0!==r.text?r.text:r.id;if(zm(wb().flowchart.htmlLabels)){var h={label:l.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(c=tw()(a,h).node()).parentNode.removeChild(c)}else{var f=s.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("style",u.labelStyle.replace("color:","fill:"));for(var d=l.split($m.lineBreakRegex),p=0;p<d.length;p++){var g=s.createElementNS("http://www.w3.org/2000/svg","tspan");g.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),g.setAttribute("dy","1em"),g.setAttribute("x","1"),g.textContent=d[p],f.appendChild(g)}c=f}var y=0,m="";switch(r.type){case"round":y=5,m="rect";break;case"square":case"group":default:m="rect";break;case"diamond":m="question";break;case"hexagon":m="hexagon";break;case"odd":case"odd_right":m="rect_left_inv_arrow";break;case"lean_right":m="lean_right";break;case"lean_left":m="lean_left";break;case"trapezoid":m="trapezoid";break;case"inv_trapezoid":m="inv_trapezoid";break;case"circle":m="circle";break;case"ellipse":m="ellipse";break;case"stadium":m="stadium";break;case"subroutine":m="subroutine";break;case"cylinder":m="cylinder"}o.warn("Adding node",r.id,r.domId),e.setNode(Gx.lookUpDomId(r.id),{labelType:"svg",labelStyle:u.labelStyle,shape:m,label:c,rx:y,ry:y,class:i,style:u.style,id:Gx.lookUpDomId(r.id)})}))})(y,d,e,a,s),function(t,e){var n,r,i=0;if(void 0!==t.defaultStyle){var a=Jv(t.defaultStyle);n=a.style,r=a.labelStyle}t.forEach((function(a){i++;var o="L-"+a.start+"-"+a.end,s="LS-"+a.start,c="LE-"+a.end,u={};"arrow_open"===a.type?u.arrowhead="none":u.arrowhead="normal";var l="",h="";if(void 0!==a.style){var f=Jv(a.style);l=f.style,h=f.labelStyle}else switch(a.stroke){case"normal":l="fill:none",void 0!==n&&(l=n),void 0!==r&&(h=r);break;case"dotted":l="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":l=" stroke-width: 3.5px;fill:none"}u.style=l,u.labelStyle=h,void 0!==a.interpolate?u.curve=Qv(a.interpolate,Pu):void 0!==t.defaultInterpolate?u.curve=Qv(t.defaultInterpolate,Pu):u.curve=Qv(pw.curve,Pu),void 0===a.text?void 0!==a.style&&(u.arrowheadStyle="fill: #333"):(u.arrowheadStyle="fill: #333",u.labelpos="c",zm(wb().flowchart.htmlLabels)?(u.labelType="html",u.label='<span id="L-'.concat(o,'" class="edgeLabel L-').concat(s,"' L-").concat(c,'" style="').concat(u.labelStyle,'">').concat(a.text.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")})),"</span>")):(u.labelType="text",u.label=a.text.replace($m.lineBreakRegex,"\n"),void 0===a.style&&(u.style=u.style||"stroke: #333; stroke-width: 1.5px;fill:none"),u.labelStyle=u.labelStyle.replace("color:","fill:"))),u.id=o,u.class=s+" "+c,u.minlen=a.length||1,e.setEdge(Gx.lookUpDomId(a.start),Gx.lookUpDomId(a.end),u,i)}))}(m,d);var _=new(0,Kx().render);dw(_),_.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");Kx().util.applyStyle(i,n[r+"Style"])},_.arrows().normal=function(t,e){t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};var x=a.select('[id="'.concat(e,'"]'));x.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),o.warn(d),f_(n.yy,x,e);var w=a.select("#"+e+" g");_(w,d),w.selectAll("g.node").attr("title",(function(){return Gx.getTooltip(this.id)}));var k=l.diagramPadding,T=x.node().getBBox(),C=T.width+2*k,E=T.height+2*k;lb(x,E,C,l.useMaxWidth);var S="".concat(T.x-k," ").concat(T.y-k," ").concat(C," ").concat(E);for(o.debug("viewBox ".concat(S)),x.attr("viewBox",S),Gx.indexNodes("subGraph"+v),v=0;v<p.length;v++)if("undefined"!==(u=p[v]).title){var A=s.querySelectorAll("#"+e+' [id="'+Gx.lookUpDomId(u.id)+'"] rect'),M=s.querySelectorAll("#"+e+' [id="'+Gx.lookUpDomId(u.id)+'"]'),N=A[0].x.baseVal.value,D=A[0].y.baseVal.value,B=A[0].width.baseVal.value,L=au(M[0]).select(".label");L.attr("transform","translate(".concat(N+B/2,", ").concat(D+14,")")),L.attr("id",e+"Text");for(var O=0;O<u.classes.length;O++)M[0].classList.add(u.classes[O])}zm(l.htmlLabels);for(var I=s.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),R=0;R<I.length;R++){var F=I[R],P=F.getBBox(),Y=s.createElementNS("http://www.w3.org/2000/svg","rect");Y.setAttribute("rx",0),Y.setAttribute("ry",0),Y.setAttribute("width",P.width),Y.setAttribute("height",P.height),F.insertBefore(Y,F.firstChild)}Object.keys(y).forEach((function(t){var n=y[t];if(n.link){var r=a.select("#"+e+' [id="'+Gx.lookUpDomId(t)+'"]');if(r){var o=s.createElementNS("http://www.w3.org/2000/svg","a");o.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),o.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),o.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===i?o.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):n.linkTarget&&o.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);var c=r.insert((function(){return o}),":first-child"),u=r.select(".label-container");u&&c.append((function(){return u.node()}));var l=r.select(".label");l&&c.append((function(){return l.node()}))}}}))};var mw={};const vw=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)mw[e[n]]=t[e[n]]},bw=function(t,e){o.info("Drawing flowchart"),Gx.clear(),Gx.setGen("gen-2");var n=Zx().parser;n.yy=Gx,n.parse(t);var r=Gx.getDirection();void 0===r&&(r="TD");var i,a=wb().flowchart,s=a.nodeSpacing||50,c=a.rankSpacing||50,u=wb().securityLevel;"sandbox"===u&&(i=au("#i"+e));var l,h=au("sandbox"===u?i.nodes()[0].contentDocument.body:"body"),f="sandbox"===u?i.nodes()[0].contentDocument:document,d=new(t_().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:s,ranksep:c,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),p=Gx.getSubGraphs();o.info("Subgraphs - ",p);for(var g=p.length-1;g>=0;g--)l=p[g],o.info("Subgraph - ",l),Gx.addVertex(l.id,l.title,"group",void 0,l.classes,l.dir);var y=Gx.getVertices(),m=Gx.getEdges();o.info(m);var v=0;for(v=p.length-1;v>=0;v--){l=p[v],ou("cluster").append("text");for(var b=0;b<l.nodes.length;b++)o.info("Setting up subgraphs",l.nodes[b],l.id),d.setParent(l.nodes[b],l.id)}(function(t,e,n,r,i){var a=r.select('[id="'.concat(n,'"]'));Object.keys(t).forEach((function(n){var r=t[n],s="default";r.classes.length>0&&(s=r.classes.join(" "));var c,u=Jv(r.styles),l=void 0!==r.text?r.text:r.id;if(zm(wb().flowchart.htmlLabels)){var h={label:l.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(c=tw()(a,h).node()).parentNode.removeChild(c)}else{var f=i.createElementNS("http://www.w3.org/2000/svg","text");f.setAttribute("style",u.labelStyle.replace("color:","fill:"));for(var d=l.split($m.lineBreakRegex),p=0;p<d.length;p++){var g=i.createElementNS("http://www.w3.org/2000/svg","tspan");g.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),g.setAttribute("dy","1em"),g.setAttribute("x","1"),g.textContent=d[p],f.appendChild(g)}c=f}var y=0,m="";switch(r.type){case"round":y=5,m="rect";break;case"square":case"group":default:m="rect";break;case"diamond":m="question";break;case"hexagon":m="hexagon";break;case"odd":case"odd_right":m="rect_left_inv_arrow";break;case"lean_right":m="lean_right";break;case"lean_left":m="lean_left";break;case"trapezoid":m="trapezoid";break;case"inv_trapezoid":m="inv_trapezoid";break;case"circle":m="circle";break;case"ellipse":m="ellipse";break;case"stadium":m="stadium";break;case"subroutine":m="subroutine";break;case"cylinder":m="cylinder";break;case"doublecircle":m="doublecircle"}e.setNode(r.id,{labelStyle:u.labelStyle,shape:m,labelText:l,rx:y,ry:y,class:s,style:u.style,id:r.id,link:r.link,linkTarget:r.linkTarget,tooltip:Gx.getTooltip(r.id)||"",domId:Gx.lookUpDomId(r.id),haveCallback:r.haveCallback,width:"group"===r.type?500:void 0,dir:r.dir,type:r.type,props:r.props,padding:wb().flowchart.padding}),o.info("setNode",{labelStyle:u.labelStyle,shape:m,labelText:l,rx:y,ry:y,class:s,style:u.style,id:r.id,domId:Gx.lookUpDomId(r.id),width:"group"===r.type?500:void 0,type:r.type,dir:r.dir,props:r.props,padding:wb().flowchart.padding})}))})(y,d,e,h,f),function(t,e){o.info("abc78 edges = ",t);var n,r,i=0,a={};if(void 0!==t.defaultStyle){var s=Jv(t.defaultStyle);n=s.style,r=s.labelStyle}t.forEach((function(s){i++;var c="L-"+s.start+"-"+s.end;void 0===a[c]?(a[c]=0,o.info("abc78 new entry",c,a[c])):(a[c]++,o.info("abc78 new entry",c,a[c]));var u=c+"-"+a[c];o.info("abc78 new link id to be used is",c,u,a[c]);var l="LS-"+s.start,h="LE-"+s.end,f={style:"",labelStyle:""};switch(f.minlen=s.length||1,"arrow_open"===s.type?f.arrowhead="none":f.arrowhead="normal",f.arrowTypeStart="arrow_open",f.arrowTypeEnd="arrow_open",s.type){case"double_arrow_cross":f.arrowTypeStart="arrow_cross";case"arrow_cross":f.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":f.arrowTypeStart="arrow_point";case"arrow_point":f.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":f.arrowTypeStart="arrow_circle";case"arrow_circle":f.arrowTypeEnd="arrow_circle"}var d="",p="";switch(s.stroke){case"normal":d="fill:none;",void 0!==n&&(d=n),void 0!==r&&(p=r),f.thickness="normal",f.pattern="solid";break;case"dotted":f.thickness="normal",f.pattern="dotted",f.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f.thickness="thick",f.pattern="solid",f.style="stroke-width: 3.5px;fill:none;"}if(void 0!==s.style){var g=Jv(s.style);d=g.style,p=g.labelStyle}f.style=f.style+=d,f.labelStyle=f.labelStyle+=p,void 0!==s.interpolate?f.curve=Qv(s.interpolate,Pu):void 0!==t.defaultInterpolate?f.curve=Qv(t.defaultInterpolate,Pu):f.curve=Qv(mw.curve,Pu),void 0===s.text?void 0!==s.style&&(f.arrowheadStyle="fill: #333"):(f.arrowheadStyle="fill: #333",f.labelpos="c"),f.labelType="text",f.label=s.text.replace($m.lineBreakRegex,"\n"),void 0===s.style&&(f.style=f.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),f.labelStyle=f.labelStyle.replace("color:","fill:"),f.id=u,f.classes="flowchart-link "+l+" "+h,e.setEdge(s.start,s.end,f,i)}))}(m,d);var _=h.select('[id="'.concat(e,'"]'));_.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),f_(n.yy,_,e);var x=h.select("#"+e+" g");ax(x,d,["point","circle","cross"],"flowchart",e);var w=a.diagramPadding,k=_.node().getBBox(),T=k.width+2*w,C=k.height+2*w;if(o.debug("new ViewBox 0 0 ".concat(T," ").concat(C),"translate(".concat(w-d._label.marginx,", ").concat(w-d._label.marginy,")")),lb(_,C,T,a.useMaxWidth),_.attr("viewBox","0 0 ".concat(T," ").concat(C)),_.select("g").attr("transform","translate(".concat(w-d._label.marginx,", ").concat(w-k.y,")")),Gx.indexNodes("subGraph"+v),!a.htmlLabels)for(var E=f.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),S=0;S<E.length;S++){var A=E[S],M=A.getBBox(),N=f.createElementNS("http://www.w3.org/2000/svg","rect");N.setAttribute("rx",0),N.setAttribute("ry",0),N.setAttribute("width",M.width),N.setAttribute("height",M.height),A.insertBefore(N,A.firstChild)}Object.keys(y).forEach((function(t){var n=y[t];if(n.link){var r=au("#"+e+' [id="'+t+'"]');if(r){var i=f.createElementNS("http://www.w3.org/2000/svg","a");i.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),i.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),i.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===u?i.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):n.linkTarget&&i.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);var a=r.insert((function(){return i}),":first-child"),o=r.select(".label-container");o&&a.append((function(){return o.node()}));var s=r.select(".label");s&&a.append((function(){return s.node()}))}}}))};function _w(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var xw,ww,kw="",Tw="",Cw="",Ew=[],Sw=[],Aw={},Mw=[],Nw=[],Dw="",Bw=["active","done","crit","milestone"],Lw=[],Ow=!1,Iw=!1,Rw=0,Fw=function(t,e,n,r){return!(r.indexOf(t.format(e.trim()))>=0)&&(t.isoWeekday()>=6&&n.indexOf("weekends")>=0||n.indexOf(t.format("dddd").toLowerCase())>=0||n.indexOf(t.format(e.trim()))>=0)},Pw=function(t,e,n,r){if(n.length&&!t.manualEndTime){var a=i()(t.startTime,e,!0);a.add(1,"d");var o=i()(t.endTime,e,!0),s=Yw(a,o,e,n,r);t.endTime=o.toDate(),t.renderEndTime=s}},Yw=function(t,e,n,r,i){for(var a=!1,o=null;t<=e;)a||(o=e.toDate()),(a=Fw(t,n,r,i))&&e.add(1,"d"),t.add(1,"d");return o},jw=function(t,e,n){n=n.trim();var r=/^after\s+([\d\w- ]+)/.exec(n.trim());if(null!==r){var a=null;if(r[1].split(" ").forEach((function(t){var e=Vw(t);void 0!==e&&(a?e.endTime>a.endTime&&(a=e):a=e)})),a)return a.endTime;var s=new Date;return s.setHours(0,0,0,0),s}var c=i()(n,e.trim(),!0);return c.isValid()?c.toDate():(o.debug("Invalid date:"+n),o.debug("With date format:"+e.trim()),new Date)},Uw=function(t,e){if(null!==t)switch(t[2]){case"s":e.add(t[1],"seconds");break;case"m":e.add(t[1],"minutes");break;case"h":e.add(t[1],"hours");break;case"d":e.add(t[1],"days");break;case"w":e.add(t[1],"weeks")}return e.toDate()},zw=function(t,e,n,r){r=r||!1,n=n.trim();var a=i()(n,e.trim(),!0);return a.isValid()?(r&&a.add(1,"d"),a.toDate()):Uw(/^([\d]+)([wdhms])/.exec(n.trim()),i()(t))},$w=0,qw=function(t){return void 0===t?"task"+($w+=1):t},Hw=[],Ww={},Vw=function(t){var e=Ww[t];return Hw[e]},Gw=function(){for(var t=function(t){var e=Hw[t],n="";switch(Hw[t].raw.startTime.type){case"prevTaskEnd":var r=Vw(e.prevTaskId);e.startTime=r.endTime;break;case"getStartDate":(n=jw(0,kw,Hw[t].raw.startTime.startData))&&(Hw[t].startTime=n)}return Hw[t].startTime&&(Hw[t].endTime=zw(Hw[t].startTime,kw,Hw[t].raw.endTime.data,Ow),Hw[t].endTime&&(Hw[t].processed=!0,Hw[t].manualEndTime=i()(Hw[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),Pw(Hw[t],kw,Sw,Ew))),Hw[t].processed},e=!0,n=0;n<Hw.length;n++)t(n),e=e&&Hw[n].processed;return e},Xw=function(t,e){t.split(",").forEach((function(t){var n=Vw(t);void 0!==n&&n.classes.push(e)}))},Zw=function(t,e){Lw.push((function(){var n=document.querySelector('[id="'.concat(t,'"]'));null!==n&&n.addEventListener("click",(function(){e()}))})),Lw.push((function(){var n=document.querySelector('[id="'.concat(t,'-text"]'));null!==n&&n.addEventListener("click",(function(){e()}))}))};const Qw={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().gantt},clear:function(){Mw=[],Nw=[],Dw="",Lw=[],$w=0,xw=void 0,ww=void 0,Hw=[],kw="",Tw="",Cw="",Ew=[],Sw=[],Ow=!1,Iw=!1,Rw=0,Aw={},Mb()},setDateFormat:function(t){kw=t},getDateFormat:function(){return kw},enableInclusiveEndDates:function(){Ow=!0},endDatesAreInclusive:function(){return Ow},enableTopAxis:function(){Iw=!0},topAxisEnabled:function(){return Iw},setAxisFormat:function(t){Tw=t},getAxisFormat:function(){return Tw},setTodayMarker:function(t){Cw=t},getTodayMarker:function(){return Cw},setTitle:Nb,getTitle:Db,setAccDescription:Bb,getAccDescription:Lb,addSection:function(t){Dw=t,Mw.push(t)},getSections:function(){return Mw},getTasks:function(){for(var t=Gw(),e=0;!t&&e<10;)t=Gw(),e++;return Nw=Hw},addTask:function(t,e){var n={section:Dw,type:Dw,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};Kw(n,r,Bw);for(var i=0;i<n.length;i++)n[i]=n[i].trim();switch(n.length){case 1:r.id=qw(),r.startTime={type:"prevTaskEnd",id:t},r.endTime={data:n[0]};break;case 2:r.id=qw(),r.startTime={type:"getStartDate",startData:n[0]},r.endTime={data:n[1]};break;case 3:r.id=qw(n[0]),r.startTime={type:"getStartDate",startData:n[1]},r.endTime={data:n[2]}}return r}(ww,e);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=ww,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.order=Rw,Rw++;var i=Hw.push(n);ww=n.id,Ww[n.id]=i-1},findTaskById:Vw,addTaskOrg:function(t,e){var n={section:Dw,type:Dw,description:t,task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};Kw(n,r,Bw);for(var a=0;a<n.length;a++)n[a]=n[a].trim();var o="";switch(n.length){case 1:r.id=qw(),r.startTime=t.endTime,o=n[0];break;case 2:r.id=qw(),r.startTime=jw(0,kw,n[0]),o=n[1];break;case 3:r.id=qw(n[0]),r.startTime=jw(0,kw,n[1]),o=n[2]}return o&&(r.endTime=zw(r.startTime,kw,o,Ow),r.manualEndTime=i()(o,"YYYY-MM-DD",!0).isValid(),Pw(r,kw,Sw,Ew)),r}(xw,e);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,xw=n,Nw.push(n)},setIncludes:function(t){Ew=t.toLowerCase().split(/[\s,]+/)},getIncludes:function(){return Ew},setExcludes:function(t){Sw=t.toLowerCase().split(/[\s,]+/)},getExcludes:function(){return Sw},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){if("loose"===wb().securityLevel&&void 0!==e){var r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var i=0;i<r.length;i++){var a=r[i].trim();'"'===a.charAt(0)&&'"'===a.charAt(a.length-1)&&(a=a.substr(1,a.length-2)),r[i]=a}}0===r.length&&r.push(t),void 0!==Vw(t)&&Zw(t,(function(){var t;db.runFunc.apply(db,[e].concat(function(t){if(Array.isArray(t))return _w(t)}(t=r)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return _w(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_w(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))}))}}(t,e,n)})),Xw(t,"clickable")},setLink:function(t,e){var n=e;"loose"!==wb().securityLevel&&(n=(0,Bm.N)(e)),t.split(",").forEach((function(t){void 0!==Vw(t)&&(Zw(t,(function(){window.open(n,"_self")})),Aw[t]=n)})),Xw(t,"clickable")},getLinks:function(){return Aw},bindFunctions:function(t){Lw.forEach((function(e){e(t)}))},durationToDate:Uw,isInvalidDate:Fw};function Kw(t,e,n){for(var r=!0;r;)r=!1,n.forEach((function(n){var i=new RegExp("^\\s*"+n+"\\s*$");t[0].match(i)&&(e[n]=!0,t.shift(1),r=!0)}))}var Jw,tk=n(9959),ek=n.n(tk);tk.parser.yy=Qw;const nk=function(t,e){var n=wb().gantt;tk.parser.yy.clear(),tk.parser.parse(t);var r,a=wb().securityLevel;"sandbox"===a&&(r=au("#i"+e));var o=au("sandbox"===a?r.nodes()[0].contentDocument.body:"body"),s="sandbox"===a?r.nodes()[0].contentDocument:document,c=s.getElementById(e);void 0===(Jw=c.parentElement.offsetWidth)&&(Jw=1200),void 0!==n.useWidth&&(Jw=n.useWidth);var h=tk.parser.yy.getTasks(),f=h.length*(n.barHeight+n.barGap)+2*n.topPadding;c.setAttribute("viewBox","0 0 "+Jw+" "+f);for(var d=o.select('[id="'.concat(e,'"]')),p=function(){return Zi.apply($s(mo,vo,Ga,Wa,Pa,Ra,Oa,Ba,Na,ko).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}().domain([l(h,(function(t){return t.startTime})),u(h,(function(t){return t.endTime}))]).rangeRound([0,Jw-n.leftPadding-n.rightPadding]),g=[],y=0;y<h.length;y++)g.push(h[y].type);var m=g;g=function(t){for(var e={},n=[],r=0,i=t.length;r<i;++r)Object.prototype.hasOwnProperty.call(e,t[r])||(e[t[r]]=!0,n.push(t[r]));return n}(g),h.sort((function(t,e){var n=t.startTime,r=e.startTime,i=0;return n>r?i=1:n<r&&(i=-1),i})),function(t,r,a){var o=n.barHeight,c=o+n.barGap,u=n.topPadding,l=n.leftPadding;fa().domain([0,g.length]).range(["#00B9FA","#F95002"]).interpolate(Yr),function(t,e,r,a,o,s,c,u){var l=s.reduce((function(t,e){var n=e.startTime;return t?Math.min(t,n):n}),0),h=s.reduce((function(t,e){var n=e.endTime;return t?Math.max(t,n):n}),0),f=tk.parser.yy.getDateFormat();if(l&&h){for(var g=[],y=null,m=i()(l);m.valueOf()<=h;)tk.parser.yy.isInvalidDate(m,f,c,u)?y?y.end=m.clone():y={start:m.clone(),end:m.clone()}:y&&(g.push(y),y=null),m.add(1,"d");d.append("g").selectAll("rect").data(g).enter().append("rect").attr("id",(function(t){return"exclude-"+t.start.format("YYYY-MM-DD")})).attr("x",(function(t){return p(t.start)+r})).attr("y",n.gridLineStartPadding).attr("width",(function(t){var e=t.end.clone().add(1,"day");return p(e)-p(t.start)})).attr("height",o-e-n.gridLineStartPadding).attr("transform-origin",(function(e,n){return(p(e.start)+r+.5*(p(e.end)-p(e.start))).toString()+"px "+(n*t+.5*o).toString()+"px"})).attr("class","exclude-range")}}(c,u,l,0,a,t,tk.parser.yy.getExcludes(),tk.parser.yy.getIncludes()),function(t,e,r,i){var a,o=(a=p,v(3,a)).tickSize(-i+e+n.gridLineStartPadding).tickFormat(jl(tk.parser.yy.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));if(d.append("g").attr("class","grid").attr("transform","translate("+t+", "+(i-50)+")").call(o).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),Qw.topAxisEnabled()||n.topAxis){var s=function(t){return v(1,t)}(p).tickSize(-i+e+n.gridLineStartPadding).tickFormat(jl(tk.parser.yy.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));d.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(s).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}(l,u,0,a),function(t,r,i,a,o,s,c){d.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",(function(t,e){return t.order*r+i-2})).attr("width",(function(){return c-n.rightPadding/2})).attr("height",r).attr("class",(function(t){for(var e=0;e<g.length;e++)if(t.type===g[e])return"section section"+e%n.numberSectionStyles;return"section section0"}));var u=d.append("g").selectAll("rect").data(t).enter(),l=Qw.getLinks();if(u.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?p(t.startTime)+a+.5*(p(t.endTime)-p(t.startTime))-.5*o:p(t.startTime)+a})).attr("y",(function(t,e){return t.order*r+i})).attr("width",(function(t){return t.milestone?o:p(t.renderEndTime||t.endTime)-p(t.startTime)})).attr("height",o).attr("transform-origin",(function(t,e){return e=t.order,(p(t.startTime)+a+.5*(p(t.endTime)-p(t.startTime))).toString()+"px "+(e*r+i+.5*o).toString()+"px"})).attr("class",(function(t){var e="";t.classes.length>0&&(e=t.classes.join(" "));for(var r=0,i=0;i<g.length;i++)t.type===g[i]&&(r=i%n.numberSectionStyles);var a="";return t.active?t.crit?a+=" activeCrit":a=" active":t.done?a=t.crit?" doneCrit":" done":t.crit&&(a+=" crit"),0===a.length&&(a=" task"),t.milestone&&(a=" milestone "+a),"task"+(a+=r)+" "+e})),u.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",n.fontSize).attr("x",(function(t){var e=p(t.startTime),r=p(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(p(t.endTime)-p(t.startTime))-.5*o),t.milestone&&(r=e+o);var i=this.getBBox().width;return i>r-e?r+i+1.5*n.leftPadding>c?e+a-5:r+a+5:(r-e)/2+e+a})).attr("y",(function(t,e){return t.order*r+n.barHeight/2+(n.fontSize/2-2)+i})).attr("text-height",o).attr("class",(function(t){var e=p(t.startTime),r=p(t.endTime);t.milestone&&(r=e+o);var i=this.getBBox().width,a="";t.classes.length>0&&(a=t.classes.join(" "));for(var s=0,u=0;u<g.length;u++)t.type===g[u]&&(s=u%n.numberSectionStyles);var l="";return t.active&&(l=t.crit?"activeCritText"+s:"activeText"+s),t.done?l=t.crit?l+" doneCritText"+s:l+" doneText"+s:t.crit&&(l=l+" critText"+s),t.milestone&&(l+=" milestoneText"),i>r-e?r+i+1.5*n.leftPadding>c?a+" taskTextOutsideLeft taskTextOutside"+s+" "+l:a+" taskTextOutsideRight taskTextOutside"+s+" "+l+" width-"+i:a+" taskText taskText"+s+" "+l+" width-"+i})),"sandbox"===wb().securityLevel){var h;h=au("#i"+e),au(h.nodes()[0].contentDocument.body);var f=h.nodes()[0].contentDocument;u.filter((function(t){return void 0!==l[t.id]})).each((function(t){var e=f.querySelector("#"+t.id),n=f.querySelector("#"+t.id+"-text"),r=e.parentNode,i=f.createElement("a");i.setAttribute("xlink:href",l[t.id]),i.setAttribute("target","_top"),r.appendChild(i),i.appendChild(e),i.appendChild(n)}))}}(t,c,u,l,o,0,r),function(t,e){for(var r=[],i=0,a=0;a<g.length;a++)r[a]=[g[a],(o=g[a],c=m,function(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}(c)[o]||0)];var o,c;d.append("g").selectAll("text").data(r).enter().append((function(t){var e=t[0].split($m.lineBreakRegex),n=-(e.length-1)/2,r=s.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("dy",n+"em");for(var i=0;i<e.length;i++){var a=s.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttribute("alignment-baseline","central"),a.setAttribute("x","10"),i>0&&a.setAttribute("dy","1em"),a.textContent=e[i],r.appendChild(a)}return r})).attr("x",10).attr("y",(function(n,a){if(!(a>0))return n[1]*t/2+e;for(var o=0;o<a;o++)return i+=r[a-1][1],n[1]*t/2+i*t+e})).attr("font-size",n.sectionFontSize).attr("font-size",n.sectionFontSize).attr("class",(function(t){for(var e=0;e<g.length;e++)if(t[0]===g[e])return"sectionTitle sectionTitle"+e%n.numberSectionStyles;return"sectionTitle"}))}(c,u),function(t,e,r,i){var a=Qw.getTodayMarker();if("off"!==a){var o=d.append("g").attr("class","today"),s=new Date,c=o.append("line");c.attr("x1",p(s)+t).attr("x2",p(s)+t).attr("y1",n.titleTopMargin).attr("y2",i-n.titleTopMargin).attr("class","today"),""!==a&&c.attr("style",a.replace(/,/g,";"))}}(l,0,0,a)}(h,Jw,f),lb(d,f,Jw,n.useMaxWidth),d.append("text").text(tk.parser.yy.getTitle()).attr("x",Jw/2).attr("y",n.titleTopMargin).attr("class","titleText"),f_(tk.parser.yy,d,e)};function rk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ik(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?rk(Object(n),!0).forEach((function(e){ak(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rk(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ak(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ok=wb().gitGraph.mainBranchName,sk=wb().gitGraph.mainBranchOrder,ck={},uk=null,lk={};lk[ok]={name:ok,order:sk};var hk={};hk[ok]=uk;var fk=ok,dk="LR",pk=0;function gk(){return nb({length:7})}var yk={},mk=function(t){if(t=$m.sanitizeText(t,wb()),void 0===hk[t]){var e=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+t+'")');throw e.hash={text:"checkout "+t,token:"checkout "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+t+'"']},e}var n=hk[fk=t];uk=ck[n]};function vk(t,e,n){var r=t.indexOf(e);-1===r?t.push(n):t.splice(r,1,n)}function bk(t){var e=t.reduce((function(t,e){return t.seq>e.seq?t:e}),t[0]),n="";t.forEach((function(t){n+=t===e?"\t*":"\t|"}));var r,i,a,s=[n,e.id,e.seq];for(var c in hk)hk[c]===e.id&&s.push(c);if(o.debug(s.join(" ")),e.parents&&2==e.parents.length){var u=ck[e.parents[0]];vk(t,e,u),t.push(ck[e.parents[1]])}else{if(0==e.parents.length)return;var l=ck[e.parents];vk(t,e,l)}r=t,i=function(t){return t.id},a=Object.create(null),bk(t=r.reduce((function(t,e){var n=i(e);return a[n]||(a[n]=!0,t.push(e)),t}),[]))}var _k=function(){var t=Object.keys(ck).map((function(t){return ck[t]}));return t.forEach((function(t){o.debug(t.id)})),t.sort((function(t,e){return t.seq-e.seq})),t},xk={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3};const wk={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().gitGraph},setDirection:function(t){dk=t},setOptions:function(t){o.debug("options str",t),t=(t=t&&t.trim())||"{}";try{yk=JSON.parse(t)}catch(t){o.error("error while parsing gitGraph options",t.message)}},getOptions:function(){return yk},commit:function(t,e,n,r){o.debug("Entering commit:",t,e,n,r),e=$m.sanitizeText(e,wb()),t=$m.sanitizeText(t,wb()),r=$m.sanitizeText(r,wb());var i={id:e||pk+"-"+gk(),message:t,seq:pk++,type:n||xk.NORMAL,tag:r||"",parents:null==uk?[]:[uk.id],branch:fk};uk=i,ck[i.id]=i,hk[fk]=i.id,o.debug("in pushCommit "+i.id)},branch:function(t,e){if(t=$m.sanitizeText(t,wb()),void 0!==hk[t]){var n=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+t+'")');throw n.hash={text:"branch "+t,token:"branch "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+t+'"']},n}hk[t]=null!=uk?uk.id:null,lk[t]={name:t,order:e?parseInt(e,10):null},mk(t),o.debug("in createBranch")},merge:function(t,e){t=$m.sanitizeText(t,wb());var n=ck[hk[fk]],r=ck[hk[t]];if(fk===t){var i=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw i.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},i}if(void 0===n||!n){var a=new Error('Incorrect usage of "merge". Current branch ('+fk+")has no commits");throw a.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},a}if(void 0===hk[t]){var s=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw s.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+t]},s}if(void 0===r||!r){var c=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw c.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},c}if(n===r){var u=new Error('Incorrect usage of "merge". Both branches have same head');throw u.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},u}var l={id:pk+"-"+gk(),message:"merged branch "+t+" into "+fk,seq:pk++,parents:[null==uk?null:uk.id,hk[t]],branch:fk,type:xk.MERGE,tag:e||""};uk=l,ck[l.id]=l,hk[fk]=l.id,o.debug(hk),o.debug("in mergeBranch")},checkout:mk,prettyPrint:function(){o.debug(ck),bk([_k()[0]])},clear:function(){ck={},uk=null;var t=wb().gitGraph.mainBranchName,e=wb().gitGraph.mainBranchOrder;(hk={})[t]=null,(lk={})[t]={name:t,order:e},fk=t,pk=0,Mb()},getBranchesAsObjArray:function(){return Object.values(lk).map((function(t,e){return null!==t.order?t:ik(ik({},t),{},{order:parseFloat("0.".concat(e),10)})})).sort((function(t,e){return t.order-e.order})).map((function(t){return{name:t.name}}))},getBranches:function(){return hk},getCommits:function(){return ck},getCommitsArray:_k,getCurrentBranch:function(){return fk},getDirection:function(){return dk},getHead:function(){return uk},setTitle:Nb,getTitle:Db,getAccDescription:Lb,setAccDescription:Bb,commitType:xk};var kk=n(2553),Tk=n.n(kk),Ck={},Ek={},Sk={},Ak=[],Mk=0,Nk=function(t,e,n){var r=wb().gitGraph,i=t.append("g").attr("class","commit-bullets"),a=t.append("g").attr("class","commit-labels"),o=0;Object.keys(e).sort((function(t,n){return e[t].seq-e[n].seq})).forEach((function(t,s){var c=e[t],u=Ek[c.branch].pos,l=o+10;if(n){var h;switch(c.type){case 0:default:h="commit-normal";break;case 1:h="commit-reverse";break;case 2:h="commit-highlight";break;case 3:h="commit-merge"}if(2===c.type){var f=i.append("rect");f.attr("x",l-10),f.attr("y",u-10),f.attr("height",20),f.attr("width",20),f.attr("class","commit "+c.id+" commit-highlight"+Ek[c.branch].index+" "+h+"-outer"),i.append("rect").attr("x",l-6).attr("y",u-6).attr("height",12).attr("width",12).attr("class","commit "+c.id+" commit"+Ek[c.branch].index+" "+h+"-inner")}else{var d=i.append("circle");if(d.attr("cx",l),d.attr("cy",u),d.attr("r",3===c.type?9:10),d.attr("class","commit "+c.id+" commit"+Ek[c.branch].index),3===c.type){var p=i.append("circle");p.attr("cx",l),p.attr("cy",u),p.attr("r",6),p.attr("class","commit "+h+" "+c.id+" commit"+Ek[c.branch].index)}1===c.type&&i.append("path").attr("d","M ".concat(l-5,",").concat(u-5,"L").concat(l+5,",").concat(u+5,"M").concat(l-5,",").concat(u+5,"L").concat(l+5,",").concat(u-5)).attr("class","commit "+h+" "+c.id+" commit"+Ek[c.branch].index)}}if(Sk[c.id]={x:o+10,y:u},n){if(3!==c.type&&r.showCommitLabel){var g=a.insert("rect").attr("class","commit-label-bkg"),y=a.append("text").attr("x",o).attr("y",u+25).attr("class","commit-label").text(c.id),m=y.node().getBBox();g.attr("x",o+10-m.width/2-2).attr("y",u+13.5).attr("width",m.width+4).attr("height",m.height+4),y.attr("x",o+10-m.width/2)}if(c.tag){var v=a.insert("polygon"),b=a.append("circle"),_=a.append("text").attr("y",u-16).attr("class","tag-label").text(c.tag),x=_.node().getBBox();_.attr("x",o+10-x.width/2);var w=x.height/2,k=u-19.2;v.attr("class","tag-label-bkg").attr("points","\n ".concat(o-x.width/2-2,",").concat(k+2,"\n ").concat(o-x.width/2-2,",").concat(k-2,"\n ").concat(o+10-x.width/2-4,",").concat(k-w-2,"\n ").concat(o+10+x.width/2+4,",").concat(k-w-2,"\n ").concat(o+10+x.width/2+4,",").concat(k+w+2,"\n ").concat(o+10-x.width/2-4,",").concat(k+w+2)),b.attr("cx",o-x.width/2+2).attr("cy",k).attr("r",1.5).attr("class","tag-hole")}}(o+=50)>Mk&&(Mk=o)}))},Dk=function t(e,n,r){var i=r||0,a=e+Math.abs(e-n)/2;if(i>5)return a;for(var o=!0,s=0;s<Ak.length;s++)Math.abs(Ak[s]-a)<10&&(o=!1);return o?(Ak.push(a),a):t(e,n-Math.abs(e-n)/5,i)};const Bk=function(t,e,n){Ek={},Sk={},Ck={},Mk=0,Ak=[];var r=wb(),i=wb().gitGraph,a=Tk().parser;a.yy=wk,a.yy.clear(),o.debug("in gitgraph renderer",t+"\n","id:",e,n),a.parse(t+"\n"),wk.getDirection(),Ck=wk.getCommits();var s=wk.getBranchesAsObjArray(),c=0;s.forEach((function(t,e){Ek[t.name]={pos:c,index:e},c+=50}));var u=au('[id="'.concat(e,'"]'));f_(a.yy,u,e),Nk(u,Ck,!1),i.showBranches&&function(t,e){wb().gitGraph;var n=t.append("g");e.forEach((function(t,e){var r=Ek[t.name].pos,i=n.append("line");i.attr("x1",0),i.attr("y1",r),i.attr("x2",Mk),i.attr("y2",r),i.attr("class","branch branch"+e),Ak.push(r);var a=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","text"),n=[];n="string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(t)?t:[];for(var r=0;r<n.length;r++){var i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=n[r].trim(),e.appendChild(i)}return e}(t.name),o=n.insert("rect"),s=n.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+e);s.node().appendChild(a);var c=a.getBBox();o.attr("class","branchLabelBkg label"+e).attr("rx",4).attr("ry",4).attr("x",-c.width-4).attr("y",-c.height/2+8).attr("width",c.width+18).attr("height",c.height+4),s.attr("transform","translate("+(-c.width-14)+", "+(r-c.height/2-1)+")"),o.attr("transform","translate(-19, "+(r-c.height/2)+")")}))}(u,s),function(t,e){var n=t.append("g").attr("class","commit-arrows");Object.keys(e).forEach((function(t,r){var i=e[t];i.parents&&i.parents.length>0&&i.parents.forEach((function(t){!function(t,e,n,r){var i=wb(),a=Sk[e.id],o=Sk[n.id],s=function(t,e,n){return Sk[e.id],Sk[t.id],Object.keys(n).filter((function(r){return n[r].branch===e.branch&&n[r].seq>t.seq&&n[r].seq<e.seq})).length>0}(e,n,r);i.arrowMarkerAbsolute&&(window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(").replace(/\)/g,"\\)");var c,u="",l="",h=0,f=0,d=Ek[n.branch].index;if(s){u="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",h=10,f=10,d=Ek[n.branch].index;var p=a.y<o.y?Dk(a.y,o.y):Dk(o.y,a.y);c=a.y<o.y?"M ".concat(a.x," ").concat(a.y," L ").concat(a.x," ").concat(p-h," ").concat(u," ").concat(a.x+f," ").concat(p," L ").concat(o.x-h," ").concat(p," ").concat(l," ").concat(o.x," ").concat(p+f," L ").concat(o.x," ").concat(o.y):"M ".concat(a.x," ").concat(a.y," L ").concat(a.x," ").concat(p+h," ").concat(l," ").concat(a.x+f," ").concat(p," L ").concat(o.x-h," ").concat(p," ").concat(u," ").concat(o.x," ").concat(p-f," L ").concat(o.x," ").concat(o.y)}else a.y<o.y&&(u="A 20 20, 0, 0, 0,",h=20,f=20,d=Ek[n.branch].index,c="M ".concat(a.x," ").concat(a.y," L ").concat(a.x," ").concat(o.y-h," ").concat(u," ").concat(a.x+f," ").concat(o.y," L ").concat(o.x," ").concat(o.y)),a.y>o.y&&(u="A 20 20, 0, 0, 0,",h=20,f=20,d=Ek[e.branch].index,c="M ".concat(a.x," ").concat(a.y," L ").concat(o.x-h," ").concat(a.y," ").concat(u," ").concat(o.x," ").concat(a.y-f," L ").concat(o.x," ").concat(o.y)),a.y===o.y&&(d=Ek[e.branch].index,c="M ".concat(a.x," ").concat(a.y," L ").concat(a.x," ").concat(o.y-h," ").concat(u," ").concat(a.x+f," ").concat(o.y," L ").concat(o.x," ").concat(o.y));t.append("path").attr("d",c).attr("class","arrow arrow"+d)}(n,e[t],i,e)}))}))}(u,Ck),Nk(u,Ck,!0);var l=i.diagramPadding,h=u.node().getBBox(),f=h.width+2*l,d=h.height+2*l;lb(u,d,f,r.useMaxWidth);var p="".concat(h.x-l," ").concat(h.y-l," ").concat(f," ").concat(d);u.attr("viewBox",p)};var Lk="",Ok=!1;const Ik={setMessage:function(t){o.debug("Setting message to: "+t),Lk=t},getMessage:function(){return Lk},setInfo:function(t){Ok=t},getInfo:function(){return Ok}};var Rk=n(6765),Fk=n.n(Rk),Pk={};const Yk=function(t){Object.keys(t).forEach((function(e){Pk[e]=t[e]}))};var jk=n(7062),Uk=n.n(jk),zk={},$k="",qk=!1;const Hk={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().pie},addSection:function(t,e){t=$m.sanitizeText(t,wb()),void 0===zk[t]&&(zk[t]=e,o.debug("Added new section :",t))},getSections:function(){return zk},cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){zk={},$k="",qk=!1,Mb()},setTitle:Nb,getTitle:Db,setPieTitle:function(t){var e=$m.sanitizeText(t,wb());$k=e},getPieTitle:function(){return $k},setShowData:function(t){qk=t},getShowData:function(){return qk},getAccDescription:Lb,setAccDescription:Bb};var Wk,Vk=wb();const Gk=function(t,e){try{Vk=wb();var n=Uk().parser;n.yy=Hk,o.debug("Rendering info diagram\n"+t);var r,i=wb().securityLevel;"sandbox"===i&&(r=au("#i"+e));var a=au("sandbox"===i?r.nodes()[0].contentDocument.body:"body"),s="sandbox"===i?r.nodes()[0].contentDocument:document;n.yy.clear(),n.parse(t),o.debug("Parsed info diagram");var c=s.getElementById(e);void 0===(Wk=c.parentElement.offsetWidth)&&(Wk=1200),void 0!==Vk.useWidth&&(Wk=Vk.useWidth),void 0!==Vk.pie.useWidth&&(Wk=Vk.pie.useWidth);var u=a.select("#"+e);lb(u,450,Wk,Vk.pie.useMaxWidth),f_(n.yy,u,e),c.setAttribute("viewBox","0 0 "+Wk+" 450");var l=Math.min(Wk,450)/2-40,h=u.append("g").attr("transform","translate("+Wk/2+",225)"),f=Hk.getSections(),d=0;Object.keys(f).forEach((function(t){d+=f[t]}));var p=Vk.themeVariables,g=[p.pie1,p.pie2,p.pie3,p.pie4,p.pie5,p.pie6,p.pie7,p.pie8,p.pie9,p.pie10,p.pie11,p.pie12],y=ma().range(g),m=function(){var t=$u,e=zu,n=null,r=pu(0),i=pu(Cu),a=pu(0);function o(o){var s,c,u,l,h,f=(o=Ru(o)).length,d=0,p=new Array(f),g=new Array(f),y=+r.apply(this,arguments),m=Math.min(Cu,Math.max(-Cu,i.apply(this,arguments)-y)),v=Math.min(Math.abs(m)/f,a.apply(this,arguments)),b=v*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(o[s],s,o))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),s=0,u=d?(m-f*b)/d:0;s<f;++s,y=l)c=p[s],l=y+((h=g[c])>0?h*u:0)+b,g[c]={data:o[c],index:s,value:h,startAngle:y,endAngle:l,padAngle:v};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:pu(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:pu(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:pu(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:pu(+t),o):a},o}().value((function(t){return t[1]})),v=m(Object.entries(f)),b=Iu().innerRadius(0).outerRadius(l);h.selectAll("mySlices").data(v).enter().append("path").attr("d",b).attr("fill",(function(t){return y(t.data[0])})).attr("class","pieCircle"),h.selectAll("mySlices").data(v).enter().append("text").text((function(t){return(t.data[1]/d*100).toFixed(0)+"%"})).attr("transform",(function(t){return"translate("+b.centroid(t)+")"})).style("text-anchor","middle").attr("class","slice"),h.append("text").text(n.yy.getPieTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");var _=h.selectAll(".legend").data(y.domain()).enter().append("g").attr("class","legend").attr("transform",(function(t,e){return"translate(216,"+(22*e-22*y.domain().length/2)+")"}));_.append("rect").attr("width",18).attr("height",18).style("fill",y).style("stroke",y),_.data(v).append("text").attr("x",22).attr("y",14).text((function(t){return n.yy.getShowData()||Vk.showData||Vk.pie.showData?t.data[0]+" ["+t.data[1]+"]":t.data[0]}))}catch(t){o.error("Error while rendering info diagram"),o.error(t)}};var Xk=n(3176),Zk=n.n(Xk),Qk=[],Kk={},Jk={},tT={},eT={};const nT={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().req},addRequirement:function(t,e){return void 0===Jk[t]&&(Jk[t]={name:t,type:e,id:Kk.id,text:Kk.text,risk:Kk.risk,verifyMethod:Kk.verifyMethod}),Kk={},Jk[t]},getRequirements:function(){return Jk},setNewReqId:function(t){void 0!==Kk&&(Kk.id=t)},setNewReqText:function(t){void 0!==Kk&&(Kk.text=t)},setNewReqRisk:function(t){void 0!==Kk&&(Kk.risk=t)},setNewReqVerifyMethod:function(t){void 0!==Kk&&(Kk.verifyMethod=t)},setTitle:Nb,getTitle:Db,setAccDescription:Bb,getAccDescription:Lb,addElement:function(t){return void 0===eT[t]&&(eT[t]={name:t,type:tT.type,docRef:tT.docRef},o.info("Added new requirement: ",t)),tT={},eT[t]},getElements:function(){return eT},setNewElementType:function(t){void 0!==tT&&(tT.type=t)},setNewElementDocRef:function(t){void 0!==tT&&(tT.docRef=t)},addRelationship:function(t,e,n){Qk.push({type:t,src:e,dst:n})},getRelationships:function(){return Qk},clear:function(){Qk=[],Kk={},Jk={},tT={},eT={},Mb()}};var rT={CONTAINS:"contains",ARROW:"arrow"};const iT=rT;var aT={},oT=0,sT=function(t,e){return t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",aT.rect_min_width+"px").attr("height",aT.rect_min_height+"px")},cT=function(t,e,n){var r=aT.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",r).attr("y",aT.rect_padding).attr("dominant-baseline","hanging"),a=0;n.forEach((function(t){0==a?i.append("tspan").attr("text-anchor","middle").attr("x",aT.rect_min_width/2).attr("dy",0).text(t):i.append("tspan").attr("text-anchor","middle").attr("x",aT.rect_min_width/2).attr("dy",.75*aT.line_height).text(t),a++}));var o=1.5*aT.rect_padding+a*aT.line_height*.75;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",aT.rect_min_width).attr("y1",o).attr("y2",o),{titleNode:i,y:o}},uT=function(t,e,n,r){var i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",aT.rect_padding).attr("y",r).attr("dominant-baseline","hanging"),a=0,o=[];return n.forEach((function(t){for(var e=t.length;e>30&&a<3;){var n=t.substring(0,30);e=(t=t.substring(30,t.length)).length,o[o.length]=n,a++}if(3==a){var r=o[o.length-1];o[o.length-1]=r.substring(0,r.length-4)+"..."}else o[o.length]=t;a=0})),o.forEach((function(t){i.append("tspan").attr("x",aT.rect_padding).attr("dy",aT.line_height).text(t)})),i},lT=function(t){return t.replace(/\s/g,"").replace(/\./g,"_")};const hT=function(t){if(void 0!==t)for(var e=Object.keys(t),n=0;n<e.length;n++)aT[e[n]]=t[e[n]]},fT=function(t,e){Xk.parser.yy=nT,Xk.parser.yy.clear(),Xk.parser.parse(t);var n,r=wb().securityLevel;"sandbox"===r&&(n=au("#i"+e));var i=au("sandbox"===r?n.nodes()[0].contentDocument.body:"body"),a=("sandbox"===r?n.nodes()[0].contentDocument:document,i.select("[id='".concat(e,"']")));!function(t,e){var n=t.append("defs").append("marker").attr("id",rT.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");n.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),n.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),n.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",rT.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d","M0,0\n L".concat(e.line_height,",").concat(e.line_height/2,"\n M").concat(e.line_height,",").concat(e.line_height/2,"\n L0,").concat(e.line_height)).attr("stroke-width",1)}(a,aT);var s=new(t_().Graph)({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:aT.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}})),c=nT.getRequirements(),u=nT.getElements(),l=nT.getRelationships();!function(t,e,n){Object.keys(t).forEach((function(r){var i=t[r];r=lT(r),o.info("Added new requirement: ",r);var a=n.append("g").attr("id",r),s=sT(a,"req-"+r),c=[],u=cT(a,r+"_title",["<<".concat(i.type,">>"),"".concat(i.name)]);c.push(u.titleNode);var l=uT(a,r+"_body",["Id: ".concat(i.id),"Text: ".concat(i.text),"Risk: ".concat(i.risk),"Verification: ".concat(i.verifyMethod)],u.y);c.push(l);var h=s.node().getBBox();e.setNode(r,{width:h.width,height:h.height,shape:"rect",id:r})}))}(c,s,a),function(t,e,n){Object.keys(t).forEach((function(r){var i=t[r],a=lT(r),o=n.append("g").attr("id",a),s="element-"+a,c=sT(o,s),u=[],l=cT(o,s+"_title",["<<Element>>","".concat(r)]);u.push(l.titleNode);var h=uT(o,s+"_body",["Type: ".concat(i.type||"Not Specified"),"Doc Ref: ".concat(i.docRef||"None")],l.y);u.push(h);var f=c.node().getBBox();e.setNode(a,{width:f.width,height:f.height,shape:"rect",id:a})}))}(u,s,a),function(t,e){t.forEach((function(t){var n=lT(t.src),r=lT(t.dst);e.setEdge(n,r,{relationship:t})}))}(l,s),Kb().layout(s),function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&(t.select("#"+n),t.select("#"+n).attr("transform","translate("+(e.node(n).x-e.node(n).width/2)+","+(e.node(n).y-e.node(n).height/2)+" )"))}))}(a,s),l.forEach((function(t){!function(t,e,n,r){var i=n.edge(lT(e.src),lT(e.dst)),a=Uu().x((function(t){return t.x})).y((function(t){return t.y})),o=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",a(i.points)).attr("fill","none");e.type==nT.Relationships.CONTAINS?o.attr("marker-start","url("+$m.getUrl(aT.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+$m.getUrl(aT.arrowMarkerAbsolute)+"#"+iT.ARROW+"_line_ending)")),function(t,e,n,r){var i=e.node().getTotalLength(),a=e.node().getPointAtLength(.5*i),o="rel"+oT;oT++;var s=t.append("text").attr("class","req relationshipLabel").attr("id",o).attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(r).node().getBBox();t.insert("rect","#"+o).attr("class","req reqLabelBox").attr("x",a.x-s.width/2).attr("y",a.y-s.height/2).attr("width",s.width).attr("height",s.height).attr("fill","white").attr("fill-opacity","85%")}(t,o,0,"<<".concat(e.type,">>"))}(a,t,s,e)}));var h=aT.rect_padding,f=a.node().getBBox(),d=f.width+2*h,p=f.height+2*h;lb(a,p,d,aT.useMaxWidth),a.attr("viewBox","".concat(f.x-h," ").concat(f.y-h," ").concat(d," ").concat(p)),f_(Xk.parser.yy,a,e)};var dT=n(6876),pT=n.n(dT),gT=void 0,yT={},mT=[],vT=[],bT="",_T=!1,xT=!1,wT=function(t,e,n,r){var i=yT[t];i&&e===i.name&&null==n||(null!=n&&null!=n.text||(n={text:e,wrap:null,type:r}),null!=r&&null!=n.text||(n={text:e,wrap:null,type:r}),yT[t]={name:e,description:n.text,wrap:void 0===n.wrap&&ET()||!!n.wrap,prevActor:gT,links:{},properties:{},actorCnt:null,rectData:null,type:r||"participant"},gT&&yT[gT]&&(yT[gT].nextActor=t),gT=t)},kT=function(t){var e,n=0;for(e=0;e<mT.length;e++)mT[e].type===ST.ACTIVE_START&&mT[e].from.actor===t&&n++,mT[e].type===ST.ACTIVE_END&&mT[e].from.actor===t&&n--;return n},TT=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{text:void 0,wrap:void 0},r=arguments.length>3?arguments[3]:void 0;if(r===ST.ACTIVE_END){var i=kT(t.actor);if(i<1){var a=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw a.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a}}return mT.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&ET()||!!n.wrap,type:r}),!0},CT=function(t){return yT[t]},ET=function(){return xT},ST={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26},AT=function(t,e,n){var r={actor:t,placement:e,message:n.text,wrap:void 0===n.wrap&&ET()||!!n.wrap},i=[].concat(t,t);vT.push(r),mT.push({from:i[0],to:i[1],message:n.text,wrap:void 0===n.wrap&&ET()||!!n.wrap,type:ST.NOTE,placement:e})},MT=function(t,e){var n=CT(t);try{var r=Pm(e.text,wb());r=(r=r.replace(/&amp;/g,"&")).replace(/&equals;/g,"="),NT(n,JSON.parse(r))}catch(t){o.error("error while parsing actor link text",t)}};function NT(t,e){if(null==t.links)t.links=e;else for(var n in e)t.links[n]=e[n]}var DT=function(t,e){var n=CT(t);try{var r=Pm(e.text,wb());BT(n,JSON.parse(r))}catch(t){o.error("error while parsing actor properties text",t)}};function BT(t,e){if(null==t.properties)t.properties=e;else for(var n in e)t.properties[n]=e[n]}var LT=function(t,e){var n=CT(t),r=document.getElementById(e.text);try{var i=r.innerHTML,a=JSON.parse(i);a.properties&&BT(n,a.properties),a.links&&NT(n,a.links)}catch(t){o.error("error while parsing actor details text",t)}};const OT={addActor:wT,addMessage:function(t,e,n,r){mT.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&ET()||!!n.wrap,answer:r})},addSignal:TT,addLinks:MT,addDetails:LT,addProperties:DT,autoWrap:ET,setWrap:function(t){xT=t},enableSequenceNumbers:function(){_T=!0},disableSequenceNumbers:function(){_T=!1},showSequenceNumbers:function(){return _T},getMessages:function(){return mT},getActors:function(){return yT},getActor:CT,getActorKeys:function(){return Object.keys(yT)},getActorProperty:function(t,e){if(void 0!==t&&void 0!==t.properties)return t.properties[e]},getTitle:Db,getDiagramTitle:function(){return bT},parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().sequence},clear:function(){yT={},mT=[],_T=!1,bT="",Mb()},parseMessage:function(t){var e=t.trim(),n={text:e.replace(/^[:]?(?:no)?wrap:/,"").trim(),wrap:null!==e.match(/^[:]?wrap:/)||null===e.match(/^[:]?nowrap:/)&&void 0};return o.debug("parseMessage:",n),n},LINETYPE:ST,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:AT,setTitle:Nb,setDiagramTitle:function(t){var e=Pm(t,wb());bT=e},apply:function t(e){if(e instanceof Array)e.forEach((function(e){t(e)}));else switch(e.type){case"sequenceIndex":mT.push({from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case"addParticipant":wT(e.actor,e.actor,e.description,"participant");break;case"addActor":wT(e.actor,e.actor,e.description,"actor");break;case"activeStart":case"activeEnd":TT(e.actor,void 0,void 0,e.signalType);break;case"addNote":AT(e.actor,e.placement,e.text);break;case"addLinks":MT(e.actor,e.text);break;case"addALink":!function(t,e){var n=CT(t);try{var r={},i=Pm(e.text,wb()),a=i.indexOf("@"),s=(i=(i=i.replace(/&amp;/g,"&")).replace(/&equals;/g,"=")).slice(0,a-1).trim(),c=i.slice(a+1).trim();r[s]=c,NT(n,r)}catch(t){o.error("error while parsing actor link text",t)}}(e.actor,e.text);break;case"addProperties":DT(e.actor,e.text);break;case"addDetails":LT(e.actor,e.text);break;case"addMessage":TT(e.from,e.to,e.msg,e.signalType);break;case"loopStart":TT(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":case"rectEnd":case"optEnd":case"altEnd":case"parEnd":TT(void 0,void 0,void 0,e.signalType);break;case"rectStart":TT(void 0,void 0,e.color,e.signalType);break;case"optStart":TT(void 0,void 0,e.optText,e.signalType);break;case"altStart":case"else":TT(void 0,void 0,e.altText,e.signalType);break;case"setTitle":Nb(e.text);break;case"parStart":case"and":TT(void 0,void 0,e.parText,e.signalType)}},setAccDescription:Bb,getAccDescription:Lb};var IT=[],RT=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},FT=function(t,e){var n;n=function(){var n=document.querySelectorAll(t);0!==n.length&&(n[0].addEventListener("mouseover",(function(){jT("actor"+e+"_popup")})),n[0].addEventListener("mouseout",(function(){UT("actor"+e+"_popup")})))},IT.push(n)},PT=function(t,e,n,r){var i=t.append("image");i.attr("x",e),i.attr("y",n);var a=(0,Bm.N)(r);i.attr("xlink:href",a)},YT=function(t,e,n,r){var i=t.append("use");i.attr("x",e),i.attr("y",n);var a=(0,Bm.N)(r);i.attr("xlink:href","#"+a)},jT=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="block")},UT=function(t){var e=document.getElementById(t);null!=e&&(e.style.display="none")},zT=function(t,e){var n=0,r=0,i=e.text.split($m.lineBreakRegex),a=[],o=0,s=function(){return e.y};if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":s=function(){return Math.round(e.y+e.textMargin)};break;case"middle":case"center":s=function(){return Math.round(e.y+(n+r+e.textMargin)/2)};break;case"bottom":case"end":s=function(){return Math.round(e.y+(n+r+2*e.textMargin)-e.textMargin)}}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="text-after-edge",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="text-before-edge",e.alignmentBaseline="middle"}for(var c=0;c<i.length;c++){var u=i[c];void 0!==e.textMargin&&0===e.textMargin&&void 0!==e.fontSize&&(o=c*e.fontSize);var l=t.append("text");if(l.attr("x",e.x),l.attr("y",s()),void 0!==e.anchor&&l.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&l.style("font-family",e.fontFamily),void 0!==e.fontSize&&l.style("font-size",e.fontSize),void 0!==e.fontWeight&&l.style("font-weight",e.fontWeight),void 0!==e.fill&&l.attr("fill",e.fill),void 0!==e.class&&l.attr("class",e.class),void 0!==e.dy?l.attr("dy",e.dy):0!==o&&l.attr("dy",o),e.tspan){var h=l.append("tspan");h.attr("x",e.x),void 0!==e.fill&&h.attr("fill",e.fill),h.text(u)}else l.text(u);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(l._groups||l)[0][0].getBBox().height,n=r),a.push(l)}return a},$T=function(t,e){var n=t.append("polygon");return n.attr("points",function(t,e,n,r,i){return t+","+e+" "+(t+n)+","+e+" "+(t+n)+","+(e+r-7)+" "+(t+n-8.4)+","+(e+r)+" "+t+","+(e+r)}(e.x,e.y,e.width,e.height)),n.attr("class","labelBox"),e.y=e.y+e.height/2,zT(t,e),n},qT=-1,HT=function(t,e){t.selectAll&&t.selectAll(".actor-line").attr("class","200").attr("y2",e-55)},WT=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},VT=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},GT=function(){function t(t,e,n,i,a,o,s){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c){for(var u=c.actorFontSize,l=c.actorFontFamily,h=c.actorFontWeight,f=t.split($m.lineBreakRegex),d=0;d<f.length;d++){var p=d*u-u*(f.length-1)/2,g=e.append("text").attr("x",n+a/2).attr("y",i).style("text-anchor","middle").style("font-size",u).style("font-weight",h).style("font-family",l);g.append("tspan").attr("x",n+a/2).attr("dy",p).text(f[d]),g.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(g,s)}}function n(t,n,i,a,o,s,c,u){var l=n.append("switch"),h=l.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,i,a,o,s,c,u),r(h,c)}function r(t,e){for(var n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),XT=function(){function t(t,e,n,i,a,o,s){r(e.append("text").attr("x",n).attr("y",i).style("text-anchor","start").text(t),s)}function e(t,e,n,i,a,o,s,c){for(var u=c.actorFontSize,l=c.actorFontFamily,h=c.actorFontWeight,f=t.split($m.lineBreakRegex),d=0;d<f.length;d++){var p=d*u-u*(f.length-1)/2,g=e.append("text").attr("x",n).attr("y",i).style("text-anchor","start").style("font-size",u).style("font-weight",h).style("font-family",l);g.append("tspan").attr("x",n).attr("dy",p).text(f[d]),g.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(g,s)}}function n(t,n,i,a,o,s,c,u){var l=n.append("switch"),h=l.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,i,a,0,s,c,u),r(h,c)}function r(t,e){for(var n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}();const ZT=RT,QT=function(t,e,n){switch(e.type){case"actor":return function(t,e,n){var r=e.x+e.width/2;0===e.y&&(qT++,t.append("line").attr("id","actor"+qT).attr("x1",r).attr("y1",80).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));var i=t.append("g");i.attr("class","actor-man");var a={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};a.x=e.x,a.y=e.y,a.fill="#eaeaea",a.width=e.width,a.height=e.height,a.class="actor",a.rx=3,a.ry=3,i.append("line").attr("id","actor-man-torso"+qT).attr("x1",r).attr("y1",e.y+25).attr("x2",r).attr("y2",e.y+45),i.append("line").attr("id","actor-man-arms"+qT).attr("x1",r-18).attr("y1",e.y+33).attr("x2",r+18).attr("y2",e.y+33),i.append("line").attr("x1",r-18).attr("y1",e.y+60).attr("x2",r).attr("y2",e.y+45),i.append("line").attr("x1",r).attr("y1",e.y+45).attr("x2",r+16).attr("y2",e.y+60);var o=i.append("circle");o.attr("cx",e.x+e.width/2),o.attr("cy",e.y+10),o.attr("r",15),o.attr("width",e.width),o.attr("height",e.height);var s=i.node().getBBox();return e.height=s.height,GT(n)(e.description,i,a.x,a.y+35,a.width,a.height,{class:"actor"},n),e.height}(t,e,n);case"participant":return function(t,e,n){var r=e.x+e.width/2,i=t.append("g"),a=i;0===e.y&&(qT++,a.append("line").attr("id","actor"+qT).attr("x1",r).attr("y1",5).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),a=i.append("g"),e.actorCnt=qT,null!=e.links&&(a.attr("id","root-"+qT),FT("#root-"+qT,qT)));var o={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0},s="actor";null!=e.properties&&e.properties.class?s=e.properties.class:o.fill="#eaeaea",o.x=e.x,o.y=e.y,o.width=e.width,o.height=e.height,o.class=s,o.rx=3,o.ry=3;var c=RT(a,o);if(e.rectData=o,null!=e.properties&&e.properties.icon){var u=e.properties.icon.trim();"@"===u.charAt(0)?YT(a,o.x+o.width-20,o.y+10,u.substr(1)):PT(a,o.x+o.width-20,o.y+10,u)}GT(n)(e.description,a,o.x,o.y,o.width,o.height,{class:"actor"},n);var l=e.height;if(c.node){var h=c.node().getBBox();e.height=h.height,l=h.height}return l}(t,e,n)}},KT=function(t,e,n,r,i){if(void 0===e.links||null===e.links||0===Object.keys(e.links).length)return{height:0,width:0};var a=e.links,o=e.actorCnt,s=e.rectData,c="none";i&&(c="block !important");var u=t.append("g");u.attr("id","actor"+o+"_popup"),u.attr("class","actorPopupMenu"),u.attr("display",c),FT("#actor"+o+"_popup",o);var l="";void 0!==s.class&&(l=" "+s.class);var h=s.width>n?s.width:n,f=u.append("rect");if(f.attr("class","actorPopupMenuPanel"+l),f.attr("x",s.x),f.attr("y",s.height),f.attr("fill",s.fill),f.attr("stroke",s.stroke),f.attr("width",h),f.attr("height",s.height),f.attr("rx",s.rx),f.attr("ry",s.ry),null!=a){var d=20;for(var p in a){var g=u.append("a"),y=(0,Bm.N)(a[p]);g.attr("xlink:href",y),g.attr("target","_blank"),XT(r)(p,g,s.x+10,s.height+d,h,20,{class:"actor"},r),d+=30}}return f.attr("height",d),{height:s.height+d,width:h}},JT=function(t){return t.append("g")},tC=function(t,e,n,r,i){var a={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0},o=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=n-e.starty,RT(o,a)},eC=function(t,e,n,r){var i=r.boxMargin,a=r.boxTextMargin,o=r.labelBoxHeight,s=r.labelBoxWidth,c=r.messageFontFamily,u=r.messageFontSize,l=r.messageFontWeight,h=t.append("g"),f=function(t,e,n,r){return h.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("class","loopLine")};f(e.startx,e.starty,e.stopx,e.starty),f(e.stopx,e.starty,e.stopx,e.stopy),f(e.startx,e.stopy,e.stopx,e.stopy),f(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){f(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));var d={x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0};d.text=n,d.x=e.startx,d.y=e.starty,d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.anchor="middle",d.valign="middle",d.tspan=!1,d.width=s||50,d.height=o||20,d.textMargin=a,d.class="labelText",$T(h,d),(d={x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}).text=e.title,d.x=e.startx+s/2+(e.stopx-e.startx)/2,d.y=e.starty+i+a,d.anchor="middle",d.valign="middle",d.textMargin=a,d.class="loopText",d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.wrap=!0;var p=zT(h,d);return void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,n){if(t.message){d.text=t.message,d.x=e.startx+(e.stopx-e.startx)/2,d.y=e.sections[n].y+i+a,d.class="loopText",d.anchor="middle",d.valign="middle",d.tspan=!1,d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.wrap=e.wrap,p=zT(h,d);var r=Math.round(p.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));e.sections[n].height+=r-(i+a)}})),e.height=Math.round(e.stopy-e.starty),h},nC=function(t,e){RT(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},rC=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},iC=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},aC=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},oC=function(t){var e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},sC=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},cC=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},uC=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},lC=WT,hC=VT;Bm.N;dT.parser.yy=OT;var fC={},dC={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((function(t){return t.height||0})))+(0===this.loops.length?0:this.loops.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.messages.length?0:this.messages.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.notes.length?0:this.notes.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))},clear:function(){this.actors=[],this.loops=[],this.messages=[],this.notes=[]},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,bC(dT.parser.yy.getConfig())},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i=this,a=0;function o(o){return function(s){a++;var c=i.sequenceItems.length-a+1;i.updateVal(s,"starty",e-c*fC.boxMargin,Math.min),i.updateVal(s,"stopy",r+c*fC.boxMargin,Math.max),i.updateVal(dC.data,"startx",t-c*fC.boxMargin,Math.min),i.updateVal(dC.data,"stopx",n+c*fC.boxMargin,Math.max),"activation"!==o&&(i.updateVal(s,"startx",t-c*fC.boxMargin,Math.min),i.updateVal(s,"stopx",n+c*fC.boxMargin,Math.max),i.updateVal(dC.data,"starty",e-c*fC.boxMargin,Math.min),i.updateVal(dC.data,"stopy",r+c*fC.boxMargin,Math.max))}}this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(dC.data,"startx",i,Math.min),this.updateVal(dC.data,"starty",o,Math.min),this.updateVal(dC.data,"stopx",a,Math.max),this.updateVal(dC.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},newActivation:function(t,e,n){var r=n[t.from.actor],i=_C(t.from.actor).length||0,a=r.x+r.width/2+(i-1)*fC.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+fC.activationWidth,stopy:void 0,actor:t.from.actor,anchored:JT(e)})},endActivation:function(t){var e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:dC.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},pC=function(t){return{fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}},gC=function(t){return{fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}},yC=function(t){return{fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}},mC=function(t,e,n,r,i,a){if(!0===i.hideUnusedParticipants){var o=new Set;a.forEach((function(t){o.add(t.from),o.add(t.to)})),n=n.filter((function(t){return o.has(t)}))}for(var s=0,c=0,u=0,l=0;l<n.length;l++){var h=e[n[l]];h.width=h.width||fC.width,h.height=Math.max(h.height||fC.height,fC.height),h.margin=h.margin||fC.actorMargin,h.x=s+c,h.y=r;var f=QT(t,h,fC);u=Math.max(u,f),dC.insert(h.x,r,h.x+h.width,h.height),s+=h.width,c+=h.margin,dC.models.addActor(h)}dC.bumpVerticalPos(u)},vC=function(t,e,n,r){for(var i=0,a=0,o=0;o<n.length;o++){var s=e[n[o]],c=kC(s),u=KT(t,s,c,fC,fC.forceMenus,r);u.height>i&&(i=u.height),u.width+s.x>a&&(a=u.width+s.x)}return{maxHeight:i,maxWidth:a}},bC=function(t){rb(fC,t),t.fontFamily&&(fC.actorFontFamily=fC.noteFontFamily=fC.messageFontFamily=t.fontFamily),t.fontSize&&(fC.actorFontSize=fC.noteFontSize=fC.messageFontSize=t.fontSize),t.fontWeight&&(fC.actorFontWeight=fC.noteFontWeight=fC.messageFontWeight=t.fontWeight)},_C=function(t){return dC.activations.filter((function(e){return e.actor===t}))},xC=function(t,e){var n=e[t],r=_C(t);return[r.reduce((function(t,e){return Math.min(t,e.startx)}),n.x+n.width/2),r.reduce((function(t,e){return Math.max(t,e.stopx)}),n.x+n.width/2)]};function wC(t,e,n,r,i){dC.bumpVerticalPos(n);var a=r;if(e.id&&e.message&&t[e.id]){var s=t[e.id].width,c=pC(fC);e.message=db.wrapLabel("[".concat(e.message,"]"),s-2*fC.wrapPadding,c),e.width=s,e.wrap=!0;var u=db.calculateTextDimensions(e.message,c),l=Math.max(u.height,fC.labelBoxHeight);a=r+l,o.debug("".concat(l," - ").concat(e.message))}i(e),dC.bumpVerticalPos(a)}var kC=function(t){var e=0,n=yC(fC);for(var r in t.links){var i=db.calculateTextDimensions(r,n).width+2*fC.wrapPadding+2*fC.boxMargin;e<i&&(e=i)}return e};const TC={bounds:dC,drawActors:mC,drawActorsPopup:vC,setConf:bC,draw:function(t,e){fC=wb().sequence;var n,r=wb().securityLevel;"sandbox"===r&&(n=au("#i"+e));var i=au("sandbox"===r?n.nodes()[0].contentDocument.body:"body"),a="sandbox"===r?n.nodes()[0].contentDocument:document;dT.parser.yy.clear(),dT.parser.yy.setWrap(fC.wrap),dT.parser.parse(t+"\n"),dC.init(),o.debug("C:".concat(JSON.stringify(fC,null,2)));var s="sandbox"===r?i.select('[id="'.concat(e,'"]')):au('[id="'.concat(e,'"]')),c=dT.parser.yy.getActors(),u=dT.parser.yy.getActorKeys(),l=dT.parser.yy.getMessages(),h=dT.parser.yy.getDiagramTitle(),f=function(t,e){var n={};return e.forEach((function(e){if(t[e.to]&&t[e.from]){var r=t[e.to];if(e.placement===dT.parser.yy.PLACEMENT.LEFTOF&&!r.prevActor)return;if(e.placement===dT.parser.yy.PLACEMENT.RIGHTOF&&!r.nextActor)return;var i=void 0!==e.placement,a=!i,o=i?gC(fC):pC(fC),s=e.wrap?db.wrapLabel(e.message,fC.width-2*fC.wrapPadding,o):e.message,c=db.calculateTextDimensions(s,o).width+2*fC.wrapPadding;a&&e.from===r.nextActor?n[e.to]=Math.max(n[e.to]||0,c):a&&e.from===r.prevActor?n[e.from]=Math.max(n[e.from]||0,c):a&&e.from===e.to?(n[e.from]=Math.max(n[e.from]||0,c/2),n[e.to]=Math.max(n[e.to]||0,c/2)):e.placement===dT.parser.yy.PLACEMENT.RIGHTOF?n[e.from]=Math.max(n[e.from]||0,c):e.placement===dT.parser.yy.PLACEMENT.LEFTOF?n[r.prevActor]=Math.max(n[r.prevActor]||0,c):e.placement===dT.parser.yy.PLACEMENT.OVER&&(r.prevActor&&(n[r.prevActor]=Math.max(n[r.prevActor]||0,c/2)),r.nextActor&&(n[e.from]=Math.max(n[e.from]||0,c/2)))}})),o.debug("maxMessageWidthPerActor:",n),n}(c,l);fC.height=function(t,e){var n=0;for(var r in Object.keys(t).forEach((function(e){var r=t[e];r.wrap&&(r.description=db.wrapLabel(r.description,fC.width-2*fC.wrapPadding,yC(fC)));var i=db.calculateTextDimensions(r.description,yC(fC));r.width=r.wrap?fC.width:Math.max(fC.width,i.width+2*fC.wrapPadding),r.height=r.wrap?Math.max(i.height,fC.height):fC.height,n=Math.max(n,r.height)})),e){var i=t[r];if(i){var a=t[i.nextActor];if(a){var o=e[r]+fC.actorMargin-i.width/2-a.width/2;i.margin=Math.max(o,fC.actorMargin)}}}return Math.max(n,fC.height)}(c,f),cC(s),sC(s),uC(s),mC(s,c,u,0,fC,l);var d=function(t,e){var n,r,i,a={},s=[];return t.forEach((function(t){switch(t.id=db.random({length:10}),t.type){case dT.parser.yy.LINETYPE.LOOP_START:case dT.parser.yy.LINETYPE.ALT_START:case dT.parser.yy.LINETYPE.OPT_START:case dT.parser.yy.LINETYPE.PAR_START:s.push({id:t.id,msg:t.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case dT.parser.yy.LINETYPE.ALT_ELSE:case dT.parser.yy.LINETYPE.PAR_AND:t.message&&(n=s.pop(),a[n.id]=n,a[t.id]=n,s.push(n));break;case dT.parser.yy.LINETYPE.LOOP_END:case dT.parser.yy.LINETYPE.ALT_END:case dT.parser.yy.LINETYPE.OPT_END:case dT.parser.yy.LINETYPE.PAR_END:n=s.pop(),a[n.id]=n;break;case dT.parser.yy.LINETYPE.ACTIVE_START:var c=e[t.from?t.from.actor:t.to.actor],u=_C(t.from?t.from.actor:t.to.actor).length,l=c.x+c.width/2+(u-1)*fC.activationWidth/2,h={startx:l,stopx:l+fC.activationWidth,actor:t.from.actor,enabled:!0};dC.activations.push(h);break;case dT.parser.yy.LINETYPE.ACTIVE_END:var f=dC.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);delete dC.activations.splice(f,1)[0]}void 0!==t.placement?(r=function(t,e){var n=e[t.from].x,r=e[t.to].x,i=t.wrap&&t.message,a=db.calculateTextDimensions(i?db.wrapLabel(t.message,fC.width,gC(fC)):t.message,gC(fC)),s={width:i?fC.width:Math.max(fC.width,a.width+2*fC.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===dT.parser.yy.PLACEMENT.RIGHTOF?(s.width=i?Math.max(fC.width,a.width):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*fC.noteMargin),s.startx=n+(e[t.from].width+fC.actorMargin)/2):t.placement===dT.parser.yy.PLACEMENT.LEFTOF?(s.width=i?Math.max(fC.width,a.width+2*fC.noteMargin):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*fC.noteMargin),s.startx=n-s.width+(e[t.from].width-fC.actorMargin)/2):t.to===t.from?(a=db.calculateTextDimensions(i?db.wrapLabel(t.message,Math.max(fC.width,e[t.from].width),gC(fC)):t.message,gC(fC)),s.width=i?Math.max(fC.width,e[t.from].width):Math.max(e[t.from].width,fC.width,a.width+2*fC.noteMargin),s.startx=n+(e[t.from].width-s.width)/2):(s.width=Math.abs(n+e[t.from].width/2-(r+e[t.to].width/2))+fC.actorMargin,s.startx=n<r?n+e[t.from].width/2-fC.actorMargin/2:r+e[t.to].width/2-fC.actorMargin/2),i&&(s.message=db.wrapLabel(t.message,s.width-2*fC.wrapPadding,gC(fC))),o.debug("NM:[".concat(s.startx,",").concat(s.stopx,",").concat(s.starty,",").concat(s.stopy,":").concat(s.width,",").concat(s.height,"=").concat(t.message,"]")),s}(t,e),t.noteModel=r,s.forEach((function(t){(n=t).from=Math.min(n.from,r.startx),n.to=Math.max(n.to,r.startx+r.width),n.width=Math.max(n.width,Math.abs(n.from-n.to))-fC.labelBoxWidth}))):(i=function(t,e){var n=!1;if([dT.parser.yy.LINETYPE.SOLID_OPEN,dT.parser.yy.LINETYPE.DOTTED_OPEN,dT.parser.yy.LINETYPE.SOLID,dT.parser.yy.LINETYPE.DOTTED,dT.parser.yy.LINETYPE.SOLID_CROSS,dT.parser.yy.LINETYPE.DOTTED_CROSS,dT.parser.yy.LINETYPE.SOLID_POINT,dT.parser.yy.LINETYPE.DOTTED_POINT].includes(t.type)&&(n=!0),!n)return{};var r=xC(t.from,e),i=xC(t.to,e),a=r[0]<=i[0]?1:0,o=r[0]<i[0]?0:1,s=r.concat(i),c=Math.abs(i[o]-r[a]);t.wrap&&t.message&&(t.message=db.wrapLabel(t.message,Math.max(c+2*fC.wrapPadding,fC.width),pC(fC)));var u=db.calculateTextDimensions(t.message,pC(fC));return{width:Math.max(t.wrap?0:u.width+2*fC.wrapPadding,c+2*fC.wrapPadding,fC.width),height:0,startx:r[a],stopx:i[o],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,s),toBounds:Math.max.apply(null,s)}}(t,e),t.msgModel=i,i.startx&&i.stopx&&s.length>0&&s.forEach((function(r){if(n=r,i.startx===i.stopx){var a=e[t.from],o=e[t.to];n.from=Math.min(a.x-i.width/2,a.x-a.width/2,n.from),n.to=Math.max(o.x+i.width/2,o.x+a.width/2,n.to),n.width=Math.max(n.width,Math.abs(n.to-n.from))-fC.labelBoxWidth}else n.from=Math.min(i.startx,n.from),n.to=Math.max(i.stopx,n.to),n.width=Math.max(n.width,i.width)-fC.labelBoxWidth})))})),dC.activations=[],o.debug("Loop type widths:",a),a}(l,c);rC(s),oC(s),iC(s),aC(s);var p=1,g=1,y=Array();l.forEach((function(t){var e,n,r;switch(t.type){case dT.parser.yy.LINETYPE.NOTE:n=t.noteModel,function(t,e){dC.bumpVerticalPos(fC.boxMargin),e.height=fC.boxMargin,e.starty=dC.getVerticalPos();var n=hC();n.x=e.startx,n.y=e.starty,n.width=e.width||fC.width,n.class="note";var r=t.append("g"),i=ZT(r,n),a=lC();a.x=e.startx,a.y=e.starty,a.width=n.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=fC.noteFontFamily,a.fontSize=fC.noteFontSize,a.fontWeight=fC.noteFontWeight,a.anchor=fC.noteAlign,a.textMargin=fC.noteMargin,a.valign=fC.noteAlign;var o=zT(r,a),s=Math.round(o.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));i.attr("height",s+2*fC.noteMargin),e.height+=s+2*fC.noteMargin,dC.bumpVerticalPos(s+2*fC.noteMargin),e.stopy=e.starty+s+2*fC.noteMargin,e.stopx=e.startx+n.width,dC.insert(e.startx,e.starty,e.stopx,e.stopy),dC.models.addNote(e)}(s,n);break;case dT.parser.yy.LINETYPE.ACTIVE_START:dC.newActivation(t,s,c);break;case dT.parser.yy.LINETYPE.ACTIVE_END:!function(t,e){var n=dC.endActivation(t);n.starty+18>e&&(n.starty=e-6,e+=12),tC(s,n,e,fC,_C(t.from.actor).length),dC.insert(n.startx,e-10,n.stopx,e)}(t,dC.getVerticalPos());break;case dT.parser.yy.LINETYPE.LOOP_START:wC(d,t,fC.boxMargin,fC.boxMargin+fC.boxTextMargin,(function(t){return dC.newLoop(t)}));break;case dT.parser.yy.LINETYPE.LOOP_END:e=dC.endLoop(),eC(s,e,"loop",fC),dC.bumpVerticalPos(e.stopy-dC.getVerticalPos()),dC.models.addLoop(e);break;case dT.parser.yy.LINETYPE.RECT_START:wC(d,t,fC.boxMargin,fC.boxMargin,(function(t){return dC.newLoop(void 0,t.message)}));break;case dT.parser.yy.LINETYPE.RECT_END:e=dC.endLoop(),nC(s,e),dC.models.addLoop(e),dC.bumpVerticalPos(e.stopy-dC.getVerticalPos());break;case dT.parser.yy.LINETYPE.OPT_START:wC(d,t,fC.boxMargin,fC.boxMargin+fC.boxTextMargin,(function(t){return dC.newLoop(t)}));break;case dT.parser.yy.LINETYPE.OPT_END:e=dC.endLoop(),eC(s,e,"opt",fC),dC.bumpVerticalPos(e.stopy-dC.getVerticalPos()),dC.models.addLoop(e);break;case dT.parser.yy.LINETYPE.ALT_START:wC(d,t,fC.boxMargin,fC.boxMargin+fC.boxTextMargin,(function(t){return dC.newLoop(t)}));break;case dT.parser.yy.LINETYPE.ALT_ELSE:wC(d,t,fC.boxMargin+fC.boxTextMargin,fC.boxMargin,(function(t){return dC.addSectionToLoop(t)}));break;case dT.parser.yy.LINETYPE.ALT_END:e=dC.endLoop(),eC(s,e,"alt",fC),dC.bumpVerticalPos(e.stopy-dC.getVerticalPos()),dC.models.addLoop(e);break;case dT.parser.yy.LINETYPE.PAR_START:wC(d,t,fC.boxMargin,fC.boxMargin+fC.boxTextMargin,(function(t){return dC.newLoop(t)}));break;case dT.parser.yy.LINETYPE.PAR_AND:wC(d,t,fC.boxMargin+fC.boxTextMargin,fC.boxMargin,(function(t){return dC.addSectionToLoop(t)}));break;case dT.parser.yy.LINETYPE.PAR_END:e=dC.endLoop(),eC(s,e,"par",fC),dC.bumpVerticalPos(e.stopy-dC.getVerticalPos()),dC.models.addLoop(e);break;case dT.parser.yy.LINETYPE.AUTONUMBER:p=t.message.start||p,g=t.message.step||g,t.message.visible?dT.parser.yy.enableSequenceNumbers():dT.parser.yy.disableSequenceNumbers();break;default:try{(r=t.msgModel).starty=dC.getVerticalPos(),r.sequenceIndex=p,r.sequenceVisible=dT.parser.yy.showSequenceNumbers();var i=function(t,e){dC.bumpVerticalPos(10);var n,r=e.startx,i=e.stopx,a=e.message,o=$m.splitBreaks(a).length,s=db.calculateTextDimensions(a,pC(fC)),c=s.height/o;e.height+=c,dC.bumpVerticalPos(c);var u=s.height-10,l=s.width;if(r===i){n=dC.getVerticalPos()+u,fC.rightAngles||(u+=fC.boxMargin,n=dC.getVerticalPos()+u),u+=30;var h=Math.max(l/2,fC.width/2);dC.insert(r-h,dC.getVerticalPos()-10+u,i+h,dC.getVerticalPos()+30+u)}else u+=fC.boxMargin,n=dC.getVerticalPos()+u,dC.insert(r,n-10,i,n);return dC.bumpVerticalPos(u),e.height+=u,e.stopy=e.starty+e.height,dC.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),n}(0,r);y.push({messageModel:r,lineStarty:i}),dC.models.addMessage(r)}catch(t){o.error("error while drawing message",t)}}[dT.parser.yy.LINETYPE.SOLID_OPEN,dT.parser.yy.LINETYPE.DOTTED_OPEN,dT.parser.yy.LINETYPE.SOLID,dT.parser.yy.LINETYPE.DOTTED,dT.parser.yy.LINETYPE.SOLID_CROSS,dT.parser.yy.LINETYPE.DOTTED_CROSS,dT.parser.yy.LINETYPE.SOLID_POINT,dT.parser.yy.LINETYPE.DOTTED_POINT].includes(t.type)&&(p+=g)})),y.forEach((function(t){return function(t,e,n){var r=e.startx,i=e.stopx,a=e.starty,o=e.message,s=e.type,c=e.sequenceIndex,u=e.sequenceVisible,l=db.calculateTextDimensions(o,pC(fC)),h=lC();h.x=r,h.y=a+10,h.width=i-r,h.class="messageText",h.dy="1em",h.text=o,h.fontFamily=fC.messageFontFamily,h.fontSize=fC.messageFontSize,h.fontWeight=fC.messageFontWeight,h.anchor=fC.messageAlign,h.valign=fC.messageAlign,h.textMargin=fC.wrapPadding,h.tspan=!1,zT(t,h);var f,d=l.width;r===i?f=fC.rightAngles?t.append("path").attr("d","M ".concat(r,",").concat(n," H ").concat(r+Math.max(fC.width/2,d/2)," V ").concat(n+25," H ").concat(r)):t.append("path").attr("d","M "+r+","+n+" C "+(r+60)+","+(n-10)+" "+(r+60)+","+(n+30)+" "+r+","+(n+20)):((f=t.append("line")).attr("x1",r),f.attr("y1",n),f.attr("x2",i),f.attr("y2",n)),s===dT.parser.yy.LINETYPE.DOTTED||s===dT.parser.yy.LINETYPE.DOTTED_CROSS||s===dT.parser.yy.LINETYPE.DOTTED_POINT||s===dT.parser.yy.LINETYPE.DOTTED_OPEN?(f.style("stroke-dasharray","3, 3"),f.attr("class","messageLine1")):f.attr("class","messageLine0");var p="";fC.arrowMarkerAbsolute&&(p=(p=(p=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),f.attr("stroke-width",2),f.attr("stroke","none"),f.style("fill","none"),s!==dT.parser.yy.LINETYPE.SOLID&&s!==dT.parser.yy.LINETYPE.DOTTED||f.attr("marker-end","url("+p+"#arrowhead)"),s!==dT.parser.yy.LINETYPE.SOLID_POINT&&s!==dT.parser.yy.LINETYPE.DOTTED_POINT||f.attr("marker-end","url("+p+"#filled-head)"),s!==dT.parser.yy.LINETYPE.SOLID_CROSS&&s!==dT.parser.yy.LINETYPE.DOTTED_CROSS||f.attr("marker-end","url("+p+"#crosshead)"),(u||fC.showSequenceNumbers)&&(f.attr("marker-start","url("+p+"#sequencenumber)"),t.append("text").attr("x",r).attr("y",n+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("textLength","16px").attr("class","sequenceNumber").text(c))}(s,t.messageModel,t.lineStarty)})),fC.mirrorActors&&(dC.bumpVerticalPos(2*fC.boxMargin),mC(s,c,u,dC.getVerticalPos(),fC,l),dC.bumpVerticalPos(fC.boxMargin),HT(s,dC.getVerticalPos()));var m=vC(s,c,u,a),v=dC.getBounds().bounds;o.debug("For line height fix Querying: #"+e+" .actor-line"),ou("#"+e+" .actor-line").attr("y2",v.stopy);var b=v.stopy-v.starty;b<m.maxHeight&&(b=m.maxHeight);var _=b+2*fC.diagramMarginY;fC.mirrorActors&&(_=_-fC.boxMargin+fC.bottomMarginAdj);var x=v.stopx-v.startx;x<m.maxWidth&&(x=m.maxWidth);var w=x+2*fC.diagramMarginX;h&&s.append("text").text(h).attr("x",(v.stopx-v.startx)/2-2*fC.diagramMarginX).attr("y",-25),lb(s,_,w,fC.useMaxWidth);var k=h?40:0;s.attr("viewBox",v.startx-fC.diagramMarginX+" -"+(fC.diagramMarginY+k)+" "+w+" "+(_+k)),f_(dT.parser.yy,s,e),o.debug("models:",dC.models)}};var CC=n(3584),EC=n.n(CC);function SC(t){return SC="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},SC(t)}var AC=function(t){return JSON.parse(JSON.stringify(t))},MC=[],NC=function t(e,n,r){if("relation"===n.stmt)t(e,n.state1,!0),t(e,n.state2,!1);else if("state"===n.stmt&&"[*]"===n.id&&(n.id=r?e.id+"_start":e.id+"_end",n.start=r),n.doc){var i=[],a=0,o=[];for(a=0;a<n.doc.length;a++)if("divider"===n.doc[a].type){var s=AC(n.doc[a]);s.doc=AC(o),i.push(s),o=[]}else o.push(n.doc[a]);if(i.length>0&&o.length>0){var c={stmt:"state",id:eb(),type:"divider",doc:AC(o)};i.push(AC(c)),n.doc=i}n.doc.forEach((function(e){return t(n,e,!0)}))}},DC={root:{relations:[],states:{},documents:{}}},BC=DC.root,LC=0,OC=function(t,e,n,r,i){void 0===BC.states[t]?BC.states[t]={id:t,descriptions:[],type:e,doc:n,note:i}:(BC.states[t].doc||(BC.states[t].doc=n),BC.states[t].type||(BC.states[t].type=e)),r&&(o.info("Adding state ",t,r),"string"==typeof r&&FC(t,r.trim()),"object"===SC(r)&&r.forEach((function(e){return FC(t,e.trim())}))),i&&(BC.states[t].note=i,BC.states[t].note.text=$m.sanitizeText(BC.states[t].note.text,wb()))},IC=function(){BC=(DC={root:{relations:[],states:{},documents:{}}}).root,BC=DC.root,LC=0,YC=[],Mb()},RC=function(t,e,n){var r=t,i=e,a="default",o="default";"[*]"===t&&(r="start"+ ++LC,a="start"),"[*]"===e&&(i="end"+LC,o="end"),OC(r,a),OC(i,o),BC.relations.push({id1:r,id2:i,title:$m.sanitizeText(n,wb())})},FC=function(t,e){var n=BC.states[t],r=e;":"===r[0]&&(r=r.substr(1).trim()),n.descriptions.push($m.sanitizeText(r,wb()))},PC=0,YC=[],jC="TB";const UC={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().state},addState:OC,clear:IC,getState:function(t){return BC.states[t]},getStates:function(){return BC.states},getRelations:function(){return BC.relations},getClasses:function(){return YC},getDirection:function(){return jC},addRelation:RC,getDividerId:function(){return"divider-id-"+ ++PC},setDirection:function(t){jC=t},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:function(){o.info("Documents = ",DC)},getRootDoc:function(){return MC},setRootDoc:function(t){o.info("Setting root doc",t),MC=t},getRootDocV2:function(){return NC({id:"root"},{id:"root",doc:MC},!0),{id:"root",doc:MC}},extract:function(t){var e;e=t.doc?t.doc:t,o.info(e),IC(),o.info("Extract",e),e.forEach((function(t){"state"===t.stmt&&OC(t.id,t.type,t.doc,t.description,t.note),"relation"===t.stmt&&RC(t.state1.id,t.state2.id,t.description)}))},trimColon:function(t){return t&&":"===t[0]?t.substr(1).trim():t.trim()},getTitle:Db,setTitle:Nb,getAccDescription:Lb,setAccDescription:Bb};var zC={};function $C(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var qC,HC=function(t,e,n){var r,i=wb().state.padding,a=2*wb().state.padding,o=t.node().getBBox(),s=o.width,c=o.x,u=t.append("text").attr("x",0).attr("y",wb().state.titleShift).attr("font-size",wb().state.fontSize).attr("class","state-title").text(e.id),l=u.node().getBBox().width+a,h=Math.max(l,s);h===s&&(h+=a);var f=t.node().getBBox();e.doc,r=c-i,l>s&&(r=(s-h)/2+i),Math.abs(c-f.x)<i&&l>s&&(r=c-(l-s)/2);var d=1-wb().state.textHeight;return t.insert("rect",":first-child").attr("x",r).attr("y",d).attr("class",n?"alt-composit":"composit").attr("width",h).attr("height",f.height+wb().state.textHeight+wb().state.titleShift+1).attr("rx","0"),u.attr("x",r+i),l<=s&&u.attr("x",c+(h-a)/2-l/2+i),t.insert("rect",":first-child").attr("x",r).attr("y",wb().state.titleShift-wb().state.textHeight-wb().state.padding).attr("width",h).attr("height",3*wb().state.textHeight).attr("rx",wb().state.radius),t.insert("rect",":first-child").attr("x",r).attr("y",wb().state.titleShift-wb().state.textHeight-wb().state.padding).attr("width",h).attr("height",f.height+3+2*wb().state.textHeight).attr("rx",wb().state.radius),t},WC=function(t,e){e.attr("class","state-note");var n=e.append("rect").attr("x",0).attr("y",wb().state.padding),r=function(t,e,n,r){var i=0,a=r.append("text");a.style("text-anchor","start"),a.attr("class","noteText");var o,s=t.replace(/\r\n/g,"<br/>"),c=(s=s.replace(/\n/g,"<br/>")).split($m.lineBreakRegex),u=1.25*wb().state.noteMargin,l=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return $C(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$C(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw a}}}}(c);try{for(l.s();!(o=l.n()).done;){var h=o.value.trim();if(h.length>0){var f=a.append("tspan");f.text(h),0===u&&(u+=f.node().getBBox().height),i+=u,f.attr("x",0+wb().state.noteMargin),f.attr("y",0+i+1.25*wb().state.noteMargin)}}}catch(t){l.e(t)}finally{l.f()}return{textWidth:a.node().getBBox().width,textHeight:i}}(t,0,0,e.append("g")),i=r.textWidth,a=r.textHeight;return n.attr("height",a+2*wb().state.noteMargin),n.attr("width",i+2*wb().state.noteMargin),n},VC=function(t,e){var n=e.id,r={id:n,label:e.id,width:0,height:0},i=t.append("g").attr("id",n).attr("class","stateGroup");"start"===e.type&&function(t){t.append("circle").attr("class","start-state").attr("r",wb().state.sizeUnit).attr("cx",wb().state.padding+wb().state.sizeUnit).attr("cy",wb().state.padding+wb().state.sizeUnit)}(i),"end"===e.type&&function(t){t.append("circle").attr("class","end-state-outer").attr("r",wb().state.sizeUnit+wb().state.miniPadding).attr("cx",wb().state.padding+wb().state.sizeUnit+wb().state.miniPadding).attr("cy",wb().state.padding+wb().state.sizeUnit+wb().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",wb().state.sizeUnit).attr("cx",wb().state.padding+wb().state.sizeUnit+2).attr("cy",wb().state.padding+wb().state.sizeUnit+2)}(i),"fork"!==e.type&&"join"!==e.type||function(t,e){var n=wb().state.forkWidth,r=wb().state.forkHeight;if(e.parentId){var i=n;n=r,r=i}t.append("rect").style("stroke","black").style("fill","black").attr("width",n).attr("height",r).attr("x",wb().state.padding).attr("y",wb().state.padding)}(i,e),"note"===e.type&&WC(e.note.text,i),"divider"===e.type&&function(t){t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",wb().state.textHeight).attr("class","divider").attr("x2",2*wb().state.textHeight).attr("y1",0).attr("y2",0)}(i),"default"===e.type&&0===e.descriptions.length&&function(t,e){var n=t.append("text").attr("x",2*wb().state.padding).attr("y",wb().state.textHeight+2*wb().state.padding).attr("font-size",wb().state.fontSize).attr("class","state-title").text(e.id).node().getBBox();t.insert("rect",":first-child").attr("x",wb().state.padding).attr("y",wb().state.padding).attr("width",n.width+2*wb().state.padding).attr("height",n.height+2*wb().state.padding).attr("rx",wb().state.radius)}(i,e),"default"===e.type&&e.descriptions.length>0&&function(t,e){var n=t.append("text").attr("x",2*wb().state.padding).attr("y",wb().state.textHeight+1.3*wb().state.padding).attr("font-size",wb().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),r=n.height,i=t.append("text").attr("x",wb().state.padding).attr("y",r+.4*wb().state.padding+wb().state.dividerMargin+wb().state.textHeight).attr("class","state-description"),a=!0,o=!0;e.descriptions.forEach((function(t){a||(function(t,e,n){var r=t.append("tspan").attr("x",2*wb().state.padding).text(e);n||r.attr("dy",wb().state.textHeight)}(i,t,o),o=!1),a=!1}));var s=t.append("line").attr("x1",wb().state.padding).attr("y1",wb().state.padding+r+wb().state.dividerMargin/2).attr("y2",wb().state.padding+r+wb().state.dividerMargin/2).attr("class","descr-divider"),c=i.node().getBBox(),u=Math.max(c.width,n.width);s.attr("x2",u+3*wb().state.padding),t.insert("rect",":first-child").attr("x",wb().state.padding).attr("y",wb().state.padding).attr("width",u+2*wb().state.padding).attr("height",c.height+r+2*wb().state.padding).attr("rx",wb().state.radius)}(i,e);var a,o=i.node().getBBox();return r.width=o.width+2*wb().state.padding,r.height=o.height+2*wb().state.padding,a=r,zC[n]=a,r},GC=0;CC.parser.yy=UC;var XC={},ZC=function t(e,n,r,i,a,s){var c,u=new(t_().Graph)({compound:!0,multigraph:!0}),l=!0;for(c=0;c<e.length;c++)if("relation"===e[c].stmt){l=!1;break}r?u.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:l?1:qC.edgeLengthFactor,nodeSep:l?1:50,isMultiGraph:!0}):u.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:l?1:qC.edgeLengthFactor,nodeSep:l?1:50,ranker:"tight-tree",isMultiGraph:!0}),u.setDefaultEdgeLabel((function(){return{}})),UC.extract(e);for(var h=UC.getStates(),f=UC.getRelations(),d=Object.keys(h),p=0;p<d.length;p++){var g=h[d[p]];r&&(g.parentId=r);var y=void 0;if(g.doc){var m=n.append("g").attr("id",g.id).attr("class","stateGroup");y=t(g.doc,m,g.id,!i,a,s);var v=(m=HC(m,g,i)).node().getBBox();y.width=v.width,y.height=v.height+qC.padding/2,XC[g.id]={y:qC.compositTitleSize}}else y=VC(n,g);if(g.note){var b={descriptions:[],id:g.id+"-note",note:g.note,type:"note"},_=VC(n,b);"left of"===g.note.position?(u.setNode(y.id+"-note",_),u.setNode(y.id,y)):(u.setNode(y.id,y),u.setNode(y.id+"-note",_)),u.setParent(y.id,y.id+"-group"),u.setParent(y.id+"-note",y.id+"-group")}else u.setNode(y.id,y)}o.debug("Count=",u.nodeCount(),u);var x=0;f.forEach((function(t){var e;x++,o.debug("Setting edge",t),u.setEdge(t.id1,t.id2,{relation:t,width:(e=t.title,e?e.length*qC.fontSizeFactor:1),height:qC.labelHeight*$m.getRows(t.title).length,labelpos:"c"},"id"+x)})),Kb().layout(u),o.debug("Graph after layout",u.nodes());var w=n.node();u.nodes().forEach((function(t){void 0!==t&&void 0!==u.node(t)?(o.warn("Node "+t+": "+JSON.stringify(u.node(t))),a.select("#"+w.id+" #"+t).attr("transform","translate("+(u.node(t).x-u.node(t).width/2)+","+(u.node(t).y+(XC[t]?XC[t].y:0)-u.node(t).height/2)+" )"),a.select("#"+w.id+" #"+t).attr("data-x-shift",u.node(t).x-u.node(t).width/2),s.querySelectorAll("#"+w.id+" #"+t+" .divider").forEach((function(t){var e=t.parentElement,n=0,r=0;e&&(e.parentElement&&(n=e.parentElement.getBBox().width),r=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(r)&&(r=0)),t.setAttribute("x1",0-r+8),t.setAttribute("x2",n-r-8)}))):o.debug("No Node "+t+": "+JSON.stringify(u.node(t)))}));var k=w.getBBox();u.edges().forEach((function(t){void 0!==t&&void 0!==u.edge(t)&&(o.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(u.edge(t))),function(t,e,n){e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var r=e.points,i=Uu().x((function(t){return t.x})).y((function(t){return t.y})).curve(Vu),a=t.append("path").attr("d",i(r)).attr("id","edge"+GC).attr("class","transition"),s="";if(wb().state.arrowMarkerAbsolute&&(s=(s=(s=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),a.attr("marker-end","url("+s+"#"+function(t){switch(t){case UC.relationType.AGGREGATION:return"aggregation";case UC.relationType.EXTENSION:return"extension";case UC.relationType.COMPOSITION:return"composition";case UC.relationType.DEPENDENCY:return"dependency"}}(UC.relationType.DEPENDENCY)+"End)"),void 0!==n.title){for(var c=t.append("g").attr("class","stateLabel"),u=db.calcLabelPosition(e.points),l=u.x,h=u.y,f=$m.getRows(n.title),d=0,p=[],g=0,y=0,m=0;m<=f.length;m++){var v=c.append("text").attr("text-anchor","middle").text(f[m]).attr("x",l).attr("y",h+d),b=v.node().getBBox();if(g=Math.max(g,b.width),y=Math.min(y,b.x),o.info(b.x,l,h+d),0===d){var _=v.node().getBBox();d=_.height,o.info("Title height",d,h)}p.push(v)}var x=d*f.length;if(f.length>1){var w=(f.length-1)*d*.5;p.forEach((function(t,e){return t.attr("y",h+e*d-w)})),x=d*f.length}var k=c.node().getBBox();c.insert("rect",":first-child").attr("class","box").attr("x",l-g/2-wb().state.padding/2).attr("y",h-x/2-wb().state.padding/2-3.5).attr("width",g+wb().state.padding).attr("height",x+wb().state.padding),o.info(k)}GC++}(n,u.edge(t),u.edge(t).relation))})),k=w.getBBox();var T={id:r||"root",label:r||"root",width:0,height:0};return T.width=k.width+2*qC.padding,T.height=k.height+2*qC.padding,o.debug("Doc rendered",T,u),T};const QC=function(t,e){qC=wb().state;var n,r=wb().securityLevel;"sandbox"===r&&(n=au("#i"+e));var i=au("sandbox"===r?n.nodes()[0].contentDocument.body:"body"),a="sandbox"===r?n.nodes()[0].contentDocument:document;CC.parser.yy.clear(),CC.parser.parse(t),o.debug("Rendering diagram "+t);var s=i.select("[id='".concat(e,"']"));s.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z"),new(t_().Graph)({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}}));var c=UC.getRootDoc();ZC(c,s,void 0,!1,i,a);var u=qC.padding,l=s.node().getBBox(),h=l.width+2*u,f=l.height+2*u;lb(s,f,1.75*h,qC.useMaxWidth),s.attr("viewBox","".concat(l.x-qC.padding," ").concat(l.y-qC.padding," ")+h+" "+f),f_(CC.parser.yy,s,e)};var KC={},JC={},tE=function(t,e,n,r){if("root"!==n.id){var i="rect";!0===n.start&&(i="start"),!1===n.start&&(i="end"),"default"!==n.type&&(i=n.type),JC[n.id]||(JC[n.id]={id:n.id,shape:i,description:$m.sanitizeText(n.id,wb()),classes:"statediagram-state"}),n.description&&(Array.isArray(JC[n.id].description)?(JC[n.id].shape="rectWithTitle",JC[n.id].description.push(n.description)):JC[n.id].description.length>0?(JC[n.id].shape="rectWithTitle",JC[n.id].description===n.id?JC[n.id].description=[n.description]:JC[n.id].description=[JC[n.id].description,n.description]):(JC[n.id].shape="rect",JC[n.id].description=n.description),JC[n.id].description=$m.sanitizeTextOrArray(JC[n.id].description,wb())),1===JC[n.id].description.length&&"rectWithTitle"===JC[n.id].shape&&(JC[n.id].shape="rect"),!JC[n.id].type&&n.doc&&(o.info("Setting cluster for ",n.id,rE(n)),JC[n.id].type="group",JC[n.id].dir=rE(n),JC[n.id].shape="divider"===n.type?"divider":"roundedWithTitle",JC[n.id].classes=JC[n.id].classes+" "+(r?"statediagram-cluster statediagram-cluster-alt":"statediagram-cluster"));var a={labelStyle:"",shape:JC[n.id].shape,labelText:JC[n.id].description,classes:JC[n.id].classes,style:"",id:n.id,dir:JC[n.id].dir,domId:"state-"+n.id+"-"+eE,type:JC[n.id].type,padding:15};if(n.note){var s={labelStyle:"",shape:"note",labelText:n.note.text,classes:"statediagram-note",style:"",id:n.id+"----note-"+eE,domId:"state-"+n.id+"----note-"+eE,type:JC[n.id].type,padding:15},c={labelStyle:"",shape:"noteGroup",labelText:n.note.text,classes:JC[n.id].classes,style:"",id:n.id+"----parent",domId:"state-"+n.id+"----parent-"+eE,type:"group",padding:0};eE++,t.setNode(n.id+"----parent",c),t.setNode(s.id,s),t.setNode(n.id,a),t.setParent(n.id,n.id+"----parent"),t.setParent(s.id,n.id+"----parent");var u=n.id,l=s.id;"left of"===n.note.position&&(u=s.id,l=n.id),t.setEdge(u,l,{arrowhead:"none",arrowType:"",style:"fill:none",labelStyle:"",classes:"transition note-edge",arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal"})}else t.setNode(n.id,a)}e&&"root"!==e.id&&(o.trace("Setting node ",n.id," to be child of its parent ",e.id),t.setParent(n.id,e.id)),n.doc&&(o.trace("Adding nodes children "),nE(t,n,n.doc,!r))},eE=0,nE=function(t,e,n,r){o.trace("items",n),n.forEach((function(n){if("state"===n.stmt||"default"===n.stmt)tE(t,e,n,r);else if("relation"===n.stmt){tE(t,e,n.state1,r),tE(t,e,n.state2,r);var i={id:"edge"+eE,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:"fill:none",labelStyle:"",label:$m.sanitizeText(n.description,wb()),arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal",classes:"transition"},a=n.state1.id,o=n.state2.id;t.setEdge(a,o,i,eE),eE++}}))},rE=function(t,e){var n=e||"TB";if(t.doc)for(var r=0;r<t.doc.length;r++){var i=t.doc[r];"dir"===i.stmt&&(n=i.value)}return n};const iE=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)KC[e[n]]=t[e[n]]};function aE(t){return function(t){if(Array.isArray(t))return oE(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return oE(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?oE(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oE(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var sE="",cE=[],uE=[],lE=[],hE=function(){for(var t=!0,e=0;e<lE.length;e++)lE[e].processed,t=t&&lE[e].processed;return t};const fE={parseDirective:function(t,e,n){UE.parseDirective(this,t,e,n)},getConfig:function(){return wb().journey},clear:function(){cE.length=0,uE.length=0,sE="",lE.length=0,Mb()},setTitle:Nb,getTitle:Db,setAccDescription:Bb,getAccDescription:Lb,addSection:function(t){sE=t,cE.push(t)},getSections:function(){return cE},getTasks:function(){for(var t=hE(),e=0;!t&&e<100;)t=hE(),e++;return uE.push.apply(uE,lE),uE},addTask:function(t,e){var n=e.substr(1).split(":"),r=0,i=[];1===n.length?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(","));var a=i.map((function(t){return t.trim()})),o={section:sE,type:sE,people:a,task:t,score:r};lE.push(o)},addTaskOrg:function(t){var e={section:sE,type:sE,description:t,task:t,classes:[]};uE.push(e)},getActors:function(){return t=[],uE.forEach((function(e){e.people&&t.push.apply(t,aE(e.people))})),aE(new Set(t)).sort();var t}};var dE=n(9763),pE=n.n(dE),gE=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},yE=function(t,e){var n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},mE=-1,vE=function(){function t(t,e,n,i,a,o,s,c){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("font-color",c).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c,u){for(var l=c.taskFontSize,h=c.taskFontFamily,f=t.split(/<br\s*\/?>/gi),d=0;d<f.length;d++){var p=d*l-l*(f.length-1)/2,g=e.append("text").attr("x",n+a/2).attr("y",i).attr("fill",u).style("text-anchor","middle").style("font-size",l).style("font-family",h);g.append("tspan").attr("x",n+a/2).attr("dy",p).text(f[d]),g.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(g,s)}}function n(t,n,i,a,o,s,c,u){var l=n.append("switch"),h=l.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");h.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,i,a,o,s,c,u),r(h,c)}function r(t,e){for(var n in e)n in e&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}();const bE=yE,_E=function(t,e,n){var r=t.append("g"),i={x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0};i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,gE(r,i),vE(n)(e.text,r,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},n,e.colour)},xE=function(t,e){var n=e.text.replace(/<br\s*\/?>/gi," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(n),r},wE=function(t,e,n){var r,i,a,o=e.x+n.width/2,s=t.append("g");mE++,s.append("line").attr("id","task"+mE).attr("x1",o).attr("y1",e.y).attr("x2",o).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),r=s,i={cx:o,cy:300+30*(5-e.score),score:e.score},r.append("circle").attr("cx",i.cx).attr("cy",i.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),(a=r.append("g")).append("circle").attr("cx",i.cx-5).attr("cy",i.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),a.append("circle").attr("cx",i.cx+5).attr("cy",i.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.score>3?function(t){var e=Iu().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+i.cx+","+(i.cy+2)+")")}(a):i.score<3?function(t){var e=Iu().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+i.cx+","+(i.cy+7)+")")}(a):function(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",i.cx-5).attr("y1",i.cy+7).attr("x2",i.cx+5).attr("y2",i.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}(a);var c={x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0};c.x=e.x,c.y=e.y,c.fill=e.fill,c.width=n.width,c.height=n.height,c.class="task task-type-"+e.num,c.rx=3,c.ry=3,gE(s,c);var u=e.x+14;e.people.forEach((function(t){var n=e.actors[t].color,r={cx:u,cy:e.y,r:7,fill:n,stroke:"#000",title:t,pos:e.actors[t].position};yE(s,r),u+=10})),vE(n)(e.task,s,c.x,c.y,c.width,c.height,{class:"task"},n,e.colour)};dE.parser.yy=fE;var kE={},TE=wb().journey,CE=wb().journey.leftMargin,EE={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i=wb().journey,a=this,o=0;this.sequenceItems.forEach((function(s){o++;var c=a.sequenceItems.length-o+1;a.updateVal(s,"starty",e-c*i.boxMargin,Math.min),a.updateVal(s,"stopy",r+c*i.boxMargin,Math.max),a.updateVal(EE.data,"startx",t-c*i.boxMargin,Math.min),a.updateVal(EE.data,"stopx",n+c*i.boxMargin,Math.max),a.updateVal(s,"startx",t-c*i.boxMargin,Math.min),a.updateVal(s,"stopx",n+c*i.boxMargin,Math.max),a.updateVal(EE.data,"starty",e-c*i.boxMargin,Math.min),a.updateVal(EE.data,"stopy",r+c*i.boxMargin,Math.max)}))},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(EE.data,"startx",i,Math.min),this.updateVal(EE.data,"starty",o,Math.min),this.updateVal(EE.data,"stopx",a,Math.max),this.updateVal(EE.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},SE=TE.sectionFills,AE=TE.sectionColours;const ME=function(t){Object.keys(t).forEach((function(e){TE[e]=t[e]}))},NE=function(t,e){var n=wb().journey;dE.parser.yy.clear(),dE.parser.parse(t+"\n");var r,i=wb().securityLevel;"sandbox"===i&&(r=au("#i"+e));var a=au("sandbox"===i?r.nodes()[0].contentDocument.body:"body");"sandbox"===i?r.nodes()[0].contentDocument:document,EE.init();var o=a.select("#"+e);o.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),o.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z");var s=dE.parser.yy.getTasks(),c=dE.parser.yy.getTitle(),u=dE.parser.yy.getActors();for(var l in kE)delete kE[l];var h=0;u.forEach((function(t){kE[t]={color:n.actorColours[h%n.actorColours.length],position:h},h++})),function(t){var e=wb().journey,n=60;Object.keys(kE).forEach((function(r){var i=kE[r].color,a={cx:20,cy:n,r:7,fill:i,stroke:"#000",pos:kE[r].position};bE(t,a);var o={x:40,y:n+7,fill:"#666",text:r,textMargin:5|e.boxTextMargin};xE(t,o),n+=20}))}(o),EE.insert(0,0,CE,50*Object.keys(kE).length),function(t,e,n){for(var r=wb().journey,i="",a=n+(2*r.height+r.diagramMarginY),o=0,s="#CCC",c="black",u=0,l=0;l<e.length;l++){var h=e[l];if(i!==h.section){s=SE[o%SE.length],u=o%SE.length,c=AE[o%AE.length];var f={x:l*r.taskMargin+l*r.width+CE,y:50,text:h.section,fill:s,num:u,colour:c};_E(t,f,r),i=h.section,o++}var d=h.people.reduce((function(t,e){return kE[e]&&(t[e]=kE[e]),t}),{});h.x=l*r.taskMargin+l*r.width+CE,h.y=a,h.width=r.diagramMarginX,h.height=r.diagramMarginY,h.colour=c,h.fill=s,h.num=u,h.actors=d,wE(t,h,r),EE.insert(h.x,h.y,h.x+h.width+r.taskMargin,450)}}(o,s,0);var f=EE.getBounds();c&&o.append("text").text(c).attr("x",CE).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);var d=f.stopy-f.starty+2*n.diagramMarginY,p=CE+f.stopx+2*n.diagramMarginX;lb(o,d,p,n.useMaxWidth),o.append("line").attr("x1",CE).attr("y1",4*n.height).attr("x2",p-CE-4).attr("y2",4*n.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");var g=c?70:0;o.attr("viewBox","".concat(f.startx," -25 ").concat(p," ").concat(d+g)),o.attr("preserveAspectRatio","xMinYMin meet"),o.attr("height",d+g+25),f_(dE.parser.yy,o,e)};var DE={};const BE=function(t){return"g.classGroup text {\n fill: ".concat(t.nodeBorder,";\n fill: ").concat(t.classText,";\n stroke: none;\n font-family: ").concat(t.fontFamily,";\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n\n}\n\n.nodeLabel, .edgeLabel {\n color: ").concat(t.classText,";\n}\n.edgeLabel .label rect {\n fill: ").concat(t.mainBkg,";\n}\n.label text {\n fill: ").concat(t.classText,";\n}\n.edgeLabel .label span {\n background: ").concat(t.mainBkg,";\n}\n\n.classTitle {\n font-weight: bolder;\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ").concat(t.nodeBorder,";\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.classGroup line {\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ").concat(t.nodeBorder,";\n font-size: 10px;\n}\n\n.relation {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n#compositionStart, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n.edgeTerminals {\n font-size: 11px;\n}\n\n")},LE=function(t){return".label {\n font-family: ".concat(t.fontFamily,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n .cluster-label text {\n fill: ").concat(t.titleColor,";\n }\n .cluster-label span {\n color: ").concat(t.titleColor,";\n }\n\n .label text,span {\n fill: ").concat(t.nodeTextColor||t.textColor,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n background-color: ").concat(t.edgeLabelBackground,";\n fill: ").concat(t.edgeLabelBackground,";\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ").concat(t.clusterBkg,";\n stroke: ").concat(t.clusterBorder,";\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n .cluster span {\n color: ").concat(t.titleColor,";\n }\n /* .cluster div {\n color: ").concat(t.titleColor,";\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ").concat(t.fontFamily,";\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n")},OE=function(t){return"\ndefs #statediagram-barbEnd {\n fill: ".concat(t.transitionColor,";\n stroke: ").concat(t.transitionColor,";\n }\ng.stateGroup text {\n fill: ").concat(t.nodeBorder,";\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ").concat(t.textColor,";\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ").concat(t.stateLabelColor,";\n}\n\ng.stateGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.stateGroup line {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n\n.transition {\n stroke: ").concat(t.transitionColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ").concat(t.background,";\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n\n text {\n fill: ").concat(t.noteTextColor,";\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ").concat(t.labelBackgroundColor,";\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ").concat(t.transitionLabelColor||t.tertiaryTextColor,";\n}\n.label div .edgeLabel {\n color: ").concat(t.transitionLabelColor||t.tertiaryTextColor,";\n}\n\n.stateLabel text {\n fill: ").concat(t.stateLabelColor,";\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ").concat(t.specialStateColor,";\n stroke: ").concat(t.specialStateColor,";\n}\n\n.node .fork-join {\n fill: ").concat(t.specialStateColor,";\n stroke: ").concat(t.specialStateColor,";\n}\n\n.node circle.state-end {\n fill: ").concat(t.innerEndBackground,";\n stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ").concat(t.compositeBackground||t.background,";\n // stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ").concat(t.stateBkg||t.mainBkg,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n stroke-width: 1px;\n}\n.node polygon {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";;\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ").concat(t.lineColor,";\n}\n\n.statediagram-cluster rect {\n fill: ").concat(t.compositeTitleBackground,";\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ").concat(t.stateLabelColor,";\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ").concat(t.stateBorder||t.nodeBorder,";\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ").concat(t.compositeBackground||t.background,";\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: ").concat(t.altBackground?t.altBackground:"#efefef",";\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ").concat(t.altBackground?t.altBackground:"#efefef",";\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ").concat(t.noteTextColor,";\n}\n\n.statediagram-note .nodeLabel {\n color: ").concat(t.noteTextColor,";\n}\n.statediagram .edgeLabel {\n color: red; // ").concat(t.noteTextColor,";\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ").concat(t.lineColor,";\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n")};var IE={flowchart:LE,"flowchart-v2":LE,sequence:function(t){return".actor {\n stroke: ".concat(t.actorBorder,";\n fill: ").concat(t.actorBkg,";\n }\n\n text.actor > tspan {\n fill: ").concat(t.actorTextColor,";\n stroke: none;\n }\n\n .actor-line {\n stroke: ").concat(t.actorLineColor,";\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ").concat(t.signalColor,";\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.signalColor,";\n }\n\n #arrowhead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .sequenceNumber {\n fill: ").concat(t.sequenceNumberColor,";\n }\n\n #sequencenumber {\n fill: ").concat(t.signalColor,";\n }\n\n #crosshead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .messageText {\n fill: ").concat(t.signalTextColor,";\n stroke: ").concat(t.signalTextColor,";\n }\n\n .labelBox {\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBkgColor,";\n }\n\n .labelText, .labelText > tspan {\n fill: ").concat(t.labelTextColor,";\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ").concat(t.loopTextColor,";\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBorderColor,";\n }\n\n .note {\n //stroke: #decc93;\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n }\n\n .noteText, .noteText > tspan {\n fill: ").concat(t.noteTextColor,";\n stroke: none;\n }\n\n .activation0 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation1 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation2 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .actorPopupMenu {\n position: absolute;\n }\n\n .actorPopupMenuPanel {\n position: absolute;\n fill: ").concat(t.actorBkg,";\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\n filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));\n}\n .actor-man line {\n stroke: ").concat(t.actorBorder,";\n fill: ").concat(t.actorBkg,";\n }\n .actor-man circle, line {\n stroke: ").concat(t.actorBorder,";\n fill: ").concat(t.actorBkg,";\n stroke-width: 2px;\n }\n")},gantt:function(t){return'\n .mermaid-main-font {\n font-family: "trebuchet ms", verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n .exclude-range {\n fill: '.concat(t.excludeBkgColor,";\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: ").concat(t.sectionBkgColor,";\n }\n\n .section2 {\n fill: ").concat(t.sectionBkgColor2,";\n }\n\n .section1,\n .section3 {\n fill: ").concat(t.altSectionBkgColor,";\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle1 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle2 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle3 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle {\n text-anchor: start;\n // font-size: ").concat(t.ganttFontSize,";\n // text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ").concat(t.gridColor,";\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.textColor,";\n }\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ").concat(t.todayLineColor,";\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n\n // .taskText:not([font-size]) {\n // font-size: ").concat(t.ganttFontSize,";\n // }\n\n .taskTextOutsideRight {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: start;\n // font-size: ").concat(t.ganttFontSize,";\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: end;\n // font-size: ").concat(t.ganttFontSize,";\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ").concat(t.taskTextColor,";\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ").concat(t.taskBkgColor,";\n stroke: ").concat(t.taskBorderColor,";\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ").concat(t.activeTaskBkgColor,";\n stroke: ").concat(t.activeTaskBorderColor,";\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ").concat(t.doneTaskBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.critBkgColor,";\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.activeTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ").concat(t.textColor," ;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n")},classDiagram:BE,"classDiagram-v2":BE,class:BE,stateDiagram:OE,state:OE,gitGraph:function(t){return"\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ".concat([0,1,2,3,4,5,6,7].map((function(e){return"\n .branch-label".concat(e," { fill: ").concat(t["gitBranchLabel"+e],"; }\n .commit").concat(e," { stroke: ").concat(t["git"+e],"; fill: ").concat(t["git"+e],"; }\n .commit-highlight").concat(e," { stroke: ").concat(t["gitInv"+e],"; fill: ").concat(t["gitInv"+e],"; }\n .label").concat(e," { fill: ").concat(t["git"+e],"; }\n .arrow").concat(e," { stroke: ").concat(t["git"+e],"; }\n ")})).join("\n"),"\n\n .branch {\n stroke-width: 1;\n stroke: ").concat(t.lineColor,";\n stroke-dasharray: 2;\n }\n .commit-label { font-size: 10px; fill: ").concat(t.commitLabelColor,";}\n .commit-label-bkg { font-size: 10px; fill: ").concat(t.commitLabelBackground,"; opacity: 0.5; }\n .tag-label { font-size: 10px; fill: ").concat(t.tagLabelColor,";}\n .tag-label-bkg { fill: ").concat(t.tagLabelBackground,"; stroke: ").concat(t.tagLabelBorder,"; }\n .tag-hole { fill: ").concat(t.textColor,"; }\n\n .commit-merge {\n stroke: ").concat(t.primaryColor,";\n fill: ").concat(t.primaryColor,";\n }\n .commit-reverse {\n stroke: ").concat(t.primaryColor,";\n fill: ").concat(t.primaryColor,";\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ").concat(t.primaryColor,";\n fill: ").concat(t.primaryColor,";\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n }\n")},info:function(){return""},pie:function(t){return"\n .pieCircle{\n stroke: ".concat(t.pieStrokeColor,";\n stroke-width : ").concat(t.pieStrokeWidth,";\n opacity : ").concat(t.pieOpacity,";\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ").concat(t.pieTitleTextSize,";\n fill: ").concat(t.pieTitleTextColor,";\n font-family: ").concat(t.fontFamily,";\n }\n .slice {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.pieSectionTextColor,";\n font-size:").concat(t.pieSectionTextSize,";\n // fill: white;\n }\n .legend text {\n fill: ").concat(t.pieLegendTextColor,";\n font-family: ").concat(t.fontFamily,";\n font-size: ").concat(t.pieLegendTextSize,";\n }\n")},er:function(t){return"\n .entityBox {\n fill: ".concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n }\n\n .attributeBoxOdd {\n fill: #ffffff;\n stroke: ").concat(t.nodeBorder,";\n }\n\n .attributeBoxEven {\n fill: #f2f2f2;\n stroke: ").concat(t.nodeBorder,";\n }\n\n .relationshipLabelBox {\n fill: ").concat(t.tertiaryColor,";\n opacity: 0.7;\n background-color: ").concat(t.tertiaryColor,";\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ").concat(t.lineColor,";\n }\n")},journey:function(t){return".label {\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n color: ".concat(t.textColor,";\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ").concat(t.textColor,"\n }\n\n .legend {\n fill: ").concat(t.textColor,";\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ").concat(t.textColor,"\n }\n\n .face {\n ").concat(t.faceColor?"fill: ".concat(t.faceColor):"fill: #FFF8DC",";\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType0):"",";\n }\n .task-type-1, .section-type-1 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType1):"",";\n }\n .task-type-2, .section-type-2 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType2):"",";\n }\n .task-type-3, .section-type-3 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType3):"",";\n }\n .task-type-4, .section-type-4 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType4):"",";\n }\n .task-type-5, .section-type-5 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType5):"",";\n }\n .task-type-6, .section-type-6 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType6):"",";\n }\n .task-type-7, .section-type-7 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType7):"",";\n }\n\n .actor-0 {\n ").concat(t.actor0?"fill: ".concat(t.actor0):"",";\n }\n .actor-1 {\n ").concat(t.actor1?"fill: ".concat(t.actor1):"",";\n }\n .actor-2 {\n ").concat(t.actor2?"fill: ".concat(t.actor2):"",";\n }\n .actor-3 {\n ").concat(t.actor3?"fill: ".concat(t.actor3):"",";\n }\n .actor-4 {\n ").concat(t.actor4?"fill: ".concat(t.actor4):"",";\n }\n .actor-5 {\n ").concat(t.actor5?"fill: ".concat(t.actor5):"",";\n }\n\n }\n")},requirement:function(t){return"\n\n marker {\n fill: ".concat(t.relationColor,";\n stroke: ").concat(t.relationColor,";\n }\n\n marker.cross {\n stroke: ").concat(t.lineColor,";\n }\n\n svg {\n font-family: ").concat(t.fontFamily,";\n font-size: ").concat(t.fontSize,";\n }\n\n .reqBox {\n fill: ").concat(t.requirementBackground,";\n fill-opacity: 100%;\n stroke: ").concat(t.requirementBorderColor,";\n stroke-width: ").concat(t.requirementBorderSize,";\n }\n \n .reqTitle, .reqLabel{\n fill: ").concat(t.requirementTextColor,";\n }\n .reqLabelBox {\n fill: ").concat(t.relationLabelBackground,";\n fill-opacity: 100%;\n }\n\n .req-title-line {\n stroke: ").concat(t.requirementBorderColor,";\n stroke-width: ").concat(t.requirementBorderSize,";\n }\n .relationshipLine {\n stroke: ").concat(t.relationColor,";\n stroke-width: 1;\n }\n .relationshipLabel {\n fill: ").concat(t.relationLabelColor,";\n }\n\n")}};function RE(t){return RE="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},RE(t)}var FE=function(t){var e=t;return(e=(e=e.replace(/fl°°/g,(function(){return"&#"}))).replace(/fl°/g,(function(){return"&"}))).replace(/¶ß/g,(function(){return";"}))},PE={};function YE(t){var e;gw(t.flowchart),vw(t.flowchart),void 0!==t.sequenceDiagram&&TC.setConf(rb(t.sequence,t.sequenceDiagram)),TC.setConf(t.sequence),t.gantt,y_(t.class),t.state,iE(t.state),Yk(t.class),bx(t.er),ME(t.journey),hT(t.requirement),e=t.class,Object.keys(e).forEach((function(t){DE[t]=e[t]}))}var jE=Object.freeze({render:function(t,e,n,r){Cb();var i=e.replace(/\r\n?/g,"\n"),a=db.detectInit(i);a&&(hb(a),Tb(a));var s=wb();o.debug(s),e.length>s.maxTextSize&&(i="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");var c=au("body");if(void 0!==r){if("sandbox"===s.securityLevel){var u=au("body").append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");(c=au(u.nodes()[0].contentDocument.body)).node().style.margin=0}if(r.innerHTML="","sandbox"===s.securityLevel){var l=au(r).append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");(c=au(l.nodes()[0].contentDocument.body)).node().style.margin=0}else c=au(r);c.append("div").attr("id","d"+t).attr("style","font-family: "+s.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}else{var h,f=document.getElementById(t);if(f&&f.remove(),(h="sandbox"!==s.securityLevel?document.querySelector("#d"+t):document.querySelector("#i"+t))&&h.remove(),"sandbox"===s.securityLevel){var d=au("body").append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");(c=au(d.nodes()[0].contentDocument.body)).node().style.margin=0}else c=au("body");c.append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}i=i.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})).replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)})).replace(/#\w+;/g,(function(t){var e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}));var p=c.select("#d"+t).node(),g=db.detectType(i,s),y=p.firstChild,m=y.firstChild,v="";if(void 0!==s.themeCSS&&(v+="\n".concat(s.themeCSS)),void 0!==s.fontFamily&&(v+="\n:root { --mermaid-font-family: ".concat(s.fontFamily,"}")),void 0!==s.altFontFamily&&(v+="\n:root { --mermaid-alt-font-family: ".concat(s.altFontFamily,"}")),"flowchart"===g||"flowchart-v2"===g||"graph"===g){var b=function(t){o.info("Extracting classes"),Gx.clear();try{var e=Zx().parser;return e.yy=Gx,e.parse(t),Gx.getClasses()}catch(t){return}}(i),_=s.htmlLabels||s.flowchart.htmlLabels;for(var x in b)_?(v+="\n.".concat(x," > * { ").concat(b[x].styles.join(" !important; ")," !important; }"),v+="\n.".concat(x," span { ").concat(b[x].styles.join(" !important; ")," !important; }")):(v+="\n.".concat(x," path { ").concat(b[x].styles.join(" !important; ")," !important; }"),v+="\n.".concat(x," rect { ").concat(b[x].styles.join(" !important; ")," !important; }"),v+="\n.".concat(x," polygon { ").concat(b[x].styles.join(" !important; ")," !important; }"),v+="\n.".concat(x," ellipse { ").concat(b[x].styles.join(" !important; ")," !important; }"),v+="\n.".concat(x," circle { ").concat(b[x].styles.join(" !important; ")," !important; }"),b[x].textStyles&&(v+="\n.".concat(x," tspan { ").concat(b[x].textStyles.join(" !important; ")," !important; }")))}var w=function(t,e){return am(Em("".concat(t,"{").concat(e,"}")),om)}("#".concat(t),function(t,e,n){return" {\n font-family: ".concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n fill: ").concat(n.textColor,"\n }\n\n /* Classes common for multiple diagrams */\n\n .error-icon {\n fill: ").concat(n.errorBkgColor,";\n }\n .error-text {\n fill: ").concat(n.errorTextColor,";\n stroke: ").concat(n.errorTextColor,";\n }\n\n .edge-thickness-normal {\n stroke-width: 2px;\n }\n .edge-thickness-thick {\n stroke-width: 3.5px\n }\n .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n .marker {\n fill: ").concat(n.lineColor,";\n stroke: ").concat(n.lineColor,";\n }\n .marker.cross {\n stroke: ").concat(n.lineColor,";\n }\n\n svg {\n font-family: ").concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n }\n\n ").concat(IE[t](n),"\n\n ").concat(e,"\n")}(g,v,s.themeVariables)),k=document.createElement("style");k.innerHTML="#".concat(t," ")+w,y.insertBefore(k,m);try{switch(g){case"gitGraph":Bk(i,t,!1);break;case"flowchart":s.flowchart.arrowMarkerAbsolute=s.arrowMarkerAbsolute,gw(s.flowchart),yw(i,t);break;case"flowchart-v2":s.flowchart.arrowMarkerAbsolute=s.arrowMarkerAbsolute,vw(s.flowchart),bw(i,t);break;case"sequence":s.sequence.arrowMarkerAbsolute=s.arrowMarkerAbsolute,s.sequenceDiagram?(TC.setConf(Object.assign(s.sequence,s.sequenceDiagram)),console.error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.")):TC.setConf(s.sequence),TC.draw(i,t);break;case"gantt":s.gantt.arrowMarkerAbsolute=s.arrowMarkerAbsolute,s.gantt,nk(i,t);break;case"class":s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,y_(s.class),m_(i,t);break;case"classDiagram":s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,function(t){Object.keys(t).forEach((function(e){ox[e]=t[e]}))}(s.class),function(t,e){o.info("Drawing class - ",e),Zb.clear(),e_.parser.parse(t);var n=wb().flowchart,r=wb().securityLevel;o.info("config:",n);var i,a=n.nodeSpacing||50,s=n.rankSpacing||50,c=new(t_().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:Zb.getDirection(),nodesep:a,ranksep:s,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),u=Zb.getClasses(),l=Zb.getRelations();o.info(l),function(t,e){var n=Object.keys(t);o.info("keys:",n),o.info(t),n.forEach((function(n){var r=t[n],i="";r.cssClasses.length>0&&(i=i+" "+r.cssClasses.join(" "));var a,s,c={labelStyle:""},u=void 0!==r.text?r.text:r.id;r.type,s="class_box",e.setNode(r.id,{labelStyle:c.labelStyle,shape:s,labelText:(a=u,$m.sanitizeText(a,wb())),classData:r,rx:0,ry:0,class:i,style:c.style,id:r.id,domId:r.domId,haveCallback:r.haveCallback,link:r.link,width:"group"===r.type?500:void 0,type:r.type,padding:wb().flowchart.padding}),o.info("setNode",{labelStyle:c.labelStyle,shape:s,labelText:u,rx:0,ry:0,class:i,style:c.style,id:r.id,width:"group"===r.type?500:void 0,type:r.type,padding:wb().flowchart.padding})}))}(u,c),function(t,e){var n=0;t.forEach((function(r){n++;var i={classes:"relation"};i.pattern=1==r.relation.lineType?"dashed":"solid",i.id="id"+n,"arrow_open"===r.type?i.arrowhead="none":i.arrowhead="normal",o.info(i,r),i.startLabelRight="none"===r.relationTitle1?"":r.relationTitle1,i.endLabelLeft="none"===r.relationTitle2?"":r.relationTitle2,i.arrowTypeStart=sx(r.relation.type1),i.arrowTypeEnd=sx(r.relation.type2);var a="",s="";if(void 0!==r.style){var c=Jv(r.style);a=c.style,s=c.labelStyle}else a="fill:none";i.style=a,i.labelStyle=s,void 0!==r.interpolate?i.curve=Qv(r.interpolate,Pu):void 0!==t.defaultInterpolate?i.curve=Qv(t.defaultInterpolate,Pu):i.curve=Qv(ox.curve,Pu),r.text=r.title,void 0===r.text?void 0!==r.style&&(i.arrowheadStyle="fill: #333"):(i.arrowheadStyle="fill: #333",i.labelpos="c",wb().flowchart.htmlLabels?(i.labelType="html",i.label='<span class="edgeLabel">'+r.text+"</span>"):(i.labelType="text",i.label=r.text.replace($m.lineBreakRegex,"\n"),void 0===r.style&&(i.style=i.style||"stroke: #333; stroke-width: 1.5px;fill:none"),i.labelStyle=i.labelStyle.replace("color:","fill:"))),e.setEdge(r.id1,r.id2,i,n)}))}(l,c),"sandbox"===r&&(i=au("#i"+e));var h=au("sandbox"===r?i.nodes()[0].contentDocument.body:"body"),f=h.select('[id="'.concat(e,'"]'));f.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var d=h.select("#"+e+" g");ax(d,c,["aggregation","extension","composition","dependency"],"classDiagram",e);var p=f.node().getBBox(),g=p.width+16,y=p.height+16;if(o.debug("new ViewBox 0 0 ".concat(g," ").concat(y),"translate(".concat(8-c._label.marginx,", ").concat(8-c._label.marginy,")")),lb(f,y,g,n.useMaxWidth),f.attr("viewBox","0 0 ".concat(g," ").concat(y)),f.select("g").attr("transform","translate(".concat(8-c._label.marginx,", ").concat(8-p.y,")")),!n.htmlLabels)for(var m="sandbox"===r?i.nodes()[0].contentDocument:document,v=m.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),b=0;b<v.length;b++){var _=v[b],x=_.getBBox(),w=m.createElementNS("http://www.w3.org/2000/svg","rect");w.setAttribute("rx",0),w.setAttribute("ry",0),w.setAttribute("width",x.width),w.setAttribute("height",x.height),_.insertBefore(w,_.firstChild)}f_(e_.parser.yy,f,e)}(i,t);break;case"state":s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,s.state,QC(i,t);break;case"stateDiagram":s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,iE(s.state),function(t,e){o.info("Drawing state diagram (v2)",e),UC.clear(),JC={};var n=EC().parser;n.yy=UC,n.parse(t);var r=UC.getDirection();void 0===r&&(r="LR");var i=wb().state,a=i.nodeSpacing||50,s=i.rankSpacing||50,c=wb().securityLevel;o.info(UC.getRootDocV2()),UC.extract(UC.getRootDocV2()),o.info(UC.getRootDocV2());var u,l=new(t_().Graph)({multigraph:!0,compound:!0}).setGraph({rankdir:rE(UC.getRootDocV2()),nodesep:a,ranksep:s,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));tE(l,void 0,UC.getRootDocV2(),!0),"sandbox"===c&&(u=au("#i"+e));var h=au("sandbox"===c?u.nodes()[0].contentDocument.body:"body"),f=("sandbox"===c?u.nodes()[0].contentDocument:document,h.select('[id="'.concat(e,'"]'))),d=h.select("#"+e+" g");ax(d,l,["barb"],"statediagram",e);var p=f.node().getBBox(),g=p.width+16,y=p.height+16;f.attr("class","statediagram");var m=f.node().getBBox();lb(f,y,1.75*g,i.useMaxWidth);var v="".concat(m.x-8," ").concat(m.y-8," ").concat(g," ").concat(y);o.debug("viewBox ".concat(v)),f.attr("viewBox",v);for(var b=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),_=0;_<b.length;_++){var x=b[_],w=x.getBBox(),k=document.createElementNS("http://www.w3.org/2000/svg","rect");k.setAttribute("rx",0),k.setAttribute("ry",0),k.setAttribute("width",w.width),k.setAttribute("height",w.height),x.insertBefore(k,x.firstChild)}f_(n.yy,f,e)}(i,t);break;case"info":s.class.arrowMarkerAbsolute=s.arrowMarkerAbsolute,Yk(s.class),function(t,e,n){try{var r=Fk().parser;r.yy=Ik,o.debug("Renering info diagram\n"+t);var i,a=wb().securityLevel;"sandbox"===a&&(i=au("#i"+e));var s=au("sandbox"===a?i.nodes()[0].contentDocument.body:"body");"sandbox"===a?i.nodes()[0].contentDocument:document,r.parse(t),o.debug("Parsed info diagram");var c=s.select("#"+e);c.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+n),c.attr("height",100),c.attr("width",400)}catch(t){o.error("Error while rendering info diagram"),o.error(t.message)}}(i,t,Dm);break;case"pie":Gk(i,t);break;case"er":bx(s.er),_x(i,t);break;case"journey":ME(s.journey),NE(i,t);break;case"requirement":hT(s.requirement),fT(i,t)}}catch(e){throw function(t,e){try{o.debug("Renering svg for syntax error\n");var n=au("#"+t),r=n.append("g");r.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),r.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),r.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),r.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),r.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),r.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),r.append("text").attr("class","error-text").attr("x",1240).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),r.append("text").attr("class","error-text").attr("x",1050).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+e),n.attr("height",100),n.attr("width",400),n.attr("viewBox","768 0 512 512")}catch(t){o.error("Error while rendering info diagram"),o.error(t.message)}}(t,Dm),e}c.select('[id="'.concat(t,'"]')).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");var T=c.select("#d"+t).node().innerHTML;if(o.debug("cnf.arrowMarkerAbsolute",s.arrowMarkerAbsolute),s.arrowMarkerAbsolute&&"false"!==s.arrowMarkerAbsolute||"sandbox"===s.arrowMarkerAbsolute||(T=T.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),T=(T=FE(T)).replace(/<br>/g,"<br/>"),"sandbox"===s.securityLevel){var C=c.select("#d"+t+" svg").node(),E="100%";C&&(E=C.viewBox.baseVal.height+"px"),T='<iframe style="width:'.concat("100%",";height:").concat(E,';border:0;margin:0;" src="data:text/html;base64,').concat(btoa('<body style="margin:0">'+T+"</body>"),'" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The “iframe” tag is not supported by your browser.\n</iframe>')}else"loose"!==s.securityLevel&&(T=Om().sanitize(T,{ADD_TAGS:["foreignobject"],ADD_ATTR:["dominant-baseline"]}));if(void 0!==n)switch(g){case"flowchart":case"flowchart-v2":n(T,Gx.bindFunctions);break;case"gantt":n(T,Qw.bindFunctions);break;case"class":case"classDiagram":n(T,Zb.bindFunctions);break;default:n(T)}else o.debug("CB = undefined!");IT.forEach((function(t){t()})),IT=[];var S="sandbox"===s.securityLevel?"#i"+t:"#d"+t,A=au(S).node();return null!==A&&"function"==typeof A.remove&&au(S).node().remove(),T},parse:function(t){t+="\n";var e=wb(),n=db.detectInit(t,e);n&&o.info("reinit ",n);var r,i=db.detectType(t,e);switch(o.debug("Type "+i),i){case"gitGraph":wk.clear(),(r=Tk()).parser.yy=wk;break;case"flowchart":case"flowchart-v2":Gx.clear(),(r=Zx()).parser.yy=Gx;break;case"sequence":OT.clear(),(r=pT()).parser.yy=OT;break;case"gantt":(r=ek()).parser.yy=Qw;break;case"class":case"classDiagram":(r=n_()).parser.yy=Zb;break;case"state":case"stateDiagram":(r=EC()).parser.yy=UC;break;case"info":o.debug("info info info"),(r=Fk()).parser.yy=Ik;break;case"pie":o.debug("pie"),(r=Uk()).parser.yy=Hk;break;case"er":o.debug("er"),(r=dx()).parser.yy=hx;break;case"journey":o.debug("Journey"),(r=pE()).parser.yy=fE;break;case"requirement":case"requirementDiagram":o.debug("RequirementDiagram"),(r=Zk()).parser.yy=nT}return r.parser.yy.graphType=i,r.parser.yy.parseError=function(t,e){throw{str:t,hash:e}},r.parse(t),r},parseDirective:function(t,e,n,r){try{if(void 0!==e)switch(e=e.trim(),n){case"open_directive":PE={};break;case"type_directive":PE.type=e.toLowerCase();break;case"arg_directive":PE.args=JSON.parse(e);break;case"close_directive":(function(t,e,n){switch(o.debug("Directive type=".concat(e.type," with args:"),e.args),e.type){case"init":case"initialize":["config"].forEach((function(t){void 0!==e.args[t]&&("flowchart-v2"===n&&(n="flowchart"),e.args[n]=e.args[t],delete e.args[t])})),o.debug("sanitize in handleDirective",e.args),hb(e.args),o.debug("sanitize in handleDirective (done)",e.args),e.args,Tb(e.args);break;case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap("wrap"===e.type);break;case"themeCss":o.warn("themeCss encountered");break;default:o.warn("Unhandled directive: source: '%%{".concat(e.type,": ").concat(JSON.stringify(e.args?e.args:{}),"}%%"),e)}})(t,PE,r),PE=null}}catch(t){o.error("Error while rendering sequenceDiagram directive: ".concat(e," jison context: ").concat(n)),o.error(t.message)}},initialize:function(t){t&&t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),function(t){gb=rb({},t)}(t),t&&t.theme&&Mv[t.theme]?t.themeVariables=Mv[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=Mv.default.getThemeVariables(t.themeVariables));var e="object"===RE(t)?function(t){return mb=rb({},yb),mb=rb(mb,t),t.theme&&Mv[t.theme]&&(mb.themeVariables=Mv[t.theme].getThemeVariables(t.themeVariables)),bb=_b(mb,vb),mb}(t):xb();YE(e),s(e.logLevel)},reinitialize:function(){},getConfig:wb,setConfig:function(t){return rb(bb,t),wb()},getSiteConfig:xb,updateSiteConfig:function(t){return mb=rb(mb,t),_b(mb,vb),mb},reset:function(){Cb()},globalReset:function(){Cb(),YE(wb())},defaultConfig:yb});s(wb().logLevel),Cb(wb());const UE=jE;var zE=function(){var t,e,n=UE.getConfig();arguments.length>=2?(void 0!==arguments[0]&&(qE.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],"function"==typeof arguments[arguments.length-1]?(e=arguments[arguments.length-1],o.debug("Callback function found")):void 0!==n.mermaid&&("function"==typeof n.mermaid.callback?(e=n.mermaid.callback,o.debug("Callback function found")):o.debug("No Callback function found")),t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof window.Node?[t]:t,o.debug("Start On Load before: "+qE.startOnLoad),void 0!==qE.startOnLoad&&(o.debug("Start On Load inner: "+qE.startOnLoad),UE.updateSiteConfig({startOnLoad:qE.startOnLoad})),void 0!==qE.ganttConfig&&UE.updateSiteConfig({gantt:qE.ganttConfig});for(var r,i=new db.initIdGeneratior(n.deterministicIds,n.deterministicIDSeed),a=function(n){var a=t[n];if(a.getAttribute("data-processed"))return"continue";a.setAttribute("data-processed",!0);var s="mermaid-".concat(i.next());r=a.innerHTML,r=db.entityDecode(r).trim().replace(/<br\s*\/?>/gi,"<br/>");var c=db.detectInit(r);c&&o.debug("Detected early reinit: ",c),UE.render(s,r,(function(t,n){a.innerHTML=t,void 0!==e&&e(s),n&&n(a)}),a)},s=0;s<t.length;s++)a(s)},$E=function(){qE.startOnLoad?UE.getConfig().startOnLoad&&qE.init():void 0===qE.startOnLoad&&(o.debug("In start, no config"),UE.getConfig().startOnLoad&&qE.init())};"undefined"!=typeof document&&window.addEventListener("load",(function(){$E()}),!1);var qE={startOnLoad:!0,htmlLabels:!0,mermaidAPI:UE,parse:UE.parse,render:UE.render,init:function(){try{zE.apply(void 0,arguments)}catch(t){o.warn("Syntax Error rendering"),o.warn(t),this.parseError&&this.parseError(t)}},initialize:function(t){void 0!==t.mermaid&&(void 0!==t.mermaid.startOnLoad&&(qE.startOnLoad=t.mermaid.startOnLoad),void 0!==t.mermaid.htmlLabels&&(qE.htmlLabels="false"!==t.mermaid.htmlLabels&&!1!==t.mermaid.htmlLabels)),UE.initialize(t)},contentLoaded:$E};const HE=qE},4949:(t,e,n)=>{t.exports={graphlib:n(6614),dagre:n(1463),intersect:n(8114),render:n(5787),util:n(8355),version:n(5689)}},9144:(t,e,n)=>{var r=n(8355);function i(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])}t.exports={default:i,normal:i,vee:function(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])},undirected:function(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])}}},5632:(t,e,n)=>{var r=n(8355),i=n(4322),a=n(1322);t.exports=function(t,e){var n,o=e.nodes().filter((function(t){return r.isSubgraph(e,t)})),s=t.selectAll("g.cluster").data(o,(function(t){return t}));return s.selectAll("*").remove(),s.enter().append("g").attr("class","cluster").attr("id",(function(t){return e.node(t).id})).style("opacity",0),s=t.selectAll("g.cluster"),r.applyTransition(s,e).style("opacity",1),s.each((function(t){var n=e.node(t),r=i.select(this);i.select(this).append("rect");var o=r.append("g").attr("class","label");a(o,n,n.clusterLabelPos)})),s.selectAll("rect").each((function(t){var n=e.node(t),a=i.select(this);r.applyStyle(a,n.style)})),n=s.exit?s.exit():s.selectAll(null),r.applyTransition(n,e).style("opacity",0).remove(),s}},6315:(t,e,n)=>{"use strict";var r=n(1034),i=n(1322),a=n(8355),o=n(4322);t.exports=function(t,e){var n,s=t.selectAll("g.edgeLabel").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0);return s.exit().remove(),s.enter().append("g").classed("edgeLabel",!0).style("opacity",0),(s=t.selectAll("g.edgeLabel")).each((function(t){var n=o.select(this);n.select(".label").remove();var a=e.edge(t),s=i(n,e.edge(t),0,0).classed("label",!0),c=s.node().getBBox();a.labelId&&s.attr("id",a.labelId),r.has(a,"width")||(a.width=c.width),r.has(a,"height")||(a.height=c.height)})),n=s.exit?s.exit():s.selectAll(null),a.applyTransition(n,e).style("opacity",0).remove(),s}},940:(t,e,n)=>{"use strict";var r=n(1034),i=n(3042),a=n(8355),o=n(4322);function s(t,e){var n=(o.line||o.svg.line)().x((function(t){return t.x})).y((function(t){return t.y}));return(n.curve||n.interpolate)(t.curve),n(e)}t.exports=function(t,e,n){var c=t.selectAll("g.edgePath").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0),u=function(t,e){var n=t.enter().append("g").attr("class","edgePath").style("opacity",0);return n.append("path").attr("class","path").attr("d",(function(t){var n=e.edge(t),i=e.node(t.v).elem;return s(n,r.range(n.points.length).map((function(){return e=(t=i).getBBox(),{x:(n=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2)).e,y:n.f};var t,e,n})))})),n.append("defs"),n}(c,e);!function(t,e){var n=t.exit();a.applyTransition(n,e).style("opacity",0).remove()}(c,e);var l=void 0!==c.merge?c.merge(u):c;return a.applyTransition(l,e).style("opacity",1),l.each((function(t){var n=o.select(this),r=e.edge(t);r.elem=this,r.id&&n.attr("id",r.id),a.applyClass(n,r.class,(n.classed("update")?"update ":"")+"edgePath")})),l.selectAll("path.path").each((function(t){var n=e.edge(t);n.arrowheadId=r.uniqueId("arrowhead");var c=o.select(this).attr("marker-end",(function(){return"url("+(t=location.href,e=n.arrowheadId,t.split("#")[0]+"#"+e+")");var t,e})).style("fill","none");a.applyTransition(c,e).attr("d",(function(t){return function(t,e){var n=t.edge(e),r=t.node(e.v),a=t.node(e.w),o=n.points.slice(1,n.points.length-1);return o.unshift(i(r,o[0])),o.push(i(a,o[o.length-1])),s(n,o)}(e,t)})),a.applyStyle(c,n.style)})),l.selectAll("defs *").remove(),l.selectAll("defs").each((function(t){var r=e.edge(t);(0,n[r.arrowhead])(o.select(this),r.arrowheadId,r,"arrowhead")})),l}},607:(t,e,n)=>{"use strict";var r=n(1034),i=n(1322),a=n(8355),o=n(4322);t.exports=function(t,e,n){var s,c=e.nodes().filter((function(t){return!a.isSubgraph(e,t)})),u=t.selectAll("g.node").data(c,(function(t){return t})).classed("update",!0);return u.exit().remove(),u.enter().append("g").attr("class","node").style("opacity",0),(u=t.selectAll("g.node")).each((function(t){var s=e.node(t),c=o.select(this);a.applyClass(c,s.class,(c.classed("update")?"update ":"")+"node"),c.select("g.label").remove();var u=c.append("g").attr("class","label"),l=i(u,s),h=n[s.shape],f=r.pick(l.node().getBBox(),"width","height");s.elem=this,s.id&&c.attr("id",s.id),s.labelId&&u.attr("id",s.labelId),r.has(s,"width")&&(f.width=s.width),r.has(s,"height")&&(f.height=s.height),f.width+=s.paddingLeft+s.paddingRight,f.height+=s.paddingTop+s.paddingBottom,u.attr("transform","translate("+(s.paddingLeft-s.paddingRight)/2+","+(s.paddingTop-s.paddingBottom)/2+")");var d=o.select(this);d.select(".label-container").remove();var p=h(d,f,s).classed("label-container",!0);a.applyStyle(p,s.style);var g=p.node().getBBox();s.width=g.width,s.height=g.height})),s=u.exit?u.exit():u.selectAll(null),a.applyTransition(s,e).style("opacity",0).remove(),u}},4322:(t,e,n)=>{var r;if(!r)try{r=n(7188)}catch(t){}r||(r=window.d3),t.exports=r},1463:(t,e,n)=>{var r;try{r=n(681)}catch(t){}r||(r=window.dagre),t.exports=r},6614:(t,e,n)=>{var r;try{r=n(8282)}catch(t){}r||(r=window.graphlib),t.exports=r},8114:(t,e,n)=>{t.exports={node:n(3042),circle:n(6587),ellipse:n(3260),polygon:n(5337),rect:n(8049)}},6587:(t,e,n)=>{var r=n(3260);t.exports=function(t,e,n){return r(t,e,e,n)}},3260:t=>{t.exports=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),u=Math.abs(e*n*o/c);r.x<i&&(u=-u);var l=Math.abs(e*n*s/c);return r.y<a&&(l=-l),{x:i+u,y:a+l}}},6808:t=>{function e(t,e){return t*e>0}t.exports=function(t,n,r,i){var a,o,s,c,u,l,h,f,d,p,g,y,m;if(!(a=n.y-t.y,s=t.x-n.x,u=n.x*t.y-t.x*n.y,d=a*r.x+s*r.y+u,p=a*i.x+s*i.y+u,0!==d&&0!==p&&e(d,p)||(o=i.y-r.y,c=r.x-i.x,l=i.x*r.y-r.x*i.y,h=o*t.x+c*t.y+l,f=o*n.x+c*n.y+l,0!==h&&0!==f&&e(h,f)||0==(g=a*c-o*s))))return y=Math.abs(g/2),{x:(m=s*l-c*u)<0?(m-y)/g:(m+y)/g,y:(m=o*u-a*l)<0?(m-y)/g:(m+y)/g}}},3042:t=>{t.exports=function(t,e){return t.intersect(e)}},5337:(t,e,n)=>{var r=n(6808);t.exports=function(t,e,n){var i=t.x,a=t.y,o=[],s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;e.forEach((function(t){s=Math.min(s,t.x),c=Math.min(c,t.y)}));for(var u=i-t.width/2-s,l=a-t.height/2-c,h=0;h<e.length;h++){var f=e[h],d=e[h<e.length-1?h+1:0],p=r(t,n,{x:u+f.x,y:l+f.y},{x:u+d.x,y:l+d.y});p&&o.push(p)}return o.length?(o.length>1&&o.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1})),o[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}},8049:t=>{t.exports=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;return Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=0===s?0:u*o/s,r=u):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o),{x:i+n,y:a+r}}},8284:(t,e,n)=>{var r=n(8355);t.exports=function(t,e){var n=t.append("foreignObject").attr("width","100000"),i=n.append("xhtml:div");i.attr("xmlns","http://www.w3.org/1999/xhtml");var a=e.label;switch(typeof a){case"function":i.insert(a);break;case"object":i.insert((function(){return a}));break;default:i.html(a)}r.applyStyle(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var o=i.node().getBoundingClientRect();return n.attr("width",o.width).attr("height",o.height),n}},1322:(t,e,n)=>{var r=n(7318),i=n(8284),a=n(8287);t.exports=function(t,e,n){var o=e.label,s=t.append("g");"svg"===e.labelType?a(s,e):"string"!=typeof o||"html"===e.labelType?i(s,e):r(s,e);var c,u=s.node().getBBox();switch(n){case"top":c=-e.height/2;break;case"bottom":c=e.height/2-u.height;break;default:c=-u.height/2}return s.attr("transform","translate("+-u.width/2+","+c+")"),s}},8287:(t,e,n)=>{var r=n(8355);t.exports=function(t,e){var n=t;return n.node().appendChild(e.label),r.applyStyle(n,e.labelStyle),n}},7318:(t,e,n)=>{var r=n(8355);t.exports=function(t,e){for(var n=t.append("text"),i=function(t){for(var e,n="",r=!1,i=0;i<t.length;++i)e=t[i],r?(n+="n"===e?"\n":e,r=!1):"\\"===e?r=!0:n+=e;return n}(e.label).split("\n"),a=0;a<i.length;a++)n.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(i[a]);return r.applyStyle(n,e.labelStyle),n}},1034:(t,e,n)=>{var r;try{r={defaults:n(1747),each:n(6073),isFunction:n(3560),isPlainObject:n(8630),pick:n(9722),has:n(8721),range:n(6026),uniqueId:n(3955)}}catch(t){}r||(r=window._),t.exports=r},6381:(t,e,n)=>{"use strict";var r=n(8355),i=n(4322);t.exports=function(t,e){var n=t.filter((function(){return!i.select(this).classed("update")}));function a(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}n.attr("transform",a),r.applyTransition(t,e).style("opacity",1).attr("transform",a),r.applyTransition(n.selectAll("rect"),e).attr("width",(function(t){return e.node(t).width})).attr("height",(function(t){return e.node(t).height})).attr("x",(function(t){return-e.node(t).width/2})).attr("y",(function(t){return-e.node(t).height/2}))}},4577:(t,e,n)=>{"use strict";var r=n(8355),i=n(4322),a=n(1034);t.exports=function(t,e){function n(t){var n=e.edge(t);return a.has(n,"x")?"translate("+n.x+","+n.y+")":""}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},4849:(t,e,n)=>{"use strict";var r=n(8355),i=n(4322);t.exports=function(t,e){function n(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},5787:(t,e,n)=>{var r=n(1034),i=n(4322),a=n(1463).layout;t.exports=function(){var t=n(607),e=n(5632),i=n(6315),u=n(940),l=n(4849),h=n(4577),f=n(6381),d=n(4418),p=n(9144),g=function(n,g){!function(t){t.nodes().forEach((function(e){var n=t.node(e);r.has(n,"label")||t.children(e).length||(n.label=e),r.has(n,"paddingX")&&r.defaults(n,{paddingLeft:n.paddingX,paddingRight:n.paddingX}),r.has(n,"paddingY")&&r.defaults(n,{paddingTop:n.paddingY,paddingBottom:n.paddingY}),r.has(n,"padding")&&r.defaults(n,{paddingLeft:n.padding,paddingRight:n.padding,paddingTop:n.padding,paddingBottom:n.padding}),r.defaults(n,o),r.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],(function(t){n[t]=Number(n[t])})),r.has(n,"width")&&(n._prevWidth=n.width),r.has(n,"height")&&(n._prevHeight=n.height)})),t.edges().forEach((function(e){var n=t.edge(e);r.has(n,"label")||(n.label=""),r.defaults(n,s)}))}(g);var y=c(n,"output"),m=c(y,"clusters"),v=c(y,"edgePaths"),b=i(c(y,"edgeLabels"),g),_=t(c(y,"nodes"),g,d);a(g),l(_,g),h(b,g),u(v,g,p);var x=e(m,g);f(x,g),function(t){r.each(t.nodes(),(function(e){var n=t.node(e);r.has(n,"_prevWidth")?n.width=n._prevWidth:delete n.width,r.has(n,"_prevHeight")?n.height=n._prevHeight:delete n.height,delete n._prevWidth,delete n._prevHeight}))}(g)};return g.createNodes=function(e){return arguments.length?(t=e,g):t},g.createClusters=function(t){return arguments.length?(e=t,g):e},g.createEdgeLabels=function(t){return arguments.length?(i=t,g):i},g.createEdgePaths=function(t){return arguments.length?(u=t,g):u},g.shapes=function(t){return arguments.length?(d=t,g):d},g.arrows=function(t){return arguments.length?(p=t,g):p},g};var o={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},s={arrowhead:"normal",curve:i.curveLinear};function c(t,e){var n=t.select("g."+e);return n.empty()&&(n=t.append("g").attr("class",e)),n}},4418:(t,e,n)=>{"use strict";var r=n(8049),i=n(3260),a=n(6587),o=n(5337);t.exports={rect:function(t,e,n){var i=t.insert("rect",":first-child").attr("rx",n.rx).attr("ry",n.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return n.intersect=function(t){return r(n,t)},i},ellipse:function(t,e,n){var r=e.width/2,a=e.height/2,o=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",r).attr("ry",a);return n.intersect=function(t){return i(n,r,a,t)},o},circle:function(t,e,n){var r=Math.max(e.width,e.height)/2,i=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",r);return n.intersect=function(t){return a(n,r,t)},i},diamond:function(t,e,n){var r=e.width*Math.SQRT2/2,i=e.height*Math.SQRT2/2,a=[{x:0,y:-i},{x:-r,y:0},{x:0,y:i},{x:r,y:0}],s=t.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" "));return n.intersect=function(t){return o(n,a,t)},s}}},8355:(t,e,n)=>{var r=n(1034);t.exports={isSubgraph:function(t,e){return!!t.children(e).length},edgeToId:function(t){return a(t.v)+":"+a(t.w)+":"+a(t.name)},applyStyle:function(t,e){e&&t.attr("style",e)},applyClass:function(t,e,n){e&&t.attr("class",e).attr("class",n+" "+t.attr("class"))},applyTransition:function(t,e){var n=e.graph();if(r.isPlainObject(n)){var i=n.transition;if(r.isFunction(i))return i(t)}return t}};var i=/:/g;function a(t){return t?String(t).replace(i,"\\:"):""}},5689:t=>{t.exports="0.6.4"},7188:(t,e,n)=>{"use strict";n.r(e),n.d(e,{FormatSpecifier:()=>uc,active:()=>Jr,arc:()=>fx,area:()=>vx,areaRadial:()=>Sx,ascending:()=>i,autoType:()=>Fo,axisBottom:()=>it,axisLeft:()=>at,axisRight:()=>rt,axisTop:()=>nt,bisect:()=>u,bisectLeft:()=>c,bisectRight:()=>s,bisector:()=>a,blob:()=>ms,brush:()=>Ai,brushSelection:()=>Ci,brushX:()=>Ei,brushY:()=>Si,buffer:()=>bs,chord:()=>Fi,clientPoint:()=>Dn,cluster:()=>Sd,color:()=>Ve,contourDensity:()=>oo,contours:()=>to,create:()=>Y_,creator:()=>ie,cross:()=>f,csv:()=>Ts,csvFormat:()=>To,csvFormatBody:()=>Co,csvFormatRow:()=>So,csvFormatRows:()=>Eo,csvFormatValue:()=>Ao,csvParse:()=>wo,csvParseRows:()=>ko,cubehelix:()=>qa,curveBasis:()=>sw,curveBasisClosed:()=>uw,curveBasisOpen:()=>hw,curveBundle:()=>dw,curveCardinal:()=>yw,curveCardinalClosed:()=>vw,curveCardinalOpen:()=>_w,curveCatmullRom:()=>kw,curveCatmullRomClosed:()=>Cw,curveCatmullRomOpen:()=>Sw,curveLinear:()=>px,curveLinearClosed:()=>Mw,curveMonotoneX:()=>Fw,curveMonotoneY:()=>Pw,curveNatural:()=>Uw,curveStep:()=>$w,curveStepAfter:()=>Hw,curveStepBefore:()=>qw,customEvent:()=>ye,descending:()=>d,deviation:()=>y,dispatch:()=>ft,drag:()=>po,dragDisable:()=>Se,dragEnable:()=>Ae,dsv:()=>ks,dsvFormat:()=>_o,easeBack:()=>hs,easeBackIn:()=>us,easeBackInOut:()=>hs,easeBackOut:()=>ls,easeBounce:()=>os,easeBounceIn:()=>as,easeBounceInOut:()=>ss,easeBounceOut:()=>os,easeCircle:()=>rs,easeCircleIn:()=>es,easeCircleInOut:()=>rs,easeCircleOut:()=>ns,easeCubic:()=>Xr,easeCubicIn:()=>Vr,easeCubicInOut:()=>Xr,easeCubicOut:()=>Gr,easeElastic:()=>ps,easeElasticIn:()=>ds,easeElasticInOut:()=>gs,easeElasticOut:()=>ps,easeExp:()=>ts,easeExpIn:()=>Ko,easeExpInOut:()=>ts,easeExpOut:()=>Jo,easeLinear:()=>Yo,easePoly:()=>Ho,easePolyIn:()=>$o,easePolyInOut:()=>Ho,easePolyOut:()=>qo,easeQuad:()=>zo,easeQuadIn:()=>jo,easeQuadInOut:()=>zo,easeQuadOut:()=>Uo,easeSin:()=>Zo,easeSinIn:()=>Go,easeSinInOut:()=>Zo,easeSinOut:()=>Xo,entries:()=>pa,event:()=>le,extent:()=>m,forceCenter:()=>Ls,forceCollide:()=>Ws,forceLink:()=>Xs,forceManyBody:()=>tc,forceRadial:()=>ec,forceSimulation:()=>Js,forceX:()=>nc,forceY:()=>rc,format:()=>pc,formatDefaultLocale:()=>bc,formatLocale:()=>vc,formatPrefix:()=>gc,formatSpecifier:()=>cc,geoAlbers:()=>zf,geoAlbersUsa:()=>$f,geoArea:()=>gu,geoAzimuthalEqualArea:()=>Vf,geoAzimuthalEqualAreaRaw:()=>Wf,geoAzimuthalEquidistant:()=>Xf,geoAzimuthalEquidistantRaw:()=>Gf,geoBounds:()=>sl,geoCentroid:()=>bl,geoCircle:()=>Nl,geoClipAntimeridian:()=>zl,geoClipCircle:()=>$l,geoClipExtent:()=>Vl,geoClipRectangle:()=>Wl,geoConicConformal:()=>ed,geoConicConformalRaw:()=>td,geoConicEqualArea:()=>Uf,geoConicEqualAreaRaw:()=>jf,geoConicEquidistant:()=>ad,geoConicEquidistantRaw:()=>id,geoContains:()=>ph,geoDistance:()=>ah,geoEqualEarth:()=>fd,geoEqualEarthRaw:()=>hd,geoEquirectangular:()=>rd,geoEquirectangularRaw:()=>nd,geoGnomonic:()=>pd,geoGnomonicRaw:()=>dd,geoGraticule:()=>mh,geoGraticule10:()=>vh,geoIdentity:()=>gd,geoInterpolate:()=>bh,geoLength:()=>nh,geoMercator:()=>Qf,geoMercatorRaw:()=>Zf,geoNaturalEarth1:()=>md,geoNaturalEarth1Raw:()=>yd,geoOrthographic:()=>bd,geoOrthographicRaw:()=>vd,geoPath:()=>kf,geoProjection:()=>Ff,geoProjectionMutator:()=>Pf,geoRotation:()=>Sl,geoStereographic:()=>xd,geoStereographicRaw:()=>_d,geoStream:()=>nu,geoTransform:()=>Tf,geoTransverseMercator:()=>kd,geoTransverseMercatorRaw:()=>wd,gray:()=>ka,hcl:()=>Ba,hierarchy:()=>Md,histogram:()=>D,hsl:()=>an,html:()=>Ds,image:()=>Es,interpolate:()=>Mn,interpolateArray:()=>xn,interpolateBasis:()=>un,interpolateBasisClosed:()=>ln,interpolateBlues:()=>f_,interpolateBrBG:()=>Tb,interpolateBuGn:()=>zb,interpolateBuPu:()=>qb,interpolateCividis:()=>k_,interpolateCool:()=>E_,interpolateCubehelix:()=>Up,interpolateCubehelixDefault:()=>T_,interpolateCubehelixLong:()=>zp,interpolateDate:()=>kn,interpolateDiscrete:()=>Sp,interpolateGnBu:()=>Wb,interpolateGreens:()=>p_,interpolateGreys:()=>y_,interpolateHcl:()=>Pp,interpolateHclLong:()=>Yp,interpolateHsl:()=>Op,interpolateHslLong:()=>Ip,interpolateHue:()=>Ap,interpolateInferno:()=>F_,interpolateLab:()=>Rp,interpolateMagma:()=>R_,interpolateNumber:()=>Tn,interpolateNumberArray:()=>bn,interpolateObject:()=>Cn,interpolateOrRd:()=>Gb,interpolateOranges:()=>w_,interpolatePRGn:()=>Eb,interpolatePiYG:()=>Ab,interpolatePlasma:()=>P_,interpolatePuBu:()=>Kb,interpolatePuBuGn:()=>Zb,interpolatePuOr:()=>Nb,interpolatePuRd:()=>t_,interpolatePurples:()=>v_,interpolateRainbow:()=>A_,interpolateRdBu:()=>Bb,interpolateRdGy:()=>Ob,interpolateRdPu:()=>n_,interpolateRdYlBu:()=>Rb,interpolateRdYlGn:()=>Pb,interpolateReds:()=>__,interpolateRgb:()=>gn,interpolateRgbBasis:()=>mn,interpolateRgbBasisClosed:()=>vn,interpolateRound:()=>Mp,interpolateSinebow:()=>B_,interpolateSpectral:()=>jb,interpolateString:()=>An,interpolateTransformCss:()=>pr,interpolateTransformSvg:()=>gr,interpolateTurbo:()=>L_,interpolateViridis:()=>I_,interpolateWarm:()=>C_,interpolateYlGn:()=>o_,interpolateYlGnBu:()=>i_,interpolateYlOrBr:()=>c_,interpolateYlOrRd:()=>l_,interpolateZoom:()=>Bp,interrupt:()=>ar,interval:()=>fk,isoFormat:()=>uk,isoParse:()=>hk,json:()=>As,keys:()=>fa,lab:()=>Ta,lch:()=>Da,line:()=>mx,lineRadial:()=>Ex,linkHorizontal:()=>Rx,linkRadial:()=>Px,linkVertical:()=>Fx,local:()=>U_,map:()=>na,matcher:()=>mt,max:()=>I,mean:()=>R,median:()=>F,merge:()=>P,min:()=>Y,mouse:()=>Ln,namespace:()=>Ct,namespaces:()=>Tt,nest:()=>ra,now:()=>qn,pack:()=>tp,packEnclose:()=>Id,packSiblings:()=>Gd,pairs:()=>l,partition:()=>op,path:()=>Wi,permute:()=>j,pie:()=>xx,piecewise:()=>$p,pointRadial:()=>Ax,polygonArea:()=>Hp,polygonCentroid:()=>Wp,polygonContains:()=>Qp,polygonHull:()=>Zp,polygonLength:()=>Kp,precisionFixed:()=>_c,precisionPrefix:()=>xc,precisionRound:()=>wc,quadtree:()=>js,quantile:()=>B,quantize:()=>qp,radialArea:()=>Sx,radialLine:()=>Ex,randomBates:()=>ig,randomExponential:()=>ag,randomIrwinHall:()=>rg,randomLogNormal:()=>ng,randomNormal:()=>eg,randomUniform:()=>tg,range:()=>k,rgb:()=>Qe,ribbon:()=>Ki,scaleBand:()=>dg,scaleDiverging:()=>ob,scaleDivergingLog:()=>sb,scaleDivergingPow:()=>ub,scaleDivergingSqrt:()=>lb,scaleDivergingSymlog:()=>cb,scaleIdentity:()=>Mg,scaleImplicit:()=>hg,scaleLinear:()=>Ag,scaleLog:()=>Pg,scaleOrdinal:()=>fg,scalePoint:()=>gg,scalePow:()=>Vg,scaleQuantile:()=>Xg,scaleQuantize:()=>Zg,scaleSequential:()=>Jv,scaleSequentialLog:()=>tb,scaleSequentialPow:()=>nb,scaleSequentialQuantile:()=>ib,scaleSequentialSqrt:()=>rb,scaleSequentialSymlog:()=>eb,scaleSqrt:()=>Gg,scaleSymlog:()=>zg,scaleThreshold:()=>Qg,scaleTime:()=>jv,scaleUtc:()=>Zv,scan:()=>U,schemeAccent:()=>db,schemeBlues:()=>h_,schemeBrBG:()=>kb,schemeBuGn:()=>Ub,schemeBuPu:()=>$b,schemeCategory10:()=>fb,schemeDark2:()=>pb,schemeGnBu:()=>Hb,schemeGreens:()=>d_,schemeGreys:()=>g_,schemeOrRd:()=>Vb,schemeOranges:()=>x_,schemePRGn:()=>Cb,schemePaired:()=>gb,schemePastel1:()=>yb,schemePastel2:()=>mb,schemePiYG:()=>Sb,schemePuBu:()=>Qb,schemePuBuGn:()=>Xb,schemePuOr:()=>Mb,schemePuRd:()=>Jb,schemePurples:()=>m_,schemeRdBu:()=>Db,schemeRdGy:()=>Lb,schemeRdPu:()=>e_,schemeRdYlBu:()=>Ib,schemeRdYlGn:()=>Fb,schemeReds:()=>b_,schemeSet1:()=>vb,schemeSet2:()=>bb,schemeSet3:()=>_b,schemeSpectral:()=>Yb,schemeTableau10:()=>xb,schemeYlGn:()=>a_,schemeYlGnBu:()=>r_,schemeYlOrBr:()=>s_,schemeYlOrRd:()=>u_,select:()=>Te,selectAll:()=>$_,selection:()=>ke,selector:()=>pt,selectorAll:()=>yt,set:()=>ha,shuffle:()=>z,stack:()=>Xw,stackOffsetDiverging:()=>Qw,stackOffsetExpand:()=>Zw,stackOffsetNone:()=>Ww,stackOffsetSilhouette:()=>Kw,stackOffsetWiggle:()=>Jw,stackOrderAppearance:()=>tk,stackOrderAscending:()=>nk,stackOrderDescending:()=>ik,stackOrderInsideOut:()=>ak,stackOrderNone:()=>Vw,stackOrderReverse:()=>ok,stratify:()=>hp,style:()=>Rt,sum:()=>$,svg:()=>Bs,symbol:()=>rw,symbolCircle:()=>Yx,symbolCross:()=>jx,symbolDiamond:()=>$x,symbolSquare:()=>Gx,symbolStar:()=>Vx,symbolTriangle:()=>Zx,symbolWye:()=>ew,symbols:()=>nw,text:()=>xs,thresholdFreedmanDiaconis:()=>L,thresholdScott:()=>O,thresholdSturges:()=>N,tickFormat:()=>Eg,tickIncrement:()=>A,tickStep:()=>M,ticks:()=>S,timeDay:()=>Ay,timeDays:()=>My,timeFormat:()=>pm,timeFormatDefaultLocale:()=>Iv,timeFormatLocale:()=>fm,timeFriday:()=>vy,timeFridays:()=>Cy,timeHour:()=>Dy,timeHours:()=>By,timeInterval:()=>ty,timeMillisecond:()=>jy,timeMilliseconds:()=>Uy,timeMinute:()=>Oy,timeMinutes:()=>Iy,timeMonday:()=>py,timeMondays:()=>xy,timeMonth:()=>ay,timeMonths:()=>oy,timeParse:()=>gm,timeSaturday:()=>by,timeSaturdays:()=>Ey,timeSecond:()=>Fy,timeSeconds:()=>Py,timeSunday:()=>dy,timeSundays:()=>_y,timeThursday:()=>my,timeThursdays:()=>Ty,timeTuesday:()=>gy,timeTuesdays:()=>wy,timeWednesday:()=>yy,timeWednesdays:()=>ky,timeWeek:()=>dy,timeWeeks:()=>_y,timeYear:()=>ny,timeYears:()=>ry,timeout:()=>Kn,timer:()=>Vn,timerFlush:()=>Gn,touch:()=>Bn,touches:()=>q_,transition:()=>qr,transpose:()=>q,tree:()=>vp,treemap:()=>kp,treemapBinary:()=>Tp,treemapDice:()=>ap,treemapResquarify:()=>Ep,treemapSlice:()=>bp,treemapSliceDice:()=>Cp,treemapSquarify:()=>wp,tsv:()=>Cs,tsvFormat:()=>Bo,tsvFormatBody:()=>Lo,tsvFormatRow:()=>Io,tsvFormatRows:()=>Oo,tsvFormatValue:()=>Ro,tsvParse:()=>No,tsvParseRows:()=>Do,utcDay:()=>im,utcDays:()=>am,utcFormat:()=>ym,utcFriday:()=>Gy,utcFridays:()=>em,utcHour:()=>Hv,utcHours:()=>Wv,utcMillisecond:()=>jy,utcMilliseconds:()=>Uy,utcMinute:()=>Gv,utcMinutes:()=>Xv,utcMonday:()=>qy,utcMondays:()=>Qy,utcMonth:()=>zv,utcMonths:()=>$v,utcParse:()=>mm,utcSaturday:()=>Xy,utcSaturdays:()=>nm,utcSecond:()=>Fy,utcSeconds:()=>Py,utcSunday:()=>$y,utcSundays:()=>Zy,utcThursday:()=>Vy,utcThursdays:()=>tm,utcTuesday:()=>Hy,utcTuesdays:()=>Ky,utcWednesday:()=>Wy,utcWednesdays:()=>Jy,utcWeek:()=>$y,utcWeeks:()=>Zy,utcYear:()=>sm,utcYears:()=>cm,values:()=>da,variance:()=>g,version:()=>r,voronoi:()=>Kk,window:()=>Bt,xml:()=>Ns,zip:()=>W,zoom:()=>fT,zoomIdentity:()=>nT,zoomTransform:()=>rT});var r="5.16.0";function i(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function a(t){var e;return 1===t.length&&(e=t,t=function(t,n){return i(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}var o=a(i),s=o.right,c=o.left;const u=s;function l(t,e){null==e&&(e=h);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return a}function h(t,e){return[t,e]}function f(t,e,n){var r,i,a,o,s=t.length,c=e.length,u=new Array(s*c);for(null==n&&(n=h),r=a=0;r<s;++r)for(o=t[r],i=0;i<c;++i,++a)u[a]=n(o,e[i]);return u}function d(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function p(t){return null===t?NaN:+t}function g(t,e){var n,r,i=t.length,a=0,o=-1,s=0,c=0;if(null==e)for(;++o<i;)isNaN(n=p(t[o]))||(c+=(r=n-s)*(n-(s+=r/++a)));else for(;++o<i;)isNaN(n=p(e(t[o],o,t)))||(c+=(r=n-s)*(n-(s+=r/++a)));if(a>1)return c/(a-1)}function y(t,e){var n=g(t,e);return n?Math.sqrt(n):n}function m(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}var v=Array.prototype,b=v.slice,_=v.map;function x(t){return function(){return t}}function w(t){return t}function k(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}var T=Math.sqrt(50),C=Math.sqrt(10),E=Math.sqrt(2);function S(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=A(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return r&&a.reverse(),a}function A(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=T?10:a>=C?5:a>=E?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=T?10:a>=C?5:a>=E?2:1)}function M(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=T?i*=10:a>=C?i*=5:a>=E&&(i*=2),e<t?-i:i}function N(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}function D(){var t=w,e=m,n=N;function r(r){var i,a,o=r.length,s=new Array(o);for(i=0;i<o;++i)s[i]=t(r[i],i,r);var c=e(s),l=c[0],h=c[1],f=n(s,l,h);Array.isArray(f)||(f=M(l,h,f),f=k(Math.ceil(l/f)*f,h,f));for(var d=f.length;f[0]<=l;)f.shift(),--d;for(;f[d-1]>h;)f.pop(),--d;var p,g=new Array(d+1);for(i=0;i<=d;++i)(p=g[i]=[]).x0=i>0?f[i-1]:l,p.x1=i<d?f[i]:h;for(i=0;i<o;++i)l<=(a=s[i])&&a<=h&&g[u(f,a,0,d)].push(r[i]);return g}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:x(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:x([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?x(b.call(t)):x(t),r):n},r}function B(t,e,n){if(null==n&&(n=p),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}}function L(t,e,n){return t=_.call(t,p).sort(i),Math.ceil((n-e)/(2*(B(t,.75)-B(t,.25))*Math.pow(t.length,-1/3)))}function O(t,e,n){return Math.ceil((n-e)/(3.5*y(t)*Math.pow(t.length,-1/3)))}function I(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r}function R(t,e){var n,r=t.length,i=r,a=-1,o=0;if(null==e)for(;++a<r;)isNaN(n=p(t[a]))?--i:o+=n;else for(;++a<r;)isNaN(n=p(e(t[a],a,t)))?--i:o+=n;if(i)return o/i}function F(t,e){var n,r=t.length,a=-1,o=[];if(null==e)for(;++a<r;)isNaN(n=p(t[a]))||o.push(n);else for(;++a<r;)isNaN(n=p(e(t[a],a,t)))||o.push(n);return B(o.sort(i),.5)}function P(t){for(var e,n,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(n=new Array(o);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n}function Y(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&r>n&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&r>n&&(r=n);return r}function j(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r}function U(t,e){if(n=t.length){var n,r,a=0,o=0,s=t[o];for(null==e&&(e=i);++a<n;)(e(r=t[a],s)<0||0!==e(s,s))&&(s=r,o=a);return 0===e(s,s)?o:void 0}}function z(t,e,n){for(var r,i,a=(null==n?t.length:n)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,r=t[a+e],t[a+e]=t[i+e],t[i+e]=r;return t}function $(t,e){var n,r=t.length,i=-1,a=0;if(null==e)for(;++i<r;)(n=+t[i])&&(a+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(a+=n);return a}function q(t){if(!(i=t.length))return[];for(var e=-1,n=Y(t,H),r=new Array(n);++e<n;)for(var i,a=-1,o=r[e]=new Array(i);++a<i;)o[a]=t[a][e];return r}function H(t){return t.length}function W(){return q(arguments)}var V=Array.prototype.slice;function G(t){return t}var X=1e-6;function Z(t){return"translate("+(t+.5)+",0)"}function Q(t){return"translate(0,"+(t+.5)+")"}function K(t){return function(e){return+t(e)}}function J(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function tt(){return!this.__axis}function et(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,c=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",l=1===t||3===t?Z:Q;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):G:i,p=Math.max(a,0)+s,g=e.range(),y=+g[0]+.5,m=+g[g.length-1]+.5,v=(e.bandwidth?J:K)(e.copy()),b=h.selection?h.selection():h,_=b.selectAll(".domain").data([null]),x=b.selectAll(".tick").data(f,e).order(),w=x.exit(),k=x.enter().append("g").attr("class","tick"),T=x.select("line"),C=x.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(k),T=T.merge(k.append("line").attr("stroke","currentColor").attr(u+"2",c*a)),C=C.merge(k.append("text").attr("fill","currentColor").attr(u,c*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==b&&(_=_.transition(h),x=x.transition(h),T=T.transition(h),C=C.transition(h),w=w.transition(h).attr("opacity",X).attr("transform",(function(t){return isFinite(t=v(t))?l(t):this.getAttribute("transform")})),k.attr("opacity",X).attr("transform",(function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:v(t))}))),w.remove(),_.attr("d",4===t||2==t?o?"M"+c*o+","+y+"H0.5V"+m+"H"+c*o:"M0.5,"+y+"V"+m:o?"M"+y+","+c*o+"V0.5H"+m+"V"+c*o:"M"+y+",0.5H"+m),x.attr("opacity",1).attr("transform",(function(t){return l(v(t))})),T.attr(u+"2",c*a),C.attr(u,c*p).text(d),b.filter(tt).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each((function(){this.__axis=v}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=V.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:V.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:V.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=o=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(o=+t,h):o},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function nt(t){return et(1,t)}function rt(t){return et(2,t)}function it(t){return et(3,t)}function at(t){return et(4,t)}var ot={value:function(){}};function st(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ct(r)}function ct(t){this._=t}function ut(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function lt(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function ht(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=ot,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ct.prototype=st.prototype={constructor:ct,on:function(t,e){var n,r=this._,i=ut(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=ht(r[n],t.name,e);else if(null==e)for(n in r)r[n]=ht(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=lt(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ct(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};const ft=st;function dt(){}function pt(t){return null==t?dt:function(){return this.querySelector(t)}}function gt(){return[]}function yt(t){return null==t?gt:function(){return this.querySelectorAll(t)}}function mt(t){return function(){return this.matches(t)}}function vt(t){return new Array(t.length)}function bt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function _t(t,e,n,r,i,a){for(var o,s=0,c=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new bt(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function xt(t,e,n,r,i,a,o){var s,c,u,l={},h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(d[s]=u="$"+o.call(c,c.__data__,s,e),u in l?i[s]=c:l[u]=c);for(s=0;s<f;++s)(c=l[u="$"+o.call(t,a[s],s,a)])?(r[s]=c,c.__data__=a[s],l[u]=null):n[s]=new bt(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&l[d[s]]===c&&(i[s]=c)}function wt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}bt.prototype={constructor:bt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var kt="http://www.w3.org/1999/xhtml";const Tt={svg:"http://www.w3.org/2000/svg",xhtml:kt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ct(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Tt.hasOwnProperty(e)?{space:Tt[e],local:t}:t}function Et(t){return function(){this.removeAttribute(t)}}function St(t){return function(){this.removeAttributeNS(t.space,t.local)}}function At(t,e){return function(){this.setAttribute(t,e)}}function Mt(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Nt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Dt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Bt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Lt(t){return function(){this.style.removeProperty(t)}}function Ot(t,e,n){return function(){this.style.setProperty(t,e,n)}}function It(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Rt(t,e){return t.style.getPropertyValue(e)||Bt(t).getComputedStyle(t,null).getPropertyValue(e)}function Ft(t){return function(){delete this[t]}}function Pt(t,e){return function(){this[t]=e}}function Yt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function jt(t){return t.trim().split(/^|\s+/)}function Ut(t){return t.classList||new zt(t)}function zt(t){this._node=t,this._names=jt(t.getAttribute("class")||"")}function $t(t,e){for(var n=Ut(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function qt(t,e){for(var n=Ut(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Ht(t){return function(){$t(this,t)}}function Wt(t){return function(){qt(this,t)}}function Vt(t,e){return function(){(e.apply(this,arguments)?$t:qt)(this,t)}}function Gt(){this.textContent=""}function Xt(t){return function(){this.textContent=t}}function Zt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Qt(){this.innerHTML=""}function Kt(t){return function(){this.innerHTML=t}}function Jt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function te(){this.nextSibling&&this.parentNode.appendChild(this)}function ee(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ne(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===kt&&e.documentElement.namespaceURI===kt?e.createElement(t):e.createElementNS(n,t)}}function re(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ie(t){var e=Ct(t);return(e.local?re:ne)(e)}function ae(){return null}function oe(){var t=this.parentNode;t&&t.removeChild(this)}function se(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ce(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}zt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ue={},le=null;function he(t,e,n){return t=fe(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function fe(t,e,n){return function(r){var i=le;le=r;try{t.call(this,this.__data__,e,n)}finally{le=i}}}function de(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function pe(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function ge(t,e,n){var r=ue.hasOwnProperty(t.type)?he:fe;return function(i,a,o){var s,c=this.__on,u=r(e,a,o);if(c)for(var l=0,h=c.length;l<h;++l)if((s=c[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=u,s.capture=n),void(s.value=e);this.addEventListener(t.type,u,n),s={type:t.type,name:t.name,value:e,listener:u,capture:n},c?c.push(s):this.__on=[s]}}function ye(t,e,n,r){var i=le;t.sourceEvent=le,le=t;try{return e.apply(n,r)}finally{le=i}}function me(t,e,n){var r=Bt(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function ve(t,e){return function(){return me(this,t,e)}}function be(t,e){return function(){return me(this,t,e.apply(this,arguments))}}"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(ue={mouseenter:"mouseover",mouseleave:"mouseout"}));var _e=[null];function xe(t,e){this._groups=t,this._parents=e}function we(){return new xe([[document.documentElement]],_e)}xe.prototype=we.prototype={constructor:xe,select:function(t){"function"!=typeof t&&(t=pt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,u=r[i]=new Array(c),l=0;l<c;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),u[l]=o);return new xe(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=yt(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,u=0;u<c;++u)(o=s[u])&&(r.push(t.call(o,o.__data__,u,s)),i.push(o));return new xe(r,i)},filter:function(t){"function"!=typeof t&&(t=mt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new xe(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),l=-1,this.each((function(t){p[++l]=t})),p;var n,r=e?xt:_t,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,s=new Array(o),c=new Array(o),u=new Array(o),l=0;l<o;++l){var h=i[l],f=a[l],d=f.length,p=t.call(h,h&&h.__data__,l,i),g=p.length,y=c[l]=new Array(g),m=s[l]=new Array(g);r(h,f,y,m,u[l]=new Array(d),p,e);for(var v,b,_=0,x=0;_<g;++_)if(v=y[_]){for(_>=x&&(x=_+1);!(b=m[x])&&++x<g;);v._next=b||null}}return(s=new xe(s,i))._enter=c,s._exit=u,s},enter:function(){return new xe(this._enter||this._groups.map(vt),this._parents)},exit:function(){return new xe(this._exit||this._groups.map(vt),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new xe(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=wt);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,u=i[a]=new Array(c),l=0;l<c;++l)(o=s[l])&&(u[l]=o);u.sort(e)}return new xe(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=Ct(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?St:Et:"function"==typeof e?n.local?Dt:Nt:n.local?Mt:At)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Lt:"function"==typeof e?It:Ot)(t,e,null==n?"":n)):Rt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ft:"function"==typeof e?Yt:Pt)(t,e)):this.node()[t]},classed:function(t,e){var n=jt(t+"");if(arguments.length<2){for(var r=Ut(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Vt:e?Ht:Wt)(n,e))},text:function(t){return arguments.length?this.each(null==t?Gt:("function"==typeof t?Zt:Xt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Qt:("function"==typeof t?Jt:Kt)(t)):this.node().innerHTML},raise:function(){return this.each(te)},lower:function(){return this.each(ee)},append:function(t){var e="function"==typeof t?t:ie(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ie(t),r=null==e?ae:"function"==typeof e?e:pt(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(oe)},clone:function(t){return this.select(t?ce:se)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=de(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?ge:pe,null==n&&(n=!1),r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,u=0,l=s.length;u<l;++u)for(r=0,c=s[u];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?be:ve)(t,e))}};const ke=we;function Te(t){return"string"==typeof t?new xe([[document.querySelector(t)]],[document.documentElement]):new xe([[t]],_e)}function Ce(){le.stopImmediatePropagation()}function Ee(){le.preventDefault(),le.stopImmediatePropagation()}function Se(t){var e=t.document.documentElement,n=Te(t).on("dragstart.drag",Ee,!0);"onselectstart"in e?n.on("selectstart.drag",Ee,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Ae(t,e){var n=t.document.documentElement,r=Te(t).on("dragstart.drag",null);e&&(r.on("click.drag",Ee,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Me(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ne(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function De(){}var Be=.7,Le=1/Be,Oe="\\s*([+-]?\\d+)\\s*",Ie="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Re="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fe=/^#([0-9a-f]{3,8})$/,Pe=new RegExp("^rgb\\("+[Oe,Oe,Oe]+"\\)$"),Ye=new RegExp("^rgb\\("+[Re,Re,Re]+"\\)$"),je=new RegExp("^rgba\\("+[Oe,Oe,Oe,Ie]+"\\)$"),Ue=new RegExp("^rgba\\("+[Re,Re,Re,Ie]+"\\)$"),ze=new RegExp("^hsl\\("+[Ie,Re,Re]+"\\)$"),$e=new RegExp("^hsla\\("+[Ie,Re,Re,Ie]+"\\)$"),qe={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function He(){return this.rgb().formatHex()}function We(){return this.rgb().formatRgb()}function Ve(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Fe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ge(e):3===n?new Ke(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Xe(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Xe(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Pe.exec(t))?new Ke(e[1],e[2],e[3],1):(e=Ye.exec(t))?new Ke(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=je.exec(t))?Xe(e[1],e[2],e[3],e[4]):(e=Ue.exec(t))?Xe(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ze.exec(t))?nn(e[1],e[2]/100,e[3]/100,1):(e=$e.exec(t))?nn(e[1],e[2]/100,e[3]/100,e[4]):qe.hasOwnProperty(t)?Ge(qe[t]):"transparent"===t?new Ke(NaN,NaN,NaN,0):null}function Ge(t){return new Ke(t>>16&255,t>>8&255,255&t,1)}function Xe(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ke(t,e,n,r)}function Ze(t){return t instanceof De||(t=Ve(t)),t?new Ke((t=t.rgb()).r,t.g,t.b,t.opacity):new Ke}function Qe(t,e,n,r){return 1===arguments.length?Ze(t):new Ke(t,e,n,null==r?1:r)}function Ke(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Je(){return"#"+en(this.r)+en(this.g)+en(this.b)}function tn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function en(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function nn(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new on(t,e,n,r)}function rn(t){if(t instanceof on)return new on(t.h,t.s,t.l,t.opacity);if(t instanceof De||(t=Ve(t)),!t)return new on;if(t instanceof on)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new on(o,s,c,t.opacity)}function an(t,e,n,r){return 1===arguments.length?rn(t):new on(t,e,n,null==r?1:r)}function on(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function sn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function cn(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}function un(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return cn((n-r/e)*e,o,i,a,s)}}function ln(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return cn((n-r/e)*e,i,a,o,s)}}function hn(t){return function(){return t}}function fn(t,e){return function(n){return t+n*e}}function dn(t,e){var n=e-t;return n?fn(t,n>180||n<-180?n-360*Math.round(n/360):n):hn(isNaN(t)?e:t)}function pn(t,e){var n=e-t;return n?fn(t,n):hn(isNaN(t)?e:t)}Me(De,Ve,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:He,formatHex:He,formatHsl:function(){return rn(this).formatHsl()},formatRgb:We,toString:We}),Me(Ke,Qe,Ne(De,{brighter:function(t){return t=null==t?Le:Math.pow(Le,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Be:Math.pow(Be,t),new Ke(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Je,formatHex:Je,formatRgb:tn,toString:tn})),Me(on,an,Ne(De,{brighter:function(t){return t=null==t?Le:Math.pow(Le,t),new on(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Be:Math.pow(Be,t),new on(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ke(sn(t>=240?t-240:t+120,i,r),sn(t,i,r),sn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const gn=function t(e){var n=function(t){return 1==(t=+t)?pn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):hn(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=Qe(t)).r,(e=Qe(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=pn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function yn(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=Qe(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}var mn=yn(un),vn=yn(ln);function bn(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function _n(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function xn(t,e){return(_n(e)?bn:wn)(t,e)}function wn(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=Mn(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function kn(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Tn(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Cn(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=Mn(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var En=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Sn=new RegExp(En.source,"g");function An(t,e){var n,r,i,a=En.lastIndex=Sn.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=En.exec(t))&&(r=Sn.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:Tn(n,r)})),a=Sn.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})}function Mn(t,e){var n,r=typeof e;return null==e||"boolean"===r?hn(e):("number"===r?Tn:"string"===r?(n=Ve(e))?(e=n,gn):An:e instanceof Ve?gn:e instanceof Date?kn:_n(e)?bn:Array.isArray(e)?wn:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Cn:Tn)(t,e)}function Nn(){for(var t,e=le;t=e.sourceEvent;)e=t;return e}function Dn(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}function Bn(t,e,n){arguments.length<3&&(n=e,e=Nn().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return Dn(t,r);return null}function Ln(t){var e=Nn();return e.changedTouches&&(e=e.changedTouches[0]),Dn(t,e)}var On,In,Rn=0,Fn=0,Pn=0,Yn=0,jn=0,Un=0,zn="object"==typeof performance&&performance.now?performance:Date,$n="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function qn(){return jn||($n(Hn),jn=zn.now()+Un)}function Hn(){jn=0}function Wn(){this._call=this._time=this._next=null}function Vn(t,e,n){var r=new Wn;return r.restart(t,e,n),r}function Gn(){qn(),++Rn;for(var t,e=On;e;)(t=jn-e._time)>=0&&e._call.call(null,t),e=e._next;--Rn}function Xn(){jn=(Yn=zn.now())+Un,Rn=Fn=0;try{Gn()}finally{Rn=0,function(){for(var t,e,n=On,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:On=e);In=t,Qn(r)}(),jn=0}}function Zn(){var t=zn.now(),e=t-Yn;e>1e3&&(Un-=e,Yn=t)}function Qn(t){Rn||(Fn&&(Fn=clearTimeout(Fn)),t-jn>24?(t<1/0&&(Fn=setTimeout(Xn,t-zn.now()-Un)),Pn&&(Pn=clearInterval(Pn))):(Pn||(Yn=zn.now(),Pn=setInterval(Zn,1e3)),Rn=1,$n(Xn)))}function Kn(t,e,n){var r=new Wn;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Wn.prototype=Vn.prototype={constructor:Wn,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?qn():+n)+(null==e?0:+e),this._next||In===this||(In?In._next=this:On=this,In=this),this._call=t,this._time=n,Qn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qn())}};var Jn=ft("start","end","cancel","interrupt"),tr=[];function er(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(c){var u,l,h,f;if(1!==n.state)return s();for(u in i)if((f=i[u]).name===n.name){if(3===f.state)return Kn(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+u<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[u])}if(Kn((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,l=-1;u<h;++u)(f=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Vn((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Jn,tween:tr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function nr(t,e){var n=ir(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function rr(t,e){var n=ir(t,e);if(n.state>3)throw new Error("too late; already running");return n}function ir(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ar(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}var or,sr,cr,ur,lr=180/Math.PI,hr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function fr(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*lr,skewX:Math.atan(c)*lr,scaleX:o,scaleY:s}}function dr(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:Tn(t,i)},{i:c-2,x:Tn(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Tn(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Tn(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Tn(t,n)},{i:s-2,x:Tn(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var pr=dr((function(t){return"none"===t?hr:(or||(or=document.createElement("DIV"),sr=document.documentElement,cr=document.defaultView),or.style.transform=t,t=cr.getComputedStyle(sr.appendChild(or),null).getPropertyValue("transform"),sr.removeChild(or),fr(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),gr=dr((function(t){return null==t?hr:(ur||(ur=document.createElementNS("http://www.w3.org/2000/svg","g")),ur.setAttribute("transform",t),(t=ur.transform.baseVal.consolidate())?fr((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):hr)}),", ",")",")");function yr(t,e){var n,r;return function(){var i=rr(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function mr(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=rr(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}a.tween=i}}function vr(t,e,n){var r=t._id;return t.each((function(){var t=rr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return ir(t,r).value[e]}}function br(t,e){var n;return("number"==typeof e?Tn:e instanceof Ve?gn:(n=Ve(e))?(e=n,gn):An)(t,e)}function _r(t){return function(){this.removeAttribute(t)}}function xr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function wr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function kr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function Tr(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function Cr(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function Er(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Sr(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Ar(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Sr(t,i)),n}return i._value=e,i}function Mr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Er(t,i)),n}return i._value=e,i}function Nr(t,e){return function(){nr(this,t).delay=+e.apply(this,arguments)}}function Dr(t,e){return e=+e,function(){nr(this,t).delay=e}}function Br(t,e){return function(){rr(this,t).duration=+e.apply(this,arguments)}}function Lr(t,e){return e=+e,function(){rr(this,t).duration=e}}function Or(t,e){if("function"!=typeof e)throw new Error;return function(){rr(this,t).ease=e}}function Ir(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?nr:rr;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Rr=ke.prototype.constructor;function Fr(t){return function(){this.style.removeProperty(t)}}function Pr(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Yr(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Pr(t,a,n)),r}return a._value=e,a}function jr(t){return function(e){this.textContent=t.call(this,e)}}function Ur(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&jr(r)),e}return r._value=t,r}var zr=0;function $r(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function qr(t){return ke().transition(t)}function Hr(){return++zr}var Wr=ke.prototype;function Vr(t){return t*t*t}function Gr(t){return--t*t*t+1}function Xr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}$r.prototype=qr.prototype={constructor:$r,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=pt(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,u=r[o],l=u.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=u[f])&&(c=t.call(s,s.__data__,f,u))&&("__data__"in s&&(c.__data__=s.__data__),h[f]=c,er(h[f],e,n,f,h,ir(s,n)));return new $r(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=yt(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,u=r[s],l=u.length,h=0;h<l;++h)if(c=u[h]){for(var f,d=t.call(c,c.__data__,h,u),p=ir(c,n),g=0,y=d.length;g<y;++g)(f=d[g])&&er(f,e,n,g,d,p);a.push(d),o.push(c)}return new $r(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=mt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new $r(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new $r(o,this._parents,this._name,this._id)},selection:function(){return new Rr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Hr(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)if(o=s[u]){var l=ir(o,e);er(o,t,n,u,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new $r(r,this._parents,t,n)},call:Wr.call,nodes:Wr.nodes,node:Wr.node,size:Wr.size,empty:Wr.empty,each:Wr.each,on:function(t,e){var n=this._id;return arguments.length<2?ir(this.node(),n).on.on(t):this.each(Ir(n,t,e))},attr:function(t,e){var n=Ct(t),r="transform"===n?gr:br;return this.attrTween(t,"function"==typeof e?(n.local?Cr:Tr)(n,r,vr(this,"attr."+t,e)):null==e?(n.local?xr:_r)(n):(n.local?kr:wr)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=Ct(t);return this.tween(n,(r.local?Ar:Mr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?pr:br;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Rt(this,t),o=(this.style.removeProperty(t),Rt(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Fr(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Rt(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=Rt(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,vr(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=rr(this,t),u=c.on,l=null==c.value[o]?a||(a=Fr(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(s,i=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Rt(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Yr(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(vr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Ur(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=ir(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?yr:mr)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Nr:Dr)(e,t)):ir(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Br:Lr)(e,t)):ir(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Or(e,t)):ir(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=rr(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e}))}))}};var Zr={time:null,delay:0,duration:250,ease:Xr};function Qr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Zr.time=qn(),Zr;return n}ke.prototype.interrupt=function(t){return this.each((function(){ar(this,t)}))},ke.prototype.transition=function(t){var e,n;t instanceof $r?(e=t._id,t=t._name):(e=Hr(),(n=Zr).time=qn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)(o=s[u])&&er(o,t,e,u,s,n||Qr(o,e));return new $r(r,this._parents,t,e)};var Kr=[null];function Jr(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+"",i)if((n=i[r]).state>1&&n.name===e)return new $r([[t]],Kr,e,+r);return null}function ti(t){return function(){return t}}function ei(t,e,n){this.target=t,this.type=e,this.selection=n}function ni(){le.stopImmediatePropagation()}function ri(){le.preventDefault(),le.stopImmediatePropagation()}var ii={name:"drag"},ai={name:"space"},oi={name:"handle"},si={name:"center"};function ci(t){return[+t[0],+t[1]]}function ui(t){return[ci(t[0]),ci(t[1])]}function li(t){return function(e){return Bn(e,le.touches,t)}}var hi={name:"x",handles:["w","e"].map(bi),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},fi={name:"y",handles:["n","s"].map(bi),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},di={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(bi),input:function(t){return null==t?null:ui(t)},output:function(t){return t}},pi={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},gi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},yi={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},mi={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},vi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function bi(t){return{type:t}}function _i(){return!le.ctrlKey&&!le.button}function xi(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function wi(){return navigator.maxTouchPoints||"ontouchstart"in this}function ki(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Ti(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Ci(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function Ei(){return Mi(hi)}function Si(){return Mi(fi)}function Ai(){return Mi(di)}function Mi(t){var e,n=xi,r=_i,i=wi,a=!0,o=ft("start","brush","end"),s=6;function c(e){var n=e.property("__brush",g).selectAll(".overlay").data([bi("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",pi.overlay).merge(n).each((function(){var t=ki(this).extent;Te(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([bi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",pi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return pi[t.type]})),e.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(i).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function u(){var t=Te(this),e=ki(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new h(t,e,n):r}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function f(){if((!e||le.touches)&&r.apply(this,arguments)){var n,i,o,s,c,h,f,d,p,g,y,m=this,v=le.target.__data__.type,b="selection"===(a&&le.metaKey?v="overlay":v)?ii:a&&le.altKey?si:oi,_=t===fi?null:mi[v],x=t===hi?null:vi[v],w=ki(m),k=w.extent,T=w.selection,C=k[0][0],E=k[0][1],S=k[1][0],A=k[1][1],M=0,N=0,D=_&&x&&a&&le.shiftKey,B=le.touches?li(le.changedTouches[0].identifier):Ln,L=B(m),O=L,I=l(m,arguments,!0).beforestart();"overlay"===v?(T&&(p=!0),w.selection=T=[[n=t===fi?C:L[0],o=t===hi?E:L[1]],[c=t===fi?S:n,f=t===hi?A:o]]):(n=T[0][0],o=T[0][1],c=T[1][0],f=T[1][1]),i=n,s=o,h=c,d=f;var R=Te(m).attr("pointer-events","none"),F=R.selectAll(".overlay").attr("cursor",pi[v]);if(le.touches)I.moved=Y,I.ended=U;else{var P=Te(le.view).on("mousemove.brush",Y,!0).on("mouseup.brush",U,!0);a&&P.on("keydown.brush",z,!0).on("keyup.brush",$,!0),Se(le.view)}ni(),ar(m),u.call(m),I.start()}function Y(){var t=B(m);!D||g||y||(Math.abs(t[0]-O[0])>Math.abs(t[1]-O[1])?y=!0:g=!0),O=t,p=!0,ri(),j()}function j(){var t;switch(M=O[0]-L[0],N=O[1]-L[1],b){case ai:case ii:_&&(M=Math.max(C-n,Math.min(S-c,M)),i=n+M,h=c+M),x&&(N=Math.max(E-o,Math.min(A-f,N)),s=o+N,d=f+N);break;case oi:_<0?(M=Math.max(C-n,Math.min(S-n,M)),i=n+M,h=c):_>0&&(M=Math.max(C-c,Math.min(S-c,M)),i=n,h=c+M),x<0?(N=Math.max(E-o,Math.min(A-o,N)),s=o+N,d=f):x>0&&(N=Math.max(E-f,Math.min(A-f,N)),s=o,d=f+N);break;case si:_&&(i=Math.max(C,Math.min(S,n-M*_)),h=Math.max(C,Math.min(S,c+M*_))),x&&(s=Math.max(E,Math.min(A,o-N*x)),d=Math.max(E,Math.min(A,f+N*x)))}h<i&&(_*=-1,t=n,n=c,c=t,t=i,i=h,h=t,v in gi&&F.attr("cursor",pi[v=gi[v]])),d<s&&(x*=-1,t=o,o=f,f=t,t=s,s=d,d=t,v in yi&&F.attr("cursor",pi[v=yi[v]])),w.selection&&(T=w.selection),g&&(i=T[0][0],h=T[1][0]),y&&(s=T[0][1],d=T[1][1]),T[0][0]===i&&T[0][1]===s&&T[1][0]===h&&T[1][1]===d||(w.selection=[[i,s],[h,d]],u.call(m),I.brush())}function U(){if(ni(),le.touches){if(le.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else Ae(le.view,p),P.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);R.attr("pointer-events","all"),F.attr("cursor",pi.overlay),w.selection&&(T=w.selection),Ti(T)&&(w.selection=null,u.call(m)),I.end()}function z(){switch(le.keyCode){case 16:D=_&&x;break;case 18:b===oi&&(_&&(c=h-M*_,n=i+M*_),x&&(f=d-N*x,o=s+N*x),b=si,j());break;case 32:b!==oi&&b!==si||(_<0?c=h-M:_>0&&(n=i-M),x<0?f=d-N:x>0&&(o=s-N),b=ai,F.attr("cursor",pi.selection),j());break;default:return}ri()}function $(){switch(le.keyCode){case 16:D&&(g=y=D=!1,j());break;case 18:b===si&&(_<0?c=h:_>0&&(n=i),x<0?f=d:x>0&&(o=s),b=oi,j());break;case 32:b===ai&&(le.altKey?(_&&(c=h-M*_,n=i+M*_),x&&(f=d-N*x,o=s+N*x),b=si):(_<0?c=h:_>0&&(n=i),x<0?f=d:x>0&&(o=s),b=oi),F.attr("cursor",pi[v]),j());break;default:return}ri()}}function d(){l(this,arguments).moved()}function p(){l(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=ui(n.apply(this,arguments)),e.dim=t,e}return c.move=function(e,n){e.selection?e.on("start.brush",(function(){l(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){l(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=l(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=Mn(a,o);function c(t){r.selection=1===t&&null===o?null:s(t),u.call(e),i.brush()}return null!==a&&null!==o?c:c(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,a=t.input("function"==typeof n?n.apply(e,r):n,i.extent),o=l(e,r).beforestart();ar(e),i.selection=null===a?null:a,u.call(e),o.start().brush().end()}))},c.clear=function(t){c.move(t,null)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){ye(new ei(c,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},c.extent=function(t){return arguments.length?(n="function"==typeof t?t:ti(ui(t)),c):n},c.filter=function(t){return arguments.length?(r="function"==typeof t?t:ti(!!t),c):r},c.touchable=function(t){return arguments.length?(i="function"==typeof t?t:ti(!!t),c):i},c.handleSize=function(t){return arguments.length?(s=+t,c):s},c.keyModifiers=function(t){return arguments.length?(a=!!t,c):a},c.on=function(){var t=o.on.apply(o,arguments);return t===o?c:t},c}var Ni=Math.cos,Di=Math.sin,Bi=Math.PI,Li=Bi/2,Oi=2*Bi,Ii=Math.max;function Ri(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}function Fi(){var t=0,e=null,n=null,r=null;function i(i){var a,o,s,c,u,l,h=i.length,f=[],d=k(h),p=[],g=[],y=g.groups=new Array(h),m=new Array(h*h);for(a=0,u=-1;++u<h;){for(o=0,l=-1;++l<h;)o+=i[u][l];f.push(o),p.push(k(h)),a+=o}for(e&&d.sort((function(t,n){return e(f[t],f[n])})),n&&p.forEach((function(t,e){t.sort((function(t,r){return n(i[e][t],i[e][r])}))})),c=(a=Ii(0,Oi-t*h)/a)?t:Oi/h,o=0,u=-1;++u<h;){for(s=o,l=-1;++l<h;){var v=d[u],b=p[v][l],_=i[v][b],x=o,w=o+=_*a;m[b*h+v]={index:v,subindex:b,startAngle:x,endAngle:w,value:_}}y[v]={index:v,startAngle:s,endAngle:o,value:f[v]},o+=c}for(u=-1;++u<h;)for(l=u-1;++l<h;){var T=m[l*h+u],C=m[u*h+l];(T.value||C.value)&&g.push(T.value<C.value?{source:C,target:T}:{source:T,target:C})}return r?g.sort(r):g}return i.padAngle=function(e){return arguments.length?(t=Ii(0,e),i):t},i.sortGroups=function(t){return arguments.length?(e=t,i):e},i.sortSubgroups=function(t){return arguments.length?(n=t,i):n},i.sortChords=function(t){return arguments.length?(null==t?r=null:(r=Ri(t))._=t,i):r&&r._},i}var Pi=Array.prototype.slice;function Yi(t){return function(){return t}}var ji=Math.PI,Ui=2*ji,zi=1e-6,$i=Ui-zi;function qi(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Hi(){return new qi}qi.prototype=Hi.prototype={constructor:qi,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,c=r-e,u=a-t,l=o-e,h=u*u+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>zi)if(Math.abs(l*s-c*u)>zi&&i){var f=n-a,d=r-o,p=s*s+c*c,g=f*f+d*d,y=Math.sqrt(p),m=Math.sqrt(h),v=i*Math.tan((ji-Math.acos((p+h-g)/(2*y*m)))/2),b=v/m,_=v/y;Math.abs(b-1)>zi&&(this._+="L"+(t+b*u)+","+(e+b*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>u*d)+","+(this._x1=t+_*s)+","+(this._y1=e+_*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),c=t+o,u=e+s,l=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+u:(Math.abs(this._x1-c)>zi||Math.abs(this._y1-u)>zi)&&(this._+="L"+c+","+u),n&&(h<0&&(h=h%Ui+Ui),h>$i?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=c)+","+(this._y1=u):h>zi&&(this._+="A"+n+","+n+",0,"+ +(h>=ji)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};const Wi=Hi;function Vi(t){return t.source}function Gi(t){return t.target}function Xi(t){return t.radius}function Zi(t){return t.startAngle}function Qi(t){return t.endAngle}function Ki(){var t=Vi,e=Gi,n=Xi,r=Zi,i=Qi,a=null;function o(){var o,s=Pi.call(arguments),c=t.apply(this,s),u=e.apply(this,s),l=+n.apply(this,(s[0]=c,s)),h=r.apply(this,s)-Li,f=i.apply(this,s)-Li,d=l*Ni(h),p=l*Di(h),g=+n.apply(this,(s[0]=u,s)),y=r.apply(this,s)-Li,m=i.apply(this,s)-Li;if(a||(a=o=Wi()),a.moveTo(d,p),a.arc(0,0,l,h,f),h===y&&f===m||(a.quadraticCurveTo(0,0,g*Ni(y),g*Di(y)),a.arc(0,0,g,y,m)),a.quadraticCurveTo(0,0,d,p),a.closePath(),o)return a=null,o+""||null}return o.radius=function(t){return arguments.length?(n="function"==typeof t?t:Yi(+t),o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Yi(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Yi(+t),o):i},o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(t){return arguments.length?(e=t,o):e},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}var Ji="$";function ta(){}function ea(t,e){var n=new ta;if(t instanceof ta)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}ta.prototype=ea.prototype={constructor:ta,has:function(t){return Ji+t in this},get:function(t){return this[Ji+t]},set:function(t,e){return this[Ji+t]=e,this},remove:function(t){var e=Ji+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===Ji&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===Ji&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===Ji&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===Ji&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===Ji&&++t;return t},empty:function(){for(var t in this)if(t[0]===Ji)return!1;return!0},each:function(t){for(var e in this)e[0]===Ji&&t(this[e],e.slice(1),this)}};const na=ea;function ra(){var t,e,n,r=[],i=[];function a(n,i,o,s){if(i>=r.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var c,u,l,h=-1,f=n.length,d=r[i++],p=na(),g=o();++h<f;)(l=p.get(c=d(u=n[h])+""))?l.push(u):p.set(c,[u]);return p.each((function(t,e){s(g,e,a(t,i,o,s))})),g}function o(t,n){if(++n>r.length)return t;var a,s=i[n-1];return null!=e&&n>=r.length?a=t.entries():(a=[],t.each((function(t,e){a.push({key:e,values:o(t,n)})}))),null!=s?a.sort((function(t,e){return s(t.key,e.key)})):a}return n={object:function(t){return a(t,0,ia,aa)},map:function(t){return a(t,0,oa,sa)},entries:function(t){return o(a(t,0,oa,sa),0)},key:function(t){return r.push(t),n},sortKeys:function(t){return i[r.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}}function ia(){return{}}function aa(t,e,n){t[e]=n}function oa(){return na()}function sa(t,e,n){t.set(e,n)}function ca(){}var ua=na.prototype;function la(t,e){var n=new ca;if(t instanceof ca)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}ca.prototype=la.prototype={constructor:ca,has:ua.has,add:function(t){return this[Ji+(t+="")]=t,this},remove:ua.remove,clear:ua.clear,values:ua.keys,size:ua.size,empty:ua.empty,each:ua.each};const ha=la;function fa(t){var e=[];for(var n in t)e.push(n);return e}function da(t){var e=[];for(var n in t)e.push(t[n]);return e}function pa(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e}var ga=Math.PI/180,ya=180/Math.PI,ma=.96422,va=.82521,ba=4/29,_a=6/29,xa=3*_a*_a;function wa(t){if(t instanceof Ca)return new Ca(t.l,t.a,t.b,t.opacity);if(t instanceof La)return Oa(t);t instanceof Ke||(t=Ze(t));var e,n,r=Ma(t.r),i=Ma(t.g),a=Ma(t.b),o=Ea((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=Ea((.4360747*r+.3850649*i+.1430804*a)/ma),n=Ea((.0139322*r+.0971045*i+.7141733*a)/va)),new Ca(116*o-16,500*(e-o),200*(o-n),t.opacity)}function ka(t,e){return new Ca(t,0,0,null==e?1:e)}function Ta(t,e,n,r){return 1===arguments.length?wa(t):new Ca(t,e,n,null==r?1:r)}function Ca(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Ea(t){return t>.008856451679035631?Math.pow(t,1/3):t/xa+ba}function Sa(t){return t>_a?t*t*t:xa*(t-ba)}function Aa(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ma(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Na(t){if(t instanceof La)return new La(t.h,t.c,t.l,t.opacity);if(t instanceof Ca||(t=wa(t)),0===t.a&&0===t.b)return new La(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*ya;return new La(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Da(t,e,n,r){return 1===arguments.length?Na(t):new La(n,e,t,null==r?1:r)}function Ba(t,e,n,r){return 1===arguments.length?Na(t):new La(t,e,n,null==r?1:r)}function La(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Oa(t){if(isNaN(t.h))return new Ca(t.l,0,0,t.opacity);var e=t.h*ga;return new Ca(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Me(Ca,Ta,Ne(De,{brighter:function(t){return new Ca(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Ca(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new Ke(Aa(3.1338561*(e=ma*Sa(e))-1.6168667*(t=1*Sa(t))-.4906146*(n=va*Sa(n))),Aa(-.9787684*e+1.9161415*t+.033454*n),Aa(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Me(La,Ba,Ne(De,{brighter:function(t){return new La(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new La(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Oa(this).rgb()}}));var Ia=-.14861,Ra=1.78277,Fa=-.29227,Pa=-.90649,Ya=1.97294,ja=Ya*Pa,Ua=Ya*Ra,za=Ra*Fa-Pa*Ia;function $a(t){if(t instanceof Ha)return new Ha(t.h,t.s,t.l,t.opacity);t instanceof Ke||(t=Ze(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(za*r+ja*e-Ua*n)/(za+ja-Ua),a=r-i,o=(Ya*(n-i)-Fa*a)/Pa,s=Math.sqrt(o*o+a*a)/(Ya*i*(1-i)),c=s?Math.atan2(o,a)*ya-120:NaN;return new Ha(c<0?c+360:c,s,i,t.opacity)}function qa(t,e,n,r){return 1===arguments.length?$a(t):new Ha(t,e,n,null==r?1:r)}function Ha(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Me(Ha,qa,Ne(De,{brighter:function(t){return t=null==t?Le:Math.pow(Le,t),new Ha(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Be:Math.pow(Be,t),new Ha(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*ga,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new Ke(255*(e+n*(Ia*r+Ra*i)),255*(e+n*(Fa*r+Pa*i)),255*(e+n*(Ya*r)),this.opacity)}}));var Wa=Array.prototype.slice;function Va(t,e){return t-e}function Ga(t){return function(){return t}}function Xa(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=Za(t,e[r]))return n;return 0}function Za(t,e){for(var n=e[0],r=e[1],i=-1,a=0,o=t.length,s=o-1;a<o;s=a++){var c=t[a],u=c[0],l=c[1],h=t[s],f=h[0],d=h[1];if(Qa(c,h,e))return 0;l>r!=d>r&&n<(f-u)*(r-l)/(d-l)+u&&(i=-i)}return i}function Qa(t,e,n){var r,i,a,o;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],a=n[r],o=e[r],i<=a&&a<=o||o<=a&&a<=i)}function Ka(){}var Ja=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function to(){var t=1,e=1,n=N,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Va);else{var r=m(t),i=r[0],o=r[1];e=M(i,o,e),e=k(Math.floor(i/e)*e,Math.floor(o/e)*e,e)}return e.map((function(e){return a(t,e)}))}function a(n,i){var a=[],s=[];return function(n,r,i){var a,s,c,u,l,h,f=new Array,d=new Array;for(a=s=-1,u=n[0]>=r,Ja[u<<1].forEach(p);++a<t-1;)c=u,u=n[a+1]>=r,Ja[c|u<<1].forEach(p);for(Ja[u<<0].forEach(p);++s<e-1;){for(a=-1,u=n[s*t+t]>=r,l=n[s*t]>=r,Ja[u<<1|l<<2].forEach(p);++a<t-1;)c=u,u=n[s*t+t+a+1]>=r,h=l,l=n[s*t+a+1]>=r,Ja[c|u<<1|l<<2|h<<3].forEach(p);Ja[u|l<<3].forEach(p)}for(a=-1,l=n[s*t]>=r,Ja[l<<2].forEach(p);++a<t-1;)h=l,l=n[s*t+a+1]>=r,Ja[l<<2|h<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+a,t[0][1]+s],c=[t[1][0]+a,t[1][1]+s],u=o(r),l=o(c);(e=d[u])?(n=f[l])?(delete d[e.end],delete f[n.start],e===n?(e.ring.push(c),i(e.ring)):f[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete d[e.end],e.ring.push(c),d[e.end=l]=e):(e=f[l])?(n=d[u])?(delete f[e.start],delete d[n.end],e===n?(e.ring.push(c),i(e.ring)):f[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete f[e.start],e.ring.unshift(r),f[e.start=u]=e):f[u]=d[l]={start:u,end:l,ring:[r,c]}}Ja[l<<3].forEach(p)}(n,i,(function(t){r(t,n,i),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?a.push([t]):s.push(t)})),s.forEach((function(t){for(var e,n=0,r=a.length;n<r;++n)if(-1!==Xa((e=a[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:i,coordinates:a}}function o(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,i){n.forEach((function(n){var a,o=n[0],s=n[1],c=0|o,u=0|s,l=r[u*t+c];o>0&&o<t&&c===o&&(a=r[u*t+c-1],n[0]=o+(i-a)/(l-a)-.5),s>0&&s<e&&u===s&&(a=r[(u-1)*t+c],n[1]=s+(i-a)/(l-a)-.5)}))}return i.contour=a,i.size=function(n){if(!arguments.length)return[t,e];var r=Math.ceil(n[0]),a=Math.ceil(n[1]);if(!(r>0&&a>0))throw new Error("invalid size");return t=r,e=a,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Ga(Wa.call(t)):Ga(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:Ka,i):r===s},i}function eo(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<i;++o)for(var s=0,c=0;s<r+n;++s)s<r&&(c+=t.data[s+o*r]),s>=n&&(s>=a&&(c-=t.data[s-a+o*r]),e.data[s-n+o*r]=c/Math.min(s+1,r-1+a-s,a))}function no(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<r;++o)for(var s=0,c=0;s<i+n;++s)s<i&&(c+=t.data[o+s*r]),s>=n&&(s>=a&&(c-=t.data[o+(s-a)*r]),e.data[o+(s-n)*r]=c/Math.min(s+1,i-1+a-s,a))}function ro(t){return t[0]}function io(t){return t[1]}function ao(){return 1}function oo(){var t=ro,e=io,n=ao,r=960,i=500,a=20,o=2,s=3*a,c=r+2*s>>o,u=i+2*s>>o,l=Ga(20);function h(r){var i=new Float32Array(c*u),h=new Float32Array(c*u);r.forEach((function(r,a,l){var h=+t(r,a,l)+s>>o,f=+e(r,a,l)+s>>o,d=+n(r,a,l);h>=0&&h<c&&f>=0&&f<u&&(i[h+f*c]+=d)})),eo({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),no({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o),eo({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),no({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o),eo({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),no({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o);var d=l(i);if(!Array.isArray(d)){var p=I(i);d=M(0,p,d),(d=k(0,Math.floor(p/d)*d,d)).shift()}return to().thresholds(d).size([c,u])(i).map(f)}function f(t){return t.value*=Math.pow(2,-2*o),t.coordinates.forEach(d),t}function d(t){t.forEach(p)}function p(t){t.forEach(g)}function g(t){t[0]=t[0]*Math.pow(2,o)-s,t[1]=t[1]*Math.pow(2,o)-s}function y(){return c=r+2*(s=3*a)>>o,u=i+2*s>>o,h}return h.x=function(e){return arguments.length?(t="function"==typeof e?e:Ga(+e),h):t},h.y=function(t){return arguments.length?(e="function"==typeof t?t:Ga(+t),h):e},h.weight=function(t){return arguments.length?(n="function"==typeof t?t:Ga(+t),h):n},h.size=function(t){if(!arguments.length)return[r,i];var e=Math.ceil(t[0]),n=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return r=e,i=n,y()},h.cellSize=function(t){if(!arguments.length)return 1<<o;if(!((t=+t)>=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(t)/Math.LN2),y()},h.thresholds=function(t){return arguments.length?(l="function"==typeof t?t:Array.isArray(t)?Ga(Wa.call(t)):Ga(t),h):l},h.bandwidth=function(t){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return a=Math.round((Math.sqrt(4*t*t+1)-1)/2),y()},h}function so(t){return function(){return t}}function co(t,e,n,r,i,a,o,s,c,u){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=a,this.y=o,this.dx=s,this.dy=c,this._=u}function uo(){return!le.ctrlKey&&!le.button}function lo(){return this.parentNode}function ho(t){return null==t?{x:le.x,y:le.y}:t}function fo(){return navigator.maxTouchPoints||"ontouchstart"in this}function po(){var t,e,n,r,i=uo,a=lo,o=ho,s=fo,c={},u=ft("start","drag","end"),l=0,h=0;function f(t){t.on("mousedown.drag",d).filter(s).on("touchstart.drag",y).on("touchmove.drag",m).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(){if(!r&&i.apply(this,arguments)){var o=b("mouse",a.apply(this,arguments),Ln,this,arguments);o&&(Te(le.view).on("mousemove.drag",p,!0).on("mouseup.drag",g,!0),Se(le.view),Ce(),n=!1,t=le.clientX,e=le.clientY,o("start"))}}function p(){if(Ee(),!n){var r=le.clientX-t,i=le.clientY-e;n=r*r+i*i>h}c.mouse("drag")}function g(){Te(le.view).on("mousemove.drag mouseup.drag",null),Ae(le.view,n),Ee(),c.mouse("end")}function y(){if(i.apply(this,arguments)){var t,e,n=le.changedTouches,r=a.apply(this,arguments),o=n.length;for(t=0;t<o;++t)(e=b(n[t].identifier,r,Bn,this,arguments))&&(Ce(),e("start"))}}function m(){var t,e,n=le.changedTouches,r=n.length;for(t=0;t<r;++t)(e=c[n[t].identifier])&&(Ee(),e("drag"))}function v(){var t,e,n=le.changedTouches,i=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(e=c[n[t].identifier])&&(Ce(),e("end"))}function b(t,e,n,r,i){var a,s,h,d=n(e,t),p=u.copy();if(ye(new co(f,"beforestart",a,t,l,d[0],d[1],0,0,p),(function(){return null!=(le.subject=a=o.apply(r,i))&&(s=a.x-d[0]||0,h=a.y-d[1]||0,!0)})))return function o(u){var g,y=d;switch(u){case"start":c[t]=o,g=l++;break;case"end":delete c[t],--l;case"drag":d=n(e,t),g=l}ye(new co(f,u,a,t,g,d[0]+s,d[1]+h,d[0]-y[0],d[1]-y[1],p),p.apply,p,[u,r,i])}}return f.filter=function(t){return arguments.length?(i="function"==typeof t?t:so(!!t),f):i},f.container=function(t){return arguments.length?(a="function"==typeof t?t:so(t),f):a},f.subject=function(t){return arguments.length?(o="function"==typeof t?t:so(t),f):o},f.touchable=function(t){return arguments.length?(s="function"==typeof t?t:so(!!t),f):s},f.on=function(){var t=u.on.apply(u,arguments);return t===u?f:t},f.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,f):Math.sqrt(h)},f}co.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var go={},yo={};function mo(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function vo(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function bo(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function _o(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,s=0,c=a<=0,u=!1;function l(){if(c)return yo;if(u)return u=!1,go;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?c=!0:10===(r=t.charCodeAt(o++))?u=!0:13===r&&(u=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))u=!0;else if(13===r)u=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return c=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=l())!==yo;){for(var h=[];r!==go&&r!==yo;)h.push(r),r=l();e&&null==(h=e(h,s++))||i.push(h)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?function(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":function(t){return t<0?"-"+bo(-t,6):t>9999?"+"+bo(t,6):bo(t,4)}(t.getUTCFullYear())+"-"+bo(t.getUTCMonth()+1,2)+"-"+bo(t.getUTCDate(),2)+(i?"T"+bo(e,2)+":"+bo(n,2)+":"+bo(r,2)+"."+bo(i,3)+"Z":r?"T"+bo(e,2)+":"+bo(n,2)+":"+bo(r,2)+"Z":n||e?"T"+bo(e,2)+":"+bo(n,2)+"Z":"")}(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=mo(t);return function(r,i){return e(n(r),i,t)}}(t,e):mo(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=vo(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=vo(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}var xo=_o(","),wo=xo.parse,ko=xo.parseRows,To=xo.format,Co=xo.formatBody,Eo=xo.formatRows,So=xo.formatRow,Ao=xo.formatValue,Mo=_o("\t"),No=Mo.parse,Do=Mo.parseRows,Bo=Mo.format,Lo=Mo.formatBody,Oo=Mo.formatRows,Io=Mo.formatRow,Ro=Mo.formatValue;function Fo(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;Po&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}var Po=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function Yo(t){return+t}function jo(t){return t*t}function Uo(t){return t*(2-t)}function zo(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var $o=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),qo=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),Ho=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Wo=Math.PI,Vo=Wo/2;function Go(t){return 1==+t?1:1-Math.cos(t*Vo)}function Xo(t){return Math.sin(t*Vo)}function Zo(t){return(1-Math.cos(Wo*t))/2}function Qo(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Ko(t){return Qo(1-+t)}function Jo(t){return 1-Qo(t)}function ts(t){return((t*=2)<=1?Qo(1-t):2-Qo(t-1))/2}function es(t){return 1-Math.sqrt(1-t*t)}function ns(t){return Math.sqrt(1- --t*t)}function rs(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var is=7.5625;function as(t){return 1-os(1-t)}function os(t){return(t=+t)<.36363636363636365?is*t*t:t<.7272727272727273?is*(t-=.5454545454545454)*t+.75:t<.9090909090909091?is*(t-=.8181818181818182)*t+.9375:is*(t-=.9545454545454546)*t+.984375}function ss(t){return((t*=2)<=1?1-os(1-t):os(t-1)+1)/2}var cs=1.70158,us=function t(e){function n(t){return(t=+t)*t*(e*(t-1)+t)}return e=+e,n.overshoot=t,n}(cs),ls=function t(e){function n(t){return--t*t*((t+1)*e+t)+1}return e=+e,n.overshoot=t,n}(cs),hs=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(cs),fs=2*Math.PI,ds=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=fs);function i(t){return e*Qo(- --t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*fs)},i.period=function(n){return t(e,n)},i}(1,.3),ps=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=fs);function i(t){return 1-e*Qo(t=+t)*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*fs)},i.period=function(n){return t(e,n)},i}(1,.3),gs=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=fs);function i(t){return((t=2*t-1)<0?e*Qo(-t)*Math.sin((r-t)/n):2-e*Qo(t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*fs)},i.period=function(n){return t(e,n)},i}(1,.3);function ys(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function ms(t,e){return fetch(t,e).then(ys)}function vs(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function bs(t,e){return fetch(t,e).then(vs)}function _s(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function xs(t,e){return fetch(t,e).then(_s)}function ws(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),xs(e,n).then((function(e){return t(e,r)}))}}function ks(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=_o(t);return xs(e,n).then((function(t){return i.parse(t,r)}))}var Ts=ws(wo),Cs=ws(No);function Es(t,e){return new Promise((function(n,r){var i=new Image;for(var a in e)i[a]=e[a];i.onerror=r,i.onload=function(){n(i)},i.src=t}))}function Ss(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function As(t,e){return fetch(t,e).then(Ss)}function Ms(t){return function(e,n){return xs(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}const Ns=Ms("application/xml");var Ds=Ms("text/html"),Bs=Ms("image/svg+xml");function Ls(t,e){var n;function r(){var r,i,a=n.length,o=0,s=0;for(r=0;r<a;++r)o+=(i=n[r]).x,s+=i.y;for(o=o/a-t,s=s/a-e,r=0;r<a;++r)(i=n[r]).x-=o,i.y-=s}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r}function Os(t){return function(){return t}}function Is(){return 1e-6*(Math.random()-.5)}function Rs(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,s,c,u,l,h,f,d=t._root,p={data:r},g=t._x0,y=t._y0,m=t._x1,v=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((u=e>=(a=(g+m)/2))?g=a:m=a,(l=n>=(o=(y+v)/2))?y=o:v=o,i=d,!(d=d[h=l<<1|u]))return i[h]=p,t;if(s=+t._x.call(null,d.data),c=+t._y.call(null,d.data),e===s&&n===c)return p.next=d,i?i[h]=p:t._root=p,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(u=e>=(a=(g+m)/2))?g=a:m=a,(l=n>=(o=(y+v)/2))?y=o:v=o}while((h=l<<1|u)==(f=(c>=o)<<1|s>=a));return i[f]=d,i[h]=p,t}function Fs(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i}function Ps(t){return t[0]}function Ys(t){return t[1]}function js(t,e,n){var r=new Us(null==e?Ps:e,null==n?Ys:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Us(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function zs(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var $s=js.prototype=Us.prototype;function qs(t){return t.x+t.vx}function Hs(t){return t.y+t.vy}function Ws(t){var e,n,r=1,i=1;function a(){for(var t,a,s,c,u,l,h,f=e.length,d=0;d<i;++d)for(a=js(e,qs,Hs).visitAfter(o),t=0;t<f;++t)s=e[t],l=n[s.index],h=l*l,c=s.x+s.vx,u=s.y+s.vy,a.visit(p);function p(t,e,n,i,a){var o=t.data,f=t.r,d=l+f;if(!o)return e>c+d||i<c-d||n>u+d||a<u-d;if(o.index>s.index){var p=c-o.x-o.vx,g=u-o.y-o.vy,y=p*p+g*g;y<d*d&&(0===p&&(y+=(p=Is())*p),0===g&&(y+=(g=Is())*g),y=(d-(y=Math.sqrt(y)))/y*r,s.vx+=(p*=y)*(d=(f*=f)/(h+f)),s.vy+=(g*=y)*d,o.vx-=p*(d=1-d),o.vy-=g*d)}}}function o(t){if(t.data)return t.r=n[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function s(){if(e){var r,i,a=e.length;for(n=new Array(a),r=0;r<a;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=Os(null==t?1:+t)),a.initialize=function(t){e=t,s()},a.iterations=function(t){return arguments.length?(i=+t,a):i},a.strength=function(t){return arguments.length?(r=+t,a):r},a.radius=function(e){return arguments.length?(t="function"==typeof e?e:Os(+e),s(),a):t},a}function Vs(t){return t.index}function Gs(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function Xs(t){var e,n,r,i,a,o=Vs,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},c=Os(30),u=1;function l(r){for(var i=0,o=t.length;i<u;++i)for(var s,c,l,h,f,d,p,g=0;g<o;++g)c=(s=t[g]).source,h=(l=s.target).x+l.vx-c.x-c.vx||Is(),f=l.y+l.vy-c.y-c.vy||Is(),h*=d=((d=Math.sqrt(h*h+f*f))-n[g])/d*r*e[g],f*=d,l.vx-=h*(p=a[g]),l.vy-=f*p,c.vx+=h*(p=1-p),c.vy+=f*p}function h(){if(r){var s,c,u=r.length,l=t.length,h=na(r,o);for(s=0,i=new Array(u);s<l;++s)(c=t[s]).index=s,"object"!=typeof c.source&&(c.source=Gs(h,c.source)),"object"!=typeof c.target&&(c.target=Gs(h,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(s=0,a=new Array(l);s<l;++s)c=t[s],a[s]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);e=new Array(l),f(),n=new Array(l),d()}}function f(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+s(t[n],n,t)}function d(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+c(t[e],e,t)}return null==t&&(t=[]),l.initialize=function(t){r=t,h()},l.links=function(e){return arguments.length?(t=e,h(),l):t},l.id=function(t){return arguments.length?(o=t,l):o},l.iterations=function(t){return arguments.length?(u=+t,l):u},l.strength=function(t){return arguments.length?(s="function"==typeof t?t:Os(+t),f(),l):s},l.distance=function(t){return arguments.length?(c="function"==typeof t?t:Os(+t),d(),l):c},l}function Zs(t){return t.x}function Qs(t){return t.y}$s.copy=function(){var t,e,n=new Us(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=zs(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=zs(e));return n},$s.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return Rs(this.cover(e,n),e,n,t)},$s.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),s=new Array(a),c=1/0,u=1/0,l=-1/0,h=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(o[n]=r,s[n]=i,r<c&&(c=r),r>l&&(l=r),i<u&&(u=i),i>h&&(h=i));if(c>l||u>h)return this;for(this.cover(c,u).cover(l,h),n=0;n<a;++n)Rs(this,o[n],s[n],t[n]);return this},$s.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,c=i-n,u=this._root;n>t||t>=i||r>e||e>=a;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=u,u=o,c*=2,s){case 0:i=n+c,a=r+c;break;case 1:n=i-c,a=r+c;break;case 2:i=n+c,r=a-c;break;case 3:n=i-c,r=a-c}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},$s.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},$s.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},$s.find=function(t,e,n){var r,i,a,o,s,c,u,l=this._x0,h=this._y0,f=this._x1,d=this._y1,p=[],g=this._root;for(g&&p.push(new Fs(g,l,h,f,d)),null==n?n=1/0:(l=t-n,h=e-n,f=t+n,d=e+n,n*=n);c=p.pop();)if(!(!(g=c.node)||(i=c.x0)>f||(a=c.y0)>d||(o=c.x1)<l||(s=c.y1)<h))if(g.length){var y=(i+o)/2,m=(a+s)/2;p.push(new Fs(g[3],y,m,o,s),new Fs(g[2],i,m,y,s),new Fs(g[1],y,a,o,m),new Fs(g[0],i,a,y,m)),(u=(e>=m)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-u],p[p.length-1-u]=c)}else{var v=t-+this._x.call(null,g.data),b=e-+this._y.call(null,g.data),_=v*v+b*b;if(_<n){var x=Math.sqrt(n=_);l=t-x,h=e-x,f=t+x,d=e+x,r=g.data}}return r},$s.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,s,c,u,l,h,f,d=this._root,p=this._x0,g=this._y0,y=this._x1,m=this._y1;if(!d)return this;if(d.length)for(;;){if((u=a>=(s=(p+y)/2))?p=s:y=s,(l=o>=(c=(g+m)/2))?g=c:m=c,e=d,!(d=d[h=l<<1|u]))return this;if(!d.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,f=h)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[h]=i:delete e[h],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[f]=d:this._root=d),this):(this._root=i,this)},$s.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},$s.root=function(){return this._root},$s.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},$s.visit=function(t){var e,n,r,i,a,o,s=[],c=this._root;for(c&&s.push(new Fs(c,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(c=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&c.length){var u=(r+a)/2,l=(i+o)/2;(n=c[3])&&s.push(new Fs(n,u,l,a,o)),(n=c[2])&&s.push(new Fs(n,r,l,u,o)),(n=c[1])&&s.push(new Fs(n,u,i,a,l)),(n=c[0])&&s.push(new Fs(n,r,i,u,l))}return this},$s.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new Fs(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,s=e.y0,c=e.x1,u=e.y1,l=(o+c)/2,h=(s+u)/2;(a=i[0])&&n.push(new Fs(a,o,s,l,h)),(a=i[1])&&n.push(new Fs(a,l,s,c,h)),(a=i[2])&&n.push(new Fs(a,o,h,l,u)),(a=i[3])&&n.push(new Fs(a,l,h,c,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},$s.x=function(t){return arguments.length?(this._x=t,this):this._x},$s.y=function(t){return arguments.length?(this._y=t,this):this._y};var Ks=Math.PI*(3-Math.sqrt(5));function Js(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=na(),c=Vn(l),u=ft("tick","end");function l(){h(),u.call("tick",e),n<r&&(c.stop(),u.call("end",e))}function h(r){var c,u,l=t.length;void 0===r&&(r=1);for(var h=0;h<r;++h)for(n+=(a-n)*i,s.each((function(t){t(n)})),c=0;c<l;++c)null==(u=t[c]).fx?u.x+=u.vx*=o:(u.x=u.fx,u.vx=0),null==u.fy?u.y+=u.vy*=o:(u.y=u.fy,u.vy=0);return e}function f(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(n),a=n*Ks;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function d(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),f(),e={tick:h,restart:function(){return c.restart(l),e},stop:function(){return c.stop(),e},nodes:function(n){return arguments.length?(t=n,f(),s.each(d),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(a=+t,e):a},velocityDecay:function(t){return arguments.length?(o=1-t,e):1-o},force:function(t,n){return arguments.length>1?(null==n?s.remove(t):s.set(t,d(n)),e):s.get(t)},find:function(e,n,r){var i,a,o,s,c,u=0,l=t.length;for(null==r?r=1/0:r*=r,u=0;u<l;++u)(o=(i=e-(s=t[u]).x)*i+(a=n-s.y)*a)<r&&(c=s,r=o);return c},on:function(t,n){return arguments.length>1?(u.on(t,n),e):u.on(t)}}}function tc(){var t,e,n,r,i=Os(-30),a=1,o=1/0,s=.81;function c(r){var i,a=t.length,o=js(t,Zs,Qs).visitAfter(l);for(n=r,i=0;i<a;++i)e=t[i],o.visit(h)}function u(){if(t){var e,n,a=t.length;for(r=new Array(a),e=0;e<a;++e)n=t[e],r[n.index]=+i(n,e,t)}}function l(t){var e,n,i,a,o,s=0,c=0;if(t.length){for(i=a=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(s+=e.value,c+=n,i+=n*e.x,a+=n*e.y);t.x=i/c,t.y=a/c}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=r[e.data.index]}while(e=e.next)}t.value=s}function h(t,i,c,u){if(!t.value)return!0;var l=t.x-e.x,h=t.y-e.y,f=u-i,d=l*l+h*h;if(f*f/s<d)return d<o&&(0===l&&(d+=(l=Is())*l),0===h&&(d+=(h=Is())*h),d<a&&(d=Math.sqrt(a*d)),e.vx+=l*t.value*n/d,e.vy+=h*t.value*n/d),!0;if(!(t.length||d>=o)){(t.data!==e||t.next)&&(0===l&&(d+=(l=Is())*l),0===h&&(d+=(h=Is())*h),d<a&&(d=Math.sqrt(a*d)));do{t.data!==e&&(f=r[t.data.index]*n/d,e.vx+=l*f,e.vy+=h*f)}while(t=t.next)}}return c.initialize=function(e){t=e,u()},c.strength=function(t){return arguments.length?(i="function"==typeof t?t:Os(+t),u(),c):i},c.distanceMin=function(t){return arguments.length?(a=t*t,c):Math.sqrt(a)},c.distanceMax=function(t){return arguments.length?(o=t*t,c):Math.sqrt(o)},c.theta=function(t){return arguments.length?(s=t*t,c):Math.sqrt(s)},c}function ec(t,e,n){var r,i,a,o=Os(.1);function s(t){for(var o=0,s=r.length;o<s;++o){var c=r[o],u=c.x-e||1e-6,l=c.y-n||1e-6,h=Math.sqrt(u*u+l*l),f=(a[o]-h)*i[o]*t/h;c.vx+=u*f,c.vy+=l*f}}function c(){if(r){var e,n=r.length;for(i=new Array(n),a=new Array(n),e=0;e<n;++e)a[e]=+t(r[e],e,r),i[e]=isNaN(a[e])?0:+o(r[e],e,r)}}return"function"!=typeof t&&(t=Os(+t)),null==e&&(e=0),null==n&&(n=0),s.initialize=function(t){r=t,c()},s.strength=function(t){return arguments.length?(o="function"==typeof t?t:Os(+t),c(),s):o},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:Os(+e),c(),s):t},s.x=function(t){return arguments.length?(e=+t,s):e},s.y=function(t){return arguments.length?(n=+t,s):n},s}function nc(t){var e,n,r,i=Os(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vx+=(r[a]-i.x)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=Os(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:Os(+t),o(),a):i},a.x=function(e){return arguments.length?(t="function"==typeof e?e:Os(+e),o(),a):t},a}function rc(t){var e,n,r,i=Os(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vy+=(r[a]-i.y)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=Os(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:Os(+t),o(),a):i},a.y=function(e){return arguments.length?(t="function"==typeof e?e:Os(+e),o(),a):t},a}function ic(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function ac(t){return(t=ic(Math.abs(t)))?t[1]:NaN}var oc,sc=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function cc(t){if(!(e=sc.exec(t)))throw new Error("invalid format: "+t);var e;return new uc({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function uc(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function lc(t,e){var n=ic(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}cc.prototype=uc.prototype,uc.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const hc={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return lc(100*t,e)},r:lc,s:function(t,e){var n=ic(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(oc=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+ic(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function fc(t){return t}var dc,pc,gc,yc=Array.prototype.map,mc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function vc(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?fc:(e=yc.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(t.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?fc:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(yc.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=cc(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,y=t.precision,m=t.trim,v=t.type;"n"===v?(g=!0,v="g"):hc[v]||(void 0===y&&(y=12),m=!0,v="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var b="$"===f?i:"#"===f&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",_="$"===f?a:/[%p]/.test(v)?c:"",x=hc[v],w=/[defgprs%]/.test(v);function k(t){var i,a,c,f=b,k=_;if("c"===v)k=x(t)+k,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:x(Math.abs(t),y),m&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==h&&(T=!1),f=(T?"("===h?h:u:"-"===h||"("===h?"":h)+f,k=("s"===v?mc[8+oc/3]:"")+k+(T&&"("===h?")":""),w)for(i=-1,a=t.length;++i<a;)if(48>(c=t.charCodeAt(i))||c>57){k=(46===c?o+t.slice(i+1):t.slice(i))+k,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var C=f.length+t.length+k.length,E=C<p?new Array(p-C+1).join(e):"";switch(g&&d&&(t=r(E+t,E.length?p-k.length:1/0),E=""),n){case"<":t=f+t+k+E;break;case"=":t=f+E+t+k;break;case"^":t=E.slice(0,C=E.length>>1)+f+t+k+E.slice(C);break;default:t=E+f+t+k}return s(t)}return y=void 0===y?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),k.toString=function(){return t+""},k}return{format:h,formatPrefix:function(t,e){var n=h(((t=cc(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(ac(e)/3))),i=Math.pow(10,-r),a=mc[8+r/3];return function(t){return n(i*t)+a}}}}function bc(t){return dc=vc(t),pc=dc.format,gc=dc.formatPrefix,dc}function _c(t){return Math.max(0,-ac(Math.abs(t)))}function xc(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ac(e)/3)))-ac(Math.abs(t)))}function wc(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ac(e)-ac(t))+1}function kc(){return new Tc}function Tc(){this.reset()}bc({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Tc.prototype={constructor:Tc,reset:function(){this.s=this.t=0},add:function(t){Ec(Cc,t,this.t),Ec(this,Cc.s,this.s),this.s?this.t+=Cc.t:this.s=Cc.t},valueOf:function(){return this.s}};var Cc=new Tc;function Ec(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var Sc=1e-6,Ac=1e-12,Mc=Math.PI,Nc=Mc/2,Dc=Mc/4,Bc=2*Mc,Lc=180/Mc,Oc=Mc/180,Ic=Math.abs,Rc=Math.atan,Fc=Math.atan2,Pc=Math.cos,Yc=Math.ceil,jc=Math.exp,Uc=(Math.floor,Math.log),zc=Math.pow,$c=Math.sin,qc=Math.sign||function(t){return t>0?1:t<0?-1:0},Hc=Math.sqrt,Wc=Math.tan;function Vc(t){return t>1?0:t<-1?Mc:Math.acos(t)}function Gc(t){return t>1?Nc:t<-1?-Nc:Math.asin(t)}function Xc(t){return(t=$c(t/2))*t}function Zc(){}function Qc(t,e){t&&Jc.hasOwnProperty(t.type)&&Jc[t.type](t,e)}var Kc={Feature:function(t,e){Qc(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Qc(n[r].geometry,e)}},Jc={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){tu(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)tu(n[r],e,0)},Polygon:function(t,e){eu(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)eu(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Qc(n[r],e)}};function tu(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function eu(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)tu(t[n],e,1);e.polygonEnd()}function nu(t,e){t&&Kc.hasOwnProperty(t.type)?Kc[t.type](t,e):Qc(t,e)}var ru,iu,au,ou,su,cu=kc(),uu=kc(),lu={point:Zc,lineStart:Zc,lineEnd:Zc,polygonStart:function(){cu.reset(),lu.lineStart=hu,lu.lineEnd=fu},polygonEnd:function(){var t=+cu;uu.add(t<0?Bc+t:t),this.lineStart=this.lineEnd=this.point=Zc},sphere:function(){uu.add(Bc)}};function hu(){lu.point=du}function fu(){pu(ru,iu)}function du(t,e){lu.point=pu,ru=t,iu=e,au=t*=Oc,ou=Pc(e=(e*=Oc)/2+Dc),su=$c(e)}function pu(t,e){var n=(t*=Oc)-au,r=n>=0?1:-1,i=r*n,a=Pc(e=(e*=Oc)/2+Dc),o=$c(e),s=su*o,c=ou*a+s*Pc(i),u=s*r*$c(i);cu.add(Fc(u,c)),au=t,ou=a,su=o}function gu(t){return uu.reset(),nu(t,lu),2*uu}function yu(t){return[Fc(t[1],t[0]),Gc(t[2])]}function mu(t){var e=t[0],n=t[1],r=Pc(n);return[r*Pc(e),r*$c(e),$c(n)]}function vu(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function bu(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function _u(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function xu(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function wu(t){var e=Hc(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var ku,Tu,Cu,Eu,Su,Au,Mu,Nu,Du,Bu,Lu,Ou,Iu,Ru,Fu,Pu,Yu,ju,Uu,zu,$u,qu,Hu,Wu,Vu,Gu,Xu=kc(),Zu={point:Qu,lineStart:Ju,lineEnd:tl,polygonStart:function(){Zu.point=el,Zu.lineStart=nl,Zu.lineEnd=rl,Xu.reset(),lu.polygonStart()},polygonEnd:function(){lu.polygonEnd(),Zu.point=Qu,Zu.lineStart=Ju,Zu.lineEnd=tl,cu<0?(ku=-(Cu=180),Tu=-(Eu=90)):Xu>Sc?Eu=90:Xu<-1e-6&&(Tu=-90),Bu[0]=ku,Bu[1]=Cu},sphere:function(){ku=-(Cu=180),Tu=-(Eu=90)}};function Qu(t,e){Du.push(Bu=[ku=t,Cu=t]),e<Tu&&(Tu=e),e>Eu&&(Eu=e)}function Ku(t,e){var n=mu([t*Oc,e*Oc]);if(Nu){var r=bu(Nu,n),i=bu([r[1],-r[0],0],r);wu(i),i=yu(i);var a,o=t-Su,s=o>0?1:-1,c=i[0]*Lc*s,u=Ic(o)>180;u^(s*Su<c&&c<s*t)?(a=i[1]*Lc)>Eu&&(Eu=a):u^(s*Su<(c=(c+360)%360-180)&&c<s*t)?(a=-i[1]*Lc)<Tu&&(Tu=a):(e<Tu&&(Tu=e),e>Eu&&(Eu=e)),u?t<Su?il(ku,t)>il(ku,Cu)&&(Cu=t):il(t,Cu)>il(ku,Cu)&&(ku=t):Cu>=ku?(t<ku&&(ku=t),t>Cu&&(Cu=t)):t>Su?il(ku,t)>il(ku,Cu)&&(Cu=t):il(t,Cu)>il(ku,Cu)&&(ku=t)}else Du.push(Bu=[ku=t,Cu=t]);e<Tu&&(Tu=e),e>Eu&&(Eu=e),Nu=n,Su=t}function Ju(){Zu.point=Ku}function tl(){Bu[0]=ku,Bu[1]=Cu,Zu.point=Qu,Nu=null}function el(t,e){if(Nu){var n=t-Su;Xu.add(Ic(n)>180?n+(n>0?360:-360):n)}else Au=t,Mu=e;lu.point(t,e),Ku(t,e)}function nl(){lu.lineStart()}function rl(){el(Au,Mu),lu.lineEnd(),Ic(Xu)>Sc&&(ku=-(Cu=180)),Bu[0]=ku,Bu[1]=Cu,Nu=null}function il(t,e){return(e-=t)<0?e+360:e}function al(t,e){return t[0]-e[0]}function ol(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function sl(t){var e,n,r,i,a,o,s;if(Eu=Cu=-(ku=Tu=1/0),Du=[],nu(t,Zu),n=Du.length){for(Du.sort(al),e=1,a=[r=Du[0]];e<n;++e)ol(r,(i=Du[e])[0])||ol(r,i[1])?(il(r[0],i[1])>il(r[0],r[1])&&(r[1]=i[1]),il(i[0],r[1])>il(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,e=0,r=a[n=a.length-1];e<=n;r=i,++e)i=a[e],(s=il(r[1],i[0]))>o&&(o=s,ku=i[0],Cu=r[1])}return Du=Bu=null,ku===1/0||Tu===1/0?[[NaN,NaN],[NaN,NaN]]:[[ku,Tu],[Cu,Eu]]}var cl={sphere:Zc,point:ul,lineStart:hl,lineEnd:pl,polygonStart:function(){cl.lineStart=gl,cl.lineEnd=yl},polygonEnd:function(){cl.lineStart=hl,cl.lineEnd=pl}};function ul(t,e){t*=Oc;var n=Pc(e*=Oc);ll(n*Pc(t),n*$c(t),$c(e))}function ll(t,e,n){++Lu,Iu+=(t-Iu)/Lu,Ru+=(e-Ru)/Lu,Fu+=(n-Fu)/Lu}function hl(){cl.point=fl}function fl(t,e){t*=Oc;var n=Pc(e*=Oc);Wu=n*Pc(t),Vu=n*$c(t),Gu=$c(e),cl.point=dl,ll(Wu,Vu,Gu)}function dl(t,e){t*=Oc;var n=Pc(e*=Oc),r=n*Pc(t),i=n*$c(t),a=$c(e),o=Fc(Hc((o=Vu*a-Gu*i)*o+(o=Gu*r-Wu*a)*o+(o=Wu*i-Vu*r)*o),Wu*r+Vu*i+Gu*a);Ou+=o,Pu+=o*(Wu+(Wu=r)),Yu+=o*(Vu+(Vu=i)),ju+=o*(Gu+(Gu=a)),ll(Wu,Vu,Gu)}function pl(){cl.point=ul}function gl(){cl.point=ml}function yl(){vl(qu,Hu),cl.point=ul}function ml(t,e){qu=t,Hu=e,t*=Oc,e*=Oc,cl.point=vl;var n=Pc(e);Wu=n*Pc(t),Vu=n*$c(t),Gu=$c(e),ll(Wu,Vu,Gu)}function vl(t,e){t*=Oc;var n=Pc(e*=Oc),r=n*Pc(t),i=n*$c(t),a=$c(e),o=Vu*a-Gu*i,s=Gu*r-Wu*a,c=Wu*i-Vu*r,u=Hc(o*o+s*s+c*c),l=Gc(u),h=u&&-l/u;Uu+=h*o,zu+=h*s,$u+=h*c,Ou+=l,Pu+=l*(Wu+(Wu=r)),Yu+=l*(Vu+(Vu=i)),ju+=l*(Gu+(Gu=a)),ll(Wu,Vu,Gu)}function bl(t){Lu=Ou=Iu=Ru=Fu=Pu=Yu=ju=Uu=zu=$u=0,nu(t,cl);var e=Uu,n=zu,r=$u,i=e*e+n*n+r*r;return i<Ac&&(e=Pu,n=Yu,r=ju,Ou<Sc&&(e=Iu,n=Ru,r=Fu),(i=e*e+n*n+r*r)<Ac)?[NaN,NaN]:[Fc(n,e)*Lc,Gc(r/Hc(i))*Lc]}function _l(t){return function(){return t}}function xl(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function wl(t,e){return[Ic(t)>Mc?t+Math.round(-t/Bc)*Bc:t,e]}function kl(t,e,n){return(t%=Bc)?e||n?xl(Cl(t),El(e,n)):Cl(t):e||n?El(e,n):wl}function Tl(t){return function(e,n){return[(e+=t)>Mc?e-Bc:e<-Mc?e+Bc:e,n]}}function Cl(t){var e=Tl(t);return e.invert=Tl(-t),e}function El(t,e){var n=Pc(t),r=$c(t),i=Pc(e),a=$c(e);function o(t,e){var o=Pc(e),s=Pc(t)*o,c=$c(t)*o,u=$c(e),l=u*n+s*r;return[Fc(c*i-l*a,s*n-u*r),Gc(l*i+c*a)]}return o.invert=function(t,e){var o=Pc(e),s=Pc(t)*o,c=$c(t)*o,u=$c(e),l=u*i-c*a;return[Fc(c*i+u*a,s*n+l*r),Gc(l*n-s*r)]},o}function Sl(t){function e(e){return(e=t(e[0]*Oc,e[1]*Oc))[0]*=Lc,e[1]*=Lc,e}return t=kl(t[0]*Oc,t[1]*Oc,t.length>2?t[2]*Oc:0),e.invert=function(e){return(e=t.invert(e[0]*Oc,e[1]*Oc))[0]*=Lc,e[1]*=Lc,e},e}function Al(t,e,n,r,i,a){if(n){var o=Pc(e),s=$c(e),c=r*n;null==i?(i=e+r*Bc,a=e-c/2):(i=Ml(o,i),a=Ml(o,a),(r>0?i<a:i>a)&&(i+=r*Bc));for(var u,l=i;r>0?l>a:l<a;l-=c)u=yu([o,-s*Pc(l),-s*$c(l)]),t.point(u[0],u[1])}}function Ml(t,e){(e=mu(e))[0]-=t,wu(e);var n=Vc(-e[1]);return((-e[2]<0?-n:n)+Bc-Sc)%Bc}function Nl(){var t,e,n=_l([0,0]),r=_l(90),i=_l(6),a={point:function(n,r){t.push(n=e(n,r)),n[0]*=Lc,n[1]*=Lc}};function o(){var o=n.apply(this,arguments),s=r.apply(this,arguments)*Oc,c=i.apply(this,arguments)*Oc;return t=[],e=kl(-o[0]*Oc,-o[1]*Oc,0).invert,Al(a,s,c,1),o={type:"Polygon",coordinates:[t]},t=e=null,o}return o.center=function(t){return arguments.length?(n="function"==typeof t?t:_l([+t[0],+t[1]]),o):n},o.radius=function(t){return arguments.length?(r="function"==typeof t?t:_l(+t),o):r},o.precision=function(t){return arguments.length?(i="function"==typeof t?t:_l(+t),o):i},o}function Dl(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:Zc,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Bl(t,e){return Ic(t[0]-e[0])<Sc&&Ic(t[1]-e[1])<Sc}function Ll(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Ol(t,e,n,r,i){var a,o,s=[],c=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(Bl(r,o)){if(!r[2]&&!o[2]){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);return void i.lineEnd()}o[0]+=2e-6}s.push(n=new Ll(r,t,null,!0)),c.push(n.o=new Ll(r,null,n,!1)),s.push(n=new Ll(o,t,null,!1)),c.push(n.o=new Ll(o,null,n,!0))}})),s.length){for(c.sort(e),Il(s),Il(c),a=0,o=c.length;a<o;++a)c[a].e=n=!n;for(var u,l,h=s[0];;){for(var f=h,d=!0;f.v;)if((f=f.n)===h)return;u=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(a=0,o=u.length;a<o;++a)i.point((l=u[a])[0],l[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(d)for(u=f.p.z,a=u.length-1;a>=0;--a)i.point((l=u[a])[0],l[1]);else r(f.x,f.p.x,-1,i);f=f.p}u=(f=f.o).z,d=!d}while(!f.v);i.lineEnd()}}}function Il(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}wl.invert=wl;var Rl=kc();function Fl(t){return Ic(t[0])<=Mc?t[0]:qc(t[0])*((Ic(t[0])+Mc)%Bc-Mc)}function Pl(t,e){var n=Fl(e),r=e[1],i=$c(r),a=[$c(n),-Pc(n),0],o=0,s=0;Rl.reset(),1===i?r=Nc+Sc:-1===i&&(r=-Nc-Sc);for(var c=0,u=t.length;c<u;++c)if(h=(l=t[c]).length)for(var l,h,f=l[h-1],d=Fl(f),p=f[1]/2+Dc,g=$c(p),y=Pc(p),m=0;m<h;++m,d=b,g=x,y=w,f=v){var v=l[m],b=Fl(v),_=v[1]/2+Dc,x=$c(_),w=Pc(_),k=b-d,T=k>=0?1:-1,C=T*k,E=C>Mc,S=g*x;if(Rl.add(Fc(S*T*$c(C),y*w+S*Pc(C))),o+=E?k+T*Bc:k,E^d>=n^b>=n){var A=bu(mu(f),mu(v));wu(A);var M=bu(a,A);wu(M);var N=(E^k>=0?-1:1)*Gc(M[2]);(r>N||r===N&&(A[0]||A[1]))&&(s+=E^k>=0?1:-1)}}return(o<-1e-6||o<Sc&&Rl<-1e-6)^1&s}function Yl(t,e,n,r){return function(i){var a,o,s,c=e(i),u=Dl(),l=e(u),h=!1,f={point:d,lineStart:g,lineEnd:y,polygonStart:function(){f.point=m,f.lineStart=v,f.lineEnd=b,o=[],a=[]},polygonEnd:function(){f.point=d,f.lineStart=g,f.lineEnd=y,o=P(o);var t=Pl(a,r);o.length?(h||(i.polygonStart(),h=!0),Ol(o,Ul,t,n,i)):t&&(h||(i.polygonStart(),h=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),h&&(i.polygonEnd(),h=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(e,n){t(e,n)&&i.point(e,n)}function p(t,e){c.point(t,e)}function g(){f.point=p,c.lineStart()}function y(){f.point=d,c.lineEnd()}function m(t,e){s.push([t,e]),l.point(t,e)}function v(){l.lineStart(),s=[]}function b(){m(s[0][0],s[0][1]),l.lineEnd();var t,e,n,r,c=l.clean(),f=u.result(),d=f.length;if(s.pop(),a.push(s),s=null,d)if(1&c){if((e=(n=f[0]).length-1)>0){for(h||(i.polygonStart(),h=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else d>1&&2&c&&f.push(f.pop().concat(f.shift())),o.push(f.filter(jl))}return f}}function jl(t){return t.length>1}function Ul(t,e){return((t=t.x)[0]<0?t[1]-Nc-Sc:Nc-t[1])-((e=e.x)[0]<0?e[1]-Nc-Sc:Nc-e[1])}const zl=Yl((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?Mc:-Mc,c=Ic(a-n);Ic(c-Mc)<Sc?(t.point(n,r=(r+o)/2>0?Nc:-Nc),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&c>=Mc&&(Ic(n-i)<Sc&&(n-=i*Sc),Ic(a-s)<Sc&&(a-=s*Sc),r=function(t,e,n,r){var i,a,o=$c(t-n);return Ic(o)>Sc?Rc(($c(e)*(a=Pc(r))*$c(n)-$c(r)*(i=Pc(e))*$c(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=a,r=o),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*Nc,r.point(-Mc,i),r.point(0,i),r.point(Mc,i),r.point(Mc,0),r.point(Mc,-i),r.point(0,-i),r.point(-Mc,-i),r.point(-Mc,0),r.point(-Mc,i);else if(Ic(t[0]-e[0])>Sc){var a=t[0]<e[0]?Mc:-Mc;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-Mc,-Nc]);function $l(t){var e=Pc(t),n=6*Oc,r=e>0,i=Ic(e)>Sc;function a(t,n){return Pc(t)*Pc(n)>e}function o(t,n,r){var i=[1,0,0],a=bu(mu(t),mu(n)),o=vu(a,a),s=a[0],c=o-s*s;if(!c)return!r&&t;var u=e*o/c,l=-e*s/c,h=bu(i,a),f=xu(i,u);_u(f,xu(a,l));var d=h,p=vu(f,d),g=vu(d,d),y=p*p-g*(vu(f,f)-1);if(!(y<0)){var m=Hc(y),v=xu(d,(-p-m)/g);if(_u(v,f),v=yu(v),!r)return v;var b,_=t[0],x=n[0],w=t[1],k=n[1];x<_&&(b=_,_=x,x=b);var T=x-_,C=Ic(T-Mc)<Sc;if(!C&&k<w&&(b=w,w=k,k=b),C||T<Sc?C?w+k>0^v[1]<(Ic(v[0]-_)<Sc?w:k):w<=v[1]&&v[1]<=k:T>Mc^(_<=v[0]&&v[0]<=x)){var E=xu(d,(-p+m)/g);return _u(E,f),[v,yu(E)]}}}function s(e,n){var i=r?t:Mc-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return Yl(a,(function(t){var e,n,c,u,l;return{lineStart:function(){u=c=!1,l=1},point:function(h,f){var d,p=[h,f],g=a(h,f),y=r?g?0:s(h,f):g?s(h+(h<0?Mc:-Mc),f):0;if(!e&&(u=c=g)&&t.lineStart(),g!==c&&(!(d=o(e,p))||Bl(e,d)||Bl(p,d))&&(p[2]=1),g!==c)l=0,g?(t.lineStart(),d=o(p,e),t.point(d[0],d[1])):(d=o(e,p),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(i&&e&&r^g){var m;y&n||!(m=o(p,e,!0))||(l=0,r?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1],3)))}!g||e&&Bl(e,p)||t.point(p[0],p[1]),e=p,c=g,n=y},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return l|(u&&c)<<1}}}),(function(e,r,i,a){Al(a,t,n,i,e,r)}),r?[0,-t]:[-Mc,t-Mc])}var ql=1e9,Hl=-ql;function Wl(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,s,u){var l=0,h=0;if(null==i||(l=o(i,s))!==(h=o(a,s))||c(i,a)<0^s>0)do{u.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+s+4)%4)!==h);else u.point(a[0],a[1])}function o(r,i){return Ic(r[0]-t)<Sc?i>0?0:3:Ic(r[0]-n)<Sc?i>0?2:1:Ic(r[1]-e)<Sc?i>0?1:0:i>0?3:2}function s(t,e){return c(t.x,e.x)}function c(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var c,u,l,h,f,d,p,g,y,m,v,b=o,_=Dl(),x={point:w,lineStart:function(){x.point=k,u&&u.push(l=[]),m=!0,y=!1,p=g=NaN},lineEnd:function(){c&&(k(h,f),d&&y&&_.rejoin(),c.push(_.result())),x.point=w,y&&b.lineEnd()},polygonStart:function(){b=_,c=[],u=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var a,o,s=u[n],c=1,l=s.length,h=s[0],f=h[0],d=h[1];c<l;++c)a=f,o=d,f=(h=s[c])[0],d=h[1],o<=r?d>r&&(f-a)*(r-o)>(d-o)*(t-a)&&++e:d<=r&&(f-a)*(r-o)<(d-o)*(t-a)&&--e;return e}(),n=v&&e,i=(c=P(c)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&Ol(c,s,e,a,o),o.polygonEnd()),b=o,c=u=l=null}};function w(t,e){i(t,e)&&b.point(t,e)}function k(a,o){var s=i(a,o);if(u&&l.push([a,o]),m)h=a,f=o,d=s,m=!1,s&&(b.lineStart(),b.point(a,o));else if(s&&y)b.point(a,o);else{var c=[p=Math.max(Hl,Math.min(ql,p)),g=Math.max(Hl,Math.min(ql,g))],_=[a=Math.max(Hl,Math.min(ql,a)),o=Math.max(Hl,Math.min(ql,o))];!function(t,e,n,r,i,a){var o,s=t[0],c=t[1],u=0,l=1,h=e[0]-s,f=e[1]-c;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<u)return;o<l&&(l=o)}else if(h>0){if(o>l)return;o>u&&(u=o)}if(o=i-s,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>u&&(u=o)}else if(h>0){if(o<u)return;o<l&&(l=o)}if(o=r-c,f||!(o>0)){if(o/=f,f<0){if(o<u)return;o<l&&(l=o)}else if(f>0){if(o>l)return;o>u&&(u=o)}if(o=a-c,f||!(o<0)){if(o/=f,f<0){if(o>l)return;o>u&&(u=o)}else if(f>0){if(o<u)return;o<l&&(l=o)}return u>0&&(t[0]=s+u*h,t[1]=c+u*f),l<1&&(e[0]=s+l*h,e[1]=c+l*f),!0}}}}}(c,_,t,e,n,r)?s&&(b.lineStart(),b.point(a,o),v=!1):(y||(b.lineStart(),b.point(c[0],c[1])),b.point(_[0],_[1]),s||b.lineEnd(),v=!1)}p=a,g=o,y=s}return x}}function Vl(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=Wl(r,i,a,o)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],a=+s[1][0],o=+s[1][1],t=e=null,n):[[r,i],[a,o]]}}}var Gl,Xl,Zl,Ql=kc(),Kl={sphere:Zc,point:Zc,lineStart:function(){Kl.point=th,Kl.lineEnd=Jl},lineEnd:Zc,polygonStart:Zc,polygonEnd:Zc};function Jl(){Kl.point=Kl.lineEnd=Zc}function th(t,e){Gl=t*=Oc,Xl=$c(e*=Oc),Zl=Pc(e),Kl.point=eh}function eh(t,e){t*=Oc;var n=$c(e*=Oc),r=Pc(e),i=Ic(t-Gl),a=Pc(i),o=r*$c(i),s=Zl*n-Xl*r*a,c=Xl*n+Zl*r*a;Ql.add(Fc(Hc(o*o+s*s),c)),Gl=t,Xl=n,Zl=r}function nh(t){return Ql.reset(),nu(t,Kl),+Ql}var rh=[null,null],ih={type:"LineString",coordinates:rh};function ah(t,e){return rh[0]=t,rh[1]=e,nh(ih)}var oh={Feature:function(t,e){return ch(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(ch(n[r].geometry,e))return!0;return!1}},sh={Sphere:function(){return!0},Point:function(t,e){return uh(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(uh(n[r],e))return!0;return!1},LineString:function(t,e){return lh(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(lh(n[r],e))return!0;return!1},Polygon:function(t,e){return hh(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(hh(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(ch(n[r],e))return!0;return!1}};function ch(t,e){return!(!t||!sh.hasOwnProperty(t.type))&&sh[t.type](t,e)}function uh(t,e){return 0===ah(t,e)}function lh(t,e){for(var n,r,i,a=0,o=t.length;a<o;a++){if(0===(r=ah(t[a],e)))return!0;if(a>0&&(i=ah(t[a],t[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<Ac*i)return!0;n=r}return!1}function hh(t,e){return!!Pl(t.map(fh),dh(e))}function fh(t){return(t=t.map(dh)).pop(),t}function dh(t){return[t[0]*Oc,t[1]*Oc]}function ph(t,e){return(t&&oh.hasOwnProperty(t.type)?oh[t.type]:ch)(t,e)}function gh(t,e,n){var r=k(t,e-Sc,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function yh(t,e,n){var r=k(t,e-Sc,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function mh(){var t,e,n,r,i,a,o,s,c,u,l,h,f=10,d=f,p=90,g=360,y=2.5;function m(){return{type:"MultiLineString",coordinates:v()}}function v(){return k(Yc(r/p)*p,n,p).map(l).concat(k(Yc(s/g)*g,o,g).map(h)).concat(k(Yc(e/f)*f,t,f).filter((function(t){return Ic(t%p)>Sc})).map(c)).concat(k(Yc(a/d)*d,i,d).filter((function(t){return Ic(t%g)>Sc})).map(u))}return m.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},m.outline=function(){return{type:"Polygon",coordinates:[l(r).concat(h(o).slice(1),l(n).reverse().slice(1),h(s).reverse().slice(1))]}},m.extent=function(t){return arguments.length?m.extentMajor(t).extentMinor(t):m.extentMinor()},m.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),s>o&&(t=s,s=o,o=t),m.precision(y)):[[r,s],[n,o]]},m.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),m.precision(y)):[[e,a],[t,i]]},m.step=function(t){return arguments.length?m.stepMajor(t).stepMinor(t):m.stepMinor()},m.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],m):[p,g]},m.stepMinor=function(t){return arguments.length?(f=+t[0],d=+t[1],m):[f,d]},m.precision=function(f){return arguments.length?(y=+f,c=gh(a,i,90),u=yh(e,t,y),l=gh(s,o,90),h=yh(r,n,y),m):y},m.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function vh(){return mh()()}function bh(t,e){var n=t[0]*Oc,r=t[1]*Oc,i=e[0]*Oc,a=e[1]*Oc,o=Pc(r),s=$c(r),c=Pc(a),u=$c(a),l=o*Pc(n),h=o*$c(n),f=c*Pc(i),d=c*$c(i),p=2*Gc(Hc(Xc(a-r)+o*c*Xc(i-n))),g=$c(p),y=p?function(t){var e=$c(t*=p)/g,n=$c(p-t)/g,r=n*l+e*f,i=n*h+e*d,a=n*s+e*u;return[Fc(i,r)*Lc,Fc(a,Hc(r*r+i*i))*Lc]}:function(){return[n*Lc,r*Lc]};return y.distance=p,y}function _h(t){return t}var xh,wh,kh,Th,Ch=kc(),Eh=kc(),Sh={point:Zc,lineStart:Zc,lineEnd:Zc,polygonStart:function(){Sh.lineStart=Ah,Sh.lineEnd=Dh},polygonEnd:function(){Sh.lineStart=Sh.lineEnd=Sh.point=Zc,Ch.add(Ic(Eh)),Eh.reset()},result:function(){var t=Ch/2;return Ch.reset(),t}};function Ah(){Sh.point=Mh}function Mh(t,e){Sh.point=Nh,xh=kh=t,wh=Th=e}function Nh(t,e){Eh.add(Th*t-kh*e),kh=t,Th=e}function Dh(){Nh(xh,wh)}const Bh=Sh;var Lh=1/0,Oh=Lh,Ih=-Lh,Rh=Ih,Fh={point:function(t,e){t<Lh&&(Lh=t),t>Ih&&(Ih=t),e<Oh&&(Oh=e),e>Rh&&(Rh=e)},lineStart:Zc,lineEnd:Zc,polygonStart:Zc,polygonEnd:Zc,result:function(){var t=[[Lh,Oh],[Ih,Rh]];return Ih=Rh=-(Oh=Lh=1/0),t}};const Ph=Fh;var Yh,jh,Uh,zh,$h=0,qh=0,Hh=0,Wh=0,Vh=0,Gh=0,Xh=0,Zh=0,Qh=0,Kh={point:Jh,lineStart:tf,lineEnd:rf,polygonStart:function(){Kh.lineStart=af,Kh.lineEnd=of},polygonEnd:function(){Kh.point=Jh,Kh.lineStart=tf,Kh.lineEnd=rf},result:function(){var t=Qh?[Xh/Qh,Zh/Qh]:Gh?[Wh/Gh,Vh/Gh]:Hh?[$h/Hh,qh/Hh]:[NaN,NaN];return $h=qh=Hh=Wh=Vh=Gh=Xh=Zh=Qh=0,t}};function Jh(t,e){$h+=t,qh+=e,++Hh}function tf(){Kh.point=ef}function ef(t,e){Kh.point=nf,Jh(Uh=t,zh=e)}function nf(t,e){var n=t-Uh,r=e-zh,i=Hc(n*n+r*r);Wh+=i*(Uh+t)/2,Vh+=i*(zh+e)/2,Gh+=i,Jh(Uh=t,zh=e)}function rf(){Kh.point=Jh}function af(){Kh.point=sf}function of(){cf(Yh,jh)}function sf(t,e){Kh.point=cf,Jh(Yh=Uh=t,jh=zh=e)}function cf(t,e){var n=t-Uh,r=e-zh,i=Hc(n*n+r*r);Wh+=i*(Uh+t)/2,Vh+=i*(zh+e)/2,Gh+=i,Xh+=(i=zh*t-Uh*e)*(Uh+t),Zh+=i*(zh+e),Qh+=3*i,Jh(Uh=t,zh=e)}const uf=Kh;function lf(t){this._context=t}lf.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Bc)}},result:Zc};var hf,ff,df,pf,gf,yf=kc(),mf={point:Zc,lineStart:function(){mf.point=vf},lineEnd:function(){hf&&bf(ff,df),mf.point=Zc},polygonStart:function(){hf=!0},polygonEnd:function(){hf=null},result:function(){var t=+yf;return yf.reset(),t}};function vf(t,e){mf.point=bf,ff=pf=t,df=gf=e}function bf(t,e){pf-=t,gf-=e,yf.add(Hc(pf*pf+gf*gf)),pf=t,gf=e}const _f=mf;function xf(){this._string=[]}function wf(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function kf(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),nu(t,n(r))),r.result()}return a.area=function(t){return nu(t,n(Bh)),Bh.result()},a.measure=function(t){return nu(t,n(_f)),_f.result()},a.bounds=function(t){return nu(t,n(Ph)),Ph.result()},a.centroid=function(t){return nu(t,n(uf)),uf.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,_h):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new xf):new lf(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.projection(t).context(e)}function Tf(t){return{stream:Cf(t)}}function Cf(t){return function(e){var n=new Ef;for(var r in t)n[r]=t[r];return n.stream=e,n}}function Ef(){}function Sf(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),nu(n,t.stream(Ph)),e(Ph.result()),null!=r&&t.clipExtent(r),t}function Af(t,e,n){return Sf(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s])}),n)}function Mf(t,e,n){return Af(t,[[0,0],e],n)}function Nf(t,e,n){return Sf(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])}),n)}function Df(t,e,n){return Sf(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])}),n)}xf.prototype={_radius:4.5,_circle:wf(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=wf(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},Ef.prototype={constructor:Ef,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Bf=Pc(30*Oc);function Lf(t,e){return+e?function(t,e){function n(r,i,a,o,s,c,u,l,h,f,d,p,g,y){var m=u-r,v=l-i,b=m*m+v*v;if(b>4*e&&g--){var _=o+f,x=s+d,w=c+p,k=Hc(_*_+x*x+w*w),T=Gc(w/=k),C=Ic(Ic(w)-1)<Sc||Ic(a-h)<Sc?(a+h)/2:Fc(x,_),E=t(C,T),S=E[0],A=E[1],M=S-r,N=A-i,D=v*M-m*N;(D*D/b>e||Ic((m*M+v*N)/b-.5)>.3||o*f+s*d+c*p<Bf)&&(n(r,i,a,o,s,c,S,A,C,_/=k,x/=k,w,g,y),y.point(S,A),n(S,A,C,_,x,w,u,l,h,f,d,p,g,y))}}return function(e){var r,i,a,o,s,c,u,l,h,f,d,p,g={point:y,lineStart:m,lineEnd:b,polygonStart:function(){e.polygonStart(),g.lineStart=_},polygonEnd:function(){e.polygonEnd(),g.lineStart=m}};function y(n,r){n=t(n,r),e.point(n[0],n[1])}function m(){l=NaN,g.point=v,e.lineStart()}function v(r,i){var a=mu([r,i]),o=t(r,i);n(l,h,u,f,d,p,l=o[0],h=o[1],u=r,f=a[0],d=a[1],p=a[2],16,e),e.point(l,h)}function b(){g.point=y,e.lineEnd()}function _(){m(),g.point=x,g.lineEnd=w}function x(t,e){v(r=t,e),i=l,a=h,o=f,s=d,c=p,g.point=v}function w(){n(l,h,u,f,d,p,i,a,r,o,s,c,16,e),g.lineEnd=b,b()}return g}}(t,e):function(t){return Cf({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var Of=Cf({point:function(t,e){this.stream.point(t*Oc,e*Oc)}});function If(t,e,n,r,i){function a(a,o){return[e+t*(a*=r),n-t*(o*=i)]}return a.invert=function(a,o){return[(a-e)/t*r,(n-o)/t*i]},a}function Rf(t,e,n,r,i,a){var o=Pc(a),s=$c(a),c=o*t,u=s*t,l=o/t,h=s/t,f=(s*n-o*e)/t,d=(s*e+o*n)/t;function p(t,a){return[c*(t*=r)-u*(a*=i)+e,n-u*t-c*a]}return p.invert=function(t,e){return[r*(l*t-h*e+f),i*(d-h*t-l*e)]},p}function Ff(t){return Pf((function(){return t}))()}function Pf(t){var e,n,r,i,a,o,s,c,u,l,h=150,f=480,d=250,p=0,g=0,y=0,m=0,v=0,b=0,_=1,x=1,w=null,k=zl,T=null,C=_h,E=.5;function S(t){return c(t[0]*Oc,t[1]*Oc)}function A(t){return(t=c.invert(t[0],t[1]))&&[t[0]*Lc,t[1]*Lc]}function M(){var t=Rf(h,0,0,_,x,b).apply(null,e(p,g)),r=(b?Rf:If)(h,f-t[0],d-t[1],_,x,b);return n=kl(y,m,v),s=xl(e,r),c=xl(n,s),o=Lf(s,E),N()}function N(){return u=l=null,S}return S.stream=function(t){return u&&l===t?u:u=Of(function(t){return Cf({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(k(o(C(l=t)))))},S.preclip=function(t){return arguments.length?(k=t,w=void 0,N()):k},S.postclip=function(t){return arguments.length?(C=t,T=r=i=a=null,N()):C},S.clipAngle=function(t){return arguments.length?(k=+t?$l(w=t*Oc):(w=null,zl),N()):w*Lc},S.clipExtent=function(t){return arguments.length?(C=null==t?(T=r=i=a=null,_h):Wl(T=+t[0][0],r=+t[0][1],i=+t[1][0],a=+t[1][1]),N()):null==T?null:[[T,r],[i,a]]},S.scale=function(t){return arguments.length?(h=+t,M()):h},S.translate=function(t){return arguments.length?(f=+t[0],d=+t[1],M()):[f,d]},S.center=function(t){return arguments.length?(p=t[0]%360*Oc,g=t[1]%360*Oc,M()):[p*Lc,g*Lc]},S.rotate=function(t){return arguments.length?(y=t[0]%360*Oc,m=t[1]%360*Oc,v=t.length>2?t[2]%360*Oc:0,M()):[y*Lc,m*Lc,v*Lc]},S.angle=function(t){return arguments.length?(b=t%360*Oc,M()):b*Lc},S.reflectX=function(t){return arguments.length?(_=t?-1:1,M()):_<0},S.reflectY=function(t){return arguments.length?(x=t?-1:1,M()):x<0},S.precision=function(t){return arguments.length?(o=Lf(s,E=t*t),N()):Hc(E)},S.fitExtent=function(t,e){return Af(S,t,e)},S.fitSize=function(t,e){return Mf(S,t,e)},S.fitWidth=function(t,e){return Nf(S,t,e)},S.fitHeight=function(t,e){return Df(S,t,e)},function(){return e=t.apply(this,arguments),S.invert=e.invert&&A,M()}}function Yf(t){var e=0,n=Mc/3,r=Pf(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Oc,n=t[1]*Oc):[e*Lc,n*Lc]},i}function jf(t,e){var n=$c(t),r=(n+$c(e))/2;if(Ic(r)<Sc)return function(t){var e=Pc(t);function n(t,n){return[t*e,$c(n)/e]}return n.invert=function(t,n){return[t/e,Gc(n*e)]},n}(t);var i=1+n*(2*r-n),a=Hc(i)/r;function o(t,e){var n=Hc(i-2*r*$c(e))/r;return[n*$c(t*=r),a-n*Pc(t)]}return o.invert=function(t,e){var n=a-e,o=Fc(t,Ic(n))*qc(n);return n*r<0&&(o-=Mc*qc(t)*qc(n)),[o/r,Gc((i-(t*t+n*n)*r*r)/(2*r))]},o}function Uf(){return Yf(jf).scale(155.424).center([0,33.6442])}function zf(){return Uf().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function $f(){var t,e,n,r,i,a,o=zf(),s=Uf().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=Uf().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){a=[t,e]}};function l(t){var e=t[0],o=t[1];return a=null,n.point(e,o),a||(r.point(e,o),a)||(i.point(e,o),a)}function h(){return t=e=null,l}return l.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(t)},l.stream=function(n){return t&&e===n?t:(r=[o.stream(e=n),s.stream(n),c.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},l.precision=function(t){return arguments.length?(o.precision(t),s.precision(t),c.precision(t),h()):o.precision()},l.scale=function(t){return arguments.length?(o.scale(t),s.scale(.35*t),c.scale(t),l.translate(o.translate())):o.scale()},l.translate=function(t){if(!arguments.length)return o.translate();var e=o.scale(),a=+t[0],l=+t[1];return n=o.translate(t).clipExtent([[a-.455*e,l-.238*e],[a+.455*e,l+.238*e]]).stream(u),r=s.translate([a-.307*e,l+.201*e]).clipExtent([[a-.425*e+Sc,l+.12*e+Sc],[a-.214*e-Sc,l+.234*e-Sc]]).stream(u),i=c.translate([a-.205*e,l+.212*e]).clipExtent([[a-.214*e+Sc,l+.166*e+Sc],[a-.115*e-Sc,l+.234*e-Sc]]).stream(u),h()},l.fitExtent=function(t,e){return Af(l,t,e)},l.fitSize=function(t,e){return Mf(l,t,e)},l.fitWidth=function(t,e){return Nf(l,t,e)},l.fitHeight=function(t,e){return Df(l,t,e)},l.scale(1070)}function qf(t){return function(e,n){var r=Pc(e),i=Pc(n),a=t(r*i);return[a*i*$c(e),a*$c(n)]}}function Hf(t){return function(e,n){var r=Hc(e*e+n*n),i=t(r),a=$c(i),o=Pc(i);return[Fc(e*a,r*o),Gc(r&&n*a/r)]}}var Wf=qf((function(t){return Hc(2/(1+t))}));function Vf(){return Ff(Wf).scale(124.75).clipAngle(179.999)}Wf.invert=Hf((function(t){return 2*Gc(t/2)}));var Gf=qf((function(t){return(t=Vc(t))&&t/$c(t)}));function Xf(){return Ff(Gf).scale(79.4188).clipAngle(179.999)}function Zf(t,e){return[t,Uc(Wc((Nc+e)/2))]}function Qf(){return Kf(Zf).scale(961/Bc)}function Kf(t){var e,n,r,i=Ff(t),a=i.center,o=i.scale,s=i.translate,c=i.clipExtent,u=null;function l(){var a=Mc*o(),s=i(Sl(i.rotate()).invert([0,0]));return c(null==u?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:t===Zf?[[Math.max(s[0]-a,u),e],[Math.min(s[0]+a,n),r]]:[[u,Math.max(s[1]-a,e)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(t){return arguments.length?(o(t),l()):o()},i.translate=function(t){return arguments.length?(s(t),l()):s()},i.center=function(t){return arguments.length?(a(t),l()):a()},i.clipExtent=function(t){return arguments.length?(null==t?u=e=n=r=null:(u=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),l()):null==u?null:[[u,e],[n,r]]},l()}function Jf(t){return Wc((Nc+t)/2)}function td(t,e){var n=Pc(t),r=t===e?$c(t):Uc(n/Pc(e))/Uc(Jf(e)/Jf(t)),i=n*zc(Jf(t),r)/r;if(!r)return Zf;function a(t,e){i>0?e<-Nc+Sc&&(e=-Nc+Sc):e>Nc-Sc&&(e=Nc-Sc);var n=i/zc(Jf(e),r);return[n*$c(r*t),i-n*Pc(r*t)]}return a.invert=function(t,e){var n=i-e,a=qc(r)*Hc(t*t+n*n),o=Fc(t,Ic(n))*qc(n);return n*r<0&&(o-=Mc*qc(t)*qc(n)),[o/r,2*Rc(zc(i/a,1/r))-Nc]},a}function ed(){return Yf(td).scale(109.5).parallels([30,30])}function nd(t,e){return[t,e]}function rd(){return Ff(nd).scale(152.63)}function id(t,e){var n=Pc(t),r=t===e?$c(t):(n-Pc(e))/(e-t),i=n/r+t;if(Ic(r)<Sc)return nd;function a(t,e){var n=i-e,a=r*t;return[n*$c(a),i-n*Pc(a)]}return a.invert=function(t,e){var n=i-e,a=Fc(t,Ic(n))*qc(n);return n*r<0&&(a-=Mc*qc(t)*qc(n)),[a/r,i-qc(r)*Hc(t*t+n*n)]},a}function ad(){return Yf(id).scale(131.154).center([0,13.9389])}Gf.invert=Hf((function(t){return t})),Zf.invert=function(t,e){return[t,2*Rc(jc(e))-Nc]},nd.invert=nd;var od=1.340264,sd=-.081106,cd=893e-6,ud=.003796,ld=Hc(3)/2;function hd(t,e){var n=Gc(ld*$c(e)),r=n*n,i=r*r*r;return[t*Pc(n)/(ld*(od+3*sd*r+i*(7*cd+9*ud*r))),n*(od+sd*r+i*(cd+ud*r))]}function fd(){return Ff(hd).scale(177.158)}function dd(t,e){var n=Pc(e),r=Pc(t)*n;return[n*$c(t)/r,$c(e)/r]}function pd(){return Ff(dd).scale(144.049).clipAngle(60)}function gd(){var t,e,n,r,i,a,o,s=1,c=0,u=0,l=1,h=1,f=0,d=null,p=1,g=1,y=Cf({point:function(t,e){var n=b([t,e]);this.stream.point(n[0],n[1])}}),m=_h;function v(){return p=s*l,g=s*h,a=o=null,b}function b(n){var r=n[0]*p,i=n[1]*g;if(f){var a=i*t-r*e;r=r*t+i*e,i=a}return[r+c,i+u]}return b.invert=function(n){var r=n[0]-c,i=n[1]-u;if(f){var a=i*t+r*e;r=r*t-i*e,i=a}return[r/p,i/g]},b.stream=function(t){return a&&o===t?a:a=y(m(o=t))},b.postclip=function(t){return arguments.length?(m=t,d=n=r=i=null,v()):m},b.clipExtent=function(t){return arguments.length?(m=null==t?(d=n=r=i=null,_h):Wl(d=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),v()):null==d?null:[[d,n],[r,i]]},b.scale=function(t){return arguments.length?(s=+t,v()):s},b.translate=function(t){return arguments.length?(c=+t[0],u=+t[1],v()):[c,u]},b.angle=function(n){return arguments.length?(e=$c(f=n%360*Oc),t=Pc(f),v()):f*Lc},b.reflectX=function(t){return arguments.length?(l=t?-1:1,v()):l<0},b.reflectY=function(t){return arguments.length?(h=t?-1:1,v()):h<0},b.fitExtent=function(t,e){return Af(b,t,e)},b.fitSize=function(t,e){return Mf(b,t,e)},b.fitWidth=function(t,e){return Nf(b,t,e)},b.fitHeight=function(t,e){return Df(b,t,e)},b}function yd(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}function md(){return Ff(yd).scale(175.295)}function vd(t,e){return[Pc(e)*$c(t),$c(e)]}function bd(){return Ff(vd).scale(249.5).clipAngle(90.000001)}function _d(t,e){var n=Pc(e),r=1+Pc(t)*n;return[n*$c(t)/r,$c(e)/r]}function xd(){return Ff(_d).scale(250).clipAngle(142)}function wd(t,e){return[Uc(Wc((Nc+e)/2)),-t]}function kd(){var t=Kf(wd),e=t.center,n=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}function Td(t,e){return t.parent===e.parent?1:2}function Cd(t,e){return t+e.x}function Ed(t,e){return Math.max(t,e.y)}function Sd(){var t=Td,e=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(Cd,0)/t.length}(n),e.y=function(t){return 1+t.reduce(Ed,0)}(n)):(e.x=a?o+=t(e,a):0,e.y=0,a=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=s.x-t(s,c)/2,l=c.x+t(c,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(l-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function Ad(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function Md(t,e){var n,r,i,a,o,s=new Ld(t),c=+t.value&&(s.value=t.value),u=[s];for(null==e&&(e=Nd);n=u.pop();)if(c&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)u.push(r=n.children[a]=new Ld(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Bd)}function Nd(t){return t.children}function Dd(t){t.data=t.data.data}function Bd(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Ld(t){this.data=t,this.depth=this.height=0,this.parent=null}hd.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(od+sd*i+a*(cd+ud*i))-e)/(od+3*sd*i+a*(7*cd+9*ud*i)))*r)*i*i,!(Ic(n)<Ac));++o);return[ld*t*(od+3*sd*i+a*(7*cd+9*ud*i))/Pc(r),Gc($c(r)/ld)]},dd.invert=Hf(Rc),yd.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(Ic(n)>Sc&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]},vd.invert=Hf(Gc),_d.invert=Hf((function(t){return 2*Rc(t)})),wd.invert=function(t,e){return[-e,2*Rc(jc(t))-Nc]},Ld.prototype=Md.prototype={constructor:Ld,count:function(){return this.eachAfter(Ad)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return Md(this).eachBefore(Dd)}};var Od=Array.prototype.slice;function Id(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(Od.call(t))).length,a=[];r<i;)e=t[r],n&&Pd(n,e)?++r:(n=jd(a=Rd(a,e)),r=0);return n}function Rd(t,e){var n,r;if(Yd(e,t))return[e];for(n=0;n<t.length;++n)if(Fd(e,t[n])&&Yd(Ud(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(Fd(Ud(t[n],t[r]),e)&&Fd(Ud(t[n],e),t[r])&&Fd(Ud(t[r],e),t[n])&&Yd(zd(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Fd(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function Pd(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Yd(t,e){for(var n=0;n<e.length;++n)if(!Pd(t,e[n]))return!1;return!0}function jd(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return Ud(t[0],t[1]);case 3:return zd(t[0],t[1],t[2])}}function Ud(t,e){var n=t.x,r=t.y,i=t.r,a=e.x,o=e.y,s=e.r,c=a-n,u=o-r,l=s-i,h=Math.sqrt(c*c+u*u);return{x:(n+a+c/h*l)/2,y:(r+o+u/h*l)/2,r:(h+i+s)/2}}function zd(t,e,n){var r=t.x,i=t.y,a=t.r,o=e.x,s=e.y,c=e.r,u=n.x,l=n.y,h=n.r,f=r-o,d=r-u,p=i-s,g=i-l,y=c-a,m=h-a,v=r*r+i*i-a*a,b=v-o*o-s*s+c*c,_=v-u*u-l*l+h*h,x=d*p-f*g,w=(p*_-g*b)/(2*x)-r,k=(g*y-p*m)/x,T=(d*b-f*_)/(2*x)-i,C=(f*m-d*y)/x,E=k*k+C*C-1,S=2*(a+w*k+T*C),A=w*w+T*T-a*a,M=-(E?(S+Math.sqrt(S*S-4*E*A))/(2*E):A/S);return{x:r+w+k*M,y:i+T+C*M,r:M}}function $d(t,e,n){var r,i,a,o,s=t.x-e.x,c=t.y-e.y,u=s*s+c*c;u?(i=e.r+n.r,i*=i,o=t.r+n.r,i>(o*=o)?(r=(u+o-i)/(2*u),a=Math.sqrt(Math.max(0,o/u-r*r)),n.x=t.x-r*s-a*c,n.y=t.y-r*c+a*s):(r=(u+i-o)/(2*u),a=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*s-a*c,n.y=e.y+r*c+a*s)):(n.x=e.x+n.r,n.y=e.y)}function qd(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Hd(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function Wd(t){this._=t,this.next=null,this.previous=null}function Vd(t){if(!(i=t.length))return 0;var e,n,r,i,a,o,s,c,u,l,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;$d(n,e,r=t[2]),e=new Wd(e),n=new Wd(n),r=new Wd(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){$d(e._,n._,r=t[s]),r=new Wd(r),c=n.next,u=e.previous,l=n._.r,h=e._.r;do{if(l<=h){if(qd(c._,r._)){n=c,e.next=n,n.previous=e,--s;continue t}l+=c._.r,c=c.next}else{if(qd(u._,r._)){(e=u).next=n,n.previous=e,--s;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,a=Hd(e);(r=r.next)!==n;)(o=Hd(r))<a&&(e=r,a=o);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=Id(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}function Gd(t){return Vd(t),t}function Xd(t){return null==t?null:Zd(t)}function Zd(t){if("function"!=typeof t)throw new Error;return t}function Qd(){return 0}function Kd(t){return function(){return t}}function Jd(t){return Math.sqrt(t.value)}function tp(){var t=null,e=1,n=1,r=Qd;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(ep(t)).eachAfter(np(r,.5)).eachBefore(rp(1)):i.eachBefore(ep(Jd)).eachAfter(np(Qd,1)).eachAfter(np(r,i.r/Math.min(e,n))).eachBefore(rp(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=Xd(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:Kd(+t),i):r},i}function ep(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function np(t,e){return function(n){if(r=n.children){var r,i,a,o=r.length,s=t(n)*e||0;if(s)for(i=0;i<o;++i)r[i].r+=s;if(a=Vd(r),s)for(i=0;i<o;++i)r[i].r-=s;n.r=a+s}}}function rp(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function ip(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function ap(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,u=t.value&&(r-e)/t.value;++s<c;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*u}function op(){var t=1,e=1,n=0,r=!1;function i(i){var a=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(r){r.children&&ap(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=s}}(e,a)),r&&i.eachBefore(ip),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i}var sp={depth:-1},cp={};function up(t){return t.id}function lp(t){return t.parentId}function hp(){var t=up,e=lp;function n(n){var r,i,a,o,s,c,u,l=n.length,h=new Array(l),f={};for(i=0;i<l;++i)r=n[i],s=h[i]=new Ld(r),null!=(c=t(r,i,n))&&(c+="")&&(f[u="$"+(s.id=c)]=u in f?cp:s);for(i=0;i<l;++i)if(s=h[i],null!=(c=e(n[i],i,n))&&(c+="")){if(!(o=f["$"+c]))throw new Error("missing: "+c);if(o===cp)throw new Error("ambiguous: "+c);o.children?o.children.push(s):o.children=[s],s.parent=o}else{if(a)throw new Error("multiple roots");a=s}if(!a)throw new Error("no root");if(a.parent=sp,a.eachBefore((function(t){t.depth=t.parent.depth+1,--l})).eachBefore(Bd),a.parent=null,l>0)throw new Error("cycle");return a}return n.id=function(e){return arguments.length?(t=Zd(e),n):t},n.parentId=function(t){return arguments.length?(e=Zd(t),n):e},n}function fp(t,e){return t.parent===e.parent?1:2}function dp(t){var e=t.children;return e?e[0]:t.t}function pp(t){var e=t.children;return e?e[e.length-1]:t.t}function gp(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function yp(t,e,n){return t.a.parent===e.parent?t.a:n}function mp(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function vp(){var t=fp,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,a,o=new mp(t,0),s=[o];e=s.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=e.children[i]=new mp(r[i],i)),n.parent=e;return(o.parent=new mp(null,0)).children=[o],o}(i);if(c.eachAfter(a),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(s);else{var u=i,l=i,h=i;i.eachBefore((function(t){t.x<u.x&&(u=t),t.x>l.x&&(l=t),t.depth>h.depth&&(h=t)}));var f=u===l?1:t(u,l)/2,d=f-u.x,p=e/(l.x+f+d),g=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*g}))}return i}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,a=e,o=e,s=n,c=a.parent.children[0],u=a.m,l=o.m,h=s.m,f=c.m;s=pp(s),a=dp(a),s&&a;)c=dp(c),(o=pp(o)).a=e,(i=s.z+h-a.z-u+t(s._,a._))>0&&(gp(yp(s,e,r),e,i),u+=i,l+=i),h+=s.m,u+=a.m,f+=c.m,l+=o.m;s&&!pp(o)&&(o.t=s,o.m+=h-l),a&&!dp(c)&&(c.t=a,c.m+=u-f,r=e)}return r}(e,i,e.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function bp(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,u=t.value&&(i-n)/t.value;++s<c;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*u}mp.prototype=Object.create(Ld.prototype);var _p=(1+Math.sqrt(5))/2;function xp(t,e,n,r,i,a){for(var o,s,c,u,l,h,f,d,p,g,y,m=[],v=e.children,b=0,_=0,x=v.length,w=e.value;b<x;){c=i-n,u=a-r;do{l=v[_++].value}while(!l&&_<x);for(h=f=l,y=l*l*(g=Math.max(u/c,c/u)/(w*t)),p=Math.max(f/y,y/h);_<x;++_){if(l+=s=v[_].value,s<h&&(h=s),s>f&&(f=s),y=l*l*g,(d=Math.max(f/y,y/h))>p){l-=s;break}p=d}m.push(o={value:l,dice:c<u,children:v.slice(b,_)}),o.dice?ap(o,n,r,i,w?r+=u*l/w:a):bp(o,n,r,w?n+=c*l/w:i,a),w-=l,b=_}return m}const wp=function t(e){function n(t,n,r,i,a){xp(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(_p);function kp(){var t=wp,e=!1,n=1,r=1,i=[0],a=Qd,o=Qd,s=Qd,c=Qd,u=Qd;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(ip),t}function h(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<l&&(l=f=(l+f)/2),e.x0=r,e.y0=l,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=a(e)/2,r+=u(e)-n,l+=o(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=c(e)-n)<l&&(l=f=(l+f)/2),t(e,r,l,h,f))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=Zd(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:Kd(+t),l):a},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:Kd(+t),l):o},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Kd(+t),l):s},l.paddingBottom=function(t){return arguments.length?(c="function"==typeof t?t:Kd(+t),l):c},l.paddingLeft=function(t){return arguments.length?(u="function"==typeof t?t:Kd(+t),l):u},l}function Tp(t,e,n,r,i){var a,o,s=t.children,c=s.length,u=new Array(c+1);for(u[0]=o=a=0;a<c;++a)u[a+1]=o+=s[a].value;!function t(e,n,r,i,a,o,c){if(e>=n-1){var l=s[e];return l.x0=i,l.y0=a,l.x1=o,void(l.y1=c)}for(var h=u[e],f=r/2+h,d=e+1,p=n-1;d<p;){var g=d+p>>>1;u[g]<f?d=g+1:p=g}f-u[d-1]<u[d]-f&&e+1<d&&--d;var y=u[d]-h,m=r-y;if(o-i>c-a){var v=(i*m+o*y)/r;t(e,d,y,i,a,v,c),t(d,n,m,v,a,o,c)}else{var b=(a*m+c*y)/r;t(e,d,y,i,a,o,b),t(d,n,m,i,b,o,c)}}(0,c,t.value,e,n,r,i)}function Cp(t,e,n,r,i){(1&t.depth?bp:ap)(t,e,n,r,i)}const Ep=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,c,u,l,h=-1,f=o.length,d=t.value;++h<f;){for(c=(s=o[h]).children,u=s.value=0,l=c.length;u<l;++u)s.value+=c[u].value;s.dice?ap(s,n,r,i,r+=(a-r)*s.value/d):bp(s,n,r,n+=(i-n)*s.value/d,a),d-=s.value}else t._squarify=o=xp(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(_p);function Sp(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}function Ap(t,e){var n=dn(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}}function Mp(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Np=Math.SQRT2;function Dp(t){return((t=Math.exp(t))+1/t)/2}function Bp(t,e){var n,r,i=t[0],a=t[1],o=t[2],s=e[0],c=e[1],u=e[2],l=s-i,h=c-a,f=l*l+h*h;if(f<1e-12)r=Math.log(u/o)/Np,n=function(t){return[i+t*l,a+t*h,o*Math.exp(Np*t*r)]};else{var d=Math.sqrt(f),p=(u*u-o*o+4*f)/(2*o*2*d),g=(u*u-o*o-4*f)/(2*u*2*d),y=Math.log(Math.sqrt(p*p+1)-p),m=Math.log(Math.sqrt(g*g+1)-g);r=(m-y)/Np,n=function(t){var e,n=t*r,s=Dp(y),c=o/(2*d)*(s*(e=Np*n+y,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[i+c*l,a+c*h,o*s/Dp(Np*n+y)]}}return n.duration=1e3*r,n}function Lp(t){return function(e,n){var r=t((e=an(e)).h,(n=an(n)).h),i=pn(e.s,n.s),a=pn(e.l,n.l),o=pn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+""}}}const Op=Lp(dn);var Ip=Lp(pn);function Rp(t,e){var n=pn((t=Ta(t)).l,(e=Ta(e)).l),r=pn(t.a,e.a),i=pn(t.b,e.b),a=pn(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+""}}function Fp(t){return function(e,n){var r=t((e=Ba(e)).h,(n=Ba(n)).h),i=pn(e.c,n.c),a=pn(e.l,n.l),o=pn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}const Pp=Fp(dn);var Yp=Fp(pn);function jp(t){return function e(n){function r(e,r){var i=t((e=qa(e)).h,(r=qa(r)).h),a=pn(e.s,r.s),o=pn(e.l,r.l),s=pn(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}const Up=jp(dn);var zp=jp(pn);function $p(t,e){for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n<r;)a[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return a[e](t-e)}}function qp(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}function Hp(t){for(var e,n=-1,r=t.length,i=t[r-1],a=0;++n<r;)e=i,i=t[n],a+=e[1]*i[0]-e[0]*i[1];return a/2}function Wp(t){for(var e,n,r=-1,i=t.length,a=0,o=0,s=t[i-1],c=0;++r<i;)e=s,s=t[r],c+=n=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*n,o+=(e[1]+s[1])*n;return[a/(c*=3),o/c]}function Vp(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function Gp(t,e){return t[0]-e[0]||t[1]-e[1]}function Xp(t){for(var e=t.length,n=[0,1],r=2,i=2;i<e;++i){for(;r>1&&Vp(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function Zp(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(Gp),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var a=Xp(r),o=Xp(i),s=o[0]===a[0],c=o[o.length-1]===a[a.length-1],u=[];for(e=a.length-1;e>=0;--e)u.push(t[r[a[e]][2]]);for(e=+s;e<o.length-c;++e)u.push(t[r[o[e]][2]]);return u}function Qp(t,e){for(var n,r,i=t.length,a=t[i-1],o=e[0],s=e[1],c=a[0],u=a[1],l=!1,h=0;h<i;++h)n=(a=t[h])[0],(r=a[1])>s!=u>s&&o<(c-n)*(s-r)/(u-r)+n&&(l=!l),c=n,u=r;return l}function Kp(t){for(var e,n,r=-1,i=t.length,a=t[i-1],o=a[0],s=a[1],c=0;++r<i;)e=o,n=s,e-=o=(a=t[r])[0],n-=s=a[1],c+=Math.sqrt(e*e+n*n);return c}function Jp(){return Math.random()}const tg=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(Jp),eg=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(Jp),ng=function t(e){function n(){var t=eg.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(Jp),rg=function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(Jp),ig=function t(e){function n(t){var n=rg.source(e)(t);return function(){return n()/t}}return n.source=t,n}(Jp),ag=function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(Jp);function og(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function sg(t,e){switch(arguments.length){case 0:break;case 1:this.interpolator(t);break;default:this.interpolator(e).domain(t)}return this}var cg=Array.prototype,ug=cg.map,lg=cg.slice,hg={name:"implicit"};function fg(){var t=na(),e=[],n=[],r=hg;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==hg)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=na();for(var r,a,o=-1,s=n.length;++o<s;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=lg.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return fg(e,n).unknown(r)},og.apply(i,arguments),i}function dg(){var t,e,n=fg().unknown(void 0),r=n.domain,i=n.range,a=[0,1],o=!1,s=0,c=0,u=.5;function l(){var n=r().length,l=a[1]<a[0],h=a[l-0],f=a[1-l];t=(f-h)/Math.max(1,n-s+2*c),o&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*u,e=t*(1-s),o&&(h=Math.round(h),e=Math.round(e));var d=k(n).map((function(e){return h+t*e}));return i(l?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),l()):r()},n.range=function(t){return arguments.length?(a=[+t[0],+t[1]],l()):a.slice()},n.rangeRound=function(t){return a=[+t[0],+t[1]],o=!0,l()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,l()):o},n.padding=function(t){return arguments.length?(s=Math.min(1,c=+t),l()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),l()):s},n.paddingOuter=function(t){return arguments.length?(c=+t,l()):c},n.align=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),l()):u},n.copy=function(){return dg(r(),a).round(o).paddingInner(s).paddingOuter(c).align(u)},og.apply(l(),arguments)}function pg(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return pg(e())},t}function gg(){return pg(dg.apply(null,arguments).paddingInner(1))}function yg(t){return+t}var mg=[0,1];function vg(t){return t}function bg(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function _g(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function xg(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=bg(i,r),a=n(o,a)):(r=bg(r,i),a=n(a,o)),function(t){return a(r(t))}}function wg(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=bg(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=u(t,e,1,r)-1;return a[n](i[n](e))}}function kg(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Tg(){var t,e,n,r,i,a,o=mg,s=mg,c=Mn,u=vg;function l(){return r=Math.min(o.length,s.length)>2?wg:xg,i=a=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,c)))(t(u(e)))}return h.invert=function(n){return u(e((a||(a=r(s,o.map(t),Tn)))(n)))},h.domain=function(t){return arguments.length?(o=ug.call(t,yg),u===vg||(u=_g(o)),l()):o.slice()},h.range=function(t){return arguments.length?(s=lg.call(t),l()):s.slice()},h.rangeRound=function(t){return s=lg.call(t),c=Mp,l()},h.clamp=function(t){return arguments.length?(u=t?_g(o):vg,h):u!==vg},h.interpolate=function(t){return arguments.length?(c=t,l()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}function Cg(t,e){return Tg()(t,e)}function Eg(t,e,n,r){var i,a=M(t,e,n);switch((r=cc(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=xc(a,o))||(r.precision=i),gc(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=wc(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=_c(a))||(r.precision=i-2*("%"===r.type))}return pc(r)}function Sg(t){var e=t.domain;return t.ticks=function(t){var n=e();return S(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return Eg(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,s=i[a],c=i[o];return c<s&&(r=s,s=c,c=r,r=a,a=o,o=r),(r=A(s,c,n))>0?r=A(s=Math.floor(s/r)*r,c=Math.ceil(c/r)*r,n):r<0&&(r=A(s=Math.ceil(s*r)/r,c=Math.floor(c*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(c/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(c*r)/r,e(i)),t},t}function Ag(){var t=Cg(vg,vg);return t.copy=function(){return kg(t,Ag())},og.apply(t,arguments),Sg(t)}function Mg(t){var e;function n(t){return isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=ug.call(e,yg),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return Mg(t).unknown(e)},t=arguments.length?ug.call(t,yg):[0,1],Sg(n)}function Ng(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function Dg(t){return Math.log(t)}function Bg(t){return Math.exp(t)}function Lg(t){return-Math.log(-t)}function Og(t){return-Math.exp(-t)}function Ig(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Rg(t){return function(e){return-t(-e)}}function Fg(t){var e,n,r=t(Dg,Bg),i=r.domain,a=10;function o(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(a),n=function(t){return 10===t?Ig:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=Rg(e),n=Rg(n),t(Lg,Og)):t(Dg,Bg),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),s=o[0],c=o[o.length-1];(r=c<s)&&(f=s,s=c,c=f);var u,l,h,f=e(s),d=e(c),p=null==t?10:+t,g=[];if(!(a%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(l=1,u=n(f);l<a;++l)if(!((h=u*l)<s)){if(h>c)break;g.push(h)}}else for(;f<d;++f)for(l=a-1,u=n(f);l>=1;--l)if(!((h=u*l)<s)){if(h>c)break;g.push(h)}}else g=S(f,d,Math.min(d-f,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=pc(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(Ng(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function Pg(){var t=Fg(Tg()).domain([1,10]);return t.copy=function(){return kg(t,Pg()).base(t.base())},og.apply(t,arguments),t}function Yg(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function jg(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Ug(t){var e=1,n=t(Yg(e),jg(e));return n.constant=function(n){return arguments.length?t(Yg(e=+n),jg(e)):e},Sg(n)}function zg(){var t=Ug(Tg());return t.copy=function(){return kg(t,zg()).constant(t.constant())},og.apply(t,arguments)}function $g(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function qg(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Hg(t){return t<0?-t*t:t*t}function Wg(t){var e=t(vg,vg),n=1;function r(){return 1===n?t(vg,vg):.5===n?t(qg,Hg):t($g(n),$g(1/n))}return e.exponent=function(t){return arguments.length?(n=+t,r()):n},Sg(e)}function Vg(){var t=Wg(Tg());return t.copy=function(){return kg(t,Vg()).exponent(t.exponent())},og.apply(t,arguments),t}function Gg(){return Vg.apply(null,arguments).exponent(.5)}function Xg(){var t,e=[],n=[],r=[];function a(){var t=0,i=Math.max(1,n.length);for(r=new Array(i-1);++t<i;)r[t-1]=B(e,t/i);return o}function o(e){return isNaN(e=+e)?t:n[u(r,e)]}return o.invertExtent=function(t){var i=n.indexOf(t);return i<0?[NaN,NaN]:[i>0?r[i-1]:e[0],i<r.length?r[i]:e[e.length-1]]},o.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var n,r=0,o=t.length;r<o;++r)null==(n=t[r])||isNaN(n=+n)||e.push(n);return e.sort(i),a()},o.range=function(t){return arguments.length?(n=lg.call(t),a()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return r.slice()},o.copy=function(){return Xg().domain(e).range(n).unknown(t)},og.apply(o,arguments)}function Zg(){var t,e=0,n=1,r=1,i=[.5],a=[0,1];function o(e){return e<=e?a[u(i,e,0,r)]:t}function s(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*e)/(r+1);return o}return o.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],s()):[e,n]},o.range=function(t){return arguments.length?(r=(a=lg.call(t)).length-1,s()):a.slice()},o.invertExtent=function(t){var o=a.indexOf(t);return o<0?[NaN,NaN]:o<1?[e,i[0]]:o>=r?[i[r-1],n]:[i[o-1],i[o]]},o.unknown=function(e){return arguments.length?(t=e,o):o},o.thresholds=function(){return i.slice()},o.copy=function(){return Zg().domain([e,n]).range(a).unknown(t)},og.apply(Sg(o),arguments)}function Qg(){var t,e=[.5],n=[0,1],r=1;function i(i){return i<=i?n[u(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=lg.call(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=lg.call(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return Qg().domain(e).range(n).unknown(t)},og.apply(i,arguments)}var Kg=new Date,Jg=new Date;function ty(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return ty((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Kg.setTime(+e),Jg.setTime(+r),t(Kg),t(Jg),Math.floor(n(Kg,Jg))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var ey=ty((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));ey.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ty((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};const ny=ey;var ry=ey.range,iy=ty((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}));const ay=iy;var oy=iy.range,sy=1e3,cy=6e4,uy=36e5,ly=864e5,hy=6048e5;function fy(t){return ty((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*cy)/hy}))}var dy=fy(0),py=fy(1),gy=fy(2),yy=fy(3),my=fy(4),vy=fy(5),by=fy(6),_y=dy.range,xy=py.range,wy=gy.range,ky=yy.range,Ty=my.range,Cy=vy.range,Ey=by.range,Sy=ty((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*cy)/ly}),(function(t){return t.getDate()-1}));const Ay=Sy;var My=Sy.range,Ny=ty((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*sy-t.getMinutes()*cy)}),(function(t,e){t.setTime(+t+e*uy)}),(function(t,e){return(e-t)/uy}),(function(t){return t.getHours()}));const Dy=Ny;var By=Ny.range,Ly=ty((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*sy)}),(function(t,e){t.setTime(+t+e*cy)}),(function(t,e){return(e-t)/cy}),(function(t){return t.getMinutes()}));const Oy=Ly;var Iy=Ly.range,Ry=ty((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*sy)}),(function(t,e){return(e-t)/sy}),(function(t){return t.getUTCSeconds()}));const Fy=Ry;var Py=Ry.range,Yy=ty((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Yy.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ty((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Yy:null};const jy=Yy;var Uy=Yy.range;function zy(t){return ty((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/hy}))}var $y=zy(0),qy=zy(1),Hy=zy(2),Wy=zy(3),Vy=zy(4),Gy=zy(5),Xy=zy(6),Zy=$y.range,Qy=qy.range,Ky=Hy.range,Jy=Wy.range,tm=Vy.range,em=Gy.range,nm=Xy.range,rm=ty((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/ly}),(function(t){return t.getUTCDate()-1}));const im=rm;var am=rm.range,om=ty((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));om.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ty((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};const sm=om;var cm=om.range;function um(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function lm(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function hm(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function fm(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,u=Tm(i),l=Cm(i),h=Tm(a),f=Cm(a),d=Tm(o),p=Cm(o),g=Tm(s),y=Cm(s),m=Tm(c),v=Cm(c),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Wm,e:Wm,f:Qm,g:cv,G:lv,H:Vm,I:Gm,j:Xm,L:Zm,m:Km,M:Jm,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Lv,s:Ov,S:tv,u:ev,U:nv,V:iv,w:av,W:ov,x:null,X:null,y:sv,Y:uv,Z:hv,"%":Bv},_={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:fv,e:fv,f:mv,g:Av,G:Nv,H:dv,I:pv,j:gv,L:yv,m:vv,M:bv,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Lv,s:Ov,S:_v,u:xv,U:wv,V:Tv,w:Cv,W:Ev,x:null,X:null,y:Sv,Y:Mv,Z:Dv,"%":Bv},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return T(t,e,n,r)},d:Rm,e:Rm,f:zm,g:Bm,G:Dm,H:Pm,I:Pm,j:Fm,L:Um,m:Im,M:Ym,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:Om,Q:qm,s:Hm,S:jm,u:Sm,U:Am,V:Mm,w:Em,W:Nm,x:function(t,e,r){return T(t,n,e,r)},X:function(t,e,n){return T(t,r,e,n)},y:Bm,Y:Dm,Z:Lm,"%":$m};function w(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===t.charCodeAt(s)&&(o.push(t.slice(c,s)),null!=(i=vm[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),c=s+1);return o.push(t.slice(c,s)),o.join("")}}function k(t,e){return function(n){var r,i,a=hm(1900,void 0,1);if(T(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(e&&!("Z"in a)&&(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=lm(hm(a.y,0,1))).getUTCDay(),r=i>4||0===i?qy.ceil(r):qy(r),r=im.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=um(hm(a.y,0,1))).getDay(),r=i>4||0===i?py.ceil(r):py(r),r=Ay.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?lm(hm(a.y,0,1)).getUTCDay():um(hm(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,lm(a)):um(a)}}function T(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o<s;){if(r>=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in vm?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),{format:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=k(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=k(t+="",!0);return e.toString=function(){return t},e}}}var dm,pm,gm,ym,mm,vm={"-":"",_:" ",0:"0"},bm=/^\s*\d+/,_m=/^%/,xm=/[\\^$*+?|[\]().{}]/g;function wm(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function km(t){return t.replace(xm,"\\$&")}function Tm(t){return new RegExp("^(?:"+t.map(km).join("|")+")","i")}function Cm(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function Em(t,e,n){var r=bm.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Sm(t,e,n){var r=bm.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Am(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Mm(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Nm(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Dm(t,e,n){var r=bm.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Bm(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Lm(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Om(t,e,n){var r=bm.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function Im(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Rm(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Fm(t,e,n){var r=bm.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Pm(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ym(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function jm(t,e,n){var r=bm.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Um(t,e,n){var r=bm.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function zm(t,e,n){var r=bm.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function $m(t,e,n){var r=_m.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function qm(t,e,n){var r=bm.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Hm(t,e,n){var r=bm.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Wm(t,e){return wm(t.getDate(),e,2)}function Vm(t,e){return wm(t.getHours(),e,2)}function Gm(t,e){return wm(t.getHours()%12||12,e,2)}function Xm(t,e){return wm(1+Ay.count(ny(t),t),e,3)}function Zm(t,e){return wm(t.getMilliseconds(),e,3)}function Qm(t,e){return Zm(t,e)+"000"}function Km(t,e){return wm(t.getMonth()+1,e,2)}function Jm(t,e){return wm(t.getMinutes(),e,2)}function tv(t,e){return wm(t.getSeconds(),e,2)}function ev(t){var e=t.getDay();return 0===e?7:e}function nv(t,e){return wm(dy.count(ny(t)-1,t),e,2)}function rv(t){var e=t.getDay();return e>=4||0===e?my(t):my.ceil(t)}function iv(t,e){return t=rv(t),wm(my.count(ny(t),t)+(4===ny(t).getDay()),e,2)}function av(t){return t.getDay()}function ov(t,e){return wm(py.count(ny(t)-1,t),e,2)}function sv(t,e){return wm(t.getFullYear()%100,e,2)}function cv(t,e){return wm((t=rv(t)).getFullYear()%100,e,2)}function uv(t,e){return wm(t.getFullYear()%1e4,e,4)}function lv(t,e){var n=t.getDay();return wm((t=n>=4||0===n?my(t):my.ceil(t)).getFullYear()%1e4,e,4)}function hv(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+wm(e/60|0,"0",2)+wm(e%60,"0",2)}function fv(t,e){return wm(t.getUTCDate(),e,2)}function dv(t,e){return wm(t.getUTCHours(),e,2)}function pv(t,e){return wm(t.getUTCHours()%12||12,e,2)}function gv(t,e){return wm(1+im.count(sm(t),t),e,3)}function yv(t,e){return wm(t.getUTCMilliseconds(),e,3)}function mv(t,e){return yv(t,e)+"000"}function vv(t,e){return wm(t.getUTCMonth()+1,e,2)}function bv(t,e){return wm(t.getUTCMinutes(),e,2)}function _v(t,e){return wm(t.getUTCSeconds(),e,2)}function xv(t){var e=t.getUTCDay();return 0===e?7:e}function wv(t,e){return wm($y.count(sm(t)-1,t),e,2)}function kv(t){var e=t.getUTCDay();return e>=4||0===e?Vy(t):Vy.ceil(t)}function Tv(t,e){return t=kv(t),wm(Vy.count(sm(t),t)+(4===sm(t).getUTCDay()),e,2)}function Cv(t){return t.getUTCDay()}function Ev(t,e){return wm(qy.count(sm(t)-1,t),e,2)}function Sv(t,e){return wm(t.getUTCFullYear()%100,e,2)}function Av(t,e){return wm((t=kv(t)).getUTCFullYear()%100,e,2)}function Mv(t,e){return wm(t.getUTCFullYear()%1e4,e,4)}function Nv(t,e){var n=t.getUTCDay();return wm((t=n>=4||0===n?Vy(t):Vy.ceil(t)).getUTCFullYear()%1e4,e,4)}function Dv(){return"+0000"}function Bv(){return"%"}function Lv(t){return+t}function Ov(t){return Math.floor(+t/1e3)}function Iv(t){return dm=fm(t),pm=dm.format,gm=dm.parse,ym=dm.utcFormat,mm=dm.utcParse,dm}Iv({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var Rv=31536e6;function Fv(t){return new Date(t)}function Pv(t){return t instanceof Date?+t:+new Date(+t)}function Yv(t,e,n,r,i,o,s,c,u){var l=Cg(vg,vg),h=l.invert,f=l.domain,d=u(".%L"),p=u(":%S"),g=u("%I:%M"),y=u("%I %p"),m=u("%a %d"),v=u("%b %d"),b=u("%B"),_=u("%Y"),x=[[s,1,1e3],[s,5,5e3],[s,15,15e3],[s,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,Rv]];function w(a){return(s(a)<a?d:o(a)<a?p:i(a)<a?g:r(a)<a?y:e(a)<a?n(a)<a?m:v:t(a)<a?b:_)(a)}function k(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,s=a((function(t){return t[2]})).right(x,o);s===x.length?(i=M(n/Rv,r/Rv,e),e=t):s?(i=(s=x[o/x[s-1][2]<x[s][2]/o?s-1:s])[1],e=s[0]):(i=Math.max(M(n,r,e),1),e=c)}return null==i?e:e.every(i)}return l.invert=function(t){return new Date(h(t))},l.domain=function(t){return arguments.length?f(ug.call(t,Pv)):f().map(Fv)},l.ticks=function(t,e){var n,r=f(),i=r[0],a=r[r.length-1],o=a<i;return o&&(n=i,i=a,a=n),n=(n=k(t,i,a,e))?n.range(i,a+1):[],o?n.reverse():n},l.tickFormat=function(t,e){return null==e?w:u(e)},l.nice=function(t,e){var n=f();return(t=k(t,n[0],n[n.length-1],e))?f(Ng(n,t)):l},l.copy=function(){return kg(l,Yv(t,e,n,r,i,o,s,c,u))},l}function jv(){return og.apply(Yv(ny,ay,dy,Ay,Dy,Oy,Fy,jy,pm).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var Uv=ty((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()}));const zv=Uv;var $v=Uv.range,qv=ty((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*uy)}),(function(t,e){return(e-t)/uy}),(function(t){return t.getUTCHours()}));const Hv=qv;var Wv=qv.range,Vv=ty((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*cy)}),(function(t,e){return(e-t)/cy}),(function(t){return t.getUTCMinutes()}));const Gv=Vv;var Xv=Vv.range;function Zv(){return og.apply(Yv(sm,zv,$y,im,Hv,Gv,Fy,jy,ym).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Qv(){var t,e,n,r,i,a=0,o=1,s=vg,c=!1;function u(e){return isNaN(e=+e)?i:s(0===n?.5:(e=(r(e)-t)*n,c?Math.max(0,Math.min(1,e)):e))}return u.domain=function(i){return arguments.length?(t=r(a=+i[0]),e=r(o=+i[1]),n=t===e?0:1/(e-t),u):[a,o]},u.clamp=function(t){return arguments.length?(c=!!t,u):c},u.interpolator=function(t){return arguments.length?(s=t,u):s},u.unknown=function(t){return arguments.length?(i=t,u):i},function(i){return r=i,t=i(a),e=i(o),n=t===e?0:1/(e-t),u}}function Kv(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Jv(){var t=Sg(Qv()(vg));return t.copy=function(){return Kv(t,Jv())},sg.apply(t,arguments)}function tb(){var t=Fg(Qv()).domain([1,10]);return t.copy=function(){return Kv(t,tb()).base(t.base())},sg.apply(t,arguments)}function eb(){var t=Ug(Qv());return t.copy=function(){return Kv(t,eb()).constant(t.constant())},sg.apply(t,arguments)}function nb(){var t=Wg(Qv());return t.copy=function(){return Kv(t,nb()).exponent(t.exponent())},sg.apply(t,arguments)}function rb(){return nb.apply(null,arguments).exponent(.5)}function ib(){var t=[],e=vg;function n(n){if(!isNaN(n=+n))return e((u(t,n)-1)/(t.length-1))}return n.domain=function(e){if(!arguments.length)return t.slice();t=[];for(var r,a=0,o=e.length;a<o;++a)null==(r=e[a])||isNaN(r=+r)||t.push(r);return t.sort(i),n},n.interpolator=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return ib(e).domain(t)},sg.apply(n,arguments)}function ab(){var t,e,n,r,i,a,o,s=0,c=.5,u=1,l=vg,h=!1;function f(t){return isNaN(t=+t)?o:(t=.5+((t=+a(t))-e)*(t<e?r:i),l(h?Math.max(0,Math.min(1,t)):t))}return f.domain=function(o){return arguments.length?(t=a(s=+o[0]),e=a(c=+o[1]),n=a(u=+o[2]),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),f):[s,c,u]},f.clamp=function(t){return arguments.length?(h=!!t,f):h},f.interpolator=function(t){return arguments.length?(l=t,f):l},f.unknown=function(t){return arguments.length?(o=t,f):o},function(o){return a=o,t=o(s),e=o(c),n=o(u),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),f}}function ob(){var t=Sg(ab()(vg));return t.copy=function(){return Kv(t,ob())},sg.apply(t,arguments)}function sb(){var t=Fg(ab()).domain([.1,1,10]);return t.copy=function(){return Kv(t,sb()).base(t.base())},sg.apply(t,arguments)}function cb(){var t=Ug(ab());return t.copy=function(){return Kv(t,cb()).constant(t.constant())},sg.apply(t,arguments)}function ub(){var t=Wg(ab());return t.copy=function(){return Kv(t,ub()).exponent(t.exponent())},sg.apply(t,arguments)}function lb(){return ub.apply(null,arguments).exponent(.5)}function hb(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}const fb=hb("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),db=hb("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),pb=hb("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),gb=hb("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),yb=hb("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),mb=hb("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),vb=hb("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),bb=hb("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),_b=hb("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),xb=hb("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function wb(t){return mn(t[t.length-1])}var kb=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(hb);const Tb=wb(kb);var Cb=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(hb);const Eb=wb(Cb);var Sb=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(hb);const Ab=wb(Sb);var Mb=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(hb);const Nb=wb(Mb);var Db=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(hb);const Bb=wb(Db);var Lb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(hb);const Ob=wb(Lb);var Ib=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(hb);const Rb=wb(Ib);var Fb=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(hb);const Pb=wb(Fb);var Yb=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(hb);const jb=wb(Yb);var Ub=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(hb);const zb=wb(Ub);var $b=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(hb);const qb=wb($b);var Hb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(hb);const Wb=wb(Hb);var Vb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(hb);const Gb=wb(Vb);var Xb=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(hb);const Zb=wb(Xb);var Qb=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(hb);const Kb=wb(Qb);var Jb=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(hb);const t_=wb(Jb);var e_=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(hb);const n_=wb(e_);var r_=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(hb);const i_=wb(r_);var a_=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(hb);const o_=wb(a_);var s_=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(hb);const c_=wb(s_);var u_=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(hb);const l_=wb(u_);var h_=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(hb);const f_=wb(h_);var d_=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(hb);const p_=wb(d_);var g_=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(hb);const y_=wb(g_);var m_=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(hb);const v_=wb(m_);var b_=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(hb);const __=wb(b_);var x_=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(hb);const w_=wb(x_);function k_(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"}const T_=zp(qa(300,.5,0),qa(-240,.5,1));var C_=zp(qa(-100,.75,.35),qa(80,1.5,.8)),E_=zp(qa(260,.75,.35),qa(80,1.5,.8)),S_=qa();function A_(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return S_.h=360*t-100,S_.s=1.5-1.5*e,S_.l=.8-.9*e,S_+""}var M_=Qe(),N_=Math.PI/3,D_=2*Math.PI/3;function B_(t){var e;return t=(.5-t)*Math.PI,M_.r=255*(e=Math.sin(t))*e,M_.g=255*(e=Math.sin(t+N_))*e,M_.b=255*(e=Math.sin(t+D_))*e,M_+""}function L_(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"}function O_(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}const I_=O_(hb("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var R_=O_(hb("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),F_=O_(hb("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),P_=O_(hb("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function Y_(t){return Te(ie(t).call(document.documentElement))}var j_=0;function U_(){return new z_}function z_(){this._="@"+(++j_).toString(36)}function $_(t){return"string"==typeof t?new xe([document.querySelectorAll(t)],[document.documentElement]):new xe([null==t?[]:t],_e)}function q_(t,e){null==e&&(e=Nn().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=Dn(t,e[n]);return i}function H_(t){return function(){return t}}z_.prototype=U_.prototype={constructor:z_,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var W_=Math.abs,V_=Math.atan2,G_=Math.cos,X_=Math.max,Z_=Math.min,Q_=Math.sin,K_=Math.sqrt,J_=1e-12,tx=Math.PI,ex=tx/2,nx=2*tx;function rx(t){return t>1?0:t<-1?tx:Math.acos(t)}function ix(t){return t>=1?ex:t<=-1?-ex:Math.asin(t)}function ax(t){return t.innerRadius}function ox(t){return t.outerRadius}function sx(t){return t.startAngle}function cx(t){return t.endAngle}function ux(t){return t&&t.padAngle}function lx(t,e,n,r,i,a,o,s){var c=n-t,u=r-e,l=o-i,h=s-a,f=h*c-l*u;if(!(f*f<J_))return[t+(f=(l*(e-a)-h*(t-i))/f)*c,e+f*u]}function hx(t,e,n,r,i,a,o){var s=t-n,c=e-r,u=(o?a:-a)/K_(s*s+c*c),l=u*c,h=-u*s,f=t+l,d=e+h,p=n+l,g=r+h,y=(f+p)/2,m=(d+g)/2,v=p-f,b=g-d,_=v*v+b*b,x=i-a,w=f*g-p*d,k=(b<0?-1:1)*K_(X_(0,x*x*_-w*w)),T=(w*b-v*k)/_,C=(-w*v-b*k)/_,E=(w*b+v*k)/_,S=(-w*v+b*k)/_,A=T-y,M=C-m,N=E-y,D=S-m;return A*A+M*M>N*N+D*D&&(T=E,C=S),{cx:T,cy:C,x01:-l,y01:-h,x11:T*(i/x-1),y11:C*(i/x-1)}}function fx(){var t=ax,e=ox,n=H_(0),r=null,i=sx,a=cx,o=ux,s=null;function c(){var c,u,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-ex,d=a.apply(this,arguments)-ex,p=W_(d-f),g=d>f;if(s||(s=c=Wi()),h<l&&(u=h,h=l,l=u),h>J_)if(p>nx-J_)s.moveTo(h*G_(f),h*Q_(f)),s.arc(0,0,h,f,d,!g),l>J_&&(s.moveTo(l*G_(d),l*Q_(d)),s.arc(0,0,l,d,f,g));else{var y,m,v=f,b=d,_=f,x=d,w=p,k=p,T=o.apply(this,arguments)/2,C=T>J_&&(r?+r.apply(this,arguments):K_(l*l+h*h)),E=Z_(W_(h-l)/2,+n.apply(this,arguments)),S=E,A=E;if(C>J_){var M=ix(C/l*Q_(T)),N=ix(C/h*Q_(T));(w-=2*M)>J_?(_+=M*=g?1:-1,x-=M):(w=0,_=x=(f+d)/2),(k-=2*N)>J_?(v+=N*=g?1:-1,b-=N):(k=0,v=b=(f+d)/2)}var D=h*G_(v),B=h*Q_(v),L=l*G_(x),O=l*Q_(x);if(E>J_){var I,R=h*G_(b),F=h*Q_(b),P=l*G_(_),Y=l*Q_(_);if(p<tx&&(I=lx(D,B,P,Y,R,F,L,O))){var j=D-I[0],U=B-I[1],z=R-I[0],$=F-I[1],q=1/Q_(rx((j*z+U*$)/(K_(j*j+U*U)*K_(z*z+$*$)))/2),H=K_(I[0]*I[0]+I[1]*I[1]);S=Z_(E,(l-H)/(q-1)),A=Z_(E,(h-H)/(q+1))}}k>J_?A>J_?(y=hx(P,Y,D,B,h,A,g),m=hx(R,F,L,O,h,A,g),s.moveTo(y.cx+y.x01,y.cy+y.y01),A<E?s.arc(y.cx,y.cy,A,V_(y.y01,y.x01),V_(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,A,V_(y.y01,y.x01),V_(y.y11,y.x11),!g),s.arc(0,0,h,V_(y.cy+y.y11,y.cx+y.x11),V_(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,V_(m.y11,m.x11),V_(m.y01,m.x01),!g))):(s.moveTo(D,B),s.arc(0,0,h,v,b,!g)):s.moveTo(D,B),l>J_&&w>J_?S>J_?(y=hx(L,O,R,F,l,-S,g),m=hx(D,B,P,Y,l,-S,g),s.lineTo(y.cx+y.x01,y.cy+y.y01),S<E?s.arc(y.cx,y.cy,S,V_(y.y01,y.x01),V_(m.y01,m.x01),!g):(s.arc(y.cx,y.cy,S,V_(y.y01,y.x01),V_(y.y11,y.x11),!g),s.arc(0,0,l,V_(y.cy+y.y11,y.cx+y.x11),V_(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,S,V_(m.y11,m.x11),V_(m.y01,m.x01),!g))):s.arc(0,0,l,x,_,g):s.lineTo(L,O)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-tx/2;return[G_(r)*n,Q_(r)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:H_(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:H_(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:H_(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:H_(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:H_(+t),c):i},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:H_(+t),c):a},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:H_(+t),c):o},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c}function dx(t){this._context=t}function px(t){return new dx(t)}function gx(t){return t[0]}function yx(t){return t[1]}function mx(){var t=gx,e=yx,n=H_(!0),r=null,i=px,a=null;function o(o){var s,c,u,l=o.length,h=!1;for(null==r&&(a=i(u=Wi())),s=0;s<=l;++s)!(s<l&&n(c=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(c,s,o),+e(c,s,o));if(u)return a=null,u+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:H_(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:H_(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:H_(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}function vx(){var t=gx,e=null,n=H_(0),r=yx,i=H_(!0),a=null,o=px,s=null;function c(c){var u,l,h,f,d,p=c.length,g=!1,y=new Array(p),m=new Array(p);for(null==a&&(s=o(d=Wi())),u=0;u<=p;++u){if(!(u<p&&i(f=c[u],u,c))===g)if(g=!g)l=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=u-1;h>=l;--h)s.point(y[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(y[u]=+t(f,u,c),m[u]=+n(f,u,c),s.point(e?+e(f,u,c):y[u],r?+r(f,u,c):m[u]))}if(d)return s=null,d+""||null}function u(){return mx().defined(i).curve(o).context(a)}return c.x=function(n){return arguments.length?(t="function"==typeof n?n:H_(+n),e=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:H_(+e),c):t},c.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:H_(+t),c):e},c.y=function(t){return arguments.length?(n="function"==typeof t?t:H_(+t),r=null,c):n},c.y0=function(t){return arguments.length?(n="function"==typeof t?t:H_(+t),c):n},c.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:H_(+t),c):r},c.lineX0=c.lineY0=function(){return u().x(t).y(n)},c.lineY1=function(){return u().x(t).y(r)},c.lineX1=function(){return u().x(e).y(n)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:H_(!!t),c):i},c.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),c):a},c}function bx(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function _x(t){return t}function xx(){var t=_x,e=bx,n=null,r=H_(0),i=H_(nx),a=H_(0);function o(o){var s,c,u,l,h,f=o.length,d=0,p=new Array(f),g=new Array(f),y=+r.apply(this,arguments),m=Math.min(nx,Math.max(-nx,i.apply(this,arguments)-y)),v=Math.min(Math.abs(m)/f,a.apply(this,arguments)),b=v*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(o[s],s,o))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),s=0,u=d?(m-f*b)/d:0;s<f;++s,y=l)c=p[s],l=y+((h=g[c])>0?h*u:0)+b,g[c]={data:o[c],index:s,value:h,startAngle:y,endAngle:l,padAngle:v};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:H_(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:H_(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:H_(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:H_(+t),o):a},o}dx.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var wx=Tx(px);function kx(t){this._curve=t}function Tx(t){function e(e){return new kx(t(e))}return e._curve=t,e}function Cx(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(Tx(t)):e()._curve},t}function Ex(){return Cx(mx().curve(wx))}function Sx(){var t=vx().curve(wx),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,a=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Cx(n())},delete t.lineX0,t.lineEndAngle=function(){return Cx(r())},delete t.lineX1,t.lineInnerRadius=function(){return Cx(i())},delete t.lineY0,t.lineOuterRadius=function(){return Cx(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(Tx(t)):e()._curve},t}function Ax(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}kx.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var Mx=Array.prototype.slice;function Nx(t){return t.source}function Dx(t){return t.target}function Bx(t){var e=Nx,n=Dx,r=gx,i=yx,a=null;function o(){var o,s=Mx.call(arguments),c=e.apply(this,s),u=n.apply(this,s);if(a||(a=o=Wi()),t(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=u,s)),+i.apply(this,s)),o)return a=null,o+""||null}return o.source=function(t){return arguments.length?(e=t,o):e},o.target=function(t){return arguments.length?(n=t,o):n},o.x=function(t){return arguments.length?(r="function"==typeof t?t:H_(+t),o):r},o.y=function(t){return arguments.length?(i="function"==typeof t?t:H_(+t),o):i},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}function Lx(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function Ox(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function Ix(t,e,n,r,i){var a=Ax(e,n),o=Ax(e,n=(n+i)/2),s=Ax(r,n),c=Ax(r,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],c[0],c[1])}function Rx(){return Bx(Lx)}function Fx(){return Bx(Ox)}function Px(){var t=Bx(Ix);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const Yx={draw:function(t,e){var n=Math.sqrt(e/tx);t.moveTo(n,0),t.arc(0,0,n,0,nx)}},jx={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}};var Ux=Math.sqrt(1/3),zx=2*Ux;const $x={draw:function(t,e){var n=Math.sqrt(e/zx),r=n*Ux;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}};var qx=Math.sin(tx/10)/Math.sin(7*tx/10),Hx=Math.sin(nx/10)*qx,Wx=-Math.cos(nx/10)*qx;const Vx={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=Hx*n,i=Wx*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=nx*a/5,s=Math.cos(o),c=Math.sin(o);t.lineTo(c*n,-s*n),t.lineTo(s*r-c*i,c*r+s*i)}t.closePath()}},Gx={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}};var Xx=Math.sqrt(3);const Zx={draw:function(t,e){var n=-Math.sqrt(e/(3*Xx));t.moveTo(0,2*n),t.lineTo(-Xx*n,-n),t.lineTo(Xx*n,-n),t.closePath()}};var Qx=-.5,Kx=Math.sqrt(3)/2,Jx=1/Math.sqrt(12),tw=3*(Jx/2+1);const ew={draw:function(t,e){var n=Math.sqrt(e/tw),r=n/2,i=n*Jx,a=r,o=n*Jx+n,s=-a,c=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,c),t.lineTo(Qx*r-Kx*i,Kx*r+Qx*i),t.lineTo(Qx*a-Kx*o,Kx*a+Qx*o),t.lineTo(Qx*s-Kx*c,Kx*s+Qx*c),t.lineTo(Qx*r+Kx*i,Qx*i-Kx*r),t.lineTo(Qx*a+Kx*o,Qx*o-Kx*a),t.lineTo(Qx*s+Kx*c,Qx*c-Kx*s),t.closePath()}};var nw=[Yx,jx,$x,Gx,Vx,Zx,ew];function rw(){var t=H_(Yx),e=H_(64),n=null;function r(){var r;if(n||(n=r=Wi()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:H_(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:H_(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r}function iw(){}function aw(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function ow(t){this._context=t}function sw(t){return new ow(t)}function cw(t){this._context=t}function uw(t){return new cw(t)}function lw(t){this._context=t}function hw(t){return new lw(t)}function fw(t,e){this._basis=new ow(t),this._beta=e}ow.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:aw(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:aw(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},cw.prototype={areaStart:iw,areaEnd:iw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:aw(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},lw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:aw(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},fw.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,s=e[n]-a,c=-1;++c<=n;)r=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*e[c]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const dw=function t(e){function n(t){return 1===e?new ow(t):new fw(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function pw(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function gw(t,e){this._context=t,this._k=(1-e)/6}gw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:pw(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:pw(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const yw=function t(e){function n(t){return new gw(t,e)}return n.tension=function(e){return t(+e)},n}(0);function mw(t,e){this._context=t,this._k=(1-e)/6}mw.prototype={areaStart:iw,areaEnd:iw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:pw(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const vw=function t(e){function n(t){return new mw(t,e)}return n.tension=function(e){return t(+e)},n}(0);function bw(t,e){this._context=t,this._k=(1-e)/6}bw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:pw(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const _w=function t(e){function n(t){return new bw(t,e)}return n.tension=function(e){return t(+e)},n}(0);function xw(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>J_){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>J_){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function ww(t,e){this._context=t,this._alpha=e}ww.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:xw(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const kw=function t(e){function n(t){return e?new ww(t,e):new gw(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Tw(t,e){this._context=t,this._alpha=e}Tw.prototype={areaStart:iw,areaEnd:iw,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:xw(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Cw=function t(e){function n(t){return e?new Tw(t,e):new mw(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ew(t,e){this._context=t,this._alpha=e}Ew.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:xw(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Sw=function t(e){function n(t){return e?new Ew(t,e):new bw(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Aw(t){this._context=t}function Mw(t){return new Aw(t)}function Nw(t){return t<0?-1:1}function Dw(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Nw(a)+Nw(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Bw(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Lw(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function Ow(t){this._context=t}function Iw(t){this._context=new Rw(t)}function Rw(t){this._context=t}function Fw(t){return new Ow(t)}function Pw(t){return new Iw(t)}function Yw(t){this._context=t}function jw(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function Uw(t){return new Yw(t)}function zw(t,e){this._context=t,this._t=e}function $w(t){return new zw(t,.5)}function qw(t){return new zw(t,0)}function Hw(t){return new zw(t,1)}function Ww(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a<i;++a)for(r=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Vw(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Gw(t,e){return t[e]}function Xw(){var t=H_([]),e=Vw,n=Ww,r=Gw;function i(i){var a,o,s=t.apply(this,arguments),c=i.length,u=s.length,l=new Array(u);for(a=0;a<u;++a){for(var h,f=s[a],d=l[a]=new Array(c),p=0;p<c;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.key=f}for(a=0,o=e(l);a<u;++a)l[o[a]].index=a;return n(l,o),l}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:H_(Mx.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:H_(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?Vw:"function"==typeof t?t:H_(Mx.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?Ww:t,i):n},i}function Zw(t,e){if((r=t.length)>0){for(var n,r,i,a=0,o=t[0].length;a<o;++a){for(i=n=0;n<r;++n)i+=t[n][a][1]||0;if(i)for(n=0;n<r;++n)t[n][a][1]/=i}Ww(t,e)}}function Qw(t,e){if((s=t.length)>0)for(var n,r,i,a,o,s,c=0,u=t[e[0]].length;c<u;++c)for(a=o=0,n=0;n<s;++n)(i=(r=t[e[n]][c])[1]-r[0])>0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)}function Kw(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],a=i.length;r<a;++r){for(var o=0,s=0;o<n;++o)s+=t[o][r][1]||0;i[r][1]+=i[r][0]=-s/2}Ww(t,e)}}function Jw(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,a=0,o=1;o<r;++o){for(var s=0,c=0,u=0;s<i;++s){for(var l=t[e[s]],h=l[o][1]||0,f=(h-(l[o-1][1]||0))/2,d=0;d<s;++d){var p=t[e[d]];f+=(p[o][1]||0)-(p[o-1][1]||0)}c+=h,u+=f*h}n[o-1][1]+=n[o-1][0]=a,c&&(a-=u/c)}n[o-1][1]+=n[o-1][0]=a,Ww(t,e)}}function tk(t){var e=t.map(ek);return Vw(t).sort((function(t,n){return e[t]-e[n]}))}function ek(t){for(var e,n=-1,r=0,i=t.length,a=-1/0;++n<i;)(e=+t[n][1])>a&&(a=e,r=n);return r}function nk(t){var e=t.map(rk);return Vw(t).sort((function(t,n){return e[t]-e[n]}))}function rk(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}function ik(t){return nk(t).reverse()}function ak(t){var e,n,r=t.length,i=t.map(rk),a=tk(t),o=0,s=0,c=[],u=[];for(e=0;e<r;++e)n=a[e],o<s?(o+=i[n],c.push(n)):(s+=i[n],u.push(n));return u.reverse().concat(c)}function ok(t){return Vw(t).reverse()}Aw.prototype={areaStart:iw,areaEnd:iw,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}},Ow.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Lw(this,this._t0,Bw(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Lw(this,Bw(this,n=Dw(this,t,e)),n);break;default:Lw(this,this._t0,n=Dw(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Iw.prototype=Object.create(Ow.prototype)).point=function(t,e){Ow.prototype.point.call(this,e,t)},Rw.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},Yw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=jw(t),i=jw(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},zw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var sk="%Y-%m-%dT%H:%M:%S.%LZ",ck=Date.prototype.toISOString?function(t){return t.toISOString()}:ym(sk);const uk=ck;var lk=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:mm(sk);const hk=lk;function fk(t,e,n){var r=new Wn,i=e;return null==e?(r.restart(t,e,n),r):(e=+e,n=null==n?qn():+n,r.restart((function a(o){o+=i,r.restart(a,i+=e,n),t(o)}),e,n),r)}function dk(t){return function(){return t}}function pk(t){return t[0]}function gk(t){return t[1]}function yk(){this._=null}function mk(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function vk(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function bk(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function _k(t){for(;t.L;)t=t.L;return t}yk.prototype={constructor:yk,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=_k(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(vk(this,n),n=(t=n).U),n.C=!1,r.C=!0,bk(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(bk(this,n),n=(t=n).U),n.C=!1,r.C=!0,vk(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,a=t.L,o=t.R;if(n=a?o?_k(o):a:o,i?i.L===t?i.L=n:i.R=n:this._=n,a&&o?(r=n.C,n.C=t.C,n.L=a,a.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,vk(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,bk(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,vk(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,bk(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,vk(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,bk(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};const xk=yk;function wk(t,e,n,r){var i=[null,null],a=Wk.push(i)-1;return i.left=t,i.right=e,n&&Tk(i,t,e,n),r&&Tk(i,e,t,r),qk[t.index].halfedges.push(a),qk[e.index].halfedges.push(a),i}function kk(t,e,n){var r=[e,n];return r.left=t,r}function Tk(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function Ck(t,e,n,r,i){var a,o=t[0],s=t[1],c=o[0],u=o[1],l=0,h=1,f=s[0]-c,d=s[1]-u;if(a=e-c,f||!(a>0)){if(a/=f,f<0){if(a<l)return;a<h&&(h=a)}else if(f>0){if(a>h)return;a>l&&(l=a)}if(a=r-c,f||!(a<0)){if(a/=f,f<0){if(a>h)return;a>l&&(l=a)}else if(f>0){if(a<l)return;a<h&&(h=a)}if(a=n-u,d||!(a>0)){if(a/=d,d<0){if(a<l)return;a<h&&(h=a)}else if(d>0){if(a>h)return;a>l&&(l=a)}if(a=i-u,d||!(a<0)){if(a/=d,d<0){if(a>h)return;a>l&&(l=a)}else if(d>0){if(a<l)return;a<h&&(h=a)}return!(l>0||h<1)||(l>0&&(t[0]=[c+l*f,u+l*d]),h<1&&(t[1]=[c+h*f,u+h*d]),!0)}}}}}function Ek(t,e,n,r,i){var a=t[1];if(a)return!0;var o,s,c=t[0],u=t.left,l=t.right,h=u[0],f=u[1],d=l[0],p=l[1],g=(h+d)/2,y=(f+p)/2;if(p===f){if(g<e||g>=r)return;if(h>d){if(c){if(c[1]>=i)return}else c=[g,n];a=[g,i]}else{if(c){if(c[1]<n)return}else c=[g,i];a=[g,n]}}else if(s=y-(o=(h-d)/(p-f))*g,o<-1||o>1)if(h>d){if(c){if(c[1]>=i)return}else c=[(n-s)/o,n];a=[(i-s)/o,i]}else{if(c){if(c[1]<n)return}else c=[(i-s)/o,i];a=[(n-s)/o,n]}else if(f<p){if(c){if(c[0]>=r)return}else c=[e,o*e+s];a=[r,o*r+s]}else{if(c){if(c[0]<e)return}else c=[r,o*r+s];a=[e,o*e+s]}return t[0]=c,t[1]=a,!0}function Sk(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function Ak(t,e){return e[+(e.left!==t.site)]}function Mk(t,e){return e[+(e.left===t.site)]}var Nk,Dk=[];function Bk(){mk(this),this.x=this.y=this.arc=this.site=this.cy=null}function Lk(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,a=n.site;if(r!==a){var o=i[0],s=i[1],c=r[0]-o,u=r[1]-s,l=a[0]-o,h=a[1]-s,f=2*(c*h-u*l);if(!(f>=-Gk)){var d=c*c+u*u,p=l*l+h*h,g=(h*d-u*p)/f,y=(c*p-l*d)/f,m=Dk.pop()||new Bk;m.arc=t,m.site=i,m.x=g+o,m.y=(m.cy=y+s)+Math.sqrt(g*g+y*y),t.circle=m;for(var v=null,b=Hk._;b;)if(m.y<b.y||m.y===b.y&&m.x<=b.x){if(!b.L){v=b.P;break}b=b.L}else{if(!b.R){v=b;break}b=b.R}Hk.insert(v,m),v||(Nk=m)}}}}function Ok(t){var e=t.circle;e&&(e.P||(Nk=e.N),Hk.remove(e),Dk.push(e),mk(e),t.circle=null)}var Ik=[];function Rk(){mk(this),this.edge=this.site=this.circle=null}function Fk(t){var e=Ik.pop()||new Rk;return e.site=t,e}function Pk(t){Ok(t),$k.remove(t),Ik.push(t),mk(t)}function Yk(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,s=[t];Pk(t);for(var c=a;c.circle&&Math.abs(n-c.circle.x)<Vk&&Math.abs(r-c.circle.cy)<Vk;)a=c.P,s.unshift(c),Pk(c),c=a;s.unshift(c),Ok(c);for(var u=o;u.circle&&Math.abs(n-u.circle.x)<Vk&&Math.abs(r-u.circle.cy)<Vk;)o=u.N,s.push(u),Pk(u),u=o;s.push(u),Ok(u);var l,h=s.length;for(l=1;l<h;++l)u=s[l],c=s[l-1],Tk(u.edge,c.site,u.site,i);c=s[0],(u=s[h-1]).edge=wk(c.site,u.site,null,i),Lk(c),Lk(u)}function jk(t){for(var e,n,r,i,a=t[0],o=t[1],s=$k._;s;)if((r=Uk(s,o)-a)>Vk)s=s.L;else{if(!((i=a-zk(s,o))>Vk)){r>-Vk?(e=s.P,n=s):i>-Vk?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){qk[t.index]={site:t,halfedges:[]}}(t);var c=Fk(t);if($k.insert(e,c),e||n){if(e===n)return Ok(e),n=Fk(e.site),$k.insert(c,n),c.edge=n.edge=wk(e.site,c.site),Lk(e),void Lk(n);if(n){Ok(e),Ok(n);var u=e.site,l=u[0],h=u[1],f=t[0]-l,d=t[1]-h,p=n.site,g=p[0]-l,y=p[1]-h,m=2*(f*y-d*g),v=f*f+d*d,b=g*g+y*y,_=[(y*v-d*b)/m+l,(f*b-g*v)/m+h];Tk(n.edge,u,p,_),c.edge=wk(u,t,null,_),n.edge=wk(t,p,null,_),Lk(e),Lk(n)}else c.edge=wk(e.site,c.site)}}function Uk(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var s=(n=o.site)[0],c=n[1],u=c-e;if(!u)return s;var l=s-r,h=1/a-1/u,f=l/u;return h?(-f+Math.sqrt(f*f-2*h*(l*l/(-2*u)-c+u/2+i-a/2)))/h+r:(r+s)/2}function zk(t,e){var n=t.N;if(n)return Uk(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var $k,qk,Hk,Wk,Vk=1e-6,Gk=1e-12;function Xk(t,e,n){return(t[0]-n[0])*(e[1]-t[1])-(t[0]-e[0])*(n[1]-t[1])}function Zk(t,e){return e[1]-t[1]||e[0]-t[0]}function Qk(t,e){var n,r,i,a=t.sort(Zk).pop();for(Wk=[],qk=new Array(t.length),$k=new xk,Hk=new xk;;)if(i=Nk,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(jk(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;Yk(i.arc)}if(function(){for(var t,e,n,r,i=0,a=qk.length;i<a;++i)if((t=qk[i])&&(r=(e=t.halfedges).length)){var o=new Array(r),s=new Array(r);for(n=0;n<r;++n)o[n]=n,s[n]=Sk(t,Wk[e[n]]);for(o.sort((function(t,e){return s[e]-s[t]})),n=0;n<r;++n)s[n]=e[o[n]];for(n=0;n<r;++n)e[n]=s[n]}}(),e){var o=+e[0][0],s=+e[0][1],c=+e[1][0],u=+e[1][1];!function(t,e,n,r){for(var i,a=Wk.length;a--;)Ek(i=Wk[a],t,e,n,r)&&Ck(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>Vk||Math.abs(i[0][1]-i[1][1])>Vk)||delete Wk[a]}(o,s,c,u),function(t,e,n,r){var i,a,o,s,c,u,l,h,f,d,p,g,y=qk.length,m=!0;for(i=0;i<y;++i)if(a=qk[i]){for(o=a.site,s=(c=a.halfedges).length;s--;)Wk[c[s]]||c.splice(s,1);for(s=0,u=c.length;s<u;)p=(d=Mk(a,Wk[c[s]]))[0],g=d[1],h=(l=Ak(a,Wk[c[++s%u]]))[0],f=l[1],(Math.abs(p-h)>Vk||Math.abs(g-f)>Vk)&&(c.splice(s,0,Wk.push(kk(o,d,Math.abs(p-t)<Vk&&r-g>Vk?[t,Math.abs(h-t)<Vk?f:r]:Math.abs(g-r)<Vk&&n-p>Vk?[Math.abs(f-r)<Vk?h:n,r]:Math.abs(p-n)<Vk&&g-e>Vk?[n,Math.abs(h-n)<Vk?f:e]:Math.abs(g-e)<Vk&&p-t>Vk?[Math.abs(f-e)<Vk?h:t,e]:null))-1),++u);u&&(m=!1)}if(m){var v,b,_,x=1/0;for(i=0,m=null;i<y;++i)(a=qk[i])&&(_=(v=(o=a.site)[0]-t)*v+(b=o[1]-e)*b)<x&&(x=_,m=a);if(m){var w=[t,e],k=[t,r],T=[n,r],C=[n,e];m.halfedges.push(Wk.push(kk(o=m.site,w,k))-1,Wk.push(kk(o,k,T))-1,Wk.push(kk(o,T,C))-1,Wk.push(kk(o,C,w))-1)}}for(i=0;i<y;++i)(a=qk[i])&&(a.halfedges.length||delete qk[i])}(o,s,c,u)}this.edges=Wk,this.cells=qk,$k=Hk=Wk=qk=null}function Kk(){var t=pk,e=gk,n=null;function r(r){return new Qk(r.map((function(n,i){var a=[Math.round(t(n,i,r)/Vk)*Vk,Math.round(e(n,i,r)/Vk)*Vk];return a.index=i,a.data=n,a})),n)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(e){return arguments.length?(t="function"==typeof e?e:dk(+e),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:dk(+t),r):e},r.extent=function(t){return arguments.length?(n=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(t){return arguments.length?(n=null==t?null:[[0,0],[+t[0],+t[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r}function Jk(t){return function(){return t}}function tT(t,e,n){this.target=t,this.type=e,this.transform=n}function eT(t,e,n){this.k=t,this.x=e,this.y=n}Qk.prototype={constructor:Qk,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return Ak(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(a=(i=n.halfedges).length)for(var i,a,o,s=n.site,c=-1,u=e[i[a-1]],l=u.left===s?u.right:u.left;++c<a;)o=l,l=(u=e[i[c]]).left===s?u.right:u.left,o&&l&&r<o.index&&r<l.index&&Xk(s,o,l)<0&&t.push([s.data,o.data,l.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,a=this,o=a._found||0,s=a.cells.length;!(i=a.cells[o]);)if(++o>=s)return null;var c=t-i.site[0],u=e-i.site[1],l=c*c+u*u;do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var c=t-s[0],u=e-s[1],h=c*c+u*u;h<l&&(l=h,o=s.index)}}))}while(null!==o);return a._found=r,null==n||l<=n*n?i.site:null}},eT.prototype={constructor:eT,scale:function(t){return 1===t?this:new eT(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new eT(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var nT=new eT(1,0,0);function rT(t){for(;!t.__zoom;)if(!(t=t.parentNode))return nT;return t.__zoom}function iT(){le.stopImmediatePropagation()}function aT(){le.preventDefault(),le.stopImmediatePropagation()}function oT(){return!le.ctrlKey&&!le.button}function sT(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function cT(){return this.__zoom||nT}function uT(){return-le.deltaY*(1===le.deltaMode?.05:le.deltaMode?1:.002)}function lT(){return navigator.maxTouchPoints||"ontouchstart"in this}function hT(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function fT(){var t,e,n=oT,r=sT,i=hT,a=uT,o=lT,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,l=Bp,h=ft("start","zoom","end"),f=500,d=0;function p(t){t.property("__zoom",cT).on("wheel.zoom",x).on("mousedown.zoom",w).on("dblclick.zoom",k).filter(o).on("touchstart.zoom",T).on("touchmove.zoom",C).on("touchend.zoom touchcancel.zoom",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new eT(e,t.x,t.y)}function y(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new eT(t.k,r,i)}function m(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function v(t,e,n){t.on("start.zoom",(function(){b(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,a=b(t,i),o=r.apply(t,i),s=null==n?m(o):"function"==typeof n?n.apply(t,i):n,c=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),u=t.__zoom,h="function"==typeof e?e.apply(t,i):e,f=l(u.invert(s).concat(c/u.k),h.invert(s).concat(c/h.k));return function(t){if(1===t)t=h;else{var e=f(t),n=c/e[2];t=new eT(n,s[0]-e[0]*n,s[1]-e[1]*n)}a.zoom(null,t)}}))}function b(t,e,n){return!n&&t.__zooming||new _(t,e)}function _(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function x(){if(n.apply(this,arguments)){var t=b(this,arguments),e=this.__zoom,r=Math.max(s[0],Math.min(s[1],e.k*Math.pow(2,a.apply(this,arguments)))),o=Ln(this);if(t.wheel)t.mouse[0][0]===o[0]&&t.mouse[0][1]===o[1]||(t.mouse[1]=e.invert(t.mouse[0]=o)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[o,e.invert(o)],ar(this),t.start()}aT(),t.wheel=setTimeout(u,150),t.zoom("mouse",i(y(g(e,r),t.mouse[0],t.mouse[1]),t.extent,c))}function u(){t.wheel=null,t.end()}}function w(){if(!e&&n.apply(this,arguments)){var t=b(this,arguments,!0),r=Te(le.view).on("mousemove.zoom",u,!0).on("mouseup.zoom",l,!0),a=Ln(this),o=le.clientX,s=le.clientY;Se(le.view),iT(),t.mouse=[a,this.__zoom.invert(a)],ar(this),t.start()}function u(){if(aT(),!t.moved){var e=le.clientX-o,n=le.clientY-s;t.moved=e*e+n*n>d}t.zoom("mouse",i(y(t.that.__zoom,t.mouse[0]=Ln(t.that),t.mouse[1]),t.extent,c))}function l(){r.on("mousemove.zoom mouseup.zoom",null),Ae(le.view,t.moved),aT(),t.end()}}function k(){if(n.apply(this,arguments)){var t=this.__zoom,e=Ln(this),a=t.invert(e),o=t.k*(le.shiftKey?.5:2),s=i(y(g(t,o),e,a),r.apply(this,arguments),c);aT(),u>0?Te(this).transition().duration(u).call(v,s,e):Te(this).call(p.transform,s)}}function T(){if(n.apply(this,arguments)){var e,r,i,a,o=le.touches,s=o.length,c=b(this,arguments,le.changedTouches.length===s);for(iT(),r=0;r<s;++r)a=[a=Bn(this,o,(i=o[r]).identifier),this.__zoom.invert(a),i.identifier],c.touch0?c.touch1||c.touch0[2]===a[2]||(c.touch1=a,c.taps=0):(c.touch0=a,e=!0,c.taps=1+!!t);t&&(t=clearTimeout(t)),e&&(c.taps<2&&(t=setTimeout((function(){t=null}),f)),ar(this),c.start())}}function C(){if(this.__zooming){var e,n,r,a,o=b(this,arguments),s=le.changedTouches,u=s.length;for(aT(),t&&(t=clearTimeout(t)),o.taps=0,e=0;e<u;++e)r=Bn(this,s,(n=s[e]).identifier),o.touch0&&o.touch0[2]===n.identifier?o.touch0[0]=r:o.touch1&&o.touch1[2]===n.identifier&&(o.touch1[0]=r);if(n=o.that.__zoom,o.touch1){var l=o.touch0[0],h=o.touch0[1],f=o.touch1[0],d=o.touch1[1],p=(p=f[0]-l[0])*p+(p=f[1]-l[1])*p,m=(m=d[0]-h[0])*m+(m=d[1]-h[1])*m;n=g(n,Math.sqrt(p/m)),r=[(l[0]+f[0])/2,(l[1]+f[1])/2],a=[(h[0]+d[0])/2,(h[1]+d[1])/2]}else{if(!o.touch0)return;r=o.touch0[0],a=o.touch0[1]}o.zoom("touch",i(y(n,r,a),o.extent,c))}}function E(){if(this.__zooming){var t,n,r=b(this,arguments),i=le.changedTouches,a=i.length;for(iT(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),f),t=0;t<a;++t)n=i[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),2===r.taps){var o=Te(this).on("dblclick.zoom");o&&o.apply(this,arguments)}}}return p.transform=function(t,e,n){var r=t.selection?t.selection():t;r.property("__zoom",cT),t!==r?v(t,e,n):r.interrupt().each((function(){b(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},p.scaleBy=function(t,e,n){p.scaleTo(t,(function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n}),n)},p.scaleTo=function(t,e,n){p.transform(t,(function(){var t=r.apply(this,arguments),a=this.__zoom,o=null==n?m(t):"function"==typeof n?n.apply(this,arguments):n,s=a.invert(o),u="function"==typeof e?e.apply(this,arguments):e;return i(y(g(a,u),o,s),t,c)}),n)},p.translateBy=function(t,e,n){p.transform(t,(function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),c)}))},p.translateTo=function(t,e,n,a){p.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,s=null==a?m(t):"function"==typeof a?a.apply(this,arguments):a;return i(nT.translate(s[0],s[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)}),a)},_.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){ye(new tT(p,t,this.that.__zoom),h.apply,h,[t,this.that,this.args])}},p.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:Jk(+t),p):a},p.filter=function(t){return arguments.length?(n="function"==typeof t?t:Jk(!!t),p):n},p.touchable=function(t){return arguments.length?(o="function"==typeof t?t:Jk(!!t),p):o},p.extent=function(t){return arguments.length?(r="function"==typeof t?t:Jk([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),p):r},p.scaleExtent=function(t){return arguments.length?(s[0]=+t[0],s[1]=+t[1],p):[s[0],s[1]]},p.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],p):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},p.constrain=function(t){return arguments.length?(i=t,p):i},p.duration=function(t){return arguments.length?(u=+t,p):u},p.interpolate=function(t){return arguments.length?(l=t,p):l},p.on=function(){var t=h.on.apply(h,arguments);return t===h?p:t},p.clickDistance=function(t){return arguments.length?(d=(t=+t)*t,p):Math.sqrt(d)},p}rT.prototype=eT.prototype},681:(t,e,n)=>{t.exports={graphlib:n(574),layout:n(8123),debug:n(7570),util:{time:n(1138).time,notime:n(1138).notime},version:n(8177)}},2188:(t,e,n)=>{"use strict";var r=n(8436),i=n(4079);t.exports={run:function(t){var e="greedy"===t.graph().acyclicer?i(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},i={};return r.forEach(t.nodes(),(function a(o){r.has(i,o)||(i[o]=!0,n[o]=!0,r.forEach(t.outEdges(o),(function(t){r.has(n,t.w)?e.push(t):a(t.w)})),delete n[o])})),e}(t);r.forEach(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.uniqueId("rev"))}))},undo:function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}}},1133:(t,e,n)=>{var r=n(8436),i=n(1138);function a(t,e,n,r,a,o){var s={width:0,height:0,rank:o,borderType:e},c=a[e][o-1],u=i.addDummyNode(t,"border",s,n);a[e][o]=u,t.setParent(u,r),c&&t.setEdge(c,u,{weight:1})}t.exports=function(t){r.forEach(t.children(),(function e(n){var i=t.children(n),o=t.node(n);if(i.length&&r.forEach(i,e),r.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var s=o.minRank,c=o.maxRank+1;s<c;++s)a(t,"borderLeft","_bl",n,o,s),a(t,"borderRight","_br",n,o,s)}}))}},3258:(t,e,n)=>{"use strict";var r=n(8436);function i(t){r.forEach(t.nodes(),(function(e){a(t.node(e))})),r.forEach(t.edges(),(function(e){a(t.edge(e))}))}function a(t){var e=t.width;t.width=t.height,t.height=e}function o(t){t.y=-t.y}function s(t){var e=t.x;t.x=t.y,t.y=e}t.exports={adjust:function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||i(t)},undo:function(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){r.forEach(t.nodes(),(function(e){o(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,o),r.has(n,"y")&&o(n)}))}(t),"lr"!==e&&"rl"!==e||(function(t){r.forEach(t.nodes(),(function(e){s(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,s),r.has(n,"x")&&s(n)}))}(t),i(t))}}},7822:t=>{function e(){var t={};t._next=t._prev=t,this._sentinel=t}function n(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function r(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=e,e.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return n(e),e},e.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&n(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},e.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,r)),n=n._prev;return"["+t.join(", ")+"]"}},7570:(t,e,n)=>{var r=n(8436),i=n(1138),a=n(574).Graph;t.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),(function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),r.forEach(t.edges(),(function(t){n.setEdge(t.v,t.w,{},t.name)})),r.forEach(e,(function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,(function(t,e){return n.setEdge(t,e,{style:"invis"}),e}))})),n}}},574:(t,e,n)=>{var r;try{r=n(8282)}catch(t){}r||(r=window.graphlib),t.exports=r},4079:(t,e,n)=>{var r=n(8436),i=n(574).Graph,a=n(7822);t.exports=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new i,o=0,s=0;r.forEach(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),r.forEach(t.edges(),(function(t){var r=n.edge(t.v,t.w)||0,i=e(t),a=r+i;n.setEdge(t.v,t.w,a),s=Math.max(s,n.node(t.v).out+=i),o=Math.max(o,n.node(t.w).in+=i)}));var u=r.range(s+o+3).map((function(){return new a})),l=o+1;return r.forEach(n.nodes(),(function(t){c(u,l,n.node(t))})),{graph:n,buckets:u,zeroIdx:l}}(t,e||o),u=function(t,e,n){for(var r,i=[],a=e[e.length-1],o=e[0];t.nodeCount();){for(;r=o.dequeue();)s(t,e,n,r);for(;r=a.dequeue();)s(t,e,n,r);if(t.nodeCount())for(var c=e.length-2;c>0;--c)if(r=e[c].dequeue()){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(u,(function(e){return t.outEdges(e.v,e.w)})),!0)};var o=r.constant(1);function s(t,e,n,i,a){var o=a?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),s=t.node(r.v);a&&o.push({v:r.v,w:r.w}),s.out-=i,c(e,n,s)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),a=r.w,o=t.node(a);o.in-=i,c(e,n,o)})),t.removeNode(i.v),o}function c(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},8123:(t,e,n)=>{"use strict";var r=n(8436),i=n(2188),a=n(5995),o=n(8093),s=n(1138).normalizeRanks,c=n(4219),u=n(1138).removeEmptyRanks,l=n(2981),h=n(1133),f=n(3258),d=n(3408),p=n(7873),g=n(1138),y=n(574).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?g.time:g.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new y({multigraph:!0,compound:!0}),n=E(t.graph());return e.setGraph(r.merge({},v,C(n,m),r.pick(n,b))),r.forEach(t.nodes(),(function(n){var i=E(t.node(n));e.setNode(n,r.defaults(C(i,_),x)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=E(t.edge(n));e.setEdge(n,r.merge({},k,C(i,w),r.pick(i,T)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){i.run(t)})),e(" nestingGraph.run",(function(){l.run(t)})),e(" rank",(function(){o(g.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e};g.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){u(t)})),e(" nestingGraph.cleanup",(function(){l.cleanup(t)})),e(" normalizeRanks",(function(){s(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){a.run(t)})),e(" parentDummyChains",(function(){c(t)})),e(" addBorderSegments",(function(){h(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=g.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var a=t.node(e);a.order=i+n,r.forEach(a.selfEdges,(function(e){g.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:a.rank,order:i+ ++n,e:e.e,label:e.label},"_se")})),delete a.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){f.adjust(t)})),e(" position",(function(){p(t)})),e(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),a=t.node(n.borderBottom),o=t.node(r.last(n.borderLeft)),s=t.node(r.last(n.borderRight));n.width=Math.abs(s.x-o.x),n.height=Math.abs(a.y-i.y),n.x=o.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){a.undo(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){f.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),s=o.marginx||0,c=o.marginy||0;function u(t){var r=t.x,o=t.y,s=t.width,c=t.height;e=Math.min(e,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}r.forEach(t.nodes(),(function(e){u(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&u(n)})),e-=s,i-=c,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i})),r.forEach(t.edges(),(function(n){var a=t.edge(n);r.forEach(a.points,(function(t){t.x-=e,t.y-=i})),r.has(a,"x")&&(a.x-=e),r.has(a,"y")&&(a.y-=i)})),o.width=n-e+s,o.height=a-i+c}(t)})),e(" assignNodeIntersects",(function(){!function(t){r.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=a),i.points.unshift(g.intersectRect(a,n)),i.points.push(g.intersectRect(o,r))}))}(t)})),e(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){i.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(t.edges(),(function(n){var i=t.edge(n),a=e.edge(n);i.points=a.points,r.has(a,"x")&&(i.x=a.x,i.y=a.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};var m=["nodesep","edgesep","ranksep","marginx","marginy"],v={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],_=["width","height"],x={width:0,height:0},w=["minlen","weight","width","height","labeloffset"],k={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},T=["labelpos"];function C(t,e){return r.mapValues(r.pick(t,e),Number)}function E(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},8436:(t,e,n)=>{var r;try{r={cloneDeep:n(361),constant:n(5703),defaults:n(1747),each:n(6073),filter:n(3105),find:n(3311),flatten:n(5564),forEach:n(4486),forIn:n(2620),has:n(8721),isUndefined:n(2353),last:n(928),map:n(5161),mapValues:n(6604),max:n(6162),merge:n(3857),min:n(3632),minBy:n(2762),now:n(7771),pick:n(9722),range:n(6026),reduce:n(4061),sortBy:n(9734),uniqueId:n(3955),values:n(2628),zipObject:n(7287)}}catch(t){}r||(r=window._),t.exports=r},2981:(t,e,n)=>{var r=n(8436),i=n(1138);function a(t,e,n,o,s,c,u){var l=t.children(u);if(l.length){var h=i.addBorderNode(t,"_bt"),f=i.addBorderNode(t,"_bb"),d=t.node(u);t.setParent(h,u),d.borderTop=h,t.setParent(f,u),d.borderBottom=f,r.forEach(l,(function(r){a(t,e,n,o,s,c,r);var i=t.node(r),l=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,p=i.borderTop?o:2*o,g=l!==d?1:s-c[u]+1;t.setEdge(h,l,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,f,{weight:p,minlen:g,nestingEdge:!0})})),t.parent(u)||t.setEdge(e,h,{weight:0,minlen:s+c[u]})}else u!==e&&t.setEdge(e,u,{weight:0,minlen:n})}t.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};function n(i,a){var o=t.children(i);o&&o.length&&r.forEach(o,(function(t){n(t,a+1)})),e[i]=a}return r.forEach(t.children(),(function(t){n(t,1)})),e}(t),o=r.max(r.values(n))-1,s=2*o+1;t.graph().nestingRoot=e,r.forEach(t.edges(),(function(e){t.edge(e).minlen*=s}));var c=function(t){return r.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;r.forEach(t.children(),(function(r){a(t,e,s,c,o,n,r)})),t.graph().nodeRankFactor=s},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},5995:(t,e,n)=>{"use strict";var r=n(8436),i=n(1138);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,a,o=e.v,s=t.node(o).rank,c=e.w,u=t.node(c).rank,l=e.name,h=t.edge(e),f=h.labelRank;if(u!==s+1){for(t.removeEdge(e),a=0,++s;s<u;++a,++s)h.points=[],r={width:0,height:0,edgeLabel:h,edgeObj:e,rank:s},n=i.addDummyNode(t,"edge",r,"_d"),s===f&&(r.width=h.width,r.height=h.height,r.dummy="edge-label",r.labelpos=h.labelpos),t.setEdge(o,n,{weight:h.weight},l),0===a&&t.graph().dummyChains.push(n),o=n;t.setEdge(o,c,{weight:h.weight},l)}}(t,e)}))},undo:function(t){r.forEach(t.graph().dummyChains,(function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}}},5093:(t,e,n)=>{var r=n(8436);t.exports=function(t,e,n){var i,a={};r.forEach(n,(function(n){for(var r,o,s=t.parent(n);s;){if((r=t.parent(s))?(o=a[r],a[r]=s):(o=i,i=s),o&&o!==s)return void e.setEdge(o,s);s=r}}))}},5439:(t,e,n)=>{var r=n(8436);t.exports=function(t,e){return r.map(e,(function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,(function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}}))}},3128:(t,e,n)=>{var r=n(8436),i=n(574).Graph;t.exports=function(t,e,n){var a=function(t){for(var e;t.hasNode(e=r.uniqueId("_root")););return e}(t),o=new i({compound:!0}).setGraph({root:a}).setDefaultNodeLabel((function(e){return t.node(e)}));return r.forEach(t.nodes(),(function(i){var s=t.node(i),c=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(o.setNode(i),o.setParent(i,c||a),r.forEach(t[n](i),(function(e){var n=e.v===i?e.w:e.v,a=o.edge(n,i),s=r.isUndefined(a)?0:a.weight;o.setEdge(n,i,{weight:t.edge(e).weight+s})})),r.has(s,"minRank")&&o.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))})),o}},6630:(t,e,n)=>{"use strict";var r=n(8436);function i(t,e,n){for(var i=r.zipObject(n,r.map(n,(function(t,e){return e}))),a=r.flatten(r.map(e,(function(e){return r.sortBy(r.map(t.outEdges(e),(function(e){return{pos:i[e.w],weight:t.edge(e).weight}})),"pos")})),!0),o=1;o<n.length;)o<<=1;var s=2*o-1;o-=1;var c=r.map(new Array(s),(function(){return 0})),u=0;return r.forEach(a.forEach((function(t){var e=t.pos+o;c[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=c[e+1]),c[e=e-1>>1]+=t.weight;u+=t.weight*n}))),u}t.exports=function(t,e){for(var n=0,r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n}},3408:(t,e,n)=>{"use strict";var r=n(8436),i=n(2588),a=n(6630),o=n(1026),s=n(3128),c=n(5093),u=n(574).Graph,l=n(1138);function h(t,e,n){return r.map(e,(function(e){return s(t,e,n)}))}function f(t,e){var n=new u;r.forEach(t,(function(t){var i=t.graph().root,a=o(t,i,n,e);r.forEach(a.vs,(function(e,n){t.node(e).order=n})),c(t,n,a.vs)}))}function d(t,e){r.forEach(e,(function(e){r.forEach(e,(function(e,n){t.node(e).order=n}))}))}t.exports=function(t){var e=l.maxRank(t),n=h(t,r.range(1,e+1),"inEdges"),o=h(t,r.range(e-1,-1,-1),"outEdges"),s=i(t);d(t,s);for(var c,u=Number.POSITIVE_INFINITY,p=0,g=0;g<4;++p,++g){f(p%2?n:o,p%4>=2),s=l.buildLayerMatrix(t);var y=a(t,s);y<u&&(g=0,c=r.cloneDeep(s),u=y)}d(t,c)}},2588:(t,e,n)=>{"use strict";var r=n(8436);t.exports=function(t){var e={},n=r.filter(t.nodes(),(function(e){return!t.children(e).length})),i=r.max(r.map(n,(function(e){return t.node(e).rank}))),a=r.map(r.range(i+1),(function(){return[]})),o=r.sortBy(n,(function(e){return t.node(e).rank}));return r.forEach(o,(function n(i){if(!r.has(e,i)){e[i]=!0;var o=t.node(i);a[o.rank].push(i),r.forEach(t.successors(i),n)}})),a}},9567:(t,e,n)=>{"use strict";var r=n(8436);t.exports=function(t,e){var n={};return r.forEach(t,(function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};r.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)})),r.forEach(e.edges(),(function(t){var e=n[t.v],i=n[t.w];r.isUndefined(e)||r.isUndefined(i)||(i.indegree++,e.out.push(n[t.w]))})),function(t){var e=[];function n(t){return function(e){var n,i,a,o;e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&(i=e,a=0,o=0,(n=t).weight&&(a+=n.barycenter*n.weight,o+=n.weight),i.weight&&(a+=i.barycenter*i.weight,o+=i.weight),n.vs=i.vs.concat(n.vs),n.barycenter=a/o,n.weight=o,n.i=Math.min(i.i,n.i),i.merged=!0)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var a=t.pop();e.push(a),r.forEach(a.in.reverse(),n(a)),r.forEach(a.out,i(a))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(t){return!t.indegree})))}},1026:(t,e,n)=>{var r=n(8436),i=n(5439),a=n(9567),o=n(7304);t.exports=function t(e,n,s,c){var u=e.children(n),l=e.node(n),h=l?l.borderLeft:void 0,f=l?l.borderRight:void 0,d={};h&&(u=r.filter(u,(function(t){return t!==h&&t!==f})));var p=i(e,u);r.forEach(p,(function(n){if(e.children(n.v).length){var i=t(e,n.v,s,c);d[n.v]=i,r.has(i,"barycenter")&&(a=n,o=i,r.isUndefined(a.barycenter)?(a.barycenter=o.barycenter,a.weight=o.weight):(a.barycenter=(a.barycenter*a.weight+o.barycenter*o.weight)/(a.weight+o.weight),a.weight+=o.weight))}var a,o}));var g=a(p,s);!function(t,e){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(g,d);var y=o(g,c);if(h&&(y.vs=r.flatten([h,y.vs,f],!0),e.predecessors(h).length)){var m=e.node(e.predecessors(h)[0]),v=e.node(e.predecessors(f)[0]);r.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+m.order+v.order)/(y.weight+2),y.weight+=2}return y}},7304:(t,e,n)=>{var r=n(8436),i=n(1138);function a(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){var n,o=i.partition(t,(function(t){return r.has(t,"barycenter")})),s=o.lhs,c=r.sortBy(o.rhs,(function(t){return-t.i})),u=[],l=0,h=0,f=0;s.sort((n=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:n?e.i-t.i:t.i-e.i})),f=a(u,c,f),r.forEach(s,(function(t){f+=t.vs.length,u.push(t.vs),l+=t.barycenter*t.weight,h+=t.weight,f=a(u,c,f)}));var d={vs:r.flatten(u,!0)};return h&&(d.barycenter=l/h,d.weight=h),d}},4219:(t,e,n)=>{var r=n(8436);t.exports=function(t){var e=function(t){var e={},n=0;return r.forEach(t.children(),(function i(a){var o=n;r.forEach(t.children(a),i),e[a]={low:o,lim:n++}})),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,a=function(t,e,n,r){var i,a,o=[],s=[],c=Math.min(e[n].low,e[r].low),u=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),o.push(i)}while(i&&(e[i].low>c||u>e[i].lim));for(a=i,i=r;(i=t.parent(i))!==a;)s.push(i);return{path:o.concat(s.reverse()),lca:a}}(t,e,i.v,i.w),o=a.path,s=a.lca,c=0,u=o[c],l=!0;n!==i.w;){if(r=t.node(n),l){for(;(u=o[c])!==s&&t.node(u).maxRank<r.rank;)c++;u===s&&(l=!1)}if(!l){for(;c<o.length-1&&t.node(u=o[c+1]).minRank<=r.rank;)c++;u=o[c]}t.setParent(n,u),n=t.successors(n)[0]}}))}},3573:(t,e,n)=>{"use strict";var r=n(8436),i=n(574).Graph,a=n(1138);function o(t,e){var n={};return r.reduce(e,(function(e,i){var a=0,o=0,s=e.length,u=r.last(i);return r.forEach(i,(function(e,l){var h=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),f=h?t.node(h).order:s;(h||e===u)&&(r.forEach(i.slice(o,l+1),(function(e){r.forEach(t.predecessors(e),(function(r){var i=t.node(r),o=i.order;!(o<a||f<o)||i.dummy&&t.node(e).dummy||c(n,r,e)}))})),o=l+1,a=f)})),i})),n}function s(t,e){var n={};function i(e,i,a,o,s){var u;r.forEach(r.range(i,a),(function(i){u=e[i],t.node(u).dummy&&r.forEach(t.predecessors(u),(function(e){var r=t.node(e);r.dummy&&(r.order<o||r.order>s)&&c(n,e,u)}))}))}return r.reduce(e,(function(e,n){var a,o=-1,s=0;return r.forEach(n,(function(r,c){if("border"===t.node(r).dummy){var u=t.predecessors(r);u.length&&(a=t.node(u[0]).order,i(n,s,c,o,a),s=c,o=a)}i(n,s,n.length,a,e.length)})),n})),n}function c(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function u(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function l(t,e,n,i){var a={},o={},s={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){a[t]=t,o[t]=t,s[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var c=i(t);if(c.length){c=r.sortBy(c,(function(t){return s[t]}));for(var l=(c.length-1)/2,h=Math.floor(l),f=Math.ceil(l);h<=f;++h){var d=c[h];o[t]===t&&e<s[d]&&!u(n,t,d)&&(o[d]=t,o[t]=a[t]=a[d],e=s[d])}}}))})),{root:a,align:o}}function h(t,e,n,a,o){var s={},c=function(t,e,n,a){var o=new i,s=t.graph(),c=function(t,e,n){return function(i,a,o){var s,c=i.node(a),u=i.node(o),l=0;if(l+=c.width/2,r.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=-c.width/2;break;case"r":s=c.width/2}if(s&&(l+=n?s:-s),s=0,l+=(c.dummy?e:t)/2,l+=(u.dummy?e:t)/2,l+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=u.width/2;break;case"r":s=-u.width/2}return s&&(l+=n?s:-s),s=0,l}}(s.nodesep,s.edgesep,a);return r.forEach(e,(function(e){var i;r.forEach(e,(function(e){var r=n[e];if(o.setNode(r),i){var a=n[i],s=o.edge(a,r);o.setEdge(a,r,Math.max(c(t,e,i),s||0))}i=e}))})),o}(t,e,n,o),u=o?"borderLeft":"borderRight";function l(t,e){for(var n=c.nodes(),r=n.pop(),i={};r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return l((function(t){s[t]=c.inEdges(t).reduce((function(t,e){return Math.max(t,s[e.v]+c.edge(e))}),0)}),c.predecessors.bind(c)),l((function(e){var n=c.outEdges(e).reduce((function(t,e){return Math.min(t,s[e.w]-c.edge(e))}),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(s[e]=Math.max(s[e],n))}),c.successors.bind(c)),r.forEach(a,(function(t){s[t]=s[n[t]]})),s}function f(t,e){return r.minBy(r.values(e),(function(e){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return r.forIn(e,(function(e,r){var a=function(t,e){return t.node(e).width}(t,r)/2;n=Math.max(e+a,n),i=Math.min(e-a,i)})),n-i}))}function d(t,e){var n=r.values(e),i=r.min(n),a=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(o){var s,c=n+o,u=t[c];if(u!==e){var l=r.values(u);(s="l"===o?i-r.min(l):a-r.max(l))&&(t[c]=r.mapValues(u,(function(t){return t+s})))}}))}))}function p(t,e){return r.mapValues(t.ul,(function(n,i){if(e)return t[e.toLowerCase()][i];var a=r.sortBy(r.map(t,i));return(a[1]+a[2])/2}))}t.exports={positionX:function(t){var e,n=a.buildLayerMatrix(t),i=r.merge(o(t,n),s(t,n)),c={};r.forEach(["u","d"],(function(a){e="u"===a?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(e=r.map(e,(function(t){return r.values(t).reverse()})));var o=("u"===a?t.predecessors:t.successors).bind(t),s=l(0,e,i,o),u=h(t,e,s.root,s.align,"r"===n);"r"===n&&(u=r.mapValues(u,(function(t){return-t}))),c[a+n]=u}))}));var u=f(t,c);return d(c,u),p(c,t.graph().align)},findType1Conflicts:o,findType2Conflicts:s,addConflict:c,hasConflict:u,verticalAlignment:l,horizontalCompaction:h,alignCoordinates:d,findSmallestWidthAlignment:f,balance:p}},7873:(t,e,n)=>{"use strict";var r=n(8436),i=n(1138),a=n(3573).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,a=0;r.forEach(e,(function(e){var i=r.max(r.map(e,(function(e){return t.node(e).height})));r.forEach(e,(function(e){t.node(e).y=a+i/2})),a+=i+n}))})(t=i.asNonCompoundGraph(t)),r.forEach(a(t),(function(e,n){t.node(n).x=e}))}},300:(t,e,n)=>{"use strict";var r=n(8436),i=n(574).Graph,a=n(6681).slack;function o(t,e){return r.forEach(t.nodes(),(function n(i){r.forEach(e.nodeEdges(i),(function(r){var o=r.v,s=i===o?r.w:o;t.hasNode(s)||a(e,r)||(t.setNode(s,{}),t.setEdge(i,s,{}),n(s))}))})),t.nodeCount()}function s(t,e){return r.minBy(e.edges(),(function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return a(e,n)}))}function c(t,e,n){r.forEach(t.nodes(),(function(t){e.node(t).rank+=n}))}t.exports=function(t){var e,n,r=new i({directed:!1}),u=t.nodes()[0],l=t.nodeCount();for(r.setNode(u,{});o(r,t)<l;)e=s(r,t),n=r.hasNode(e.v)?a(t,e):-a(t,e),c(r,t,n);return r}},8093:(t,e,n)=>{"use strict";var r=n(6681).longestPath,i=n(300),a=n(2472);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":default:!function(t){a(t)}(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":o(t)}};var o=r},2472:(t,e,n)=>{"use strict";var r=n(8436),i=n(300),a=n(6681).slack,o=n(6681).longestPath,s=n(574).alg.preorder,c=n(574).alg.postorder,u=n(1138).simplify;function l(t){t=u(t),o(t);var e,n=i(t);for(d(n),h(n,t);e=g(n);)m(n,t,e,y(n,t,e))}function h(t,e){var n=c(t,t.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=f(t,e,n)}(t,e,n)}))}function f(t,e,n){var i=t.node(n).parent,a=!0,o=e.edge(n,i),s=0;return o||(a=!1,o=e.edge(i,n)),s=o.weight,r.forEach(e.nodeEdges(n),(function(r){var o,c,u=r.v===n,l=u?r.w:r.v;if(l!==i){var h=u===a,f=e.edge(r).weight;if(s+=h?f:-f,o=n,c=l,t.hasEdge(o,c)){var d=t.edge(n,l).cutvalue;s+=h?-d:d}}})),s}function d(t,e){arguments.length<2&&(e=t.nodes()[0]),p(t,{},1,e)}function p(t,e,n,i,a){var o=n,s=t.node(i);return e[i]=!0,r.forEach(t.neighbors(i),(function(a){r.has(e,a)||(n=p(t,e,n,a,i))})),s.low=o,s.lim=n++,a?s.parent=a:delete s.parent,n}function g(t){return r.find(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function y(t,e,n){var i=n.v,o=n.w;e.hasEdge(i,o)||(i=n.w,o=n.v);var s=t.node(i),c=t.node(o),u=s,l=!1;s.lim>c.lim&&(u=c,l=!0);var h=r.filter(e.edges(),(function(e){return l===v(0,t.node(e.v),u)&&l!==v(0,t.node(e.w),u)}));return r.minBy(h,(function(t){return a(e,t)}))}function m(t,e,n,i){var a=n.v,o=n.w;t.removeEdge(a,o),t.setEdge(i.v,i.w,{}),d(t),h(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=s(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)}))}(t,e)}function v(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=l,l.initLowLimValues=d,l.initCutValues=h,l.calcCutValue=f,l.leaveEdge=g,l.enterEdge=y,l.exchangeEdges=m},6681:(t,e,n)=>{"use strict";var r=n(8436);t.exports={longestPath:function(t){var e={};r.forEach(t.sources(),(function n(i){var a=t.node(i);if(r.has(e,i))return a.rank;e[i]=!0;var o=r.min(r.map(t.outEdges(i),(function(e){return n(e.w)-t.edge(e).minlen})));return o!==Number.POSITIVE_INFINITY&&null!=o||(o=0),a.rank=o}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},1138:(t,e,n)=>{"use strict";var r=n(8436),i=n(574).Graph;function a(t,e,n,i){var a;do{a=r.uniqueId(i)}while(t.hasNode(a));return n.dummy=e,t.setNode(a,n),a}function o(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}t.exports={addDummyNode:a,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");return Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=u*o/s,r=u):(o<0&&(c=-c),n=c,r=c*s/o),{x:i+n,y:a+r}},buildLayerMatrix:function(t){var e=r.map(r.range(o(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),a=i.rank;r.isUndefined(a)||(e[a][i.order]=n)})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,a=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%a!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),a(t,"border",i,e)},maxRank:o,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},8177:t=>{t.exports="0.8.5"},7856:function(t){t.exports=function(){"use strict";var t=Object.hasOwnProperty,e=Object.setPrototypeOf,n=Object.isFrozen,r=Object.getPrototypeOf,i=Object.getOwnPropertyDescriptor,a=Object.freeze,o=Object.seal,s=Object.create,c="undefined"!=typeof Reflect&&Reflect,u=c.apply,l=c.construct;u||(u=function(t,e,n){return t.apply(e,n)}),a||(a=function(t){return t}),o||(o=function(t){return t}),l||(l=function(t,e){return new(Function.prototype.bind.apply(t,[null].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(e))))});var h,f=w(Array.prototype.forEach),d=w(Array.prototype.pop),p=w(Array.prototype.push),g=w(String.prototype.toLowerCase),y=w(String.prototype.match),m=w(String.prototype.replace),v=w(String.prototype.indexOf),b=w(String.prototype.trim),_=w(RegExp.prototype.test),x=(h=TypeError,function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return l(h,e)});function w(t){return function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return u(t,e,r)}}function k(t,r){e&&e(t,null);for(var i=r.length;i--;){var a=r[i];if("string"==typeof a){var o=g(a);o!==a&&(n(r)||(r[i]=o),a=o)}t[a]=!0}return t}function T(e){var n=s(null),r=void 0;for(r in e)u(t,e,[r])&&(n[r]=e[r]);return n}function C(t,e){for(;null!==t;){var n=i(t,e);if(n){if(n.get)return w(n.get);if("function"==typeof n.value)return w(n.value)}t=r(t)}return function(t){return console.warn("fallback value for",t),null}}var E=a(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),S=a(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),A=a(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),M=a(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),N=a(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),D=a(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),B=a(["#text"]),L=a(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),O=a(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),I=a(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),R=a(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),F=o(/\{\{[\s\S]*|[\s\S]*\}\}/gm),P=o(/<%[\s\S]*|[\s\S]*%>/gm),Y=o(/^data-[\-\w.\u00B7-\uFFFF]/),j=o(/^aria-[\-\w]+$/),U=o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),z=o(/^(?:\w+script|data):/i),$=o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),q=o(/^html$/i),H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function W(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var V=function(){return"undefined"==typeof window?null:window},G=function(t,e){if("object"!==(void 0===t?"undefined":H(t))||"function"!=typeof t.createPolicy)return null;var n=null,r="data-tt-policy-suffix";e.currentScript&&e.currentScript.hasAttribute(r)&&(n=e.currentScript.getAttribute(r));var i="dompurify"+(n?"#"+n:"");try{return t.createPolicy(i,{createHTML:function(t){return t}})}catch(t){return console.warn("TrustedTypes policy "+i+" could not be created."),null}};return function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:V(),n=function(e){return t(e)};if(n.version="2.3.6",n.removed=[],!e||!e.document||9!==e.document.nodeType)return n.isSupported=!1,n;var r=e.document,i=e.document,o=e.DocumentFragment,s=e.HTMLTemplateElement,c=e.Node,u=e.Element,l=e.NodeFilter,h=e.NamedNodeMap,w=void 0===h?e.NamedNodeMap||e.MozNamedAttrMap:h,X=e.HTMLFormElement,Z=e.DOMParser,Q=e.trustedTypes,K=u.prototype,J=C(K,"cloneNode"),tt=C(K,"nextSibling"),et=C(K,"childNodes"),nt=C(K,"parentNode");if("function"==typeof s){var rt=i.createElement("template");rt.content&&rt.content.ownerDocument&&(i=rt.content.ownerDocument)}var it=G(Q,r),at=it?it.createHTML(""):"",ot=i,st=ot.implementation,ct=ot.createNodeIterator,ut=ot.createDocumentFragment,lt=ot.getElementsByTagName,ht=r.importNode,ft={};try{ft=T(i).documentMode?i.documentMode:{}}catch(t){}var dt={};n.isSupported="function"==typeof nt&&st&&void 0!==st.createHTMLDocument&&9!==ft;var pt=F,gt=P,yt=Y,mt=j,vt=z,bt=$,_t=U,xt=null,wt=k({},[].concat(W(E),W(S),W(A),W(N),W(B))),kt=null,Tt=k({},[].concat(W(L),W(O),W(I),W(R))),Ct=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Et=null,St=null,At=!0,Mt=!0,Nt=!1,Dt=!1,Bt=!1,Lt=!1,Ot=!1,It=!1,Rt=!1,Ft=!1,Pt=!0,Yt=!0,jt=!1,Ut={},zt=null,$t=k({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),qt=null,Ht=k({},["audio","video","img","source","image","track"]),Wt=null,Vt=k({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Gt="http://www.w3.org/1998/Math/MathML",Xt="http://www.w3.org/2000/svg",Zt="http://www.w3.org/1999/xhtml",Qt=Zt,Kt=!1,Jt=void 0,te=["application/xhtml+xml","text/html"],ee="text/html",ne=void 0,re=null,ie=i.createElement("form"),ae=function(t){return t instanceof RegExp||t instanceof Function},oe=function(t){re&&re===t||(t&&"object"===(void 0===t?"undefined":H(t))||(t={}),t=T(t),xt="ALLOWED_TAGS"in t?k({},t.ALLOWED_TAGS):wt,kt="ALLOWED_ATTR"in t?k({},t.ALLOWED_ATTR):Tt,Wt="ADD_URI_SAFE_ATTR"in t?k(T(Vt),t.ADD_URI_SAFE_ATTR):Vt,qt="ADD_DATA_URI_TAGS"in t?k(T(Ht),t.ADD_DATA_URI_TAGS):Ht,zt="FORBID_CONTENTS"in t?k({},t.FORBID_CONTENTS):$t,Et="FORBID_TAGS"in t?k({},t.FORBID_TAGS):{},St="FORBID_ATTR"in t?k({},t.FORBID_ATTR):{},Ut="USE_PROFILES"in t&&t.USE_PROFILES,At=!1!==t.ALLOW_ARIA_ATTR,Mt=!1!==t.ALLOW_DATA_ATTR,Nt=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Dt=t.SAFE_FOR_TEMPLATES||!1,Bt=t.WHOLE_DOCUMENT||!1,It=t.RETURN_DOM||!1,Rt=t.RETURN_DOM_FRAGMENT||!1,Ft=t.RETURN_TRUSTED_TYPE||!1,Ot=t.FORCE_BODY||!1,Pt=!1!==t.SANITIZE_DOM,Yt=!1!==t.KEEP_CONTENT,jt=t.IN_PLACE||!1,_t=t.ALLOWED_URI_REGEXP||_t,Qt=t.NAMESPACE||Zt,t.CUSTOM_ELEMENT_HANDLING&&ae(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ct.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&ae(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ct.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ct.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Jt=Jt=-1===te.indexOf(t.PARSER_MEDIA_TYPE)?ee:t.PARSER_MEDIA_TYPE,ne="application/xhtml+xml"===Jt?function(t){return t}:g,Dt&&(Mt=!1),Rt&&(It=!0),Ut&&(xt=k({},[].concat(W(B))),kt=[],!0===Ut.html&&(k(xt,E),k(kt,L)),!0===Ut.svg&&(k(xt,S),k(kt,O),k(kt,R)),!0===Ut.svgFilters&&(k(xt,A),k(kt,O),k(kt,R)),!0===Ut.mathMl&&(k(xt,N),k(kt,I),k(kt,R))),t.ADD_TAGS&&(xt===wt&&(xt=T(xt)),k(xt,t.ADD_TAGS)),t.ADD_ATTR&&(kt===Tt&&(kt=T(kt)),k(kt,t.ADD_ATTR)),t.ADD_URI_SAFE_ATTR&&k(Wt,t.ADD_URI_SAFE_ATTR),t.FORBID_CONTENTS&&(zt===$t&&(zt=T(zt)),k(zt,t.FORBID_CONTENTS)),Yt&&(xt["#text"]=!0),Bt&&k(xt,["html","head","body"]),xt.table&&(k(xt,["tbody"]),delete Et.tbody),a&&a(t),re=t)},se=k({},["mi","mo","mn","ms","mtext"]),ce=k({},["foreignobject","desc","title","annotation-xml"]),ue=k({},S);k(ue,A),k(ue,M);var le=k({},N);k(le,D);var he=function(t){var e=nt(t);e&&e.tagName||(e={namespaceURI:Zt,tagName:"template"});var n=g(t.tagName),r=g(e.tagName);if(t.namespaceURI===Xt)return e.namespaceURI===Zt?"svg"===n:e.namespaceURI===Gt?"svg"===n&&("annotation-xml"===r||se[r]):Boolean(ue[n]);if(t.namespaceURI===Gt)return e.namespaceURI===Zt?"math"===n:e.namespaceURI===Xt?"math"===n&&ce[r]:Boolean(le[n]);if(t.namespaceURI===Zt){if(e.namespaceURI===Xt&&!ce[r])return!1;if(e.namespaceURI===Gt&&!se[r])return!1;var i=k({},["title","style","font","a","script"]);return!le[n]&&(i[n]||!ue[n])}return!1},fe=function(t){p(n.removed,{element:t});try{t.parentNode.removeChild(t)}catch(e){try{t.outerHTML=at}catch(e){t.remove()}}},de=function(t,e){try{p(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch(t){p(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t&&!kt[t])if(It||Rt)try{fe(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},pe=function(t){var e=void 0,n=void 0;if(Ot)t="<remove></remove>"+t;else{var r=y(t,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===Jt&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");var a=it?it.createHTML(t):t;if(Qt===Zt)try{e=(new Z).parseFromString(a,Jt)}catch(t){}if(!e||!e.documentElement){e=st.createDocument(Qt,"template",null);try{e.documentElement.innerHTML=Kt?"":a}catch(t){}}var o=e.body||e.documentElement;return t&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),Qt===Zt?lt.call(e,Bt?"html":"body")[0]:Bt?e.documentElement:o},ge=function(t){return ct.call(t.ownerDocument||t,t,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},ye=function(t){return t instanceof X&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof w)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore)},me=function(t){return"object"===(void 0===c?"undefined":H(c))?t instanceof c:t&&"object"===(void 0===t?"undefined":H(t))&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},ve=function(t,e,r){dt[t]&&f(dt[t],(function(t){t.call(n,e,r,re)}))},be=function(t){var e=void 0;if(ve("beforeSanitizeElements",t,null),ye(t))return fe(t),!0;if(y(t.nodeName,/[\u0080-\uFFFF]/))return fe(t),!0;var r=ne(t.nodeName);if(ve("uponSanitizeElement",t,{tagName:r,allowedTags:xt}),!me(t.firstElementChild)&&(!me(t.content)||!me(t.content.firstElementChild))&&_(/<[/\w]/g,t.innerHTML)&&_(/<[/\w]/g,t.textContent))return fe(t),!0;if("select"===r&&_(/<template/i,t.innerHTML))return fe(t),!0;if(!xt[r]||Et[r]){if(!Et[r]&&xe(r)){if(Ct.tagNameCheck instanceof RegExp&&_(Ct.tagNameCheck,r))return!1;if(Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(r))return!1}if(Yt&&!zt[r]){var i=nt(t)||t.parentNode,a=et(t)||t.childNodes;if(a&&i)for(var o=a.length-1;o>=0;--o)i.insertBefore(J(a[o],!0),tt(t))}return fe(t),!0}return t instanceof u&&!he(t)?(fe(t),!0):"noscript"!==r&&"noembed"!==r||!_(/<\/no(script|embed)/i,t.innerHTML)?(Dt&&3===t.nodeType&&(e=t.textContent,e=m(e,pt," "),e=m(e,gt," "),t.textContent!==e&&(p(n.removed,{element:t.cloneNode()}),t.textContent=e)),ve("afterSanitizeElements",t,null),!1):(fe(t),!0)},_e=function(t,e,n){if(Pt&&("id"===e||"name"===e)&&(n in i||n in ie))return!1;if(Mt&&!St[e]&&_(yt,e));else if(At&&_(mt,e));else if(!kt[e]||St[e]){if(!(xe(t)&&(Ct.tagNameCheck instanceof RegExp&&_(Ct.tagNameCheck,t)||Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(t))&&(Ct.attributeNameCheck instanceof RegExp&&_(Ct.attributeNameCheck,e)||Ct.attributeNameCheck instanceof Function&&Ct.attributeNameCheck(e))||"is"===e&&Ct.allowCustomizedBuiltInElements&&(Ct.tagNameCheck instanceof RegExp&&_(Ct.tagNameCheck,n)||Ct.tagNameCheck instanceof Function&&Ct.tagNameCheck(n))))return!1}else if(Wt[e]);else if(_(_t,m(n,bt,"")));else if("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==v(n,"data:")||!qt[t])if(Nt&&!_(vt,m(n,bt,"")));else if(n)return!1;return!0},xe=function(t){return t.indexOf("-")>0},we=function(t){var e=void 0,r=void 0,i=void 0,a=void 0;ve("beforeSanitizeAttributes",t,null);var o=t.attributes;if(o){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:kt};for(a=o.length;a--;){var c=e=o[a],u=c.name,l=c.namespaceURI;if(r=b(e.value),i=ne(u),s.attrName=i,s.attrValue=r,s.keepAttr=!0,s.forceKeepAttr=void 0,ve("uponSanitizeAttribute",t,s),r=s.attrValue,!s.forceKeepAttr&&(de(u,t),s.keepAttr))if(_(/\/>/i,r))de(u,t);else{Dt&&(r=m(r,pt," "),r=m(r,gt," "));var h=ne(t.nodeName);if(_e(h,i,r))try{l?t.setAttributeNS(l,u,r):t.setAttribute(u,r),d(n.removed)}catch(t){}}}ve("afterSanitizeAttributes",t,null)}},ke=function t(e){var n=void 0,r=ge(e);for(ve("beforeSanitizeShadowDOM",e,null);n=r.nextNode();)ve("uponSanitizeShadowNode",n,null),be(n)||(n.content instanceof o&&t(n.content),we(n));ve("afterSanitizeShadowDOM",e,null)};return n.sanitize=function(t,i){var a=void 0,s=void 0,u=void 0,l=void 0,h=void 0;if((Kt=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!me(t)){if("function"!=typeof t.toString)throw x("toString is not a function");if("string"!=typeof(t=t.toString()))throw x("dirty is not a string, aborting")}if(!n.isSupported){if("object"===H(e.toStaticHTML)||"function"==typeof e.toStaticHTML){if("string"==typeof t)return e.toStaticHTML(t);if(me(t))return e.toStaticHTML(t.outerHTML)}return t}if(Lt||oe(i),n.removed=[],"string"==typeof t&&(jt=!1),jt){if(t.nodeName){var f=ne(t.nodeName);if(!xt[f]||Et[f])throw x("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof c)1===(s=(a=pe("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===s.nodeName||"HTML"===s.nodeName?a=s:a.appendChild(s);else{if(!It&&!Dt&&!Bt&&-1===t.indexOf("<"))return it&&Ft?it.createHTML(t):t;if(!(a=pe(t)))return It?null:Ft?at:""}a&&Ot&&fe(a.firstChild);for(var d=ge(jt?t:a);u=d.nextNode();)3===u.nodeType&&u===l||be(u)||(u.content instanceof o&&ke(u.content),we(u),l=u);if(l=null,jt)return t;if(It){if(Rt)for(h=ut.call(a.ownerDocument);a.firstChild;)h.appendChild(a.firstChild);else h=a;return kt.shadowroot&&(h=ht.call(r,h,!0)),h}var p=Bt?a.outerHTML:a.innerHTML;return Bt&&xt["!doctype"]&&a.ownerDocument&&a.ownerDocument.doctype&&a.ownerDocument.doctype.name&&_(q,a.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+a.ownerDocument.doctype.name+">\n"+p),Dt&&(p=m(p,pt," "),p=m(p,gt," ")),it&&Ft?it.createHTML(p):p},n.setConfig=function(t){oe(t),Lt=!0},n.clearConfig=function(){re=null,Lt=!1},n.isValidAttribute=function(t,e,n){re||oe({});var r=ne(t),i=ne(e);return _e(r,i,n)},n.addHook=function(t,e){"function"==typeof e&&(dt[t]=dt[t]||[],p(dt[t],e))},n.removeHook=function(t){dt[t]&&d(dt[t])},n.removeHooks=function(t){dt[t]&&(dt[t]=[])},n.removeAllHooks=function(){dt={}},n}()}()},8282:(t,e,n)=>{var r=n(2354);t.exports={Graph:r.Graph,json:n(8974),alg:n(2440),version:r.version}},2842:(t,e,n)=>{var r=n(9126);t.exports=function(t){var e,n={},i=[];function a(i){r.has(n,i)||(n[i]=!0,e.push(i),r.each(t.successors(i),a),r.each(t.predecessors(i),a))}return r.each(t.nodes(),(function(t){e=[],a(t),e.length&&i.push(e)})),i}},3984:(t,e,n)=>{var r=n(9126);function i(t,e,n,a,o,s){r.has(a,e)||(a[e]=!0,n||s.push(e),r.each(o(e),(function(e){i(t,e,n,a,o,s)})),n&&s.push(e))}t.exports=function(t,e,n){r.isArray(e)||(e=[e]);var a=(t.isDirected()?t.successors:t.neighbors).bind(t),o=[],s={};return r.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);i(t,e,"post"===n,s,a,o)})),o}},4847:(t,e,n)=>{var r=n(3763),i=n(9126);t.exports=function(t,e,n){return i.transform(t.nodes(),(function(i,a){i[a]=r(t,a,e,n)}),{})}},3763:(t,e,n)=>{var r=n(9126),i=n(9675);t.exports=function(t,e,n,r){return function(t,e,n,r){var a,o,s={},c=new i,u=function(t){var e=t.v!==a?t.v:t.w,r=s[e],i=n(t),u=o.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);u<r.distance&&(r.distance=u,r.predecessor=a,c.decrease(e,u))};for(t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;s[t]={distance:n},c.add(t,n)}));c.size()>0&&(a=c.removeMin(),(o=s[a]).distance!==Number.POSITIVE_INFINITY);)r(a).forEach(u);return s}(t,String(e),n||a,r||function(e){return t.outEdges(e)})};var a=r.constant(1)},9096:(t,e,n)=>{var r=n(9126),i=n(5023);t.exports=function(t){return r.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},8924:(t,e,n)=>{var r=n(9126);t.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,a=e(n);r[t][i]={distance:a,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var a=r[n];i.forEach((function(n){var r=a[t],i=e[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)}))}))})),r}(t,e||i,n||function(e){return t.outEdges(e)})};var i=r.constant(1)},2440:(t,e,n)=>{t.exports={components:n(2842),dijkstra:n(3763),dijkstraAll:n(4847),findCycles:n(9096),floydWarshall:n(8924),isAcyclic:n(2707),postorder:n(8828),preorder:n(2648),prim:n(514),tarjan:n(5023),topsort:n(2166)}},2707:(t,e,n)=>{var r=n(2166);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},8828:(t,e,n)=>{var r=n(3984);t.exports=function(t,e){return r(t,e,"post")}},2648:(t,e,n)=>{var r=n(3984);t.exports=function(t,e){return r(t,e,"pre")}},514:(t,e,n)=>{var r=n(9126),i=n(771),a=n(9675);t.exports=function(t,e){var n,o=new i,s={},c=new a;function u(t){var r=t.v===n?t.w:t.v,i=c.priority(r);if(void 0!==i){var a=e(t);a<i&&(s[r]=n,c.decrease(r,a))}}if(0===t.nodeCount())return o;r.each(t.nodes(),(function(t){c.add(t,Number.POSITIVE_INFINITY),o.setNode(t)})),c.decrease(t.nodes()[0],0);for(var l=!1;c.size()>0;){if(n=c.removeMin(),r.has(s,n))o.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(n).forEach(u)}return o}},5023:(t,e,n)=>{var r=n(9126);t.exports=function(t){var e=0,n=[],i={},a=[];function o(s){var c=i[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach((function(t){r.has(i,t)?i[t].onStack&&(c.lowlink=Math.min(c.lowlink,i[t].index)):(o(t),c.lowlink=Math.min(c.lowlink,i[t].lowlink))})),c.lowlink===c.index){var u,l=[];do{u=n.pop(),i[u].onStack=!1,l.push(u)}while(s!==u);a.push(l)}}return t.nodes().forEach((function(t){r.has(i,t)||o(t)})),a}},2166:(t,e,n)=>{var r=n(9126);function i(t){var e={},n={},i=[];if(r.each(t.sinks(),(function o(s){if(r.has(n,s))throw new a;r.has(e,s)||(n[s]=!0,e[s]=!0,r.each(t.predecessors(s),o),delete n[s],i.push(s))})),r.size(e)!==t.nodeCount())throw new a;return i}function a(){}t.exports=i,i.CycleException=a,a.prototype=new Error},9675:(t,e,n)=>{var r=n(9126);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,a=i.length;return n[t]=a,i.push({key:t,priority:e}),this._decrease(a),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},i.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e},i.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,i=n[t],a=n[e];n[t]=a,n[e]=i,r[a.key]=t,r[i.key]=e}},771:(t,e,n)=>{"use strict";var r=n(9126);t.exports=a;var i="\0";function a(t){this._isDirected=!r.has(t,"directed")||t.directed,this._isMultigraph=!!r.has(t,"multigraph")&&t.multigraph,this._isCompound=!!r.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function o(t,e){t[e]?t[e]++:t[e]=1}function s(t,e){--t[e]||delete t[e]}function c(t,e,n,i){var a=""+e,o=""+n;if(!t&&a>o){var s=a;a=o,o=s}return a+""+o+""+(r.isUndefined(i)?"\0":i)}function u(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function l(t,e){return c(t,e.v,e.w,e.name)}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(t){return this._label=t,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultNodeLabelFn=t,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return r.keys(this._nodes)},a.prototype.sources=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._in[e])}))},a.prototype.sinks=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._out[e])}))},a.prototype.setNodes=function(t,e){var n=arguments,i=this;return r.each(t,(function(t){n.length>1?i.setNode(t,e):i.setNode(t)})),this},a.prototype.setNode=function(t,e){return r.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=i,this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},a.prototype.node=function(t){return this._nodes[t]},a.prototype.hasNode=function(t){return r.has(this._nodes,t)},a.prototype.removeNode=function(t){var e=this;if(r.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],r.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),r.each(r.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],r.each(r.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},a.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(e))e=i;else{for(var n=e+="";!r.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},a.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},a.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==i)return e}},a.prototype.children=function(t){if(r.isUndefined(t)&&(t=i),this._isCompound){var e=this._children[t];if(e)return r.keys(e)}else{if(t===i)return this.nodes();if(this.hasNode(t))return[]}},a.prototype.predecessors=function(t){var e=this._preds[t];if(e)return r.keys(e)},a.prototype.successors=function(t){var e=this._sucs[t];if(e)return r.keys(e)},a.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return r.union(e,this.successors(t))},a.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},a.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),r.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var i={};function a(t){var r=n.parent(t);return void 0===r||e.hasNode(r)?(i[t]=r,r):r in i?i[r]:a(r)}return this._isCompound&&r.each(e.nodes(),(function(t){e.setParent(t,a(t))})),e},a.prototype.setDefaultEdgeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultEdgeLabelFn=t,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return r.values(this._edgeObjs)},a.prototype.setPath=function(t,e){var n=this,i=arguments;return r.reduce(t,(function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r})),this},a.prototype.setEdge=function(){var t,e,n,i,a=!1,s=arguments[0];"object"==typeof s&&null!==s&&"v"in s?(t=s.v,e=s.w,n=s.name,2===arguments.length&&(i=arguments[1],a=!0)):(t=s,e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],a=!0)),t=""+t,e=""+e,r.isUndefined(n)||(n=""+n);var l=c(this._isDirected,t,e,n);if(r.has(this._edgeLabels,l))return a&&(this._edgeLabels[l]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[l]=a?i:this._defaultEdgeLabelFn(t,e,n);var h=u(this._isDirected,t,e,n);return t=h.v,e=h.w,Object.freeze(h),this._edgeObjs[l]=h,o(this._preds[e],t),o(this._sucs[t],e),this._in[e][l]=h,this._out[t][l]=h,this._edgeCount++,this},a.prototype.edge=function(t,e,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return this._edgeLabels[r]},a.prototype.hasEdge=function(t,e,n){var i=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n);return r.has(this._edgeLabels,i)},a.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?l(this._isDirected,arguments[0]):c(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],s(this._preds[e],t),s(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},a.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.v===e})):i}},a.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.w===e})):i}},a.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},2354:(t,e,n)=>{t.exports={Graph:n(771),version:n(9631)}},8974:(t,e,n)=>{var r=n(9126),i=n(771);function a(t){return r.map(t.nodes(),(function(e){var n=t.node(e),i=t.parent(e),a={v:e};return r.isUndefined(n)||(a.value=n),r.isUndefined(i)||(a.parent=i),a}))}function o(t){return r.map(t.edges(),(function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:a(t),edges:o(t)};return r.isUndefined(t.graph())||(e.value=r.clone(t.graph())),e},read:function(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),r.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},9126:(t,e,n)=>{var r;try{r={clone:n(6678),constant:n(5703),each:n(6073),filter:n(3105),has:n(8721),isArray:n(1469),isEmpty:n(1609),isFunction:n(3560),isUndefined:n(2353),keys:n(3674),map:n(5161),reduce:n(4061),size:n(4238),transform:n(8718),union:n(3386),values:n(2628)}}catch(t){}r||(r=window._),t.exports=r},9631:t=>{t.exports="2.1.8"},8552:(t,e,n)=>{var r=n(852)(n(5639),"DataView");t.exports=r},1989:(t,e,n)=>{var r=n(1789),i=n(401),a=n(7667),o=n(1327),s=n(1866);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},8407:(t,e,n)=>{var r=n(7040),i=n(4125),a=n(2117),o=n(7518),s=n(4705);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},7071:(t,e,n)=>{var r=n(852)(n(5639),"Map");t.exports=r},3369:(t,e,n)=>{var r=n(4785),i=n(1285),a=n(6e3),o=n(9916),s=n(5265);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},3818:(t,e,n)=>{var r=n(852)(n(5639),"Promise");t.exports=r},8525:(t,e,n)=>{var r=n(852)(n(5639),"Set");t.exports=r},8668:(t,e,n)=>{var r=n(3369),i=n(619),a=n(2385);function o(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}o.prototype.add=o.prototype.push=i,o.prototype.has=a,t.exports=o},6384:(t,e,n)=>{var r=n(8407),i=n(7465),a=n(3779),o=n(7599),s=n(4758),c=n(4309);function u(t){var e=this.__data__=new r(t);this.size=e.size}u.prototype.clear=i,u.prototype.delete=a,u.prototype.get=o,u.prototype.has=s,u.prototype.set=c,t.exports=u},2705:(t,e,n)=>{var r=n(5639).Symbol;t.exports=r},1149:(t,e,n)=>{var r=n(5639).Uint8Array;t.exports=r},577:(t,e,n)=>{var r=n(852)(n(5639),"WeakMap");t.exports=r},6874:t=>{t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},7412:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},4963:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}},7443:(t,e,n)=>{var r=n(2118);t.exports=function(t,e){return!(null==t||!t.length)&&r(t,e,0)>-1}},1196:t=>{t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},4636:(t,e,n)=>{var r=n(2545),i=n(5694),a=n(1469),o=n(4144),s=n(5776),c=n(6719),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=a(t),l=!n&&i(t),h=!n&&!l&&o(t),f=!n&&!l&&!h&&c(t),d=n||l||h||f,p=d?r(t.length,String):[],g=p.length;for(var y in t)!e&&!u.call(t,y)||d&&("length"==y||h&&("offset"==y||"parent"==y)||f&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,g))||p.push(y);return p}},9932:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},2488:t=>{t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},2663:t=>{t.exports=function(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}},2908:t=>{t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},8983:(t,e,n)=>{var r=n(371)("length");t.exports=r},6556:(t,e,n)=>{var r=n(9465),i=n(7813);t.exports=function(t,e,n){(void 0!==n&&!i(t[e],n)||void 0===n&&!(e in t))&&r(t,e,n)}},4865:(t,e,n)=>{var r=n(9465),i=n(7813),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var o=t[e];a.call(t,e)&&i(o,n)&&(void 0!==n||e in t)||r(t,e,n)}},8470:(t,e,n)=>{var r=n(7813);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},4037:(t,e,n)=>{var r=n(8363),i=n(3674);t.exports=function(t,e){return t&&r(e,i(e),t)}},3886:(t,e,n)=>{var r=n(8363),i=n(1704);t.exports=function(t,e){return t&&r(e,i(e),t)}},9465:(t,e,n)=>{var r=n(8777);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},5990:(t,e,n)=>{var r=n(6384),i=n(7412),a=n(4865),o=n(4037),s=n(3886),c=n(4626),u=n(278),l=n(8805),h=n(1911),f=n(8234),d=n(6904),p=n(4160),g=n(3824),y=n(9148),m=n(8517),v=n(1469),b=n(4144),_=n(6688),x=n(3218),w=n(2928),k=n(3674),T=n(1704),C="[object Arguments]",E="[object Function]",S="[object Object]",A={};A[C]=A["[object Array]"]=A["[object ArrayBuffer]"]=A["[object DataView]"]=A["[object Boolean]"]=A["[object Date]"]=A["[object Float32Array]"]=A["[object Float64Array]"]=A["[object Int8Array]"]=A["[object Int16Array]"]=A["[object Int32Array]"]=A["[object Map]"]=A["[object Number]"]=A[S]=A["[object RegExp]"]=A["[object Set]"]=A["[object String]"]=A["[object Symbol]"]=A["[object Uint8Array]"]=A["[object Uint8ClampedArray]"]=A["[object Uint16Array]"]=A["[object Uint32Array]"]=!0,A["[object Error]"]=A[E]=A["[object WeakMap]"]=!1,t.exports=function t(e,n,M,N,D,B){var L,O=1&n,I=2&n,R=4&n;if(M&&(L=D?M(e,N,D,B):M(e)),void 0!==L)return L;if(!x(e))return e;var F=v(e);if(F){if(L=g(e),!O)return u(e,L)}else{var P=p(e),Y=P==E||"[object GeneratorFunction]"==P;if(b(e))return c(e,O);if(P==S||P==C||Y&&!D){if(L=I||Y?{}:m(e),!O)return I?h(e,s(L,e)):l(e,o(L,e))}else{if(!A[P])return D?e:{};L=y(e,P,O)}}B||(B=new r);var j=B.get(e);if(j)return j;B.set(e,L),w(e)?e.forEach((function(r){L.add(t(r,n,M,r,e,B))})):_(e)&&e.forEach((function(r,i){L.set(i,t(r,n,M,i,e,B))}));var U=F?void 0:(R?I?d:f:I?T:k)(e);return i(U||e,(function(r,i){U&&(r=e[i=r]),a(L,i,t(r,n,M,i,e,B))})),L}},3118:(t,e,n)=>{var r=n(3218),i=Object.create,a=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=a},9881:(t,e,n)=>{var r=n(7816),i=n(9291)(r);t.exports=i},6029:(t,e,n)=>{var r=n(3448);t.exports=function(t,e,n){for(var i=-1,a=t.length;++i<a;){var o=t[i],s=e(o);if(null!=s&&(void 0===c?s==s&&!r(s):n(s,c)))var c=s,u=o}return u}},760:(t,e,n)=>{var r=n(9881);t.exports=function(t,e){var n=[];return r(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}},1848:t=>{t.exports=function(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}},1078:(t,e,n)=>{var r=n(2488),i=n(7285);t.exports=function t(e,n,a,o,s){var c=-1,u=e.length;for(a||(a=i),s||(s=[]);++c<u;){var l=e[c];n>0&&a(l)?n>1?t(l,n-1,a,o,s):r(s,l):o||(s[s.length]=l)}return s}},8483:(t,e,n)=>{var r=n(5063)();t.exports=r},7816:(t,e,n)=>{var r=n(8483),i=n(3674);t.exports=function(t,e){return t&&r(t,e,i)}},7786:(t,e,n)=>{var r=n(1811),i=n(327);t.exports=function(t,e){for(var n=0,a=(e=r(e,t)).length;null!=t&&n<a;)t=t[i(e[n++])];return n&&n==a?t:void 0}},8866:(t,e,n)=>{var r=n(2488),i=n(1469);t.exports=function(t,e,n){var a=e(t);return i(t)?a:r(a,n(t))}},4239:(t,e,n)=>{var r=n(2705),i=n(9607),a=n(2333),o=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?i(t):a(t)}},3325:t=>{t.exports=function(t,e){return t>e}},8565:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&e.call(t,n)}},13:t=>{t.exports=function(t,e){return null!=t&&e in Object(t)}},2118:(t,e,n)=>{var r=n(1848),i=n(2722),a=n(2351);t.exports=function(t,e,n){return e==e?a(t,e,n):r(t,i,n)}},9454:(t,e,n)=>{var r=n(4239),i=n(7005);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},939:(t,e,n)=>{var r=n(2492),i=n(7005);t.exports=function t(e,n,a,o,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,a,o,t,s))}},2492:(t,e,n)=>{var r=n(6384),i=n(7114),a=n(8351),o=n(6096),s=n(4160),c=n(1469),u=n(4144),l=n(6719),h="[object Arguments]",f="[object Array]",d="[object Object]",p=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,g,y,m){var v=c(t),b=c(e),_=v?f:s(t),x=b?f:s(e),w=(_=_==h?d:_)==d,k=(x=x==h?d:x)==d,T=_==x;if(T&&u(t)){if(!u(e))return!1;v=!0,w=!1}if(T&&!w)return m||(m=new r),v||l(t)?i(t,e,n,g,y,m):a(t,e,_,n,g,y,m);if(!(1&n)){var C=w&&p.call(t,"__wrapped__"),E=k&&p.call(e,"__wrapped__");if(C||E){var S=C?t.value():t,A=E?e.value():e;return m||(m=new r),y(S,A,n,g,m)}}return!!T&&(m||(m=new r),o(t,e,n,g,y,m))}},5588:(t,e,n)=>{var r=n(4160),i=n(7005);t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},2958:(t,e,n)=>{var r=n(6384),i=n(939);t.exports=function(t,e,n,a){var o=n.length,s=o,c=!a;if(null==t)return!s;for(t=Object(t);o--;){var u=n[o];if(c&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<s;){var l=(u=n[o])[0],h=t[l],f=u[1];if(c&&u[2]){if(void 0===h&&!(l in t))return!1}else{var d=new r;if(a)var p=a(h,f,l,t,e,d);if(!(void 0===p?i(f,h,3,a,d):p))return!1}}return!0}},2722:t=>{t.exports=function(t){return t!=t}},8458:(t,e,n)=>{var r=n(3560),i=n(5346),a=n(3218),o=n(346),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,h=u.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||i(t))&&(r(t)?f:s).test(o(t))}},9221:(t,e,n)=>{var r=n(4160),i=n(7005);t.exports=function(t){return i(t)&&"[object Set]"==r(t)}},8749:(t,e,n)=>{var r=n(4239),i=n(1780),a=n(7005),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,t.exports=function(t){return a(t)&&i(t.length)&&!!o[r(t)]}},7206:(t,e,n)=>{var r=n(1573),i=n(6432),a=n(6557),o=n(1469),s=n(9601);t.exports=function(t){return"function"==typeof t?t:null==t?a:"object"==typeof t?o(t)?i(t[0],t[1]):r(t):s(t)}},280:(t,e,n)=>{var r=n(5726),i=n(6916),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}},313:(t,e,n)=>{var r=n(3218),i=n(5726),a=n(3498),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return a(t);var e=i(t),n=[];for(var s in t)("constructor"!=s||!e&&o.call(t,s))&&n.push(s);return n}},433:t=>{t.exports=function(t,e){return t<e}},9199:(t,e,n)=>{var r=n(9881),i=n(8612);t.exports=function(t,e){var n=-1,a=i(t)?Array(t.length):[];return r(t,(function(t,r,i){a[++n]=e(t,r,i)})),a}},1573:(t,e,n)=>{var r=n(2958),i=n(1499),a=n(2634);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?a(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},6432:(t,e,n)=>{var r=n(939),i=n(7361),a=n(9095),o=n(5403),s=n(9162),c=n(2634),u=n(327);t.exports=function(t,e){return o(t)&&s(e)?c(u(t),e):function(n){var o=i(n,t);return void 0===o&&o===e?a(n,t):r(e,o,3)}}},2980:(t,e,n)=>{var r=n(6384),i=n(6556),a=n(8483),o=n(9783),s=n(3218),c=n(1704),u=n(6390);t.exports=function t(e,n,l,h,f){e!==n&&a(n,(function(a,c){if(f||(f=new r),s(a))o(e,n,c,l,t,h,f);else{var d=h?h(u(e,c),a,c+"",e,n,f):void 0;void 0===d&&(d=a),i(e,c,d)}}),c)}},9783:(t,e,n)=>{var r=n(6556),i=n(4626),a=n(7133),o=n(278),s=n(8517),c=n(5694),u=n(1469),l=n(9246),h=n(4144),f=n(3560),d=n(3218),p=n(8630),g=n(6719),y=n(6390),m=n(3678);t.exports=function(t,e,n,v,b,_,x){var w=y(t,n),k=y(e,n),T=x.get(k);if(T)r(t,n,T);else{var C=_?_(w,k,n+"",t,e,x):void 0,E=void 0===C;if(E){var S=u(k),A=!S&&h(k),M=!S&&!A&&g(k);C=k,S||A||M?u(w)?C=w:l(w)?C=o(w):A?(E=!1,C=i(k,!0)):M?(E=!1,C=a(k,!0)):C=[]:p(k)||c(k)?(C=w,c(w)?C=m(w):d(w)&&!f(w)||(C=s(k))):E=!1}E&&(x.set(k,C),b(C,k,v,_,x),x.delete(k)),r(t,n,C)}}},9556:(t,e,n)=>{var r=n(9932),i=n(7786),a=n(7206),o=n(9199),s=n(1131),c=n(1717),u=n(5022),l=n(6557),h=n(1469);t.exports=function(t,e,n){e=e.length?r(e,(function(t){return h(t)?function(e){return i(e,1===t.length?t[0]:t)}:t})):[l];var f=-1;e=r(e,c(a));var d=o(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++f,value:t}}));return s(d,(function(t,e){return u(t,e,n)}))}},5970:(t,e,n)=>{var r=n(3012),i=n(9095);t.exports=function(t,e){return r(t,e,(function(e,n){return i(t,n)}))}},3012:(t,e,n)=>{var r=n(7786),i=n(611),a=n(1811);t.exports=function(t,e,n){for(var o=-1,s=e.length,c={};++o<s;){var u=e[o],l=r(t,u);n(l,u)&&i(c,a(u,t),l)}return c}},371:t=>{t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},9152:(t,e,n)=>{var r=n(7786);t.exports=function(t){return function(e){return r(e,t)}}},98:t=>{var e=Math.ceil,n=Math.max;t.exports=function(t,r,i,a){for(var o=-1,s=n(e((r-t)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=t,t+=i;return c}},107:t=>{t.exports=function(t,e,n,r,i){return i(t,(function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)})),n}},5976:(t,e,n)=>{var r=n(6557),i=n(5357),a=n(61);t.exports=function(t,e){return a(i(t,e,r),t+"")}},611:(t,e,n)=>{var r=n(4865),i=n(1811),a=n(5776),o=n(3218),s=n(327);t.exports=function(t,e,n,c){if(!o(t))return t;for(var u=-1,l=(e=i(e,t)).length,h=l-1,f=t;null!=f&&++u<l;){var d=s(e[u]),p=n;if("__proto__"===d||"constructor"===d||"prototype"===d)return t;if(u!=h){var g=f[d];void 0===(p=c?c(g,d,f):void 0)&&(p=o(g)?g:a(e[u+1])?[]:{})}r(f,d,p),f=f[d]}return t}},6560:(t,e,n)=>{var r=n(5703),i=n(8777),a=n(6557),o=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:a;t.exports=o},1131:t=>{t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},2545:t=>{t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},531:(t,e,n)=>{var r=n(2705),i=n(9932),a=n(1469),o=n(3448),s=r?r.prototype:void 0,c=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(a(e))return i(e,t)+"";if(o(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},7561:(t,e,n)=>{var r=n(7990),i=/^\s+/;t.exports=function(t){return t?t.slice(0,r(t)+1).replace(i,""):t}},1717:t=>{t.exports=function(t){return function(e){return t(e)}}},5652:(t,e,n)=>{var r=n(8668),i=n(7443),a=n(1196),o=n(4757),s=n(3593),c=n(1814);t.exports=function(t,e,n){var u=-1,l=i,h=t.length,f=!0,d=[],p=d;if(n)f=!1,l=a;else if(h>=200){var g=e?null:s(t);if(g)return c(g);f=!1,l=o,p=new r}else p=e?[]:d;t:for(;++u<h;){var y=t[u],m=e?e(y):y;if(y=n||0!==y?y:0,f&&m==m){for(var v=p.length;v--;)if(p[v]===m)continue t;e&&p.push(m),d.push(y)}else l(p,m,n)||(p!==d&&p.push(m),d.push(y))}return d}},7415:(t,e,n)=>{var r=n(9932);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},1757:t=>{t.exports=function(t,e,n){for(var r=-1,i=t.length,a=e.length,o={};++r<i;){var s=r<a?e[r]:void 0;n(o,t[r],s)}return o}},4757:t=>{t.exports=function(t,e){return t.has(e)}},4290:(t,e,n)=>{var r=n(6557);t.exports=function(t){return"function"==typeof t?t:r}},1811:(t,e,n)=>{var r=n(1469),i=n(5403),a=n(5514),o=n(9833);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:a(o(t))}},4318:(t,e,n)=>{var r=n(1149);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},4626:(t,e,n)=>{t=n.nmd(t);var r=n(5639),i=e&&!e.nodeType&&e,a=i&&t&&!t.nodeType&&t,o=a&&a.exports===i?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}},7157:(t,e,n)=>{var r=n(4318);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},3147:t=>{var e=/\w*$/;t.exports=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}},419:(t,e,n)=>{var r=n(2705),i=r?r.prototype:void 0,a=i?i.valueOf:void 0;t.exports=function(t){return a?Object(a.call(t)):{}}},7133:(t,e,n)=>{var r=n(4318);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},6393:(t,e,n)=>{var r=n(3448);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,a=t==t,o=r(t),s=void 0!==e,c=null===e,u=e==e,l=r(e);if(!c&&!l&&!o&&t>e||o&&s&&u&&!c&&!l||i&&s&&u||!n&&u||!a)return 1;if(!i&&!o&&!l&&t<e||l&&n&&a&&!i&&!o||c&&n&&a||!s&&a||!u)return-1}return 0}},5022:(t,e,n)=>{var r=n(6393);t.exports=function(t,e,n){for(var i=-1,a=t.criteria,o=e.criteria,s=a.length,c=n.length;++i<s;){var u=r(a[i],o[i]);if(u)return i>=c?u:u*("desc"==n[i]?-1:1)}return t.index-e.index}},278:t=>{t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},8363:(t,e,n)=>{var r=n(4865),i=n(9465);t.exports=function(t,e,n,a){var o=!n;n||(n={});for(var s=-1,c=e.length;++s<c;){var u=e[s],l=a?a(n[u],t[u],u,n,t):void 0;void 0===l&&(l=t[u]),o?i(n,u,l):r(n,u,l)}return n}},8805:(t,e,n)=>{var r=n(8363),i=n(9551);t.exports=function(t,e){return r(t,i(t),e)}},1911:(t,e,n)=>{var r=n(8363),i=n(1442);t.exports=function(t,e){return r(t,i(t),e)}},4429:(t,e,n)=>{var r=n(5639)["__core-js_shared__"];t.exports=r},1750:(t,e,n)=>{var r=n(5976),i=n(6612);t.exports=function(t){return r((function(e,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&i(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++r<a;){var c=n[r];c&&t(e,c,r,o)}return e}))}},9291:(t,e,n)=>{var r=n(8612);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var a=n.length,o=e?a:-1,s=Object(n);(e?o--:++o<a)&&!1!==i(s[o],o,s););return n}}},5063:t=>{t.exports=function(t){return function(e,n,r){for(var i=-1,a=Object(e),o=r(e),s=o.length;s--;){var c=o[t?s:++i];if(!1===n(a[c],c,a))break}return e}}},7740:(t,e,n)=>{var r=n(7206),i=n(8612),a=n(3674);t.exports=function(t){return function(e,n,o){var s=Object(e);if(!i(e)){var c=r(n,3);e=a(e),n=function(t){return c(s[t],t,s)}}var u=t(e,n,o);return u>-1?s[c?e[u]:u]:void 0}}},7445:(t,e,n)=>{var r=n(98),i=n(6612),a=n(8601);t.exports=function(t){return function(e,n,o){return o&&"number"!=typeof o&&i(e,n,o)&&(n=o=void 0),e=a(e),void 0===n?(n=e,e=0):n=a(n),o=void 0===o?e<n?1:-1:a(o),r(e,n,o,t)}}},3593:(t,e,n)=>{var r=n(8525),i=n(308),a=n(1814),o=r&&1/a(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=o},8777:(t,e,n)=>{var r=n(852),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},7114:(t,e,n)=>{var r=n(8668),i=n(2908),a=n(4757);t.exports=function(t,e,n,o,s,c){var u=1&n,l=t.length,h=e.length;if(l!=h&&!(u&&h>l))return!1;var f=c.get(t),d=c.get(e);if(f&&d)return f==e&&d==t;var p=-1,g=!0,y=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++p<l;){var m=t[p],v=e[p];if(o)var b=u?o(v,m,p,e,t,c):o(m,v,p,t,e,c);if(void 0!==b){if(b)continue;g=!1;break}if(y){if(!i(e,(function(t,e){if(!a(y,e)&&(m===t||s(m,t,n,o,c)))return y.push(e)}))){g=!1;break}}else if(m!==v&&!s(m,v,n,o,c)){g=!1;break}}return c.delete(t),c.delete(e),g}},8351:(t,e,n)=>{var r=n(2705),i=n(1149),a=n(7813),o=n(7114),s=n(8776),c=n(1814),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;t.exports=function(t,e,n,r,u,h,f){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!h(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var d=s;case"[object Set]":var p=1&r;if(d||(d=c),t.size!=e.size&&!p)return!1;var g=f.get(t);if(g)return g==e;r|=2,f.set(t,e);var y=o(d(t),d(e),r,u,h,f);return f.delete(t),y;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},6096:(t,e,n)=>{var r=n(8234),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,a,o,s){var c=1&n,u=r(t),l=u.length;if(l!=r(e).length&&!c)return!1;for(var h=l;h--;){var f=u[h];if(!(c?f in e:i.call(e,f)))return!1}var d=s.get(t),p=s.get(e);if(d&&p)return d==e&&p==t;var g=!0;s.set(t,e),s.set(e,t);for(var y=c;++h<l;){var m=t[f=u[h]],v=e[f];if(a)var b=c?a(v,m,f,e,t,s):a(m,v,f,t,e,s);if(!(void 0===b?m===v||o(m,v,n,a,s):b)){g=!1;break}y||(y="constructor"==f)}if(g&&!y){var _=t.constructor,x=e.constructor;_==x||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof x&&x instanceof x||(g=!1)}return s.delete(t),s.delete(e),g}},9021:(t,e,n)=>{var r=n(5564),i=n(5357),a=n(61);t.exports=function(t){return a(i(t,void 0,r),t+"")}},1957:(t,e,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;t.exports=r},8234:(t,e,n)=>{var r=n(8866),i=n(9551),a=n(3674);t.exports=function(t){return r(t,a,i)}},6904:(t,e,n)=>{var r=n(8866),i=n(1442),a=n(1704);t.exports=function(t){return r(t,a,i)}},5050:(t,e,n)=>{var r=n(7019);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},1499:(t,e,n)=>{var r=n(9162),i=n(3674);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var a=e[n],o=t[a];e[n]=[a,o,r(o)]}return e}},852:(t,e,n)=>{var r=n(8458),i=n(7801);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},5924:(t,e,n)=>{var r=n(5569)(Object.getPrototypeOf,Object);t.exports=r},9607:(t,e,n)=>{var r=n(2705),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=a.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=o.call(t);return r&&(e?t[s]=n:delete t[s]),i}},9551:(t,e,n)=>{var r=n(4963),i=n(479),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(t){return null==t?[]:(t=Object(t),r(o(t),(function(e){return a.call(t,e)})))}:i;t.exports=s},1442:(t,e,n)=>{var r=n(2488),i=n(5924),a=n(9551),o=n(479),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,a(t)),t=i(t);return e}:o;t.exports=s},4160:(t,e,n)=>{var r=n(8552),i=n(7071),a=n(3818),o=n(8525),s=n(577),c=n(4239),u=n(346),l="[object Map]",h="[object Promise]",f="[object Set]",d="[object WeakMap]",p="[object DataView]",g=u(r),y=u(i),m=u(a),v=u(o),b=u(s),_=c;(r&&_(new r(new ArrayBuffer(1)))!=p||i&&_(new i)!=l||a&&_(a.resolve())!=h||o&&_(new o)!=f||s&&_(new s)!=d)&&(_=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,r=n?u(n):"";if(r)switch(r){case g:return p;case y:return l;case m:return h;case v:return f;case b:return d}return e}),t.exports=_},7801:t=>{t.exports=function(t,e){return null==t?void 0:t[e]}},222:(t,e,n)=>{var r=n(1811),i=n(5694),a=n(1469),o=n(5776),s=n(1780),c=n(327);t.exports=function(t,e,n){for(var u=-1,l=(e=r(e,t)).length,h=!1;++u<l;){var f=c(e[u]);if(!(h=null!=t&&n(t,f)))break;t=t[f]}return h||++u!=l?h:!!(l=null==t?0:t.length)&&s(l)&&o(f,l)&&(a(t)||i(t))}},2689:t=>{var e=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return e.test(t)}},1789:(t,e,n)=>{var r=n(4536);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:t=>{t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},7667:(t,e,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},1327:(t,e,n)=>{var r=n(4536),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},1866:(t,e,n)=>{var r=n(4536);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},3824:t=>{var e=Object.prototype.hasOwnProperty;t.exports=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},9148:(t,e,n)=>{var r=n(4318),i=n(7157),a=n(3147),o=n(419),s=n(7133);t.exports=function(t,e,n){var c=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return i(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(t,n);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return a(t);case"[object Symbol]":return o(t)}}},8517:(t,e,n)=>{var r=n(3118),i=n(5924),a=n(5726);t.exports=function(t){return"function"!=typeof t.constructor||a(t)?{}:r(i(t))}},7285:(t,e,n)=>{var r=n(2705),i=n(5694),a=n(1469),o=r?r.isConcatSpreadable:void 0;t.exports=function(t){return a(t)||i(t)||!!(o&&t&&t[o])}},5776:t=>{var e=/^(?:0|[1-9]\d*)$/;t.exports=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}},6612:(t,e,n)=>{var r=n(7813),i=n(8612),a=n(5776),o=n(3218);t.exports=function(t,e,n){if(!o(n))return!1;var s=typeof e;return!!("number"==s?i(n)&&a(e,n.length):"string"==s&&e in n)&&r(n[e],t)}},5403:(t,e,n)=>{var r=n(1469),i=n(3448),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||o.test(t)||!a.test(t)||null!=e&&t in Object(e)}},7019:t=>{t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},5346:(t,e,n)=>{var r,i=n(4429),a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!a&&a in t}},5726:t=>{var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},9162:(t,e,n)=>{var r=n(3218);t.exports=function(t){return t==t&&!r(t)}},7040:t=>{t.exports=function(){this.__data__=[],this.size=0}},4125:(t,e,n)=>{var r=n(8470),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0||(n==e.length-1?e.pop():i.call(e,n,1),--this.size,0))}},2117:(t,e,n)=>{var r=n(8470);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},7518:(t,e,n)=>{var r=n(8470);t.exports=function(t){return r(this.__data__,t)>-1}},4705:(t,e,n)=>{var r=n(8470);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},4785:(t,e,n)=>{var r=n(1989),i=n(8407),a=n(7071);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},1285:(t,e,n)=>{var r=n(5050);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},6e3:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).get(t)}},9916:(t,e,n)=>{var r=n(5050);t.exports=function(t){return r(this,t).has(t)}},5265:(t,e,n)=>{var r=n(5050);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},8776:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},2634:t=>{t.exports=function(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}},4523:(t,e,n)=>{var r=n(8306);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},4536:(t,e,n)=>{var r=n(852)(Object,"create");t.exports=r},6916:(t,e,n)=>{var r=n(5569)(Object.keys,Object);t.exports=r},3498:t=>{t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},1167:(t,e,n)=>{t=n.nmd(t);var r=n(1957),i=e&&!e.nodeType&&e,a=i&&t&&!t.nodeType&&t,o=a&&a.exports===i&&r.process,s=function(){try{return a&&a.require&&a.require("util").types||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=s},2333:t=>{var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},5569:t=>{t.exports=function(t,e){return function(n){return t(e(n))}}},5357:(t,e,n)=>{var r=n(6874),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var a=arguments,o=-1,s=i(a.length-e,0),c=Array(s);++o<s;)c[o]=a[e+o];o=-1;for(var u=Array(e+1);++o<e;)u[o]=a[o];return u[e]=n(c),r(t,this,u)}}},5639:(t,e,n)=>{var r=n(1957),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();t.exports=a},6390:t=>{t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},619:t=>{t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},2385:t=>{t.exports=function(t){return this.__data__.has(t)}},1814:t=>{t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},61:(t,e,n)=>{var r=n(6560),i=n(1275)(r);t.exports=i},1275:t=>{var e=Date.now;t.exports=function(t){var n=0,r=0;return function(){var i=e(),a=16-(i-r);if(r=i,a>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},7465:(t,e,n)=>{var r=n(8407);t.exports=function(){this.__data__=new r,this.size=0}},3779:t=>{t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},7599:t=>{t.exports=function(t){return this.__data__.get(t)}},4758:t=>{t.exports=function(t){return this.__data__.has(t)}},4309:(t,e,n)=>{var r=n(8407),i=n(7071),a=n(3369);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new a(o)}return n.set(t,e),this.size=n.size,this}},2351:t=>{t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}},8016:(t,e,n)=>{var r=n(8983),i=n(2689),a=n(1903);t.exports=function(t){return i(t)?a(t):r(t)}},5514:(t,e,n)=>{var r=n(4523),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(a,"$1"):n||t)})),e}));t.exports=o},327:(t,e,n)=>{var r=n(3448);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},346:t=>{var e=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return e.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},7990:t=>{var e=/\s/;t.exports=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}},1903:t=>{var e="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",n="\\ud83c[\\udffb-\\udfff]",r="[^\\ud800-\\udfff]",i="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",o="(?:"+e+"|"+n+")?",s="[\\ufe0e\\ufe0f]?",c=s+o+"(?:\\u200d(?:"+[r,i,a].join("|")+")"+s+o+")*",u="(?:"+[r+e+"?",e,i,a,"[\\ud800-\\udfff]"].join("|")+")",l=RegExp(n+"(?="+n+")|"+u+c,"g");t.exports=function(t){for(var e=l.lastIndex=0;l.test(t);)++e;return e}},6678:(t,e,n)=>{var r=n(5990);t.exports=function(t){return r(t,4)}},361:(t,e,n)=>{var r=n(5990);t.exports=function(t){return r(t,5)}},5703:t=>{t.exports=function(t){return function(){return t}}},1747:(t,e,n)=>{var r=n(5976),i=n(7813),a=n(6612),o=n(1704),s=Object.prototype,c=s.hasOwnProperty,u=r((function(t,e){t=Object(t);var n=-1,r=e.length,u=r>2?e[2]:void 0;for(u&&a(e[0],e[1],u)&&(r=1);++n<r;)for(var l=e[n],h=o(l),f=-1,d=h.length;++f<d;){var p=h[f],g=t[p];(void 0===g||i(g,s[p])&&!c.call(t,p))&&(t[p]=l[p])}return t}));t.exports=u},6073:(t,e,n)=>{t.exports=n(4486)},7813:t=>{t.exports=function(t,e){return t===e||t!=t&&e!=e}},3105:(t,e,n)=>{var r=n(4963),i=n(760),a=n(7206),o=n(1469);t.exports=function(t,e){return(o(t)?r:i)(t,a(e,3))}},3311:(t,e,n)=>{var r=n(7740)(n(998));t.exports=r},998:(t,e,n)=>{var r=n(1848),i=n(7206),a=n(554),o=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var c=null==n?0:a(n);return c<0&&(c=o(s+c,0)),r(t,i(e,3),c)}},5564:(t,e,n)=>{var r=n(1078);t.exports=function(t){return null!=t&&t.length?r(t,1):[]}},4486:(t,e,n)=>{var r=n(7412),i=n(9881),a=n(4290),o=n(1469);t.exports=function(t,e){return(o(t)?r:i)(t,a(e))}},2620:(t,e,n)=>{var r=n(8483),i=n(4290),a=n(1704);t.exports=function(t,e){return null==t?t:r(t,i(e),a)}},7361:(t,e,n)=>{var r=n(7786);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},8721:(t,e,n)=>{var r=n(8565),i=n(222);t.exports=function(t,e){return null!=t&&i(t,e,r)}},9095:(t,e,n)=>{var r=n(13),i=n(222);t.exports=function(t,e){return null!=t&&i(t,e,r)}},6557:t=>{t.exports=function(t){return t}},5694:(t,e,n)=>{var r=n(9454),i=n(7005),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return i(t)&&o.call(t,"callee")&&!s.call(t,"callee")};t.exports=c},1469:t=>{var e=Array.isArray;t.exports=e},8612:(t,e,n)=>{var r=n(3560),i=n(1780);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},9246:(t,e,n)=>{var r=n(8612),i=n(7005);t.exports=function(t){return i(t)&&r(t)}},4144:(t,e,n)=>{t=n.nmd(t);var r=n(5639),i=n(5062),a=e&&!e.nodeType&&e,o=a&&t&&!t.nodeType&&t,s=o&&o.exports===a?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||i;t.exports=c},1609:(t,e,n)=>{var r=n(280),i=n(4160),a=n(5694),o=n(1469),s=n(8612),c=n(4144),u=n(5726),l=n(6719),h=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(o(t)||"string"==typeof t||"function"==typeof t.splice||c(t)||l(t)||a(t)))return!t.length;var e=i(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(u(t))return!r(t).length;for(var n in t)if(h.call(t,n))return!1;return!0}},3560:(t,e,n)=>{var r=n(4239),i=n(3218);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},1780:t=>{t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},6688:(t,e,n)=>{var r=n(5588),i=n(1717),a=n(1167),o=a&&a.isMap,s=o?i(o):r;t.exports=s},3218:t=>{t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},7005:t=>{t.exports=function(t){return null!=t&&"object"==typeof t}},8630:(t,e,n)=>{var r=n(4239),i=n(5924),a=n(7005),o=Function.prototype,s=Object.prototype,c=o.toString,u=s.hasOwnProperty,l=c.call(Object);t.exports=function(t){if(!a(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=u.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},2928:(t,e,n)=>{var r=n(9221),i=n(1717),a=n(1167),o=a&&a.isSet,s=o?i(o):r;t.exports=s},7037:(t,e,n)=>{var r=n(4239),i=n(1469),a=n(7005);t.exports=function(t){return"string"==typeof t||!i(t)&&a(t)&&"[object String]"==r(t)}},3448:(t,e,n)=>{var r=n(4239),i=n(7005);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},6719:(t,e,n)=>{var r=n(8749),i=n(1717),a=n(1167),o=a&&a.isTypedArray,s=o?i(o):r;t.exports=s},2353:t=>{t.exports=function(t){return void 0===t}},3674:(t,e,n)=>{var r=n(4636),i=n(280),a=n(8612);t.exports=function(t){return a(t)?r(t):i(t)}},1704:(t,e,n)=>{var r=n(4636),i=n(313),a=n(8612);t.exports=function(t){return a(t)?r(t,!0):i(t)}},928:t=>{t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},5161:(t,e,n)=>{var r=n(9932),i=n(7206),a=n(9199),o=n(1469);t.exports=function(t,e){return(o(t)?r:a)(t,i(e,3))}},6604:(t,e,n)=>{var r=n(9465),i=n(7816),a=n(7206);t.exports=function(t,e){var n={};return e=a(e,3),i(t,(function(t,i,a){r(n,i,e(t,i,a))})),n}},6162:(t,e,n)=>{var r=n(6029),i=n(3325),a=n(6557);t.exports=function(t){return t&&t.length?r(t,a,i):void 0}},8306:(t,e,n)=>{var r=n(3369);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},3857:(t,e,n)=>{var r=n(2980),i=n(1750)((function(t,e,n){r(t,e,n)}));t.exports=i},3632:(t,e,n)=>{var r=n(6029),i=n(433),a=n(6557);t.exports=function(t){return t&&t.length?r(t,a,i):void 0}},2762:(t,e,n)=>{var r=n(6029),i=n(7206),a=n(433);t.exports=function(t,e){return t&&t.length?r(t,i(e,2),a):void 0}},308:t=>{t.exports=function(){}},7771:(t,e,n)=>{var r=n(5639);t.exports=function(){return r.Date.now()}},9722:(t,e,n)=>{var r=n(5970),i=n(9021)((function(t,e){return null==t?{}:r(t,e)}));t.exports=i},9601:(t,e,n)=>{var r=n(371),i=n(9152),a=n(5403),o=n(327);t.exports=function(t){return a(t)?r(o(t)):i(t)}},6026:(t,e,n)=>{var r=n(7445)();t.exports=r},4061:(t,e,n)=>{var r=n(2663),i=n(9881),a=n(7206),o=n(107),s=n(1469);t.exports=function(t,e,n){var c=s(t)?r:o,u=arguments.length<3;return c(t,a(e,4),n,u,i)}},4238:(t,e,n)=>{var r=n(280),i=n(4160),a=n(8612),o=n(7037),s=n(8016);t.exports=function(t){if(null==t)return 0;if(a(t))return o(t)?s(t):t.length;var e=i(t);return"[object Map]"==e||"[object Set]"==e?t.size:r(t).length}},9734:(t,e,n)=>{var r=n(1078),i=n(9556),a=n(5976),o=n(6612),s=a((function(t,e){if(null==t)return[];var n=e.length;return n>1&&o(t,e[0],e[1])?e=[]:n>2&&o(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=s},479:t=>{t.exports=function(){return[]}},5062:t=>{t.exports=function(){return!1}},8601:(t,e,n)=>{var r=n(4841);t.exports=function(t){return t?Infinity===(t=r(t))||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},554:(t,e,n)=>{var r=n(8601);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},4841:(t,e,n)=>{var r=n(7561),i=n(3218),a=n(3448),o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(a(t))return NaN;if(i(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=i(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=r(t);var n=s.test(t);return n||c.test(t)?u(t.slice(2),n?2:8):o.test(t)?NaN:+t}},3678:(t,e,n)=>{var r=n(8363),i=n(1704);t.exports=function(t){return r(t,i(t))}},9833:(t,e,n)=>{var r=n(531);t.exports=function(t){return null==t?"":r(t)}},8718:(t,e,n)=>{var r=n(7412),i=n(3118),a=n(7816),o=n(7206),s=n(5924),c=n(1469),u=n(4144),l=n(3560),h=n(3218),f=n(6719);t.exports=function(t,e,n){var d=c(t),p=d||u(t)||f(t);if(e=o(e,4),null==n){var g=t&&t.constructor;n=p?d?new g:[]:h(t)&&l(g)?i(s(t)):{}}return(p?r:a)(t,(function(t,r,i){return e(n,t,r,i)})),n}},3386:(t,e,n)=>{var r=n(1078),i=n(5976),a=n(5652),o=n(9246),s=i((function(t){return a(r(t,1,o,!0))}));t.exports=s},3955:(t,e,n)=>{var r=n(9833),i=0;t.exports=function(t){var e=++i;return r(t)+e}},2628:(t,e,n)=>{var r=n(7415),i=n(3674);t.exports=function(t){return null==t?[]:r(t,i(t))}},7287:(t,e,n)=>{var r=n(4865),i=n(1757);t.exports=function(t,e){return i(t||[],e||[],r)}},9234:()=>{},1748:(t,e,n)=>{var r={"./locale":9234,"./locale.js":9234};function i(t){var e=a(t);return n(e)}function a(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=a,t.exports=i,i.id=1748},1941:function(t,e,n){(t=n.nmd(t)).exports=function(){"use strict";var e,r;function i(){return e.apply(null,arguments)}function a(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return void 0===t}function c(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function u(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function l(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function f(t,e){for(var n in e)h(e,n)&&(t[n]=e[n]);return h(e,"toString")&&(t.toString=e.toString),h(e,"valueOf")&&(t.valueOf=e.valueOf),t}function d(t,e,n,r){return be(t,e,n,r,!0).utc()}function p(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function g(t){if(null==t._isValid){var e=p(t),n=r.call(e.parsedDateParts,(function(t){return null!=t})),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i}return t._isValid}function y(t){var e=d(NaN);return null!=t?f(p(e),t):p(e).userInvalidated=!0,e}r=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};var m=i.momentProperties=[];function v(t,e){var n,r,i;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=p(e)),s(e._locale)||(t._locale=e._locale),0<m.length)for(n=0;n<m.length;n++)s(i=e[r=m[n]])||(t[r]=i);return t}var b=!1;function _(t){v(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,i.updateOffset(this),b=!1)}function x(t){return t instanceof _||null!=t&&null!=t._isAMomentObject}function w(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function k(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=w(e)),n}function T(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&&k(t[r])!==k(e[r]))&&o++;return o+a}function C(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function E(t,e){var n=!0;return f((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var r,a=[],o=0;o<arguments.length;o++){if(r="","object"==typeof arguments[o]){for(var s in r+="\n["+o+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[o];a.push(r)}C(t+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var S,A={};function M(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),A[t]||(C(e),A[t]=!0)}function N(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function D(t,e){var n,r=f({},t);for(n in e)h(e,n)&&(o(t[n])&&o(e[n])?(r[n]={},f(r[n],t[n]),f(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)h(t,n)&&!h(e,n)&&o(t[n])&&(r[n]=f({},r[n]));return r}function B(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,S=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)h(t,e)&&n.push(e);return n};var L={};function O(t,e){var n=t.toLowerCase();L[n]=L[n+"s"]=L[e]=t}function I(t){return"string"==typeof t?L[t]||L[t.toLowerCase()]:void 0}function R(t){var e,n,r={};for(n in t)h(t,n)&&(e=I(n))&&(r[e]=t[n]);return r}var F={};function P(t,e){F[t]=e}function Y(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(0<=t?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var j=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,U=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,z={},$={};function q(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&($[t]=i),e&&($[e[0]]=function(){return Y(i.apply(this,arguments),e[1],e[2])}),n&&($[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function H(t,e){return t.isValid()?(e=W(e,t.localeData()),z[e]=z[e]||function(t){var e,n,r,i=t.match(j);for(e=0,n=i.length;e<n;e++)$[i[e]]?i[e]=$[i[e]]:i[e]=(r=i[e]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(e){var r,a="";for(r=0;r<n;r++)a+=N(i[r])?i[r].call(e,t):i[r];return a}}(e),z[e](t)):t.localeData().invalidDate()}function W(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for(U.lastIndex=0;0<=n&&U.test(t);)t=t.replace(U,r),U.lastIndex=0,n-=1;return t}var V=/\d/,G=/\d\d/,X=/\d{3}/,Z=/\d{4}/,Q=/[+-]?\d{6}/,K=/\d\d?/,J=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,et=/\d{1,3}/,nt=/\d{1,4}/,rt=/[+-]?\d{1,6}/,it=/\d+/,at=/[+-]?\d+/,ot=/Z|[+-]\d\d:?\d\d/gi,st=/Z|[+-]\d\d(?::?\d\d)?/gi,ct=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut={};function lt(t,e,n){ut[t]=N(e)?e:function(t,r){return t&&n?n:e}}function ht(t,e){return h(ut,t)?ut[t](e._strict,e._locale):new RegExp(ft(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,r,i){return e||n||r||i}))))}function ft(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var dt={};function pt(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),c(e)&&(r=function(t,n){n[e]=k(t)}),n=0;n<t.length;n++)dt[t[n]]=r}function gt(t,e){pt(t,(function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)}))}function yt(t){return mt(t)?366:365}function mt(t){return t%4==0&&t%100!=0||t%400==0}q("Y",0,0,(function(){var t=this.year();return t<=9999?""+t:"+"+t})),q(0,["YY",2],0,(function(){return this.year()%100})),q(0,["YYYY",4],0,"year"),q(0,["YYYYY",5],0,"year"),q(0,["YYYYYY",6,!0],0,"year"),O("year","y"),P("year",1),lt("Y",at),lt("YY",K,G),lt("YYYY",nt,Z),lt("YYYYY",rt,Q),lt("YYYYYY",rt,Q),pt(["YYYYY","YYYYYY"],0),pt("YYYY",(function(t,e){e[0]=2===t.length?i.parseTwoDigitYear(t):k(t)})),pt("YY",(function(t,e){e[0]=i.parseTwoDigitYear(t)})),pt("Y",(function(t,e){e[0]=parseInt(t,10)})),i.parseTwoDigitYear=function(t){return k(t)+(68<k(t)?1900:2e3)};var vt,bt=_t("FullYear",!0);function _t(t,e){return function(n){return null!=n?(wt(this,t,n),i.updateOffset(this,e),this):xt(this,t)}}function xt(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function wt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&mt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),kt(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function kt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=(e%12+12)%12;return t+=(e-n)/12,1===n?mt(t)?29:28:31-n%7%2}vt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},q("M",["MM",2],"Mo",(function(){return this.month()+1})),q("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),q("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),O("month","M"),P("month",8),lt("M",K),lt("MM",K,G),lt("MMM",(function(t,e){return e.monthsShortRegex(t)})),lt("MMMM",(function(t,e){return e.monthsRegex(t)})),pt(["M","MM"],(function(t,e){e[1]=k(t)-1})),pt(["MMM","MMMM"],(function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[1]=i:p(n).invalidMonth=t}));var Tt=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Ct="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Et="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function St(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=k(e);else if(!c(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),kt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function At(t){return null!=t?(St(this,t),i.updateOffset(this,!0),this):xt(this,"Month")}var Mt=ct,Nt=ct;function Dt(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],a=[];for(e=0;e<12;e++)n=d([2e3,e]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(t),i.sort(t),a.sort(t),e=0;e<12;e++)r[e]=ft(r[e]),i[e]=ft(i[e]);for(e=0;e<24;e++)a[e]=ft(a[e]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Bt(t){var e;if(t<100&&0<=t){var n=Array.prototype.slice.call(arguments);n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function Lt(t,e,n){var r=7+e-n;return-(7+Bt(t,0,r).getUTCDay()-e)%7+r-1}function Ot(t,e,n,r,i){var a,o,s=1+7*(e-1)+(7+n-r)%7+Lt(t,r,i);return o=s<=0?yt(a=t-1)+s:s>yt(t)?(a=t+1,s-yt(t)):(a=t,s),{year:a,dayOfYear:o}}function It(t,e,n){var r,i,a=Lt(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+Rt(i=t.year()-1,e,n):o>Rt(t.year(),e,n)?(r=o-Rt(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function Rt(t,e,n){var r=Lt(t,e,n),i=Lt(t+1,e,n);return(yt(t)-r+i)/7}function Ft(t,e){return t.slice(e,7).concat(t.slice(0,e))}q("w",["ww",2],"wo","week"),q("W",["WW",2],"Wo","isoWeek"),O("week","w"),O("isoWeek","W"),P("week",5),P("isoWeek",5),lt("w",K),lt("ww",K,G),lt("W",K),lt("WW",K,G),gt(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=k(t)})),q("d",0,"do","day"),q("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),q("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),q("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),q("e",0,0,"weekday"),q("E",0,0,"isoWeekday"),O("day","d"),O("weekday","e"),O("isoWeekday","E"),P("day",11),P("weekday",11),P("isoWeekday",11),lt("d",K),lt("e",K),lt("E",K),lt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),lt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),lt("dddd",(function(t,e){return e.weekdaysRegex(t)})),gt(["dd","ddd","dddd"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:p(n).invalidWeekday=t})),gt(["d","e","E"],(function(t,e,n,r){e[r]=k(t)}));var Pt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Yt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),jt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ut=ct,zt=ct,$t=ct;function qt(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],c=[],u=[];for(e=0;e<7;e++)n=d([2e3,1]).day(e),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),a=this.weekdays(n,""),o.push(r),s.push(i),c.push(a),u.push(r),u.push(i),u.push(a);for(o.sort(t),s.sort(t),c.sort(t),u.sort(t),e=0;e<7;e++)s[e]=ft(s[e]),c[e]=ft(c[e]),u[e]=ft(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Ht(){return this.hours()%12||12}function Wt(t,e){q(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Vt(t,e){return e._meridiemParse}q("H",["HH",2],0,"hour"),q("h",["hh",2],0,Ht),q("k",["kk",2],0,(function(){return this.hours()||24})),q("hmm",0,0,(function(){return""+Ht.apply(this)+Y(this.minutes(),2)})),q("hmmss",0,0,(function(){return""+Ht.apply(this)+Y(this.minutes(),2)+Y(this.seconds(),2)})),q("Hmm",0,0,(function(){return""+this.hours()+Y(this.minutes(),2)})),q("Hmmss",0,0,(function(){return""+this.hours()+Y(this.minutes(),2)+Y(this.seconds(),2)})),Wt("a",!0),Wt("A",!1),O("hour","h"),P("hour",13),lt("a",Vt),lt("A",Vt),lt("H",K),lt("h",K),lt("k",K),lt("HH",K,G),lt("hh",K,G),lt("kk",K,G),lt("hmm",J),lt("hmmss",tt),lt("Hmm",J),lt("Hmmss",tt),pt(["H","HH"],3),pt(["k","kk"],(function(t,e,n){var r=k(t);e[3]=24===r?0:r})),pt(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),pt(["h","hh"],(function(t,e,n){e[3]=k(t),p(n).bigHour=!0})),pt("hmm",(function(t,e,n){var r=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r)),p(n).bigHour=!0})),pt("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r,2)),e[5]=k(t.substr(i)),p(n).bigHour=!0})),pt("Hmm",(function(t,e,n){var r=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r))})),pt("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=k(t.substr(0,r)),e[4]=k(t.substr(r,2)),e[5]=k(t.substr(i))}));var Gt,Xt=_t("Hours",!0),Zt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Ct,monthsShort:Et,week:{dow:0,doy:6},weekdays:Pt,weekdaysMin:jt,weekdaysShort:Yt,meridiemParse:/[ap]\.?m?\.?/i},Qt={},Kt={};function Jt(t){return t?t.toLowerCase().replace("_","-"):t}function te(e){var r=null;if(!Qt[e]&&t&&t.exports)try{r=Gt._abbr,n(1748)("./"+e),ee(r)}catch(e){}return Qt[e]}function ee(t,e){var n;return t&&((n=s(e)?re(t):ne(t,e))?Gt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),Gt._abbr}function ne(t,e){if(null===e)return delete Qt[t],null;var n,r=Zt;if(e.abbr=t,null!=Qt[t])M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Qt[t]._config;else if(null!=e.parentLocale)if(null!=Qt[e.parentLocale])r=Qt[e.parentLocale]._config;else{if(null==(n=te(e.parentLocale)))return Kt[e.parentLocale]||(Kt[e.parentLocale]=[]),Kt[e.parentLocale].push({name:t,config:e}),null;r=n._config}return Qt[t]=new B(D(r,e)),Kt[t]&&Kt[t].forEach((function(t){ne(t.name,t.config)})),ee(t),Qt[t]}function re(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Gt;if(!a(t)){if(e=te(t))return e;t=[t]}return function(t){for(var e,n,r,i,a=0;a<t.length;){for(e=(i=Jt(t[a]).split("-")).length,n=(n=Jt(t[a+1]))?n.split("-"):null;0<e;){if(r=te(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&T(i,n,!0)>=e-1)break;e--}a++}return Gt}(t)}function ie(t){var e,n=t._a;return n&&-2===p(t).overflow&&(e=n[1]<0||11<n[1]?1:n[2]<1||n[2]>kt(n[0],n[1])?2:n[3]<0||24<n[3]||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||59<n[4]?4:n[5]<0||59<n[5]?5:n[6]<0||999<n[6]?6:-1,p(t)._overflowDayOfYear&&(e<0||2<e)&&(e=2),p(t)._overflowWeeks&&-1===e&&(e=7),p(t)._overflowWeekday&&-1===e&&(e=8),p(t).overflow=e),t}function ae(t,e,n){return null!=t?t:null!=e?e:n}function oe(t){var e,n,r,a,o,s=[];if(!t._d){var c,u;for(c=t,u=new Date(i.now()),r=c._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,n,r,i,a,o,s,c;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)a=1,o=4,n=ae(e.GG,t._a[0],It(_e(),1,4).year),r=ae(e.W,1),((i=ae(e.E,1))<1||7<i)&&(c=!0);else{a=t._locale._week.dow,o=t._locale._week.doy;var u=It(_e(),a,o);n=ae(e.gg,t._a[0],u.year),r=ae(e.w,u.week),null!=e.d?((i=e.d)<0||6<i)&&(c=!0):null!=e.e?(i=e.e+a,(e.e<0||6<e.e)&&(c=!0)):i=a}r<1||r>Rt(n,a,o)?p(t)._overflowWeeks=!0:null!=c?p(t)._overflowWeekday=!0:(s=Ot(n,r,i,a,o),t._a[0]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=ae(t._a[0],r[0]),(t._dayOfYear>yt(o)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),n=Bt(o,0,t._dayOfYear),t._a[1]=n.getUTCMonth(),t._a[2]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=r[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Bt:function(t,e,n,r,i,a,o){var s;return t<100&&0<=t?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,a,o),s}).apply(null,s),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(p(t).weekdayMismatch=!0)}}var se=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ce=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ue=/Z|[+-]\d\d(?::?\d\d)?/,le=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],he=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],fe=/^\/?Date\((\-?\d+)/i;function de(t){var e,n,r,i,a,o,s=t._i,c=se.exec(s)||ce.exec(s);if(c){for(p(t).iso=!0,e=0,n=le.length;e<n;e++)if(le[e][1].exec(c[1])){i=le[e][0],r=!1!==le[e][2];break}if(null==i)return void(t._isValid=!1);if(c[3]){for(e=0,n=he.length;e<n;e++)if(he[e][1].exec(c[3])){a=(c[2]||" ")+he[e][0];break}if(null==a)return void(t._isValid=!1)}if(!r&&null!=a)return void(t._isValid=!1);if(c[4]){if(!ue.exec(c[4]))return void(t._isValid=!1);o="Z"}t._f=i+(a||"")+(o||""),me(t)}else t._isValid=!1}var pe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/;var ge={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ye(t){var e,n,r,i=pe.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(i){var a=function(t,e,n,r,i,a){var o=[function(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}(t),Et.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}(i[4],i[3],i[2],i[5],i[6],i[7]);if(n=a,r=t,(e=i[1])&&Yt.indexOf(e)!==new Date(n[0],n[1],n[2]).getDay()&&(p(r).weekdayMismatch=!0,!(r._isValid=!1)))return;t._a=a,t._tzm=function(t,e,n){if(t)return ge[t];if(e)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(i[8],i[9],i[10]),t._d=Bt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),p(t).rfc2822=!0}else t._isValid=!1}function me(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],p(t).empty=!0;var e,n,r,a,o,s,c,u,l=""+t._i,f=l.length,d=0;for(r=W(t._f,t._locale).match(j)||[],e=0;e<r.length;e++)a=r[e],(n=(l.match(ht(a,t))||[])[0])&&(0<(o=l.substr(0,l.indexOf(n))).length&&p(t).unusedInput.push(o),l=l.slice(l.indexOf(n)+n.length),d+=n.length),$[a]?(n?p(t).empty=!1:p(t).unusedTokens.push(a),s=a,u=t,null!=(c=n)&&h(dt,s)&&dt[s](c,u._a,u,s)):t._strict&&!n&&p(t).unusedTokens.push(a);p(t).charsLeftOver=f-d,0<l.length&&p(t).unusedInput.push(l),t._a[3]<=12&&!0===p(t).bigHour&&0<t._a[3]&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[3]=function(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):(null!=t.isPM&&((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0)),e)}(t._locale,t._a[3],t._meridiem),oe(t),ie(t)}else ye(t);else de(t)}function ve(t){var e,n,r,h,d=t._i,m=t._f;return t._locale=t._locale||re(t._l),null===d||void 0===m&&""===d?y({nullInput:!0}):("string"==typeof d&&(t._i=d=t._locale.preparse(d)),x(d)?new _(ie(d)):(u(d)?t._d=d:a(m)?function(t){var e,n,r,i,a;if(0===t._f.length)return p(t).invalidFormat=!0,t._d=new Date(NaN);for(i=0;i<t._f.length;i++)a=0,e=v({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],me(e),g(e)&&(a+=p(e).charsLeftOver,a+=10*p(e).unusedTokens.length,p(e).score=a,(null==r||a<r)&&(r=a,n=e));f(t,n||e)}(t):m?me(t):s(n=(e=t)._i)?e._d=new Date(i.now()):u(n)?e._d=new Date(n.valueOf()):"string"==typeof n?(r=e,null===(h=fe.exec(r._i))?(de(r),!1===r._isValid&&(delete r._isValid,ye(r),!1===r._isValid&&(delete r._isValid,i.createFromInputFallback(r)))):r._d=new Date(+h[1])):a(n)?(e._a=l(n.slice(0),(function(t){return parseInt(t,10)})),oe(e)):o(n)?function(t){if(!t._d){var e=R(t._i);t._a=l([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),oe(t)}}(e):c(n)?e._d=new Date(n):i.createFromInputFallback(e),g(t)||(t._d=null),t))}function be(t,e,n,r,i){var s,c={};return!0!==n&&!1!==n||(r=n,n=void 0),(o(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||a(t)&&0===t.length)&&(t=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=i,c._l=n,c._i=t,c._f=e,c._strict=r,(s=new _(ie(ve(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function _e(t,e,n,r){return be(t,e,n,r,!1)}i.createFromInputFallback=E("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var xe=E("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=_e.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:y()})),we=E("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=_e.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:y()}));function ke(t,e){var n,r;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return _e();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}var Te=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ce(t){var e=R(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,c=e.minute||0,u=e.second||0,l=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===vt.call(Te,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,r=0;r<Te.length;++r)if(t[Te[r]]){if(n)return!1;parseFloat(t[Te[r]])!==k(t[Te[r]])&&(n=!0)}return!0}(e),this._milliseconds=+l+1e3*u+6e4*c+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=re(),this._bubble()}function Ee(t){return t instanceof Ce}function Se(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Ae(t,e){q(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+Y(~~(t/60),2)+e+Y(~~t%60,2)}))}Ae("Z",":"),Ae("ZZ",""),lt("Z",st),lt("ZZ",st),pt(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=Ne(st,t)}));var Me=/([\+\-]|\d\d)/gi;function Ne(t,e){var n=(e||"").match(t);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Me)||["-",0,0],i=60*r[1]+k(r[2]);return 0===i?0:"+"===r[0]?i:-i}function De(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(x(t)||u(t)?t.valueOf():_e(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):_e(t).local()}function Be(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Le(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Oe=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Ie=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Re(t,e){var n,r,i,a=t,o=null;return Ee(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:c(t)?(a={},e?a[e]=t:a.milliseconds=t):(o=Oe.exec(t))?(n="-"===o[1]?-1:1,a={y:0,d:k(o[2])*n,h:k(o[3])*n,m:k(o[4])*n,s:k(o[5])*n,ms:k(Se(1e3*o[6]))*n}):(o=Ie.exec(t))?(n="-"===o[1]?-1:1,a={y:Fe(o[2],n),M:Fe(o[3],n),w:Fe(o[4],n),d:Fe(o[5],n),h:Fe(o[6],n),m:Fe(o[7],n),s:Fe(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=function(t,e){var n;return t.isValid()&&e.isValid()?(e=De(e,t),t.isBefore(e)?n=Pe(t,e):((n=Pe(e,t)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}(_e(a.from),_e(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new Ce(a),Ee(t)&&h(t,"_locale")&&(r._locale=t._locale),r}function Fe(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Pe(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Ye(t,e){return function(n,r){var i;return null===r||isNaN(+r)||(M(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),je(this,Re(n="string"==typeof n?+n:n,r),t),this}}function je(t,e,n,r){var a=e._milliseconds,o=Se(e._days),s=Se(e._months);t.isValid()&&(r=null==r||r,s&&St(t,xt(t,"Month")+s*n),o&&wt(t,"Date",xt(t,"Date")+o*n),a&&t._d.setTime(t._d.valueOf()+a*n),r&&i.updateOffset(t,o||s))}Re.fn=Ce.prototype,Re.invalid=function(){return Re(NaN)};var Ue=Ye(1,"add"),ze=Ye(-1,"subtract");function $e(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,"months");return-(n+(e-r<0?(e-r)/(r-t.clone().add(n-1,"months")):(e-r)/(t.clone().add(n+1,"months")-r)))||0}function qe(t){var e;return void 0===t?this._locale._abbr:(null!=(e=re(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var He=E("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function We(){return this._locale}var Ve=126227808e5;function Ge(t,e){return(t%e+e)%e}function Xe(t,e,n){return t<100&&0<=t?new Date(t+400,e,n)-Ve:new Date(t,e,n).valueOf()}function Ze(t,e,n){return t<100&&0<=t?Date.UTC(t+400,e,n)-Ve:Date.UTC(t,e,n)}function Qe(t,e){q(0,[t,t.length],0,e)}function Ke(t,e,n,r,i){var a;return null==t?It(this,r,i).year:((a=Rt(t,r,i))<e&&(e=a),function(t,e,n,r,i){var a=Ot(t,e,n,r,i),o=Bt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,t,e,n,r,i))}q(0,["gg",2],0,(function(){return this.weekYear()%100})),q(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Qe("gggg","weekYear"),Qe("ggggg","weekYear"),Qe("GGGG","isoWeekYear"),Qe("GGGGG","isoWeekYear"),O("weekYear","gg"),O("isoWeekYear","GG"),P("weekYear",1),P("isoWeekYear",1),lt("G",at),lt("g",at),lt("GG",K,G),lt("gg",K,G),lt("GGGG",nt,Z),lt("gggg",nt,Z),lt("GGGGG",rt,Q),lt("ggggg",rt,Q),gt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,r){e[r.substr(0,2)]=k(t)})),gt(["gg","GG"],(function(t,e,n,r){e[r]=i.parseTwoDigitYear(t)})),q("Q",0,"Qo","quarter"),O("quarter","Q"),P("quarter",7),lt("Q",V),pt("Q",(function(t,e){e[1]=3*(k(t)-1)})),q("D",["DD",2],"Do","date"),O("date","D"),P("date",9),lt("D",K),lt("DD",K,G),lt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),pt(["D","DD"],2),pt("Do",(function(t,e){e[2]=k(t.match(K)[0])}));var Je=_t("Date",!0);q("DDD",["DDDD",3],"DDDo","dayOfYear"),O("dayOfYear","DDD"),P("dayOfYear",4),lt("DDD",et),lt("DDDD",X),pt(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=k(t)})),q("m",["mm",2],0,"minute"),O("minute","m"),P("minute",14),lt("m",K),lt("mm",K,G),pt(["m","mm"],4);var tn=_t("Minutes",!1);q("s",["ss",2],0,"second"),O("second","s"),P("second",15),lt("s",K),lt("ss",K,G),pt(["s","ss"],5);var en,nn=_t("Seconds",!1);for(q("S",0,0,(function(){return~~(this.millisecond()/100)})),q(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),q(0,["SSS",3],0,"millisecond"),q(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),q(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),q(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),q(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),q(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),q(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),O("millisecond","ms"),P("millisecond",16),lt("S",et,V),lt("SS",et,G),lt("SSS",et,X),en="SSSS";en.length<=9;en+="S")lt(en,it);function rn(t,e){e[6]=k(1e3*("0."+t))}for(en="S";en.length<=9;en+="S")pt(en,rn);var an=_t("Milliseconds",!1);q("z",0,0,"zoneAbbr"),q("zz",0,0,"zoneName");var on=_.prototype;function sn(t){return t}on.add=Ue,on.calendar=function(t,e){var n=t||_e(),r=De(n,this).startOf("day"),a=i.calendarFormat(this,r)||"sameElse",o=e&&(N(e[a])?e[a].call(this,n):e[a]);return this.format(o||this.localeData().calendar(a,this,_e(n)))},on.clone=function(){return new _(this)},on.diff=function(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=De(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=I(e)){case"year":a=$e(this,r)/12;break;case"month":a=$e(this,r);break;case"quarter":a=$e(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:w(a)},on.endOf=function(t){var e;if(void 0===(t=I(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-Ge(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-Ge(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-Ge(e,1e3)-1}return this._d.setTime(e),i.updateOffset(this,!0),this},on.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=H(this,t);return this.localeData().postformat(e)},on.from=function(t,e){return this.isValid()&&(x(t)&&t.isValid()||_e(t).isValid())?Re({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.fromNow=function(t){return this.from(_e(),t)},on.to=function(t,e){return this.isValid()&&(x(t)&&t.isValid()||_e(t).isValid())?Re({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.toNow=function(t){return this.to(_e(),t)},on.get=function(t){return N(this[t=I(t)])?this[t]():this},on.invalidAt=function(){return p(this).overflow},on.isAfter=function(t,e){var n=x(t)?t:_e(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},on.isBefore=function(t,e){var n=x(t)?t:_e(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},on.isBetween=function(t,e,n,r){var i=x(t)?t:_e(t),a=x(e)?e:_e(e);return!!(this.isValid()&&i.isValid()&&a.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))},on.isSame=function(t,e){var n,r=x(t)?t:_e(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=I(e)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},on.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},on.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},on.isValid=function(){return g(this)},on.lang=He,on.locale=qe,on.localeData=We,on.max=we,on.min=xe,on.parsingFlags=function(){return f({},p(this))},on.set=function(t,e){if("object"==typeof t)for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:F[n]});return e.sort((function(t,e){return t.priority-e.priority})),e}(t=R(t)),r=0;r<n.length;r++)this[n[r].unit](t[n[r].unit]);else if(N(this[t=I(t)]))return this[t](e);return this},on.startOf=function(t){var e;if(void 0===(t=I(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=Ge(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=Ge(e,6e4);break;case"second":e=this._d.valueOf(),e-=Ge(e,1e3)}return this._d.setTime(e),i.updateOffset(this,!0),this},on.subtract=ze,on.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},on.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},on.toDate=function(){return new Date(this.valueOf())},on.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||9999<n.year()?H(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):N(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",H(n,"Z")):H(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},on.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=e+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},on.toJSON=function(){return this.isValid()?this.toISOString():null},on.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},on.unix=function(){return Math.floor(this.valueOf()/1e3)},on.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},on.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},on.year=bt,on.isLeapYear=function(){return mt(this.year())},on.weekYear=function(t){return Ke.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},on.isoWeekYear=function(t){return Ke.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},on.quarter=on.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},on.month=At,on.daysInMonth=function(){return kt(this.year(),this.month())},on.week=on.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},on.isoWeek=on.isoWeeks=function(t){var e=It(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},on.weeksInYear=function(){var t=this.localeData()._week;return Rt(this.year(),t.dow,t.doy)},on.isoWeeksInYear=function(){return Rt(this.year(),1,4)},on.date=Je,on.day=on.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,n,r=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,n=this.localeData(),t="string"!=typeof e?e:isNaN(e)?"number"==typeof(e=n.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-r,"d")):r},on.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},on.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null==t)return this.day()||7;var e,n,r=(e=t,n=this.localeData(),"string"==typeof e?n.weekdaysParse(e)%7||7:isNaN(e)?null:e);return this.day(this.day()%7?r:r-7)},on.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},on.hour=on.hours=Xt,on.minute=on.minutes=tn,on.second=on.seconds=nn,on.millisecond=on.milliseconds=an,on.utcOffset=function(t,e,n){var r,a=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null==t)return this._isUTC?a:Be(this);if("string"==typeof t){if(null===(t=Ne(st,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(r=Be(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==t&&(!e||this._changeInProgress?je(this,Re(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this},on.utc=function(t){return this.utcOffset(0,t)},on.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Be(this),"m")),this},on.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Ne(ot,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},on.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?_e(t).utcOffset():0,(this.utcOffset()-t)%60==0)},on.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},on.isLocal=function(){return!!this.isValid()&&!this._isUTC},on.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},on.isUtc=Le,on.isUTC=Le,on.zoneAbbr=function(){return this._isUTC?"UTC":""},on.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},on.dates=E("dates accessor is deprecated. Use date instead.",Je),on.months=E("months accessor is deprecated. Use month instead",At),on.years=E("years accessor is deprecated. Use year instead",bt),on.zone=E("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),on.isDSTShifted=E("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),(t=ve(t))._a){var e=t._isUTC?d(t._a):_e(t._a);this._isDSTShifted=this.isValid()&&0<T(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted}));var cn=B.prototype;function un(t,e,n,r){var i=re(),a=d().set(r,e);return i[n](a,t)}function ln(t,e,n){if(c(t)&&(e=t,t=void 0),t=t||"",null!=e)return un(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=un(t,r,n,"month");return i}function hn(t,e,n,r){"boolean"==typeof t?c(e)&&(n=e,e=void 0):(e=t,t=!1,c(n=e)&&(n=e,e=void 0)),e=e||"";var i,a=re(),o=t?a._week.dow:0;if(null!=n)return un(e,(n+o)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=un(e,(i+o)%7,r,"day");return s}cn.calendar=function(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return N(r)?r.call(e,n):r},cn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},cn.invalidDate=function(){return this._invalidDate},cn.ordinal=function(t){return this._ordinal.replace("%d",t)},cn.preparse=sn,cn.postformat=sn,cn.relativeTime=function(t,e,n,r){var i=this._relativeTime[n];return N(i)?i(t,e,n,r):i.replace(/%d/i,t)},cn.pastFuture=function(t,e){var n=this._relativeTime[0<t?"future":"past"];return N(n)?n(e):n.replace(/%s/i,e)},cn.set=function(t){var e,n;for(n in t)N(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},cn.months=function(t,e){return t?a(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Tt).test(e)?"format":"standalone"][t.month()]:a(this._months)?this._months:this._months.standalone},cn.monthsShort=function(t,e){return t?a(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Tt.test(e)?"format":"standalone"][t.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},cn.monthsParse=function(t,e,n){var r,i,a;if(this._monthsParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=d([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=vt.call(this._shortMonthsParse,o))?i:null:-1!==(i=vt.call(this._longMonthsParse,o))?i:null:"MMM"===e?-1!==(i=vt.call(this._shortMonthsParse,o))||-1!==(i=vt.call(this._longMonthsParse,o))?i:null:-1!==(i=vt.call(this._longMonthsParse,o))||-1!==(i=vt.call(this._shortMonthsParse,o))?i:null}.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=d([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},cn.monthsRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||Dt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=Nt),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},cn.monthsShortRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||Dt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Mt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},cn.week=function(t){return It(t,this._week.dow,this._week.doy).week},cn.firstDayOfYear=function(){return this._week.doy},cn.firstDayOfWeek=function(){return this._week.dow},cn.weekdays=function(t,e){var n=a(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?Ft(n,this._week.dow):t?n[t.day()]:n},cn.weekdaysMin=function(t){return!0===t?Ft(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},cn.weekdaysShort=function(t){return!0===t?Ft(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},cn.weekdaysParse=function(t,e,n){var r,i,a;if(this._weekdaysParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=d([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=vt.call(this._weekdaysParse,o))?i:null:"ddd"===e?-1!==(i=vt.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=vt.call(this._minWeekdaysParse,o))?i:null:"dddd"===e?-1!==(i=vt.call(this._weekdaysParse,o))||-1!==(i=vt.call(this._shortWeekdaysParse,o))||-1!==(i=vt.call(this._minWeekdaysParse,o))?i:null:"ddd"===e?-1!==(i=vt.call(this._shortWeekdaysParse,o))||-1!==(i=vt.call(this._weekdaysParse,o))||-1!==(i=vt.call(this._minWeekdaysParse,o))?i:null:-1!==(i=vt.call(this._minWeekdaysParse,o))||-1!==(i=vt.call(this._weekdaysParse,o))||-1!==(i=vt.call(this._shortWeekdaysParse,o))?i:null}.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=d([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}},cn.weekdaysRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=Ut),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},cn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=zt),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},cn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||qt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$t),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},cn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},cn.meridiem=function(t,e,n){return 11<t?n?"pm":"PM":n?"am":"AM"},ee("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===k(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=E("moment.lang is deprecated. Use moment.locale instead.",ee),i.langData=E("moment.langData is deprecated. Use moment.localeData instead.",re);var fn=Math.abs;function dn(t,e,n,r){var i=Re(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function pn(t){return t<0?Math.floor(t):Math.ceil(t)}function gn(t){return 4800*t/146097}function yn(t){return 146097*t/4800}function mn(t){return function(){return this.as(t)}}var vn=mn("ms"),bn=mn("s"),_n=mn("m"),xn=mn("h"),wn=mn("d"),kn=mn("w"),Tn=mn("M"),Cn=mn("Q"),En=mn("y");function Sn(t){return function(){return this.isValid()?this._data[t]:NaN}}var An=Sn("milliseconds"),Mn=Sn("seconds"),Nn=Sn("minutes"),Dn=Sn("hours"),Bn=Sn("days"),Ln=Sn("months"),On=Sn("years"),In=Math.round,Rn={ss:44,s:45,m:45,h:22,d:26,M:11},Fn=Math.abs;function Pn(t){return(0<t)-(t<0)||+t}function Yn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=Fn(this._milliseconds)/1e3,r=Fn(this._days),i=Fn(this._months);e=w((t=w(n/60))/60),n%=60,t%=60;var a=w(i/12),o=i%=12,s=r,c=e,u=t,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var f=h<0?"-":"",d=Pn(this._months)!==Pn(h)?"-":"",p=Pn(this._days)!==Pn(h)?"-":"",g=Pn(this._milliseconds)!==Pn(h)?"-":"";return f+"P"+(a?d+a+"Y":"")+(o?d+o+"M":"")+(s?p+s+"D":"")+(c||u||l?"T":"")+(c?g+c+"H":"")+(u?g+u+"M":"")+(l?g+l+"S":"")}var jn=Ce.prototype;return jn.isValid=function(){return this._isValid},jn.abs=function(){var t=this._data;return this._milliseconds=fn(this._milliseconds),this._days=fn(this._days),this._months=fn(this._months),t.milliseconds=fn(t.milliseconds),t.seconds=fn(t.seconds),t.minutes=fn(t.minutes),t.hours=fn(t.hours),t.months=fn(t.months),t.years=fn(t.years),this},jn.add=function(t,e){return dn(this,t,e,1)},jn.subtract=function(t,e){return dn(this,t,e,-1)},jn.as=function(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=I(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+gn(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(yn(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}},jn.asMilliseconds=vn,jn.asSeconds=bn,jn.asMinutes=_n,jn.asHours=xn,jn.asDays=wn,jn.asWeeks=kn,jn.asMonths=Tn,jn.asQuarters=Cn,jn.asYears=En,jn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*k(this._months/12):NaN},jn._bubble=function(){var t,e,n,r,i,a=this._milliseconds,o=this._days,s=this._months,c=this._data;return 0<=a&&0<=o&&0<=s||a<=0&&o<=0&&s<=0||(a+=864e5*pn(yn(s)+o),s=o=0),c.milliseconds=a%1e3,t=w(a/1e3),c.seconds=t%60,e=w(t/60),c.minutes=e%60,n=w(e/60),c.hours=n%24,s+=i=w(gn(o+=w(n/24))),o-=pn(yn(i)),r=w(s/12),s%=12,c.days=o,c.months=s,c.years=r,this},jn.clone=function(){return Re(this)},jn.get=function(t){return t=I(t),this.isValid()?this[t+"s"]():NaN},jn.milliseconds=An,jn.seconds=Mn,jn.minutes=Nn,jn.hours=Dn,jn.days=Bn,jn.weeks=function(){return w(this.days()/7)},jn.months=Ln,jn.years=On,jn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,n,r,i,a,o,s,c,u,l,h=this.localeData(),f=(e=!t,n=h,r=Re(this).abs(),i=In(r.as("s")),a=In(r.as("m")),o=In(r.as("h")),s=In(r.as("d")),c=In(r.as("M")),u=In(r.as("y")),(l=i<=Rn.ss&&["s",i]||i<Rn.s&&["ss",i]||a<=1&&["m"]||a<Rn.m&&["mm",a]||o<=1&&["h"]||o<Rn.h&&["hh",o]||s<=1&&["d"]||s<Rn.d&&["dd",s]||c<=1&&["M"]||c<Rn.M&&["MM",c]||u<=1&&["y"]||["yy",u])[2]=e,l[3]=0<+this,l[4]=n,function(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}.apply(null,l));return t&&(f=h.pastFuture(+this,f)),h.postformat(f)},jn.toISOString=Yn,jn.toString=Yn,jn.toJSON=Yn,jn.locale=qe,jn.localeData=We,jn.toIsoString=E("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Yn),jn.lang=He,q("X",0,0,"unix"),q("x",0,0,"valueOf"),lt("x",at),lt("X",/[+-]?\d+(\.\d{1,3})?/),pt("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))})),pt("x",(function(t,e,n){n._d=new Date(k(t))})),i.version="2.24.0",e=_e,i.fn=on,i.min=function(){return ke("isBefore",[].slice.call(arguments,0))},i.max=function(){return ke("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=d,i.unix=function(t){return _e(1e3*t)},i.months=function(t,e){return ln(t,e,"months")},i.isDate=u,i.locale=ee,i.invalid=y,i.duration=Re,i.isMoment=x,i.weekdays=function(t,e,n){return hn(t,e,n,"weekdays")},i.parseZone=function(){return _e.apply(null,arguments).parseZone()},i.localeData=re,i.isDuration=Ee,i.monthsShort=function(t,e){return ln(t,e,"monthsShort")},i.weekdaysMin=function(t,e,n){return hn(t,e,n,"weekdaysMin")},i.defineLocale=ne,i.updateLocale=function(t,e){if(null!=e){var n,r,i=Zt;null!=(r=te(t))&&(i=r._config),(n=new B(e=D(i,e))).parentLocale=Qt[t],Qt[t]=n,ee(t)}else null!=Qt[t]&&(null!=Qt[t].parentLocale?Qt[t]=Qt[t].parentLocale:null!=Qt[t]&&delete Qt[t]);return Qt[t]},i.locales=function(){return S(Qt)},i.weekdaysShort=function(t,e,n){return hn(t,e,n,"weekdaysShort")},i.normalizeUnits=I,i.relativeTimeRounding=function(t){return void 0===t?In:"function"==typeof t&&(In=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==Rn[t]&&(void 0===e?Rn[t]:(Rn[t]=e,"s"===t&&(Rn.ss=e-1),!0))},i.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=on,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()},6470:t=>{"use strict";function e(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function n(t,e){for(var n,r="",i=0,a=-1,o=0,s=0;s<=t.length;++s){if(s<t.length)n=t.charCodeAt(s);else{if(47===n)break;n=47}if(47===n){if(a===s-1||1===o);else if(a!==s-1&&2===o){if(r.length<2||2!==i||46!==r.charCodeAt(r.length-1)||46!==r.charCodeAt(r.length-2))if(r.length>2){var c=r.lastIndexOf("/");if(c!==r.length-1){-1===c?(r="",i=0):i=(r=r.slice(0,c)).length-1-r.lastIndexOf("/"),a=s,o=0;continue}}else if(2===r.length||1===r.length){r="",i=0,a=s,o=0;continue}e&&(r.length>0?r+="/..":r="..",i=2)}else r.length>0?r+="/"+t.slice(a+1,s):r=t.slice(a+1,s),i=s-a-1;a=s,o=0}else 46===n&&-1!==o?++o:o=-1}return r}var r={resolve:function(){for(var t,r="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(void 0===t&&(t=process.cwd()),o=t),e(o),0!==o.length&&(r=o+"/"+r,i=47===o.charCodeAt(0))}return r=n(r,!i),i?r.length>0?"/"+r:"/":r.length>0?r:"."},normalize:function(t){if(e(t),0===t.length)return".";var r=47===t.charCodeAt(0),i=47===t.charCodeAt(t.length-1);return 0!==(t=n(t,!r)).length||r||(t="."),t.length>0&&i&&(t+="/"),r?"/"+t:t},isAbsolute:function(t){return e(t),t.length>0&&47===t.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var t,n=0;n<arguments.length;++n){var i=arguments[n];e(i),i.length>0&&(void 0===t?t=i:t+="/"+i)}return void 0===t?".":r.normalize(t)},relative:function(t,n){if(e(t),e(n),t===n)return"";if((t=r.resolve(t))===(n=r.resolve(n)))return"";for(var i=1;i<t.length&&47===t.charCodeAt(i);++i);for(var a=t.length,o=a-i,s=1;s<n.length&&47===n.charCodeAt(s);++s);for(var c=n.length-s,u=o<c?o:c,l=-1,h=0;h<=u;++h){if(h===u){if(c>u){if(47===n.charCodeAt(s+h))return n.slice(s+h+1);if(0===h)return n.slice(s+h)}else o>u&&(47===t.charCodeAt(i+h)?l=h:0===h&&(l=0));break}var f=t.charCodeAt(i+h);if(f!==n.charCodeAt(s+h))break;47===f&&(l=h)}var d="";for(h=i+l+1;h<=a;++h)h!==a&&47!==t.charCodeAt(h)||(0===d.length?d+="..":d+="/..");return d.length>0?d+n.slice(s+l):(s+=l,47===n.charCodeAt(s)&&++s,n.slice(s))},_makeLong:function(t){return t},dirname:function(t){if(e(t),0===t.length)return".";for(var n=t.charCodeAt(0),r=47===n,i=-1,a=!0,o=t.length-1;o>=1;--o)if(47===(n=t.charCodeAt(o))){if(!a){i=o;break}}else a=!1;return-1===i?r?"/":".":r&&1===i?"//":t.slice(0,i)},basename:function(t,n){if(void 0!==n&&"string"!=typeof n)throw new TypeError('"ext" argument must be a string');e(t);var r,i=0,a=-1,o=!0;if(void 0!==n&&n.length>0&&n.length<=t.length){if(n.length===t.length&&n===t)return"";var s=n.length-1,c=-1;for(r=t.length-1;r>=0;--r){var u=t.charCodeAt(r);if(47===u){if(!o){i=r+1;break}}else-1===c&&(o=!1,c=r+1),s>=0&&(u===n.charCodeAt(s)?-1==--s&&(a=r):(s=-1,a=c))}return i===a?a=c:-1===a&&(a=t.length),t.slice(i,a)}for(r=t.length-1;r>=0;--r)if(47===t.charCodeAt(r)){if(!o){i=r+1;break}}else-1===a&&(o=!1,a=r+1);return-1===a?"":t.slice(i,a)},extname:function(t){e(t);for(var n=-1,r=0,i=-1,a=!0,o=0,s=t.length-1;s>=0;--s){var c=t.charCodeAt(s);if(47!==c)-1===i&&(a=!1,i=s+1),46===c?-1===n?n=s:1!==o&&(o=1):-1!==n&&(o=-1);else if(!a){r=s+1;break}}return-1===n||-1===i||0===o||1===o&&n===i-1&&n===r+1?"":t.slice(n,i)},format:function(t){if(null===t||"object"!=typeof t)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof t);return function(t,e){var n=e.dir||e.root,r=e.base||(e.name||"")+(e.ext||"");return n?n===e.root?n+r:n+"/"+r:r}(0,t)},parse:function(t){e(t);var n={root:"",dir:"",base:"",ext:"",name:""};if(0===t.length)return n;var r,i=t.charCodeAt(0),a=47===i;a?(n.root="/",r=1):r=0;for(var o=-1,s=0,c=-1,u=!0,l=t.length-1,h=0;l>=r;--l)if(47!==(i=t.charCodeAt(l)))-1===c&&(u=!1,c=l+1),46===i?-1===o?o=l:1!==h&&(h=1):-1!==o&&(h=-1);else if(!u){s=l+1;break}return-1===o||-1===c||0===h||1===h&&o===c-1&&o===s+1?-1!==c&&(n.base=n.name=0===s&&a?t.slice(1,c):t.slice(s,c)):(0===s&&a?(n.name=t.slice(1,o),n.base=t.slice(1,c)):(n.name=t.slice(s,o),n.base=t.slice(s,c)),n.ext=t.slice(o,c)),s>0?n.dir=t.slice(0,s-1):a&&(n.dir="/"),n},sep:"/",delimiter:":",win32:null,posix:null};r.posix=r,t.exports=r},8218:()=>{},8009:()=>{},5354:()=>{},6878:()=>{},8183:()=>{},1428:()=>{},4551:()=>{},8800:()=>{},1993:()=>{},3069:()=>{},9143:()=>{}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var a=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.c=e,n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r=n(n.s=8968);return r.default})()));
+//# sourceMappingURL=mermaid.min.js.map \ No newline at end of file
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index 47944b82..426c7bfc 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -110,7 +110,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.2.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"19.0.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
@@ -2057,32 +2057,32 @@ function(){var E=k.apply(this,arguments);E.intersects=mxUtils.bind(this,function
m=this.graph.pageScale,q=g.width*m;g=g.height*m;m=Math.floor(Math.min(0,d)/q);var y=Math.floor(Math.min(0,f)/g);return new mxRectangle(this.scale*(this.translate.x+m*q),this.scale*(this.translate.y+y*g),this.scale*(Math.ceil(Math.max(1,d+E.width/this.scale)/q)-m)*q,this.scale*(Math.ceil(Math.max(1,f+E.height/this.scale)/g)-y)*g)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,d){n.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,d,f,g,m,q){var y=D.apply(this,arguments);null==q||q||mxEvent.addListener(y,"mousedown",function(F){mxEvent.consume(F)});return y};var t=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
function(E,d,f){var g=this.graph.model.getParent(E);if(d){var m=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);m=!this.graph.model.isEdge(g)&&!this.graph.isSiblingSelected(E)&&(null!=m&&m.relative||!this.graph.isContainer(g)||this.graph.isPart(E))}else if(m=t.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))m=g,this.graph.isTable(m)||(m=this.graph.model.getParent(m)),m=!this.graph.selectionCellsHandler.isHandled(m)||this.graph.isCellSelected(m)&&this.graph.isToggleEvent(f.getEvent())||
-this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(g);return m};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var d=this.graph.getModel(),f=d.getParent(E),g=this.graph.view.getState(f),m=this.graph.isCellSelected(E);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);m=m||q;if(q||!m&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=f;f=d.getParent(f)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this.editor.graph;n.lightbox=k;var D=n.getGraphBounds;n.getGraphBounds=function(){var I=D.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var P=this.view.translate,R=this.view.scale;I=mxRectangle.fromRectangle(I);I.add(new mxRectangle((P.x+V.x)*R,(P.y+V.y)*R,V.width*R,V.height*R))}return I};n.useCssTransforms&&(this.lazyZoomDelay=
-0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(I,V){this.clearSelectionState()});n.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
-n.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);n.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);n.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);n.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,n.isEnabled=function(){return!1},n.panningHandler.isForcePanningEvent=function(I){return!mxEvent.isPopupTrigger(I.getEvent())});this.actions=new Actions(this);this.menus=
+this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(g);return m};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var d=this.graph.getModel(),f=d.getParent(E),g=this.graph.view.getState(f),m=this.graph.isCellSelected(E);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);m=m||q;if(q||!m&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=f;f=d.getParent(f)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this.editor.graph;n.lightbox=k;var D=n.getGraphBounds;n.getGraphBounds=function(){var J=D.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var P=this.view.translate,R=this.view.scale;J=mxRectangle.fromRectangle(J);J.add(new mxRectangle((P.x+V.x)*R,(P.y+V.y)*R,V.width*R,V.height*R))}return J};n.useCssTransforms&&(this.lazyZoomDelay=
+0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(J,V){this.clearSelectionState()});n.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
+n.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);n.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);n.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);n.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,n.isEnabled=function(){return!1},n.panningHandler.isForcePanningEvent=function(J){return!mxEvent.isPopupTrigger(J.getEvent())});this.actions=new Actions(this);this.menus=
this.createMenus();if(!n.standalone){var t="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
-d="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" ");this.setDefaultStyle=function(I){try{var V=n.getCellStyle(I,!1),P=[],R=[],fa;for(fa in V)P.push(V[fa]),R.push(fa);n.getModel().isEdge(I)?n.currentEdgeStyle={}:n.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",R,"values",P,"cells",[I]))}catch(la){this.handleError(la)}};this.clearDefaultStyle=function(){n.currentEdgeStyle=mxUtils.clone(n.defaultEdgeStyle);
+d="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" ");this.setDefaultStyle=function(J){try{var V=n.getCellStyle(J,!1),P=[],R=[],ia;for(ia in V)P.push(V[ia]),R.push(ia);n.getModel().isEdge(J)?n.currentEdgeStyle={}:n.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",R,"values",P,"cells",[J]))}catch(la){this.handleError(la)}};this.clearDefaultStyle=function(){n.currentEdgeStyle=mxUtils.clone(n.defaultEdgeStyle);
n.currentVertexStyle=mxUtils.clone(n.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(t,f[e])&&t.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),m=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],
-["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<m.length;e++)for(k=0;k<m[e].length;k++)t.push(m[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(t,E[e])&&t.push(E[e]);var q=function(I,V,P,R,fa,la,sa){R=null!=R?R:n.currentVertexStyle;fa=null!=fa?fa:n.currentEdgeStyle;la=null!=la?la:!0;P=null!=P?P:n.getModel();if(sa){sa=[];for(var u=0;u<I.length;u++)sa=sa.concat(P.getDescendants(I[u]));I=sa}P.beginUpdate();try{for(u=0;u<I.length;u++){var J=I[u];if(V)var N=["fontSize",
-"fontFamily","fontColor"];else{var W=P.getStyle(J),T=null!=W?W.split(";"):[];N=t.slice();for(var Q=0;Q<T.length;Q++){var Z=T[Q],oa=Z.indexOf("=");if(0<=oa){var wa=Z.substring(0,oa),Aa=mxUtils.indexOf(N,wa);0<=Aa&&N.splice(Aa,1);for(sa=0;sa<m.length;sa++){var ta=m[sa];if(0<=mxUtils.indexOf(ta,wa))for(var Ba=0;Ba<ta.length;Ba++){var va=mxUtils.indexOf(N,ta[Ba]);0<=va&&N.splice(va,1)}}}}}var Oa=P.isEdge(J);sa=Oa?fa:R;var Ca=P.getStyle(J);for(Q=0;Q<N.length;Q++){wa=N[Q];var Ta=sa[wa];null!=Ta&&"edgeStyle"!=
-wa&&("shape"!=wa||Oa)&&(!Oa||la||0>mxUtils.indexOf(d,wa))&&(Ca=mxUtils.setStyle(Ca,wa,Ta))}Editor.simpleLabels&&(Ca=mxUtils.setStyle(mxUtils.setStyle(Ca,"html",null),"whiteSpace",null));P.setStyle(J,Ca)}}finally{P.endUpdate()}return I};n.addListener("cellsInserted",function(I,V){q(V.getProperty("cells"),null,null,null,null,!0,!0)});n.addListener("textInserted",function(I,V){q(V.getProperty("cells"),!0)});this.insertHandler=q;this.createDivs();this.createUi();this.refresh();var y=mxUtils.bind(this,
-function(I){null==I&&(I=window.event);return n.isEditing()||null!=I&&this.isSelectionAllowed(I)});this.container==document.body&&(this.menubarContainer.onselectstart=y,this.menubarContainer.onmousedown=y,this.toolbarContainer.onselectstart=y,this.toolbarContainer.onmousedown=y,this.diagramContainer.onselectstart=y,this.diagramContainer.onmousedown=y,this.sidebarContainer.onselectstart=y,this.sidebarContainer.onmousedown=y,this.formatContainer.onselectstart=y,this.formatContainer.onmousedown=y,this.footerContainer.onselectstart=
-y,this.footerContainer.onmousedown=y,null!=this.tabContainer&&(this.tabContainer.onselectstart=y));!this.editor.chromeless||this.editor.editable?(e=function(I){if(null!=I){var V=mxEvent.getSource(I);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return y(I)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):n.panningHandler.usePopupTrigger=
-!1;n.init(this.diagramContainer);mxClient.IS_SVG&&null!=n.view.getDrawPane()&&(e=n.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=n.graphHandler){var F=n.graphHandler.start;n.graphHandler.start=function(){null!=ea.hoverIcons&&ea.hoverIcons.reset();F.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(I){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(I)-
-V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(I)-V.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var C=!1,H=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(I,V){return C||H.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(I){32!=I.which||n.isEditing()?mxEvent.isConsumed(I)||27!=I.keyCode||this.hideDialog(null,!0):(C=!0,this.hoverIcons.reset(),
-n.container.style.cursor="move",n.isEditing()||mxEvent.getSource(I)!=n.container||mxEvent.consume(I))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(I){n.container.style.cursor="";C=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var G=n.panningHandler.isForcePanningEvent;n.panningHandler.isForcePanningEvent=function(I){return G.apply(this,arguments)||C||mxEvent.isMouseEvent(I.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(I.getEvent()))&&
-(!mxEvent.isControlDown(I.getEvent())&&mxEvent.isRightMouseButton(I.getEvent())||mxEvent.isMiddleMouseButton(I.getEvent()))};var aa=n.cellEditor.isStopEditingEvent;n.cellEditor.isStopEditingEvent=function(I){return aa.apply(this,arguments)||13==I.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(I)||mxClient.IS_MAC&&mxEvent.isMetaDown(I)||mxClient.IS_SF&&mxEvent.isShiftDown(I))};var da=n.isZoomWheelEvent;n.isZoomWheelEvent=function(){return C||da.apply(this,arguments)};var ba=!1,Y=null,pa=null,O=null,
-X=mxUtils.bind(this,function(){if(null!=this.toolbar&&ba!=n.cellEditor.isContentEditing()){for(var I=this.toolbar.container.firstChild,V=[];null!=I;){var P=I.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,I)&&(I.parentNode.removeChild(I),V.push(I));I=P}I=this.toolbar.fontMenu;P=this.toolbar.sizeMenu;if(null==O)this.toolbar.createTextToolbar();else{for(var R=0;R<O.length;R++)this.toolbar.container.appendChild(O[R]);this.toolbar.fontMenu=Y;this.toolbar.sizeMenu=pa}ba=n.cellEditor.isContentEditing();
-Y=I;pa=P;O=V}}),ea=this,ka=n.cellEditor.startEditing;n.cellEditor.startEditing=function(){ka.apply(this,arguments);X();if(n.cellEditor.isContentEditing()){var I=!1,V=function(){I||(I=!0,window.setTimeout(function(){var P=n.getSelectedEditingElement();null!=P&&(P=mxUtils.getCurrentStyle(P),null!=P&&null!=ea.toolbar&&(ea.toolbar.setFontName(Graph.stripQuotes(P.fontFamily)),ea.toolbar.setFontSize(parseInt(P.fontSize))));I=!1},0))};mxEvent.addListener(n.cellEditor.textarea,"input",V);mxEvent.addListener(n.cellEditor.textarea,
-"touchend",V);mxEvent.addListener(n.cellEditor.textarea,"mouseup",V);mxEvent.addListener(n.cellEditor.textarea,"keyup",V);V()}};var ja=n.cellEditor.stopEditing;n.cellEditor.stopEditing=function(I,V){try{ja.apply(this,arguments),X()}catch(P){ea.handleError(P)}};n.container.setAttribute("tabindex","0");n.container.style.cursor="default";if(window.self===window.top&&null!=n.container.parentNode)try{n.container.focus()}catch(I){}var U=n.fireMouseEvent;n.fireMouseEvent=function(I,V,P){I==mxEvent.MOUSE_DOWN&&
-this.container.focus();U.apply(this,arguments)};n.popupMenuHandler.autoExpand=!0;null!=this.menus&&(n.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(I,V,P){this.menus.createPopupMenu(I,V,P)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(I){n.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};n.connectionHandler.addListener(mxEvent.CONNECT,function(I,V){var P=[V.getProperty("cell")];V.getProperty("terminalInserted")&&
-(P.push(V.getProperty("terminal")),window.setTimeout(function(){null!=ea.hoverIcons&&ea.hoverIcons.update(n.view.getState(P[P.length-1]))},0));q(P)});this.addListener("styleChanged",mxUtils.bind(this,function(I,V){var P=V.getProperty("cells"),R=I=!1;if(0<P.length)for(var fa=0;fa<P.length&&(I=n.getModel().isVertex(P[fa])||I,!(R=n.getModel().isEdge(P[fa])||R)||!I);fa++);else R=I=!0;P=V.getProperty("keys");V=V.getProperty("values");for(fa=0;fa<P.length;fa++){var la=0<=mxUtils.indexOf(f,P[fa]);if("strokeColor"!=
-P[fa]||null!=V[fa]&&"none"!=V[fa])if(0<=mxUtils.indexOf(E,P[fa]))R||0<=mxUtils.indexOf(g,P[fa])?null==V[fa]?delete n.currentEdgeStyle[P[fa]]:n.currentEdgeStyle[P[fa]]=V[fa]:I&&0<=mxUtils.indexOf(t,P[fa])&&(null==V[fa]?delete n.currentVertexStyle[P[fa]]:n.currentVertexStyle[P[fa]]=V[fa]);else if(0<=mxUtils.indexOf(t,P[fa])){if(I||la)null==V[fa]?delete n.currentVertexStyle[P[fa]]:n.currentVertexStyle[P[fa]]=V[fa];if(R||la||0<=mxUtils.indexOf(g,P[fa]))null==V[fa]?delete n.currentEdgeStyle[P[fa]]:n.currentEdgeStyle[P[fa]]=
-V[fa]}}null!=this.toolbar&&(this.toolbar.setFontName(n.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(n.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==n.currentEdgeStyle.edgeStyle&&"1"==n.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==n.currentEdgeStyle.edgeStyle||"none"==n.currentEdgeStyle.edgeStyle||null==
+["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<m.length;e++)for(k=0;k<m[e].length;k++)t.push(m[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(t,E[e])&&t.push(E[e]);var q=function(J,V,P,R,ia,la,ta){R=null!=R?R:n.currentVertexStyle;ia=null!=ia?ia:n.currentEdgeStyle;la=null!=la?la:!0;P=null!=P?P:n.getModel();if(ta){ta=[];for(var u=0;u<J.length;u++)ta=ta.concat(P.getDescendants(J[u]));J=ta}P.beginUpdate();try{for(u=0;u<J.length;u++){var I=J[u];if(V)var N=["fontSize",
+"fontFamily","fontColor"];else{var W=P.getStyle(I),T=null!=W?W.split(";"):[];N=t.slice();for(var Q=0;Q<T.length;Q++){var Z=T[Q],na=Z.indexOf("=");if(0<=na){var va=Z.substring(0,na),Ba=mxUtils.indexOf(N,va);0<=Ba&&N.splice(Ba,1);for(ta=0;ta<m.length;ta++){var sa=m[ta];if(0<=mxUtils.indexOf(sa,va))for(var Da=0;Da<sa.length;Da++){var Aa=mxUtils.indexOf(N,sa[Da]);0<=Aa&&N.splice(Aa,1)}}}}}var za=P.isEdge(I);ta=za?ia:R;var Ca=P.getStyle(I);for(Q=0;Q<N.length;Q++){va=N[Q];var Qa=ta[va];null!=Qa&&"edgeStyle"!=
+va&&("shape"!=va||za)&&(!za||la||0>mxUtils.indexOf(d,va))&&(Ca=mxUtils.setStyle(Ca,va,Qa))}Editor.simpleLabels&&(Ca=mxUtils.setStyle(mxUtils.setStyle(Ca,"html",null),"whiteSpace",null));P.setStyle(I,Ca)}}finally{P.endUpdate()}return J};n.addListener("cellsInserted",function(J,V){q(V.getProperty("cells"),null,null,null,null,!0,!0)});n.addListener("textInserted",function(J,V){q(V.getProperty("cells"),!0)});this.insertHandler=q;this.createDivs();this.createUi();this.refresh();var y=mxUtils.bind(this,
+function(J){null==J&&(J=window.event);return n.isEditing()||null!=J&&this.isSelectionAllowed(J)});this.container==document.body&&(this.menubarContainer.onselectstart=y,this.menubarContainer.onmousedown=y,this.toolbarContainer.onselectstart=y,this.toolbarContainer.onmousedown=y,this.diagramContainer.onselectstart=y,this.diagramContainer.onmousedown=y,this.sidebarContainer.onselectstart=y,this.sidebarContainer.onmousedown=y,this.formatContainer.onselectstart=y,this.formatContainer.onmousedown=y,this.footerContainer.onselectstart=
+y,this.footerContainer.onmousedown=y,null!=this.tabContainer&&(this.tabContainer.onselectstart=y));!this.editor.chromeless||this.editor.editable?(e=function(J){if(null!=J){var V=mxEvent.getSource(J);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return y(J)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):n.panningHandler.usePopupTrigger=
+!1;n.init(this.diagramContainer);mxClient.IS_SVG&&null!=n.view.getDrawPane()&&(e=n.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=n.graphHandler){var F=n.graphHandler.start;n.graphHandler.start=function(){null!=ea.hoverIcons&&ea.hoverIcons.reset();F.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(J){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(J)-
+V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(J)-V.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var C=!1,H=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(J,V){return C||H.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(J){32!=J.which||n.isEditing()?mxEvent.isConsumed(J)||27!=J.keyCode||this.hideDialog(null,!0):(C=!0,this.hoverIcons.reset(),
+n.container.style.cursor="move",n.isEditing()||mxEvent.getSource(J)!=n.container||mxEvent.consume(J))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(J){n.container.style.cursor="";C=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var G=n.panningHandler.isForcePanningEvent;n.panningHandler.isForcePanningEvent=function(J){return G.apply(this,arguments)||C||mxEvent.isMouseEvent(J.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(J.getEvent()))&&
+(!mxEvent.isControlDown(J.getEvent())&&mxEvent.isRightMouseButton(J.getEvent())||mxEvent.isMiddleMouseButton(J.getEvent()))};var aa=n.cellEditor.isStopEditingEvent;n.cellEditor.isStopEditingEvent=function(J){return aa.apply(this,arguments)||13==J.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(J)||mxClient.IS_MAC&&mxEvent.isMetaDown(J)||mxClient.IS_SF&&mxEvent.isShiftDown(J))};var da=n.isZoomWheelEvent;n.isZoomWheelEvent=function(){return C||da.apply(this,arguments)};var ba=!1,Y=null,pa=null,O=null,
+X=mxUtils.bind(this,function(){if(null!=this.toolbar&&ba!=n.cellEditor.isContentEditing()){for(var J=this.toolbar.container.firstChild,V=[];null!=J;){var P=J.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,J)&&(J.parentNode.removeChild(J),V.push(J));J=P}J=this.toolbar.fontMenu;P=this.toolbar.sizeMenu;if(null==O)this.toolbar.createTextToolbar();else{for(var R=0;R<O.length;R++)this.toolbar.container.appendChild(O[R]);this.toolbar.fontMenu=Y;this.toolbar.sizeMenu=pa}ba=n.cellEditor.isContentEditing();
+Y=J;pa=P;O=V}}),ea=this,ka=n.cellEditor.startEditing;n.cellEditor.startEditing=function(){ka.apply(this,arguments);X();if(n.cellEditor.isContentEditing()){var J=!1,V=function(){J||(J=!0,window.setTimeout(function(){var P=n.getSelectedEditingElement();null!=P&&(P=mxUtils.getCurrentStyle(P),null!=P&&null!=ea.toolbar&&(ea.toolbar.setFontName(Graph.stripQuotes(P.fontFamily)),ea.toolbar.setFontSize(parseInt(P.fontSize))));J=!1},0))};mxEvent.addListener(n.cellEditor.textarea,"input",V);mxEvent.addListener(n.cellEditor.textarea,
+"touchend",V);mxEvent.addListener(n.cellEditor.textarea,"mouseup",V);mxEvent.addListener(n.cellEditor.textarea,"keyup",V);V()}};var ja=n.cellEditor.stopEditing;n.cellEditor.stopEditing=function(J,V){try{ja.apply(this,arguments),X()}catch(P){ea.handleError(P)}};n.container.setAttribute("tabindex","0");n.container.style.cursor="default";if(window.self===window.top&&null!=n.container.parentNode)try{n.container.focus()}catch(J){}var U=n.fireMouseEvent;n.fireMouseEvent=function(J,V,P){J==mxEvent.MOUSE_DOWN&&
+this.container.focus();U.apply(this,arguments)};n.popupMenuHandler.autoExpand=!0;null!=this.menus&&(n.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(J,V,P){this.menus.createPopupMenu(J,V,P)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(J){n.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};n.connectionHandler.addListener(mxEvent.CONNECT,function(J,V){var P=[V.getProperty("cell")];V.getProperty("terminalInserted")&&
+(P.push(V.getProperty("terminal")),window.setTimeout(function(){null!=ea.hoverIcons&&ea.hoverIcons.update(n.view.getState(P[P.length-1]))},0));q(P)});this.addListener("styleChanged",mxUtils.bind(this,function(J,V){var P=V.getProperty("cells"),R=J=!1;if(0<P.length)for(var ia=0;ia<P.length&&(J=n.getModel().isVertex(P[ia])||J,!(R=n.getModel().isEdge(P[ia])||R)||!J);ia++);else R=J=!0;P=V.getProperty("keys");V=V.getProperty("values");for(ia=0;ia<P.length;ia++){var la=0<=mxUtils.indexOf(f,P[ia]);if("strokeColor"!=
+P[ia]||null!=V[ia]&&"none"!=V[ia])if(0<=mxUtils.indexOf(E,P[ia]))R||0<=mxUtils.indexOf(g,P[ia])?null==V[ia]?delete n.currentEdgeStyle[P[ia]]:n.currentEdgeStyle[P[ia]]=V[ia]:J&&0<=mxUtils.indexOf(t,P[ia])&&(null==V[ia]?delete n.currentVertexStyle[P[ia]]:n.currentVertexStyle[P[ia]]=V[ia]);else if(0<=mxUtils.indexOf(t,P[ia])){if(J||la)null==V[ia]?delete n.currentVertexStyle[P[ia]]:n.currentVertexStyle[P[ia]]=V[ia];if(R||la||0<=mxUtils.indexOf(g,P[ia]))null==V[ia]?delete n.currentEdgeStyle[P[ia]]:n.currentEdgeStyle[P[ia]]=
+V[ia]}}null!=this.toolbar&&(this.toolbar.setFontName(n.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(n.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==n.currentEdgeStyle.edgeStyle&&"1"==n.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==n.currentEdgeStyle.edgeStyle||"none"==n.currentEdgeStyle.edgeStyle||null==
n.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==n.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==n.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&
-(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==n.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==n.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==n.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var I=n.currentVertexStyle.fontFamily||"Helvetica",V=String(n.currentVertexStyle.fontSize||"12"),P=n.getView().getState(n.getSelectionCell());null!=P&&(I=
-P.style[mxConstants.STYLE_FONTFAMILY]||I,V=P.style[mxConstants.STYLE_FONTSIZE]||V,10<I.length&&(I=I.substring(0,8)+"..."));this.toolbar.setFontName(I);this.toolbar.setFontSize(V)}),n.getSelectionModel().addListener(mxEvent.CHANGE,b),n.getModel().addListener(mxEvent.CHANGE,b));n.addListener(mxEvent.CELLS_ADDED,function(I,V){I=V.getProperty("cells");V=V.getProperty("parent");null!=V&&n.getModel().isLayer(V)&&!n.isCellVisible(V)&&null!=I&&0<I.length&&n.getModel().setVisible(V,!0)});this.gestureHandler=
-mxUtils.bind(this,function(I){null!=this.currentMenu&&mxEvent.getSource(I)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",
+(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==n.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==n.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==n.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var J=n.currentVertexStyle.fontFamily||"Helvetica",V=String(n.currentVertexStyle.fontSize||"12"),P=n.getView().getState(n.getSelectionCell());null!=P&&(J=
+P.style[mxConstants.STYLE_FONTFAMILY]||J,V=P.style[mxConstants.STYLE_FONTSIZE]||V,10<J.length&&(J=J.substring(0,8)+"..."));this.toolbar.setFontName(J);this.toolbar.setFontSize(V)}),n.getSelectionModel().addListener(mxEvent.CHANGE,b),n.getModel().addListener(mxEvent.CHANGE,b));n.addListener(mxEvent.CELLS_ADDED,function(J,V){J=V.getProperty("cells");V=V.getProperty("parent");null!=V&&n.getModel().isLayer(V)&&!n.isCellVisible(V)&&null!=J&&0<J.length&&n.getModel().setVisible(V,!0)});this.gestureHandler=
+mxUtils.bind(this,function(J){null!=this.currentMenu&&mxEvent.getSource(J)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",
this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){n.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){n.view.validateBackground()}));
n.addListener("gridSizeChanged",mxUtils.bind(this,function(){n.isGridEnabled()&&n.view.validateBackground()}));this.editor.resetGraph()}this.init();n.standalone||this.open()};EditorUi.compactUi=!0;
EditorUi.parsePng=function(b,e,k){function n(d,f){var g=t;t+=f;return d.substring(g,t)}function D(d){d=n(d,4);return d.charCodeAt(3)+(d.charCodeAt(2)<<8)+(d.charCodeAt(1)<<16)+(d.charCodeAt(0)<<24)}var t=0;if(n(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(n(b,4),"IHDR"!=n(b,4))null!=k&&k();else{n(b,17);do{k=D(b);var E=n(b,4);if(null!=e&&e(t-8,E,k))break;value=n(b,k);n(b,4);if("IEND"==E)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
@@ -2129,13 +2129,13 @@ EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipb
null;t.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=k.apply(this,arguments);b.updatePasteActionStates();return E};var n=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){n.apply(this,arguments);b.updatePasteActionStates()};var D=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(t,E){D.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var P=this.graph.getPageLayout(),R=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*R.width),this.scale*(this.translate.y+P.y*R.height),this.scale*P.width*R.width,
-this.scale*P.height*R.height)};b.getPreferredPageSize=function(P,R,fa){P=this.getPageLayout();R=this.getPageSize();return new mxRectangle(0,0,P.width*R.width,P.height*R.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,R,fa,la){if(null!=b.container&&!b.isViewer()){fa=null!=fa?fa:0;la=null!=la?la:0;var sa=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),u=mxUtils.hasScrollbars(b.container),J=b.view.translate,N=b.view.scale,
-W=mxRectangle.fromRectangle(sa);W.x=W.x/N-J.x;W.y=W.y/N-J.y;W.width/=N;W.height/=N;J=b.container.scrollTop;var T=b.container.scrollLeft,Q=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Q+=3;var Z=b.container.offsetWidth-Q;Q=b.container.offsetHeight-Q;P=P?Math.max(.3,Math.min(R||1,Z/W.width)):N;R=(Z-P*W.width)/2/P;var oa=0==this.lightboxVerticalDivider?0:(Q-P*W.height)/this.lightboxVerticalDivider/P;u&&(R=Math.max(R,0),oa=Math.max(oa,0));if(u||sa.width<Z||sa.height<
-Q)b.view.scaleAndTranslate(P,Math.floor(R-W.x),Math.floor(oa-W.y)),b.container.scrollTop=J*P/N,b.container.scrollLeft=T*P/N;else if(0!=fa||0!=la)sa=b.view.translate,b.view.setTranslate(Math.floor(sa.x+fa/N),Math.floor(sa.y+la/N))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var n=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",n);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",
+this.scale*P.height*R.height)};b.getPreferredPageSize=function(P,R,ia){P=this.getPageLayout();R=this.getPageSize();return new mxRectangle(0,0,P.width*R.width,P.height*R.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,R,ia,la){if(null!=b.container&&!b.isViewer()){ia=null!=ia?ia:0;la=null!=la?la:0;var ta=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),u=mxUtils.hasScrollbars(b.container),I=b.view.translate,N=b.view.scale,
+W=mxRectangle.fromRectangle(ta);W.x=W.x/N-I.x;W.y=W.y/N-I.y;W.width/=N;W.height/=N;I=b.container.scrollTop;var T=b.container.scrollLeft,Q=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Q+=3;var Z=b.container.offsetWidth-Q;Q=b.container.offsetHeight-Q;P=P?Math.max(.3,Math.min(R||1,Z/W.width)):N;R=(Z-P*W.width)/2/P;var na=0==this.lightboxVerticalDivider?0:(Q-P*W.height)/this.lightboxVerticalDivider/P;u&&(R=Math.max(R,0),na=Math.max(na,0));if(u||ta.width<Z||ta.height<
+Q)b.view.scaleAndTranslate(P,Math.floor(R-W.x),Math.floor(na-W.y)),b.container.scrollTop=I*P/N,b.container.scrollLeft=T*P/N;else if(0!=ia||0!=la)ta=b.view.translate,b.view.setTranslate(Math.floor(ta.x+ia/N),Math.floor(ta.y+la/N))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var n=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",n);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",
n)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(P){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(P){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var D=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";
this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var t=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",t);t();var E=0;t=mxUtils.bind(this,function(P,R,fa){E++;
-var la=document.createElement("span");la.style.paddingLeft="8px";la.style.paddingRight="8px";la.style.cursor="pointer";mxEvent.addListener(la,"click",P);null!=fa&&la.setAttribute("title",fa);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",R);P.style.width="36px";P.style.filter="invert(100%)";la.appendChild(P);this.chromelessToolbar.appendChild(la);return la});null!=D.backBtn&&t(mxUtils.bind(this,function(P){window.location.href=D.backBtn.url;mxEvent.consume(P)}),
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var t=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",t);t();var E=0;t=mxUtils.bind(this,function(P,R,ia){E++;
+var la=document.createElement("span");la.style.paddingLeft="8px";la.style.paddingRight="8px";la.style.cursor="pointer";mxEvent.addListener(la,"click",P);null!=ia&&la.setAttribute("title",ia);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",R);P.style.width="36px";P.style.filter="invert(100%)";la.appendChild(P);this.chromelessToolbar.appendChild(la);return la});null!=D.backBtn&&t(mxUtils.bind(this,function(P){window.location.href=D.backBtn.url;mxEvent.consume(P)}),
Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=t(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),Editor.previousImage,mxResources.get("previousPage")),f=document.createElement("div");f.style.fontFamily=Editor.defaultHtmlFont;f.style.display="inline-block";f.style.verticalAlign="top";f.style.fontWeight="bold";f.style.marginTop="8px";f.style.fontSize="14px";f.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";
this.chromelessToolbar.appendChild(f);var g=t(mxUtils.bind(this,function(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),Editor.nextImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var q=mxUtils.bind(this,
function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",d.style.display="",f.style.display="inline-block"):(g.style.display="none",d.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",m)}t(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();
@@ -2150,18 +2150,18 @@ document.body))&&t(mxUtils.bind(this,function(P){"1"==urlParams.close||D.closeBt
(mxEvent.isShiftDown(P)||H(30),C())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(P){mxEvent.consume(P)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(P){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(P)?C():H(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(P){mxEvent.isShiftDown(P)?C():H(100);mxEvent.consume(P)}));mxEvent.addListener(this.chromelessToolbar,
"mouseleave",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||H(30)}));var ba=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,R){this.startX=R.getGraphX();this.startY=R.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(P,R){},mouseUp:function(P,R){mxEvent.isTouchEvent(R.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ba&&Math.abs(this.scrollTop-b.container.scrollTop)<
ba&&Math.abs(this.startX-R.getGraphX())<ba&&Math.abs(this.startY-R.getGraphY())<ba&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?C():H(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var Y=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var P=this.graph.getPagePadding(),R=this.graph.getPageSize();this.translate.x=P.x-(this.x0||0)*R.width;this.translate.y=P.y-(this.y0||0)*
-R.height}Y.apply(this,arguments)};if(!b.isViewer()){var pa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var P=this.getPageLayout(),R=this.getPagePadding(),fa=this.getPageSize(),la=Math.ceil(2*R.x+P.width*fa.width),sa=Math.ceil(2*R.y+P.height*fa.height),u=b.minimumGraphSize;if(null==u||u.width!=la||u.height!=sa)b.minimumGraphSize=new mxRectangle(0,0,la,sa);la=R.x-P.x*fa.width;R=R.y-P.y*fa.height;this.autoTranslate||this.view.translate.x==
-la&&this.view.translate.y==R?pa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=P.x,this.view.y0=P.y,P=b.view.translate.x,fa=b.view.translate.y,b.view.setTranslate(la,R),b.container.scrollLeft+=Math.round((la-P)*b.view.scale),b.container.scrollTop+=Math.round((R-fa)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var O=b.view.getBackgroundPane(),X=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ea=null,ka=null,
-ja=null,U=null,I=null,V=function(P){null!=ea&&window.clearTimeout(ea);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||U)ea=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),X.style.transformOrigin="",O.style.transformOrigin="",mxClient.IS_SF?
-(X.style.transform="scale(1)",O.style.transform="scale(1)",window.setTimeout(function(){X.style.transform="";O.style.transform=""},0)):(X.style.transform="",O.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var R=new mxPoint(b.container.scrollLeft,b.container.scrollTop),fa=mxUtils.getOffset(b.container),la=b.view.scale,sa=0,u=0;null!=ka&&(sa=b.container.offsetWidth/2-ka.x+fa.x,u=b.container.offsetHeight/2-ka.y+fa.y);b.zoom(b.cumulativeZoomFactor,
-null,b.isFastZoomEnabled()?20:null);b.view.scale!=la&&(null!=ja&&(sa+=R.x-ja.x,u+=R.y-ja.y),null!=e&&k.chromelessResize(!1,null,sa*(b.cumulativeZoomFactor-1),u*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==sa&&0==u||(b.container.scrollLeft-=sa*(b.cumulativeZoomFactor-1),b.container.scrollTop-=u*(b.cumulativeZoomFactor-1)));null!=I&&X.setAttribute("filter",I);b.cumulativeZoomFactor=1;I=U=ka=ja=ea=null}),null!=P?P:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
-function(P,R,fa,la){la=null!=la?la:this.zoomFactor;(R=R||!b.scrollbars)&&(ka=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
-(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==I&&""!=X.getAttribute("filter")&&(I=X.getAttribute("filter"),X.removeAttribute("filter")),ja=new mxPoint(b.container.scrollLeft,b.container.scrollTop),P=R||null==ka?b.container.scrollLeft+
+R.height}Y.apply(this,arguments)};if(!b.isViewer()){var pa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var P=this.getPageLayout(),R=this.getPagePadding(),ia=this.getPageSize(),la=Math.ceil(2*R.x+P.width*ia.width),ta=Math.ceil(2*R.y+P.height*ia.height),u=b.minimumGraphSize;if(null==u||u.width!=la||u.height!=ta)b.minimumGraphSize=new mxRectangle(0,0,la,ta);la=R.x-P.x*ia.width;R=R.y-P.y*ia.height;this.autoTranslate||this.view.translate.x==
+la&&this.view.translate.y==R?pa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=P.x,this.view.y0=P.y,P=b.view.translate.x,ia=b.view.translate.y,b.view.setTranslate(la,R),b.container.scrollLeft+=Math.round((la-P)*b.view.scale),b.container.scrollTop+=Math.round((R-ia)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var O=b.view.getBackgroundPane(),X=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ea=null,ka=null,
+ja=null,U=null,J=null,V=function(P){null!=ea&&window.clearTimeout(ea);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||U)ea=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),X.style.transformOrigin="",O.style.transformOrigin="",mxClient.IS_SF?
+(X.style.transform="scale(1)",O.style.transform="scale(1)",window.setTimeout(function(){X.style.transform="";O.style.transform=""},0)):(X.style.transform="",O.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var R=new mxPoint(b.container.scrollLeft,b.container.scrollTop),ia=mxUtils.getOffset(b.container),la=b.view.scale,ta=0,u=0;null!=ka&&(ta=b.container.offsetWidth/2-ka.x+ia.x,u=b.container.offsetHeight/2-ka.y+ia.y);b.zoom(b.cumulativeZoomFactor,
+null,b.isFastZoomEnabled()?20:null);b.view.scale!=la&&(null!=ja&&(ta+=R.x-ja.x,u+=R.y-ja.y),null!=e&&k.chromelessResize(!1,null,ta*(b.cumulativeZoomFactor-1),u*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==ta&&0==u||(b.container.scrollLeft-=ta*(b.cumulativeZoomFactor-1),b.container.scrollTop-=u*(b.cumulativeZoomFactor-1)));null!=J&&X.setAttribute("filter",J);b.cumulativeZoomFactor=1;J=U=ka=ja=ea=null}),null!=P?P:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
+function(P,R,ia,la){la=null!=la?la:this.zoomFactor;(R=R||!b.scrollbars)&&(ka=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==J&&""!=X.getAttribute("filter")&&(J=X.getAttribute("filter"),X.removeAttribute("filter")),ja=new mxPoint(b.container.scrollLeft,b.container.scrollTop),P=R||null==ka?b.container.scrollLeft+
b.container.clientWidth/2:ka.x+b.container.scrollLeft-b.container.offsetLeft,la=R||null==ka?b.container.scrollTop+b.container.clientHeight/2:ka.y+b.container.scrollTop-b.container.offsetTop,X.style.transformOrigin=P+"px "+la+"px",X.style.transform="scale("+this.cumulativeZoomFactor+")",O.style.transformOrigin=P+"px "+la+"px",O.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(P=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(P.style,
"transform-origin",(R||null==ka?b.container.clientWidth/2+b.container.scrollLeft-P.offsetLeft+"px":ka.x+b.container.scrollLeft-P.offsetLeft-b.container.offsetLeft+"px")+" "+(R||null==ka?b.container.clientHeight/2+b.container.scrollTop-P.offsetTop+"px":ka.y+b.container.scrollTop-P.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(P.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
-k.hoverIcons.reset());V(b.isFastZoomEnabled()?fa:0)};mxEvent.addGestureListeners(b.container,function(P){null!=ea&&window.clearTimeout(ea)},null,function(P){1!=b.cumulativeZoomFactor&&V(0)});mxEvent.addListener(b.container,"scroll",function(P){null==ea||b.isMouseDown||1==b.cumulativeZoomFactor||V(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,R,fa,la,sa){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!fa&&b.isScrollWheelEvent(P))fa=
-b.view.getTranslate(),la=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(fa.x+(R?-la:la),fa.y):b.view.setTranslate(fa.x,fa.y+(R?la:-la));else if(fa||b.isZoomWheelEvent(P))for(var u=mxEvent.getSource(P);null!=u;){if(u==b.container)return b.tooltipHandler.hideTooltip(),ka=null!=la&&null!=sa?new mxPoint(la,sa):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),U=fa,fa=b.zoomFactor,la=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?fa=1+Math.abs(P.deltaY)/
-20*(fa-1):null!=P.movementY&&"pointermove"==P.type&&(fa=1+Math.max(1,Math.abs(P.movementY))/20*(fa-1),la=-1),b.lazyZoom(R,null,la,fa),mxEvent.consume(P),!1;u=u.parentNode}}),b.container);b.panningHandler.zoomGraph=function(P){b.cumulativeZoomFactor=P.scale;b.lazyZoom(0<P.scale,!0);mxEvent.consume(P)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
+k.hoverIcons.reset());V(b.isFastZoomEnabled()?ia:0)};mxEvent.addGestureListeners(b.container,function(P){null!=ea&&window.clearTimeout(ea)},null,function(P){1!=b.cumulativeZoomFactor&&V(0)});mxEvent.addListener(b.container,"scroll",function(P){null==ea||b.isMouseDown||1==b.cumulativeZoomFactor||V(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,R,ia,la,ta){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!ia&&b.isScrollWheelEvent(P))ia=
+b.view.getTranslate(),la=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(ia.x+(R?-la:la),ia.y):b.view.setTranslate(ia.x,ia.y+(R?la:-la));else if(ia||b.isZoomWheelEvent(P))for(var u=mxEvent.getSource(P);null!=u;){if(u==b.container)return b.tooltipHandler.hideTooltip(),ka=null!=la&&null!=ta?new mxPoint(la,ta):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),U=ia,ia=b.zoomFactor,la=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?ia=1+Math.abs(P.deltaY)/
+20*(ia-1):null!=P.movementY&&"pointermove"==P.type&&(ia=1+Math.max(1,Math.abs(P.movementY))/20*(ia-1),la=-1),b.lazyZoom(R,null,la,ia),mxEvent.consume(P),!1;u=u.parentNode}}),b.container);b.panningHandler.zoomGraph=function(P){b.cumulativeZoomFactor=P.scale;b.lazyZoom(0<P.scale,!0);mxEvent.consume(P)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
@@ -2257,35 +2257,35 @@ mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0"
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};
-Graph=function(b,e,k,n,D,t){mxGraph.call(this,b,e,k,n);this.themes=D||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=t?t:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(I){I=this.getCurrentCellStyle(I);
-return null!=I?"1"==I.html||"wrap"==I[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,d=null,f=null,g=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){I=V.getProperty("event");var P=I.getState();V=this.view.scale;if(!mxEvent.isAltDown(I.getEvent())&&null!=P)if(this.model.isEdge(P.cell))if(E=new mxPoint(I.getGraphX(),I.getGraphY()),m=this.isCellSelected(P.cell),f=P,d=I,null!=P.text&&null!=
-P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,I.getGraphX(),I.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var R=this.selectionCellsHandler.getHandler(P.cell);null!=R&&null!=R.bends&&0<R.bends.length&&(g=R.getHandleForEvent(I))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(I.getEvent())&&(R=this.selectionCellsHandler.getHandler(P.cell),null==R||null==R.getHandleForEvent(I))){var fa=new mxRectangle(I.getGraphX()-1,I.getGraphY()-1),la=mxEvent.isTouchEvent(I.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+2)/2;R=la+2;fa.grow(la);if(this.isTableCell(P.cell)&&!this.isCellSelected(P.cell)&&!(mxUtils.contains(P,I.getGraphX()-R,I.getGraphY()-R)&&mxUtils.contains(P,I.getGraphX()-R,I.getGraphY()+R)&&mxUtils.contains(P,I.getGraphX()+R,I.getGraphY()+R)&&mxUtils.contains(P,I.getGraphX()+R,I.getGraphY()-R))){var sa=this.model.getParent(P.cell);R=this.model.getParent(sa);if(!this.isCellSelected(R)){la*=V;var u=2*la;if(this.model.getChildAt(R,0)!=sa&&mxUtils.intersects(fa,
-new mxRectangle(P.x,P.y-la,P.width,u))||this.model.getChildAt(sa,0)!=P.cell&&mxUtils.intersects(fa,new mxRectangle(P.x-la,P.y,u,P.height))||mxUtils.intersects(fa,new mxRectangle(P.x,P.y+P.height-la,P.width,u))||mxUtils.intersects(fa,new mxRectangle(P.x+P.width-la,P.y,u,P.height)))sa=this.selectionCellsHandler.isHandled(R),this.selectCellForEvent(R,I.getEvent()),R=this.selectionCellsHandler.getHandler(R),null!=R&&(la=R.getHandleForEvent(I),null!=la&&(R.start(I.getGraphX(),I.getGraphY(),la),R.blockDelayedSelection=
-!sa,I.consume()))}}for(;!I.isConsumed()&&null!=P&&(this.isTableCell(P.cell)||this.isTableRow(P.cell)||this.isTable(P.cell));)this.isSwimlane(P.cell)&&(R=this.getActualStartSize(P.cell),(0<R.x||0<R.width)&&mxUtils.intersects(fa,new mxRectangle(P.x+(R.x-R.width-1)*V+(0==R.x?P.width:0),P.y,1,P.height))||(0<R.y||0<R.height)&&mxUtils.intersects(fa,new mxRectangle(P.x,P.y+(R.y-R.height-1)*V+(0==R.y?P.height:0),P.width,1)))&&(this.selectCellForEvent(P.cell,I.getEvent()),R=this.selectionCellsHandler.getHandler(P.cell),
-null!=R&&(la=mxEvent.CUSTOM_HANDLE-R.customHandles.length+1,R.start(I.getGraphX(),I.getGraphY(),la),I.consume())),P=this.view.getState(this.model.getParent(P.cell))}}}));this.addMouseListener({mouseDown:function(I,V){},mouseMove:mxUtils.bind(this,function(I,V){I=this.selectionCellsHandler.handlers.map;for(var P in I)if(null!=I[P].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var R=this.tolerance;if(null!=E&&null!=f&&null!=d){if(P=f,Math.abs(E.x-
-V.getGraphX())>R||Math.abs(E.y-V.getGraphY())>R){var fa=this.selectionCellsHandler.getHandler(P.cell);null==fa&&this.model.isEdge(P.cell)&&(fa=this.createHandler(P));if(null!=fa&&null!=fa.bends&&0<fa.bends.length){I=fa.getHandleForEvent(d);var la=this.view.getEdgeStyle(P);R=la==mxEdgeStyle.EntityRelation;m||g!=mxEvent.LABEL_HANDLE||(I=g);if(R&&0!=I&&I!=fa.bends.length-1&&I!=mxEvent.LABEL_HANDLE)!R||null==P.visibleSourceState&&null==P.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(I==
-mxEvent.LABEL_HANDLE||0==I||null!=P.visibleSourceState||I==fa.bends.length-1||null!=P.visibleTargetState)R||I==mxEvent.LABEL_HANDLE||(R=P.absolutePoints,null!=R&&(null==la&&null==I||la==mxEdgeStyle.OrthConnector)&&(I=g,null==I&&(I=new mxRectangle(E.x,E.y),I.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(I,R[0].x,R[0].y)?I=0:mxUtils.contains(I,R[R.length-1].x,R[R.length-1].y)?I=fa.bends.length-1:null!=la&&(2==R.length||3==R.length&&(0==Math.round(R[0].x-R[1].x)&&0==Math.round(R[1].x-
-R[2].x)||0==Math.round(R[0].y-R[1].y)&&0==Math.round(R[1].y-R[2].y)))?I=2:(I=mxUtils.findNearestSegment(P,E.x,E.y),I=null==la?mxEvent.VIRTUAL_HANDLE-I:I+1))),null==I&&(I=mxEvent.VIRTUAL_HANDLE)),fa.start(V.getGraphX(),V.getGraphX(),I),V.consume(),this.graphHandler.reset()}null!=fa&&(this.selectionCellsHandler.isHandlerActive(fa)?this.isCellSelected(P.cell)||(this.selectionCellsHandler.handlers.put(P.cell,fa),this.selectCellForEvent(P.cell,V.getEvent())):this.isCellSelected(P.cell)||fa.destroy());
-m=!1;E=d=f=g=null}}else if(P=V.getState(),null!=P&&this.isCellEditable(P.cell)){fa=null;if(this.model.isEdge(P.cell)){if(I=new mxRectangle(V.getGraphX(),V.getGraphY()),I.grow(mxEdgeHandler.prototype.handleImage.width/2),R=P.absolutePoints,null!=R)if(null!=P.text&&null!=P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,V.getGraphX(),V.getGraphY()))fa="move";else if(mxUtils.contains(I,R[0].x,R[0].y)||mxUtils.contains(I,R[R.length-1].x,R[R.length-1].y))fa="pointer";else if(null!=P.visibleSourceState||
-null!=P.visibleTargetState)I=this.view.getEdgeStyle(P),fa="crosshair",I!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(P)&&(V=mxUtils.findNearestSegment(P,V.getGraphX(),V.getGraphY()),V<R.length-1&&0<=V&&(fa=0==Math.round(R[V].x-R[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){R=mxShape.prototype.svgStrokeTolerance/2;I=new mxRectangle(V.getGraphX(),V.getGraphY());I.grow(R);if(this.isTableCell(P.cell)&&(V=this.model.getParent(P.cell),R=this.model.getParent(V),!this.isCellSelected(R)))if(mxUtils.intersects(I,
-new mxRectangle(P.x,P.y-2,P.width,4))&&this.model.getChildAt(R,0)!=V||mxUtils.intersects(I,new mxRectangle(P.x,P.y+P.height-2,P.width,4)))fa="row-resize";else if(mxUtils.intersects(I,new mxRectangle(P.x-2,P.y,4,P.height))&&this.model.getChildAt(V,0)!=P.cell||mxUtils.intersects(I,new mxRectangle(P.x+P.width-2,P.y,4,P.height)))fa="col-resize";for(V=P;null==fa&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(R=this.getActualStartSize(V.cell),
-la=this.view.scale,(0<R.x||0<R.width)&&mxUtils.intersects(I,new mxRectangle(V.x+(R.x-R.width-1)*la+(0==R.x?V.width*la:0),V.y,1,V.height))?fa="col-resize":(0<R.y||0<R.height)&&mxUtils.intersects(I,new mxRectangle(V.x,V.y+(R.y-R.height-1)*la+(0==R.y?V.height:0),V.width,1))&&(fa="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=fa&&P.setCursor(fa)}}}),mouseUp:mxUtils.bind(this,function(I,V){g=E=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=
-function(I){var V=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);I.view.graph.isHtmlLabel(I.cell)&&(V=1!=I.style.html?mxUtils.htmlEntities(V,!1):I.view.graph.sanitizeHtml(V));return V};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=
-!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(I,V){return!1};this.alternateEdgeStyle="vertical";null==n&&this.loadStylesheet();var q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var I=q.apply(this,arguments);if(this.graph.pageVisible){var V=[],P=this.graph.pageFormat,R=this.graph.pageScale,fa=P.width*R;P=P.height*R;R=this.graph.view.translate;for(var la=this.graph.view.scale,
-sa=this.graph.getPageLayout(),u=0;u<sa.width;u++)V.push(new mxRectangle(((sa.x+u)*fa+R.x)*la,(sa.y*P+R.y)*la,fa*la,P*la));for(u=1;u<sa.height;u++)V.push(new mxRectangle((sa.x*fa+R.x)*la,((sa.y+u)*P+R.y)*la,fa*la,P*la));I=V.concat(I)}return I};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(I,V){return null==I.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(I){this.previewColor="#000000"==this.graph.background?
-"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var y=this.graphHandler.getCells;this.graphHandler.getCells=function(I){for(var V=y.apply(this,arguments),P=new mxDictionary,R=[],fa=0;fa<V.length;fa++){var la=this.graph.isTableCell(I)&&this.graph.isTableCell(V[fa])&&this.graph.isCellSelected(V[fa])?this.graph.model.getParent(V[fa]):this.graph.isTableRow(I)&&this.graph.isTableRow(V[fa])&&this.graph.isCellSelected(V[fa])?V[fa]:
-this.graph.getCompositeParent(V[fa]);null==la||P.get(la)||(P.put(la,!0),R.push(la))}return R};var F=this.graphHandler.start;this.graphHandler.start=function(I,V,P,R){var fa=!1;this.graph.isTableCell(I)&&(this.graph.isCellSelected(I)?fa=!0:I=this.graph.model.getParent(I));fa||this.graph.isTableRow(I)&&this.graph.isCellSelected(I)||(I=this.graph.getCompositeParent(I));F.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(I,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,
-arguments)};var C=new mxRubberband(this);this.getRubberband=function(){return C};var H=(new Date).getTime(),G=0,aa=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var I=this.currentState;aa.apply(this,arguments);I!=this.currentState?(H=(new Date).getTime(),G=0):G=(new Date).getTime()-H};var da=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(I){return mxEvent.isShiftDown(I.getEvent())&&mxEvent.isAltDown(I.getEvent())?!1:
-null!=this.currentState&&I.getState()==this.currentState&&2E3<G||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&da.apply(this,arguments)};var ba=this.isToggleEvent;this.isToggleEvent=function(I){return ba.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(I)};var Y=C.isForceRubberbandEvent;C.isForceRubberbandEvent=function(I){return Y.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(I.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&
-mxClient.IS_FF&&mxClient.IS_WIN&&null==I.getState()&&mxEvent.isTouchEvent(I.getEvent())};var pa=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(pa=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=pa)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(I){return mxEvent.isMouseEvent(I.getEvent())};
-var O=this.click;this.click=function(I){var V=null==I.state&&null!=I.sourceState&&this.isCellLocked(I.sourceState.cell);if(this.isEnabled()&&!V||I.isConsumed())return O.apply(this,arguments);var P=V?I.sourceState.cell:I.getCell();null!=P&&(P=this.getClickableLinkForCell(P),null!=P&&(this.isCustomLink(P)?this.customLinkClicked(P):this.openLink(P)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(I){return I.sourceState};var X=this.tooltipHandler.show;this.tooltipHandler.show=
-function(){X.apply(this,arguments);if(null!=this.div)for(var I=this.div.getElementsByTagName("a"),V=0;V<I.length;V++)null!=I[V].getAttribute("href")&&null==I[V].getAttribute("target")&&I[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(I){return I.sourceState};this.getCursorForMouseEvent=function(I){var V=null==I.state&&null!=I.sourceState&&this.isCellLocked(I.sourceState.cell);return this.getCursorForCell(V?I.sourceState.cell:I.getCell())};var ea=this.getCursorForCell;
-this.getCursorForCell=function(I){if(!this.isEnabled()||this.isCellLocked(I)){if(null!=this.getClickableLinkForCell(I))return"pointer";if(this.isCellLocked(I))return"default"}return ea.apply(this,arguments)};this.selectRegion=function(I,V){var P=mxEvent.isAltDown(V)?I:null;I=this.getCells(I.x,I.y,I.width,I.height,null,null,P,function(R){return"1"==mxUtils.getValue(R.style,"locked","0")},!0);if(this.isToggleEvent(V))for(P=0;P<I.length;P++)this.selectCellForEvent(I[P],V);else this.selectCellsForEvent(I,
-V);return I};var ka=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(I,V,P){return this.graph.isCellSelected(I)?!1:ka.apply(this,arguments)};this.isCellLocked=function(I){for(;null!=I;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(I),"locked","0"))return!0;I=this.model.getParent(I)}return!1};var ja=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,V){"mouseDown"==V.getProperty("eventName")&&(I=V.getProperty("event").getState(),
-ja=null==I||this.isSelectionEmpty()||this.isCellSelected(I.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(I,V){if(!mxEvent.isMultiTouchEvent(V)){I=V.getProperty("event");var P=V.getProperty("cell");null==P?(I=mxUtils.convertPoint(this.container,mxEvent.getClientX(I),mxEvent.getClientY(I)),C.start(I.x,I.y)):null!=ja?this.addSelectionCells(ja):1<this.getSelectionCount()&&this.isCellSelected(P)&&this.removeSelectionCell(P);ja=null;V.consume()}}));
-this.connectionHandler.selectCells=function(I,V){this.graph.setSelectionCell(V||I)};this.connectionHandler.constraintHandler.isStateIgnored=function(I,V){var P=I.view.graph;return V&&(P.isCellSelected(I.cell)||P.isTableRow(I.cell)&&P.selectionCellsHandler.isHandled(P.model.getParent(I.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var I=this.connectionHandler.constraintHandler;null!=I.currentFocus&&I.isStateIgnored(I.currentFocus,!0)&&(I.currentFocus=null,I.constraints=
-null,I.destroyIcons());I.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var U=this.updateMouseEvent;this.updateMouseEvent=function(I){I=U.apply(this,arguments);null!=I.state&&this.isCellLocked(I.getCell())&&(I.state=null);return I}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
+Graph=function(b,e,k,n,D,t){mxGraph.call(this,b,e,k,n);this.themes=D||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=t?t:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(J){J=this.getCurrentCellStyle(J);
+return null!=J?"1"==J.html||"wrap"==J[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,d=null,f=null,g=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){J=V.getProperty("event");var P=J.getState();V=this.view.scale;if(!mxEvent.isAltDown(J.getEvent())&&null!=P)if(this.model.isEdge(P.cell))if(E=new mxPoint(J.getGraphX(),J.getGraphY()),m=this.isCellSelected(P.cell),f=P,d=J,null!=P.text&&null!=
+P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,J.getGraphX(),J.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var R=this.selectionCellsHandler.getHandler(P.cell);null!=R&&null!=R.bends&&0<R.bends.length&&(g=R.getHandleForEvent(J))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(J.getEvent())&&(R=this.selectionCellsHandler.getHandler(P.cell),null==R||null==R.getHandleForEvent(J))){var ia=new mxRectangle(J.getGraphX()-1,J.getGraphY()-1),la=mxEvent.isTouchEvent(J.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+2)/2;R=la+2;ia.grow(la);if(this.isTableCell(P.cell)&&!this.isCellSelected(P.cell)&&!(mxUtils.contains(P,J.getGraphX()-R,J.getGraphY()-R)&&mxUtils.contains(P,J.getGraphX()-R,J.getGraphY()+R)&&mxUtils.contains(P,J.getGraphX()+R,J.getGraphY()+R)&&mxUtils.contains(P,J.getGraphX()+R,J.getGraphY()-R))){var ta=this.model.getParent(P.cell);R=this.model.getParent(ta);if(!this.isCellSelected(R)){la*=V;var u=2*la;if(this.model.getChildAt(R,0)!=ta&&mxUtils.intersects(ia,
+new mxRectangle(P.x,P.y-la,P.width,u))||this.model.getChildAt(ta,0)!=P.cell&&mxUtils.intersects(ia,new mxRectangle(P.x-la,P.y,u,P.height))||mxUtils.intersects(ia,new mxRectangle(P.x,P.y+P.height-la,P.width,u))||mxUtils.intersects(ia,new mxRectangle(P.x+P.width-la,P.y,u,P.height)))ta=this.selectionCellsHandler.isHandled(R),this.selectCellForEvent(R,J.getEvent()),R=this.selectionCellsHandler.getHandler(R),null!=R&&(la=R.getHandleForEvent(J),null!=la&&(R.start(J.getGraphX(),J.getGraphY(),la),R.blockDelayedSelection=
+!ta,J.consume()))}}for(;!J.isConsumed()&&null!=P&&(this.isTableCell(P.cell)||this.isTableRow(P.cell)||this.isTable(P.cell));)this.isSwimlane(P.cell)&&(R=this.getActualStartSize(P.cell),(0<R.x||0<R.width)&&mxUtils.intersects(ia,new mxRectangle(P.x+(R.x-R.width-1)*V+(0==R.x?P.width:0),P.y,1,P.height))||(0<R.y||0<R.height)&&mxUtils.intersects(ia,new mxRectangle(P.x,P.y+(R.y-R.height-1)*V+(0==R.y?P.height:0),P.width,1)))&&(this.selectCellForEvent(P.cell,J.getEvent()),R=this.selectionCellsHandler.getHandler(P.cell),
+null!=R&&(la=mxEvent.CUSTOM_HANDLE-R.customHandles.length+1,R.start(J.getGraphX(),J.getGraphY(),la),J.consume())),P=this.view.getState(this.model.getParent(P.cell))}}}));this.addMouseListener({mouseDown:function(J,V){},mouseMove:mxUtils.bind(this,function(J,V){J=this.selectionCellsHandler.handlers.map;for(var P in J)if(null!=J[P].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var R=this.tolerance;if(null!=E&&null!=f&&null!=d){if(P=f,Math.abs(E.x-
+V.getGraphX())>R||Math.abs(E.y-V.getGraphY())>R){var ia=this.selectionCellsHandler.getHandler(P.cell);null==ia&&this.model.isEdge(P.cell)&&(ia=this.createHandler(P));if(null!=ia&&null!=ia.bends&&0<ia.bends.length){J=ia.getHandleForEvent(d);var la=this.view.getEdgeStyle(P);R=la==mxEdgeStyle.EntityRelation;m||g!=mxEvent.LABEL_HANDLE||(J=g);if(R&&0!=J&&J!=ia.bends.length-1&&J!=mxEvent.LABEL_HANDLE)!R||null==P.visibleSourceState&&null==P.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(J==
+mxEvent.LABEL_HANDLE||0==J||null!=P.visibleSourceState||J==ia.bends.length-1||null!=P.visibleTargetState)R||J==mxEvent.LABEL_HANDLE||(R=P.absolutePoints,null!=R&&(null==la&&null==J||la==mxEdgeStyle.OrthConnector)&&(J=g,null==J&&(J=new mxRectangle(E.x,E.y),J.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(J,R[0].x,R[0].y)?J=0:mxUtils.contains(J,R[R.length-1].x,R[R.length-1].y)?J=ia.bends.length-1:null!=la&&(2==R.length||3==R.length&&(0==Math.round(R[0].x-R[1].x)&&0==Math.round(R[1].x-
+R[2].x)||0==Math.round(R[0].y-R[1].y)&&0==Math.round(R[1].y-R[2].y)))?J=2:(J=mxUtils.findNearestSegment(P,E.x,E.y),J=null==la?mxEvent.VIRTUAL_HANDLE-J:J+1))),null==J&&(J=mxEvent.VIRTUAL_HANDLE)),ia.start(V.getGraphX(),V.getGraphX(),J),V.consume(),this.graphHandler.reset()}null!=ia&&(this.selectionCellsHandler.isHandlerActive(ia)?this.isCellSelected(P.cell)||(this.selectionCellsHandler.handlers.put(P.cell,ia),this.selectCellForEvent(P.cell,V.getEvent())):this.isCellSelected(P.cell)||ia.destroy());
+m=!1;E=d=f=g=null}}else if(P=V.getState(),null!=P&&this.isCellEditable(P.cell)){ia=null;if(this.model.isEdge(P.cell)){if(J=new mxRectangle(V.getGraphX(),V.getGraphY()),J.grow(mxEdgeHandler.prototype.handleImage.width/2),R=P.absolutePoints,null!=R)if(null!=P.text&&null!=P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,V.getGraphX(),V.getGraphY()))ia="move";else if(mxUtils.contains(J,R[0].x,R[0].y)||mxUtils.contains(J,R[R.length-1].x,R[R.length-1].y))ia="pointer";else if(null!=P.visibleSourceState||
+null!=P.visibleTargetState)J=this.view.getEdgeStyle(P),ia="crosshair",J!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(P)&&(V=mxUtils.findNearestSegment(P,V.getGraphX(),V.getGraphY()),V<R.length-1&&0<=V&&(ia=0==Math.round(R[V].x-R[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){R=mxShape.prototype.svgStrokeTolerance/2;J=new mxRectangle(V.getGraphX(),V.getGraphY());J.grow(R);if(this.isTableCell(P.cell)&&(V=this.model.getParent(P.cell),R=this.model.getParent(V),!this.isCellSelected(R)))if(mxUtils.intersects(J,
+new mxRectangle(P.x,P.y-2,P.width,4))&&this.model.getChildAt(R,0)!=V||mxUtils.intersects(J,new mxRectangle(P.x,P.y+P.height-2,P.width,4)))ia="row-resize";else if(mxUtils.intersects(J,new mxRectangle(P.x-2,P.y,4,P.height))&&this.model.getChildAt(V,0)!=P.cell||mxUtils.intersects(J,new mxRectangle(P.x+P.width-2,P.y,4,P.height)))ia="col-resize";for(V=P;null==ia&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(R=this.getActualStartSize(V.cell),
+la=this.view.scale,(0<R.x||0<R.width)&&mxUtils.intersects(J,new mxRectangle(V.x+(R.x-R.width-1)*la+(0==R.x?V.width*la:0),V.y,1,V.height))?ia="col-resize":(0<R.y||0<R.height)&&mxUtils.intersects(J,new mxRectangle(V.x,V.y+(R.y-R.height-1)*la+(0==R.y?V.height:0),V.width,1))&&(ia="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=ia&&P.setCursor(ia)}}}),mouseUp:mxUtils.bind(this,function(J,V){g=E=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=
+function(J){var V=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);J.view.graph.isHtmlLabel(J.cell)&&(V=1!=J.style.html?mxUtils.htmlEntities(V,!1):J.view.graph.sanitizeHtml(V));return V};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=
+!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(J,V){return!1};this.alternateEdgeStyle="vertical";null==n&&this.loadStylesheet();var q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var J=q.apply(this,arguments);if(this.graph.pageVisible){var V=[],P=this.graph.pageFormat,R=this.graph.pageScale,ia=P.width*R;P=P.height*R;R=this.graph.view.translate;for(var la=this.graph.view.scale,
+ta=this.graph.getPageLayout(),u=0;u<ta.width;u++)V.push(new mxRectangle(((ta.x+u)*ia+R.x)*la,(ta.y*P+R.y)*la,ia*la,P*la));for(u=1;u<ta.height;u++)V.push(new mxRectangle((ta.x*ia+R.x)*la,((ta.y+u)*P+R.y)*la,ia*la,P*la));J=V.concat(J)}return J};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(J,V){return null==J.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(J){this.previewColor="#000000"==this.graph.background?
+"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var y=this.graphHandler.getCells;this.graphHandler.getCells=function(J){for(var V=y.apply(this,arguments),P=new mxDictionary,R=[],ia=0;ia<V.length;ia++){var la=this.graph.isTableCell(J)&&this.graph.isTableCell(V[ia])&&this.graph.isCellSelected(V[ia])?this.graph.model.getParent(V[ia]):this.graph.isTableRow(J)&&this.graph.isTableRow(V[ia])&&this.graph.isCellSelected(V[ia])?V[ia]:
+this.graph.getCompositeParent(V[ia]);null==la||P.get(la)||(P.put(la,!0),R.push(la))}return R};var F=this.graphHandler.start;this.graphHandler.start=function(J,V,P,R){var ia=!1;this.graph.isTableCell(J)&&(this.graph.isCellSelected(J)?ia=!0:J=this.graph.model.getParent(J));ia||this.graph.isTableRow(J)&&this.graph.isCellSelected(J)||(J=this.graph.getCompositeParent(J));F.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(J,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,
+arguments)};var C=new mxRubberband(this);this.getRubberband=function(){return C};var H=(new Date).getTime(),G=0,aa=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var J=this.currentState;aa.apply(this,arguments);J!=this.currentState?(H=(new Date).getTime(),G=0):G=(new Date).getTime()-H};var da=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(J){return mxEvent.isShiftDown(J.getEvent())&&mxEvent.isAltDown(J.getEvent())?!1:
+null!=this.currentState&&J.getState()==this.currentState&&2E3<G||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&da.apply(this,arguments)};var ba=this.isToggleEvent;this.isToggleEvent=function(J){return ba.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(J)};var Y=C.isForceRubberbandEvent;C.isForceRubberbandEvent=function(J){return Y.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(J.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&
+mxClient.IS_FF&&mxClient.IS_WIN&&null==J.getState()&&mxEvent.isTouchEvent(J.getEvent())};var pa=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(pa=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=pa)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(J){return mxEvent.isMouseEvent(J.getEvent())};
+var O=this.click;this.click=function(J){var V=null==J.state&&null!=J.sourceState&&this.isCellLocked(J.sourceState.cell);if(this.isEnabled()&&!V||J.isConsumed())return O.apply(this,arguments);var P=V?J.sourceState.cell:J.getCell();null!=P&&(P=this.getClickableLinkForCell(P),null!=P&&(this.isCustomLink(P)?this.customLinkClicked(P):this.openLink(P)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(J){return J.sourceState};var X=this.tooltipHandler.show;this.tooltipHandler.show=
+function(){X.apply(this,arguments);if(null!=this.div)for(var J=this.div.getElementsByTagName("a"),V=0;V<J.length;V++)null!=J[V].getAttribute("href")&&null==J[V].getAttribute("target")&&J[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(J){return J.sourceState};this.getCursorForMouseEvent=function(J){var V=null==J.state&&null!=J.sourceState&&this.isCellLocked(J.sourceState.cell);return this.getCursorForCell(V?J.sourceState.cell:J.getCell())};var ea=this.getCursorForCell;
+this.getCursorForCell=function(J){if(!this.isEnabled()||this.isCellLocked(J)){if(null!=this.getClickableLinkForCell(J))return"pointer";if(this.isCellLocked(J))return"default"}return ea.apply(this,arguments)};this.selectRegion=function(J,V){var P=mxEvent.isAltDown(V)?J:null;J=this.getCells(J.x,J.y,J.width,J.height,null,null,P,function(R){return"1"==mxUtils.getValue(R.style,"locked","0")},!0);if(this.isToggleEvent(V))for(P=0;P<J.length;P++)this.selectCellForEvent(J[P],V);else this.selectCellsForEvent(J,
+V);return J};var ka=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(J,V,P){return this.graph.isCellSelected(J)?!1:ka.apply(this,arguments)};this.isCellLocked=function(J){for(;null!=J;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(J),"locked","0"))return!0;J=this.model.getParent(J)}return!1};var ja=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,V){"mouseDown"==V.getProperty("eventName")&&(J=V.getProperty("event").getState(),
+ja=null==J||this.isSelectionEmpty()||this.isCellSelected(J.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(J,V){if(!mxEvent.isMultiTouchEvent(V)){J=V.getProperty("event");var P=V.getProperty("cell");null==P?(J=mxUtils.convertPoint(this.container,mxEvent.getClientX(J),mxEvent.getClientY(J)),C.start(J.x,J.y)):null!=ja?this.addSelectionCells(ja):1<this.getSelectionCount()&&this.isCellSelected(P)&&this.removeSelectionCell(P);ja=null;V.consume()}}));
+this.connectionHandler.selectCells=function(J,V){this.graph.setSelectionCell(V||J)};this.connectionHandler.constraintHandler.isStateIgnored=function(J,V){var P=J.view.graph;return V&&(P.isCellSelected(J.cell)||P.isTableRow(J.cell)&&P.selectionCellsHandler.isHandled(P.model.getParent(J.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var J=this.connectionHandler.constraintHandler;null!=J.currentFocus&&J.isStateIgnored(J.currentFocus,!0)&&(J.currentFocus=null,J.constraints=
+null,J.destroyIcons());J.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var U=this.updateMouseEvent;this.updateMouseEvent=function(J){J=U.apply(this,arguments);null!=J.state&&this.isCellLocked(J.getCell())&&(J.state=null);return J}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");
@@ -2460,8 +2460,8 @@ k));t&&g<d+Graph.minTableColumnWidth&&(k=k.clone(),k.width=d+e.width+e.x+Graph.m
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(m,q){q=null!=q?q:!0;var y=this.getState(m);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&!y.invalid&&this.updateLineJumps(y)&&this.graph.cellRenderer.redraw(y,!1,this.isRendering());y=e.apply(this,
arguments);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(y);return y};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var m=this.node.getElementsByTagName("path");if(1<m.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&m[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var q=this.state.view.graph.getFlowAnimationStyle();null!=q&&m[1].setAttribute("class",q.getAttribute("id"))}}};var n=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(m,q){return n.apply(this,arguments)||null!=m.routedPoints&&null!=q.routedPoints&&!mxUtils.equalPoints(q.routedPoints,m.routedPoints)};var D=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(m){D.apply(this,arguments);this.graph.model.isEdge(m.cell)&&1!=m.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(m)};mxGraphView.prototype.updateLineJumps=function(m){var q=m.absolutePoints;if(Graph.lineJumpsEnabled){var y=null!=m.routedPoints,F=null;if(null!=q&&null!=this.validEdges&&"none"!==mxUtils.getValue(m.style,"jumpStyle","none")){var C=function(ja,U,I){var V=new mxPoint(U,I);V.type=ja;F.push(V);V=null!=m.routedPoints?m.routedPoints[F.length-1]:null;return null==V||V.type!=
-ja||V.x!=U||V.y!=I},H=.5*this.scale;y=!1;F=[];for(var G=0;G<q.length-1;G++){for(var aa=q[G+1],da=q[G],ba=[],Y=q[G+2];G<q.length-2&&mxUtils.ptSegDistSq(da.x,da.y,Y.x,Y.y,aa.x,aa.y)<1*this.scale*this.scale;)aa=Y,G++,Y=q[G+2];y=C(0,da.x,da.y)||y;for(var pa=0;pa<this.validEdges.length;pa++){var O=this.validEdges[pa],X=O.absolutePoints;if(null!=X&&mxUtils.intersects(m,O)&&"1"!=O.style.noJump)for(O=0;O<X.length-1;O++){var ea=X[O+1],ka=X[O];for(Y=X[O+2];O<X.length-2&&mxUtils.ptSegDistSq(ka.x,ka.y,Y.x,Y.y,
+function(m){D.apply(this,arguments);this.graph.model.isEdge(m.cell)&&1!=m.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(m)};mxGraphView.prototype.updateLineJumps=function(m){var q=m.absolutePoints;if(Graph.lineJumpsEnabled){var y=null!=m.routedPoints,F=null;if(null!=q&&null!=this.validEdges&&"none"!==mxUtils.getValue(m.style,"jumpStyle","none")){var C=function(ja,U,J){var V=new mxPoint(U,J);V.type=ja;F.push(V);V=null!=m.routedPoints?m.routedPoints[F.length-1]:null;return null==V||V.type!=
+ja||V.x!=U||V.y!=J},H=.5*this.scale;y=!1;F=[];for(var G=0;G<q.length-1;G++){for(var aa=q[G+1],da=q[G],ba=[],Y=q[G+2];G<q.length-2&&mxUtils.ptSegDistSq(da.x,da.y,Y.x,Y.y,aa.x,aa.y)<1*this.scale*this.scale;)aa=Y,G++,Y=q[G+2];y=C(0,da.x,da.y)||y;for(var pa=0;pa<this.validEdges.length;pa++){var O=this.validEdges[pa],X=O.absolutePoints;if(null!=X&&mxUtils.intersects(m,O)&&"1"!=O.style.noJump)for(O=0;O<X.length-1;O++){var ea=X[O+1],ka=X[O];for(Y=X[O+2];O<X.length-2&&mxUtils.ptSegDistSq(ka.x,ka.y,Y.x,Y.y,
ea.x,ea.y)<1*this.scale*this.scale;)ea=Y,O++,Y=X[O+2];Y=mxUtils.intersection(da.x,da.y,aa.x,aa.y,ka.x,ka.y,ea.x,ea.y);if(null!=Y&&(Math.abs(Y.x-da.x)>H||Math.abs(Y.y-da.y)>H)&&(Math.abs(Y.x-aa.x)>H||Math.abs(Y.y-aa.y)>H)&&(Math.abs(Y.x-ka.x)>H||Math.abs(Y.y-ka.y)>H)&&(Math.abs(Y.x-ea.x)>H||Math.abs(Y.y-ea.y)>H)){ea=Y.x-da.x;ka=Y.y-da.y;Y={distSq:ea*ea+ka*ka,x:Y.x,y:Y.y};for(ea=0;ea<ba.length;ea++)if(ba[ea].distSq>Y.distSq){ba.splice(ea,0,Y);Y=null;break}null==Y||0!=ba.length&&ba[ba.length-1].x===
Y.x&&ba[ba.length-1].y===Y.y||ba.push(Y)}}}for(O=0;O<ba.length;O++)y=C(1,ba[O].x,ba[O].y)||y}Y=q[q.length-1];y=C(0,Y.x,Y.y)||y}m.routedPoints=F;return y}return!1};var t=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(m,q,y){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)t.apply(this,arguments);else{var F=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
mxConstants.LINE_ARCSIZE)/2,C=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),G=!0,aa=null,da=null,ba=[],Y=null;m.begin();for(var pa=0;pa<this.state.routedPoints.length;pa++){var O=this.state.routedPoints[pa],X=new mxPoint(O.x/this.scale,O.y/this.scale);0==pa?X=q[0]:pa==this.state.routedPoints.length-1&&(X=q[q.length-1]);var ea=!1;if(null!=aa&&1==O.type){var ka=this.state.routedPoints[pa+1];O=ka.x/this.scale-
@@ -2488,100 +2488,100 @@ return z};mxConnectionHandler.prototype.updatePreview=function(z){};var E=mxConn
function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",L="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),M=0;M<L.length;M++)null!=this.currentEdgeStyle[L[M]]&&(z+=L[M]+"="+this.currentEdgeStyle[L[M]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
(z+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?z+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(z+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(z+="elbow="+this.currentEdgeStyle.elbow+";");return z=null!=this.currentEdgeStyle.html?z+("html="+this.currentEdgeStyle.html+";"):z+"html=1;"};
Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,L){L=null!=L?L:{};for(var M=0;M<z.length;M++){var S=z[M];L[mxObjectIdentity.get(S)]=S.getId();for(var ca=this.model.getChildCount(S),
-ia=0;ia<ca;ia++)this.createCellLookup([this.model.getChildAt(S,ia)],L)}return L};Graph.prototype.createCellMapping=function(z,L,M){M=null!=M?M:{};for(var S in z){var ca=L[S];null==M[ca]&&(M[ca]=z[S].getId()||"")}return M};Graph.prototype.importGraphModel=function(z,L,M,S){L=null!=L?L:0;M=null!=M?M:0;var ca=new mxCodec(z.ownerDocument),ia=new mxGraphModel;ca.decode(z,ia);z=[];ca={};var na={},ra=ia.getChildren(this.cloneCell(ia.root,this.isCloneInvalidEdges(),ca));if(null!=ra){var qa=this.createCellLookup([ia.root]);
-ra=ra.slice();this.model.beginUpdate();try{if(1!=ra.length||this.isCellLocked(this.getDefaultParent()))for(ia=0;ia<ra.length;ia++)ya=this.model.getChildren(this.moveCells([ra[ia]],L,M,!1,this.model.getRoot())[0]),null!=ya&&(z=z.concat(ya));else{var ya=ia.getChildren(ra[0]);null!=ya&&(z=this.moveCells(ya,L,M,!1,this.getDefaultParent()),na[ia.getChildAt(ia.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(ca,qa,na),this.updateCustomLinks(na,z),S)){this.isGridEnabled()&&
-(L=this.snap(L),M=this.snap(M));var Ea=this.getBoundingBoxFromGeometry(z,!0);null!=Ea&&this.moveCells(z,L-Ea.x,M-Ea.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var L={},M=this.cloneCells(z,null,L),S=new mxDictionary,ca=0;ca<z.length;ca++)S.put(z[ca],!0);var ia=new mxCodec,na=new mxGraphModel,ra=na.getChildAt(na.getRoot(),0);for(ca=0;ca<M.length;ca++){na.add(ra,M[ca]);var qa=this.view.getState(z[ca]);if(null!=qa){var ya=this.getCellGeometry(M[ca]);null!=
-ya&&ya.relative&&!this.model.isEdge(z[ca])&&null==S.get(this.model.getParent(z[ca]))&&(ya.offset=null,ya.relative=!1,ya.x=qa.x/qa.view.scale-qa.view.translate.x,ya.y=qa.y/qa.view.scale-qa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(L,this.createCellLookup(z)),M);return ia.encode(na)};Graph.prototype.isSwimlane=function(z,L){var M=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(M=this.getCurrentCellStyle(z,L)[mxConstants.STYLE_SHAPE]);return M==
-mxConstants.SHAPE_SWIMLANE||"table"==M||"tableRow"==M};var d=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var L=this.model.getParent(z);if(null!=L){var M=this.getCurrentCellStyle(L);if(null!=M.expand)return"0"!=M.expand}return d.apply(this,arguments)&&(null==L||!this.isTable(L))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,L,M,S,ca,ia,na,ra){null==ra&&(ra=this.model.getParent(z),this.isTable(ra)||this.isTableRow(ra))&&(ra=this.getCellAt(ia,na,
-null,!0,!1));M=null;this.model.beginUpdate();try{M=f.apply(this,[z,L,M,S,ca,ia,na,ra]);this.model.setValue(M,"");var qa=this.getChildCells(M,!0);for(L=0;L<qa.length;L++){var ya=this.getCellGeometry(qa[L]);null!=ya&&ya.relative&&0<ya.x&&this.model.remove(qa[L])}var Ea=this.getChildCells(z,!0);for(L=0;L<Ea.length;L++)ya=this.getCellGeometry(Ea[L]),null!=ya&&ya.relative&&0>=ya.x&&this.model.remove(Ea[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[M]);this.setCellStyles(mxConstants.STYLE_ENDARROW,
-mxConstants.NONE,[M]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Na=this.model.getTerminal(M,!1);if(null!=Na){var Pa=this.getCurrentCellStyle(Na);null!=Pa&&"1"==Pa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[M]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[M]))}}finally{this.model.endUpdate()}return M};
-var g=Graph.prototype.selectCell;Graph.prototype.selectCell=function(z,L,M){if(L||M)g.apply(this,arguments);else{var S=this.getSelectionCell(),ca=null,ia=[],na=mxUtils.bind(this,function(ra){if(null!=this.view.getState(ra)&&(this.model.isVertex(ra)||this.model.isEdge(ra)))if(ia.push(ra),ra==S)ca=ia.length-1;else if(z&&null==S&&0<ia.length||null!=ca&&z&&ia.length>ca||!z&&0<ca)return;for(var qa=0;qa<this.model.getChildCount(ra);qa++)na(this.model.getChildAt(ra,qa))});na(this.model.root);0<ia.length&&
-(ca=null!=ca?mxUtils.mod(ca+(z?1:-1),ia.length):0,this.setSelectionCell(ia[ca]))}};Graph.prototype.swapShapes=function(z,L,M,S,ca,ia,na){L=!1;if(!S&&null!=ca&&1==z.length&&(S=this.view.getState(ca),M=this.view.getState(z[0]),null!=S&&null!=M&&(null!=ia&&mxEvent.isShiftDown(ia)||"umlLifeline"==S.style.shape&&"umlLifeline"==M.style.shape)&&(S=this.getCellGeometry(ca),ia=this.getCellGeometry(z[0]),null!=S&&null!=ia))){L=S.clone();S=ia.clone();S.x=L.x;S.y=L.y;L.x=ia.x;L.y=ia.y;this.model.beginUpdate();
-try{this.model.setGeometry(ca,L),this.model.setGeometry(z[0],S)}finally{this.model.endUpdate()}L=!0}return L};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,L,M,S,ca,ia,na){if(this.swapShapes(z,L,M,S,ca,ia,na))return z;na=null!=na?na:{};if(this.isTable(ca)){for(var ra=[],qa=0;qa<z.length;qa++)this.isTable(z[qa])?ra=ra.concat(this.model.getChildCells(z[qa],!0).reverse()):ra.push(z[qa]);z=ra}this.model.beginUpdate();try{ra=[];for(qa=0;qa<z.length;qa++)if(null!=ca&&this.isTableRow(z[qa])){var ya=
-this.model.getParent(z[qa]),Ea=this.getCellGeometry(z[qa]);this.isTable(ya)&&ra.push(ya);if(null!=ya&&null!=Ea&&this.isTable(ya)&&this.isTable(ca)&&(S||ya!=ca)){if(!S){var Na=this.getCellGeometry(ya);null!=Na&&(Na=Na.clone(),Na.height-=Ea.height,this.model.setGeometry(ya,Na))}Na=this.getCellGeometry(ca);null!=Na&&(Na=Na.clone(),Na.height+=Ea.height,this.model.setGeometry(ca,Na));var Pa=this.model.getChildCells(ca,!0);if(0<Pa.length){z[qa]=S?this.cloneCell(z[qa]):z[qa];var Qa=this.model.getChildCells(z[qa],
-!0),Ua=this.model.getChildCells(Pa[0],!0),La=Ua.length-Qa.length;if(0<La)for(var ua=0;ua<La;ua++){var za=this.cloneCell(Qa[Qa.length-1]);null!=za&&(za.value="",this.model.add(z[qa],za))}else if(0>La)for(ua=0;ua>La;ua--)this.model.remove(Qa[Qa.length+ua-1]);Qa=this.model.getChildCells(z[qa],!0);for(ua=0;ua<Ua.length;ua++){var Ka=this.getCellGeometry(Ua[ua]),Ga=this.getCellGeometry(Qa[ua]);null!=Ka&&null!=Ga&&(Ga=Ga.clone(),Ga.width=Ka.width,this.model.setGeometry(Qa[ua],Ga))}}}}var Ma=m.apply(this,
-arguments);for(qa=0;qa<ra.length;qa++)!S&&this.model.contains(ra[qa])&&0==this.model.getChildCount(ra[qa])&&this.model.remove(ra[qa]);S&&this.updateCustomLinks(this.createCellMapping(na,this.createCellLookup(z)),Ma)}finally{this.model.endUpdate()}return Ma};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,L){var M=[];this.model.beginUpdate();try{for(var S=0;S<z.length;S++)if(this.isTableCell(z[S])){var ca=this.model.getParent(z[S]),ia=this.model.getParent(ca);1==this.model.getChildCount(ca)&&
-1==this.model.getChildCount(ia)?0>mxUtils.indexOf(z,ia)&&0>mxUtils.indexOf(M,ia)&&M.push(ia):this.labelChanged(z[S],"")}else{if(this.isTableRow(z[S])&&(ia=this.model.getParent(z[S]),0>mxUtils.indexOf(z,ia)&&0>mxUtils.indexOf(M,ia))){for(var na=this.model.getChildCells(ia,!0),ra=0,qa=0;qa<na.length;qa++)0<=mxUtils.indexOf(z,na[qa])&&ra++;ra==na.length&&M.push(ia)}M.push(z[S])}M=q.apply(this,[M,L])}finally{this.model.endUpdate()}return M};Graph.prototype.updateCustomLinks=function(z,L,M){M=null!=M?
+ha=0;ha<ca;ha++)this.createCellLookup([this.model.getChildAt(S,ha)],L)}return L};Graph.prototype.createCellMapping=function(z,L,M){M=null!=M?M:{};for(var S in z){var ca=L[S];null==M[ca]&&(M[ca]=z[S].getId()||"")}return M};Graph.prototype.importGraphModel=function(z,L,M,S){L=null!=L?L:0;M=null!=M?M:0;var ca=new mxCodec(z.ownerDocument),ha=new mxGraphModel;ca.decode(z,ha);z=[];ca={};var oa={},ra=ha.getChildren(this.cloneCell(ha.root,this.isCloneInvalidEdges(),ca));if(null!=ra){var qa=this.createCellLookup([ha.root]);
+ra=ra.slice();this.model.beginUpdate();try{if(1!=ra.length||this.isCellLocked(this.getDefaultParent()))for(ha=0;ha<ra.length;ha++)xa=this.model.getChildren(this.moveCells([ra[ha]],L,M,!1,this.model.getRoot())[0]),null!=xa&&(z=z.concat(xa));else{var xa=ha.getChildren(ra[0]);null!=xa&&(z=this.moveCells(xa,L,M,!1,this.getDefaultParent()),oa[ha.getChildAt(ha.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(ca,qa,oa),this.updateCustomLinks(oa,z),S)){this.isGridEnabled()&&
+(L=this.snap(L),M=this.snap(M));var Ga=this.getBoundingBoxFromGeometry(z,!0);null!=Ga&&this.moveCells(z,L-Ga.x,M-Ga.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var L={},M=this.cloneCells(z,null,L),S=new mxDictionary,ca=0;ca<z.length;ca++)S.put(z[ca],!0);var ha=new mxCodec,oa=new mxGraphModel,ra=oa.getChildAt(oa.getRoot(),0);for(ca=0;ca<M.length;ca++){oa.add(ra,M[ca]);var qa=this.view.getState(z[ca]);if(null!=qa){var xa=this.getCellGeometry(M[ca]);null!=
+xa&&xa.relative&&!this.model.isEdge(z[ca])&&null==S.get(this.model.getParent(z[ca]))&&(xa.offset=null,xa.relative=!1,xa.x=qa.x/qa.view.scale-qa.view.translate.x,xa.y=qa.y/qa.view.scale-qa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(L,this.createCellLookup(z)),M);return ha.encode(oa)};Graph.prototype.isSwimlane=function(z,L){var M=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(M=this.getCurrentCellStyle(z,L)[mxConstants.STYLE_SHAPE]);return M==
+mxConstants.SHAPE_SWIMLANE||"table"==M||"tableRow"==M};var d=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var L=this.model.getParent(z);if(null!=L){var M=this.getCurrentCellStyle(L);if(null!=M.expand)return"0"!=M.expand}return d.apply(this,arguments)&&(null==L||!this.isTable(L))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,L,M,S,ca,ha,oa,ra){null==ra&&(ra=this.model.getParent(z),this.isTable(ra)||this.isTableRow(ra))&&(ra=this.getCellAt(ha,oa,
+null,!0,!1));M=null;this.model.beginUpdate();try{M=f.apply(this,[z,L,M,S,ca,ha,oa,ra]);this.model.setValue(M,"");var qa=this.getChildCells(M,!0);for(L=0;L<qa.length;L++){var xa=this.getCellGeometry(qa[L]);null!=xa&&xa.relative&&0<xa.x&&this.model.remove(qa[L])}var Ga=this.getChildCells(z,!0);for(L=0;L<Ga.length;L++)xa=this.getCellGeometry(Ga[L]),null!=xa&&xa.relative&&0>=xa.x&&this.model.remove(Ga[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[M]);this.setCellStyles(mxConstants.STYLE_ENDARROW,
+mxConstants.NONE,[M]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var La=this.model.getTerminal(M,!1);if(null!=La){var Pa=this.getCurrentCellStyle(La);null!=Pa&&"1"==Pa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[M]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[M]))}}finally{this.model.endUpdate()}return M};
+var g=Graph.prototype.selectCell;Graph.prototype.selectCell=function(z,L,M){if(L||M)g.apply(this,arguments);else{var S=this.getSelectionCell(),ca=null,ha=[],oa=mxUtils.bind(this,function(ra){if(null!=this.view.getState(ra)&&(this.model.isVertex(ra)||this.model.isEdge(ra)))if(ha.push(ra),ra==S)ca=ha.length-1;else if(z&&null==S&&0<ha.length||null!=ca&&z&&ha.length>ca||!z&&0<ca)return;for(var qa=0;qa<this.model.getChildCount(ra);qa++)oa(this.model.getChildAt(ra,qa))});oa(this.model.root);0<ha.length&&
+(ca=null!=ca?mxUtils.mod(ca+(z?1:-1),ha.length):0,this.setSelectionCell(ha[ca]))}};Graph.prototype.swapShapes=function(z,L,M,S,ca,ha,oa){L=!1;if(!S&&null!=ca&&1==z.length&&(S=this.view.getState(ca),M=this.view.getState(z[0]),null!=S&&null!=M&&(null!=ha&&mxEvent.isShiftDown(ha)||"umlLifeline"==S.style.shape&&"umlLifeline"==M.style.shape)&&(S=this.getCellGeometry(ca),ha=this.getCellGeometry(z[0]),null!=S&&null!=ha))){L=S.clone();S=ha.clone();S.x=L.x;S.y=L.y;L.x=ha.x;L.y=ha.y;this.model.beginUpdate();
+try{this.model.setGeometry(ca,L),this.model.setGeometry(z[0],S)}finally{this.model.endUpdate()}L=!0}return L};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,L,M,S,ca,ha,oa){if(this.swapShapes(z,L,M,S,ca,ha,oa))return z;oa=null!=oa?oa:{};if(this.isTable(ca)){for(var ra=[],qa=0;qa<z.length;qa++)this.isTable(z[qa])?ra=ra.concat(this.model.getChildCells(z[qa],!0).reverse()):ra.push(z[qa]);z=ra}this.model.beginUpdate();try{ra=[];for(qa=0;qa<z.length;qa++)if(null!=ca&&this.isTableRow(z[qa])){var xa=
+this.model.getParent(z[qa]),Ga=this.getCellGeometry(z[qa]);this.isTable(xa)&&ra.push(xa);if(null!=xa&&null!=Ga&&this.isTable(xa)&&this.isTable(ca)&&(S||xa!=ca)){if(!S){var La=this.getCellGeometry(xa);null!=La&&(La=La.clone(),La.height-=Ga.height,this.model.setGeometry(xa,La))}La=this.getCellGeometry(ca);null!=La&&(La=La.clone(),La.height+=Ga.height,this.model.setGeometry(ca,La));var Pa=this.model.getChildCells(ca,!0);if(0<Pa.length){z[qa]=S?this.cloneCell(z[qa]):z[qa];var Oa=this.model.getChildCells(z[qa],
+!0),Ta=this.model.getChildCells(Pa[0],!0),Ma=Ta.length-Oa.length;if(0<Ma)for(var ua=0;ua<Ma;ua++){var ya=this.cloneCell(Oa[Oa.length-1]);null!=ya&&(ya.value="",this.model.add(z[qa],ya))}else if(0>Ma)for(ua=0;ua>Ma;ua--)this.model.remove(Oa[Oa.length+ua-1]);Oa=this.model.getChildCells(z[qa],!0);for(ua=0;ua<Ta.length;ua++){var Na=this.getCellGeometry(Ta[ua]),Fa=this.getCellGeometry(Oa[ua]);null!=Na&&null!=Fa&&(Fa=Fa.clone(),Fa.width=Na.width,this.model.setGeometry(Oa[ua],Fa))}}}}var Ra=m.apply(this,
+arguments);for(qa=0;qa<ra.length;qa++)!S&&this.model.contains(ra[qa])&&0==this.model.getChildCount(ra[qa])&&this.model.remove(ra[qa]);S&&this.updateCustomLinks(this.createCellMapping(oa,this.createCellLookup(z)),Ra)}finally{this.model.endUpdate()}return Ra};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,L){var M=[];this.model.beginUpdate();try{for(var S=0;S<z.length;S++)if(this.isTableCell(z[S])){var ca=this.model.getParent(z[S]),ha=this.model.getParent(ca);1==this.model.getChildCount(ca)&&
+1==this.model.getChildCount(ha)?0>mxUtils.indexOf(z,ha)&&0>mxUtils.indexOf(M,ha)&&M.push(ha):this.labelChanged(z[S],"")}else{if(this.isTableRow(z[S])&&(ha=this.model.getParent(z[S]),0>mxUtils.indexOf(z,ha)&&0>mxUtils.indexOf(M,ha))){for(var oa=this.model.getChildCells(ha,!0),ra=0,qa=0;qa<oa.length;qa++)0<=mxUtils.indexOf(z,oa[qa])&&ra++;ra==oa.length&&M.push(ha)}M.push(z[S])}M=q.apply(this,[M,L])}finally{this.model.endUpdate()}return M};Graph.prototype.updateCustomLinks=function(z,L,M){M=null!=M?
M:new Graph;for(var S=0;S<L.length;S++)null!=L[S]&&M.updateCustomLinksForCell(z,L[S],M)};Graph.prototype.updateCustomLinksForCell=function(z,L){this.doUpdateCustomLinksForCell(z,L);for(var M=this.model.getChildCount(L),S=0;S<M;S++)this.updateCustomLinksForCell(z,this.model.getChildAt(L,S))};Graph.prototype.doUpdateCustomLinksForCell=function(z,L){};Graph.prototype.getAllConnectionConstraints=function(z,L){if(null!=z){L=mxUtils.getValue(z.style,"points",null);if(null!=L){z=[];try{var M=JSON.parse(L);
-for(L=0;L<M.length;L++){var S=M[L];z.push(new mxConnectionConstraint(new mxPoint(S[0],S[1]),2<S.length?"0"!=S[2]:!0,null,3<S.length?S[3]:0,4<S.length?S[4]:0))}}catch(ia){}return z}if(null!=z.shape&&null!=z.shape.bounds){S=z.shape.direction;L=z.shape.bounds;var ca=z.shape.scale;M=L.width/ca;L=L.height/ca;if(S==mxConstants.DIRECTION_NORTH||S==mxConstants.DIRECTION_SOUTH)S=M,M=L,L=S;L=z.shape.getConstraints(z.style,M,L);if(null!=L)return L;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;
+for(L=0;L<M.length;L++){var S=M[L];z.push(new mxConnectionConstraint(new mxPoint(S[0],S[1]),2<S.length?"0"!=S[2]:!0,null,3<S.length?S[3]:0,4<S.length?S[4]:0))}}catch(ha){}return z}if(null!=z.shape&&null!=z.shape.bounds){S=z.shape.direction;L=z.shape.bounds;var ca=z.shape.scale;M=L.width/ca;L=L.height/ca;if(S==mxConstants.DIRECTION_NORTH||S==mxConstants.DIRECTION_SOUTH)S=M,M=L,L=S;L=z.shape.getConstraints(z.style,M,L);if(null!=L)return L;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;
if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=z){var L=this.getCurrentCellStyle(z);L=mxUtils.getValue(L,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,L,[z])}};Graph.prototype.isValidRoot=function(z){for(var L=this.model.getChildCount(z),M=0,S=0;S<L;S++){var ca=this.model.getChildAt(z,S);this.model.isVertex(ca)&&
-(ca=this.getCellGeometry(ca),null==ca||ca.relative||M++)}return 0<M||this.isContainer(z)};Graph.prototype.isValidDropTarget=function(z,L,M){for(var S=this.getCurrentCellStyle(z),ca=!0,ia=!0,na=0;na<L.length&&ia;na++)ca=ca&&this.isTable(L[na]),ia=ia&&this.isTableRow(L[na]);return(1==L.length&&null!=M&&mxEvent.isShiftDown(M)&&!mxEvent.isControlDown(M)&&!mxEvent.isAltDown(M)||("1"!=mxUtils.getValue(S,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(S,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,
-arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ia||ca))&&!this.isCellLocked(z)};Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var L=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(L&&null!=z&&null!=this.layoutManager){var M=this.model.getParent(z);null!=M&&(M=this.layoutManager.getLayout(M),null!=M&&M.constructor==mxStackLayout&&
-(L=!1))}return L};Graph.prototype.getPreferredSizeForCell=function(z){var L=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=L&&(L.width+=10,L.height+=4,this.gridEnabled&&(L.width=this.snap(L.width),L.height=this.snap(L.height)));return L};Graph.prototype.turnShapes=function(z,L){var M=this.getModel(),S=[];M.beginUpdate();try{for(var ca=0;ca<z.length;ca++){var ia=z[ca];if(M.isEdge(ia)){var na=M.getTerminal(ia,!0),ra=M.getTerminal(ia,!1);M.setTerminal(ia,ra,!0);M.setTerminal(ia,
-na,!1);var qa=M.getGeometry(ia);if(null!=qa){qa=qa.clone();null!=qa.points&&qa.points.reverse();var ya=qa.getTerminalPoint(!0),Ea=qa.getTerminalPoint(!1);qa.setTerminalPoint(ya,!1);qa.setTerminalPoint(Ea,!0);M.setGeometry(ia,qa);var Na=this.view.getState(ia),Pa=this.view.getState(na),Qa=this.view.getState(ra);if(null!=Na){var Ua=null!=Pa?this.getConnectionConstraint(Na,Pa,!0):null,La=null!=Qa?this.getConnectionConstraint(Na,Qa,!1):null;this.setConnectionConstraint(ia,na,!0,La);this.setConnectionConstraint(ia,
-ra,!1,Ua);var ua=mxUtils.getValue(Na.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Na.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ia]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[ia])}S.push(ia)}}else if(M.isVertex(ia)&&(qa=this.getCellGeometry(ia),null!=qa)){if(!(this.isTable(ia)||this.isTableRow(ia)||this.isTableCell(ia)||this.isSwimlane(ia))){qa=qa.clone();qa.x+=qa.width/2-qa.height/
-2;qa.y+=qa.height/2-qa.width/2;var za=qa.width;qa.width=qa.height;qa.height=za;M.setGeometry(ia,qa)}var Ka=this.view.getState(ia);if(null!=Ka){var Ga=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ma=mxUtils.getValue(Ka.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Ga[mxUtils.mod(mxUtils.indexOf(Ga,Ma)+(L?-1:1),Ga.length)],[ia])}S.push(ia)}}}finally{M.endUpdate()}return S};
+(ca=this.getCellGeometry(ca),null==ca||ca.relative||M++)}return 0<M||this.isContainer(z)};Graph.prototype.isValidDropTarget=function(z,L,M){for(var S=this.getCurrentCellStyle(z),ca=!0,ha=!0,oa=0;oa<L.length&&ha;oa++)ca=ca&&this.isTable(L[oa]),ha=ha&&this.isTableRow(L[oa]);return(1==L.length&&null!=M&&mxEvent.isShiftDown(M)&&!mxEvent.isControlDown(M)&&!mxEvent.isAltDown(M)||("1"!=mxUtils.getValue(S,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(S,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,
+arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ha||ca))&&!this.isCellLocked(z)};Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var L=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(L&&null!=z&&null!=this.layoutManager){var M=this.model.getParent(z);null!=M&&(M=this.layoutManager.getLayout(M),null!=M&&M.constructor==mxStackLayout&&
+(L=!1))}return L};Graph.prototype.getPreferredSizeForCell=function(z){var L=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=L&&(L.width+=10,L.height+=4,this.gridEnabled&&(L.width=this.snap(L.width),L.height=this.snap(L.height)));return L};Graph.prototype.turnShapes=function(z,L){var M=this.getModel(),S=[];M.beginUpdate();try{for(var ca=0;ca<z.length;ca++){var ha=z[ca];if(M.isEdge(ha)){var oa=M.getTerminal(ha,!0),ra=M.getTerminal(ha,!1);M.setTerminal(ha,ra,!0);M.setTerminal(ha,
+oa,!1);var qa=M.getGeometry(ha);if(null!=qa){qa=qa.clone();null!=qa.points&&qa.points.reverse();var xa=qa.getTerminalPoint(!0),Ga=qa.getTerminalPoint(!1);qa.setTerminalPoint(xa,!1);qa.setTerminalPoint(Ga,!0);M.setGeometry(ha,qa);var La=this.view.getState(ha),Pa=this.view.getState(oa),Oa=this.view.getState(ra);if(null!=La){var Ta=null!=Pa?this.getConnectionConstraint(La,Pa,!0):null,Ma=null!=Oa?this.getConnectionConstraint(La,Oa,!1):null;this.setConnectionConstraint(ha,oa,!0,Ma);this.setConnectionConstraint(ha,
+ra,!1,Ta);var ua=mxUtils.getValue(La.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(La.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ha]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[ha])}S.push(ha)}}else if(M.isVertex(ha)&&(qa=this.getCellGeometry(ha),null!=qa)){if(!(this.isTable(ha)||this.isTableRow(ha)||this.isTableCell(ha)||this.isSwimlane(ha))){qa=qa.clone();qa.x+=qa.width/2-qa.height/
+2;qa.y+=qa.height/2-qa.width/2;var ya=qa.width;qa.width=qa.height;qa.height=ya;M.setGeometry(ha,qa)}var Na=this.view.getState(ha);if(null!=Na){var Fa=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ra=mxUtils.getValue(Na.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Fa[mxUtils.mod(mxUtils.indexOf(Fa,Ra)+(L?-1:1),Fa.length)],[ha])}S.push(ha)}}}finally{M.endUpdate()}return S};
Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0;z=z.nextSibling}return!1};var y=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var L=z.cell;this.isTableCell(L)&&(L=this.model.getParent(L));
this.isTableRow(L)&&(L=this.model.getParent(L));var M=this.view.getState(L);null!=M&&null!=M.shape&&(this.view.invalidate(L),M.shape.bounds=null)}y.apply(this,arguments);z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var L=0;L<z.length;L++){var M=this.view.getState(z[L]);null!=M&&null!=M.shape&&
null!=M.shape.stencil&&this.stencilHasPlaceholders(M.shape.stencil)?this.removeStateForCell(z[L]):this.isReplacePlaceholders(z[L])&&this.view.invalidate(z[L],!1,!1)}};Graph.prototype.replaceElement=function(z,L){L=z.ownerDocument.createElement(null!=L?L:"span");for(var M=Array.prototype.slice.call(z.attributes);attr=M.pop();)L.setAttribute(attr.nodeName,attr.nodeValue);L.innerHTML=z.innerHTML;z.parentNode.replaceChild(L,z)};Graph.prototype.processElements=function(z,L){if(null!=z){z=z.getElementsByTagName("*");
-for(var M=0;M<z.length;M++)L(z[M])}};Graph.prototype.updateLabelElements=function(z,L,M){z=null!=z?z:this.getSelectionCells();for(var S=document.createElement("div"),ca=0;ca<z.length;ca++)if(this.isHtmlLabel(z[ca])){var ia=this.convertValueToString(z[ca]);if(null!=ia&&0<ia.length){S.innerHTML=ia;for(var na=S.getElementsByTagName(null!=M?M:"*"),ra=0;ra<na.length;ra++)L(na[ra]);S.innerHTML!=ia&&this.cellLabelChanged(z[ca],S.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,L,M){L=Graph.zapGremlins(L);
-this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var S=z.getAttribute("placeholder"),ca=z;null!=ca;){if(ca==this.model.getRoot()||null!=ca.value&&"object"==typeof ca.value&&ca.hasAttribute(S)){this.setAttributeForCell(ca,S,L);break}ca=this.model.getParent(ca)}var ia=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ia.hasAttribute("label_"+Graph.diagramLanguage)?ia.setAttribute("label_"+
-Graph.diagramLanguage,L):ia.setAttribute("label",L);L=ia}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=z){for(var L=new mxDictionary,M=0;M<z.length;M++)L.put(z[M],!0);var S=[];for(M=0;M<z.length;M++){var ca=this.model.getParent(z[M]);null==ca||L.get(ca)||(L.put(ca,!0),S.push(ca))}for(M=0;M<S.length;M++)if(ca=this.view.getState(S[M]),null!=ca&&(this.model.isEdge(ca.cell)||this.model.isVertex(ca.cell))&&this.isCellDeletable(ca.cell)&&
-this.isTransparentState(ca)){for(var ia=!0,na=0;na<this.model.getChildCount(ca.cell)&&ia;na++)L.get(this.model.getChildAt(ca.cell,na))||(ia=!1);ia&&z.push(ca.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var L=[],M=0;M<z.length;M++)this.isCellDeletable(z[M])&&this.isTransparentState(this.view.getState(z[M]))&&L.push(z[M]);z=L;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,
+for(var M=0;M<z.length;M++)L(z[M])}};Graph.prototype.updateLabelElements=function(z,L,M){z=null!=z?z:this.getSelectionCells();for(var S=document.createElement("div"),ca=0;ca<z.length;ca++)if(this.isHtmlLabel(z[ca])){var ha=this.convertValueToString(z[ca]);if(null!=ha&&0<ha.length){S.innerHTML=ha;for(var oa=S.getElementsByTagName(null!=M?M:"*"),ra=0;ra<oa.length;ra++)L(oa[ra]);S.innerHTML!=ha&&this.cellLabelChanged(z[ca],S.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,L,M){L=Graph.zapGremlins(L);
+this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var S=z.getAttribute("placeholder"),ca=z;null!=ca;){if(ca==this.model.getRoot()||null!=ca.value&&"object"==typeof ca.value&&ca.hasAttribute(S)){this.setAttributeForCell(ca,S,L);break}ca=this.model.getParent(ca)}var ha=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ha.hasAttribute("label_"+Graph.diagramLanguage)?ha.setAttribute("label_"+
+Graph.diagramLanguage,L):ha.setAttribute("label",L);L=ha}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=z){for(var L=new mxDictionary,M=0;M<z.length;M++)L.put(z[M],!0);var S=[];for(M=0;M<z.length;M++){var ca=this.model.getParent(z[M]);null==ca||L.get(ca)||(L.put(ca,!0),S.push(ca))}for(M=0;M<S.length;M++)if(ca=this.view.getState(S[M]),null!=ca&&(this.model.isEdge(ca.cell)||this.model.isVertex(ca.cell))&&this.isCellDeletable(ca.cell)&&
+this.isTransparentState(ca)){for(var ha=!0,oa=0;oa<this.model.getChildCount(ca.cell)&&ha;oa++)L.get(this.model.getChildAt(ca.cell,oa))||(ha=!1);ha&&z.push(ca.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var L=[],M=0;M<z.length;M++)this.isCellDeletable(z[M])&&this.isTransparentState(this.view.getState(z[M]))&&L.push(z[M]);z=L;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,
L){this.setAttributeForCell(z,"link",L)};Graph.prototype.setTooltipForCell=function(z,L){var M="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(M="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,M,L)};Graph.prototype.getAttributeForCell=function(z,L,M){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(L):null;return null!=z?z:M};Graph.prototype.setAttributeForCell=function(z,L,
-M){if(null!=z.value&&"object"==typeof z.value)var S=z.value.cloneNode(!0);else S=mxUtils.createXmlDocument().createElement("UserObject"),S.setAttribute("label",z.value||"");null!=M?S.setAttribute(L,M):S.removeAttribute(L);this.model.setValue(z,S)};var F=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,L,M,S){this.getModel();if(mxEvent.isAltDown(L))return null;for(var ca=0;ca<z.length;ca++){var ia=this.model.getParent(z[ca]);if(this.model.isEdge(ia)&&0>mxUtils.indexOf(z,ia))return null}ia=
-F.apply(this,arguments);var na=!0;for(ca=0;ca<z.length&&na;ca++)na=na&&this.isTableRow(z[ca]);na&&(this.isTableCell(ia)&&(ia=this.model.getParent(ia)),this.isTableRow(ia)&&(ia=this.model.getParent(ia)),this.isTable(ia)||(ia=null));return ia};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,L){this.isEnabled()&&(L=this.insertTextForEvent(z,L),mxGraph.prototype.dblClick.call(this,
+M){if(null!=z.value&&"object"==typeof z.value)var S=z.value.cloneNode(!0);else S=mxUtils.createXmlDocument().createElement("UserObject"),S.setAttribute("label",z.value||"");null!=M?S.setAttribute(L,M):S.removeAttribute(L);this.model.setValue(z,S)};var F=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,L,M,S){this.getModel();if(mxEvent.isAltDown(L))return null;for(var ca=0;ca<z.length;ca++){var ha=this.model.getParent(z[ca]);if(this.model.isEdge(ha)&&0>mxUtils.indexOf(z,ha))return null}ha=
+F.apply(this,arguments);var oa=!0;for(ca=0;ca<z.length&&oa;ca++)oa=oa&&this.isTableRow(z[ca]);oa&&(this.isTableCell(ha)&&(ha=this.model.getParent(ha)),this.isTableRow(ha)&&(ha=this.model.getParent(ha)),this.isTable(ha)||(ha=null));return ha};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,L){this.isEnabled()&&(L=this.insertTextForEvent(z,L),mxGraph.prototype.dblClick.call(this,
z,L))};Graph.prototype.insertTextForEvent=function(z,L){var M=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(L)){var S=this.model.isEdge(L)?this.view.getState(L):null,ca=mxEvent.getSource(z);this.firstClickState!=S||this.firstClickSource!=ca||null!=S&&null!=S.text&&null!=S.text.node&&null!=S.text.boundingBox&&(mxUtils.contains(S.text.boundingBox,M.x,M.y)||mxUtils.isAncestorNode(S.text.node,mxEvent.getSource(z)))||(null!=S||this.isCellLocked(this.getDefaultParent()))&&
(null==S||this.isCellLocked(S.cell))||!(null!=S||mxClient.IS_SVG&&ca==this.view.getCanvas().ownerSVGElement)||(null==S&&(S=this.view.getState(this.getCellAt(M.x,M.y))),L=this.addText(M.x,M.y,S))}return L};Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),L=this.container.scrollLeft/this.view.scale-this.view.translate.x,M=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var S=this.getPageLayout(),ca=this.getPageSize();L=Math.max(L,S.x*ca.width);M=
Math.max(M,S.y*ca.height)}return new mxPoint(this.snap(L+z),this.snap(M+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,L=this.getGraphBounds(),M=this.getInsertPoint(),S=this.snap(Math.round(Math.max(M.x,L.x/z.scale-z.translate.x+(0==L.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(M.y,(L.y+L.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(S,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?
new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=
-function(){return!1};Graph.prototype.addText=function(z,L,M){var S=new mxCell;S.value="Text";S.geometry=new mxGeometry(0,0,0,0);S.vertex=!0;if(null!=M&&this.model.isEdge(M.cell)){S.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";S.geometry.relative=!0;S.connectable=!1;var ca=this.view.getRelativePoint(M,z,L);S.geometry.x=Math.round(1E4*ca.x)/1E4;S.geometry.y=Math.round(ca.y);S.geometry.offset=new mxPoint(0,0);ca=this.view.getPoint(M,S.geometry);var ia=this.view.scale;
-S.geometry.offset=new mxPoint(Math.round((z-ca.x)/ia),Math.round((L-ca.y)/ia))}else ca=this.view.translate,S.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",S.geometry.width=40,S.geometry.height=20,S.geometry.x=Math.round(z/this.view.scale)-ca.x-(null!=M?M.origin.x:0),S.geometry.y=Math.round(L/this.view.scale)-ca.y-(null!=M?M.origin.y:0),S.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([S],null!=M?M.cell:null),this.fireEvent(new mxEventObject("textInserted",
-"cells",[S])),this.autoSizeCell(S)}finally{this.getModel().endUpdate()}return S};Graph.prototype.addClickHandler=function(z,L,M){var S=mxUtils.bind(this,function(){var qa=this.container.getElementsByTagName("a");if(null!=qa)for(var ya=0;ya<qa.length;ya++){var Ea=this.getAbsoluteUrl(qa[ya].getAttribute("href"));null!=Ea&&(qa[ya].setAttribute("rel",this.linkRelation),qa[ya].setAttribute("href",Ea),null!=L&&mxEvent.addGestureListeners(qa[ya],null,null,L))}});this.model.addListener(mxEvent.CHANGE,S);
-S();var ca=this.container.style.cursor,ia=this.getTolerance(),na=this,ra={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(na,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(qa){var ya=qa.sourceState;if(null==ya||null==na.getLinkForCell(ya.cell))qa=na.getCellAt(qa.getGraphX(),qa.getGraphY(),null,null,null,function(Ea,Na,Pa){return null==na.getLinkForCell(Ea.cell)}),ya=null==ya||na.model.isAncestor(qa,
-ya.cell)?na.view.getState(qa):null;ya!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ya,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(qa,ya){this.startX=ya.getGraphX();this.startY=ya.getGraphY();this.scrollLeft=na.container.scrollLeft;this.scrollTop=na.container.scrollTop;null==this.currentLink&&"auto"==na.container.style.overflow&&(na.container.style.cursor="move");this.updateCurrentState(ya)},mouseMove:function(qa,ya){if(na.isMouseDown)null!=
-this.currentLink&&(qa=Math.abs(this.startX-ya.getGraphX()),ya=Math.abs(this.startY-ya.getGraphY()),(qa>ia||ya>ia)&&this.clear());else{for(qa=ya.getSource();null!=qa&&"a"!=qa.nodeName.toLowerCase();)qa=qa.parentNode;null!=qa?this.clear():(null!=na.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&na.tooltipHandler.reset(ya,!0,this.currentState),(null==this.currentState||ya.getState()!=this.currentState&&null!=ya.sourceState||!na.intersects(this.currentState,ya.getGraphX(),ya.getGraphY()))&&
-this.updateCurrentState(ya))}},mouseUp:function(qa,ya){var Ea=ya.getSource();for(qa=ya.getEvent();null!=Ea&&"a"!=Ea.nodeName.toLowerCase();)Ea=Ea.parentNode;null==Ea&&Math.abs(this.scrollLeft-na.container.scrollLeft)<ia&&Math.abs(this.scrollTop-na.container.scrollTop)<ia&&(null==ya.sourceState||!ya.isSource(ya.sourceState.control))&&((mxEvent.isLeftMouseButton(qa)||mxEvent.isMiddleMouseButton(qa))&&!mxEvent.isPopupTrigger(qa)||mxEvent.isTouchEvent(qa))&&(null!=this.currentLink?(Ea=na.isBlankLink(this.currentLink),
-"data:"!==this.currentLink.substring(0,5)&&Ea||null==L||L(qa,this.currentLink),mxEvent.isConsumed(qa)||(qa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(qa)?"_blank":Ea?na.linkTarget:"_top",na.openLink(this.currentLink,qa),ya.consume())):null!=M&&!ya.isConsumed()&&Math.abs(this.scrollLeft-na.container.scrollLeft)<ia&&Math.abs(this.scrollTop-na.container.scrollTop)<ia&&Math.abs(this.startX-ya.getGraphX())<ia&&Math.abs(this.startY-ya.getGraphY())<ia&&M(ya.getEvent()));this.clear()},
-activate:function(qa){this.currentLink=na.getAbsoluteUrl(na.getLinkForCell(qa.cell));null!=this.currentLink&&(this.currentTarget=na.getLinkTargetForCell(qa.cell),na.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(qa))},clear:function(){null!=na.container&&(na.container.style.cursor=ca);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=na.tooltipHandler&&na.tooltipHandler.hide()}};na.click=function(qa){};na.addMouseListener(ra);
-mxEvent.addListener(document,"mouseleave",function(qa){ra.clear()})};Graph.prototype.duplicateCells=function(z,L){z=null!=z?z:this.getSelectionCells();L=null!=L?L:!0;for(var M=0;M<z.length;M++)this.isTableCell(z[M])&&(z[M]=this.model.getParent(z[M]));z=this.model.getTopmostCells(z);var S=this.getModel(),ca=this.gridSize,ia=[];S.beginUpdate();try{var na={},ra=this.createCellLookup(z),qa=this.cloneCells(z,!1,na,!0);for(M=0;M<z.length;M++){var ya=S.getParent(z[M]);if(null!=ya){var Ea=this.moveCells([qa[M]],
-ca,ca,!1)[0];ia.push(Ea);if(L)S.add(ya,qa[M]);else{var Na=ya.getIndex(z[M]);S.add(ya,qa[M],Na+1)}if(this.isTable(ya)){var Pa=this.getCellGeometry(qa[M]),Qa=this.getCellGeometry(ya);null!=Pa&&null!=Qa&&(Qa=Qa.clone(),Qa.height+=Pa.height,S.setGeometry(ya,Qa))}}else ia.push(qa[M])}this.updateCustomLinks(this.createCellMapping(na,ra),qa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",qa))}finally{S.endUpdate()}return ia};Graph.prototype.insertImage=function(z,L,M){if(null!=z&&null!=
-this.cellEditor.textarea){for(var S=this.cellEditor.textarea.getElementsByTagName("img"),ca=[],ia=0;ia<S.length;ia++)ca.push(S[ia]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==ca.length+1)for(ia=z.length-1;0<=ia;ia--)if(0==ia||z[ia]!=ca[ia-1]){z[ia].setAttribute("width",L);z[ia].setAttribute("height",M);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);
+function(){return!1};Graph.prototype.addText=function(z,L,M){var S=new mxCell;S.value="Text";S.geometry=new mxGeometry(0,0,0,0);S.vertex=!0;if(null!=M&&this.model.isEdge(M.cell)){S.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";S.geometry.relative=!0;S.connectable=!1;var ca=this.view.getRelativePoint(M,z,L);S.geometry.x=Math.round(1E4*ca.x)/1E4;S.geometry.y=Math.round(ca.y);S.geometry.offset=new mxPoint(0,0);ca=this.view.getPoint(M,S.geometry);var ha=this.view.scale;
+S.geometry.offset=new mxPoint(Math.round((z-ca.x)/ha),Math.round((L-ca.y)/ha))}else ca=this.view.translate,S.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",S.geometry.width=40,S.geometry.height=20,S.geometry.x=Math.round(z/this.view.scale)-ca.x-(null!=M?M.origin.x:0),S.geometry.y=Math.round(L/this.view.scale)-ca.y-(null!=M?M.origin.y:0),S.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([S],null!=M?M.cell:null),this.fireEvent(new mxEventObject("textInserted",
+"cells",[S])),this.autoSizeCell(S)}finally{this.getModel().endUpdate()}return S};Graph.prototype.addClickHandler=function(z,L,M){var S=mxUtils.bind(this,function(){var qa=this.container.getElementsByTagName("a");if(null!=qa)for(var xa=0;xa<qa.length;xa++){var Ga=this.getAbsoluteUrl(qa[xa].getAttribute("href"));null!=Ga&&(qa[xa].setAttribute("rel",this.linkRelation),qa[xa].setAttribute("href",Ga),null!=L&&mxEvent.addGestureListeners(qa[xa],null,null,L))}});this.model.addListener(mxEvent.CHANGE,S);
+S();var ca=this.container.style.cursor,ha=this.getTolerance(),oa=this,ra={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(oa,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(qa){var xa=qa.sourceState;if(null==xa||null==oa.getLinkForCell(xa.cell))qa=oa.getCellAt(qa.getGraphX(),qa.getGraphY(),null,null,null,function(Ga,La,Pa){return null==oa.getLinkForCell(Ga.cell)}),xa=null==xa||oa.model.isAncestor(qa,
+xa.cell)?oa.view.getState(qa):null;xa!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=xa,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(qa,xa){this.startX=xa.getGraphX();this.startY=xa.getGraphY();this.scrollLeft=oa.container.scrollLeft;this.scrollTop=oa.container.scrollTop;null==this.currentLink&&"auto"==oa.container.style.overflow&&(oa.container.style.cursor="move");this.updateCurrentState(xa)},mouseMove:function(qa,xa){if(oa.isMouseDown)null!=
+this.currentLink&&(qa=Math.abs(this.startX-xa.getGraphX()),xa=Math.abs(this.startY-xa.getGraphY()),(qa>ha||xa>ha)&&this.clear());else{for(qa=xa.getSource();null!=qa&&"a"!=qa.nodeName.toLowerCase();)qa=qa.parentNode;null!=qa?this.clear():(null!=oa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&oa.tooltipHandler.reset(xa,!0,this.currentState),(null==this.currentState||xa.getState()!=this.currentState&&null!=xa.sourceState||!oa.intersects(this.currentState,xa.getGraphX(),xa.getGraphY()))&&
+this.updateCurrentState(xa))}},mouseUp:function(qa,xa){var Ga=xa.getSource();for(qa=xa.getEvent();null!=Ga&&"a"!=Ga.nodeName.toLowerCase();)Ga=Ga.parentNode;null==Ga&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ha&&Math.abs(this.scrollTop-oa.container.scrollTop)<ha&&(null==xa.sourceState||!xa.isSource(xa.sourceState.control))&&((mxEvent.isLeftMouseButton(qa)||mxEvent.isMiddleMouseButton(qa))&&!mxEvent.isPopupTrigger(qa)||mxEvent.isTouchEvent(qa))&&(null!=this.currentLink?(Ga=oa.isBlankLink(this.currentLink),
+"data:"!==this.currentLink.substring(0,5)&&Ga||null==L||L(qa,this.currentLink),mxEvent.isConsumed(qa)||(qa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(qa)?"_blank":Ga?oa.linkTarget:"_top",oa.openLink(this.currentLink,qa),xa.consume())):null!=M&&!xa.isConsumed()&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ha&&Math.abs(this.scrollTop-oa.container.scrollTop)<ha&&Math.abs(this.startX-xa.getGraphX())<ha&&Math.abs(this.startY-xa.getGraphY())<ha&&M(xa.getEvent()));this.clear()},
+activate:function(qa){this.currentLink=oa.getAbsoluteUrl(oa.getLinkForCell(qa.cell));null!=this.currentLink&&(this.currentTarget=oa.getLinkTargetForCell(qa.cell),oa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(qa))},clear:function(){null!=oa.container&&(oa.container.style.cursor=ca);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=oa.tooltipHandler&&oa.tooltipHandler.hide()}};oa.click=function(qa){};oa.addMouseListener(ra);
+mxEvent.addListener(document,"mouseleave",function(qa){ra.clear()})};Graph.prototype.duplicateCells=function(z,L){z=null!=z?z:this.getSelectionCells();L=null!=L?L:!0;for(var M=0;M<z.length;M++)this.isTableCell(z[M])&&(z[M]=this.model.getParent(z[M]));z=this.model.getTopmostCells(z);var S=this.getModel(),ca=this.gridSize,ha=[];S.beginUpdate();try{var oa={},ra=this.createCellLookup(z),qa=this.cloneCells(z,!1,oa,!0);for(M=0;M<z.length;M++){var xa=S.getParent(z[M]);if(null!=xa){var Ga=this.moveCells([qa[M]],
+ca,ca,!1)[0];ha.push(Ga);if(L)S.add(xa,qa[M]);else{var La=xa.getIndex(z[M]);S.add(xa,qa[M],La+1)}if(this.isTable(xa)){var Pa=this.getCellGeometry(qa[M]),Oa=this.getCellGeometry(xa);null!=Pa&&null!=Oa&&(Oa=Oa.clone(),Oa.height+=Pa.height,S.setGeometry(xa,Oa))}}else ha.push(qa[M])}this.updateCustomLinks(this.createCellMapping(oa,ra),qa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",qa))}finally{S.endUpdate()}return ha};Graph.prototype.insertImage=function(z,L,M){if(null!=z&&null!=
+this.cellEditor.textarea){for(var S=this.cellEditor.textarea.getElementsByTagName("img"),ca=[],ha=0;ha<S.length;ha++)ca.push(S[ha]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==ca.length+1)for(ha=z.length-1;0<=ha;ha--)if(0==ha||z[ha]!=ca[ha-1]){z[ha].setAttribute("width",L);z[ha].setAttribute("height",M);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);
else if(mxClient.IS_FF){for(var L=this.cellEditor.textarea.getElementsByTagName("a"),M=[],S=0;S<L.length;S++)M.push(L[S]);document.execCommand("createlink",!1,mxUtils.trim(z));L=this.cellEditor.textarea.getElementsByTagName("a");if(L.length==M.length+1)for(S=L.length-1;0<=S;S--)if(L[S]!=M[S-1]){for(L=L[S].getElementsByTagName("a");0<L.length;){for(M=L[0].parentNode;null!=L[0].firstChild;)M.insertBefore(L[0].firstChild,L[0]);M.removeChild(L[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};
-Graph.prototype.isCellResizable=function(z){var L=mxGraph.prototype.isCellResizable.apply(this,arguments),M=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(L||"0"!=mxUtils.getValue(M,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==M[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,L){null==L&&(L=this.getSelectionCells());if(null!=L&&1<L.length){for(var M=[],S=null,ca=null,ia=0;ia<L.length;ia++)if(this.getModel().isVertex(L[ia])){var na=this.view.getState(L[ia]);
-if(null!=na){var ra=z?na.getCenterX():na.getCenterY();S=null!=S?Math.max(S,ra):ra;ca=null!=ca?Math.min(ca,ra):ra;M.push(na)}}if(2<M.length){M.sort(function(Na,Pa){return z?Na.x-Pa.x:Na.y-Pa.y});na=this.view.translate;ra=this.view.scale;ca=ca/ra-(z?na.x:na.y);S=S/ra-(z?na.x:na.y);this.getModel().beginUpdate();try{var qa=(S-ca)/(M.length-1);S=ca;for(ia=1;ia<M.length-1;ia++){var ya=this.view.getState(this.model.getParent(M[ia].cell)),Ea=this.getCellGeometry(M[ia].cell);S+=qa;null!=Ea&&null!=ya&&(Ea=
-Ea.clone(),z?Ea.x=Math.round(S-Ea.width/2)-ya.origin.x:Ea.y=Math.round(S-Ea.height/2)-ya.origin.y,this.getModel().setGeometry(M[ia].cell,Ea))}}finally{this.getModel().endUpdate()}}}return L};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(L,M){return this.getLinkForCell(L.cell)});return z};Graph.prototype.parseBackgroundImage=
-function(z){var L=null;null!=z&&0<z.length&&(z=JSON.parse(z),L=new mxImage(z.src,z.width,z.height));return L};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,L,M,S,ca,ia,na,ra,qa,ya,Ea,Na,Pa,Qa){var Ua=null;if(null!=Qa)for(Ua=new mxDictionary,Ea=0;Ea<Qa.length;Ea++)Ua.put(Qa[Ea],!0);if(Qa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{L=null!=L?L:1;M=null!=M?M:0;ca=null!=ca?ca:!0;ia=null!=ia?ia:!0;na=
-null!=na?na:!0;ya=null!=ya?ya:!1;var La="page"==Pa?this.view.getBackgroundPageBounds():ia&&null==Ua||S||"diagram"==Pa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),ua=this.view.scale;"diagram"==Pa&&null!=this.backgroundImage&&(La=mxRectangle.fromRectangle(La),La.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*ua,(this.view.translate.y+this.backgroundImage.y)*ua,this.backgroundImage.width*ua,this.backgroundImage.height*ua)));if(null==La)throw Error(mxResources.get("drawingEmpty"));
-S=L/ua;Pa=ca?-.5:0;var za=Graph.createSvgNode(Pa,Pa,Math.max(1,Math.ceil(La.width*S)+2*M)+(ya&&0==M?5:0),Math.max(1,Math.ceil(La.height*S)+2*M)+(ya&&0==M?5:0),z),Ka=za.ownerDocument,Ga=null!=Ka.createElementNS?Ka.createElementNS(mxConstants.NS_SVG,"g"):Ka.createElement("g");za.appendChild(Ga);var Ma=this.createSvgCanvas(Ga);Ma.foOffset=ca?-.5:0;Ma.textOffset=ca?-.5:0;Ma.imageOffset=ca?-.5:0;Ma.translate(Math.floor(M/L-La.x/ua),Math.floor(M/L-La.y/ua));var db=document.createElement("div"),Ra=Ma.getAlternateText;
-Ma.getAlternateText=function(cb,eb,hb,tb,vb,qb,Ab,Bb,ub,kb,gb,lb,wb){if(null!=qb&&0<this.state.fontSize)try{mxUtils.isNode(qb)?qb=qb.innerText:(db.innerHTML=qb,qb=mxUtils.extractTextWithWhitespace(db.childNodes));for(var rb=Math.ceil(2*tb/this.state.fontSize),xb=[],zb=0,yb=0;(0==rb||zb<rb)&&yb<qb.length;){var ob=qb.charCodeAt(yb);if(10==ob||13==ob){if(0<zb)break}else xb.push(qb.charAt(yb)),255>ob&&zb++;yb++}xb.length<qb.length&&1<qb.length-xb.length&&(qb=mxUtils.trim(xb.join(""))+"...");return qb}catch(c){return Ra.apply(this,
-arguments)}else return Ra.apply(this,arguments)};var ib=this.backgroundImage;if(null!=ib){z=ua/L;var mb=this.view.translate;Pa=new mxRectangle((ib.x+mb.x)*z,(ib.y+mb.y)*z,ib.width*z,ib.height*z);mxUtils.intersects(La,Pa)&&Ma.image(ib.x+mb.x,ib.y+mb.y,ib.width,ib.height,ib.src,!0)}Ma.scale(S);Ma.textEnabled=na;ra=null!=ra?ra:this.createSvgImageExport();var nb=ra.drawCellState,pb=ra.getLinkForCellState;ra.getLinkForCellState=function(cb,eb){var hb=pb.apply(this,arguments);return null==hb||cb.view.graph.isCustomLink(hb)?
-null:hb};ra.getLinkTargetForCellState=function(cb,eb){return cb.view.graph.getLinkTargetForCell(cb.cell)};ra.drawCellState=function(cb,eb){for(var hb=cb.view.graph,tb=null!=Ua?Ua.get(cb.cell):hb.isCellSelected(cb.cell),vb=hb.model.getParent(cb.cell);!(ia&&null==Ua||tb)&&null!=vb;)tb=null!=Ua?Ua.get(vb):hb.isCellSelected(vb),vb=hb.model.getParent(vb);(ia&&null==Ua||tb)&&nb.apply(this,arguments)};ra.drawState(this.getView().getState(this.model.root),Ma);this.updateSvgLinks(za,qa,!0);this.addForeignObjectWarning(Ma,
-za);return za}finally{Qa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var M=z.createElement("switch"),S=z.createElement("g");S.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ca=z.createElement("a");ca.setAttribute("transform","translate(0,-5)");null==ca.setAttributeNS||L.ownerDocument!=document&&
+Graph.prototype.isCellResizable=function(z){var L=mxGraph.prototype.isCellResizable.apply(this,arguments),M=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(L||"0"!=mxUtils.getValue(M,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==M[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,L){null==L&&(L=this.getSelectionCells());if(null!=L&&1<L.length){for(var M=[],S=null,ca=null,ha=0;ha<L.length;ha++)if(this.getModel().isVertex(L[ha])){var oa=this.view.getState(L[ha]);
+if(null!=oa){var ra=z?oa.getCenterX():oa.getCenterY();S=null!=S?Math.max(S,ra):ra;ca=null!=ca?Math.min(ca,ra):ra;M.push(oa)}}if(2<M.length){M.sort(function(La,Pa){return z?La.x-Pa.x:La.y-Pa.y});oa=this.view.translate;ra=this.view.scale;ca=ca/ra-(z?oa.x:oa.y);S=S/ra-(z?oa.x:oa.y);this.getModel().beginUpdate();try{var qa=(S-ca)/(M.length-1);S=ca;for(ha=1;ha<M.length-1;ha++){var xa=this.view.getState(this.model.getParent(M[ha].cell)),Ga=this.getCellGeometry(M[ha].cell);S+=qa;null!=Ga&&null!=xa&&(Ga=
+Ga.clone(),z?Ga.x=Math.round(S-Ga.width/2)-xa.origin.x:Ga.y=Math.round(S-Ga.height/2)-xa.origin.y,this.getModel().setGeometry(M[ha].cell,Ga))}}finally{this.getModel().endUpdate()}}}return L};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(L,M){return this.getLinkForCell(L.cell)});return z};Graph.prototype.parseBackgroundImage=
+function(z){var L=null;null!=z&&0<z.length&&(z=JSON.parse(z),L=new mxImage(z.src,z.width,z.height));return L};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,L,M,S,ca,ha,oa,ra,qa,xa,Ga,La,Pa,Oa){var Ta=null;if(null!=Oa)for(Ta=new mxDictionary,Ga=0;Ga<Oa.length;Ga++)Ta.put(Oa[Ga],!0);if(Oa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{L=null!=L?L:1;M=null!=M?M:0;ca=null!=ca?ca:!0;ha=null!=ha?ha:!0;oa=
+null!=oa?oa:!0;xa=null!=xa?xa:!1;var Ma="page"==Pa?this.view.getBackgroundPageBounds():ha&&null==Ta||S||"diagram"==Pa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),ua=this.view.scale;"diagram"==Pa&&null!=this.backgroundImage&&(Ma=mxRectangle.fromRectangle(Ma),Ma.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*ua,(this.view.translate.y+this.backgroundImage.y)*ua,this.backgroundImage.width*ua,this.backgroundImage.height*ua)));if(null==Ma)throw Error(mxResources.get("drawingEmpty"));
+S=L/ua;Pa=ca?-.5:0;var ya=Graph.createSvgNode(Pa,Pa,Math.max(1,Math.ceil(Ma.width*S)+2*M)+(xa&&0==M?5:0),Math.max(1,Math.ceil(Ma.height*S)+2*M)+(xa&&0==M?5:0),z),Na=ya.ownerDocument,Fa=null!=Na.createElementNS?Na.createElementNS(mxConstants.NS_SVG,"g"):Na.createElement("g");ya.appendChild(Fa);var Ra=this.createSvgCanvas(Fa);Ra.foOffset=ca?-.5:0;Ra.textOffset=ca?-.5:0;Ra.imageOffset=ca?-.5:0;Ra.translate(Math.floor(M/L-Ma.x/ua),Math.floor(M/L-Ma.y/ua));var db=document.createElement("div"),Va=Ra.getAlternateText;
+Ra.getAlternateText=function(Ya,gb,hb,ob,vb,qb,Ab,Bb,tb,lb,ib,mb,wb){if(null!=qb&&0<this.state.fontSize)try{mxUtils.isNode(qb)?qb=qb.innerText:(db.innerHTML=qb,qb=mxUtils.extractTextWithWhitespace(db.childNodes));for(var rb=Math.ceil(2*ob/this.state.fontSize),xb=[],zb=0,yb=0;(0==rb||zb<rb)&&yb<qb.length;){var pb=qb.charCodeAt(yb);if(10==pb||13==pb){if(0<zb)break}else xb.push(qb.charAt(yb)),255>pb&&zb++;yb++}xb.length<qb.length&&1<qb.length-xb.length&&(qb=mxUtils.trim(xb.join(""))+"...");return qb}catch(c){return Va.apply(this,
+arguments)}else return Va.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){z=ua/L;var kb=this.view.translate;Pa=new mxRectangle((fb.x+kb.x)*z,(fb.y+kb.y)*z,fb.width*z,fb.height*z);mxUtils.intersects(Ma,Pa)&&Ra.image(fb.x+kb.x,fb.y+kb.y,fb.width,fb.height,fb.src,!0)}Ra.scale(S);Ra.textEnabled=oa;ra=null!=ra?ra:this.createSvgImageExport();var ub=ra.drawCellState,nb=ra.getLinkForCellState;ra.getLinkForCellState=function(Ya,gb){var hb=nb.apply(this,arguments);return null==hb||Ya.view.graph.isCustomLink(hb)?
+null:hb};ra.getLinkTargetForCellState=function(Ya,gb){return Ya.view.graph.getLinkTargetForCell(Ya.cell)};ra.drawCellState=function(Ya,gb){for(var hb=Ya.view.graph,ob=null!=Ta?Ta.get(Ya.cell):hb.isCellSelected(Ya.cell),vb=hb.model.getParent(Ya.cell);!(ha&&null==Ta||ob)&&null!=vb;)ob=null!=Ta?Ta.get(vb):hb.isCellSelected(vb),vb=hb.model.getParent(vb);(ha&&null==Ta||ob)&&ub.apply(this,arguments)};ra.drawState(this.getView().getState(this.model.root),Ra);this.updateSvgLinks(ya,qa,!0);this.addForeignObjectWarning(Ra,
+ya);return ya}finally{Oa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var M=z.createElement("switch"),S=z.createElement("g");S.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ca=z.createElement("a");ca.setAttribute("transform","translate(0,-5)");null==ca.setAttributeNS||L.ownerDocument!=document&&
null==document.documentMode?(ca.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ca.setAttribute("target","_blank")):(ca.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ca.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);M.appendChild(S);ca.appendChild(z);
M.appendChild(ca);L.appendChild(M)}};Graph.prototype.updateSvgLinks=function(z,L,M){z=z.getElementsByTagName("a");for(var S=0;S<z.length;S++)if(null==z[S].getAttribute("target")){var ca=z[S].getAttribute("href");null==ca&&(ca=z[S].getAttribute("xlink:href"));null!=ca&&(null!=L&&/^https?:\/\//.test(ca)?z[S].setAttribute("target",L):M&&this.isCustomLink(ca)&&z[S].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;
z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var L=window.getSelection();L.getRangeAt&&L.rangeCount&&(z=L.getRangeAt(0).commonAncestorContainer)}else document.selection&&(z=document.selection.createRange().parentElement());return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&
this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,L,M){for(;null!=z&&z.nodeName!=L;){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=function(z,L,M){for(;null!=z&&!(0<=mxUtils.indexOf(L,z.nodeName));){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var L=null;if(window.getSelection){if(L=window.getSelection(),L.getRangeAt&&
-L.rangeCount){var M=document.createRange();M.selectNode(z);L.removeAllRanges();L.addRange(M)}}else(L=document.selection)&&"Control"!=L.type&&(z=L.createRange(),z.collapse(!0),M=L.createRange(),M.setEndPoint("StartToStart",z),M.select())};Graph.prototype.flipEdgePoints=function(z,L,M){var S=this.getCellGeometry(z);if(null!=S){S=S.clone();if(null!=S.points)for(var ca=0;ca<S.points.length;ca++)L?S.points[ca].x=M+(M-S.points[ca].x):S.points[ca].y=M+(M-S.points[ca].y);ca=function(ia){null!=ia&&(L?ia.x=
-M+(M-ia.x):ia.y=M+(M-ia.y))};ca(S.getTerminalPoint(!0));ca(S.getTerminalPoint(!1));this.model.setGeometry(z,S)}};Graph.prototype.flipChildren=function(z,L,M){this.model.beginUpdate();try{for(var S=this.model.getChildCount(z),ca=0;ca<S;ca++){var ia=this.model.getChildAt(z,ca);if(this.model.isEdge(ia))this.flipEdgePoints(ia,L,M);else{var na=this.getCellGeometry(ia);null!=na&&(na=na.clone(),L?na.x=M+(M-na.x-na.width):na.y=M+(M-na.y-na.height),this.model.setGeometry(ia,na))}}}finally{this.model.endUpdate()}};
-Graph.prototype.flipCells=function(z,L){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var M=[],S=0;S<z.length;S++)if(this.model.isEdge(z[S])){var ca=this.view.getState(z[S]);null!=ca&&this.flipEdgePoints(z[S],L,(L?ca.getCenterX():ca.getCenterY())/this.view.scale-(L?ca.origin.x:ca.origin.y)-(L?this.view.translate.x:this.view.translate.y))}else{var ia=this.getCellGeometry(z[S]);null!=ia&&this.flipChildren(z[S],L,L?ia.getCenterX()-ia.x:ia.getCenterY()-ia.y);M.push(z[S])}this.toggleCellStyles(L?
-mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,M)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,L){var M=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var S=0;S<z.length;S++){var ca=this.model.getParent(z[S]);if(this.isTable(ca)){var ia=this.getCellGeometry(z[S]),na=this.getCellGeometry(ca);null!=ia&&null!=na&&(na=na.clone(),na.height-=ia.height,this.model.setGeometry(ca,na))}}var ra=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,
-L)}finally{this.model.endUpdate()}if(null!=ra)for(M=[],S=0;S<ra.length;S++)this.model.contains(ra[S])&&(this.model.isVertex(ra[S])||this.model.isEdge(ra[S]))&&M.push(ra[S])}return M};Graph.prototype.insertTableColumn=function(z,L){var M=this.getModel();M.beginUpdate();try{var S=z,ca=0;if(this.isTableCell(z)){var ia=M.getParent(z);S=M.getParent(ia);ca=mxUtils.indexOf(M.getChildCells(ia,!0),z)}else this.isTableRow(z)?S=M.getParent(z):z=M.getChildCells(S,!0)[0],L||(ca=M.getChildCells(z,!0).length-1);
-var na=M.getChildCells(S,!0),ra=Graph.minTableColumnWidth;for(z=0;z<na.length;z++){var qa=M.getChildCells(na[z],!0)[ca],ya=M.cloneCell(qa,!1),Ea=this.getCellGeometry(ya);ya.value=null;ya.style=mxUtils.setStyle(mxUtils.setStyle(ya.style,"rowspan",null),"colspan",null);if(null!=Ea){null!=Ea.alternateBounds&&(Ea.width=Ea.alternateBounds.width,Ea.height=Ea.alternateBounds.height,Ea.alternateBounds=null);ra=Ea.width;var Na=this.getCellGeometry(na[z]);null!=Na&&(Ea.height=Na.height)}M.add(na[z],ya,ca+(L?
+L.rangeCount){var M=document.createRange();M.selectNode(z);L.removeAllRanges();L.addRange(M)}}else(L=document.selection)&&"Control"!=L.type&&(z=L.createRange(),z.collapse(!0),M=L.createRange(),M.setEndPoint("StartToStart",z),M.select())};Graph.prototype.flipEdgePoints=function(z,L,M){var S=this.getCellGeometry(z);if(null!=S){S=S.clone();if(null!=S.points)for(var ca=0;ca<S.points.length;ca++)L?S.points[ca].x=M+(M-S.points[ca].x):S.points[ca].y=M+(M-S.points[ca].y);ca=function(ha){null!=ha&&(L?ha.x=
+M+(M-ha.x):ha.y=M+(M-ha.y))};ca(S.getTerminalPoint(!0));ca(S.getTerminalPoint(!1));this.model.setGeometry(z,S)}};Graph.prototype.flipChildren=function(z,L,M){this.model.beginUpdate();try{for(var S=this.model.getChildCount(z),ca=0;ca<S;ca++){var ha=this.model.getChildAt(z,ca);if(this.model.isEdge(ha))this.flipEdgePoints(ha,L,M);else{var oa=this.getCellGeometry(ha);null!=oa&&(oa=oa.clone(),L?oa.x=M+(M-oa.x-oa.width):oa.y=M+(M-oa.y-oa.height),this.model.setGeometry(ha,oa))}}}finally{this.model.endUpdate()}};
+Graph.prototype.flipCells=function(z,L){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var M=[],S=0;S<z.length;S++)if(this.model.isEdge(z[S])){var ca=this.view.getState(z[S]);null!=ca&&this.flipEdgePoints(z[S],L,(L?ca.getCenterX():ca.getCenterY())/this.view.scale-(L?ca.origin.x:ca.origin.y)-(L?this.view.translate.x:this.view.translate.y))}else{var ha=this.getCellGeometry(z[S]);null!=ha&&this.flipChildren(z[S],L,L?ha.getCenterX()-ha.x:ha.getCenterY()-ha.y);M.push(z[S])}this.toggleCellStyles(L?
+mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,M)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,L){var M=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var S=0;S<z.length;S++){var ca=this.model.getParent(z[S]);if(this.isTable(ca)){var ha=this.getCellGeometry(z[S]),oa=this.getCellGeometry(ca);null!=ha&&null!=oa&&(oa=oa.clone(),oa.height-=ha.height,this.model.setGeometry(ca,oa))}}var ra=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,
+L)}finally{this.model.endUpdate()}if(null!=ra)for(M=[],S=0;S<ra.length;S++)this.model.contains(ra[S])&&(this.model.isVertex(ra[S])||this.model.isEdge(ra[S]))&&M.push(ra[S])}return M};Graph.prototype.insertTableColumn=function(z,L){var M=this.getModel();M.beginUpdate();try{var S=z,ca=0;if(this.isTableCell(z)){var ha=M.getParent(z);S=M.getParent(ha);ca=mxUtils.indexOf(M.getChildCells(ha,!0),z)}else this.isTableRow(z)?S=M.getParent(z):z=M.getChildCells(S,!0)[0],L||(ca=M.getChildCells(z,!0).length-1);
+var oa=M.getChildCells(S,!0),ra=Graph.minTableColumnWidth;for(z=0;z<oa.length;z++){var qa=M.getChildCells(oa[z],!0)[ca],xa=M.cloneCell(qa,!1),Ga=this.getCellGeometry(xa);xa.value=null;xa.style=mxUtils.setStyle(mxUtils.setStyle(xa.style,"rowspan",null),"colspan",null);if(null!=Ga){null!=Ga.alternateBounds&&(Ga.width=Ga.alternateBounds.width,Ga.height=Ga.alternateBounds.height,Ga.alternateBounds=null);ra=Ga.width;var La=this.getCellGeometry(oa[z]);null!=La&&(Ga.height=La.height)}M.add(oa[z],xa,ca+(L?
0:1))}var Pa=this.getCellGeometry(S);null!=Pa&&(Pa=Pa.clone(),Pa.width+=ra,M.setGeometry(S,Pa))}finally{M.endUpdate()}};Graph.prototype.deleteLane=function(z){var L=this.getModel();L.beginUpdate();try{var M=null;M="stackLayout"==this.getCurrentCellStyle(z).childLayout?z:L.getParent(z);var S=L.getChildCells(M,!0);0==S.length?L.remove(M):(M==z&&(z=S[S.length-1]),L.remove(z))}finally{L.endUpdate()}};Graph.prototype.insertLane=function(z,L){var M=this.getModel();M.beginUpdate();try{var S=null;if("stackLayout"==
-this.getCurrentCellStyle(z).childLayout){S=z;var ca=M.getChildCells(S,!0);z=ca[L?0:ca.length-1]}else S=M.getParent(z);var ia=S.getIndex(z);z=M.cloneCell(z,!1);z.value=null;M.add(S,z,ia+(L?0:1))}finally{M.endUpdate()}};Graph.prototype.insertTableRow=function(z,L){var M=this.getModel();M.beginUpdate();try{var S=z,ca=z;if(this.isTableCell(z))ca=M.getParent(z),S=M.getParent(ca);else if(this.isTableRow(z))S=M.getParent(z);else{var ia=M.getChildCells(S,!0);ca=ia[L?0:ia.length-1]}var na=M.getChildCells(ca,
-!0),ra=S.getIndex(ca);ca=M.cloneCell(ca,!1);ca.value=null;var qa=this.getCellGeometry(ca);if(null!=qa){for(ia=0;ia<na.length;ia++){z=M.cloneCell(na[ia],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var ya=this.getCellGeometry(z);null!=ya&&(null!=ya.alternateBounds&&(ya.width=ya.alternateBounds.width,ya.height=ya.alternateBounds.height,ya.alternateBounds=null),ya.height=qa.height);ca.insert(z)}M.add(S,ca,ra+(L?0:1));var Ea=this.getCellGeometry(S);
-null!=Ea&&(Ea=Ea.clone(),Ea.height+=qa.height,M.setGeometry(S,Ea))}}finally{M.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,S=z;this.isTableCell(z)&&(S=L.getParent(z));this.isTableRow(S)&&(M=L.getParent(S));var ca=L.getChildCells(M,!0);if(0==ca.length)L.remove(M);else{this.isTableRow(S)||(S=ca[0]);var ia=L.getChildCells(S,!0);if(1>=ia.length)L.remove(M);else{var na=ia.length-1;this.isTableCell(z)&&(na=mxUtils.indexOf(ia,z));for(S=z=0;S<
-ca.length;S++){var ra=L.getChildCells(ca[S],!0)[na];L.remove(ra);var qa=this.getCellGeometry(ra);null!=qa&&(z=Math.max(z,qa.width))}var ya=this.getCellGeometry(M);null!=ya&&(ya=ya.clone(),ya.width-=z,L.setGeometry(M,ya))}}}finally{L.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,S=z;this.isTableCell(z)&&(z=S=L.getParent(z));this.isTableRow(z)&&(M=L.getParent(S));var ca=L.getChildCells(M,!0);if(1>=ca.length)L.remove(M);else{this.isTableRow(S)||
-(S=ca[ca.length-1]);L.remove(S);z=0;var ia=this.getCellGeometry(S);null!=ia&&(z=ia.height);var na=this.getCellGeometry(M);null!=na&&(na=na.clone(),na.height-=z,L.setGeometry(M,na))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(z,L){for(var M=z.tBodies[0],S=M.rows[0].cells,ca=z=0;ca<S.length;ca++){var ia=S[ca].getAttribute("colspan");z+=null!=ia?parseInt(ia):1}L=M.insertRow(L);for(ca=0;ca<z;ca++)mxUtils.br(L.insertCell(-1));return L.cells[0]};Graph.prototype.deleteRow=function(z,L){z.tBodies[0].deleteRow(L)};
+this.getCurrentCellStyle(z).childLayout){S=z;var ca=M.getChildCells(S,!0);z=ca[L?0:ca.length-1]}else S=M.getParent(z);var ha=S.getIndex(z);z=M.cloneCell(z,!1);z.value=null;M.add(S,z,ha+(L?0:1))}finally{M.endUpdate()}};Graph.prototype.insertTableRow=function(z,L){var M=this.getModel();M.beginUpdate();try{var S=z,ca=z;if(this.isTableCell(z))ca=M.getParent(z),S=M.getParent(ca);else if(this.isTableRow(z))S=M.getParent(z);else{var ha=M.getChildCells(S,!0);ca=ha[L?0:ha.length-1]}var oa=M.getChildCells(ca,
+!0),ra=S.getIndex(ca);ca=M.cloneCell(ca,!1);ca.value=null;var qa=this.getCellGeometry(ca);if(null!=qa){for(ha=0;ha<oa.length;ha++){z=M.cloneCell(oa[ha],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var xa=this.getCellGeometry(z);null!=xa&&(null!=xa.alternateBounds&&(xa.width=xa.alternateBounds.width,xa.height=xa.alternateBounds.height,xa.alternateBounds=null),xa.height=qa.height);ca.insert(z)}M.add(S,ca,ra+(L?0:1));var Ga=this.getCellGeometry(S);
+null!=Ga&&(Ga=Ga.clone(),Ga.height+=qa.height,M.setGeometry(S,Ga))}}finally{M.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,S=z;this.isTableCell(z)&&(S=L.getParent(z));this.isTableRow(S)&&(M=L.getParent(S));var ca=L.getChildCells(M,!0);if(0==ca.length)L.remove(M);else{this.isTableRow(S)||(S=ca[0]);var ha=L.getChildCells(S,!0);if(1>=ha.length)L.remove(M);else{var oa=ha.length-1;this.isTableCell(z)&&(oa=mxUtils.indexOf(ha,z));for(S=z=0;S<
+ca.length;S++){var ra=L.getChildCells(ca[S],!0)[oa];L.remove(ra);var qa=this.getCellGeometry(ra);null!=qa&&(z=Math.max(z,qa.width))}var xa=this.getCellGeometry(M);null!=xa&&(xa=xa.clone(),xa.width-=z,L.setGeometry(M,xa))}}}finally{L.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,S=z;this.isTableCell(z)&&(z=S=L.getParent(z));this.isTableRow(z)&&(M=L.getParent(S));var ca=L.getChildCells(M,!0);if(1>=ca.length)L.remove(M);else{this.isTableRow(S)||
+(S=ca[ca.length-1]);L.remove(S);z=0;var ha=this.getCellGeometry(S);null!=ha&&(z=ha.height);var oa=this.getCellGeometry(M);null!=oa&&(oa=oa.clone(),oa.height-=z,L.setGeometry(M,oa))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(z,L){for(var M=z.tBodies[0],S=M.rows[0].cells,ca=z=0;ca<S.length;ca++){var ha=S[ca].getAttribute("colspan");z+=null!=ha?parseInt(ha):1}L=M.insertRow(L);for(ca=0;ca<z;ca++)mxUtils.br(L.insertCell(-1));return L.cells[0]};Graph.prototype.deleteRow=function(z,L){z.tBodies[0].deleteRow(L)};
Graph.prototype.insertColumn=function(z,L){var M=z.tHead;if(null!=M)for(var S=0;S<M.rows.length;S++){var ca=document.createElement("th");M.rows[S].appendChild(ca);mxUtils.br(ca)}z=z.tBodies[0];for(M=0;M<z.rows.length;M++)S=z.rows[M].insertCell(L),mxUtils.br(S);return z.rows[0].cells[0<=L?L:z.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(z,L){if(0<=L){z=z.tBodies[0].rows;for(var M=0;M<z.length;M++)z[M].cells.length>L&&z[M].deleteCell(L)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var L=
-window.getSelection();if(L.getRangeAt&&L.rangeCount){L=L.getRangeAt(0);L.deleteContents();var M=document.createElement("div");M.innerHTML=z;z=document.createDocumentFragment();for(var S;S=M.firstChild;)lastNode=z.appendChild(S);L.insertNode(z)}}else(L=document.selection)&&"Control"!=L.type&&L.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,L){function M(ca,ia){ca.length>ia&&(ca=ca.substring(0,Math.round(ia/2))+"..."+ca.substring(ca.length-Math.round(ia/4)));return ca}z=null!=
+window.getSelection();if(L.getRangeAt&&L.rangeCount){L=L.getRangeAt(0);L.deleteContents();var M=document.createElement("div");M.innerHTML=z;z=document.createDocumentFragment();for(var S;S=M.firstChild;)lastNode=z.appendChild(S);L.insertNode(z)}}else(L=document.selection)&&"Control"!=L.type&&L.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,L){function M(ca,ha){ca.length>ha&&(ca=ca.substring(0,Math.round(ha/2))+"..."+ca.substring(ca.length-Math.round(ha/4)));return ca}z=null!=
z?z:"javascript:void(0);";if(null==L||0==L.length)L=this.isCustomLink(z)?this.getLinkTitle(z):z;var S=document.createElement("a");S.setAttribute("rel",this.linkRelation);S.setAttribute("href",this.getAbsoluteUrl(z));S.setAttribute("title",M(this.isCustomLink(z)?this.getLinkTitle(z):z,80));null!=this.linkTarget&&S.setAttribute("target",this.linkTarget);mxUtils.write(S,M(L,40));this.isCustomLink(z)&&mxEvent.addListener(S,"click",mxUtils.bind(this,function(ca){this.customLinkClicked(z);mxEvent.consume(ca)}));
-return S};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ia,na){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=function(ia){ia=z.apply(this,arguments);if(mxEvent.isTouchEvent(ia.getEvent())&&null==ia.getState()){var na=this.getCellAt(ia.graphX,ia.graphY);null!=na&&this.isSwimlane(na)&&this.hitsSwimlaneContent(na,ia.graphX,ia.graphY)||
-(ia.state=this.view.getState(na),null!=ia.state&&null!=ia.state.shape&&(this.container.style.cursor=ia.state.shape.node.style.cursor))}null==ia.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ia};var L=!1,M=!1,S=!1,ca=this.fireMouseEvent;this.fireMouseEvent=function(ia,na,ra){ia==mxEvent.MOUSE_DOWN&&(na=this.updateMouseEvent(na),L=this.isCellSelected(na.getCell()),M=this.isSelectionEmpty(),S=this.popupMenuHandler.isMenuShowing());ca.apply(this,arguments)};this.popupMenuHandler.mouseUp=
-mxUtils.bind(this,function(ia,na){var ra=mxEvent.isMouseEvent(na.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==na.getState()||!na.isSource(na.getState().control))&&(this.popupMenuHandler.popupTrigger||!S&&!ra&&(M&&null==na.getCell()&&this.isSelectionEmpty()||L&&this.isCellSelected(na.getCell())));ra=!L||ra?null:mxUtils.bind(this,function(qa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ya=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(na.getX()+
-ya.x+1,na.getY()+ya.y+1,qa,na.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ia,na,ra])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():
+return S};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ha,oa){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=function(ha){ha=z.apply(this,arguments);if(mxEvent.isTouchEvent(ha.getEvent())&&null==ha.getState()){var oa=this.getCellAt(ha.graphX,ha.graphY);null!=oa&&this.isSwimlane(oa)&&this.hitsSwimlaneContent(oa,ha.graphX,ha.graphY)||
+(ha.state=this.view.getState(oa),null!=ha.state&&null!=ha.state.shape&&(this.container.style.cursor=ha.state.shape.node.style.cursor))}null==ha.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ha};var L=!1,M=!1,S=!1,ca=this.fireMouseEvent;this.fireMouseEvent=function(ha,oa,ra){ha==mxEvent.MOUSE_DOWN&&(oa=this.updateMouseEvent(oa),L=this.isCellSelected(oa.getCell()),M=this.isSelectionEmpty(),S=this.popupMenuHandler.isMenuShowing());ca.apply(this,arguments)};this.popupMenuHandler.mouseUp=
+mxUtils.bind(this,function(ha,oa){var ra=mxEvent.isMouseEvent(oa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==oa.getState()||!oa.isSource(oa.getState().control))&&(this.popupMenuHandler.popupTrigger||!S&&!ra&&(M&&null==oa.getCell()&&this.isSelectionEmpty()||L&&this.isCellSelected(oa.getCell())));ra=!L||ra?null:mxUtils.bind(this,function(qa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var xa=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(oa.getX()+
+xa.x+1,oa.getY()+xa.y+1,qa,oa.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ha,oa,ra])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():
document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var L=this.textarea.ownerDocument.defaultView.getSelection(),M=L.getRangeAt(0),S="\t";if(null!=z)for(S="";0<z;)S+=" ",z--;z=document.createElement("span");z.style.whiteSpace="pre";z.appendChild(document.createTextNode(S));M.insertNode(z);M.setStartAfter(z);M.setEndAfter(z);L.removeAllRanges();L.addRange(M)};mxCellEditor.prototype.alignText=
function(z,L){var M=null!=L&&mxEvent.isShiftDown(L);if(M||null!=window.getSelection&&null!=window.getSelection().containsNode){var S=!0;this.graph.processElements(this.textarea,function(ca){M||window.getSelection().containsNode(ca,!0)?(ca.removeAttribute("align"),ca.style.textAlign=null):S=!1});S&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&
z.rangeCount){for(var L=[],M=0,S=z.rangeCount;M<S;++M)L.push(z.getRangeAt(M));return L}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var L=0,M=z.length;L<M;++L)sel.addRange(z[L])}else document.selection&&z.select&&z.select()}catch(S){}};var C=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=
function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));C.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,L){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var G=mxCellEditor.prototype.startEditing;
mxCellEditor.prototype.startEditing=function(z,L){z=this.graph.getStartEditingCell(z,L);G.apply(this,arguments);var M=this.graph.view.getState(z);this.textarea.className=null!=M&&1==M.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);M=this.graph.getModel().getParent(z);var S=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(M)&&null!=S&&S.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=
-mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var aa=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function L(ca,ia){ia.originalNode=ca;ca=ca.firstChild;for(var na=ia.firstChild;null!=ca&&null!=na;)L(ca,na),ca=ca.nextSibling,na=na.nextSibling;return ia}function M(ca,ia){if(null!=ca)if(ia.originalNode!=ca)S(ca);else for(ca=ca.firstChild,ia=ia.firstChild;null!=ca;){var na=ca.nextSibling;null==ia?S(ca):(M(ca,ia),
-ia=ia.nextSibling);ca=na}}function S(ca){for(var ia=ca.firstChild;null!=ia;){var na=ia.nextSibling;S(ia);ia=na}1==ca.nodeType&&("BR"===ca.nodeName||null!=ca.firstChild)||3==ca.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(ca)).length?(3==ca.nodeType&&mxUtils.setTextContent(ca,mxUtils.getTextContent(ca).replace(/\n|\r/g,"")),1==ca.nodeType&&(ca.removeAttribute("style"),ca.removeAttribute("class"),ca.removeAttribute("width"),ca.removeAttribute("cellpadding"),ca.removeAttribute("cellspacing"),ca.removeAttribute("border"))):
-ca.parentNode.removeChild(ca)}aa.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(ca){var ia=L(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?M(this.textarea,ia):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=
+mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var aa=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function L(ca,ha){ha.originalNode=ca;ca=ca.firstChild;for(var oa=ha.firstChild;null!=ca&&null!=oa;)L(ca,oa),ca=ca.nextSibling,oa=oa.nextSibling;return ha}function M(ca,ha){if(null!=ca)if(ha.originalNode!=ca)S(ca);else for(ca=ca.firstChild,ha=ha.firstChild;null!=ca;){var oa=ca.nextSibling;null==ha?S(ca):(M(ca,ha),
+ha=ha.nextSibling);ca=oa}}function S(ca){for(var ha=ca.firstChild;null!=ha;){var oa=ha.nextSibling;S(ha);ha=oa}1==ca.nodeType&&("BR"===ca.nodeName||null!=ca.firstChild)||3==ca.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(ca)).length?(3==ca.nodeType&&mxUtils.setTextContent(ca,mxUtils.getTextContent(ca).replace(/\n|\r/g,"")),1==ca.nodeType&&(ca.removeAttribute("style"),ca.removeAttribute("class"),ca.removeAttribute("width"),ca.removeAttribute("cellpadding"),ca.removeAttribute("cellspacing"),ca.removeAttribute("border"))):
+ca.parentNode.removeChild(ca)}aa.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(ca){var ha=L(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?M(this.textarea,ha):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=
function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var L=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),M=this.saveSelection();if(this.codeViewMode){ra=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ra.length&&"\n"==ra.charAt(ra.length-1)&&(ra=ra.substring(0,ra.length-1));ra=this.graph.sanitizeHtml(L?ra.replace(/\n/g,"<br/>"):ra,!0);this.textarea.className="mxCellEditor geContentEditable";qa=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
-L=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var S=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ca=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ia=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,na=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
-na.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&na.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(qa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(qa)+"px";this.textarea.style.textDecoration=na.join(" ");this.textarea.style.fontWeight=ca?"bold":"normal";this.textarea.style.fontStyle=ia?"italic":"";this.textarea.style.fontFamily=
+L=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var S=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ca=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ha=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,oa=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
+oa.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&oa.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(qa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(qa)+"px";this.textarea.style.textDecoration=oa.join(" ");this.textarea.style.fontWeight=ca?"bold":"normal";this.textarea.style.fontStyle=ha?"italic":"";this.textarea.style.fontFamily=
L;this.textarea.style.textAlign=S;this.textarea.style.padding="0px";this.textarea.innerHTML!=ra&&(this.textarea.innerHTML=ra,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var ra=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ra=mxUtils.replaceTrailingNewlines(ra,
"<div><br></div>"));ra=this.graph.sanitizeHtml(L?ra.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ra,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var qa=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(qa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(qa)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=
mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=ra&&(this.textarea.innerHTML=ra);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=M;this.resize()}};var da=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,L){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),
@@ -2595,29 +2595,29 @@ mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.
mxConstants.STYLE_STROKECOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getMinimumSize=function(z){var L=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*L+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(z,L){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(L.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?
e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var L=this.graph.view.translate,M=this.graph.view.scale;z=this.roundLength((this.bounds.x+this.currentDx)/M-L.x);L=this.roundLength((this.bounds.y+this.currentDy)/M-L.y);M=this.graph.view.unit;this.hint.innerHTML=e(z,M)+", "+e(L,M);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-
this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var pa=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(z,L){pa.apply(this,arguments);var M=this.graph.getCellStyle(z);if(null==M.childLayout){var S=this.graph.model.getParent(z),ca=null!=S?this.graph.getCellGeometry(S):
-null;if(null!=ca&&(M=this.graph.getCellStyle(S),"stackLayout"==M.childLayout)){var ia=parseFloat(mxUtils.getValue(M,"stackBorder",mxStackLayout.prototype.border));M="1"==mxUtils.getValue(M,"horizontalStack","1");var na=this.graph.getActualStartSize(S);ca=ca.clone();M?ca.height=L.height+na.y+na.height+2*ia:ca.width=L.width+na.x+na.width+2*ia;this.graph.model.setGeometry(S,ca)}}};var O=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=
-function(){function z(ra){M.get(ra)||(M.put(ra,!0),ca.push(ra))}for(var L=O.apply(this,arguments),M=new mxDictionary,S=this.graph.model,ca=[],ia=0;ia<L.length;ia++){var na=L[ia];this.graph.isTableCell(na)?z(S.getParent(S.getParent(na))):this.graph.isTableRow(na)&&z(S.getParent(na));z(na)}return ca};var X=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var L=X.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};var ea=
+null;if(null!=ca&&(M=this.graph.getCellStyle(S),"stackLayout"==M.childLayout)){var ha=parseFloat(mxUtils.getValue(M,"stackBorder",mxStackLayout.prototype.border));M="1"==mxUtils.getValue(M,"horizontalStack","1");var oa=this.graph.getActualStartSize(S);ca=ca.clone();M?ca.height=L.height+oa.y+oa.height+2*ha:ca.width=L.width+oa.x+oa.width+2*ha;this.graph.model.setGeometry(S,ca)}}};var O=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=
+function(){function z(ra){M.get(ra)||(M.put(ra,!0),ca.push(ra))}for(var L=O.apply(this,arguments),M=new mxDictionary,S=this.graph.model,ca=[],ha=0;ha<L.length;ha++){var oa=L[ha];this.graph.isTableCell(oa)?z(S.getParent(S.getParent(oa))):this.graph.isTableRow(oa)&&z(S.getParent(oa));z(oa)}return ca};var X=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var L=X.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};var ea=
mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var L=ea.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=
function(z,L){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(L.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(z,L){return mxEvent.isControlDown(L.getEvent())||mxEvent.isMetaDown(L.getEvent())};var ka=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ka.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=
function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var ja=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return ja.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var U=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=
-function(z){return z.tableHandle||U.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&(z=2);return z};var I=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return I.apply(this,arguments).grow(-this.getSelectionBorderInset())};
-var V=null,P=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var z=P.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var L=function(Ua,La,ua){for(var za=[],Ka=0;Ka<Ua.length;Ka++){var Ga=Ua[Ka];za.push(null==Ga?null:new mxPoint((qa+Ga.x+La)*ia,(ya+Ga.y+ua)*ia))}return za},M=this,S=this.graph,ca=S.model,ia=S.view.scale,na=this.state,ra=this.selectionBorder,qa=this.state.origin.x+
-S.view.translate.x,ya=this.state.origin.y+S.view.translate.y;null==z&&(z=[]);var Ea=S.view.getCellStates(ca.getChildCells(this.state.cell,!0));if(0<Ea.length){var Na=ca.getChildCells(Ea[0].cell,!0),Pa=S.getTableLines(this.state.cell,!1,!0),Qa=S.getTableLines(this.state.cell,!0,!1);for(ca=0;ca<Ea.length;ca++)mxUtils.bind(this,function(Ua){var La=Ea[Ua],ua=Ua<Ea.length-1?Ea[Ua+1]:null;ua=null!=ua?S.getCellGeometry(ua.cell):null;var za=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=
-Qa[Ua]?new V(Qa[Ua],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);ua.isDashed=ra.isDashed;ua.svgStrokeTolerance++;La=new mxHandle(La,"row-resize",null,ua);La.tableHandle=!0;var Ka=0;La.shape.node.parentNode.insertBefore(La.shape.node,La.shape.node.parentNode.firstChild);La.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ka?mxConstants.NONE:ra.stroke;if(this.shape.constructor==V)this.shape.line=L(Qa[Ua],0,Ka),this.shape.updateBoundsFromLine();else{var Ma=S.getActualStartSize(na.cell,
-!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ka*ia;this.shape.bounds.x=na.x+(Ua==Ea.length-1?0:Ma.x*ia);this.shape.bounds.width=na.width-(Ua==Ea.length-1?0:Ma.width+Ma.x+ia)}this.shape.redraw()}};var Ga=!1;La.setPosition=function(Ma,db,Ra){Ka=Math.max(Graph.minTableRowHeight-Ma.height,db.y-Ma.y-Ma.height);Ga=mxEvent.isShiftDown(Ra.getEvent());null!=za&&Ga&&(Ka=Math.min(Ka,za.height-Graph.minTableRowHeight))};La.execute=function(Ma){if(0!=Ka)S.setTableRowHeight(this.state.cell,
-Ka,!Ga);else if(!M.blockDelayedSelection){var db=S.getCellAt(Ma.getGraphX(),Ma.getGraphY())||na.cell;S.graphHandler.selectCellForEvent(db,Ma)}Ka=0};La.reset=function(){Ka=0};z.push(La)})(ca);for(ca=0;ca<Na.length;ca++)mxUtils.bind(this,function(Ua){var La=S.view.getState(Na[Ua]),ua=S.getCellGeometry(Na[Ua]),za=null!=ua.alternateBounds?ua.alternateBounds:ua;null==La&&(La=new mxCellState(S.view,Na[Ua],S.getCellStyle(Na[Ua])),La.x=na.x+ua.x*ia,La.y=na.y+ua.y*ia,La.width=za.width*ia,La.height=za.height*
-ia,La.updateCachedBounds());ua=Ua<Na.length-1?Na[Ua+1]:null;ua=null!=ua?S.getCellGeometry(ua):null;var Ka=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Pa[Ua]?new V(Pa[Ua],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);ua.isDashed=ra.isDashed;ua.svgStrokeTolerance++;La=new mxHandle(La,"col-resize",null,ua);La.tableHandle=!0;var Ga=0;La.shape.node.parentNode.insertBefore(La.shape.node,La.shape.node.parentNode.firstChild);La.redraw=function(){if(null!=this.shape){this.shape.stroke=
-0==Ga?mxConstants.NONE:ra.stroke;if(this.shape.constructor==V)this.shape.line=L(Pa[Ua],Ga,0),this.shape.updateBoundsFromLine();else{var db=S.getActualStartSize(na.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(za.width+Ga)*ia;this.shape.bounds.y=na.y+(Ua==Na.length-1?0:db.y*ia);this.shape.bounds.height=na.height-(Ua==Na.length-1?0:(db.height+db.y)*ia)}this.shape.redraw()}};var Ma=!1;La.setPosition=function(db,Ra,ib){Ga=Math.max(Graph.minTableColumnWidth-za.width,Ra.x-db.x-za.width);
-Ma=mxEvent.isShiftDown(ib.getEvent());null==Ka||Ma||(Ga=Math.min(Ga,Ka.width-Graph.minTableColumnWidth))};La.execute=function(db){if(0!=Ga)S.setTableColumnWidth(this.state.cell,Ga,Ma);else if(!M.blockDelayedSelection){var Ra=S.getCellAt(db.getGraphX(),db.getGraphY())||na.cell;S.graphHandler.selectCellForEvent(Ra,db)}Ga=0};La.positionChanged=function(){};La.reset=function(){Ga=0};z.push(La)})(ca)}}return null!=z?z.reverse():null};var R=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=
+function(z){return z.tableHandle||U.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&(z=2);return z};var J=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return J.apply(this,arguments).grow(-this.getSelectionBorderInset())};
+var V=null,P=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var z=P.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var L=function(Ta,Ma,ua){for(var ya=[],Na=0;Na<Ta.length;Na++){var Fa=Ta[Na];ya.push(null==Fa?null:new mxPoint((qa+Fa.x+Ma)*ha,(xa+Fa.y+ua)*ha))}return ya},M=this,S=this.graph,ca=S.model,ha=S.view.scale,oa=this.state,ra=this.selectionBorder,qa=this.state.origin.x+
+S.view.translate.x,xa=this.state.origin.y+S.view.translate.y;null==z&&(z=[]);var Ga=S.view.getCellStates(ca.getChildCells(this.state.cell,!0));if(0<Ga.length){var La=ca.getChildCells(Ga[0].cell,!0),Pa=S.getTableLines(this.state.cell,!1,!0),Oa=S.getTableLines(this.state.cell,!0,!1);for(ca=0;ca<Ga.length;ca++)mxUtils.bind(this,function(Ta){var Ma=Ga[Ta],ua=Ta<Ga.length-1?Ga[Ta+1]:null;ua=null!=ua?S.getCellGeometry(ua.cell):null;var ya=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=
+Oa[Ta]?new V(Oa[Ta],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);ua.isDashed=ra.isDashed;ua.svgStrokeTolerance++;Ma=new mxHandle(Ma,"row-resize",null,ua);Ma.tableHandle=!0;var Na=0;Ma.shape.node.parentNode.insertBefore(Ma.shape.node,Ma.shape.node.parentNode.firstChild);Ma.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Na?mxConstants.NONE:ra.stroke;if(this.shape.constructor==V)this.shape.line=L(Oa[Ta],0,Na),this.shape.updateBoundsFromLine();else{var Ra=S.getActualStartSize(oa.cell,
+!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Na*ha;this.shape.bounds.x=oa.x+(Ta==Ga.length-1?0:Ra.x*ha);this.shape.bounds.width=oa.width-(Ta==Ga.length-1?0:Ra.width+Ra.x+ha)}this.shape.redraw()}};var Fa=!1;Ma.setPosition=function(Ra,db,Va){Na=Math.max(Graph.minTableRowHeight-Ra.height,db.y-Ra.y-Ra.height);Fa=mxEvent.isShiftDown(Va.getEvent());null!=ya&&Fa&&(Na=Math.min(Na,ya.height-Graph.minTableRowHeight))};Ma.execute=function(Ra){if(0!=Na)S.setTableRowHeight(this.state.cell,
+Na,!Fa);else if(!M.blockDelayedSelection){var db=S.getCellAt(Ra.getGraphX(),Ra.getGraphY())||oa.cell;S.graphHandler.selectCellForEvent(db,Ra)}Na=0};Ma.reset=function(){Na=0};z.push(Ma)})(ca);for(ca=0;ca<La.length;ca++)mxUtils.bind(this,function(Ta){var Ma=S.view.getState(La[Ta]),ua=S.getCellGeometry(La[Ta]),ya=null!=ua.alternateBounds?ua.alternateBounds:ua;null==Ma&&(Ma=new mxCellState(S.view,La[Ta],S.getCellStyle(La[Ta])),Ma.x=oa.x+ua.x*ha,Ma.y=oa.y+ua.y*ha,Ma.width=ya.width*ha,Ma.height=ya.height*
+ha,Ma.updateCachedBounds());ua=Ta<La.length-1?La[Ta+1]:null;ua=null!=ua?S.getCellGeometry(ua):null;var Na=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Pa[Ta]?new V(Pa[Ta],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);ua.isDashed=ra.isDashed;ua.svgStrokeTolerance++;Ma=new mxHandle(Ma,"col-resize",null,ua);Ma.tableHandle=!0;var Fa=0;Ma.shape.node.parentNode.insertBefore(Ma.shape.node,Ma.shape.node.parentNode.firstChild);Ma.redraw=function(){if(null!=this.shape){this.shape.stroke=
+0==Fa?mxConstants.NONE:ra.stroke;if(this.shape.constructor==V)this.shape.line=L(Pa[Ta],Fa,0),this.shape.updateBoundsFromLine();else{var db=S.getActualStartSize(oa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(ya.width+Fa)*ha;this.shape.bounds.y=oa.y+(Ta==La.length-1?0:db.y*ha);this.shape.bounds.height=oa.height-(Ta==La.length-1?0:(db.height+db.y)*ha)}this.shape.redraw()}};var Ra=!1;Ma.setPosition=function(db,Va,fb){Fa=Math.max(Graph.minTableColumnWidth-ya.width,Va.x-db.x-ya.width);
+Ra=mxEvent.isShiftDown(fb.getEvent());null==Na||Ra||(Fa=Math.min(Fa,Na.width-Graph.minTableColumnWidth))};Ma.execute=function(db){if(0!=Fa)S.setTableColumnWidth(this.state.cell,Fa,Ra);else if(!M.blockDelayedSelection){var Va=S.getCellAt(db.getGraphX(),db.getGraphY())||oa.cell;S.graphHandler.selectCellForEvent(Va,db)}Fa=0};Ma.positionChanged=function(){};Ma.reset=function(){Fa=0};z.push(Ma)})(ca)}}return null!=z?z.reverse():null};var R=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=
function(z){R.apply(this,arguments);if(null!=this.moveHandles)for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].style.visibility=z?"":"hidden";if(null!=this.cornerHandles)for(L=0;L<this.cornerHandles.length;L++)this.cornerHandles[L].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var z=this.graph.model;if(null!=this.moveHandles){for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].parentNode.removeChild(this.moveHandles[L]);this.moveHandles=
null}this.moveHandles=[];for(L=0;L<z.getChildCount(this.state.cell);L++)mxUtils.bind(this,function(M){if(null!=M&&z.isVertex(M.cell)){var S=mxUtils.createImage(Editor.rowMoveImage);S.style.position="absolute";S.style.cursor="pointer";S.style.width="7px";S.style.height="4px";S.style.padding="4px 2px 4px 2px";S.rowState=M;mxEvent.addGestureListeners(S,mxUtils.bind(this,function(ca){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(ca)&&this.graph.isCellSelected(M.cell)||
this.graph.selectCellForEvent(M.cell,ca);mxEvent.isPopupTrigger(ca)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(ca),mxEvent.getClientY(ca),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(ca),this.graph.isMouseDown=!0);mxEvent.consume(ca)}),null,mxUtils.bind(this,function(ca){mxEvent.isPopupTrigger(ca)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(ca),mxEvent.getClientY(ca),M.cell,ca),mxEvent.consume(ca))}));
-this.moveHandles.push(S);this.graph.container.appendChild(S)}})(this.graph.view.getState(z.getChildAt(this.state.cell,L)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var fa=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,
-0),L=this.tolerance,M=this.state.style.shape;null==mxCellRenderer.defaultShapes[M]&&mxStencilRegistry.getStencil(M);M=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!M&&null!=this.customHandles)for(var S=0;S<this.customHandles.length;S++)if(null!=this.customHandles[S].shape&&null!=this.customHandles[S].shape.bounds){var ca=this.customHandles[S].shape.bounds,ia=ca.getCenterX(),na=ca.getCenterY();if(Math.abs(this.state.x-ia)<ca.width/2||Math.abs(this.state.y-
-na)<ca.height/2||Math.abs(this.state.x+this.state.width-ia)<ca.width/2||Math.abs(this.state.y+this.state.height-na)<ca.height/2){M=!0;break}}M&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(L/=2,this.graph.isTable(this.state.cell)&&(L+=7),z.x=this.sizers[0].bounds.width+L,z.y=this.sizers[0].bounds.height+L):z=fa.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));
+this.moveHandles.push(S);this.graph.container.appendChild(S)}})(this.graph.view.getState(z.getChildAt(this.state.cell,L)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var ia=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,
+0),L=this.tolerance,M=this.state.style.shape;null==mxCellRenderer.defaultShapes[M]&&mxStencilRegistry.getStencil(M);M=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!M&&null!=this.customHandles)for(var S=0;S<this.customHandles.length;S++)if(null!=this.customHandles[S].shape&&null!=this.customHandles[S].shape.bounds){var ca=this.customHandles[S].shape.bounds,ha=ca.getCenterX(),oa=ca.getCenterY();if(Math.abs(this.state.x-ha)<ca.width/2||Math.abs(this.state.y-
+oa)<ca.height/2||Math.abs(this.state.x+this.state.width-ha)<ca.width/2||Math.abs(this.state.y+this.state.height-oa)<ca.height/2){M=!0;break}}M&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(L/=2,this.graph.isTable(this.state.cell)&&(L+=7),z.x=this.sizers[0].bounds.width+L,z.y=this.sizers[0].bounds.height+L):z=ia.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));
if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{z=this.state.view.scale;var L=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/z),L)+" x "+e(this.roundLength(this.bounds.height/z),L)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=
z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var la=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,L){la.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display=
-"none")};var sa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,L){sa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(z,L){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var M=this.graph.view.translate,S=this.graph.view.scale,ca=this.roundLength(L.x/S-M.x);M=this.roundLength(L.y/S-M.y);S=this.graph.view.unit;this.hint.innerHTML=
+"none")};var ta=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,L){ta.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(z,L){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var M=this.graph.view.translate,S=this.graph.view.scale,ca=this.roundLength(L.x/S-M.x);M=this.roundLength(L.y/S-M.y);S=this.graph.view.unit;this.hint.innerHTML=
e(ca,S)+", "+e(M,S);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(ca=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*ca.x)+"%, "+Math.round(100*ca.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),L.y)+Editor.hintOffset+
"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');Graph.prototype.collapsedImage=Graph.createSvgImage(9,
9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+
@@ -2631,55 +2631,55 @@ HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangl
!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=
12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(z){return mxEvent.isMouseEvent(z.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return null==z.getState()&&!mxEvent.isMouseEvent(L)||mxEvent.isPopupTrigger(L)&&(null==z.getState()||mxEvent.isControlDown(L)||mxEvent.isShiftDown(L))};var u=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
function(z,L){u.apply(this,arguments);mxEvent.isTouchEvent(L.getEvent())&&this.graph.isCellSelected(L.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return mxEvent.isLeftMouseButton(L)&&(this.useLeftButtonForPanning&&null==z.getState()||mxEvent.isControlDown(L)&&!mxEvent.isShiftDown(L))||this.usePopupTrigger&&mxEvent.isPopupTrigger(L)};mxRubberband.prototype.isSpaceEvent=function(z){return this.graph.isEnabled()&&
-!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,L){if(this.cancelled)this.cancelled=!1,L.consume();else{var M=null!=this.div&&"none"!=this.div.style.display,S=null,ca=null,ia=z=null;
-null!=this.first&&null!=this.currentX&&null!=this.currentY&&(S=this.first.x,ca=this.first.y,z=(this.currentX-S)/this.graph.view.scale,ia=(this.currentY-ca)/this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(z=this.graph.snap(z),ia=this.graph.snap(ia),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ia)<this.graph.tolerance&&(ia=0))));this.reset();if(M){if(this.isSpaceEvent(L)){this.graph.model.beginUpdate();try{var na=this.graph.getCellsBeyond(S,ca,this.graph.getDefaultParent(),
-!0,!0);for(M=0;M<na.length;M++)if(this.graph.isCellMovable(na[M])){var ra=this.graph.view.getState(na[M]),qa=this.graph.getCellGeometry(na[M]);null!=ra&&null!=qa&&(qa=qa.clone(),qa.translate(z,ia),this.graph.model.setGeometry(na[M],qa))}}finally{this.graph.model.endUpdate()}}else na=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(na,L.getEvent());L.consume()}}};mxRubberband.prototype.mouseMove=function(z,L){if(!L.isConsumed()&&null!=this.first){var M=mxUtils.getScrollOrigin(this.graph.container);
-z=mxUtils.getOffset(this.graph.container);M.x-=z.x;M.y-=z.y;z=L.getX()+M.x;M=L.getY()+M.y;var S=this.first.x-z,ca=this.first.y-M,ia=this.graph.tolerance;if(null!=this.div||Math.abs(S)>ia||Math.abs(ca)>ia)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,M),this.isSpaceEvent(L)?(z=this.x+this.width,M=this.y+this.height,S=this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(this.width=this.graph.snap(this.width/S)*S,this.height=this.graph.snap(this.height/S)*S,
+!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,L){if(this.cancelled)this.cancelled=!1,L.consume();else{var M=null!=this.div&&"none"!=this.div.style.display,S=null,ca=null,ha=z=null;
+null!=this.first&&null!=this.currentX&&null!=this.currentY&&(S=this.first.x,ca=this.first.y,z=(this.currentX-S)/this.graph.view.scale,ha=(this.currentY-ca)/this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(z=this.graph.snap(z),ha=this.graph.snap(ha),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ha)<this.graph.tolerance&&(ha=0))));this.reset();if(M){if(this.isSpaceEvent(L)){this.graph.model.beginUpdate();try{var oa=this.graph.getCellsBeyond(S,ca,this.graph.getDefaultParent(),
+!0,!0);for(M=0;M<oa.length;M++)if(this.graph.isCellMovable(oa[M])){var ra=this.graph.view.getState(oa[M]),qa=this.graph.getCellGeometry(oa[M]);null!=ra&&null!=qa&&(qa=qa.clone(),qa.translate(z,ha),this.graph.model.setGeometry(oa[M],qa))}}finally{this.graph.model.endUpdate()}}else oa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(oa,L.getEvent());L.consume()}}};mxRubberband.prototype.mouseMove=function(z,L){if(!L.isConsumed()&&null!=this.first){var M=mxUtils.getScrollOrigin(this.graph.container);
+z=mxUtils.getOffset(this.graph.container);M.x-=z.x;M.y-=z.y;z=L.getX()+M.x;M=L.getY()+M.y;var S=this.first.x-z,ca=this.first.y-M,ha=this.graph.tolerance;if(null!=this.div||Math.abs(S)>ha||Math.abs(ca)>ha)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,M),this.isSpaceEvent(L)?(z=this.x+this.width,M=this.y+this.height,S=this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(this.width=this.graph.snap(this.width/S)*S,this.height=this.graph.snap(this.height/S)*S,
this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=z-this.width),this.y<this.first.y&&(this.y=M-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?
"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle=
-"",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),L.consume()}};var J=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);J.apply(this,arguments)};var N=(new Date).getTime(),W=0,T=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,L,M,S){T.apply(this,arguments);M!=this.currentTerminalState?
+"",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),L.consume()}};var I=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);I.apply(this,arguments)};var N=(new Date).getTime(),W=0,T=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,L,M,S){T.apply(this,arguments);M!=this.currentTerminalState?
(N=(new Date).getTime(),W=0):W=(new Date).getTime()-N;this.currentTerminalState=M};var Q=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<W||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&Q.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
function(z,L,M){L=null!=z&&0==z;var S=this.state.getVisibleTerminalState(L);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,S,L):null;M=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(L),z):null)?M?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=S?M?this.endTerminalHandleImage:this.terminalHandleImage:M?this.endHandleImage:this.handleImage;if(null!=M)return M=
new mxImageShape(new mxRectangle(0,0,M.width,M.height),M.src),M.preserveImageAspect=!1,M;M=mxConstants.HANDLE_SIZE;this.preferHtml&&--M;return new mxRectangleShape(new mxRectangle(0,0,M,M),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Z=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,L,M){this.handleImage=L==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:L==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return Z.apply(this,arguments)};var oa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var L=this.graph.getModel(),M=L.getParent(z[0]),S=this.graph.getCellGeometry(z[0]);if(L.isEdge(M)&&null!=S&&S.relative&&(L=this.graph.view.getState(z[0]),null!=L&&2>L.width&&2>L.height&&null!=L.text&&null!=L.text.boundingBox))return mxRectangle.fromRectangle(L.text.boundingBox)}return oa.apply(this,arguments)};var wa=mxGraphHandler.prototype.getGuideStates;
-mxGraphHandler.prototype.getGuideStates=function(){for(var z=wa.apply(this,arguments),L=[],M=0;M<z.length;M++)"1"!=mxUtils.getValue(z[M].style,"part","0")&&L.push(z[M]);return L};var Aa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var L=this.graph.getModel(),M=L.getParent(z.cell),S=this.graph.getCellGeometry(z.cell);return L.isEdge(M)&&null!=S&&S.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(L=z.text.unrotatedBoundingBox||
-z.text.boundingBox,new mxRectangle(Math.round(L.x),Math.round(L.y),Math.round(L.width),Math.round(L.height))):Aa.apply(this,arguments)};var ta=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,L){var M=this.graph.getModel(),S=M.getParent(this.state.cell),ca=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(L)==mxEvent.ROTATION_HANDLE||!M.isEdge(S)||null==ca||!ca.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ta.apply(this,
+return Z.apply(this,arguments)};var na=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var L=this.graph.getModel(),M=L.getParent(z[0]),S=this.graph.getCellGeometry(z[0]);if(L.isEdge(M)&&null!=S&&S.relative&&(L=this.graph.view.getState(z[0]),null!=L&&2>L.width&&2>L.height&&null!=L.text&&null!=L.text.boundingBox))return mxRectangle.fromRectangle(L.text.boundingBox)}return na.apply(this,arguments)};var va=mxGraphHandler.prototype.getGuideStates;
+mxGraphHandler.prototype.getGuideStates=function(){for(var z=va.apply(this,arguments),L=[],M=0;M<z.length;M++)"1"!=mxUtils.getValue(z[M].style,"part","0")&&L.push(z[M]);return L};var Ba=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var L=this.graph.getModel(),M=L.getParent(z.cell),S=this.graph.getCellGeometry(z.cell);return L.isEdge(M)&&null!=S&&S.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(L=z.text.unrotatedBoundingBox||
+z.text.boundingBox,new mxRectangle(Math.round(L.x),Math.round(L.y),Math.round(L.width),Math.round(L.height))):Ba.apply(this,arguments)};var sa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,L){var M=this.graph.getModel(),S=M.getParent(this.state.cell),ca=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(L)==mxEvent.ROTATION_HANDLE||!M.isEdge(S)||null==ca||!ca.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&sa.apply(this,
arguments)};mxVertexHandler.prototype.rotateClick=function(){var z=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),L=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&z==mxConstants.NONE&&L==mxConstants.NONE?(z=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,z,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
-var Ba=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,L){Ba.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var va=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,L){va.apply(this,arguments);null!=this.rotationShape&&null!=
-this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var Oa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Oa.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
+var Da=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,L){Da.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Aa=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,L){Aa.apply(this,arguments);null!=this.rotationShape&&null!=
+this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var za=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){za.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var L=0;4>L;L++){var M=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);M.dialect=mxConstants.DIALECT_SVG;M.init(this.graph.view.getOverlayPane());this.cornerHandles.push(M)}}var S=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
-this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(ca,ia){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));S()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(ca,ia){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,
+this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(ca,ha){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));S()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(ca,ha){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,
this.editingHandler);L=this.graph.getLinkForCell(this.state.cell);M=this.graph.getLinksForState(this.state);this.updateLinkHint(L,M);if(null!=L||null!=M&&0<M.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,L){try{if(null==z&&(null==L||0==L.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=L&&0<L.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerHTML="";if(null!=z&&(this.linkHint.appendChild(this.graph.createLinkForHint(z)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var M=document.createElement("img");M.setAttribute("src",Editor.editImage);M.setAttribute("title",
-mxResources.get("editLink"));M.setAttribute("width","11");M.setAttribute("height","11");M.style.marginLeft="10px";M.style.marginBottom="-1px";M.style.cursor="pointer";Editor.isDarkMode()&&(M.style.filter="invert(100%)");this.linkHint.appendChild(M);mxEvent.addListener(M,"click",mxUtils.bind(this,function(ia){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ia)}));var S=M.cloneNode(!0);S.setAttribute("src",Editor.trashImage);S.setAttribute("title",mxResources.get("removeIt",
-[mxResources.get("link")]));S.style.marginLeft="4px";this.linkHint.appendChild(S);mxEvent.addListener(S,"click",mxUtils.bind(this,function(ia){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ia)}))}if(null!=L)for(M=0;M<L.length;M++){var ca=document.createElement("div");ca.style.marginTop=null!=z||0<M?"6px":"0px";ca.appendChild(this.graph.createLinkForHint(L[M].getAttribute("href"),mxUtils.getTextContent(L[M])));this.linkHint.appendChild(ca)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ia){}};
+mxResources.get("editLink"));M.setAttribute("width","11");M.setAttribute("height","11");M.style.marginLeft="10px";M.style.marginBottom="-1px";M.style.cursor="pointer";Editor.isDarkMode()&&(M.style.filter="invert(100%)");this.linkHint.appendChild(M);mxEvent.addListener(M,"click",mxUtils.bind(this,function(ha){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ha)}));var S=M.cloneNode(!0);S.setAttribute("src",Editor.trashImage);S.setAttribute("title",mxResources.get("removeIt",
+[mxResources.get("link")]));S.style.marginLeft="4px";this.linkHint.appendChild(S);mxEvent.addListener(S,"click",mxUtils.bind(this,function(ha){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ha)}))}if(null!=L)for(M=0;M<L.length;M++){var ca=document.createElement("div");ca.style.marginTop=null!=z||0<M?"6px":"0px";ca.appendChild(this.graph.createLinkForHint(L[M].getAttribute("href"),mxUtils.getTextContent(L[M])));this.linkHint.appendChild(ca)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ha){}};
mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Ca=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Ca.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&
this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(S,ca){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var L=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);if(null!=
-L||null!=M&&0<M.length)this.updateLinkHint(L,M),this.redrawHandles()};var Ta=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ta.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Va=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+
+L||null!=M&&0<M.length)this.updateLinkHint(L,M),this.redrawHandles()};var Qa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Qa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Za=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+
this.moveHandles[z].rowState.width-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var L=this.cornerHandles,M=L[0].bounds.height/2;L[0].bounds.x=this.state.x-L[0].bounds.width/2+z;L[0].bounds.y=this.state.y-M+z;L[0].redraw();L[1].bounds.x=L[0].bounds.x+this.state.width-2*z;L[1].bounds.y=L[0].bounds.y;L[1].redraw();L[2].bounds.x=L[0].bounds.x;L[2].bounds.y=this.state.y+this.state.height-
-2*z;L[2].redraw();L[3].bounds.x=L[1].bounds.x;L[3].bounds.y=L[2].bounds.y;L[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Va.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),
+2*z;L[2].redraw();L[3].bounds.x=L[1].bounds.x;L[3].bounds.y=L[2].bounds.y;L[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Za.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),
this.state.getCenterY()),L=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),M=mxUtils.getBoundingBox(L,this.state.style[mxConstants.STYLE_ROTATION]||"0",z),z=null!=M?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,L=null!=this.state.text?this.state.text.boundingBox:null,null==M&&(M=this.state),M=M.y+M.height,null!=L&&(M=Math.max(M,L.y+L.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/
-2))+"px",this.linkHint.style.top=Math.round(M+this.verticalOffset/2+Editor.hintOffset)+"px")};var Ja=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ja.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&
+2))+"px",this.linkHint.style.top=Math.round(M+this.verticalOffset/2+Editor.hintOffset)+"px")};var cb=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){cb.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&
null!=this.cornerHandles[z].node&&null!=this.cornerHandles[z].node.parentNode&&this.cornerHandles[z].node.parentNode.removeChild(this.cornerHandles[z].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
-(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var bb=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(bb.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
-Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var Wa=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Wa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var $a=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
+(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ka=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ka.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
+Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var Ua=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Ua.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var $a=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function E(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
function y(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1}function F(){mxActor.call(this)}function C(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function G(){mxActor.call(this)}function aa(){mxActor.call(this)}function da(){mxActor.call(this)}function ba(){mxActor.call(this)}function Y(){mxActor.call(this)}function pa(){mxActor.call(this)}function O(){mxActor.call(this)}function X(c,l){this.canvas=c;this.canvas.setLineJoin("round");
this.canvas.setLineCap("round");this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,X.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,X.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,X.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,X.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
-X.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,X.prototype.arcTo)}function ea(){mxRectangleShape.call(this)}function ka(){mxRectangleShape.call(this)}function ja(){mxActor.call(this)}function U(){mxActor.call(this)}function I(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function P(){mxRectangleShape.call(this)}function R(){mxCylinder.call(this)}function fa(){mxShape.call(this)}function la(){mxShape.call(this)}function sa(){mxEllipse.call(this)}
-function u(){mxShape.call(this)}function J(){mxShape.call(this)}function N(){mxRectangleShape.call(this)}function W(){mxShape.call(this)}function T(){mxShape.call(this)}function Q(){mxShape.call(this)}function Z(){mxShape.call(this)}function oa(){mxShape.call(this)}function wa(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function ta(){mxRectangleShape.call(this)}function Ba(){mxDoubleEllipse.call(this)}function va(){mxDoubleEllipse.call(this)}function Oa(){mxArrowConnector.call(this);
-this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ta(){mxActor.call(this)}function Va(){mxRectangleShape.call(this)}function Ja(){mxActor.call(this)}function bb(){mxActor.call(this)}function Wa(){mxActor.call(this)}function $a(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function S(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function na(){mxEllipse.call(this)}
-function ra(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Ea(){mxEllipse.call(this)}function Na(){mxEllipse.call(this)}function Pa(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function Ua(){mxActor.call(this)}function La(){mxActor.call(this)}function ua(){mxActor.call(this)}function za(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
-!0;this.indent=2;this.rectOutline="single"}function Ka(){mxConnector.call(this)}function Ga(c,l,x,p,v,A,B,ha,K,xa){B+=K;var ma=p.clone();p.x-=v*(2*B+K);p.y-=A*(2*B+K);v*=B+K;A*=B+K;return function(){c.ellipse(ma.x-v-B,ma.y-A-B,2*B,2*B);xa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var x=this.line[l];null!=x&&(x=new mxRectangle(x.x,x.y,this.strokewidth,this.strokewidth),null==
+X.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,X.prototype.arcTo)}function ea(){mxRectangleShape.call(this)}function ka(){mxRectangleShape.call(this)}function ja(){mxActor.call(this)}function U(){mxActor.call(this)}function J(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function P(){mxRectangleShape.call(this)}function R(){mxCylinder.call(this)}function ia(){mxShape.call(this)}function la(){mxShape.call(this)}function ta(){mxEllipse.call(this)}
+function u(){mxShape.call(this)}function I(){mxShape.call(this)}function N(){mxRectangleShape.call(this)}function W(){mxShape.call(this)}function T(){mxShape.call(this)}function Q(){mxShape.call(this)}function Z(){mxShape.call(this)}function na(){mxShape.call(this)}function va(){mxCylinder.call(this)}function Ba(){mxCylinder.call(this)}function sa(){mxRectangleShape.call(this)}function Da(){mxDoubleEllipse.call(this)}function Aa(){mxDoubleEllipse.call(this)}function za(){mxArrowConnector.call(this);
+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Qa(){mxActor.call(this)}function Za(){mxRectangleShape.call(this)}function cb(){mxActor.call(this)}function Ka(){mxActor.call(this)}function Ua(){mxActor.call(this)}function $a(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function S(){mxActor.call(this)}function ca(){mxActor.call(this)}function ha(){mxActor.call(this)}function oa(){mxEllipse.call(this)}
+function ra(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function Ga(){mxEllipse.call(this)}function La(){mxEllipse.call(this)}function Pa(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Ta(){mxActor.call(this)}function Ma(){mxActor.call(this)}function ua(){mxActor.call(this)}function ya(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
+!0;this.indent=2;this.rectOutline="single"}function Na(){mxConnector.call(this)}function Fa(c,l,x,p,v,A,B,fa,K,wa){B+=K;var ma=p.clone();p.x-=v*(2*B+K);p.y-=A*(2*B+K);v*=B+K;A*=B+K;return function(){c.ellipse(ma.x-v-B,ma.y-A-B,2*B,2*B);wa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var x=this.line[l];null!=x&&(x=new mxRectangle(x.x,x.y,this.strokewidth,this.strokewidth),null==
c?c=x:c.add(x))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=function(c,l,x,p,v){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,x,p){if(null!=l){var v=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==v?c.moveTo(B.x+x,B.y+p):null!=v&&c.lineTo(B.x+x,B.y+p));v=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var x=null,
p=0;p<this.line.length&&!l;p++){var v=this.line[p];null!=v&&null!=x&&(l=mxUtils.rectangleIntersectsSegment(c,x,v));x=v}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,x,p,v){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
-!1,B=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Pa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-x));A||this.outline||!(B&&ha<v||!B&&ha<p)||this.paintForeground(c,l,x,p,v)};e.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=A;A=B;B=ha}c.rotate(-this.getShapeRotation(),
+!1,B=this.isHorizontal(),fa=this.getTitleSize();0==fa||this.outline?Pa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-x));A||this.outline||!(B&&fa<v||!B&&fa<p)||this.paintForeground(c,l,x,p,v)};e.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var fa=A;A=B;B=fa}c.rotate(-this.getShapeRotation(),
A,B,l+p/2,x+v/2);s=this.scale;l=this.bounds.x/s;x=this.bounds.y/s;p=this.bounds.width/s;v=this.bounds.height/s;this.paintTableForeground(c,l,x,p,v)}};e.prototype.paintTableForeground=function(c,l,x,p,v){p=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(v=0;v<p.length;v++)b.prototype.paintTableLine(c,p[v],l,x)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?
c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.darkOpacity=0;n.prototype.darkOpacity2=0;n.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(A,v);c.lineTo(0,v-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(p-A,0),c.lineTo(p,A),
-c.lineTo(A,A),c.close(),c.fill()),0!=ha&&(c.setFillAlpha(Math.abs(ha)),c.setFillColor(0>ha?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,A),c.lineTo(A,v),c.lineTo(0,v-A),c.close(),c.fill()),c.begin(),c.moveTo(A,v),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(p,A),c.end(),c.stroke())};n.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",
-n);var Ma=Math.tan(mxUtils.toRadians(30)),db=(.5-Ma)/2;mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(D,mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,l,x,p,v){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(p-A),x+.5*(v-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(t,mxActor);t.prototype.size=
-20;t.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/Ma);c.translate((p-l)/2,(v-l)/2+l/4);c.moveTo(0,.25*l);c.lineTo(.5*l,l*db);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-db)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(p,v/(.5+Ma));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-db)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-db)*l),c.lineTo(.5*l,(1-db)*l)):(c.translate((p-
+parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),fa=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(A,v);c.lineTo(0,v-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(p-A,0),c.lineTo(p,A),
+c.lineTo(A,A),c.close(),c.fill()),0!=fa&&(c.setFillAlpha(Math.abs(fa)),c.setFillColor(0>fa?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,A),c.lineTo(A,v),c.lineTo(0,v-A),c.close(),c.fill()),c.begin(),c.moveTo(A,v),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(p,A),c.end(),c.stroke())};n.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",
+n);var Ra=Math.tan(mxUtils.toRadians(30)),db=(.5-Ra)/2;mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(D,mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,l,x,p,v){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(p-A),x+.5*(v-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(t,mxActor);t.prototype.size=
+20;t.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/Ra);c.translate((p-l)/2,(v-l)/2+l/4);c.moveTo(0,.25*l);c.lineTo(.5*l,l*db);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-db)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(p,v/(.5+Ra));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-db)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-db)*l),c.lineTo(.5*l,(1-db)*l)):(c.translate((p-
l)/2,(v-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*db),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*l,(1-db)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),
c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,-l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,p,-l/3,p,l),c.lineTo(p,v-l),c.curveTo(p,v+l/3,0,v+l/3,0,v-l),c.close())};d.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=
function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(0,v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(p-A,0),c.lineTo(p-
@@ -2688,8 +2688,8 @@ function(c,l,x,p,v){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(t
q.prototype.size=15;q.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A),c.lineTo(p,v-A),c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke())};
mxCellRenderer.registerShape("cylinder2",q);mxUtils.extend(y,mxCylinder);y.prototype.size=15;y.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(l,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A)):(c.moveTo(0,0),c.arcTo(.5*p,A,0,0,0,.5*p,A),c.arcTo(.5*p,A,0,0,0,p,0)),c.lineTo(p,v-A),
c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),B&&(c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",y);mxUtils.extend(F,mxActor);F.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p/2,.5*v,p,0);c.quadTo(.5*p,v/2,p,v);c.quadTo(p/2,.5*v,0,v);c.quadTo(.5*p,v/2,0,0);c.end()};mxCellRenderer.registerShape("switch",F);mxUtils.extend(C,mxCylinder);C.prototype.tabWidth=
-60;C.prototype.tabHeight=20;C.prototype.tabPosition="right";C.prototype.arcSize=.1;C.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,
-"arcSize",this.arcSize));ha||(K*=Math.min(p,v));K=Math.min(K,.5*p,.5*(v-x));l=Math.max(l,K);l=Math.min(p-K,l);B||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),x),c.lineTo(Math.max(K,0),0),c.lineTo(l,0),c.lineTo(l,x)):(c.moveTo(p-l,x),c.lineTo(p-l,0),c.lineTo(p-Math.max(K,0),0),c.lineTo(p-Math.max(K,0),x));B?(c.moveTo(0,K+x),c.arcTo(K,K,0,0,1,K,x),c.lineTo(p-K,x),c.arcTo(K,K,0,0,1,p,K+x),c.lineTo(p,v-K),c.arcTo(K,K,0,0,1,p-K,v),c.lineTo(K,v),c.arcTo(K,K,0,0,1,0,v-K)):(c.moveTo(0,x),c.lineTo(p,
+60;C.prototype.tabHeight=20;C.prototype.tabPosition="right";C.prototype.arcSize=.1;C.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),fa=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,
+"arcSize",this.arcSize));fa||(K*=Math.min(p,v));K=Math.min(K,.5*p,.5*(v-x));l=Math.max(l,K);l=Math.min(p-K,l);B||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),x),c.lineTo(Math.max(K,0),0),c.lineTo(l,0),c.lineTo(l,x)):(c.moveTo(p-l,x),c.lineTo(p-l,0),c.lineTo(p-Math.max(K,0),0),c.lineTo(p-Math.max(K,0),x));B?(c.moveTo(0,K+x),c.arcTo(K,K,0,0,1,K,x),c.lineTo(p-K,x),c.arcTo(K,K,0,0,1,p,K+x),c.lineTo(p,v-K),c.arcTo(K,K,0,0,1,p-K,v),c.lineTo(K,v),c.arcTo(K,K,0,0,1,0,v-K)):(c.moveTo(0,x),c.lineTo(p,
x),c.lineTo(p,v),c.lineTo(0,v));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(p-30,x+20),c.lineTo(p-20,x+10),c.lineTo(p-10,x+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",C);C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,
"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));p||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,
c.width-x),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(H,mxCylinder);H.prototype.arcSize=.1;H.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(p,v));l=Math.min(l,.5*p,.5*v);A||(l=
@@ -2698,7 +2698,7 @@ c.width-x),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(
function(){return!0};G.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("card",G);mxUtils.extend(aa,mxActor);aa.prototype.size=.4;aa.prototype.redrawPath=function(c,l,
x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,l/2);c.quadTo(p/4,1.4*l,p/2,l/2);c.quadTo(3*p/4,l*(1-1.4),p,l/2);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};aa.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),x=c.width,p=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
this.direction==mxConstants.DIRECTION_WEST)return l*=p,new mxRectangle(c.x,c.y+l,x,p-2*l);l*=x;return new mxRectangle(c.x+l,c.y,x-2*l,p)}return c};mxCellRenderer.registerShape("tape",aa);mxUtils.extend(da,mxActor);da.prototype.size=.3;da.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};da.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c.moveTo(0,0);c.lineTo(p,0);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",da);var Ra=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):Ra.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,0);c.lineTo(p,0);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",da);var Va=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):Va.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};y.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));p||(A=0);return"left"==
mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-x),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};g.prototype.getLabelMargins=
@@ -2708,177 +2708,177 @@ mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat
.5;pa.prototype.redrawPath=function(c,l,x,p,v){c.setFillColor(null);l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(p,0),new mxPoint(l,0),new mxPoint(l,v/2),new mxPoint(0,v/2),new mxPoint(l,v/2),new mxPoint(l,v),new mxPoint(p,v)],this.isRounded,x,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",pa);mxUtils.extend(O,mxActor);O.prototype.redrawPath=
function(c,l,x,p,v){c.setStrokeWidth(1);c.setFillColor(this.stroke);l=p/5;c.rect(0,0,l,v);c.fillAndStroke();c.rect(2*l,0,l,v);c.fillAndStroke();c.rect(4*l,0,l,v);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",O);X.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};X.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,
arguments));this.originalClose.apply(this.canvas,arguments)};X.prototype.quadTo=function(c,l,x,p){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=p};X.prototype.curveTo=function(c,l,x,p,v,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=A};X.prototype.arcTo=function(c,l,x,p,v,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};X.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var x=function(ma){return"number"===
-typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},p=Math.abs(c-this.lastX),v=Math.abs(l-this.lastY),A=Math.sqrt(p*p+v*v);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ha=this.defaultVariation;5>B&&(B=5,ha/=3);var K=x(c-this.lastX)*p/B;x=x(l-this.lastY)*v/B;p/=A;v/=A;for(A=0;A<B;A++){var xa=(Math.random()-.5)*ha;this.originalLineTo.call(this.canvas,K*A+this.lastX-xa*v,x*A+this.lastY-xa*p)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,
-arguments);this.lastX=c;this.lastY=l};X.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var ib=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){ib.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};
-var mb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(c){mb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new X(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var nb=mxRectangleShape.prototype.isHtmlAllowed;
-mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&nb.apply(this,arguments)};var pb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,x,p,v){if(null==c.handJiggle||c.handJiggle.constructor!=X)pb.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},p=Math.abs(c-this.lastX),v=Math.abs(l-this.lastY),A=Math.sqrt(p*p+v*v);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),fa=this.defaultVariation;5>B&&(B=5,fa/=3);var K=x(c-this.lastX)*p/B;x=x(l-this.lastY)*v/B;p/=A;v/=A;for(A=0;A<B;A++){var wa=(Math.random()-.5)*fa;this.originalLineTo.call(this.canvas,K*A+this.lastX-wa*v,x*A+this.lastY-wa*p)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,
+arguments);this.lastX=c;this.lastY=l};X.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var fb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){fb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};
+var kb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(c){kb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new X(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var ub=mxRectangleShape.prototype.isHtmlAllowed;
+mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var nb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,x,p,v){if(null==c.handJiggle||c.handJiggle.constructor!=X)nb.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
"1"));if(A||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)A||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?A=Math.min(p/2,Math.min(v/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.min(p*
A,v*A)),c.moveTo(l+A,x),c.lineTo(l+p-A,x),c.quadTo(l+p,x,l+p,x+A),c.lineTo(l+p,x+v-A),c.quadTo(l+p,x+v,l+p-A,x+v),c.lineTo(l+A,x+v),c.quadTo(l,x+v,l,x+v-A),c.lineTo(l,x+A),c.quadTo(l,x,l+A,x)):(c.moveTo(l,x),c.lineTo(l+p,x),c.lineTo(l+p,x+v),c.lineTo(l,x+v),c.lineTo(l,x)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ea,mxRectangleShape);ea.prototype.size=.1;ea.prototype.fixedSize=!1;ea.prototype.isHtmlAllowed=function(){return!1};ea.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,x=c.height;c=new mxRectangle(c.x,c.y,l,x);var p=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;p=Math.max(p,Math.min(l*v,x*v))}c.x+=Math.round(p);c.width-=Math.round(2*p);return c}return c};
ea.prototype.paintForeground=function(c,l,x,p,v){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(p,B)):p*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(p*A,v*A)));B=Math.round(B);c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.moveTo(l+p-B,x);c.lineTo(l+p-B,x+v);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
arguments)};mxCellRenderer.registerShape("process",ea);mxCellRenderer.registerShape("process2",ea);mxUtils.extend(ka,mxRectangleShape);ka.prototype.paintBackground=function(c,l,x,p,v){c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};ka.prototype.paintForeground=function(c,l,x,p,v){};mxCellRenderer.registerShape("transparent",ka);mxUtils.extend(ja,mxHexagon);ja.prototype.size=30;ja.prototype.position=.5;ja.prototype.position2=.5;ja.prototype.base=20;ja.prototype.getLabelMargins=function(){return new mxRectangle(0,
0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(c,l,x,p,v){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),ha=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,v-x),new mxPoint(Math.min(p,A+ha),v-x),new mxPoint(B,v),new mxPoint(Math.max(0,A),v-x),new mxPoint(0,v-x)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",ja);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,l,x,p,
+this.position2)))),fa=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,v-x),new mxPoint(Math.min(p,A+fa),v-x),new mxPoint(B,v),new mxPoint(Math.max(0,A),v-x),new mxPoint(0,v-x)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",ja);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,l,x,p,
v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(0,v),new mxPoint(l,v/2)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("step",
-U);mxUtils.extend(I,mxHexagon);I.prototype.size=.25;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
-0),new mxPoint(p-l,0),new mxPoint(p,.5*v),new mxPoint(p-l,v),new mxPoint(l,v),new mxPoint(0,.5*v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("hexagon",I);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(c,l,x,p,v){var A=Math.min(p/5,v/5)+1;c.begin();c.moveTo(l+p/2,x+A);c.lineTo(l+p/2,x+v-A);c.moveTo(l+A,x+v/2);c.lineTo(l+p-A,x+v/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
-V);var cb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,x,p,v){cb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),cb.apply(this,[c,l,x,p,v]))}};mxUtils.extend(P,mxRectangleShape);P.prototype.isHtmlAllowed=function(){return!1};P.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};P.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ha=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],xa=this.style["symbol"+A+"Width"],ma=this.style["symbol"+A+"Height"],ab=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
-ab,fb=this.style["symbol"+A+"ArcSpacing"];null!=fb&&(fb*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),ab+=fb,jb+=fb);fb=l;var Da=x;fb=ha==mxConstants.ALIGN_CENTER?fb+(p-xa)/2:ha==mxConstants.ALIGN_RIGHT?fb+(p-xa-ab):fb+ab;Da=K==mxConstants.ALIGN_MIDDLE?Da+(v-ma)/2:K==mxConstants.ALIGN_BOTTOM?Da+(v-ma-jb):Da+jb;c.save();ha=new B;ha.style=this.style;B.prototype.paintVertexShape.call(ha,c,fb,Da,xa,ma);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("ext",P);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(c,l,x,p,v,A){A?(c.moveTo(0,0),c.lineTo(p/2,v/2),c.lineTo(p,0),c.end()):(c.moveTo(0,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(0,v),c.close())};mxCellRenderer.registerShape("message",R);mxUtils.extend(fa,mxShape);fa.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.ellipse(p/4,0,p/2,v/4);c.fillAndStroke();c.begin();c.moveTo(p/2,v/4);c.lineTo(p/2,2*v/3);c.moveTo(p/2,v/3);c.lineTo(0,v/3);c.moveTo(p/
-2,v/3);c.lineTo(p,v/3);c.moveTo(p/2,2*v/3);c.lineTo(0,v);c.moveTo(p/2,2*v/3);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",fa);mxUtils.extend(la,mxShape);la.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};la.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,v/4);c.lineTo(0,3*v/4);c.end();c.stroke();c.begin();c.moveTo(0,v/2);c.lineTo(p/6,v/2);c.end();c.stroke();c.ellipse(p/6,0,5*p/6,v);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
-la);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/8,x+v);c.lineTo(l+7*p/8,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",sa);mxUtils.extend(u,mxShape);u.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(p,0);c.lineTo(0,v);c.moveTo(0,0);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",u);mxUtils.extend(J,mxShape);
-J.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};J.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,0);c.end();c.stroke();c.ellipse(0,v/8,p,7*v/8);c.fillAndStroke()};J.prototype.paintForeground=function(c,l,x,p,v){c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,v/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",J);mxUtils.extend(N,mxRectangleShape);N.prototype.size=
+U);mxUtils.extend(J,mxHexagon);J.prototype.size=.25;J.prototype.fixedSize=20;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
+0),new mxPoint(p-l,0),new mxPoint(p,.5*v),new mxPoint(p-l,v),new mxPoint(l,v),new mxPoint(0,.5*v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("hexagon",J);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(c,l,x,p,v){var A=Math.min(p/5,v/5)+1;c.begin();c.moveTo(l+p/2,x+A);c.lineTo(l+p/2,x+v-A);c.moveTo(l+A,x+v/2);c.lineTo(l+p-A,x+v/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
+V);var Ya=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,x,p,v){Ya.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),Ya.apply(this,[c,l,x,p,v]))}};mxUtils.extend(P,mxRectangleShape);P.prototype.isHtmlAllowed=function(){return!1};P.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};P.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var fa=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],wa=this.style["symbol"+A+"Width"],ma=this.style["symbol"+A+"Height"],bb=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
+bb,eb=this.style["symbol"+A+"ArcSpacing"];null!=eb&&(eb*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),bb+=eb,jb+=eb);eb=l;var Ea=x;eb=fa==mxConstants.ALIGN_CENTER?eb+(p-wa)/2:fa==mxConstants.ALIGN_RIGHT?eb+(p-wa-bb):eb+bb;Ea=K==mxConstants.ALIGN_MIDDLE?Ea+(v-ma)/2:K==mxConstants.ALIGN_BOTTOM?Ea+(v-ma-jb):Ea+jb;c.save();fa=new B;fa.style=this.style;B.prototype.paintVertexShape.call(fa,c,eb,Ea,wa,ma);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("ext",P);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(c,l,x,p,v,A){A?(c.moveTo(0,0),c.lineTo(p/2,v/2),c.lineTo(p,0),c.end()):(c.moveTo(0,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(0,v),c.close())};mxCellRenderer.registerShape("message",R);mxUtils.extend(ia,mxShape);ia.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.ellipse(p/4,0,p/2,v/4);c.fillAndStroke();c.begin();c.moveTo(p/2,v/4);c.lineTo(p/2,2*v/3);c.moveTo(p/2,v/3);c.lineTo(0,v/3);c.moveTo(p/
+2,v/3);c.lineTo(p,v/3);c.moveTo(p/2,2*v/3);c.lineTo(0,v);c.moveTo(p/2,2*v/3);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ia);mxUtils.extend(la,mxShape);la.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};la.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,v/4);c.lineTo(0,3*v/4);c.end();c.stroke();c.begin();c.moveTo(0,v/2);c.lineTo(p/6,v/2);c.end();c.stroke();c.ellipse(p/6,0,5*p/6,v);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+la);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/8,x+v);c.lineTo(l+7*p/8,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ta);mxUtils.extend(u,mxShape);u.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(p,0);c.lineTo(0,v);c.moveTo(0,0);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",u);mxUtils.extend(I,mxShape);
+I.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};I.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,0);c.end();c.stroke();c.ellipse(0,v/8,p,7*v/8);c.fillAndStroke()};I.prototype.paintForeground=function(c,l,x,p,v){c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,v/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",I);mxUtils.extend(N,mxRectangleShape);N.prototype.size=
40;N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};N.prototype.paintBackground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,
x,p,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=N&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,x,p,A),c.restore()));A<v&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+p/2,x+A),c.lineTo(l+p/2,x+v),c.end(),c.stroke())};N.prototype.paintForeground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,x,p,Math.min(v,
A))};mxCellRenderer.registerShape("umlLifeline",N);mxUtils.extend(W,mxShape);W.prototype.width=60;W.prototype.height=30;W.prototype.corner=10;W.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};W.prototype.paintBackground=function(c,l,x,p,v){var A=this.corner,B=Math.min(p,Math.max(A,parseFloat(mxUtils.getValue(this.style,
-"width",this.width)))),ha=Math.min(v,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(l,x,p,v),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,x,p,v),c.setGradient(this.fill,this.gradient,l,x,p,v,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
-c.moveTo(l,x);c.lineTo(l+B,x);c.lineTo(l+B,x+Math.max(0,ha-1.5*A));c.lineTo(l+Math.max(0,B-A),x+ha);c.lineTo(l,x+ha);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+p,x);c.lineTo(l+p,x+v);c.lineTo(l,x+v);c.lineTo(l,x+ha);c.stroke()};mxCellRenderer.registerShape("umlFrame",W);mxPerimeter.CenterPerimeter=function(c,l,x,p){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
+"width",this.width)))),fa=Math.min(v,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(l,x,p,v),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,x,p,v),c.setGradient(this.fill,this.gradient,l,x,p,v,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
+c.moveTo(l,x);c.lineTo(l+B,x);c.lineTo(l+B,x+Math.max(0,fa-1.5*A));c.lineTo(l+Math.max(0,B-A),x+fa);c.lineTo(l,x+fa);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+p,x);c.lineTo(l+p,x+v);c.lineTo(l,x+v);c.lineTo(l,x+fa);c.stroke()};mxCellRenderer.registerShape("umlFrame",W);mxPerimeter.CenterPerimeter=function(c,l,x,p){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
l,x,p){p=N.prototype.size;null!=l&&(p=mxUtils.getValue(l.style,"size",p)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;x.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+p,x.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,x,p){p=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,x,p){p=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;null!=l.style.backboneSize&&(p+=parseFloat(l.style.backboneSize)*l.view.scale/2-1);if("south"==l.style[mxConstants.STYLE_DIRECTION]||"north"==l.style[mxConstants.STYLE_DIRECTION])return x.x<c.getCenterX()&&(p=-1*(p+1)),new mxPoint(c.getCenterX()+p,Math.min(c.y+c.height,Math.max(c.y,x.y)));x.y<c.getCenterY()&&(p=-1*(p+1));return new mxPoint(Math.min(c.x+
c.width,Math.max(c.x,x.x)),c.getCenterY()+p)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,x,p){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",ja.prototype.size))*l.view.scale))),l.style),l,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?ba.prototype.fixedSize:ba.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ha=c.y,K=c.width,xa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K,ha+v),new mxPoint(B+
-K,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha)]):(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+v,ha)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,x,p){var v="0"!=
-mxUtils.getValue(l.style,"fixedSize","0"),A=v?Y.prototype.fixedSize:Y.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ha=c.y,K=c.width,xa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+
-v,ha)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,ha)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha+v),new mxPoint(B+K,ha),new mxPoint(B+K,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+
-K,ha+v),new mxPoint(B+K,ha+xa-v),new mxPoint(B,ha+xa),new mxPoint(B,ha)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?U.prototype.fixedSize:U.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,
-ha=c.y,K=c.width,xa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,c),new mxPoint(B+K-v,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+v,c),new mxPoint(B,ha)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
-A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,c),new mxPoint(B+K,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,c),new mxPoint(B+v,ha)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha+v),new mxPoint(ma,ha),new mxPoint(B+K,ha+v),new mxPoint(B+K,ha+xa),new mxPoint(ma,ha+xa-v),new mxPoint(B,ha+xa),new mxPoint(B,ha+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(ma,ha+
-v),new mxPoint(B+K,ha),new mxPoint(B+K,ha+xa-v),new mxPoint(ma,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha)]);ma=new mxPoint(ma,c);p&&(x.x<B||x.x>B+K?ma.y=x.y:ma.x=x.x);return mxUtils.getPerimeterPoint(ha,ma,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?I.prototype.fixedSize:I.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=
-c.x,ha=c.y,K=c.width,xa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(ma,ha),new mxPoint(B+K,ha+v),new mxPoint(B+K,ha+xa-v),new mxPoint(ma,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha+v),new mxPoint(ma,ha)]):(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,
-Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,c),new mxPoint(B+K-v,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,c),new mxPoint(B+v,ha)]);ma=new mxPoint(ma,c);p&&(x.x<B||x.x>B+K?ma.y=x.y:ma.x=x.x);return mxUtils.getPerimeterPoint(ha,ma,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(T,mxShape);T.prototype.size=10;T.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?ba.prototype.fixedSize:ba.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,fa=c.y,K=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),fa=[new mxPoint(B,fa),new mxPoint(B+K,fa+v),new mxPoint(B+
+K,fa+wa),new mxPoint(B,fa+wa-v),new mxPoint(B,fa)]):(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),fa=[new mxPoint(B+v,fa),new mxPoint(B+K,fa),new mxPoint(B+K-v,fa+wa),new mxPoint(B,fa+wa),new mxPoint(B+v,fa)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(fa,c,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,x,p){var v="0"!=
+mxUtils.getValue(l.style,"fixedSize","0"),A=v?Y.prototype.fixedSize:Y.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,fa=c.y,K=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),fa=[new mxPoint(B+v,fa),new mxPoint(B+K-v,fa),new mxPoint(B+K,fa+wa),new mxPoint(B,fa+wa),new mxPoint(B+
+v,fa)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),fa=[new mxPoint(B,fa),new mxPoint(B+K,fa),new mxPoint(B+K-v,fa+wa),new mxPoint(B+v,fa+wa),new mxPoint(B,fa)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),fa=[new mxPoint(B,fa+v),new mxPoint(B+K,fa),new mxPoint(B+K,fa+wa),new mxPoint(B,fa+wa-v),new mxPoint(B,fa+v)]):(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),fa=[new mxPoint(B,fa),new mxPoint(B+
+K,fa+v),new mxPoint(B+K,fa+wa-v),new mxPoint(B,fa+wa),new mxPoint(B,fa)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(fa,c,x)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?U.prototype.fixedSize:U.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,
+fa=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),fa=[new mxPoint(B,fa),new mxPoint(B+K-v,fa),new mxPoint(B+K,c),new mxPoint(B+K-v,fa+wa),new mxPoint(B,fa+wa),new mxPoint(B+v,c),new mxPoint(B,fa)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
+A)),fa=[new mxPoint(B+v,fa),new mxPoint(B+K,fa),new mxPoint(B+K-v,c),new mxPoint(B+K,fa+wa),new mxPoint(B+v,fa+wa),new mxPoint(B,c),new mxPoint(B+v,fa)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),fa=[new mxPoint(B,fa+v),new mxPoint(ma,fa),new mxPoint(B+K,fa+v),new mxPoint(B+K,fa+wa),new mxPoint(ma,fa+wa-v),new mxPoint(B,fa+wa),new mxPoint(B,fa+v)]):(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),fa=[new mxPoint(B,fa),new mxPoint(ma,fa+
+v),new mxPoint(B+K,fa),new mxPoint(B+K,fa+wa-v),new mxPoint(ma,fa+wa),new mxPoint(B,fa+wa-v),new mxPoint(B,fa)]);ma=new mxPoint(ma,c);p&&(x.x<B||x.x>B+K?ma.y=x.y:ma.x=x.x);return mxUtils.getPerimeterPoint(fa,ma,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?J.prototype.fixedSize:J.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=
+c.x,fa=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),fa=[new mxPoint(ma,fa),new mxPoint(B+K,fa+v),new mxPoint(B+K,fa+wa-v),new mxPoint(ma,fa+wa),new mxPoint(B,fa+wa-v),new mxPoint(B,fa+v),new mxPoint(ma,fa)]):(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,
+Math.min(1,A)),fa=[new mxPoint(B+v,fa),new mxPoint(B+K-v,fa),new mxPoint(B+K,c),new mxPoint(B+K-v,fa+wa),new mxPoint(B+v,fa+wa),new mxPoint(B,c),new mxPoint(B+v,fa)]);ma=new mxPoint(ma,c);p&&(x.x<B||x.x>B+K?ma.y=x.y:ma.x=x.x);return mxUtils.getPerimeterPoint(fa,ma,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(T,mxShape);T.prototype.size=10;T.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
c.translate(l,x);c.ellipse((p-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(p/2,A);c.lineTo(p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",T);mxUtils.extend(Q,mxShape);Q.prototype.size=10;Q.prototype.inset=2;Q.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,x);c.begin();c.moveTo(p/2,A+B);c.lineTo(p/2,v);c.end();c.stroke();
-c.begin();c.moveTo((p-A)/2-B,A/2);c.quadTo((p-A)/2-B,A+B,p/2,A+B);c.quadTo((p+A)/2+B,A+B,(p+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",Q);mxUtils.extend(Z,mxShape);Z.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Z);mxUtils.extend(oa,mxShape);oa.prototype.inset=2;oa.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,
-"inset",this.inset))+this.strokewidth;c.translate(l,x);c.ellipse(0,A,p-2*A,v-2*A);c.fillAndStroke();c.begin();c.moveTo(p/2,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",oa);mxUtils.extend(wa,mxCylinder);wa.prototype.jettyWidth=20;wa.prototype.jettyHeight=10;wa.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
-this.jettyHeight));x=B/2;B=x+B/2;var ha=Math.min(l,v-l),K=Math.min(ha+2*l,v-l);A?(c.moveTo(x,ha),c.lineTo(B,ha),c.lineTo(B,ha+l),c.lineTo(x,ha+l),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(x,K+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(x,K),c.lineTo(x,ha+l),c.lineTo(0,ha+l),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("module",wa);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=
-32;Aa.prototype.jettyHeight=12;Aa.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=B/2;B=x+B/2;var ha=.3*v-l/2,K=.7*v-l/2;A?(c.moveTo(x,ha),c.lineTo(B,ha),c.lineTo(B,ha+l),c.lineTo(x,ha+l),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(x,K+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(x,
-K),c.lineTo(x,ha+l),c.lineTo(0,ha+l),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(ta,mxRectangleShape);ta.prototype.paintForeground=function(c,l,x,p,v){var A=p/2,B=v/2,ha=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,x),new mxPoint(l+p,x+B),new mxPoint(l+A,x+v),new mxPoint(l,x+B)],this.isRounded,ha,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("associativeEntity",ta);mxUtils.extend(Ba,mxDoubleEllipse);Ba.prototype.outerStroke=!0;Ba.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.min(4,Math.min(p/5,v/5));0<p&&0<v&&(c.ellipse(l+A,x+A,p-2*A,v-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,x,p,v),c.stroke())};mxCellRenderer.registerShape("endState",Ba);mxUtils.extend(va,Ba);va.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",va);mxUtils.extend(Oa,mxArrowConnector);
-Oa.prototype.defaultWidth=4;Oa.prototype.isOpenEnded=function(){return!0};Oa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Oa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Oa);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Ta,mxActor);Ta.prototype.size=30;Ta.prototype.isRoundable=function(){return!0};Ta.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ta);mxUtils.extend(Va,mxRectangleShape);Va.prototype.dx=20;Va.prototype.dy=20;Va.prototype.isHtmlAllowed=function(){return!1};Va.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
-var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,x+A);c.lineTo(l+p,x+A);c.end();c.stroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Va);
-mxUtils.extend(Ja,mxActor);Ja.prototype.dx=20;Ja.prototype.dy=20;Ja.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint(l,x),
-new mxPoint(l,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Ja);mxUtils.extend(bb,mxActor);bb.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",bb);mxUtils.extend(Wa,mxActor);Wa.prototype.dx=20;Wa.prototype.dy=20;Wa.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+l)/2,x),new mxPoint((p+l)/2,v),new mxPoint((p-l)/2,v),new mxPoint((p-l)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Wa);mxUtils.extend($a,
+c.begin();c.moveTo((p-A)/2-B,A/2);c.quadTo((p-A)/2-B,A+B,p/2,A+B);c.quadTo((p+A)/2+B,A+B,(p+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",Q);mxUtils.extend(Z,mxShape);Z.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Z);mxUtils.extend(na,mxShape);na.prototype.inset=2;na.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,
+"inset",this.inset))+this.strokewidth;c.translate(l,x);c.ellipse(0,A,p-2*A,v-2*A);c.fillAndStroke();c.begin();c.moveTo(p/2,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",na);mxUtils.extend(va,mxCylinder);va.prototype.jettyWidth=20;va.prototype.jettyHeight=10;va.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
+this.jettyHeight));x=B/2;B=x+B/2;var fa=Math.min(l,v-l),K=Math.min(fa+2*l,v-l);A?(c.moveTo(x,fa),c.lineTo(B,fa),c.lineTo(B,fa+l),c.lineTo(x,fa+l),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(x,K+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(x,K),c.lineTo(x,fa+l),c.lineTo(0,fa+l),c.lineTo(0,fa),c.lineTo(x,fa),c.close());c.end()};mxCellRenderer.registerShape("module",va);mxUtils.extend(Ba,mxCylinder);Ba.prototype.jettyWidth=
+32;Ba.prototype.jettyHeight=12;Ba.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=B/2;B=x+B/2;var fa=.3*v-l/2,K=.7*v-l/2;A?(c.moveTo(x,fa),c.lineTo(B,fa),c.lineTo(B,fa+l),c.lineTo(x,fa+l),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(x,K+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(x,
+K),c.lineTo(x,fa+l),c.lineTo(0,fa+l),c.lineTo(0,fa),c.lineTo(x,fa),c.close());c.end()};mxCellRenderer.registerShape("component",Ba);mxUtils.extend(sa,mxRectangleShape);sa.prototype.paintForeground=function(c,l,x,p,v){var A=p/2,B=v/2,fa=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,x),new mxPoint(l+p,x+B),new mxPoint(l+A,x+v),new mxPoint(l,x+B)],this.isRounded,fa,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("associativeEntity",sa);mxUtils.extend(Da,mxDoubleEllipse);Da.prototype.outerStroke=!0;Da.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.min(4,Math.min(p/5,v/5));0<p&&0<v&&(c.ellipse(l+A,x+A,p-2*A,v-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,x,p,v),c.stroke())};mxCellRenderer.registerShape("endState",Da);mxUtils.extend(Aa,Da);Aa.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Aa);mxUtils.extend(za,mxArrowConnector);
+za.prototype.defaultWidth=4;za.prototype.isOpenEnded=function(){return!0};za.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};za.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",za);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
+"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Qa,mxActor);Qa.prototype.size=30;Qa.prototype.isRoundable=function(){return!0};Qa.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Qa);mxUtils.extend(Za,mxRectangleShape);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.isHtmlAllowed=function(){return!1};Za.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
+var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,x+A);c.lineTo(l+p,x+A);c.end();c.stroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Za);
+mxUtils.extend(cb,mxActor);cb.prototype.dx=20;cb.prototype.dy=20;cb.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint(l,x),
+new mxPoint(l,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",cb);mxUtils.extend(Ka,mxActor);Ka.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",Ka);mxUtils.extend(Ua,mxActor);Ua.prototype.dx=20;Ua.prototype.dy=20;Ua.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+l)/2,x),new mxPoint((p+l)/2,v),new mxPoint((p-l)/2,v),new mxPoint((p-l)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Ua);mxUtils.extend($a,
mxActor);$a.prototype.arrowWidth=.3;$a.prototype.arrowSize=.2;$a.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-
l,v),new mxPoint(p-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",$a);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2;this.addPoints(c,[new mxPoint(0,v/2),new mxPoint(l,0),new mxPoint(l,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(p-l,A),new mxPoint(l,A),new mxPoint(l,v)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(L,mxActor);L.prototype.size=.1;L.prototype.fixedSize=20;L.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(p,0);c.quadTo(p-2*l,v/2,p,v);c.lineTo(l,v);c.quadTo(l-2*l,v/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",L);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.close();c.end()};mxCellRenderer.registerShape("or",M);mxUtils.extend(S,mxActor);S.prototype.redrawPath=function(c,
l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.quadTo(p/2,v/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",S);mxUtils.extend(ca,mxActor);ca.prototype.size=20;ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p-l,0),
-new mxPoint(p,.8*l),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,.8*l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("loopLimit",ca);mxUtils.extend(ia,mxActor);ia.prototype.size=.375;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,
-0),new mxPoint(p,v-l),new mxPoint(p/2,v),new mxPoint(0,v-l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ia);mxUtils.extend(na,mxEllipse);na.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/2,x+v);c.lineTo(l+p,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",na);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,
+new mxPoint(p,.8*l),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,.8*l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("loopLimit",ca);mxUtils.extend(ha,mxActor);ha.prototype.size=.375;ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,
+0),new mxPoint(p,v-l),new mxPoint(p/2,v),new mxPoint(0,v-l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ha);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/2,x+v);c.lineTo(l+p,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",oa);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,
arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke();c.begin();c.moveTo(l+p/2,x);c.lineTo(l+p/2,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",ra);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*p,x+.145*v);c.lineTo(l+.855*p,x+.855*v);c.end();c.stroke();c.begin();c.moveTo(l+.855*p,x+.145*v);c.lineTo(l+.145*p,
-x+.855*v);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",qa);mxUtils.extend(ya,mxRhombus);ya.prototype.paintVertexShape=function(c,l,x,p,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ya);mxUtils.extend(Ea,mxEllipse);Ea.prototype.paintVertexShape=function(c,l,x,p,v){c.begin();c.moveTo(l,x);c.lineTo(l+p,x);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke();
-c.begin();c.moveTo(l,x+v);c.lineTo(l+p,x+v);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Ea);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape=function(c,l,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,ha=x+v-B/2;c.begin();c.moveTo(l,x);c.lineTo(l,x+v);c.moveTo(l+A,ha);c.lineTo(l+A+B,ha-B/2);c.moveTo(l+A,ha);c.lineTo(l+A+B,ha+B/2);c.moveTo(l+A,ha);c.lineTo(l+p-A,ha);c.moveTo(l+p,x);c.lineTo(l+p,x+v);c.moveTo(l+p-A,ha);c.lineTo(l+p-B-A,ha-B/2);c.moveTo(l+
-p-A,ha);c.lineTo(l+p-B-A,ha+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Na);mxUtils.extend(Pa,mxEllipse);Pa.prototype.drawHidden=!0;Pa.prototype.paintVertexShape=function(c,l,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ha="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
-"left","1"),xa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ha||xa||ma||K?(c.rect(l,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,x),this.outline||ha?c.lineTo(l+p,x):c.moveTo(l+p,x),this.outline||xa?c.lineTo(l+p,x+v):c.moveTo(l+p,x+v),this.outline||ma?c.lineTo(l,x+v):c.moveTo(l,x+v),(this.outline||K)&&c.lineTo(l,x),c.end(),c.stroke(),c.setLineCap("flat")):
-c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Pa);mxUtils.extend(Qa,mxEllipse);Qa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+p/2,x),c.lineTo(l+p/2,x+v)):(c.moveTo(l,x+v/2),c.lineTo(l+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Qa);mxUtils.extend(Ua,mxActor);Ua.prototype.redrawPath=function(c,
-l,x,p,v){l=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Ua);mxUtils.extend(La,mxActor);La.prototype.size=.2;La.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,p);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(v-A)/2;x=l+A;var B=(p-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(p,l);c.lineTo(p,x);
-c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",La);mxUtils.extend(ua,mxActor);ua.prototype.size=.25;ua.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/2);x=Math.min(p-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",ua);mxUtils.extend(za,
-mxActor);za.prototype.cst={RECT2:"mxgraph.basic.rect"};za.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
+x+.855*v);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",qa);mxUtils.extend(xa,mxRhombus);xa.prototype.paintVertexShape=function(c,l,x,p,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(Ga,mxEllipse);Ga.prototype.paintVertexShape=function(c,l,x,p,v){c.begin();c.moveTo(l,x);c.lineTo(l+p,x);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke();
+c.begin();c.moveTo(l,x+v);c.lineTo(l+p,x+v);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Ga);mxUtils.extend(La,mxEllipse);La.prototype.paintVertexShape=function(c,l,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,fa=x+v-B/2;c.begin();c.moveTo(l,x);c.lineTo(l,x+v);c.moveTo(l+A,fa);c.lineTo(l+A+B,fa-B/2);c.moveTo(l+A,fa);c.lineTo(l+A+B,fa+B/2);c.moveTo(l+A,fa);c.lineTo(l+p-A,fa);c.moveTo(l+p,x);c.lineTo(l+p,x+v);c.moveTo(l+p-A,fa);c.lineTo(l+p-B-A,fa-B/2);c.moveTo(l+
+p-A,fa);c.lineTo(l+p-B-A,fa+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",La);mxUtils.extend(Pa,mxEllipse);Pa.prototype.drawHidden=!0;Pa.prototype.paintVertexShape=function(c,l,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var fa="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
+"left","1"),wa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||fa||wa||ma||K?(c.rect(l,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,x),this.outline||fa?c.lineTo(l+p,x):c.moveTo(l+p,x),this.outline||wa?c.lineTo(l+p,x+v):c.moveTo(l+p,x+v),this.outline||ma?c.lineTo(l,x+v):c.moveTo(l,x+v),(this.outline||K)&&c.lineTo(l,x),c.end(),c.stroke(),c.setLineCap("flat")):
+c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Pa);mxUtils.extend(Oa,mxEllipse);Oa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+p/2,x),c.lineTo(l+p/2,x+v)):(c.moveTo(l,x+v/2),c.lineTo(l+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Oa);mxUtils.extend(Ta,mxActor);Ta.prototype.redrawPath=function(c,
+l,x,p,v){l=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Ta);mxUtils.extend(Ma,mxActor);Ma.prototype.size=.2;Ma.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,p);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(v-A)/2;x=l+A;var B=(p-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(p,l);c.lineTo(p,x);
+c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",Ma);mxUtils.extend(ua,mxActor);ua.prototype.size=.25;ua.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/2);x=Math.min(p-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",ua);mxUtils.extend(ya,
+mxActor);ya.prototype.cst={RECT2:"mxgraph.basic.rect"};ya.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},
{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},
{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",
-dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];za.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,
-x);this.strictDrawShape(c,0,0,p,v)};za.prototype.strictDrawShape=function(c,l,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ha=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),xa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=A&&A.indent?
-A.indent:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),ab=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),fb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,ma)),Da=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ia=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ha=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Fa=A&&A.left?A.left:
-mxUtils.getValue(this.style,"left",!0),Sa=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Xa=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ya=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Za=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Eb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
+dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];ya.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,
+x);this.strictDrawShape(c,0,0,p,v)};ya.prototype.strictDrawShape=function(c,l,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),fa=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),wa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=A&&A.indent?
+A.indent:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),bb=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),eb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,ma)),Ea=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ja=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ia=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
+mxUtils.getValue(this.style,"left",!0),Sa=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Wa=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Xa=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),ab=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Eb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
A&&A.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Fb=A&&A.strokeWidth?A.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Cb=A&&A.fillColor2?A.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Db=A&&A.gradientColor2?A.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Gb=A&&A.gradientDirection2?A.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Hb=A&&A.opacity?A.opacity:mxUtils.getValue(this.style,"opacity","100"),
-Ib=Math.max(0,Math.min(50,K));A=za.prototype;c.setDashed(ab);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Fb);K=Math.min(.5*v,.5*p,K);ha||(K=Ib*Math.min(p,v)/100);K=Math.min(K,.5*Math.min(p,v));ha||(ma=Math.min(fb*Math.min(p,v)/100));ma=Math.min(ma,.5*Math.min(p,v)-K);(Da||Ia||Ha||Fa)&&"frame"!=xa&&(c.begin(),Da?A.moveNW(c,l,x,p,v,B,Sa,K,Fa):c.moveTo(0,0),Da&&A.paintNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),Ia&&A.paintNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),Ha&&
-A.paintSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),Fa&&A.paintSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),ab=ha=Hb,"none"==Cb&&(ha=0),"none"==Db&&(ab=0),c.setGradient(Cb,Db,0,0,p,v,Gb,ha,ab),c.begin(),Da?A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Da,Fa):c.moveTo(ma,0),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),Fa&&Ha&&A.paintSWInner(c,l,x,p,v,B,Za,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),Ha&&Ia&&A.paintSEInner(c,
-l,x,p,v,B,Ya,K,ma),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),Ia&&Da&&A.paintNEInner(c,l,x,p,v,B,Xa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),Da&&Fa&&A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,l,x,p,v,B,Sa,Xa,Ya,Za,K,Da,Ia,Ha,Fa),c.stroke()));Da||Ia||Ha||!Fa?Da||Ia||!Ha||Fa?!Da&&!Ia&&Ha&&Fa?"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.paintSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),"double"==
-xa&&(A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Da,Fa),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),A.paintSWInner(c,l,x,p,v,B,Za,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.paintSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),A.lineNWInner(c,l,x,p,v,B,Sa,K,ma,Da,Fa),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),A.paintSWInner(c,l,x,p,v,B,Za,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),c.close(),
-c.fillAndStroke()):Da||!Ia||Ha||Fa?!Da&&Ia&&!Ha&&Fa?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Sa,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Da,Fa),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa)),c.stroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,ma,Ha),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Sa,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,
-K,Da),A.lineNWInner(c,l,x,p,v,B,Sa,K,ma,Da,Fa),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.lineSEInner(c,l,x,p,v,B,Ya,K,ma,Ha),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),c.close(),c.fillAndStroke()):!Da&&Ia&&Ha&&!Fa?"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.paintSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),"double"==xa&&(A.moveSWInner(c,
-l,x,p,v,B,Za,K,ma,Fa),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),A.paintSEInner(c,l,x,p,v,B,Ya,K,ma),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia)),c.stroke()):(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.paintSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.lineSWInner(c,l,x,p,v,B,Za,K,ma,Fa),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),A.paintSEInner(c,l,x,p,v,B,Ya,K,ma),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),c.close(),c.fillAndStroke()):!Da&&
-Ia&&Ha&&Fa?"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.paintSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.paintSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Da,Fa),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),A.paintSWInner(c,l,x,p,v,B,Za,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),A.paintSEInner(c,l,x,p,v,B,Ya,K,ma),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.paintSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.paintSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),A.lineNWInner(c,l,x,p,v,B,Sa,K,ma,Da,Fa),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),A.paintSWInner(c,l,x,p,v,B,Za,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),A.paintSEInner(c,l,x,p,v,B,Ya,K,ma),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),c.close(),c.fillAndStroke()):!Da||Ia||Ha||Fa?
-Da&&!Ia&&!Ha&&Fa?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),A.paintNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),A.paintNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.lineNEInner(c,
-l,x,p,v,B,Xa,K,ma,Ia),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),c.close(),c.fillAndStroke()):Da&&!Ia&&Ha&&!Fa?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da)),c.stroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Za,
-K,ma,Fa),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.lineNEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.lineSWInner(c,l,x,p,v,B,Za,K,ma,Fa),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),c.close(),c.fillAndStroke()):Da&&!Ia&&Ha&&Fa?"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,
-K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.paintSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),A.paintNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),A.paintSWInner(c,l,x,p,v,B,Za,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,
-x,p,v,B,Za,K,Fa),A.paintSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),A.paintNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.lineNEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),A.paintSWInner(c,l,x,p,v,B,Za,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),c.close(),c.fillAndStroke()):Da&&Ia&&!Ha&&!Fa?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,
-l,x,p,v,B,Xa,K,Ia),A.paintNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,ma,Ha),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),A.paintNEInner(c,l,x,p,v,B,Xa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.paintNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.lineSEInner(c,l,x,p,v,B,Ya,K,ma,Ha),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),A.paintNEInner(c,
-l,x,p,v,B,Xa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),c.close(),c.fillAndStroke()):Da&&Ia&&!Ha&&Fa?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),A.paintNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.paintNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,ma,Ha),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),A.paintNEInner(c,l,x,p,v,B,Xa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),A.paintNWInner(c,
-l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),A.paintNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.paintNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.lineSEInner(c,l,x,p,v,B,Ya,K,ma,Ha),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),A.paintNEInner(c,l,x,p,v,B,Xa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,
-v,B,Za,K,ma,Ha,Fa),c.close(),c.fillAndStroke()):Da&&Ia&&Ha&&!Fa?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.paintNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.paintSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Za,K,ma,Fa),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),A.paintSEInner(c,l,x,p,v,B,Ya,K,ma),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),A.paintNEInner(c,l,x,p,v,B,Xa,K,ma),A.paintTopInner(c,
-l,x,p,v,B,Sa,K,ma,Fa,Da)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.paintNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.paintSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.lineSWInner(c,l,x,p,v,B,Za,K,ma,Fa),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),A.paintSEInner(c,l,x,p,v,B,Ya,K,ma),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),A.paintNEInner(c,l,x,p,v,B,Xa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),c.close(),c.fillAndStroke()):
-Da&&Ia&&Ha&&Fa&&("frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.paintNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.paintSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.paintSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),c.close(),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Za,K,ma,Fa),A.paintSWInner(c,l,x,p,v,B,Za,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),A.paintSEInner(c,l,x,p,v,
-B,Ya,K,ma),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),A.paintNEInner(c,l,x,p,v,B,Xa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.paintNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.paintSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.paintSW(c,l,x,p,v,B,Za,K,Ha),
-A.paintLeft(c,l,x,p,v,B,Sa,K,Da),c.close(),A.moveSWInner(c,l,x,p,v,B,Za,K,ma,Fa),A.paintSWInner(c,l,x,p,v,B,Za,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),A.paintSEInner(c,l,x,p,v,B,Ya,K,ma),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),A.paintNEInner(c,l,x,p,v,B,Xa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),c.close(),c.fillAndStroke())):"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,
-l,x,p,v,B,Xa,K,Ia),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.lineNEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,ma,Ha),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.lineSEInner(c,l,x,p,v,B,Ya,K,ma,Ha),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Za,K,ma,Fa),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.lineSWInner(c,l,x,p,v,B,Za,K,ma,Fa),
-A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Sa,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Da,Fa),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Sa,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),A.lineNWInner(c,l,x,p,v,B,Sa,K,ma,Da,Fa),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,x,p,v,B,Sa,Xa,
-Ya,Za,K,Da,Ia,Ha,Fa);c.stroke()};za.prototype.moveNW=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ha)};za.prototype.moveNE=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,0):c.moveTo(p-ha,0)};za.prototype.moveSE=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,v):c.moveTo(p,v-ha)};za.prototype.moveSW=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
-v):c.moveTo(ha,v)};za.prototype.paintNW=function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,ha,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ha,0);else c.lineTo(0,0)};za.prototype.paintTop=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,0):c.lineTo(p-ha,0)};za.prototype.paintNE=
-function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,p,ha)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,ha);else c.lineTo(p,0)};za.prototype.paintRight=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,v):c.lineTo(p,v-ha)};za.prototype.paintLeft=function(c,l,x,p,v,A,B,ha,K){"square"==
-B||"default"==B&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ha)};za.prototype.paintSE=function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,p-ha,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-ha,v);else c.lineTo(p,v)};za.prototype.paintBottom=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(0,
-v):c.lineTo(ha,v)};za.prototype.paintSW=function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,0,v-ha)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-ha);else c.lineTo(0,v)};za.prototype.paintNWInner=function(c,l,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,K,.5*K+ha);else if("invRound"==
-B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,K,K+ha);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(K,.5*K+ha);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ha,K+ha),c.lineTo(K,K+ha)};za.prototype.paintTopInner=function(c,l,x,p,v,A,B,ha,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(0,K):xa&&!ma?c.lineTo(K,0):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ha+.5*K,K):c.lineTo(ha+K,K):c.lineTo(0,
-K):c.lineTo(0,0)};za.prototype.paintNEInner=function(c,l,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,p-ha-.5*K,K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,p-ha-K,K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-ha-.5*K,K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ha-K,ha+K),c.lineTo(p-ha-K,K)};za.prototype.paintRightInner=function(c,l,x,p,v,A,B,ha,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(p-K,0):xa&&!ma?c.lineTo(p,
-K):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ha+.5*K):c.lineTo(p-K,ha+K):c.lineTo(p-K,0):c.lineTo(p,0)};za.prototype.paintLeftInner=function(c,l,x,p,v,A,B,ha,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(K,v):xa&&!ma?c.lineTo(0,v-K):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-ha-.5*K):c.lineTo(K,v-ha-K):
-c.lineTo(K,v):c.lineTo(0,v)};za.prototype.paintSEInner=function(c,l,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,p-K,v-ha-.5*K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,p-K,v-ha-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-K,v-ha-.5*K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ha-K,v-ha-K),c.lineTo(p-K,v-ha-K)};za.prototype.paintBottomInner=function(c,l,x,p,v,A,B,ha,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(p,
-v-K):xa&&!ma?c.lineTo(p-K,v):"square"==B||"default"==B&&"square"==A||!xa?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-ha-.5*K,v-K):c.lineTo(p-ha-K,v-K):c.lineTo(p,v)};za.prototype.paintSWInner=function(c,l,x,p,v,A,B,ha,K,xa){if(!xa)c.lineTo(K,v);else if("square"==B||"default"==B&&"square"==A)c.lineTo(K,v-K);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,ha+.5*K,v-K);else if("invRound"==B||"default"==B&&"invRound"==
-A)c.arcTo(ha+K,ha+K,0,0,1,ha+K,v-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ha+.5*K,v-K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ha,v-ha-K),c.lineTo(K+ha,v-K)};za.prototype.moveSWInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(K,v-ha-K):
-c.moveTo(0,v-K)};za.prototype.lineSWInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,v-ha-K):c.lineTo(0,v-K)};za.prototype.moveSEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,v-ha-K):c.moveTo(p-K,v)};za.prototype.lineSEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,v-ha-K):
-c.lineTo(p-K,v)};za.prototype.moveNEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.moveTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,ha+K):c.moveTo(p,K)};za.prototype.lineNEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,ha+K):c.lineTo(p,K)};za.prototype.moveNWInner=function(c,l,x,p,v,A,B,ha,K,xa,ma){xa||ma?!xa&&ma?c.moveTo(K,0):xa&&!ma?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
-B&&"fold"==A)&&c.moveTo(K,ha+K):c.moveTo(0,0)};za.prototype.lineNWInner=function(c,l,x,p,v,A,B,ha,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(K,0):xa&&!ma?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ha+K):c.lineTo(0,0)};za.prototype.paintFolds=function(c,l,x,p,v,A,B,ha,K,xa,ma,ab,jb,fb,Da){if("fold"==
-A||"fold"==B||"fold"==ha||"fold"==K||"fold"==xa)("fold"==B||"default"==B&&"fold"==A)&&ab&&Da&&(c.moveTo(0,ma),c.lineTo(ma,ma),c.lineTo(ma,0)),("fold"==ha||"default"==ha&&"fold"==A)&&ab&&jb&&(c.moveTo(p-ma,0),c.lineTo(p-ma,ma),c.lineTo(p,ma)),("fold"==K||"default"==K&&"fold"==A)&&fb&&jb&&(c.moveTo(p-ma,v),c.lineTo(p-ma,v-ma),c.lineTo(p,v-ma)),("fold"==xa||"default"==xa&&"fold"==A)&&fb&&Da&&(c.moveTo(0,v-ma),c.lineTo(ma,v-ma),c.lineTo(ma,v))};mxCellRenderer.registerShape(za.prototype.cst.RECT2,za);
-za.prototype.constraints=null;mxUtils.extend(Ka,mxConnector);Ka.prototype.origPaintEdgeShape=Ka.prototype.paintEdgeShape;Ka.prototype.paintEdgeShape=function(c,l,x){for(var p=[],v=0;v<l.length;v++)p.push(mxUtils.clone(l[v]));v=c.state.dashed;var A=c.state.fixDash;Ka.prototype.origPaintEdgeShape.apply(this,[c,p,x]);3<=c.state.strokeWidth&&(p=mxUtils.getValue(this.style,"fillColor",null),null!=p&&(c.setStrokeColor(p),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(v,A),Ka.prototype.origPaintEdgeShape.apply(this,
-[c,l,x])))};mxCellRenderer.registerShape("filledEdge",Ka);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==l.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,l,x,p,v,A,B,ha,K,xa){var ma=v*(B+K+1),ab=A*(B+K+1);return function(){c.begin();
-c.moveTo(p.x-ma/2-ab/2,p.y-ab/2+ma/2);c.lineTo(p.x+ab/2-3*ma/2,p.y-3*ab/2-ma/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,x,p,v,A,B,ha,K,xa){var ma=v*(B+K+1),ab=A*(B+K+1),jb=p.x+ma/2,fb=p.y+ab/2;p.x-=ma;p.y-=ab;return function(){c.begin();c.moveTo(jb-ma/2-ab/2,fb-ab/2+ma/2);c.lineTo(jb-ma/2+ab/2,fb-ab/2-ma/2);c.lineTo(jb+ab/2-3*ma/2,fb-3*ab/2-ma/2);c.lineTo(jb-ab/2-3*ma/2,fb-3*ab/2+ma/2);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,x,p,v,A,B,ha,K,
-xa){var ma=v*(B+K+1),ab=A*(B+K+1);return function(){c.begin();c.moveTo(p.x-ma/2-ab/2,p.y-ab/2+ma/2);c.lineTo(p.x+ab/2-3*ma/2,p.y-3*ab/2-ma/2);c.moveTo(p.x-ma/2+ab/2,p.y-ab/2-ma/2);c.lineTo(p.x-ab/2-3*ma/2,p.y-3*ab/2+ma/2);c.stroke()}});mxMarker.addMarker("circle",Ga);mxMarker.addMarker("circlePlus",function(c,l,x,p,v,A,B,ha,K,xa){var ma=p.clone(),ab=Ga.apply(this,arguments),jb=v*(B+2*K),fb=A*(B+2*K);return function(){ab.apply(this,arguments);c.begin();c.moveTo(ma.x-v*K,ma.y-A*K);c.lineTo(ma.x-2*jb+
-v*K,ma.y-2*fb+A*K);c.moveTo(ma.x-jb-fb+A*K,ma.y-fb+jb-v*K);c.lineTo(ma.x+fb-jb-A*K,ma.y-fb-jb+v*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,x,p,v,A,B,ha,K,xa){var ma=v*(B+K+1),ab=A*(B+K+1),jb=p.clone();p.x-=ma;p.y-=ab;return function(){c.begin();c.moveTo(jb.x-ab,jb.y+ma);c.quadTo(p.x-ab,p.y+ma,p.x,p.y);c.quadTo(p.x+ab,p.y-ma,jb.x+ab,jb.y-ma);c.stroke()}});mxMarker.addMarker("async",function(c,l,x,p,v,A,B,ha,K,xa){l=v*K*1.118;x=A*K*1.118;v*=B+K;A*=B+K;var ma=p.clone();ma.x-=l;ma.y-=
-x;p.x+=-v-l;p.y+=-A-x;return function(){c.begin();c.moveTo(ma.x,ma.y);ha?c.lineTo(ma.x-v-A/2,ma.y-A+v/2):c.lineTo(ma.x+A/2-v,ma.y-A-v/2);c.lineTo(ma.x-v,ma.y-A);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,x,p,v,A,B,ha,K,xa,ma){A*=ha+xa;B*=ha+xa;var ab=v.clone();return function(){l.begin();l.moveTo(ab.x,ab.y);K?l.lineTo(ab.x-A-B/c,ab.y-B+A/c):l.lineTo(ab.x+B/c-A,ab.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var eb=
-function(c,l,x){return hb(c,["width"],l,function(p,v,A,B,ha){ha=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ha/2,B.y+A*p/4-v*ha/2)},function(p,v,A,B,ha,K){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));c.style.width=Math.round(2*p)/c.view.scale-x})},hb=function(c,l,x,p,v){return gb(c,l,function(A){var B=c.absolutePoints,ha=B.length-1;A=c.view.translate;var K=c.view.scale,xa=x?B[0]:B[ha];B=x?B[1]:B[ha-1];ha=B.x-xa.x;var ma=B.y-xa.y,ab=Math.sqrt(ha*ha+ma*ma);xa=
-p.call(this,ab,ha/ab,ma/ab,xa,B);return new mxPoint(xa.x/K-A.x,xa.y/K-A.y)},function(A,B,ha){var K=c.absolutePoints,xa=K.length-1;A=c.view.translate;var ma=c.view.scale,ab=x?K[0]:K[xa];K=x?K[1]:K[xa-1];xa=K.x-ab.x;var jb=K.y-ab.y,fb=Math.sqrt(xa*xa+jb*jb);B.x=(B.x+A.x)*ma;B.y=(B.y+A.y)*ma;v.call(this,fb,xa/fb,jb/fb,ab,K,B,ha)})},tb=function(c){return function(l){return[gb(l,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",$a.prototype.arrowWidth))),
-v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",$a.prototype.arrowSize)));return new mxPoint(x.x+(1-v)*x.width,x.y+(1-p)*x.height/2)},function(x,p){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(x.y+x.height/2-p.y)/x.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(x.x+x.width-p.x)/x.width))})]}},vb=function(c){return function(l){return[gb(l,["size"],function(x){var p=Math.max(0,Math.min(.5*x.height,parseFloat(mxUtils.getValue(this.state.style,"size",
-c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},qb=function(c,l,x){return function(p){var v=[gb(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,
-!1)&&v.push(kb(p));return v}},Ab=function(c,l,x,p,v){x=null!=x?x:.5;return function(A){var B=[gb(A,["size"],function(ha){var K=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,xa=parseFloat(mxUtils.getValue(this.state.style,"size",K?v:c));return new mxPoint(ha.x+Math.max(0,Math.min(.5*ha.width,xa*(K?1:ha.width))),ha.getCenterY())},function(ha,K,xa){ha=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ha.x:Math.max(0,Math.min(x,(K.x-ha.x)/ha.width));this.state.style.size=
-ha},!1,p)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},Bb=function(c,l,x){c=null!=c?c:.5;return function(p){var v=[gb(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ha=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ha*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-
-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(kb(p));return v}},ub=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l}},kb=function(c,l){return gb(c,[mxConstants.STYLE_ARCSIZE],function(x){var p=null!=l?l:x.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
+Ib=Math.max(0,Math.min(50,K));A=ya.prototype;c.setDashed(bb);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Fb);K=Math.min(.5*v,.5*p,K);fa||(K=Ib*Math.min(p,v)/100);K=Math.min(K,.5*Math.min(p,v));fa||(ma=Math.min(eb*Math.min(p,v)/100));ma=Math.min(ma,.5*Math.min(p,v)-K);(Ea||Ja||Ia||Ha)&&"frame"!=wa&&(c.begin(),Ea?A.moveNW(c,l,x,p,v,B,Sa,K,Ha):c.moveTo(0,0),Ea&&A.paintNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),Ja&&A.paintNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),Ia&&
+A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),Ha&&A.paintSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),bb=fa=Hb,"none"==Cb&&(fa=0),"none"==Db&&(bb=0),c.setGradient(Cb,Db,0,0,p,v,Gb,fa,bb),c.begin(),Ea?A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Ea,Ha):c.moveTo(ma,0),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),Ha&&Ia&&A.paintSWInner(c,l,x,p,v,B,ab,K,ma,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),Ia&&Ja&&A.paintSEInner(c,
+l,x,p,v,B,Xa,K,ma),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),Ja&&Ea&&A.paintNEInner(c,l,x,p,v,B,Wa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),Ea&&Ha&&A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,l,x,p,v,B,Sa,Wa,Xa,ab,K,Ea,Ja,Ia,Ha),c.stroke()));Ea||Ja||Ia||!Ha?Ea||Ja||!Ia||Ha?!Ea&&!Ja&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.paintSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),"double"==
+wa&&(A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,ab,K,ma,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.paintSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),A.lineNWInner(c,l,x,p,v,B,Sa,K,ma,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,ab,K,ma,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),c.close(),
+c.fillAndStroke()):Ea||!Ja||Ia||Ha?!Ea&&Ja&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,Sa,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha)),c.stroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Sa,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,
+K,Ea),A.lineNWInner(c,l,x,p,v,B,Sa,K,ma,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),c.close(),c.fillAndStroke()):!Ea&&Ja&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),"double"==wa&&(A.moveSWInner(c,
+l,x,p,v,B,ab,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,ma),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja)),c.stroke()):(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.lineSWInner(c,l,x,p,v,B,ab,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,ma),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),c.close(),c.fillAndStroke()):!Ea&&
+Ja&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.paintSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,ab,K,ma,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,ma),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja)),c.stroke()):
+(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.paintSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),A.lineNWInner(c,l,x,p,v,B,Sa,K,ma,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,ab,K,ma,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,ma),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),c.close(),c.fillAndStroke()):!Ea||Ja||Ia||Ha?
+Ea&&!Ja&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),A.paintNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),A.paintNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,
+l,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),c.close(),c.fillAndStroke()):Ea&&!Ja&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea)),c.stroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,ab,
+K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.lineSWInner(c,l,x,p,v,B,ab,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),c.close(),c.fillAndStroke()):Ea&&!Ja&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,
+K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.paintSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),A.paintNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,ab,K,ma,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,
+x,p,v,B,ab,K,Ha),A.paintSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),A.paintNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,ab,K,ma,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),c.close(),c.fillAndStroke()):Ea&&Ja&&!Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,
+l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,
+l,x,p,v,B,Wa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),c.close(),c.fillAndStroke()):Ea&&Ja&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),A.paintNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),A.paintNWInner(c,
+l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),A.paintNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,
+v,B,ab,K,ma,Ia,Ha),c.close(),c.fillAndStroke()):Ea&&Ja&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,ab,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,ma),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,ma),A.paintTopInner(c,
+l,x,p,v,B,Sa,K,ma,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.lineSWInner(c,l,x,p,v,B,ab,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,ma),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),c.close(),c.fillAndStroke()):
+Ea&&Ja&&Ia&&Ha&&("frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.paintSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),c.close(),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,ab,K,ma,Ha),A.paintSWInner(c,l,x,p,v,B,ab,K,ma,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),A.paintSEInner(c,l,x,p,v,
+B,Xa,K,ma),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.paintSW(c,l,x,p,v,B,ab,K,Ia),
+A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),c.close(),A.moveSWInner(c,l,x,p,v,B,ab,K,ma,Ha),A.paintSWInner(c,l,x,p,v,B,ab,K,ma,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,ma),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),c.close(),c.fillAndStroke())):"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,
+l,x,p,v,B,Wa,K,Ja),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja)),c.stroke()):
+(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,ab,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.lineSWInner(c,l,x,p,v,B,ab,K,ma,Ha),
+A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,Sa,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Sa,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),A.lineNWInner(c,l,x,p,v,B,Sa,K,ma,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,x,p,v,B,Sa,Wa,
+Xa,ab,K,Ea,Ja,Ia,Ha);c.stroke()};ya.prototype.moveNW=function(c,l,x,p,v,A,B,fa,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,fa)};ya.prototype.moveNE=function(c,l,x,p,v,A,B,fa,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,0):c.moveTo(p-fa,0)};ya.prototype.moveSE=function(c,l,x,p,v,A,B,fa,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,v):c.moveTo(p,v-fa)};ya.prototype.moveSW=function(c,l,x,p,v,A,B,fa,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
+v):c.moveTo(fa,v)};ya.prototype.paintNW=function(c,l,x,p,v,A,B,fa,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(fa,fa,0,0,l,fa,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(fa,0);else c.lineTo(0,0)};ya.prototype.paintTop=function(c,l,x,p,v,A,B,fa,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,0):c.lineTo(p-fa,0)};ya.prototype.paintNE=
+function(c,l,x,p,v,A,B,fa,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(fa,fa,0,0,l,p,fa)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,fa);else c.lineTo(p,0)};ya.prototype.paintRight=function(c,l,x,p,v,A,B,fa,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,v):c.lineTo(p,v-fa)};ya.prototype.paintLeft=function(c,l,x,p,v,A,B,fa,K){"square"==
+B||"default"==B&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,fa)};ya.prototype.paintSE=function(c,l,x,p,v,A,B,fa,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(fa,fa,0,0,l,p-fa,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-fa,v);else c.lineTo(p,v)};ya.prototype.paintBottom=function(c,l,x,p,v,A,B,fa,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(0,
+v):c.lineTo(fa,v)};ya.prototype.paintSW=function(c,l,x,p,v,A,B,fa,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(fa,fa,0,0,l,0,v-fa)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-fa);else c.lineTo(0,v)};ya.prototype.paintNWInner=function(c,l,x,p,v,A,B,fa,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(fa-.5*K,fa-.5*K,0,0,0,K,.5*K+fa);else if("invRound"==
+B||"default"==B&&"invRound"==A)c.arcTo(fa+K,fa+K,0,0,1,K,K+fa);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(K,.5*K+fa);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+fa,K+fa),c.lineTo(K,K+fa)};ya.prototype.paintTopInner=function(c,l,x,p,v,A,B,fa,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(0,K):wa&&!ma?c.lineTo(K,0):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(fa+.5*K,K):c.lineTo(fa+K,K):c.lineTo(0,
+K):c.lineTo(0,0)};ya.prototype.paintNEInner=function(c,l,x,p,v,A,B,fa,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(fa-.5*K,fa-.5*K,0,0,0,p-fa-.5*K,K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(fa+K,fa+K,0,0,1,p-fa-K,K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-fa-.5*K,K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-fa-K,fa+K),c.lineTo(p-fa-K,K)};ya.prototype.paintRightInner=function(c,l,x,p,v,A,B,fa,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(p-K,0):wa&&!ma?c.lineTo(p,
+K):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,fa+.5*K):c.lineTo(p-K,fa+K):c.lineTo(p-K,0):c.lineTo(p,0)};ya.prototype.paintLeftInner=function(c,l,x,p,v,A,B,fa,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,v):wa&&!ma?c.lineTo(0,v-K):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-fa-.5*K):c.lineTo(K,v-fa-K):
+c.lineTo(K,v):c.lineTo(0,v)};ya.prototype.paintSEInner=function(c,l,x,p,v,A,B,fa,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(fa-.5*K,fa-.5*K,0,0,0,p-K,v-fa-.5*K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(fa+K,fa+K,0,0,1,p-K,v-fa-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-K,v-fa-.5*K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-fa-K,v-fa-K),c.lineTo(p-K,v-fa-K)};ya.prototype.paintBottomInner=function(c,l,x,p,v,A,B,fa,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(p,
+v-K):wa&&!ma?c.lineTo(p-K,v):"square"==B||"default"==B&&"square"==A||!wa?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-fa-.5*K,v-K):c.lineTo(p-fa-K,v-K):c.lineTo(p,v)};ya.prototype.paintSWInner=function(c,l,x,p,v,A,B,fa,K,wa){if(!wa)c.lineTo(K,v);else if("square"==B||"default"==B&&"square"==A)c.lineTo(K,v-K);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(fa-.5*K,fa-.5*K,0,0,0,fa+.5*K,v-K);else if("invRound"==B||"default"==B&&"invRound"==
+A)c.arcTo(fa+K,fa+K,0,0,1,fa+K,v-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(fa+.5*K,v-K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+fa,v-fa-K),c.lineTo(K+fa,v-K)};ya.prototype.moveSWInner=function(c,l,x,p,v,A,B,fa,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,v-fa-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(K,v-fa-K):
+c.moveTo(0,v-K)};ya.prototype.lineSWInner=function(c,l,x,p,v,A,B,fa,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-fa-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,v-fa-K):c.lineTo(0,v-K)};ya.prototype.moveSEInner=function(c,l,x,p,v,A,B,fa,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,v-fa-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,v-fa-K):c.moveTo(p-K,v)};ya.prototype.lineSEInner=function(c,l,x,p,v,A,B,fa,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,v-fa-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,v-fa-K):
+c.lineTo(p-K,v)};ya.prototype.moveNEInner=function(c,l,x,p,v,A,B,fa,K,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.moveTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,fa+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,fa+K):c.moveTo(p,K)};ya.prototype.lineNEInner=function(c,l,x,p,v,A,B,fa,K,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,fa+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,fa+K):c.lineTo(p,K)};ya.prototype.moveNWInner=function(c,l,x,p,v,A,B,fa,K,wa,ma){wa||ma?!wa&&ma?c.moveTo(K,0):wa&&!ma?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,fa+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
+B&&"fold"==A)&&c.moveTo(K,fa+K):c.moveTo(0,0)};ya.prototype.lineNWInner=function(c,l,x,p,v,A,B,fa,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,0):wa&&!ma?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,fa+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,fa+K):c.lineTo(0,0)};ya.prototype.paintFolds=function(c,l,x,p,v,A,B,fa,K,wa,ma,bb,jb,eb,Ea){if("fold"==
+A||"fold"==B||"fold"==fa||"fold"==K||"fold"==wa)("fold"==B||"default"==B&&"fold"==A)&&bb&&Ea&&(c.moveTo(0,ma),c.lineTo(ma,ma),c.lineTo(ma,0)),("fold"==fa||"default"==fa&&"fold"==A)&&bb&&jb&&(c.moveTo(p-ma,0),c.lineTo(p-ma,ma),c.lineTo(p,ma)),("fold"==K||"default"==K&&"fold"==A)&&eb&&jb&&(c.moveTo(p-ma,v),c.lineTo(p-ma,v-ma),c.lineTo(p,v-ma)),("fold"==wa||"default"==wa&&"fold"==A)&&eb&&Ea&&(c.moveTo(0,v-ma),c.lineTo(ma,v-ma),c.lineTo(ma,v))};mxCellRenderer.registerShape(ya.prototype.cst.RECT2,ya);
+ya.prototype.constraints=null;mxUtils.extend(Na,mxConnector);Na.prototype.origPaintEdgeShape=Na.prototype.paintEdgeShape;Na.prototype.paintEdgeShape=function(c,l,x){for(var p=[],v=0;v<l.length;v++)p.push(mxUtils.clone(l[v]));v=c.state.dashed;var A=c.state.fixDash;Na.prototype.origPaintEdgeShape.apply(this,[c,p,x]);3<=c.state.strokeWidth&&(p=mxUtils.getValue(this.style,"fillColor",null),null!=p&&(c.setStrokeColor(p),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(v,A),Na.prototype.origPaintEdgeShape.apply(this,
+[c,l,x])))};mxCellRenderer.registerShape("filledEdge",Na);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==l.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,l,x,p,v,A,B,fa,K,wa){var ma=v*(B+K+1),bb=A*(B+K+1);return function(){c.begin();
+c.moveTo(p.x-ma/2-bb/2,p.y-bb/2+ma/2);c.lineTo(p.x+bb/2-3*ma/2,p.y-3*bb/2-ma/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,x,p,v,A,B,fa,K,wa){var ma=v*(B+K+1),bb=A*(B+K+1),jb=p.x+ma/2,eb=p.y+bb/2;p.x-=ma;p.y-=bb;return function(){c.begin();c.moveTo(jb-ma/2-bb/2,eb-bb/2+ma/2);c.lineTo(jb-ma/2+bb/2,eb-bb/2-ma/2);c.lineTo(jb+bb/2-3*ma/2,eb-3*bb/2-ma/2);c.lineTo(jb-bb/2-3*ma/2,eb-3*bb/2+ma/2);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,x,p,v,A,B,fa,K,
+wa){var ma=v*(B+K+1),bb=A*(B+K+1);return function(){c.begin();c.moveTo(p.x-ma/2-bb/2,p.y-bb/2+ma/2);c.lineTo(p.x+bb/2-3*ma/2,p.y-3*bb/2-ma/2);c.moveTo(p.x-ma/2+bb/2,p.y-bb/2-ma/2);c.lineTo(p.x-bb/2-3*ma/2,p.y-3*bb/2+ma/2);c.stroke()}});mxMarker.addMarker("circle",Fa);mxMarker.addMarker("circlePlus",function(c,l,x,p,v,A,B,fa,K,wa){var ma=p.clone(),bb=Fa.apply(this,arguments),jb=v*(B+2*K),eb=A*(B+2*K);return function(){bb.apply(this,arguments);c.begin();c.moveTo(ma.x-v*K,ma.y-A*K);c.lineTo(ma.x-2*jb+
+v*K,ma.y-2*eb+A*K);c.moveTo(ma.x-jb-eb+A*K,ma.y-eb+jb-v*K);c.lineTo(ma.x+eb-jb-A*K,ma.y-eb-jb+v*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,x,p,v,A,B,fa,K,wa){var ma=v*(B+K+1),bb=A*(B+K+1),jb=p.clone();p.x-=ma;p.y-=bb;return function(){c.begin();c.moveTo(jb.x-bb,jb.y+ma);c.quadTo(p.x-bb,p.y+ma,p.x,p.y);c.quadTo(p.x+bb,p.y-ma,jb.x+bb,jb.y-ma);c.stroke()}});mxMarker.addMarker("async",function(c,l,x,p,v,A,B,fa,K,wa){l=v*K*1.118;x=A*K*1.118;v*=B+K;A*=B+K;var ma=p.clone();ma.x-=l;ma.y-=
+x;p.x+=-v-l;p.y+=-A-x;return function(){c.begin();c.moveTo(ma.x,ma.y);fa?c.lineTo(ma.x-v-A/2,ma.y-A+v/2):c.lineTo(ma.x+A/2-v,ma.y-A-v/2);c.lineTo(ma.x-v,ma.y-A);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,x,p,v,A,B,fa,K,wa,ma){A*=fa+wa;B*=fa+wa;var bb=v.clone();return function(){l.begin();l.moveTo(bb.x,bb.y);K?l.lineTo(bb.x-A-B/c,bb.y-B+A/c):l.lineTo(bb.x+B/c-A,bb.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var gb=
+function(c,l,x){return hb(c,["width"],l,function(p,v,A,B,fa){fa=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*fa/2,B.y+A*p/4-v*fa/2)},function(p,v,A,B,fa,K){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,fa.x,fa.y,K.x,K.y));c.style.width=Math.round(2*p)/c.view.scale-x})},hb=function(c,l,x,p,v){return ib(c,l,function(A){var B=c.absolutePoints,fa=B.length-1;A=c.view.translate;var K=c.view.scale,wa=x?B[0]:B[fa];B=x?B[1]:B[fa-1];fa=B.x-wa.x;var ma=B.y-wa.y,bb=Math.sqrt(fa*fa+ma*ma);wa=
+p.call(this,bb,fa/bb,ma/bb,wa,B);return new mxPoint(wa.x/K-A.x,wa.y/K-A.y)},function(A,B,fa){var K=c.absolutePoints,wa=K.length-1;A=c.view.translate;var ma=c.view.scale,bb=x?K[0]:K[wa];K=x?K[1]:K[wa-1];wa=K.x-bb.x;var jb=K.y-bb.y,eb=Math.sqrt(wa*wa+jb*jb);B.x=(B.x+A.x)*ma;B.y=(B.y+A.y)*ma;v.call(this,eb,wa/eb,jb/eb,bb,K,B,fa)})},ob=function(c){return function(l){return[ib(l,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",$a.prototype.arrowWidth))),
+v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",$a.prototype.arrowSize)));return new mxPoint(x.x+(1-v)*x.width,x.y+(1-p)*x.height/2)},function(x,p){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(x.y+x.height/2-p.y)/x.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(x.x+x.width-p.x)/x.width))})]}},vb=function(c){return function(l){return[ib(l,["size"],function(x){var p=Math.max(0,Math.min(.5*x.height,parseFloat(mxUtils.getValue(this.state.style,"size",
+c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},qb=function(c,l,x){return function(p){var v=[ib(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,
+!1)&&v.push(lb(p));return v}},Ab=function(c,l,x,p,v){x=null!=x?x:.5;return function(A){var B=[ib(A,["size"],function(fa){var K=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,wa=parseFloat(mxUtils.getValue(this.state.style,"size",K?v:c));return new mxPoint(fa.x+Math.max(0,Math.min(.5*fa.width,wa*(K?1:fa.width))),fa.getCenterY())},function(fa,K,wa){fa=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-fa.x:Math.max(0,Math.min(x,(K.x-fa.x)/fa.width));this.state.style.size=
+fa},!1,p)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(lb(A));return B}},Bb=function(c,l,x){c=null!=c?c:.5;return function(p){var v=[ib(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,fa=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,fa*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-
+A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(lb(p));return v}},tb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(lb(c));return l}},lb=function(c,l){return ib(c,[mxConstants.STYLE_ARCSIZE],function(x){var p=null!=l?l:x.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
mxConstants.LINE_ARCSIZE)/2;return new mxPoint(x.x+x.width-Math.min(x.width/2,v),x.y+p)}v=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(x.x+x.width-Math.min(Math.max(x.width/2,x.height/2),Math.min(x.width,x.height)*v),x.y+p)},function(x,p,v){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(x.width,2*(x.x+x.width-
-p.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(x.width-p.x+x.x)/Math.min(x.width,x.height))))})},gb=function(c,l,x,p,v,A,B){var ha=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ha.execute=function(xa){for(var ma=0;ma<l.length;ma++)this.copyStyle(l[ma]);B&&B(xa)};ha.getPosition=x;ha.setPosition=p;ha.ignoreGrid=null!=v?v:!0;if(A){var K=ha.positionChanged;ha.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);
-c.view.validate()}}return ha},lb={link:function(c){return[eb(c,!0,10),eb(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,x=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(hb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ha){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;
-return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),x.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ha){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
-5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(xa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(hb(c,
-["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ha){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);
-c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),
-x.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ha){p=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,
-B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(xa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<
-l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return x},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var x=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(kb(c,x/2))}l.push(gb(c,[mxConstants.STYLE_STARTSIZE],function(p){var v=parseFloat(mxUtils.getValue(c.style,
+p.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(x.width-p.x+x.x)/Math.min(x.width,x.height))))})},ib=function(c,l,x,p,v,A,B){var fa=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);fa.execute=function(wa){for(var ma=0;ma<l.length;ma++)this.copyStyle(l[ma]);B&&B(wa)};fa.getPosition=x;fa.setPosition=p;fa.ignoreGrid=null!=v?v:!0;if(A){var K=fa.positionChanged;fa.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);
+c.view.validate()}}return fa},mb={link:function(c){return[gb(c,!0,10),gb(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,x=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(hb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,fa){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;fa=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;
+return new mxPoint(B.x+v*(fa+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(fa+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,fa,K,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,fa.x,fa.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
+c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),x.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,fa){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;fa=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
+5)*c.view.scale;return new mxPoint(B.x+v*(fa+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(fa+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,fa,K,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,fa.x,fa.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
+c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(hb(c,
+["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,fa){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;fa=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(fa+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(fa+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,fa,K,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,fa.x,fa.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);
+c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),
+x.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,fa){p=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;fa=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(fa+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(fa+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,fa,K,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,fa.x,fa.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,
+B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<
+l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return x},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var x=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(lb(c,x/2))}l.push(ib(c,[mxConstants.STYLE_STARTSIZE],function(p){var v=parseFloat(mxUtils.getValue(c.style,
mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(p.getCenterX(),p.y+Math.max(0,Math.min(p.height,v))):new mxPoint(p.x+Math.max(0,Math.min(p.width,v)),p.getCenterY())},function(p,v){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(p.height,v.y-p.y))):Math.round(Math.max(0,Math.min(p.width,v.x-p.x)))},!1,null,function(p){var v=
-c.view.graph;if(!mxEvent.isShiftDown(p.getEvent())&&!mxEvent.isControlDown(p.getEvent())&&(v.isTableRow(c.cell)||v.isTableCell(c.cell))){p=v.getSwimlaneDirection(c.style);var A=v.model.getParent(c.cell);A=v.model.getChildCells(A,!0);for(var B=[],ha=0;ha<A.length;ha++)A[ha]!=c.cell&&v.isSwimlane(A[ha])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[ha]))==p&&B.push(A[ha]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:ub(),ext:ub(),rectangle:ub(),
-triangle:ub(),rhombus:ub(),umlLifeline:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},umlFrame:function(c){return[gb(c,["width","height"],function(l){var x=Math.max(W.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",W.prototype.width))),
-p=Math.max(1.5*W.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",W.prototype.height)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.width=Math.round(Math.max(W.prototype.corner,Math.min(l.width,x.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*W.prototype.corner,Math.min(l.height,x.y-l.y)))},!1)]},process:function(c){var l=[gb(c,["size"],function(x){var p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,
-"size",ea.prototype.size));return p?new mxPoint(x.x+v,x.y+x.height/4):new mxPoint(x.x+x.width*v,x.y+x.height/4)},function(x,p){x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*x.width,p.x-x.x)):Math.max(0,Math.min(.5,(p.x-x.x)/x.width));this.state.style.size=x},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},cross:function(c){return[gb(c,["size"],function(l){var x=Math.min(l.width,l.height);x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"size",La.prototype.size)))*x/2;return new mxPoint(l.getCenterX()-x,l.getCenterY()-x)},function(l,x){var p=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-x.y)/p*2,Math.max(0,l.getCenterX()-x.x)/p*2)))})]},note:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=
-Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},note2:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},manualInput:function(c){var l=[gb(c,["size"],function(x){var p=
-Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Ta.prototype.size)));return new mxPoint(x.x+x.width/4,x.y+3*p/4)},function(x,p){this.state.style.size=Math.round(Math.max(0,Math.min(x.height,4*(p.y-x.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},dataStorage:function(c){return[gb(c,["size"],function(l){var x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",x?L.prototype.fixedSize:
-L.prototype.size));return new mxPoint(l.x+l.width-p*(x?1:l.width),l.getCenterY())},function(l,x){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-x.x)):Math.max(0,Math.min(1,(l.x+l.width-x.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[gb(c,["size","position"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"position",ja.prototype.position)));mxUtils.getValue(this.state.style,"base",ja.prototype.base);return new mxPoint(x.x+v*x.width,x.y+x.height-p)},function(x,p){mxUtils.getValue(this.state.style,"base",ja.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(x.height,x.y+x.height-p.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),gb(c,["position2"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ja.prototype.position2)));
-return new mxPoint(x.x+p*x.width,x.y+x.height)},function(x,p){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),gb(c,["base"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position))),A=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"base",ja.prototype.base)));return new mxPoint(x.x+Math.min(x.width,
-v*x.width+A),x.y+x.height-p)},function(x,p){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(x.width,p.x-x.x-v*x.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},internalStorage:function(c){var l=[gb(c,["dx","dy"],function(x){var p=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"dx",Va.prototype.dx))),v=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,
-"dy",Va.prototype.dy)));return new mxPoint(x.x+p,x.y+v)},function(x,p){this.state.style.dx=Math.round(Math.max(0,Math.min(x.width,p.x-x.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(x.height,p.y-x.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},module:function(c){return[gb(c,["jettyWidth","jettyHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",wa.prototype.jettyWidth))),p=Math.max(0,Math.min(l.height,
-mxUtils.getValue(this.state.style,"jettyHeight",wa.prototype.jettyHeight)));return new mxPoint(l.x+x/2,l.y+2*p)},function(l,x){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y))/2)})]},corner:function(c){return[gb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Ja.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,
-"dy",Ja.prototype.dy)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},tee:function(c){return[gb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Wa.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Wa.prototype.dy)));return new mxPoint(l.x+(l.width+x)/2,l.y+p)},function(l,
-x){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,x.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},singleArrow:tb(1),doubleArrow:tb(.5),folder:function(c){return[gb(c,["tabWidth","tabHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",C.prototype.tabWidth))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",C.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(x=l.width-x);return new mxPoint(l.x+x,l.y+p)},function(l,x){var p=Math.max(0,Math.min(l.width,x.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(p=l.width-p);this.state.style.tabWidth=Math.round(p);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},document:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",da.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},tape:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x*l.height/2)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(x.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[gb(c,
-["isoAngle"],function(l){var x=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",m.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(x),.5*l.height))},function(l,x){this.state.style.isoAngle=Math.max(0,50*(x.y-l.y)/l.height)},!0)]},cylinder2:vb(q.prototype.size),cylinder3:vb(y.prototype.size),offPageConnector:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ia.prototype.size))));
+c.view.graph;if(!mxEvent.isShiftDown(p.getEvent())&&!mxEvent.isControlDown(p.getEvent())&&(v.isTableRow(c.cell)||v.isTableCell(c.cell))){p=v.getSwimlaneDirection(c.style);var A=v.model.getParent(c.cell);A=v.model.getChildCells(A,!0);for(var B=[],fa=0;fa<A.length;fa++)A[fa]!=c.cell&&v.isSwimlane(A[fa])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[fa]))==p&&B.push(A[fa]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:tb(),ext:tb(),rectangle:tb(),
+triangle:tb(),rhombus:tb(),umlLifeline:function(c){return[ib(c,["size"],function(l){var x=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},umlFrame:function(c){return[ib(c,["width","height"],function(l){var x=Math.max(W.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",W.prototype.width))),
+p=Math.max(1.5*W.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",W.prototype.height)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.width=Math.round(Math.max(W.prototype.corner,Math.min(l.width,x.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*W.prototype.corner,Math.min(l.height,x.y-l.y)))},!1)]},process:function(c){var l=[ib(c,["size"],function(x){var p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,
+"size",ea.prototype.size));return p?new mxPoint(x.x+v,x.y+x.height/4):new mxPoint(x.x+x.width*v,x.y+x.height/4)},function(x,p){x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*x.width,p.x-x.x)):Math.max(0,Math.min(.5,(p.x-x.x)/x.width));this.state.style.size=x},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(lb(c));return l},cross:function(c){return[ib(c,["size"],function(l){var x=Math.min(l.width,l.height);x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",Ma.prototype.size)))*x/2;return new mxPoint(l.getCenterX()-x,l.getCenterY()-x)},function(l,x){var p=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-x.y)/p*2,Math.max(0,l.getCenterX()-x.x)/p*2)))})]},note:function(c){return[ib(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=
+Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},note2:function(c){return[ib(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},manualInput:function(c){var l=[ib(c,["size"],function(x){var p=
+Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Qa.prototype.size)));return new mxPoint(x.x+x.width/4,x.y+3*p/4)},function(x,p){this.state.style.size=Math.round(Math.max(0,Math.min(x.height,4*(p.y-x.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(lb(c));return l},dataStorage:function(c){return[ib(c,["size"],function(l){var x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",x?L.prototype.fixedSize:
+L.prototype.size));return new mxPoint(l.x+l.width-p*(x?1:l.width),l.getCenterY())},function(l,x){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-x.x)):Math.max(0,Math.min(1,(l.x+l.width-x.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[ib(c,["size","position"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"position",ja.prototype.position)));mxUtils.getValue(this.state.style,"base",ja.prototype.base);return new mxPoint(x.x+v*x.width,x.y+x.height-p)},function(x,p){mxUtils.getValue(this.state.style,"base",ja.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(x.height,x.y+x.height-p.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),ib(c,["position2"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ja.prototype.position2)));
+return new mxPoint(x.x+p*x.width,x.y+x.height)},function(x,p){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),ib(c,["base"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position))),A=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"base",ja.prototype.base)));return new mxPoint(x.x+Math.min(x.width,
+v*x.width+A),x.y+x.height-p)},function(x,p){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(x.width,p.x-x.x-v*x.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(lb(c));return l},internalStorage:function(c){var l=[ib(c,["dx","dy"],function(x){var p=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),v=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,
+"dy",Za.prototype.dy)));return new mxPoint(x.x+p,x.y+v)},function(x,p){this.state.style.dx=Math.round(Math.max(0,Math.min(x.width,p.x-x.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(x.height,p.y-x.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(lb(c));return l},module:function(c){return[ib(c,["jettyWidth","jettyHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",va.prototype.jettyWidth))),p=Math.max(0,Math.min(l.height,
+mxUtils.getValue(this.state.style,"jettyHeight",va.prototype.jettyHeight)));return new mxPoint(l.x+x/2,l.y+2*p)},function(l,x){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y))/2)})]},corner:function(c){return[ib(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",cb.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,
+"dy",cb.prototype.dy)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},tee:function(c){return[ib(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Ua.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Ua.prototype.dy)));return new mxPoint(l.x+(l.width+x)/2,l.y+p)},function(l,
+x){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,x.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},singleArrow:ob(1),doubleArrow:ob(.5),folder:function(c){return[ib(c,["tabWidth","tabHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",C.prototype.tabWidth))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",C.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(x=l.width-x);return new mxPoint(l.x+x,l.y+p)},function(l,x){var p=Math.max(0,Math.min(l.width,x.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(p=l.width-p);this.state.style.tabWidth=Math.round(p);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},document:function(c){return[ib(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",da.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},tape:function(c){return[ib(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x*l.height/2)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(x.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[ib(c,
+["isoAngle"],function(l){var x=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",m.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(x),.5*l.height))},function(l,x){this.state.style.isoAngle=Math.max(0,50*(x.y-l.y)/l.height)},!0)]},cylinder2:vb(q.prototype.size),cylinder3:vb(y.prototype.size),offPageConnector:function(c){return[ib(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ha.prototype.size))));
return new mxPoint(l.getCenterX(),l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(x){var p=Math.max(0,Math.min(x.width/2,x.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(x.x+p,x.y+p)},function(x,p){this.state.style.size=Math.round(100*Math.max(0,Math.min(x.height/2,x.width/2,p.x-x.x)))/100})];c=Graph.createHandle(c,
-["indent"],function(x){var p=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(x.x+.75*x.width,x.y+p*x.height/200)},function(x,p){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(p.y-x.y)/x.height)))/100});l.push(c);return l},step:Ab(U.prototype.size,!0,null,!0,U.prototype.fixedSize),hexagon:Ab(I.prototype.size,!0,.5,!0,I.prototype.fixedSize),curlyBracket:Ab(pa.prototype.size,!1),display:Ab(ua.prototype.size,!1),cube:qb(1,
-n.prototype.size,!1),card:qb(.5,G.prototype.size,!0),loopLimit:qb(.5,ca.prototype.size,!0),trapezoid:Bb(.5,Y.prototype.size,Y.prototype.fixedSize),parallelogram:Bb(1,ba.prototype.size,ba.prototype.fixedSize)};Graph.createHandle=gb;Graph.handleFactory=lb;var wb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=wb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
-null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=lb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=lb[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
-c=lb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var rb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);rb=mxUtils.getRotatedPoint(rb,Math.cos(zb),Math.sin(zb));var yb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,x,p,v){var A=c.view;p=null!=p&&0<p.length?p[0]:null;var B=c.absolutePoints,ha=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
-null==ha&&null!=l&&(ha=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var K=rb.x,xa=rb.y,ma=xb.x,ab=xb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ha){c=function(Da,Ia,Ha){Da-=fb.x;var Fa=Ia-fb.y;Ia=(ab*Da-ma*Fa)/(K*ab-xa*ma);Da=(xa*Da-K*Fa)/(xa*ma-K*ab);jb?(Ha&&(fb=new mxPoint(fb.x+K*Ia,fb.y+xa*Ia),v.push(fb)),fb=new mxPoint(fb.x+ma*Da,fb.y+ab*Da)):(Ha&&(fb=new mxPoint(fb.x+ma*Da,fb.y+ab*Da),v.push(fb)),
-fb=new mxPoint(fb.x+K*Ia,fb.y+xa*Ia));v.push(fb)};var fb=ha;null==p&&(p=new mxPoint(ha.x+(B.x-ha.x)/2,ha.y+(B.y-ha.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var ob=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return ob.apply(this,arguments)};t.prototype.constraints=[];E.prototype.getConstraints=
+["indent"],function(x){var p=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(x.x+.75*x.width,x.y+p*x.height/200)},function(x,p){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(p.y-x.y)/x.height)))/100});l.push(c);return l},step:Ab(U.prototype.size,!0,null,!0,U.prototype.fixedSize),hexagon:Ab(J.prototype.size,!0,.5,!0,J.prototype.fixedSize),curlyBracket:Ab(pa.prototype.size,!1),display:Ab(ua.prototype.size,!1),cube:qb(1,
+n.prototype.size,!1),card:qb(.5,G.prototype.size,!0),loopLimit:qb(.5,ca.prototype.size,!0),trapezoid:Bb(.5,Y.prototype.size,Y.prototype.fixedSize),parallelogram:Bb(1,ba.prototype.size,ba.prototype.fixedSize)};Graph.createHandle=ib;Graph.handleFactory=mb;var wb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=wb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
+null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=mb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=mb[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
+c=mb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var rb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);rb=mxUtils.getRotatedPoint(rb,Math.cos(zb),Math.sin(zb));var yb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,x,p,v){var A=c.view;p=null!=p&&0<p.length?p[0]:null;var B=c.absolutePoints,fa=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
+null==fa&&null!=l&&(fa=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var K=rb.x,wa=rb.y,ma=xb.x,bb=xb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=fa){c=function(Ea,Ja,Ia){Ea-=eb.x;var Ha=Ja-eb.y;Ja=(bb*Ea-ma*Ha)/(K*bb-wa*ma);Ea=(wa*Ea-K*Ha)/(wa*ma-K*bb);jb?(Ia&&(eb=new mxPoint(eb.x+K*Ja,eb.y+wa*Ja),v.push(eb)),eb=new mxPoint(eb.x+ma*Ea,eb.y+bb*Ea)):(Ia&&(eb=new mxPoint(eb.x+ma*Ea,eb.y+bb*Ea),v.push(eb)),
+eb=new mxPoint(eb.x+K*Ja,eb.y+wa*Ja));v.push(eb)};var eb=fa;null==p&&(p=new mxPoint(fa.x+(B.x-fa.x)/2,fa.y+(B.y-fa.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var pb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return pb.apply(this,arguments)};t.prototype.constraints=[];E.prototype.getConstraints=
function(c,l,x){c=[];var p=Math.tan(mxUtils.toRadians(30)),v=(.5-p)/2;p=Math.min(l,x/(.5+p));l=(l-p)/2;x=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*p,x+p*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+p,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+p,x+.75*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*p,x+(1-v)*p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,x+.75*p));return c};m.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;p=Math.min(l*Math.tan(p),.5*x);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x-p));c.push(new mxConnectionConstraint(new mxPoint(.5,
1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));return c};ja.prototype.getConstraints=function(c,l,x){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var p=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=l*Math.max(0,
@@ -2897,14 +2897,14 @@ mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwim
function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Va.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;ra.prototype.constraints=mxEllipse.prototype.constraints;
-qa.prototype.constraints=mxEllipse.prototype.constraints;Qa.prototype.constraints=mxEllipse.prototype.constraints;Ta.prototype.constraints=mxRectangleShape.prototype.constraints;Ua.prototype.constraints=mxRectangleShape.prototype.constraints;ua.prototype.getConstraints=function(c,l,x){c=[];var p=Math.min(l,x/2),v=Math.min(l-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};wa.prototype.getConstraints=function(c,l,x){l=parseFloat(mxUtils.getValue(c,
-"jettyWidth",wa.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",wa.prototype.jettyHeight));var p=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Za.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;oa.prototype.constraints=mxEllipse.prototype.constraints;ra.prototype.constraints=mxEllipse.prototype.constraints;
+qa.prototype.constraints=mxEllipse.prototype.constraints;Oa.prototype.constraints=mxEllipse.prototype.constraints;Qa.prototype.constraints=mxRectangleShape.prototype.constraints;Ta.prototype.constraints=mxRectangleShape.prototype.constraints;ua.prototype.getConstraints=function(c,l,x){c=[];var p=Math.min(l,x/2),v=Math.min(l-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};va.prototype.getConstraints=function(c,l,x){l=parseFloat(mxUtils.getValue(c,
+"jettyWidth",va.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",va.prototype.jettyHeight));var p=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,3.5*c))];x>5*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));x>8*c&&p.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,l));x>15*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return p};ca.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
-.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!1,null,l));x>15*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return p};ca.prototype.constraints=mxRectangleShape.prototype.constraints;ha.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
+.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];F.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
@@ -2914,20 +2914,20 @@ qa.prototype.constraints=mxEllipse.prototype.constraints;Qa.prototype.constraint
.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];ba.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Wa.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Ua.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l+p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};Ja.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};cb.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return c};bb.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];$a.prototype.getConstraints=
+1),!1));return c};Ka.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];$a.prototype.getConstraints=
function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));return c};z.prototype.getConstraints=function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};La.prototype.getConstraints=
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};Ma.prototype.getConstraints=
function(c,l,x){c=[];var p=Math.min(x,l),v=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(x-v)/2;var A=p+v,B=(l-v)/2;v=B+v;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,v,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+v),p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+v),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,p));return c};N.prototype.constraints=null;M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];oa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+.9),!1)];S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
Actions.prototype.init=function(){function b(g){t.escape();g=t.deleteCells(t.getDeletableCells(t.getSelectionCells()),g);null!=g&&t.setSelectionCells(g)}function e(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{for(var g=t.getSelectionCells(),m=0;m<g.length;m++)t.cellLabelChanged(g[m],"")}finally{t.getModel().endUpdate()}}}function k(g,m,q,y,F){F.getModel().beginUpdate();try{var C=F.getCellGeometry(g);null!=C&&q&&y&&(q/=y,C=C.clone(),1<q?C.height=C.width/q:C.width=C.height*q,F.getModel().setGeometry(g,
C));F.setCellStyles(mxConstants.STYLE_CLIP_PATH,m,[g]);F.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[g])}finally{F.getModel().endUpdate()}}var n=this.editorUi,D=n.editor,t=D.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&t.isEnabled()};this.addAction("new...",function(){t.openLink(n.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";n.openFile()});this.addAction("smartFit",function(){t.popupMenuHandler.hideMenu();var g=t.view.scale,
@@ -3103,56 +3103,56 @@ IMAGE_PATH+"/img-lo-res.png";Editor.cameraImage="data:image/svg+xml;base64,PHN2Z
Editor.tagsImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjE4cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE4cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMjEuNDEsMTEuNDFsLTguODMtOC44M0MxMi4yMSwyLjIxLDExLjcsMiwxMS4xNywySDRDMi45LDIsMiwyLjksMiw0djcuMTdjMCwwLjUzLDAuMjEsMS4wNCwwLjU5LDEuNDFsOC44Myw4LjgzIGMwLjc4LDAuNzgsMi4wNSwwLjc4LDIuODMsMGw3LjE3LTcuMTdDMjIuMiwxMy40NiwyMi4yLDEyLjIsMjEuNDEsMTEuNDF6IE0xMi44MywyMEw0LDExLjE3VjRoNy4xN0wyMCwxMi44M0wxMi44MywyMHoiLz48Y2lyY2xlIGN4PSI2LjUiIGN5PSI2LjUiIHI9IjEuNSIvPjwvZz48L2c+PC9zdmc+";
Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;
-Editor.enableExportUrl=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(u){u.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"enumerate","0")}},
-{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(u,J){return"1"!=mxUtils.getValue(u.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"comic","0")||"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},
-{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,
-"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(u,
-J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",
-type:"int",defVal:-1,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+Editor.enableExportUrl=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(u){u.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"enumerate","0")}},
+{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(u,I){return"1"!=mxUtils.getValue(u.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"comic","0")||"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},
+{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,
+"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(u,
+I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",
+type:"int",defVal:-1,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",
dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(u){return"orthogonalEdgeStyle"==mxUtils.getValue(u.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",
type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",
dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);
-Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(u,J){J=J.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&J.isTableCell(u.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(u,J){J=J.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&J.isTableCell(u.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(u,
-J){u=J.editorUi.editor.graph.getCellStyle(1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null);return"1"==mxUtils.getValue(u,"resizeLastRow","0")},isVisible:function(u,J){J=J.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&J.isTable(u.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(u,J){u=J.editorUi.editor.graph.getCellStyle(1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null);return"1"==mxUtils.getValue(u,"resizeLast",
-"0")},isVisible:function(u,J){J=J.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&J.isTable(u.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},
+Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(u,I){I=I.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&I.isTableCell(u.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(u,I){I=I.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&I.isTableCell(u.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(u,
+I){u=I.editorUi.editor.graph.getCellStyle(1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null);return"1"==mxUtils.getValue(u,"resizeLastRow","0")},isVisible:function(u,I){I=I.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&I.isTable(u.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(u,I){u=I.editorUi.editor.graph.getCellStyle(1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null);return"1"==mxUtils.getValue(u,"resizeLast",
+"0")},isVisible:function(u,I){I=I.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&I.isTable(u.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},
{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},
-{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(u,J){return J.editorUi.editor.graph.isCellConnectable(0<u.vertices.length&&0==u.edges.length?u.vertices[0]:null)},isVisible:function(u,J){return 0<u.vertices.length&&0==u.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
+{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(u,I){return I.editorUi.editor.graph.isCellConnectable(0<u.vertices.length&&0==u.edges.length?u.vertices[0]:null)},isVisible:function(u,I){return 0<u.vertices.length&&0==u.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",
-dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(u,J){return 1==u.vertices.length&&0==u.edges.length}},
-{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(u,J){u=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;J=J.editorUi.editor.graph;return null!=u&&(J.isSwimlane(u)||0<J.model.getChildCount(u))},isVisible:function(u,J){return 1==u.vertices.length&&0==u.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(u,J){var N=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;J=J.editorUi.editor.graph;return null!=N&&(J.isContainer(N)&&
-"0"!=u.style.collapsible||!J.isContainer(N)&&"1"==u.style.collapsible)},isVisible:function(u,J){return 1==u.vertices.length&&0==u.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(u,J){return 1==u.vertices.length&&0==u.edges.length&&!J.editorUi.editor.graph.isSwimlane(u.vertices[0])&&null==mxUtils.getValue(u.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,
-isVisible:function(u,J){J=J.editorUi.editor.graph.model;return 0<u.vertices.length?J.isVertex(J.getParent(u.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(u,J){u=0<u.vertices.length?
-J.editorUi.editor.graph.getCellGeometry(u.vertices[0]):null;return null!=u&&!u.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",
-type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(u,J){var N=mxUtils.getValue(u.style,mxConstants.STYLE_FILLCOLOR,null);return J.editorUi.editor.graph.isSwimlane(u.vertices[0])||null==N||N==mxConstants.NONE||0==mxUtils.getValue(u.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(u.style,mxConstants.STYLE_OPACITY,100)||null!=u.style.pointerEvents}},{name:"moveCells",
-dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(u,J){return 0<u.vertices.length&&J.editorUi.editor.graph.isContainer(u.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(u){var J=rough.canvas({getContext:function(){return u}});J.draw=function(N){var W=N.sets||[];N=N.options||this.getDefaultOptions();for(var T=0;T<W.length;T++){var Q=W[T];switch(Q.type){case "path":null!=N.stroke&&this._drawToContext(u,Q,N);break;case "fillPath":this._drawToContext(u,Q,N);break;case "fillSketch":this.fillSketch(u,Q,N)}}};J.fillSketch=function(N,W,T){var Q=u.state.strokeColor,Z=u.state.strokeWidth,oa=u.state.strokeAlpha,wa=u.state.dashed,Aa=T.fillWeight;
-0>Aa&&(Aa=T.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(T.fill||"");u.setStrokeWidth(Aa);u.setDashed(!1);this._drawToContext(N,W,T);u.setDashed(wa);u.setStrokeWidth(Z);u.setStrokeColor(Q);u.setStrokeAlpha(oa)};J._drawToContext=function(N,W,T){N.begin();for(var Q=0;Q<W.ops.length;Q++){var Z=W.ops[Q],oa=Z.data;switch(Z.op){case "move":N.moveTo(oa[0],oa[1]);break;case "bcurveTo":N.curveTo(oa[0],oa[1],oa[2],oa[3],oa[4],oa[5]);break;case "lineTo":N.lineTo(oa[0],oa[1])}}N.end();
-"fillPath"===W.type&&T.filled?N.fill():N.stroke()};return J};(function(){function u(Q,Z,oa){this.canvas=Q;this.rc=Z;this.shape=oa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,u.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,u.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,u.prototype.rect);this.originalRoundrect=this.canvas.roundrect;
+dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(u,I){return 1==u.vertices.length&&0==u.edges.length}},
+{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(u,I){u=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;I=I.editorUi.editor.graph;return null!=u&&(I.isSwimlane(u)||0<I.model.getChildCount(u))},isVisible:function(u,I){return 1==u.vertices.length&&0==u.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(u,I){var N=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;I=I.editorUi.editor.graph;return null!=N&&(I.isContainer(N)&&
+"0"!=u.style.collapsible||!I.isContainer(N)&&"1"==u.style.collapsible)},isVisible:function(u,I){return 1==u.vertices.length&&0==u.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(u,I){return 1==u.vertices.length&&0==u.edges.length&&!I.editorUi.editor.graph.isSwimlane(u.vertices[0])&&null==mxUtils.getValue(u.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,
+isVisible:function(u,I){I=I.editorUi.editor.graph.model;return 0<u.vertices.length?I.isVertex(I.getParent(u.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(u,I){u=0<u.vertices.length?
+I.editorUi.editor.graph.getCellGeometry(u.vertices[0]):null;return null!=u&&!u.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",
+type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(u,I){var N=mxUtils.getValue(u.style,mxConstants.STYLE_FILLCOLOR,null);return I.editorUi.editor.graph.isSwimlane(u.vertices[0])||null==N||N==mxConstants.NONE||0==mxUtils.getValue(u.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(u.style,mxConstants.STYLE_OPACITY,100)||null!=u.style.pointerEvents}},{name:"moveCells",
+dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(u,I){return 0<u.vertices.length&&I.editorUi.editor.graph.isContainer(u.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(u){var I=rough.canvas({getContext:function(){return u}});I.draw=function(N){var W=N.sets||[];N=N.options||this.getDefaultOptions();for(var T=0;T<W.length;T++){var Q=W[T];switch(Q.type){case "path":null!=N.stroke&&this._drawToContext(u,Q,N);break;case "fillPath":this._drawToContext(u,Q,N);break;case "fillSketch":this.fillSketch(u,Q,N)}}};I.fillSketch=function(N,W,T){var Q=u.state.strokeColor,Z=u.state.strokeWidth,na=u.state.strokeAlpha,va=u.state.dashed,Ba=T.fillWeight;
+0>Ba&&(Ba=T.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(T.fill||"");u.setStrokeWidth(Ba);u.setDashed(!1);this._drawToContext(N,W,T);u.setDashed(va);u.setStrokeWidth(Z);u.setStrokeColor(Q);u.setStrokeAlpha(na)};I._drawToContext=function(N,W,T){N.begin();for(var Q=0;Q<W.ops.length;Q++){var Z=W.ops[Q],na=Z.data;switch(Z.op){case "move":N.moveTo(na[0],na[1]);break;case "bcurveTo":N.curveTo(na[0],na[1],na[2],na[3],na[4],na[5]);break;case "lineTo":N.lineTo(na[0],na[1])}}N.end();
+"fillPath"===W.type&&T.filled?N.fill():N.stroke()};return I};(function(){function u(Q,Z,na){this.canvas=Q;this.rc=Z;this.shape=na;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,u.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,u.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,u.prototype.rect);this.originalRoundrect=this.canvas.roundrect;
this.canvas.roundrect=mxUtils.bind(this,u.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,u.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,u.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,u.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,u.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
mxUtils.bind(this,u.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,u.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,u.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,u.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,u.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,
-u.prototype.fillAndStroke);this.path=[];this.passThrough=!1}u.prototype.moveOp="M";u.prototype.lineOp="L";u.prototype.quadOp="Q";u.prototype.curveOp="C";u.prototype.closeOp="Z";u.prototype.getStyle=function(Q,Z){var oa=1;if(null!=this.shape.state){var wa=this.shape.state.cell.id;if(null!=wa)for(var Aa=0;Aa<wa.length;Aa++)oa=(oa<<5)-oa+wa.charCodeAt(Aa)<<0}oa={strokeWidth:this.canvas.state.strokeWidth,seed:oa,preserveVertices:!0};wa=this.rc.getDefaultOptions();oa.stroke=Q?this.canvas.state.strokeColor===
-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;Q=null;(oa.filled=Z)?(oa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Q=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):oa.fill="";oa.bowing=mxUtils.getValue(this.shape.style,"bowing",wa.bowing);oa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",wa.hachureAngle);oa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",wa.curveFitting);
-oa.roughness=mxUtils.getValue(this.shape.style,"jiggle",wa.roughness);oa.simplification=mxUtils.getValue(this.shape.style,"simplification",wa.simplification);oa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",wa.disableMultiStroke);oa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",wa.disableMultiStrokeFill);Z=mxUtils.getValue(this.shape.style,"hachureGap",-1);oa.hachureGap="auto"==Z?-1:Z;oa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
-Z);oa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",Z);oa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",Z);Z=mxUtils.getValue(this.shape.style,"fillWeight",-1);oa.fillWeight="auto"==Z?-1:Z;Z=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==Z&&(Z=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),Z=null!=oa.fill&&(null!=Q||null!=Z&&oa.fill==Z)?"solid":wa.fillStyle);oa.fillStyle=
-Z;return oa};u.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};u.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};u.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Q=2;Q<arguments.length;Q+=2)this.lastX=arguments[Q-1],this.lastY=arguments[Q],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};u.prototype.lineTo=
-function(Q,Z){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,Q,Z),this.lastX=Q,this.lastY=Z)};u.prototype.moveTo=function(Q,Z){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,Z),this.lastX=Q,this.lastY=Z,this.firstX=Q,this.firstY=Z)};u.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};u.prototype.quadTo=function(Q,Z,oa,wa){this.passThrough?this.originalQuadTo.apply(this.canvas,
-arguments):(this.addOp(this.quadOp,Q,Z,oa,wa),this.lastX=oa,this.lastY=wa)};u.prototype.curveTo=function(Q,Z,oa,wa,Aa,ta){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,Z,oa,wa,Aa,ta),this.lastX=Aa,this.lastY=ta)};u.prototype.arcTo=function(Q,Z,oa,wa,Aa,ta,Ba){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var va=mxUtils.arcToCurves(this.lastX,this.lastY,Q,Z,oa,wa,Aa,ta,Ba);if(null!=va)for(var Oa=0;Oa<va.length;Oa+=6)this.curveTo(va[Oa],
-va[Oa+1],va[Oa+2],va[Oa+3],va[Oa+4],va[Oa+5]);this.lastX=ta;this.lastY=Ba}};u.prototype.rect=function(Q,Z,oa,wa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,Z,oa,wa,this.getStyle(!0,!0)))};u.prototype.ellipse=function(Q,Z,oa,wa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+oa/2,Z+wa/2,oa,wa,this.getStyle(!0,!0)))};u.prototype.roundrect=function(Q,
-Z,oa,wa,Aa,ta){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(Q+Aa,Z),this.lineTo(Q+oa-Aa,Z),this.quadTo(Q+oa,Z,Q+oa,Z+ta),this.lineTo(Q+oa,Z+wa-ta),this.quadTo(Q+oa,Z+wa,Q+oa-Aa,Z+wa),this.lineTo(Q+Aa,Z+wa),this.quadTo(Q,Z+wa,Q,Z+wa-ta),this.lineTo(Q,Z+ta),this.quadTo(Q,Z,Q+Aa,Z))};u.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(oa){}this.passThrough=!1}else if(null!=this.nextShape){for(var Z in Q)this.nextShape.options[Z]=
+u.prototype.fillAndStroke);this.path=[];this.passThrough=!1}u.prototype.moveOp="M";u.prototype.lineOp="L";u.prototype.quadOp="Q";u.prototype.curveOp="C";u.prototype.closeOp="Z";u.prototype.getStyle=function(Q,Z){var na=1;if(null!=this.shape.state){var va=this.shape.state.cell.id;if(null!=va)for(var Ba=0;Ba<va.length;Ba++)na=(na<<5)-na+va.charCodeAt(Ba)<<0}na={strokeWidth:this.canvas.state.strokeWidth,seed:na,preserveVertices:!0};va=this.rc.getDefaultOptions();na.stroke=Q?this.canvas.state.strokeColor===
+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;Q=null;(na.filled=Z)?(na.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Q=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):na.fill="";na.bowing=mxUtils.getValue(this.shape.style,"bowing",va.bowing);na.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",va.hachureAngle);na.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",va.curveFitting);
+na.roughness=mxUtils.getValue(this.shape.style,"jiggle",va.roughness);na.simplification=mxUtils.getValue(this.shape.style,"simplification",va.simplification);na.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",va.disableMultiStroke);na.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",va.disableMultiStrokeFill);Z=mxUtils.getValue(this.shape.style,"hachureGap",-1);na.hachureGap="auto"==Z?-1:Z;na.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
+Z);na.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",Z);na.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",Z);Z=mxUtils.getValue(this.shape.style,"fillWeight",-1);na.fillWeight="auto"==Z?-1:Z;Z=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==Z&&(Z=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),Z=null!=na.fill&&(null!=Q||null!=Z&&na.fill==Z)?"solid":va.fillStyle);na.fillStyle=
+Z;return na};u.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};u.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};u.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Q=2;Q<arguments.length;Q+=2)this.lastX=arguments[Q-1],this.lastY=arguments[Q],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};u.prototype.lineTo=
+function(Q,Z){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,Q,Z),this.lastX=Q,this.lastY=Z)};u.prototype.moveTo=function(Q,Z){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,Z),this.lastX=Q,this.lastY=Z,this.firstX=Q,this.firstY=Z)};u.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};u.prototype.quadTo=function(Q,Z,na,va){this.passThrough?this.originalQuadTo.apply(this.canvas,
+arguments):(this.addOp(this.quadOp,Q,Z,na,va),this.lastX=na,this.lastY=va)};u.prototype.curveTo=function(Q,Z,na,va,Ba,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,Z,na,va,Ba,sa),this.lastX=Ba,this.lastY=sa)};u.prototype.arcTo=function(Q,Z,na,va,Ba,sa,Da){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Aa=mxUtils.arcToCurves(this.lastX,this.lastY,Q,Z,na,va,Ba,sa,Da);if(null!=Aa)for(var za=0;za<Aa.length;za+=6)this.curveTo(Aa[za],
+Aa[za+1],Aa[za+2],Aa[za+3],Aa[za+4],Aa[za+5]);this.lastX=sa;this.lastY=Da}};u.prototype.rect=function(Q,Z,na,va){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,Z,na,va,this.getStyle(!0,!0)))};u.prototype.ellipse=function(Q,Z,na,va){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+na/2,Z+va/2,na,va,this.getStyle(!0,!0)))};u.prototype.roundrect=function(Q,
+Z,na,va,Ba,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(Q+Ba,Z),this.lineTo(Q+na-Ba,Z),this.quadTo(Q+na,Z,Q+na,Z+sa),this.lineTo(Q+na,Z+va-sa),this.quadTo(Q+na,Z+va,Q+na-Ba,Z+va),this.lineTo(Q+Ba,Z+va),this.quadTo(Q,Z+va,Q,Z+va-sa),this.lineTo(Q,Z+sa),this.quadTo(Q,Z,Q+Ba,Z))};u.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(na){}this.passThrough=!1}else if(null!=this.nextShape){for(var Z in Q)this.nextShape.options[Z]=
Q[Z];Q.stroke!=mxConstants.NONE&&null!=Q.stroke||delete this.nextShape.options.stroke;Q.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};u.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};u.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};u.prototype.fillAndStroke=function(){this.passThrough?
this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};u.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;
-this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new u(Q,Editor.createRoughCanvas(Q),this)};var J=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?J.apply(this,arguments):"comic"==mxUtils.getValue(this.style,
-"sketchStyle","rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var N=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,Z,oa,wa,Aa){null!=Q.handJiggle&&Q.handJiggle.passThrough||N.apply(this,arguments)};var W=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var Z=Q.addTolerance,oa=!0;null!=this.style&&(oa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==u&&!this.outline){Q.save();
-var wa=this.fill,Aa=this.stroke;this.stroke=this.fill=null;var ta=this.configurePointerEvents,Ba=Q.setStrokeColor;Q.setStrokeColor=function(){};var va=Q.setFillColor;Q.setFillColor=function(){};oa||null==wa||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;W.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=va;Q.setStrokeColor=Ba;this.configurePointerEvents=ta;this.stroke=Aa;this.fill=wa;Q.restore();oa&&null!=wa&&(Q.addTolerance=function(){})}W.apply(this,arguments);
-Q.addTolerance=Z};var T=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,Z,oa,wa,Aa,ta){null!=Q.handJiggle&&Q.handJiggle.constructor==u?(Q.handJiggle.passThrough=!0,T.apply(this,arguments),Q.handJiggle.passThrough=!1):T.apply(this,arguments)}})();Editor.fastCompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:Graph.arrayBufferToString(pako.deflateRaw(u))};Editor.fastDecompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?
-u:pako.inflateRaw(Graph.stringToArrayBuffer(atob(u)),{to:"string"})};Editor.extractGraphModel=function(u,J,N){if(null!=u&&"undefined"!==typeof pako){var W=u.ownerDocument.getElementsByTagName("div"),T=[];if(null!=W&&0<W.length)for(var Q=0;Q<W.length;Q++)if("mxgraph"==W[Q].getAttribute("class")){T.push(W[Q]);break}0<T.length&&(W=T[0].getAttribute("data-mxgraph"),null!=W?(T=JSON.parse(W),null!=T&&null!=T.xml&&(u=mxUtils.parseXml(T.xml),u=u.documentElement)):(T=T[0].getElementsByTagName("div"),0<T.length&&
-(W=mxUtils.getTextContent(T[0]),W=Graph.decompress(W,null,N),0<W.length&&(u=mxUtils.parseXml(W),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(W=u.getAttribute("content"),null!=W&&"<"!=W.charAt(0)&&"%"!=W.charAt(0)&&(W=unescape(window.atob?atob(W):Base64.decode(cont,W))),null!=W&&"%"==W.charAt(0)&&(W=decodeURIComponent(W)),null!=W&&0<W.length)u=mxUtils.parseXml(W).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||J||(T=null,"diagram"==u.nodeName?T=u:"mxfile"==
-u.nodeName&&(W=u.getElementsByTagName("diagram"),0<W.length&&(T=W[Math.max(0,Math.min(W.length-1,urlParams.page||0))])),null!=T&&(u=Editor.parseDiagramNode(T,N)));null==u||"mxGraphModel"==u.nodeName||J&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,J){var N=mxUtils.trim(mxUtils.getTextContent(u)),W=null;0<N.length?(u=Graph.decompress(N,null,J),null!=u&&0<u.length&&(W=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(W=mxUtils.createXmlDocument(),
-W.appendChild(W.importNode(u[0],!0)),W=W.documentElement));return W};Editor.getDiagramNodeXml=function(u){var J=mxUtils.getTextContent(u),N=null;0<J.length?N=Graph.decompress(J):null!=u.firstChild&&(N=mxUtils.getXml(u.firstChild));return N};Editor.extractGraphModelFromPdf=function(u){u=u.substring(u.indexOf(",")+1);u=window.atob&&!mxClient.IS_SF?atob(u):Base64.decode(u,!0);if("%PDF-1.7"==u.substring(0,8)){var J=u.indexOf("EmbeddedFile");if(-1<J){var N=u.indexOf("stream",J)+9;if(0<u.substring(J,N).indexOf("application#2Fvnd.jgraph.mxfile"))return J=
-u.indexOf("endstream",N-1),pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(N,J)),{to:"string"})}return null}N=null;J="";for(var W=0,T=0,Q=[],Z=null;T<u.length;){var oa=u.charCodeAt(T);T+=1;10!=oa&&(J+=String.fromCharCode(oa));oa=="/Subject (%3Cmxfile".charCodeAt(W)?W++:W=0;if(19==W){var wa=u.indexOf("%3C%2Fmxfile%3E)",T)+15;T-=9;if(wa>T){N=u.substring(T,wa);break}}10==oa&&("endobj"==J?Z=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(Z=[],Q[J.split(" ")[0]]=Z):null!=Z&&
-Z.push(J),J="")}null==N&&(N=Editor.extractGraphModelFromXref(Q));null!=N&&(N=decodeURIComponent(N.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return N};Editor.extractGraphModelFromXref=function(u){var J=u.trailer,N=null;null!=J&&(J=/.* \/Info (\d+) (\d+) R/g.exec(J.join("\n")),null!=J&&0<J.length&&(J=u[J[1]],null!=J&&(J=/.* \/Subject (\d+) (\d+) R/g.exec(J.join("\n")),null!=J&&0<J.length&&(u=u[J[1]],null!=u&&(u=u.join("\n"),N=u.substring(1,u.length-1))))));return N};Editor.extractParserError=function(u,
-J){var N=null;u=null!=u?u.getElementsByTagName("parsererror"):null;null!=u&&0<u.length&&(N=J||mxResources.get("invalidChars"),J=u[0].getElementsByTagName("div"),0<J.length&&(N=mxUtils.getTextContent(J[0])));return null!=N?mxUtils.trim(N):N};Editor.addRetryToError=function(u,J){null!=u&&(u=null!=u.error?u.error:u,null==u.retry&&(u.retry=J))};Editor.configure=function(u,J){if(null!=u){Editor.config=u;Editor.configVersion=u.version;Menus.prototype.defaultFonts=u.defaultFonts||Menus.prototype.defaultFonts;
+this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new u(Q,Editor.createRoughCanvas(Q),this)};var I=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?I.apply(this,arguments):"comic"==mxUtils.getValue(this.style,
+"sketchStyle","rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var N=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,Z,na,va,Ba){null!=Q.handJiggle&&Q.handJiggle.passThrough||N.apply(this,arguments)};var W=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var Z=Q.addTolerance,na=!0;null!=this.style&&(na="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==u&&!this.outline){Q.save();
+var va=this.fill,Ba=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,Da=Q.setStrokeColor;Q.setStrokeColor=function(){};var Aa=Q.setFillColor;Q.setFillColor=function(){};na||null==va||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;W.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=Aa;Q.setStrokeColor=Da;this.configurePointerEvents=sa;this.stroke=Ba;this.fill=va;Q.restore();na&&null!=va&&(Q.addTolerance=function(){})}W.apply(this,arguments);
+Q.addTolerance=Z};var T=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,Z,na,va,Ba,sa){null!=Q.handJiggle&&Q.handJiggle.constructor==u?(Q.handJiggle.passThrough=!0,T.apply(this,arguments),Q.handJiggle.passThrough=!1):T.apply(this,arguments)}})();Editor.fastCompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:Graph.arrayBufferToString(pako.deflateRaw(u))};Editor.fastDecompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?
+u:pako.inflateRaw(Graph.stringToArrayBuffer(atob(u)),{to:"string"})};Editor.extractGraphModel=function(u,I,N){if(null!=u&&"undefined"!==typeof pako){var W=u.ownerDocument.getElementsByTagName("div"),T=[];if(null!=W&&0<W.length)for(var Q=0;Q<W.length;Q++)if("mxgraph"==W[Q].getAttribute("class")){T.push(W[Q]);break}0<T.length&&(W=T[0].getAttribute("data-mxgraph"),null!=W?(T=JSON.parse(W),null!=T&&null!=T.xml&&(u=mxUtils.parseXml(T.xml),u=u.documentElement)):(T=T[0].getElementsByTagName("div"),0<T.length&&
+(W=mxUtils.getTextContent(T[0]),W=Graph.decompress(W,null,N),0<W.length&&(u=mxUtils.parseXml(W),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(W=u.getAttribute("content"),null!=W&&"<"!=W.charAt(0)&&"%"!=W.charAt(0)&&(W=unescape(window.atob?atob(W):Base64.decode(cont,W))),null!=W&&"%"==W.charAt(0)&&(W=decodeURIComponent(W)),null!=W&&0<W.length)u=mxUtils.parseXml(W).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||I||(T=null,"diagram"==u.nodeName?T=u:"mxfile"==
+u.nodeName&&(W=u.getElementsByTagName("diagram"),0<W.length&&(T=W[Math.max(0,Math.min(W.length-1,urlParams.page||0))])),null!=T&&(u=Editor.parseDiagramNode(T,N)));null==u||"mxGraphModel"==u.nodeName||I&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,I){var N=mxUtils.trim(mxUtils.getTextContent(u)),W=null;0<N.length?(u=Graph.decompress(N,null,I),null!=u&&0<u.length&&(W=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(W=mxUtils.createXmlDocument(),
+W.appendChild(W.importNode(u[0],!0)),W=W.documentElement));return W};Editor.getDiagramNodeXml=function(u){var I=mxUtils.getTextContent(u),N=null;0<I.length?N=Graph.decompress(I):null!=u.firstChild&&(N=mxUtils.getXml(u.firstChild));return N};Editor.extractGraphModelFromPdf=function(u){u=u.substring(u.indexOf(",")+1);u=window.atob&&!mxClient.IS_SF?atob(u):Base64.decode(u,!0);if("%PDF-1.7"==u.substring(0,8)){var I=u.indexOf("EmbeddedFile");if(-1<I){var N=u.indexOf("stream",I)+9;if(0<u.substring(I,N).indexOf("application#2Fvnd.jgraph.mxfile"))return I=
+u.indexOf("endstream",N-1),pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(N,I)),{to:"string"})}return null}N=null;I="";for(var W=0,T=0,Q=[],Z=null;T<u.length;){var na=u.charCodeAt(T);T+=1;10!=na&&(I+=String.fromCharCode(na));na=="/Subject (%3Cmxfile".charCodeAt(W)?W++:W=0;if(19==W){var va=u.indexOf("%3C%2Fmxfile%3E)",T)+15;T-=9;if(va>T){N=u.substring(T,va);break}}10==na&&("endobj"==I?Z=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(Z=[],Q[I.split(" ")[0]]=Z):null!=Z&&
+Z.push(I),I="")}null==N&&(N=Editor.extractGraphModelFromXref(Q));null!=N&&(N=decodeURIComponent(N.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return N};Editor.extractGraphModelFromXref=function(u){var I=u.trailer,N=null;null!=I&&(I=/.* \/Info (\d+) (\d+) R/g.exec(I.join("\n")),null!=I&&0<I.length&&(I=u[I[1]],null!=I&&(I=/.* \/Subject (\d+) (\d+) R/g.exec(I.join("\n")),null!=I&&0<I.length&&(u=u[I[1]],null!=u&&(u=u.join("\n"),N=u.substring(1,u.length-1))))));return N};Editor.extractParserError=function(u,
+I){var N=null;u=null!=u?u.getElementsByTagName("parsererror"):null;null!=u&&0<u.length&&(N=I||mxResources.get("invalidChars"),I=u[0].getElementsByTagName("div"),0<I.length&&(N=mxUtils.getTextContent(I[0])));return null!=N?mxUtils.trim(N):N};Editor.addRetryToError=function(u,I){null!=u&&(u=null!=u.error?u.error:u,null==u.retry&&(u.retry=I))};Editor.configure=function(u,I){if(null!=u){Editor.config=u;Editor.configVersion=u.version;Menus.prototype.defaultFonts=u.defaultFonts||Menus.prototype.defaultFonts;
ColorDialog.prototype.presetColors=u.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=u.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=u.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=u.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=u.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=u.autosaveDelay||
DrawioFile.prototype.autosaveDelay;u.debug&&(urlParams.test="1");null!=u.templateFile&&(EditorUi.templateFile=u.templateFile);null!=u.styles&&(Array.isArray(u.styles)?Editor.styles=u.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=u.globalVars&&(Editor.globalVars=u.globalVars);null!=u.compressXml&&(Editor.compressXml=u.compressXml);null!=u.includeDiagram&&(Editor.defaultIncludeDiagram=u.includeDiagram);null!=u.simpleLabels&&(Editor.simpleLabels=u.simpleLabels);null!=
u.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=u.oneDriveInlinePicker);null!=u.darkColor&&(Editor.darkColor=u.darkColor);null!=u.lightColor&&(Editor.lightColor=u.lightColor);null!=u.settingsName&&(Editor.configurationKey="."+u.settingsName+"-configuration",Editor.settingsKey="."+u.settingsName+"-config",mxSettings.key=Editor.settingsKey);u.customFonts&&(Menus.prototype.defaultFonts=u.customFonts.concat(Menus.prototype.defaultFonts));u.customPresetColors&&(ColorDialog.prototype.presetColors=
@@ -3161,53 +3161,53 @@ u.enabledLibraries&&(Array.isArray(u.enabledLibraries)?Sidebar.prototype.enabled
u.defaultVertexStyle);null!=u.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=u.defaultEdgeStyle);null!=u.defaultPageVisible&&(Graph.prototype.defaultPageVisible=u.defaultPageVisible);null!=u.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=u.defaultGridEnabled);null!=u.zoomWheel&&(Graph.zoomWheel=u.zoomWheel);null!=u.zoomFactor&&(N=parseFloat(u.zoomFactor),!isNaN(N)&&1<N?Graph.prototype.zoomFactor=N:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=u.gridSteps&&
(N=parseInt(u.gridSteps),!isNaN(N)&&0<N?mxGraphView.prototype.gridSteps=N:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=u.pageFormat&&(N=parseInt(u.pageFormat.width),W=parseInt(u.pageFormat.height),!isNaN(N)&&0<N&&!isNaN(W)&&0<W?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,N,W),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));u.thumbWidth&&(Sidebar.prototype.thumbWidth=
u.thumbWidth);u.thumbHeight&&(Sidebar.prototype.thumbHeight=u.thumbHeight);u.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=u.emptyLibraryXml);u.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=u.emptyDiagramXml);u.sidebarWidth&&(EditorUi.prototype.hsplitPosition=u.sidebarWidth);u.sidebarTitles&&(Sidebar.prototype.sidebarTitles=u.sidebarTitles);u.sidebarTitleSize&&(N=parseInt(u.sidebarTitleSize),!isNaN(N)&&0<N?Sidebar.prototype.sidebarTitleSize=N:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));
-u.fontCss&&("string"===typeof u.fontCss?Editor.configureFontCss(u.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=u.autosaveDelay&&(N=parseInt(u.autosaveDelay),!isNaN(N)&&0<N?DrawioFile.prototype.autosaveDelay=N:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=u.plugins&&!J)for(App.initPluginCallback(),J=0;J<u.plugins.length;J++)mxscript(u.plugins[J]);null!=u.maxImageBytes&&(EditorUi.prototype.maxImageBytes=u.maxImageBytes);null!=
-u.maxImageSize&&(EditorUi.prototype.maxImageSize=u.maxImageSize);null!=u.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=u.shareCursorPosition);null!=u.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=u.showRemoteCursors)}};Editor.configureFontCss=function(u){if(null!=u){Editor.prototype.fontCss=u;var J=document.getElementsByTagName("script")[0];if(null!=J&&null!=J.parentNode){var N=document.createElement("style");N.setAttribute("type","text/css");N.appendChild(document.createTextNode(u));
-J.parentNode.insertBefore(N,J);u=u.split("url(");for(N=1;N<u.length;N++){var W=u[N].indexOf(")");W=Editor.trimCssUrl(u[N].substring(0,W));var T=document.createElement("link");T.setAttribute("rel","preload");T.setAttribute("href",W);T.setAttribute("as","font");T.setAttribute("crossorigin","");J.parentNode.insertBefore(T,J)}}}};Editor.trimCssUrl=function(u){return u.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";
-Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(u){u=null!=u?u:Editor.GUID_LENGTH;for(var J=[],N=0;N<u;N++)J.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return J.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=
-!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(u){u=null!=u&&"mxlibrary"!=u.nodeName?this.extractGraphModel(u):null;if(null!=u){var J=Editor.extractParserError(u,mxResources.get("invalidOrMissingFile"));if(J)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[u],"cause",[J]),Error(mxResources.get("notADiagramFile")+" ("+J+")");if("mxGraphModel"==u.nodeName){J=u.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=J&&""!=
-J)J!=this.graph.currentStyle&&(N=null!=this.graph.themes?this.graph.themes[J]:mxUtils.load(STYLE_PATH+"/"+J+".xml").getDocumentElement(),null!=N&&(W=new mxCodec(N.ownerDocument),W.decode(N,this.graph.getStylesheet())));else{var N=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=N){var W=new mxCodec(N.ownerDocument);W.decode(N,this.graph.getStylesheet())}}this.graph.currentStyle=J;this.graph.mathEnabled="1"==urlParams.math||
-"1"==u.getAttribute("math");J=u.getAttribute("backgroundImage");null!=J?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(J)):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==u.getAttribute("shadow"),!1);if(J=u.getAttribute("extFonts"))try{for(J=
-J.split("|").map(function(T){T=T.split("^");return{name:T[0],url:T[1]}}),N=0;N<J.length;N++)this.graph.addExtFont(J[N].name,J[N].url)}catch(T){console.log("ExtFonts format error: "+T.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(u,J){u=null!=
-u?u:!0;var N=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&N.setAttribute("style",this.graph.currentStyle);var W=this.graph.getBackgroundImageObject(this.graph.backgroundImage,J);null!=W&&N.setAttribute("backgroundImage",JSON.stringify(W));N.setAttribute("math",this.graph.mathEnabled?"1":"0");N.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(W=this.graph.extFonts.map(function(T){return T.name+
-"^"+T.url}),N.setAttribute("extFonts",W.join("|")));return N};Editor.prototype.isDataSvg=function(u){try{var J=mxUtils.parseXml(u).documentElement.getAttribute("content");if(null!=J&&(null!=J&&"<"!=J.charAt(0)&&"%"!=J.charAt(0)&&(J=unescape(window.atob?atob(J):Base64.decode(cont,J))),null!=J&&"%"==J.charAt(0)&&(J=decodeURIComponent(J)),null!=J&&0<J.length)){var N=mxUtils.parseXml(J).documentElement;return"mxfile"==N.nodeName||"mxGraphModel"==N.nodeName}}catch(W){}return!1};Editor.prototype.extractGraphModel=
-function(u,J,N){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};
+u.fontCss&&("string"===typeof u.fontCss?Editor.configureFontCss(u.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=u.autosaveDelay&&(N=parseInt(u.autosaveDelay),!isNaN(N)&&0<N?DrawioFile.prototype.autosaveDelay=N:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=u.plugins&&!I)for(App.initPluginCallback(),I=0;I<u.plugins.length;I++)mxscript(u.plugins[I]);null!=u.maxImageBytes&&(EditorUi.prototype.maxImageBytes=u.maxImageBytes);null!=
+u.maxImageSize&&(EditorUi.prototype.maxImageSize=u.maxImageSize);null!=u.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=u.shareCursorPosition);null!=u.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=u.showRemoteCursors)}};Editor.configureFontCss=function(u){if(null!=u){Editor.prototype.fontCss=u;var I=document.getElementsByTagName("script")[0];if(null!=I&&null!=I.parentNode){var N=document.createElement("style");N.setAttribute("type","text/css");N.appendChild(document.createTextNode(u));
+I.parentNode.insertBefore(N,I);u=u.split("url(");for(N=1;N<u.length;N++){var W=u[N].indexOf(")");W=Editor.trimCssUrl(u[N].substring(0,W));var T=document.createElement("link");T.setAttribute("rel","preload");T.setAttribute("href",W);T.setAttribute("as","font");T.setAttribute("crossorigin","");I.parentNode.insertBefore(T,I)}}}};Editor.trimCssUrl=function(u){return u.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";
+Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(u){u=null!=u?u:Editor.GUID_LENGTH;for(var I=[],N=0;N<u;N++)I.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return I.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=
+!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(u){u=null!=u&&"mxlibrary"!=u.nodeName?this.extractGraphModel(u):null;if(null!=u){var I=Editor.extractParserError(u,mxResources.get("invalidOrMissingFile"));if(I)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[u],"cause",[I]),Error(mxResources.get("notADiagramFile")+" ("+I+")");if("mxGraphModel"==u.nodeName){I=u.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=I&&""!=
+I)I!=this.graph.currentStyle&&(N=null!=this.graph.themes?this.graph.themes[I]:mxUtils.load(STYLE_PATH+"/"+I+".xml").getDocumentElement(),null!=N&&(W=new mxCodec(N.ownerDocument),W.decode(N,this.graph.getStylesheet())));else{var N=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=N){var W=new mxCodec(N.ownerDocument);W.decode(N,this.graph.getStylesheet())}}this.graph.currentStyle=I;this.graph.mathEnabled="1"==urlParams.math||
+"1"==u.getAttribute("math");I=u.getAttribute("backgroundImage");null!=I?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(I)):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==u.getAttribute("shadow"),!1);if(I=u.getAttribute("extFonts"))try{for(I=
+I.split("|").map(function(T){T=T.split("^");return{name:T[0],url:T[1]}}),N=0;N<I.length;N++)this.graph.addExtFont(I[N].name,I[N].url)}catch(T){console.log("ExtFonts format error: "+T.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(u,I){u=null!=
+u?u:!0;var N=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&N.setAttribute("style",this.graph.currentStyle);var W=this.graph.getBackgroundImageObject(this.graph.backgroundImage,I);null!=W&&N.setAttribute("backgroundImage",JSON.stringify(W));N.setAttribute("math",this.graph.mathEnabled?"1":"0");N.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(W=this.graph.extFonts.map(function(T){return T.name+
+"^"+T.url}),N.setAttribute("extFonts",W.join("|")));return N};Editor.prototype.isDataSvg=function(u){try{var I=mxUtils.parseXml(u).documentElement.getAttribute("content");if(null!=I&&(null!=I&&"<"!=I.charAt(0)&&"%"!=I.charAt(0)&&(I=unescape(window.atob?atob(I):Base64.decode(cont,I))),null!=I&&"%"==I.charAt(0)&&(I=decodeURIComponent(I)),null!=I&&0<I.length)){var N=mxUtils.parseXml(I).documentElement;return"mxfile"==N.nodeName||"mxGraphModel"==N.nodeName}}catch(W){}return!1};Editor.prototype.extractGraphModel=
+function(u,I,N){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};
var n=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){n.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";
-Editor.initMath=function(u,J){if("undefined"===typeof window.MathJax){u=(null!=u?u:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full,Safe";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(Z){window.setTimeout(function(){"hidden"!=Z.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,Z])},0)};var N=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";J=null!=J?J:{"HTML-CSS":{availableFonts:[N],imageFont:null},
-SVG:{font:N,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(J);MathJax.Hub.Register.StartupHook("Begin",function(){for(var Z=0;Z<Editor.mathJaxQueue.length;Z++)Editor.doMathJaxRender(Editor.mathJaxQueue[Z])})}};Editor.MathJaxRender=function(Z){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(Z):Editor.mathJaxQueue.push(Z)};
-Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var W=Editor.prototype.init;Editor.prototype.init=function(){W.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(Z,oa){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};N=document.getElementsByTagName("script");if(null!=N&&0<N.length){var T=document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",
+Editor.initMath=function(u,I){if("undefined"===typeof window.MathJax){u=(null!=u?u:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full,Safe";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(Z){window.setTimeout(function(){"hidden"!=Z.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,Z])},0)};var N=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";I=null!=I?I:{"HTML-CSS":{availableFonts:[N],imageFont:null},
+SVG:{font:N,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(I);MathJax.Hub.Register.StartupHook("Begin",function(){for(var Z=0;Z<Editor.mathJaxQueue.length;Z++)Editor.doMathJaxRender(Editor.mathJaxQueue[Z])})}};Editor.MathJaxRender=function(Z){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(Z):Editor.mathJaxQueue.push(Z)};
+Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var W=Editor.prototype.init;Editor.prototype.init=function(){W.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(Z,na){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};N=document.getElementsByTagName("script");if(null!=N&&0<N.length){var T=document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",
u);N[0].parentNode.appendChild(T)}try{if(mxClient.IS_GC||mxClient.IS_SF){var Q=document.createElement("style");Q.type="text/css";Q.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(Q)}}catch(Z){}}};Editor.prototype.csvToArray=function(u){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(u))return null;
-var J=[];u.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(N,W,T,Q){void 0!==W?J.push(W.replace(/\\'/g,"'")):void 0!==T?J.push(T.replace(/\\"/g,'"')):void 0!==Q&&J.push(Q);return""});/,\s*$/.test(u)&&J.push("");return J};Editor.prototype.isCorsEnabledForUrl=function(u){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||u.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&
-null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(u)||"https://raw.githubusercontent.com/"===u.substring(0,34)||"https://fonts.googleapis.com/"===u.substring(0,29)||"https://fonts.gstatic.com/"===u.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var u=new mxUrlConverter;u.updateBaseUrl();var J=u.convert,N=this;u.convert=function(W){if(null!=W){var T="http://"==W.substring(0,7)||"https://"==
-W.substring(0,8);T&&!navigator.onLine?W=Editor.svgBrokenImage.src:!T||W.substring(0,u.baseUrl.length)==u.baseUrl||N.crossOriginImages&&N.isCorsEnabledForUrl(W)?"chrome-extension://"==W.substring(0,19)||mxClient.IS_CHROMEAPP||(W=J.apply(this,arguments)):W=PROXY_URL+"?url="+encodeURIComponent(W)}return W};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,J){try{var N=!0,W=window.setTimeout(mxUtils.bind(this,
-function(){N=!1;J(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(Q){window.clearTimeout(W);N&&J(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(W);N&&J(Editor.svgBrokenImage.src)});else{var T=new Image;this.crossOriginImages&&(T.crossOrigin="anonymous");T.onload=function(){window.clearTimeout(W);if(N)try{var Q=document.createElement("canvas"),Z=Q.getContext("2d");Q.height=T.height;Q.width=T.width;Z.drawImage(T,0,0);
-J(Q.toDataURL())}catch(oa){J(Editor.svgBrokenImage.src)}};T.onerror=function(){window.clearTimeout(W);N&&J(Editor.svgBrokenImage.src)};T.src=u}}catch(Q){J(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(u,J,N,W){null==W&&(W=this.createImageUrlConverter());var T=0,Q=N||{};N=mxUtils.bind(this,function(Z,oa){Z=u.getElementsByTagName(Z);for(var wa=0;wa<Z.length;wa++)mxUtils.bind(this,function(Aa){try{if(null!=Aa){var ta=W.convert(Aa.getAttribute(oa));if(null!=ta&&"data:"!=ta.substring(0,
-5)){var Ba=Q[ta];null==Ba?(T++,this.convertImageToDataUri(ta,function(va){null!=va&&(Q[ta]=va,Aa.setAttribute(oa,va));T--;0==T&&J(u)})):Aa.setAttribute(oa,Ba)}else null!=ta&&Aa.setAttribute(oa,ta)}}catch(va){}})(Z[wa])});N("image","xlink:href");N("img","src");0==T&&J(u)};Editor.base64Encode=function(u){for(var J="",N=0,W=u.length,T,Q,Z;N<W;){T=u.charCodeAt(N++)&255;if(N==W){J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&
-3)<<4);J+="==";break}Q=u.charCodeAt(N++);if(N==W){J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(Q&240)>>4);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);J+="=";break}Z=u.charCodeAt(N++);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&
-3)<<4|(Q&240)>>4);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2|(Z&192)>>6);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Z&63)}return J};Editor.prototype.loadUrl=function(u,J,N,W,T,Q,Z,oa){try{var wa=!Z&&(W||/(\.png)($|\?)/i.test(u)||/(\.jpe?g)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.pdf)($|\?)/i.test(u));T=null!=T?T:!0;var Aa=mxUtils.bind(this,function(){mxUtils.get(u,mxUtils.bind(this,function(ta){if(200<=ta.getStatus()&&
-299>=ta.getStatus()){if(null!=J){var Ba=ta.getText();if(wa){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){ta=mxUtilsBinaryToArray(ta.request.responseBody).toArray();Ba=Array(ta.length);for(var va=0;va<ta.length;va++)Ba[va]=String.fromCharCode(ta[va]);Ba=Ba.join("")}Q=null!=Q?Q:"data:image/png;base64,";Ba=Q+Editor.base64Encode(Ba)}J(Ba)}}else null!=N&&(0==ta.getStatus()?N({message:mxResources.get("accessDenied")},ta):N({message:mxResources.get("error")+
-" "+ta.getStatus()},ta))}),function(ta){null!=N&&N({message:mxResources.get("error")+" "+ta.getStatus()})},wa,this.timeout,function(){T&&null!=N&&N({code:App.ERROR_TIMEOUT,retry:Aa})},oa)});Aa()}catch(ta){null!=N&&N(ta)}};Editor.prototype.absoluteCssFonts=function(u){var J=null;if(null!=u){var N=u.split("url(");if(0<N.length){J=[N[0]];u=window.location.pathname;var W=null!=u?u.lastIndexOf("/"):-1;0<=W&&(u=u.substring(0,W+1));W=document.getElementsByTagName("base");var T=null;null!=W&&0<W.length&&
-(T=W[0].getAttribute("href"));for(var Q=1;Q<N.length;Q++)if(W=N[Q].indexOf(")"),0<W){var Z=Editor.trimCssUrl(N[Q].substring(0,W));this.graph.isRelativeUrl(Z)&&(Z=null!=T?T+Z:window.location.protocol+"//"+window.location.hostname+("/"==Z.charAt(0)?"":u)+Z);J.push('url("'+Z+'"'+N[Q].substring(W))}else J.push(N[Q])}else J=[u]}return null!=J?J.join(""):null};Editor.prototype.mapFontUrl=function(u,J,N){/^https?:\/\//.test(J)&&!this.isCorsEnabledForUrl(J)&&(J=PROXY_URL+"?url="+encodeURIComponent(J));N(u,
-J)};Editor.prototype.embedCssFonts=function(u,J){var N=u.split("url("),W=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==W){for(var wa=[N[0]],Aa=1;Aa<N.length;Aa++){var ta=N[Aa].indexOf(")");wa.push('url("');wa.push(this.cachedFonts[Editor.trimCssUrl(N[Aa].substring(0,ta))]);wa.push('"'+N[Aa].substring(ta))}J(wa.join(""))}});if(0<N.length){for(u=1;u<N.length;u++){var Q=N[u].indexOf(")"),Z=null,oa=N[u].indexOf("format(",Q);0<oa&&(Z=Editor.trimCssUrl(N[u].substring(oa+
-7,N[u].indexOf(")",oa))));mxUtils.bind(this,function(wa){if(null==this.cachedFonts[wa]){this.cachedFonts[wa]=wa;W++;var Aa="application/x-font-ttf";if("svg"==Z||/(\.svg)($|\?)/i.test(wa))Aa="image/svg+xml";else if("otf"==Z||"embedded-opentype"==Z||/(\.otf)($|\?)/i.test(wa))Aa="application/x-font-opentype";else if("woff"==Z||/(\.woff)($|\?)/i.test(wa))Aa="application/font-woff";else if("woff2"==Z||/(\.woff2)($|\?)/i.test(wa))Aa="application/font-woff2";else if("eot"==Z||/(\.eot)($|\?)/i.test(wa))Aa=
-"application/vnd.ms-fontobject";else if("sfnt"==Z||/(\.sfnt)($|\?)/i.test(wa))Aa="application/font-sfnt";this.mapFontUrl(Aa,wa,mxUtils.bind(this,function(ta,Ba){this.loadUrl(Ba,mxUtils.bind(this,function(va){this.cachedFonts[wa]=va;W--;T()}),mxUtils.bind(this,function(va){W--;T()}),!0,null,"data:"+ta+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(N[u].substring(0,Q)),Z)}T()}else J(u)};Editor.prototype.loadFonts=function(u){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,
-mxUtils.bind(this,function(J){this.resolvedFontCss=J;null!=u&&u()})):null!=u&&u()};Editor.prototype.createGoogleFontCache=function(){var u={},J;for(J in Graph.fontMapping)Graph.isCssFontUrl(J)&&(u[J]=Graph.fontMapping[J]);return u};Editor.prototype.embedExtFonts=function(u){var J=this.graph.getCustomFonts();if(0<J.length){var N=[],W=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var T=mxUtils.bind(this,function(){0==W&&this.embedCssFonts(N.join(""),u)}),
-Q=0;Q<J.length;Q++)mxUtils.bind(this,function(Z,oa){Graph.isCssFontUrl(oa)?null==this.cachedGoogleFonts[oa]?(W++,this.loadUrl(oa,mxUtils.bind(this,function(wa){this.cachedGoogleFonts[oa]=wa;N.push(wa+"\n");W--;T()}),mxUtils.bind(this,function(wa){W--;N.push("@import url("+oa+");\n");T()}))):N.push(this.cachedGoogleFonts[oa]+"\n"):N.push('@font-face {font-family: "'+Z+'";src: url("'+oa+'")}\n')})(J[Q].name,J[Q].url);T()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");
-if(null!=u&&0<u.length)for(var J=document.getElementsByTagName("style"),N=0;N<J.length;N++){var W=mxUtils.getTextContent(J[N]);0>W.indexOf("mxPageSelector")&&0<W.indexOf("MathJax")&&u[0].appendChild(J[N].cloneNode(!0))}};Editor.prototype.addFontCss=function(u,J){J=null!=J?J:this.absoluteCssFonts(this.fontCss);if(null!=J){var N=u.getElementsByTagName("defs"),W=u.ownerDocument;0==N.length?(N=null!=W.createElementNS?W.createElementNS(mxConstants.NS_SVG,"defs"):W.createElement("defs"),null!=u.firstChild?
-u.insertBefore(N,u.firstChild):u.appendChild(N)):N=N[0];u=null!=W.createElementNS?W.createElementNS(mxConstants.NS_SVG,"style"):W.createElement("style");u.setAttribute("type","text/css");mxUtils.setTextContent(u,J);N.appendChild(u)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(u,J,N){var W=mxClient.IS_FF?8192:16384;return Math.min(N,Math.min(W/u,W/J))};Editor.prototype.exportToCanvas=function(u,J,N,
-W,T,Q,Z,oa,wa,Aa,ta,Ba,va,Oa,Ca,Ta,Va,Ja){try{Q=null!=Q?Q:!0;Z=null!=Z?Z:!0;Ba=null!=Ba?Ba:this.graph;va=null!=va?va:0;var bb=wa?null:Ba.background;bb==mxConstants.NONE&&(bb=null);null==bb&&(bb=W);null==bb&&0==wa&&(bb=Ta?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Ba.getSvg(null,null,va,Oa,null,Z,null,null,null,Aa,null,Ta,Va,Ja),mxUtils.bind(this,function(Wa){try{var $a=new Image;$a.onload=mxUtils.bind(this,function(){try{var L=function(){mxClient.IS_SF?window.setTimeout(function(){ia.drawImage($a,
-0,0);u(M,Wa)},0):(ia.drawImage($a,0,0),u(M,Wa))},M=document.createElement("canvas"),S=parseInt(Wa.getAttribute("width")),ca=parseInt(Wa.getAttribute("height"));oa=null!=oa?oa:1;null!=J&&(oa=Q?Math.min(1,Math.min(3*J/(4*ca),J/S)):J/S);oa=this.getMaxCanvasScale(S,ca,oa);S=Math.ceil(oa*S);ca=Math.ceil(oa*ca);M.setAttribute("width",S);M.setAttribute("height",ca);var ia=M.getContext("2d");null!=bb&&(ia.beginPath(),ia.rect(0,0,S,ca),ia.fillStyle=bb,ia.fill());1!=oa&&ia.scale(oa,oa);if(Ca){var na=Ba.view,
-ra=na.scale;na.scale=1;var qa=btoa(unescape(encodeURIComponent(na.createSvgGrid(na.gridColor))));na.scale=ra;qa="data:image/svg+xml;base64,"+qa;var ya=Ba.gridSize*na.gridSteps*oa,Ea=Ba.getGraphBounds(),Na=na.translate.x*ra,Pa=na.translate.y*ra,Qa=Na+(Ea.x-Na)/ra-va,Ua=Pa+(Ea.y-Pa)/ra-va,La=new Image;La.onload=function(){try{for(var ua=-Math.round(ya-mxUtils.mod((Na-Qa)*oa,ya)),za=-Math.round(ya-mxUtils.mod((Pa-Ua)*oa,ya));ua<S;ua+=ya)for(var Ka=za;Ka<ca;Ka+=ya)ia.drawImage(La,ua/oa,Ka/oa);L()}catch(Ga){null!=
-T&&T(Ga)}};La.onerror=function(ua){null!=T&&T(ua)};La.src=qa}else L()}catch(ua){null!=T&&T(ua)}});$a.onerror=function(L){null!=T&&T(L)};Aa&&this.graph.addSvgShadow(Wa);this.graph.mathEnabled&&this.addMathCss(Wa);var z=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Wa,this.resolvedFontCss),$a.src=Editor.createSvgDataUri(mxUtils.getXml(Wa))}catch(L){null!=T&&T(L)}});this.embedExtFonts(mxUtils.bind(this,function(L){try{null!=L&&this.addFontCss(Wa,L),this.loadFonts(z)}catch(M){null!=
-T&&T(M)}}))}catch(L){null!=T&&T(L)}}),N,ta)}catch(Wa){null!=T&&T(Wa)}};Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=D,E=0;8>E;E++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,J,N,W){for(var T=0;T<W;T++)u=Editor.crcTable[(u^J.charCodeAt(N+T))&255]^u>>>8;return u};Editor.crc32=function(u){for(var J=-1,N=0;N<u.length;N++)J=J>>>8^Editor.crcTable[(J^u.charCodeAt(N))&255];return(J^-1)>>>0};Editor.writeGraphModelToPng=function(u,J,N,W,T){function Q(ta,Ba){var va=
-wa;wa+=Ba;return ta.substring(va,wa)}function Z(ta){ta=Q(ta,4);return ta.charCodeAt(3)+(ta.charCodeAt(2)<<8)+(ta.charCodeAt(1)<<16)+(ta.charCodeAt(0)<<24)}function oa(ta){return String.fromCharCode(ta>>24&255,ta>>16&255,ta>>8&255,ta&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var wa=0;if(Q(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(Q(u,4),"IHDR"!=Q(u,4))null!=T&&T();else{Q(u,17);T=u.substring(0,wa);do{var Aa=Z(u);if("IDAT"==
-Q(u,4)){T=u.substring(0,wa-8);"pHYs"==J&&"dpi"==N?(N=Math.round(W/.0254),N=oa(N)+oa(N)+String.fromCharCode(1)):N=N+String.fromCharCode(0)+("zTXt"==J?String.fromCharCode(0):"")+W;W=4294967295;W=Editor.updateCRC(W,J,0,4);W=Editor.updateCRC(W,N,0,N.length);T+=oa(N.length)+J+N+oa(W^4294967295);T+=u.substring(wa-8,u.length);break}T+=u.substring(wa-8,wa-4+Aa);Q(u,Aa);Q(u,4)}while(Aa);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink=
-"https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(u,J){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(u,J){var N=null;null!=u.editor.graph.getModel().getParent(J)?
-N=J.getId():null!=u.currentPage&&(N=u.currentPage.getId());return N});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?m.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var u=
-this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=u&&u.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(u){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(u){u=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var J=this.editorUi,N=J.editor.graph,W=this.createOption(mxResources.get("shadow"),function(){return N.shadowVisible},function(T){var Q=new ChangePageSetup(J);
-Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=T;N.model.execute(Q)},{install:function(T){this.listener=function(){T(N.shadowVisible)};J.addListener("shadowVisibleChanged",this.listener)},destroy:function(){J.removeListener(this.listener)}});Editor.enableShadowOption||(W.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(W,60));u.appendChild(W)}return u};var y=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(u){u=y.apply(this,
-arguments);var J=this.editorUi,N=J.editor.graph;if(N.isEnabled()){var W=J.getCurrentFile();if(null!=W&&W.isAutosaveOptional()){var T=this.createOption(mxResources.get("autosave"),function(){return J.editor.autosave},function(Z){J.editor.setAutosave(Z);J.editor.autosave&&W.isModified()&&W.fileChanged()},{install:function(Z){this.listener=function(){Z(J.editor.autosave)};J.editor.addListener("autosaveChanged",this.listener)},destroy:function(){J.editor.removeListener(this.listener)}});u.appendChild(T)}}if(this.isMathOptionVisible()&&
-N.isEnabled()&&"undefined"!==typeof MathJax){T=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return N.mathEnabled},function(Z){J.actions.get("mathematicalTypesetting").funct()},{install:function(Z){this.listener=function(){Z(N.mathEnabled)};J.addListener("mathEnabledChanged",this.listener)},destroy:function(){J.removeListener(this.listener)}});T.style.paddingTop="5px";u.appendChild(T);var Q=J.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Q.style.position=
+var I=[];u.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(N,W,T,Q){void 0!==W?I.push(W.replace(/\\'/g,"'")):void 0!==T?I.push(T.replace(/\\"/g,'"')):void 0!==Q&&I.push(Q);return""});/,\s*$/.test(u)&&I.push("");return I};Editor.prototype.isCorsEnabledForUrl=function(u){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||u.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&
+null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(u)||"https://raw.githubusercontent.com/"===u.substring(0,34)||"https://fonts.googleapis.com/"===u.substring(0,29)||"https://fonts.gstatic.com/"===u.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var u=new mxUrlConverter;u.updateBaseUrl();var I=u.convert,N=this;u.convert=function(W){if(null!=W){var T="http://"==W.substring(0,7)||"https://"==
+W.substring(0,8);T&&!navigator.onLine?W=Editor.svgBrokenImage.src:!T||W.substring(0,u.baseUrl.length)==u.baseUrl||N.crossOriginImages&&N.isCorsEnabledForUrl(W)?"chrome-extension://"==W.substring(0,19)||mxClient.IS_CHROMEAPP||(W=I.apply(this,arguments)):W=PROXY_URL+"?url="+encodeURIComponent(W)}return W};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,I){try{var N=!0,W=window.setTimeout(mxUtils.bind(this,
+function(){N=!1;I(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(Q){window.clearTimeout(W);N&&I(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(W);N&&I(Editor.svgBrokenImage.src)});else{var T=new Image;this.crossOriginImages&&(T.crossOrigin="anonymous");T.onload=function(){window.clearTimeout(W);if(N)try{var Q=document.createElement("canvas"),Z=Q.getContext("2d");Q.height=T.height;Q.width=T.width;Z.drawImage(T,0,0);
+I(Q.toDataURL())}catch(na){I(Editor.svgBrokenImage.src)}};T.onerror=function(){window.clearTimeout(W);N&&I(Editor.svgBrokenImage.src)};T.src=u}}catch(Q){I(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(u,I,N,W){null==W&&(W=this.createImageUrlConverter());var T=0,Q=N||{};N=mxUtils.bind(this,function(Z,na){Z=u.getElementsByTagName(Z);for(var va=0;va<Z.length;va++)mxUtils.bind(this,function(Ba){try{if(null!=Ba){var sa=W.convert(Ba.getAttribute(na));if(null!=sa&&"data:"!=sa.substring(0,
+5)){var Da=Q[sa];null==Da?(T++,this.convertImageToDataUri(sa,function(Aa){null!=Aa&&(Q[sa]=Aa,Ba.setAttribute(na,Aa));T--;0==T&&I(u)})):Ba.setAttribute(na,Da)}else null!=sa&&Ba.setAttribute(na,sa)}}catch(Aa){}})(Z[va])});N("image","xlink:href");N("img","src");0==T&&I(u)};Editor.base64Encode=function(u){for(var I="",N=0,W=u.length,T,Q,Z;N<W;){T=u.charCodeAt(N++)&255;if(N==W){I+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);I+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&
+3)<<4);I+="==";break}Q=u.charCodeAt(N++);if(N==W){I+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);I+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(Q&240)>>4);I+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);I+="=";break}Z=u.charCodeAt(N++);I+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);I+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&
+3)<<4|(Q&240)>>4);I+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2|(Z&192)>>6);I+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Z&63)}return I};Editor.prototype.loadUrl=function(u,I,N,W,T,Q,Z,na){try{var va=!Z&&(W||/(\.png)($|\?)/i.test(u)||/(\.jpe?g)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.pdf)($|\?)/i.test(u));T=null!=T?T:!0;var Ba=mxUtils.bind(this,function(){mxUtils.get(u,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&
+299>=sa.getStatus()){if(null!=I){var Da=sa.getText();if(va){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();Da=Array(sa.length);for(var Aa=0;Aa<sa.length;Aa++)Da[Aa]=String.fromCharCode(sa[Aa]);Da=Da.join("")}Q=null!=Q?Q:"data:image/png;base64,";Da=Q+Editor.base64Encode(Da)}I(Da)}}else null!=N&&(0==sa.getStatus()?N({message:mxResources.get("accessDenied")},sa):N({message:mxResources.get("error")+
+" "+sa.getStatus()},sa))}),function(sa){null!=N&&N({message:mxResources.get("error")+" "+sa.getStatus()})},va,this.timeout,function(){T&&null!=N&&N({code:App.ERROR_TIMEOUT,retry:Ba})},na)});Ba()}catch(sa){null!=N&&N(sa)}};Editor.prototype.absoluteCssFonts=function(u){var I=null;if(null!=u){var N=u.split("url(");if(0<N.length){I=[N[0]];u=window.location.pathname;var W=null!=u?u.lastIndexOf("/"):-1;0<=W&&(u=u.substring(0,W+1));W=document.getElementsByTagName("base");var T=null;null!=W&&0<W.length&&
+(T=W[0].getAttribute("href"));for(var Q=1;Q<N.length;Q++)if(W=N[Q].indexOf(")"),0<W){var Z=Editor.trimCssUrl(N[Q].substring(0,W));this.graph.isRelativeUrl(Z)&&(Z=null!=T?T+Z:window.location.protocol+"//"+window.location.hostname+("/"==Z.charAt(0)?"":u)+Z);I.push('url("'+Z+'"'+N[Q].substring(W))}else I.push(N[Q])}else I=[u]}return null!=I?I.join(""):null};Editor.prototype.mapFontUrl=function(u,I,N){/^https?:\/\//.test(I)&&!this.isCorsEnabledForUrl(I)&&(I=PROXY_URL+"?url="+encodeURIComponent(I));N(u,
+I)};Editor.prototype.embedCssFonts=function(u,I){var N=u.split("url("),W=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==W){for(var va=[N[0]],Ba=1;Ba<N.length;Ba++){var sa=N[Ba].indexOf(")");va.push('url("');va.push(this.cachedFonts[Editor.trimCssUrl(N[Ba].substring(0,sa))]);va.push('"'+N[Ba].substring(sa))}I(va.join(""))}});if(0<N.length){for(u=1;u<N.length;u++){var Q=N[u].indexOf(")"),Z=null,na=N[u].indexOf("format(",Q);0<na&&(Z=Editor.trimCssUrl(N[u].substring(na+
+7,N[u].indexOf(")",na))));mxUtils.bind(this,function(va){if(null==this.cachedFonts[va]){this.cachedFonts[va]=va;W++;var Ba="application/x-font-ttf";if("svg"==Z||/(\.svg)($|\?)/i.test(va))Ba="image/svg+xml";else if("otf"==Z||"embedded-opentype"==Z||/(\.otf)($|\?)/i.test(va))Ba="application/x-font-opentype";else if("woff"==Z||/(\.woff)($|\?)/i.test(va))Ba="application/font-woff";else if("woff2"==Z||/(\.woff2)($|\?)/i.test(va))Ba="application/font-woff2";else if("eot"==Z||/(\.eot)($|\?)/i.test(va))Ba=
+"application/vnd.ms-fontobject";else if("sfnt"==Z||/(\.sfnt)($|\?)/i.test(va))Ba="application/font-sfnt";this.mapFontUrl(Ba,va,mxUtils.bind(this,function(sa,Da){this.loadUrl(Da,mxUtils.bind(this,function(Aa){this.cachedFonts[va]=Aa;W--;T()}),mxUtils.bind(this,function(Aa){W--;T()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(N[u].substring(0,Q)),Z)}T()}else I(u)};Editor.prototype.loadFonts=function(u){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,
+mxUtils.bind(this,function(I){this.resolvedFontCss=I;null!=u&&u()})):null!=u&&u()};Editor.prototype.createGoogleFontCache=function(){var u={},I;for(I in Graph.fontMapping)Graph.isCssFontUrl(I)&&(u[I]=Graph.fontMapping[I]);return u};Editor.prototype.embedExtFonts=function(u){var I=this.graph.getCustomFonts();if(0<I.length){var N=[],W=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var T=mxUtils.bind(this,function(){0==W&&this.embedCssFonts(N.join(""),u)}),
+Q=0;Q<I.length;Q++)mxUtils.bind(this,function(Z,na){Graph.isCssFontUrl(na)?null==this.cachedGoogleFonts[na]?(W++,this.loadUrl(na,mxUtils.bind(this,function(va){this.cachedGoogleFonts[na]=va;N.push(va+"\n");W--;T()}),mxUtils.bind(this,function(va){W--;N.push("@import url("+na+");\n");T()}))):N.push(this.cachedGoogleFonts[na]+"\n"):N.push('@font-face {font-family: "'+Z+'";src: url("'+na+'")}\n')})(I[Q].name,I[Q].url);T()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");
+if(null!=u&&0<u.length)for(var I=document.getElementsByTagName("style"),N=0;N<I.length;N++){var W=mxUtils.getTextContent(I[N]);0>W.indexOf("mxPageSelector")&&0<W.indexOf("MathJax")&&u[0].appendChild(I[N].cloneNode(!0))}};Editor.prototype.addFontCss=function(u,I){I=null!=I?I:this.absoluteCssFonts(this.fontCss);if(null!=I){var N=u.getElementsByTagName("defs"),W=u.ownerDocument;0==N.length?(N=null!=W.createElementNS?W.createElementNS(mxConstants.NS_SVG,"defs"):W.createElement("defs"),null!=u.firstChild?
+u.insertBefore(N,u.firstChild):u.appendChild(N)):N=N[0];u=null!=W.createElementNS?W.createElementNS(mxConstants.NS_SVG,"style"):W.createElement("style");u.setAttribute("type","text/css");mxUtils.setTextContent(u,I);N.appendChild(u)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(u,I,N){var W=mxClient.IS_FF?8192:16384;return Math.min(N,Math.min(W/u,W/I))};Editor.prototype.exportToCanvas=function(u,I,N,
+W,T,Q,Z,na,va,Ba,sa,Da,Aa,za,Ca,Qa,Za,cb){try{Q=null!=Q?Q:!0;Z=null!=Z?Z:!0;Da=null!=Da?Da:this.graph;Aa=null!=Aa?Aa:0;var Ka=va?null:Da.background;Ka==mxConstants.NONE&&(Ka=null);null==Ka&&(Ka=W);null==Ka&&0==va&&(Ka=Qa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Da.getSvg(null,null,Aa,za,null,Z,null,null,null,Ba,null,Qa,Za,cb),mxUtils.bind(this,function(Ua){try{var $a=new Image;$a.onload=mxUtils.bind(this,function(){try{var L=function(){mxClient.IS_SF?window.setTimeout(function(){ha.drawImage($a,
+0,0);u(M,Ua)},0):(ha.drawImage($a,0,0),u(M,Ua))},M=document.createElement("canvas"),S=parseInt(Ua.getAttribute("width")),ca=parseInt(Ua.getAttribute("height"));na=null!=na?na:1;null!=I&&(na=Q?Math.min(1,Math.min(3*I/(4*ca),I/S)):I/S);na=this.getMaxCanvasScale(S,ca,na);S=Math.ceil(na*S);ca=Math.ceil(na*ca);M.setAttribute("width",S);M.setAttribute("height",ca);var ha=M.getContext("2d");null!=Ka&&(ha.beginPath(),ha.rect(0,0,S,ca),ha.fillStyle=Ka,ha.fill());1!=na&&ha.scale(na,na);if(Ca){var oa=Da.view,
+ra=oa.scale;oa.scale=1;var qa=btoa(unescape(encodeURIComponent(oa.createSvgGrid(oa.gridColor))));oa.scale=ra;qa="data:image/svg+xml;base64,"+qa;var xa=Da.gridSize*oa.gridSteps*na,Ga=Da.getGraphBounds(),La=oa.translate.x*ra,Pa=oa.translate.y*ra,Oa=La+(Ga.x-La)/ra-Aa,Ta=Pa+(Ga.y-Pa)/ra-Aa,Ma=new Image;Ma.onload=function(){try{for(var ua=-Math.round(xa-mxUtils.mod((La-Oa)*na,xa)),ya=-Math.round(xa-mxUtils.mod((Pa-Ta)*na,xa));ua<S;ua+=xa)for(var Na=ya;Na<ca;Na+=xa)ha.drawImage(Ma,ua/na,Na/na);L()}catch(Fa){null!=
+T&&T(Fa)}};Ma.onerror=function(ua){null!=T&&T(ua)};Ma.src=qa}else L()}catch(ua){null!=T&&T(ua)}});$a.onerror=function(L){null!=T&&T(L)};Ba&&this.graph.addSvgShadow(Ua);this.graph.mathEnabled&&this.addMathCss(Ua);var z=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ua,this.resolvedFontCss),$a.src=Editor.createSvgDataUri(mxUtils.getXml(Ua))}catch(L){null!=T&&T(L)}});this.embedExtFonts(mxUtils.bind(this,function(L){try{null!=L&&this.addFontCss(Ua,L),this.loadFonts(z)}catch(M){null!=
+T&&T(M)}}))}catch(L){null!=T&&T(L)}}),N,sa)}catch(Ua){null!=T&&T(Ua)}};Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=D,E=0;8>E;E++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,I,N,W){for(var T=0;T<W;T++)u=Editor.crcTable[(u^I.charCodeAt(N+T))&255]^u>>>8;return u};Editor.crc32=function(u){for(var I=-1,N=0;N<u.length;N++)I=I>>>8^Editor.crcTable[(I^u.charCodeAt(N))&255];return(I^-1)>>>0};Editor.writeGraphModelToPng=function(u,I,N,W,T){function Q(sa,Da){var Aa=
+va;va+=Da;return sa.substring(Aa,va)}function Z(sa){sa=Q(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function na(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var va=0;if(Q(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(Q(u,4),"IHDR"!=Q(u,4))null!=T&&T();else{Q(u,17);T=u.substring(0,va);do{var Ba=Z(u);if("IDAT"==
+Q(u,4)){T=u.substring(0,va-8);"pHYs"==I&&"dpi"==N?(N=Math.round(W/.0254),N=na(N)+na(N)+String.fromCharCode(1)):N=N+String.fromCharCode(0)+("zTXt"==I?String.fromCharCode(0):"")+W;W=4294967295;W=Editor.updateCRC(W,I,0,4);W=Editor.updateCRC(W,N,0,N.length);T+=na(N.length)+I+N+na(W^4294967295);T+=u.substring(va-8,u.length);break}T+=u.substring(va-8,va-4+Ba);Q(u,Ba);Q(u,4)}while(Ba);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink=
+"https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(u,I){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(u,I){var N=null;null!=u.editor.graph.getModel().getParent(I)?
+N=I.getId():null!=u.currentPage&&(N=u.currentPage.getId());return N});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?m.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var u=
+this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=u&&u.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(u){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(u){u=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var I=this.editorUi,N=I.editor.graph,W=this.createOption(mxResources.get("shadow"),function(){return N.shadowVisible},function(T){var Q=new ChangePageSetup(I);
+Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=T;N.model.execute(Q)},{install:function(T){this.listener=function(){T(N.shadowVisible)};I.addListener("shadowVisibleChanged",this.listener)},destroy:function(){I.removeListener(this.listener)}});Editor.enableShadowOption||(W.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(W,60));u.appendChild(W)}return u};var y=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(u){u=y.apply(this,
+arguments);var I=this.editorUi,N=I.editor.graph;if(N.isEnabled()){var W=I.getCurrentFile();if(null!=W&&W.isAutosaveOptional()){var T=this.createOption(mxResources.get("autosave"),function(){return I.editor.autosave},function(Z){I.editor.setAutosave(Z);I.editor.autosave&&W.isModified()&&W.fileChanged()},{install:function(Z){this.listener=function(){Z(I.editor.autosave)};I.editor.addListener("autosaveChanged",this.listener)},destroy:function(){I.editor.removeListener(this.listener)}});u.appendChild(T)}}if(this.isMathOptionVisible()&&
+N.isEnabled()&&"undefined"!==typeof MathJax){T=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return N.mathEnabled},function(Z){I.actions.get("mathematicalTypesetting").funct()},{install:function(Z){this.listener=function(){Z(N.mathEnabled)};I.addListener("mathEnabledChanged",this.listener)},destroy:function(){I.removeListener(this.listener)}});T.style.paddingTop="5px";u.appendChild(T);var Q=I.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Q.style.position=
"relative";Q.style.marginLeft="6px";Q.style.top="2px";T.appendChild(Q)}return u};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
@@ -3230,94 +3230,94 @@ min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:
stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
-{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(u,J,N){if(null!=J){var W=function(Q){if(null!=Q)if(N)for(var Z=0;Z<Q.length;Z++)J[Q[Z].name]=Q[Z];else for(var oa in J){var wa=!1;for(Z=0;Z<Q.length;Z++)if(Q[Z].name==oa&&Q[Z].type==J[oa].type){wa=!0;break}wa||delete J[oa]}},
+{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(u,I,N){if(null!=I){var W=function(Q){if(null!=Q)if(N)for(var Z=0;Z<Q.length;Z++)I[Q[Z].name]=Q[Z];else for(var na in I){var va=!1;for(Z=0;Z<Q.length;Z++)if(Q[Z].name==na&&Q[Z].type==I[na].type){va=!0;break}va||delete I[na]}},
T=this.editorUi.editor.graph.view.getState(u);null!=T&&null!=T.shape&&(T.shape.commonCustomPropAdded||(T.shape.commonCustomPropAdded=!0,T.shape.customProperties=T.shape.customProperties||[],T.cell.vertex?Array.prototype.push.apply(T.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(T.shape.customProperties,Editor.commonEdgeProperties)),W(T.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{W(JSON.parse(u))}catch(Q){}}};var F=StyleFormatPanel.prototype.init;
-StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));F.apply(this,arguments);if(Editor.enableCustomProperties){for(var J={},N=u.vertices,W=u.edges,T=0;T<N.length;T++)this.findCommonProperties(N[T],J,0==T);for(T=0;T<W.length;T++)this.findCommonProperties(W[T],J,0==N.length&&0==T);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(J).length&&
-this.container.appendChild(this.addProperties(this.createPanel(),J,u))}};var C=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(u){this.addActions(u,["copyStyle","pasteStyle"]);return C.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(u,J,N){function W(ia,na,ra,qa){Ba.getModel().beginUpdate();try{var ya=[],Ea=[];if(null!=ra.index){for(var Na=[],Pa=ra.parentRow.nextSibling;Pa&&Pa.getAttribute("data-pName")==
-ia;)Na.push(Pa.getAttribute("data-pValue")),Pa=Pa.nextSibling;ra.index<Na.length?null!=qa?Na.splice(qa,1):Na[ra.index]=na:Na.push(na);null!=ra.size&&Na.length>ra.size&&(Na=Na.slice(0,ra.size));na=Na.join(",");null!=ra.countProperty&&(Ba.setCellStyles(ra.countProperty,Na.length,Ba.getSelectionCells()),ya.push(ra.countProperty),Ea.push(Na.length))}Ba.setCellStyles(ia,na,Ba.getSelectionCells());ya.push(ia);Ea.push(na);if(null!=ra.dependentProps)for(ia=0;ia<ra.dependentProps.length;ia++){var Qa=ra.dependentPropsDefVal[ia],
-Ua=ra.dependentPropsVals[ia];if(Ua.length>na)Ua=Ua.slice(0,na);else for(var La=Ua.length;La<na;La++)Ua.push(Qa);Ua=Ua.join(",");Ba.setCellStyles(ra.dependentProps[ia],Ua,Ba.getSelectionCells());ya.push(ra.dependentProps[ia]);Ea.push(Ua)}if("function"==typeof ra.onChange)ra.onChange(Ba,na);ta.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ya,"values",Ea,"cells",Ba.getSelectionCells()))}finally{Ba.getModel().endUpdate()}}function T(ia,na,ra){var qa=mxUtils.getOffset(u,!0),ya=mxUtils.getOffset(ia,
-!0);na.style.position="absolute";na.style.left=ya.x-qa.x+"px";na.style.top=ya.y-qa.y+"px";na.style.width=ia.offsetWidth+"px";na.style.height=ia.offsetHeight-(ra?4:0)+"px";na.style.zIndex=5}function Q(ia,na,ra){var qa=document.createElement("div");qa.style.width="32px";qa.style.height="4px";qa.style.margin="2px";qa.style.border="1px solid black";qa.style.background=na&&"none"!=na?na:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(ta,function(ya){this.editorUi.pickColor(na,
-function(Ea){qa.style.background="none"==Ea?"url('"+Dialog.prototype.noColorImage+"')":Ea;W(ia,Ea,ra)});mxEvent.consume(ya)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(qa);return btn}function Z(ia,na,ra,qa,ya,Ea,Na){null!=na&&(na=na.split(","),va.push({name:ia,values:na,type:ra,defVal:qa,countProperty:ya,parentRow:Ea,isDeletable:!0,flipBkg:Na}));btn=mxUtils.button("+",mxUtils.bind(ta,function(Pa){for(var Qa=Ea,Ua=0;null!=Qa.nextSibling;)if(Qa.nextSibling.getAttribute("data-pName")==
-ia)Qa=Qa.nextSibling,Ua++;else break;var La={type:ra,parentRow:Ea,index:Ua,isDeletable:!0,defVal:qa,countProperty:ya};Ua=Aa(ia,"",La,0==Ua%2,Na);W(ia,qa,La);Qa.parentNode.insertBefore(Ua,Qa.nextSibling);mxEvent.consume(Pa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function oa(ia,na,ra,qa,ya,Ea,Na){if(0<ya){var Pa=Array(ya);na=null!=na?na.split(","):[];for(var Qa=0;Qa<ya;Qa++)Pa[Qa]=null!=na[Qa]?na[Qa]:null!=qa?qa:"";va.push({name:ia,values:Pa,type:ra,
-defVal:qa,parentRow:Ea,flipBkg:Na,size:ya})}return document.createElement("div")}function wa(ia,na,ra){var qa=document.createElement("input");qa.type="checkbox";qa.checked="1"==na;mxEvent.addListener(qa,"change",function(){W(ia,qa.checked?"1":"0",ra)});return qa}function Aa(ia,na,ra,qa,ya){var Ea=ra.dispName,Na=ra.type,Pa=document.createElement("tr");Pa.className="gePropRow"+(ya?"Dark":"")+(qa?"Alt":"")+" gePropNonHeaderRow";Pa.setAttribute("data-pName",ia);Pa.setAttribute("data-pValue",na);qa=!1;
-null!=ra.index&&(Pa.setAttribute("data-index",ra.index),Ea=(null!=Ea?Ea:"")+"["+ra.index+"]",qa=!0);var Qa=document.createElement("td");Qa.className="gePropRowCell";Ea=mxResources.get(Ea,null,Ea);mxUtils.write(Qa,Ea);Qa.setAttribute("title",Ea);qa&&(Qa.style.textAlign="right");Pa.appendChild(Qa);Qa=document.createElement("td");Qa.className="gePropRowCell";if("color"==Na)Qa.appendChild(Q(ia,na,ra));else if("bool"==Na||"boolean"==Na)Qa.appendChild(wa(ia,na,ra));else if("enum"==Na){var Ua=ra.enumList;
-for(ya=0;ya<Ua.length;ya++)if(Ea=Ua[ya],Ea.val==na){mxUtils.write(Qa,mxResources.get(Ea.dispName,null,Ea.dispName));break}mxEvent.addListener(Qa,"click",mxUtils.bind(ta,function(){var La=document.createElement("select");T(Qa,La);for(var ua=0;ua<Ua.length;ua++){var za=Ua[ua],Ka=document.createElement("option");Ka.value=mxUtils.htmlEntities(za.val);mxUtils.write(Ka,mxResources.get(za.dispName,null,za.dispName));La.appendChild(Ka)}La.value=na;u.appendChild(La);mxEvent.addListener(La,"change",function(){var Ga=
-mxUtils.htmlEntities(La.value);W(ia,Ga,ra)});La.focus();mxEvent.addListener(La,"blur",function(){u.removeChild(La)})}))}else"dynamicArr"==Na?Qa.appendChild(Z(ia,na,ra.subType,ra.subDefVal,ra.countProperty,Pa,ya)):"staticArr"==Na?Qa.appendChild(oa(ia,na,ra.subType,ra.subDefVal,ra.size,Pa,ya)):"readOnly"==Na?(ya=document.createElement("input"),ya.setAttribute("readonly",""),ya.value=na,ya.style.width="96px",ya.style.borderWidth="0px",Qa.appendChild(ya)):(Qa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(na)),
-mxEvent.addListener(Qa,"click",mxUtils.bind(ta,function(){function La(){var za=ua.value;za=0==za.length&&"string"!=Na?0:za;ra.allowAuto&&(null!=za.trim&&"auto"==za.trim().toLowerCase()?(za="auto",Na="string"):(za=parseFloat(za),za=isNaN(za)?0:za));null!=ra.min&&za<ra.min?za=ra.min:null!=ra.max&&za>ra.max&&(za=ra.max);za=encodeURIComponent(("int"==Na?parseInt(za):za)+"");W(ia,za,ra)}var ua=document.createElement("input");T(Qa,ua,!0);ua.value=decodeURIComponent(na);ua.className="gePropEditor";"int"!=
-Na&&"float"!=Na||ra.allowAuto||(ua.type="number",ua.step="int"==Na?"1":"any",null!=ra.min&&(ua.min=parseFloat(ra.min)),null!=ra.max&&(ua.max=parseFloat(ra.max)));u.appendChild(ua);mxEvent.addListener(ua,"keypress",function(za){13==za.keyCode&&La()});ua.focus();mxEvent.addListener(ua,"blur",function(){La()})})));ra.isDeletable&&(ya=mxUtils.button("-",mxUtils.bind(ta,function(La){W(ia,"",ra,ra.index);mxEvent.consume(La)})),ya.style.height="16px",ya.style.width="25px",ya.style.float="right",ya.className=
-"geColorBtn",Qa.appendChild(ya));Pa.appendChild(Qa);return Pa}var ta=this,Ba=this.editorUi.editor.graph,va=[];u.style.position="relative";u.style.padding="0";var Oa=document.createElement("table");Oa.className="geProperties";Oa.style.whiteSpace="nowrap";Oa.style.width="100%";var Ca=document.createElement("tr");Ca.className="gePropHeader";var Ta=document.createElement("th");Ta.className="gePropHeaderCell";var Va=document.createElement("img");Va.src=Sidebar.prototype.expandedImage;Va.style.verticalAlign=
-"middle";Ta.appendChild(Va);mxUtils.write(Ta,mxResources.get("property"));Ca.style.cursor="pointer";var Ja=function(){var ia=Oa.querySelectorAll(".gePropNonHeaderRow");if(ta.editorUi.propertiesCollapsed){Va.src=Sidebar.prototype.collapsedImage;var na="none";for(var ra=u.childNodes.length-1;0<=ra;ra--)try{var qa=u.childNodes[ra],ya=qa.nodeName.toUpperCase();"INPUT"!=ya&&"SELECT"!=ya||u.removeChild(qa)}catch(Ea){}}else Va.src=Sidebar.prototype.expandedImage,na="";for(ra=0;ra<ia.length;ra++)ia[ra].style.display=
-na};mxEvent.addListener(Ca,"click",function(){ta.editorUi.propertiesCollapsed=!ta.editorUi.propertiesCollapsed;Ja()});Ca.appendChild(Ta);Ta=document.createElement("th");Ta.className="gePropHeaderCell";Ta.innerHTML=mxResources.get("value");Ca.appendChild(Ta);Oa.appendChild(Ca);var bb=!1,Wa=!1;Ca=null;1==N.vertices.length&&0==N.edges.length?Ca=N.vertices[0].id:0==N.vertices.length&&1==N.edges.length&&(Ca=N.edges[0].id);null!=Ca&&Oa.appendChild(Aa("id",mxUtils.htmlEntities(Ca),{dispName:"ID",type:"readOnly"},
-!0,!1));for(var $a in J)if(Ca=J[$a],"function"!=typeof Ca.isVisible||Ca.isVisible(N,this)){var z=null!=N.style[$a]?mxUtils.htmlEntities(N.style[$a]+""):null!=Ca.getDefaultValue?Ca.getDefaultValue(N,this):Ca.defVal;if("separator"==Ca.type)Wa=!Wa;else{if("staticArr"==Ca.type)Ca.size=parseInt(N.style[Ca.sizeProperty]||J[Ca.sizeProperty].defVal)||0;else if(null!=Ca.dependentProps){var L=Ca.dependentProps,M=[],S=[];for(Ta=0;Ta<L.length;Ta++){var ca=N.style[L[Ta]];S.push(J[L[Ta]].subDefVal);M.push(null!=
-ca?ca.split(","):[])}Ca.dependentPropsDefVal=S;Ca.dependentPropsVals=M}Oa.appendChild(Aa($a,z,Ca,bb,Wa));bb=!bb}}for(Ta=0;Ta<va.length;Ta++)for(Ca=va[Ta],J=Ca.parentRow,N=0;N<Ca.values.length;N++)$a=Aa(Ca.name,Ca.values[N],{type:Ca.type,parentRow:Ca.parentRow,isDeletable:Ca.isDeletable,index:N,defVal:Ca.defVal,countProperty:Ca.countProperty,size:Ca.size},0==N%2,Ca.flipBkg),J.parentNode.insertBefore($a,J.nextSibling),J=$a;u.appendChild(Oa);Ja();return u};StyleFormatPanel.prototype.addStyles=function(u){function J(Ca){mxEvent.addListener(Ca,
+StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));F.apply(this,arguments);if(Editor.enableCustomProperties){for(var I={},N=u.vertices,W=u.edges,T=0;T<N.length;T++)this.findCommonProperties(N[T],I,0==T);for(T=0;T<W.length;T++)this.findCommonProperties(W[T],I,0==N.length&&0==T);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(I).length&&
+this.container.appendChild(this.addProperties(this.createPanel(),I,u))}};var C=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(u){this.addActions(u,["copyStyle","pasteStyle"]);return C.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(u,I,N){function W(ha,oa,ra,qa){Da.getModel().beginUpdate();try{var xa=[],Ga=[];if(null!=ra.index){for(var La=[],Pa=ra.parentRow.nextSibling;Pa&&Pa.getAttribute("data-pName")==
+ha;)La.push(Pa.getAttribute("data-pValue")),Pa=Pa.nextSibling;ra.index<La.length?null!=qa?La.splice(qa,1):La[ra.index]=oa:La.push(oa);null!=ra.size&&La.length>ra.size&&(La=La.slice(0,ra.size));oa=La.join(",");null!=ra.countProperty&&(Da.setCellStyles(ra.countProperty,La.length,Da.getSelectionCells()),xa.push(ra.countProperty),Ga.push(La.length))}Da.setCellStyles(ha,oa,Da.getSelectionCells());xa.push(ha);Ga.push(oa);if(null!=ra.dependentProps)for(ha=0;ha<ra.dependentProps.length;ha++){var Oa=ra.dependentPropsDefVal[ha],
+Ta=ra.dependentPropsVals[ha];if(Ta.length>oa)Ta=Ta.slice(0,oa);else for(var Ma=Ta.length;Ma<oa;Ma++)Ta.push(Oa);Ta=Ta.join(",");Da.setCellStyles(ra.dependentProps[ha],Ta,Da.getSelectionCells());xa.push(ra.dependentProps[ha]);Ga.push(Ta)}if("function"==typeof ra.onChange)ra.onChange(Da,oa);sa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",xa,"values",Ga,"cells",Da.getSelectionCells()))}finally{Da.getModel().endUpdate()}}function T(ha,oa,ra){var qa=mxUtils.getOffset(u,!0),xa=mxUtils.getOffset(ha,
+!0);oa.style.position="absolute";oa.style.left=xa.x-qa.x+"px";oa.style.top=xa.y-qa.y+"px";oa.style.width=ha.offsetWidth+"px";oa.style.height=ha.offsetHeight-(ra?4:0)+"px";oa.style.zIndex=5}function Q(ha,oa,ra){var qa=document.createElement("div");qa.style.width="32px";qa.style.height="4px";qa.style.margin="2px";qa.style.border="1px solid black";qa.style.background=oa&&"none"!=oa?oa:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(sa,function(xa){this.editorUi.pickColor(oa,
+function(Ga){qa.style.background="none"==Ga?"url('"+Dialog.prototype.noColorImage+"')":Ga;W(ha,Ga,ra)});mxEvent.consume(xa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(qa);return btn}function Z(ha,oa,ra,qa,xa,Ga,La){null!=oa&&(oa=oa.split(","),Aa.push({name:ha,values:oa,type:ra,defVal:qa,countProperty:xa,parentRow:Ga,isDeletable:!0,flipBkg:La}));btn=mxUtils.button("+",mxUtils.bind(sa,function(Pa){for(var Oa=Ga,Ta=0;null!=Oa.nextSibling;)if(Oa.nextSibling.getAttribute("data-pName")==
+ha)Oa=Oa.nextSibling,Ta++;else break;var Ma={type:ra,parentRow:Ga,index:Ta,isDeletable:!0,defVal:qa,countProperty:xa};Ta=Ba(ha,"",Ma,0==Ta%2,La);W(ha,qa,Ma);Oa.parentNode.insertBefore(Ta,Oa.nextSibling);mxEvent.consume(Pa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function na(ha,oa,ra,qa,xa,Ga,La){if(0<xa){var Pa=Array(xa);oa=null!=oa?oa.split(","):[];for(var Oa=0;Oa<xa;Oa++)Pa[Oa]=null!=oa[Oa]?oa[Oa]:null!=qa?qa:"";Aa.push({name:ha,values:Pa,type:ra,
+defVal:qa,parentRow:Ga,flipBkg:La,size:xa})}return document.createElement("div")}function va(ha,oa,ra){var qa=document.createElement("input");qa.type="checkbox";qa.checked="1"==oa;mxEvent.addListener(qa,"change",function(){W(ha,qa.checked?"1":"0",ra)});return qa}function Ba(ha,oa,ra,qa,xa){var Ga=ra.dispName,La=ra.type,Pa=document.createElement("tr");Pa.className="gePropRow"+(xa?"Dark":"")+(qa?"Alt":"")+" gePropNonHeaderRow";Pa.setAttribute("data-pName",ha);Pa.setAttribute("data-pValue",oa);qa=!1;
+null!=ra.index&&(Pa.setAttribute("data-index",ra.index),Ga=(null!=Ga?Ga:"")+"["+ra.index+"]",qa=!0);var Oa=document.createElement("td");Oa.className="gePropRowCell";Ga=mxResources.get(Ga,null,Ga);mxUtils.write(Oa,Ga);Oa.setAttribute("title",Ga);qa&&(Oa.style.textAlign="right");Pa.appendChild(Oa);Oa=document.createElement("td");Oa.className="gePropRowCell";if("color"==La)Oa.appendChild(Q(ha,oa,ra));else if("bool"==La||"boolean"==La)Oa.appendChild(va(ha,oa,ra));else if("enum"==La){var Ta=ra.enumList;
+for(xa=0;xa<Ta.length;xa++)if(Ga=Ta[xa],Ga.val==oa){mxUtils.write(Oa,mxResources.get(Ga.dispName,null,Ga.dispName));break}mxEvent.addListener(Oa,"click",mxUtils.bind(sa,function(){var Ma=document.createElement("select");T(Oa,Ma);for(var ua=0;ua<Ta.length;ua++){var ya=Ta[ua],Na=document.createElement("option");Na.value=mxUtils.htmlEntities(ya.val);mxUtils.write(Na,mxResources.get(ya.dispName,null,ya.dispName));Ma.appendChild(Na)}Ma.value=oa;u.appendChild(Ma);mxEvent.addListener(Ma,"change",function(){var Fa=
+mxUtils.htmlEntities(Ma.value);W(ha,Fa,ra)});Ma.focus();mxEvent.addListener(Ma,"blur",function(){u.removeChild(Ma)})}))}else"dynamicArr"==La?Oa.appendChild(Z(ha,oa,ra.subType,ra.subDefVal,ra.countProperty,Pa,xa)):"staticArr"==La?Oa.appendChild(na(ha,oa,ra.subType,ra.subDefVal,ra.size,Pa,xa)):"readOnly"==La?(xa=document.createElement("input"),xa.setAttribute("readonly",""),xa.value=oa,xa.style.width="96px",xa.style.borderWidth="0px",Oa.appendChild(xa)):(Oa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(oa)),
+mxEvent.addListener(Oa,"click",mxUtils.bind(sa,function(){function Ma(){var ya=ua.value;ya=0==ya.length&&"string"!=La?0:ya;ra.allowAuto&&(null!=ya.trim&&"auto"==ya.trim().toLowerCase()?(ya="auto",La="string"):(ya=parseFloat(ya),ya=isNaN(ya)?0:ya));null!=ra.min&&ya<ra.min?ya=ra.min:null!=ra.max&&ya>ra.max&&(ya=ra.max);ya=encodeURIComponent(("int"==La?parseInt(ya):ya)+"");W(ha,ya,ra)}var ua=document.createElement("input");T(Oa,ua,!0);ua.value=decodeURIComponent(oa);ua.className="gePropEditor";"int"!=
+La&&"float"!=La||ra.allowAuto||(ua.type="number",ua.step="int"==La?"1":"any",null!=ra.min&&(ua.min=parseFloat(ra.min)),null!=ra.max&&(ua.max=parseFloat(ra.max)));u.appendChild(ua);mxEvent.addListener(ua,"keypress",function(ya){13==ya.keyCode&&Ma()});ua.focus();mxEvent.addListener(ua,"blur",function(){Ma()})})));ra.isDeletable&&(xa=mxUtils.button("-",mxUtils.bind(sa,function(Ma){W(ha,"",ra,ra.index);mxEvent.consume(Ma)})),xa.style.height="16px",xa.style.width="25px",xa.style.float="right",xa.className=
+"geColorBtn",Oa.appendChild(xa));Pa.appendChild(Oa);return Pa}var sa=this,Da=this.editorUi.editor.graph,Aa=[];u.style.position="relative";u.style.padding="0";var za=document.createElement("table");za.className="geProperties";za.style.whiteSpace="nowrap";za.style.width="100%";var Ca=document.createElement("tr");Ca.className="gePropHeader";var Qa=document.createElement("th");Qa.className="gePropHeaderCell";var Za=document.createElement("img");Za.src=Sidebar.prototype.expandedImage;Za.style.verticalAlign=
+"middle";Qa.appendChild(Za);mxUtils.write(Qa,mxResources.get("property"));Ca.style.cursor="pointer";var cb=function(){var ha=za.querySelectorAll(".gePropNonHeaderRow");if(sa.editorUi.propertiesCollapsed){Za.src=Sidebar.prototype.collapsedImage;var oa="none";for(var ra=u.childNodes.length-1;0<=ra;ra--)try{var qa=u.childNodes[ra],xa=qa.nodeName.toUpperCase();"INPUT"!=xa&&"SELECT"!=xa||u.removeChild(qa)}catch(Ga){}}else Za.src=Sidebar.prototype.expandedImage,oa="";for(ra=0;ra<ha.length;ra++)ha[ra].style.display=
+oa};mxEvent.addListener(Ca,"click",function(){sa.editorUi.propertiesCollapsed=!sa.editorUi.propertiesCollapsed;cb()});Ca.appendChild(Qa);Qa=document.createElement("th");Qa.className="gePropHeaderCell";Qa.innerHTML=mxResources.get("value");Ca.appendChild(Qa);za.appendChild(Ca);var Ka=!1,Ua=!1;Ca=null;1==N.vertices.length&&0==N.edges.length?Ca=N.vertices[0].id:0==N.vertices.length&&1==N.edges.length&&(Ca=N.edges[0].id);null!=Ca&&za.appendChild(Ba("id",mxUtils.htmlEntities(Ca),{dispName:"ID",type:"readOnly"},
+!0,!1));for(var $a in I)if(Ca=I[$a],"function"!=typeof Ca.isVisible||Ca.isVisible(N,this)){var z=null!=N.style[$a]?mxUtils.htmlEntities(N.style[$a]+""):null!=Ca.getDefaultValue?Ca.getDefaultValue(N,this):Ca.defVal;if("separator"==Ca.type)Ua=!Ua;else{if("staticArr"==Ca.type)Ca.size=parseInt(N.style[Ca.sizeProperty]||I[Ca.sizeProperty].defVal)||0;else if(null!=Ca.dependentProps){var L=Ca.dependentProps,M=[],S=[];for(Qa=0;Qa<L.length;Qa++){var ca=N.style[L[Qa]];S.push(I[L[Qa]].subDefVal);M.push(null!=
+ca?ca.split(","):[])}Ca.dependentPropsDefVal=S;Ca.dependentPropsVals=M}za.appendChild(Ba($a,z,Ca,Ka,Ua));Ka=!Ka}}for(Qa=0;Qa<Aa.length;Qa++)for(Ca=Aa[Qa],I=Ca.parentRow,N=0;N<Ca.values.length;N++)$a=Ba(Ca.name,Ca.values[N],{type:Ca.type,parentRow:Ca.parentRow,isDeletable:Ca.isDeletable,index:N,defVal:Ca.defVal,countProperty:Ca.countProperty,size:Ca.size},0==N%2,Ca.flipBkg),I.parentNode.insertBefore($a,I.nextSibling),I=$a;u.appendChild(za);cb();return u};StyleFormatPanel.prototype.addStyles=function(u){function I(Ca){mxEvent.addListener(Ca,
"mouseenter",function(){Ca.style.opacity="1"});mxEvent.addListener(Ca,"mouseleave",function(){Ca.style.opacity="0.5"})}var N=this.editorUi,W=N.editor.graph,T=document.createElement("div");T.style.whiteSpace="nowrap";T.style.paddingLeft="24px";T.style.paddingRight="20px";u.style.paddingLeft="16px";u.style.paddingBottom="6px";u.style.position="relative";u.appendChild(T);var Q="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),
-Z=document.createElement("div");Z.style.whiteSpace="nowrap";Z.style.position="relative";Z.style.textAlign="center";Z.style.width="210px";for(var oa=[],wa=0;wa<this.defaultColorSchemes.length;wa++){var Aa=document.createElement("div");Aa.style.display="inline-block";Aa.style.width="6px";Aa.style.height="6px";Aa.style.marginLeft="4px";Aa.style.marginRight="3px";Aa.style.borderRadius="3px";Aa.style.cursor="pointer";Aa.style.background="transparent";Aa.style.border="1px solid #b5b6b7";mxUtils.bind(this,
-function(Ca){mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){ta(Ca)}))})(wa);oa.push(Aa);Z.appendChild(Aa)}var ta=mxUtils.bind(this,function(Ca){null!=oa[Ca]&&(null!=this.format.currentScheme&&null!=oa[this.format.currentScheme]&&(oa[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ca,Ba(this.defaultColorSchemes[this.format.currentScheme]),oa[this.format.currentScheme].style.background="#84d7ff")}),Ba=mxUtils.bind(this,function(Ca){var Ta=mxUtils.bind(this,
-function(Ja){var bb=mxUtils.button("",mxUtils.bind(this,function(z){W.getModel().beginUpdate();try{for(var L=N.getSelectionState().cells,M=0;M<L.length;M++){for(var S=W.getModel().getStyle(L[M]),ca=0;ca<Q.length;ca++)S=mxUtils.removeStylename(S,Q[ca]);var ia=W.getModel().isVertex(L[M])?W.defaultVertexStyle:W.defaultEdgeStyle;null!=Ja?(mxEvent.isShiftDown(z)||(S=""==Ja.fill?mxUtils.setStyle(S,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(S,mxConstants.STYLE_FILLCOLOR,Ja.fill||mxUtils.getValue(ia,
-mxConstants.STYLE_FILLCOLOR,null)),S=mxUtils.setStyle(S,mxConstants.STYLE_GRADIENTCOLOR,Ja.gradient||mxUtils.getValue(ia,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(z)||mxClient.IS_MAC&&mxEvent.isMetaDown(z)||!W.getModel().isVertex(L[M])||(S=mxUtils.setStyle(S,mxConstants.STYLE_FONTCOLOR,Ja.font||mxUtils.getValue(ia,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(z)||(S=""==Ja.stroke?mxUtils.setStyle(S,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(S,mxConstants.STYLE_STROKECOLOR,
-Ja.stroke||mxUtils.getValue(ia,mxConstants.STYLE_STROKECOLOR,null)))):(S=mxUtils.setStyle(S,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(ia,mxConstants.STYLE_FILLCOLOR,"#ffffff")),S=mxUtils.setStyle(S,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(ia,mxConstants.STYLE_STROKECOLOR,"#000000")),S=mxUtils.setStyle(S,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(ia,mxConstants.STYLE_GRADIENTCOLOR,null)),W.getModel().isVertex(L[M])&&(S=mxUtils.setStyle(S,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(ia,
-mxConstants.STYLE_FONTCOLOR,null))));W.getModel().setStyle(L[M],S)}}finally{W.getModel().endUpdate()}}));bb.className="geStyleButton";bb.style.width="36px";bb.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";bb.style.margin="0px 6px 6px 0px";if(null!=Ja){var Wa="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ja.gradient?mxClient.IS_IE&&10>document.documentMode?bb.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ja.fill+"', EndColorStr='"+Ja.gradient+"', GradientType=0)":
-bb.style.backgroundImage="linear-gradient("+Ja.fill+" 0px,"+Ja.gradient+" 100%)":Ja.fill==mxConstants.NONE?bb.style.background="url('"+Dialog.prototype.noColorImage+"')":bb.style.backgroundColor=""==Ja.fill?mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ja.fill||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");bb.style.border=Ja.stroke==mxConstants.NONE?Wa+" transparent":
-""==Ja.stroke?Wa+" "+mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Wa+" "+(Ja.stroke||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ja.title&&bb.setAttribute("title",Ja.title)}else{Wa=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var $a=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");bb.style.backgroundColor=
-Wa;bb.style.border="1px solid "+$a}bb.style.borderRadius="0";T.appendChild(bb)});T.innerHTML="";for(var Va=0;Va<Ca.length;Va++)0<Va&&0==mxUtils.mod(Va,4)&&mxUtils.br(T),Ta(Ca[Va])});null==this.format.currentScheme?ta(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):ta(this.format.currentScheme);wa=10>=this.defaultColorSchemes.length?28:8;var va=document.createElement("div");va.style.cssText="position:absolute;left:10px;top:8px;bottom:"+wa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(va,"click",mxUtils.bind(this,function(){ta(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Oa=document.createElement("div");Oa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+wa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(u.appendChild(va),u.appendChild(Oa));mxEvent.addListener(Oa,"click",mxUtils.bind(this,function(){ta(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));J(va);J(Oa);Ba(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&u.appendChild(Z);return u};StyleFormatPanel.prototype.addEditOps=function(u){var J=this.editorUi.getSelectionState(),N=this.editorUi.editor.graph,W=null;1==J.cells.length&&(W=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(T){this.editorUi.actions.get("editStyle").funct()})),W.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),W.style.width="210px",W.style.marginBottom="2px",u.appendChild(W));N=1==J.cells.length?N.view.getState(J.cells[0]):null;null!=N&&null!=N.shape&&null!=N.shape.stencil?(J=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(T){this.editorUi.actions.get("editShape").funct()})),J.setAttribute("title",
-mxResources.get("editShape")),J.style.marginBottom="2px",null==W?J.style.width="210px":(W.style.width="104px",J.style.width="104px",J.style.marginLeft="2px"),u.appendChild(J)):J.image&&0<J.cells.length&&(J=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(T){this.editorUi.actions.get("image").funct()})),J.setAttribute("title",mxResources.get("editImage")),J.style.marginBottom="2px",null==W?J.style.width="210px":(W.style.width="104px",J.style.width="104px",J.style.marginLeft="2px"),
-u.appendChild(J));return u}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(u){return u.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(u){return Graph.isGoogleFontUrl(u)};Graph.createFontElement=function(u,
-J){var N=Graph.fontMapping[J];null==N&&Graph.isCssFontUrl(J)?(u=document.createElement("link"),u.setAttribute("rel","stylesheet"),u.setAttribute("type","text/css"),u.setAttribute("charset","UTF-8"),u.setAttribute("href",J)):(null==N&&(N='@font-face {\nfont-family: "'+u+'";\nsrc: url("'+J+'");\n}'),u=document.createElement("style"),mxUtils.write(u,N));return u};Graph.addFont=function(u,J,N){if(null!=u&&0<u.length&&null!=J&&0<J.length){var W=u.toLowerCase();if("helvetica"!=W&&"arial"!=u&&"sans-serif"!=
-W){var T=Graph.customFontElements[W];null!=T&&T.url!=J&&(T.elt.parentNode.removeChild(T.elt),T=null);null==T?(T=J,"http:"==J.substring(0,5)&&(T=PROXY_URL+"?url="+encodeURIComponent(J)),T={name:u,url:J,elt:Graph.createFontElement(u,T)},Graph.customFontElements[W]=T,Graph.recentCustomFonts[W]=T,J=document.getElementsByTagName("head")[0],null!=N&&("link"==T.elt.nodeName.toLowerCase()?(T.elt.onload=N,T.elt.onerror=N):N()),null!=J&&J.appendChild(T.elt)):null!=N&&N()}else null!=N&&N()}else null!=N&&N();
-return u};Graph.getFontUrl=function(u,J){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(J=u.url);return J};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var J=0;J<u.length;J++){var N=u[J].getAttribute("data-font-src");if(null!=N){var W="FONT"==u[J].nodeName?u[J].getAttribute("face"):u[J].style.fontFamily;null!=W&&Graph.addFont(W,N)}}};Graph.processFontStyle=function(u){if(null!=u){var J=mxUtils.getValue(u,"fontSource",null);if(null!=J){var N=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY,
-null);null!=N&&Graph.addFont(N,decodeURIComponent(J))}}return u};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var H=Graph.prototype.init;Graph.prototype.init=function(){function u(T){J=T}H.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var J=null;mxEvent.addListener(this.container,"mouseenter",u);mxEvent.addListener(this.container,"mousemove",u);mxEvent.addListener(this.container,"mouseleave",function(T){J=null});this.isMouseInsertPoint=function(){return null!=J};var N=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=J?this.getPointForEvent(J):N.apply(this,arguments)};var W=this.layoutManager.getLayout;this.layoutManager.getLayout=function(T){var Q=this.graph.getCellStyle(T);if(null!=Q&&"rack"==Q.childLayout){var Z=new mxStackLayout(this.graph,!1);Z.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;Z.marginLeft=Q.marginLeft||0;Z.marginRight=Q.marginRight||0;Z.marginTop=Q.marginTop||0;Z.marginBottom=
-Q.marginBottom||0;Z.allowGaps=Q.allowGaps||0;Z.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");Z.resizeParent=!1;Z.fill=!0;return Z}return W.apply(this,arguments)};this.updateGlobalUrlVariables()};var G=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,J){return Graph.processFontStyle(G.apply(this,arguments))};var aa=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,J,N,W,T,Q,Z,oa,wa,Aa,ta){aa.apply(this,arguments);
-Graph.processFontAttributes(ta)};var da=mxText.prototype.redraw;mxText.prototype.redraw=function(){da.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,J,N){function W(){for(var Ca=Z.getSelectionCells(),Ta=[],Va=0;Va<Ca.length;Va++)Z.isCellVisible(Ca[Va])&&Ta.push(Ca[Va]);Z.setSelectionCells(Ta)}function T(Ca){Z.setHiddenTags(Ca?[]:oa.slice());W();Z.refresh()}function Q(Ca,Ta){Aa.innerHTML="";if(0<
-Ca.length){var Va=document.createElement("table");Va.setAttribute("cellpadding","2");Va.style.boxSizing="border-box";Va.style.tableLayout="fixed";Va.style.width="100%";var Ja=document.createElement("tbody");if(null!=Ca&&0<Ca.length)for(var bb=0;bb<Ca.length;bb++)(function(Wa){var $a=0>mxUtils.indexOf(Z.hiddenTags,Wa),z=document.createElement("tr"),L=document.createElement("td");L.style.align="center";L.style.width="16px";var M=document.createElement("img");M.setAttribute("src",$a?Editor.visibleImage:
-Editor.hiddenImage);M.setAttribute("title",mxResources.get($a?"hideIt":"show",[Wa]));mxUtils.setOpacity(M,$a?75:25);M.style.verticalAlign="middle";M.style.cursor="pointer";M.style.width="16px";if(J||Editor.isDarkMode())M.style.filter="invert(100%)";L.appendChild(M);mxEvent.addListener(M,"click",function(ca){mxEvent.isShiftDown(ca)?T(0<=mxUtils.indexOf(Z.hiddenTags,Wa)):(Z.toggleHiddenTag(Wa),W(),Z.refresh());mxEvent.consume(ca)});z.appendChild(L);L=document.createElement("td");L.style.overflow="hidden";
-L.style.whiteSpace="nowrap";L.style.textOverflow="ellipsis";L.style.verticalAlign="middle";L.style.cursor="pointer";L.setAttribute("title",Wa);a=document.createElement("a");mxUtils.write(a,Wa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,$a?100:40);L.appendChild(a);mxEvent.addListener(L,"click",function(ca){if(mxEvent.isShiftDown(ca)){T(!0);var ia=Z.getCellsForTags([Wa],null,null,!0);Z.isEnabled()?Z.setSelectionCells(ia):Z.highlightCells(ia)}else if($a&&0<Z.hiddenTags.length)T(!0);
-else{ia=oa.slice();var na=mxUtils.indexOf(ia,Wa);ia.splice(na,1);Z.setHiddenTags(ia);W();Z.refresh()}mxEvent.consume(ca)});z.appendChild(L);if(Z.isEnabled()){L=document.createElement("td");L.style.verticalAlign="middle";L.style.textAlign="center";L.style.width="18px";if(null==Ta){L.style.align="center";L.style.width="16px";M=document.createElement("img");M.setAttribute("src",Editor.crossImage);M.setAttribute("title",mxResources.get("removeIt",[Wa]));mxUtils.setOpacity(M,$a?75:25);M.style.verticalAlign=
-"middle";M.style.cursor="pointer";M.style.width="16px";if(J||Editor.isDarkMode())M.style.filter="invert(100%)";mxEvent.addListener(M,"click",function(ca){var ia=mxUtils.indexOf(oa,Wa);0<=ia&&oa.splice(ia,1);Z.removeTagsForCells(Z.model.getDescendants(Z.model.getRoot()),[Wa]);Z.refresh();mxEvent.consume(ca)});L.appendChild(M)}else{var S=document.createElement("input");S.setAttribute("type","checkbox");S.style.margin="0px";S.defaultChecked=null!=Ta&&0<=mxUtils.indexOf(Ta,Wa);S.checked=S.defaultChecked;
-S.style.background="transparent";S.setAttribute("title",mxResources.get(S.defaultChecked?"removeIt":"add",[Wa]));mxEvent.addListener(S,"change",function(ca){S.checked?Z.addTagsForCells(Z.getSelectionCells(),[Wa]):Z.removeTagsForCells(Z.getSelectionCells(),[Wa]);mxEvent.consume(ca)});L.appendChild(S)}z.appendChild(L)}Ja.appendChild(z)})(Ca[bb]);Va.appendChild(Ja);Aa.appendChild(Va)}}var Z=this,oa=Z.hiddenTags.slice(),wa=document.createElement("div");wa.style.userSelect="none";wa.style.overflow="hidden";
-wa.style.padding="10px";wa.style.height="100%";var Aa=document.createElement("div");Aa.style.boxSizing="border-box";Aa.style.borderRadius="4px";Aa.style.userSelect="none";Aa.style.overflow="auto";Aa.style.position="absolute";Aa.style.left="10px";Aa.style.right="10px";Aa.style.top="10px";Aa.style.border=Z.isEnabled()?"1px solid #808080":"none";Aa.style.bottom=Z.isEnabled()?"48px":"10px";wa.appendChild(Aa);var ta=mxUtils.button(mxResources.get("reset"),function(Ca){Z.setHiddenTags([]);mxEvent.isShiftDown(Ca)||
-(oa=Z.hiddenTags.slice());W();Z.refresh()});ta.setAttribute("title",mxResources.get("reset"));ta.className="geBtn";ta.style.margin="0 4px 0 0";var Ba=mxUtils.button(mxResources.get("add"),function(){null!=N&&N(oa,function(Ca){oa=Ca;va()})});Ba.setAttribute("title",mxResources.get("add"));Ba.className="geBtn";Ba.style.margin="0";Z.addListener(mxEvent.ROOT,function(){oa=Z.hiddenTags.slice()});var va=mxUtils.bind(this,function(Ca,Ta){if(u()){Ca=Z.getAllTags();for(Ta=0;Ta<Ca.length;Ta++)0>mxUtils.indexOf(oa,
-Ca[Ta])&&oa.push(Ca[Ta]);oa.sort();Z.isSelectionEmpty()?Q(oa):Q(oa,Z.getCommonTagsForCells(Z.getSelectionCells()))}});Z.selectionModel.addListener(mxEvent.CHANGE,va);Z.model.addListener(mxEvent.CHANGE,va);Z.addListener(mxEvent.REFRESH,va);var Oa=document.createElement("div");Oa.style.boxSizing="border-box";Oa.style.whiteSpace="nowrap";Oa.style.position="absolute";Oa.style.overflow="hidden";Oa.style.bottom="0px";Oa.style.height="42px";Oa.style.right="10px";Oa.style.left="10px";Z.isEnabled()&&(Oa.appendChild(ta),
-Oa.appendChild(Ba),wa.appendChild(Oa));return{div:wa,refresh:va}};Graph.prototype.getCustomFonts=function(){var u=this.extFonts;u=null!=u?u.slice():[];for(var J in Graph.customFontElements){var N=Graph.customFontElements[J];u.push({name:N.name,url:N.url})}return u};Graph.prototype.setFont=function(u,J){Graph.addFont(u,J);document.execCommand("fontname",!1,u);if(null!=J){var N=this.cellEditor.textarea.getElementsByTagName("font");J=Graph.getFontUrl(u,J);for(var W=0;W<N.length;W++)N[W].getAttribute("face")==
-u&&N[W].getAttribute("data-font-src")!=J&&N[W].setAttribute("data-font-src",J)}};var ba=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return ba.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var u=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=u)for(var J in u)this.globalVars[J]=
-u[J]}catch(N){null!=window.console&&console.log("Error in vars URL parameter: "+N)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var Y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var J=Y.apply(this,arguments);null==J&&null!=this.globalVars&&(J=this.globalVars[u]);return J};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var pa=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,J,N,W,T,Q,Z,oa,wa,Aa,ta,Ba,va,Oa){var Ca=null,Ta=null,Va=null;Ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(Ca=this.stylesheet,Ta=this.shapeForegroundColor,Va=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
-"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ja=pa.apply(this,arguments),bb=this.getCustomFonts();if(ta&&0<bb.length){var Wa=Ja.ownerDocument,$a=null!=Wa.createElementNS?Wa.createElementNS(mxConstants.NS_SVG,"style"):Wa.createElement("style");null!=Wa.setAttributeNS?$a.setAttributeNS("type","text/css"):$a.setAttribute("type","text/css");for(var z="",L="",M=0;M<bb.length;M++){var S=bb[M].name,ca=bb[M].url;Graph.isCssFontUrl(ca)?
-z+="@import url("+ca+");\n":L+='@font-face {\nfont-family: "'+S+'";\nsrc: url("'+ca+'");\n}\n'}$a.appendChild(Wa.createTextNode(z+L));Ja.getElementsByTagName("defs")[0].appendChild($a)}null!=Ca&&(this.shapeBackgroundColor=Va,this.shapeForegroundColor=Ta,this.stylesheet=Ca,this.refresh());return Ja};var O=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var u=O.apply(this,arguments);if(this.mathEnabled){var J=u.drawText;u.drawText=function(N,W){if(null!=N.text&&
-null!=N.text.value&&N.text.checkBounds()&&(mxUtils.isNode(N.text.value)||N.text.dialect==mxConstants.DIALECT_STRICTHTML)){var T=N.text.getContentNode();if(null!=T){T=T.cloneNode(!0);if(T.getElementsByTagNameNS)for(var Q=T.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<Q.length;)Q[0].parentNode.removeChild(Q[0]);null!=T.innerHTML&&(Q=N.text.value,N.text.value=T.innerHTML,J.apply(this,arguments),N.text.value=Q)}}else J.apply(this,arguments)}}return u};var X=mxCellRenderer.prototype.destroy;
+Z=document.createElement("div");Z.style.whiteSpace="nowrap";Z.style.position="relative";Z.style.textAlign="center";Z.style.width="210px";for(var na=[],va=0;va<this.defaultColorSchemes.length;va++){var Ba=document.createElement("div");Ba.style.display="inline-block";Ba.style.width="6px";Ba.style.height="6px";Ba.style.marginLeft="4px";Ba.style.marginRight="3px";Ba.style.borderRadius="3px";Ba.style.cursor="pointer";Ba.style.background="transparent";Ba.style.border="1px solid #b5b6b7";mxUtils.bind(this,
+function(Ca){mxEvent.addListener(Ba,"click",mxUtils.bind(this,function(){sa(Ca)}))})(va);na.push(Ba);Z.appendChild(Ba)}var sa=mxUtils.bind(this,function(Ca){null!=na[Ca]&&(null!=this.format.currentScheme&&null!=na[this.format.currentScheme]&&(na[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ca,Da(this.defaultColorSchemes[this.format.currentScheme]),na[this.format.currentScheme].style.background="#84d7ff")}),Da=mxUtils.bind(this,function(Ca){var Qa=mxUtils.bind(this,
+function(cb){var Ka=mxUtils.button("",mxUtils.bind(this,function(z){W.getModel().beginUpdate();try{for(var L=N.getSelectionState().cells,M=0;M<L.length;M++){for(var S=W.getModel().getStyle(L[M]),ca=0;ca<Q.length;ca++)S=mxUtils.removeStylename(S,Q[ca]);var ha=W.getModel().isVertex(L[M])?W.defaultVertexStyle:W.defaultEdgeStyle;null!=cb?(mxEvent.isShiftDown(z)||(S=""==cb.fill?mxUtils.setStyle(S,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(S,mxConstants.STYLE_FILLCOLOR,cb.fill||mxUtils.getValue(ha,
+mxConstants.STYLE_FILLCOLOR,null)),S=mxUtils.setStyle(S,mxConstants.STYLE_GRADIENTCOLOR,cb.gradient||mxUtils.getValue(ha,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(z)||mxClient.IS_MAC&&mxEvent.isMetaDown(z)||!W.getModel().isVertex(L[M])||(S=mxUtils.setStyle(S,mxConstants.STYLE_FONTCOLOR,cb.font||mxUtils.getValue(ha,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(z)||(S=""==cb.stroke?mxUtils.setStyle(S,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(S,mxConstants.STYLE_STROKECOLOR,
+cb.stroke||mxUtils.getValue(ha,mxConstants.STYLE_STROKECOLOR,null)))):(S=mxUtils.setStyle(S,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(ha,mxConstants.STYLE_FILLCOLOR,"#ffffff")),S=mxUtils.setStyle(S,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(ha,mxConstants.STYLE_STROKECOLOR,"#000000")),S=mxUtils.setStyle(S,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(ha,mxConstants.STYLE_GRADIENTCOLOR,null)),W.getModel().isVertex(L[M])&&(S=mxUtils.setStyle(S,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(ha,
+mxConstants.STYLE_FONTCOLOR,null))));W.getModel().setStyle(L[M],S)}}finally{W.getModel().endUpdate()}}));Ka.className="geStyleButton";Ka.style.width="36px";Ka.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ka.style.margin="0px 6px 6px 0px";if(null!=cb){var Ua="1"==urlParams.sketch?"2px solid":"1px solid";null!=cb.gradient?mxClient.IS_IE&&10>document.documentMode?Ka.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+cb.fill+"', EndColorStr='"+cb.gradient+"', GradientType=0)":
+Ka.style.backgroundImage="linear-gradient("+cb.fill+" 0px,"+cb.gradient+" 100%)":cb.fill==mxConstants.NONE?Ka.style.background="url('"+Dialog.prototype.noColorImage+"')":Ka.style.backgroundColor=""==cb.fill?mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):cb.fill||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ka.style.border=cb.stroke==mxConstants.NONE?Ua+" transparent":
+""==cb.stroke?Ua+" "+mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ua+" "+(cb.stroke||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=cb.title&&Ka.setAttribute("title",cb.title)}else{Ua=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var $a=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Ka.style.backgroundColor=
+Ua;Ka.style.border="1px solid "+$a}Ka.style.borderRadius="0";T.appendChild(Ka)});T.innerHTML="";for(var Za=0;Za<Ca.length;Za++)0<Za&&0==mxUtils.mod(Za,4)&&mxUtils.br(T),Qa(Ca[Za])});null==this.format.currentScheme?sa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):sa(this.format.currentScheme);va=10>=this.defaultColorSchemes.length?28:8;var Aa=document.createElement("div");Aa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var za=document.createElement("div");za.style.cssText="position:absolute;left:202px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(u.appendChild(Aa),u.appendChild(za));mxEvent.addListener(za,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));I(Aa);I(za);Da(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&u.appendChild(Z);return u};StyleFormatPanel.prototype.addEditOps=function(u){var I=this.editorUi.getSelectionState(),N=this.editorUi.editor.graph,W=null;1==I.cells.length&&(W=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(T){this.editorUi.actions.get("editStyle").funct()})),W.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),W.style.width="210px",W.style.marginBottom="2px",u.appendChild(W));N=1==I.cells.length?N.view.getState(I.cells[0]):null;null!=N&&null!=N.shape&&null!=N.shape.stencil?(I=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(T){this.editorUi.actions.get("editShape").funct()})),I.setAttribute("title",
+mxResources.get("editShape")),I.style.marginBottom="2px",null==W?I.style.width="210px":(W.style.width="104px",I.style.width="104px",I.style.marginLeft="2px"),u.appendChild(I)):I.image&&0<I.cells.length&&(I=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(T){this.editorUi.actions.get("image").funct()})),I.setAttribute("title",mxResources.get("editImage")),I.style.marginBottom="2px",null==W?I.style.width="210px":(W.style.width="104px",I.style.width="104px",I.style.marginLeft="2px"),
+u.appendChild(I));return u}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(u){return u.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(u){return Graph.isGoogleFontUrl(u)};Graph.createFontElement=function(u,
+I){var N=Graph.fontMapping[I];null==N&&Graph.isCssFontUrl(I)?(u=document.createElement("link"),u.setAttribute("rel","stylesheet"),u.setAttribute("type","text/css"),u.setAttribute("charset","UTF-8"),u.setAttribute("href",I)):(null==N&&(N='@font-face {\nfont-family: "'+u+'";\nsrc: url("'+I+'");\n}'),u=document.createElement("style"),mxUtils.write(u,N));return u};Graph.addFont=function(u,I,N){if(null!=u&&0<u.length&&null!=I&&0<I.length){var W=u.toLowerCase();if("helvetica"!=W&&"arial"!=u&&"sans-serif"!=
+W){var T=Graph.customFontElements[W];null!=T&&T.url!=I&&(T.elt.parentNode.removeChild(T.elt),T=null);null==T?(T=I,"http:"==I.substring(0,5)&&(T=PROXY_URL+"?url="+encodeURIComponent(I)),T={name:u,url:I,elt:Graph.createFontElement(u,T)},Graph.customFontElements[W]=T,Graph.recentCustomFonts[W]=T,I=document.getElementsByTagName("head")[0],null!=N&&("link"==T.elt.nodeName.toLowerCase()?(T.elt.onload=N,T.elt.onerror=N):N()),null!=I&&I.appendChild(T.elt)):null!=N&&N()}else null!=N&&N()}else null!=N&&N();
+return u};Graph.getFontUrl=function(u,I){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(I=u.url);return I};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var I=0;I<u.length;I++){var N=u[I].getAttribute("data-font-src");if(null!=N){var W="FONT"==u[I].nodeName?u[I].getAttribute("face"):u[I].style.fontFamily;null!=W&&Graph.addFont(W,N)}}};Graph.processFontStyle=function(u){if(null!=u){var I=mxUtils.getValue(u,"fontSource",null);if(null!=I){var N=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY,
+null);null!=N&&Graph.addFont(N,decodeURIComponent(I))}}return u};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var H=Graph.prototype.init;Graph.prototype.init=function(){function u(T){I=T}H.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var I=null;mxEvent.addListener(this.container,"mouseenter",u);mxEvent.addListener(this.container,"mousemove",u);mxEvent.addListener(this.container,"mouseleave",function(T){I=null});this.isMouseInsertPoint=function(){return null!=I};var N=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=I?this.getPointForEvent(I):N.apply(this,arguments)};var W=this.layoutManager.getLayout;this.layoutManager.getLayout=function(T){var Q=this.graph.getCellStyle(T);if(null!=Q&&"rack"==Q.childLayout){var Z=new mxStackLayout(this.graph,!1);Z.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;Z.marginLeft=Q.marginLeft||0;Z.marginRight=Q.marginRight||0;Z.marginTop=Q.marginTop||0;Z.marginBottom=
+Q.marginBottom||0;Z.allowGaps=Q.allowGaps||0;Z.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");Z.resizeParent=!1;Z.fill=!0;return Z}return W.apply(this,arguments)};this.updateGlobalUrlVariables()};var G=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,I){return Graph.processFontStyle(G.apply(this,arguments))};var aa=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,I,N,W,T,Q,Z,na,va,Ba,sa){aa.apply(this,arguments);
+Graph.processFontAttributes(sa)};var da=mxText.prototype.redraw;mxText.prototype.redraw=function(){da.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,I,N){function W(){for(var Ca=Z.getSelectionCells(),Qa=[],Za=0;Za<Ca.length;Za++)Z.isCellVisible(Ca[Za])&&Qa.push(Ca[Za]);Z.setSelectionCells(Qa)}function T(Ca){Z.setHiddenTags(Ca?[]:na.slice());W();Z.refresh()}function Q(Ca,Qa){Ba.innerHTML="";if(0<
+Ca.length){var Za=document.createElement("table");Za.setAttribute("cellpadding","2");Za.style.boxSizing="border-box";Za.style.tableLayout="fixed";Za.style.width="100%";var cb=document.createElement("tbody");if(null!=Ca&&0<Ca.length)for(var Ka=0;Ka<Ca.length;Ka++)(function(Ua){var $a=0>mxUtils.indexOf(Z.hiddenTags,Ua),z=document.createElement("tr"),L=document.createElement("td");L.style.align="center";L.style.width="16px";var M=document.createElement("img");M.setAttribute("src",$a?Editor.visibleImage:
+Editor.hiddenImage);M.setAttribute("title",mxResources.get($a?"hideIt":"show",[Ua]));mxUtils.setOpacity(M,$a?75:25);M.style.verticalAlign="middle";M.style.cursor="pointer";M.style.width="16px";if(I||Editor.isDarkMode())M.style.filter="invert(100%)";L.appendChild(M);mxEvent.addListener(M,"click",function(ca){mxEvent.isShiftDown(ca)?T(0<=mxUtils.indexOf(Z.hiddenTags,Ua)):(Z.toggleHiddenTag(Ua),W(),Z.refresh());mxEvent.consume(ca)});z.appendChild(L);L=document.createElement("td");L.style.overflow="hidden";
+L.style.whiteSpace="nowrap";L.style.textOverflow="ellipsis";L.style.verticalAlign="middle";L.style.cursor="pointer";L.setAttribute("title",Ua);a=document.createElement("a");mxUtils.write(a,Ua);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,$a?100:40);L.appendChild(a);mxEvent.addListener(L,"click",function(ca){if(mxEvent.isShiftDown(ca)){T(!0);var ha=Z.getCellsForTags([Ua],null,null,!0);Z.isEnabled()?Z.setSelectionCells(ha):Z.highlightCells(ha)}else if($a&&0<Z.hiddenTags.length)T(!0);
+else{ha=na.slice();var oa=mxUtils.indexOf(ha,Ua);ha.splice(oa,1);Z.setHiddenTags(ha);W();Z.refresh()}mxEvent.consume(ca)});z.appendChild(L);if(Z.isEnabled()){L=document.createElement("td");L.style.verticalAlign="middle";L.style.textAlign="center";L.style.width="18px";if(null==Qa){L.style.align="center";L.style.width="16px";M=document.createElement("img");M.setAttribute("src",Editor.crossImage);M.setAttribute("title",mxResources.get("removeIt",[Ua]));mxUtils.setOpacity(M,$a?75:25);M.style.verticalAlign=
+"middle";M.style.cursor="pointer";M.style.width="16px";if(I||Editor.isDarkMode())M.style.filter="invert(100%)";mxEvent.addListener(M,"click",function(ca){var ha=mxUtils.indexOf(na,Ua);0<=ha&&na.splice(ha,1);Z.removeTagsForCells(Z.model.getDescendants(Z.model.getRoot()),[Ua]);Z.refresh();mxEvent.consume(ca)});L.appendChild(M)}else{var S=document.createElement("input");S.setAttribute("type","checkbox");S.style.margin="0px";S.defaultChecked=null!=Qa&&0<=mxUtils.indexOf(Qa,Ua);S.checked=S.defaultChecked;
+S.style.background="transparent";S.setAttribute("title",mxResources.get(S.defaultChecked?"removeIt":"add",[Ua]));mxEvent.addListener(S,"change",function(ca){S.checked?Z.addTagsForCells(Z.getSelectionCells(),[Ua]):Z.removeTagsForCells(Z.getSelectionCells(),[Ua]);mxEvent.consume(ca)});L.appendChild(S)}z.appendChild(L)}cb.appendChild(z)})(Ca[Ka]);Za.appendChild(cb);Ba.appendChild(Za)}}var Z=this,na=Z.hiddenTags.slice(),va=document.createElement("div");va.style.userSelect="none";va.style.overflow="hidden";
+va.style.padding="10px";va.style.height="100%";var Ba=document.createElement("div");Ba.style.boxSizing="border-box";Ba.style.borderRadius="4px";Ba.style.userSelect="none";Ba.style.overflow="auto";Ba.style.position="absolute";Ba.style.left="10px";Ba.style.right="10px";Ba.style.top="10px";Ba.style.border=Z.isEnabled()?"1px solid #808080":"none";Ba.style.bottom=Z.isEnabled()?"48px":"10px";va.appendChild(Ba);var sa=mxUtils.button(mxResources.get("reset"),function(Ca){Z.setHiddenTags([]);mxEvent.isShiftDown(Ca)||
+(na=Z.hiddenTags.slice());W();Z.refresh()});sa.setAttribute("title",mxResources.get("reset"));sa.className="geBtn";sa.style.margin="0 4px 0 0";var Da=mxUtils.button(mxResources.get("add"),function(){null!=N&&N(na,function(Ca){na=Ca;Aa()})});Da.setAttribute("title",mxResources.get("add"));Da.className="geBtn";Da.style.margin="0";Z.addListener(mxEvent.ROOT,function(){na=Z.hiddenTags.slice()});var Aa=mxUtils.bind(this,function(Ca,Qa){if(u()){Ca=Z.getAllTags();for(Qa=0;Qa<Ca.length;Qa++)0>mxUtils.indexOf(na,
+Ca[Qa])&&na.push(Ca[Qa]);na.sort();Z.isSelectionEmpty()?Q(na):Q(na,Z.getCommonTagsForCells(Z.getSelectionCells()))}});Z.selectionModel.addListener(mxEvent.CHANGE,Aa);Z.model.addListener(mxEvent.CHANGE,Aa);Z.addListener(mxEvent.REFRESH,Aa);var za=document.createElement("div");za.style.boxSizing="border-box";za.style.whiteSpace="nowrap";za.style.position="absolute";za.style.overflow="hidden";za.style.bottom="0px";za.style.height="42px";za.style.right="10px";za.style.left="10px";Z.isEnabled()&&(za.appendChild(sa),
+za.appendChild(Da),va.appendChild(za));return{div:va,refresh:Aa}};Graph.prototype.getCustomFonts=function(){var u=this.extFonts;u=null!=u?u.slice():[];for(var I in Graph.customFontElements){var N=Graph.customFontElements[I];u.push({name:N.name,url:N.url})}return u};Graph.prototype.setFont=function(u,I){Graph.addFont(u,I);document.execCommand("fontname",!1,u);if(null!=I){var N=this.cellEditor.textarea.getElementsByTagName("font");I=Graph.getFontUrl(u,I);for(var W=0;W<N.length;W++)N[W].getAttribute("face")==
+u&&N[W].getAttribute("data-font-src")!=I&&N[W].setAttribute("data-font-src",I)}};var ba=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return ba.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var u=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=u)for(var I in u)this.globalVars[I]=
+u[I]}catch(N){null!=window.console&&console.log("Error in vars URL parameter: "+N)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var Y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var I=Y.apply(this,arguments);null==I&&null!=this.globalVars&&(I=this.globalVars[u]);return I};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=this.themes["default-style2"];this.defaultStylesheet=
+(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var pa=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,I,N,W,T,Q,Z,na,va,Ba,sa,Da,Aa,za){var Ca=null,Qa=null,Za=null;Da||null==this.themes||"darkTheme"!=this.defaultThemeName||(Ca=this.stylesheet,Qa=this.shapeForegroundColor,Za=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
+"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var cb=pa.apply(this,arguments),Ka=this.getCustomFonts();if(sa&&0<Ka.length){var Ua=cb.ownerDocument,$a=null!=Ua.createElementNS?Ua.createElementNS(mxConstants.NS_SVG,"style"):Ua.createElement("style");null!=Ua.setAttributeNS?$a.setAttributeNS("type","text/css"):$a.setAttribute("type","text/css");for(var z="",L="",M=0;M<Ka.length;M++){var S=Ka[M].name,ca=Ka[M].url;Graph.isCssFontUrl(ca)?
+z+="@import url("+ca+");\n":L+='@font-face {\nfont-family: "'+S+'";\nsrc: url("'+ca+'");\n}\n'}$a.appendChild(Ua.createTextNode(z+L));cb.getElementsByTagName("defs")[0].appendChild($a)}null!=Ca&&(this.shapeBackgroundColor=Za,this.shapeForegroundColor=Qa,this.stylesheet=Ca,this.refresh());return cb};var O=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var u=O.apply(this,arguments);if(this.mathEnabled){var I=u.drawText;u.drawText=function(N,W){if(null!=N.text&&
+null!=N.text.value&&N.text.checkBounds()&&(mxUtils.isNode(N.text.value)||N.text.dialect==mxConstants.DIALECT_STRICTHTML)){var T=N.text.getContentNode();if(null!=T){T=T.cloneNode(!0);if(T.getElementsByTagNameNS)for(var Q=T.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<Q.length;)Q[0].parentNode.removeChild(Q[0]);null!=T.innerHTML&&(Q=N.text.value,N.text.value=T.innerHTML,I.apply(this,arguments),N.text.value=Q)}}else I.apply(this,arguments)}}return u};var X=mxCellRenderer.prototype.destroy;
mxCellRenderer.prototype.destroy=function(u){X.apply(this,arguments);null!=u.secondLabel&&(u.secondLabel.destroy(),u.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(u){return[u.shape,u.text,u.secondLabel,u.control]};var ea=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ea.apply(this,arguments);this.enumerationState=0};var ka=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(u){null!=u.shape&&
-this.redrawEnumerationState(u);return ka.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(u){u=decodeURIComponent(mxUtils.getValue(u.style,"enumerateValue",""));""==u&&(u=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(u)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(u){var J="1"==mxUtils.getValue(u.style,"enumerate",0);J&&null==u.secondLabel?(u.secondLabel=new mxText("",
-new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),u.secondLabel.size=12,u.secondLabel.state=u,u.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(u,u.secondLabel)):J||null==u.secondLabel||(u.secondLabel.destroy(),u.secondLabel=null);J=u.secondLabel;if(null!=J){var N=u.view.scale,W=this.createEnumerationValue(u);u=this.graph.model.isVertex(u.cell)?new mxRectangle(u.x+u.width-4*N,u.y+4*N,0,0):mxRectangle.fromPoint(u.view.getPoint(u));J.bounds.equals(u)&&
-J.value==W&&J.scale==N||(J.bounds=u,J.value=W,J.scale=N,J.redraw())}};var ja=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){ja.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var u=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&
+this.redrawEnumerationState(u);return ka.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(u){u=decodeURIComponent(mxUtils.getValue(u.style,"enumerateValue",""));""==u&&(u=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(u)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(u){var I="1"==mxUtils.getValue(u.style,"enumerate",0);I&&null==u.secondLabel?(u.secondLabel=new mxText("",
+new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),u.secondLabel.size=12,u.secondLabel.state=u,u.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(u,u.secondLabel)):I||null==u.secondLabel||(u.secondLabel.destroy(),u.secondLabel=null);I=u.secondLabel;if(null!=I){var N=u.view.scale,W=this.createEnumerationValue(u);u=this.graph.model.isVertex(u.cell)?new mxRectangle(u.x+u.width-4*N,u.y+4*N,0,0):mxRectangle.fromPoint(u.view.getPoint(u));I.bounds.equals(u)&&
+I.value==W&&I.scale==N||(I.bounds=u,I.value=W,I.scale=N,I.redraw())}};var ja=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){ja.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var u=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&
("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",u.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,u.ownerSVGElement))}};var U=Graph.prototype.refresh;
-Graph.prototype.refresh=function(){U.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var I=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){I.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(u){"data:action/json,"==u.substring(0,
-17)&&(u=JSON.parse(u.substring(17)),null!=u.actions&&this.executeCustomActions(u.actions))};Graph.prototype.executeCustomActions=function(u,J){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var N=!1,W=0,T=0,Q=mxUtils.bind(this,function(){N||(N=
-!0,this.model.beginUpdate())}),Z=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),oa=mxUtils.bind(this,function(){0<W&&W--;0==W&&wa()}),wa=mxUtils.bind(this,function(){if(T<u.length){var Aa=this.stoppingCustomActions,ta=u[T++],Ba=[];if(null!=ta.open)if(Z(),this.isCustomLink(ta.open)){if(!this.customLinkClicked(ta.open))return}else this.openLink(ta.open);null==ta.wait||Aa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=
-null;oa()}),W++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=ta.wait?parseInt(ta.wait):1E3),Z());null!=ta.opacity&&null!=ta.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(ta.opacity,!0)),ta.opacity.value);null!=ta.fadeIn&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ta.fadeIn,!0)),0,1,oa,Aa?0:ta.fadeIn.delay));null!=ta.fadeOut&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ta.fadeOut,!0)),
-1,0,oa,Aa?0:ta.fadeOut.delay));null!=ta.wipeIn&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(ta.wipeIn,!0),!0)));null!=ta.wipeOut&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(ta.wipeOut,!0),!1)));null!=ta.toggle&&(Q(),this.toggleCells(this.getCellsForAction(ta.toggle,!0)));if(null!=ta.show){Q();var va=this.getCellsForAction(ta.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(va),1);this.setCellsVisible(va,!0)}null!=ta.hide&&(Q(),va=this.getCellsForAction(ta.hide,
-!0),Graph.setOpacityForNodes(this.getNodesForCells(va),0),this.setCellsVisible(va,!1));null!=ta.toggleStyle&&null!=ta.toggleStyle.key&&(Q(),this.toggleCellStyles(ta.toggleStyle.key,null!=ta.toggleStyle.defaultValue?ta.toggleStyle.defaultValue:"0",this.getCellsForAction(ta.toggleStyle,!0)));null!=ta.style&&null!=ta.style.key&&(Q(),this.setCellStyles(ta.style.key,ta.style.value,this.getCellsForAction(ta.style,!0)));va=[];null!=ta.select&&this.isEnabled()&&(va=this.getCellsForAction(ta.select),this.setSelectionCells(va));
-null!=ta.highlight&&(va=this.getCellsForAction(ta.highlight),this.highlightCells(va,ta.highlight.color,ta.highlight.duration,ta.highlight.opacity));null!=ta.scroll&&(va=this.getCellsForAction(ta.scroll));null!=ta.viewbox&&this.fitWindow(ta.viewbox,ta.viewbox.border);0<va.length&&this.scrollCellToVisible(va[0]);if(null!=ta.tags){va=[];null!=ta.tags.hidden&&(va=va.concat(ta.tags.hidden));if(null!=ta.tags.visible)for(var Oa=this.getAllTags(),Ca=0;Ca<Oa.length;Ca++)0>mxUtils.indexOf(ta.tags.visible,Oa[Ca])&&
-0>mxUtils.indexOf(va,Oa[Ca])&&va.push(Oa[Ca]);this.setHiddenTags(va);this.refresh()}0<Ba.length&&(W++,this.executeAnimations(Ba,oa,Aa?1:ta.steps,Aa?0:ta.delay));0==W?wa():Z()}else this.stoppingCustomActions=this.executingCustomActions=!1,Z(),null!=J&&J()});wa()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,J){var N=this.getLinkForCell(J);null!=N&&"data:action/json,"==N.substring(0,17)&&this.setLinkForCell(J,this.updateCustomLink(u,N));if(this.isHtmlLabel(J)){var W=document.createElement("div");
-W.innerHTML=this.sanitizeHtml(this.getLabel(J));for(var T=W.getElementsByTagName("a"),Q=!1,Z=0;Z<T.length;Z++)N=T[Z].getAttribute("href"),null!=N&&"data:action/json,"==N.substring(0,17)&&(T[Z].setAttribute("href",this.updateCustomLink(u,N)),Q=!0);Q&&this.labelChanged(J,W.innerHTML)}};Graph.prototype.updateCustomLink=function(u,J){if("data:action/json,"==J.substring(0,17))try{var N=JSON.parse(J.substring(17));null!=N.actions&&(this.updateCustomLinkActions(u,N.actions),J="data:action/json,"+JSON.stringify(N))}catch(W){}return J};
-Graph.prototype.updateCustomLinkActions=function(u,J){for(var N=0;N<J.length;N++){var W=J[N],T;for(T in W)this.updateCustomLinkAction(u,W[T],"cells"),this.updateCustomLinkAction(u,W[T],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,J,N){if(null!=J&&null!=J[N]){for(var W=[],T=0;T<J[N].length;T++)if("*"==J[N][T])W.push(J[N][T]);else{var Q=u[J[N][T]];null!=Q?""!=Q&&W.push(Q):W.push(J[N][T])}J[N]=W}};Graph.prototype.getCellsForAction=function(u,J){J=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,
-null,J));if(null!=u.excludeCells){for(var N=[],W=0;W<J.length;W++)0>u.excludeCells.indexOf(J[W].id)&&N.push(J[W]);J=N}return J};Graph.prototype.getCellsById=function(u){var J=[];if(null!=u)for(var N=0;N<u.length;N++)if("*"==u[N]){var W=this.model.getRoot();J=J.concat(this.model.filterDescendants(function(Q){return Q!=W},W))}else{var T=this.model.getCell(u[N]);null!=T&&J.push(T)}return J};var V=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return V.apply(this,arguments)&&
-!this.isAllTagsHidden(this.getTagsForCell(u))};Graph.prototype.setHiddenTags=function(u){this.hiddenTags=u;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(u){var J=mxUtils.indexOf(this.hiddenTags,u);0>J?this.hiddenTags.push(u):0<=J&&this.hiddenTags.splice(J,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(u){if(null==u||0==u.length||0==this.hiddenTags.length)return!1;u=u.split(" ");if(u.length>this.hiddenTags.length)return!1;
-for(var J=0;J<u.length;J++)if(0>mxUtils.indexOf(this.hiddenTags,u[J]))return!1;return!0};Graph.prototype.getCellsForTags=function(u,J,N,W){var T=[];if(null!=u){J=null!=J?J:this.model.getDescendants(this.model.getRoot());for(var Q=0,Z={},oa=0;oa<u.length;oa++)0<u[oa].length&&(Z[u[oa]]=!0,Q++);for(oa=0;oa<J.length;oa++)if(N&&this.model.getParent(J[oa])==this.model.root||this.model.isVertex(J[oa])||this.model.isEdge(J[oa])){var wa=this.getTagsForCell(J[oa]),Aa=!1;if(0<wa.length&&(wa=wa.split(" "),wa.length>=
-u.length)){for(var ta=Aa=0;ta<wa.length&&Aa<Q;ta++)null!=Z[wa[ta]]&&Aa++;Aa=Aa==Q}Aa&&(1!=W||this.isCellVisible(J[oa]))&&T.push(J[oa])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(u){for(var J=null,N=[],W=0;W<u.length;W++){var T=this.getTagsForCell(u[W]);N=[];if(0<T.length){T=T.split(" ");for(var Q={},Z=0;Z<T.length;Z++)if(null==J||null!=J[T[Z]])Q[T[Z]]=!0,N.push(T[Z]);
-J=Q}else return[]}return N};Graph.prototype.getTagsForCells=function(u){for(var J=[],N={},W=0;W<u.length;W++){var T=this.getTagsForCell(u[W]);if(0<T.length){T=T.split(" ");for(var Q=0;Q<T.length;Q++)null==N[T[Q]]&&(N[T[Q]]=!0,J.push(T[Q]))}}return J};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,"tags","")};Graph.prototype.addTagsForCells=function(u,J){if(0<u.length&&0<J.length){this.model.beginUpdate();try{for(var N=0;N<u.length;N++){for(var W=this.getTagsForCell(u[N]),
-T=W.split(" "),Q=!1,Z=0;Z<J.length;Z++){var oa=mxUtils.trim(J[Z]);""!=oa&&0>mxUtils.indexOf(T,oa)&&(W=0<W.length?W+" "+oa:oa,Q=!0)}Q&&this.setAttributeForCell(u[N],"tags",W)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,J){if(0<u.length&&0<J.length){this.model.beginUpdate();try{for(var N=0;N<u.length;N++){var W=this.getTagsForCell(u[N]);if(0<W.length){for(var T=W.split(" "),Q=!1,Z=0;Z<J.length;Z++){var oa=mxUtils.indexOf(T,J[Z]);0<=oa&&(T.splice(oa,1),Q=!0)}Q&&this.setAttributeForCell(u[N],
-"tags",T.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(u){this.model.beginUpdate();try{for(var J=0;J<u.length;J++)this.model.setVisible(u[J],!this.model.isVisible(u[J]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(u,J){this.model.beginUpdate();try{for(var N=0;N<u.length;N++)this.model.setVisible(u[N],J)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(u,J,N,W){for(var T=0;T<u.length;T++)this.highlightCell(u[T],
-J,N,W)};Graph.prototype.highlightCell=function(u,J,N,W,T){J=null!=J?J:mxConstants.DEFAULT_VALID_COLOR;N=null!=N?N:1E3;u=this.view.getState(u);var Q=null;null!=u&&(T=null!=T?T:4,T=Math.max(T+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+T),Q=new mxCellHighlight(this,J,T,!1),null!=W&&(Q.opacity=W),Q.highlight(u),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,"transition","all 1200ms ease-in-out"),Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},
-1200)},N));return Q};Graph.prototype.addSvgShadow=function(u,J,N,W){N=null!=N?N:!1;W=null!=W?W:!0;var T=u.ownerDocument,Q=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"filter"):T.createElement("filter");Q.setAttribute("id",this.shadowId);var Z=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):T.createElement("feGaussianBlur");Z.setAttribute("in","SourceAlpha");Z.setAttribute("stdDeviation",this.svgShadowBlur);Z.setAttribute("result","blur");Q.appendChild(Z);
+Graph.prototype.refresh=function(){U.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var J=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){J.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(u){"data:action/json,"==u.substring(0,
+17)&&(u=JSON.parse(u.substring(17)),null!=u.actions&&this.executeCustomActions(u.actions))};Graph.prototype.executeCustomActions=function(u,I){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var N=!1,W=0,T=0,Q=mxUtils.bind(this,function(){N||(N=
+!0,this.model.beginUpdate())}),Z=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),na=mxUtils.bind(this,function(){0<W&&W--;0==W&&va()}),va=mxUtils.bind(this,function(){if(T<u.length){var Ba=this.stoppingCustomActions,sa=u[T++],Da=[];if(null!=sa.open)if(Z(),this.isCustomLink(sa.open)){if(!this.customLinkClicked(sa.open))return}else this.openLink(sa.open);null==sa.wait||Ba||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=
+null;na()}),W++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=sa.wait?parseInt(sa.wait):1E3),Z());null!=sa.opacity&&null!=sa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(sa.opacity,!0)),sa.opacity.value);null!=sa.fadeIn&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeIn,!0)),0,1,na,Ba?0:sa.fadeIn.delay));null!=sa.fadeOut&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeOut,!0)),
+1,0,na,Ba?0:sa.fadeOut.delay));null!=sa.wipeIn&&(Da=Da.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeIn,!0),!0)));null!=sa.wipeOut&&(Da=Da.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeOut,!0),!1)));null!=sa.toggle&&(Q(),this.toggleCells(this.getCellsForAction(sa.toggle,!0)));if(null!=sa.show){Q();var Aa=this.getCellsForAction(sa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Aa),1);this.setCellsVisible(Aa,!0)}null!=sa.hide&&(Q(),Aa=this.getCellsForAction(sa.hide,
+!0),Graph.setOpacityForNodes(this.getNodesForCells(Aa),0),this.setCellsVisible(Aa,!1));null!=sa.toggleStyle&&null!=sa.toggleStyle.key&&(Q(),this.toggleCellStyles(sa.toggleStyle.key,null!=sa.toggleStyle.defaultValue?sa.toggleStyle.defaultValue:"0",this.getCellsForAction(sa.toggleStyle,!0)));null!=sa.style&&null!=sa.style.key&&(Q(),this.setCellStyles(sa.style.key,sa.style.value,this.getCellsForAction(sa.style,!0)));Aa=[];null!=sa.select&&this.isEnabled()&&(Aa=this.getCellsForAction(sa.select),this.setSelectionCells(Aa));
+null!=sa.highlight&&(Aa=this.getCellsForAction(sa.highlight),this.highlightCells(Aa,sa.highlight.color,sa.highlight.duration,sa.highlight.opacity));null!=sa.scroll&&(Aa=this.getCellsForAction(sa.scroll));null!=sa.viewbox&&this.fitWindow(sa.viewbox,sa.viewbox.border);0<Aa.length&&this.scrollCellToVisible(Aa[0]);if(null!=sa.tags){Aa=[];null!=sa.tags.hidden&&(Aa=Aa.concat(sa.tags.hidden));if(null!=sa.tags.visible)for(var za=this.getAllTags(),Ca=0;Ca<za.length;Ca++)0>mxUtils.indexOf(sa.tags.visible,za[Ca])&&
+0>mxUtils.indexOf(Aa,za[Ca])&&Aa.push(za[Ca]);this.setHiddenTags(Aa);this.refresh()}0<Da.length&&(W++,this.executeAnimations(Da,na,Ba?1:sa.steps,Ba?0:sa.delay));0==W?va():Z()}else this.stoppingCustomActions=this.executingCustomActions=!1,Z(),null!=I&&I()});va()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,I){var N=this.getLinkForCell(I);null!=N&&"data:action/json,"==N.substring(0,17)&&this.setLinkForCell(I,this.updateCustomLink(u,N));if(this.isHtmlLabel(I)){var W=document.createElement("div");
+W.innerHTML=this.sanitizeHtml(this.getLabel(I));for(var T=W.getElementsByTagName("a"),Q=!1,Z=0;Z<T.length;Z++)N=T[Z].getAttribute("href"),null!=N&&"data:action/json,"==N.substring(0,17)&&(T[Z].setAttribute("href",this.updateCustomLink(u,N)),Q=!0);Q&&this.labelChanged(I,W.innerHTML)}};Graph.prototype.updateCustomLink=function(u,I){if("data:action/json,"==I.substring(0,17))try{var N=JSON.parse(I.substring(17));null!=N.actions&&(this.updateCustomLinkActions(u,N.actions),I="data:action/json,"+JSON.stringify(N))}catch(W){}return I};
+Graph.prototype.updateCustomLinkActions=function(u,I){for(var N=0;N<I.length;N++){var W=I[N],T;for(T in W)this.updateCustomLinkAction(u,W[T],"cells"),this.updateCustomLinkAction(u,W[T],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,I,N){if(null!=I&&null!=I[N]){for(var W=[],T=0;T<I[N].length;T++)if("*"==I[N][T])W.push(I[N][T]);else{var Q=u[I[N][T]];null!=Q?""!=Q&&W.push(Q):W.push(I[N][T])}I[N]=W}};Graph.prototype.getCellsForAction=function(u,I){I=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,
+null,I));if(null!=u.excludeCells){for(var N=[],W=0;W<I.length;W++)0>u.excludeCells.indexOf(I[W].id)&&N.push(I[W]);I=N}return I};Graph.prototype.getCellsById=function(u){var I=[];if(null!=u)for(var N=0;N<u.length;N++)if("*"==u[N]){var W=this.model.getRoot();I=I.concat(this.model.filterDescendants(function(Q){return Q!=W},W))}else{var T=this.model.getCell(u[N]);null!=T&&I.push(T)}return I};var V=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return V.apply(this,arguments)&&
+!this.isAllTagsHidden(this.getTagsForCell(u))};Graph.prototype.setHiddenTags=function(u){this.hiddenTags=u;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(u){var I=mxUtils.indexOf(this.hiddenTags,u);0>I?this.hiddenTags.push(u):0<=I&&this.hiddenTags.splice(I,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(u){if(null==u||0==u.length||0==this.hiddenTags.length)return!1;u=u.split(" ");if(u.length>this.hiddenTags.length)return!1;
+for(var I=0;I<u.length;I++)if(0>mxUtils.indexOf(this.hiddenTags,u[I]))return!1;return!0};Graph.prototype.getCellsForTags=function(u,I,N,W){var T=[];if(null!=u){I=null!=I?I:this.model.getDescendants(this.model.getRoot());for(var Q=0,Z={},na=0;na<u.length;na++)0<u[na].length&&(Z[u[na]]=!0,Q++);for(na=0;na<I.length;na++)if(N&&this.model.getParent(I[na])==this.model.root||this.model.isVertex(I[na])||this.model.isEdge(I[na])){var va=this.getTagsForCell(I[na]),Ba=!1;if(0<va.length&&(va=va.split(" "),va.length>=
+u.length)){for(var sa=Ba=0;sa<va.length&&Ba<Q;sa++)null!=Z[va[sa]]&&Ba++;Ba=Ba==Q}Ba&&(1!=W||this.isCellVisible(I[na]))&&T.push(I[na])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(u){for(var I=null,N=[],W=0;W<u.length;W++){var T=this.getTagsForCell(u[W]);N=[];if(0<T.length){T=T.split(" ");for(var Q={},Z=0;Z<T.length;Z++)if(null==I||null!=I[T[Z]])Q[T[Z]]=!0,N.push(T[Z]);
+I=Q}else return[]}return N};Graph.prototype.getTagsForCells=function(u){for(var I=[],N={},W=0;W<u.length;W++){var T=this.getTagsForCell(u[W]);if(0<T.length){T=T.split(" ");for(var Q=0;Q<T.length;Q++)null==N[T[Q]]&&(N[T[Q]]=!0,I.push(T[Q]))}}return I};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,"tags","")};Graph.prototype.addTagsForCells=function(u,I){if(0<u.length&&0<I.length){this.model.beginUpdate();try{for(var N=0;N<u.length;N++){for(var W=this.getTagsForCell(u[N]),
+T=W.split(" "),Q=!1,Z=0;Z<I.length;Z++){var na=mxUtils.trim(I[Z]);""!=na&&0>mxUtils.indexOf(T,na)&&(W=0<W.length?W+" "+na:na,Q=!0)}Q&&this.setAttributeForCell(u[N],"tags",W)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,I){if(0<u.length&&0<I.length){this.model.beginUpdate();try{for(var N=0;N<u.length;N++){var W=this.getTagsForCell(u[N]);if(0<W.length){for(var T=W.split(" "),Q=!1,Z=0;Z<I.length;Z++){var na=mxUtils.indexOf(T,I[Z]);0<=na&&(T.splice(na,1),Q=!0)}Q&&this.setAttributeForCell(u[N],
+"tags",T.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(u){this.model.beginUpdate();try{for(var I=0;I<u.length;I++)this.model.setVisible(u[I],!this.model.isVisible(u[I]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(u,I){this.model.beginUpdate();try{for(var N=0;N<u.length;N++)this.model.setVisible(u[N],I)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(u,I,N,W){for(var T=0;T<u.length;T++)this.highlightCell(u[T],
+I,N,W)};Graph.prototype.highlightCell=function(u,I,N,W,T){I=null!=I?I:mxConstants.DEFAULT_VALID_COLOR;N=null!=N?N:1E3;u=this.view.getState(u);var Q=null;null!=u&&(T=null!=T?T:4,T=Math.max(T+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+T),Q=new mxCellHighlight(this,I,T,!1),null!=W&&(Q.opacity=W),Q.highlight(u),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,"transition","all 1200ms ease-in-out"),Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},
+1200)},N));return Q};Graph.prototype.addSvgShadow=function(u,I,N,W){N=null!=N?N:!1;W=null!=W?W:!0;var T=u.ownerDocument,Q=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"filter"):T.createElement("filter");Q.setAttribute("id",this.shadowId);var Z=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):T.createElement("feGaussianBlur");Z.setAttribute("in","SourceAlpha");Z.setAttribute("stdDeviation",this.svgShadowBlur);Z.setAttribute("result","blur");Q.appendChild(Z);
Z=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feOffset"):T.createElement("feOffset");Z.setAttribute("in","blur");Z.setAttribute("dx",this.svgShadowSize);Z.setAttribute("dy",this.svgShadowSize);Z.setAttribute("result","offsetBlur");Q.appendChild(Z);Z=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feFlood"):T.createElement("feFlood");Z.setAttribute("flood-color",this.svgShadowColor);Z.setAttribute("flood-opacity",this.svgShadowOpacity);Z.setAttribute("result","offsetColor");
Q.appendChild(Z);Z=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feComposite"):T.createElement("feComposite");Z.setAttribute("in","offsetColor");Z.setAttribute("in2","offsetBlur");Z.setAttribute("operator","in");Z.setAttribute("result","offsetBlur");Q.appendChild(Z);Z=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feBlend"):T.createElement("feBlend");Z.setAttribute("in","SourceGraphic");Z.setAttribute("in2","offsetBlur");Q.appendChild(Z);Z=u.getElementsByTagName("defs");
-0==Z.length?(T=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=u.firstChild?u.insertBefore(T,u.firstChild):u.appendChild(T)):T=Z[0];T.appendChild(Q);N||(J=null!=J?J:u.getElementsByTagName("g")[0],null!=J&&(J.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(u.getAttribute("width")))&&W&&(u.setAttribute("width",parseInt(u.getAttribute("width"))+6),u.setAttribute("height",parseInt(u.getAttribute("height"))+6),J=u.getAttribute("viewBox"),
-null!=J&&0<J.length&&(J=J.split(" "),3<J.length&&(w=parseFloat(J[2])+6,h=parseFloat(J[3])+6,u.setAttribute("viewBox",J[0]+" "+J[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(u,J){mxClient.IS_SVG&&!mxClient.IS_SF&&(J=null!=J?J:!0,(this.shadowVisible=u)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),J&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
-function(){if(null==this.defaultParent){var u=this.model.getChildCount(this.model.root),J=0;do var N=this.model.getChildAt(this.model.root,J);while(J++<u&&"1"==mxUtils.getValue(this.getCellStyle(N),"locked","0"));null!=N&&this.setDefaultParent(N)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
+0==Z.length?(T=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=u.firstChild?u.insertBefore(T,u.firstChild):u.appendChild(T)):T=Z[0];T.appendChild(Q);N||(I=null!=I?I:u.getElementsByTagName("g")[0],null!=I&&(I.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(u.getAttribute("width")))&&W&&(u.setAttribute("width",parseInt(u.getAttribute("width"))+6),u.setAttribute("height",parseInt(u.getAttribute("height"))+6),I=u.getAttribute("viewBox"),
+null!=I&&0<I.length&&(I=I.split(" "),3<I.length&&(w=parseFloat(I[2])+6,h=parseFloat(I[3])+6,u.setAttribute("viewBox",I[0]+" "+I[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(u,I){mxClient.IS_SVG&&!mxClient.IS_SF&&(I=null!=I?I:!0,(this.shadowVisible=u)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),I&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
+function(){if(null==this.defaultParent){var u=this.model.getChildCount(this.model.root),I=0;do var N=this.model.getChildAt(this.model.root,I);while(I++<u&&"1"==mxUtils.getValue(this.getCellStyle(N),"locked","0"));null!=N&&this.setDefaultParent(N)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",
STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",
STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=
@@ -3328,36 +3328,36 @@ STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[S
STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];
mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=
[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+
-"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(u){var J=null;null!=u&&0<u.length&&("ER"==u.substring(0,2)?J="mxgraph.er":"sysML"==u.substring(0,5)&&(J="mxgraph.sysml"));return J};var P=mxMarker.createMarker;mxMarker.createMarker=
-function(u,J,N,W,T,Q,Z,oa,wa,Aa){if(null!=N&&null==mxMarker.markers[N]){var ta=this.getPackageForType(N);null!=ta&&mxStencilRegistry.getStencil(ta)}return P.apply(this,arguments)};var R=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(u,J,N,W,T,Q){"1"==mxUtils.getValue(J.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(J.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return R.apply(this,arguments)};PrintDialog.prototype.create=function(u,J){function N(){va.value=Math.max(1,
-Math.min(oa,Math.max(parseInt(va.value),parseInt(Ba.value))));Ba.value=Math.max(1,Math.min(oa,Math.min(parseInt(va.value),parseInt(Ba.value))))}function W(Ea){function Na(cb,eb,hb){var tb=cb.useCssTransforms,vb=cb.currentTranslate,qb=cb.currentScale,Ab=cb.view.translate,Bb=cb.view.scale;cb.useCssTransforms&&(cb.useCssTransforms=!1,cb.currentTranslate=new mxPoint(0,0),cb.currentScale=1,cb.view.translate=new mxPoint(0,0),cb.view.scale=1);var ub=cb.getGraphBounds(),kb=0,gb=0,lb=qa.get(),wb=1/cb.pageScale,
-rb=Ja.checked;if(rb){wb=parseInt(na.value);var xb=parseInt(ra.value);wb=Math.min(lb.height*xb/(ub.height/cb.view.scale),lb.width*wb/(ub.width/cb.view.scale))}else wb=parseInt(Va.value)/(100*cb.pageScale),isNaN(wb)&&(Pa=1/cb.pageScale,Va.value="100 %");lb=mxRectangle.fromRectangle(lb);lb.width=Math.ceil(lb.width*Pa);lb.height=Math.ceil(lb.height*Pa);wb*=Pa;!rb&&cb.pageVisible?(ub=cb.getPageLayout(),kb-=ub.x*lb.width,gb-=ub.y*lb.height):rb=!0;if(null==eb){eb=PrintDialog.createPrintPreview(cb,wb,lb,
-0,kb,gb,rb);eb.pageSelector=!1;eb.mathEnabled=!1;Oa.checked&&(eb.isCellVisible=function(ob){return cb.isCellSelected(ob)});kb=u.getCurrentFile();null!=kb&&(eb.title=kb.getTitle());var zb=eb.writeHead;eb.writeHead=function(ob){zb.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)ob.writeln('<style type="text/css">'),ob.writeln(Editor.mathJaxWebkitCss),ob.writeln("</style>");mxClient.IS_GC&&(ob.writeln('<style type="text/css">'),ob.writeln("@media print {"),ob.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),
-ob.writeln("}"),ob.writeln("</style>"));null!=u.editor.fontCss&&(ob.writeln('<style type="text/css">'),ob.writeln(u.editor.fontCss),ob.writeln("</style>"));for(var c=cb.getCustomFonts(),l=0;l<c.length;l++){var x=c[l].name,p=c[l].url;Graph.isCssFontUrl(p)?ob.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(p)+'" charset="UTF-8" type="text/css">'):(ob.writeln('<style type="text/css">'),ob.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(x)+'";\nsrc: url("'+mxUtils.htmlEntities(p)+
-'");\n}'),ob.writeln("</style>"))}};if("undefined"!==typeof MathJax){var yb=eb.renderPage;eb.renderPage=function(ob,c,l,x,p,v){var A=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!u.editor.useForeignObjectForMath?!0:u.editor.originalNoForeignObject;var B=yb.apply(this,arguments);mxClient.NO_FO=A;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:B.className="geDisableMathJax";return B}}kb=null;gb=T.shapeForegroundColor;rb=T.shapeBackgroundColor;lb=T.enableFlowAnimation;T.enableFlowAnimation=
-!1;null!=T.themes&&"darkTheme"==T.defaultThemeName&&(kb=T.stylesheet,T.stylesheet=T.getDefaultStylesheet(),T.shapeForegroundColor="#000000",T.shapeBackgroundColor="#ffffff",T.refresh());eb.open(null,null,hb,!0);T.enableFlowAnimation=lb;null!=kb&&(T.shapeForegroundColor=gb,T.shapeBackgroundColor=rb,T.stylesheet=kb,T.refresh())}else{lb=cb.background;if(null==lb||""==lb||lb==mxConstants.NONE)lb="#ffffff";eb.backgroundColor=lb;eb.autoOrigin=rb;eb.appendGraph(cb,wb,kb,gb,hb,!0);hb=cb.getCustomFonts();
-if(null!=eb.wnd)for(kb=0;kb<hb.length;kb++)gb=hb[kb].name,rb=hb[kb].url,Graph.isCssFontUrl(rb)?eb.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(rb)+'" charset="UTF-8" type="text/css">'):(eb.wnd.document.writeln('<style type="text/css">'),eb.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(gb)+'";\nsrc: url("'+mxUtils.htmlEntities(rb)+'");\n}'),eb.wnd.document.writeln("</style>"))}tb&&(cb.useCssTransforms=tb,cb.currentTranslate=vb,cb.currentScale=
-qb,cb.view.translate=Ab,cb.view.scale=Bb);return eb}var Pa=parseInt(ya.value)/100;isNaN(Pa)&&(Pa=1,ya.value="100 %");Pa*=.75;var Qa=null,Ua=T.shapeForegroundColor,La=T.shapeBackgroundColor;null!=T.themes&&"darkTheme"==T.defaultThemeName&&(Qa=T.stylesheet,T.stylesheet=T.getDefaultStylesheet(),T.shapeForegroundColor="#000000",T.shapeBackgroundColor="#ffffff",T.refresh());var ua=Ba.value,za=va.value,Ka=!Aa.checked,Ga=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,Aa.checked,ua,za,Ja.checked,
-na.value,ra.value,parseInt(Va.value)/100,parseInt(ya.value)/100,qa.get());else{Ka&&(Ka=Oa.checked||ua==wa&&za==wa);if(!Ka&&null!=u.pages&&u.pages.length){var Ma=0;Ka=u.pages.length-1;Aa.checked||(Ma=parseInt(ua)-1,Ka=parseInt(za)-1);for(var db=Ma;db<=Ka;db++){var Ra=u.pages[db];ua=Ra==u.currentPage?T:null;if(null==ua){ua=u.createTemporaryGraph(T.stylesheet);ua.shapeForegroundColor=T.shapeForegroundColor;ua.shapeBackgroundColor=T.shapeBackgroundColor;za=!0;Ma=!1;var ib=null,mb=null;null==Ra.viewState&&
-null==Ra.root&&u.updatePageRoot(Ra);null!=Ra.viewState&&(za=Ra.viewState.pageVisible,Ma=Ra.viewState.mathEnabled,ib=Ra.viewState.background,mb=Ra.viewState.backgroundImage,ua.extFonts=Ra.viewState.extFonts);null!=mb&&null!=mb.originalSrc&&(mb=u.createImageForPageLink(mb.originalSrc,Ra));ua.background=ib;ua.backgroundImage=null!=mb?new mxImage(mb.src,mb.width,mb.height,mb.x,mb.y):null;ua.pageVisible=za;ua.mathEnabled=Ma;var nb=ua.getGraphBounds;ua.getGraphBounds=function(){var cb=nb.apply(this,arguments),
-eb=this.backgroundImage;if(null!=eb&&null!=eb.width&&null!=eb.height){var hb=this.view.translate,tb=this.view.scale;cb=mxRectangle.fromRectangle(cb);cb.add(new mxRectangle((hb.x+eb.x)*tb,(hb.y+eb.y)*tb,eb.width*tb,eb.height*tb))}return cb};var pb=ua.getGlobalVariable;ua.getGlobalVariable=function(cb){return"page"==cb?Ra.getName():"pagenumber"==cb?db+1:"pagecount"==cb?null!=u.pages?u.pages.length:1:pb.apply(this,arguments)};document.body.appendChild(ua.container);u.updatePageRoot(Ra);ua.model.setRoot(Ra.root)}Ga=
-Na(ua,Ga,db!=Ka);ua!=T&&ua.container.parentNode.removeChild(ua.container)}}else Ga=Na(T);null==Ga?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(Ga.mathEnabled&&(Ka=Ga.wnd.document,Ea&&(Ga.wnd.IMMEDIATE_PRINT=!0),Ka.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Ga.closeDocument(),!Ga.mathEnabled&&Ea&&PrintDialog.printPreview(Ga));null!=Qa&&(T.shapeForegroundColor=Ua,T.shapeBackgroundColor=La,T.stylesheet=Qa,T.refresh())}}var T=
-u.editor.graph,Q=document.createElement("div"),Z=document.createElement("h3");Z.style.width="100%";Z.style.textAlign="center";Z.style.marginTop="0px";mxUtils.write(Z,J||mxResources.get("print"));Q.appendChild(Z);var oa=1,wa=1;Z=document.createElement("div");Z.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var Aa=document.createElement("input");Aa.style.cssText="margin-right:8px;margin-bottom:8px;";Aa.setAttribute("value","all");Aa.setAttribute("type","radio");
-Aa.setAttribute("name","pages-printdialog");Z.appendChild(Aa);J=document.createElement("span");mxUtils.write(J,mxResources.get("printAllPages"));Z.appendChild(J);mxUtils.br(Z);var ta=Aa.cloneNode(!0);Aa.setAttribute("checked","checked");ta.setAttribute("value","range");Z.appendChild(ta);J=document.createElement("span");mxUtils.write(J,mxResources.get("pages")+":");Z.appendChild(J);var Ba=document.createElement("input");Ba.style.cssText="margin:0 8px 0 8px;";Ba.setAttribute("value","1");Ba.setAttribute("type",
-"number");Ba.setAttribute("min","1");Ba.style.width="50px";Z.appendChild(Ba);J=document.createElement("span");mxUtils.write(J,mxResources.get("to"));Z.appendChild(J);var va=Ba.cloneNode(!0);Z.appendChild(va);mxEvent.addListener(Ba,"focus",function(){ta.checked=!0});mxEvent.addListener(va,"focus",function(){ta.checked=!0});mxEvent.addListener(Ba,"change",N);mxEvent.addListener(va,"change",N);if(null!=u.pages&&(oa=u.pages.length,null!=u.currentPage))for(J=0;J<u.pages.length;J++)if(u.currentPage==u.pages[J]){wa=
-J+1;Ba.value=wa;va.value=wa;break}Ba.setAttribute("max",oa);va.setAttribute("max",oa);u.isPagesEnabled()?1<oa&&(Q.appendChild(Z),ta.checked=!0):ta.checked=!0;mxUtils.br(Z);var Oa=document.createElement("input");Oa.setAttribute("value","all");Oa.setAttribute("type","radio");Oa.style.marginRight="8px";T.isSelectionEmpty()&&Oa.setAttribute("disabled","disabled");var Ca=document.createElement("div");Ca.style.marginBottom="10px";1==oa?(Oa.setAttribute("type","checkbox"),Oa.style.marginBottom="12px",Ca.appendChild(Oa)):
-(Oa.setAttribute("name","pages-printdialog"),Oa.style.marginBottom="8px",Z.appendChild(Oa));J=document.createElement("span");mxUtils.write(J,mxResources.get("selectionOnly"));Oa.parentNode.appendChild(J);1==oa&&mxUtils.br(Oa.parentNode);var Ta=document.createElement("input");Ta.style.marginRight="8px";Ta.setAttribute("value","adjust");Ta.setAttribute("type","radio");Ta.setAttribute("name","printZoom");Ca.appendChild(Ta);J=document.createElement("span");mxUtils.write(J,mxResources.get("adjustTo"));
-Ca.appendChild(J);var Va=document.createElement("input");Va.style.cssText="margin:0 8px 0 8px;";Va.setAttribute("value","100 %");Va.style.width="50px";Ca.appendChild(Va);mxEvent.addListener(Va,"focus",function(){Ta.checked=!0});Q.appendChild(Ca);Z=Z.cloneNode(!1);var Ja=Ta.cloneNode(!0);Ja.setAttribute("value","fit");Ta.setAttribute("checked","checked");J=document.createElement("div");J.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";J.appendChild(Ja);Z.appendChild(J);Ca=
-document.createElement("table");Ca.style.display="inline-block";var bb=document.createElement("tbody"),Wa=document.createElement("tr"),$a=Wa.cloneNode(!0),z=document.createElement("td"),L=z.cloneNode(!0),M=z.cloneNode(!0),S=z.cloneNode(!0),ca=z.cloneNode(!0),ia=z.cloneNode(!0);z.style.textAlign="right";S.style.textAlign="right";mxUtils.write(z,mxResources.get("fitTo"));var na=document.createElement("input");na.style.cssText="margin:0 8px 0 8px;";na.setAttribute("value","1");na.setAttribute("min",
-"1");na.setAttribute("type","number");na.style.width="40px";L.appendChild(na);J=document.createElement("span");mxUtils.write(J,mxResources.get("fitToSheetsAcross"));M.appendChild(J);mxUtils.write(S,mxResources.get("fitToBy"));var ra=na.cloneNode(!0);ca.appendChild(ra);mxEvent.addListener(na,"focus",function(){Ja.checked=!0});mxEvent.addListener(ra,"focus",function(){Ja.checked=!0});J=document.createElement("span");mxUtils.write(J,mxResources.get("fitToSheetsDown"));ia.appendChild(J);Wa.appendChild(z);
-Wa.appendChild(L);Wa.appendChild(M);$a.appendChild(S);$a.appendChild(ca);$a.appendChild(ia);bb.appendChild(Wa);bb.appendChild($a);Ca.appendChild(bb);Z.appendChild(Ca);Q.appendChild(Z);Z=document.createElement("div");J=document.createElement("div");J.style.fontWeight="bold";J.style.marginBottom="12px";mxUtils.write(J,mxResources.get("paperSize"));Z.appendChild(J);J=document.createElement("div");J.style.marginBottom="12px";var qa=PageSetupDialog.addPageFormatPanel(J,"printdialog",u.editor.graph.pageFormat||
-mxConstants.PAGE_FORMAT_A4_PORTRAIT);Z.appendChild(J);J=document.createElement("span");mxUtils.write(J,mxResources.get("pageScale"));Z.appendChild(J);var ya=document.createElement("input");ya.style.cssText="margin:0 8px 0 8px;";ya.setAttribute("value","100 %");ya.style.width="60px";Z.appendChild(ya);Q.appendChild(Z);J=document.createElement("div");J.style.cssText="text-align:right;margin:48px 0 0 0;";Z=mxUtils.button(mxResources.get("cancel"),function(){u.hideDialog()});Z.className="geBtn";u.editor.cancelFirst&&
-J.appendChild(Z);u.isOffline()||(Ca=mxUtils.button(mxResources.get("help"),function(){T.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),Ca.className="geBtn",J.appendChild(Ca));PrintDialog.previewEnabled&&(Ca=mxUtils.button(mxResources.get("preview"),function(){u.hideDialog();W(!1)}),Ca.className="geBtn",J.appendChild(Ca));Ca=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){u.hideDialog();W(!0)});Ca.className="geBtn gePrimaryBtn";J.appendChild(Ca);u.editor.cancelFirst||
-J.appendChild(Z);Q.appendChild(J);this.container=Q};var fa=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var u=this.image;null!=u&&null!=u.src&&Graph.isPageLink(u.src)&&(u={originalSrc:u.src});this.page.viewState.backgroundImage=u}null!=this.format&&(this.page.viewState.pageFormat=
-this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else fa.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=
-!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var la=document.createElement("canvas"),sa=new Image;sa.onload=function(){try{la.getContext("2d").drawImage(sa,0,0);var u=la.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(J){}};sa.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}})();
+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(u){var I=null;null!=u&&0<u.length&&("ER"==u.substring(0,2)?I="mxgraph.er":"sysML"==u.substring(0,5)&&(I="mxgraph.sysml"));return I};var P=mxMarker.createMarker;mxMarker.createMarker=
+function(u,I,N,W,T,Q,Z,na,va,Ba){if(null!=N&&null==mxMarker.markers[N]){var sa=this.getPackageForType(N);null!=sa&&mxStencilRegistry.getStencil(sa)}return P.apply(this,arguments)};var R=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(u,I,N,W,T,Q){"1"==mxUtils.getValue(I.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(I.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return R.apply(this,arguments)};PrintDialog.prototype.create=function(u,I){function N(){Aa.value=Math.max(1,
+Math.min(na,Math.max(parseInt(Aa.value),parseInt(Da.value))));Da.value=Math.max(1,Math.min(na,Math.min(parseInt(Aa.value),parseInt(Da.value))))}function W(Ga){function La(Ya,gb,hb){var ob=Ya.useCssTransforms,vb=Ya.currentTranslate,qb=Ya.currentScale,Ab=Ya.view.translate,Bb=Ya.view.scale;Ya.useCssTransforms&&(Ya.useCssTransforms=!1,Ya.currentTranslate=new mxPoint(0,0),Ya.currentScale=1,Ya.view.translate=new mxPoint(0,0),Ya.view.scale=1);var tb=Ya.getGraphBounds(),lb=0,ib=0,mb=qa.get(),wb=1/Ya.pageScale,
+rb=cb.checked;if(rb){wb=parseInt(oa.value);var xb=parseInt(ra.value);wb=Math.min(mb.height*xb/(tb.height/Ya.view.scale),mb.width*wb/(tb.width/Ya.view.scale))}else wb=parseInt(Za.value)/(100*Ya.pageScale),isNaN(wb)&&(Pa=1/Ya.pageScale,Za.value="100 %");mb=mxRectangle.fromRectangle(mb);mb.width=Math.ceil(mb.width*Pa);mb.height=Math.ceil(mb.height*Pa);wb*=Pa;!rb&&Ya.pageVisible?(tb=Ya.getPageLayout(),lb-=tb.x*mb.width,ib-=tb.y*mb.height):rb=!0;if(null==gb){gb=PrintDialog.createPrintPreview(Ya,wb,mb,
+0,lb,ib,rb);gb.pageSelector=!1;gb.mathEnabled=!1;za.checked&&(gb.isCellVisible=function(pb){return Ya.isCellSelected(pb)});lb=u.getCurrentFile();null!=lb&&(gb.title=lb.getTitle());var zb=gb.writeHead;gb.writeHead=function(pb){zb.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)pb.writeln('<style type="text/css">'),pb.writeln(Editor.mathJaxWebkitCss),pb.writeln("</style>");mxClient.IS_GC&&(pb.writeln('<style type="text/css">'),pb.writeln("@media print {"),pb.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),
+pb.writeln("}"),pb.writeln("</style>"));null!=u.editor.fontCss&&(pb.writeln('<style type="text/css">'),pb.writeln(u.editor.fontCss),pb.writeln("</style>"));for(var c=Ya.getCustomFonts(),l=0;l<c.length;l++){var x=c[l].name,p=c[l].url;Graph.isCssFontUrl(p)?pb.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(p)+'" charset="UTF-8" type="text/css">'):(pb.writeln('<style type="text/css">'),pb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(x)+'";\nsrc: url("'+mxUtils.htmlEntities(p)+
+'");\n}'),pb.writeln("</style>"))}};if("undefined"!==typeof MathJax){var yb=gb.renderPage;gb.renderPage=function(pb,c,l,x,p,v){var A=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!u.editor.useForeignObjectForMath?!0:u.editor.originalNoForeignObject;var B=yb.apply(this,arguments);mxClient.NO_FO=A;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:B.className="geDisableMathJax";return B}}lb=null;ib=T.shapeForegroundColor;rb=T.shapeBackgroundColor;mb=T.enableFlowAnimation;T.enableFlowAnimation=
+!1;null!=T.themes&&"darkTheme"==T.defaultThemeName&&(lb=T.stylesheet,T.stylesheet=T.getDefaultStylesheet(),T.shapeForegroundColor="#000000",T.shapeBackgroundColor="#ffffff",T.refresh());gb.open(null,null,hb,!0);T.enableFlowAnimation=mb;null!=lb&&(T.shapeForegroundColor=ib,T.shapeBackgroundColor=rb,T.stylesheet=lb,T.refresh())}else{mb=Ya.background;if(null==mb||""==mb||mb==mxConstants.NONE)mb="#ffffff";gb.backgroundColor=mb;gb.autoOrigin=rb;gb.appendGraph(Ya,wb,lb,ib,hb,!0);hb=Ya.getCustomFonts();
+if(null!=gb.wnd)for(lb=0;lb<hb.length;lb++)ib=hb[lb].name,rb=hb[lb].url,Graph.isCssFontUrl(rb)?gb.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(rb)+'" charset="UTF-8" type="text/css">'):(gb.wnd.document.writeln('<style type="text/css">'),gb.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(ib)+'";\nsrc: url("'+mxUtils.htmlEntities(rb)+'");\n}'),gb.wnd.document.writeln("</style>"))}ob&&(Ya.useCssTransforms=ob,Ya.currentTranslate=vb,Ya.currentScale=
+qb,Ya.view.translate=Ab,Ya.view.scale=Bb);return gb}var Pa=parseInt(xa.value)/100;isNaN(Pa)&&(Pa=1,xa.value="100 %");Pa*=.75;var Oa=null,Ta=T.shapeForegroundColor,Ma=T.shapeBackgroundColor;null!=T.themes&&"darkTheme"==T.defaultThemeName&&(Oa=T.stylesheet,T.stylesheet=T.getDefaultStylesheet(),T.shapeForegroundColor="#000000",T.shapeBackgroundColor="#ffffff",T.refresh());var ua=Da.value,ya=Aa.value,Na=!Ba.checked,Fa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,Ba.checked,ua,ya,cb.checked,
+oa.value,ra.value,parseInt(Za.value)/100,parseInt(xa.value)/100,qa.get());else{Na&&(Na=za.checked||ua==va&&ya==va);if(!Na&&null!=u.pages&&u.pages.length){var Ra=0;Na=u.pages.length-1;Ba.checked||(Ra=parseInt(ua)-1,Na=parseInt(ya)-1);for(var db=Ra;db<=Na;db++){var Va=u.pages[db];ua=Va==u.currentPage?T:null;if(null==ua){ua=u.createTemporaryGraph(T.stylesheet);ua.shapeForegroundColor=T.shapeForegroundColor;ua.shapeBackgroundColor=T.shapeBackgroundColor;ya=!0;Ra=!1;var fb=null,kb=null;null==Va.viewState&&
+null==Va.root&&u.updatePageRoot(Va);null!=Va.viewState&&(ya=Va.viewState.pageVisible,Ra=Va.viewState.mathEnabled,fb=Va.viewState.background,kb=Va.viewState.backgroundImage,ua.extFonts=Va.viewState.extFonts);null!=kb&&null!=kb.originalSrc&&(kb=u.createImageForPageLink(kb.originalSrc,Va));ua.background=fb;ua.backgroundImage=null!=kb?new mxImage(kb.src,kb.width,kb.height,kb.x,kb.y):null;ua.pageVisible=ya;ua.mathEnabled=Ra;var ub=ua.getGraphBounds;ua.getGraphBounds=function(){var Ya=ub.apply(this,arguments),
+gb=this.backgroundImage;if(null!=gb&&null!=gb.width&&null!=gb.height){var hb=this.view.translate,ob=this.view.scale;Ya=mxRectangle.fromRectangle(Ya);Ya.add(new mxRectangle((hb.x+gb.x)*ob,(hb.y+gb.y)*ob,gb.width*ob,gb.height*ob))}return Ya};var nb=ua.getGlobalVariable;ua.getGlobalVariable=function(Ya){return"page"==Ya?Va.getName():"pagenumber"==Ya?db+1:"pagecount"==Ya?null!=u.pages?u.pages.length:1:nb.apply(this,arguments)};document.body.appendChild(ua.container);u.updatePageRoot(Va);ua.model.setRoot(Va.root)}Fa=
+La(ua,Fa,db!=Na);ua!=T&&ua.container.parentNode.removeChild(ua.container)}}else Fa=La(T);null==Fa?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(Fa.mathEnabled&&(Na=Fa.wnd.document,Ga&&(Fa.wnd.IMMEDIATE_PRINT=!0),Na.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Fa.closeDocument(),!Fa.mathEnabled&&Ga&&PrintDialog.printPreview(Fa));null!=Oa&&(T.shapeForegroundColor=Ta,T.shapeBackgroundColor=Ma,T.stylesheet=Oa,T.refresh())}}var T=
+u.editor.graph,Q=document.createElement("div"),Z=document.createElement("h3");Z.style.width="100%";Z.style.textAlign="center";Z.style.marginTop="0px";mxUtils.write(Z,I||mxResources.get("print"));Q.appendChild(Z);var na=1,va=1;Z=document.createElement("div");Z.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var Ba=document.createElement("input");Ba.style.cssText="margin-right:8px;margin-bottom:8px;";Ba.setAttribute("value","all");Ba.setAttribute("type","radio");
+Ba.setAttribute("name","pages-printdialog");Z.appendChild(Ba);I=document.createElement("span");mxUtils.write(I,mxResources.get("printAllPages"));Z.appendChild(I);mxUtils.br(Z);var sa=Ba.cloneNode(!0);Ba.setAttribute("checked","checked");sa.setAttribute("value","range");Z.appendChild(sa);I=document.createElement("span");mxUtils.write(I,mxResources.get("pages")+":");Z.appendChild(I);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","1");Da.setAttribute("type",
+"number");Da.setAttribute("min","1");Da.style.width="50px";Z.appendChild(Da);I=document.createElement("span");mxUtils.write(I,mxResources.get("to"));Z.appendChild(I);var Aa=Da.cloneNode(!0);Z.appendChild(Aa);mxEvent.addListener(Da,"focus",function(){sa.checked=!0});mxEvent.addListener(Aa,"focus",function(){sa.checked=!0});mxEvent.addListener(Da,"change",N);mxEvent.addListener(Aa,"change",N);if(null!=u.pages&&(na=u.pages.length,null!=u.currentPage))for(I=0;I<u.pages.length;I++)if(u.currentPage==u.pages[I]){va=
+I+1;Da.value=va;Aa.value=va;break}Da.setAttribute("max",na);Aa.setAttribute("max",na);u.isPagesEnabled()?1<na&&(Q.appendChild(Z),sa.checked=!0):sa.checked=!0;mxUtils.br(Z);var za=document.createElement("input");za.setAttribute("value","all");za.setAttribute("type","radio");za.style.marginRight="8px";T.isSelectionEmpty()&&za.setAttribute("disabled","disabled");var Ca=document.createElement("div");Ca.style.marginBottom="10px";1==na?(za.setAttribute("type","checkbox"),za.style.marginBottom="12px",Ca.appendChild(za)):
+(za.setAttribute("name","pages-printdialog"),za.style.marginBottom="8px",Z.appendChild(za));I=document.createElement("span");mxUtils.write(I,mxResources.get("selectionOnly"));za.parentNode.appendChild(I);1==na&&mxUtils.br(za.parentNode);var Qa=document.createElement("input");Qa.style.marginRight="8px";Qa.setAttribute("value","adjust");Qa.setAttribute("type","radio");Qa.setAttribute("name","printZoom");Ca.appendChild(Qa);I=document.createElement("span");mxUtils.write(I,mxResources.get("adjustTo"));
+Ca.appendChild(I);var Za=document.createElement("input");Za.style.cssText="margin:0 8px 0 8px;";Za.setAttribute("value","100 %");Za.style.width="50px";Ca.appendChild(Za);mxEvent.addListener(Za,"focus",function(){Qa.checked=!0});Q.appendChild(Ca);Z=Z.cloneNode(!1);var cb=Qa.cloneNode(!0);cb.setAttribute("value","fit");Qa.setAttribute("checked","checked");I=document.createElement("div");I.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";I.appendChild(cb);Z.appendChild(I);Ca=
+document.createElement("table");Ca.style.display="inline-block";var Ka=document.createElement("tbody"),Ua=document.createElement("tr"),$a=Ua.cloneNode(!0),z=document.createElement("td"),L=z.cloneNode(!0),M=z.cloneNode(!0),S=z.cloneNode(!0),ca=z.cloneNode(!0),ha=z.cloneNode(!0);z.style.textAlign="right";S.style.textAlign="right";mxUtils.write(z,mxResources.get("fitTo"));var oa=document.createElement("input");oa.style.cssText="margin:0 8px 0 8px;";oa.setAttribute("value","1");oa.setAttribute("min",
+"1");oa.setAttribute("type","number");oa.style.width="40px";L.appendChild(oa);I=document.createElement("span");mxUtils.write(I,mxResources.get("fitToSheetsAcross"));M.appendChild(I);mxUtils.write(S,mxResources.get("fitToBy"));var ra=oa.cloneNode(!0);ca.appendChild(ra);mxEvent.addListener(oa,"focus",function(){cb.checked=!0});mxEvent.addListener(ra,"focus",function(){cb.checked=!0});I=document.createElement("span");mxUtils.write(I,mxResources.get("fitToSheetsDown"));ha.appendChild(I);Ua.appendChild(z);
+Ua.appendChild(L);Ua.appendChild(M);$a.appendChild(S);$a.appendChild(ca);$a.appendChild(ha);Ka.appendChild(Ua);Ka.appendChild($a);Ca.appendChild(Ka);Z.appendChild(Ca);Q.appendChild(Z);Z=document.createElement("div");I=document.createElement("div");I.style.fontWeight="bold";I.style.marginBottom="12px";mxUtils.write(I,mxResources.get("paperSize"));Z.appendChild(I);I=document.createElement("div");I.style.marginBottom="12px";var qa=PageSetupDialog.addPageFormatPanel(I,"printdialog",u.editor.graph.pageFormat||
+mxConstants.PAGE_FORMAT_A4_PORTRAIT);Z.appendChild(I);I=document.createElement("span");mxUtils.write(I,mxResources.get("pageScale"));Z.appendChild(I);var xa=document.createElement("input");xa.style.cssText="margin:0 8px 0 8px;";xa.setAttribute("value","100 %");xa.style.width="60px";Z.appendChild(xa);Q.appendChild(Z);I=document.createElement("div");I.style.cssText="text-align:right;margin:48px 0 0 0;";Z=mxUtils.button(mxResources.get("cancel"),function(){u.hideDialog()});Z.className="geBtn";u.editor.cancelFirst&&
+I.appendChild(Z);u.isOffline()||(Ca=mxUtils.button(mxResources.get("help"),function(){T.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),Ca.className="geBtn",I.appendChild(Ca));PrintDialog.previewEnabled&&(Ca=mxUtils.button(mxResources.get("preview"),function(){u.hideDialog();W(!1)}),Ca.className="geBtn",I.appendChild(Ca));Ca=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){u.hideDialog();W(!0)});Ca.className="geBtn gePrimaryBtn";I.appendChild(Ca);u.editor.cancelFirst||
+I.appendChild(Z);Q.appendChild(I);this.container=Q};var ia=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var u=this.image;null!=u&&null!=u.src&&Graph.isPageLink(u.src)&&(u={originalSrc:u.src});this.page.viewState.backgroundImage=u}null!=this.format&&(this.page.viewState.pageFormat=
+this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else ia.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=
+!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var la=document.createElement("canvas"),ta=new Image;ta.onload=function(){try{la.getContext("2d").drawImage(ta,0,0);var u=la.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(I){}};ta.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){n.previousColor=n.color;n.previousImage=n.image;n.previousFormat=n.format;null!=n.foldingEnabled&&(n.foldingEnabled=!n.foldingEnabled);null!=n.mathEnabled&&(n.mathEnabled=!n.mathEnabled);null!=n.shadowVisible&&(n.shadowVisible=!n.shadowVisible);return n};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.2.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="19.0.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,m,q,y,F){y=null!=y?y:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
@@ -3409,14 +3409,14 @@ urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.cr
F=y.getChildren(y.root);for(m=0;m<F.length;m++){var C=F[m];y.setVisible(C,f[C.id]||!1)}}catch(H){}};EditorUi.prototype.getBaseFilename=function(d){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(d,f,g,m,q,y,F,C,H,G,aa,da){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var ba=this.getBaseFilename("remoteSvg"==d?!1:!q),Y=ba+("xml"==d||"pdf"==d&&aa?".drawio":"")+"."+d;if("xml"==d){var pa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,q,null,null,null,f);this.saveData(Y,d,pa,"text/xml")}else if("html"==d)pa=this.getHtml2(this.getFileData(!0),this.editor.graph,
ba),this.saveData(Y,d,pa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)Y=ba+".png";else if("jpeg"==d)Y=ba+".jpg";else if("remoteSvg"==d){Y=ba+".svg";d="svg";var O=parseInt(H);"string"===typeof C&&0<C.indexOf("%")&&(C=parseInt(C)/100);if(0<O){var X=this.editor.graph,ea=X.getGraphBounds();var ka=Math.ceil(ea.width*C/X.view.scale+2*O);var ja=Math.ceil(ea.height*C/X.view.scale+2*O)}}this.saveRequest(Y,d,mxUtils.bind(this,function(R,
-fa){try{var la=this.editor.graph.pageVisible;0==y&&(this.editor.graph.pageVisible=y);var sa=this.createDownloadRequest(R,d,m,fa,F,q,C,H,G,aa,da,ka,ja);this.editor.graph.pageVisible=la;return sa}catch(u){this.handleError(u)}}))}else{var U=null,I=mxUtils.bind(this,function(R){R.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",R,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});if("svg"==d){var V=this.editor.graph.background;
-if(F||V==mxConstants.NONE)V=null;var P=this.editor.graph.getSvg(V,null,null,null,null,m);g&&this.editor.graph.addSvgShadow(P);this.editor.convertImages(P,mxUtils.bind(this,mxUtils.bind(this,function(R){this.spinner.stop();I(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(R))})))}else Y=ba+".svg",U=this.getFileData(!1,!0,null,mxUtils.bind(this,function(R){this.spinner.stop();I(R)}),m)}}catch(R){this.handleError(R)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,m,q,y,F,C,H,
+ia){try{var la=this.editor.graph.pageVisible;0==y&&(this.editor.graph.pageVisible=y);var ta=this.createDownloadRequest(R,d,m,ia,F,q,C,H,G,aa,da,ka,ja);this.editor.graph.pageVisible=la;return ta}catch(u){this.handleError(u)}}))}else{var U=null,J=mxUtils.bind(this,function(R){R.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",R,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});if("svg"==d){var V=this.editor.graph.background;
+if(F||V==mxConstants.NONE)V=null;var P=this.editor.graph.getSvg(V,null,null,null,null,m);g&&this.editor.graph.addSvgShadow(P);this.editor.convertImages(P,mxUtils.bind(this,mxUtils.bind(this,function(R){this.spinner.stop();J(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(R))})))}else Y=ba+".svg",U=this.getFileData(!1,!0,null,mxUtils.bind(this,function(R){this.spinner.stop();J(R)}),m)}}catch(R){this.handleError(R)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,m,q,y,F,C,H,
G,aa,da,ba){var Y=this.editor.graph,pa=Y.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==y?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var O="",X="";if(pa.width*pa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=aa?X="&from="+aa.from+"&to="+aa.to:0==y&&(X="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(y=0;y<this.pages.length;y++)if(this.pages[y]==
this.currentPage){O="&from="+y;break}y=Y.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=y&&y!=mxConstants.NONE||(y="#ffffff"):y=mxConstants.NONE;q={globalVars:Y.getExportVariables()};H&&(q.grid={size:Y.gridSize,steps:Y.view.gridSteps,color:Y.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+O+X+"&bg="+(null!=y?y:mxConstants.NONE)+"&base64="+m+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):
"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=F?"&scale="+F:"")+(null!=C?"&border="+C:"")+(da&&isFinite(da)?"&w="+da:"")+(ba&&isFinite(ba)?"&h="+ba:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var m=window.location.hash,q=mxUtils.bind(this,function(y){var F=null!=d.data?d.data:"";null!=y&&0<y.length&&(0<F.length&&(F+="\n"),F+=y);y=new LocalFile(this,"csv"!=d.format&&0<F.length?F:this.emptyDiagramXml,null!=urlParams.title?
decodeURIComponent(urlParams.title):this.defaultFilename,!0);y.getHash=function(){return m};this.fileLoaded(y);"csv"==d.format&&this.importCsv(F,mxUtils.bind(this,function(da){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=null!=d.interval?parseInt(d.interval):6E4,H=null,G=mxUtils.bind(this,function(){var da=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,
function(ba){da===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),aa()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),aa=mxUtils.bind(this,function(){window.clearTimeout(H);H=window.setTimeout(G,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){aa();G()}));aa();G()}null!=f&&f()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,mxUtils.bind(this,
-function(y){q(y)}),mxUtils.bind(this,function(y){null!=g&&g(y)})):q("")};EditorUi.prototype.updateDiagram=function(d){function f(ja){var U=new mxCellOverlay(ja.image||q.warningImage,ja.tooltip,ja.align,ja.valign,ja.offset);U.addListener(mxEvent.CLICK,function(I,V){m.alert(ja.tooltip)});return U}var g=null,m=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,y=q.getModel();y.beginUpdate();var F=null;try{for(d=
+function(y){q(y)}),mxUtils.bind(this,function(y){null!=g&&g(y)})):q("")};EditorUi.prototype.updateDiagram=function(d){function f(ja){var U=new mxCellOverlay(ja.image||q.warningImage,ja.tooltip,ja.align,ja.valign,ja.offset);U.addListener(mxEvent.CLICK,function(J,V){m.alert(ja.tooltip)});return U}var g=null,m=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,y=q.getModel();y.beginUpdate();var F=null;try{for(d=
d.firstChild;null!=d;){if("update"==d.nodeName){var C=y.getCell(d.getAttribute("id"));if(null!=C){try{var H=d.getAttribute("value");if(null!=H){var G=mxUtils.parseXml(H).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))y.setValue(C,G);else for(var aa=G.attributes,da=0;da<aa.length;da++)q.setAttributeForCell(C,aa[da].nodeName,0<aa[da].nodeValue.length?aa[da].nodeValue:null)}}catch(ja){null!=window.console&&console.log("Error in value for "+C.id+": "+ja)}try{var ba=d.getAttribute("style");
null!=ba&&q.model.setStyle(C,ba)}catch(ja){null!=window.console&&console.log("Error in style for "+C.id+": "+ja)}try{var Y=d.getAttribute("icon");if(null!=Y){var pa=0<Y.length?JSON.parse(Y):null;null!=pa&&pa.append||q.removeCellOverlays(C);null!=pa&&q.addCellOverlay(C,f(pa))}}catch(ja){null!=window.console&&console.log("Error in icon for "+C.id+": "+ja)}try{var O=d.getAttribute("geometry");if(null!=O){O=JSON.parse(O);var X=q.getCellGeometry(C);if(null!=X){X=X.clone();for(key in O){var ea=parseFloat(O[key]);
"dx"==key?X.x+=ea:"dy"==key?X.y+=ea:"dw"==key?X.width+=ea:"dh"==key?X.height+=ea:X[key]=parseFloat(O[key])}q.model.setGeometry(C,X)}}}catch(ja){null!=window.console&&console.log("Error in icon for "+C.id+": "+ja)}}}else if("model"==d.nodeName){for(var ka=d.firstChild;null!=ka&&ka.nodeType!=mxConstants.NODETYPE_ELEMENT;)ka=ka.nextSibling;null!=ka&&(new mxCodec(d.firstChild)).decode(ka,y)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(q.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||
@@ -3440,15 +3440,15 @@ null!=m&&0<m.length&&".scratchpad"!=d.title&&H.setAttribute("title",this.getLibr
"relative";aa.style.top="2px";aa.style.width="14px";aa.style.cursor="pointer";aa.style.margin="0 3px";Editor.isDarkMode()&&(aa.style.filter="invert(100%)");var da=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(aa),mxEvent.addListener(aa,"click",mxUtils.bind(this,function(ka){if(!mxEvent.isConsumed(ka)){var ja=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=da?this.confirm(mxResources.get("allChangesLost"),null,ja,mxResources.get("cancel"),mxResources.get("discardChanges")):
ja();mxEvent.consume(ka)}}));if(d.isEditable()){var ba=this.editor.graph,Y=null,pa=mxUtils.bind(this,function(ka){this.showLibraryDialog(d.getTitle(),C,f,d,d.getMode());mxEvent.consume(ka)}),O=mxUtils.bind(this,function(ka){d.setModified(!0);d.isAutosave()?(null!=Y&&null!=Y.parentNode&&Y.parentNode.removeChild(Y),Y=aa.cloneNode(!1),Y.setAttribute("src",Editor.spinImage),Y.setAttribute("title",mxResources.get("saving")),Y.style.cursor="default",Y.style.marginRight="2px",Y.style.marginTop="-2px",G.insertBefore(Y,
G.firstChild),H.style.paddingRight=18*G.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=Y&&null!=Y.parentNode&&(Y.parentNode.removeChild(Y),H.style.paddingRight=18*G.childNodes.length+"px")})):null==da&&(da=aa.cloneNode(!1),da.setAttribute("src",Editor.saveImage),da.setAttribute("title",mxResources.get("save")),G.insertBefore(da,G.firstChild),mxEvent.addListener(da,"click",mxUtils.bind(this,function(ja){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==
-LocalLibrary,!0,function(){null==da||d.isModified()||(H.style.paddingRight=18*G.childNodes.length+"px",da.parentNode.removeChild(da),da=null)});mxEvent.consume(ja)})),H.style.paddingRight=18*G.childNodes.length+"px")}),X=mxUtils.bind(this,function(ka,ja,U,I){ka=ba.cloneCells(mxUtils.sortCells(ba.model.getTopmostCells(ka)));for(var V=0;V<ka.length;V++){var P=ba.getCellGeometry(ka[V]);null!=P&&P.translate(-ja.x,-ja.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(ka,ja.width,ja.height,I||
-"",!0,null,!1));ka={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(ka))),w:ja.width,h:ja.height};null!=I&&(ka.title=I);f.push(ka);O(U);null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)}),ea=mxUtils.bind(this,function(ka){if(ba.isSelectionEmpty())ba.getRubberband().isActive()?(ba.getRubberband().execute(ka),ba.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ja=ba.getSelectionCells(),
-U=ba.view.getBounds(ja),I=ba.view.scale;U.x/=I;U.y/=I;U.width/=I;U.height/=I;U.x-=ba.view.translate.x;U.y-=ba.view.translate.y;X(ja,U)}mxEvent.consume(ka)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(ka){ba.isMouseDown&&null!=ba.panningManager&&null!=ba.graphHandler.first&&(ba.graphHandler.suspend(),null!=ba.graphHandler.hint&&(ba.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="#f1f3f4",C.style.cursor="copy",ba.panningManager.stop(),ba.autoScroll=!1,
+LocalLibrary,!0,function(){null==da||d.isModified()||(H.style.paddingRight=18*G.childNodes.length+"px",da.parentNode.removeChild(da),da=null)});mxEvent.consume(ja)})),H.style.paddingRight=18*G.childNodes.length+"px")}),X=mxUtils.bind(this,function(ka,ja,U,J){ka=ba.cloneCells(mxUtils.sortCells(ba.model.getTopmostCells(ka)));for(var V=0;V<ka.length;V++){var P=ba.getCellGeometry(ka[V]);null!=P&&P.translate(-ja.x,-ja.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(ka,ja.width,ja.height,J||
+"",!0,null,!1));ka={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(ka))),w:ja.width,h:ja.height};null!=J&&(ka.title=J);f.push(ka);O(U);null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)}),ea=mxUtils.bind(this,function(ka){if(ba.isSelectionEmpty())ba.getRubberband().isActive()?(ba.getRubberband().execute(ka),ba.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ja=ba.getSelectionCells(),
+U=ba.view.getBounds(ja),J=ba.view.scale;U.x/=J;U.y/=J;U.width/=J;U.height/=J;U.x-=ba.view.translate.x;U.y-=ba.view.translate.y;X(ja,U)}mxEvent.consume(ka)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(ka){ba.isMouseDown&&null!=ba.panningManager&&null!=ba.graphHandler.first&&(ba.graphHandler.suspend(),null!=ba.graphHandler.hint&&(ba.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="#f1f3f4",C.style.cursor="copy",ba.panningManager.stop(),ba.autoScroll=!1,
mxEvent.consume(ka))}),mxUtils.bind(this,function(ka){ba.isMouseDown&&null!=ba.panningManager&&null!=ba.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,ba.panningManager.stop(),ba.graphHandler.reset(),ba.isMouseDown=!1,ba.autoScroll=!0,ea(ka),mxEvent.consume(ka))}));mxEvent.addListener(C,"mouseleave",mxUtils.bind(this,function(ka){ba.isMouseDown&&null!=ba.graphHandler.first&&(ba.graphHandler.resume(),null!=ba.graphHandler.hint&&(ba.graphHandler.hint.style.visibility=
"visible"),C.style.backgroundColor="",C.style.cursor="",ba.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(ka){C.style.backgroundColor="#f1f3f4";ka.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();ka.stopPropagation();ka.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(ka){C.style.cursor="";C.style.backgroundColor="";0<ka.dataTransfer.files.length&&this.importFiles(ka.dataTransfer.files,0,0,
-this.maxImageSize,mxUtils.bind(this,function(ja,U,I,V,P,R,fa,la,sa){if(null!=ja&&"image/"==U.substring(0,6))ja="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ja),ja=[new mxCell("",new mxGeometry(0,0,P,R),ja)],ja[0].vertex=!0,X(ja,new mxRectangle(0,0,P,R),ka,mxEvent.isAltDown(ka)?null:fa.substring(0,fa.lastIndexOf(".")).replace(/_/g," ")),null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null);else{var u=!1,J=
-mxUtils.bind(this,function(N,W){null!=N&&"application/pdf"==W&&(W=Editor.extractGraphModelFromPdf(N),null!=W&&0<W.length&&(N=W));if(null!=N)if(N=mxUtils.parseXml(N),"mxlibrary"==N.documentElement.nodeName)try{var T=JSON.parse(mxUtils.getTextContent(N.documentElement));F(T,C);f=f.concat(T);O(ka);this.spinner.stop();u=!0}catch(wa){}else if("mxfile"==N.documentElement.nodeName)try{var Q=N.documentElement.getElementsByTagName("diagram");for(T=0;T<Q.length;T++){var Z=this.stringToCells(Editor.getDiagramNodeXml(Q[T])),
-oa=this.editor.graph.getBoundingBoxFromGeometry(Z);X(Z,new mxRectangle(0,0,oa.width,oa.height),ka)}u=!0}catch(wa){null!=window.console&&console.log("error in drop handler:",wa)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)});null!=sa&&null!=fa&&(/(\.v(dx|sdx?))($|\?)/i.test(fa)||/(\.vs(x|sx?))($|\?)/i.test(fa))?this.importVisio(sa,function(N){J(N,"text/xml")},null,fa):(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(ja,fa)&&null!=sa?this.isExternalDataComms()?this.parseFile(sa,mxUtils.bind(this,function(N){4==N.readyState&&(this.spinner.stop(),200<=N.status&&299>=N.status?J(N.responseText,"text/xml"):this.handleError({message:mxResources.get(413==N.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):J(ja,U)}}));ka.stopPropagation();ka.preventDefault()})),
+this.maxImageSize,mxUtils.bind(this,function(ja,U,J,V,P,R,ia,la,ta){if(null!=ja&&"image/"==U.substring(0,6))ja="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ja),ja=[new mxCell("",new mxGeometry(0,0,P,R),ja)],ja[0].vertex=!0,X(ja,new mxRectangle(0,0,P,R),ka,mxEvent.isAltDown(ka)?null:ia.substring(0,ia.lastIndexOf(".")).replace(/_/g," ")),null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null);else{var u=!1,I=
+mxUtils.bind(this,function(N,W){null!=N&&"application/pdf"==W&&(W=Editor.extractGraphModelFromPdf(N),null!=W&&0<W.length&&(N=W));if(null!=N)if(N=mxUtils.parseXml(N),"mxlibrary"==N.documentElement.nodeName)try{var T=JSON.parse(mxUtils.getTextContent(N.documentElement));F(T,C);f=f.concat(T);O(ka);this.spinner.stop();u=!0}catch(va){}else if("mxfile"==N.documentElement.nodeName)try{var Q=N.documentElement.getElementsByTagName("diagram");for(T=0;T<Q.length;T++){var Z=this.stringToCells(Editor.getDiagramNodeXml(Q[T])),
+na=this.editor.graph.getBoundingBoxFromGeometry(Z);X(Z,new mxRectangle(0,0,na.width,na.height),ka)}u=!0}catch(va){null!=window.console&&console.log("error in drop handler:",va)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)});null!=ta&&null!=ia&&(/(\.v(dx|sdx?))($|\?)/i.test(ia)||/(\.vs(x|sx?))($|\?)/i.test(ia))?this.importVisio(ta,function(N){I(N,"text/xml")},null,ia):(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(ja,ia)&&null!=ta?this.isExternalDataComms()?this.parseFile(ta,mxUtils.bind(this,function(N){4==N.readyState&&(this.spinner.stop(),200<=N.status&&299>=N.status?I(N.responseText,"text/xml"):this.handleError({message:mxResources.get(413==N.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):I(ja,U)}}));ka.stopPropagation();ka.preventDefault()})),
mxEvent.addListener(C,"dragleave",function(ka){C.style.cursor="";C.style.backgroundColor="";ka.stopPropagation();ka.preventDefault()}));aa=aa.cloneNode(!1);aa.setAttribute("src",Editor.editImage);aa.setAttribute("title",mxResources.get("edit"));G.insertBefore(aa,G.firstChild);mxEvent.addListener(aa,"click",pa);mxEvent.addListener(C,"dblclick",function(ka){mxEvent.getSource(ka)==C&&pa(ka)});m=aa.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));G.insertBefore(m,
G.firstChild);mxEvent.addListener(m,"click",ea);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(m=document.createElement("span"),m.setAttribute("title",mxResources.get("help")),m.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(m,"?"),mxEvent.addGestureListeners(m,mxUtils.bind(this,function(ka){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(ka)})),G.insertBefore(m,G.firstChild))}H.appendChild(G);H.style.paddingRight=
18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=0;g<d.length;g++){var m=d[g],q=m.data;if(null!=q){q=this.convertDataUri(q);var y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==m.aspect&&(y+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(y+"image="+q,m.w,m.h,"",m.title||"",!1,null,!0))}else null!=m.xml&&(q=this.stringToCells(Graph.decompress(m.xml)),0<q.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(q,
@@ -3519,8 +3519,8 @@ q.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,m
ja.style.marginBottom="16px";F+=50;mxEvent.addListener(ea,"change",function(){ea.checked?ja.removeAttribute("disabled"):ja.setAttribute("disabled","disabled");ja.checked&&ea.checked?ka.getEditSelect().removeAttribute("disabled"):ka.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){m(C.checked?g:null,da.checked,ba.value,aa.getTarget(),aa.getColor(),Y.checked,pa.checked,O.checked,X.checked,ea.checked,null!=ka?ka.getLink():null)}),null,d,f);
this.showDialog(d.container,340,F,!0,!0);y.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,m,q,y,F,C){var H=document.createElement("div");H.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";H.appendChild(G);var aa=this.getCurrentFile();d=0;if(null==aa||aa.constructor!=window.DriveFile||f)F=null!=F?F:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";
else{d=80;F=null!=F?F:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var da=document.createElement("div");da.style.whiteSpace="normal";mxUtils.write(da,mxResources.get("linkAccountRequired"));G.appendChild(da);da=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(aa.getId())}));
-da.style.marginTop="12px";da.className="geBtn";G.appendChild(da);H.appendChild(G);da=document.createElement("a");da.style.paddingLeft="12px";da.style.color="gray";da.style.fontSize="11px";da.style.cursor="pointer";mxUtils.write(da,mxResources.get("check"));G.appendChild(da);mxEvent.addListener(da,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(I){this.spinner.stop();I=new ErrorDialog(this,
-null,mxResources.get(null!=I?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(I.container,300,80,!0,!1);I.init()}))}))}var ba=null,Y=null;if(null!=g||null!=m)d+=30,mxUtils.write(H,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value="100%",H.appendChild(ba),mxUtils.write(H,mxResources.get("height")+
+da.style.marginTop="12px";da.className="geBtn";G.appendChild(da);H.appendChild(G);da=document.createElement("a");da.style.paddingLeft="12px";da.style.color="gray";da.style.fontSize="11px";da.style.cursor="pointer";mxUtils.write(da,mxResources.get("check"));G.appendChild(da);mxEvent.addListener(da,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(J){this.spinner.stop();J=new ErrorDialog(this,
+null,mxResources.get(null!=J?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(J.container,300,80,!0,!1);J.init()}))}))}var ba=null,Y=null;if(null!=g||null!=m)d+=30,mxUtils.write(H,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value="100%",H.appendChild(ba),mxUtils.write(H,mxResources.get("height")+
":"),Y=document.createElement("input"),Y.setAttribute("type","text"),Y.style.width="50px",Y.style.marginLeft="6px",Y.style.marginBottom="10px",Y.value=m+"px",H.appendChild(Y),mxUtils.br(H);var pa=this.addLinkSection(H,y);g=null!=this.pages&&1<this.pages.length;var O=null;if(null==aa||aa.constructor!=window.DriveFile||f)O=this.addCheckbox(H,mxResources.get("allPages"),g,!g);var X=this.addCheckbox(H,mxResources.get("lightbox"),!0,null,null,!y),ea=this.addEditButton(H,X),ka=ea.getEditInput();y&&(ka.style.marginLeft=
X.style.marginLeft,X.style.display="none",d-=20);var ja=this.addCheckbox(H,mxResources.get("layers"),!0);ja.style.marginLeft=ka.style.marginLeft;ja.style.marginTop="8px";var U=this.addCheckbox(H,mxResources.get("tags"),!0);U.style.marginLeft=ka.style.marginLeft;U.style.marginBottom="16px";U.style.marginTop="16px";mxEvent.addListener(X,"change",function(){X.checked?(ja.removeAttribute("disabled"),ka.removeAttribute("disabled")):(ja.setAttribute("disabled","disabled"),ka.setAttribute("disabled","disabled"));
ka.checked&&X.checked?ea.getEditSelect().removeAttribute("disabled"):ea.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,H,mxUtils.bind(this,function(){q(pa.getTarget(),pa.getColor(),null==O?!0:O.checked,X.checked,ea.getLink(),ja.checked,null!=ba?ba.value:null,null!=Y?Y.value:null,U.checked)}),null,mxResources.get("create"),F,C);this.showDialog(f.container,340,300+d,!0,!0);null!=ba?(ba.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",
@@ -3531,13 +3531,13 @@ function(d,f,g,m,q,y,F,C,H){F=null!=F?F:Editor.defaultIncludeDiagram;var G=docum
"4px";Y.style.marginRight="12px";Y.value=this.lastExportZoom||"100%";G.appendChild(Y);mxUtils.write(G,mxResources.get("borderWidth")+":");var pa=document.createElement("input");pa.setAttribute("type","text");pa.style.marginRight="16px";pa.style.width="60px";pa.style.marginLeft="4px";pa.value=this.lastExportBorder||"0";G.appendChild(pa);mxUtils.br(G);var O=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,aa.isSelectionEmpty()),X=document.createElement("input");X.style.marginTop="16px";X.style.marginRight=
"8px";X.style.marginLeft="24px";X.setAttribute("disabled","disabled");X.setAttribute("type","checkbox");var ea=document.createElement("select");ea.style.marginTop="16px";ea.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var ka={};for(ba=0;ba<d.length;ba++)if(!aa.isSelectionEmpty()||"selectionOnly"!=d[ba]){var ja=document.createElement("option");mxUtils.write(ja,mxResources.get(d[ba]));ja.setAttribute("value",d[ba]);ea.appendChild(ja);ka[d[ba]]=ja}H?(mxUtils.write(G,mxResources.get("size")+
":"),G.appendChild(ea),mxUtils.br(G),da+=26,mxEvent.addListener(ea,"change",function(){"selectionOnly"==ea.value&&(O.checked=!0)})):y&&(G.appendChild(X),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),da+=30,mxEvent.addListener(O,"change",function(){O.checked?X.removeAttribute("disabled"):X.setAttribute("disabled","disabled")}));aa.isSelectionEmpty()?H&&(O.style.display="none",O.nextSibling.style.display="none",O.nextSibling.nextSibling.style.display="none",da-=30):(ea.value="diagram",X.setAttribute("checked",
-"checked"),X.defaultChecked=!0,mxEvent.addListener(O,"change",function(){ea.value=O.checked?"selectionOnly":"diagram"}));var U=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=C),I=null;Editor.isDarkMode()&&(I=this.addCheckbox(G,mxResources.get("dark"),!0),da+=26);var V=this.addCheckbox(G,mxResources.get("shadow"),aa.shadowVisible),P=null;if("png"==C||"jpeg"==C)P=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var R=
-this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),F,null,null,"jpeg"!=C);R.style.marginBottom="16px";var fa=document.createElement("input");fa.style.marginBottom="16px";fa.style.marginRight="8px";fa.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||fa.setAttribute("disabled","disabled");var la=document.createElement("select");la.style.maxWidth="260px";la.style.marginLeft="8px";la.style.marginRight="10px";la.style.marginBottom="16px";la.className="geBtn";y=document.createElement("option");
-y.setAttribute("value","none");mxUtils.write(y,mxResources.get("noChange"));la.appendChild(y);y=document.createElement("option");y.setAttribute("value","embedFonts");mxUtils.write(y,mxResources.get("embedFonts"));la.appendChild(y);y=document.createElement("option");y.setAttribute("value","lblToSvg");mxUtils.write(y,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||la.appendChild(y);mxEvent.addListener(la,"change",mxUtils.bind(this,function(){"lblToSvg"==la.value?(fa.checked=!0,
-fa.setAttribute("disabled","disabled"),ka.page.style.display="none","page"==ea.value&&(ea.value="diagram"),V.checked=!1,V.setAttribute("disabled","disabled"),u.style.display="inline-block",sa.style.display="none"):"disabled"==fa.getAttribute("disabled")&&(fa.checked=!1,fa.removeAttribute("disabled"),V.removeAttribute("disabled"),ka.page.style.display="",u.style.display="none",sa.style.display="")}));f&&(G.appendChild(fa),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,
-mxResources.get("txtSettings")+":"),G.appendChild(la),mxUtils.br(G),da+=60);var sa=document.createElement("select");sa.style.maxWidth="260px";sa.style.marginLeft="8px";sa.style.marginRight="10px";sa.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));sa.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));sa.appendChild(f);f=document.createElement("option");
-f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));sa.appendChild(f);var u=document.createElement("div");mxUtils.write(u,mxResources.get("LinksLost"));u.style.margin="7px";u.style.display="none";"svg"==C&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(sa),G.appendChild(u),mxUtils.br(G),mxUtils.br(G),da+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=pa.value;this.lastExportZoom=Y.value;q(Y.value,U.checked,!O.checked,
-V.checked,R.checked,fa.checked,pa.value,X.checked,!1,sa.value,null!=P?P.checked:null,null!=I?I.checked:null,ea.value,"embedFonts"==la.value,"lblToSvg"==la.value)}),null,g,m);this.showDialog(g.container,340,da,!0,!0,null,null,null,null,!0);Y.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,m,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var F=this.editor.graph;
+"checked"),X.defaultChecked=!0,mxEvent.addListener(O,"change",function(){ea.value=O.checked?"selectionOnly":"diagram"}));var U=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=C),J=null;Editor.isDarkMode()&&(J=this.addCheckbox(G,mxResources.get("dark"),!0),da+=26);var V=this.addCheckbox(G,mxResources.get("shadow"),aa.shadowVisible),P=null;if("png"==C||"jpeg"==C)P=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var R=
+this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),F,null,null,"jpeg"!=C);R.style.marginBottom="16px";var ia=document.createElement("input");ia.style.marginBottom="16px";ia.style.marginRight="8px";ia.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||ia.setAttribute("disabled","disabled");var la=document.createElement("select");la.style.maxWidth="260px";la.style.marginLeft="8px";la.style.marginRight="10px";la.style.marginBottom="16px";la.className="geBtn";y=document.createElement("option");
+y.setAttribute("value","none");mxUtils.write(y,mxResources.get("noChange"));la.appendChild(y);y=document.createElement("option");y.setAttribute("value","embedFonts");mxUtils.write(y,mxResources.get("embedFonts"));la.appendChild(y);y=document.createElement("option");y.setAttribute("value","lblToSvg");mxUtils.write(y,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||la.appendChild(y);mxEvent.addListener(la,"change",mxUtils.bind(this,function(){"lblToSvg"==la.value?(ia.checked=!0,
+ia.setAttribute("disabled","disabled"),ka.page.style.display="none","page"==ea.value&&(ea.value="diagram"),V.checked=!1,V.setAttribute("disabled","disabled"),u.style.display="inline-block",ta.style.display="none"):"disabled"==ia.getAttribute("disabled")&&(ia.checked=!1,ia.removeAttribute("disabled"),V.removeAttribute("disabled"),ka.page.style.display="",u.style.display="none",ta.style.display="")}));f&&(G.appendChild(ia),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,
+mxResources.get("txtSettings")+":"),G.appendChild(la),mxUtils.br(G),da+=60);var ta=document.createElement("select");ta.style.maxWidth="260px";ta.style.marginLeft="8px";ta.style.marginRight="10px";ta.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));ta.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));ta.appendChild(f);f=document.createElement("option");
+f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));ta.appendChild(f);var u=document.createElement("div");mxUtils.write(u,mxResources.get("LinksLost"));u.style.margin="7px";u.style.display="none";"svg"==C&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(ta),G.appendChild(u),mxUtils.br(G),mxUtils.br(G),da+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=pa.value;this.lastExportZoom=Y.value;q(Y.value,U.checked,!O.checked,
+V.checked,R.checked,ia.checked,pa.value,X.checked,!1,ta.value,null!=P?P.checked:null,null!=J?J.checked:null,ea.value,"embedFonts"==la.value,"lblToSvg"==la.value)}),null,g,m);this.showDialog(g.container,340,da,!0,!0,null,null,null,null,!0);Y.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,m,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var F=this.editor.graph;
if(null!=f){var C=document.createElement("h3");mxUtils.write(C,f);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(C)}var H=this.addCheckbox(y,mxResources.get("fit"),!0),G=this.addCheckbox(y,mxResources.get("shadow"),F.shadowVisible&&m,!m),aa=this.addCheckbox(y,g),da=this.addCheckbox(y,mxResources.get("lightbox"),!0),ba=this.addEditButton(y,da),Y=ba.getEditInput(),pa=1<F.model.getChildCount(F.model.getRoot()),O=this.addCheckbox(y,mxResources.get("layers"),
pa,!pa);O.style.marginLeft=Y.style.marginLeft;O.style.marginBottom="12px";O.style.marginTop="8px";mxEvent.addListener(da,"change",function(){da.checked?(pa&&O.removeAttribute("disabled"),Y.removeAttribute("disabled")):(O.setAttribute("disabled","disabled"),Y.setAttribute("disabled","disabled"));Y.checked&&da.checked?ba.getEditSelect().removeAttribute("disabled"):ba.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,y,mxUtils.bind(this,function(){d(H.checked,G.checked,aa.checked,
da.checked,ba.getLink(),O.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,m,q,y,F,C){function H(Y){var pa=" ",O="";m&&(pa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
@@ -3592,15 +3592,15 @@ g())}),d.name):g()}):H||g()}},function(y){g(y)}):g()});"undefined"!==typeof JSZi
C(X)});"image"==f.substring(0,5)?(H=!1,"image/png"==f.substring(0,9)&&(f=aa?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(Y=this.importXml(f,g,m,G,null,null!=da?mxEvent.isControlDown(da):null),H=!0)),H||(f=this.editor.graph,H=d.indexOf(";"),0<H&&(d=d.substring(0,H)+d.substring(d.indexOf(",",H+1))),G&&f.isGridEnabled()&&(g=f.snap(g),m=f.snap(m)),Y=[f.insertVertex(null,null,"",g,m,q,y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
d+";")])):/(\.*<graphml )/.test(d)?(ba=!0,this.importGraphML(d,pa)):null!=H&&null!=F&&(/(\.v(dx|sdx?))($|\?)/i.test(F)||/(\.vs(x|sx?))($|\?)/i.test(F))?(ba=!0,this.importVisio(H,pa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ba=!0,q=mxUtils.bind(this,function(O){4==O.readyState&&(200<=O.status&&299>=O.status?pa(O.responseText):null!=C&&C(null))}),null!=d?this.parseFileData(d,q,F):this.parseFile(H,
q,F)):0==d.indexOf("PK")&&null!=H?(ba=!0,this.importZipFile(H,pa,mxUtils.bind(this,function(){Y=this.insertTextAt(this.validateFileData(d),g,m,!0,null,G);C(Y)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(Y=this.insertTextAt(this.validateFileData(d),g,m,!0,null,G,null,null!=da?mxEvent.isControlDown(da):null));ba||null==C||C(Y);return Y};EditorUi.prototype.importFiles=function(d,f,g,m,q,y,F,C,H,G,aa,da,ba){m=null!=m?m:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var Y=null!=
-f&&null!=g,pa=!0;f=null!=f?f:0;g=null!=g?g:0;var O=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var X=aa||this.resampleThreshold,ea=0;ea<d.length;ea++)if("image/svg"!==d[ea].type.substring(0,9)&&"image/"===d[ea].type.substring(0,6)&&d[ea].size>X){O=!0;break}var ka=mxUtils.bind(this,function(){var ja=this.editor.graph,U=ja.gridSize;q=null!=q?q:mxUtils.bind(this,function(la,sa,u,J,N,W,T,Q,Z){try{return null!=la&&"<mxlibrary"==la.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
-la,T)),null):this.importFile(la,sa,u,J,N,W,T,Q,Z,Y,da,ba)}catch(oa){return this.handleError(oa),null}});y=null!=y?y:mxUtils.bind(this,function(la){ja.setSelectionCells(la)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var I=d.length,V=I,P=[],R=mxUtils.bind(this,function(la,sa){P[la]=sa;if(0==--V){this.spinner.stop();if(null!=C)C(P);else{var u=[];ja.getModel().beginUpdate();try{for(la=0;la<P.length;la++){var J=P[la]();null!=J&&(u=u.concat(J))}}finally{ja.getModel().endUpdate()}}y(u)}}),
-fa=0;fa<I;fa++)mxUtils.bind(this,function(la){var sa=d[la];if(null!=sa){var u=new FileReader;u.onload=mxUtils.bind(this,function(J){if(null==F||F(sa))if("image/"==sa.type.substring(0,6))if("image/svg"==sa.type.substring(0,9)){var N=Graph.clipSvgDataUri(J.target.result),W=N.indexOf(",");W=decodeURIComponent(escape(atob(N.substring(W+1))));var T=mxUtils.parseXml(W);W=T.getElementsByTagName("svg");if(0<W.length){W=W[0];var Q=da?null:W.getAttribute("content");null!=Q&&"<"!=Q.charAt(0)&&"%"!=Q.charAt(0)&&
-(Q=unescape(window.atob?atob(Q):Base64.decode(Q,!0)));null!=Q&&"%"==Q.charAt(0)&&(Q=decodeURIComponent(Q));null==Q||"<mxfile "!==Q.substring(0,8)&&"<mxGraphModel "!==Q.substring(0,14)?R(la,mxUtils.bind(this,function(){try{if(null!=T){var wa=T.getElementsByTagName("svg");if(0<wa.length){var Aa=wa[0],ta=Aa.getAttribute("width"),Ba=Aa.getAttribute("height");ta=null!=ta&&"%"!=ta.charAt(ta.length-1)?parseFloat(ta):NaN;Ba=null!=Ba&&"%"!=Ba.charAt(Ba.length-1)?parseFloat(Ba):NaN;var va=Aa.getAttribute("viewBox");
-if(null==va||0==va.length)Aa.setAttribute("viewBox","0 0 "+ta+" "+Ba);else if(isNaN(ta)||isNaN(Ba)){var Oa=va.split(" ");3<Oa.length&&(ta=parseFloat(Oa[2]),Ba=parseFloat(Oa[3]))}N=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Ca=Math.min(1,Math.min(m/Math.max(1,ta)),m/Math.max(1,Ba)),Ta=q(N,sa.type,f+la*U,g+la*U,Math.max(1,Math.round(ta*Ca)),Math.max(1,Math.round(Ba*Ca)),sa.name);if(isNaN(ta)||isNaN(Ba)){var Va=new Image;Va.onload=mxUtils.bind(this,function(){ta=Math.max(1,Va.width);Ba=Math.max(1,
-Va.height);Ta[0].geometry.width=ta;Ta[0].geometry.height=Ba;Aa.setAttribute("viewBox","0 0 "+ta+" "+Ba);N=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Ja=N.indexOf(";");0<Ja&&(N=N.substring(0,Ja)+N.substring(N.indexOf(",",Ja+1)));ja.setCellStyles("image",N,[Ta[0]])});Va.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}return Ta}}}catch(Ja){}return null})):R(la,mxUtils.bind(this,function(){return q(Q,"text/xml",f+la*U,g+la*U,0,0,sa.name)}))}else R(la,mxUtils.bind(this,function(){return null}))}else{W=
-!1;if("image/png"==sa.type){var Z=da?null:this.extractGraphModelFromPng(J.target.result);if(null!=Z&&0<Z.length){var oa=new Image;oa.src=J.target.result;R(la,mxUtils.bind(this,function(){return q(Z,"text/xml",f+la*U,g+la*U,oa.width,oa.height,sa.name)}));W=!0}}W||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):
-this.loadImage(J.target.result,mxUtils.bind(this,function(wa){this.resizeImage(wa,J.target.result,mxUtils.bind(this,function(Aa,ta,Ba){R(la,mxUtils.bind(this,function(){if(null!=Aa&&Aa.length<G){var va=pa&&this.isResampleImageSize(sa.size,aa)?Math.min(1,Math.min(m/ta,m/Ba)):1;return q(Aa,sa.type,f+la*U,g+la*U,Math.round(ta*va),Math.round(Ba*va),sa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),pa,m,aa,sa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else N=
-J.target.result,q(N,sa.type,f+la*U,g+la*U,240,160,sa.name,function(wa){R(la,function(){return wa})},sa)});/(\.v(dx|sdx?))($|\?)/i.test(sa.name)||/(\.vs(x|sx?))($|\?)/i.test(sa.name)?q(null,sa.type,f+la*U,g+la*U,240,160,sa.name,function(J){R(la,function(){return J})},sa):"image"==sa.type.substring(0,5)||"application/pdf"==sa.type?u.readAsDataURL(sa):u.readAsText(sa)}})(fa)});if(O){O=[];for(ea=0;ea<d.length;ea++)O.push(d[ea]);d=O;this.confirmImageResize(function(ja){pa=ja;ka()},H)}else ka()};EditorUi.prototype.isBlankFile=
+f&&null!=g,pa=!0;f=null!=f?f:0;g=null!=g?g:0;var O=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var X=aa||this.resampleThreshold,ea=0;ea<d.length;ea++)if("image/svg"!==d[ea].type.substring(0,9)&&"image/"===d[ea].type.substring(0,6)&&d[ea].size>X){O=!0;break}var ka=mxUtils.bind(this,function(){var ja=this.editor.graph,U=ja.gridSize;q=null!=q?q:mxUtils.bind(this,function(la,ta,u,I,N,W,T,Q,Z){try{return null!=la&&"<mxlibrary"==la.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
+la,T)),null):this.importFile(la,ta,u,I,N,W,T,Q,Z,Y,da,ba)}catch(na){return this.handleError(na),null}});y=null!=y?y:mxUtils.bind(this,function(la){ja.setSelectionCells(la)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=d.length,V=J,P=[],R=mxUtils.bind(this,function(la,ta){P[la]=ta;if(0==--V){this.spinner.stop();if(null!=C)C(P);else{var u=[];ja.getModel().beginUpdate();try{for(la=0;la<P.length;la++){var I=P[la]();null!=I&&(u=u.concat(I))}}finally{ja.getModel().endUpdate()}}y(u)}}),
+ia=0;ia<J;ia++)mxUtils.bind(this,function(la){var ta=d[la];if(null!=ta){var u=new FileReader;u.onload=mxUtils.bind(this,function(I){if(null==F||F(ta))if("image/"==ta.type.substring(0,6))if("image/svg"==ta.type.substring(0,9)){var N=Graph.clipSvgDataUri(I.target.result),W=N.indexOf(",");W=decodeURIComponent(escape(atob(N.substring(W+1))));var T=mxUtils.parseXml(W);W=T.getElementsByTagName("svg");if(0<W.length){W=W[0];var Q=da?null:W.getAttribute("content");null!=Q&&"<"!=Q.charAt(0)&&"%"!=Q.charAt(0)&&
+(Q=unescape(window.atob?atob(Q):Base64.decode(Q,!0)));null!=Q&&"%"==Q.charAt(0)&&(Q=decodeURIComponent(Q));null==Q||"<mxfile "!==Q.substring(0,8)&&"<mxGraphModel "!==Q.substring(0,14)?R(la,mxUtils.bind(this,function(){try{if(null!=T){var va=T.getElementsByTagName("svg");if(0<va.length){var Ba=va[0],sa=Ba.getAttribute("width"),Da=Ba.getAttribute("height");sa=null!=sa&&"%"!=sa.charAt(sa.length-1)?parseFloat(sa):NaN;Da=null!=Da&&"%"!=Da.charAt(Da.length-1)?parseFloat(Da):NaN;var Aa=Ba.getAttribute("viewBox");
+if(null==Aa||0==Aa.length)Ba.setAttribute("viewBox","0 0 "+sa+" "+Da);else if(isNaN(sa)||isNaN(Da)){var za=Aa.split(" ");3<za.length&&(sa=parseFloat(za[2]),Da=parseFloat(za[3]))}N=Editor.createSvgDataUri(mxUtils.getXml(Ba));var Ca=Math.min(1,Math.min(m/Math.max(1,sa)),m/Math.max(1,Da)),Qa=q(N,ta.type,f+la*U,g+la*U,Math.max(1,Math.round(sa*Ca)),Math.max(1,Math.round(Da*Ca)),ta.name);if(isNaN(sa)||isNaN(Da)){var Za=new Image;Za.onload=mxUtils.bind(this,function(){sa=Math.max(1,Za.width);Da=Math.max(1,
+Za.height);Qa[0].geometry.width=sa;Qa[0].geometry.height=Da;Ba.setAttribute("viewBox","0 0 "+sa+" "+Da);N=Editor.createSvgDataUri(mxUtils.getXml(Ba));var cb=N.indexOf(";");0<cb&&(N=N.substring(0,cb)+N.substring(N.indexOf(",",cb+1)));ja.setCellStyles("image",N,[Qa[0]])});Za.src=Editor.createSvgDataUri(mxUtils.getXml(Ba))}return Qa}}}catch(cb){}return null})):R(la,mxUtils.bind(this,function(){return q(Q,"text/xml",f+la*U,g+la*U,0,0,ta.name)}))}else R(la,mxUtils.bind(this,function(){return null}))}else{W=
+!1;if("image/png"==ta.type){var Z=da?null:this.extractGraphModelFromPng(I.target.result);if(null!=Z&&0<Z.length){var na=new Image;na.src=I.target.result;R(la,mxUtils.bind(this,function(){return q(Z,"text/xml",f+la*U,g+la*U,na.width,na.height,ta.name)}));W=!0}}W||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):
+this.loadImage(I.target.result,mxUtils.bind(this,function(va){this.resizeImage(va,I.target.result,mxUtils.bind(this,function(Ba,sa,Da){R(la,mxUtils.bind(this,function(){if(null!=Ba&&Ba.length<G){var Aa=pa&&this.isResampleImageSize(ta.size,aa)?Math.min(1,Math.min(m/sa,m/Da)):1;return q(Ba,ta.type,f+la*U,g+la*U,Math.round(sa*Aa),Math.round(Da*Aa),ta.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),pa,m,aa,ta.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else N=
+I.target.result,q(N,ta.type,f+la*U,g+la*U,240,160,ta.name,function(va){R(la,function(){return va})},ta)});/(\.v(dx|sdx?))($|\?)/i.test(ta.name)||/(\.vs(x|sx?))($|\?)/i.test(ta.name)?q(null,ta.type,f+la*U,g+la*U,240,160,ta.name,function(I){R(la,function(){return I})},ta):"image"==ta.type.substring(0,5)||"application/pdf"==ta.type?u.readAsDataURL(ta):u.readAsText(ta)}})(ia)});if(O){O=[];for(ea=0;ea<d.length;ea++)O.push(d[ea]);d=O;this.confirmImageResize(function(ja){pa=ja;ka()},H)}else ka()};EditorUi.prototype.isBlankFile=
function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(y,F){if(y||f)mxSettings.setResizeImages(y?F:null),mxSettings.save();g();d(F)};null==m||f?this.showDialog((new ConfirmDialog(this,
mxResources.get("resizeLargeImages"),function(y){q(y,!0)},function(y){q(y,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):q(!1,m)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var m=new FileReader;m.onload=mxUtils.bind(this,function(){this.parseFileData(m.result,
f,g)});m.readAsText(d)};EditorUi.prototype.parseFileData=function(d,f,g){var m=new XMLHttpRequest;m.open("POST",OPEN_URL);m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");m.onreadystatechange=function(){f(m)};m.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>
@@ -3608,32 +3608,32 @@ f};EditorUi.prototype.resizeImage=function(d,f,g,m,q,y,F){q=null!=q?q:this.maxIm
Y!==O&&(f=Y,C=aa,H=da)}}}catch(X){}g(f,C,H)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var m=new Image;m.onload=function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;f(m)};null!=g&&(m.onerror=g);m.src=d}catch(q){if(null!=g)g(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?
urlParams.rough:d)};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());
var d=this,f=this.editor.graph;Editor.isDarkMode()&&(f.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(X){var ea=X.getEvent();return null==X.getState()&&!mxEvent.isMouseEvent(ea)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(ea)&&(null==X.getState()||mxEvent.isControlDown(ea)||mxEvent.isShiftDown(ea))});f.cellEditor.editPlantUmlData=function(X,ea,ka){var ja=JSON.parse(ka);ea=new TextareaDialog(d,mxResources.get("plantUml")+
-":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(U,ja.format,function(I,V,P){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==ja.format)f.labelChanged(X,"<pre>"+I+"</pre>"),f.updateCellSize(X,!0);else{f.setCellStyles("image",d.convertDataUri(I),[X]);var R=f.model.getGeometry(X);null!=R&&(R=R.clone(),R.width=V,R.height=P,f.cellsResized([X],[R],!1))}f.setAttributeForCell(X,"plantUmlData",JSON.stringify({data:U,format:ja.format}))}finally{f.getModel().endUpdate()}},
-function(I){d.handleError(I)})},null,null,400,220);d.showDialog(ea.container,420,300,!0,!0);ea.init()};f.cellEditor.editMermaidData=function(X,ea,ka){var ja=JSON.parse(ka);ea=new TextareaDialog(d,mxResources.get("mermaid")+":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(U,ja.config,function(I,V,P){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",I,[X]);var R=f.model.getGeometry(X);null!=R&&(R=R.clone(),R.width=
-Math.max(R.width,V),R.height=Math.max(R.height,P),f.cellsResized([X],[R],!1));f.setAttributeForCell(X,"mermaidData",JSON.stringify({data:U,config:ja.config},null,2))}finally{f.getModel().endUpdate()}},function(I){d.handleError(I)})},null,null,400,220);d.showDialog(ea.container,420,300,!0,!0);ea.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(X,ea){try{var ka=this.graph.getAttributeForCell(X,"plantUmlData");if(null!=ka)this.editPlantUmlData(X,ea,ka);else if(ka=this.graph.getAttributeForCell(X,
+":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(U,ja.format,function(J,V,P){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==ja.format)f.labelChanged(X,"<pre>"+J+"</pre>"),f.updateCellSize(X,!0);else{f.setCellStyles("image",d.convertDataUri(J),[X]);var R=f.model.getGeometry(X);null!=R&&(R=R.clone(),R.width=V,R.height=P,f.cellsResized([X],[R],!1))}f.setAttributeForCell(X,"plantUmlData",JSON.stringify({data:U,format:ja.format}))}finally{f.getModel().endUpdate()}},
+function(J){d.handleError(J)})},null,null,400,220);d.showDialog(ea.container,420,300,!0,!0);ea.init()};f.cellEditor.editMermaidData=function(X,ea,ka){var ja=JSON.parse(ka);ea=new TextareaDialog(d,mxResources.get("mermaid")+":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(U,ja.config,function(J,V,P){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",J,[X]);var R=f.model.getGeometry(X);null!=R&&(R=R.clone(),R.width=
+Math.max(R.width,V),R.height=Math.max(R.height,P),f.cellsResized([X],[R],!1));f.setAttributeForCell(X,"mermaidData",JSON.stringify({data:U,config:ja.config},null,2))}finally{f.getModel().endUpdate()}},function(J){d.handleError(J)})},null,null,400,220);d.showDialog(ea.container,420,300,!0,!0);ea.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(X,ea){try{var ka=this.graph.getAttributeForCell(X,"plantUmlData");if(null!=ka)this.editPlantUmlData(X,ea,ka);else if(ka=this.graph.getAttributeForCell(X,
"mermaidData"),null!=ka)this.editMermaidData(X,ea,ka);else{var ja=f.getCellStyle(X);"1"==mxUtils.getValue(ja,"metaEdit","0")?d.showDataDialog(X):g.apply(this,arguments)}}catch(U){d.handleError(U)}};f.getLinkTitle=function(X){return d.getLinkTitle(X)};f.customLinkClicked=function(X){var ea=!1;try{d.handleCustomLink(X),ea=!0}catch(ka){d.handleError(ka)}return ea};var m=f.parseBackgroundImage;f.parseBackgroundImage=function(X){var ea=m.apply(this,arguments);null!=ea&&null!=ea.src&&Graph.isPageLink(ea.src)&&
(ea={originalSrc:ea.src});return ea};var q=f.setBackgroundImage;f.setBackgroundImage=function(X){null!=X&&null!=X.originalSrc&&(X=d.createImageForPageLink(X.originalSrc,d.currentPage,this));q.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(X,ea){X=null!=f.backgroundImage?
f.backgroundImage.originalSrc:null;if(null!=X){var ka=X.indexOf(",");if(0<ka)for(X=X.substring(ka+1),ea=ea.getProperty("patches"),ka=0;ka<ea.length;ka++)if(null!=ea[ka][EditorUi.DIFF_UPDATE]&&null!=ea[ka][EditorUi.DIFF_UPDATE][X]||null!=ea[ka][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(ea[ka][EditorUi.DIFF_REMOVE],X)){f.refreshBackgroundImage();break}}}));var y=f.getBackgroundImageObject;f.getBackgroundImageObject=function(X,ea){var ka=y.apply(this,arguments);if(null!=ka&&null!=ka.originalSrc)if(!ea)ka=
-{src:ka.originalSrc};else if(ea&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var ja=this.stylesheet,U=this.shapeForegroundColor,I=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";ka=d.createImageForPageLink(ka.originalSrc);this.shapeBackgroundColor=I;this.shapeForegroundColor=U;this.stylesheet=ja}return ka};var F=this.clearDefaultStyle;this.clearDefaultStyle=function(){F.apply(this,arguments)};
+{src:ka.originalSrc};else if(ea&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var ja=this.stylesheet,U=this.shapeForegroundColor,J=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";ka=d.createImageForPageLink(ka.originalSrc);this.shapeBackgroundColor=J;this.shapeForegroundColor=U;this.stylesheet=ja}return ka};var F=this.clearDefaultStyle;this.clearDefaultStyle=function(){F.apply(this,arguments)};
this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var C=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(X){X=null!=X?X:"";"1"==urlParams.dev&&(X+=(0<X.length?"&":"?")+"dev=1");return C.apply(this,arguments)};var H=
-f.addClickHandler;f.addClickHandler=function(X,ea,ka){var ja=ea;ea=function(U,I){if(null==I){var V=mxEvent.getSource(U);"a"==V.nodeName.toLowerCase()&&(I=V.getAttribute("href"))}null!=I&&f.isCustomLink(I)&&(mxEvent.isTouchEvent(U)||!mxEvent.isPopupTrigger(U))&&f.customLinkClicked(I)&&mxEvent.consume(U);null!=ja&&ja(U,I)};H.call(this,X,ea,ka)};D.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;
+f.addClickHandler;f.addClickHandler=function(X,ea,ka){var ja=ea;ea=function(U,J){if(null==J){var V=mxEvent.getSource(U);"a"==V.nodeName.toLowerCase()&&(J=V.getAttribute("href"))}null!=J&&f.isCustomLink(J)&&(mxEvent.isTouchEvent(U)||!mxEvent.isPopupTrigger(U))&&f.customLinkClicked(J)&&mxEvent.consume(U);null!=ja&&ja(U,J)};H.call(this,X,ea,ka)};D.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;
this.menus.addPopupMenuEditItems=function(X,ea,ka){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(X,"delete - cut copy copyAsImage - duplicate".split(" "),null,ka)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var aa=f.getExportVariables;f.getExportVariables=function(){var X=aa.apply(this,arguments),ea=d.getCurrentFile();
null!=ea&&(X.filename=ea.getTitle());X.pagecount=null!=d.pages?d.pages.length:1;X.page=null!=d.currentPage?d.currentPage.getName():"";X.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return X};var da=f.getGlobalVariable;f.getGlobalVariable=function(X){var ea=d.getCurrentFile();return"filename"==X&&null!=ea?ea.getTitle():"page"==X&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==X?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+
1:1:"pagecount"==X?null!=d.pages?d.pages.length:1:da.apply(this,arguments)};var ba=f.labelLinkClicked;f.labelLinkClicked=function(X,ea,ka){var ja=ea.getAttribute("href");if(null==ja||!f.isCustomLink(ja)||!mxEvent.isTouchEvent(ka)&&mxEvent.isPopupTrigger(ka))ba.apply(this,arguments);else{if(!f.isEnabled()||null!=X&&f.isCellLocked(X.cell))f.customLinkClicked(ja),f.getRubberband().reset();mxEvent.consume(ka)}};this.editor.getOrCreateFilename=function(){var X=d.defaultFilename,ea=d.getCurrentFile();null!=
ea&&(X=null!=ea.getTitle()?ea.getTitle():X);return X};var Y=this.actions.get("print");Y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);Y.visible=Y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),
this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(X){var ea=f.cellEditor.text2,ka=null;null!=ea&&(mxEvent.addListener(ea,"dragleave",function(ja){null!=ka&&(ka.parentNode.removeChild(ka),
-ka=null);ja.stopPropagation();ja.preventDefault()}),mxEvent.addListener(ea,"dragover",mxUtils.bind(this,function(ja){null==ka&&(!mxClient.IS_IE||10<document.documentMode)&&(ka=this.highlightElement(ea));ja.stopPropagation();ja.preventDefault()})),mxEvent.addListener(ea,"drop",mxUtils.bind(this,function(ja){null!=ka&&(ka.parentNode.removeChild(ka),ka=null);if(0<ja.dataTransfer.files.length)this.importFiles(ja.dataTransfer.files,0,0,this.maxImageSize,function(I,V,P,R,fa,la){f.insertImage(I,fa,la)},
-function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var V=0;V<I.length;V++)I[V]()},mxEvent.isControlDown(ja));else if(0<=mxUtils.indexOf(ja.dataTransfer.types,"text/uri-list")){var U=ja.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(I){var V=Math.max(1,I.width);I=Math.max(1,I.height);var P=this.maxImageSize;P=Math.min(1,Math.min(P/Math.max(1,V)),P/Math.max(1,I));f.insertImage(decodeURIComponent(U),
-V*P,I*P)})):document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(ja.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(ja.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"));ja.stopPropagation();ja.preventDefault()})))}));this.isSettingsEnabled()&&(Y=this.editor.graph.view,Y.setUnit(mxSettings.getUnit()),Y.addListener("unitChanged",
+ka=null);ja.stopPropagation();ja.preventDefault()}),mxEvent.addListener(ea,"dragover",mxUtils.bind(this,function(ja){null==ka&&(!mxClient.IS_IE||10<document.documentMode)&&(ka=this.highlightElement(ea));ja.stopPropagation();ja.preventDefault()})),mxEvent.addListener(ea,"drop",mxUtils.bind(this,function(ja){null!=ka&&(ka.parentNode.removeChild(ka),ka=null);if(0<ja.dataTransfer.files.length)this.importFiles(ja.dataTransfer.files,0,0,this.maxImageSize,function(J,V,P,R,ia,la){f.insertImage(J,ia,la)},
+function(){},function(J){return"image/"==J.type.substring(0,6)},function(J){for(var V=0;V<J.length;V++)J[V]()},mxEvent.isControlDown(ja));else if(0<=mxUtils.indexOf(ja.dataTransfer.types,"text/uri-list")){var U=ja.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(J){var V=Math.max(1,J.width);J=Math.max(1,J.height);var P=this.maxImageSize;P=Math.min(1,Math.min(P/Math.max(1,V)),P/Math.max(1,J));f.insertImage(decodeURIComponent(U),
+V*P,J*P)})):document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(ja.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(ja.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"));ja.stopPropagation();ja.preventDefault()})))}));this.isSettingsEnabled()&&(Y=this.editor.graph.view,Y.setUnit(mxSettings.getUnit()),Y.addListener("unitChanged",
function(X,ea){mxSettings.setUnit(ea.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,Y.unit),this.refresh());if("1"==urlParams.styledev){Y=document.getElementById("geFooter");null!=Y&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top=
"14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),Y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,ea){0<this.editor.graph.getSelectionCount()?(X=this.editor.graph.getSelectionCell(),
X=this.editor.graph.getModel().getStyle(X),this.styleInput.value=X||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var pa=this.isSelectionAllowed;this.isSelectionAllowed=function(X){return mxEvent.getSource(X)==this.styleInput?!0:pa.apply(this,arguments)}}Y=document.getElementById("geInfo");null!=Y&&Y.parentNode.removeChild(Y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var O=null;mxEvent.addListener(f.container,"dragleave",
function(X){f.isEnabled()&&(null!=O&&(O.parentNode.removeChild(O),O=null),X.stopPropagation(),X.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(X){null==O&&(!mxClient.IS_IE||10<document.documentMode)&&(O=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();X.stopPropagation();X.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(X){null!=O&&(O.parentNode.removeChild(O),O=null);if(f.isEnabled()){var ea=
-mxUtils.convertPoint(f.container,mxEvent.getClientX(X),mxEvent.getClientY(X)),ka=X.dataTransfer.files,ja=f.view.translate,U=f.view.scale,I=ea.x/U-ja.x,V=ea.y/U-ja.y;if(0<ka.length)ea=1==ka.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===ka[0].type.substring(0,9)||"image/"!==ka[0].type.substring(0,6)||/(\.drawio.png)$/i.test(ka[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(X)||ea)?(!mxEvent.isShiftDown(X)&&ea&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(ka,
-!0)):(mxEvent.isAltDown(X)&&(V=I=null),this.importFiles(ka,I,V,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(X),null,null,mxEvent.isShiftDown(X),X));else{mxEvent.isAltDown(X)&&(V=I=0);var P=0<=mxUtils.indexOf(X.dataTransfer.types,"text/uri-list")?X.dataTransfer.getData("text/uri-list"):null;ka=this.extractGraphModelFromEvent(X,null!=this.pages);if(null!=ka)f.setSelectionCells(this.importXml(ka,I,V,!0));else if(0<=mxUtils.indexOf(X.dataTransfer.types,"text/html")){var R=X.dataTransfer.getData("text/html");
-ka=document.createElement("div");ka.innerHTML=f.sanitizeHtml(R);var fa=null;ea=ka.getElementsByTagName("img");null!=ea&&1==ea.length?(R=ea[0].getAttribute("src"),null==R&&(R=ea[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(R)||(fa=!0)):(ea=ka.getElementsByTagName("a"),null!=ea&&1==ea.length?R=ea[0].getAttribute("href"):(ka=ka.getElementsByTagName("pre"),null!=ka&&1==ka.length&&(R=mxUtils.getTextContent(ka[0]))));var la=!0,sa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(R,
-I,V,!0,fa,null,la,mxEvent.isControlDown(X)))});fa&&null!=R&&R.length>this.resampleThreshold?this.confirmImageResize(function(u){la=u;sa()},mxEvent.isControlDown(X)):sa()}else null!=P&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),mxUtils.bind(this,function(u){var J=Math.max(1,u.width);u=Math.max(1,u.height);var N=this.maxImageSize;N=Math.min(1,Math.min(N/Math.max(1,J)),N/Math.max(1,u));f.setSelectionCell(f.insertVertex(null,null,"",I,V,J*N,u*N,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-P+";"))}),mxUtils.bind(this,function(u){f.setSelectionCells(this.insertTextAt(P,I,V,!0))})):0<=mxUtils.indexOf(X.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(X.dataTransfer.getData("text/plain"),I,V,!0))}}X.stopPropagation();X.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",
+mxUtils.convertPoint(f.container,mxEvent.getClientX(X),mxEvent.getClientY(X)),ka=X.dataTransfer.files,ja=f.view.translate,U=f.view.scale,J=ea.x/U-ja.x,V=ea.y/U-ja.y;if(0<ka.length)ea=1==ka.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===ka[0].type.substring(0,9)||"image/"!==ka[0].type.substring(0,6)||/(\.drawio.png)$/i.test(ka[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(X)||ea)?(!mxEvent.isShiftDown(X)&&ea&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(ka,
+!0)):(mxEvent.isAltDown(X)&&(V=J=null),this.importFiles(ka,J,V,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(X),null,null,mxEvent.isShiftDown(X),X));else{mxEvent.isAltDown(X)&&(V=J=0);var P=0<=mxUtils.indexOf(X.dataTransfer.types,"text/uri-list")?X.dataTransfer.getData("text/uri-list"):null;ka=this.extractGraphModelFromEvent(X,null!=this.pages);if(null!=ka)f.setSelectionCells(this.importXml(ka,J,V,!0));else if(0<=mxUtils.indexOf(X.dataTransfer.types,"text/html")){var R=X.dataTransfer.getData("text/html");
+ka=document.createElement("div");ka.innerHTML=f.sanitizeHtml(R);var ia=null;ea=ka.getElementsByTagName("img");null!=ea&&1==ea.length?(R=ea[0].getAttribute("src"),null==R&&(R=ea[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(R)||(ia=!0)):(ea=ka.getElementsByTagName("a"),null!=ea&&1==ea.length?R=ea[0].getAttribute("href"):(ka=ka.getElementsByTagName("pre"),null!=ka&&1==ka.length&&(R=mxUtils.getTextContent(ka[0]))));var la=!0,ta=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(R,
+J,V,!0,ia,null,la,mxEvent.isControlDown(X)))});ia&&null!=R&&R.length>this.resampleThreshold?this.confirmImageResize(function(u){la=u;ta()},mxEvent.isControlDown(X)):ta()}else null!=P&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),mxUtils.bind(this,function(u){var I=Math.max(1,u.width);u=Math.max(1,u.height);var N=this.maxImageSize;N=Math.min(1,Math.min(N/Math.max(1,I)),N/Math.max(1,u));f.setSelectionCell(f.insertVertex(null,null,"",J,V,I*N,u*N,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+P+";"))}),mxUtils.bind(this,function(u){f.setSelectionCells(this.insertTextAt(P,J,V,!0))})):0<=mxUtils.indexOf(X.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(X.dataTransfer.getData("text/plain"),J,V,!0))}}X.stopPropagation();X.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",
mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,m=!1,q=0;q<g.types.length;q++)if("text/"===g.types[q].substring(0,5)){m=!0;break}if(!m){var y=g.items;for(index in y){var F=y[index];if("file"===F.kind){if(d.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,function(H,G,aa,da,ba,Y){d.insertImage(H,ba,Y)},function(){},function(H){return"image/"==H.type.substring(0,6)},function(H){for(var G=0;G<H.length;G++)H[G]()});
else{var C=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(H){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck",
"false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var m=!1;this.keyHandler.bindControlKey(88,
@@ -3689,26 +3689,26 @@ Q.substring(0,26)?Q=atob(Q.substring(26)):"data:image/svg+xml;utf8,"==Q.substrin
mxResources.get(G.messageKey):G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==G.action){this.spinner.stop();var Y=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(Q){null!=Q?F.postMessage(JSON.stringify({event:"prompt",value:Q,message:G}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",
message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(Y.container,300,80,!0,!1);Y.init();return}if("draft"==G.action){var pa=da(G.xml);this.spinner.stop();Y=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),pa,mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",
message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(Y.container,640,480,!0,!1,mxUtils.bind(this,function(Q){Q&&this.actions.get("exit").funct()}));try{Y.init()}catch(Q){F.postMessage(JSON.stringify({event:"draft",error:Q.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();
-var O=1==G.enableRecent,X=1==G.enableSearch,ea=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var ka=this.getCurrentUser(),ja=new TemplatesDialog(this,function(Q,Z,oa){Q=Q||this.emptyDiagramXml;F.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:Z,tempUrl:oa.url,libs:oa.libs,builtIn:null!=oa.info&&null!=oa.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=
-ka?ka.id:null,O?mxUtils.bind(this,function(Q,Z,oa){this.remoteInvoke("getRecentDiagrams",[oa],null,Q,Z)}):null,X?mxUtils.bind(this,function(Q,Z,oa,wa){this.remoteInvoke("searchDiagrams",[Q,wa],null,Z,oa)}):null,mxUtils.bind(this,function(Q,Z,oa){this.remoteInvoke("getFileContent",[Q.url],null,Z,oa)}),null,ea?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,!1,!1,!0,!0);this.showDialog(ja.container,window.innerWidth,window.innerHeight,!0,
-!1,null,!1,!0);return}Y=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(Q,Z,oa,wa){Q=Q||this.emptyDiagramXml;null!=G.callback?F.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:Z,tempUrl:oa,libs:wa,builtIn:!0,message:G}),"*"):(d(Q,H,Q!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,O?mxUtils.bind(this,function(Q){this.remoteInvoke("getRecentDiagrams",[null],
-null,Q,function(){Q(null,"Network Error!")})}):null,X?mxUtils.bind(this,function(Q,Z){this.remoteInvoke("searchDiagrams",[Q,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(Q,Z,oa){F.postMessage(JSON.stringify({event:"template",docUrl:Q,info:Z,name:oa}),"*")}),null,null,ea?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,1==G.withoutType);this.showDialog(Y.container,620,460,!0,!1,mxUtils.bind(this,function(Q){this.sidebar.hideTooltip();
-Q&&this.actions.get("exit").funct()}));Y.init();return}if("textContent"==G.action){var U=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:U,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var I=null!=G.messageKey?mxResources.get(G.messageKey):
-G.message;null==G.show||G.show?this.spinner.spin(document.body,I):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var V=null!=G.xml?G.xml:
-this.getFileData(!0);this.editor.graph.setEnabled(!1);var P=this.editor.graph,R=mxUtils.bind(this,function(Q){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=G.format;Z.message=G;Z.data=Q;Z.xml=V;F.postMessage(JSON.stringify(Z),"*")}),fa=mxUtils.bind(this,function(Q){null==Q&&(Q=Editor.blankImage);"xmlpng"==G.format&&(Q=Editor.writeGraphModelToPng(Q,"tEXt","mxfile",encodeURIComponent(V)));P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);
-R(Q)}),la=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var sa=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=la){var Q=P.getGlobalVariable;P=this.createTemporaryGraph(P.getStylesheet());for(var Z,oa=0;oa<this.pages.length;oa++)if(this.pages[oa].getId()==la){Z=this.updatePageRoot(this.pages[oa]);break}null==Z&&(Z=this.currentPage);P.getGlobalVariable=function(Ba){return"page"==Ba?Z.getName():
-"pagenumber"==Ba?1:Q.apply(this,arguments)};document.body.appendChild(P.container);P.model.setRoot(Z.root)}if(null!=G.layerIds){var wa=P.model,Aa=wa.getChildCells(wa.getRoot()),ta={};for(oa=0;oa<G.layerIds.length;oa++)ta[G.layerIds[oa]]=!0;for(oa=0;oa<Aa.length;oa++)wa.setVisible(Aa[oa],ta[Aa[oa].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ba){fa(Ba.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){fa(null)}),null,null,G.scale,G.transparent,G.shadow,
-null,P,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length?(g=!0,this.setFileData(V),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(sa)},0):sa()):sa()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=la?"&pageId="+la:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(V))).send(mxUtils.bind(this,
-function(Q){200<=Q.getStatus()&&299>=Q.getStatus()?R("data:image/png;base64,"+Q.getText()):fa(null)}),mxUtils.bind(this,function(){fa(null)}))}}else sa=mxUtils.bind(this,function(){var Q=this.createLoadMessage("export");Q.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Z=this.getXmlFileData();Q.xml=mxUtils.getXml(Z);Q.data=this.getFileData(null,null,!0,null,null,null,Z);Q.format=G.format}else if("html"==G.format)Z=this.editor.getGraphXml(),
-Q.data=this.getHtml(Z,this.editor.graph),Q.xml=mxUtils.getXml(Z),Q.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=G.background?G.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);Q.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Q.format="svg";var oa=mxUtils.bind(this,function(wa){this.editor.graph.setEnabled(!0);this.spinner.stop();Q.data=Editor.createSvgDataUri(wa);F.postMessage(JSON.stringify(Q),"*")});if("xmlsvg"==G.format)(null==G.spin&&
-null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(Q.xml,this.editor.graph,null,!0,oa,null,null,G.embedImages,Z,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),Z=this.editor.graph.getSvg(Z,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),
-(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(Z),this.embedFonts(Z,mxUtils.bind(this,function(wa){G.embedImages||null==G.embedImages?this.editor.convertImages(wa,mxUtils.bind(this,function(Aa){oa(mxUtils.getXml(Aa))})):oa(mxUtils.getXml(wa))}));return}F.postMessage(JSON.stringify(Q),"*")}),null!=G.xml&&0<G.xml.length?(g=!0,this.setFileData(G.xml),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(sa)},0):sa()):sa();return}if("load"==
+var O=1==G.enableRecent,X=1==G.enableSearch,ea=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var ka=this.getCurrentUser(),ja=new TemplatesDialog(this,function(Q,Z,na){Q=Q||this.emptyDiagramXml;F.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:Z,tempUrl:na.url,libs:na.libs,builtIn:null!=na.info&&null!=na.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=
+ka?ka.id:null,O?mxUtils.bind(this,function(Q,Z,na){this.remoteInvoke("getRecentDiagrams",[na],null,Q,Z)}):null,X?mxUtils.bind(this,function(Q,Z,na,va){this.remoteInvoke("searchDiagrams",[Q,va],null,Z,na)}):null,mxUtils.bind(this,function(Q,Z,na){this.remoteInvoke("getFileContent",[Q.url],null,Z,na)}),null,ea?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,!1,!1,!0,!0);this.showDialog(ja.container,window.innerWidth,window.innerHeight,!0,
+!1,null,!1,!0);return}Y=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(Q,Z,na,va){Q=Q||this.emptyDiagramXml;null!=G.callback?F.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:Z,tempUrl:na,libs:va,builtIn:!0,message:G}),"*"):(d(Q,H,Q!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,O?mxUtils.bind(this,function(Q){this.remoteInvoke("getRecentDiagrams",[null],
+null,Q,function(){Q(null,"Network Error!")})}):null,X?mxUtils.bind(this,function(Q,Z){this.remoteInvoke("searchDiagrams",[Q,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(Q,Z,na){F.postMessage(JSON.stringify({event:"template",docUrl:Q,info:Z,name:na}),"*")}),null,null,ea?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,1==G.withoutType);this.showDialog(Y.container,620,460,!0,!1,mxUtils.bind(this,function(Q){this.sidebar.hideTooltip();
+Q&&this.actions.get("exit").funct()}));Y.init();return}if("textContent"==G.action){var U=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:U,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var J=null!=G.messageKey?mxResources.get(G.messageKey):
+G.message;null==G.show||G.show?this.spinner.spin(document.body,J):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var V=null!=G.xml?G.xml:
+this.getFileData(!0);this.editor.graph.setEnabled(!1);var P=this.editor.graph,R=mxUtils.bind(this,function(Q){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=G.format;Z.message=G;Z.data=Q;Z.xml=V;F.postMessage(JSON.stringify(Z),"*")}),ia=mxUtils.bind(this,function(Q){null==Q&&(Q=Editor.blankImage);"xmlpng"==G.format&&(Q=Editor.writeGraphModelToPng(Q,"tEXt","mxfile",encodeURIComponent(V)));P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);
+R(Q)}),la=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var ta=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=la){var Q=P.getGlobalVariable;P=this.createTemporaryGraph(P.getStylesheet());for(var Z,na=0;na<this.pages.length;na++)if(this.pages[na].getId()==la){Z=this.updatePageRoot(this.pages[na]);break}null==Z&&(Z=this.currentPage);P.getGlobalVariable=function(Da){return"page"==Da?Z.getName():
+"pagenumber"==Da?1:Q.apply(this,arguments)};document.body.appendChild(P.container);P.model.setRoot(Z.root)}if(null!=G.layerIds){var va=P.model,Ba=va.getChildCells(va.getRoot()),sa={};for(na=0;na<G.layerIds.length;na++)sa[G.layerIds[na]]=!0;for(na=0;na<Ba.length;na++)va.setVisible(Ba[na],sa[Ba[na].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Da){ia(Da.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){ia(null)}),null,null,G.scale,G.transparent,G.shadow,
+null,P,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length?(g=!0,this.setFileData(V),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(ta)},0):ta()):ta()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=la?"&pageId="+la:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(V))).send(mxUtils.bind(this,
+function(Q){200<=Q.getStatus()&&299>=Q.getStatus()?R("data:image/png;base64,"+Q.getText()):ia(null)}),mxUtils.bind(this,function(){ia(null)}))}}else ta=mxUtils.bind(this,function(){var Q=this.createLoadMessage("export");Q.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Z=this.getXmlFileData();Q.xml=mxUtils.getXml(Z);Q.data=this.getFileData(null,null,!0,null,null,null,Z);Q.format=G.format}else if("html"==G.format)Z=this.editor.getGraphXml(),
+Q.data=this.getHtml(Z,this.editor.graph),Q.xml=mxUtils.getXml(Z),Q.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=G.background?G.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);Q.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Q.format="svg";var na=mxUtils.bind(this,function(va){this.editor.graph.setEnabled(!0);this.spinner.stop();Q.data=Editor.createSvgDataUri(va);F.postMessage(JSON.stringify(Q),"*")});if("xmlsvg"==G.format)(null==G.spin&&
+null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(Q.xml,this.editor.graph,null,!0,na,null,null,G.embedImages,Z,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),Z=this.editor.graph.getSvg(Z,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),
+(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(Z),this.embedFonts(Z,mxUtils.bind(this,function(va){G.embedImages||null==G.embedImages?this.editor.convertImages(va,mxUtils.bind(this,function(Ba){na(mxUtils.getXml(Ba))})):na(mxUtils.getXml(va))}));return}F.postMessage(JSON.stringify(Q),"*")}),null!=G.xml&&0<G.xml.length?(g=!0,this.setFileData(G.xml),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(ta)},0):ta()):ta();return}if("load"==
G.action){ba=G.toSketch;m=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var u=Editor.sketchMode;this.doSetSketchMode(G.rough);u!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(u=Editor.darkMode,this.doSetDarkMode(G.dark),
-u!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border);null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var J=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+
-"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";aa=mxUtils.bind(this,function(){var Q=this.editor.graph,Z=Q.maxFitScale;Q.maxFitScale=G.maxFitScale;Q.fit(2*J);Q.maxFitScale=Z;Q.container.scrollTop-=2*J;Q.container.scrollLeft-=2*J;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&
+u!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border);null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var I=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+
+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";aa=mxUtils.bind(this,function(){var Q=this.editor.graph,Z=Q.maxFitScale;Q.maxFitScale=G.maxFitScale;Q.fit(2*I);Q.maxFitScale=Z;Q.container.scrollTop-=2*I;Q.container.scrollLeft-=2*I;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&
(pa=document.createElement("span"),mxUtils.write(pa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(pa),this.embedFilenameSpan=pa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(Q){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var N=this.getCurrentFile();null!=N&&(pa=da(G.xml),null!=pa&&""!=pa&&N.mergeFile(new LocalFile(this,
pa),function(){F.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(Q){F.postMessage(JSON.stringify({event:"merge",message:G,error:Q}),"*")}))}else"remoteInvokeReady"==G.action?this.handleRemoteInvokeReady(F):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,H.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(Q){this.handleError(Q)}}var W=mxUtils.bind(this,
-function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),T=mxUtils.bind(this,function(Q,Z){g=!0;try{d(Q,Z,null,ba)}catch(oa){this.handleError(oa)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");q=W();m&&null==f&&(f=mxUtils.bind(this,function(oa,wa){oa=W();oa==q||g||(wa=this.createLoadMessage("autosave"),wa.xml=oa,(window.opener||window.parent).postMessage(JSON.stringify(wa),"*"));q=oa}),this.editor.graph.model.addListener(mxEvent.CHANGE,
+function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),T=mxUtils.bind(this,function(Q,Z){g=!0;try{d(Q,Z,null,ba)}catch(na){this.handleError(na)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");q=W();m&&null==f&&(f=mxUtils.bind(this,function(na,va){na=W();na==q||g||(va=this.createLoadMessage("autosave"),va.xml=na,(window.opener||window.parent).postMessage(JSON.stringify(va),"*"));q=na}),this.editor.graph.model.addListener(mxEvent.CHANGE,
f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||
"json"==urlParams.proto)Z=this.createLoadMessage("load"),Z.xml=Q,F.postMessage(JSON.stringify(Z),"*");null!=aa&&aa()});null!=G&&"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(da="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(Q){T(Q,H)},mxUtils.bind(this,function(Q){this.handleError(Q)}),da)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,
"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,mxUtils.bind(this,function(Q){4==Q.readyState&&200<=Q.status&&299>=Q.status&&"<mxGraphModel"==Q.responseText.substring(0,13)&&T(Q.responseText,H)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(Q){T(Q)}),mxUtils.bind(this,function(Q){this.handleError(Q)})):null==G||"object"!==typeof G||null==G.format||null==
@@ -3719,84 +3719,84 @@ urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit")
g),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f),g=f);g.style.marginRight="20px";this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d);d.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+
":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||
this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript("js/extensions.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};
-EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),m=[],q=[],y=[],F={};if(0<g.length){var C={},H=this.editor.graph,G=null,aa=null,da=null,ba=null,Y=null,pa=null,O=null,X="whiteSpace=wrap;html=1;",ea=null,ka=null,ja="",U="auto",I="auto",V=null,P=null,R=40,fa=40,la=100,sa=0,u=function(){null!=f?f(na):(H.setSelectionCells(na),H.scrollCellToVisible(H.getSelectionCell()))},J=H.getFreeInsertPoint(),N=J.x,W=J.y;J=W;var T=null,Q="auto";ka=null;for(var Z=[],oa=null,wa=null,Aa=0;Aa<g.length&&
-"#"==g[Aa].charAt(0);){d=g[Aa].replace(/\r$/,"");for(Aa++;Aa<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Aa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Aa].substring(1)),Aa++;if("#"!=d.charAt(1)){var ta=d.indexOf(":");if(0<ta){var Ba=mxUtils.trim(d.substring(1,ta)),va=mxUtils.trim(d.substring(ta+1));"label"==Ba?T=H.sanitizeHtml(va):"labelname"==Ba&&0<va.length&&"-"!=va?Y=va:"labels"==Ba&&0<va.length&&"-"!=va?O=JSON.parse(va):"style"==Ba?aa=va:"parentstyle"==Ba?X=va:"unknownStyle"==Ba&&
-"-"!=va?pa=va:"stylename"==Ba&&0<va.length&&"-"!=va?ba=va:"styles"==Ba&&0<va.length&&"-"!=va?da=JSON.parse(va):"vars"==Ba&&0<va.length&&"-"!=va?G=JSON.parse(va):"identity"==Ba&&0<va.length&&"-"!=va?ea=va:"parent"==Ba&&0<va.length&&"-"!=va?ka=va:"namespace"==Ba&&0<va.length&&"-"!=va?ja=va:"width"==Ba?U=va:"height"==Ba?I=va:"left"==Ba&&0<va.length?V=va:"top"==Ba&&0<va.length?P=va:"ignore"==Ba?wa=va.split(","):"connect"==Ba?Z.push(JSON.parse(va)):"link"==Ba?oa=va:"padding"==Ba?sa=parseFloat(va):"edgespacing"==
-Ba?R=parseFloat(va):"nodespacing"==Ba?fa=parseFloat(va):"levelspacing"==Ba?la=parseFloat(va):"layout"==Ba&&(Q=va)}}}if(null==g[Aa])throw Error(mxResources.get("invalidOrMissingFile"));var Oa=this.editor.csvToArray(g[Aa].replace(/\r$/,""));ta=d=null;Ba=[];for(va=0;va<Oa.length;va++)ea==Oa[va]&&(d=va),ka==Oa[va]&&(ta=va),Ba.push(mxUtils.trim(Oa[va]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==T&&(T="%"+Ba[0]+"%");if(null!=Z)for(var Ca=0;Ca<Z.length;Ca++)null==C[Z[Ca].to]&&
-(C[Z[Ca].to]={});ea=[];for(va=Aa+1;va<g.length;va++){var Ta=this.editor.csvToArray(g[va].replace(/\r$/,""));if(null==Ta){var Va=40<g[va].length?g[va].substring(0,40)+"...":g[va];throw Error(Va+" ("+va+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&ea.push(Ta)}H.model.beginUpdate();try{for(va=0;va<ea.length;va++){Ta=ea[va];var Ja=null,bb=null!=d?ja+Ta[d]:null;null!=bb&&(Ja=H.model.getCell(bb));g=null!=Ja;var Wa=new mxCell(T,new mxGeometry(N,J,0,0),aa||"whiteSpace=wrap;html=1;");
-Wa.vertex=!0;Wa.id=bb;Va=null!=Ja?Ja:Wa;for(var $a=0;$a<Ta.length;$a++)H.setAttributeForCell(Va,Ba[$a],Ta[$a]);if(null!=Y&&null!=O){var z=O[Va.getAttribute(Y)];null!=z&&H.labelChanged(Va,z)}if(null!=ba&&null!=da){var L=da[Va.getAttribute(ba)];null!=L&&(Va.style=L)}H.setAttributeForCell(Va,"placeholders","1");Va.style=H.replacePlaceholders(Va,Va.style,G);g?(0>mxUtils.indexOf(y,Ja)&&y.push(Ja),H.fireEvent(new mxEventObject("cellsInserted","cells",[Ja]))):H.fireEvent(new mxEventObject("cellsInserted",
-"cells",[Wa]));Ja=Wa;if(!g)for(Ca=0;Ca<Z.length;Ca++)C[Z[Ca].to][Ja.getAttribute(Z[Ca].to)]=Ja;null!=oa&&"link"!=oa&&(H.setLinkForCell(Ja,Ja.getAttribute(oa)),H.setAttributeForCell(Ja,oa,null));var M=this.editor.graph.getPreferredSizeForCell(Ja);ka=null!=ta?H.model.getCell(ja+Ta[ta]):null;if(Ja.vertex){Va=null!=ka?0:N;Aa=null!=ka?0:W;null!=V&&null!=Ja.getAttribute(V)&&(Ja.geometry.x=Va+parseFloat(Ja.getAttribute(V)));null!=P&&null!=Ja.getAttribute(P)&&(Ja.geometry.y=Aa+parseFloat(Ja.getAttribute(P)));
-var S="@"==U.charAt(0)?Ja.getAttribute(U.substring(1)):null;Ja.geometry.width=null!=S&&"auto"!=S?parseFloat(Ja.getAttribute(U.substring(1))):"auto"==U||"auto"==S?M.width+sa:parseFloat(U);var ca="@"==I.charAt(0)?Ja.getAttribute(I.substring(1)):null;Ja.geometry.height=null!=ca&&"auto"!=ca?parseFloat(ca):"auto"==I||"auto"==ca?M.height+sa:parseFloat(I);J+=Ja.geometry.height+fa}g?(null==F[bb]&&(F[bb]=[]),F[bb].push(Ja)):(m.push(Ja),null!=ka?(ka.style=H.replacePlaceholders(ka,X,G),H.addCell(Ja,ka),q.push(ka)):
-y.push(H.addCell(Ja)))}for(va=0;va<q.length;va++)S="@"==U.charAt(0)?q[va].getAttribute(U.substring(1)):null,ca="@"==I.charAt(0)?q[va].getAttribute(I.substring(1)):null,"auto"!=U&&"auto"!=S||"auto"!=I&&"auto"!=ca||H.updateGroupBounds([q[va]],sa,!0);var ia=y.slice(),na=y.slice();for(Ca=0;Ca<Z.length;Ca++){var ra=Z[Ca];for(va=0;va<m.length;va++){Ja=m[va];var qa=mxUtils.bind(this,function(Ma,db,Ra){var ib=db.getAttribute(Ra.from);if(null!=ib&&""!=ib){ib=ib.split(",");for(var mb=0;mb<ib.length;mb++){var nb=
-C[Ra.to][ib[mb]];if(null==nb&&null!=pa){nb=new mxCell(ib[mb],new mxGeometry(N,W,0,0),pa);nb.style=H.replacePlaceholders(db,nb.style,G);var pb=this.editor.graph.getPreferredSizeForCell(nb);nb.geometry.width=pb.width+sa;nb.geometry.height=pb.height+sa;C[Ra.to][ib[mb]]=nb;nb.vertex=!0;nb.id=ib[mb];y.push(H.addCell(nb))}if(null!=nb){pb=Ra.label;null!=Ra.fromlabel&&(pb=(db.getAttribute(Ra.fromlabel)||"")+(pb||""));null!=Ra.sourcelabel&&(pb=H.replacePlaceholders(db,Ra.sourcelabel,G)+(pb||""));null!=Ra.tolabel&&
-(pb=(pb||"")+(nb.getAttribute(Ra.tolabel)||""));null!=Ra.targetlabel&&(pb=(pb||"")+H.replacePlaceholders(nb,Ra.targetlabel,G));var cb="target"==Ra.placeholders==!Ra.invert?nb:Ma;cb=null!=Ra.style?H.replacePlaceholders(cb,Ra.style,G):H.createCurrentEdgeStyle();pb=H.insertEdge(null,null,pb||"",Ra.invert?nb:Ma,Ra.invert?Ma:nb,cb);if(null!=Ra.labels)for(cb=0;cb<Ra.labels.length;cb++){var eb=Ra.labels[cb],hb=new mxCell(eb.label||cb,new mxGeometry(null!=eb.x?eb.x:0,null!=eb.y?eb.y:0,0,0),"resizable=0;html=1;");
-hb.vertex=!0;hb.connectable=!1;hb.geometry.relative=!0;null!=eb.placeholders&&(hb.value=H.replacePlaceholders("target"==eb.placeholders==!Ra.invert?nb:Ma,hb.value,G));if(null!=eb.dx||null!=eb.dy)hb.geometry.offset=new mxPoint(null!=eb.dx?eb.dx:0,null!=eb.dy?eb.dy:0);pb.insert(hb)}na.push(pb);mxUtils.remove(Ra.invert?Ma:nb,ia)}}}});qa(Ja,Ja,ra);if(null!=F[Ja.id])for($a=0;$a<F[Ja.id].length;$a++)qa(Ja,F[Ja.id][$a],ra)}}if(null!=wa)for(va=0;va<m.length;va++)for(Ja=m[va],$a=0;$a<wa.length;$a++)H.setAttributeForCell(Ja,
-mxUtils.trim(wa[$a]),null);if(0<y.length){var ya=new mxParallelEdgeLayout(H);ya.spacing=R;ya.checkOverlap=!0;var Ea=function(){0<ya.spacing&&ya.execute(H.getDefaultParent());for(var Ma=0;Ma<y.length;Ma++){var db=H.getCellGeometry(y[Ma]);db.x=Math.round(H.snap(db.x));db.y=Math.round(H.snap(db.y));"auto"==U&&(db.width=Math.round(H.snap(db.width)));"auto"==I&&(db.height=Math.round(H.snap(db.height)))}};if("["==Q.charAt(0)){var Na=u;H.view.validate();this.executeLayouts(H.createLayouts(JSON.parse(Q)),
-function(){Ea();Na()});u=null}else if("circle"==Q){var Pa=new mxCircleLayout(H);Pa.disableEdgeStyle=!1;Pa.resetEdges=!1;var Qa=Pa.isVertexIgnored;Pa.isVertexIgnored=function(Ma){return Qa.apply(this,arguments)||0>mxUtils.indexOf(y,Ma)};this.executeLayout(function(){Pa.execute(H.getDefaultParent());Ea()},!0,u);u=null}else if("horizontaltree"==Q||"verticaltree"==Q||"auto"==Q&&na.length==2*y.length-1&&1==ia.length){H.view.validate();var Ua=new mxCompactTreeLayout(H,"horizontaltree"==Q);Ua.levelDistance=
-fa;Ua.edgeRouting=!1;Ua.resetEdges=!1;this.executeLayout(function(){Ua.execute(H.getDefaultParent(),0<ia.length?ia[0]:null)},!0,u);u=null}else if("horizontalflow"==Q||"verticalflow"==Q||"auto"==Q&&1==ia.length){H.view.validate();var La=new mxHierarchicalLayout(H,"horizontalflow"==Q?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);La.intraCellSpacing=fa;La.parallelEdgeSpacing=R;La.interRankCellSpacing=la;La.disableEdgeStyle=!1;this.executeLayout(function(){La.execute(H.getDefaultParent(),na);
-H.moveCells(na,N,W)},!0,u);u=null}else if("orgchart"==Q){H.view.validate();var ua=new mxOrgChartLayout(H,2,la,fa),za=ua.isVertexIgnored;ua.isVertexIgnored=function(Ma){return za.apply(this,arguments)||0>mxUtils.indexOf(y,Ma)};this.executeLayout(function(){ua.execute(H.getDefaultParent());Ea()},!0,u);u=null}else if("organic"==Q||"auto"==Q&&na.length>y.length){H.view.validate();var Ka=new mxFastOrganicLayout(H);Ka.forceConstant=3*fa;Ka.disableEdgeStyle=!1;Ka.resetEdges=!1;var Ga=Ka.isVertexIgnored;
-Ka.isVertexIgnored=function(Ma){return Ga.apply(this,arguments)||0>mxUtils.indexOf(y,Ma)};this.executeLayout(function(){Ka.execute(H.getDefaultParent());Ea()},!0,u);u=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=u&&u()}}catch(Ma){this.handleError(Ma)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",m;for(m in urlParams)0>mxUtils.indexOf(d,m)&&null!=urlParams[m]&&(f+=g+m+"="+urlParams[m],
-g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),m;for(m in urlParams)0>mxUtils.indexOf(g,m)&&(d=0==f?d+"?":d+"&",null!=urlParams[m]&&(d+=m+"="+urlParams[m],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,m,q){d=new LinkDialog(this,
-d,f,g,!0,m,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();
-var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);
-Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);
-this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=
-function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),m=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(m);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());
-this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(m&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(m);this.actions.get("createRevision").setEnabled(m);
-this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);
-this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};
-var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,m,q,y,F,C){var H=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,
-"svg",mxUtils.getXml(H.getSvg(m,q,y)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),aa=H.getGraphBounds(),da=Math.floor(aa.width*q/H.view.scale),ba=Math.floor(aa.height*q/H.view.scale);if(G.length<=MAX_REQUEST_SIZE&&da*ba<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var Y={globalVars:H.getExportVariables()};C&&(Y.grid={size:H.gridSize,steps:H.view.gridSteps,color:H.view.gridColor});d.saveRequest(f,g,function(pa,O){return new mxXmlRequest(EXPORT_URL,
-"format="+g+"&base64="+(O||"0")+(null!=pa?"&filename="+encodeURIComponent(pa):"")+"&extras="+encodeURIComponent(JSON.stringify(Y))+(0<F?"&dpi="+F:"")+"&bg="+(null!=m?m:"none")+"&w="+da+"&h="+ba+"&border="+y+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(q,null==m||"none"==m,!0,!1,!1,y,!0,!1,null,C,F):d.exportImage(q,!1,!0,!1,!1,y,!0,!1,"jpeg",C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
-var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var m=d;this.currentPage!=this.pages[g]&&(m=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),m.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+m.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var m=
-document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(d));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var y={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var C=F[d];if("R"==C.substring(0,1)){var H=JSON.parse(decodeURIComponent(C.substring(1)));
-y[H[0]]={id:H[0],title:H[1],downloadUrl:H[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){q.innerHTML="";if(0==G.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var aa=0;aa<G.length;aa++){var da=G[aa];y[da.id]&&(f[da.id]=da);var ba=this.addCheckbox(q,da.title,y[da.id]);(function(Y,pa){mxEvent.addListener(pa,"change",function(){this.checked?f[Y.id]=Y:delete f[Y.id]})})(da,
-ba)}},mxUtils.bind(this,function(G){q.innerHTML="";var aa=document.createElement("div");aa.style.padding="8px";aa.style.textAlign="center";mxUtils.write(aa,mxResources.get("error")+": ");mxUtils.write(aa,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));q.appendChild(aa)}));g.appendChild(q);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,aa;for(aa in f)null==y[aa]&&(G++,mxUtils.bind(this,function(da){this.remoteInvoke("getFileContent",
-[da.downloadUrl],null,mxUtils.bind(this,function(ba){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ba,da))}catch(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[aa]));for(aa in y)f[aa]||this.closeLibrary(new RemoteLibrary(this,null,y[aa]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");
-this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=
-d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,m,q){var y=
-!0,F=window.setTimeout(mxUtils.bind(this,function(){y=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(F);y&&m.apply(this,arguments)}),H=mxUtils.bind(this,function(){window.clearTimeout(F);y&&q.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:H});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?
-this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,aa){var da={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=aa?da.error={errResp:aa}:null!=G&&(da.resp=G);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var m=d.funtionName,q=this.remoteInvokableFns[m];if(null!=q&&"function"===typeof this[m]){if(q.allowedDomains){for(var y=!1,F=0;F<q.allowedDomains.length;F++)if(f=="https://"+
-q.allowedDomains[F]){y=!0;break}if(!y){g(null,"Invalid Call: "+m+" is not allowed.");return}}var C=d.functionArgs;Array.isArray(C)||(C=[]);if(q.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),C.push(function(G){g(null,G||"Unkown Error")}),this[m].apply(this,C);else{var H=this[m].apply(this,C);g([H])}}else g(null,"Invalid Call: "+m+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=
-window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var m=g.open("database",2);m.onupgradeneeded=function(q){try{var y=m.result;1>q.oldVersion&&y.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(y.createObjectStore("files",{keyPath:"title"}),y.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};m.onsuccess=mxUtils.bind(this,function(q){var y=m.result;this.database=y;EditorUi.migrateStorageFiles&&
-(StorageFile.migrate(y),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"1"==urlParams.forceMigration){var C=document.createElement("iframe");C.style.display="none";C.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(C);var H=!0,G=!1,aa,da=0,ba=mxUtils.bind(this,function(){G=
-!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),Y=mxUtils.bind(this,function(){da++;pa()}),pa=mxUtils.bind(this,function(){try{if(da>=aa.length)ba();else{var X=aa[da];StorageFile.getFileContent(this,X,mxUtils.bind(this,function(ea){null==ea||".scratchpad"==X&&ea==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[X]}),
-"*"):Y()}),Y)}}catch(ea){console.log(ea)}}),O=mxUtils.bind(this,function(X){try{this.setDatabaseItem(null,[{title:X.title,size:X.data.length,lastModified:Date.now(),type:X.isLib?"L":"F"},{title:X.title,data:X.data}],Y,Y,["filesInfo","files"])}catch(ea){console.log(ea)}});F=mxUtils.bind(this,function(X){try{if(X.source==C.contentWindow){var ea={};try{ea=JSON.parse(X.data)}catch(ka){}"init"==ea.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ea.event||G||(H?null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?(aa=ea.resp[0],H=!1,pa()):ba():null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?O(ea.resp[0]):Y())}}catch(ka){console.log(ka)}});window.addEventListener("message",F)}})));d(y);y.onversionchange=function(){y.close()}});m.onerror=f;m.onblocked=function(){}}catch(q){null!=f&&f(q)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,
-f,g,m,q){this.openDatabase(mxUtils.bind(this,function(y){try{q=q||"objects";Array.isArray(q)||(q=[q],d=[d],f=[f]);var F=y.transaction(q,"readwrite");F.oncomplete=g;F.onerror=m;for(y=0;y<q.length;y++)F.objectStore(q[y]).put(null!=d&&null!=d[y]?{key:d[y],data:f[y]}:f[y])}catch(C){null!=m&&m(C)}}),m)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){m=m||"objects";Array.isArray(m)||(m=[m],d=[d]);q=q.transaction(m,"readwrite");q.oncomplete=f;q.onerror=
-g;for(var y=0;y<m.length;y++)q.objectStore(m[y]).delete(d[y])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){try{m=m||"objects";var y=q.transaction([m],"readonly").objectStore(m).get(d);y.onsuccess=function(){f(y.result)};y.onerror=g}catch(F){null!=g&&g(F)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),
-y=[];q.onsuccess=function(F){null==F.target.result?d(y):(y.push(F.target.result.value),F.target.result.continue())};q.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],"readonly").objectStore(g).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=f}catch(y){null!=f&&f(y)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=
-d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var m=this.getCurrentFile();null!=m?m.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=
-function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=
-function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=
-function(d,f,g,m,q,y,F,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,m,q,y,F,C)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,
-f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,m,q,y,F,C,H,G,aa,da,ba,Y,pa,O){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,m,q,y,F,C,H,G,aa,da,ba,Y,pa,O)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};
-EditorUi.prototype.convertImages=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,m)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");
-return Editor.updateCRC(d,f,g,m)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,m,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,m,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=
-localStorage.key(f),m=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<m.length){var q="<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(q||m)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===
-f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,k,n,D,t){function E(){for(var ja=da.getElementsByTagName("div"),U=0,I=0;I<ja.length;I++)"none"!=ja[I].style.display&&ja[I].parentNode==da&&U++;ba.style.display=0==U?"block":"none"}function d(ja,U,I,V){function P(){U.removeChild(la);U.removeChild(sa);fa.style.display="block";R.style.display="block"}H={div:U,comment:ja,saveCallback:I,deleteOnCancel:V};var R=U.querySelector(".geCommentTxt"),fa=U.querySelector(".geCommentActionsList"),la=document.createElement("textarea");
-la.className="geCommentEditTxtArea";la.style.minHeight=R.offsetHeight+"px";la.value=ja.content;U.insertBefore(la,R);var sa=document.createElement("div");sa.className="geCommentEditBtns";var u=mxUtils.button(mxResources.get("cancel"),function(){V?(U.parentNode.removeChild(U),E()):P();H=null});u.className="geCommentEditBtn";sa.appendChild(u);var J=mxUtils.button(mxResources.get("save"),function(){R.innerHTML="";ja.content=la.value;mxUtils.write(R,ja.content);P();I(ja);H=null});mxEvent.addListener(la,
-"keydown",mxUtils.bind(this,function(N){mxEvent.isConsumed(N)||((mxEvent.isControlDown(N)||mxClient.IS_MAC&&mxEvent.isMetaDown(N))&&13==N.keyCode?(J.click(),mxEvent.consume(N)):27==N.keyCode&&(u.click(),mxEvent.consume(N)))}));J.focus();J.className="geCommentEditBtn gePrimaryBtn";sa.appendChild(J);U.insertBefore(sa,R);fa.style.display="none";R.style.display="none";la.focus()}function f(ja,U){U.innerHTML="";ja=new Date(ja.modifiedDate);var I=b.timeSince(ja);null==I&&(I=mxResources.get("lessThanAMinute"));
-mxUtils.write(U,mxResources.get("timeAgo",[I],"{1} ago"));U.setAttribute("title",ja.toLocaleDateString()+" "+ja.toLocaleTimeString())}function g(ja){var U=document.createElement("img");U.className="geCommentBusyImg";U.src=IMAGE_PATH+"/spin.gif";ja.appendChild(U);ja.busyImg=U}function m(ja){ja.style.border="1px solid red";ja.removeChild(ja.busyImg)}function q(ja){ja.style.border="";ja.removeChild(ja.busyImg)}function y(ja,U,I,V,P){function R(T,Q,Z){var oa=document.createElement("li");oa.className=
-"geCommentAction";var wa=document.createElement("a");wa.className="geCommentActionLnk";mxUtils.write(wa,T);oa.appendChild(wa);mxEvent.addListener(wa,"click",function(Aa){Q(Aa,ja);Aa.preventDefault();mxEvent.consume(Aa)});W.appendChild(oa);Z&&(oa.style.display="none")}function fa(){function T(oa){Q.push(Z);if(null!=oa.replies)for(var wa=0;wa<oa.replies.length;wa++)Z=Z.nextSibling,T(oa.replies[wa])}var Q=[],Z=sa;T(ja);return{pdiv:Z,replies:Q}}function la(T,Q,Z,oa,wa){function Aa(){g(Oa);ja.addReply(va,
-function(Ca){va.id=Ca;ja.replies.push(va);q(Oa);Z&&Z()},function(Ca){ta();m(Oa);b.handleError(Ca,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},oa,wa)}function ta(){d(va,Oa,function(Ca){Aa()},!0)}var Ba=fa().pdiv,va=b.newComment(T,b.getCurrentUser());va.pCommentId=ja.id;null==ja.replies&&(ja.replies=[]);var Oa=y(va,ja.replies,Ba,V+1);Q?ta():Aa()}if(P||!ja.isResolved){ba.style.display="none";var sa=document.createElement("div");sa.className="geCommentContainer";sa.setAttribute("data-commentId",
-ja.id);sa.style.marginLeft=20*V+5+"px";ja.isResolved&&!Editor.isDarkMode()&&(sa.style.backgroundColor="ghostWhite");var u=document.createElement("div");u.className="geCommentHeader";var J=document.createElement("img");J.className="geCommentUserImg";J.src=ja.user.pictureUrl||Editor.userImage;u.appendChild(J);J=document.createElement("div");J.className="geCommentHeaderTxt";u.appendChild(J);var N=document.createElement("div");N.className="geCommentUsername";mxUtils.write(N,ja.user.displayName||"");J.appendChild(N);
-N=document.createElement("div");N.className="geCommentDate";N.setAttribute("data-commentId",ja.id);f(ja,N);J.appendChild(N);sa.appendChild(u);u=document.createElement("div");u.className="geCommentTxt";mxUtils.write(u,ja.content||"");sa.appendChild(u);ja.isLocked&&(sa.style.opacity="0.5");u=document.createElement("div");u.className="geCommentActions";var W=document.createElement("ul");W.className="geCommentActionsList";u.appendChild(W);F||ja.isLocked||0!=V&&!C||R(mxResources.get("reply"),function(){la("",
-!0)},ja.isResolved);J=b.getCurrentUser();null==J||J.id!=ja.user.id||F||ja.isLocked||(R(mxResources.get("edit"),function(){function T(){d(ja,sa,function(){g(sa);ja.editComment(ja.content,function(){q(sa)},function(Q){m(sa);T();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}T()},ja.isResolved),R(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(sa);ja.deleteComment(function(T){if(!0===T){T=sa.querySelector(".geCommentTxt");
-T.innerHTML="";mxUtils.write(T,mxResources.get("msgDeleted"));var Q=sa.querySelectorAll(".geCommentAction");for(T=0;T<Q.length;T++)Q[T].parentNode.removeChild(Q[T]);q(sa);sa.style.opacity="0.5"}else{Q=fa(ja).replies;for(T=0;T<Q.length;T++)da.removeChild(Q[T]);for(T=0;T<U.length;T++)if(U[T]==ja){U.splice(T,1);break}ba.style.display=0==da.getElementsByTagName("div").length?"block":"none"}},function(T){m(sa);b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
-ja.isResolved));F||ja.isLocked||0!=V||R(ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(T){function Q(){var Z=T.target;Z.innerHTML="";ja.isResolved=!ja.isResolved;mxUtils.write(Z,ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var oa=ja.isResolved?"none":"",wa=fa(ja).replies,Aa=Editor.isDarkMode()?"transparent":ja.isResolved?"ghostWhite":"white",ta=0;ta<wa.length;ta++){wa[ta].style.backgroundColor=Aa;for(var Ba=wa[ta].querySelectorAll(".geCommentAction"),
-va=0;va<Ba.length;va++)Ba[va]!=Z.parentNode&&(Ba[va].style.display=oa);O||(wa[ta].style.display="none")}E()}ja.isResolved?la(mxResources.get("reOpened")+": ",!0,Q,!1,!0):la(mxResources.get("markedAsResolved"),!1,Q,!0)});sa.appendChild(u);null!=I?da.insertBefore(sa,I.nextSibling):da.appendChild(sa);for(I=0;null!=ja.replies&&I<ja.replies.length;I++)u=ja.replies[I],u.isResolved=ja.isResolved,y(u,ja.replies,null,V+1,P);null!=H&&(H.comment.id==ja.id?(P=ja.content,ja.content=H.comment.content,d(ja,sa,H.saveCallback,
-H.deleteOnCancel),ja.content=P):null==H.comment.id&&H.comment.pCommentId==ja.id&&(da.appendChild(H.div),d(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return sa}}var F=!b.canComment(),C=b.canReplyToReplies(),H=null,G=document.createElement("div");G.className="geCommentsWin";G.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var aa=EditorUi.compactUi?"26px":"30px",da=document.createElement("div");da.className="geCommentsList";da.style.backgroundColor=Editor.isDarkMode()?
+EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),m=[],q=[],y=[],F={};if(0<g.length){var C={},H=this.editor.graph,G=null,aa=null,da=null,ba=null,Y=null,pa=null,O=null,X="whiteSpace=wrap;html=1;",ea=null,ka=null,ja="",U="auto",J="auto",V=!1,P=null,R=null,ia=40,la=40,ta=100,u=0,I=function(){null!=f?f(ra):(H.setSelectionCells(ra),H.scrollCellToVisible(H.getSelectionCell()))},N=H.getFreeInsertPoint(),W=N.x,T=N.y;N=T;var Q=null,Z="auto";ka=null;for(var na=[],va=null,Ba=null,sa=0;sa<
+g.length&&"#"==g[sa].charAt(0);){d=g[sa].replace(/\r$/,"");for(sa++;sa<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[sa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[sa].substring(1)),sa++;if("#"!=d.charAt(1)){var Da=d.indexOf(":");if(0<Da){var Aa=mxUtils.trim(d.substring(1,Da)),za=mxUtils.trim(d.substring(Da+1));"label"==Aa?Q=H.sanitizeHtml(za):"labelname"==Aa&&0<za.length&&"-"!=za?Y=za:"labels"==Aa&&0<za.length&&"-"!=za?O=JSON.parse(za):"style"==Aa?aa=za:"parentstyle"==Aa?X=za:"unknownStyle"==
+Aa&&"-"!=za?pa=za:"stylename"==Aa&&0<za.length&&"-"!=za?ba=za:"styles"==Aa&&0<za.length&&"-"!=za?da=JSON.parse(za):"vars"==Aa&&0<za.length&&"-"!=za?G=JSON.parse(za):"identity"==Aa&&0<za.length&&"-"!=za?ea=za:"parent"==Aa&&0<za.length&&"-"!=za?ka=za:"namespace"==Aa&&0<za.length&&"-"!=za?ja=za:"width"==Aa?U=za:"height"==Aa?J=za:"collapsed"==Aa&&"-"!=za?V="true"==za:"left"==Aa&&0<za.length?P=za:"top"==Aa&&0<za.length?R=za:"ignore"==Aa?Ba=za.split(","):"connect"==Aa?na.push(JSON.parse(za)):"link"==Aa?
+va=za:"padding"==Aa?u=parseFloat(za):"edgespacing"==Aa?ia=parseFloat(za):"nodespacing"==Aa?la=parseFloat(za):"levelspacing"==Aa?ta=parseFloat(za):"layout"==Aa&&(Z=za)}}}if(null==g[sa])throw Error(mxResources.get("invalidOrMissingFile"));var Ca=this.editor.csvToArray(g[sa].replace(/\r$/,""));Da=d=null;Aa=[];for(za=0;za<Ca.length;za++)ea==Ca[za]&&(d=za),ka==Ca[za]&&(Da=za),Aa.push(mxUtils.trim(Ca[za]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Q&&(Q="%"+Aa[0]+"%");if(null!=
+na)for(var Qa=0;Qa<na.length;Qa++)null==C[na[Qa].to]&&(C[na[Qa].to]={});ea=[];for(za=sa+1;za<g.length;za++){var Za=this.editor.csvToArray(g[za].replace(/\r$/,""));if(null==Za){var cb=40<g[za].length?g[za].substring(0,40)+"...":g[za];throw Error(cb+" ("+za+"):\n"+mxResources.get("containsValidationErrors"));}0<Za.length&&ea.push(Za)}H.model.beginUpdate();try{for(za=0;za<ea.length;za++){Za=ea[za];var Ka=null,Ua=null!=d?ja+Za[d]:null;null!=Ua&&(Ka=H.model.getCell(Ua));var $a=new mxCell(Q,new mxGeometry(W,
+N,0,0),aa||"whiteSpace=wrap;html=1;");$a.collapsed=V;$a.vertex=!0;$a.id=Ua;null!=Ka&&H.model.setCollapsed(Ka,V);for(var z=0;z<Za.length;z++)H.setAttributeForCell($a,Aa[z],Za[z]),null!=Ka&&H.setAttributeForCell(Ka,Aa[z],Za[z]);if(null!=Y&&null!=O){var L=O[$a.getAttribute(Y)];null!=L&&(H.labelChanged($a,L),null!=Ka&&H.cellLabelChanged(Ka,L))}if(null!=ba&&null!=da){var M=da[$a.getAttribute(ba)];null!=M&&($a.style=M)}H.setAttributeForCell($a,"placeholders","1");$a.style=H.replacePlaceholders($a,$a.style,
+G);null!=Ka?(H.model.setStyle(Ka,$a.style),0>mxUtils.indexOf(y,Ka)&&y.push(Ka),H.fireEvent(new mxEventObject("cellsInserted","cells",[Ka]))):H.fireEvent(new mxEventObject("cellsInserted","cells",[$a]));g=null!=Ka;Ka=$a;if(!g)for(Qa=0;Qa<na.length;Qa++)C[na[Qa].to][Ka.getAttribute(na[Qa].to)]=Ka;null!=va&&"link"!=va&&(H.setLinkForCell(Ka,Ka.getAttribute(va)),H.setAttributeForCell(Ka,va,null));var S=this.editor.graph.getPreferredSizeForCell(Ka);ka=null!=Da?H.model.getCell(ja+Za[Da]):null;if(Ka.vertex){cb=
+null!=ka?0:W;sa=null!=ka?0:T;null!=P&&null!=Ka.getAttribute(P)&&(Ka.geometry.x=cb+parseFloat(Ka.getAttribute(P)));null!=R&&null!=Ka.getAttribute(R)&&(Ka.geometry.y=sa+parseFloat(Ka.getAttribute(R)));var ca="@"==U.charAt(0)?Ka.getAttribute(U.substring(1)):null;Ka.geometry.width=null!=ca&&"auto"!=ca?parseFloat(Ka.getAttribute(U.substring(1))):"auto"==U||"auto"==ca?S.width+u:parseFloat(U);var ha="@"==J.charAt(0)?Ka.getAttribute(J.substring(1)):null;Ka.geometry.height=null!=ha&&"auto"!=ha?parseFloat(ha):
+"auto"==J||"auto"==ha?S.height+u:parseFloat(J);N+=Ka.geometry.height+la}g?(null==F[Ua]&&(F[Ua]=[]),F[Ua].push(Ka)):(m.push(Ka),null!=ka?(ka.style=H.replacePlaceholders(ka,X,G),H.addCell(Ka,ka),q.push(ka)):y.push(H.addCell(Ka)))}for(za=0;za<q.length;za++)ca="@"==U.charAt(0)?q[za].getAttribute(U.substring(1)):null,ha="@"==J.charAt(0)?q[za].getAttribute(J.substring(1)):null,"auto"!=U&&"auto"!=ca||"auto"!=J&&"auto"!=ha||H.updateGroupBounds([q[za]],u,!0);var oa=y.slice(),ra=y.slice();for(Qa=0;Qa<na.length;Qa++){var qa=
+na[Qa];for(za=0;za<m.length;za++){Ka=m[za];var xa=mxUtils.bind(this,function(db,Va,fb){var kb=Va.getAttribute(fb.from);if(null!=kb&&""!=kb){kb=kb.split(",");for(var ub=0;ub<kb.length;ub++){var nb=C[fb.to][kb[ub]];if(null==nb&&null!=pa){nb=new mxCell(kb[ub],new mxGeometry(W,T,0,0),pa);nb.style=H.replacePlaceholders(Va,nb.style,G);var Ya=this.editor.graph.getPreferredSizeForCell(nb);nb.geometry.width=Ya.width+u;nb.geometry.height=Ya.height+u;C[fb.to][kb[ub]]=nb;nb.vertex=!0;nb.id=kb[ub];y.push(H.addCell(nb))}if(null!=
+nb){Ya=fb.label;null!=fb.fromlabel&&(Ya=(Va.getAttribute(fb.fromlabel)||"")+(Ya||""));null!=fb.sourcelabel&&(Ya=H.replacePlaceholders(Va,fb.sourcelabel,G)+(Ya||""));null!=fb.tolabel&&(Ya=(Ya||"")+(nb.getAttribute(fb.tolabel)||""));null!=fb.targetlabel&&(Ya=(Ya||"")+H.replacePlaceholders(nb,fb.targetlabel,G));var gb="target"==fb.placeholders==!fb.invert?nb:db;gb=null!=fb.style?H.replacePlaceholders(gb,fb.style,G):H.createCurrentEdgeStyle();Ya=H.insertEdge(null,null,Ya||"",fb.invert?nb:db,fb.invert?
+db:nb,gb);if(null!=fb.labels)for(gb=0;gb<fb.labels.length;gb++){var hb=fb.labels[gb],ob=new mxCell(hb.label||gb,new mxGeometry(null!=hb.x?hb.x:0,null!=hb.y?hb.y:0,0,0),"resizable=0;html=1;");ob.vertex=!0;ob.connectable=!1;ob.geometry.relative=!0;null!=hb.placeholders&&(ob.value=H.replacePlaceholders("target"==hb.placeholders==!fb.invert?nb:db,ob.value,G));if(null!=hb.dx||null!=hb.dy)ob.geometry.offset=new mxPoint(null!=hb.dx?hb.dx:0,null!=hb.dy?hb.dy:0);Ya.insert(ob)}ra.push(Ya);mxUtils.remove(fb.invert?
+db:nb,oa)}}}});xa(Ka,Ka,qa);if(null!=F[Ka.id])for(z=0;z<F[Ka.id].length;z++)xa(Ka,F[Ka.id][z],qa)}}if(null!=Ba)for(za=0;za<m.length;za++)for(Ka=m[za],z=0;z<Ba.length;z++)H.setAttributeForCell(Ka,mxUtils.trim(Ba[z]),null);if(0<y.length){var Ga=new mxParallelEdgeLayout(H);Ga.spacing=ia;Ga.checkOverlap=!0;var La=function(){0<Ga.spacing&&Ga.execute(H.getDefaultParent());for(var db=0;db<y.length;db++){var Va=H.getCellGeometry(y[db]);Va.x=Math.round(H.snap(Va.x));Va.y=Math.round(H.snap(Va.y));"auto"==U&&
+(Va.width=Math.round(H.snap(Va.width)));"auto"==J&&(Va.height=Math.round(H.snap(Va.height)))}};if("["==Z.charAt(0)){var Pa=I;H.view.validate();this.executeLayouts(H.createLayouts(JSON.parse(Z)),function(){La();Pa()});I=null}else if("circle"==Z){var Oa=new mxCircleLayout(H);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Ta=Oa.isVertexIgnored;Oa.isVertexIgnored=function(db){return Ta.apply(this,arguments)||0>mxUtils.indexOf(y,db)};this.executeLayout(function(){Oa.execute(H.getDefaultParent());La()},!0,
+I);I=null}else if("horizontaltree"==Z||"verticaltree"==Z||"auto"==Z&&ra.length==2*y.length-1&&1==oa.length){H.view.validate();var Ma=new mxCompactTreeLayout(H,"horizontaltree"==Z);Ma.levelDistance=la;Ma.edgeRouting=!1;Ma.resetEdges=!1;this.executeLayout(function(){Ma.execute(H.getDefaultParent(),0<oa.length?oa[0]:null)},!0,I);I=null}else if("horizontalflow"==Z||"verticalflow"==Z||"auto"==Z&&1==oa.length){H.view.validate();var ua=new mxHierarchicalLayout(H,"horizontalflow"==Z?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);ua.intraCellSpacing=la;ua.parallelEdgeSpacing=ia;ua.interRankCellSpacing=ta;ua.disableEdgeStyle=!1;this.executeLayout(function(){ua.execute(H.getDefaultParent(),ra);H.moveCells(ra,W,T)},!0,I);I=null}else if("orgchart"==Z){H.view.validate();var ya=new mxOrgChartLayout(H,2,ta,la),Na=ya.isVertexIgnored;ya.isVertexIgnored=function(db){return Na.apply(this,arguments)||0>mxUtils.indexOf(y,db)};this.executeLayout(function(){ya.execute(H.getDefaultParent());La()},!0,I);I=null}else if("organic"==
+Z||"auto"==Z&&ra.length>y.length){H.view.validate();var Fa=new mxFastOrganicLayout(H);Fa.forceConstant=3*la;Fa.disableEdgeStyle=!1;Fa.resetEdges=!1;var Ra=Fa.isVertexIgnored;Fa.isVertexIgnored=function(db){return Ra.apply(this,arguments)||0>mxUtils.indexOf(y,db)};this.executeLayout(function(){Fa.execute(H.getDefaultParent());La()},!0,I);I=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=I&&I()}}catch(db){this.handleError(db)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&
+"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",m;for(m in urlParams)0>mxUtils.indexOf(d,m)&&null!=urlParams[m]&&(f+=g+m+"="+urlParams[m],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),m;for(m in urlParams)0>mxUtils.indexOf(g,
+m)&&(d=0==f?d+"?":d+"&",null!=urlParams[m]&&(d+=m+"="+urlParams[m],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,m,q){d=new LinkDialog(this,d,f,g,!0,m,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=
+this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);
+this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);
+this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=
+function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),
+m=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(m);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(m&&
+0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(m);this.actions.get("createRevision").setEnabled(m);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);
+this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+
+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=
+function(d,f,g,m,q,y,F,C){var H=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(H.getSvg(m,q,y)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),aa=H.getGraphBounds(),da=Math.floor(aa.width*q/H.view.scale),ba=Math.floor(aa.height*q/H.view.scale);if(G.length<=MAX_REQUEST_SIZE&&da*ba<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var Y=
+{globalVars:H.getExportVariables()};C&&(Y.grid={size:H.gridSize,steps:H.view.gridSteps,color:H.view.gridColor});d.saveRequest(f,g,function(pa,O){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(O||"0")+(null!=pa?"&filename="+encodeURIComponent(pa):"")+"&extras="+encodeURIComponent(JSON.stringify(Y))+(0<F?"&dpi="+F:"")+"&bg="+(null!=m?m:"none")+"&w="+da+"&h="+ba+"&border="+y+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(q,null==m||"none"==m,!0,!1,!1,y,!0,!1,null,C,F):d.exportImage(q,
+!1,!0,!1,!1,y,!0,!1,"jpeg",C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var m=d;this.currentPage!=this.pages[g]&&(m=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),m.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+m.getIndexableText()+" "}else f=d.getIndexableText();
+this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(d));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+
+IMAGE_PATH+'/spin.gif"></div>';var y={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var C=F[d];if("R"==C.substring(0,1)){var H=JSON.parse(decodeURIComponent(C.substring(1)));y[H[0]]={id:H[0],title:H[1],downloadUrl:H[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){q.innerHTML="";if(0==G.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var aa=0;aa<
+G.length;aa++){var da=G[aa];y[da.id]&&(f[da.id]=da);var ba=this.addCheckbox(q,da.title,y[da.id]);(function(Y,pa){mxEvent.addListener(pa,"change",function(){this.checked?f[Y.id]=Y:delete f[Y.id]})})(da,ba)}},mxUtils.bind(this,function(G){q.innerHTML="";var aa=document.createElement("div");aa.style.padding="8px";aa.style.textAlign="center";mxUtils.write(aa,mxResources.get("error")+": ");mxUtils.write(aa,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));q.appendChild(aa)}));g.appendChild(q);
+g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,aa;for(aa in f)null==y[aa]&&(G++,mxUtils.bind(this,function(da){this.remoteInvoke("getFileContent",[da.downloadUrl],null,mxUtils.bind(this,function(ba){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ba,da))}catch(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,
+mxResources.get("errorLoadingFile"))}))})(f[aa]));for(aa in y)f[aa]||this.closeLibrary(new RemoteLibrary(this,null,y[aa]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},
+setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+
+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,m,q){var y=!0,F=window.setTimeout(mxUtils.bind(this,function(){y=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(F);y&&m.apply(this,arguments)}),H=mxUtils.bind(this,function(){window.clearTimeout(F);y&&q.apply(this,
+arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:H});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,aa){var da={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=aa?da.error={errResp:aa}:null!=G&&(da.resp=G);this.remoteWin.postMessage(JSON.stringify(da),
+"*")});try{var m=d.funtionName,q=this.remoteInvokableFns[m];if(null!=q&&"function"===typeof this[m]){if(q.allowedDomains){for(var y=!1,F=0;F<q.allowedDomains.length;F++)if(f=="https://"+q.allowedDomains[F]){y=!0;break}if(!y){g(null,"Invalid Call: "+m+" is not allowed.");return}}var C=d.functionArgs;Array.isArray(C)||(C=[]);if(q.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),C.push(function(G){g(null,G||"Unkown Error")}),this[m].apply(this,C);else{var H=this[m].apply(this,C);
+g([H])}}else g(null,"Invalid Call: "+m+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var m=g.open("database",2);m.onupgradeneeded=function(q){try{var y=m.result;1>q.oldVersion&&y.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(y.createObjectStore("files",{keyPath:"title"}),y.createObjectStore("filesInfo",
+{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};m.onsuccess=mxUtils.bind(this,function(q){var y=m.result;this.database=y;EditorUi.migrateStorageFiles&&(StorageFile.migrate(y),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"1"==urlParams.forceMigration){var C=document.createElement("iframe");C.style.display=
+"none";C.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(C);var H=!0,G=!1,aa,da=0,ba=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),Y=mxUtils.bind(this,function(){da++;pa()}),pa=mxUtils.bind(this,function(){try{if(da>=aa.length)ba();else{var X=aa[da];StorageFile.getFileContent(this,X,
+mxUtils.bind(this,function(ea){null==ea||".scratchpad"==X&&ea==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[X]}),"*"):Y()}),Y)}}catch(ea){console.log(ea)}}),O=mxUtils.bind(this,function(X){try{this.setDatabaseItem(null,[{title:X.title,size:X.data.length,lastModified:Date.now(),type:X.isLib?"L":"F"},{title:X.title,data:X.data}],Y,Y,["filesInfo","files"])}catch(ea){console.log(ea)}});F=mxUtils.bind(this,function(X){try{if(X.source==
+C.contentWindow){var ea={};try{ea=JSON.parse(X.data)}catch(ka){}"init"==ea.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ea.event||G||(H?null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?(aa=ea.resp[0],H=!1,pa()):ba():null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?O(ea.resp[0]):Y())}}catch(ka){console.log(ka)}});window.addEventListener("message",
+F)}})));d(y);y.onversionchange=function(){y.close()}});m.onerror=f;m.onblocked=function(){}}catch(q){null!=f&&f(q)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,f,g,m,q){this.openDatabase(mxUtils.bind(this,function(y){try{q=q||"objects";Array.isArray(q)||(q=[q],d=[d],f=[f]);var F=y.transaction(q,"readwrite");F.oncomplete=g;F.onerror=m;for(y=0;y<q.length;y++)F.objectStore(q[y]).put(null!=d&&null!=d[y]?{key:d[y],data:f[y]}:f[y])}catch(C){null!=m&&m(C)}}),m)};
+EditorUi.prototype.removeDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){m=m||"objects";Array.isArray(m)||(m=[m],d=[d]);q=q.transaction(m,"readwrite");q.oncomplete=f;q.onerror=g;for(var y=0;y<m.length;y++)q.objectStore(m[y]).delete(d[y])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){try{m=m||"objects";var y=q.transaction([m],"readonly").objectStore(m).get(d);y.onsuccess=function(){f(y.result)};y.onerror=g}catch(F){null!=
+g&&g(F)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),y=[];q.onsuccess=function(F){null==F.target.result?d(y):(y.push(F.target.result.value),F.target.result.continue())};q.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";
+var q=m.transaction([g],"readonly").objectStore(g).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=f}catch(y){null!=f&&f(y)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};
+EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var m=this.getCurrentFile();null!=m?m.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();
+return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==
+DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,m,q,y,F,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,m,q,y,F,C)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};
+EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,m,q,y,F,C,H,G,aa,da,ba,Y,pa,
+O){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,m,q,y,F,C,H,G,aa,da,ba,Y,pa,O)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,m)};EditorUi.prototype.convertImageToDataUri=function(d,
+f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,m)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=
+function(d,f,g,m,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,m,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),m=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<m.length){var q="<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,
+5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(q||m)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,e,k,n,D,t){function E(){for(var ja=da.getElementsByTagName("div"),U=0,J=0;J<ja.length;J++)"none"!=ja[J].style.display&&ja[J].parentNode==da&&U++;ba.style.display=0==U?"block":"none"}function d(ja,U,J,V){function P(){U.removeChild(la);U.removeChild(ta);ia.style.display="block";R.style.display="block"}H={div:U,comment:ja,saveCallback:J,deleteOnCancel:V};var R=U.querySelector(".geCommentTxt"),ia=U.querySelector(".geCommentActionsList"),la=document.createElement("textarea");
+la.className="geCommentEditTxtArea";la.style.minHeight=R.offsetHeight+"px";la.value=ja.content;U.insertBefore(la,R);var ta=document.createElement("div");ta.className="geCommentEditBtns";var u=mxUtils.button(mxResources.get("cancel"),function(){V?(U.parentNode.removeChild(U),E()):P();H=null});u.className="geCommentEditBtn";ta.appendChild(u);var I=mxUtils.button(mxResources.get("save"),function(){R.innerHTML="";ja.content=la.value;mxUtils.write(R,ja.content);P();J(ja);H=null});mxEvent.addListener(la,
+"keydown",mxUtils.bind(this,function(N){mxEvent.isConsumed(N)||((mxEvent.isControlDown(N)||mxClient.IS_MAC&&mxEvent.isMetaDown(N))&&13==N.keyCode?(I.click(),mxEvent.consume(N)):27==N.keyCode&&(u.click(),mxEvent.consume(N)))}));I.focus();I.className="geCommentEditBtn gePrimaryBtn";ta.appendChild(I);U.insertBefore(ta,R);ia.style.display="none";R.style.display="none";la.focus()}function f(ja,U){U.innerHTML="";ja=new Date(ja.modifiedDate);var J=b.timeSince(ja);null==J&&(J=mxResources.get("lessThanAMinute"));
+mxUtils.write(U,mxResources.get("timeAgo",[J],"{1} ago"));U.setAttribute("title",ja.toLocaleDateString()+" "+ja.toLocaleTimeString())}function g(ja){var U=document.createElement("img");U.className="geCommentBusyImg";U.src=IMAGE_PATH+"/spin.gif";ja.appendChild(U);ja.busyImg=U}function m(ja){ja.style.border="1px solid red";ja.removeChild(ja.busyImg)}function q(ja){ja.style.border="";ja.removeChild(ja.busyImg)}function y(ja,U,J,V,P){function R(T,Q,Z){var na=document.createElement("li");na.className=
+"geCommentAction";var va=document.createElement("a");va.className="geCommentActionLnk";mxUtils.write(va,T);na.appendChild(va);mxEvent.addListener(va,"click",function(Ba){Q(Ba,ja);Ba.preventDefault();mxEvent.consume(Ba)});W.appendChild(na);Z&&(na.style.display="none")}function ia(){function T(na){Q.push(Z);if(null!=na.replies)for(var va=0;va<na.replies.length;va++)Z=Z.nextSibling,T(na.replies[va])}var Q=[],Z=ta;T(ja);return{pdiv:Z,replies:Q}}function la(T,Q,Z,na,va){function Ba(){g(za);ja.addReply(Aa,
+function(Ca){Aa.id=Ca;ja.replies.push(Aa);q(za);Z&&Z()},function(Ca){sa();m(za);b.handleError(Ca,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},na,va)}function sa(){d(Aa,za,function(Ca){Ba()},!0)}var Da=ia().pdiv,Aa=b.newComment(T,b.getCurrentUser());Aa.pCommentId=ja.id;null==ja.replies&&(ja.replies=[]);var za=y(Aa,ja.replies,Da,V+1);Q?sa():Ba()}if(P||!ja.isResolved){ba.style.display="none";var ta=document.createElement("div");ta.className="geCommentContainer";ta.setAttribute("data-commentId",
+ja.id);ta.style.marginLeft=20*V+5+"px";ja.isResolved&&!Editor.isDarkMode()&&(ta.style.backgroundColor="ghostWhite");var u=document.createElement("div");u.className="geCommentHeader";var I=document.createElement("img");I.className="geCommentUserImg";I.src=ja.user.pictureUrl||Editor.userImage;u.appendChild(I);I=document.createElement("div");I.className="geCommentHeaderTxt";u.appendChild(I);var N=document.createElement("div");N.className="geCommentUsername";mxUtils.write(N,ja.user.displayName||"");I.appendChild(N);
+N=document.createElement("div");N.className="geCommentDate";N.setAttribute("data-commentId",ja.id);f(ja,N);I.appendChild(N);ta.appendChild(u);u=document.createElement("div");u.className="geCommentTxt";mxUtils.write(u,ja.content||"");ta.appendChild(u);ja.isLocked&&(ta.style.opacity="0.5");u=document.createElement("div");u.className="geCommentActions";var W=document.createElement("ul");W.className="geCommentActionsList";u.appendChild(W);F||ja.isLocked||0!=V&&!C||R(mxResources.get("reply"),function(){la("",
+!0)},ja.isResolved);I=b.getCurrentUser();null==I||I.id!=ja.user.id||F||ja.isLocked||(R(mxResources.get("edit"),function(){function T(){d(ja,ta,function(){g(ta);ja.editComment(ja.content,function(){q(ta)},function(Q){m(ta);T();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}T()},ja.isResolved),R(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(ta);ja.deleteComment(function(T){if(!0===T){T=ta.querySelector(".geCommentTxt");
+T.innerHTML="";mxUtils.write(T,mxResources.get("msgDeleted"));var Q=ta.querySelectorAll(".geCommentAction");for(T=0;T<Q.length;T++)Q[T].parentNode.removeChild(Q[T]);q(ta);ta.style.opacity="0.5"}else{Q=ia(ja).replies;for(T=0;T<Q.length;T++)da.removeChild(Q[T]);for(T=0;T<U.length;T++)if(U[T]==ja){U.splice(T,1);break}ba.style.display=0==da.getElementsByTagName("div").length?"block":"none"}},function(T){m(ta);b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
+ja.isResolved));F||ja.isLocked||0!=V||R(ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(T){function Q(){var Z=T.target;Z.innerHTML="";ja.isResolved=!ja.isResolved;mxUtils.write(Z,ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var na=ja.isResolved?"none":"",va=ia(ja).replies,Ba=Editor.isDarkMode()?"transparent":ja.isResolved?"ghostWhite":"white",sa=0;sa<va.length;sa++){va[sa].style.backgroundColor=Ba;for(var Da=va[sa].querySelectorAll(".geCommentAction"),
+Aa=0;Aa<Da.length;Aa++)Da[Aa]!=Z.parentNode&&(Da[Aa].style.display=na);O||(va[sa].style.display="none")}E()}ja.isResolved?la(mxResources.get("reOpened")+": ",!0,Q,!1,!0):la(mxResources.get("markedAsResolved"),!1,Q,!0)});ta.appendChild(u);null!=J?da.insertBefore(ta,J.nextSibling):da.appendChild(ta);for(J=0;null!=ja.replies&&J<ja.replies.length;J++)u=ja.replies[J],u.isResolved=ja.isResolved,y(u,ja.replies,null,V+1,P);null!=H&&(H.comment.id==ja.id?(P=ja.content,ja.content=H.comment.content,d(ja,ta,H.saveCallback,
+H.deleteOnCancel),ja.content=P):null==H.comment.id&&H.comment.pCommentId==ja.id&&(da.appendChild(H.div),d(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return ta}}var F=!b.canComment(),C=b.canReplyToReplies(),H=null,G=document.createElement("div");G.className="geCommentsWin";G.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var aa=EditorUi.compactUi?"26px":"30px",da=document.createElement("div");da.className="geCommentsList";da.style.backgroundColor=Editor.isDarkMode()?
Dialog.backdropColor:"whiteSmoke";da.style.bottom=parseInt(aa)+7+"px";G.appendChild(da);var ba=document.createElement("span");ba.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(ba,mxResources.get("noCommentsFound"));var Y=document.createElement("div");Y.className="geToolbarContainer geCommentsToolbar";Y.style.height=aa;Y.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";Y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";aa=document.createElement("a");
-aa.className="geButton";if(!F){var pa=aa.cloneNode();pa.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';pa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(pa,"click",function(ja){function U(){d(I,V,function(P){g(V);b.addComment(P,function(R){P.id=R;X.push(P);q(V)},function(R){m(V);U();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var I=b.newComment("",b.getCurrentUser()),V=y(I,X,null,0);
+aa.className="geButton";if(!F){var pa=aa.cloneNode();pa.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';pa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(pa,"click",function(ja){function U(){d(J,V,function(P){g(V);b.addComment(P,function(R){P.id=R;X.push(P);q(V)},function(R){m(V);U();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var J=b.newComment("",b.getCurrentUser()),V=y(J,X,null,0);
U();ja.preventDefault();mxEvent.consume(ja)});Y.appendChild(pa)}pa=aa.cloneNode();pa.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';pa.setAttribute("title",mxResources.get("showResolved"));var O=!1;Editor.isDarkMode()&&(pa.style.filter="invert(100%)");mxEvent.addListener(pa,"click",function(ja){this.className=(O=!O)?"geButton geCheckedBtn":"geButton";ea();ja.preventDefault();mxEvent.consume(ja)});Y.appendChild(pa);b.commentsRefreshNeeded()&&(pa=aa.cloneNode(),
pa.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',pa.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(pa.style.filter="invert(100%)"),mxEvent.addListener(pa,"click",function(ja){ea();ja.preventDefault();mxEvent.consume(ja)}),Y.appendChild(pa));b.commentsSaveNeeded()&&(aa=aa.cloneNode(),aa.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',aa.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&
-(aa.style.filter="invert(100%)"),mxEvent.addListener(aa,"click",function(ja){t();ja.preventDefault();mxEvent.consume(ja)}),Y.appendChild(aa));G.appendChild(Y);var X=[],ea=mxUtils.bind(this,function(){this.hasError=!1;if(null!=H)try{H.div=H.div.cloneNode(!0);var ja=H.div.querySelector(".geCommentEditTxtArea"),U=H.div.querySelector(".geCommentEditBtns");H.comment.content=ja.value;ja.parentNode.removeChild(ja);U.parentNode.removeChild(U)}catch(I){b.handleError(I)}da.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
-IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";C=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(I){function V(P){if(null!=P){P.sort(function(fa,la){return new Date(fa.modifiedDate)-new Date(la.modifiedDate)});for(var R=0;R<P.length;R++)V(P[R].replies)}}I.sort(function(P,R){return new Date(P.modifiedDate)-new Date(R.modifiedDate)});da.innerHTML="";da.appendChild(ba);ba.style.display="block";X=I;for(I=0;I<X.length;I++)V(X[I].replies),
-y(X[I],X,null,0,O);null!=H&&null==H.comment.id&&null==H.comment.pCommentId&&(da.appendChild(H.div),d(H.comment,H.div,H.saveCallback,H.deleteOnCancel))},mxUtils.bind(this,function(I){da.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(I&&I.message?": "+I.message:""));this.hasError=!0})):da.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ea();this.refreshComments=ea;Y=mxUtils.bind(this,function(){function ja(R){var fa=I[R.id];if(null!=fa)for(f(R,fa),fa=0;null!=R.replies&&fa<R.replies.length;fa++)ja(R.replies[fa])}
-if(this.window.isVisible()){for(var U=da.querySelectorAll(".geCommentDate"),I={},V=0;V<U.length;V++){var P=U[V];I[P.getAttribute("data-commentId")]=P}for(V=0;V<X.length;V++)ja(X[V])}});setInterval(Y,6E4);this.refreshCommentsTime=Y;this.window=new mxWindow(mxResources.get("comments"),G,e,k,n,D,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(ja,U){var I=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;ja=Math.max(0,Math.min(ja,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));U=Math.max(0,Math.min(U,I-this.table.clientHeight-48));this.getX()==ja&&this.getY()==U||mxWindow.prototype.setLocation.apply(this,arguments)};var ka=mxUtils.bind(this,function(){var ja=
+(aa.style.filter="invert(100%)"),mxEvent.addListener(aa,"click",function(ja){t();ja.preventDefault();mxEvent.consume(ja)}),Y.appendChild(aa));G.appendChild(Y);var X=[],ea=mxUtils.bind(this,function(){this.hasError=!1;if(null!=H)try{H.div=H.div.cloneNode(!0);var ja=H.div.querySelector(".geCommentEditTxtArea"),U=H.div.querySelector(".geCommentEditBtns");H.comment.content=ja.value;ja.parentNode.removeChild(ja);U.parentNode.removeChild(U)}catch(J){b.handleError(J)}da.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";C=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(J){function V(P){if(null!=P){P.sort(function(ia,la){return new Date(ia.modifiedDate)-new Date(la.modifiedDate)});for(var R=0;R<P.length;R++)V(P[R].replies)}}J.sort(function(P,R){return new Date(P.modifiedDate)-new Date(R.modifiedDate)});da.innerHTML="";da.appendChild(ba);ba.style.display="block";X=J;for(J=0;J<X.length;J++)V(X[J].replies),
+y(X[J],X,null,0,O);null!=H&&null==H.comment.id&&null==H.comment.pCommentId&&(da.appendChild(H.div),d(H.comment,H.div,H.saveCallback,H.deleteOnCancel))},mxUtils.bind(this,function(J){da.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(J&&J.message?": "+J.message:""));this.hasError=!0})):da.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ea();this.refreshComments=ea;Y=mxUtils.bind(this,function(){function ja(R){var ia=J[R.id];if(null!=ia)for(f(R,ia),ia=0;null!=R.replies&&ia<R.replies.length;ia++)ja(R.replies[ia])}
+if(this.window.isVisible()){for(var U=da.querySelectorAll(".geCommentDate"),J={},V=0;V<U.length;V++){var P=U[V];J[P.getAttribute("data-commentId")]=P}for(V=0;V<X.length;V++)ja(X[V])}});setInterval(Y,6E4);this.refreshCommentsTime=Y;this.window=new mxWindow(mxResources.get("comments"),G,e,k,n,D,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(ja,U){var J=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;ja=Math.max(0,Math.min(ja,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));U=Math.max(0,Math.min(U,J-this.table.clientHeight-48));this.getX()==ja&&this.getY()==U||mxWindow.prototype.setLocation.apply(this,arguments)};var ka=mxUtils.bind(this,function(){var ja=
this.window.getX(),U=this.window.getY();this.window.setLocation(ja,U)});mxEvent.addListener(window,"resize",ka);this.destroy=function(){mxEvent.removeListener(window,"resize",ka);this.window.destroy()}},ConfirmDialog=function(b,e,k,n,D,t,E,d,f,g,m){var q=document.createElement("div");q.style.textAlign="center";m=null!=m?m:44;var y=document.createElement("div");y.style.padding="6px";y.style.overflow="auto";y.style.maxHeight=m+"px";y.style.lineHeight="1.2em";mxUtils.write(y,e);q.appendChild(y);null!=
g&&(y=document.createElement("div"),y.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",g),y.appendChild(e),q.appendChild(y));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var F=document.createElement("input");F.setAttribute("type","checkbox");t=mxUtils.button(t||mxResources.get("cancel"),function(){b.hideDialog();null!=n&&n(F.checked)});t.className="geBtn";null!=d&&(t.innerHTML=d+"<br>"+t.innerHTML,t.style.paddingBottom="8px",
t.style.paddingTop="8px",t.style.height="auto",t.style.width="40%");b.editor.cancelFirst&&g.appendChild(t);var C=mxUtils.button(D||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(F.checked)});g.appendChild(C);null!=E?(C.innerHTML=E+"<br>"+C.innerHTML+"<br>",C.style.paddingBottom="8px",C.style.paddingTop="8px",C.style.height="auto",C.className="geBtn",C.style.width="40%"):C.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(t);q.appendChild(g);f?(g.style.marginTop="10px",
@@ -3872,35 +3872,35 @@ f=new EmbedDialog(this,this.getLinkForPage(b,t,f));this.showDialog(f.container,4
n));return n};b.beforeDecode=function(e,k,n){n.ui=e.ui;n.relatedPage=n.ui.getPageById(k.getAttribute("relatedPage"));if(null==n.relatedPage){var D=k.ownerDocument.createElement("diagram");D.setAttribute("id",k.getAttribute("relatedPage"));D.setAttribute("name",k.getAttribute("name"));n.relatedPage=new DiagramPage(D);D=k.getAttribute("viewState");null!=D&&(n.relatedPage.viewState=JSON.parse(D),k.removeAttribute("viewState"));k=k.cloneNode(!0);D=k.firstChild;if(null!=D)for(n.relatedPage.root=e.decodeCell(D,
!1),n=D.nextSibling,D.parentNode.removeChild(D),D=n;null!=D;){n=D.nextSibling;if(D.nodeType==mxConstants.NODETYPE_ELEMENT){var t=D.getAttribute("id");null==e.lookup(t)&&e.decodeCell(D)}D.parentNode.removeChild(D);D=n}}return k};b.afterDecode=function(e,k,n){n.index=n.previousIndex;return n};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(n,D,t,E,d){D=null!=D?D:!1;null==t&&(t=this.getFoldableCells(this.getSelectionCells(),n));this.stopEditing();this.model.beginUpdate();try{for(var f=t.slice(),g=0;g<t.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(t[g]),"treeFolding","0")&&this.foldTreeCell(n,t[g]);t=f;t=b.apply(this,arguments)}finally{this.model.endUpdate()}return t};Graph.prototype.foldTreeCell=
function(n,D){this.model.beginUpdate();try{var t=[];this.traverse(D,!0,mxUtils.bind(this,function(d,f){var g=null!=f&&this.isTreeEdge(f);g&&t.push(f);d==D||null!=f&&!g||t.push(d);return(null==f||g)&&(d==D||!this.model.isCollapsed(d))}));this.model.setCollapsed(D,n);for(var E=0;E<t.length;E++)this.model.setVisible(t[E],!n)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(n){return!this.isEdgeIgnored(n)};Graph.prototype.getTreeEdges=function(n,D,t,E,d,f){return this.model.filterCells(this.getEdges(n,
-D,t,E,d,f),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function n(I){return H.isVertex(I)&&t(I)}function D(I){var V=
-!1;null!=I&&(V="1"==C.getCurrentCellStyle(I).treeMoving);return V}function t(I){var V=!1;null!=I&&(I=H.getParent(I),V=C.view.getState(I),V="tree"==(null!=V?V.style:C.getCellStyle(I)).containerType);return V}function E(I){var V=!1;null!=I&&(I=H.getParent(I),V=C.view.getState(I),C.view.getState(I),V=null!=(null!=V?V.style:C.getCellStyle(I)).childLayout);return V}function d(I){I=C.view.getState(I);if(null!=I){var V=C.getIncomingTreeEdges(I.cell);if(0<V.length&&(V=C.view.getState(V[0]),null!=V&&(V=V.absolutePoints,
-null!=V&&0<V.length&&(V=V[V.length-1],null!=V)))){if(V.y==I.y&&Math.abs(V.x-I.getCenterX())<I.width/2)return mxConstants.DIRECTION_SOUTH;if(V.y==I.y+I.height&&Math.abs(V.x-I.getCenterX())<I.width/2)return mxConstants.DIRECTION_NORTH;if(V.x>I.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(I,V){V=null!=V?V:!0;C.model.beginUpdate();try{var P=C.model.getParent(I),R=C.getIncomingTreeEdges(I),fa=C.cloneCells([R[0],I]);C.model.setTerminal(fa[0],C.model.getTerminal(R[0],
-!0),!0);var la=d(I),sa=P.geometry;la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?fa[1].geometry.x+=V?I.geometry.width+10:-fa[1].geometry.width-10:fa[1].geometry.y+=V?I.geometry.height+10:-fa[1].geometry.height-10;C.view.currentRoot!=P&&(fa[1].geometry.x-=sa.x,fa[1].geometry.y-=sa.y);var u=C.view.getState(I),J=C.view.scale;if(null!=u){var N=mxRectangle.fromRectangle(u);la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?N.x+=(V?I.geometry.width+10:-fa[1].geometry.width-
-10)*J:N.y+=(V?I.geometry.height+10:-fa[1].geometry.height-10)*J;var W=C.getOutgoingTreeEdges(C.model.getTerminal(R[0],!0));if(null!=W){for(var T=la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH,Q=sa=R=0;Q<W.length;Q++){var Z=C.model.getTerminal(W[Q],!1);if(la==d(Z)){var oa=C.view.getState(Z);Z!=I&&null!=oa&&(T&&V!=oa.getCenterX()<u.getCenterX()||!T&&V!=oa.getCenterY()<u.getCenterY())&&mxUtils.intersects(N,oa)&&(R=10+Math.max(R,(Math.min(N.x+N.width,oa.x+oa.width)-Math.max(N.x,oa.x))/
-J),sa=10+Math.max(sa,(Math.min(N.y+N.height,oa.y+oa.height)-Math.max(N.y,oa.y))/J))}}T?sa=0:R=0;for(Q=0;Q<W.length;Q++)if(Z=C.model.getTerminal(W[Q],!1),la==d(Z)&&(oa=C.view.getState(Z),Z!=I&&null!=oa&&(T&&V!=oa.getCenterX()<u.getCenterX()||!T&&V!=oa.getCenterY()<u.getCenterY()))){var wa=[];C.traverse(oa.cell,!0,function(Aa,ta){var Ba=null!=ta&&C.isTreeEdge(ta);Ba&&wa.push(ta);(null==ta||Ba)&&wa.push(Aa);return null==ta||Ba});C.moveCells(wa,(V?1:-1)*R,(V?1:-1)*sa)}}}return C.addCells(fa,P)}finally{C.model.endUpdate()}}
-function g(I){C.model.beginUpdate();try{var V=d(I),P=C.getIncomingTreeEdges(I),R=C.cloneCells([P[0],I]);C.model.setTerminal(P[0],R[1],!1);C.model.setTerminal(R[0],R[1],!0);C.model.setTerminal(R[0],I,!1);var fa=C.model.getParent(I),la=fa.geometry,sa=[];C.view.currentRoot!=fa&&(R[1].geometry.x-=la.x,R[1].geometry.y-=la.y);C.traverse(I,!0,function(N,W){var T=null!=W&&C.isTreeEdge(W);T&&sa.push(W);(null==W||T)&&sa.push(N);return null==W||T});var u=I.geometry.width+40,J=I.geometry.height+40;V==mxConstants.DIRECTION_SOUTH?
-u=0:V==mxConstants.DIRECTION_NORTH?(u=0,J=-J):V==mxConstants.DIRECTION_WEST?(u=-u,J=0):V==mxConstants.DIRECTION_EAST&&(J=0);C.moveCells(sa,u,J);return C.addCells(R,fa)}finally{C.model.endUpdate()}}function m(I,V){C.model.beginUpdate();try{var P=C.model.getParent(I),R=C.getIncomingTreeEdges(I),fa=d(I);0==R.length&&(R=[C.createEdge(P,null,"",null,null,C.createCurrentEdgeStyle())],fa=V);var la=C.cloneCells([R[0],I]);C.model.setTerminal(la[0],I,!0);if(null==C.model.getTerminal(la[0],!1)){C.model.setTerminal(la[0],
-la[1],!1);var sa=C.getCellStyle(la[1]).newEdgeStyle;if(null!=sa)try{var u=JSON.parse(sa),J;for(J in u)C.setCellStyles(J,u[J],[la[0]]),"edgeStyle"==J&&"elbowEdgeStyle"==u[J]&&C.setCellStyles("elbow",fa==mxConstants.DIRECTION_SOUTH||fa==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[la[0]])}catch(oa){}}R=C.getOutgoingTreeEdges(I);var N=P.geometry;V=[];C.view.currentRoot==P&&(N=new mxRectangle);for(sa=0;sa<R.length;sa++){var W=C.model.getTerminal(R[sa],!1);null!=W&&V.push(W)}var T=C.view.getBounds(V),
-Q=C.view.translate,Z=C.view.scale;fa==mxConstants.DIRECTION_SOUTH?(la[1].geometry.x=null==T?I.geometry.x+(I.geometry.width-la[1].geometry.width)/2:(T.x+T.width)/Z-Q.x-N.x+10,la[1].geometry.y+=la[1].geometry.height-N.y+40):fa==mxConstants.DIRECTION_NORTH?(la[1].geometry.x=null==T?I.geometry.x+(I.geometry.width-la[1].geometry.width)/2:(T.x+T.width)/Z-Q.x+-N.x+10,la[1].geometry.y-=la[1].geometry.height+N.y+40):(la[1].geometry.x=fa==mxConstants.DIRECTION_WEST?la[1].geometry.x-(la[1].geometry.width+N.x+
-40):la[1].geometry.x+(la[1].geometry.width-N.x+40),la[1].geometry.y=null==T?I.geometry.y+(I.geometry.height-la[1].geometry.height)/2:(T.y+T.height)/Z-Q.y+-N.y+10);return C.addCells(la,P)}finally{C.model.endUpdate()}}function q(I,V,P){I=C.getOutgoingTreeEdges(I);P=C.view.getState(P);var R=[];if(null!=P&&null!=I){for(var fa=0;fa<I.length;fa++){var la=C.view.getState(C.model.getTerminal(I[fa],!1));null!=la&&(!V&&Math.min(la.x+la.width,P.x+P.width)>=Math.max(la.x,P.x)||V&&Math.min(la.y+la.height,P.y+
-P.height)>=Math.max(la.y,P.y))&&R.push(la)}R.sort(function(sa,u){return V?sa.x+sa.width-u.x-u.width:sa.y+sa.height-u.y-u.height})}return R}function y(I,V){var P=d(I),R=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST)==R&&P!=V?F.actions.get("selectParent").funct():P==V?(V=C.getOutgoingTreeEdges(I),null!=V&&0<V.length&&C.setSelectionCell(C.model.getTerminal(V[0],!1))):(P=C.getIncomingTreeEdges(I),null!=P&&0<P.length&&(R=q(C.model.getTerminal(P[0],
-!0),R,I),I=C.view.getState(I),null!=I&&(I=mxUtils.indexOf(R,I),0<=I&&(I+=V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_WEST?-1:1,0<=I&&I<=R.length-1&&C.setSelectionCell(R[I].cell)))))}var F=this,C=F.editor.graph,H=C.getModel(),G=F.menus.createPopupMenu;F.menus.createPopupMenu=function(I,V,P){G.apply(this,arguments);if(1==C.getSelectionCount()){V=C.getSelectionCell();var R=C.getOutgoingTreeEdges(V);I.addSeparator();0<R.length&&(n(C.getSelectionCell())&&this.addMenuItems(I,["selectChildren"],
-null,P),this.addMenuItems(I,["selectDescendants"],null,P));n(C.getSelectionCell())?(I.addSeparator(),0<C.getIncomingTreeEdges(V).length&&this.addMenuItems(I,["selectSiblings","selectParent"],null,P)):0<C.model.getEdgeCount(V)&&this.addMenuItems(I,["selectConnections"],null,P)}};F.actions.addAction("selectChildren",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var I=C.getSelectionCell();I=C.getOutgoingTreeEdges(I);if(null!=I){for(var V=[],P=0;P<I.length;P++)V.push(C.model.getTerminal(I[P],
-!1));C.setSelectionCells(V)}}},null,null,"Alt+Shift+X");F.actions.addAction("selectSiblings",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var I=C.getSelectionCell();I=C.getIncomingTreeEdges(I);if(null!=I&&0<I.length&&(I=C.getOutgoingTreeEdges(C.model.getTerminal(I[0],!0)),null!=I)){for(var V=[],P=0;P<I.length;P++)V.push(C.model.getTerminal(I[P],!1));C.setSelectionCells(V)}}},null,null,"Alt+Shift+S");F.actions.addAction("selectParent",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var I=
-C.getSelectionCell();I=C.getIncomingTreeEdges(I);null!=I&&0<I.length&&C.setSelectionCell(C.model.getTerminal(I[0],!0))}},null,null,"Alt+Shift+P");F.actions.addAction("selectDescendants",function(I,V){I=C.getSelectionCell();if(C.isEnabled()&&C.model.isVertex(I)){if(null!=V&&mxEvent.isAltDown(V))C.setSelectionCells(C.model.getTreeEdges(I,null==V||!mxEvent.isShiftDown(V),null==V||!mxEvent.isControlDown(V)));else{var P=[];C.traverse(I,!0,function(R,fa){var la=null!=fa&&C.isTreeEdge(fa);la&&P.push(fa);
-null!=fa&&!la||null!=V&&mxEvent.isShiftDown(V)||P.push(R);return null==fa||la})}C.setSelectionCells(P)}},null,null,"Alt+Shift+D");var aa=C.removeCells;C.removeCells=function(I,V){V=null!=V?V:!0;null==I&&(I=this.getDeletableCells(this.getSelectionCells()));V&&(I=this.getDeletableCells(this.addAllEdges(I)));for(var P=[],R=0;R<I.length;R++){var fa=I[R];H.isEdge(fa)&&t(fa)&&(P.push(fa),fa=H.getTerminal(fa,!1));if(n(fa)){var la=[];C.traverse(fa,!0,function(sa,u){var J=null!=u&&C.isTreeEdge(u);J&&la.push(u);
-(null==u||J)&&la.push(sa);return null==u||J});0<la.length&&(P=P.concat(la),fa=C.getIncomingTreeEdges(I[R]),I=I.concat(fa))}else null!=fa&&P.push(I[R])}I=P;return aa.apply(this,arguments)};F.hoverIcons.getStateAt=function(I,V,P){return n(I.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,P))};var da=C.duplicateCells;C.duplicateCells=function(I,V){I=null!=I?I:this.getSelectionCells();for(var P=I.slice(0),R=0;R<P.length;R++){var fa=C.view.getState(P[R]);if(null!=fa&&n(fa.cell)){var la=C.getIncomingTreeEdges(fa.cell);
-for(fa=0;fa<la.length;fa++)mxUtils.remove(la[fa],I)}}this.model.beginUpdate();try{var sa=da.call(this,I,V);if(sa.length==I.length)for(R=0;R<I.length;R++)if(n(I[R])){var u=C.getIncomingTreeEdges(sa[R]);la=C.getIncomingTreeEdges(I[R]);if(0==u.length&&0<la.length){var J=this.cloneCell(la[0]);this.addEdge(J,C.getDefaultParent(),this.model.getTerminal(la[0],!0),sa[R])}}}finally{this.model.endUpdate()}return sa};var ba=C.moveCells;C.moveCells=function(I,V,P,R,fa,la,sa){var u=null;this.model.beginUpdate();
-try{var J=fa,N=this.getCurrentCellStyle(fa);if(null!=I&&n(fa)&&"1"==mxUtils.getValue(N,"treeFolding","0")){for(var W=0;W<I.length;W++)if(n(I[W])||C.model.isEdge(I[W])&&null==C.model.getTerminal(I[W],!0)){fa=C.model.getParent(I[W]);break}if(null!=J&&fa!=J&&null!=this.view.getState(I[0])){var T=C.getIncomingTreeEdges(I[0]);if(0<T.length){var Q=C.view.getState(C.model.getTerminal(T[0],!0));if(null!=Q){var Z=C.view.getState(J);null!=Z&&(V=(Z.getCenterX()-Q.getCenterX())/C.view.scale,P=(Z.getCenterY()-
-Q.getCenterY())/C.view.scale)}}}}u=ba.apply(this,arguments);if(null!=u&&null!=I&&u.length==I.length)for(W=0;W<u.length;W++)if(this.model.isEdge(u[W]))n(J)&&0>mxUtils.indexOf(u,this.model.getTerminal(u[W],!0))&&this.model.setTerminal(u[W],J,!0);else if(n(I[W])&&(T=C.getIncomingTreeEdges(I[W]),0<T.length))if(!R)n(J)&&0>mxUtils.indexOf(I,this.model.getTerminal(T[0],!0))&&this.model.setTerminal(T[0],J,!0);else if(0==C.getIncomingTreeEdges(u[W]).length){N=J;if(null==N||N==C.model.getParent(I[W]))N=C.model.getTerminal(T[0],
-!0);R=this.cloneCell(T[0]);this.addEdge(R,C.getDefaultParent(),N,u[W])}}finally{this.model.endUpdate()}return u};if(null!=F.sidebar){var Y=F.sidebar.dropAndConnect;F.sidebar.dropAndConnect=function(I,V,P,R){var fa=C.model,la=null;fa.beginUpdate();try{if(la=Y.apply(this,arguments),n(I))for(var sa=0;sa<la.length;sa++)if(fa.isEdge(la[sa])&&null==fa.getTerminal(la[sa],!0)){fa.setTerminal(la[sa],I,!0);var u=C.getCellGeometry(la[sa]);u.points=null;null!=u.getTerminalPoint(!0)&&u.setTerminalPoint(null,!0)}}finally{fa.endUpdate()}return la}}var pa=
-{88:F.actions.get("selectChildren"),84:F.actions.get("selectSubtree"),80:F.actions.get("selectParent"),83:F.actions.get("selectSiblings")},O=F.onKeyDown;F.onKeyDown=function(I){try{if(C.isEnabled()&&!C.isEditing()&&n(C.getSelectionCell())&&1==C.getSelectionCount()){var V=null;0<C.getIncomingTreeEdges(C.getSelectionCell()).length&&(9==I.which?V=mxEvent.isShiftDown(I)?g(C.getSelectionCell()):m(C.getSelectionCell()):13==I.which&&(V=f(C.getSelectionCell(),!mxEvent.isShiftDown(I))));if(null!=V&&0<V.length)1==
-V.length&&C.model.isEdge(V[0])?C.setSelectionCell(C.model.getTerminal(V[0],!1)):C.setSelectionCell(V[V.length-1]),null!=F.hoverIcons&&F.hoverIcons.update(C.view.getState(C.getSelectionCell())),C.startEditingAtCell(C.getSelectionCell()),mxEvent.consume(I);else if(mxEvent.isAltDown(I)&&mxEvent.isShiftDown(I)){var P=pa[I.keyCode];null!=P&&(P.funct(I),mxEvent.consume(I))}else 37==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(I)):38==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_NORTH),
-mxEvent.consume(I)):39==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(I)):40==I.keyCode&&(y(C.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(I))}}catch(R){F.handleError(R)}mxEvent.isConsumed(I)||O.apply(this,arguments)};var X=C.connectVertex;C.connectVertex=function(I,V,P,R,fa,la,sa){var u=C.getIncomingTreeEdges(I);if(n(I)){var J=d(I),N=J==mxConstants.DIRECTION_EAST||J==mxConstants.DIRECTION_WEST,W=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
-return J==V||0==u.length?m(I,V):N==W?g(I):f(I,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return X.apply(this,arguments)};C.getSubtree=function(I){var V=[I];!D(I)&&!n(I)||E(I)||C.traverse(I,!0,function(P,R){var fa=null!=R&&C.isTreeEdge(R);fa&&0>mxUtils.indexOf(V,R)&&V.push(R);(null==R||fa)&&0>mxUtils.indexOf(V,P)&&V.push(P);return null==R||fa});return V};var ea=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ea.apply(this,arguments);(D(this.state.cell)||
-n(this.state.cell))&&!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(I){this.graph.graphHandler.start(this.state.cell,
-mxEvent.getClientX(I),mxEvent.getClientY(I),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(I);this.graph.isMouseDown=!0;F.hoverIcons.reset();mxEvent.consume(I)})))};var ka=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){ka.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
-this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var ja=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(I){ja.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=I?"":"none")};var U=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(I,V){U.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==
+D,t,E,d,f),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function n(J){return H.isVertex(J)&&t(J)}function D(J){var V=
+!1;null!=J&&(V="1"==C.getCurrentCellStyle(J).treeMoving);return V}function t(J){var V=!1;null!=J&&(J=H.getParent(J),V=C.view.getState(J),V="tree"==(null!=V?V.style:C.getCellStyle(J)).containerType);return V}function E(J){var V=!1;null!=J&&(J=H.getParent(J),V=C.view.getState(J),C.view.getState(J),V=null!=(null!=V?V.style:C.getCellStyle(J)).childLayout);return V}function d(J){J=C.view.getState(J);if(null!=J){var V=C.getIncomingTreeEdges(J.cell);if(0<V.length&&(V=C.view.getState(V[0]),null!=V&&(V=V.absolutePoints,
+null!=V&&0<V.length&&(V=V[V.length-1],null!=V)))){if(V.y==J.y&&Math.abs(V.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_SOUTH;if(V.y==J.y+J.height&&Math.abs(V.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_NORTH;if(V.x>J.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(J,V){V=null!=V?V:!0;C.model.beginUpdate();try{var P=C.model.getParent(J),R=C.getIncomingTreeEdges(J),ia=C.cloneCells([R[0],J]);C.model.setTerminal(ia[0],C.model.getTerminal(R[0],
+!0),!0);var la=d(J),ta=P.geometry;la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?ia[1].geometry.x+=V?J.geometry.width+10:-ia[1].geometry.width-10:ia[1].geometry.y+=V?J.geometry.height+10:-ia[1].geometry.height-10;C.view.currentRoot!=P&&(ia[1].geometry.x-=ta.x,ia[1].geometry.y-=ta.y);var u=C.view.getState(J),I=C.view.scale;if(null!=u){var N=mxRectangle.fromRectangle(u);la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?N.x+=(V?J.geometry.width+10:-ia[1].geometry.width-
+10)*I:N.y+=(V?J.geometry.height+10:-ia[1].geometry.height-10)*I;var W=C.getOutgoingTreeEdges(C.model.getTerminal(R[0],!0));if(null!=W){for(var T=la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH,Q=ta=R=0;Q<W.length;Q++){var Z=C.model.getTerminal(W[Q],!1);if(la==d(Z)){var na=C.view.getState(Z);Z!=J&&null!=na&&(T&&V!=na.getCenterX()<u.getCenterX()||!T&&V!=na.getCenterY()<u.getCenterY())&&mxUtils.intersects(N,na)&&(R=10+Math.max(R,(Math.min(N.x+N.width,na.x+na.width)-Math.max(N.x,na.x))/
+I),ta=10+Math.max(ta,(Math.min(N.y+N.height,na.y+na.height)-Math.max(N.y,na.y))/I))}}T?ta=0:R=0;for(Q=0;Q<W.length;Q++)if(Z=C.model.getTerminal(W[Q],!1),la==d(Z)&&(na=C.view.getState(Z),Z!=J&&null!=na&&(T&&V!=na.getCenterX()<u.getCenterX()||!T&&V!=na.getCenterY()<u.getCenterY()))){var va=[];C.traverse(na.cell,!0,function(Ba,sa){var Da=null!=sa&&C.isTreeEdge(sa);Da&&va.push(sa);(null==sa||Da)&&va.push(Ba);return null==sa||Da});C.moveCells(va,(V?1:-1)*R,(V?1:-1)*ta)}}}return C.addCells(ia,P)}finally{C.model.endUpdate()}}
+function g(J){C.model.beginUpdate();try{var V=d(J),P=C.getIncomingTreeEdges(J),R=C.cloneCells([P[0],J]);C.model.setTerminal(P[0],R[1],!1);C.model.setTerminal(R[0],R[1],!0);C.model.setTerminal(R[0],J,!1);var ia=C.model.getParent(J),la=ia.geometry,ta=[];C.view.currentRoot!=ia&&(R[1].geometry.x-=la.x,R[1].geometry.y-=la.y);C.traverse(J,!0,function(N,W){var T=null!=W&&C.isTreeEdge(W);T&&ta.push(W);(null==W||T)&&ta.push(N);return null==W||T});var u=J.geometry.width+40,I=J.geometry.height+40;V==mxConstants.DIRECTION_SOUTH?
+u=0:V==mxConstants.DIRECTION_NORTH?(u=0,I=-I):V==mxConstants.DIRECTION_WEST?(u=-u,I=0):V==mxConstants.DIRECTION_EAST&&(I=0);C.moveCells(ta,u,I);return C.addCells(R,ia)}finally{C.model.endUpdate()}}function m(J,V){C.model.beginUpdate();try{var P=C.model.getParent(J),R=C.getIncomingTreeEdges(J),ia=d(J);0==R.length&&(R=[C.createEdge(P,null,"",null,null,C.createCurrentEdgeStyle())],ia=V);var la=C.cloneCells([R[0],J]);C.model.setTerminal(la[0],J,!0);if(null==C.model.getTerminal(la[0],!1)){C.model.setTerminal(la[0],
+la[1],!1);var ta=C.getCellStyle(la[1]).newEdgeStyle;if(null!=ta)try{var u=JSON.parse(ta),I;for(I in u)C.setCellStyles(I,u[I],[la[0]]),"edgeStyle"==I&&"elbowEdgeStyle"==u[I]&&C.setCellStyles("elbow",ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[la[0]])}catch(na){}}R=C.getOutgoingTreeEdges(J);var N=P.geometry;V=[];C.view.currentRoot==P&&(N=new mxRectangle);for(ta=0;ta<R.length;ta++){var W=C.model.getTerminal(R[ta],!1);null!=W&&V.push(W)}var T=C.view.getBounds(V),
+Q=C.view.translate,Z=C.view.scale;ia==mxConstants.DIRECTION_SOUTH?(la[1].geometry.x=null==T?J.geometry.x+(J.geometry.width-la[1].geometry.width)/2:(T.x+T.width)/Z-Q.x-N.x+10,la[1].geometry.y+=la[1].geometry.height-N.y+40):ia==mxConstants.DIRECTION_NORTH?(la[1].geometry.x=null==T?J.geometry.x+(J.geometry.width-la[1].geometry.width)/2:(T.x+T.width)/Z-Q.x+-N.x+10,la[1].geometry.y-=la[1].geometry.height+N.y+40):(la[1].geometry.x=ia==mxConstants.DIRECTION_WEST?la[1].geometry.x-(la[1].geometry.width+N.x+
+40):la[1].geometry.x+(la[1].geometry.width-N.x+40),la[1].geometry.y=null==T?J.geometry.y+(J.geometry.height-la[1].geometry.height)/2:(T.y+T.height)/Z-Q.y+-N.y+10);return C.addCells(la,P)}finally{C.model.endUpdate()}}function q(J,V,P){J=C.getOutgoingTreeEdges(J);P=C.view.getState(P);var R=[];if(null!=P&&null!=J){for(var ia=0;ia<J.length;ia++){var la=C.view.getState(C.model.getTerminal(J[ia],!1));null!=la&&(!V&&Math.min(la.x+la.width,P.x+P.width)>=Math.max(la.x,P.x)||V&&Math.min(la.y+la.height,P.y+
+P.height)>=Math.max(la.y,P.y))&&R.push(la)}R.sort(function(ta,u){return V?ta.x+ta.width-u.x-u.width:ta.y+ta.height-u.y-u.height})}return R}function y(J,V){var P=d(J),R=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST)==R&&P!=V?F.actions.get("selectParent").funct():P==V?(V=C.getOutgoingTreeEdges(J),null!=V&&0<V.length&&C.setSelectionCell(C.model.getTerminal(V[0],!1))):(P=C.getIncomingTreeEdges(J),null!=P&&0<P.length&&(R=q(C.model.getTerminal(P[0],
+!0),R,J),J=C.view.getState(J),null!=J&&(J=mxUtils.indexOf(R,J),0<=J&&(J+=V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_WEST?-1:1,0<=J&&J<=R.length-1&&C.setSelectionCell(R[J].cell)))))}var F=this,C=F.editor.graph,H=C.getModel(),G=F.menus.createPopupMenu;F.menus.createPopupMenu=function(J,V,P){G.apply(this,arguments);if(1==C.getSelectionCount()){V=C.getSelectionCell();var R=C.getOutgoingTreeEdges(V);J.addSeparator();0<R.length&&(n(C.getSelectionCell())&&this.addMenuItems(J,["selectChildren"],
+null,P),this.addMenuItems(J,["selectDescendants"],null,P));n(C.getSelectionCell())?(J.addSeparator(),0<C.getIncomingTreeEdges(V).length&&this.addMenuItems(J,["selectSiblings","selectParent"],null,P)):0<C.model.getEdgeCount(V)&&this.addMenuItems(J,["selectConnections"],null,P)}};F.actions.addAction("selectChildren",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var J=C.getSelectionCell();J=C.getOutgoingTreeEdges(J);if(null!=J){for(var V=[],P=0;P<J.length;P++)V.push(C.model.getTerminal(J[P],
+!1));C.setSelectionCells(V)}}},null,null,"Alt+Shift+X");F.actions.addAction("selectSiblings",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var J=C.getSelectionCell();J=C.getIncomingTreeEdges(J);if(null!=J&&0<J.length&&(J=C.getOutgoingTreeEdges(C.model.getTerminal(J[0],!0)),null!=J)){for(var V=[],P=0;P<J.length;P++)V.push(C.model.getTerminal(J[P],!1));C.setSelectionCells(V)}}},null,null,"Alt+Shift+S");F.actions.addAction("selectParent",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var J=
+C.getSelectionCell();J=C.getIncomingTreeEdges(J);null!=J&&0<J.length&&C.setSelectionCell(C.model.getTerminal(J[0],!0))}},null,null,"Alt+Shift+P");F.actions.addAction("selectDescendants",function(J,V){J=C.getSelectionCell();if(C.isEnabled()&&C.model.isVertex(J)){if(null!=V&&mxEvent.isAltDown(V))C.setSelectionCells(C.model.getTreeEdges(J,null==V||!mxEvent.isShiftDown(V),null==V||!mxEvent.isControlDown(V)));else{var P=[];C.traverse(J,!0,function(R,ia){var la=null!=ia&&C.isTreeEdge(ia);la&&P.push(ia);
+null!=ia&&!la||null!=V&&mxEvent.isShiftDown(V)||P.push(R);return null==ia||la})}C.setSelectionCells(P)}},null,null,"Alt+Shift+D");var aa=C.removeCells;C.removeCells=function(J,V){V=null!=V?V:!0;null==J&&(J=this.getDeletableCells(this.getSelectionCells()));V&&(J=this.getDeletableCells(this.addAllEdges(J)));for(var P=[],R=0;R<J.length;R++){var ia=J[R];H.isEdge(ia)&&t(ia)&&(P.push(ia),ia=H.getTerminal(ia,!1));if(n(ia)){var la=[];C.traverse(ia,!0,function(ta,u){var I=null!=u&&C.isTreeEdge(u);I&&la.push(u);
+(null==u||I)&&la.push(ta);return null==u||I});0<la.length&&(P=P.concat(la),ia=C.getIncomingTreeEdges(J[R]),J=J.concat(ia))}else null!=ia&&P.push(J[R])}J=P;return aa.apply(this,arguments)};F.hoverIcons.getStateAt=function(J,V,P){return n(J.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,P))};var da=C.duplicateCells;C.duplicateCells=function(J,V){J=null!=J?J:this.getSelectionCells();for(var P=J.slice(0),R=0;R<P.length;R++){var ia=C.view.getState(P[R]);if(null!=ia&&n(ia.cell)){var la=C.getIncomingTreeEdges(ia.cell);
+for(ia=0;ia<la.length;ia++)mxUtils.remove(la[ia],J)}}this.model.beginUpdate();try{var ta=da.call(this,J,V);if(ta.length==J.length)for(R=0;R<J.length;R++)if(n(J[R])){var u=C.getIncomingTreeEdges(ta[R]);la=C.getIncomingTreeEdges(J[R]);if(0==u.length&&0<la.length){var I=this.cloneCell(la[0]);this.addEdge(I,C.getDefaultParent(),this.model.getTerminal(la[0],!0),ta[R])}}}finally{this.model.endUpdate()}return ta};var ba=C.moveCells;C.moveCells=function(J,V,P,R,ia,la,ta){var u=null;this.model.beginUpdate();
+try{var I=ia,N=this.getCurrentCellStyle(ia);if(null!=J&&n(ia)&&"1"==mxUtils.getValue(N,"treeFolding","0")){for(var W=0;W<J.length;W++)if(n(J[W])||C.model.isEdge(J[W])&&null==C.model.getTerminal(J[W],!0)){ia=C.model.getParent(J[W]);break}if(null!=I&&ia!=I&&null!=this.view.getState(J[0])){var T=C.getIncomingTreeEdges(J[0]);if(0<T.length){var Q=C.view.getState(C.model.getTerminal(T[0],!0));if(null!=Q){var Z=C.view.getState(I);null!=Z&&(V=(Z.getCenterX()-Q.getCenterX())/C.view.scale,P=(Z.getCenterY()-
+Q.getCenterY())/C.view.scale)}}}}u=ba.apply(this,arguments);if(null!=u&&null!=J&&u.length==J.length)for(W=0;W<u.length;W++)if(this.model.isEdge(u[W]))n(I)&&0>mxUtils.indexOf(u,this.model.getTerminal(u[W],!0))&&this.model.setTerminal(u[W],I,!0);else if(n(J[W])&&(T=C.getIncomingTreeEdges(J[W]),0<T.length))if(!R)n(I)&&0>mxUtils.indexOf(J,this.model.getTerminal(T[0],!0))&&this.model.setTerminal(T[0],I,!0);else if(0==C.getIncomingTreeEdges(u[W]).length){N=I;if(null==N||N==C.model.getParent(J[W]))N=C.model.getTerminal(T[0],
+!0);R=this.cloneCell(T[0]);this.addEdge(R,C.getDefaultParent(),N,u[W])}}finally{this.model.endUpdate()}return u};if(null!=F.sidebar){var Y=F.sidebar.dropAndConnect;F.sidebar.dropAndConnect=function(J,V,P,R){var ia=C.model,la=null;ia.beginUpdate();try{if(la=Y.apply(this,arguments),n(J))for(var ta=0;ta<la.length;ta++)if(ia.isEdge(la[ta])&&null==ia.getTerminal(la[ta],!0)){ia.setTerminal(la[ta],J,!0);var u=C.getCellGeometry(la[ta]);u.points=null;null!=u.getTerminalPoint(!0)&&u.setTerminalPoint(null,!0)}}finally{ia.endUpdate()}return la}}var pa=
+{88:F.actions.get("selectChildren"),84:F.actions.get("selectSubtree"),80:F.actions.get("selectParent"),83:F.actions.get("selectSiblings")},O=F.onKeyDown;F.onKeyDown=function(J){try{if(C.isEnabled()&&!C.isEditing()&&n(C.getSelectionCell())&&1==C.getSelectionCount()){var V=null;0<C.getIncomingTreeEdges(C.getSelectionCell()).length&&(9==J.which?V=mxEvent.isShiftDown(J)?g(C.getSelectionCell()):m(C.getSelectionCell()):13==J.which&&(V=f(C.getSelectionCell(),!mxEvent.isShiftDown(J))));if(null!=V&&0<V.length)1==
+V.length&&C.model.isEdge(V[0])?C.setSelectionCell(C.model.getTerminal(V[0],!1)):C.setSelectionCell(V[V.length-1]),null!=F.hoverIcons&&F.hoverIcons.update(C.view.getState(C.getSelectionCell())),C.startEditingAtCell(C.getSelectionCell()),mxEvent.consume(J);else if(mxEvent.isAltDown(J)&&mxEvent.isShiftDown(J)){var P=pa[J.keyCode];null!=P&&(P.funct(J),mxEvent.consume(J))}else 37==J.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(J)):38==J.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_NORTH),
+mxEvent.consume(J)):39==J.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(J)):40==J.keyCode&&(y(C.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(J))}}catch(R){F.handleError(R)}mxEvent.isConsumed(J)||O.apply(this,arguments)};var X=C.connectVertex;C.connectVertex=function(J,V,P,R,ia,la,ta){var u=C.getIncomingTreeEdges(J);if(n(J)){var I=d(J),N=I==mxConstants.DIRECTION_EAST||I==mxConstants.DIRECTION_WEST,W=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
+return I==V||0==u.length?m(J,V):N==W?g(J):f(J,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return X.apply(this,arguments)};C.getSubtree=function(J){var V=[J];!D(J)&&!n(J)||E(J)||C.traverse(J,!0,function(P,R){var ia=null!=R&&C.isTreeEdge(R);ia&&0>mxUtils.indexOf(V,R)&&V.push(R);(null==R||ia)&&0>mxUtils.indexOf(V,P)&&V.push(P);return null==R||ia});return V};var ea=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ea.apply(this,arguments);(D(this.state.cell)||
+n(this.state.cell))&&!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(J){this.graph.graphHandler.start(this.state.cell,
+mxEvent.getClientX(J),mxEvent.getClientY(J),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(J);this.graph.isMouseDown=!0;F.hoverIcons.reset();mxEvent.consume(J)})))};var ka=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){ka.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
+this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var ja=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(J){ja.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=J?"":"none")};var U=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(J,V){U.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==
typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var n=k.apply(this,arguments),D=this.graph;return n.concat([this.addEntry("tree container",function(){var t=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
E.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);t.insert(f);t.insert(E);t.insert(d);return sb.createVertexTemplateFromCells([t],t.geometry.width,
t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var t=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var E=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');E.vertex=!0;var d=new mxCell("Topic",
@@ -3919,18 +3919,18 @@ m.geometry.relative=!0;m.edge=!0;E.insertEdge(m,!0);g.insertEdge(m,!1);t.insert(
E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);return sb.createVertexTemplateFromCells([t,E],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree sub sections",function(){var t=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");f.geometry.setTerminalPoint(new mxPoint(110,-40),!0);f.geometry.relative=
!0;f.edge=!0;d.insertEdge(f,!1);return sb.createVertexTemplateFromCells([E,f,t,d],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(O,X){if(EditorUi.windowed){var ea=O.editor.graph;ea.popupMenuHandler.hideMenu();if(null==O.formatWindow){X="1"==urlParams.sketch?Math.max(10,O.diagramContainer.clientWidth-241):Math.max(10,O.diagramContainer.clientWidth-248);var ka="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;ea="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,ea.container.clientHeight-10);O.formatWindow=new t(O,mxResources.get("format"),X,ka,240,ea,function(U){var I=
-O.createFormat(U);I.init();O.addListener("darkModeChanged",mxUtils.bind(this,function(){I.refresh()}));return I});O.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){O.formatWindow.window.fit()}));O.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else O.formatWindow.window.setVisible(null!=X?X:!O.formatWindow.window.isVisible())}else{if(null==O.formatElt){O.formatElt=D();var ja=O.createFormat(O.formatElt);ja.init();O.formatElt.style.border="none";O.formatElt.style.width=
-"240px";O.formatElt.style.borderLeft="1px solid gray";O.formatElt.style.right="0px";O.addListener("darkModeChanged",mxUtils.bind(this,function(){ja.refresh()}))}ea=O.diagramContainer.parentNode;null!=O.formatElt.parentNode?(O.formatElt.parentNode.removeChild(O.formatElt),ea.style.right="0px"):(ea.parentNode.appendChild(O.formatElt),ea.style.right=O.formatElt.style.width)}}function e(O,X){function ea(I,V){var P=O.menus.get(I);I=U.addMenu(V,mxUtils.bind(this,function(){P.funct.apply(this,arguments)}));
-I.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";I.className="geTitle";X.appendChild(I);return I}var ka=document.createElement("div");ka.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";ka.className="geTitle";var ja=document.createElement("span");ja.style.fontSize="18px";ja.style.marginRight=
+EditorUi.initMinimalTheme=function(){function b(O,X){if(EditorUi.windowed){var ea=O.editor.graph;ea.popupMenuHandler.hideMenu();if(null==O.formatWindow){X="1"==urlParams.sketch?Math.max(10,O.diagramContainer.clientWidth-241):Math.max(10,O.diagramContainer.clientWidth-248);var ka="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;ea="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,ea.container.clientHeight-10);O.formatWindow=new t(O,mxResources.get("format"),X,ka,240,ea,function(U){var J=
+O.createFormat(U);J.init();O.addListener("darkModeChanged",mxUtils.bind(this,function(){J.refresh()}));return J});O.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){O.formatWindow.window.fit()}));O.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else O.formatWindow.window.setVisible(null!=X?X:!O.formatWindow.window.isVisible())}else{if(null==O.formatElt){O.formatElt=D();var ja=O.createFormat(O.formatElt);ja.init();O.formatElt.style.border="none";O.formatElt.style.width=
+"240px";O.formatElt.style.borderLeft="1px solid gray";O.formatElt.style.right="0px";O.addListener("darkModeChanged",mxUtils.bind(this,function(){ja.refresh()}))}ea=O.diagramContainer.parentNode;null!=O.formatElt.parentNode?(O.formatElt.parentNode.removeChild(O.formatElt),ea.style.right="0px"):(ea.parentNode.appendChild(O.formatElt),ea.style.right=O.formatElt.style.width)}}function e(O,X){function ea(J,V){var P=O.menus.get(J);J=U.addMenu(V,mxUtils.bind(this,function(){P.funct.apply(this,arguments)}));
+J.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";J.className="geTitle";X.appendChild(J);return J}var ka=document.createElement("div");ka.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";ka.className="geTitle";var ja=document.createElement("span");ja.style.fontSize="18px";ja.style.marginRight=
"5px";ja.innerHTML="+";ka.appendChild(ja);mxUtils.write(ka,mxResources.get("moreShapes"));X.appendChild(ka);mxEvent.addListener(ka,"click",function(){O.actions.get("shapes").funct()});var U=new Menubar(O,X);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?ka.style.bottom="0":null!=O.actions.get("newLibrary")?(ka=document.createElement("div"),ka.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
ka.className="geTitle",ja=document.createElement("span"),ja.style.cssText="position:relative;top:6px;",mxUtils.write(ja,mxResources.get("newLibrary")),ka.appendChild(ja),X.appendChild(ka),mxEvent.addListener(ka,"click",O.actions.get("newLibrary").funct),ka=document.createElement("div"),ka.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",ka.className="geTitle",ja=
document.createElement("span"),ja.style.cssText="position:relative;top:6px;",mxUtils.write(ja,mxResources.get("openLibrary")),ka.appendChild(ja),X.appendChild(ka),mxEvent.addListener(ka,"click",O.actions.get("openLibrary").funct)):(ka=ea("newLibrary",mxResources.get("newLibrary")),ka.style.boxSizing="border-box",ka.style.paddingRight="6px",ka.style.paddingLeft="6px",ka.style.height="32px",ka.style.left="0",ka=ea("openLibraryFrom",mxResources.get("openLibraryFrom")),ka.style.borderLeft="1px solid lightgray",
ka.style.boxSizing="border-box",ka.style.paddingRight="6px",ka.style.paddingLeft="6px",ka.style.height="32px",ka.style.left="50%");X.appendChild(O.sidebar.container);X.style.overflow="hidden"}function k(O,X){if(EditorUi.windowed){var ea=O.editor.graph;ea.popupMenuHandler.hideMenu();if(null==O.sidebarWindow){X=Math.min(ea.container.clientWidth-10,218);var ka="1"==urlParams.embedInline?650:Math.min(ea.container.clientHeight-40,650);O.sidebarWindow=new t(O,mxResources.get("shapes"),"1"==urlParams.sketch&&
"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(ea.container.clientHeight-ka)/2):56,X-6,ka-6,function(ja){e(O,ja)});O.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){O.sidebarWindow.window.fit()}));O.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);O.sidebarWindow.window.setVisible(!0);O.getLocalData("sidebar",function(ja){O.sidebar.showEntries(ja,null,!0)});O.restoreLibraries()}else O.sidebarWindow.window.setVisible(null!=
X?X:!O.sidebarWindow.window.isVisible())}else null==O.sidebarElt&&(O.sidebarElt=D(),e(O,O.sidebarElt),O.sidebarElt.style.border="none",O.sidebarElt.style.width="210px",O.sidebarElt.style.borderRight="1px solid gray"),ea=O.diagramContainer.parentNode,null!=O.sidebarElt.parentNode?(O.sidebarElt.parentNode.removeChild(O.sidebarElt),ea.style.left="0px"):(ea.parentNode.appendChild(O.sidebarElt),ea.style.left=O.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||
-"undefined"===typeof window.Menus)window.uiTheme=null;else{var n=0;try{n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(O){}var D=function(){var O=document.createElement("div");O.className="geSidebarContainer";O.style.position="absolute";O.style.width="100%";O.style.height="100%";O.style.border="1px solid whiteSmoke";O.style.overflowX="hidden";O.style.overflowY="auto";return O},t=function(O,X,ea,ka,ja,U,I){var V=D();I(V);this.window=new mxWindow(X,V,ea,ka,
-ja,U,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(P,R){var fa=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,la=this.table.firstChild.firstChild.firstChild;P=Math.max(0,Math.min(P,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-la.clientWidth-2));R=Math.max(0,Math.min(R,fa-la.clientHeight-
+"undefined"===typeof window.Menus)window.uiTheme=null;else{var n=0;try{n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(O){}var D=function(){var O=document.createElement("div");O.className="geSidebarContainer";O.style.position="absolute";O.style.width="100%";O.style.height="100%";O.style.border="1px solid whiteSmoke";O.style.overflowX="hidden";O.style.overflowY="auto";return O},t=function(O,X,ea,ka,ja,U,J){var V=D();J(V);this.window=new mxWindow(X,V,ea,ka,
+ja,U,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(P,R){var ia=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,la=this.table.firstChild.firstChild.firstChild;P=Math.max(0,Math.min(P,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-la.clientWidth-2));R=Math.max(0,Math.min(R,ia-la.clientHeight-
2));this.getX()==P&&this.getY()==R||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(P){null==P&&(P=window.event);return null!=P&&O.isSelectionAllowed(P)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=
Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
@@ -3970,80 +3970,80 @@ mxResources.get("outline")+"...";O.actions.get("layers").label=mxResources.get("
ea.setToggleAction(!0);ea.setSelectedCallback(function(){return Editor.sketchMode});ea=O.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(R){O.setPagesVisible(!Editor.pagesVisible)}));ea.setToggleAction(!0);ea.setSelectedCallback(function(){return Editor.pagesVisible});O.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){X.popupMenuHandler.hideMenu();O.showImportCsvDialog()}));O.actions.put("importText",new Action(mxResources.get("text")+"...",
function(){var R=new ParseDialog(O,"Insert from Text");O.showDialog(R.container,620,420,!0,!1);R.init()}));O.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var R=new ParseDialog(O,"Insert from Text","formatSql");O.showDialog(R.container,620,420,!0,!1);R.init()}));O.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){k(O)},null,null,Editor.ctrlKey+"+Shift+K"));O.actions.put("toggleFormat",new Action(mxResources.get("format")+
"...",function(){b(O)})).shortcut=O.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!O.isOffline()&&O.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var R=new ParseDialog(O,mxResources.get("plantUml")+"...","plantUml");O.showDialog(R.container,620,420,!0,!1);R.init()}));O.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var R=new ParseDialog(O,mxResources.get("mermaid")+"...","mermaid");O.showDialog(R.container,620,420,!0,!1);
-R.init()}));var ka=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(R,fa){var la=this.editorUi.editor.graph,sa=la.getSelectionCell();ka.call(this,R,sa,null,fa);this.addMenuItems(R,["editTooltip"],fa);la.model.isVertex(sa)&&this.addMenuItems(R,["editGeometry"],fa);this.addMenuItems(R,["-","edit"],fa)})));this.addPopupMenuCellEditItems=function(R,fa,la,sa){R.addSeparator();this.addSubmenu("editCell",R,sa,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,
-function(R,fa){var la=O.getCurrentFile();O.menus.addMenuItems(R,["new"],fa);O.menus.addSubmenu("openFrom",R,fa);isLocalStorage&&this.addSubmenu("openRecent",R,fa);R.addSeparator(fa);null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(R,["save","rename","makeCopy","moveToFolder"],fa):(O.menus.addMenuItems(R,["save","saveAs","-","rename"],fa),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(R,["upload"],fa):O.menus.addMenuItems(R,["makeCopy"],
-fa));R.addSeparator(fa);null!=la&&(la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["revisionHistory"],fa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile&&null==la.fileHandle||O.menus.addMenuItems(R,["synchronize"],fa));O.menus.addMenuItems(R,["autosave"],fa);if(null!=la&&(R.addSeparator(fa),la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],fa),null!=O.fileNode&&"1"!=urlParams.embedInline)){var sa=null!=la.getTitle()?la.getTitle():O.defaultFilename;(la.constructor==
-DriveFile&&null!=la.sync&&la.sync.isConnected()||!/(\.html)$/i.test(sa)&&!/(\.svg)$/i.test(sa))&&this.addMenuItems(R,["-","properties"],fa)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(R,fa){var la=O.getCurrentFile();O.menus.addSubmenu("extras",R,fa,mxResources.get("preferences"));R.addSeparator(fa);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)O.menus.addMenuItems(R,"new open - synchronize - save saveAs -".split(" "),fa);else if("1"==urlParams.embed||O.mode==App.MODE_ATLAS){"1"!=
-urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&O.menus.addMenuItems(R,["-","save"],fa);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||O.mode==App.MODE_ATLAS)O.menus.addMenuItems(R,["saveAndExit"],fa),null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["revisionHistory"],fa);R.addSeparator(fa)}else O.mode==App.MODE_ATLAS?O.menus.addMenuItems(R,["save","synchronize","-"],fa):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(O.menus.addMenuItems(R,
-["new"],fa),O.menus.addSubmenu("openFrom",R,fa),isLocalStorage&&this.addSubmenu("openRecent",R,fa),R.addSeparator(fa),null!=la&&(la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],fa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile||O.menus.addMenuItems(R,["synchronize"],fa)),R.addSeparator(fa),O.menus.addSubmenu("save",R,fa)):O.menus.addSubmenu("file",R,fa));O.menus.addSubmenu("exportAs",R,fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?O.menus.addMenuItems(R,
-["import"],fa):"1"!=urlParams.noFileMenu&&O.menus.addSubmenu("importFrom",R,fa);O.commentsSupported()&&O.menus.addMenuItems(R,["-","comments"],fa);O.menus.addMenuItems(R,"- findReplace outline layers tags - pageSetup".split(" "),fa);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||O.menus.addMenuItems(R,["print"],fa);"1"!=urlParams.sketch&&null!=la&&null!=O.fileNode&&"1"!=urlParams.embedInline&&(la=null!=la.getTitle()?la.getTitle():O.defaultFilename,/(\.html)$/i.test(la)||/(\.svg)$/i.test(la)||
-this.addMenuItems(R,["-","properties"]));R.addSeparator(fa);O.menus.addSubmenu("help",R,fa);"1"==urlParams.embed||O.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||O.mode==App.MODE_ATLAS)&&O.menus.addMenuItems(R,["-","exit"],fa):"1"!=urlParams.noFileMenu&&O.menus.addMenuItems(R,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(R,fa){var la=O.getCurrentFile();null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(R,["save","makeCopy","-","rename","moveToFolder"],fa):(O.menus.addMenuItems(R,
-["save","saveAs","-","rename"],fa),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(R,["upload"],fa):O.menus.addMenuItems(R,["makeCopy"],fa));O.menus.addMenuItems(R,["-","autosave"],fa);null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["-","revisionHistory"],fa)})));var ja=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(R,fa){ja.funct(R,fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||O.menus.addMenuItems(R,
-["publishLink"],fa);O.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(R.addSeparator(fa),O.menus.addSubmenu("embed",R,fa))})));var U=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(R,fa){O.menus.addInsertTableCellItem(R,fa)})));if("1"==urlParams.sketch){var I=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(R,fa){I.funct(R,fa);this.addMenuItems(R,["-","pageScale","-","ruler"],fa)})))}this.put("extras",new Menu(mxUtils.bind(this,function(R,fa){null!=U&&
-O.menus.addSubmenu("language",R,fa);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&O.mode!=App.MODE_ATLAS&&O.menus.addSubmenu("theme",R,fa);O.menus.addSubmenu("units",R,fa);R.addSeparator(fa);"1"!=urlParams.sketch&&O.menus.addMenuItems(R,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),fa);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItems(R,["-","showStartScreen",
-"search","scratchpad"],fa);R.addSeparator(fa);"1"==urlParams.sketch?O.menus.addMenuItems(R,"configuration - copyConnect collapseExpand tooltips -".split(" "),fa):(O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"configuration",fa),!O.isOfflineApp()&&isLocalStorage&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"plugins",fa));var la=O.getCurrentFile();null!=la&&la.isRealtimeEnabled()&&la.isRealtimeSupported()&&this.addMenuItems(R,["-","showRemoteCursors","shareCursor","-"],fa);R.addSeparator(fa);O.mode!=
-App.MODE_ATLAS&&this.addMenuItems(R,["fullscreen"],fa);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(R,["toggleDarkMode"],fa);R.addSeparator(fa)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(R,fa){O.menus.addMenuItems(R,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),fa)})));mxUtils.bind(this,function(){var R=this.get("insert"),fa=R.funct;R.funct=function(la,sa){"1"==urlParams.sketch?
-(O.insertTemplateEnabled&&!O.isOffline()&&O.menus.addMenuItems(la,["insertTemplate"],sa),O.menus.addMenuItems(la,["insertImage","insertLink","-"],sa),O.menus.addSubmenu("insertAdvanced",la,sa,mxResources.get("advanced")),O.menus.addSubmenu("layout",la,sa)):(fa.apply(this,arguments),O.menus.addSubmenu("table",la,sa))}})();var V="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),P=function(R,fa,la,sa){R.addItem(la,null,mxUtils.bind(this,function(){var u=
-new CreateGraphDialog(O,la,sa);O.showDialog(u.container,620,420,!0,!1);u.init()}),fa)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(R,fa){for(var la=0;la<V.length;la++)"-"==V[la]?R.addSeparator(fa):P(R,fa,mxResources.get(V[la])+"...",V[la])})))};EditorUi.prototype.installFormatToolbar=function(O){var X=this.editor.graph,ea=document.createElement("div");ea.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
+R.init()}));var ka=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(R,ia){var la=this.editorUi.editor.graph,ta=la.getSelectionCell();ka.call(this,R,ta,null,ia);this.addMenuItems(R,["editTooltip"],ia);la.model.isVertex(ta)&&this.addMenuItems(R,["editGeometry"],ia);this.addMenuItems(R,["-","edit"],ia)})));this.addPopupMenuCellEditItems=function(R,ia,la,ta){R.addSeparator();this.addSubmenu("editCell",R,ta,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,
+function(R,ia){var la=O.getCurrentFile();O.menus.addMenuItems(R,["new"],ia);O.menus.addSubmenu("openFrom",R,ia);isLocalStorage&&this.addSubmenu("openRecent",R,ia);R.addSeparator(ia);null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(R,["save","rename","makeCopy","moveToFolder"],ia):(O.menus.addMenuItems(R,["save","saveAs","-","rename"],ia),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(R,["upload"],ia):O.menus.addMenuItems(R,["makeCopy"],
+ia));R.addSeparator(ia);null!=la&&(la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["revisionHistory"],ia),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile&&null==la.fileHandle||O.menus.addMenuItems(R,["synchronize"],ia));O.menus.addMenuItems(R,["autosave"],ia);if(null!=la&&(R.addSeparator(ia),la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],ia),null!=O.fileNode&&"1"!=urlParams.embedInline)){var ta=null!=la.getTitle()?la.getTitle():O.defaultFilename;(la.constructor==
+DriveFile&&null!=la.sync&&la.sync.isConnected()||!/(\.html)$/i.test(ta)&&!/(\.svg)$/i.test(ta))&&this.addMenuItems(R,["-","properties"],ia)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(R,ia){var la=O.getCurrentFile();O.menus.addSubmenu("extras",R,ia,mxResources.get("preferences"));R.addSeparator(ia);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)O.menus.addMenuItems(R,"new open - synchronize - save saveAs -".split(" "),ia);else if("1"==urlParams.embed||O.mode==App.MODE_ATLAS){"1"!=
+urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&O.menus.addMenuItems(R,["-","save"],ia);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||O.mode==App.MODE_ATLAS)O.menus.addMenuItems(R,["saveAndExit"],ia),null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["revisionHistory"],ia);R.addSeparator(ia)}else O.mode==App.MODE_ATLAS?O.menus.addMenuItems(R,["save","synchronize","-"],ia):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(O.menus.addMenuItems(R,
+["new"],ia),O.menus.addSubmenu("openFrom",R,ia),isLocalStorage&&this.addSubmenu("openRecent",R,ia),R.addSeparator(ia),null!=la&&(la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],ia),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile||O.menus.addMenuItems(R,["synchronize"],ia)),R.addSeparator(ia),O.menus.addSubmenu("save",R,ia)):O.menus.addSubmenu("file",R,ia));O.menus.addSubmenu("exportAs",R,ia);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?O.menus.addMenuItems(R,
+["import"],ia):"1"!=urlParams.noFileMenu&&O.menus.addSubmenu("importFrom",R,ia);O.commentsSupported()&&O.menus.addMenuItems(R,["-","comments"],ia);O.menus.addMenuItems(R,"- findReplace outline layers tags - pageSetup".split(" "),ia);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||O.menus.addMenuItems(R,["print"],ia);"1"!=urlParams.sketch&&null!=la&&null!=O.fileNode&&"1"!=urlParams.embedInline&&(la=null!=la.getTitle()?la.getTitle():O.defaultFilename,/(\.html)$/i.test(la)||/(\.svg)$/i.test(la)||
+this.addMenuItems(R,["-","properties"]));R.addSeparator(ia);O.menus.addSubmenu("help",R,ia);"1"==urlParams.embed||O.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||O.mode==App.MODE_ATLAS)&&O.menus.addMenuItems(R,["-","exit"],ia):"1"!=urlParams.noFileMenu&&O.menus.addMenuItems(R,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(R,ia){var la=O.getCurrentFile();null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(R,["save","makeCopy","-","rename","moveToFolder"],ia):(O.menus.addMenuItems(R,
+["save","saveAs","-","rename"],ia),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(R,["upload"],ia):O.menus.addMenuItems(R,["makeCopy"],ia));O.menus.addMenuItems(R,["-","autosave"],ia);null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["-","revisionHistory"],ia)})));var ja=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(R,ia){ja.funct(R,ia);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||O.menus.addMenuItems(R,
+["publishLink"],ia);O.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(R.addSeparator(ia),O.menus.addSubmenu("embed",R,ia))})));var U=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(R,ia){O.menus.addInsertTableCellItem(R,ia)})));if("1"==urlParams.sketch){var J=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(R,ia){J.funct(R,ia);this.addMenuItems(R,["-","pageScale","-","ruler"],ia)})))}this.put("extras",new Menu(mxUtils.bind(this,function(R,ia){null!=U&&
+O.menus.addSubmenu("language",R,ia);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&O.mode!=App.MODE_ATLAS&&O.menus.addSubmenu("theme",R,ia);O.menus.addSubmenu("units",R,ia);R.addSeparator(ia);"1"!=urlParams.sketch&&O.menus.addMenuItems(R,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),ia);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItems(R,["-","showStartScreen",
+"search","scratchpad"],ia);R.addSeparator(ia);"1"==urlParams.sketch?O.menus.addMenuItems(R,"configuration - copyConnect collapseExpand tooltips -".split(" "),ia):(O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"configuration",ia),!O.isOfflineApp()&&isLocalStorage&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"plugins",ia));var la=O.getCurrentFile();null!=la&&la.isRealtimeEnabled()&&la.isRealtimeSupported()&&this.addMenuItems(R,["-","showRemoteCursors","shareCursor","-"],ia);R.addSeparator(ia);O.mode!=
+App.MODE_ATLAS&&this.addMenuItems(R,["fullscreen"],ia);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(R,["toggleDarkMode"],ia);R.addSeparator(ia)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(R,ia){O.menus.addMenuItems(R,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),ia)})));mxUtils.bind(this,function(){var R=this.get("insert"),ia=R.funct;R.funct=function(la,ta){"1"==urlParams.sketch?
+(O.insertTemplateEnabled&&!O.isOffline()&&O.menus.addMenuItems(la,["insertTemplate"],ta),O.menus.addMenuItems(la,["insertImage","insertLink","-"],ta),O.menus.addSubmenu("insertAdvanced",la,ta,mxResources.get("advanced")),O.menus.addSubmenu("layout",la,ta)):(ia.apply(this,arguments),O.menus.addSubmenu("table",la,ta))}})();var V="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),P=function(R,ia,la,ta){R.addItem(la,null,mxUtils.bind(this,function(){var u=
+new CreateGraphDialog(O,la,ta);O.showDialog(u.container,620,420,!0,!1);u.init()}),ia)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(R,ia){for(var la=0;la<V.length;la++)"-"==V[la]?R.addSeparator(ia):P(R,ia,mxResources.get(V[la])+"...",V[la])})))};EditorUi.prototype.installFormatToolbar=function(O){var X=this.editor.graph,ea=document.createElement("div");ea.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
X.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(ka,ja){0<X.getSelectionCount()?(O.appendChild(ea),ea.innerHTML="Selected: "+X.getSelectionCount()):null!=ea.parentNode&&ea.parentNode.removeChild(ea)}))};var Y=!1;EditorUi.prototype.initFormatWindow=function(){if(!Y&&null!=this.formatWindow){Y=!0;this.formatWindow.window.setClosable(!1);var O=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){O.apply(this,arguments);this.minimized?
(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(X){mxEvent.getSource(X)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var pa=EditorUi.prototype.init;EditorUi.prototype.init=
-function(){function O(ua,za,Ka){var Ga=U.menus.get(ua),Ma=R.addMenu(mxResources.get(ua),mxUtils.bind(this,function(){Ga.funct.apply(this,arguments)}),P);Ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ma.style.display="inline-block";Ma.style.boxSizing="border-box";Ma.style.top="6px";Ma.style.marginRight="6px";Ma.style.height="30px";Ma.style.paddingTop="6px";Ma.style.paddingBottom="6px";Ma.style.cursor="pointer";Ma.setAttribute("title",mxResources.get(ua));U.menus.menuCreated(Ga,
-Ma,"geMenuItem");null!=Ka?(Ma.style.backgroundImage="url("+Ka+")",Ma.style.backgroundPosition="center center",Ma.style.backgroundRepeat="no-repeat",Ma.style.backgroundSize="24px 24px",Ma.style.width="34px",Ma.innerHTML=""):za||(Ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ma.style.backgroundPosition="right 6px center",Ma.style.backgroundRepeat="no-repeat",Ma.style.paddingRight="22px");return Ma}function X(ua,za,Ka,Ga,Ma,db){var Ra=document.createElement("a");Ra.className=
-"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ra.style.display="inline-block";Ra.style.boxSizing="border-box";Ra.style.height="30px";Ra.style.padding="6px";Ra.style.position="relative";Ra.style.verticalAlign="top";Ra.style.top="0px";"1"==urlParams.sketch&&(Ra.style.borderStyle="none",Ra.style.boxShadow="none",Ra.style.padding="6px",Ra.style.margin="0px");null!=U.statusContainer?V.insertBefore(Ra,U.statusContainer):V.appendChild(Ra);null!=db?(Ra.style.backgroundImage="url("+db+")",Ra.style.backgroundPosition=
-"center center",Ra.style.backgroundRepeat="no-repeat",Ra.style.backgroundSize="24px 24px",Ra.style.width="34px"):mxUtils.write(Ra,ua);mxEvent.addListener(Ra,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(ib){ib.preventDefault()}));mxEvent.addListener(Ra,"click",function(ib){"disabled"!=Ra.getAttribute("disabled")&&za(ib);mxEvent.consume(ib)});null==Ka&&(Ra.style.marginRight="4px");null!=Ga&&Ra.setAttribute("title",Ga);null!=Ma&&(ua=function(){Ma.isEnabled()?(Ra.removeAttribute("disabled"),
-Ra.style.cursor="pointer"):(Ra.setAttribute("disabled","disabled"),Ra.style.cursor="default")},Ma.addListener("stateChanged",ua),I.addListener("enabledChanged",ua),ua());return Ra}function ea(ua,za,Ka){Ka=document.createElement("div");Ka.className="geMenuItem";Ka.style.display="inline-block";Ka.style.verticalAlign="top";Ka.style.marginRight="6px";Ka.style.padding="0 4px 0 4px";Ka.style.height="30px";Ka.style.position="relative";Ka.style.top="0px";"1"==urlParams.sketch&&(Ka.style.boxShadow="none");
-for(var Ga=0;Ga<ua.length;Ga++)null!=ua[Ga]&&("1"==urlParams.sketch&&(ua[Ga].style.padding="10px 8px",ua[Ga].style.width="30px"),ua[Ga].style.margin="0px",ua[Ga].style.boxShadow="none",Ka.appendChild(ua[Ga]));null!=za&&mxUtils.setOpacity(Ka,za);null!=U.statusContainer&&"1"!=urlParams.sketch?V.insertBefore(Ka,U.statusContainer):V.appendChild(Ka);return Ka}function ka(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(T.style.left=58>W.offsetTop-W.offsetHeight/2?"70px":"10px");else{for(var ua=
-V.firstChild;null!=ua;){var za=ua.nextSibling;"geMenuItem"!=ua.className&&"geItem"!=ua.className||ua.parentNode.removeChild(ua);ua=za}P=V.firstChild;n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ua=1E3>n||"1"==urlParams.sketch;var Ka=null;ua||(Ka=O("diagram"));za=ua?O("diagram",null,Editor.drawLogoImage):null;null!=za&&(Ka=za);ea([Ka,X(mxResources.get("shapes"),U.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),U.actions.get("image"),ua?Editor.shapesImage:
-null),X(mxResources.get("format"),U.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+U.actions.get("formatPanel").shortcut+")",U.actions.get("image"),ua?Editor.formatImage:null)],ua?60:null);za=O("insert",!0,ua?J:null);ea([za,X(mxResources.get("delete"),U.actions.get("delete").funct,null,mxResources.get("delete"),U.actions.get("delete"),ua?Editor.trashImage:null)],ua?60:null);411<=n&&(ea([z,L],60),520<=n&&ea([ya,640<=n?X("",Va.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+
-" +)",Va,Editor.zoomInImage):null,640<=n?X("",Ja.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Ja,Editor.zoomOutImage):null],60))}null!=Ka&&(mxEvent.disableContextMenu(Ka),mxEvent.addGestureListeners(Ka,mxUtils.bind(this,function(Ga){(mxEvent.isShiftDown(Ga)||mxEvent.isAltDown(Ga)||mxEvent.isMetaDown(Ga)||mxEvent.isControlDown(Ga)||mxEvent.isPopupTrigger(Ga))&&U.appIconClicked(Ga)}),null,null));za=U.menus.get("language");null!=za&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
-n&&"1"!=urlParams.sketch?(null==Na&&(za=R.addMenu("",za.funct),za.setAttribute("title",mxResources.get("language")),za.className="geToolbarButton",za.style.backgroundImage="url("+Editor.globeImage+")",za.style.backgroundPosition="center center",za.style.backgroundRepeat="no-repeat",za.style.backgroundSize="24px 24px",za.style.position="absolute",za.style.height="24px",za.style.width="24px",za.style.zIndex="1",za.style.right="8px",za.style.cursor="pointer",za.style.top="1"==urlParams.embed?"12px":
-"11px",V.appendChild(za),Na=za),U.buttonContainer.style.paddingRight="34px"):(U.buttonContainer.style.paddingRight="4px",null!=Na&&(Na.parentNode.removeChild(Na),Na=null))}pa.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);var ja=document.createElement("div");ja.style.cssText=
+function(){function O(ua,ya,Na){var Fa=U.menus.get(ua),Ra=R.addMenu(mxResources.get(ua),mxUtils.bind(this,function(){Fa.funct.apply(this,arguments)}),P);Ra.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ra.style.display="inline-block";Ra.style.boxSizing="border-box";Ra.style.top="6px";Ra.style.marginRight="6px";Ra.style.height="30px";Ra.style.paddingTop="6px";Ra.style.paddingBottom="6px";Ra.style.cursor="pointer";Ra.setAttribute("title",mxResources.get(ua));U.menus.menuCreated(Fa,
+Ra,"geMenuItem");null!=Na?(Ra.style.backgroundImage="url("+Na+")",Ra.style.backgroundPosition="center center",Ra.style.backgroundRepeat="no-repeat",Ra.style.backgroundSize="24px 24px",Ra.style.width="34px",Ra.innerHTML=""):ya||(Ra.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ra.style.backgroundPosition="right 6px center",Ra.style.backgroundRepeat="no-repeat",Ra.style.paddingRight="22px");return Ra}function X(ua,ya,Na,Fa,Ra,db){var Va=document.createElement("a");Va.className=
+"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Va.style.display="inline-block";Va.style.boxSizing="border-box";Va.style.height="30px";Va.style.padding="6px";Va.style.position="relative";Va.style.verticalAlign="top";Va.style.top="0px";"1"==urlParams.sketch&&(Va.style.borderStyle="none",Va.style.boxShadow="none",Va.style.padding="6px",Va.style.margin="0px");null!=U.statusContainer?V.insertBefore(Va,U.statusContainer):V.appendChild(Va);null!=db?(Va.style.backgroundImage="url("+db+")",Va.style.backgroundPosition=
+"center center",Va.style.backgroundRepeat="no-repeat",Va.style.backgroundSize="24px 24px",Va.style.width="34px"):mxUtils.write(Va,ua);mxEvent.addListener(Va,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fb){fb.preventDefault()}));mxEvent.addListener(Va,"click",function(fb){"disabled"!=Va.getAttribute("disabled")&&ya(fb);mxEvent.consume(fb)});null==Na&&(Va.style.marginRight="4px");null!=Fa&&Va.setAttribute("title",Fa);null!=Ra&&(ua=function(){Ra.isEnabled()?(Va.removeAttribute("disabled"),
+Va.style.cursor="pointer"):(Va.setAttribute("disabled","disabled"),Va.style.cursor="default")},Ra.addListener("stateChanged",ua),J.addListener("enabledChanged",ua),ua());return Va}function ea(ua,ya,Na){Na=document.createElement("div");Na.className="geMenuItem";Na.style.display="inline-block";Na.style.verticalAlign="top";Na.style.marginRight="6px";Na.style.padding="0 4px 0 4px";Na.style.height="30px";Na.style.position="relative";Na.style.top="0px";"1"==urlParams.sketch&&(Na.style.boxShadow="none");
+for(var Fa=0;Fa<ua.length;Fa++)null!=ua[Fa]&&("1"==urlParams.sketch&&(ua[Fa].style.padding="10px 8px",ua[Fa].style.width="30px"),ua[Fa].style.margin="0px",ua[Fa].style.boxShadow="none",Na.appendChild(ua[Fa]));null!=ya&&mxUtils.setOpacity(Na,ya);null!=U.statusContainer&&"1"!=urlParams.sketch?V.insertBefore(Na,U.statusContainer):V.appendChild(Na);return Na}function ka(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(T.style.left=58>W.offsetTop-W.offsetHeight/2?"70px":"10px");else{for(var ua=
+V.firstChild;null!=ua;){var ya=ua.nextSibling;"geMenuItem"!=ua.className&&"geItem"!=ua.className||ua.parentNode.removeChild(ua);ua=ya}P=V.firstChild;n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ua=1E3>n||"1"==urlParams.sketch;var Na=null;ua||(Na=O("diagram"));ya=ua?O("diagram",null,Editor.drawLogoImage):null;null!=ya&&(Na=ya);ea([Na,X(mxResources.get("shapes"),U.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),U.actions.get("image"),ua?Editor.shapesImage:
+null),X(mxResources.get("format"),U.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+U.actions.get("formatPanel").shortcut+")",U.actions.get("image"),ua?Editor.formatImage:null)],ua?60:null);ya=O("insert",!0,ua?I:null);ea([ya,X(mxResources.get("delete"),U.actions.get("delete").funct,null,mxResources.get("delete"),U.actions.get("delete"),ua?Editor.trashImage:null)],ua?60:null);411<=n&&(ea([z,L],60),520<=n&&ea([xa,640<=n?X("",Za.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+
+" +)",Za,Editor.zoomInImage):null,640<=n?X("",cb.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",cb,Editor.zoomOutImage):null],60))}null!=Na&&(mxEvent.disableContextMenu(Na),mxEvent.addGestureListeners(Na,mxUtils.bind(this,function(Fa){(mxEvent.isShiftDown(Fa)||mxEvent.isAltDown(Fa)||mxEvent.isMetaDown(Fa)||mxEvent.isControlDown(Fa)||mxEvent.isPopupTrigger(Fa))&&U.appIconClicked(Fa)}),null,null));ya=U.menus.get("language");null!=ya&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
+n&&"1"!=urlParams.sketch?(null==La&&(ya=R.addMenu("",ya.funct),ya.setAttribute("title",mxResources.get("language")),ya.className="geToolbarButton",ya.style.backgroundImage="url("+Editor.globeImage+")",ya.style.backgroundPosition="center center",ya.style.backgroundRepeat="no-repeat",ya.style.backgroundSize="24px 24px",ya.style.position="absolute",ya.style.height="24px",ya.style.width="24px",ya.style.zIndex="1",ya.style.right="8px",ya.style.cursor="pointer",ya.style.top="1"==urlParams.embed?"12px":
+"11px",V.appendChild(ya),La=ya),U.buttonContainer.style.paddingRight="34px"):(U.buttonContainer.style.paddingRight="4px",null!=La&&(La.parentNode.removeChild(La),La=null))}pa.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);var ja=document.createElement("div");ja.style.cssText=
"position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";ja.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(ja);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=
-urlParams.sketch&&1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var U=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==U.embedViewport)mxUtils.fit(this.div);else{var ua=parseInt(this.div.offsetLeft),za=parseInt(this.div.offsetWidth),Ka=U.embedViewport.x+
-U.embedViewport.width,Ga=parseInt(this.div.offsetTop),Ma=parseInt(this.div.offsetHeight),db=U.embedViewport.y+U.embedViewport.height;this.div.style.left=Math.max(U.embedViewport.x,Math.min(ua,Ka-za))+"px";this.div.style.top=Math.max(U.embedViewport.y,Math.min(Ga,db-Ma))+"px";this.div.style.height=Math.min(U.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(U.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",
-!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),ja=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>n||708>ja)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));U=this;var I=U.editor.graph;U.toolbar=this.createToolbar(U.createDiv("geToolbar"));U.defaultLibraryName=
-mxResources.get("untitledLibrary");var V=document.createElement("div");V.className="geMenubarContainer";var P=null,R=new Menubar(U,V);U.statusContainer=U.createStatusContainer();U.statusContainer.style.position="relative";U.statusContainer.style.maxWidth="";U.statusContainer.style.marginTop="7px";U.statusContainer.style.marginLeft="6px";U.statusContainer.style.color="gray";U.statusContainer.style.cursor="default";var fa=U.hideCurrentMenu;U.hideCurrentMenu=function(){fa.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};
-var la=U.descriptorChanged;U.descriptorChanged=function(){la.apply(this,arguments);var ua=U.getCurrentFile();if(null!=ua&&null!=ua.getTitle()){var za=ua.getMode();"google"==za?za="googleDrive":"github"==za?za="gitHub":"gitlab"==za?za="gitLab":"onedrive"==za&&(za="oneDrive");za=mxResources.get(za);V.setAttribute("title",ua.getTitle()+(null!=za?" ("+za+")":""))}else V.removeAttribute("title")};U.setStatusText(U.editor.getStatus());V.appendChild(U.statusContainer);U.buttonContainer=document.createElement("div");
-U.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";V.appendChild(U.buttonContainer);U.menubarContainer=U.buttonContainer;U.tabContainer=document.createElement("div");U.tabContainer.className="geTabContainer";U.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";ja=U.diagramContainer.parentNode;var sa=document.createElement("div");
-sa.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";U.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){sa.style.top="20px";U.titlebar=document.createElement("div");U.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var u=document.createElement("div");u.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";
-U.titlebar.appendChild(u);ja.appendChild(U.titlebar)}u=U.menus.get("viewZoom");var J="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,N="1"==urlParams.sketch?document.createElement("div"):null,W="1"==urlParams.sketch?document.createElement("div"):null,T="1"==urlParams.sketch?document.createElement("div"):null,Q=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();I.refresh();I.view.validateBackground()});U.addListener("darkModeChanged",Q);U.addListener("sketchModeChanged",
+urlParams.sketch&&1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var U=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==U.embedViewport)mxUtils.fit(this.div);else{var ua=parseInt(this.div.offsetLeft),ya=parseInt(this.div.offsetWidth),Na=U.embedViewport.x+
+U.embedViewport.width,Fa=parseInt(this.div.offsetTop),Ra=parseInt(this.div.offsetHeight),db=U.embedViewport.y+U.embedViewport.height;this.div.style.left=Math.max(U.embedViewport.x,Math.min(ua,Na-ya))+"px";this.div.style.top=Math.max(U.embedViewport.y,Math.min(Fa,db-Ra))+"px";this.div.style.height=Math.min(U.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(U.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",
+!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),ja=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>n||708>ja)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));U=this;var J=U.editor.graph;U.toolbar=this.createToolbar(U.createDiv("geToolbar"));U.defaultLibraryName=
+mxResources.get("untitledLibrary");var V=document.createElement("div");V.className="geMenubarContainer";var P=null,R=new Menubar(U,V);U.statusContainer=U.createStatusContainer();U.statusContainer.style.position="relative";U.statusContainer.style.maxWidth="";U.statusContainer.style.marginTop="7px";U.statusContainer.style.marginLeft="6px";U.statusContainer.style.color="gray";U.statusContainer.style.cursor="default";var ia=U.hideCurrentMenu;U.hideCurrentMenu=function(){ia.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};
+var la=U.descriptorChanged;U.descriptorChanged=function(){la.apply(this,arguments);var ua=U.getCurrentFile();if(null!=ua&&null!=ua.getTitle()){var ya=ua.getMode();"google"==ya?ya="googleDrive":"github"==ya?ya="gitHub":"gitlab"==ya?ya="gitLab":"onedrive"==ya&&(ya="oneDrive");ya=mxResources.get(ya);V.setAttribute("title",ua.getTitle()+(null!=ya?" ("+ya+")":""))}else V.removeAttribute("title")};U.setStatusText(U.editor.getStatus());V.appendChild(U.statusContainer);U.buttonContainer=document.createElement("div");
+U.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";V.appendChild(U.buttonContainer);U.menubarContainer=U.buttonContainer;U.tabContainer=document.createElement("div");U.tabContainer.className="geTabContainer";U.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";ja=U.diagramContainer.parentNode;var ta=document.createElement("div");
+ta.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";U.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){ta.style.top="20px";U.titlebar=document.createElement("div");U.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var u=document.createElement("div");u.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";
+U.titlebar.appendChild(u);ja.appendChild(U.titlebar)}u=U.menus.get("viewZoom");var I="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,N="1"==urlParams.sketch?document.createElement("div"):null,W="1"==urlParams.sketch?document.createElement("div"):null,T="1"==urlParams.sketch?document.createElement("div"):null,Q=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();J.refresh();J.view.validateBackground()});U.addListener("darkModeChanged",Q);U.addListener("sketchModeChanged",
Q);var Z=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)T.style.left="10px",T.style.top="10px",W.style.left="10px",W.style.top="60px",N.style.top="10px",N.style.right="12px",N.style.left="",U.diagramContainer.setAttribute("data-bounds",U.diagramContainer.style.top+" "+U.diagramContainer.style.left+" "+U.diagramContainer.style.width+" "+U.diagramContainer.style.height),U.diagramContainer.style.top="0px",U.diagramContainer.style.left="0px",U.diagramContainer.style.bottom="0px",U.diagramContainer.style.right=
-"0px",U.diagramContainer.style.width="",U.diagramContainer.style.height="";else{var ua=U.diagramContainer.getAttribute("data-bounds");if(null!=ua){U.diagramContainer.style.background="transparent";U.diagramContainer.removeAttribute("data-bounds");var za=I.getGraphBounds();ua=ua.split(" ");U.diagramContainer.style.top=ua[0];U.diagramContainer.style.left=ua[1];U.diagramContainer.style.width=za.width+50+"px";U.diagramContainer.style.height=za.height+46+"px";U.diagramContainer.style.bottom="";U.diagramContainer.style.right=
+"0px",U.diagramContainer.style.width="",U.diagramContainer.style.height="";else{var ua=U.diagramContainer.getAttribute("data-bounds");if(null!=ua){U.diagramContainer.style.background="transparent";U.diagramContainer.removeAttribute("data-bounds");var ya=J.getGraphBounds();ua=ua.split(" ");U.diagramContainer.style.top=ua[0];U.diagramContainer.style.left=ua[1];U.diagramContainer.style.width=ya.width+50+"px";U.diagramContainer.style.height=ya.height+46+"px";U.diagramContainer.style.bottom="";U.diagramContainer.style.right=
"";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:U.diagramContainer.getBoundingClientRect()}),"*");U.refresh()}T.style.left=U.diagramContainer.offsetLeft+"px";T.style.top=U.diagramContainer.offsetTop-T.offsetHeight-4+"px";W.style.display="";W.style.left=U.diagramContainer.offsetLeft-W.offsetWidth-4+"px";W.style.top=U.diagramContainer.offsetTop+"px";N.style.left=U.diagramContainer.offsetLeft+U.diagramContainer.offsetWidth-N.offsetWidth+"px";N.style.top=T.style.top;
N.style.right="";U.bottomResizer.style.left=U.diagramContainer.offsetLeft+(U.diagramContainer.offsetWidth-U.bottomResizer.offsetWidth)/2+"px";U.bottomResizer.style.top=U.diagramContainer.offsetTop+U.diagramContainer.offsetHeight-U.bottomResizer.offsetHeight/2-1+"px";U.rightResizer.style.left=U.diagramContainer.offsetLeft+U.diagramContainer.offsetWidth-U.rightResizer.offsetWidth/2-1+"px";U.rightResizer.style.top=U.diagramContainer.offsetTop+(U.diagramContainer.offsetHeight-U.bottomResizer.offsetHeight)/
-2+"px"}U.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";U.rightResizer.style.visibility=U.bottomResizer.style.visibility;V.style.display="none";T.style.visibility="";N.style.visibility=""}),oa=mxUtils.bind(this,function(){M.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";Z()});Q=mxUtils.bind(this,
-function(){oa();b(U,!0);U.initFormatWindow();var ua=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ua.x+ua.width+4,ua.y)});U.addListener("inlineFullscreenChanged",oa);U.addListener("editInlineStart",Q);"1"==urlParams.embedInline&&U.addListener("darkModeChanged",Q);U.addListener("editInlineStop",mxUtils.bind(this,function(ua){U.diagramContainer.style.width="10px";U.diagramContainer.style.height="10px";U.diagramContainer.style.border="";U.bottomResizer.style.visibility=
-"hidden";U.rightResizer.style.visibility="hidden";T.style.visibility="hidden";N.style.visibility="hidden";W.style.display="none"}));if(null!=U.hoverIcons){var wa=U.hoverIcons.update;U.hoverIcons.update=function(){I.freehand.isDrawing()||wa.apply(this,arguments)}}if(null!=I.freehand){var Aa=I.freehand.createStyle;I.freehand.createStyle=function(ua){return Aa.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){W.className="geToolbarContainer";N.className="geToolbarContainer";T.className="geToolbarContainer";
-V.className="geToolbarContainer";U.picker=W;var ta=!1;"1"!=urlParams.embed&&"atlassian"!=U.getServiceName()&&(mxEvent.addListener(V,"mouseenter",function(){U.statusContainer.style.display="inline-block"}),mxEvent.addListener(V,"mouseleave",function(){ta||(U.statusContainer.style.display="none")}));var Ba=mxUtils.bind(this,function(ua){null!=U.notificationBtn&&(null!=ua?U.notificationBtn.setAttribute("title",ua):U.notificationBtn.removeAttribute("title"))});V.style.visibility=20>V.clientWidth?"hidden":
-"";U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=U.getServiceName())if(U.statusContainer.style.display="inline-block",ta=!0,1==U.statusContainer.children.length&&""==U.editor.getStatus())V.style.visibility="hidden";else{if(0==U.statusContainer.children.length||1==U.statusContainer.children.length&&"function"===typeof U.statusContainer.firstChild.getAttribute&&null==U.statusContainer.firstChild.getAttribute("class")){var ua=
-null!=U.statusContainer.firstChild&&"function"===typeof U.statusContainer.firstChild.getAttribute?U.statusContainer.firstChild.getAttribute("title"):U.editor.getStatus();Ba(ua);var za=U.getCurrentFile();za=null!=za?za.savingStatusKey:DrawioFile.prototype.savingStatusKey;ua==mxResources.get(za)+"..."?(U.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(za))+'..."src="'+Editor.tailSpin+'">',U.statusContainer.style.display="inline-block",ta=!0):6<U.buttonContainer.clientWidth&&
-(U.statusContainer.style.display="none",ta=!1)}else U.statusContainer.style.display="inline-block",Ba(null),ta=!0;V.style.visibility=20>V.clientWidth&&!ta?"hidden":""}}));qa=O("diagram",null,Editor.menuImage);qa.style.boxShadow="none";qa.style.padding="6px";qa.style.margin="0px";T.appendChild(qa);mxEvent.disableContextMenu(qa);mxEvent.addGestureListeners(qa,mxUtils.bind(this,function(ua){(mxEvent.isShiftDown(ua)||mxEvent.isAltDown(ua)||mxEvent.isMetaDown(ua)||mxEvent.isControlDown(ua)||mxEvent.isPopupTrigger(ua))&&
-this.appIconClicked(ua)}),null,null);U.statusContainer.style.position="";U.statusContainer.style.display="none";U.statusContainer.style.margin="0px";U.statusContainer.style.padding="6px 0px";U.statusContainer.style.maxWidth=Math.min(n-240,280)+"px";U.statusContainer.style.display="inline-block";U.statusContainer.style.textOverflow="ellipsis";U.buttonContainer.style.position="";U.buttonContainer.style.paddingRight="0px";U.buttonContainer.style.display="inline-block";var va=document.createElement("a");
-va.style.padding="0px";va.style.boxShadow="none";va.className="geMenuItem";va.style.display="inline-block";va.style.width="40px";va.style.height="12px";va.style.marginBottom="-2px";va.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";va.style.backgroundPosition="top center";va.style.backgroundRepeat="no-repeat";va.setAttribute("title","Minimize");var Oa=!1,Ca=mxUtils.bind(this,function(){W.innerHTML="";if(!Oa){var ua=function(Ga,Ma,db){Ga=X("",Ga.funct,null,Ma,Ga,db);Ga.style.width=
-"40px";Ga.style.opacity="0.7";return za(Ga,null,"pointer")},za=function(Ga,Ma,db){null!=Ma&&Ga.setAttribute("title",Ma);Ga.style.cursor=null!=db?db:"default";Ga.style.margin="2px 0px";W.appendChild(Ga);mxUtils.br(W);return Ga};za(U.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");za(U.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
-140,160,"",mxResources.get("note"),!0,!1,null,!0),mxResources.get("note"));za(U.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");za(U.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var Ga=new mxCell("",new mxGeometry(0,0,I.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
-Ga.geometry.setTerminalPoint(new mxPoint(0,0),!0);Ga.geometry.setTerminalPoint(new mxPoint(Ga.geometry.width,0),!1);Ga.geometry.points=[];Ga.geometry.relative=!0;Ga.edge=!0;za(U.sidebar.createEdgeTemplateFromCells([Ga],Ga.geometry.width,Ga.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));Ga=Ga.clone();Ga.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";Ga.geometry.width=I.defaultEdgeLength+20;Ga.geometry.setTerminalPoint(new mxPoint(0,
-20),!0);Ga.geometry.setTerminalPoint(new mxPoint(Ga.geometry.width,20),!1);Ga=za(U.sidebar.createEdgeTemplateFromCells([Ga],Ga.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));Ga.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");Ga.style.paddingBottom="14px";Ga.style.marginBottom="14px"})();ua(U.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var Ka=U.actions.get("toggleShapes");ua(Ka,mxResources.get("shapes")+
-" ("+Ka.shortcut+")",J);qa=O("table",null,Editor.calendarImage);qa.style.boxShadow="none";qa.style.opacity="0.7";qa.style.padding="6px";qa.style.margin="0px";qa.style.width="37px";za(qa,null,"pointer");qa=O("insert",null,Editor.plusImage);qa.style.boxShadow="none";qa.style.opacity="0.7";qa.style.padding="6px";qa.style.margin="0px";qa.style.width="37px";za(qa,null,"pointer")}"1"!=urlParams.embedInline&&W.appendChild(va)});mxEvent.addListener(va,"click",mxUtils.bind(this,function(){Oa?(mxUtils.setPrefixedStyle(W.style,
-"transform","translate(0, -50%)"),W.style.padding="8px 6px 4px",W.style.top="50%",W.style.bottom="",W.style.height="",va.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",va.style.width="40px",va.style.height="12px",va.setAttribute("title","Minimize"),Oa=!1,Ca()):(W.innerHTML="",W.appendChild(va),mxUtils.setPrefixedStyle(W.style,"transform","translate(0, 0)"),W.style.top="",W.style.bottom="12px",W.style.padding="0px",W.style.height="24px",va.style.height="24px",va.style.backgroundImage=
-"url("+Editor.plusImage+")",va.setAttribute("title",mxResources.get("insert")),va.style.width="24px",Oa=!0)}));Ca();U.addListener("darkModeChanged",Ca);U.addListener("sketchModeChanged",Ca)}else U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus())}));if(null!=u){var Ta=function(ua){mxEvent.isShiftDown(ua)?(U.hideCurrentMenu(),U.actions.get("smartFit").funct(),mxEvent.consume(ua)):mxEvent.isAltDown(ua)&&(U.hideCurrentMenu(),U.actions.get("customZoom").funct(),
-mxEvent.consume(ua))},Va=U.actions.get("zoomIn"),Ja=U.actions.get("zoomOut"),bb=U.actions.get("resetView");Q=U.actions.get("fullscreen");var Wa=U.actions.get("undo"),$a=U.actions.get("redo"),z=X("",Wa.funct,null,mxResources.get("undo")+" ("+Wa.shortcut+")",Wa,Editor.undoImage),L=X("",$a.funct,null,mxResources.get("redo")+" ("+$a.shortcut+")",$a,Editor.redoImage),M=X("",Q.funct,null,mxResources.get("fullscreen"),Q,Editor.fullscreenImage);if(null!=N){bb=function(){ra.style.display=null!=U.pages&&("0"!=
-urlParams.pages||1<U.pages.length||Editor.pagesVisible)?"inline-block":"none"};var S=function(){ra.innerHTML="";if(null!=U.currentPage){mxUtils.write(ra,U.currentPage.getName());var ua=null!=U.pages?U.pages.length:1,za=U.getPageIndex(U.currentPage);za=null!=za?za+1:1;var Ka=U.currentPage.getId();ra.setAttribute("title",U.currentPage.getName()+" ("+za+"/"+ua+")"+(null!=Ka?" ["+Ka+"]":""))}};M.parentNode.removeChild(M);var ca=U.actions.get("delete"),ia=X("",ca.funct,null,mxResources.get("delete"),ca,
-Editor.trashImage);ia.style.opacity="0.1";T.appendChild(ia);ca.addListener("stateChanged",function(){ia.style.opacity=ca.enabled?"":"0.1"});var na=function(){z.style.display=0<U.editor.undoManager.history.length||I.isEditing()?"inline-block":"none";L.style.display=z.style.display;z.style.opacity=Wa.enabled?"":"0.1";L.style.opacity=$a.enabled?"":"0.1"};T.appendChild(z);T.appendChild(L);Wa.addListener("stateChanged",na);$a.addListener("stateChanged",na);na();var ra=this.createPageMenuTab(!1,!0);ra.style.display=
+2+"px"}U.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";U.rightResizer.style.visibility=U.bottomResizer.style.visibility;V.style.display="none";T.style.visibility="";N.style.visibility=""}),na=mxUtils.bind(this,function(){M.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";Z()});Q=mxUtils.bind(this,
+function(){na();b(U,!0);U.initFormatWindow();var ua=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ua.x+ua.width+4,ua.y)});U.addListener("inlineFullscreenChanged",na);U.addListener("editInlineStart",Q);"1"==urlParams.embedInline&&U.addListener("darkModeChanged",Q);U.addListener("editInlineStop",mxUtils.bind(this,function(ua){U.diagramContainer.style.width="10px";U.diagramContainer.style.height="10px";U.diagramContainer.style.border="";U.bottomResizer.style.visibility=
+"hidden";U.rightResizer.style.visibility="hidden";T.style.visibility="hidden";N.style.visibility="hidden";W.style.display="none"}));if(null!=U.hoverIcons){var va=U.hoverIcons.update;U.hoverIcons.update=function(){J.freehand.isDrawing()||va.apply(this,arguments)}}if(null!=J.freehand){var Ba=J.freehand.createStyle;J.freehand.createStyle=function(ua){return Ba.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){W.className="geToolbarContainer";N.className="geToolbarContainer";T.className="geToolbarContainer";
+V.className="geToolbarContainer";U.picker=W;var sa=!1;"1"!=urlParams.embed&&"atlassian"!=U.getServiceName()&&(mxEvent.addListener(V,"mouseenter",function(){U.statusContainer.style.display="inline-block"}),mxEvent.addListener(V,"mouseleave",function(){sa||(U.statusContainer.style.display="none")}));var Da=mxUtils.bind(this,function(ua){null!=U.notificationBtn&&(null!=ua?U.notificationBtn.setAttribute("title",ua):U.notificationBtn.removeAttribute("title"))});V.style.visibility=20>V.clientWidth?"hidden":
+"";U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=U.getServiceName())if(U.statusContainer.style.display="inline-block",sa=!0,1==U.statusContainer.children.length&&""==U.editor.getStatus())V.style.visibility="hidden";else{if(0==U.statusContainer.children.length||1==U.statusContainer.children.length&&"function"===typeof U.statusContainer.firstChild.getAttribute&&null==U.statusContainer.firstChild.getAttribute("class")){var ua=
+null!=U.statusContainer.firstChild&&"function"===typeof U.statusContainer.firstChild.getAttribute?U.statusContainer.firstChild.getAttribute("title"):U.editor.getStatus();Da(ua);var ya=U.getCurrentFile();ya=null!=ya?ya.savingStatusKey:DrawioFile.prototype.savingStatusKey;ua==mxResources.get(ya)+"..."?(U.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ya))+'..."src="'+Editor.tailSpin+'">',U.statusContainer.style.display="inline-block",sa=!0):6<U.buttonContainer.clientWidth&&
+(U.statusContainer.style.display="none",sa=!1)}else U.statusContainer.style.display="inline-block",Da(null),sa=!0;V.style.visibility=20>V.clientWidth&&!sa?"hidden":""}}));qa=O("diagram",null,Editor.menuImage);qa.style.boxShadow="none";qa.style.padding="6px";qa.style.margin="0px";T.appendChild(qa);mxEvent.disableContextMenu(qa);mxEvent.addGestureListeners(qa,mxUtils.bind(this,function(ua){(mxEvent.isShiftDown(ua)||mxEvent.isAltDown(ua)||mxEvent.isMetaDown(ua)||mxEvent.isControlDown(ua)||mxEvent.isPopupTrigger(ua))&&
+this.appIconClicked(ua)}),null,null);U.statusContainer.style.position="";U.statusContainer.style.display="none";U.statusContainer.style.margin="0px";U.statusContainer.style.padding="6px 0px";U.statusContainer.style.maxWidth=Math.min(n-240,280)+"px";U.statusContainer.style.display="inline-block";U.statusContainer.style.textOverflow="ellipsis";U.buttonContainer.style.position="";U.buttonContainer.style.paddingRight="0px";U.buttonContainer.style.display="inline-block";var Aa=document.createElement("a");
+Aa.style.padding="0px";Aa.style.boxShadow="none";Aa.className="geMenuItem";Aa.style.display="inline-block";Aa.style.width="40px";Aa.style.height="12px";Aa.style.marginBottom="-2px";Aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Aa.style.backgroundPosition="top center";Aa.style.backgroundRepeat="no-repeat";Aa.setAttribute("title","Minimize");var za=!1,Ca=mxUtils.bind(this,function(){W.innerHTML="";if(!za){var ua=function(Fa,Ra,db){Fa=X("",Fa.funct,null,Ra,Fa,db);Fa.style.width=
+"40px";Fa.style.opacity="0.7";return ya(Fa,null,"pointer")},ya=function(Fa,Ra,db){null!=Ra&&Fa.setAttribute("title",Ra);Fa.style.cursor=null!=db?db:"default";Fa.style.margin="2px 0px";W.appendChild(Fa);mxUtils.br(W);return Fa};ya(U.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");ya(U.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
+140,160,"",mxResources.get("note"),!0,!1,null,!0),mxResources.get("note"));ya(U.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");ya(U.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var Fa=new mxCell("",new mxGeometry(0,0,J.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
+Fa.geometry.setTerminalPoint(new mxPoint(0,0),!0);Fa.geometry.setTerminalPoint(new mxPoint(Fa.geometry.width,0),!1);Fa.geometry.points=[];Fa.geometry.relative=!0;Fa.edge=!0;ya(U.sidebar.createEdgeTemplateFromCells([Fa],Fa.geometry.width,Fa.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));Fa=Fa.clone();Fa.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";Fa.geometry.width=J.defaultEdgeLength+20;Fa.geometry.setTerminalPoint(new mxPoint(0,
+20),!0);Fa.geometry.setTerminalPoint(new mxPoint(Fa.geometry.width,20),!1);Fa=ya(U.sidebar.createEdgeTemplateFromCells([Fa],Fa.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));Fa.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");Fa.style.paddingBottom="14px";Fa.style.marginBottom="14px"})();ua(U.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var Na=U.actions.get("toggleShapes");ua(Na,mxResources.get("shapes")+
+" ("+Na.shortcut+")",I);qa=O("table",null,Editor.calendarImage);qa.style.boxShadow="none";qa.style.opacity="0.7";qa.style.padding="6px";qa.style.margin="0px";qa.style.width="37px";ya(qa,null,"pointer");qa=O("insert",null,Editor.plusImage);qa.style.boxShadow="none";qa.style.opacity="0.7";qa.style.padding="6px";qa.style.margin="0px";qa.style.width="37px";ya(qa,null,"pointer")}"1"!=urlParams.embedInline&&W.appendChild(Aa)});mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){za?(mxUtils.setPrefixedStyle(W.style,
+"transform","translate(0, -50%)"),W.style.padding="8px 6px 4px",W.style.top="50%",W.style.bottom="",W.style.height="",Aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Aa.style.width="40px",Aa.style.height="12px",Aa.setAttribute("title","Minimize"),za=!1,Ca()):(W.innerHTML="",W.appendChild(Aa),mxUtils.setPrefixedStyle(W.style,"transform","translate(0, 0)"),W.style.top="",W.style.bottom="12px",W.style.padding="0px",W.style.height="24px",Aa.style.height="24px",Aa.style.backgroundImage=
+"url("+Editor.plusImage+")",Aa.setAttribute("title",mxResources.get("insert")),Aa.style.width="24px",za=!0)}));Ca();U.addListener("darkModeChanged",Ca);U.addListener("sketchModeChanged",Ca)}else U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus())}));if(null!=u){var Qa=function(ua){mxEvent.isShiftDown(ua)?(U.hideCurrentMenu(),U.actions.get("smartFit").funct(),mxEvent.consume(ua)):mxEvent.isAltDown(ua)&&(U.hideCurrentMenu(),U.actions.get("customZoom").funct(),
+mxEvent.consume(ua))},Za=U.actions.get("zoomIn"),cb=U.actions.get("zoomOut"),Ka=U.actions.get("resetView");Q=U.actions.get("fullscreen");var Ua=U.actions.get("undo"),$a=U.actions.get("redo"),z=X("",Ua.funct,null,mxResources.get("undo")+" ("+Ua.shortcut+")",Ua,Editor.undoImage),L=X("",$a.funct,null,mxResources.get("redo")+" ("+$a.shortcut+")",$a,Editor.redoImage),M=X("",Q.funct,null,mxResources.get("fullscreen"),Q,Editor.fullscreenImage);if(null!=N){Ka=function(){ra.style.display=null!=U.pages&&("0"!=
+urlParams.pages||1<U.pages.length||Editor.pagesVisible)?"inline-block":"none"};var S=function(){ra.innerHTML="";if(null!=U.currentPage){mxUtils.write(ra,U.currentPage.getName());var ua=null!=U.pages?U.pages.length:1,ya=U.getPageIndex(U.currentPage);ya=null!=ya?ya+1:1;var Na=U.currentPage.getId();ra.setAttribute("title",U.currentPage.getName()+" ("+ya+"/"+ua+")"+(null!=Na?" ["+Na+"]":""))}};M.parentNode.removeChild(M);var ca=U.actions.get("delete"),ha=X("",ca.funct,null,mxResources.get("delete"),ca,
+Editor.trashImage);ha.style.opacity="0.1";T.appendChild(ha);ca.addListener("stateChanged",function(){ha.style.opacity=ca.enabled?"":"0.1"});var oa=function(){z.style.display=0<U.editor.undoManager.history.length||J.isEditing()?"inline-block":"none";L.style.display=z.style.display;z.style.opacity=Ua.enabled?"":"0.1";L.style.opacity=$a.enabled?"":"0.1"};T.appendChild(z);T.appendChild(L);Ua.addListener("stateChanged",oa);$a.addListener("stateChanged",oa);oa();var ra=this.createPageMenuTab(!1,!0);ra.style.display=
"none";ra.style.position="";ra.style.marginLeft="";ra.style.top="";ra.style.left="";ra.style.height="100%";ra.style.lineHeight="";ra.style.borderStyle="none";ra.style.padding="3px 0";ra.style.margin="0px";ra.style.background="";ra.style.border="";ra.style.boxShadow="none";ra.style.verticalAlign="top";ra.style.width="auto";ra.style.maxWidth="160px";ra.style.position="relative";ra.style.padding="6px";ra.style.textOverflow="ellipsis";ra.style.opacity="0.8";N.appendChild(ra);U.editor.addListener("pagesPatched",
-S);U.editor.addListener("pageSelected",S);U.editor.addListener("pageRenamed",S);U.editor.addListener("fileLoaded",S);S();U.addListener("fileDescriptorChanged",bb);U.addListener("pagesVisibleChanged",bb);U.editor.addListener("pagesPatched",bb);bb();bb=X("",Ja.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Ja,Editor.zoomOutImage);N.appendChild(bb);var qa=R.addMenu("100%",u.funct);qa.setAttribute("title",mxResources.get("zoom"));qa.innerHTML="100%";qa.style.display="inline-block";
-qa.style.color="inherit";qa.style.cursor="pointer";qa.style.textAlign="center";qa.style.whiteSpace="nowrap";qa.style.paddingRight="10px";qa.style.textDecoration="none";qa.style.verticalAlign="top";qa.style.padding="6px 0";qa.style.fontSize="14px";qa.style.width="40px";qa.style.opacity="0.4";N.appendChild(qa);u=X("",Va.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Va,Editor.zoomInImage);N.appendChild(u);Q.visible&&(N.appendChild(M),mxEvent.addListener(document,"fullscreenchange",
+S);U.editor.addListener("pageSelected",S);U.editor.addListener("pageRenamed",S);U.editor.addListener("fileLoaded",S);S();U.addListener("fileDescriptorChanged",Ka);U.addListener("pagesVisibleChanged",Ka);U.editor.addListener("pagesPatched",Ka);Ka();Ka=X("",cb.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",cb,Editor.zoomOutImage);N.appendChild(Ka);var qa=R.addMenu("100%",u.funct);qa.setAttribute("title",mxResources.get("zoom"));qa.innerHTML="100%";qa.style.display="inline-block";
+qa.style.color="inherit";qa.style.cursor="pointer";qa.style.textAlign="center";qa.style.whiteSpace="nowrap";qa.style.paddingRight="10px";qa.style.textDecoration="none";qa.style.verticalAlign="top";qa.style.padding="6px 0";qa.style.fontSize="14px";qa.style.width="40px";qa.style.opacity="0.4";N.appendChild(qa);u=X("",Za.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Za,Editor.zoomInImage);N.appendChild(u);Q.visible&&(N.appendChild(M),mxEvent.addListener(document,"fullscreenchange",
function(){M.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(u=U.actions.get("exit"),N.appendChild(X("",u.funct,null,mxResources.get("exit"),u,Editor.closeImage)));U.tabContainer.style.visibility="hidden";V.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-T.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";N.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";sa.appendChild(T);sa.appendChild(N);W.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(W.style.touchAction="none");sa.appendChild(W);window.setTimeout(function(){mxUtils.setPrefixedStyle(W.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(sa)}else{var ya=X("",Ta,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",bb,Editor.zoomFitImage);V.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";qa=R.addMenu("100%",
+T.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";N.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";ta.appendChild(T);ta.appendChild(N);W.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
+mxClient.IS_POINTER&&(W.style.touchAction="none");ta.appendChild(W);window.setTimeout(function(){mxUtils.setPrefixedStyle(W.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(ta)}else{var xa=X("",Qa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ka,Editor.zoomFitImage);V.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";qa=R.addMenu("100%",
u.funct);qa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");qa.style.whiteSpace="nowrap";qa.style.paddingRight="10px";qa.style.textDecoration="none";qa.style.textDecoration="none";qa.style.overflow="hidden";qa.style.visibility="hidden";qa.style.textAlign="center";qa.style.cursor="pointer";qa.style.height=parseInt(U.tabContainerHeight)-1+"px";qa.style.lineHeight=parseInt(U.tabContainerHeight)+1+"px";qa.style.position="absolute";qa.style.display="block";qa.style.fontSize="12px";qa.style.width=
-"59px";qa.style.right="0px";qa.style.bottom="0px";qa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";qa.style.backgroundPosition="right 6px center";qa.style.backgroundRepeat="no-repeat";sa.appendChild(qa)}(function(ua){mxEvent.addListener(ua,"click",Ta);var za=mxUtils.bind(this,function(){ua.innerHTML="";mxUtils.write(ua,Math.round(100*U.editor.graph.view.scale)+"%")});U.editor.graph.view.addListener(mxEvent.EVENT_SCALE,za);U.editor.addListener("resetGraphView",za);U.editor.addListener("pageSelected",
-za)})(qa);var Ea=U.setGraphEnabled;U.setGraphEnabled=function(){Ea.apply(this,arguments);null!=this.tabContainer&&(qa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==N?this.tabContainerHeight+"px":"0px")}}sa.appendChild(V);sa.appendChild(U.diagramContainer);ja.appendChild(sa);U.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&b(this,!0);null==N&&sa.appendChild(U.tabContainer);
-var Na=null;ka();mxEvent.addListener(window,"resize",function(){ka();null!=U.sidebarWindow&&U.sidebarWindow.window.fit();null!=U.formatWindow&&U.formatWindow.window.fit();null!=U.actions.outlineWindow&&U.actions.outlineWindow.window.fit();null!=U.actions.layersWindow&&U.actions.layersWindow.window.fit();null!=U.menus.tagsWindow&&U.menus.tagsWindow.window.fit();null!=U.menus.findWindow&&U.menus.findWindow.window.fit();null!=U.menus.findReplaceWindow&&U.menus.findReplaceWindow.window.fit()});if("1"==
+"59px";qa.style.right="0px";qa.style.bottom="0px";qa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";qa.style.backgroundPosition="right 6px center";qa.style.backgroundRepeat="no-repeat";ta.appendChild(qa)}(function(ua){mxEvent.addListener(ua,"click",Qa);var ya=mxUtils.bind(this,function(){ua.innerHTML="";mxUtils.write(ua,Math.round(100*U.editor.graph.view.scale)+"%")});U.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ya);U.editor.addListener("resetGraphView",ya);U.editor.addListener("pageSelected",
+ya)})(qa);var Ga=U.setGraphEnabled;U.setGraphEnabled=function(){Ga.apply(this,arguments);null!=this.tabContainer&&(qa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==N?this.tabContainerHeight+"px":"0px")}}ta.appendChild(V);ta.appendChild(U.diagramContainer);ja.appendChild(ta);U.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&b(this,!0);null==N&&ta.appendChild(U.tabContainer);
+var La=null;ka();mxEvent.addListener(window,"resize",function(){ka();null!=U.sidebarWindow&&U.sidebarWindow.window.fit();null!=U.formatWindow&&U.formatWindow.window.fit();null!=U.actions.outlineWindow&&U.actions.outlineWindow.window.fit();null!=U.actions.layersWindow&&U.actions.layersWindow.window.fit();null!=U.menus.tagsWindow&&U.menus.tagsWindow.window.fit();null!=U.menus.findWindow&&U.menus.findWindow.window.fit();null!=U.menus.findReplaceWindow&&U.menus.findReplaceWindow.window.fit()});if("1"==
urlParams.embedInline){document.body.style.cursor="text";W.style.transform="";mxEvent.addGestureListeners(U.diagramContainer.parentNode,function(ua){mxEvent.getSource(ua)==U.diagramContainer.parentNode&&(U.embedExitPoint=new mxPoint(mxEvent.getClientX(ua),mxEvent.getClientY(ua)),U.sendEmbeddedSvgExport())});ja=document.createElement("div");ja.style.position="absolute";ja.style.width="10px";ja.style.height="10px";ja.style.borderRadius="5px";ja.style.border="1px solid gray";ja.style.background="#ffffff";
-ja.style.cursor="row-resize";U.diagramContainer.parentNode.appendChild(ja);U.bottomResizer=ja;var Pa=null,Qa=null,Ua=null,La=null;mxEvent.addGestureListeners(ja,function(ua){La=parseInt(U.diagramContainer.style.height);Qa=mxEvent.getClientY(ua);I.popupMenuHandler.hideMenu();mxEvent.consume(ua)});ja=ja.cloneNode(!1);ja.style.cursor="col-resize";U.diagramContainer.parentNode.appendChild(ja);U.rightResizer=ja;mxEvent.addGestureListeners(ja,function(ua){Ua=parseInt(U.diagramContainer.style.width);Pa=
-mxEvent.getClientX(ua);I.popupMenuHandler.hideMenu();mxEvent.consume(ua)});mxEvent.addGestureListeners(document.body,null,function(ua){var za=!1;null!=Pa&&(U.diagramContainer.style.width=Math.max(20,Ua+mxEvent.getClientX(ua)-Pa)+"px",za=!0);null!=Qa&&(U.diagramContainer.style.height=Math.max(20,La+mxEvent.getClientY(ua)-Qa)+"px",za=!0);za&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:U.diagramContainer.getBoundingClientRect()}),
-"*"),Z(),U.refresh())},function(ua){null==Pa&&null==Qa||mxEvent.consume(ua);Qa=Pa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";U.bottomResizer.style.visibility="hidden";U.rightResizer.style.visibility="hidden";T.style.visibility="hidden";N.style.visibility="hidden";W.style.display="none"}"1"==urlParams.prefetchFonts&&U.editor.loadFonts()}}};
+ja.style.cursor="row-resize";U.diagramContainer.parentNode.appendChild(ja);U.bottomResizer=ja;var Pa=null,Oa=null,Ta=null,Ma=null;mxEvent.addGestureListeners(ja,function(ua){Ma=parseInt(U.diagramContainer.style.height);Oa=mxEvent.getClientY(ua);J.popupMenuHandler.hideMenu();mxEvent.consume(ua)});ja=ja.cloneNode(!1);ja.style.cursor="col-resize";U.diagramContainer.parentNode.appendChild(ja);U.rightResizer=ja;mxEvent.addGestureListeners(ja,function(ua){Ta=parseInt(U.diagramContainer.style.width);Pa=
+mxEvent.getClientX(ua);J.popupMenuHandler.hideMenu();mxEvent.consume(ua)});mxEvent.addGestureListeners(document.body,null,function(ua){var ya=!1;null!=Pa&&(U.diagramContainer.style.width=Math.max(20,Ta+mxEvent.getClientX(ua)-Pa)+"px",ya=!0);null!=Oa&&(U.diagramContainer.style.height=Math.max(20,Ma+mxEvent.getClientY(ua)-Oa)+"px",ya=!0);ya&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:U.diagramContainer.getBoundingClientRect()}),
+"*"),Z(),U.refresh())},function(ua){null==Pa&&null==Oa||mxEvent.consume(ua);Oa=Pa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";U.bottomResizer.style.visibility="hidden";U.rightResizer.style.visibility="hidden";T.style.visibility="hidden";N.style.visibility="hidden";W.style.display="none"}"1"==urlParams.prefetchFonts&&U.editor.loadFonts()}}};
(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,n,D,t,E){this.file=b;this.id=e;this.content=k;this.modifiedDate=n;this.createdDate=D;this.isResolved=t;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,n,D){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,n,D){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=n;this.locale=D};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,e,k){this.init(b,e,k)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
@@ -4079,8 +4079,8 @@ null!=d||0!=this.graphConfig.resize||""==b.style.height?(d=null!=d?d:new mxPoint
GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,n=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/n+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/n+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var n=this.graphConfig.layerIds,D=null!=n&&0<n.length,t=!1;if(0<k.length||D||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==e){e=!1;t={};if(D)for(var d=0;d<n.length;d++){var f=b.getCell(n[d]);null!=f&&(e=!0,t[f.id]=!0)}else for(d=0;d<k.length;d++)f=b.getChildAt(b.root,parseInt(k[d])),null!=f&&(e=!0,t[f.id]=!0);for(d=0;e&&
d<E;d++)f=b.getChildAt(b.root,d),b.setVisible(f,t[f.id]||!1)}else for(d=0;d<E;d++)b.setVisible(b.getChildAt(b.root,d),e.isVisible(e.getChildAt(e.root,d)))}finally{b.endUpdate()}t=!0}return t};
-GraphViewer.prototype.addToolbar=function(){function b(ea,ka,ja,U){var I=document.createElement("div");I.style.borderRight="1px solid #d0d0d0";I.style.padding="3px 6px 3px 6px";mxEvent.addListener(I,"click",ea);null!=ja&&I.setAttribute("title",ja);I.style.display="inline-block";ea=document.createElement("img");ea.setAttribute("border","0");ea.setAttribute("src",ka);ea.style.width="18px";null==U||U?(mxEvent.addListener(I,"mouseenter",function(){I.style.backgroundColor="#ddd"}),mxEvent.addListener(I,
-"mouseleave",function(){I.style.backgroundColor="#eee"}),mxUtils.setOpacity(ea,60),I.style.cursor="pointer"):mxUtils.setOpacity(I,30);I.appendChild(ea);k.appendChild(I);m++;return I}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
+GraphViewer.prototype.addToolbar=function(){function b(ea,ka,ja,U){var J=document.createElement("div");J.style.borderRight="1px solid #d0d0d0";J.style.padding="3px 6px 3px 6px";mxEvent.addListener(J,"click",ea);null!=ja&&J.setAttribute("title",ja);J.style.display="inline-block";ea=document.createElement("img");ea.setAttribute("border","0");ea.setAttribute("src",ka);ea.style.width="18px";null==U||U?(mxEvent.addListener(J,"mouseenter",function(){J.style.backgroundColor="#ddd"}),mxEvent.addListener(J,
+"mouseleave",function(){J.style.backgroundColor="#eee"}),mxUtils.setOpacity(ea,60),J.style.cursor="pointer"):mxUtils.setOpacity(J,30);J.appendChild(ea);k.appendChild(J);m++;return J}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
"border-box";k.style.whiteSpace="nowrap";k.style.textAlign="left";k.style.zIndex=this.toolbarZIndex;k.style.backgroundColor="#eee";k.style.height=this.toolbarHeight+"px";this.toolbar=k;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(k.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(k,30);var n=null,D=null,t=mxUtils.bind(this,function(ea){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setOpacity(k,0);n=null;D=window.setTimeout(mxUtils.bind(this,function(){k.style.display="none";D=null}),100)}),ea||200)}),E=mxUtils.bind(this,function(ea){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);k.style.display="";mxUtils.setOpacity(k,ea||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||(E(30),t())}));mxEvent.addListener(k,
mxClient.IS_POINTER?"pointermove":"mousemove",function(ea){mxEvent.consume(ea)});mxEvent.addListener(k,"mouseenter",mxUtils.bind(this,function(ea){E(100)}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(ea){E(100);mxEvent.consume(ea)}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||E(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ea,ka){this.startX=ka.getGraphX();
diff --git a/src/main/webapp/js/viewer.min.js b/src/main/webapp/js/viewer.min.js
index e1785574..fd5f2ee5 100644
--- a/src/main/webapp/js/viewer.min.js
+++ b/src/main/webapp/js/viewer.min.js
@@ -110,7 +110,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"18.2.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"19.0.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
@@ -2057,32 +2057,32 @@ function(){var E=k.apply(this,arguments);E.intersects=mxUtils.bind(this,function
m=this.graph.pageScale,q=g.width*m;g=g.height*m;m=Math.floor(Math.min(0,d)/q);var y=Math.floor(Math.min(0,f)/g);return new mxRectangle(this.scale*(this.translate.x+m*q),this.scale*(this.translate.y+y*g),this.scale*(Math.ceil(Math.max(1,d+E.width/this.scale)/q)-m)*q,this.scale*(Math.ceil(Math.max(1,f+E.height/this.scale)/g)-y)*g)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,d){n.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,d,f,g,m,q){var y=D.apply(this,arguments);null==q||q||mxEvent.addListener(y,"mousedown",function(F){mxEvent.consume(F)});return y};var t=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
function(E,d,f){var g=this.graph.model.getParent(E);if(d){var m=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);m=!this.graph.model.isEdge(g)&&!this.graph.isSiblingSelected(E)&&(null!=m&&m.relative||!this.graph.isContainer(g)||this.graph.isPart(E))}else if(m=t.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))m=g,this.graph.isTable(m)||(m=this.graph.model.getParent(m)),m=!this.graph.selectionCellsHandler.isHandled(m)||this.graph.isCellSelected(m)&&this.graph.isToggleEvent(f.getEvent())||
-this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(g);return m};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var d=this.graph.getModel(),f=d.getParent(E),g=this.graph.view.getState(f),m=this.graph.isCellSelected(E);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);m=m||q;if(q||!m&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=f;f=d.getParent(f)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this.editor.graph;n.lightbox=k;var D=n.getGraphBounds;n.getGraphBounds=function(){var I=D.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var P=this.view.translate,R=this.view.scale;I=mxRectangle.fromRectangle(I);I.add(new mxRectangle((P.x+V.x)*R,(P.y+V.y)*R,V.width*R,V.height*R))}return I};n.useCssTransforms&&(this.lazyZoomDelay=
-0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(I,V){this.clearSelectionState()});n.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
-n.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);n.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);n.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);n.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,n.isEnabled=function(){return!1},n.panningHandler.isForcePanningEvent=function(I){return!mxEvent.isPopupTrigger(I.getEvent())});this.actions=new Actions(this);this.menus=
+this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(g);return m};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var d=this.graph.getModel(),f=d.getParent(E),g=this.graph.view.getState(f),m=this.graph.isCellSelected(E);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);m=m||q;if(q||!m&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=f;f=d.getParent(f)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this.editor.graph;n.lightbox=k;var D=n.getGraphBounds;n.getGraphBounds=function(){var J=D.apply(this,arguments),V=this.backgroundImage;if(null!=V&&null!=V.width&&null!=V.height){var P=this.view.translate,R=this.view.scale;J=mxRectangle.fromRectangle(J);J.add(new mxRectangle((P.x+V.x)*R,(P.y+V.y)*R,V.width*R,V.height*R))}return J};n.useCssTransforms&&(this.lazyZoomDelay=
+0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(J,V){this.clearSelectionState()});n.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
+n.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);n.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);n.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);n.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,n.isEnabled=function(){return!1},n.panningHandler.isForcePanningEvent=function(J){return!mxEvent.isPopupTrigger(J.getEvent())});this.actions=new Actions(this);this.menus=
this.createMenus();if(!n.standalone){var t="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
-d="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" ");this.setDefaultStyle=function(I){try{var V=n.getCellStyle(I,!1),P=[],R=[],fa;for(fa in V)P.push(V[fa]),R.push(fa);n.getModel().isEdge(I)?n.currentEdgeStyle={}:n.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",R,"values",P,"cells",[I]))}catch(la){this.handleError(la)}};this.clearDefaultStyle=function(){n.currentEdgeStyle=mxUtils.clone(n.defaultEdgeStyle);
+d="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" ");this.setDefaultStyle=function(J){try{var V=n.getCellStyle(J,!1),P=[],R=[],ia;for(ia in V)P.push(V[ia]),R.push(ia);n.getModel().isEdge(J)?n.currentEdgeStyle={}:n.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",R,"values",P,"cells",[J]))}catch(la){this.handleError(la)}};this.clearDefaultStyle=function(){n.currentEdgeStyle=mxUtils.clone(n.defaultEdgeStyle);
n.currentVertexStyle=mxUtils.clone(n.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var f=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<f.length;e++)0>mxUtils.indexOf(t,f[e])&&t.push(f[e]);var g="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),m=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],["strokeColor","strokeWidth"],
-["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<m.length;e++)for(k=0;k<m[e].length;k++)t.push(m[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(t,E[e])&&t.push(E[e]);var q=function(I,V,P,R,fa,la,sa){R=null!=R?R:n.currentVertexStyle;fa=null!=fa?fa:n.currentEdgeStyle;la=null!=la?la:!0;P=null!=P?P:n.getModel();if(sa){sa=[];for(var u=0;u<I.length;u++)sa=sa.concat(P.getDescendants(I[u]));I=sa}P.beginUpdate();try{for(u=0;u<I.length;u++){var J=I[u];if(V)var N=["fontSize",
-"fontFamily","fontColor"];else{var W=P.getStyle(J),T=null!=W?W.split(";"):[];N=t.slice();for(var Q=0;Q<T.length;Q++){var Z=T[Q],oa=Z.indexOf("=");if(0<=oa){var wa=Z.substring(0,oa),Aa=mxUtils.indexOf(N,wa);0<=Aa&&N.splice(Aa,1);for(sa=0;sa<m.length;sa++){var ta=m[sa];if(0<=mxUtils.indexOf(ta,wa))for(var Ba=0;Ba<ta.length;Ba++){var va=mxUtils.indexOf(N,ta[Ba]);0<=va&&N.splice(va,1)}}}}}var Oa=P.isEdge(J);sa=Oa?fa:R;var Ca=P.getStyle(J);for(Q=0;Q<N.length;Q++){wa=N[Q];var Ta=sa[wa];null!=Ta&&"edgeStyle"!=
-wa&&("shape"!=wa||Oa)&&(!Oa||la||0>mxUtils.indexOf(d,wa))&&(Ca=mxUtils.setStyle(Ca,wa,Ta))}Editor.simpleLabels&&(Ca=mxUtils.setStyle(mxUtils.setStyle(Ca,"html",null),"whiteSpace",null));P.setStyle(J,Ca)}}finally{P.endUpdate()}return I};n.addListener("cellsInserted",function(I,V){q(V.getProperty("cells"),null,null,null,null,!0,!0)});n.addListener("textInserted",function(I,V){q(V.getProperty("cells"),!0)});this.insertHandler=q;this.createDivs();this.createUi();this.refresh();var y=mxUtils.bind(this,
-function(I){null==I&&(I=window.event);return n.isEditing()||null!=I&&this.isSelectionAllowed(I)});this.container==document.body&&(this.menubarContainer.onselectstart=y,this.menubarContainer.onmousedown=y,this.toolbarContainer.onselectstart=y,this.toolbarContainer.onmousedown=y,this.diagramContainer.onselectstart=y,this.diagramContainer.onmousedown=y,this.sidebarContainer.onselectstart=y,this.sidebarContainer.onmousedown=y,this.formatContainer.onselectstart=y,this.formatContainer.onmousedown=y,this.footerContainer.onselectstart=
-y,this.footerContainer.onmousedown=y,null!=this.tabContainer&&(this.tabContainer.onselectstart=y));!this.editor.chromeless||this.editor.editable?(e=function(I){if(null!=I){var V=mxEvent.getSource(I);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return y(I)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):n.panningHandler.usePopupTrigger=
-!1;n.init(this.diagramContainer);mxClient.IS_SVG&&null!=n.view.getDrawPane()&&(e=n.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=n.graphHandler){var F=n.graphHandler.start;n.graphHandler.start=function(){null!=ea.hoverIcons&&ea.hoverIcons.reset();F.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(I){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(I)-
-V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(I)-V.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var C=!1,H=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(I,V){return C||H.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(I){32!=I.which||n.isEditing()?mxEvent.isConsumed(I)||27!=I.keyCode||this.hideDialog(null,!0):(C=!0,this.hoverIcons.reset(),
-n.container.style.cursor="move",n.isEditing()||mxEvent.getSource(I)!=n.container||mxEvent.consume(I))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(I){n.container.style.cursor="";C=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var G=n.panningHandler.isForcePanningEvent;n.panningHandler.isForcePanningEvent=function(I){return G.apply(this,arguments)||C||mxEvent.isMouseEvent(I.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(I.getEvent()))&&
-(!mxEvent.isControlDown(I.getEvent())&&mxEvent.isRightMouseButton(I.getEvent())||mxEvent.isMiddleMouseButton(I.getEvent()))};var aa=n.cellEditor.isStopEditingEvent;n.cellEditor.isStopEditingEvent=function(I){return aa.apply(this,arguments)||13==I.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(I)||mxClient.IS_MAC&&mxEvent.isMetaDown(I)||mxClient.IS_SF&&mxEvent.isShiftDown(I))};var da=n.isZoomWheelEvent;n.isZoomWheelEvent=function(){return C||da.apply(this,arguments)};var ba=!1,Y=null,pa=null,O=null,
-X=mxUtils.bind(this,function(){if(null!=this.toolbar&&ba!=n.cellEditor.isContentEditing()){for(var I=this.toolbar.container.firstChild,V=[];null!=I;){var P=I.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,I)&&(I.parentNode.removeChild(I),V.push(I));I=P}I=this.toolbar.fontMenu;P=this.toolbar.sizeMenu;if(null==O)this.toolbar.createTextToolbar();else{for(var R=0;R<O.length;R++)this.toolbar.container.appendChild(O[R]);this.toolbar.fontMenu=Y;this.toolbar.sizeMenu=pa}ba=n.cellEditor.isContentEditing();
-Y=I;pa=P;O=V}}),ea=this,ka=n.cellEditor.startEditing;n.cellEditor.startEditing=function(){ka.apply(this,arguments);X();if(n.cellEditor.isContentEditing()){var I=!1,V=function(){I||(I=!0,window.setTimeout(function(){var P=n.getSelectedEditingElement();null!=P&&(P=mxUtils.getCurrentStyle(P),null!=P&&null!=ea.toolbar&&(ea.toolbar.setFontName(Graph.stripQuotes(P.fontFamily)),ea.toolbar.setFontSize(parseInt(P.fontSize))));I=!1},0))};mxEvent.addListener(n.cellEditor.textarea,"input",V);mxEvent.addListener(n.cellEditor.textarea,
-"touchend",V);mxEvent.addListener(n.cellEditor.textarea,"mouseup",V);mxEvent.addListener(n.cellEditor.textarea,"keyup",V);V()}};var ja=n.cellEditor.stopEditing;n.cellEditor.stopEditing=function(I,V){try{ja.apply(this,arguments),X()}catch(P){ea.handleError(P)}};n.container.setAttribute("tabindex","0");n.container.style.cursor="default";if(window.self===window.top&&null!=n.container.parentNode)try{n.container.focus()}catch(I){}var U=n.fireMouseEvent;n.fireMouseEvent=function(I,V,P){I==mxEvent.MOUSE_DOWN&&
-this.container.focus();U.apply(this,arguments)};n.popupMenuHandler.autoExpand=!0;null!=this.menus&&(n.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(I,V,P){this.menus.createPopupMenu(I,V,P)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(I){n.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};n.connectionHandler.addListener(mxEvent.CONNECT,function(I,V){var P=[V.getProperty("cell")];V.getProperty("terminalInserted")&&
-(P.push(V.getProperty("terminal")),window.setTimeout(function(){null!=ea.hoverIcons&&ea.hoverIcons.update(n.view.getState(P[P.length-1]))},0));q(P)});this.addListener("styleChanged",mxUtils.bind(this,function(I,V){var P=V.getProperty("cells"),R=I=!1;if(0<P.length)for(var fa=0;fa<P.length&&(I=n.getModel().isVertex(P[fa])||I,!(R=n.getModel().isEdge(P[fa])||R)||!I);fa++);else R=I=!0;P=V.getProperty("keys");V=V.getProperty("values");for(fa=0;fa<P.length;fa++){var la=0<=mxUtils.indexOf(f,P[fa]);if("strokeColor"!=
-P[fa]||null!=V[fa]&&"none"!=V[fa])if(0<=mxUtils.indexOf(E,P[fa]))R||0<=mxUtils.indexOf(g,P[fa])?null==V[fa]?delete n.currentEdgeStyle[P[fa]]:n.currentEdgeStyle[P[fa]]=V[fa]:I&&0<=mxUtils.indexOf(t,P[fa])&&(null==V[fa]?delete n.currentVertexStyle[P[fa]]:n.currentVertexStyle[P[fa]]=V[fa]);else if(0<=mxUtils.indexOf(t,P[fa])){if(I||la)null==V[fa]?delete n.currentVertexStyle[P[fa]]:n.currentVertexStyle[P[fa]]=V[fa];if(R||la||0<=mxUtils.indexOf(g,P[fa]))null==V[fa]?delete n.currentEdgeStyle[P[fa]]:n.currentEdgeStyle[P[fa]]=
-V[fa]}}null!=this.toolbar&&(this.toolbar.setFontName(n.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(n.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==n.currentEdgeStyle.edgeStyle&&"1"==n.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==n.currentEdgeStyle.edgeStyle||"none"==n.currentEdgeStyle.edgeStyle||null==
+["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<m.length;e++)for(k=0;k<m[e].length;k++)t.push(m[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(t,E[e])&&t.push(E[e]);var q=function(J,V,P,R,ia,la,ta){R=null!=R?R:n.currentVertexStyle;ia=null!=ia?ia:n.currentEdgeStyle;la=null!=la?la:!0;P=null!=P?P:n.getModel();if(ta){ta=[];for(var u=0;u<J.length;u++)ta=ta.concat(P.getDescendants(J[u]));J=ta}P.beginUpdate();try{for(u=0;u<J.length;u++){var I=J[u];if(V)var N=["fontSize",
+"fontFamily","fontColor"];else{var W=P.getStyle(I),T=null!=W?W.split(";"):[];N=t.slice();for(var Q=0;Q<T.length;Q++){var Z=T[Q],na=Z.indexOf("=");if(0<=na){var va=Z.substring(0,na),Ba=mxUtils.indexOf(N,va);0<=Ba&&N.splice(Ba,1);for(ta=0;ta<m.length;ta++){var sa=m[ta];if(0<=mxUtils.indexOf(sa,va))for(var Da=0;Da<sa.length;Da++){var Aa=mxUtils.indexOf(N,sa[Da]);0<=Aa&&N.splice(Aa,1)}}}}}var za=P.isEdge(I);ta=za?ia:R;var Ca=P.getStyle(I);for(Q=0;Q<N.length;Q++){va=N[Q];var Qa=ta[va];null!=Qa&&"edgeStyle"!=
+va&&("shape"!=va||za)&&(!za||la||0>mxUtils.indexOf(d,va))&&(Ca=mxUtils.setStyle(Ca,va,Qa))}Editor.simpleLabels&&(Ca=mxUtils.setStyle(mxUtils.setStyle(Ca,"html",null),"whiteSpace",null));P.setStyle(I,Ca)}}finally{P.endUpdate()}return J};n.addListener("cellsInserted",function(J,V){q(V.getProperty("cells"),null,null,null,null,!0,!0)});n.addListener("textInserted",function(J,V){q(V.getProperty("cells"),!0)});this.insertHandler=q;this.createDivs();this.createUi();this.refresh();var y=mxUtils.bind(this,
+function(J){null==J&&(J=window.event);return n.isEditing()||null!=J&&this.isSelectionAllowed(J)});this.container==document.body&&(this.menubarContainer.onselectstart=y,this.menubarContainer.onmousedown=y,this.toolbarContainer.onselectstart=y,this.toolbarContainer.onmousedown=y,this.diagramContainer.onselectstart=y,this.diagramContainer.onmousedown=y,this.sidebarContainer.onselectstart=y,this.sidebarContainer.onmousedown=y,this.formatContainer.onselectstart=y,this.formatContainer.onmousedown=y,this.footerContainer.onselectstart=
+y,this.footerContainer.onmousedown=y,null!=this.tabContainer&&(this.tabContainer.onselectstart=y));!this.editor.chromeless||this.editor.editable?(e=function(J){if(null!=J){var V=mxEvent.getSource(J);if("A"==V.nodeName)for(;null!=V;){if("geHint"==V.className)return!0;V=V.parentNode}}return y(J)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",e):this.diagramContainer.oncontextmenu=e):n.panningHandler.usePopupTrigger=
+!1;n.init(this.diagramContainer);mxClient.IS_SVG&&null!=n.view.getDrawPane()&&(e=n.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=n.graphHandler){var F=n.graphHandler.start;n.graphHandler.start=function(){null!=ea.hoverIcons&&ea.hoverIcons.reset();F.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(J){var V=mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(J)-
+V.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(J)-V.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var C=!1,H=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(J,V){return C||H.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(J){32!=J.which||n.isEditing()?mxEvent.isConsumed(J)||27!=J.keyCode||this.hideDialog(null,!0):(C=!0,this.hoverIcons.reset(),
+n.container.style.cursor="move",n.isEditing()||mxEvent.getSource(J)!=n.container||mxEvent.consume(J))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(J){n.container.style.cursor="";C=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var G=n.panningHandler.isForcePanningEvent;n.panningHandler.isForcePanningEvent=function(J){return G.apply(this,arguments)||C||mxEvent.isMouseEvent(J.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(J.getEvent()))&&
+(!mxEvent.isControlDown(J.getEvent())&&mxEvent.isRightMouseButton(J.getEvent())||mxEvent.isMiddleMouseButton(J.getEvent()))};var aa=n.cellEditor.isStopEditingEvent;n.cellEditor.isStopEditingEvent=function(J){return aa.apply(this,arguments)||13==J.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(J)||mxClient.IS_MAC&&mxEvent.isMetaDown(J)||mxClient.IS_SF&&mxEvent.isShiftDown(J))};var da=n.isZoomWheelEvent;n.isZoomWheelEvent=function(){return C||da.apply(this,arguments)};var ba=!1,Y=null,pa=null,O=null,
+X=mxUtils.bind(this,function(){if(null!=this.toolbar&&ba!=n.cellEditor.isContentEditing()){for(var J=this.toolbar.container.firstChild,V=[];null!=J;){var P=J.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,J)&&(J.parentNode.removeChild(J),V.push(J));J=P}J=this.toolbar.fontMenu;P=this.toolbar.sizeMenu;if(null==O)this.toolbar.createTextToolbar();else{for(var R=0;R<O.length;R++)this.toolbar.container.appendChild(O[R]);this.toolbar.fontMenu=Y;this.toolbar.sizeMenu=pa}ba=n.cellEditor.isContentEditing();
+Y=J;pa=P;O=V}}),ea=this,ka=n.cellEditor.startEditing;n.cellEditor.startEditing=function(){ka.apply(this,arguments);X();if(n.cellEditor.isContentEditing()){var J=!1,V=function(){J||(J=!0,window.setTimeout(function(){var P=n.getSelectedEditingElement();null!=P&&(P=mxUtils.getCurrentStyle(P),null!=P&&null!=ea.toolbar&&(ea.toolbar.setFontName(Graph.stripQuotes(P.fontFamily)),ea.toolbar.setFontSize(parseInt(P.fontSize))));J=!1},0))};mxEvent.addListener(n.cellEditor.textarea,"input",V);mxEvent.addListener(n.cellEditor.textarea,
+"touchend",V);mxEvent.addListener(n.cellEditor.textarea,"mouseup",V);mxEvent.addListener(n.cellEditor.textarea,"keyup",V);V()}};var ja=n.cellEditor.stopEditing;n.cellEditor.stopEditing=function(J,V){try{ja.apply(this,arguments),X()}catch(P){ea.handleError(P)}};n.container.setAttribute("tabindex","0");n.container.style.cursor="default";if(window.self===window.top&&null!=n.container.parentNode)try{n.container.focus()}catch(J){}var U=n.fireMouseEvent;n.fireMouseEvent=function(J,V,P){J==mxEvent.MOUSE_DOWN&&
+this.container.focus();U.apply(this,arguments)};n.popupMenuHandler.autoExpand=!0;null!=this.menus&&(n.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(J,V,P){this.menus.createPopupMenu(J,V,P)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(J){n.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};n.connectionHandler.addListener(mxEvent.CONNECT,function(J,V){var P=[V.getProperty("cell")];V.getProperty("terminalInserted")&&
+(P.push(V.getProperty("terminal")),window.setTimeout(function(){null!=ea.hoverIcons&&ea.hoverIcons.update(n.view.getState(P[P.length-1]))},0));q(P)});this.addListener("styleChanged",mxUtils.bind(this,function(J,V){var P=V.getProperty("cells"),R=J=!1;if(0<P.length)for(var ia=0;ia<P.length&&(J=n.getModel().isVertex(P[ia])||J,!(R=n.getModel().isEdge(P[ia])||R)||!J);ia++);else R=J=!0;P=V.getProperty("keys");V=V.getProperty("values");for(ia=0;ia<P.length;ia++){var la=0<=mxUtils.indexOf(f,P[ia]);if("strokeColor"!=
+P[ia]||null!=V[ia]&&"none"!=V[ia])if(0<=mxUtils.indexOf(E,P[ia]))R||0<=mxUtils.indexOf(g,P[ia])?null==V[ia]?delete n.currentEdgeStyle[P[ia]]:n.currentEdgeStyle[P[ia]]=V[ia]:J&&0<=mxUtils.indexOf(t,P[ia])&&(null==V[ia]?delete n.currentVertexStyle[P[ia]]:n.currentVertexStyle[P[ia]]=V[ia]);else if(0<=mxUtils.indexOf(t,P[ia])){if(J||la)null==V[ia]?delete n.currentVertexStyle[P[ia]]:n.currentVertexStyle[P[ia]]=V[ia];if(R||la||0<=mxUtils.indexOf(g,P[ia]))null==V[ia]?delete n.currentEdgeStyle[P[ia]]:n.currentEdgeStyle[P[ia]]=
+V[ia]}}null!=this.toolbar&&(this.toolbar.setFontName(n.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(n.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==n.currentEdgeStyle.edgeStyle&&"1"==n.currentEdgeStyle.curved?"geSprite geSprite-curved":"straight"==n.currentEdgeStyle.edgeStyle||"none"==n.currentEdgeStyle.edgeStyle||null==
n.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==n.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==n.currentEdgeStyle.elbow?"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&
-(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==n.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==n.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==n.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var I=n.currentVertexStyle.fontFamily||"Helvetica",V=String(n.currentVertexStyle.fontSize||"12"),P=n.getView().getState(n.getSelectionCell());null!=P&&(I=
-P.style[mxConstants.STYLE_FONTFAMILY]||I,V=P.style[mxConstants.STYLE_FONTSIZE]||V,10<I.length&&(I=I.substring(0,8)+"..."));this.toolbar.setFontName(I);this.toolbar.setFontSize(V)}),n.getSelectionModel().addListener(mxEvent.CHANGE,b),n.getModel().addListener(mxEvent.CHANGE,b));n.addListener(mxEvent.CELLS_ADDED,function(I,V){I=V.getProperty("cells");V=V.getProperty("parent");null!=V&&n.getModel().isLayer(V)&&!n.isCellVisible(V)&&null!=I&&0<I.length&&n.getModel().setVisible(V,!0)});this.gestureHandler=
-mxUtils.bind(this,function(I){null!=this.currentMenu&&mxEvent.getSource(I)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",
+(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==n.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==n.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==n.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var J=n.currentVertexStyle.fontFamily||"Helvetica",V=String(n.currentVertexStyle.fontSize||"12"),P=n.getView().getState(n.getSelectionCell());null!=P&&(J=
+P.style[mxConstants.STYLE_FONTFAMILY]||J,V=P.style[mxConstants.STYLE_FONTSIZE]||V,10<J.length&&(J=J.substring(0,8)+"..."));this.toolbar.setFontName(J);this.toolbar.setFontSize(V)}),n.getSelectionModel().addListener(mxEvent.CHANGE,b),n.getModel().addListener(mxEvent.CHANGE,b));n.addListener(mxEvent.CELLS_ADDED,function(J,V){J=V.getProperty("cells");V=V.getProperty("parent");null!=V&&n.getModel().isLayer(V)&&!n.isCellVisible(V)&&null!=J&&0<J.length&&n.getModel().setVisible(V,!0)});this.gestureHandler=
+mxUtils.bind(this,function(J){null!=this.currentMenu&&mxEvent.getSource(J)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",
this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){n.view.validateBackground()}));this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){n.view.validateBackground()}));
n.addListener("gridSizeChanged",mxUtils.bind(this,function(){n.isGridEnabled()&&n.view.validateBackground()}));this.editor.resetGraph()}this.init();n.standalone||this.open()};EditorUi.compactUi=!0;
EditorUi.parsePng=function(b,e,k){function n(d,f){var g=t;t+=f;return d.substring(g,t)}function D(d){d=n(d,4);return d.charCodeAt(3)+(d.charCodeAt(2)<<8)+(d.charCodeAt(1)<<16)+(d.charCodeAt(0)<<24)}var t=0;if(n(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(n(b,4),"IHDR"!=n(b,4))null!=k&&k();else{n(b,17);do{k=D(b);var E=n(b,4);if(null!=e&&e(t-8,E,k))break;value=n(b,k);n(b,4);if("IEND"==E)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
@@ -2129,13 +2129,13 @@ EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipb
null;t.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=k.apply(this,arguments);b.updatePasteActionStates();return E};var n=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){n.apply(this,arguments);b.updatePasteActionStates()};var D=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(t,E){D.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var P=this.graph.getPageLayout(),R=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+P.x*R.width),this.scale*(this.translate.y+P.y*R.height),this.scale*P.width*R.width,
-this.scale*P.height*R.height)};b.getPreferredPageSize=function(P,R,fa){P=this.getPageLayout();R=this.getPageSize();return new mxRectangle(0,0,P.width*R.width,P.height*R.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,R,fa,la){if(null!=b.container&&!b.isViewer()){fa=null!=fa?fa:0;la=null!=la?la:0;var sa=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),u=mxUtils.hasScrollbars(b.container),J=b.view.translate,N=b.view.scale,
-W=mxRectangle.fromRectangle(sa);W.x=W.x/N-J.x;W.y=W.y/N-J.y;W.width/=N;W.height/=N;J=b.container.scrollTop;var T=b.container.scrollLeft,Q=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Q+=3;var Z=b.container.offsetWidth-Q;Q=b.container.offsetHeight-Q;P=P?Math.max(.3,Math.min(R||1,Z/W.width)):N;R=(Z-P*W.width)/2/P;var oa=0==this.lightboxVerticalDivider?0:(Q-P*W.height)/this.lightboxVerticalDivider/P;u&&(R=Math.max(R,0),oa=Math.max(oa,0));if(u||sa.width<Z||sa.height<
-Q)b.view.scaleAndTranslate(P,Math.floor(R-W.x),Math.floor(oa-W.y)),b.container.scrollTop=J*P/N,b.container.scrollLeft=T*P/N;else if(0!=fa||0!=la)sa=b.view.translate,b.view.setTranslate(Math.floor(sa.x+fa/N),Math.floor(sa.y+la/N))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var n=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",n);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",
+this.scale*P.height*R.height)};b.getPreferredPageSize=function(P,R,ia){P=this.getPageLayout();R=this.getPageSize();return new mxRectangle(0,0,P.width*R.width,P.height*R.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(P,R,ia,la){if(null!=b.container&&!b.isViewer()){ia=null!=ia?ia:0;la=null!=la?la:0;var ta=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),u=mxUtils.hasScrollbars(b.container),I=b.view.translate,N=b.view.scale,
+W=mxRectangle.fromRectangle(ta);W.x=W.x/N-I.x;W.y=W.y/N-I.y;W.width/=N;W.height/=N;I=b.container.scrollTop;var T=b.container.scrollLeft,Q=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)Q+=3;var Z=b.container.offsetWidth-Q;Q=b.container.offsetHeight-Q;P=P?Math.max(.3,Math.min(R||1,Z/W.width)):N;R=(Z-P*W.width)/2/P;var na=0==this.lightboxVerticalDivider?0:(Q-P*W.height)/this.lightboxVerticalDivider/P;u&&(R=Math.max(R,0),na=Math.max(na,0));if(u||ta.width<Z||ta.height<
+Q)b.view.scaleAndTranslate(P,Math.floor(R-W.x),Math.floor(na-W.y)),b.container.scrollTop=I*P/N,b.container.scrollLeft=T*P/N;else if(0!=ia||0!=la)ta=b.view.translate,b.view.setTranslate(Math.floor(ta.x+ia/N),Math.floor(ta.y+la/N))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var n=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",n);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",
n)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(P){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(P){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var D=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";
this.chromelessToolbar.style.overflow="hidden";this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var t=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",t);t();var E=0;t=mxUtils.bind(this,function(P,R,fa){E++;
-var la=document.createElement("span");la.style.paddingLeft="8px";la.style.paddingRight="8px";la.style.cursor="pointer";mxEvent.addListener(la,"click",P);null!=fa&&la.setAttribute("title",fa);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",R);P.style.width="36px";P.style.filter="invert(100%)";la.appendChild(P);this.chromelessToolbar.appendChild(la);return la});null!=D.backBtn&&t(mxUtils.bind(this,function(P){window.location.href=D.backBtn.url;mxEvent.consume(P)}),
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var t=mxUtils.bind(this,function(){var P=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=P?parseInt(P["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",t);t();var E=0;t=mxUtils.bind(this,function(P,R,ia){E++;
+var la=document.createElement("span");la.style.paddingLeft="8px";la.style.paddingRight="8px";la.style.cursor="pointer";mxEvent.addListener(la,"click",P);null!=ia&&la.setAttribute("title",ia);P=document.createElement("img");P.setAttribute("border","0");P.setAttribute("src",R);P.style.width="36px";P.style.filter="invert(100%)";la.appendChild(P);this.chromelessToolbar.appendChild(la);return la});null!=D.backBtn&&t(mxUtils.bind(this,function(P){window.location.href=D.backBtn.url;mxEvent.consume(P)}),
Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=t(mxUtils.bind(this,function(P){this.actions.get("previousPage").funct();mxEvent.consume(P)}),Editor.previousImage,mxResources.get("previousPage")),f=document.createElement("div");f.style.fontFamily=Editor.defaultHtmlFont;f.style.display="inline-block";f.style.verticalAlign="top";f.style.fontWeight="bold";f.style.marginTop="8px";f.style.fontSize="14px";f.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";
this.chromelessToolbar.appendChild(f);var g=t(mxUtils.bind(this,function(P){this.actions.get("nextPage").funct();mxEvent.consume(P)}),Editor.nextImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var q=mxUtils.bind(this,
function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",d.style.display="",f.style.display="inline-block"):(g.style.display="none",d.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",m)}t(mxUtils.bind(this,function(P){this.actions.get("zoomOut").funct();mxEvent.consume(P)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(P){this.actions.get("zoomIn").funct();
@@ -2150,18 +2150,18 @@ document.body))&&t(mxUtils.bind(this,function(P){"1"==urlParams.close||D.closeBt
(mxEvent.isShiftDown(P)||H(30),C())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(P){mxEvent.consume(P)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(P){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(P)?C():H(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(P){mxEvent.isShiftDown(P)?C():H(100);mxEvent.consume(P)}));mxEvent.addListener(this.chromelessToolbar,
"mouseleave",mxUtils.bind(this,function(P){mxEvent.isTouchEvent(P)||H(30)}));var ba=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(P,R){this.startX=R.getGraphX();this.startY=R.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(P,R){},mouseUp:function(P,R){mxEvent.isTouchEvent(R.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ba&&Math.abs(this.scrollTop-b.container.scrollTop)<
ba&&Math.abs(this.startX-R.getGraphX())<ba&&Math.abs(this.startY-R.getGraphY())<ba&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?C():H(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var Y=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var P=this.graph.getPagePadding(),R=this.graph.getPageSize();this.translate.x=P.x-(this.x0||0)*R.width;this.translate.y=P.y-(this.y0||0)*
-R.height}Y.apply(this,arguments)};if(!b.isViewer()){var pa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var P=this.getPageLayout(),R=this.getPagePadding(),fa=this.getPageSize(),la=Math.ceil(2*R.x+P.width*fa.width),sa=Math.ceil(2*R.y+P.height*fa.height),u=b.minimumGraphSize;if(null==u||u.width!=la||u.height!=sa)b.minimumGraphSize=new mxRectangle(0,0,la,sa);la=R.x-P.x*fa.width;R=R.y-P.y*fa.height;this.autoTranslate||this.view.translate.x==
-la&&this.view.translate.y==R?pa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=P.x,this.view.y0=P.y,P=b.view.translate.x,fa=b.view.translate.y,b.view.setTranslate(la,R),b.container.scrollLeft+=Math.round((la-P)*b.view.scale),b.container.scrollTop+=Math.round((R-fa)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var O=b.view.getBackgroundPane(),X=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ea=null,ka=null,
-ja=null,U=null,I=null,V=function(P){null!=ea&&window.clearTimeout(ea);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||U)ea=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),X.style.transformOrigin="",O.style.transformOrigin="",mxClient.IS_SF?
-(X.style.transform="scale(1)",O.style.transform="scale(1)",window.setTimeout(function(){X.style.transform="";O.style.transform=""},0)):(X.style.transform="",O.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var R=new mxPoint(b.container.scrollLeft,b.container.scrollTop),fa=mxUtils.getOffset(b.container),la=b.view.scale,sa=0,u=0;null!=ka&&(sa=b.container.offsetWidth/2-ka.x+fa.x,u=b.container.offsetHeight/2-ka.y+fa.y);b.zoom(b.cumulativeZoomFactor,
-null,b.isFastZoomEnabled()?20:null);b.view.scale!=la&&(null!=ja&&(sa+=R.x-ja.x,u+=R.y-ja.y),null!=e&&k.chromelessResize(!1,null,sa*(b.cumulativeZoomFactor-1),u*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==sa&&0==u||(b.container.scrollLeft-=sa*(b.cumulativeZoomFactor-1),b.container.scrollTop-=u*(b.cumulativeZoomFactor-1)));null!=I&&X.setAttribute("filter",I);b.cumulativeZoomFactor=1;I=U=ka=ja=ea=null}),null!=P?P:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
-function(P,R,fa,la){la=null!=la?la:this.zoomFactor;(R=R||!b.scrollbars)&&(ka=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
-(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==I&&""!=X.getAttribute("filter")&&(I=X.getAttribute("filter"),X.removeAttribute("filter")),ja=new mxPoint(b.container.scrollLeft,b.container.scrollTop),P=R||null==ka?b.container.scrollLeft+
+R.height}Y.apply(this,arguments)};if(!b.isViewer()){var pa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var P=this.getPageLayout(),R=this.getPagePadding(),ia=this.getPageSize(),la=Math.ceil(2*R.x+P.width*ia.width),ta=Math.ceil(2*R.y+P.height*ia.height),u=b.minimumGraphSize;if(null==u||u.width!=la||u.height!=ta)b.minimumGraphSize=new mxRectangle(0,0,la,ta);la=R.x-P.x*ia.width;R=R.y-P.y*ia.height;this.autoTranslate||this.view.translate.x==
+la&&this.view.translate.y==R?pa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=P.x,this.view.y0=P.y,P=b.view.translate.x,ia=b.view.translate.y,b.view.setTranslate(la,R),b.container.scrollLeft+=Math.round((la-P)*b.view.scale),b.container.scrollTop+=Math.round((R-ia)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var O=b.view.getBackgroundPane(),X=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ea=null,ka=null,
+ja=null,U=null,J=null,V=function(P){null!=ea&&window.clearTimeout(ea);0<=P&&window.setTimeout(function(){if(!b.isMouseDown||U)ea=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),X.style.transformOrigin="",O.style.transformOrigin="",mxClient.IS_SF?
+(X.style.transform="scale(1)",O.style.transform="scale(1)",window.setTimeout(function(){X.style.transform="";O.style.transform=""},0)):(X.style.transform="",O.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var R=new mxPoint(b.container.scrollLeft,b.container.scrollTop),ia=mxUtils.getOffset(b.container),la=b.view.scale,ta=0,u=0;null!=ka&&(ta=b.container.offsetWidth/2-ka.x+ia.x,u=b.container.offsetHeight/2-ka.y+ia.y);b.zoom(b.cumulativeZoomFactor,
+null,b.isFastZoomEnabled()?20:null);b.view.scale!=la&&(null!=ja&&(ta+=R.x-ja.x,u+=R.y-ja.y),null!=e&&k.chromelessResize(!1,null,ta*(b.cumulativeZoomFactor-1),u*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==ta&&0==u||(b.container.scrollLeft-=ta*(b.cumulativeZoomFactor-1),b.container.scrollTop-=u*(b.cumulativeZoomFactor-1)));null!=J&&X.setAttribute("filter",J);b.cumulativeZoomFactor=1;J=U=ka=ja=ea=null}),null!=P?P:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
+function(P,R,ia,la){la=null!=la?la:this.zoomFactor;(R=R||!b.scrollbars)&&(ka=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));P?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==J&&""!=X.getAttribute("filter")&&(J=X.getAttribute("filter"),X.removeAttribute("filter")),ja=new mxPoint(b.container.scrollLeft,b.container.scrollTop),P=R||null==ka?b.container.scrollLeft+
b.container.clientWidth/2:ka.x+b.container.scrollLeft-b.container.offsetLeft,la=R||null==ka?b.container.scrollTop+b.container.clientHeight/2:ka.y+b.container.scrollTop-b.container.offsetTop,X.style.transformOrigin=P+"px "+la+"px",X.style.transform="scale("+this.cumulativeZoomFactor+")",O.style.transformOrigin=P+"px "+la+"px",O.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(P=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(P.style,
"transform-origin",(R||null==ka?b.container.clientWidth/2+b.container.scrollLeft-P.offsetLeft+"px":ka.x+b.container.scrollLeft-P.offsetLeft-b.container.offsetLeft+"px")+" "+(R||null==ka?b.container.clientHeight/2+b.container.scrollTop-P.offsetTop+"px":ka.y+b.container.scrollTop-P.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(P.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
-k.hoverIcons.reset());V(b.isFastZoomEnabled()?fa:0)};mxEvent.addGestureListeners(b.container,function(P){null!=ea&&window.clearTimeout(ea)},null,function(P){1!=b.cumulativeZoomFactor&&V(0)});mxEvent.addListener(b.container,"scroll",function(P){null==ea||b.isMouseDown||1==b.cumulativeZoomFactor||V(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,R,fa,la,sa){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!fa&&b.isScrollWheelEvent(P))fa=
-b.view.getTranslate(),la=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(fa.x+(R?-la:la),fa.y):b.view.setTranslate(fa.x,fa.y+(R?la:-la));else if(fa||b.isZoomWheelEvent(P))for(var u=mxEvent.getSource(P);null!=u;){if(u==b.container)return b.tooltipHandler.hideTooltip(),ka=null!=la&&null!=sa?new mxPoint(la,sa):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),U=fa,fa=b.zoomFactor,la=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?fa=1+Math.abs(P.deltaY)/
-20*(fa-1):null!=P.movementY&&"pointermove"==P.type&&(fa=1+Math.max(1,Math.abs(P.movementY))/20*(fa-1),la=-1),b.lazyZoom(R,null,la,fa),mxEvent.consume(P),!1;u=u.parentNode}}),b.container);b.panningHandler.zoomGraph=function(P){b.cumulativeZoomFactor=P.scale;b.lazyZoom(0<P.scale,!0);mxEvent.consume(P)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
+k.hoverIcons.reset());V(b.isFastZoomEnabled()?ia:0)};mxEvent.addGestureListeners(b.container,function(P){null!=ea&&window.clearTimeout(ea)},null,function(P){1!=b.cumulativeZoomFactor&&V(0)});mxEvent.addListener(b.container,"scroll",function(P){null==ea||b.isMouseDown||1==b.cumulativeZoomFactor||V(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(P,R,ia,la,ta){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!ia&&b.isScrollWheelEvent(P))ia=
+b.view.getTranslate(),la=40/b.view.scale,mxEvent.isShiftDown(P)?b.view.setTranslate(ia.x+(R?-la:la),ia.y):b.view.setTranslate(ia.x,ia.y+(R?la:-la));else if(ia||b.isZoomWheelEvent(P))for(var u=mxEvent.getSource(P);null!=u;){if(u==b.container)return b.tooltipHandler.hideTooltip(),ka=null!=la&&null!=ta?new mxPoint(la,ta):new mxPoint(mxEvent.getClientX(P),mxEvent.getClientY(P)),U=ia,ia=b.zoomFactor,la=null,P.ctrlKey&&null!=P.deltaY&&40>Math.abs(P.deltaY)&&Math.round(P.deltaY)!=P.deltaY?ia=1+Math.abs(P.deltaY)/
+20*(ia-1):null!=P.movementY&&"pointermove"==P.type&&(ia=1+Math.max(1,Math.abs(P.movementY))/20*(ia-1),la=-1),b.lazyZoom(R,null,la,ia),mxEvent.consume(P),!1;u=u.parentNode}}),b.container);b.panningHandler.zoomGraph=function(P){b.cumulativeZoomFactor=P.scale;b.lazyZoom(0<P.scale,!0);mxEvent.consume(P)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
@@ -2257,35 +2257,35 @@ mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxGraph.prototype.pageBreakColor="#c0c0c0"
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};
-Graph=function(b,e,k,n,D,t){mxGraph.call(this,b,e,k,n);this.themes=D||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=t?t:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(I){I=this.getCurrentCellStyle(I);
-return null!=I?"1"==I.html||"wrap"==I[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,d=null,f=null,g=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){I=V.getProperty("event");var P=I.getState();V=this.view.scale;if(!mxEvent.isAltDown(I.getEvent())&&null!=P)if(this.model.isEdge(P.cell))if(E=new mxPoint(I.getGraphX(),I.getGraphY()),m=this.isCellSelected(P.cell),f=P,d=I,null!=P.text&&null!=
-P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,I.getGraphX(),I.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var R=this.selectionCellsHandler.getHandler(P.cell);null!=R&&null!=R.bends&&0<R.bends.length&&(g=R.getHandleForEvent(I))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(I.getEvent())&&(R=this.selectionCellsHandler.getHandler(P.cell),null==R||null==R.getHandleForEvent(I))){var fa=new mxRectangle(I.getGraphX()-1,I.getGraphY()-1),la=mxEvent.isTouchEvent(I.getEvent())?mxShape.prototype.svgStrokeTolerance-
-1:(mxShape.prototype.svgStrokeTolerance+2)/2;R=la+2;fa.grow(la);if(this.isTableCell(P.cell)&&!this.isCellSelected(P.cell)&&!(mxUtils.contains(P,I.getGraphX()-R,I.getGraphY()-R)&&mxUtils.contains(P,I.getGraphX()-R,I.getGraphY()+R)&&mxUtils.contains(P,I.getGraphX()+R,I.getGraphY()+R)&&mxUtils.contains(P,I.getGraphX()+R,I.getGraphY()-R))){var sa=this.model.getParent(P.cell);R=this.model.getParent(sa);if(!this.isCellSelected(R)){la*=V;var u=2*la;if(this.model.getChildAt(R,0)!=sa&&mxUtils.intersects(fa,
-new mxRectangle(P.x,P.y-la,P.width,u))||this.model.getChildAt(sa,0)!=P.cell&&mxUtils.intersects(fa,new mxRectangle(P.x-la,P.y,u,P.height))||mxUtils.intersects(fa,new mxRectangle(P.x,P.y+P.height-la,P.width,u))||mxUtils.intersects(fa,new mxRectangle(P.x+P.width-la,P.y,u,P.height)))sa=this.selectionCellsHandler.isHandled(R),this.selectCellForEvent(R,I.getEvent()),R=this.selectionCellsHandler.getHandler(R),null!=R&&(la=R.getHandleForEvent(I),null!=la&&(R.start(I.getGraphX(),I.getGraphY(),la),R.blockDelayedSelection=
-!sa,I.consume()))}}for(;!I.isConsumed()&&null!=P&&(this.isTableCell(P.cell)||this.isTableRow(P.cell)||this.isTable(P.cell));)this.isSwimlane(P.cell)&&(R=this.getActualStartSize(P.cell),(0<R.x||0<R.width)&&mxUtils.intersects(fa,new mxRectangle(P.x+(R.x-R.width-1)*V+(0==R.x?P.width:0),P.y,1,P.height))||(0<R.y||0<R.height)&&mxUtils.intersects(fa,new mxRectangle(P.x,P.y+(R.y-R.height-1)*V+(0==R.y?P.height:0),P.width,1)))&&(this.selectCellForEvent(P.cell,I.getEvent()),R=this.selectionCellsHandler.getHandler(P.cell),
-null!=R&&(la=mxEvent.CUSTOM_HANDLE-R.customHandles.length+1,R.start(I.getGraphX(),I.getGraphY(),la),I.consume())),P=this.view.getState(this.model.getParent(P.cell))}}}));this.addMouseListener({mouseDown:function(I,V){},mouseMove:mxUtils.bind(this,function(I,V){I=this.selectionCellsHandler.handlers.map;for(var P in I)if(null!=I[P].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var R=this.tolerance;if(null!=E&&null!=f&&null!=d){if(P=f,Math.abs(E.x-
-V.getGraphX())>R||Math.abs(E.y-V.getGraphY())>R){var fa=this.selectionCellsHandler.getHandler(P.cell);null==fa&&this.model.isEdge(P.cell)&&(fa=this.createHandler(P));if(null!=fa&&null!=fa.bends&&0<fa.bends.length){I=fa.getHandleForEvent(d);var la=this.view.getEdgeStyle(P);R=la==mxEdgeStyle.EntityRelation;m||g!=mxEvent.LABEL_HANDLE||(I=g);if(R&&0!=I&&I!=fa.bends.length-1&&I!=mxEvent.LABEL_HANDLE)!R||null==P.visibleSourceState&&null==P.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(I==
-mxEvent.LABEL_HANDLE||0==I||null!=P.visibleSourceState||I==fa.bends.length-1||null!=P.visibleTargetState)R||I==mxEvent.LABEL_HANDLE||(R=P.absolutePoints,null!=R&&(null==la&&null==I||la==mxEdgeStyle.OrthConnector)&&(I=g,null==I&&(I=new mxRectangle(E.x,E.y),I.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(I,R[0].x,R[0].y)?I=0:mxUtils.contains(I,R[R.length-1].x,R[R.length-1].y)?I=fa.bends.length-1:null!=la&&(2==R.length||3==R.length&&(0==Math.round(R[0].x-R[1].x)&&0==Math.round(R[1].x-
-R[2].x)||0==Math.round(R[0].y-R[1].y)&&0==Math.round(R[1].y-R[2].y)))?I=2:(I=mxUtils.findNearestSegment(P,E.x,E.y),I=null==la?mxEvent.VIRTUAL_HANDLE-I:I+1))),null==I&&(I=mxEvent.VIRTUAL_HANDLE)),fa.start(V.getGraphX(),V.getGraphX(),I),V.consume(),this.graphHandler.reset()}null!=fa&&(this.selectionCellsHandler.isHandlerActive(fa)?this.isCellSelected(P.cell)||(this.selectionCellsHandler.handlers.put(P.cell,fa),this.selectCellForEvent(P.cell,V.getEvent())):this.isCellSelected(P.cell)||fa.destroy());
-m=!1;E=d=f=g=null}}else if(P=V.getState(),null!=P&&this.isCellEditable(P.cell)){fa=null;if(this.model.isEdge(P.cell)){if(I=new mxRectangle(V.getGraphX(),V.getGraphY()),I.grow(mxEdgeHandler.prototype.handleImage.width/2),R=P.absolutePoints,null!=R)if(null!=P.text&&null!=P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,V.getGraphX(),V.getGraphY()))fa="move";else if(mxUtils.contains(I,R[0].x,R[0].y)||mxUtils.contains(I,R[R.length-1].x,R[R.length-1].y))fa="pointer";else if(null!=P.visibleSourceState||
-null!=P.visibleTargetState)I=this.view.getEdgeStyle(P),fa="crosshair",I!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(P)&&(V=mxUtils.findNearestSegment(P,V.getGraphX(),V.getGraphY()),V<R.length-1&&0<=V&&(fa=0==Math.round(R[V].x-R[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){R=mxShape.prototype.svgStrokeTolerance/2;I=new mxRectangle(V.getGraphX(),V.getGraphY());I.grow(R);if(this.isTableCell(P.cell)&&(V=this.model.getParent(P.cell),R=this.model.getParent(V),!this.isCellSelected(R)))if(mxUtils.intersects(I,
-new mxRectangle(P.x,P.y-2,P.width,4))&&this.model.getChildAt(R,0)!=V||mxUtils.intersects(I,new mxRectangle(P.x,P.y+P.height-2,P.width,4)))fa="row-resize";else if(mxUtils.intersects(I,new mxRectangle(P.x-2,P.y,4,P.height))&&this.model.getChildAt(V,0)!=P.cell||mxUtils.intersects(I,new mxRectangle(P.x+P.width-2,P.y,4,P.height)))fa="col-resize";for(V=P;null==fa&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(R=this.getActualStartSize(V.cell),
-la=this.view.scale,(0<R.x||0<R.width)&&mxUtils.intersects(I,new mxRectangle(V.x+(R.x-R.width-1)*la+(0==R.x?V.width*la:0),V.y,1,V.height))?fa="col-resize":(0<R.y||0<R.height)&&mxUtils.intersects(I,new mxRectangle(V.x,V.y+(R.y-R.height-1)*la+(0==R.y?V.height:0),V.width,1))&&(fa="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=fa&&P.setCursor(fa)}}}),mouseUp:mxUtils.bind(this,function(I,V){g=E=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=
-function(I){var V=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);I.view.graph.isHtmlLabel(I.cell)&&(V=1!=I.style.html?mxUtils.htmlEntities(V,!1):I.view.graph.sanitizeHtml(V));return V};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=
-!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(I,V){return!1};this.alternateEdgeStyle="vertical";null==n&&this.loadStylesheet();var q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var I=q.apply(this,arguments);if(this.graph.pageVisible){var V=[],P=this.graph.pageFormat,R=this.graph.pageScale,fa=P.width*R;P=P.height*R;R=this.graph.view.translate;for(var la=this.graph.view.scale,
-sa=this.graph.getPageLayout(),u=0;u<sa.width;u++)V.push(new mxRectangle(((sa.x+u)*fa+R.x)*la,(sa.y*P+R.y)*la,fa*la,P*la));for(u=1;u<sa.height;u++)V.push(new mxRectangle((sa.x*fa+R.x)*la,((sa.y+u)*P+R.y)*la,fa*la,P*la));I=V.concat(I)}return I};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(I,V){return null==I.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(I){this.previewColor="#000000"==this.graph.background?
-"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var y=this.graphHandler.getCells;this.graphHandler.getCells=function(I){for(var V=y.apply(this,arguments),P=new mxDictionary,R=[],fa=0;fa<V.length;fa++){var la=this.graph.isTableCell(I)&&this.graph.isTableCell(V[fa])&&this.graph.isCellSelected(V[fa])?this.graph.model.getParent(V[fa]):this.graph.isTableRow(I)&&this.graph.isTableRow(V[fa])&&this.graph.isCellSelected(V[fa])?V[fa]:
-this.graph.getCompositeParent(V[fa]);null==la||P.get(la)||(P.put(la,!0),R.push(la))}return R};var F=this.graphHandler.start;this.graphHandler.start=function(I,V,P,R){var fa=!1;this.graph.isTableCell(I)&&(this.graph.isCellSelected(I)?fa=!0:I=this.graph.model.getParent(I));fa||this.graph.isTableRow(I)&&this.graph.isCellSelected(I)||(I=this.graph.getCompositeParent(I));F.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(I,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,
-arguments)};var C=new mxRubberband(this);this.getRubberband=function(){return C};var H=(new Date).getTime(),G=0,aa=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var I=this.currentState;aa.apply(this,arguments);I!=this.currentState?(H=(new Date).getTime(),G=0):G=(new Date).getTime()-H};var da=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(I){return mxEvent.isShiftDown(I.getEvent())&&mxEvent.isAltDown(I.getEvent())?!1:
-null!=this.currentState&&I.getState()==this.currentState&&2E3<G||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&da.apply(this,arguments)};var ba=this.isToggleEvent;this.isToggleEvent=function(I){return ba.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(I)};var Y=C.isForceRubberbandEvent;C.isForceRubberbandEvent=function(I){return Y.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(I.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&
-mxClient.IS_FF&&mxClient.IS_WIN&&null==I.getState()&&mxEvent.isTouchEvent(I.getEvent())};var pa=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(pa=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=pa)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(I){return mxEvent.isMouseEvent(I.getEvent())};
-var O=this.click;this.click=function(I){var V=null==I.state&&null!=I.sourceState&&this.isCellLocked(I.sourceState.cell);if(this.isEnabled()&&!V||I.isConsumed())return O.apply(this,arguments);var P=V?I.sourceState.cell:I.getCell();null!=P&&(P=this.getClickableLinkForCell(P),null!=P&&(this.isCustomLink(P)?this.customLinkClicked(P):this.openLink(P)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(I){return I.sourceState};var X=this.tooltipHandler.show;this.tooltipHandler.show=
-function(){X.apply(this,arguments);if(null!=this.div)for(var I=this.div.getElementsByTagName("a"),V=0;V<I.length;V++)null!=I[V].getAttribute("href")&&null==I[V].getAttribute("target")&&I[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(I){return I.sourceState};this.getCursorForMouseEvent=function(I){var V=null==I.state&&null!=I.sourceState&&this.isCellLocked(I.sourceState.cell);return this.getCursorForCell(V?I.sourceState.cell:I.getCell())};var ea=this.getCursorForCell;
-this.getCursorForCell=function(I){if(!this.isEnabled()||this.isCellLocked(I)){if(null!=this.getClickableLinkForCell(I))return"pointer";if(this.isCellLocked(I))return"default"}return ea.apply(this,arguments)};this.selectRegion=function(I,V){var P=mxEvent.isAltDown(V)?I:null;I=this.getCells(I.x,I.y,I.width,I.height,null,null,P,function(R){return"1"==mxUtils.getValue(R.style,"locked","0")},!0);if(this.isToggleEvent(V))for(P=0;P<I.length;P++)this.selectCellForEvent(I[P],V);else this.selectCellsForEvent(I,
-V);return I};var ka=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(I,V,P){return this.graph.isCellSelected(I)?!1:ka.apply(this,arguments)};this.isCellLocked=function(I){for(;null!=I;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(I),"locked","0"))return!0;I=this.model.getParent(I)}return!1};var ja=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(I,V){"mouseDown"==V.getProperty("eventName")&&(I=V.getProperty("event").getState(),
-ja=null==I||this.isSelectionEmpty()||this.isCellSelected(I.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(I,V){if(!mxEvent.isMultiTouchEvent(V)){I=V.getProperty("event");var P=V.getProperty("cell");null==P?(I=mxUtils.convertPoint(this.container,mxEvent.getClientX(I),mxEvent.getClientY(I)),C.start(I.x,I.y)):null!=ja?this.addSelectionCells(ja):1<this.getSelectionCount()&&this.isCellSelected(P)&&this.removeSelectionCell(P);ja=null;V.consume()}}));
-this.connectionHandler.selectCells=function(I,V){this.graph.setSelectionCell(V||I)};this.connectionHandler.constraintHandler.isStateIgnored=function(I,V){var P=I.view.graph;return V&&(P.isCellSelected(I.cell)||P.isTableRow(I.cell)&&P.selectionCellsHandler.isHandled(P.model.getParent(I.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var I=this.connectionHandler.constraintHandler;null!=I.currentFocus&&I.isStateIgnored(I.currentFocus,!0)&&(I.currentFocus=null,I.constraints=
-null,I.destroyIcons());I.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var U=this.updateMouseEvent;this.updateMouseEvent=function(I){I=U.apply(this,arguments);null!=I.state&&this.isCellLocked(I.getCell())&&(I.state=null);return I}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
+Graph=function(b,e,k,n,D,t){mxGraph.call(this,b,e,k,n);this.themes=D||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=t?t:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(J){J=this.getCurrentCellStyle(J);
+return null!=J?"1"==J.html||"wrap"==J[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,d=null,f=null,g=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,V){if("mouseDown"==V.getProperty("eventName")&&this.isEnabled()){J=V.getProperty("event");var P=J.getState();V=this.view.scale;if(!mxEvent.isAltDown(J.getEvent())&&null!=P)if(this.model.isEdge(P.cell))if(E=new mxPoint(J.getGraphX(),J.getGraphY()),m=this.isCellSelected(P.cell),f=P,d=J,null!=P.text&&null!=
+P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,J.getGraphX(),J.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var R=this.selectionCellsHandler.getHandler(P.cell);null!=R&&null!=R.bends&&0<R.bends.length&&(g=R.getHandleForEvent(J))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(J.getEvent())&&(R=this.selectionCellsHandler.getHandler(P.cell),null==R||null==R.getHandleForEvent(J))){var ia=new mxRectangle(J.getGraphX()-1,J.getGraphY()-1),la=mxEvent.isTouchEvent(J.getEvent())?mxShape.prototype.svgStrokeTolerance-
+1:(mxShape.prototype.svgStrokeTolerance+2)/2;R=la+2;ia.grow(la);if(this.isTableCell(P.cell)&&!this.isCellSelected(P.cell)&&!(mxUtils.contains(P,J.getGraphX()-R,J.getGraphY()-R)&&mxUtils.contains(P,J.getGraphX()-R,J.getGraphY()+R)&&mxUtils.contains(P,J.getGraphX()+R,J.getGraphY()+R)&&mxUtils.contains(P,J.getGraphX()+R,J.getGraphY()-R))){var ta=this.model.getParent(P.cell);R=this.model.getParent(ta);if(!this.isCellSelected(R)){la*=V;var u=2*la;if(this.model.getChildAt(R,0)!=ta&&mxUtils.intersects(ia,
+new mxRectangle(P.x,P.y-la,P.width,u))||this.model.getChildAt(ta,0)!=P.cell&&mxUtils.intersects(ia,new mxRectangle(P.x-la,P.y,u,P.height))||mxUtils.intersects(ia,new mxRectangle(P.x,P.y+P.height-la,P.width,u))||mxUtils.intersects(ia,new mxRectangle(P.x+P.width-la,P.y,u,P.height)))ta=this.selectionCellsHandler.isHandled(R),this.selectCellForEvent(R,J.getEvent()),R=this.selectionCellsHandler.getHandler(R),null!=R&&(la=R.getHandleForEvent(J),null!=la&&(R.start(J.getGraphX(),J.getGraphY(),la),R.blockDelayedSelection=
+!ta,J.consume()))}}for(;!J.isConsumed()&&null!=P&&(this.isTableCell(P.cell)||this.isTableRow(P.cell)||this.isTable(P.cell));)this.isSwimlane(P.cell)&&(R=this.getActualStartSize(P.cell),(0<R.x||0<R.width)&&mxUtils.intersects(ia,new mxRectangle(P.x+(R.x-R.width-1)*V+(0==R.x?P.width:0),P.y,1,P.height))||(0<R.y||0<R.height)&&mxUtils.intersects(ia,new mxRectangle(P.x,P.y+(R.y-R.height-1)*V+(0==R.y?P.height:0),P.width,1)))&&(this.selectCellForEvent(P.cell,J.getEvent()),R=this.selectionCellsHandler.getHandler(P.cell),
+null!=R&&(la=mxEvent.CUSTOM_HANDLE-R.customHandles.length+1,R.start(J.getGraphX(),J.getGraphY(),la),J.consume())),P=this.view.getState(this.model.getParent(P.cell))}}}));this.addMouseListener({mouseDown:function(J,V){},mouseMove:mxUtils.bind(this,function(J,V){J=this.selectionCellsHandler.handlers.map;for(var P in J)if(null!=J[P].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(V.getEvent())){var R=this.tolerance;if(null!=E&&null!=f&&null!=d){if(P=f,Math.abs(E.x-
+V.getGraphX())>R||Math.abs(E.y-V.getGraphY())>R){var ia=this.selectionCellsHandler.getHandler(P.cell);null==ia&&this.model.isEdge(P.cell)&&(ia=this.createHandler(P));if(null!=ia&&null!=ia.bends&&0<ia.bends.length){J=ia.getHandleForEvent(d);var la=this.view.getEdgeStyle(P);R=la==mxEdgeStyle.EntityRelation;m||g!=mxEvent.LABEL_HANDLE||(J=g);if(R&&0!=J&&J!=ia.bends.length-1&&J!=mxEvent.LABEL_HANDLE)!R||null==P.visibleSourceState&&null==P.visibleTargetState||(this.graphHandler.reset(),V.consume());else if(J==
+mxEvent.LABEL_HANDLE||0==J||null!=P.visibleSourceState||J==ia.bends.length-1||null!=P.visibleTargetState)R||J==mxEvent.LABEL_HANDLE||(R=P.absolutePoints,null!=R&&(null==la&&null==J||la==mxEdgeStyle.OrthConnector)&&(J=g,null==J&&(J=new mxRectangle(E.x,E.y),J.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(J,R[0].x,R[0].y)?J=0:mxUtils.contains(J,R[R.length-1].x,R[R.length-1].y)?J=ia.bends.length-1:null!=la&&(2==R.length||3==R.length&&(0==Math.round(R[0].x-R[1].x)&&0==Math.round(R[1].x-
+R[2].x)||0==Math.round(R[0].y-R[1].y)&&0==Math.round(R[1].y-R[2].y)))?J=2:(J=mxUtils.findNearestSegment(P,E.x,E.y),J=null==la?mxEvent.VIRTUAL_HANDLE-J:J+1))),null==J&&(J=mxEvent.VIRTUAL_HANDLE)),ia.start(V.getGraphX(),V.getGraphX(),J),V.consume(),this.graphHandler.reset()}null!=ia&&(this.selectionCellsHandler.isHandlerActive(ia)?this.isCellSelected(P.cell)||(this.selectionCellsHandler.handlers.put(P.cell,ia),this.selectCellForEvent(P.cell,V.getEvent())):this.isCellSelected(P.cell)||ia.destroy());
+m=!1;E=d=f=g=null}}else if(P=V.getState(),null!=P&&this.isCellEditable(P.cell)){ia=null;if(this.model.isEdge(P.cell)){if(J=new mxRectangle(V.getGraphX(),V.getGraphY()),J.grow(mxEdgeHandler.prototype.handleImage.width/2),R=P.absolutePoints,null!=R)if(null!=P.text&&null!=P.text.boundingBox&&mxUtils.contains(P.text.boundingBox,V.getGraphX(),V.getGraphY()))ia="move";else if(mxUtils.contains(J,R[0].x,R[0].y)||mxUtils.contains(J,R[R.length-1].x,R[R.length-1].y))ia="pointer";else if(null!=P.visibleSourceState||
+null!=P.visibleTargetState)J=this.view.getEdgeStyle(P),ia="crosshair",J!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(P)&&(V=mxUtils.findNearestSegment(P,V.getGraphX(),V.getGraphY()),V<R.length-1&&0<=V&&(ia=0==Math.round(R[V].x-R[V+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(V.getEvent())){R=mxShape.prototype.svgStrokeTolerance/2;J=new mxRectangle(V.getGraphX(),V.getGraphY());J.grow(R);if(this.isTableCell(P.cell)&&(V=this.model.getParent(P.cell),R=this.model.getParent(V),!this.isCellSelected(R)))if(mxUtils.intersects(J,
+new mxRectangle(P.x,P.y-2,P.width,4))&&this.model.getChildAt(R,0)!=V||mxUtils.intersects(J,new mxRectangle(P.x,P.y+P.height-2,P.width,4)))ia="row-resize";else if(mxUtils.intersects(J,new mxRectangle(P.x-2,P.y,4,P.height))&&this.model.getChildAt(V,0)!=P.cell||mxUtils.intersects(J,new mxRectangle(P.x+P.width-2,P.y,4,P.height)))ia="col-resize";for(V=P;null==ia&&null!=V&&(this.isTableCell(V.cell)||this.isTableRow(V.cell)||this.isTable(V.cell));)this.isSwimlane(V.cell)&&(R=this.getActualStartSize(V.cell),
+la=this.view.scale,(0<R.x||0<R.width)&&mxUtils.intersects(J,new mxRectangle(V.x+(R.x-R.width-1)*la+(0==R.x?V.width*la:0),V.y,1,V.height))?ia="col-resize":(0<R.y||0<R.height)&&mxUtils.intersects(J,new mxRectangle(V.x,V.y+(R.y-R.height-1)*la+(0==R.y?V.height:0),V.width,1))&&(ia="row-resize")),V=this.view.getState(this.model.getParent(V.cell))}null!=ia&&P.setCursor(ia)}}}),mouseUp:mxUtils.bind(this,function(J,V){g=E=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=
+function(J){var V=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);J.view.graph.isHtmlLabel(J.cell)&&(V=1!=J.style.html?mxUtils.htmlEntities(V,!1):J.view.graph.sanitizeHtml(V));return V};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=
+!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(J,V){return!1};this.alternateEdgeStyle="vertical";null==n&&this.loadStylesheet();var q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var J=q.apply(this,arguments);if(this.graph.pageVisible){var V=[],P=this.graph.pageFormat,R=this.graph.pageScale,ia=P.width*R;P=P.height*R;R=this.graph.view.translate;for(var la=this.graph.view.scale,
+ta=this.graph.getPageLayout(),u=0;u<ta.width;u++)V.push(new mxRectangle(((ta.x+u)*ia+R.x)*la,(ta.y*P+R.y)*la,ia*la,P*la));for(u=1;u<ta.height;u++)V.push(new mxRectangle((ta.x*ia+R.x)*la,((ta.y+u)*P+R.y)*la,ia*la,P*la));J=V.concat(J)}return J};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(J,V){return null==J.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(J){this.previewColor="#000000"==this.graph.background?
+"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var y=this.graphHandler.getCells;this.graphHandler.getCells=function(J){for(var V=y.apply(this,arguments),P=new mxDictionary,R=[],ia=0;ia<V.length;ia++){var la=this.graph.isTableCell(J)&&this.graph.isTableCell(V[ia])&&this.graph.isCellSelected(V[ia])?this.graph.model.getParent(V[ia]):this.graph.isTableRow(J)&&this.graph.isTableRow(V[ia])&&this.graph.isCellSelected(V[ia])?V[ia]:
+this.graph.getCompositeParent(V[ia]);null==la||P.get(la)||(P.put(la,!0),R.push(la))}return R};var F=this.graphHandler.start;this.graphHandler.start=function(J,V,P,R){var ia=!1;this.graph.isTableCell(J)&&(this.graph.isCellSelected(J)?ia=!0:J=this.graph.model.getParent(J));ia||this.graph.isTableRow(J)&&this.graph.isCellSelected(J)||(J=this.graph.getCompositeParent(J));F.apply(this,arguments)};this.connectionHandler.createTargetVertex=function(J,V){V=this.graph.getCompositeParent(V);return mxConnectionHandler.prototype.createTargetVertex.apply(this,
+arguments)};var C=new mxRubberband(this);this.getRubberband=function(){return C};var H=(new Date).getTime(),G=0,aa=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var J=this.currentState;aa.apply(this,arguments);J!=this.currentState?(H=(new Date).getTime(),G=0):G=(new Date).getTime()-H};var da=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(J){return mxEvent.isShiftDown(J.getEvent())&&mxEvent.isAltDown(J.getEvent())?!1:
+null!=this.currentState&&J.getState()==this.currentState&&2E3<G||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&da.apply(this,arguments)};var ba=this.isToggleEvent;this.isToggleEvent=function(J){return ba.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(J)};var Y=C.isForceRubberbandEvent;C.isForceRubberbandEvent=function(J){return Y.apply(this,arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(J.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&
+mxClient.IS_FF&&mxClient.IS_WIN&&null==J.getState()&&mxEvent.isTouchEvent(J.getEvent())};var pa=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(pa=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=pa)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(J){return mxEvent.isMouseEvent(J.getEvent())};
+var O=this.click;this.click=function(J){var V=null==J.state&&null!=J.sourceState&&this.isCellLocked(J.sourceState.cell);if(this.isEnabled()&&!V||J.isConsumed())return O.apply(this,arguments);var P=V?J.sourceState.cell:J.getCell();null!=P&&(P=this.getClickableLinkForCell(P),null!=P&&(this.isCustomLink(P)?this.customLinkClicked(P):this.openLink(P)));this.isEnabled()&&V&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(J){return J.sourceState};var X=this.tooltipHandler.show;this.tooltipHandler.show=
+function(){X.apply(this,arguments);if(null!=this.div)for(var J=this.div.getElementsByTagName("a"),V=0;V<J.length;V++)null!=J[V].getAttribute("href")&&null==J[V].getAttribute("target")&&J[V].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(J){return J.sourceState};this.getCursorForMouseEvent=function(J){var V=null==J.state&&null!=J.sourceState&&this.isCellLocked(J.sourceState.cell);return this.getCursorForCell(V?J.sourceState.cell:J.getCell())};var ea=this.getCursorForCell;
+this.getCursorForCell=function(J){if(!this.isEnabled()||this.isCellLocked(J)){if(null!=this.getClickableLinkForCell(J))return"pointer";if(this.isCellLocked(J))return"default"}return ea.apply(this,arguments)};this.selectRegion=function(J,V){var P=mxEvent.isAltDown(V)?J:null;J=this.getCells(J.x,J.y,J.width,J.height,null,null,P,function(R){return"1"==mxUtils.getValue(R.style,"locked","0")},!0);if(this.isToggleEvent(V))for(P=0;P<J.length;P++)this.selectCellForEvent(J[P],V);else this.selectCellsForEvent(J,
+V);return J};var ka=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(J,V,P){return this.graph.isCellSelected(J)?!1:ka.apply(this,arguments)};this.isCellLocked=function(J){for(;null!=J;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(J),"locked","0"))return!0;J=this.model.getParent(J)}return!1};var ja=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(J,V){"mouseDown"==V.getProperty("eventName")&&(J=V.getProperty("event").getState(),
+ja=null==J||this.isSelectionEmpty()||this.isCellSelected(J.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(J,V){if(!mxEvent.isMultiTouchEvent(V)){J=V.getProperty("event");var P=V.getProperty("cell");null==P?(J=mxUtils.convertPoint(this.container,mxEvent.getClientX(J),mxEvent.getClientY(J)),C.start(J.x,J.y)):null!=ja?this.addSelectionCells(ja):1<this.getSelectionCount()&&this.isCellSelected(P)&&this.removeSelectionCell(P);ja=null;V.consume()}}));
+this.connectionHandler.selectCells=function(J,V){this.graph.setSelectionCell(V||J)};this.connectionHandler.constraintHandler.isStateIgnored=function(J,V){var P=J.view.graph;return V&&(P.isCellSelected(J.cell)||P.isTableRow(J.cell)&&P.selectionCellsHandler.isHandled(P.model.getParent(J.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var J=this.connectionHandler.constraintHandler;null!=J.currentFocus&&J.isStateIgnored(J.currentFocus,!0)&&(J.currentFocus=null,J.constraints=
+null,J.destroyIcons());J.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var U=this.updateMouseEvent;this.updateMouseEvent=function(J){J=U.apply(this,arguments);null!=J.state&&this.isCellLocked(J.getCell())&&(J.state=null);return J}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";
Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.layoutNames="mxHierarchicalLayout mxCircleLayout mxCompactTreeLayout mxEdgeLabelLayout mxFastOrganicLayout mxParallelEdgeLayout mxPartitionLayout mxRadialTreeLayout mxStackLayout".split(" ");
@@ -2460,8 +2460,8 @@ k));t&&g<d+Graph.minTableColumnWidth&&(k=k.clone(),k.width=d+e.width+e.x+Graph.m
(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(m,q){q=null!=q?q:!0;var y=this.getState(m);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&!y.invalid&&this.updateLineJumps(y)&&this.graph.cellRenderer.redraw(y,!1,this.isRendering());y=e.apply(this,
arguments);null!=y&&q&&this.graph.model.isEdge(y.cell)&&null!=y.style&&1!=y.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(y);return y};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var m=this.node.getElementsByTagName("path");if(1<m.length){"1"!=mxUtils.getValue(this.state.style,
mxConstants.STYLE_DASHED,"0")&&m[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var q=this.state.view.graph.getFlowAnimationStyle();null!=q&&m[1].setAttribute("class",q.getAttribute("id"))}}};var n=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(m,q){return n.apply(this,arguments)||null!=m.routedPoints&&null!=q.routedPoints&&!mxUtils.equalPoints(q.routedPoints,m.routedPoints)};var D=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(m){D.apply(this,arguments);this.graph.model.isEdge(m.cell)&&1!=m.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(m)};mxGraphView.prototype.updateLineJumps=function(m){var q=m.absolutePoints;if(Graph.lineJumpsEnabled){var y=null!=m.routedPoints,F=null;if(null!=q&&null!=this.validEdges&&"none"!==mxUtils.getValue(m.style,"jumpStyle","none")){var C=function(ja,U,I){var V=new mxPoint(U,I);V.type=ja;F.push(V);V=null!=m.routedPoints?m.routedPoints[F.length-1]:null;return null==V||V.type!=
-ja||V.x!=U||V.y!=I},H=.5*this.scale;y=!1;F=[];for(var G=0;G<q.length-1;G++){for(var aa=q[G+1],da=q[G],ba=[],Y=q[G+2];G<q.length-2&&mxUtils.ptSegDistSq(da.x,da.y,Y.x,Y.y,aa.x,aa.y)<1*this.scale*this.scale;)aa=Y,G++,Y=q[G+2];y=C(0,da.x,da.y)||y;for(var pa=0;pa<this.validEdges.length;pa++){var O=this.validEdges[pa],X=O.absolutePoints;if(null!=X&&mxUtils.intersects(m,O)&&"1"!=O.style.noJump)for(O=0;O<X.length-1;O++){var ea=X[O+1],ka=X[O];for(Y=X[O+2];O<X.length-2&&mxUtils.ptSegDistSq(ka.x,ka.y,Y.x,Y.y,
+function(m){D.apply(this,arguments);this.graph.model.isEdge(m.cell)&&1!=m.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(m)};mxGraphView.prototype.updateLineJumps=function(m){var q=m.absolutePoints;if(Graph.lineJumpsEnabled){var y=null!=m.routedPoints,F=null;if(null!=q&&null!=this.validEdges&&"none"!==mxUtils.getValue(m.style,"jumpStyle","none")){var C=function(ja,U,J){var V=new mxPoint(U,J);V.type=ja;F.push(V);V=null!=m.routedPoints?m.routedPoints[F.length-1]:null;return null==V||V.type!=
+ja||V.x!=U||V.y!=J},H=.5*this.scale;y=!1;F=[];for(var G=0;G<q.length-1;G++){for(var aa=q[G+1],da=q[G],ba=[],Y=q[G+2];G<q.length-2&&mxUtils.ptSegDistSq(da.x,da.y,Y.x,Y.y,aa.x,aa.y)<1*this.scale*this.scale;)aa=Y,G++,Y=q[G+2];y=C(0,da.x,da.y)||y;for(var pa=0;pa<this.validEdges.length;pa++){var O=this.validEdges[pa],X=O.absolutePoints;if(null!=X&&mxUtils.intersects(m,O)&&"1"!=O.style.noJump)for(O=0;O<X.length-1;O++){var ea=X[O+1],ka=X[O];for(Y=X[O+2];O<X.length-2&&mxUtils.ptSegDistSq(ka.x,ka.y,Y.x,Y.y,
ea.x,ea.y)<1*this.scale*this.scale;)ea=Y,O++,Y=X[O+2];Y=mxUtils.intersection(da.x,da.y,aa.x,aa.y,ka.x,ka.y,ea.x,ea.y);if(null!=Y&&(Math.abs(Y.x-da.x)>H||Math.abs(Y.y-da.y)>H)&&(Math.abs(Y.x-aa.x)>H||Math.abs(Y.y-aa.y)>H)&&(Math.abs(Y.x-ka.x)>H||Math.abs(Y.y-ka.y)>H)&&(Math.abs(Y.x-ea.x)>H||Math.abs(Y.y-ea.y)>H)){ea=Y.x-da.x;ka=Y.y-da.y;Y={distSq:ea*ea+ka*ka,x:Y.x,y:Y.y};for(ea=0;ea<ba.length;ea++)if(ba[ea].distSq>Y.distSq){ba.splice(ea,0,Y);Y=null;break}null==Y||0!=ba.length&&ba[ba.length-1].x===
Y.x&&ba[ba.length-1].y===Y.y||ba.push(Y)}}}for(O=0;O<ba.length;O++)y=C(1,ba[O].x,ba[O].y)||y}Y=q[q.length-1];y=C(0,Y.x,Y.y)||y}m.routedPoints=F;return y}return!1};var t=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(m,q,y){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)t.apply(this,arguments);else{var F=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
mxConstants.LINE_ARCSIZE)/2,C=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,H=mxUtils.getValue(this.style,"jumpStyle","none"),G=!0,aa=null,da=null,ba=[],Y=null;m.begin();for(var pa=0;pa<this.state.routedPoints.length;pa++){var O=this.state.routedPoints[pa],X=new mxPoint(O.x/this.scale,O.y/this.scale);0==pa?X=q[0]:pa==this.state.routedPoints.length-1&&(X=q[q.length-1]);var ea=!1;if(null!=aa&&1==O.type){var ka=this.state.routedPoints[pa+1];O=ka.x/this.scale-
@@ -2488,100 +2488,100 @@ return z};mxConnectionHandler.prototype.updatePreview=function(z){};var E=mxConn
function(){for(var z="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",L="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),M=0;M<L.length;M++)null!=this.currentEdgeStyle[L[M]]&&(z+=L[M]+"="+this.currentEdgeStyle[L[M]]+";");null!=this.currentEdgeStyle.orthogonalLoop?z+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
(z+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?z+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(z+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(z+="elbow="+this.currentEdgeStyle.elbow+";");return z=null!=this.currentEdgeStyle.html?z+("html="+this.currentEdgeStyle.html+";"):z+"html=1;"};
Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var z=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=z&&(new mxCodec(z.ownerDocument)).decode(z,this.getStylesheet())};Graph.prototype.createCellLookup=function(z,L){L=null!=L?L:{};for(var M=0;M<z.length;M++){var S=z[M];L[mxObjectIdentity.get(S)]=S.getId();for(var ca=this.model.getChildCount(S),
-ia=0;ia<ca;ia++)this.createCellLookup([this.model.getChildAt(S,ia)],L)}return L};Graph.prototype.createCellMapping=function(z,L,M){M=null!=M?M:{};for(var S in z){var ca=L[S];null==M[ca]&&(M[ca]=z[S].getId()||"")}return M};Graph.prototype.importGraphModel=function(z,L,M,S){L=null!=L?L:0;M=null!=M?M:0;var ca=new mxCodec(z.ownerDocument),ia=new mxGraphModel;ca.decode(z,ia);z=[];ca={};var na={},ra=ia.getChildren(this.cloneCell(ia.root,this.isCloneInvalidEdges(),ca));if(null!=ra){var qa=this.createCellLookup([ia.root]);
-ra=ra.slice();this.model.beginUpdate();try{if(1!=ra.length||this.isCellLocked(this.getDefaultParent()))for(ia=0;ia<ra.length;ia++)ya=this.model.getChildren(this.moveCells([ra[ia]],L,M,!1,this.model.getRoot())[0]),null!=ya&&(z=z.concat(ya));else{var ya=ia.getChildren(ra[0]);null!=ya&&(z=this.moveCells(ya,L,M,!1,this.getDefaultParent()),na[ia.getChildAt(ia.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(ca,qa,na),this.updateCustomLinks(na,z),S)){this.isGridEnabled()&&
-(L=this.snap(L),M=this.snap(M));var Ea=this.getBoundingBoxFromGeometry(z,!0);null!=Ea&&this.moveCells(z,L-Ea.x,M-Ea.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var L={},M=this.cloneCells(z,null,L),S=new mxDictionary,ca=0;ca<z.length;ca++)S.put(z[ca],!0);var ia=new mxCodec,na=new mxGraphModel,ra=na.getChildAt(na.getRoot(),0);for(ca=0;ca<M.length;ca++){na.add(ra,M[ca]);var qa=this.view.getState(z[ca]);if(null!=qa){var ya=this.getCellGeometry(M[ca]);null!=
-ya&&ya.relative&&!this.model.isEdge(z[ca])&&null==S.get(this.model.getParent(z[ca]))&&(ya.offset=null,ya.relative=!1,ya.x=qa.x/qa.view.scale-qa.view.translate.x,ya.y=qa.y/qa.view.scale-qa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(L,this.createCellLookup(z)),M);return ia.encode(na)};Graph.prototype.isSwimlane=function(z,L){var M=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(M=this.getCurrentCellStyle(z,L)[mxConstants.STYLE_SHAPE]);return M==
-mxConstants.SHAPE_SWIMLANE||"table"==M||"tableRow"==M};var d=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var L=this.model.getParent(z);if(null!=L){var M=this.getCurrentCellStyle(L);if(null!=M.expand)return"0"!=M.expand}return d.apply(this,arguments)&&(null==L||!this.isTable(L))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,L,M,S,ca,ia,na,ra){null==ra&&(ra=this.model.getParent(z),this.isTable(ra)||this.isTableRow(ra))&&(ra=this.getCellAt(ia,na,
-null,!0,!1));M=null;this.model.beginUpdate();try{M=f.apply(this,[z,L,M,S,ca,ia,na,ra]);this.model.setValue(M,"");var qa=this.getChildCells(M,!0);for(L=0;L<qa.length;L++){var ya=this.getCellGeometry(qa[L]);null!=ya&&ya.relative&&0<ya.x&&this.model.remove(qa[L])}var Ea=this.getChildCells(z,!0);for(L=0;L<Ea.length;L++)ya=this.getCellGeometry(Ea[L]),null!=ya&&ya.relative&&0>=ya.x&&this.model.remove(Ea[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[M]);this.setCellStyles(mxConstants.STYLE_ENDARROW,
-mxConstants.NONE,[M]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var Na=this.model.getTerminal(M,!1);if(null!=Na){var Pa=this.getCurrentCellStyle(Na);null!=Pa&&"1"==Pa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[M]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[M]))}}finally{this.model.endUpdate()}return M};
-var g=Graph.prototype.selectCell;Graph.prototype.selectCell=function(z,L,M){if(L||M)g.apply(this,arguments);else{var S=this.getSelectionCell(),ca=null,ia=[],na=mxUtils.bind(this,function(ra){if(null!=this.view.getState(ra)&&(this.model.isVertex(ra)||this.model.isEdge(ra)))if(ia.push(ra),ra==S)ca=ia.length-1;else if(z&&null==S&&0<ia.length||null!=ca&&z&&ia.length>ca||!z&&0<ca)return;for(var qa=0;qa<this.model.getChildCount(ra);qa++)na(this.model.getChildAt(ra,qa))});na(this.model.root);0<ia.length&&
-(ca=null!=ca?mxUtils.mod(ca+(z?1:-1),ia.length):0,this.setSelectionCell(ia[ca]))}};Graph.prototype.swapShapes=function(z,L,M,S,ca,ia,na){L=!1;if(!S&&null!=ca&&1==z.length&&(S=this.view.getState(ca),M=this.view.getState(z[0]),null!=S&&null!=M&&(null!=ia&&mxEvent.isShiftDown(ia)||"umlLifeline"==S.style.shape&&"umlLifeline"==M.style.shape)&&(S=this.getCellGeometry(ca),ia=this.getCellGeometry(z[0]),null!=S&&null!=ia))){L=S.clone();S=ia.clone();S.x=L.x;S.y=L.y;L.x=ia.x;L.y=ia.y;this.model.beginUpdate();
-try{this.model.setGeometry(ca,L),this.model.setGeometry(z[0],S)}finally{this.model.endUpdate()}L=!0}return L};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,L,M,S,ca,ia,na){if(this.swapShapes(z,L,M,S,ca,ia,na))return z;na=null!=na?na:{};if(this.isTable(ca)){for(var ra=[],qa=0;qa<z.length;qa++)this.isTable(z[qa])?ra=ra.concat(this.model.getChildCells(z[qa],!0).reverse()):ra.push(z[qa]);z=ra}this.model.beginUpdate();try{ra=[];for(qa=0;qa<z.length;qa++)if(null!=ca&&this.isTableRow(z[qa])){var ya=
-this.model.getParent(z[qa]),Ea=this.getCellGeometry(z[qa]);this.isTable(ya)&&ra.push(ya);if(null!=ya&&null!=Ea&&this.isTable(ya)&&this.isTable(ca)&&(S||ya!=ca)){if(!S){var Na=this.getCellGeometry(ya);null!=Na&&(Na=Na.clone(),Na.height-=Ea.height,this.model.setGeometry(ya,Na))}Na=this.getCellGeometry(ca);null!=Na&&(Na=Na.clone(),Na.height+=Ea.height,this.model.setGeometry(ca,Na));var Pa=this.model.getChildCells(ca,!0);if(0<Pa.length){z[qa]=S?this.cloneCell(z[qa]):z[qa];var Qa=this.model.getChildCells(z[qa],
-!0),Ua=this.model.getChildCells(Pa[0],!0),La=Ua.length-Qa.length;if(0<La)for(var ua=0;ua<La;ua++){var za=this.cloneCell(Qa[Qa.length-1]);null!=za&&(za.value="",this.model.add(z[qa],za))}else if(0>La)for(ua=0;ua>La;ua--)this.model.remove(Qa[Qa.length+ua-1]);Qa=this.model.getChildCells(z[qa],!0);for(ua=0;ua<Ua.length;ua++){var Ka=this.getCellGeometry(Ua[ua]),Ga=this.getCellGeometry(Qa[ua]);null!=Ka&&null!=Ga&&(Ga=Ga.clone(),Ga.width=Ka.width,this.model.setGeometry(Qa[ua],Ga))}}}}var Ma=m.apply(this,
-arguments);for(qa=0;qa<ra.length;qa++)!S&&this.model.contains(ra[qa])&&0==this.model.getChildCount(ra[qa])&&this.model.remove(ra[qa]);S&&this.updateCustomLinks(this.createCellMapping(na,this.createCellLookup(z)),Ma)}finally{this.model.endUpdate()}return Ma};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,L){var M=[];this.model.beginUpdate();try{for(var S=0;S<z.length;S++)if(this.isTableCell(z[S])){var ca=this.model.getParent(z[S]),ia=this.model.getParent(ca);1==this.model.getChildCount(ca)&&
-1==this.model.getChildCount(ia)?0>mxUtils.indexOf(z,ia)&&0>mxUtils.indexOf(M,ia)&&M.push(ia):this.labelChanged(z[S],"")}else{if(this.isTableRow(z[S])&&(ia=this.model.getParent(z[S]),0>mxUtils.indexOf(z,ia)&&0>mxUtils.indexOf(M,ia))){for(var na=this.model.getChildCells(ia,!0),ra=0,qa=0;qa<na.length;qa++)0<=mxUtils.indexOf(z,na[qa])&&ra++;ra==na.length&&M.push(ia)}M.push(z[S])}M=q.apply(this,[M,L])}finally{this.model.endUpdate()}return M};Graph.prototype.updateCustomLinks=function(z,L,M){M=null!=M?
+ha=0;ha<ca;ha++)this.createCellLookup([this.model.getChildAt(S,ha)],L)}return L};Graph.prototype.createCellMapping=function(z,L,M){M=null!=M?M:{};for(var S in z){var ca=L[S];null==M[ca]&&(M[ca]=z[S].getId()||"")}return M};Graph.prototype.importGraphModel=function(z,L,M,S){L=null!=L?L:0;M=null!=M?M:0;var ca=new mxCodec(z.ownerDocument),ha=new mxGraphModel;ca.decode(z,ha);z=[];ca={};var oa={},ra=ha.getChildren(this.cloneCell(ha.root,this.isCloneInvalidEdges(),ca));if(null!=ra){var qa=this.createCellLookup([ha.root]);
+ra=ra.slice();this.model.beginUpdate();try{if(1!=ra.length||this.isCellLocked(this.getDefaultParent()))for(ha=0;ha<ra.length;ha++)xa=this.model.getChildren(this.moveCells([ra[ha]],L,M,!1,this.model.getRoot())[0]),null!=xa&&(z=z.concat(xa));else{var xa=ha.getChildren(ra[0]);null!=xa&&(z=this.moveCells(xa,L,M,!1,this.getDefaultParent()),oa[ha.getChildAt(ha.root,0).getId()]=this.getDefaultParent().getId())}if(null!=z&&(this.createCellMapping(ca,qa,oa),this.updateCustomLinks(oa,z),S)){this.isGridEnabled()&&
+(L=this.snap(L),M=this.snap(M));var Ga=this.getBoundingBoxFromGeometry(z,!0);null!=Ga&&this.moveCells(z,L-Ga.x,M-Ga.y)}}finally{this.model.endUpdate()}}return z};Graph.prototype.encodeCells=function(z){for(var L={},M=this.cloneCells(z,null,L),S=new mxDictionary,ca=0;ca<z.length;ca++)S.put(z[ca],!0);var ha=new mxCodec,oa=new mxGraphModel,ra=oa.getChildAt(oa.getRoot(),0);for(ca=0;ca<M.length;ca++){oa.add(ra,M[ca]);var qa=this.view.getState(z[ca]);if(null!=qa){var xa=this.getCellGeometry(M[ca]);null!=
+xa&&xa.relative&&!this.model.isEdge(z[ca])&&null==S.get(this.model.getParent(z[ca]))&&(xa.offset=null,xa.relative=!1,xa.x=qa.x/qa.view.scale-qa.view.translate.x,xa.y=qa.y/qa.view.scale-qa.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(L,this.createCellLookup(z)),M);return ha.encode(oa)};Graph.prototype.isSwimlane=function(z,L){var M=null;null==z||this.model.isEdge(z)||this.model.getParent(z)==this.model.getRoot()||(M=this.getCurrentCellStyle(z,L)[mxConstants.STYLE_SHAPE]);return M==
+mxConstants.SHAPE_SWIMLANE||"table"==M||"tableRow"==M};var d=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(z){var L=this.model.getParent(z);if(null!=L){var M=this.getCurrentCellStyle(L);if(null!=M.expand)return"0"!=M.expand}return d.apply(this,arguments)&&(null==L||!this.isTable(L))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(z,L,M,S,ca,ha,oa,ra){null==ra&&(ra=this.model.getParent(z),this.isTable(ra)||this.isTableRow(ra))&&(ra=this.getCellAt(ha,oa,
+null,!0,!1));M=null;this.model.beginUpdate();try{M=f.apply(this,[z,L,M,S,ca,ha,oa,ra]);this.model.setValue(M,"");var qa=this.getChildCells(M,!0);for(L=0;L<qa.length;L++){var xa=this.getCellGeometry(qa[L]);null!=xa&&xa.relative&&0<xa.x&&this.model.remove(qa[L])}var Ga=this.getChildCells(z,!0);for(L=0;L<Ga.length;L++)xa=this.getCellGeometry(Ga[L]),null!=xa&&xa.relative&&0>=xa.x&&this.model.remove(Ga[L]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[M]);this.setCellStyles(mxConstants.STYLE_ENDARROW,
+mxConstants.NONE,[M]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,null,[z]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[z]);var La=this.model.getTerminal(M,!1);if(null!=La){var Pa=this.getCurrentCellStyle(La);null!=Pa&&"1"==Pa.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[z]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[z]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[M]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[M]))}}finally{this.model.endUpdate()}return M};
+var g=Graph.prototype.selectCell;Graph.prototype.selectCell=function(z,L,M){if(L||M)g.apply(this,arguments);else{var S=this.getSelectionCell(),ca=null,ha=[],oa=mxUtils.bind(this,function(ra){if(null!=this.view.getState(ra)&&(this.model.isVertex(ra)||this.model.isEdge(ra)))if(ha.push(ra),ra==S)ca=ha.length-1;else if(z&&null==S&&0<ha.length||null!=ca&&z&&ha.length>ca||!z&&0<ca)return;for(var qa=0;qa<this.model.getChildCount(ra);qa++)oa(this.model.getChildAt(ra,qa))});oa(this.model.root);0<ha.length&&
+(ca=null!=ca?mxUtils.mod(ca+(z?1:-1),ha.length):0,this.setSelectionCell(ha[ca]))}};Graph.prototype.swapShapes=function(z,L,M,S,ca,ha,oa){L=!1;if(!S&&null!=ca&&1==z.length&&(S=this.view.getState(ca),M=this.view.getState(z[0]),null!=S&&null!=M&&(null!=ha&&mxEvent.isShiftDown(ha)||"umlLifeline"==S.style.shape&&"umlLifeline"==M.style.shape)&&(S=this.getCellGeometry(ca),ha=this.getCellGeometry(z[0]),null!=S&&null!=ha))){L=S.clone();S=ha.clone();S.x=L.x;S.y=L.y;L.x=ha.x;L.y=ha.y;this.model.beginUpdate();
+try{this.model.setGeometry(ca,L),this.model.setGeometry(z[0],S)}finally{this.model.endUpdate()}L=!0}return L};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(z,L,M,S,ca,ha,oa){if(this.swapShapes(z,L,M,S,ca,ha,oa))return z;oa=null!=oa?oa:{};if(this.isTable(ca)){for(var ra=[],qa=0;qa<z.length;qa++)this.isTable(z[qa])?ra=ra.concat(this.model.getChildCells(z[qa],!0).reverse()):ra.push(z[qa]);z=ra}this.model.beginUpdate();try{ra=[];for(qa=0;qa<z.length;qa++)if(null!=ca&&this.isTableRow(z[qa])){var xa=
+this.model.getParent(z[qa]),Ga=this.getCellGeometry(z[qa]);this.isTable(xa)&&ra.push(xa);if(null!=xa&&null!=Ga&&this.isTable(xa)&&this.isTable(ca)&&(S||xa!=ca)){if(!S){var La=this.getCellGeometry(xa);null!=La&&(La=La.clone(),La.height-=Ga.height,this.model.setGeometry(xa,La))}La=this.getCellGeometry(ca);null!=La&&(La=La.clone(),La.height+=Ga.height,this.model.setGeometry(ca,La));var Pa=this.model.getChildCells(ca,!0);if(0<Pa.length){z[qa]=S?this.cloneCell(z[qa]):z[qa];var Oa=this.model.getChildCells(z[qa],
+!0),Ta=this.model.getChildCells(Pa[0],!0),Ma=Ta.length-Oa.length;if(0<Ma)for(var ua=0;ua<Ma;ua++){var ya=this.cloneCell(Oa[Oa.length-1]);null!=ya&&(ya.value="",this.model.add(z[qa],ya))}else if(0>Ma)for(ua=0;ua>Ma;ua--)this.model.remove(Oa[Oa.length+ua-1]);Oa=this.model.getChildCells(z[qa],!0);for(ua=0;ua<Ta.length;ua++){var Na=this.getCellGeometry(Ta[ua]),Fa=this.getCellGeometry(Oa[ua]);null!=Na&&null!=Fa&&(Fa=Fa.clone(),Fa.width=Na.width,this.model.setGeometry(Oa[ua],Fa))}}}}var Ra=m.apply(this,
+arguments);for(qa=0;qa<ra.length;qa++)!S&&this.model.contains(ra[qa])&&0==this.model.getChildCount(ra[qa])&&this.model.remove(ra[qa]);S&&this.updateCustomLinks(this.createCellMapping(oa,this.createCellLookup(z)),Ra)}finally{this.model.endUpdate()}return Ra};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(z,L){var M=[];this.model.beginUpdate();try{for(var S=0;S<z.length;S++)if(this.isTableCell(z[S])){var ca=this.model.getParent(z[S]),ha=this.model.getParent(ca);1==this.model.getChildCount(ca)&&
+1==this.model.getChildCount(ha)?0>mxUtils.indexOf(z,ha)&&0>mxUtils.indexOf(M,ha)&&M.push(ha):this.labelChanged(z[S],"")}else{if(this.isTableRow(z[S])&&(ha=this.model.getParent(z[S]),0>mxUtils.indexOf(z,ha)&&0>mxUtils.indexOf(M,ha))){for(var oa=this.model.getChildCells(ha,!0),ra=0,qa=0;qa<oa.length;qa++)0<=mxUtils.indexOf(z,oa[qa])&&ra++;ra==oa.length&&M.push(ha)}M.push(z[S])}M=q.apply(this,[M,L])}finally{this.model.endUpdate()}return M};Graph.prototype.updateCustomLinks=function(z,L,M){M=null!=M?
M:new Graph;for(var S=0;S<L.length;S++)null!=L[S]&&M.updateCustomLinksForCell(z,L[S],M)};Graph.prototype.updateCustomLinksForCell=function(z,L){this.doUpdateCustomLinksForCell(z,L);for(var M=this.model.getChildCount(L),S=0;S<M;S++)this.updateCustomLinksForCell(z,this.model.getChildAt(L,S))};Graph.prototype.doUpdateCustomLinksForCell=function(z,L){};Graph.prototype.getAllConnectionConstraints=function(z,L){if(null!=z){L=mxUtils.getValue(z.style,"points",null);if(null!=L){z=[];try{var M=JSON.parse(L);
-for(L=0;L<M.length;L++){var S=M[L];z.push(new mxConnectionConstraint(new mxPoint(S[0],S[1]),2<S.length?"0"!=S[2]:!0,null,3<S.length?S[3]:0,4<S.length?S[4]:0))}}catch(ia){}return z}if(null!=z.shape&&null!=z.shape.bounds){S=z.shape.direction;L=z.shape.bounds;var ca=z.shape.scale;M=L.width/ca;L=L.height/ca;if(S==mxConstants.DIRECTION_NORTH||S==mxConstants.DIRECTION_SOUTH)S=M,M=L,L=S;L=z.shape.getConstraints(z.style,M,L);if(null!=L)return L;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;
+for(L=0;L<M.length;L++){var S=M[L];z.push(new mxConnectionConstraint(new mxPoint(S[0],S[1]),2<S.length?"0"!=S[2]:!0,null,3<S.length?S[3]:0,4<S.length?S[4]:0))}}catch(ha){}return z}if(null!=z.shape&&null!=z.shape.bounds){S=z.shape.direction;L=z.shape.bounds;var ca=z.shape.scale;M=L.width/ca;L=L.height/ca;if(S==mxConstants.DIRECTION_NORTH||S==mxConstants.DIRECTION_SOUTH)S=M,M=L,L=S;L=z.shape.getConstraints(z.style,M,L);if(null!=L)return L;if(null!=z.shape.stencil&&null!=z.shape.stencil.constraints)return z.shape.stencil.constraints;
if(null!=z.shape.constraints)return z.shape.constraints}}return null};Graph.prototype.flipEdge=function(z){if(null!=z){var L=this.getCurrentCellStyle(z);L=mxUtils.getValue(L,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,L,[z])}};Graph.prototype.isValidRoot=function(z){for(var L=this.model.getChildCount(z),M=0,S=0;S<L;S++){var ca=this.model.getChildAt(z,S);this.model.isVertex(ca)&&
-(ca=this.getCellGeometry(ca),null==ca||ca.relative||M++)}return 0<M||this.isContainer(z)};Graph.prototype.isValidDropTarget=function(z,L,M){for(var S=this.getCurrentCellStyle(z),ca=!0,ia=!0,na=0;na<L.length&&ia;na++)ca=ca&&this.isTable(L[na]),ia=ia&&this.isTableRow(L[na]);return(1==L.length&&null!=M&&mxEvent.isShiftDown(M)&&!mxEvent.isControlDown(M)&&!mxEvent.isAltDown(M)||("1"!=mxUtils.getValue(S,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(S,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,
-arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ia||ca))&&!this.isCellLocked(z)};Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var L=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(L&&null!=z&&null!=this.layoutManager){var M=this.model.getParent(z);null!=M&&(M=this.layoutManager.getLayout(M),null!=M&&M.constructor==mxStackLayout&&
-(L=!1))}return L};Graph.prototype.getPreferredSizeForCell=function(z){var L=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=L&&(L.width+=10,L.height+=4,this.gridEnabled&&(L.width=this.snap(L.width),L.height=this.snap(L.height)));return L};Graph.prototype.turnShapes=function(z,L){var M=this.getModel(),S=[];M.beginUpdate();try{for(var ca=0;ca<z.length;ca++){var ia=z[ca];if(M.isEdge(ia)){var na=M.getTerminal(ia,!0),ra=M.getTerminal(ia,!1);M.setTerminal(ia,ra,!0);M.setTerminal(ia,
-na,!1);var qa=M.getGeometry(ia);if(null!=qa){qa=qa.clone();null!=qa.points&&qa.points.reverse();var ya=qa.getTerminalPoint(!0),Ea=qa.getTerminalPoint(!1);qa.setTerminalPoint(ya,!1);qa.setTerminalPoint(Ea,!0);M.setGeometry(ia,qa);var Na=this.view.getState(ia),Pa=this.view.getState(na),Qa=this.view.getState(ra);if(null!=Na){var Ua=null!=Pa?this.getConnectionConstraint(Na,Pa,!0):null,La=null!=Qa?this.getConnectionConstraint(Na,Qa,!1):null;this.setConnectionConstraint(ia,na,!0,La);this.setConnectionConstraint(ia,
-ra,!1,Ua);var ua=mxUtils.getValue(Na.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(Na.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ia]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[ia])}S.push(ia)}}else if(M.isVertex(ia)&&(qa=this.getCellGeometry(ia),null!=qa)){if(!(this.isTable(ia)||this.isTableRow(ia)||this.isTableCell(ia)||this.isSwimlane(ia))){qa=qa.clone();qa.x+=qa.width/2-qa.height/
-2;qa.y+=qa.height/2-qa.width/2;var za=qa.width;qa.width=qa.height;qa.height=za;M.setGeometry(ia,qa)}var Ka=this.view.getState(ia);if(null!=Ka){var Ga=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ma=mxUtils.getValue(Ka.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Ga[mxUtils.mod(mxUtils.indexOf(Ga,Ma)+(L?-1:1),Ga.length)],[ia])}S.push(ia)}}}finally{M.endUpdate()}return S};
+(ca=this.getCellGeometry(ca),null==ca||ca.relative||M++)}return 0<M||this.isContainer(z)};Graph.prototype.isValidDropTarget=function(z,L,M){for(var S=this.getCurrentCellStyle(z),ca=!0,ha=!0,oa=0;oa<L.length&&ha;oa++)ca=ca&&this.isTable(L[oa]),ha=ha&&this.isTableRow(L[oa]);return(1==L.length&&null!=M&&mxEvent.isShiftDown(M)&&!mxEvent.isControlDown(M)&&!mxEvent.isAltDown(M)||("1"!=mxUtils.getValue(S,"part","0")||this.isContainer(z))&&"0"!=mxUtils.getValue(S,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,
+arguments)||this.isContainer(z))&&!this.isTableRow(z)&&(!this.isTable(z)||ha||ca))&&!this.isCellLocked(z)};Graph.prototype.createGroupCell=function(){var z=mxGraph.prototype.createGroupCell.apply(this,arguments);z.setStyle("group");return z};Graph.prototype.isExtendParentsOnAdd=function(z){var L=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(L&&null!=z&&null!=this.layoutManager){var M=this.model.getParent(z);null!=M&&(M=this.layoutManager.getLayout(M),null!=M&&M.constructor==mxStackLayout&&
+(L=!1))}return L};Graph.prototype.getPreferredSizeForCell=function(z){var L=mxGraph.prototype.getPreferredSizeForCell.apply(this,arguments);null!=L&&(L.width+=10,L.height+=4,this.gridEnabled&&(L.width=this.snap(L.width),L.height=this.snap(L.height)));return L};Graph.prototype.turnShapes=function(z,L){var M=this.getModel(),S=[];M.beginUpdate();try{for(var ca=0;ca<z.length;ca++){var ha=z[ca];if(M.isEdge(ha)){var oa=M.getTerminal(ha,!0),ra=M.getTerminal(ha,!1);M.setTerminal(ha,ra,!0);M.setTerminal(ha,
+oa,!1);var qa=M.getGeometry(ha);if(null!=qa){qa=qa.clone();null!=qa.points&&qa.points.reverse();var xa=qa.getTerminalPoint(!0),Ga=qa.getTerminalPoint(!1);qa.setTerminalPoint(xa,!1);qa.setTerminalPoint(Ga,!0);M.setGeometry(ha,qa);var La=this.view.getState(ha),Pa=this.view.getState(oa),Oa=this.view.getState(ra);if(null!=La){var Ta=null!=Pa?this.getConnectionConstraint(La,Pa,!0):null,Ma=null!=Oa?this.getConnectionConstraint(La,Oa,!1):null;this.setConnectionConstraint(ha,oa,!0,Ma);this.setConnectionConstraint(ha,
+ra,!1,Ta);var ua=mxUtils.getValue(La.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,mxUtils.getValue(La.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ha]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ua,[ha])}S.push(ha)}}else if(M.isVertex(ha)&&(qa=this.getCellGeometry(ha),null!=qa)){if(!(this.isTable(ha)||this.isTableRow(ha)||this.isTableCell(ha)||this.isSwimlane(ha))){qa=qa.clone();qa.x+=qa.width/2-qa.height/
+2;qa.y+=qa.height/2-qa.width/2;var ya=qa.width;qa.width=qa.height;qa.height=ya;M.setGeometry(ha,qa)}var Na=this.view.getState(ha);if(null!=Na){var Fa=[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ra=mxUtils.getValue(Na.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Fa[mxUtils.mod(mxUtils.indexOf(Fa,Ra)+(L?-1:1),Fa.length)],[ha])}S.push(ha)}}}finally{M.endUpdate()}return S};
Graph.prototype.stencilHasPlaceholders=function(z){if(null!=z&&null!=z.fgNode)for(z=z.fgNode.firstChild;null!=z;){if("text"==z.nodeName&&"1"==z.getAttribute("placeholders"))return!0;z=z.nextSibling}return!1};var y=Graph.prototype.processChange;Graph.prototype.processChange=function(z){if(z instanceof mxGeometryChange&&(this.isTableCell(z.cell)||this.isTableRow(z.cell))&&(null==z.previous&&null!=z.geometry||null!=z.previous&&!z.previous.equals(z.geometry))){var L=z.cell;this.isTableCell(L)&&(L=this.model.getParent(L));
this.isTableRow(L)&&(L=this.model.getParent(L));var M=this.view.getState(L);null!=M&&null!=M.shape&&(this.view.invalidate(L),M.shape.bounds=null)}y.apply(this,arguments);z instanceof mxValueChange&&null!=z.cell&&null!=z.cell.value&&"object"==typeof z.cell.value&&this.invalidateDescendantsWithPlaceholders(z.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(z){z=this.model.getDescendants(z);if(0<z.length)for(var L=0;L<z.length;L++){var M=this.view.getState(z[L]);null!=M&&null!=M.shape&&
null!=M.shape.stencil&&this.stencilHasPlaceholders(M.shape.stencil)?this.removeStateForCell(z[L]):this.isReplacePlaceholders(z[L])&&this.view.invalidate(z[L],!1,!1)}};Graph.prototype.replaceElement=function(z,L){L=z.ownerDocument.createElement(null!=L?L:"span");for(var M=Array.prototype.slice.call(z.attributes);attr=M.pop();)L.setAttribute(attr.nodeName,attr.nodeValue);L.innerHTML=z.innerHTML;z.parentNode.replaceChild(L,z)};Graph.prototype.processElements=function(z,L){if(null!=z){z=z.getElementsByTagName("*");
-for(var M=0;M<z.length;M++)L(z[M])}};Graph.prototype.updateLabelElements=function(z,L,M){z=null!=z?z:this.getSelectionCells();for(var S=document.createElement("div"),ca=0;ca<z.length;ca++)if(this.isHtmlLabel(z[ca])){var ia=this.convertValueToString(z[ca]);if(null!=ia&&0<ia.length){S.innerHTML=ia;for(var na=S.getElementsByTagName(null!=M?M:"*"),ra=0;ra<na.length;ra++)L(na[ra]);S.innerHTML!=ia&&this.cellLabelChanged(z[ca],S.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,L,M){L=Graph.zapGremlins(L);
-this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var S=z.getAttribute("placeholder"),ca=z;null!=ca;){if(ca==this.model.getRoot()||null!=ca.value&&"object"==typeof ca.value&&ca.hasAttribute(S)){this.setAttributeForCell(ca,S,L);break}ca=this.model.getParent(ca)}var ia=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ia.hasAttribute("label_"+Graph.diagramLanguage)?ia.setAttribute("label_"+
-Graph.diagramLanguage,L):ia.setAttribute("label",L);L=ia}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=z){for(var L=new mxDictionary,M=0;M<z.length;M++)L.put(z[M],!0);var S=[];for(M=0;M<z.length;M++){var ca=this.model.getParent(z[M]);null==ca||L.get(ca)||(L.put(ca,!0),S.push(ca))}for(M=0;M<S.length;M++)if(ca=this.view.getState(S[M]),null!=ca&&(this.model.isEdge(ca.cell)||this.model.isVertex(ca.cell))&&this.isCellDeletable(ca.cell)&&
-this.isTransparentState(ca)){for(var ia=!0,na=0;na<this.model.getChildCount(ca.cell)&&ia;na++)L.get(this.model.getChildAt(ca.cell,na))||(ia=!1);ia&&z.push(ca.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var L=[],M=0;M<z.length;M++)this.isCellDeletable(z[M])&&this.isTransparentState(this.view.getState(z[M]))&&L.push(z[M]);z=L;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,
+for(var M=0;M<z.length;M++)L(z[M])}};Graph.prototype.updateLabelElements=function(z,L,M){z=null!=z?z:this.getSelectionCells();for(var S=document.createElement("div"),ca=0;ca<z.length;ca++)if(this.isHtmlLabel(z[ca])){var ha=this.convertValueToString(z[ca]);if(null!=ha&&0<ha.length){S.innerHTML=ha;for(var oa=S.getElementsByTagName(null!=M?M:"*"),ra=0;ra<oa.length;ra++)L(oa[ra]);S.innerHTML!=ha&&this.cellLabelChanged(z[ca],S.innerHTML)}}};Graph.prototype.cellLabelChanged=function(z,L,M){L=Graph.zapGremlins(L);
+this.model.beginUpdate();try{if(null!=z.value&&"object"==typeof z.value){if(this.isReplacePlaceholders(z)&&null!=z.getAttribute("placeholder"))for(var S=z.getAttribute("placeholder"),ca=z;null!=ca;){if(ca==this.model.getRoot()||null!=ca.value&&"object"==typeof ca.value&&ca.hasAttribute(S)){this.setAttributeForCell(ca,S,L);break}ca=this.model.getParent(ca)}var ha=z.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ha.hasAttribute("label_"+Graph.diagramLanguage)?ha.setAttribute("label_"+
+Graph.diagramLanguage,L):ha.setAttribute("label",L);L=ha}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(z){if(null!=z){for(var L=new mxDictionary,M=0;M<z.length;M++)L.put(z[M],!0);var S=[];for(M=0;M<z.length;M++){var ca=this.model.getParent(z[M]);null==ca||L.get(ca)||(L.put(ca,!0),S.push(ca))}for(M=0;M<S.length;M++)if(ca=this.view.getState(S[M]),null!=ca&&(this.model.isEdge(ca.cell)||this.model.isVertex(ca.cell))&&this.isCellDeletable(ca.cell)&&
+this.isTransparentState(ca)){for(var ha=!0,oa=0;oa<this.model.getChildCount(ca.cell)&&ha;oa++)L.get(this.model.getChildAt(ca.cell,oa))||(ha=!1);ha&&z.push(ca.cell)}}mxGraph.prototype.cellsRemoved.apply(this,arguments)};Graph.prototype.removeCellsAfterUngroup=function(z){for(var L=[],M=0;M<z.length;M++)this.isCellDeletable(z[M])&&this.isTransparentState(this.view.getState(z[M]))&&L.push(z[M]);z=L;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(z,
L){this.setAttributeForCell(z,"link",L)};Graph.prototype.setTooltipForCell=function(z,L){var M="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(z.value)&&z.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(M="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(z,M,L)};Graph.prototype.getAttributeForCell=function(z,L,M){z=null!=z.value&&"object"===typeof z.value?z.value.getAttribute(L):null;return null!=z?z:M};Graph.prototype.setAttributeForCell=function(z,L,
-M){if(null!=z.value&&"object"==typeof z.value)var S=z.value.cloneNode(!0);else S=mxUtils.createXmlDocument().createElement("UserObject"),S.setAttribute("label",z.value||"");null!=M?S.setAttribute(L,M):S.removeAttribute(L);this.model.setValue(z,S)};var F=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,L,M,S){this.getModel();if(mxEvent.isAltDown(L))return null;for(var ca=0;ca<z.length;ca++){var ia=this.model.getParent(z[ca]);if(this.model.isEdge(ia)&&0>mxUtils.indexOf(z,ia))return null}ia=
-F.apply(this,arguments);var na=!0;for(ca=0;ca<z.length&&na;ca++)na=na&&this.isTableRow(z[ca]);na&&(this.isTableCell(ia)&&(ia=this.model.getParent(ia)),this.isTableRow(ia)&&(ia=this.model.getParent(ia)),this.isTable(ia)||(ia=null));return ia};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,L){this.isEnabled()&&(L=this.insertTextForEvent(z,L),mxGraph.prototype.dblClick.call(this,
+M){if(null!=z.value&&"object"==typeof z.value)var S=z.value.cloneNode(!0);else S=mxUtils.createXmlDocument().createElement("UserObject"),S.setAttribute("label",z.value||"");null!=M?S.setAttribute(L,M):S.removeAttribute(L);this.model.setValue(z,S)};var F=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(z,L,M,S){this.getModel();if(mxEvent.isAltDown(L))return null;for(var ca=0;ca<z.length;ca++){var ha=this.model.getParent(z[ca]);if(this.model.isEdge(ha)&&0>mxUtils.indexOf(z,ha))return null}ha=
+F.apply(this,arguments);var oa=!0;for(ca=0;ca<z.length&&oa;ca++)oa=oa&&this.isTableRow(z[ca]);oa&&(this.isTableCell(ha)&&(ha=this.model.getParent(ha)),this.isTableRow(ha)&&(ha=this.model.getParent(ha)),this.isTable(ha)||(ha=null));return ha};Graph.prototype.click=function(z){mxGraph.prototype.click.call(this,z);this.firstClickState=z.getState();this.firstClickSource=z.getSource()};Graph.prototype.dblClick=function(z,L){this.isEnabled()&&(L=this.insertTextForEvent(z,L),mxGraph.prototype.dblClick.call(this,
z,L))};Graph.prototype.insertTextForEvent=function(z,L){var M=mxUtils.convertPoint(this.container,mxEvent.getClientX(z),mxEvent.getClientY(z));if(null!=z&&!this.model.isVertex(L)){var S=this.model.isEdge(L)?this.view.getState(L):null,ca=mxEvent.getSource(z);this.firstClickState!=S||this.firstClickSource!=ca||null!=S&&null!=S.text&&null!=S.text.node&&null!=S.text.boundingBox&&(mxUtils.contains(S.text.boundingBox,M.x,M.y)||mxUtils.isAncestorNode(S.text.node,mxEvent.getSource(z)))||(null!=S||this.isCellLocked(this.getDefaultParent()))&&
(null==S||this.isCellLocked(S.cell))||!(null!=S||mxClient.IS_SVG&&ca==this.view.getCanvas().ownerSVGElement)||(null==S&&(S=this.view.getState(this.getCellAt(M.x,M.y))),L=this.addText(M.x,M.y,S))}return L};Graph.prototype.getInsertPoint=function(){var z=this.getGridSize(),L=this.container.scrollLeft/this.view.scale-this.view.translate.x,M=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var S=this.getPageLayout(),ca=this.getPageSize();L=Math.max(L,S.x*ca.width);M=
Math.max(M,S.y*ca.height)}return new mxPoint(this.snap(L+z),this.snap(M+z))};Graph.prototype.getFreeInsertPoint=function(){var z=this.view,L=this.getGraphBounds(),M=this.getInsertPoint(),S=this.snap(Math.round(Math.max(M.x,L.x/z.scale-z.translate.x+(0==L.width?2*this.gridSize:0))));z=this.snap(Math.round(Math.max(M.y,(L.y+L.height)/z.scale-z.translate.y+2*this.gridSize)));return new mxPoint(S,z)};Graph.prototype.getCenterInsertPoint=function(z){z=null!=z?z:new mxRectangle;return mxUtils.hasScrollbars(this.container)?
new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/2)/this.view.scale-this.view.translate.y-z.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-z.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-z.height/2)))};Graph.prototype.isMouseInsertPoint=
-function(){return!1};Graph.prototype.addText=function(z,L,M){var S=new mxCell;S.value="Text";S.geometry=new mxGeometry(0,0,0,0);S.vertex=!0;if(null!=M&&this.model.isEdge(M.cell)){S.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";S.geometry.relative=!0;S.connectable=!1;var ca=this.view.getRelativePoint(M,z,L);S.geometry.x=Math.round(1E4*ca.x)/1E4;S.geometry.y=Math.round(ca.y);S.geometry.offset=new mxPoint(0,0);ca=this.view.getPoint(M,S.geometry);var ia=this.view.scale;
-S.geometry.offset=new mxPoint(Math.round((z-ca.x)/ia),Math.round((L-ca.y)/ia))}else ca=this.view.translate,S.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",S.geometry.width=40,S.geometry.height=20,S.geometry.x=Math.round(z/this.view.scale)-ca.x-(null!=M?M.origin.x:0),S.geometry.y=Math.round(L/this.view.scale)-ca.y-(null!=M?M.origin.y:0),S.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([S],null!=M?M.cell:null),this.fireEvent(new mxEventObject("textInserted",
-"cells",[S])),this.autoSizeCell(S)}finally{this.getModel().endUpdate()}return S};Graph.prototype.addClickHandler=function(z,L,M){var S=mxUtils.bind(this,function(){var qa=this.container.getElementsByTagName("a");if(null!=qa)for(var ya=0;ya<qa.length;ya++){var Ea=this.getAbsoluteUrl(qa[ya].getAttribute("href"));null!=Ea&&(qa[ya].setAttribute("rel",this.linkRelation),qa[ya].setAttribute("href",Ea),null!=L&&mxEvent.addGestureListeners(qa[ya],null,null,L))}});this.model.addListener(mxEvent.CHANGE,S);
-S();var ca=this.container.style.cursor,ia=this.getTolerance(),na=this,ra={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(na,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(qa){var ya=qa.sourceState;if(null==ya||null==na.getLinkForCell(ya.cell))qa=na.getCellAt(qa.getGraphX(),qa.getGraphY(),null,null,null,function(Ea,Na,Pa){return null==na.getLinkForCell(Ea.cell)}),ya=null==ya||na.model.isAncestor(qa,
-ya.cell)?na.view.getState(qa):null;ya!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ya,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(qa,ya){this.startX=ya.getGraphX();this.startY=ya.getGraphY();this.scrollLeft=na.container.scrollLeft;this.scrollTop=na.container.scrollTop;null==this.currentLink&&"auto"==na.container.style.overflow&&(na.container.style.cursor="move");this.updateCurrentState(ya)},mouseMove:function(qa,ya){if(na.isMouseDown)null!=
-this.currentLink&&(qa=Math.abs(this.startX-ya.getGraphX()),ya=Math.abs(this.startY-ya.getGraphY()),(qa>ia||ya>ia)&&this.clear());else{for(qa=ya.getSource();null!=qa&&"a"!=qa.nodeName.toLowerCase();)qa=qa.parentNode;null!=qa?this.clear():(null!=na.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&na.tooltipHandler.reset(ya,!0,this.currentState),(null==this.currentState||ya.getState()!=this.currentState&&null!=ya.sourceState||!na.intersects(this.currentState,ya.getGraphX(),ya.getGraphY()))&&
-this.updateCurrentState(ya))}},mouseUp:function(qa,ya){var Ea=ya.getSource();for(qa=ya.getEvent();null!=Ea&&"a"!=Ea.nodeName.toLowerCase();)Ea=Ea.parentNode;null==Ea&&Math.abs(this.scrollLeft-na.container.scrollLeft)<ia&&Math.abs(this.scrollTop-na.container.scrollTop)<ia&&(null==ya.sourceState||!ya.isSource(ya.sourceState.control))&&((mxEvent.isLeftMouseButton(qa)||mxEvent.isMiddleMouseButton(qa))&&!mxEvent.isPopupTrigger(qa)||mxEvent.isTouchEvent(qa))&&(null!=this.currentLink?(Ea=na.isBlankLink(this.currentLink),
-"data:"!==this.currentLink.substring(0,5)&&Ea||null==L||L(qa,this.currentLink),mxEvent.isConsumed(qa)||(qa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(qa)?"_blank":Ea?na.linkTarget:"_top",na.openLink(this.currentLink,qa),ya.consume())):null!=M&&!ya.isConsumed()&&Math.abs(this.scrollLeft-na.container.scrollLeft)<ia&&Math.abs(this.scrollTop-na.container.scrollTop)<ia&&Math.abs(this.startX-ya.getGraphX())<ia&&Math.abs(this.startY-ya.getGraphY())<ia&&M(ya.getEvent()));this.clear()},
-activate:function(qa){this.currentLink=na.getAbsoluteUrl(na.getLinkForCell(qa.cell));null!=this.currentLink&&(this.currentTarget=na.getLinkTargetForCell(qa.cell),na.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(qa))},clear:function(){null!=na.container&&(na.container.style.cursor=ca);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=na.tooltipHandler&&na.tooltipHandler.hide()}};na.click=function(qa){};na.addMouseListener(ra);
-mxEvent.addListener(document,"mouseleave",function(qa){ra.clear()})};Graph.prototype.duplicateCells=function(z,L){z=null!=z?z:this.getSelectionCells();L=null!=L?L:!0;for(var M=0;M<z.length;M++)this.isTableCell(z[M])&&(z[M]=this.model.getParent(z[M]));z=this.model.getTopmostCells(z);var S=this.getModel(),ca=this.gridSize,ia=[];S.beginUpdate();try{var na={},ra=this.createCellLookup(z),qa=this.cloneCells(z,!1,na,!0);for(M=0;M<z.length;M++){var ya=S.getParent(z[M]);if(null!=ya){var Ea=this.moveCells([qa[M]],
-ca,ca,!1)[0];ia.push(Ea);if(L)S.add(ya,qa[M]);else{var Na=ya.getIndex(z[M]);S.add(ya,qa[M],Na+1)}if(this.isTable(ya)){var Pa=this.getCellGeometry(qa[M]),Qa=this.getCellGeometry(ya);null!=Pa&&null!=Qa&&(Qa=Qa.clone(),Qa.height+=Pa.height,S.setGeometry(ya,Qa))}}else ia.push(qa[M])}this.updateCustomLinks(this.createCellMapping(na,ra),qa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",qa))}finally{S.endUpdate()}return ia};Graph.prototype.insertImage=function(z,L,M){if(null!=z&&null!=
-this.cellEditor.textarea){for(var S=this.cellEditor.textarea.getElementsByTagName("img"),ca=[],ia=0;ia<S.length;ia++)ca.push(S[ia]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==ca.length+1)for(ia=z.length-1;0<=ia;ia--)if(0==ia||z[ia]!=ca[ia-1]){z[ia].setAttribute("width",L);z[ia].setAttribute("height",M);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);
+function(){return!1};Graph.prototype.addText=function(z,L,M){var S=new mxCell;S.value="Text";S.geometry=new mxGeometry(0,0,0,0);S.vertex=!0;if(null!=M&&this.model.isEdge(M.cell)){S.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";S.geometry.relative=!0;S.connectable=!1;var ca=this.view.getRelativePoint(M,z,L);S.geometry.x=Math.round(1E4*ca.x)/1E4;S.geometry.y=Math.round(ca.y);S.geometry.offset=new mxPoint(0,0);ca=this.view.getPoint(M,S.geometry);var ha=this.view.scale;
+S.geometry.offset=new mxPoint(Math.round((z-ca.x)/ha),Math.round((L-ca.y)/ha))}else ca=this.view.translate,S.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",S.geometry.width=40,S.geometry.height=20,S.geometry.x=Math.round(z/this.view.scale)-ca.x-(null!=M?M.origin.x:0),S.geometry.y=Math.round(L/this.view.scale)-ca.y-(null!=M?M.origin.y:0),S.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([S],null!=M?M.cell:null),this.fireEvent(new mxEventObject("textInserted",
+"cells",[S])),this.autoSizeCell(S)}finally{this.getModel().endUpdate()}return S};Graph.prototype.addClickHandler=function(z,L,M){var S=mxUtils.bind(this,function(){var qa=this.container.getElementsByTagName("a");if(null!=qa)for(var xa=0;xa<qa.length;xa++){var Ga=this.getAbsoluteUrl(qa[xa].getAttribute("href"));null!=Ga&&(qa[xa].setAttribute("rel",this.linkRelation),qa[xa].setAttribute("href",Ga),null!=L&&mxEvent.addGestureListeners(qa[xa],null,null,L))}});this.model.addListener(mxEvent.CHANGE,S);
+S();var ca=this.container.style.cursor,ha=this.getTolerance(),oa=this,ra={currentState:null,currentLink:null,currentTarget:null,highlight:null!=z&&""!=z&&z!=mxConstants.NONE?new mxCellHighlight(oa,z,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(qa){var xa=qa.sourceState;if(null==xa||null==oa.getLinkForCell(xa.cell))qa=oa.getCellAt(qa.getGraphX(),qa.getGraphY(),null,null,null,function(Ga,La,Pa){return null==oa.getLinkForCell(Ga.cell)}),xa=null==xa||oa.model.isAncestor(qa,
+xa.cell)?oa.view.getState(qa):null;xa!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=xa,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(qa,xa){this.startX=xa.getGraphX();this.startY=xa.getGraphY();this.scrollLeft=oa.container.scrollLeft;this.scrollTop=oa.container.scrollTop;null==this.currentLink&&"auto"==oa.container.style.overflow&&(oa.container.style.cursor="move");this.updateCurrentState(xa)},mouseMove:function(qa,xa){if(oa.isMouseDown)null!=
+this.currentLink&&(qa=Math.abs(this.startX-xa.getGraphX()),xa=Math.abs(this.startY-xa.getGraphY()),(qa>ha||xa>ha)&&this.clear());else{for(qa=xa.getSource();null!=qa&&"a"!=qa.nodeName.toLowerCase();)qa=qa.parentNode;null!=qa?this.clear():(null!=oa.tooltipHandler&&null!=this.currentLink&&null!=this.currentState&&oa.tooltipHandler.reset(xa,!0,this.currentState),(null==this.currentState||xa.getState()!=this.currentState&&null!=xa.sourceState||!oa.intersects(this.currentState,xa.getGraphX(),xa.getGraphY()))&&
+this.updateCurrentState(xa))}},mouseUp:function(qa,xa){var Ga=xa.getSource();for(qa=xa.getEvent();null!=Ga&&"a"!=Ga.nodeName.toLowerCase();)Ga=Ga.parentNode;null==Ga&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ha&&Math.abs(this.scrollTop-oa.container.scrollTop)<ha&&(null==xa.sourceState||!xa.isSource(xa.sourceState.control))&&((mxEvent.isLeftMouseButton(qa)||mxEvent.isMiddleMouseButton(qa))&&!mxEvent.isPopupTrigger(qa)||mxEvent.isTouchEvent(qa))&&(null!=this.currentLink?(Ga=oa.isBlankLink(this.currentLink),
+"data:"!==this.currentLink.substring(0,5)&&Ga||null==L||L(qa,this.currentLink),mxEvent.isConsumed(qa)||(qa=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(qa)?"_blank":Ga?oa.linkTarget:"_top",oa.openLink(this.currentLink,qa),xa.consume())):null!=M&&!xa.isConsumed()&&Math.abs(this.scrollLeft-oa.container.scrollLeft)<ha&&Math.abs(this.scrollTop-oa.container.scrollTop)<ha&&Math.abs(this.startX-xa.getGraphX())<ha&&Math.abs(this.startY-xa.getGraphY())<ha&&M(xa.getEvent()));this.clear()},
+activate:function(qa){this.currentLink=oa.getAbsoluteUrl(oa.getLinkForCell(qa.cell));null!=this.currentLink&&(this.currentTarget=oa.getLinkTargetForCell(qa.cell),oa.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(qa))},clear:function(){null!=oa.container&&(oa.container.style.cursor=ca);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=oa.tooltipHandler&&oa.tooltipHandler.hide()}};oa.click=function(qa){};oa.addMouseListener(ra);
+mxEvent.addListener(document,"mouseleave",function(qa){ra.clear()})};Graph.prototype.duplicateCells=function(z,L){z=null!=z?z:this.getSelectionCells();L=null!=L?L:!0;for(var M=0;M<z.length;M++)this.isTableCell(z[M])&&(z[M]=this.model.getParent(z[M]));z=this.model.getTopmostCells(z);var S=this.getModel(),ca=this.gridSize,ha=[];S.beginUpdate();try{var oa={},ra=this.createCellLookup(z),qa=this.cloneCells(z,!1,oa,!0);for(M=0;M<z.length;M++){var xa=S.getParent(z[M]);if(null!=xa){var Ga=this.moveCells([qa[M]],
+ca,ca,!1)[0];ha.push(Ga);if(L)S.add(xa,qa[M]);else{var La=xa.getIndex(z[M]);S.add(xa,qa[M],La+1)}if(this.isTable(xa)){var Pa=this.getCellGeometry(qa[M]),Oa=this.getCellGeometry(xa);null!=Pa&&null!=Oa&&(Oa=Oa.clone(),Oa.height+=Pa.height,S.setGeometry(xa,Oa))}}else ha.push(qa[M])}this.updateCustomLinks(this.createCellMapping(oa,ra),qa,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",qa))}finally{S.endUpdate()}return ha};Graph.prototype.insertImage=function(z,L,M){if(null!=z&&null!=
+this.cellEditor.textarea){for(var S=this.cellEditor.textarea.getElementsByTagName("img"),ca=[],ha=0;ha<S.length;ha++)ca.push(S[ha]);document.execCommand("insertimage",!1,z);z=this.cellEditor.textarea.getElementsByTagName("img");if(z.length==ca.length+1)for(ha=z.length-1;0<=ha;ha--)if(0==ha||z[ha]!=ca[ha-1]){z[ha].setAttribute("width",L);z[ha].setAttribute("height",M);break}}};Graph.prototype.insertLink=function(z){if(null!=this.cellEditor.textarea)if(0==z.length)document.execCommand("unlink",!1);
else if(mxClient.IS_FF){for(var L=this.cellEditor.textarea.getElementsByTagName("a"),M=[],S=0;S<L.length;S++)M.push(L[S]);document.execCommand("createlink",!1,mxUtils.trim(z));L=this.cellEditor.textarea.getElementsByTagName("a");if(L.length==M.length+1)for(S=L.length-1;0<=S;S--)if(L[S]!=M[S-1]){for(L=L[S].getElementsByTagName("a");0<L.length;){for(M=L[0].parentNode;null!=L[0].firstChild;)M.insertBefore(L[0].firstChild,L[0]);M.removeChild(L[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(z))};
-Graph.prototype.isCellResizable=function(z){var L=mxGraph.prototype.isCellResizable.apply(this,arguments),M=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(L||"0"!=mxUtils.getValue(M,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==M[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,L){null==L&&(L=this.getSelectionCells());if(null!=L&&1<L.length){for(var M=[],S=null,ca=null,ia=0;ia<L.length;ia++)if(this.getModel().isVertex(L[ia])){var na=this.view.getState(L[ia]);
-if(null!=na){var ra=z?na.getCenterX():na.getCenterY();S=null!=S?Math.max(S,ra):ra;ca=null!=ca?Math.min(ca,ra):ra;M.push(na)}}if(2<M.length){M.sort(function(Na,Pa){return z?Na.x-Pa.x:Na.y-Pa.y});na=this.view.translate;ra=this.view.scale;ca=ca/ra-(z?na.x:na.y);S=S/ra-(z?na.x:na.y);this.getModel().beginUpdate();try{var qa=(S-ca)/(M.length-1);S=ca;for(ia=1;ia<M.length-1;ia++){var ya=this.view.getState(this.model.getParent(M[ia].cell)),Ea=this.getCellGeometry(M[ia].cell);S+=qa;null!=Ea&&null!=ya&&(Ea=
-Ea.clone(),z?Ea.x=Math.round(S-Ea.width/2)-ya.origin.x:Ea.y=Math.round(S-Ea.height/2)-ya.origin.y,this.getModel().setGeometry(M[ia].cell,Ea))}}finally{this.getModel().endUpdate()}}}return L};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(L,M){return this.getLinkForCell(L.cell)});return z};Graph.prototype.parseBackgroundImage=
-function(z){var L=null;null!=z&&0<z.length&&(z=JSON.parse(z),L=new mxImage(z.src,z.width,z.height));return L};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,L,M,S,ca,ia,na,ra,qa,ya,Ea,Na,Pa,Qa){var Ua=null;if(null!=Qa)for(Ua=new mxDictionary,Ea=0;Ea<Qa.length;Ea++)Ua.put(Qa[Ea],!0);if(Qa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{L=null!=L?L:1;M=null!=M?M:0;ca=null!=ca?ca:!0;ia=null!=ia?ia:!0;na=
-null!=na?na:!0;ya=null!=ya?ya:!1;var La="page"==Pa?this.view.getBackgroundPageBounds():ia&&null==Ua||S||"diagram"==Pa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),ua=this.view.scale;"diagram"==Pa&&null!=this.backgroundImage&&(La=mxRectangle.fromRectangle(La),La.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*ua,(this.view.translate.y+this.backgroundImage.y)*ua,this.backgroundImage.width*ua,this.backgroundImage.height*ua)));if(null==La)throw Error(mxResources.get("drawingEmpty"));
-S=L/ua;Pa=ca?-.5:0;var za=Graph.createSvgNode(Pa,Pa,Math.max(1,Math.ceil(La.width*S)+2*M)+(ya&&0==M?5:0),Math.max(1,Math.ceil(La.height*S)+2*M)+(ya&&0==M?5:0),z),Ka=za.ownerDocument,Ga=null!=Ka.createElementNS?Ka.createElementNS(mxConstants.NS_SVG,"g"):Ka.createElement("g");za.appendChild(Ga);var Ma=this.createSvgCanvas(Ga);Ma.foOffset=ca?-.5:0;Ma.textOffset=ca?-.5:0;Ma.imageOffset=ca?-.5:0;Ma.translate(Math.floor(M/L-La.x/ua),Math.floor(M/L-La.y/ua));var db=document.createElement("div"),Ra=Ma.getAlternateText;
-Ma.getAlternateText=function(cb,eb,hb,tb,vb,qb,Ab,Bb,ub,kb,gb,lb,wb){if(null!=qb&&0<this.state.fontSize)try{mxUtils.isNode(qb)?qb=qb.innerText:(db.innerHTML=qb,qb=mxUtils.extractTextWithWhitespace(db.childNodes));for(var rb=Math.ceil(2*tb/this.state.fontSize),xb=[],zb=0,yb=0;(0==rb||zb<rb)&&yb<qb.length;){var ob=qb.charCodeAt(yb);if(10==ob||13==ob){if(0<zb)break}else xb.push(qb.charAt(yb)),255>ob&&zb++;yb++}xb.length<qb.length&&1<qb.length-xb.length&&(qb=mxUtils.trim(xb.join(""))+"...");return qb}catch(c){return Ra.apply(this,
-arguments)}else return Ra.apply(this,arguments)};var ib=this.backgroundImage;if(null!=ib){z=ua/L;var mb=this.view.translate;Pa=new mxRectangle((ib.x+mb.x)*z,(ib.y+mb.y)*z,ib.width*z,ib.height*z);mxUtils.intersects(La,Pa)&&Ma.image(ib.x+mb.x,ib.y+mb.y,ib.width,ib.height,ib.src,!0)}Ma.scale(S);Ma.textEnabled=na;ra=null!=ra?ra:this.createSvgImageExport();var nb=ra.drawCellState,pb=ra.getLinkForCellState;ra.getLinkForCellState=function(cb,eb){var hb=pb.apply(this,arguments);return null==hb||cb.view.graph.isCustomLink(hb)?
-null:hb};ra.getLinkTargetForCellState=function(cb,eb){return cb.view.graph.getLinkTargetForCell(cb.cell)};ra.drawCellState=function(cb,eb){for(var hb=cb.view.graph,tb=null!=Ua?Ua.get(cb.cell):hb.isCellSelected(cb.cell),vb=hb.model.getParent(cb.cell);!(ia&&null==Ua||tb)&&null!=vb;)tb=null!=Ua?Ua.get(vb):hb.isCellSelected(vb),vb=hb.model.getParent(vb);(ia&&null==Ua||tb)&&nb.apply(this,arguments)};ra.drawState(this.getView().getState(this.model.root),Ma);this.updateSvgLinks(za,qa,!0);this.addForeignObjectWarning(Ma,
-za);return za}finally{Qa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var M=z.createElement("switch"),S=z.createElement("g");S.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ca=z.createElement("a");ca.setAttribute("transform","translate(0,-5)");null==ca.setAttributeNS||L.ownerDocument!=document&&
+Graph.prototype.isCellResizable=function(z){var L=mxGraph.prototype.isCellResizable.apply(this,arguments),M=this.getCurrentCellStyle(z);return!this.isTableCell(z)&&!this.isTableRow(z)&&(L||"0"!=mxUtils.getValue(M,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==M[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(z,L){null==L&&(L=this.getSelectionCells());if(null!=L&&1<L.length){for(var M=[],S=null,ca=null,ha=0;ha<L.length;ha++)if(this.getModel().isVertex(L[ha])){var oa=this.view.getState(L[ha]);
+if(null!=oa){var ra=z?oa.getCenterX():oa.getCenterY();S=null!=S?Math.max(S,ra):ra;ca=null!=ca?Math.min(ca,ra):ra;M.push(oa)}}if(2<M.length){M.sort(function(La,Pa){return z?La.x-Pa.x:La.y-Pa.y});oa=this.view.translate;ra=this.view.scale;ca=ca/ra-(z?oa.x:oa.y);S=S/ra-(z?oa.x:oa.y);this.getModel().beginUpdate();try{var qa=(S-ca)/(M.length-1);S=ca;for(ha=1;ha<M.length-1;ha++){var xa=this.view.getState(this.model.getParent(M[ha].cell)),Ga=this.getCellGeometry(M[ha].cell);S+=qa;null!=Ga&&null!=xa&&(Ga=
+Ga.clone(),z?Ga.x=Math.round(S-Ga.width/2)-xa.origin.x:Ga.y=Math.round(S-Ga.height/2)-xa.origin.y,this.getModel().setGeometry(M[ha].cell,Ga))}}finally{this.getModel().endUpdate()}}}return L};Graph.prototype.isCloneEvent=function(z){return mxClient.IS_MAC&&mxEvent.isMetaDown(z)||mxEvent.isControlDown(z)};Graph.prototype.createSvgImageExport=function(){var z=new mxImageExport;z.getLinkForCellState=mxUtils.bind(this,function(L,M){return this.getLinkForCell(L.cell)});return z};Graph.prototype.parseBackgroundImage=
+function(z){var L=null;null!=z&&0<z.length&&(z=JSON.parse(z),L=new mxImage(z.src,z.width,z.height));return L};Graph.prototype.getBackgroundImageObject=function(z){return z};Graph.prototype.getSvg=function(z,L,M,S,ca,ha,oa,ra,qa,xa,Ga,La,Pa,Oa){var Ta=null;if(null!=Oa)for(Ta=new mxDictionary,Ga=0;Ga<Oa.length;Ga++)Ta.put(Oa[Ga],!0);if(Oa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{L=null!=L?L:1;M=null!=M?M:0;ca=null!=ca?ca:!0;ha=null!=ha?ha:!0;oa=
+null!=oa?oa:!0;xa=null!=xa?xa:!1;var Ma="page"==Pa?this.view.getBackgroundPageBounds():ha&&null==Ta||S||"diagram"==Pa?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),ua=this.view.scale;"diagram"==Pa&&null!=this.backgroundImage&&(Ma=mxRectangle.fromRectangle(Ma),Ma.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*ua,(this.view.translate.y+this.backgroundImage.y)*ua,this.backgroundImage.width*ua,this.backgroundImage.height*ua)));if(null==Ma)throw Error(mxResources.get("drawingEmpty"));
+S=L/ua;Pa=ca?-.5:0;var ya=Graph.createSvgNode(Pa,Pa,Math.max(1,Math.ceil(Ma.width*S)+2*M)+(xa&&0==M?5:0),Math.max(1,Math.ceil(Ma.height*S)+2*M)+(xa&&0==M?5:0),z),Na=ya.ownerDocument,Fa=null!=Na.createElementNS?Na.createElementNS(mxConstants.NS_SVG,"g"):Na.createElement("g");ya.appendChild(Fa);var Ra=this.createSvgCanvas(Fa);Ra.foOffset=ca?-.5:0;Ra.textOffset=ca?-.5:0;Ra.imageOffset=ca?-.5:0;Ra.translate(Math.floor(M/L-Ma.x/ua),Math.floor(M/L-Ma.y/ua));var db=document.createElement("div"),Va=Ra.getAlternateText;
+Ra.getAlternateText=function(Ya,gb,hb,ob,vb,qb,Ab,Bb,tb,lb,ib,mb,wb){if(null!=qb&&0<this.state.fontSize)try{mxUtils.isNode(qb)?qb=qb.innerText:(db.innerHTML=qb,qb=mxUtils.extractTextWithWhitespace(db.childNodes));for(var rb=Math.ceil(2*ob/this.state.fontSize),xb=[],zb=0,yb=0;(0==rb||zb<rb)&&yb<qb.length;){var pb=qb.charCodeAt(yb);if(10==pb||13==pb){if(0<zb)break}else xb.push(qb.charAt(yb)),255>pb&&zb++;yb++}xb.length<qb.length&&1<qb.length-xb.length&&(qb=mxUtils.trim(xb.join(""))+"...");return qb}catch(c){return Va.apply(this,
+arguments)}else return Va.apply(this,arguments)};var fb=this.backgroundImage;if(null!=fb){z=ua/L;var kb=this.view.translate;Pa=new mxRectangle((fb.x+kb.x)*z,(fb.y+kb.y)*z,fb.width*z,fb.height*z);mxUtils.intersects(Ma,Pa)&&Ra.image(fb.x+kb.x,fb.y+kb.y,fb.width,fb.height,fb.src,!0)}Ra.scale(S);Ra.textEnabled=oa;ra=null!=ra?ra:this.createSvgImageExport();var ub=ra.drawCellState,nb=ra.getLinkForCellState;ra.getLinkForCellState=function(Ya,gb){var hb=nb.apply(this,arguments);return null==hb||Ya.view.graph.isCustomLink(hb)?
+null:hb};ra.getLinkTargetForCellState=function(Ya,gb){return Ya.view.graph.getLinkTargetForCell(Ya.cell)};ra.drawCellState=function(Ya,gb){for(var hb=Ya.view.graph,ob=null!=Ta?Ta.get(Ya.cell):hb.isCellSelected(Ya.cell),vb=hb.model.getParent(Ya.cell);!(ha&&null==Ta||ob)&&null!=vb;)ob=null!=Ta?Ta.get(vb):hb.isCellSelected(vb),vb=hb.model.getParent(vb);(ha&&null==Ta||ob)&&ub.apply(this,arguments)};ra.drawState(this.getView().getState(this.model.root),Ra);this.updateSvgLinks(ya,qa,!0);this.addForeignObjectWarning(Ra,
+ya);return ya}finally{Oa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(z,L){if("0"!=urlParams["svg-warning"]&&0<L.getElementsByTagName("foreignObject").length){var M=z.createElement("switch"),S=z.createElement("g");S.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var ca=z.createElement("a");ca.setAttribute("transform","translate(0,-5)");null==ca.setAttributeNS||L.ownerDocument!=document&&
null==document.documentMode?(ca.setAttribute("xlink:href",Graph.foreignObjectWarningLink),ca.setAttribute("target","_blank")):(ca.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),ca.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));z=z.createElement("text");z.setAttribute("text-anchor","middle");z.setAttribute("font-size","10px");z.setAttribute("x","50%");z.setAttribute("y","100%");mxUtils.write(z,Graph.foreignObjectWarningText);M.appendChild(S);ca.appendChild(z);
M.appendChild(ca);L.appendChild(M)}};Graph.prototype.updateSvgLinks=function(z,L,M){z=z.getElementsByTagName("a");for(var S=0;S<z.length;S++)if(null==z[S].getAttribute("target")){var ca=z[S].getAttribute("href");null==ca&&(ca=z[S].getAttribute("xlink:href"));null!=ca&&(null!=L&&/^https?:\/\//.test(ca)?z[S].setAttribute("target",L):M&&this.isCustomLink(ca)&&z[S].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(z){z=new mxSvgCanvas2D(z);z.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;
z.pointerEvents=!0;return z};Graph.prototype.getSelectedElement=function(){var z=null;if(window.getSelection){var L=window.getSelection();L.getRangeAt&&L.rangeCount&&(z=L.getRangeAt(0).commonAncestorContainer)}else document.selection&&(z=document.selection.createRange().parentElement());return z};Graph.prototype.getSelectedEditingElement=function(){for(var z=this.getSelectedElement();null!=z&&z.nodeType!=mxConstants.NODETYPE_ELEMENT;)z=z.parentNode;null!=z&&z==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&
this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(z=this.cellEditor.textarea.firstChild);return z};Graph.prototype.getParentByName=function(z,L,M){for(;null!=z&&z.nodeName!=L;){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.getParentByNames=function(z,L,M){for(;null!=z&&!(0<=mxUtils.indexOf(L,z.nodeName));){if(z==M)return null;z=z.parentNode}return z};Graph.prototype.selectNode=function(z){var L=null;if(window.getSelection){if(L=window.getSelection(),L.getRangeAt&&
-L.rangeCount){var M=document.createRange();M.selectNode(z);L.removeAllRanges();L.addRange(M)}}else(L=document.selection)&&"Control"!=L.type&&(z=L.createRange(),z.collapse(!0),M=L.createRange(),M.setEndPoint("StartToStart",z),M.select())};Graph.prototype.flipEdgePoints=function(z,L,M){var S=this.getCellGeometry(z);if(null!=S){S=S.clone();if(null!=S.points)for(var ca=0;ca<S.points.length;ca++)L?S.points[ca].x=M+(M-S.points[ca].x):S.points[ca].y=M+(M-S.points[ca].y);ca=function(ia){null!=ia&&(L?ia.x=
-M+(M-ia.x):ia.y=M+(M-ia.y))};ca(S.getTerminalPoint(!0));ca(S.getTerminalPoint(!1));this.model.setGeometry(z,S)}};Graph.prototype.flipChildren=function(z,L,M){this.model.beginUpdate();try{for(var S=this.model.getChildCount(z),ca=0;ca<S;ca++){var ia=this.model.getChildAt(z,ca);if(this.model.isEdge(ia))this.flipEdgePoints(ia,L,M);else{var na=this.getCellGeometry(ia);null!=na&&(na=na.clone(),L?na.x=M+(M-na.x-na.width):na.y=M+(M-na.y-na.height),this.model.setGeometry(ia,na))}}}finally{this.model.endUpdate()}};
-Graph.prototype.flipCells=function(z,L){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var M=[],S=0;S<z.length;S++)if(this.model.isEdge(z[S])){var ca=this.view.getState(z[S]);null!=ca&&this.flipEdgePoints(z[S],L,(L?ca.getCenterX():ca.getCenterY())/this.view.scale-(L?ca.origin.x:ca.origin.y)-(L?this.view.translate.x:this.view.translate.y))}else{var ia=this.getCellGeometry(z[S]);null!=ia&&this.flipChildren(z[S],L,L?ia.getCenterX()-ia.x:ia.getCenterY()-ia.y);M.push(z[S])}this.toggleCellStyles(L?
-mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,M)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,L){var M=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var S=0;S<z.length;S++){var ca=this.model.getParent(z[S]);if(this.isTable(ca)){var ia=this.getCellGeometry(z[S]),na=this.getCellGeometry(ca);null!=ia&&null!=na&&(na=na.clone(),na.height-=ia.height,this.model.setGeometry(ca,na))}}var ra=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,
-L)}finally{this.model.endUpdate()}if(null!=ra)for(M=[],S=0;S<ra.length;S++)this.model.contains(ra[S])&&(this.model.isVertex(ra[S])||this.model.isEdge(ra[S]))&&M.push(ra[S])}return M};Graph.prototype.insertTableColumn=function(z,L){var M=this.getModel();M.beginUpdate();try{var S=z,ca=0;if(this.isTableCell(z)){var ia=M.getParent(z);S=M.getParent(ia);ca=mxUtils.indexOf(M.getChildCells(ia,!0),z)}else this.isTableRow(z)?S=M.getParent(z):z=M.getChildCells(S,!0)[0],L||(ca=M.getChildCells(z,!0).length-1);
-var na=M.getChildCells(S,!0),ra=Graph.minTableColumnWidth;for(z=0;z<na.length;z++){var qa=M.getChildCells(na[z],!0)[ca],ya=M.cloneCell(qa,!1),Ea=this.getCellGeometry(ya);ya.value=null;ya.style=mxUtils.setStyle(mxUtils.setStyle(ya.style,"rowspan",null),"colspan",null);if(null!=Ea){null!=Ea.alternateBounds&&(Ea.width=Ea.alternateBounds.width,Ea.height=Ea.alternateBounds.height,Ea.alternateBounds=null);ra=Ea.width;var Na=this.getCellGeometry(na[z]);null!=Na&&(Ea.height=Na.height)}M.add(na[z],ya,ca+(L?
+L.rangeCount){var M=document.createRange();M.selectNode(z);L.removeAllRanges();L.addRange(M)}}else(L=document.selection)&&"Control"!=L.type&&(z=L.createRange(),z.collapse(!0),M=L.createRange(),M.setEndPoint("StartToStart",z),M.select())};Graph.prototype.flipEdgePoints=function(z,L,M){var S=this.getCellGeometry(z);if(null!=S){S=S.clone();if(null!=S.points)for(var ca=0;ca<S.points.length;ca++)L?S.points[ca].x=M+(M-S.points[ca].x):S.points[ca].y=M+(M-S.points[ca].y);ca=function(ha){null!=ha&&(L?ha.x=
+M+(M-ha.x):ha.y=M+(M-ha.y))};ca(S.getTerminalPoint(!0));ca(S.getTerminalPoint(!1));this.model.setGeometry(z,S)}};Graph.prototype.flipChildren=function(z,L,M){this.model.beginUpdate();try{for(var S=this.model.getChildCount(z),ca=0;ca<S;ca++){var ha=this.model.getChildAt(z,ca);if(this.model.isEdge(ha))this.flipEdgePoints(ha,L,M);else{var oa=this.getCellGeometry(ha);null!=oa&&(oa=oa.clone(),L?oa.x=M+(M-oa.x-oa.width):oa.y=M+(M-oa.y-oa.height),this.model.setGeometry(ha,oa))}}}finally{this.model.endUpdate()}};
+Graph.prototype.flipCells=function(z,L){this.model.beginUpdate();try{z=this.model.getTopmostCells(z);for(var M=[],S=0;S<z.length;S++)if(this.model.isEdge(z[S])){var ca=this.view.getState(z[S]);null!=ca&&this.flipEdgePoints(z[S],L,(L?ca.getCenterX():ca.getCenterY())/this.view.scale-(L?ca.origin.x:ca.origin.y)-(L?this.view.translate.x:this.view.translate.y))}else{var ha=this.getCellGeometry(z[S]);null!=ha&&this.flipChildren(z[S],L,L?ha.getCenterX()-ha.x:ha.getCenterY()-ha.y);M.push(z[S])}this.toggleCellStyles(L?
+mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,M)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(z,L){var M=null;if(null!=z&&0<z.length){this.model.beginUpdate();try{for(var S=0;S<z.length;S++){var ca=this.model.getParent(z[S]);if(this.isTable(ca)){var ha=this.getCellGeometry(z[S]),oa=this.getCellGeometry(ca);null!=ha&&null!=oa&&(oa=oa.clone(),oa.height-=ha.height,this.model.setGeometry(ca,oa))}}var ra=this.selectParentAfterDelete?this.model.getParents(z):null;this.removeCells(z,
+L)}finally{this.model.endUpdate()}if(null!=ra)for(M=[],S=0;S<ra.length;S++)this.model.contains(ra[S])&&(this.model.isVertex(ra[S])||this.model.isEdge(ra[S]))&&M.push(ra[S])}return M};Graph.prototype.insertTableColumn=function(z,L){var M=this.getModel();M.beginUpdate();try{var S=z,ca=0;if(this.isTableCell(z)){var ha=M.getParent(z);S=M.getParent(ha);ca=mxUtils.indexOf(M.getChildCells(ha,!0),z)}else this.isTableRow(z)?S=M.getParent(z):z=M.getChildCells(S,!0)[0],L||(ca=M.getChildCells(z,!0).length-1);
+var oa=M.getChildCells(S,!0),ra=Graph.minTableColumnWidth;for(z=0;z<oa.length;z++){var qa=M.getChildCells(oa[z],!0)[ca],xa=M.cloneCell(qa,!1),Ga=this.getCellGeometry(xa);xa.value=null;xa.style=mxUtils.setStyle(mxUtils.setStyle(xa.style,"rowspan",null),"colspan",null);if(null!=Ga){null!=Ga.alternateBounds&&(Ga.width=Ga.alternateBounds.width,Ga.height=Ga.alternateBounds.height,Ga.alternateBounds=null);ra=Ga.width;var La=this.getCellGeometry(oa[z]);null!=La&&(Ga.height=La.height)}M.add(oa[z],xa,ca+(L?
0:1))}var Pa=this.getCellGeometry(S);null!=Pa&&(Pa=Pa.clone(),Pa.width+=ra,M.setGeometry(S,Pa))}finally{M.endUpdate()}};Graph.prototype.deleteLane=function(z){var L=this.getModel();L.beginUpdate();try{var M=null;M="stackLayout"==this.getCurrentCellStyle(z).childLayout?z:L.getParent(z);var S=L.getChildCells(M,!0);0==S.length?L.remove(M):(M==z&&(z=S[S.length-1]),L.remove(z))}finally{L.endUpdate()}};Graph.prototype.insertLane=function(z,L){var M=this.getModel();M.beginUpdate();try{var S=null;if("stackLayout"==
-this.getCurrentCellStyle(z).childLayout){S=z;var ca=M.getChildCells(S,!0);z=ca[L?0:ca.length-1]}else S=M.getParent(z);var ia=S.getIndex(z);z=M.cloneCell(z,!1);z.value=null;M.add(S,z,ia+(L?0:1))}finally{M.endUpdate()}};Graph.prototype.insertTableRow=function(z,L){var M=this.getModel();M.beginUpdate();try{var S=z,ca=z;if(this.isTableCell(z))ca=M.getParent(z),S=M.getParent(ca);else if(this.isTableRow(z))S=M.getParent(z);else{var ia=M.getChildCells(S,!0);ca=ia[L?0:ia.length-1]}var na=M.getChildCells(ca,
-!0),ra=S.getIndex(ca);ca=M.cloneCell(ca,!1);ca.value=null;var qa=this.getCellGeometry(ca);if(null!=qa){for(ia=0;ia<na.length;ia++){z=M.cloneCell(na[ia],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var ya=this.getCellGeometry(z);null!=ya&&(null!=ya.alternateBounds&&(ya.width=ya.alternateBounds.width,ya.height=ya.alternateBounds.height,ya.alternateBounds=null),ya.height=qa.height);ca.insert(z)}M.add(S,ca,ra+(L?0:1));var Ea=this.getCellGeometry(S);
-null!=Ea&&(Ea=Ea.clone(),Ea.height+=qa.height,M.setGeometry(S,Ea))}}finally{M.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,S=z;this.isTableCell(z)&&(S=L.getParent(z));this.isTableRow(S)&&(M=L.getParent(S));var ca=L.getChildCells(M,!0);if(0==ca.length)L.remove(M);else{this.isTableRow(S)||(S=ca[0]);var ia=L.getChildCells(S,!0);if(1>=ia.length)L.remove(M);else{var na=ia.length-1;this.isTableCell(z)&&(na=mxUtils.indexOf(ia,z));for(S=z=0;S<
-ca.length;S++){var ra=L.getChildCells(ca[S],!0)[na];L.remove(ra);var qa=this.getCellGeometry(ra);null!=qa&&(z=Math.max(z,qa.width))}var ya=this.getCellGeometry(M);null!=ya&&(ya=ya.clone(),ya.width-=z,L.setGeometry(M,ya))}}}finally{L.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,S=z;this.isTableCell(z)&&(z=S=L.getParent(z));this.isTableRow(z)&&(M=L.getParent(S));var ca=L.getChildCells(M,!0);if(1>=ca.length)L.remove(M);else{this.isTableRow(S)||
-(S=ca[ca.length-1]);L.remove(S);z=0;var ia=this.getCellGeometry(S);null!=ia&&(z=ia.height);var na=this.getCellGeometry(M);null!=na&&(na=na.clone(),na.height-=z,L.setGeometry(M,na))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(z,L){for(var M=z.tBodies[0],S=M.rows[0].cells,ca=z=0;ca<S.length;ca++){var ia=S[ca].getAttribute("colspan");z+=null!=ia?parseInt(ia):1}L=M.insertRow(L);for(ca=0;ca<z;ca++)mxUtils.br(L.insertCell(-1));return L.cells[0]};Graph.prototype.deleteRow=function(z,L){z.tBodies[0].deleteRow(L)};
+this.getCurrentCellStyle(z).childLayout){S=z;var ca=M.getChildCells(S,!0);z=ca[L?0:ca.length-1]}else S=M.getParent(z);var ha=S.getIndex(z);z=M.cloneCell(z,!1);z.value=null;M.add(S,z,ha+(L?0:1))}finally{M.endUpdate()}};Graph.prototype.insertTableRow=function(z,L){var M=this.getModel();M.beginUpdate();try{var S=z,ca=z;if(this.isTableCell(z))ca=M.getParent(z),S=M.getParent(ca);else if(this.isTableRow(z))S=M.getParent(z);else{var ha=M.getChildCells(S,!0);ca=ha[L?0:ha.length-1]}var oa=M.getChildCells(ca,
+!0),ra=S.getIndex(ca);ca=M.cloneCell(ca,!1);ca.value=null;var qa=this.getCellGeometry(ca);if(null!=qa){for(ha=0;ha<oa.length;ha++){z=M.cloneCell(oa[ha],!1);z.value=null;z.style=mxUtils.setStyle(mxUtils.setStyle(z.style,"rowspan",null),"colspan",null);var xa=this.getCellGeometry(z);null!=xa&&(null!=xa.alternateBounds&&(xa.width=xa.alternateBounds.width,xa.height=xa.alternateBounds.height,xa.alternateBounds=null),xa.height=qa.height);ca.insert(z)}M.add(S,ca,ra+(L?0:1));var Ga=this.getCellGeometry(S);
+null!=Ga&&(Ga=Ga.clone(),Ga.height+=qa.height,M.setGeometry(S,Ga))}}finally{M.endUpdate()}};Graph.prototype.deleteTableColumn=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,S=z;this.isTableCell(z)&&(S=L.getParent(z));this.isTableRow(S)&&(M=L.getParent(S));var ca=L.getChildCells(M,!0);if(0==ca.length)L.remove(M);else{this.isTableRow(S)||(S=ca[0]);var ha=L.getChildCells(S,!0);if(1>=ha.length)L.remove(M);else{var oa=ha.length-1;this.isTableCell(z)&&(oa=mxUtils.indexOf(ha,z));for(S=z=0;S<
+ca.length;S++){var ra=L.getChildCells(ca[S],!0)[oa];L.remove(ra);var qa=this.getCellGeometry(ra);null!=qa&&(z=Math.max(z,qa.width))}var xa=this.getCellGeometry(M);null!=xa&&(xa=xa.clone(),xa.width-=z,L.setGeometry(M,xa))}}}finally{L.endUpdate()}};Graph.prototype.deleteTableRow=function(z){var L=this.getModel();L.beginUpdate();try{var M=z,S=z;this.isTableCell(z)&&(z=S=L.getParent(z));this.isTableRow(z)&&(M=L.getParent(S));var ca=L.getChildCells(M,!0);if(1>=ca.length)L.remove(M);else{this.isTableRow(S)||
+(S=ca[ca.length-1]);L.remove(S);z=0;var ha=this.getCellGeometry(S);null!=ha&&(z=ha.height);var oa=this.getCellGeometry(M);null!=oa&&(oa=oa.clone(),oa.height-=z,L.setGeometry(M,oa))}}finally{L.endUpdate()}};Graph.prototype.insertRow=function(z,L){for(var M=z.tBodies[0],S=M.rows[0].cells,ca=z=0;ca<S.length;ca++){var ha=S[ca].getAttribute("colspan");z+=null!=ha?parseInt(ha):1}L=M.insertRow(L);for(ca=0;ca<z;ca++)mxUtils.br(L.insertCell(-1));return L.cells[0]};Graph.prototype.deleteRow=function(z,L){z.tBodies[0].deleteRow(L)};
Graph.prototype.insertColumn=function(z,L){var M=z.tHead;if(null!=M)for(var S=0;S<M.rows.length;S++){var ca=document.createElement("th");M.rows[S].appendChild(ca);mxUtils.br(ca)}z=z.tBodies[0];for(M=0;M<z.rows.length;M++)S=z.rows[M].insertCell(L),mxUtils.br(S);return z.rows[0].cells[0<=L?L:z.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(z,L){if(0<=L){z=z.tBodies[0].rows;for(var M=0;M<z.length;M++)z[M].cells.length>L&&z[M].deleteCell(L)}};Graph.prototype.pasteHtmlAtCaret=function(z){if(window.getSelection){var L=
-window.getSelection();if(L.getRangeAt&&L.rangeCount){L=L.getRangeAt(0);L.deleteContents();var M=document.createElement("div");M.innerHTML=z;z=document.createDocumentFragment();for(var S;S=M.firstChild;)lastNode=z.appendChild(S);L.insertNode(z)}}else(L=document.selection)&&"Control"!=L.type&&L.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,L){function M(ca,ia){ca.length>ia&&(ca=ca.substring(0,Math.round(ia/2))+"..."+ca.substring(ca.length-Math.round(ia/4)));return ca}z=null!=
+window.getSelection();if(L.getRangeAt&&L.rangeCount){L=L.getRangeAt(0);L.deleteContents();var M=document.createElement("div");M.innerHTML=z;z=document.createDocumentFragment();for(var S;S=M.firstChild;)lastNode=z.appendChild(S);L.insertNode(z)}}else(L=document.selection)&&"Control"!=L.type&&L.createRange().pasteHTML(z)};Graph.prototype.createLinkForHint=function(z,L){function M(ca,ha){ca.length>ha&&(ca=ca.substring(0,Math.round(ha/2))+"..."+ca.substring(ca.length-Math.round(ha/4)));return ca}z=null!=
z?z:"javascript:void(0);";if(null==L||0==L.length)L=this.isCustomLink(z)?this.getLinkTitle(z):z;var S=document.createElement("a");S.setAttribute("rel",this.linkRelation);S.setAttribute("href",this.getAbsoluteUrl(z));S.setAttribute("title",M(this.isCustomLink(z)?this.getLinkTitle(z):z,80));null!=this.linkTarget&&S.setAttribute("target",this.linkTarget);mxUtils.write(S,M(L,40));this.isCustomLink(z)&&mxEvent.addListener(S,"click",mxUtils.bind(this,function(ca){this.customLinkClicked(z);mxEvent.consume(ca)}));
-return S};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ia,na){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=function(ia){ia=z.apply(this,arguments);if(mxEvent.isTouchEvent(ia.getEvent())&&null==ia.getState()){var na=this.getCellAt(ia.graphX,ia.graphY);null!=na&&this.isSwimlane(na)&&this.hitsSwimlaneContent(na,ia.graphX,ia.graphY)||
-(ia.state=this.view.getState(na),null!=ia.state&&null!=ia.state.shape&&(this.container.style.cursor=ia.state.shape.node.style.cursor))}null==ia.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ia};var L=!1,M=!1,S=!1,ca=this.fireMouseEvent;this.fireMouseEvent=function(ia,na,ra){ia==mxEvent.MOUSE_DOWN&&(na=this.updateMouseEvent(na),L=this.isCellSelected(na.getCell()),M=this.isSelectionEmpty(),S=this.popupMenuHandler.isMenuShowing());ca.apply(this,arguments)};this.popupMenuHandler.mouseUp=
-mxUtils.bind(this,function(ia,na){var ra=mxEvent.isMouseEvent(na.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==na.getState()||!na.isSource(na.getState().control))&&(this.popupMenuHandler.popupTrigger||!S&&!ra&&(M&&null==na.getCell()&&this.isSelectionEmpty()||L&&this.isCellSelected(na.getCell())));ra=!L||ra?null:mxUtils.bind(this,function(qa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ya=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(na.getX()+
-ya.x+1,na.getY()+ya.y+1,qa,na.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ia,na,ra])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():
+return S};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ha,oa){this.popupMenuHandler.hideMenu()});var z=this.updateMouseEvent;this.updateMouseEvent=function(ha){ha=z.apply(this,arguments);if(mxEvent.isTouchEvent(ha.getEvent())&&null==ha.getState()){var oa=this.getCellAt(ha.graphX,ha.graphY);null!=oa&&this.isSwimlane(oa)&&this.hitsSwimlaneContent(oa,ha.graphX,ha.graphY)||
+(ha.state=this.view.getState(oa),null!=ha.state&&null!=ha.state.shape&&(this.container.style.cursor=ha.state.shape.node.style.cursor))}null==ha.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ha};var L=!1,M=!1,S=!1,ca=this.fireMouseEvent;this.fireMouseEvent=function(ha,oa,ra){ha==mxEvent.MOUSE_DOWN&&(oa=this.updateMouseEvent(oa),L=this.isCellSelected(oa.getCell()),M=this.isSelectionEmpty(),S=this.popupMenuHandler.isMenuShowing());ca.apply(this,arguments)};this.popupMenuHandler.mouseUp=
+mxUtils.bind(this,function(ha,oa){var ra=mxEvent.isMouseEvent(oa.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==oa.getState()||!oa.isSource(oa.getState().control))&&(this.popupMenuHandler.popupTrigger||!S&&!ra&&(M&&null==oa.getCell()&&this.isSelectionEmpty()||L&&this.isCellSelected(oa.getCell())));ra=!L||ra?null:mxUtils.bind(this,function(qa){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var xa=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(oa.getX()+
+xa.x+1,oa.getY()+xa.y+1,qa,oa.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ha,oa,ra])})};mxCellEditor.prototype.isContentEditing=function(){var z=this.graph.view.getState(this.editingCell);return null!=z&&1==z.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var z="";window.getSelection?z=window.getSelection():
document.getSelection?z=document.getSelection():document.selection&&(z=document.selection.createRange().text);return""!=z};mxCellEditor.prototype.insertTab=function(z){var L=this.textarea.ownerDocument.defaultView.getSelection(),M=L.getRangeAt(0),S="\t";if(null!=z)for(S="";0<z;)S+=" ",z--;z=document.createElement("span");z.style.whiteSpace="pre";z.appendChild(document.createTextNode(S));M.insertNode(z);M.setStartAfter(z);M.setEndAfter(z);L.removeAllRanges();L.addRange(M)};mxCellEditor.prototype.alignText=
function(z,L){var M=null!=L&&mxEvent.isShiftDown(L);if(M||null!=window.getSelection&&null!=window.getSelection().containsNode){var S=!0;this.graph.processElements(this.textarea,function(ca){M||window.getSelection().containsNode(ca,!0)?(ca.removeAttribute("align"),ca.style.textAlign=null):S=!1});S&&this.graph.cellEditor.setAlign(z)}document.execCommand("justify"+z.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var z=window.getSelection();if(z.getRangeAt&&
z.rangeCount){for(var L=[],M=0,S=z.rangeCount;M<S;++M)L.push(z.getRangeAt(M));return L}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(z){try{if(z)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var L=0,M=z.length;L<M;++L)sel.addRange(z[L])}else document.selection&&z.select&&z.select()}catch(S){}};var C=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=
function(z){null!=z.text&&(z.text.replaceLinefeeds="0"!=mxUtils.getValue(z.style,"nl2Br","1"));C.apply(this,arguments)};var H=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(z,L){this.isKeepFocusEvent(z)||!mxEvent.isAltDown(z.getEvent())?H.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(z){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var G=mxCellEditor.prototype.startEditing;
mxCellEditor.prototype.startEditing=function(z,L){z=this.graph.getStartEditingCell(z,L);G.apply(this,arguments);var M=this.graph.view.getState(z);this.textarea.className=null!=M&&1==M.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(z);M=this.graph.getModel().getParent(z);var S=this.graph.getCellGeometry(z);if(this.graph.getModel().isEdge(M)&&null!=S&&S.relative||this.graph.getModel().isEdge(z))this.textarea.style.outline=
-mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var aa=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function L(ca,ia){ia.originalNode=ca;ca=ca.firstChild;for(var na=ia.firstChild;null!=ca&&null!=na;)L(ca,na),ca=ca.nextSibling,na=na.nextSibling;return ia}function M(ca,ia){if(null!=ca)if(ia.originalNode!=ca)S(ca);else for(ca=ca.firstChild,ia=ia.firstChild;null!=ca;){var na=ca.nextSibling;null==ia?S(ca):(M(ca,ia),
-ia=ia.nextSibling);ca=na}}function S(ca){for(var ia=ca.firstChild;null!=ia;){var na=ia.nextSibling;S(ia);ia=na}1==ca.nodeType&&("BR"===ca.nodeName||null!=ca.firstChild)||3==ca.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(ca)).length?(3==ca.nodeType&&mxUtils.setTextContent(ca,mxUtils.getTextContent(ca).replace(/\n|\r/g,"")),1==ca.nodeType&&(ca.removeAttribute("style"),ca.removeAttribute("class"),ca.removeAttribute("width"),ca.removeAttribute("cellpadding"),ca.removeAttribute("cellspacing"),ca.removeAttribute("border"))):
-ca.parentNode.removeChild(ca)}aa.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(ca){var ia=L(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?M(this.textarea,ia):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=
+mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var aa=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(z){function L(ca,ha){ha.originalNode=ca;ca=ca.firstChild;for(var oa=ha.firstChild;null!=ca&&null!=oa;)L(ca,oa),ca=ca.nextSibling,oa=oa.nextSibling;return ha}function M(ca,ha){if(null!=ca)if(ha.originalNode!=ca)S(ca);else for(ca=ca.firstChild,ha=ha.firstChild;null!=ca;){var oa=ca.nextSibling;null==ha?S(ca):(M(ca,ha),
+ha=ha.nextSibling);ca=oa}}function S(ca){for(var ha=ca.firstChild;null!=ha;){var oa=ha.nextSibling;S(ha);ha=oa}1==ca.nodeType&&("BR"===ca.nodeName||null!=ca.firstChild)||3==ca.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(ca)).length?(3==ca.nodeType&&mxUtils.setTextContent(ca,mxUtils.getTextContent(ca).replace(/\n|\r/g,"")),1==ca.nodeType&&(ca.removeAttribute("style"),ca.removeAttribute("class"),ca.removeAttribute("width"),ca.removeAttribute("cellpadding"),ca.removeAttribute("cellspacing"),ca.removeAttribute("border"))):
+ca.parentNode.removeChild(ca)}aa.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(ca){var ha=L(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?M(this.textarea,ha):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=
function(){var z=this.graph.view.getState(this.editingCell);if(null!=z){var L=null!=z&&"0"!=mxUtils.getValue(z.style,"nl2Br","1"),M=this.saveSelection();if(this.codeViewMode){ra=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ra.length&&"\n"==ra.charAt(ra.length-1)&&(ra=ra.substring(0,ra.length-1));ra=this.graph.sanitizeHtml(L?ra.replace(/\n/g,"<br/>"):ra,!0);this.textarea.className="mxCellEditor geContentEditable";qa=mxUtils.getValue(z.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);
-L=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var S=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ca=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ia=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,na=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
-na.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&na.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(qa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(qa)+"px";this.textarea.style.textDecoration=na.join(" ");this.textarea.style.fontWeight=ca?"bold":"normal";this.textarea.style.fontStyle=ia?"italic":"";this.textarea.style.fontFamily=
+L=mxUtils.getValue(z.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var S=mxUtils.getValue(z.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),ca=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ha=(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,oa=[];(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&
+oa.push("underline");(mxUtils.getValue(z.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&oa.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(qa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(qa)+"px";this.textarea.style.textDecoration=oa.join(" ");this.textarea.style.fontWeight=ca?"bold":"normal";this.textarea.style.fontStyle=ha?"italic":"";this.textarea.style.fontFamily=
L;this.textarea.style.textAlign=S;this.textarea.style.padding="0px";this.textarea.innerHTML!=ra&&(this.textarea.innerHTML=ra,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerHTML="");var ra=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ra=mxUtils.replaceTrailingNewlines(ra,
"<div><br></div>"));ra=this.graph.sanitizeHtml(L?ra.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ra,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var qa=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(qa*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(qa)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=
mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=ra&&(this.textarea.innerHTML=ra);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=M;this.resize()}};var da=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(z,L){if(null!=this.textarea)if(z=this.graph.getView().getState(this.editingCell),
@@ -2595,29 +2595,29 @@ mxUtils.getValue(z.style,mxConstants.STYLE_HORIZONTAL,1)||(L=mxUtils.getValue(z.
mxConstants.STYLE_STROKECOLOR,null));L==mxConstants.NONE&&(L=null);return L};mxCellEditor.prototype.getMinimumSize=function(z){var L=this.graph.getView().scale;return new mxRectangle(0,0,null==z.text?30:z.text.size*L+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(z,L){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(L.getEvent)};mxGraphView.prototype.formatUnitText=function(z){return z?
e(z,this.unit):z};mxGraphHandler.prototype.updateHint=function(z){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var L=this.graph.view.translate,M=this.graph.view.scale;z=this.roundLength((this.bounds.x+this.currentDx)/M-L.x);L=this.roundLength((this.bounds.y+this.currentDy)/M-L.y);M=this.graph.view.unit;this.hint.innerHTML=e(z,M)+", "+e(L,M);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-
this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var pa=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(z,L){pa.apply(this,arguments);var M=this.graph.getCellStyle(z);if(null==M.childLayout){var S=this.graph.model.getParent(z),ca=null!=S?this.graph.getCellGeometry(S):
-null;if(null!=ca&&(M=this.graph.getCellStyle(S),"stackLayout"==M.childLayout)){var ia=parseFloat(mxUtils.getValue(M,"stackBorder",mxStackLayout.prototype.border));M="1"==mxUtils.getValue(M,"horizontalStack","1");var na=this.graph.getActualStartSize(S);ca=ca.clone();M?ca.height=L.height+na.y+na.height+2*ia:ca.width=L.width+na.x+na.width+2*ia;this.graph.model.setGeometry(S,ca)}}};var O=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=
-function(){function z(ra){M.get(ra)||(M.put(ra,!0),ca.push(ra))}for(var L=O.apply(this,arguments),M=new mxDictionary,S=this.graph.model,ca=[],ia=0;ia<L.length;ia++){var na=L[ia];this.graph.isTableCell(na)?z(S.getParent(S.getParent(na))):this.graph.isTableRow(na)&&z(S.getParent(na));z(na)}return ca};var X=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var L=X.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};var ea=
+null;if(null!=ca&&(M=this.graph.getCellStyle(S),"stackLayout"==M.childLayout)){var ha=parseFloat(mxUtils.getValue(M,"stackBorder",mxStackLayout.prototype.border));M="1"==mxUtils.getValue(M,"horizontalStack","1");var oa=this.graph.getActualStartSize(S);ca=ca.clone();M?ca.height=L.height+oa.y+oa.height+2*ha:ca.width=L.width+oa.x+oa.width+2*ha;this.graph.model.setGeometry(S,ca)}}};var O=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=
+function(){function z(ra){M.get(ra)||(M.put(ra,!0),ca.push(ra))}for(var L=O.apply(this,arguments),M=new mxDictionary,S=this.graph.model,ca=[],ha=0;ha<L.length;ha++){var oa=L[ha];this.graph.isTableCell(oa)?z(S.getParent(S.getParent(oa))):this.graph.isTableRow(oa)&&z(S.getParent(oa));z(oa)}return ca};var X=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(z){var L=X.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};var ea=
mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(z){var L=ea.apply(this,arguments);L.stroke="#C0C0C0";L.strokewidth=1;return L};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var z=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+z.x/2,this.bounds.y+this.rotationHandleVSpacing-z.y/2)};mxVertexHandler.prototype.isRecursiveResize=
function(z,L){return this.graph.isRecursiveVertexResize(z)&&!mxEvent.isAltDown(L.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(z,L){return mxEvent.isControlDown(L.getEvent())||mxEvent.isMetaDown(L.getEvent())};var ka=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return ka.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=
function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var ja=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return ja.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var U=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=
-function(z){return z.tableHandle||U.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&(z=2);return z};var I=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return I.apply(this,arguments).grow(-this.getSelectionBorderInset())};
-var V=null,P=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var z=P.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var L=function(Ua,La,ua){for(var za=[],Ka=0;Ka<Ua.length;Ka++){var Ga=Ua[Ka];za.push(null==Ga?null:new mxPoint((qa+Ga.x+La)*ia,(ya+Ga.y+ua)*ia))}return za},M=this,S=this.graph,ca=S.model,ia=S.view.scale,na=this.state,ra=this.selectionBorder,qa=this.state.origin.x+
-S.view.translate.x,ya=this.state.origin.y+S.view.translate.y;null==z&&(z=[]);var Ea=S.view.getCellStates(ca.getChildCells(this.state.cell,!0));if(0<Ea.length){var Na=ca.getChildCells(Ea[0].cell,!0),Pa=S.getTableLines(this.state.cell,!1,!0),Qa=S.getTableLines(this.state.cell,!0,!1);for(ca=0;ca<Ea.length;ca++)mxUtils.bind(this,function(Ua){var La=Ea[Ua],ua=Ua<Ea.length-1?Ea[Ua+1]:null;ua=null!=ua?S.getCellGeometry(ua.cell):null;var za=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=
-Qa[Ua]?new V(Qa[Ua],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);ua.isDashed=ra.isDashed;ua.svgStrokeTolerance++;La=new mxHandle(La,"row-resize",null,ua);La.tableHandle=!0;var Ka=0;La.shape.node.parentNode.insertBefore(La.shape.node,La.shape.node.parentNode.firstChild);La.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Ka?mxConstants.NONE:ra.stroke;if(this.shape.constructor==V)this.shape.line=L(Qa[Ua],0,Ka),this.shape.updateBoundsFromLine();else{var Ma=S.getActualStartSize(na.cell,
-!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ka*ia;this.shape.bounds.x=na.x+(Ua==Ea.length-1?0:Ma.x*ia);this.shape.bounds.width=na.width-(Ua==Ea.length-1?0:Ma.width+Ma.x+ia)}this.shape.redraw()}};var Ga=!1;La.setPosition=function(Ma,db,Ra){Ka=Math.max(Graph.minTableRowHeight-Ma.height,db.y-Ma.y-Ma.height);Ga=mxEvent.isShiftDown(Ra.getEvent());null!=za&&Ga&&(Ka=Math.min(Ka,za.height-Graph.minTableRowHeight))};La.execute=function(Ma){if(0!=Ka)S.setTableRowHeight(this.state.cell,
-Ka,!Ga);else if(!M.blockDelayedSelection){var db=S.getCellAt(Ma.getGraphX(),Ma.getGraphY())||na.cell;S.graphHandler.selectCellForEvent(db,Ma)}Ka=0};La.reset=function(){Ka=0};z.push(La)})(ca);for(ca=0;ca<Na.length;ca++)mxUtils.bind(this,function(Ua){var La=S.view.getState(Na[Ua]),ua=S.getCellGeometry(Na[Ua]),za=null!=ua.alternateBounds?ua.alternateBounds:ua;null==La&&(La=new mxCellState(S.view,Na[Ua],S.getCellStyle(Na[Ua])),La.x=na.x+ua.x*ia,La.y=na.y+ua.y*ia,La.width=za.width*ia,La.height=za.height*
-ia,La.updateCachedBounds());ua=Ua<Na.length-1?Na[Ua+1]:null;ua=null!=ua?S.getCellGeometry(ua):null;var Ka=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Pa[Ua]?new V(Pa[Ua],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);ua.isDashed=ra.isDashed;ua.svgStrokeTolerance++;La=new mxHandle(La,"col-resize",null,ua);La.tableHandle=!0;var Ga=0;La.shape.node.parentNode.insertBefore(La.shape.node,La.shape.node.parentNode.firstChild);La.redraw=function(){if(null!=this.shape){this.shape.stroke=
-0==Ga?mxConstants.NONE:ra.stroke;if(this.shape.constructor==V)this.shape.line=L(Pa[Ua],Ga,0),this.shape.updateBoundsFromLine();else{var db=S.getActualStartSize(na.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(za.width+Ga)*ia;this.shape.bounds.y=na.y+(Ua==Na.length-1?0:db.y*ia);this.shape.bounds.height=na.height-(Ua==Na.length-1?0:(db.height+db.y)*ia)}this.shape.redraw()}};var Ma=!1;La.setPosition=function(db,Ra,ib){Ga=Math.max(Graph.minTableColumnWidth-za.width,Ra.x-db.x-za.width);
-Ma=mxEvent.isShiftDown(ib.getEvent());null==Ka||Ma||(Ga=Math.min(Ga,Ka.width-Graph.minTableColumnWidth))};La.execute=function(db){if(0!=Ga)S.setTableColumnWidth(this.state.cell,Ga,Ma);else if(!M.blockDelayedSelection){var Ra=S.getCellAt(db.getGraphX(),db.getGraphY())||na.cell;S.graphHandler.selectCellForEvent(Ra,db)}Ga=0};La.positionChanged=function(){};La.reset=function(){Ga=0};z.push(La)})(ca)}}return null!=z?z.reverse():null};var R=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=
+function(z){return z.tableHandle||U.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var z=0;this.graph.isTableRow(this.state.cell)?z=1:this.graph.isTableCell(this.state.cell)&&(z=2);return z};var J=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return J.apply(this,arguments).grow(-this.getSelectionBorderInset())};
+var V=null,P=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==V&&(V=mxCellRenderer.defaultShapes.tableLine);var z=P.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var L=function(Ta,Ma,ua){for(var ya=[],Na=0;Na<Ta.length;Na++){var Fa=Ta[Na];ya.push(null==Fa?null:new mxPoint((qa+Fa.x+Ma)*ha,(xa+Fa.y+ua)*ha))}return ya},M=this,S=this.graph,ca=S.model,ha=S.view.scale,oa=this.state,ra=this.selectionBorder,qa=this.state.origin.x+
+S.view.translate.x,xa=this.state.origin.y+S.view.translate.y;null==z&&(z=[]);var Ga=S.view.getCellStates(ca.getChildCells(this.state.cell,!0));if(0<Ga.length){var La=ca.getChildCells(Ga[0].cell,!0),Pa=S.getTableLines(this.state.cell,!1,!0),Oa=S.getTableLines(this.state.cell,!0,!1);for(ca=0;ca<Ga.length;ca++)mxUtils.bind(this,function(Ta){var Ma=Ga[Ta],ua=Ta<Ga.length-1?Ga[Ta+1]:null;ua=null!=ua?S.getCellGeometry(ua.cell):null;var ya=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=
+Oa[Ta]?new V(Oa[Ta],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);ua.isDashed=ra.isDashed;ua.svgStrokeTolerance++;Ma=new mxHandle(Ma,"row-resize",null,ua);Ma.tableHandle=!0;var Na=0;Ma.shape.node.parentNode.insertBefore(Ma.shape.node,Ma.shape.node.parentNode.firstChild);Ma.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Na?mxConstants.NONE:ra.stroke;if(this.shape.constructor==V)this.shape.line=L(Oa[Ta],0,Na),this.shape.updateBoundsFromLine();else{var Ra=S.getActualStartSize(oa.cell,
+!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Na*ha;this.shape.bounds.x=oa.x+(Ta==Ga.length-1?0:Ra.x*ha);this.shape.bounds.width=oa.width-(Ta==Ga.length-1?0:Ra.width+Ra.x+ha)}this.shape.redraw()}};var Fa=!1;Ma.setPosition=function(Ra,db,Va){Na=Math.max(Graph.minTableRowHeight-Ra.height,db.y-Ra.y-Ra.height);Fa=mxEvent.isShiftDown(Va.getEvent());null!=ya&&Fa&&(Na=Math.min(Na,ya.height-Graph.minTableRowHeight))};Ma.execute=function(Ra){if(0!=Na)S.setTableRowHeight(this.state.cell,
+Na,!Fa);else if(!M.blockDelayedSelection){var db=S.getCellAt(Ra.getGraphX(),Ra.getGraphY())||oa.cell;S.graphHandler.selectCellForEvent(db,Ra)}Na=0};Ma.reset=function(){Na=0};z.push(Ma)})(ca);for(ca=0;ca<La.length;ca++)mxUtils.bind(this,function(Ta){var Ma=S.view.getState(La[Ta]),ua=S.getCellGeometry(La[Ta]),ya=null!=ua.alternateBounds?ua.alternateBounds:ua;null==Ma&&(Ma=new mxCellState(S.view,La[Ta],S.getCellStyle(La[Ta])),Ma.x=oa.x+ua.x*ha,Ma.y=oa.y+ua.y*ha,Ma.width=ya.width*ha,Ma.height=ya.height*
+ha,Ma.updateCachedBounds());ua=Ta<La.length-1?La[Ta+1]:null;ua=null!=ua?S.getCellGeometry(ua):null;var Na=null!=ua&&null!=ua.alternateBounds?ua.alternateBounds:ua;ua=null!=Pa[Ta]?new V(Pa[Ta],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);ua.isDashed=ra.isDashed;ua.svgStrokeTolerance++;Ma=new mxHandle(Ma,"col-resize",null,ua);Ma.tableHandle=!0;var Fa=0;Ma.shape.node.parentNode.insertBefore(Ma.shape.node,Ma.shape.node.parentNode.firstChild);Ma.redraw=function(){if(null!=this.shape){this.shape.stroke=
+0==Fa?mxConstants.NONE:ra.stroke;if(this.shape.constructor==V)this.shape.line=L(Pa[Ta],Fa,0),this.shape.updateBoundsFromLine();else{var db=S.getActualStartSize(oa.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(ya.width+Fa)*ha;this.shape.bounds.y=oa.y+(Ta==La.length-1?0:db.y*ha);this.shape.bounds.height=oa.height-(Ta==La.length-1?0:(db.height+db.y)*ha)}this.shape.redraw()}};var Ra=!1;Ma.setPosition=function(db,Va,fb){Fa=Math.max(Graph.minTableColumnWidth-ya.width,Va.x-db.x-ya.width);
+Ra=mxEvent.isShiftDown(fb.getEvent());null==Na||Ra||(Fa=Math.min(Fa,Na.width-Graph.minTableColumnWidth))};Ma.execute=function(db){if(0!=Fa)S.setTableColumnWidth(this.state.cell,Fa,Ra);else if(!M.blockDelayedSelection){var Va=S.getCellAt(db.getGraphX(),db.getGraphY())||oa.cell;S.graphHandler.selectCellForEvent(Va,db)}Fa=0};Ma.positionChanged=function(){};Ma.reset=function(){Fa=0};z.push(Ma)})(ca)}}return null!=z?z.reverse():null};var R=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=
function(z){R.apply(this,arguments);if(null!=this.moveHandles)for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].style.visibility=z?"":"hidden";if(null!=this.cornerHandles)for(L=0;L<this.cornerHandles.length;L++)this.cornerHandles[L].node.style.visibility=z?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var z=this.graph.model;if(null!=this.moveHandles){for(var L=0;L<this.moveHandles.length;L++)this.moveHandles[L].parentNode.removeChild(this.moveHandles[L]);this.moveHandles=
null}this.moveHandles=[];for(L=0;L<z.getChildCount(this.state.cell);L++)mxUtils.bind(this,function(M){if(null!=M&&z.isVertex(M.cell)){var S=mxUtils.createImage(Editor.rowMoveImage);S.style.position="absolute";S.style.cursor="pointer";S.style.width="7px";S.style.height="4px";S.style.padding="4px 2px 4px 2px";S.rowState=M;mxEvent.addGestureListeners(S,mxUtils.bind(this,function(ca){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(ca)&&this.graph.isCellSelected(M.cell)||
this.graph.selectCellForEvent(M.cell,ca);mxEvent.isPopupTrigger(ca)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(ca),mxEvent.getClientY(ca),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(ca),this.graph.isMouseDown=!0);mxEvent.consume(ca)}),null,mxUtils.bind(this,function(ca){mxEvent.isPopupTrigger(ca)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(ca),mxEvent.getClientY(ca),M.cell,ca),mxEvent.consume(ca))}));
-this.moveHandles.push(S);this.graph.container.appendChild(S)}})(this.graph.view.getState(z.getChildAt(this.state.cell,L)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var fa=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,
-0),L=this.tolerance,M=this.state.style.shape;null==mxCellRenderer.defaultShapes[M]&&mxStencilRegistry.getStencil(M);M=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!M&&null!=this.customHandles)for(var S=0;S<this.customHandles.length;S++)if(null!=this.customHandles[S].shape&&null!=this.customHandles[S].shape.bounds){var ca=this.customHandles[S].shape.bounds,ia=ca.getCenterX(),na=ca.getCenterY();if(Math.abs(this.state.x-ia)<ca.width/2||Math.abs(this.state.y-
-na)<ca.height/2||Math.abs(this.state.x+this.state.width-ia)<ca.width/2||Math.abs(this.state.y+this.state.height-na)<ca.height/2){M=!0;break}}M&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(L/=2,this.graph.isTable(this.state.cell)&&(L+=7),z.x=this.sizers[0].bounds.width+L,z.y=this.sizers[0].bounds.height+L):z=fa.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));
+this.moveHandles.push(S);this.graph.container.appendChild(S)}})(this.graph.view.getState(z.getChildAt(this.state.cell,L)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var z=0;z<this.customHandles.length;z++)this.customHandles[z].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var ia=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var z=new mxPoint(0,
+0),L=this.tolerance,M=this.state.style.shape;null==mxCellRenderer.defaultShapes[M]&&mxStencilRegistry.getStencil(M);M=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!M&&null!=this.customHandles)for(var S=0;S<this.customHandles.length;S++)if(null!=this.customHandles[S].shape&&null!=this.customHandles[S].shape.bounds){var ca=this.customHandles[S].shape.bounds,ha=ca.getCenterX(),oa=ca.getCenterY();if(Math.abs(this.state.x-ha)<ca.width/2||Math.abs(this.state.y-
+oa)<ca.height/2||Math.abs(this.state.x+this.state.width-ha)<ca.width/2||Math.abs(this.state.y+this.state.height-oa)<ca.height/2){M=!0;break}}M&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(L/=2,this.graph.isTable(this.state.cell)&&(L+=7),z.x=this.sizers[0].bounds.width+L,z.y=this.sizers[0].bounds.height+L):z=ia.apply(this,arguments);return z};mxVertexHandler.prototype.updateHint=function(z){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));
if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{z=this.state.view.scale;var L=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/z),L)+" x "+e(this.roundLength(this.bounds.height/z),L)}z=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==z&&(z=this.bounds);this.hint.style.left=z.x+Math.round((z.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=
z.y+z.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var la=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(z,L){la.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display=
-"none")};var sa=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,L){sa.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(z,L){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var M=this.graph.view.translate,S=this.graph.view.scale,ca=this.roundLength(L.x/S-M.x);M=this.roundLength(L.y/S-M.y);S=this.graph.view.unit;this.hint.innerHTML=
+"none")};var ta=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(z,L){ta.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(z,L){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var M=this.graph.view.translate,S=this.graph.view.scale,ca=this.roundLength(L.x/S-M.x);M=this.roundLength(L.y/S-M.y);S=this.graph.view.unit;this.hint.innerHTML=
e(ca,S)+", "+e(M,S);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(ca=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*ca.x)+"%, "+Math.round(100*ca.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(z.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(z.getGraphY(),L.y)+Editor.hintOffset+
"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');Graph.prototype.collapsedImage=Graph.createSvgImage(9,
9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+
@@ -2631,55 +2631,55 @@ HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangl
!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(z){return!mxEvent.isShiftDown(z.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=
12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(z){return mxEvent.isMouseEvent(z.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return null==z.getState()&&!mxEvent.isMouseEvent(L)||mxEvent.isPopupTrigger(L)&&(null==z.getState()||mxEvent.isControlDown(L)||mxEvent.isShiftDown(L))};var u=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
function(z,L){u.apply(this,arguments);mxEvent.isTouchEvent(L.getEvent())&&this.graph.isCellSelected(L.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(z){var L=z.getEvent();return mxEvent.isLeftMouseButton(L)&&(this.useLeftButtonForPanning&&null==z.getState()||mxEvent.isControlDown(L)&&!mxEvent.isShiftDown(L))||this.usePopupTrigger&&mxEvent.isPopupTrigger(L)};mxRubberband.prototype.isSpaceEvent=function(z){return this.graph.isEnabled()&&
-!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,L){if(this.cancelled)this.cancelled=!1,L.consume();else{var M=null!=this.div&&"none"!=this.div.style.display,S=null,ca=null,ia=z=null;
-null!=this.first&&null!=this.currentX&&null!=this.currentY&&(S=this.first.x,ca=this.first.y,z=(this.currentX-S)/this.graph.view.scale,ia=(this.currentY-ca)/this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(z=this.graph.snap(z),ia=this.graph.snap(ia),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ia)<this.graph.tolerance&&(ia=0))));this.reset();if(M){if(this.isSpaceEvent(L)){this.graph.model.beginUpdate();try{var na=this.graph.getCellsBeyond(S,ca,this.graph.getDefaultParent(),
-!0,!0);for(M=0;M<na.length;M++)if(this.graph.isCellMovable(na[M])){var ra=this.graph.view.getState(na[M]),qa=this.graph.getCellGeometry(na[M]);null!=ra&&null!=qa&&(qa=qa.clone(),qa.translate(z,ia),this.graph.model.setGeometry(na[M],qa))}}finally{this.graph.model.endUpdate()}}else na=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(na,L.getEvent());L.consume()}}};mxRubberband.prototype.mouseMove=function(z,L){if(!L.isConsumed()&&null!=this.first){var M=mxUtils.getScrollOrigin(this.graph.container);
-z=mxUtils.getOffset(this.graph.container);M.x-=z.x;M.y-=z.y;z=L.getX()+M.x;M=L.getY()+M.y;var S=this.first.x-z,ca=this.first.y-M,ia=this.graph.tolerance;if(null!=this.div||Math.abs(S)>ia||Math.abs(ca)>ia)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,M),this.isSpaceEvent(L)?(z=this.x+this.width,M=this.y+this.height,S=this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(this.width=this.graph.snap(this.width/S)*S,this.height=this.graph.snap(this.height/S)*S,
+!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(z.getEvent())||mxEvent.isMetaDown(z.getEvent()))&&mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(z,L){if(this.cancelled)this.cancelled=!1,L.consume();else{var M=null!=this.div&&"none"!=this.div.style.display,S=null,ca=null,ha=z=null;
+null!=this.first&&null!=this.currentX&&null!=this.currentY&&(S=this.first.x,ca=this.first.y,z=(this.currentX-S)/this.graph.view.scale,ha=(this.currentY-ca)/this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(z=this.graph.snap(z),ha=this.graph.snap(ha),this.graph.isGridEnabled()||(Math.abs(z)<this.graph.tolerance&&(z=0),Math.abs(ha)<this.graph.tolerance&&(ha=0))));this.reset();if(M){if(this.isSpaceEvent(L)){this.graph.model.beginUpdate();try{var oa=this.graph.getCellsBeyond(S,ca,this.graph.getDefaultParent(),
+!0,!0);for(M=0;M<oa.length;M++)if(this.graph.isCellMovable(oa[M])){var ra=this.graph.view.getState(oa[M]),qa=this.graph.getCellGeometry(oa[M]);null!=ra&&null!=qa&&(qa=qa.clone(),qa.translate(z,ha),this.graph.model.setGeometry(oa[M],qa))}}finally{this.graph.model.endUpdate()}}else oa=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(oa,L.getEvent());L.consume()}}};mxRubberband.prototype.mouseMove=function(z,L){if(!L.isConsumed()&&null!=this.first){var M=mxUtils.getScrollOrigin(this.graph.container);
+z=mxUtils.getOffset(this.graph.container);M.x-=z.x;M.y-=z.y;z=L.getX()+M.x;M=L.getY()+M.y;var S=this.first.x-z,ca=this.first.y-M,ha=this.graph.tolerance;if(null!=this.div||Math.abs(S)>ha||Math.abs(ca)>ha)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(z,M),this.isSpaceEvent(L)?(z=this.x+this.width,M=this.y+this.height,S=this.graph.view.scale,mxEvent.isAltDown(L.getEvent())||(this.width=this.graph.snap(this.width/S)*S,this.height=this.graph.snap(this.height/S)*S,
this.graph.isGridEnabled()||(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=z-this.width),this.y<this.first.y&&(this.y=M-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?
"0px 1px 0px 0px":"0px 1px 0px 1px",null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle=
-"",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),L.consume()}};var J=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);J.apply(this,arguments)};var N=(new Date).getTime(),W=0,T=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,L,M,S){T.apply(this,arguments);M!=this.currentTerminalState?
+"",null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),L.consume()}};var I=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);I.apply(this,arguments)};var N=(new Date).getTime(),W=0,T=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(z,L,M,S){T.apply(this,arguments);M!=this.currentTerminalState?
(N=(new Date).getTime(),W=0):W=(new Date).getTime()-N;this.currentTerminalState=M};var Q=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(z){return mxEvent.isShiftDown(z.getEvent())&&mxEvent.isAltDown(z.getEvent())?!1:null!=this.currentTerminalState&&z.getState()==this.currentTerminalState&&2E3<W||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&Q.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
function(z,L,M){L=null!=z&&0==z;var S=this.state.getVisibleTerminalState(L);z=null!=z&&(0==z||z>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==z)?this.graph.getConnectionConstraint(this.state,S,L):null;M=null!=(null!=z?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(L),z):null)?M?this.endFixedHandleImage:this.fixedHandleImage:null!=z&&null!=S?M?this.endTerminalHandleImage:this.terminalHandleImage:M?this.endHandleImage:this.handleImage;if(null!=M)return M=
new mxImageShape(new mxRectangle(0,0,M.width,M.height),M.src),M.preserveImageAspect=!1,M;M=mxConstants.HANDLE_SIZE;this.preferHtml&&--M;return new mxRectangleShape(new mxRectangle(0,0,M,M),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var Z=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(z,L,M){this.handleImage=L==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:L==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return Z.apply(this,arguments)};var oa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var L=this.graph.getModel(),M=L.getParent(z[0]),S=this.graph.getCellGeometry(z[0]);if(L.isEdge(M)&&null!=S&&S.relative&&(L=this.graph.view.getState(z[0]),null!=L&&2>L.width&&2>L.height&&null!=L.text&&null!=L.text.boundingBox))return mxRectangle.fromRectangle(L.text.boundingBox)}return oa.apply(this,arguments)};var wa=mxGraphHandler.prototype.getGuideStates;
-mxGraphHandler.prototype.getGuideStates=function(){for(var z=wa.apply(this,arguments),L=[],M=0;M<z.length;M++)"1"!=mxUtils.getValue(z[M].style,"part","0")&&L.push(z[M]);return L};var Aa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var L=this.graph.getModel(),M=L.getParent(z.cell),S=this.graph.getCellGeometry(z.cell);return L.isEdge(M)&&null!=S&&S.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(L=z.text.unrotatedBoundingBox||
-z.text.boundingBox,new mxRectangle(Math.round(L.x),Math.round(L.y),Math.round(L.width),Math.round(L.height))):Aa.apply(this,arguments)};var ta=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,L){var M=this.graph.getModel(),S=M.getParent(this.state.cell),ca=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(L)==mxEvent.ROTATION_HANDLE||!M.isEdge(S)||null==ca||!ca.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&ta.apply(this,
+return Z.apply(this,arguments)};var na=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(z){if(null!=z&&1==z.length){var L=this.graph.getModel(),M=L.getParent(z[0]),S=this.graph.getCellGeometry(z[0]);if(L.isEdge(M)&&null!=S&&S.relative&&(L=this.graph.view.getState(z[0]),null!=L&&2>L.width&&2>L.height&&null!=L.text&&null!=L.text.boundingBox))return mxRectangle.fromRectangle(L.text.boundingBox)}return na.apply(this,arguments)};var va=mxGraphHandler.prototype.getGuideStates;
+mxGraphHandler.prototype.getGuideStates=function(){for(var z=va.apply(this,arguments),L=[],M=0;M<z.length;M++)"1"!=mxUtils.getValue(z[M].style,"part","0")&&L.push(z[M]);return L};var Ba=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(z){var L=this.graph.getModel(),M=L.getParent(z.cell),S=this.graph.getCellGeometry(z.cell);return L.isEdge(M)&&null!=S&&S.relative&&2>z.width&&2>z.height&&null!=z.text&&null!=z.text.boundingBox?(L=z.text.unrotatedBoundingBox||
+z.text.boundingBox,new mxRectangle(Math.round(L.x),Math.round(L.y),Math.round(L.width),Math.round(L.height))):Ba.apply(this,arguments)};var sa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(z,L){var M=this.graph.getModel(),S=M.getParent(this.state.cell),ca=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(L)==mxEvent.ROTATION_HANDLE||!M.isEdge(S)||null==ca||!ca.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&sa.apply(this,
arguments)};mxVertexHandler.prototype.rotateClick=function(){var z=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),L=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&z==mxConstants.NONE&&L==mxConstants.NONE?(z=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,z,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
-var Ba=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,L){Ba.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var va=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,L){va.apply(this,arguments);null!=this.rotationShape&&null!=
-this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var Oa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){Oa.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
+var Da=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(z,L){Da.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Aa=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(z,L){Aa.apply(this,arguments);null!=this.rotationShape&&null!=
+this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var za=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){za.apply(this,arguments);var z=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var L=0;4>L;L++){var M=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);M.dialect=mxConstants.DIALECT_SVG;M.init(this.graph.view.getOverlayPane());this.cornerHandles.push(M)}}var S=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
-this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(ca,ia){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));S()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(ca,ia){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,
+this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(ca,ha){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));S()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(ca,ha){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,
this.editingHandler);L=this.graph.getLinkForCell(this.state.cell);M=this.graph.getLinksForState(this.state);this.updateLinkHint(L,M);if(null!=L||null!=M&&0<M.length)z=!0;z&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(z,L){try{if(null==z&&(null==L||0==L.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=z||null!=L&&0<L.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerHTML="";if(null!=z&&(this.linkHint.appendChild(this.graph.createLinkForHint(z)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var M=document.createElement("img");M.setAttribute("src",Editor.editImage);M.setAttribute("title",
-mxResources.get("editLink"));M.setAttribute("width","11");M.setAttribute("height","11");M.style.marginLeft="10px";M.style.marginBottom="-1px";M.style.cursor="pointer";Editor.isDarkMode()&&(M.style.filter="invert(100%)");this.linkHint.appendChild(M);mxEvent.addListener(M,"click",mxUtils.bind(this,function(ia){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ia)}));var S=M.cloneNode(!0);S.setAttribute("src",Editor.trashImage);S.setAttribute("title",mxResources.get("removeIt",
-[mxResources.get("link")]));S.style.marginLeft="4px";this.linkHint.appendChild(S);mxEvent.addListener(S,"click",mxUtils.bind(this,function(ia){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ia)}))}if(null!=L)for(M=0;M<L.length;M++){var ca=document.createElement("div");ca.style.marginTop=null!=z||0<M?"6px":"0px";ca.appendChild(this.graph.createLinkForHint(L[M].getAttribute("href"),mxUtils.getTextContent(L[M])));this.linkHint.appendChild(ca)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ia){}};
+mxResources.get("editLink"));M.setAttribute("width","11");M.setAttribute("height","11");M.style.marginLeft="10px";M.style.marginBottom="-1px";M.style.cursor="pointer";Editor.isDarkMode()&&(M.style.filter="invert(100%)");this.linkHint.appendChild(M);mxEvent.addListener(M,"click",mxUtils.bind(this,function(ha){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ha)}));var S=M.cloneNode(!0);S.setAttribute("src",Editor.trashImage);S.setAttribute("title",mxResources.get("removeIt",
+[mxResources.get("link")]));S.style.marginLeft="4px";this.linkHint.appendChild(S);mxEvent.addListener(S,"click",mxUtils.bind(this,function(ha){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ha)}))}if(null!=L)for(M=0;M<L.length;M++){var ca=document.createElement("div");ca.style.marginTop=null!=z||0<M?"6px":"0px";ca.appendChild(this.graph.createLinkForHint(L[M].getAttribute("href"),mxUtils.getTextContent(L[M])));this.linkHint.appendChild(ca)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ha){}};
mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Ca=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Ca.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var z=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&
this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(S,ca){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));z();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var L=this.graph.getLinkForCell(this.state.cell),M=this.graph.getLinksForState(this.state);if(null!=
-L||null!=M&&0<M.length)this.updateLinkHint(L,M),this.redrawHandles()};var Ta=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ta.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Va=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+
+L||null!=M&&0<M.length)this.updateLinkHint(L,M),this.redrawHandles()};var Qa=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Qa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Za=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var z=0;z<this.moveHandles.length;z++)this.moveHandles[z].style.left=this.moveHandles[z].rowState.x+
this.moveHandles[z].rowState.width-5+"px",this.moveHandles[z].style.top=this.moveHandles[z].rowState.y+this.moveHandles[z].rowState.height/2-6+"px";if(null!=this.cornerHandles){z=this.getSelectionBorderInset();var L=this.cornerHandles,M=L[0].bounds.height/2;L[0].bounds.x=this.state.x-L[0].bounds.width/2+z;L[0].bounds.y=this.state.y-M+z;L[0].redraw();L[1].bounds.x=L[0].bounds.x+this.state.width-2*z;L[1].bounds.y=L[0].bounds.y;L[1].redraw();L[2].bounds.x=L[0].bounds.x;L[2].bounds.y=this.state.y+this.state.height-
-2*z;L[2].redraw();L[3].bounds.x=L[1].bounds.x;L[3].bounds.y=L[2].bounds.y;L[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Va.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),
+2*z;L[2].redraw();L[3].bounds.x=L[1].bounds.x;L[3].bounds.y=L[2].bounds.y;L[3].redraw();for(z=0;z<this.cornerHandles.length;z++)this.cornerHandles[z].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Za.apply(this);null!=this.state&&null!=this.linkHint&&(z=new mxPoint(this.state.getCenterX(),
this.state.getCenterY()),L=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),M=mxUtils.getBoundingBox(L,this.state.style[mxConstants.STYLE_ROTATION]||"0",z),z=null!=M?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,L=null!=this.state.text?this.state.text.boundingBox:null,null==M&&(M=this.state),M=M.y+M.height,null!=L&&(M=Math.max(M,L.y+L.height)),this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/
-2))+"px",this.linkHint.style.top=Math.round(M+this.verticalOffset/2+Editor.hintOffset)+"px")};var Ja=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Ja.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&
+2))+"px",this.linkHint.style.top=Math.round(M+this.verticalOffset/2+Editor.hintOffset)+"px")};var cb=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){cb.apply(this,arguments);if(null!=this.moveHandles){for(var z=0;z<this.moveHandles.length;z++)null!=this.moveHandles[z]&&null!=this.moveHandles[z].parentNode&&this.moveHandles[z].parentNode.removeChild(this.moveHandles[z]);this.moveHandles=null}if(null!=this.cornerHandles){for(z=0;z<this.cornerHandles.length;z++)null!=this.cornerHandles[z]&&
null!=this.cornerHandles[z].node&&null!=this.cornerHandles[z].node.parentNode&&this.cornerHandles[z].node.parentNode.removeChild(this.cornerHandles[z].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
-(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var bb=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(bb.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
-Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var Wa=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Wa.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var $a=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
+(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ka=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ka.apply(this),null!=this.state&&null!=this.linkHint)){var z=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(z=new mxRectangle(z.x,z.y,z.width,z.height),z.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(z.x+(z.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
+Math.round(z.y+z.height+Editor.hintOffset)+"px"}};var Ua=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){Ua.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var $a=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function E(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
function y(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1}function F(){mxActor.call(this)}function C(){mxCylinder.call(this)}function H(){mxCylinder.call(this)}function G(){mxActor.call(this)}function aa(){mxActor.call(this)}function da(){mxActor.call(this)}function ba(){mxActor.call(this)}function Y(){mxActor.call(this)}function pa(){mxActor.call(this)}function O(){mxActor.call(this)}function X(c,l){this.canvas=c;this.canvas.setLineJoin("round");
this.canvas.setLineCap("round");this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,X.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,X.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,X.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,X.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,
-X.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,X.prototype.arcTo)}function ea(){mxRectangleShape.call(this)}function ka(){mxRectangleShape.call(this)}function ja(){mxActor.call(this)}function U(){mxActor.call(this)}function I(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function P(){mxRectangleShape.call(this)}function R(){mxCylinder.call(this)}function fa(){mxShape.call(this)}function la(){mxShape.call(this)}function sa(){mxEllipse.call(this)}
-function u(){mxShape.call(this)}function J(){mxShape.call(this)}function N(){mxRectangleShape.call(this)}function W(){mxShape.call(this)}function T(){mxShape.call(this)}function Q(){mxShape.call(this)}function Z(){mxShape.call(this)}function oa(){mxShape.call(this)}function wa(){mxCylinder.call(this)}function Aa(){mxCylinder.call(this)}function ta(){mxRectangleShape.call(this)}function Ba(){mxDoubleEllipse.call(this)}function va(){mxDoubleEllipse.call(this)}function Oa(){mxArrowConnector.call(this);
-this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Ta(){mxActor.call(this)}function Va(){mxRectangleShape.call(this)}function Ja(){mxActor.call(this)}function bb(){mxActor.call(this)}function Wa(){mxActor.call(this)}function $a(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function S(){mxActor.call(this)}function ca(){mxActor.call(this)}function ia(){mxActor.call(this)}function na(){mxEllipse.call(this)}
-function ra(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}function ya(){mxRhombus.call(this)}function Ea(){mxEllipse.call(this)}function Na(){mxEllipse.call(this)}function Pa(){mxEllipse.call(this)}function Qa(){mxEllipse.call(this)}function Ua(){mxActor.call(this)}function La(){mxActor.call(this)}function ua(){mxActor.call(this)}function za(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
-!0;this.indent=2;this.rectOutline="single"}function Ka(){mxConnector.call(this)}function Ga(c,l,x,p,v,A,B,ha,K,xa){B+=K;var ma=p.clone();p.x-=v*(2*B+K);p.y-=A*(2*B+K);v*=B+K;A*=B+K;return function(){c.ellipse(ma.x-v-B,ma.y-A-B,2*B,2*B);xa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var x=this.line[l];null!=x&&(x=new mxRectangle(x.x,x.y,this.strokewidth,this.strokewidth),null==
+X.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,X.prototype.arcTo)}function ea(){mxRectangleShape.call(this)}function ka(){mxRectangleShape.call(this)}function ja(){mxActor.call(this)}function U(){mxActor.call(this)}function J(){mxActor.call(this)}function V(){mxRectangleShape.call(this)}function P(){mxRectangleShape.call(this)}function R(){mxCylinder.call(this)}function ia(){mxShape.call(this)}function la(){mxShape.call(this)}function ta(){mxEllipse.call(this)}
+function u(){mxShape.call(this)}function I(){mxShape.call(this)}function N(){mxRectangleShape.call(this)}function W(){mxShape.call(this)}function T(){mxShape.call(this)}function Q(){mxShape.call(this)}function Z(){mxShape.call(this)}function na(){mxShape.call(this)}function va(){mxCylinder.call(this)}function Ba(){mxCylinder.call(this)}function sa(){mxRectangleShape.call(this)}function Da(){mxDoubleEllipse.call(this)}function Aa(){mxDoubleEllipse.call(this)}function za(){mxArrowConnector.call(this);
+this.spacing=0}function Ca(){mxArrowConnector.call(this);this.spacing=0}function Qa(){mxActor.call(this)}function Za(){mxRectangleShape.call(this)}function cb(){mxActor.call(this)}function Ka(){mxActor.call(this)}function Ua(){mxActor.call(this)}function $a(){mxActor.call(this)}function z(){mxActor.call(this)}function L(){mxActor.call(this)}function M(){mxActor.call(this)}function S(){mxActor.call(this)}function ca(){mxActor.call(this)}function ha(){mxActor.call(this)}function oa(){mxEllipse.call(this)}
+function ra(){mxEllipse.call(this)}function qa(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function Ga(){mxEllipse.call(this)}function La(){mxEllipse.call(this)}function Pa(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Ta(){mxActor.call(this)}function Ma(){mxActor.call(this)}function ua(){mxActor.call(this)}function ya(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
+!0;this.indent=2;this.rectOutline="single"}function Na(){mxConnector.call(this)}function Fa(c,l,x,p,v,A,B,fa,K,wa){B+=K;var ma=p.clone();p.x-=v*(2*B+K);p.y-=A*(2*B+K);v*=B+K;A*=B+K;return function(){c.ellipse(ma.x-v-B,ma.y-A-B,2*B,2*B);wa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var x=this.line[l];null!=x&&(x=new mxRectangle(x.x,x.y,this.strokewidth,this.strokewidth),null==
c?c=x:c.add(x))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=function(c,l,x,p,v){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,x,p){if(null!=l){var v=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==v?c.moveTo(B.x+x,B.y+p):null!=v&&c.lineTo(B.x+x,B.y+p));v=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var x=null,
p=0;p<this.line.length&&!l;p++){var v=this.line[p];null!=v&&null!=x&&(l=mxUtils.rectangleIntersectsSegment(c,x,v));x=v}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,x,p,v){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
-!1,B=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Pa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-x));A||this.outline||!(B&&ha<v||!B&&ha<p)||this.paintForeground(c,l,x,p,v)};e.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=A;A=B;B=ha}c.rotate(-this.getShapeRotation(),
+!1,B=this.isHorizontal(),fa=this.getTitleSize();0==fa||this.outline?Pa.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-x));A||this.outline||!(B&&fa<v||!B&&fa<p)||this.paintForeground(c,l,x,p,v)};e.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var fa=A;A=B;B=fa}c.rotate(-this.getShapeRotation(),
A,B,l+p/2,x+v/2);s=this.scale;l=this.bounds.x/s;x=this.bounds.y/s;p=this.bounds.width/s;v=this.bounds.height/s;this.paintTableForeground(c,l,x,p,v)}};e.prototype.paintTableForeground=function(c,l,x,p,v){p=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(v=0;v<p.length;v++)b.prototype.paintTableLine(c,p[v],l,x)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?
c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.darkOpacity=0;n.prototype.darkOpacity2=0;n.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,
-parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(A,v);c.lineTo(0,v-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(p-A,0),c.lineTo(p,A),
-c.lineTo(A,A),c.close(),c.fill()),0!=ha&&(c.setFillAlpha(Math.abs(ha)),c.setFillColor(0>ha?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,A),c.lineTo(A,v),c.lineTo(0,v-A),c.close(),c.fill()),c.begin(),c.moveTo(A,v),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(p,A),c.end(),c.stroke())};n.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",
-n);var Ma=Math.tan(mxUtils.toRadians(30)),db=(.5-Ma)/2;mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(D,mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,l,x,p,v){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(p-A),x+.5*(v-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(t,mxActor);t.prototype.size=
-20;t.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/Ma);c.translate((p-l)/2,(v-l)/2+l/4);c.moveTo(0,.25*l);c.lineTo(.5*l,l*db);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-db)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(p,v/(.5+Ma));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-db)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-db)*l),c.lineTo(.5*l,(1-db)*l)):(c.translate((p-
+parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),fa=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(A,v);c.lineTo(0,v-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(p-A,0),c.lineTo(p,A),
+c.lineTo(A,A),c.close(),c.fill()),0!=fa&&(c.setFillAlpha(Math.abs(fa)),c.setFillColor(0>fa?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,A),c.lineTo(A,v),c.lineTo(0,v-A),c.close(),c.fill()),c.begin(),c.moveTo(A,v),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(p,A),c.end(),c.stroke())};n.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",
+n);var Ra=Math.tan(mxUtils.toRadians(30)),db=(.5-Ra)/2;mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(D,mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,l,x,p,v){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(p-A),x+.5*(v-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(t,mxActor);t.prototype.size=
+20;t.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/Ra);c.translate((p-l)/2,(v-l)/2+l/4);c.moveTo(0,.25*l);c.lineTo(.5*l,l*db);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-db)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(p,v/(.5+Ra));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-db)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-db)*l),c.lineTo(.5*l,(1-db)*l)):(c.translate((p-
l)/2,(v-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*db),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*l,(1-db)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),
c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,-l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,p,-l/3,p,l),c.lineTo(p,v-l),c.curveTo(p,v+l/3,0,v+l/3,0,v-l),c.close())};d.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=
function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(0,v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(p-A,0),c.lineTo(p-
@@ -2688,8 +2688,8 @@ function(c,l,x,p,v){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(t
q.prototype.size=15;q.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A),c.lineTo(p,v-A),c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke())};
mxCellRenderer.registerShape("cylinder2",q);mxUtils.extend(y,mxCylinder);y.prototype.size=15;y.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(l,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A)):(c.moveTo(0,0),c.arcTo(.5*p,A,0,0,0,.5*p,A),c.arcTo(.5*p,A,0,0,0,p,0)),c.lineTo(p,v-A),
c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),B&&(c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",y);mxUtils.extend(F,mxActor);F.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p/2,.5*v,p,0);c.quadTo(.5*p,v/2,p,v);c.quadTo(p/2,.5*v,0,v);c.quadTo(.5*p,v/2,0,0);c.end()};mxCellRenderer.registerShape("switch",F);mxUtils.extend(C,mxCylinder);C.prototype.tabWidth=
-60;C.prototype.tabHeight=20;C.prototype.tabPosition="right";C.prototype.arcSize=.1;C.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,
-"arcSize",this.arcSize));ha||(K*=Math.min(p,v));K=Math.min(K,.5*p,.5*(v-x));l=Math.max(l,K);l=Math.min(p-K,l);B||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),x),c.lineTo(Math.max(K,0),0),c.lineTo(l,0),c.lineTo(l,x)):(c.moveTo(p-l,x),c.lineTo(p-l,0),c.lineTo(p-Math.max(K,0),0),c.lineTo(p-Math.max(K,0),x));B?(c.moveTo(0,K+x),c.arcTo(K,K,0,0,1,K,x),c.lineTo(p-K,x),c.arcTo(K,K,0,0,1,p,K+x),c.lineTo(p,v-K),c.arcTo(K,K,0,0,1,p-K,v),c.lineTo(K,v),c.arcTo(K,K,0,0,1,0,v-K)):(c.moveTo(0,x),c.lineTo(p,
+60;C.prototype.tabHeight=20;C.prototype.tabPosition="right";C.prototype.arcSize=.1;C.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),fa=mxUtils.getValue(this.style,"absoluteArcSize",!1),K=parseFloat(mxUtils.getValue(this.style,
+"arcSize",this.arcSize));fa||(K*=Math.min(p,v));K=Math.min(K,.5*p,.5*(v-x));l=Math.max(l,K);l=Math.min(p-K,l);B||(K=0);c.begin();"left"==A?(c.moveTo(Math.max(K,0),x),c.lineTo(Math.max(K,0),0),c.lineTo(l,0),c.lineTo(l,x)):(c.moveTo(p-l,x),c.lineTo(p-l,0),c.lineTo(p-Math.max(K,0),0),c.lineTo(p-Math.max(K,0),x));B?(c.moveTo(0,K+x),c.arcTo(K,K,0,0,1,K,x),c.lineTo(p-K,x),c.arcTo(K,K,0,0,1,p,K+x),c.lineTo(p,v-K),c.arcTo(K,K,0,0,1,p-K,v),c.lineTo(K,v),c.arcTo(K,K,0,0,1,0,v-K)):(c.moveTo(0,x),c.lineTo(p,
x),c.lineTo(p,v),c.lineTo(0,v));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(p-30,x+20),c.lineTo(p-20,x+10),c.lineTo(p-10,x+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",C);C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,
"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));p||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,
c.width-x),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(H,mxCylinder);H.prototype.arcSize=.1;H.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(p,v));l=Math.min(l,.5*p,.5*v);A||(l=
@@ -2698,7 +2698,7 @@ c.width-x),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(
function(){return!0};G.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("card",G);mxUtils.extend(aa,mxActor);aa.prototype.size=.4;aa.prototype.redrawPath=function(c,l,
x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,l/2);c.quadTo(p/4,1.4*l,p/2,l/2);c.quadTo(3*p/4,l*(1-1.4),p,l/2);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};aa.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),x=c.width,p=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
this.direction==mxConstants.DIRECTION_WEST)return l*=p,new mxRectangle(c.x,c.y+l,x,p-2*l);l*=x;return new mxRectangle(c.x+l,c.y,x-2*l,p)}return c};mxCellRenderer.registerShape("tape",aa);mxUtils.extend(da,mxActor);da.prototype.size=.3;da.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};da.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c.moveTo(0,0);c.lineTo(p,0);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",da);var Ra=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):Ra.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,0);c.lineTo(p,0);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",da);var Va=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):Va.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};y.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));p||(A=0);return"left"==
mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-x),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};H.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};g.prototype.getLabelMargins=
@@ -2708,177 +2708,177 @@ mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat
.5;pa.prototype.redrawPath=function(c,l,x,p,v){c.setFillColor(null);l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(p,0),new mxPoint(l,0),new mxPoint(l,v/2),new mxPoint(0,v/2),new mxPoint(l,v/2),new mxPoint(l,v),new mxPoint(p,v)],this.isRounded,x,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",pa);mxUtils.extend(O,mxActor);O.prototype.redrawPath=
function(c,l,x,p,v){c.setStrokeWidth(1);c.setFillColor(this.stroke);l=p/5;c.rect(0,0,l,v);c.fillAndStroke();c.rect(2*l,0,l,v);c.fillAndStroke();c.rect(4*l,0,l,v);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",O);X.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};X.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,
arguments));this.originalClose.apply(this.canvas,arguments)};X.prototype.quadTo=function(c,l,x,p){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=p};X.prototype.curveTo=function(c,l,x,p,v,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=A};X.prototype.arcTo=function(c,l,x,p,v,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};X.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var x=function(ma){return"number"===
-typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},p=Math.abs(c-this.lastX),v=Math.abs(l-this.lastY),A=Math.sqrt(p*p+v*v);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ha=this.defaultVariation;5>B&&(B=5,ha/=3);var K=x(c-this.lastX)*p/B;x=x(l-this.lastY)*v/B;p/=A;v/=A;for(A=0;A<B;A++){var xa=(Math.random()-.5)*ha;this.originalLineTo.call(this.canvas,K*A+this.lastX-xa*v,x*A+this.lastY-xa*p)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,
-arguments);this.lastX=c;this.lastY=l};X.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var ib=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){ib.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};
-var mb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(c){mb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new X(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var nb=mxRectangleShape.prototype.isHtmlAllowed;
-mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&nb.apply(this,arguments)};var pb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,x,p,v){if(null==c.handJiggle||c.handJiggle.constructor!=X)pb.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+typeof ma?ma?0>ma?-1:1:ma===ma?0:NaN:NaN},p=Math.abs(c-this.lastX),v=Math.abs(l-this.lastY),A=Math.sqrt(p*p+v*v);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),fa=this.defaultVariation;5>B&&(B=5,fa/=3);var K=x(c-this.lastX)*p/B;x=x(l-this.lastY)*v/B;p/=A;v/=A;for(A=0;A<B;A++){var wa=(Math.random()-.5)*fa;this.originalLineTo.call(this.canvas,K*A+this.lastX-wa*v,x*A+this.lastY-wa*p)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,
+arguments);this.lastX=c;this.lastY=l};X.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var fb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){fb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};
+var kb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(c){kb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new X(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var ub=mxRectangleShape.prototype.isHtmlAllowed;
+mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var nb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,x,p,v){if(null==c.handJiggle||c.handJiggle.constructor!=X)nb.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
"1"));if(A||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)A||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?A=Math.min(p/2,Math.min(v/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.min(p*
A,v*A)),c.moveTo(l+A,x),c.lineTo(l+p-A,x),c.quadTo(l+p,x,l+p,x+A),c.lineTo(l+p,x+v-A),c.quadTo(l+p,x+v,l+p-A,x+v),c.lineTo(l+A,x+v),c.quadTo(l,x+v,l,x+v-A),c.lineTo(l,x+A),c.quadTo(l,x,l+A,x)):(c.moveTo(l,x),c.lineTo(l+p,x),c.lineTo(l+p,x+v),c.lineTo(l,x+v),c.lineTo(l,x)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ea,mxRectangleShape);ea.prototype.size=.1;ea.prototype.fixedSize=!1;ea.prototype.isHtmlAllowed=function(){return!1};ea.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,x=c.height;c=new mxRectangle(c.x,c.y,l,x);var p=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;p=Math.max(p,Math.min(l*v,x*v))}c.x+=Math.round(p);c.width-=Math.round(2*p);return c}return c};
ea.prototype.paintForeground=function(c,l,x,p,v){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(p,B)):p*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(p*A,v*A)));B=Math.round(B);c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.moveTo(l+p-B,x);c.lineTo(l+p-B,x+v);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
arguments)};mxCellRenderer.registerShape("process",ea);mxCellRenderer.registerShape("process2",ea);mxUtils.extend(ka,mxRectangleShape);ka.prototype.paintBackground=function(c,l,x,p,v){c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};ka.prototype.paintForeground=function(c,l,x,p,v){};mxCellRenderer.registerShape("transparent",ka);mxUtils.extend(ja,mxHexagon);ja.prototype.size=30;ja.prototype.position=.5;ja.prototype.position2=.5;ja.prototype.base=20;ja.prototype.getLabelMargins=function(){return new mxRectangle(0,
0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(c,l,x,p,v){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),ha=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,v-x),new mxPoint(Math.min(p,A+ha),v-x),new mxPoint(B,v),new mxPoint(Math.max(0,A),v-x),new mxPoint(0,v-x)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",ja);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,l,x,p,
+this.position2)))),fa=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,v-x),new mxPoint(Math.min(p,A+fa),v-x),new mxPoint(B,v),new mxPoint(Math.max(0,A),v-x),new mxPoint(0,v-x)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",ja);mxUtils.extend(U,mxActor);U.prototype.size=.2;U.prototype.fixedSize=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,l,x,p,
v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(0,v),new mxPoint(l,v/2)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("step",
-U);mxUtils.extend(I,mxHexagon);I.prototype.size=.25;I.prototype.fixedSize=20;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
-0),new mxPoint(p-l,0),new mxPoint(p,.5*v),new mxPoint(p-l,v),new mxPoint(l,v),new mxPoint(0,.5*v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("hexagon",I);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(c,l,x,p,v){var A=Math.min(p/5,v/5)+1;c.begin();c.moveTo(l+p/2,x+A);c.lineTo(l+p/2,x+v-A);c.moveTo(l+A,x+v/2);c.lineTo(l+p-A,x+v/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
-V);var cb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,x,p,v){cb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),cb.apply(this,[c,l,x,p,v]))}};mxUtils.extend(P,mxRectangleShape);P.prototype.isHtmlAllowed=function(){return!1};P.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};P.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ha=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],xa=this.style["symbol"+A+"Width"],ma=this.style["symbol"+A+"Height"],ab=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
-ab,fb=this.style["symbol"+A+"ArcSpacing"];null!=fb&&(fb*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),ab+=fb,jb+=fb);fb=l;var Da=x;fb=ha==mxConstants.ALIGN_CENTER?fb+(p-xa)/2:ha==mxConstants.ALIGN_RIGHT?fb+(p-xa-ab):fb+ab;Da=K==mxConstants.ALIGN_MIDDLE?Da+(v-ma)/2:K==mxConstants.ALIGN_BOTTOM?Da+(v-ma-jb):Da+jb;c.save();ha=new B;ha.style=this.style;B.prototype.paintVertexShape.call(ha,c,fb,Da,xa,ma);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("ext",P);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(c,l,x,p,v,A){A?(c.moveTo(0,0),c.lineTo(p/2,v/2),c.lineTo(p,0),c.end()):(c.moveTo(0,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(0,v),c.close())};mxCellRenderer.registerShape("message",R);mxUtils.extend(fa,mxShape);fa.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.ellipse(p/4,0,p/2,v/4);c.fillAndStroke();c.begin();c.moveTo(p/2,v/4);c.lineTo(p/2,2*v/3);c.moveTo(p/2,v/3);c.lineTo(0,v/3);c.moveTo(p/
-2,v/3);c.lineTo(p,v/3);c.moveTo(p/2,2*v/3);c.lineTo(0,v);c.moveTo(p/2,2*v/3);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",fa);mxUtils.extend(la,mxShape);la.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};la.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,v/4);c.lineTo(0,3*v/4);c.end();c.stroke();c.begin();c.moveTo(0,v/2);c.lineTo(p/6,v/2);c.end();c.stroke();c.ellipse(p/6,0,5*p/6,v);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
-la);mxUtils.extend(sa,mxEllipse);sa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/8,x+v);c.lineTo(l+7*p/8,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",sa);mxUtils.extend(u,mxShape);u.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(p,0);c.lineTo(0,v);c.moveTo(0,0);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",u);mxUtils.extend(J,mxShape);
-J.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};J.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,0);c.end();c.stroke();c.ellipse(0,v/8,p,7*v/8);c.fillAndStroke()};J.prototype.paintForeground=function(c,l,x,p,v){c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,v/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",J);mxUtils.extend(N,mxRectangleShape);N.prototype.size=
+U);mxUtils.extend(J,mxHexagon);J.prototype.size=.25;J.prototype.fixedSize=20;J.prototype.isRoundable=function(){return!0};J.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
+0),new mxPoint(p-l,0),new mxPoint(p,.5*v),new mxPoint(p-l,v),new mxPoint(l,v),new mxPoint(0,.5*v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("hexagon",J);mxUtils.extend(V,mxRectangleShape);V.prototype.isHtmlAllowed=function(){return!1};V.prototype.paintForeground=function(c,l,x,p,v){var A=Math.min(p/5,v/5)+1;c.begin();c.moveTo(l+p/2,x+A);c.lineTo(l+p/2,x+v-A);c.moveTo(l+A,x+v/2);c.lineTo(l+p-A,x+v/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",
+V);var Ya=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,x,p,v){Ya.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),Ya.apply(this,[c,l,x,p,v]))}};mxUtils.extend(P,mxRectangleShape);P.prototype.isHtmlAllowed=function(){return!1};P.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};P.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var fa=this.style["symbol"+A+"Align"],K=this.style["symbol"+A+"VerticalAlign"],wa=this.style["symbol"+A+"Width"],ma=this.style["symbol"+A+"Height"],bb=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
+bb,eb=this.style["symbol"+A+"ArcSpacing"];null!=eb&&(eb*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),bb+=eb,jb+=eb);eb=l;var Ea=x;eb=fa==mxConstants.ALIGN_CENTER?eb+(p-wa)/2:fa==mxConstants.ALIGN_RIGHT?eb+(p-wa-bb):eb+bb;Ea=K==mxConstants.ALIGN_MIDDLE?Ea+(v-ma)/2:K==mxConstants.ALIGN_BOTTOM?Ea+(v-ma-jb):Ea+jb;c.save();fa=new B;fa.style=this.style;B.prototype.paintVertexShape.call(fa,c,eb,Ea,wa,ma);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("ext",P);mxUtils.extend(R,mxCylinder);R.prototype.redrawPath=function(c,l,x,p,v,A){A?(c.moveTo(0,0),c.lineTo(p/2,v/2),c.lineTo(p,0),c.end()):(c.moveTo(0,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(0,v),c.close())};mxCellRenderer.registerShape("message",R);mxUtils.extend(ia,mxShape);ia.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.ellipse(p/4,0,p/2,v/4);c.fillAndStroke();c.begin();c.moveTo(p/2,v/4);c.lineTo(p/2,2*v/3);c.moveTo(p/2,v/3);c.lineTo(0,v/3);c.moveTo(p/
+2,v/3);c.lineTo(p,v/3);c.moveTo(p/2,2*v/3);c.lineTo(0,v);c.moveTo(p/2,2*v/3);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ia);mxUtils.extend(la,mxShape);la.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};la.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,v/4);c.lineTo(0,3*v/4);c.end();c.stroke();c.begin();c.moveTo(0,v/2);c.lineTo(p/6,v/2);c.end();c.stroke();c.ellipse(p/6,0,5*p/6,v);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+la);mxUtils.extend(ta,mxEllipse);ta.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/8,x+v);c.lineTo(l+7*p/8,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",ta);mxUtils.extend(u,mxShape);u.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(p,0);c.lineTo(0,v);c.moveTo(0,0);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",u);mxUtils.extend(I,mxShape);
+I.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};I.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,0);c.end();c.stroke();c.ellipse(0,v/8,p,7*v/8);c.fillAndStroke()};I.prototype.paintForeground=function(c,l,x,p,v){c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,v/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",I);mxUtils.extend(N,mxRectangleShape);N.prototype.size=
40;N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};N.prototype.paintBackground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,
x,p,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=N&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,x,p,A),c.restore()));A<v&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+p/2,x+A),c.lineTo(l+p/2,x+v),c.end(),c.stroke())};N.prototype.paintForeground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,x,p,Math.min(v,
A))};mxCellRenderer.registerShape("umlLifeline",N);mxUtils.extend(W,mxShape);W.prototype.width=60;W.prototype.height=30;W.prototype.corner=10;W.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};W.prototype.paintBackground=function(c,l,x,p,v){var A=this.corner,B=Math.min(p,Math.max(A,parseFloat(mxUtils.getValue(this.style,
-"width",this.width)))),ha=Math.min(v,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(l,x,p,v),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,x,p,v),c.setGradient(this.fill,this.gradient,l,x,p,v,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
-c.moveTo(l,x);c.lineTo(l+B,x);c.lineTo(l+B,x+Math.max(0,ha-1.5*A));c.lineTo(l+Math.max(0,B-A),x+ha);c.lineTo(l,x+ha);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+p,x);c.lineTo(l+p,x+v);c.lineTo(l,x+v);c.lineTo(l,x+ha);c.stroke()};mxCellRenderer.registerShape("umlFrame",W);mxPerimeter.CenterPerimeter=function(c,l,x,p){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
+"width",this.width)))),fa=Math.min(v,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),K=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);K!=mxConstants.NONE&&(c.setFillColor(K),c.rect(l,x,p,v),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,x,p,v),c.setGradient(this.fill,this.gradient,l,x,p,v,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
+c.moveTo(l,x);c.lineTo(l+B,x);c.lineTo(l+B,x+Math.max(0,fa-1.5*A));c.lineTo(l+Math.max(0,B-A),x+fa);c.lineTo(l,x+fa);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+p,x);c.lineTo(l+p,x+v);c.lineTo(l,x+v);c.lineTo(l,x+fa);c.stroke()};mxCellRenderer.registerShape("umlFrame",W);mxPerimeter.CenterPerimeter=function(c,l,x,p){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
l,x,p){p=N.prototype.size;null!=l&&(p=mxUtils.getValue(l.style,"size",p)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;x.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+p,x.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,x,p){p=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,x,p){p=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;null!=l.style.backboneSize&&(p+=parseFloat(l.style.backboneSize)*l.view.scale/2-1);if("south"==l.style[mxConstants.STYLE_DIRECTION]||"north"==l.style[mxConstants.STYLE_DIRECTION])return x.x<c.getCenterX()&&(p=-1*(p+1)),new mxPoint(c.getCenterX()+p,Math.min(c.y+c.height,Math.max(c.y,x.y)));x.y<c.getCenterY()&&(p=-1*(p+1));return new mxPoint(Math.min(c.x+
c.width,Math.max(c.x,x.x)),c.getCenterY()+p)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,x,p){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",ja.prototype.size))*l.view.scale))),l.style),l,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?ba.prototype.fixedSize:ba.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ha=c.y,K=c.width,xa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K,ha+v),new mxPoint(B+
-K,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha)]):(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+v,ha)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,x,p){var v="0"!=
-mxUtils.getValue(l.style,"fixedSize","0"),A=v?Y.prototype.fixedSize:Y.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ha=c.y,K=c.width,xa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+
-v,ha)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,ha)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha+v),new mxPoint(B+K,ha),new mxPoint(B+K,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+
-K,ha+v),new mxPoint(B+K,ha+xa-v),new mxPoint(B,ha+xa),new mxPoint(B,ha)]);xa=c.getCenterX();c=c.getCenterY();c=new mxPoint(xa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?U.prototype.fixedSize:U.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,
-ha=c.y,K=c.width,xa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,c),new mxPoint(B+K-v,ha+xa),new mxPoint(B,ha+xa),new mxPoint(B+v,c),new mxPoint(B,ha)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
-A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K,ha),new mxPoint(B+K-v,c),new mxPoint(B+K,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,c),new mxPoint(B+v,ha)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha+v),new mxPoint(ma,ha),new mxPoint(B+K,ha+v),new mxPoint(B+K,ha+xa),new mxPoint(ma,ha+xa-v),new mxPoint(B,ha+xa),new mxPoint(B,ha+v)]):(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(ma,ha+
-v),new mxPoint(B+K,ha),new mxPoint(B+K,ha+xa-v),new mxPoint(ma,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha)]);ma=new mxPoint(ma,c);p&&(x.x<B||x.x>B+K?ma.y=x.y:ma.x=x.x);return mxUtils.getPerimeterPoint(ha,ma,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?I.prototype.fixedSize:I.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=
-c.x,ha=c.y,K=c.width,xa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(xa,A)):xa*Math.max(0,Math.min(1,A)),ha=[new mxPoint(ma,ha),new mxPoint(B+K,ha+v),new mxPoint(B+K,ha+xa-v),new mxPoint(ma,ha+xa),new mxPoint(B,ha+xa-v),new mxPoint(B,ha+v),new mxPoint(ma,ha)]):(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,
-Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+K-v,ha),new mxPoint(B+K,c),new mxPoint(B+K-v,ha+xa),new mxPoint(B+v,ha+xa),new mxPoint(B,c),new mxPoint(B+v,ha)]);ma=new mxPoint(ma,c);p&&(x.x<B||x.x>B+K?ma.y=x.y:ma.x=x.x);return mxUtils.getPerimeterPoint(ha,ma,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(T,mxShape);T.prototype.size=10;T.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?ba.prototype.fixedSize:ba.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,fa=c.y,K=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),fa=[new mxPoint(B,fa),new mxPoint(B+K,fa+v),new mxPoint(B+
+K,fa+wa),new mxPoint(B,fa+wa-v),new mxPoint(B,fa)]):(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),fa=[new mxPoint(B+v,fa),new mxPoint(B+K,fa),new mxPoint(B+K-v,fa+wa),new mxPoint(B,fa+wa),new mxPoint(B+v,fa)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(fa,c,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,x,p){var v="0"!=
+mxUtils.getValue(l.style,"fixedSize","0"),A=v?Y.prototype.fixedSize:Y.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,fa=c.y,K=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*K,A)):K*Math.max(0,Math.min(1,A)),fa=[new mxPoint(B+v,fa),new mxPoint(B+K-v,fa),new mxPoint(B+K,fa+wa),new mxPoint(B,fa+wa),new mxPoint(B+
+v,fa)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),fa=[new mxPoint(B,fa),new mxPoint(B+K,fa),new mxPoint(B+K-v,fa+wa),new mxPoint(B+v,fa+wa),new mxPoint(B,fa)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),fa=[new mxPoint(B,fa+v),new mxPoint(B+K,fa),new mxPoint(B+K,fa+wa),new mxPoint(B,fa+wa-v),new mxPoint(B,fa+v)]):(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),fa=[new mxPoint(B,fa),new mxPoint(B+
+K,fa+v),new mxPoint(B+K,fa+wa-v),new mxPoint(B,fa+wa),new mxPoint(B,fa)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);p&&(x.x<B||x.x>B+K?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(fa,c,x)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?U.prototype.fixedSize:U.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,
+fa=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,A)),fa=[new mxPoint(B,fa),new mxPoint(B+K-v,fa),new mxPoint(B+K,c),new mxPoint(B+K-v,fa+wa),new mxPoint(B,fa+wa),new mxPoint(B+v,c),new mxPoint(B,fa)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,Math.min(1,
+A)),fa=[new mxPoint(B+v,fa),new mxPoint(B+K,fa),new mxPoint(B+K-v,c),new mxPoint(B+K,fa+wa),new mxPoint(B+v,fa+wa),new mxPoint(B,c),new mxPoint(B+v,fa)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),fa=[new mxPoint(B,fa+v),new mxPoint(ma,fa),new mxPoint(B+K,fa+v),new mxPoint(B+K,fa+wa),new mxPoint(ma,fa+wa-v),new mxPoint(B,fa+wa),new mxPoint(B,fa+v)]):(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),fa=[new mxPoint(B,fa),new mxPoint(ma,fa+
+v),new mxPoint(B+K,fa),new mxPoint(B+K,fa+wa-v),new mxPoint(ma,fa+wa),new mxPoint(B,fa+wa-v),new mxPoint(B,fa)]);ma=new mxPoint(ma,c);p&&(x.x<B||x.x>B+K?ma.y=x.y:ma.x=x.x);return mxUtils.getPerimeterPoint(fa,ma,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?J.prototype.fixedSize:J.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=
+c.x,fa=c.y,K=c.width,wa=c.height,ma=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),fa=[new mxPoint(ma,fa),new mxPoint(B+K,fa+v),new mxPoint(B+K,fa+wa-v),new mxPoint(ma,fa+wa),new mxPoint(B,fa+wa-v),new mxPoint(B,fa+v),new mxPoint(ma,fa)]):(v=v?Math.max(0,Math.min(K,A)):K*Math.max(0,
+Math.min(1,A)),fa=[new mxPoint(B+v,fa),new mxPoint(B+K-v,fa),new mxPoint(B+K,c),new mxPoint(B+K-v,fa+wa),new mxPoint(B+v,fa+wa),new mxPoint(B,c),new mxPoint(B+v,fa)]);ma=new mxPoint(ma,c);p&&(x.x<B||x.x>B+K?ma.y=x.y:ma.x=x.x);return mxUtils.getPerimeterPoint(fa,ma,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(T,mxShape);T.prototype.size=10;T.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
c.translate(l,x);c.ellipse((p-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(p/2,A);c.lineTo(p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",T);mxUtils.extend(Q,mxShape);Q.prototype.size=10;Q.prototype.inset=2;Q.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,x);c.begin();c.moveTo(p/2,A+B);c.lineTo(p/2,v);c.end();c.stroke();
-c.begin();c.moveTo((p-A)/2-B,A/2);c.quadTo((p-A)/2-B,A+B,p/2,A+B);c.quadTo((p+A)/2+B,A+B,(p+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",Q);mxUtils.extend(Z,mxShape);Z.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Z);mxUtils.extend(oa,mxShape);oa.prototype.inset=2;oa.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,
-"inset",this.inset))+this.strokewidth;c.translate(l,x);c.ellipse(0,A,p-2*A,v-2*A);c.fillAndStroke();c.begin();c.moveTo(p/2,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",oa);mxUtils.extend(wa,mxCylinder);wa.prototype.jettyWidth=20;wa.prototype.jettyHeight=10;wa.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
-this.jettyHeight));x=B/2;B=x+B/2;var ha=Math.min(l,v-l),K=Math.min(ha+2*l,v-l);A?(c.moveTo(x,ha),c.lineTo(B,ha),c.lineTo(B,ha+l),c.lineTo(x,ha+l),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(x,K+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(x,K),c.lineTo(x,ha+l),c.lineTo(0,ha+l),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("module",wa);mxUtils.extend(Aa,mxCylinder);Aa.prototype.jettyWidth=
-32;Aa.prototype.jettyHeight=12;Aa.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=B/2;B=x+B/2;var ha=.3*v-l/2,K=.7*v-l/2;A?(c.moveTo(x,ha),c.lineTo(B,ha),c.lineTo(B,ha+l),c.lineTo(x,ha+l),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(x,K+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(x,
-K),c.lineTo(x,ha+l),c.lineTo(0,ha+l),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("component",Aa);mxUtils.extend(ta,mxRectangleShape);ta.prototype.paintForeground=function(c,l,x,p,v){var A=p/2,B=v/2,ha=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,x),new mxPoint(l+p,x+B),new mxPoint(l+A,x+v),new mxPoint(l,x+B)],this.isRounded,ha,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("associativeEntity",ta);mxUtils.extend(Ba,mxDoubleEllipse);Ba.prototype.outerStroke=!0;Ba.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.min(4,Math.min(p/5,v/5));0<p&&0<v&&(c.ellipse(l+A,x+A,p-2*A,v-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,x,p,v),c.stroke())};mxCellRenderer.registerShape("endState",Ba);mxUtils.extend(va,Ba);va.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",va);mxUtils.extend(Oa,mxArrowConnector);
-Oa.prototype.defaultWidth=4;Oa.prototype.isOpenEnded=function(){return!0};Oa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};Oa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",Oa);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Ta,mxActor);Ta.prototype.size=30;Ta.prototype.isRoundable=function(){return!0};Ta.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ta);mxUtils.extend(Va,mxRectangleShape);Va.prototype.dx=20;Va.prototype.dy=20;Va.prototype.isHtmlAllowed=function(){return!1};Va.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
-var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,x+A);c.lineTo(l+p,x+A);c.end();c.stroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Va);
-mxUtils.extend(Ja,mxActor);Ja.prototype.dx=20;Ja.prototype.dy=20;Ja.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint(l,x),
-new mxPoint(l,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Ja);mxUtils.extend(bb,mxActor);bb.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",bb);mxUtils.extend(Wa,mxActor);Wa.prototype.dx=20;Wa.prototype.dy=20;Wa.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+l)/2,x),new mxPoint((p+l)/2,v),new mxPoint((p-l)/2,v),new mxPoint((p-l)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Wa);mxUtils.extend($a,
+c.begin();c.moveTo((p-A)/2-B,A/2);c.quadTo((p-A)/2-B,A+B,p/2,A+B);c.quadTo((p+A)/2+B,A+B,(p+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",Q);mxUtils.extend(Z,mxShape);Z.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Z);mxUtils.extend(na,mxShape);na.prototype.inset=2;na.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,
+"inset",this.inset))+this.strokewidth;c.translate(l,x);c.ellipse(0,A,p-2*A,v-2*A);c.fillAndStroke();c.begin();c.moveTo(p/2,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",na);mxUtils.extend(va,mxCylinder);va.prototype.jettyWidth=20;va.prototype.jettyHeight=10;va.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
+this.jettyHeight));x=B/2;B=x+B/2;var fa=Math.min(l,v-l),K=Math.min(fa+2*l,v-l);A?(c.moveTo(x,fa),c.lineTo(B,fa),c.lineTo(B,fa+l),c.lineTo(x,fa+l),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(x,K+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(x,K),c.lineTo(x,fa+l),c.lineTo(0,fa+l),c.lineTo(0,fa),c.lineTo(x,fa),c.close());c.end()};mxCellRenderer.registerShape("module",va);mxUtils.extend(Ba,mxCylinder);Ba.prototype.jettyWidth=
+32;Ba.prototype.jettyHeight=12;Ba.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=B/2;B=x+B/2;var fa=.3*v-l/2,K=.7*v-l/2;A?(c.moveTo(x,fa),c.lineTo(B,fa),c.lineTo(B,fa+l),c.lineTo(x,fa+l),c.moveTo(x,K),c.lineTo(B,K),c.lineTo(B,K+l),c.lineTo(x,K+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,K+l),c.lineTo(0,K+l),c.lineTo(0,K),c.lineTo(x,
+K),c.lineTo(x,fa+l),c.lineTo(0,fa+l),c.lineTo(0,fa),c.lineTo(x,fa),c.close());c.end()};mxCellRenderer.registerShape("component",Ba);mxUtils.extend(sa,mxRectangleShape);sa.prototype.paintForeground=function(c,l,x,p,v){var A=p/2,B=v/2,fa=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,x),new mxPoint(l+p,x+B),new mxPoint(l+A,x+v),new mxPoint(l,x+B)],this.isRounded,fa,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("associativeEntity",sa);mxUtils.extend(Da,mxDoubleEllipse);Da.prototype.outerStroke=!0;Da.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.min(4,Math.min(p/5,v/5));0<p&&0<v&&(c.ellipse(l+A,x+A,p-2*A,v-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,x,p,v),c.stroke())};mxCellRenderer.registerShape("endState",Da);mxUtils.extend(Aa,Da);Aa.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Aa);mxUtils.extend(za,mxArrowConnector);
+za.prototype.defaultWidth=4;za.prototype.isOpenEnded=function(){return!0};za.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};za.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",za);mxUtils.extend(Ca,mxArrowConnector);Ca.prototype.defaultWidth=10;Ca.prototype.defaultArrowWidth=20;Ca.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
+"startWidth",this.defaultArrowWidth)};Ca.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Ca.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Ca);mxUtils.extend(Qa,mxActor);Qa.prototype.size=30;Qa.prototype.isRoundable=function(){return!0};Qa.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Qa);mxUtils.extend(Za,mxRectangleShape);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.isHtmlAllowed=function(){return!1};Za.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
+var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,x+A);c.lineTo(l+p,x+A);c.end();c.stroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Za);
+mxUtils.extend(cb,mxActor);cb.prototype.dx=20;cb.prototype.dy=20;cb.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint(l,x),
+new mxPoint(l,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",cb);mxUtils.extend(Ka,mxActor);Ka.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",Ka);mxUtils.extend(Ua,mxActor);Ua.prototype.dx=20;Ua.prototype.dy=20;Ua.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+l)/2,x),new mxPoint((p+l)/2,v),new mxPoint((p-l)/2,v),new mxPoint((p-l)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",Ua);mxUtils.extend($a,
mxActor);$a.prototype.arrowWidth=.3;$a.prototype.arrowSize=.2;$a.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-
l,v),new mxPoint(p-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",$a);mxUtils.extend(z,mxActor);z.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
2;this.addPoints(c,[new mxPoint(0,v/2),new mxPoint(l,0),new mxPoint(l,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(p-l,A),new mxPoint(l,A),new mxPoint(l,v)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",z);mxUtils.extend(L,mxActor);L.prototype.size=.1;L.prototype.fixedSize=20;L.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(p,0);c.quadTo(p-2*l,v/2,p,v);c.lineTo(l,v);c.quadTo(l-2*l,v/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",L);mxUtils.extend(M,mxActor);M.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.close();c.end()};mxCellRenderer.registerShape("or",M);mxUtils.extend(S,mxActor);S.prototype.redrawPath=function(c,
l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.quadTo(p/2,v/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",S);mxUtils.extend(ca,mxActor);ca.prototype.size=20;ca.prototype.isRoundable=function(){return!0};ca.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p-l,0),
-new mxPoint(p,.8*l),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,.8*l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("loopLimit",ca);mxUtils.extend(ia,mxActor);ia.prototype.size=.375;ia.prototype.isRoundable=function(){return!0};ia.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,
-0),new mxPoint(p,v-l),new mxPoint(p/2,v),new mxPoint(0,v-l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ia);mxUtils.extend(na,mxEllipse);na.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/2,x+v);c.lineTo(l+p,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",na);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,
+new mxPoint(p,.8*l),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,.8*l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("loopLimit",ca);mxUtils.extend(ha,mxActor);ha.prototype.size=.375;ha.prototype.isRoundable=function(){return!0};ha.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,
+0),new mxPoint(p,v-l),new mxPoint(p/2,v),new mxPoint(0,v-l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ha);mxUtils.extend(oa,mxEllipse);oa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/2,x+v);c.lineTo(l+p,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",oa);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,
arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke();c.begin();c.moveTo(l+p/2,x);c.lineTo(l+p/2,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",ra);mxUtils.extend(qa,mxEllipse);qa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*p,x+.145*v);c.lineTo(l+.855*p,x+.855*v);c.end();c.stroke();c.begin();c.moveTo(l+.855*p,x+.145*v);c.lineTo(l+.145*p,
-x+.855*v);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",qa);mxUtils.extend(ya,mxRhombus);ya.prototype.paintVertexShape=function(c,l,x,p,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ya);mxUtils.extend(Ea,mxEllipse);Ea.prototype.paintVertexShape=function(c,l,x,p,v){c.begin();c.moveTo(l,x);c.lineTo(l+p,x);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke();
-c.begin();c.moveTo(l,x+v);c.lineTo(l+p,x+v);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Ea);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape=function(c,l,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,ha=x+v-B/2;c.begin();c.moveTo(l,x);c.lineTo(l,x+v);c.moveTo(l+A,ha);c.lineTo(l+A+B,ha-B/2);c.moveTo(l+A,ha);c.lineTo(l+A+B,ha+B/2);c.moveTo(l+A,ha);c.lineTo(l+p-A,ha);c.moveTo(l+p,x);c.lineTo(l+p,x+v);c.moveTo(l+p-A,ha);c.lineTo(l+p-B-A,ha-B/2);c.moveTo(l+
-p-A,ha);c.lineTo(l+p-B-A,ha+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Na);mxUtils.extend(Pa,mxEllipse);Pa.prototype.drawHidden=!0;Pa.prototype.paintVertexShape=function(c,l,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ha="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
-"left","1"),xa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ha||xa||ma||K?(c.rect(l,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,x),this.outline||ha?c.lineTo(l+p,x):c.moveTo(l+p,x),this.outline||xa?c.lineTo(l+p,x+v):c.moveTo(l+p,x+v),this.outline||ma?c.lineTo(l,x+v):c.moveTo(l,x+v),(this.outline||K)&&c.lineTo(l,x),c.end(),c.stroke(),c.setLineCap("flat")):
-c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Pa);mxUtils.extend(Qa,mxEllipse);Qa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+p/2,x),c.lineTo(l+p/2,x+v)):(c.moveTo(l,x+v/2),c.lineTo(l+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Qa);mxUtils.extend(Ua,mxActor);Ua.prototype.redrawPath=function(c,
-l,x,p,v){l=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Ua);mxUtils.extend(La,mxActor);La.prototype.size=.2;La.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,p);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(v-A)/2;x=l+A;var B=(p-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(p,l);c.lineTo(p,x);
-c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",La);mxUtils.extend(ua,mxActor);ua.prototype.size=.25;ua.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/2);x=Math.min(p-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",ua);mxUtils.extend(za,
-mxActor);za.prototype.cst={RECT2:"mxgraph.basic.rect"};za.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
+x+.855*v);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",qa);mxUtils.extend(xa,mxRhombus);xa.prototype.paintVertexShape=function(c,l,x,p,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(Ga,mxEllipse);Ga.prototype.paintVertexShape=function(c,l,x,p,v){c.begin();c.moveTo(l,x);c.lineTo(l+p,x);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke();
+c.begin();c.moveTo(l,x+v);c.lineTo(l+p,x+v);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Ga);mxUtils.extend(La,mxEllipse);La.prototype.paintVertexShape=function(c,l,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,fa=x+v-B/2;c.begin();c.moveTo(l,x);c.lineTo(l,x+v);c.moveTo(l+A,fa);c.lineTo(l+A+B,fa-B/2);c.moveTo(l+A,fa);c.lineTo(l+A+B,fa+B/2);c.moveTo(l+A,fa);c.lineTo(l+p-A,fa);c.moveTo(l+p,x);c.lineTo(l+p,x+v);c.moveTo(l+p-A,fa);c.lineTo(l+p-B-A,fa-B/2);c.moveTo(l+
+p-A,fa);c.lineTo(l+p-B-A,fa+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",La);mxUtils.extend(Pa,mxEllipse);Pa.prototype.drawHidden=!0;Pa.prototype.paintVertexShape=function(c,l,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var fa="1"==mxUtils.getValue(this.style,"top","1"),K="1"==mxUtils.getValue(this.style,
+"left","1"),wa="1"==mxUtils.getValue(this.style,"right","1"),ma="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||fa||wa||ma||K?(c.rect(l,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,x),this.outline||fa?c.lineTo(l+p,x):c.moveTo(l+p,x),this.outline||wa?c.lineTo(l+p,x+v):c.moveTo(l+p,x+v),this.outline||ma?c.lineTo(l,x+v):c.moveTo(l,x+v),(this.outline||K)&&c.lineTo(l,x),c.end(),c.stroke(),c.setLineCap("flat")):
+c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Pa);mxUtils.extend(Oa,mxEllipse);Oa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+p/2,x),c.lineTo(l+p/2,x+v)):(c.moveTo(l,x+v/2),c.lineTo(l+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Oa);mxUtils.extend(Ta,mxActor);Ta.prototype.redrawPath=function(c,
+l,x,p,v){l=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Ta);mxUtils.extend(Ma,mxActor);Ma.prototype.size=.2;Ma.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,p);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(v-A)/2;x=l+A;var B=(p-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(p,l);c.lineTo(p,x);
+c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",Ma);mxUtils.extend(ua,mxActor);ua.prototype.size=.25;ua.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/2);x=Math.min(p-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",ua);mxUtils.extend(ya,
+mxActor);ya.prototype.cst={RECT2:"mxgraph.basic.rect"};ya.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},
{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},
{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",
-dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];za.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,
-x);this.strictDrawShape(c,0,0,p,v)};za.prototype.strictDrawShape=function(c,l,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ha=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),xa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=A&&A.indent?
-A.indent:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),ab=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),fb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,ma)),Da=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ia=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ha=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Fa=A&&A.left?A.left:
-mxUtils.getValue(this.style,"left",!0),Sa=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Xa=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ya=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Za=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Eb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
+dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];ya.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,
+x);this.strictDrawShape(c,0,0,p,v)};ya.prototype.strictDrawShape=function(c,l,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),fa=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),K=A&&A.size?A.size:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),wa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),ma=A&&A.indent?
+A.indent:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),bb=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),eb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,ma)),Ea=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),Ja=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ia=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ha=A&&A.left?A.left:
+mxUtils.getValue(this.style,"left",!0),Sa=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Wa=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Xa=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),ab=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Eb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
A&&A.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Fb=A&&A.strokeWidth?A.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Cb=A&&A.fillColor2?A.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Db=A&&A.gradientColor2?A.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Gb=A&&A.gradientDirection2?A.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Hb=A&&A.opacity?A.opacity:mxUtils.getValue(this.style,"opacity","100"),
-Ib=Math.max(0,Math.min(50,K));A=za.prototype;c.setDashed(ab);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Fb);K=Math.min(.5*v,.5*p,K);ha||(K=Ib*Math.min(p,v)/100);K=Math.min(K,.5*Math.min(p,v));ha||(ma=Math.min(fb*Math.min(p,v)/100));ma=Math.min(ma,.5*Math.min(p,v)-K);(Da||Ia||Ha||Fa)&&"frame"!=xa&&(c.begin(),Da?A.moveNW(c,l,x,p,v,B,Sa,K,Fa):c.moveTo(0,0),Da&&A.paintNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),Ia&&A.paintNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),Ha&&
-A.paintSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),Fa&&A.paintSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),ab=ha=Hb,"none"==Cb&&(ha=0),"none"==Db&&(ab=0),c.setGradient(Cb,Db,0,0,p,v,Gb,ha,ab),c.begin(),Da?A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Da,Fa):c.moveTo(ma,0),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),Fa&&Ha&&A.paintSWInner(c,l,x,p,v,B,Za,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),Ha&&Ia&&A.paintSEInner(c,
-l,x,p,v,B,Ya,K,ma),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),Ia&&Da&&A.paintNEInner(c,l,x,p,v,B,Xa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),Da&&Fa&&A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,l,x,p,v,B,Sa,Xa,Ya,Za,K,Da,Ia,Ha,Fa),c.stroke()));Da||Ia||Ha||!Fa?Da||Ia||!Ha||Fa?!Da&&!Ia&&Ha&&Fa?"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.paintSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),"double"==
-xa&&(A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Da,Fa),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),A.paintSWInner(c,l,x,p,v,B,Za,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.paintSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),A.lineNWInner(c,l,x,p,v,B,Sa,K,ma,Da,Fa),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),A.paintSWInner(c,l,x,p,v,B,Za,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),c.close(),
-c.fillAndStroke()):Da||!Ia||Ha||Fa?!Da&&Ia&&!Ha&&Fa?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Sa,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Da,Fa),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa)),c.stroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,ma,Ha),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Sa,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,
-K,Da),A.lineNWInner(c,l,x,p,v,B,Sa,K,ma,Da,Fa),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.lineSEInner(c,l,x,p,v,B,Ya,K,ma,Ha),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),c.close(),c.fillAndStroke()):!Da&&Ia&&Ha&&!Fa?"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.paintSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),"double"==xa&&(A.moveSWInner(c,
-l,x,p,v,B,Za,K,ma,Fa),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),A.paintSEInner(c,l,x,p,v,B,Ya,K,ma),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia)),c.stroke()):(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.paintSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.lineSWInner(c,l,x,p,v,B,Za,K,ma,Fa),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),A.paintSEInner(c,l,x,p,v,B,Ya,K,ma),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),c.close(),c.fillAndStroke()):!Da&&
-Ia&&Ha&&Fa?"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.paintSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.paintSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Da,Fa),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),A.paintSWInner(c,l,x,p,v,B,Za,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),A.paintSEInner(c,l,x,p,v,B,Ya,K,ma),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.paintSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.paintSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),A.lineNWInner(c,l,x,p,v,B,Sa,K,ma,Da,Fa),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),A.paintSWInner(c,l,x,p,v,B,Za,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),A.paintSEInner(c,l,x,p,v,B,Ya,K,ma),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),c.close(),c.fillAndStroke()):!Da||Ia||Ha||Fa?
-Da&&!Ia&&!Ha&&Fa?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),A.paintNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),A.paintNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.lineNEInner(c,
-l,x,p,v,B,Xa,K,ma,Ia),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),c.close(),c.fillAndStroke()):Da&&!Ia&&Ha&&!Fa?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da)),c.stroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Za,
-K,ma,Fa),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.lineNEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.lineSWInner(c,l,x,p,v,B,Za,K,ma,Fa),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),c.close(),c.fillAndStroke()):Da&&!Ia&&Ha&&Fa?"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,
-K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.paintSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),A.paintNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),A.paintSWInner(c,l,x,p,v,B,Za,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,
-x,p,v,B,Za,K,Fa),A.paintSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),A.paintNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.lineNEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),A.paintSWInner(c,l,x,p,v,B,Za,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),c.close(),c.fillAndStroke()):Da&&Ia&&!Ha&&!Fa?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,
-l,x,p,v,B,Xa,K,Ia),A.paintNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,ma,Ha),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),A.paintNEInner(c,l,x,p,v,B,Xa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.paintNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.lineSEInner(c,l,x,p,v,B,Ya,K,ma,Ha),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),A.paintNEInner(c,
-l,x,p,v,B,Xa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),c.close(),c.fillAndStroke()):Da&&Ia&&!Ha&&Fa?"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),A.paintNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.paintNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,ma,Ha),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),A.paintNEInner(c,l,x,p,v,B,Xa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),A.paintNWInner(c,
-l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),A.paintNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.paintNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.lineSEInner(c,l,x,p,v,B,Ya,K,ma,Ha),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),A.paintNEInner(c,l,x,p,v,B,Xa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,
-v,B,Za,K,ma,Ha,Fa),c.close(),c.fillAndStroke()):Da&&Ia&&Ha&&!Fa?"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.paintNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.paintSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Za,K,ma,Fa),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),A.paintSEInner(c,l,x,p,v,B,Ya,K,ma),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),A.paintNEInner(c,l,x,p,v,B,Xa,K,ma),A.paintTopInner(c,
-l,x,p,v,B,Sa,K,ma,Fa,Da)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.paintNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.paintSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.lineSWInner(c,l,x,p,v,B,Za,K,ma,Fa),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),A.paintSEInner(c,l,x,p,v,B,Ya,K,ma),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),A.paintNEInner(c,l,x,p,v,B,Xa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),c.close(),c.fillAndStroke()):
-Da&&Ia&&Ha&&Fa&&("frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.paintNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.paintSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.paintSW(c,l,x,p,v,B,Za,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),c.close(),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Za,K,ma,Fa),A.paintSWInner(c,l,x,p,v,B,Za,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),A.paintSEInner(c,l,x,p,v,
-B,Ya,K,ma),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),A.paintNEInner(c,l,x,p,v,B,Xa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.paintNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.paintSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.paintSW(c,l,x,p,v,B,Za,K,Ha),
-A.paintLeft(c,l,x,p,v,B,Sa,K,Da),c.close(),A.moveSWInner(c,l,x,p,v,B,Za,K,ma,Fa),A.paintSWInner(c,l,x,p,v,B,Za,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),A.paintSEInner(c,l,x,p,v,B,Ya,K,ma),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),A.paintNEInner(c,l,x,p,v,B,Xa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),c.close(),c.fillAndStroke())):"frame"!=xa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,
-l,x,p,v,B,Xa,K,Ia),"double"==xa&&(A.moveNEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Fa),A.paintTop(c,l,x,p,v,B,Xa,K,Ia),A.lineNEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Fa,Da),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),"double"==xa&&(A.moveSEInner(c,l,x,p,v,B,Ya,K,ma,Ha),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,K,Da),A.paintRight(c,l,x,p,v,B,Ya,K,Ha),A.lineSEInner(c,l,x,p,v,B,Ya,K,ma,Ha),A.paintRightInner(c,l,x,p,v,B,Xa,K,ma,Da,Ia),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),"double"==xa&&(A.moveSWInner(c,l,x,p,v,B,Za,K,ma,Fa),A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,K,Ia),A.paintBottom(c,l,x,p,v,B,Za,K,Fa),A.lineSWInner(c,l,x,p,v,B,Za,K,ma,Fa),
-A.paintBottomInner(c,l,x,p,v,B,Ya,K,ma,Ia,Ha),c.close(),c.fillAndStroke()):"frame"!=xa?(c.begin(),A.moveSW(c,l,x,p,v,B,Sa,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),"double"==xa&&(A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Da,Fa),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Sa,K,Ha),A.paintLeft(c,l,x,p,v,B,Sa,K,Da),A.lineNWInner(c,l,x,p,v,B,Sa,K,ma,Da,Fa),A.paintLeftInner(c,l,x,p,v,B,Za,K,ma,Ha,Fa),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,x,p,v,B,Sa,Xa,
-Ya,Za,K,Da,Ia,Ha,Fa);c.stroke()};za.prototype.moveNW=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,ha)};za.prototype.moveNE=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,0):c.moveTo(p-ha,0)};za.prototype.moveSE=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,v):c.moveTo(p,v-ha)};za.prototype.moveSW=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
-v):c.moveTo(ha,v)};za.prototype.paintNW=function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,ha,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ha,0);else c.lineTo(0,0)};za.prototype.paintTop=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,0):c.lineTo(p-ha,0)};za.prototype.paintNE=
-function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,p,ha)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,ha);else c.lineTo(p,0)};za.prototype.paintRight=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,v):c.lineTo(p,v-ha)};za.prototype.paintLeft=function(c,l,x,p,v,A,B,ha,K){"square"==
-B||"default"==B&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,ha)};za.prototype.paintSE=function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,p-ha,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-ha,v);else c.lineTo(p,v)};za.prototype.paintBottom=function(c,l,x,p,v,A,B,ha,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(0,
-v):c.lineTo(ha,v)};za.prototype.paintSW=function(c,l,x,p,v,A,B,ha,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ha,ha,0,0,l,0,v-ha)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-ha);else c.lineTo(0,v)};za.prototype.paintNWInner=function(c,l,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,K,.5*K+ha);else if("invRound"==
-B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,K,K+ha);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(K,.5*K+ha);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ha,K+ha),c.lineTo(K,K+ha)};za.prototype.paintTopInner=function(c,l,x,p,v,A,B,ha,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(0,K):xa&&!ma?c.lineTo(K,0):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ha+.5*K,K):c.lineTo(ha+K,K):c.lineTo(0,
-K):c.lineTo(0,0)};za.prototype.paintNEInner=function(c,l,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,p-ha-.5*K,K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,p-ha-K,K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-ha-.5*K,K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ha-K,ha+K),c.lineTo(p-ha-K,K)};za.prototype.paintRightInner=function(c,l,x,p,v,A,B,ha,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(p-K,0):xa&&!ma?c.lineTo(p,
-K):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ha+.5*K):c.lineTo(p-K,ha+K):c.lineTo(p-K,0):c.lineTo(p,0)};za.prototype.paintLeftInner=function(c,l,x,p,v,A,B,ha,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(K,v):xa&&!ma?c.lineTo(0,v-K):xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-ha-.5*K):c.lineTo(K,v-ha-K):
-c.lineTo(K,v):c.lineTo(0,v)};za.prototype.paintSEInner=function(c,l,x,p,v,A,B,ha,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,p-K,v-ha-.5*K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ha+K,ha+K,0,0,1,p-K,v-ha-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-K,v-ha-.5*K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ha-K,v-ha-K),c.lineTo(p-K,v-ha-K)};za.prototype.paintBottomInner=function(c,l,x,p,v,A,B,ha,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(p,
-v-K):xa&&!ma?c.lineTo(p-K,v):"square"==B||"default"==B&&"square"==A||!xa?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-ha-.5*K,v-K):c.lineTo(p-ha-K,v-K):c.lineTo(p,v)};za.prototype.paintSWInner=function(c,l,x,p,v,A,B,ha,K,xa){if(!xa)c.lineTo(K,v);else if("square"==B||"default"==B&&"square"==A)c.lineTo(K,v-K);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*K,ha-.5*K,0,0,0,ha+.5*K,v-K);else if("invRound"==B||"default"==B&&"invRound"==
-A)c.arcTo(ha+K,ha+K,0,0,1,ha+K,v-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ha+.5*K,v-K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+ha,v-ha-K),c.lineTo(K+ha,v-K)};za.prototype.moveSWInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(K,v-ha-K):
-c.moveTo(0,v-K)};za.prototype.lineSWInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,v-ha-K):c.lineTo(0,v-K)};za.prototype.moveSEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.moveTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,v-ha-K):c.moveTo(p-K,v)};za.prototype.lineSEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,v-ha-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,v-ha-K):
-c.lineTo(p-K,v)};za.prototype.moveNEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.moveTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,ha+K):c.moveTo(p,K)};za.prototype.lineNEInner=function(c,l,x,p,v,A,B,ha,K,xa){xa?"square"==B||"default"==B&&"square"==A||xa?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,ha+K):c.lineTo(p,K)};za.prototype.moveNWInner=function(c,l,x,p,v,A,B,ha,K,xa,ma){xa||ma?!xa&&ma?c.moveTo(K,0):xa&&!ma?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
-B&&"fold"==A)&&c.moveTo(K,ha+K):c.moveTo(0,0)};za.prototype.lineNWInner=function(c,l,x,p,v,A,B,ha,K,xa,ma){xa||ma?!xa&&ma?c.lineTo(K,0):xa&&!ma?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,ha+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,ha+K):c.lineTo(0,0)};za.prototype.paintFolds=function(c,l,x,p,v,A,B,ha,K,xa,ma,ab,jb,fb,Da){if("fold"==
-A||"fold"==B||"fold"==ha||"fold"==K||"fold"==xa)("fold"==B||"default"==B&&"fold"==A)&&ab&&Da&&(c.moveTo(0,ma),c.lineTo(ma,ma),c.lineTo(ma,0)),("fold"==ha||"default"==ha&&"fold"==A)&&ab&&jb&&(c.moveTo(p-ma,0),c.lineTo(p-ma,ma),c.lineTo(p,ma)),("fold"==K||"default"==K&&"fold"==A)&&fb&&jb&&(c.moveTo(p-ma,v),c.lineTo(p-ma,v-ma),c.lineTo(p,v-ma)),("fold"==xa||"default"==xa&&"fold"==A)&&fb&&Da&&(c.moveTo(0,v-ma),c.lineTo(ma,v-ma),c.lineTo(ma,v))};mxCellRenderer.registerShape(za.prototype.cst.RECT2,za);
-za.prototype.constraints=null;mxUtils.extend(Ka,mxConnector);Ka.prototype.origPaintEdgeShape=Ka.prototype.paintEdgeShape;Ka.prototype.paintEdgeShape=function(c,l,x){for(var p=[],v=0;v<l.length;v++)p.push(mxUtils.clone(l[v]));v=c.state.dashed;var A=c.state.fixDash;Ka.prototype.origPaintEdgeShape.apply(this,[c,p,x]);3<=c.state.strokeWidth&&(p=mxUtils.getValue(this.style,"fillColor",null),null!=p&&(c.setStrokeColor(p),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(v,A),Ka.prototype.origPaintEdgeShape.apply(this,
-[c,l,x])))};mxCellRenderer.registerShape("filledEdge",Ka);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==l.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,l,x,p,v,A,B,ha,K,xa){var ma=v*(B+K+1),ab=A*(B+K+1);return function(){c.begin();
-c.moveTo(p.x-ma/2-ab/2,p.y-ab/2+ma/2);c.lineTo(p.x+ab/2-3*ma/2,p.y-3*ab/2-ma/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,x,p,v,A,B,ha,K,xa){var ma=v*(B+K+1),ab=A*(B+K+1),jb=p.x+ma/2,fb=p.y+ab/2;p.x-=ma;p.y-=ab;return function(){c.begin();c.moveTo(jb-ma/2-ab/2,fb-ab/2+ma/2);c.lineTo(jb-ma/2+ab/2,fb-ab/2-ma/2);c.lineTo(jb+ab/2-3*ma/2,fb-3*ab/2-ma/2);c.lineTo(jb-ab/2-3*ma/2,fb-3*ab/2+ma/2);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,x,p,v,A,B,ha,K,
-xa){var ma=v*(B+K+1),ab=A*(B+K+1);return function(){c.begin();c.moveTo(p.x-ma/2-ab/2,p.y-ab/2+ma/2);c.lineTo(p.x+ab/2-3*ma/2,p.y-3*ab/2-ma/2);c.moveTo(p.x-ma/2+ab/2,p.y-ab/2-ma/2);c.lineTo(p.x-ab/2-3*ma/2,p.y-3*ab/2+ma/2);c.stroke()}});mxMarker.addMarker("circle",Ga);mxMarker.addMarker("circlePlus",function(c,l,x,p,v,A,B,ha,K,xa){var ma=p.clone(),ab=Ga.apply(this,arguments),jb=v*(B+2*K),fb=A*(B+2*K);return function(){ab.apply(this,arguments);c.begin();c.moveTo(ma.x-v*K,ma.y-A*K);c.lineTo(ma.x-2*jb+
-v*K,ma.y-2*fb+A*K);c.moveTo(ma.x-jb-fb+A*K,ma.y-fb+jb-v*K);c.lineTo(ma.x+fb-jb-A*K,ma.y-fb-jb+v*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,x,p,v,A,B,ha,K,xa){var ma=v*(B+K+1),ab=A*(B+K+1),jb=p.clone();p.x-=ma;p.y-=ab;return function(){c.begin();c.moveTo(jb.x-ab,jb.y+ma);c.quadTo(p.x-ab,p.y+ma,p.x,p.y);c.quadTo(p.x+ab,p.y-ma,jb.x+ab,jb.y-ma);c.stroke()}});mxMarker.addMarker("async",function(c,l,x,p,v,A,B,ha,K,xa){l=v*K*1.118;x=A*K*1.118;v*=B+K;A*=B+K;var ma=p.clone();ma.x-=l;ma.y-=
-x;p.x+=-v-l;p.y+=-A-x;return function(){c.begin();c.moveTo(ma.x,ma.y);ha?c.lineTo(ma.x-v-A/2,ma.y-A+v/2):c.lineTo(ma.x+A/2-v,ma.y-A-v/2);c.lineTo(ma.x-v,ma.y-A);c.close();xa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,x,p,v,A,B,ha,K,xa,ma){A*=ha+xa;B*=ha+xa;var ab=v.clone();return function(){l.begin();l.moveTo(ab.x,ab.y);K?l.lineTo(ab.x-A-B/c,ab.y-B+A/c):l.lineTo(ab.x+B/c-A,ab.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var eb=
-function(c,l,x){return hb(c,["width"],l,function(p,v,A,B,ha){ha=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ha/2,B.y+A*p/4-v*ha/2)},function(p,v,A,B,ha,K){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));c.style.width=Math.round(2*p)/c.view.scale-x})},hb=function(c,l,x,p,v){return gb(c,l,function(A){var B=c.absolutePoints,ha=B.length-1;A=c.view.translate;var K=c.view.scale,xa=x?B[0]:B[ha];B=x?B[1]:B[ha-1];ha=B.x-xa.x;var ma=B.y-xa.y,ab=Math.sqrt(ha*ha+ma*ma);xa=
-p.call(this,ab,ha/ab,ma/ab,xa,B);return new mxPoint(xa.x/K-A.x,xa.y/K-A.y)},function(A,B,ha){var K=c.absolutePoints,xa=K.length-1;A=c.view.translate;var ma=c.view.scale,ab=x?K[0]:K[xa];K=x?K[1]:K[xa-1];xa=K.x-ab.x;var jb=K.y-ab.y,fb=Math.sqrt(xa*xa+jb*jb);B.x=(B.x+A.x)*ma;B.y=(B.y+A.y)*ma;v.call(this,fb,xa/fb,jb/fb,ab,K,B,ha)})},tb=function(c){return function(l){return[gb(l,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",$a.prototype.arrowWidth))),
-v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",$a.prototype.arrowSize)));return new mxPoint(x.x+(1-v)*x.width,x.y+(1-p)*x.height/2)},function(x,p){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(x.y+x.height/2-p.y)/x.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(x.x+x.width-p.x)/x.width))})]}},vb=function(c){return function(l){return[gb(l,["size"],function(x){var p=Math.max(0,Math.min(.5*x.height,parseFloat(mxUtils.getValue(this.state.style,"size",
-c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},qb=function(c,l,x){return function(p){var v=[gb(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,
-!1)&&v.push(kb(p));return v}},Ab=function(c,l,x,p,v){x=null!=x?x:.5;return function(A){var B=[gb(A,["size"],function(ha){var K=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,xa=parseFloat(mxUtils.getValue(this.state.style,"size",K?v:c));return new mxPoint(ha.x+Math.max(0,Math.min(.5*ha.width,xa*(K?1:ha.width))),ha.getCenterY())},function(ha,K,xa){ha=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-ha.x:Math.max(0,Math.min(x,(K.x-ha.x)/ha.width));this.state.style.size=
-ha},!1,p)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(kb(A));return B}},Bb=function(c,l,x){c=null!=c?c:.5;return function(p){var v=[gb(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ha=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ha*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-
-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(kb(p));return v}},ub=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l}},kb=function(c,l){return gb(c,[mxConstants.STYLE_ARCSIZE],function(x){var p=null!=l?l:x.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
+Ib=Math.max(0,Math.min(50,K));A=ya.prototype;c.setDashed(bb);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Fb);K=Math.min(.5*v,.5*p,K);fa||(K=Ib*Math.min(p,v)/100);K=Math.min(K,.5*Math.min(p,v));fa||(ma=Math.min(eb*Math.min(p,v)/100));ma=Math.min(ma,.5*Math.min(p,v)-K);(Ea||Ja||Ia||Ha)&&"frame"!=wa&&(c.begin(),Ea?A.moveNW(c,l,x,p,v,B,Sa,K,Ha):c.moveTo(0,0),Ea&&A.paintNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),Ja&&A.paintNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),Ia&&
+A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),Ha&&A.paintSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),bb=fa=Hb,"none"==Cb&&(fa=0),"none"==Db&&(bb=0),c.setGradient(Cb,Db,0,0,p,v,Gb,fa,bb),c.begin(),Ea?A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Ea,Ha):c.moveTo(ma,0),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),Ha&&Ia&&A.paintSWInner(c,l,x,p,v,B,ab,K,ma,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),Ia&&Ja&&A.paintSEInner(c,
+l,x,p,v,B,Xa,K,ma),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),Ja&&Ea&&A.paintNEInner(c,l,x,p,v,B,Wa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),Ea&&Ha&&A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,l,x,p,v,B,Sa,Wa,Xa,ab,K,Ea,Ja,Ia,Ha),c.stroke()));Ea||Ja||Ia||!Ha?Ea||Ja||!Ia||Ha?!Ea&&!Ja&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.paintSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),"double"==
+wa&&(A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,ab,K,ma,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.paintSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),A.lineNWInner(c,l,x,p,v,B,Sa,K,ma,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,ab,K,ma,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),c.close(),
+c.fillAndStroke()):Ea||!Ja||Ia||Ha?!Ea&&Ja&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,Sa,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha)),c.stroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Sa,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,
+K,Ea),A.lineNWInner(c,l,x,p,v,B,Sa,K,ma,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),c.close(),c.fillAndStroke()):!Ea&&Ja&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),"double"==wa&&(A.moveSWInner(c,
+l,x,p,v,B,ab,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,ma),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja)),c.stroke()):(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.lineSWInner(c,l,x,p,v,B,ab,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,ma),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),c.close(),c.fillAndStroke()):!Ea&&
+Ja&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.paintSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,ab,K,ma,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,ma),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja)),c.stroke()):
+(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.paintSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),A.lineNWInner(c,l,x,p,v,B,Sa,K,ma,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,ab,K,ma,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,ma),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),c.close(),c.fillAndStroke()):!Ea||Ja||Ia||Ha?
+Ea&&!Ja&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),A.paintNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),A.paintNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,
+l,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),c.close(),c.fillAndStroke()):Ea&&!Ja&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea)),c.stroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,ab,
+K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.lineSWInner(c,l,x,p,v,B,ab,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),c.close(),c.fillAndStroke()):Ea&&!Ja&&Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,
+K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.paintSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),A.paintNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,ab,K,ma,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,
+x,p,v,B,ab,K,Ha),A.paintSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),A.paintNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),A.paintSWInner(c,l,x,p,v,B,ab,K,ma,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),c.close(),c.fillAndStroke()):Ea&&Ja&&!Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,
+l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,
+l,x,p,v,B,Wa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),c.close(),c.fillAndStroke()):Ea&&Ja&&!Ia&&Ha?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),A.paintNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),A.paintNWInner(c,
+l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),A.paintNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,
+v,B,ab,K,ma,Ia,Ha),c.close(),c.fillAndStroke()):Ea&&Ja&&Ia&&!Ha?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,ab,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,ma),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,ma),A.paintTopInner(c,
+l,x,p,v,B,Sa,K,ma,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.lineSWInner(c,l,x,p,v,B,ab,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,ma),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),c.close(),c.fillAndStroke()):
+Ea&&Ja&&Ia&&Ha&&("frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.paintSW(c,l,x,p,v,B,ab,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),c.close(),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,ab,K,ma,Ha),A.paintSWInner(c,l,x,p,v,B,ab,K,ma,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),A.paintSEInner(c,l,x,p,v,
+B,Xa,K,ma),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.paintNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.paintSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.paintSW(c,l,x,p,v,B,ab,K,Ia),
+A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),c.close(),A.moveSWInner(c,l,x,p,v,B,ab,K,ma,Ha),A.paintSWInner(c,l,x,p,v,B,ab,K,ma,Ia),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),A.paintSEInner(c,l,x,p,v,B,Xa,K,ma),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),A.paintNEInner(c,l,x,p,v,B,Wa,K,ma),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),A.paintNWInner(c,l,x,p,v,B,Sa,K,ma),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),c.close(),c.fillAndStroke())):"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,
+l,x,p,v,B,Wa,K,Ja),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Sa,K,Ha),A.paintTop(c,l,x,p,v,B,Wa,K,Ja),A.lineNEInner(c,l,x,p,v,B,Wa,K,ma,Ja),A.paintTopInner(c,l,x,p,v,B,Sa,K,ma,Ha,Ea),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja)),c.stroke()):
+(c.begin(),A.moveNE(c,l,x,p,v,B,Wa,K,Ea),A.paintRight(c,l,x,p,v,B,Xa,K,Ia),A.lineSEInner(c,l,x,p,v,B,Xa,K,ma,Ia),A.paintRightInner(c,l,x,p,v,B,Wa,K,ma,Ea,Ja),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,ab,K,ma,Ha),A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Xa,K,Ja),A.paintBottom(c,l,x,p,v,B,ab,K,Ha),A.lineSWInner(c,l,x,p,v,B,ab,K,ma,Ha),
+A.paintBottomInner(c,l,x,p,v,B,Xa,K,ma,Ja,Ia),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,Sa,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Sa,K,ma,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Sa,K,Ia),A.paintLeft(c,l,x,p,v,B,Sa,K,Ea),A.lineNWInner(c,l,x,p,v,B,Sa,K,ma,Ea,Ha),A.paintLeftInner(c,l,x,p,v,B,ab,K,ma,Ia,Ha),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,x,p,v,B,Sa,Wa,
+Xa,ab,K,Ea,Ja,Ia,Ha);c.stroke()};ya.prototype.moveNW=function(c,l,x,p,v,A,B,fa,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,0):c.moveTo(0,fa)};ya.prototype.moveNE=function(c,l,x,p,v,A,B,fa,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,0):c.moveTo(p-fa,0)};ya.prototype.moveSE=function(c,l,x,p,v,A,B,fa,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(p,v):c.moveTo(p,v-fa)};ya.prototype.moveSW=function(c,l,x,p,v,A,B,fa,K){"square"==B||"default"==B&&"square"==A||!K?c.moveTo(0,
+v):c.moveTo(fa,v)};ya.prototype.paintNW=function(c,l,x,p,v,A,B,fa,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(fa,fa,0,0,l,fa,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(fa,0);else c.lineTo(0,0)};ya.prototype.paintTop=function(c,l,x,p,v,A,B,fa,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,0):c.lineTo(p-fa,0)};ya.prototype.paintNE=
+function(c,l,x,p,v,A,B,fa,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(fa,fa,0,0,l,p,fa)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,fa);else c.lineTo(p,0)};ya.prototype.paintRight=function(c,l,x,p,v,A,B,fa,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(p,v):c.lineTo(p,v-fa)};ya.prototype.paintLeft=function(c,l,x,p,v,A,B,fa,K){"square"==
+B||"default"==B&&"square"==A||!K?c.lineTo(0,0):c.lineTo(0,fa)};ya.prototype.paintSE=function(c,l,x,p,v,A,B,fa,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(fa,fa,0,0,l,p-fa,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-fa,v);else c.lineTo(p,v)};ya.prototype.paintBottom=function(c,l,x,p,v,A,B,fa,K){"square"==B||"default"==B&&"square"==A||!K?c.lineTo(0,
+v):c.lineTo(fa,v)};ya.prototype.paintSW=function(c,l,x,p,v,A,B,fa,K){if(K)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(fa,fa,0,0,l,0,v-fa)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-fa);else c.lineTo(0,v)};ya.prototype.paintNWInner=function(c,l,x,p,v,A,B,fa,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(fa-.5*K,fa-.5*K,0,0,0,K,.5*K+fa);else if("invRound"==
+B||"default"==B&&"invRound"==A)c.arcTo(fa+K,fa+K,0,0,1,K,K+fa);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(K,.5*K+fa);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+fa,K+fa),c.lineTo(K,K+fa)};ya.prototype.paintTopInner=function(c,l,x,p,v,A,B,fa,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(0,K):wa&&!ma?c.lineTo(K,0):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(fa+.5*K,K):c.lineTo(fa+K,K):c.lineTo(0,
+K):c.lineTo(0,0)};ya.prototype.paintNEInner=function(c,l,x,p,v,A,B,fa,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(fa-.5*K,fa-.5*K,0,0,0,p-fa-.5*K,K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(fa+K,fa+K,0,0,1,p-fa-K,K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-fa-.5*K,K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-fa-K,fa+K),c.lineTo(p-fa-K,K)};ya.prototype.paintRightInner=function(c,l,x,p,v,A,B,fa,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(p-K,0):wa&&!ma?c.lineTo(p,
+K):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,fa+.5*K):c.lineTo(p-K,fa+K):c.lineTo(p-K,0):c.lineTo(p,0)};ya.prototype.paintLeftInner=function(c,l,x,p,v,A,B,fa,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,v):wa&&!ma?c.lineTo(0,v-K):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-fa-.5*K):c.lineTo(K,v-fa-K):
+c.lineTo(K,v):c.lineTo(0,v)};ya.prototype.paintSEInner=function(c,l,x,p,v,A,B,fa,K){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(fa-.5*K,fa-.5*K,0,0,0,p-K,v-fa-.5*K);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(fa+K,fa+K,0,0,1,p-K,v-fa-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-K,v-fa-.5*K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-fa-K,v-fa-K),c.lineTo(p-K,v-fa-K)};ya.prototype.paintBottomInner=function(c,l,x,p,v,A,B,fa,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(p,
+v-K):wa&&!ma?c.lineTo(p-K,v):"square"==B||"default"==B&&"square"==A||!wa?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-fa-.5*K,v-K):c.lineTo(p-fa-K,v-K):c.lineTo(p,v)};ya.prototype.paintSWInner=function(c,l,x,p,v,A,B,fa,K,wa){if(!wa)c.lineTo(K,v);else if("square"==B||"default"==B&&"square"==A)c.lineTo(K,v-K);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(fa-.5*K,fa-.5*K,0,0,0,fa+.5*K,v-K);else if("invRound"==B||"default"==B&&"invRound"==
+A)c.arcTo(fa+K,fa+K,0,0,1,fa+K,v-K);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(fa+.5*K,v-K);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(K+fa,v-fa-K),c.lineTo(K+fa,v-K)};ya.prototype.moveSWInner=function(c,l,x,p,v,A,B,fa,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,v-fa-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(K,v-fa-K):
+c.moveTo(0,v-K)};ya.prototype.lineSWInner=function(c,l,x,p,v,A,B,fa,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,v-fa-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,v-fa-K):c.lineTo(0,v-K)};ya.prototype.moveSEInner=function(c,l,x,p,v,A,B,fa,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,v-fa-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,v-fa-K):c.moveTo(p-K,v)};ya.prototype.lineSEInner=function(c,l,x,p,v,A,B,fa,K,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-K,v-K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,v-fa-.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,v-fa-K):
+c.lineTo(p-K,v)};ya.prototype.moveNEInner=function(c,l,x,p,v,A,B,fa,K,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.moveTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-K,fa+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-K,fa+K):c.moveTo(p,K)};ya.prototype.lineNEInner=function(c,l,x,p,v,A,B,fa,K,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.lineTo(p-K,K):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-K,fa+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-K,fa+K):c.lineTo(p,K)};ya.prototype.moveNWInner=function(c,l,x,p,v,A,B,fa,K,wa,ma){wa||ma?!wa&&ma?c.moveTo(K,0):wa&&!ma?c.moveTo(0,K):"square"==B||"default"==B&&"square"==A?c.moveTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(K,fa+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
+B&&"fold"==A)&&c.moveTo(K,fa+K):c.moveTo(0,0)};ya.prototype.lineNWInner=function(c,l,x,p,v,A,B,fa,K,wa,ma){wa||ma?!wa&&ma?c.lineTo(K,0):wa&&!ma?c.lineTo(0,K):"square"==B||"default"==B&&"square"==A?c.lineTo(K,K):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(K,fa+.5*K):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(K,fa+K):c.lineTo(0,0)};ya.prototype.paintFolds=function(c,l,x,p,v,A,B,fa,K,wa,ma,bb,jb,eb,Ea){if("fold"==
+A||"fold"==B||"fold"==fa||"fold"==K||"fold"==wa)("fold"==B||"default"==B&&"fold"==A)&&bb&&Ea&&(c.moveTo(0,ma),c.lineTo(ma,ma),c.lineTo(ma,0)),("fold"==fa||"default"==fa&&"fold"==A)&&bb&&jb&&(c.moveTo(p-ma,0),c.lineTo(p-ma,ma),c.lineTo(p,ma)),("fold"==K||"default"==K&&"fold"==A)&&eb&&jb&&(c.moveTo(p-ma,v),c.lineTo(p-ma,v-ma),c.lineTo(p,v-ma)),("fold"==wa||"default"==wa&&"fold"==A)&&eb&&Ea&&(c.moveTo(0,v-ma),c.lineTo(ma,v-ma),c.lineTo(ma,v))};mxCellRenderer.registerShape(ya.prototype.cst.RECT2,ya);
+ya.prototype.constraints=null;mxUtils.extend(Na,mxConnector);Na.prototype.origPaintEdgeShape=Na.prototype.paintEdgeShape;Na.prototype.paintEdgeShape=function(c,l,x){for(var p=[],v=0;v<l.length;v++)p.push(mxUtils.clone(l[v]));v=c.state.dashed;var A=c.state.fixDash;Na.prototype.origPaintEdgeShape.apply(this,[c,p,x]);3<=c.state.strokeWidth&&(p=mxUtils.getValue(this.style,"fillColor",null),null!=p&&(c.setStrokeColor(p),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(v,A),Na.prototype.origPaintEdgeShape.apply(this,
+[c,l,x])))};mxCellRenderer.registerShape("filledEdge",Na);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==l.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,l,x,p,v,A,B,fa,K,wa){var ma=v*(B+K+1),bb=A*(B+K+1);return function(){c.begin();
+c.moveTo(p.x-ma/2-bb/2,p.y-bb/2+ma/2);c.lineTo(p.x+bb/2-3*ma/2,p.y-3*bb/2-ma/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,x,p,v,A,B,fa,K,wa){var ma=v*(B+K+1),bb=A*(B+K+1),jb=p.x+ma/2,eb=p.y+bb/2;p.x-=ma;p.y-=bb;return function(){c.begin();c.moveTo(jb-ma/2-bb/2,eb-bb/2+ma/2);c.lineTo(jb-ma/2+bb/2,eb-bb/2-ma/2);c.lineTo(jb+bb/2-3*ma/2,eb-3*bb/2-ma/2);c.lineTo(jb-bb/2-3*ma/2,eb-3*bb/2+ma/2);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,x,p,v,A,B,fa,K,
+wa){var ma=v*(B+K+1),bb=A*(B+K+1);return function(){c.begin();c.moveTo(p.x-ma/2-bb/2,p.y-bb/2+ma/2);c.lineTo(p.x+bb/2-3*ma/2,p.y-3*bb/2-ma/2);c.moveTo(p.x-ma/2+bb/2,p.y-bb/2-ma/2);c.lineTo(p.x-bb/2-3*ma/2,p.y-3*bb/2+ma/2);c.stroke()}});mxMarker.addMarker("circle",Fa);mxMarker.addMarker("circlePlus",function(c,l,x,p,v,A,B,fa,K,wa){var ma=p.clone(),bb=Fa.apply(this,arguments),jb=v*(B+2*K),eb=A*(B+2*K);return function(){bb.apply(this,arguments);c.begin();c.moveTo(ma.x-v*K,ma.y-A*K);c.lineTo(ma.x-2*jb+
+v*K,ma.y-2*eb+A*K);c.moveTo(ma.x-jb-eb+A*K,ma.y-eb+jb-v*K);c.lineTo(ma.x+eb-jb-A*K,ma.y-eb-jb+v*K);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,x,p,v,A,B,fa,K,wa){var ma=v*(B+K+1),bb=A*(B+K+1),jb=p.clone();p.x-=ma;p.y-=bb;return function(){c.begin();c.moveTo(jb.x-bb,jb.y+ma);c.quadTo(p.x-bb,p.y+ma,p.x,p.y);c.quadTo(p.x+bb,p.y-ma,jb.x+bb,jb.y-ma);c.stroke()}});mxMarker.addMarker("async",function(c,l,x,p,v,A,B,fa,K,wa){l=v*K*1.118;x=A*K*1.118;v*=B+K;A*=B+K;var ma=p.clone();ma.x-=l;ma.y-=
+x;p.x+=-v-l;p.y+=-A-x;return function(){c.begin();c.moveTo(ma.x,ma.y);fa?c.lineTo(ma.x-v-A/2,ma.y-A+v/2):c.lineTo(ma.x+A/2-v,ma.y-A-v/2);c.lineTo(ma.x-v,ma.y-A);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,x,p,v,A,B,fa,K,wa,ma){A*=fa+wa;B*=fa+wa;var bb=v.clone();return function(){l.begin();l.moveTo(bb.x,bb.y);K?l.lineTo(bb.x-A-B/c,bb.y-B+A/c):l.lineTo(bb.x+B/c-A,bb.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var gb=
+function(c,l,x){return hb(c,["width"],l,function(p,v,A,B,fa){fa=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*fa/2,B.y+A*p/4-v*fa/2)},function(p,v,A,B,fa,K){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,fa.x,fa.y,K.x,K.y));c.style.width=Math.round(2*p)/c.view.scale-x})},hb=function(c,l,x,p,v){return ib(c,l,function(A){var B=c.absolutePoints,fa=B.length-1;A=c.view.translate;var K=c.view.scale,wa=x?B[0]:B[fa];B=x?B[1]:B[fa-1];fa=B.x-wa.x;var ma=B.y-wa.y,bb=Math.sqrt(fa*fa+ma*ma);wa=
+p.call(this,bb,fa/bb,ma/bb,wa,B);return new mxPoint(wa.x/K-A.x,wa.y/K-A.y)},function(A,B,fa){var K=c.absolutePoints,wa=K.length-1;A=c.view.translate;var ma=c.view.scale,bb=x?K[0]:K[wa];K=x?K[1]:K[wa-1];wa=K.x-bb.x;var jb=K.y-bb.y,eb=Math.sqrt(wa*wa+jb*jb);B.x=(B.x+A.x)*ma;B.y=(B.y+A.y)*ma;v.call(this,eb,wa/eb,jb/eb,bb,K,B,fa)})},ob=function(c){return function(l){return[ib(l,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",$a.prototype.arrowWidth))),
+v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",$a.prototype.arrowSize)));return new mxPoint(x.x+(1-v)*x.width,x.y+(1-p)*x.height/2)},function(x,p){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(x.y+x.height/2-p.y)/x.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(x.x+x.width-p.x)/x.width))})]}},vb=function(c){return function(l){return[ib(l,["size"],function(x){var p=Math.max(0,Math.min(.5*x.height,parseFloat(mxUtils.getValue(this.state.style,"size",
+c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},qb=function(c,l,x){return function(p){var v=[ib(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,
+!1)&&v.push(lb(p));return v}},Ab=function(c,l,x,p,v){x=null!=x?x:.5;return function(A){var B=[ib(A,["size"],function(fa){var K=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,wa=parseFloat(mxUtils.getValue(this.state.style,"size",K?v:c));return new mxPoint(fa.x+Math.max(0,Math.min(.5*fa.width,wa*(K?1:fa.width))),fa.getCenterY())},function(fa,K,wa){fa=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?K.x-fa.x:Math.max(0,Math.min(x,(K.x-fa.x)/fa.width));this.state.style.size=
+fa},!1,p)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(lb(A));return B}},Bb=function(c,l,x){c=null!=c?c:.5;return function(p){var v=[ib(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,fa=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,fa*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-
+A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(lb(p));return v}},tb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(lb(c));return l}},lb=function(c,l){return ib(c,[mxConstants.STYLE_ARCSIZE],function(x){var p=null!=l?l:x.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
mxConstants.LINE_ARCSIZE)/2;return new mxPoint(x.x+x.width-Math.min(x.width/2,v),x.y+p)}v=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(x.x+x.width-Math.min(Math.max(x.width/2,x.height/2),Math.min(x.width,x.height)*v),x.y+p)},function(x,p,v){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(x.width,2*(x.x+x.width-
-p.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(x.width-p.x+x.x)/Math.min(x.width,x.height))))})},gb=function(c,l,x,p,v,A,B){var ha=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ha.execute=function(xa){for(var ma=0;ma<l.length;ma++)this.copyStyle(l[ma]);B&&B(xa)};ha.getPosition=x;ha.setPosition=p;ha.ignoreGrid=null!=v?v:!0;if(A){var K=ha.positionChanged;ha.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);
-c.view.validate()}}return ha},lb={link:function(c){return[eb(c,!0,10),eb(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,x=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(hb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ha){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;
-return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),x.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ha){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
-5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(xa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(hb(c,
-["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ha){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);
-c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(xa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),
-x.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ha){p=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ha,K,xa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,
-B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(xa.getEvent())||mxEvent.isControlDown(xa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(xa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<
-l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return x},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var x=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(kb(c,x/2))}l.push(gb(c,[mxConstants.STYLE_STARTSIZE],function(p){var v=parseFloat(mxUtils.getValue(c.style,
+p.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(x.width-p.x+x.x)/Math.min(x.width,x.height))))})},ib=function(c,l,x,p,v,A,B){var fa=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);fa.execute=function(wa){for(var ma=0;ma<l.length;ma++)this.copyStyle(l[ma]);B&&B(wa)};fa.getPosition=x;fa.setPosition=p;fa.ignoreGrid=null!=v?v:!0;if(A){var K=fa.positionChanged;fa.positionChanged=function(){K.apply(this,arguments);c.view.invalidate(this.state.cell);
+c.view.validate()}}return fa},mb={link:function(c){return[gb(c,!0,10),gb(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,x=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(hb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,fa){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;fa=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;
+return new mxPoint(B.x+v*(fa+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(fa+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,fa,K,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,fa.x,fa.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
+c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),x.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,fa){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;fa=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
+5)*c.view.scale;return new mxPoint(B.x+v*(fa+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(fa+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,fa,K,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,fa.x,fa.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
+c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(hb(c,
+["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,fa){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;fa=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(fa+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(fa+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,fa,K,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,fa.x,fa.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,K.x,K.y);
+c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),
+x.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,fa){p=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;fa=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(fa+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(fa+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,fa,K,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,fa.x,fa.y,K.x,K.y));v=mxUtils.ptLineDist(B.x,
+B.y,B.x+A,B.y-v,K.x,K.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<
+l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return x},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var x=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(lb(c,x/2))}l.push(ib(c,[mxConstants.STYLE_STARTSIZE],function(p){var v=parseFloat(mxUtils.getValue(c.style,
mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(p.getCenterX(),p.y+Math.max(0,Math.min(p.height,v))):new mxPoint(p.x+Math.max(0,Math.min(p.width,v)),p.getCenterY())},function(p,v){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(p.height,v.y-p.y))):Math.round(Math.max(0,Math.min(p.width,v.x-p.x)))},!1,null,function(p){var v=
-c.view.graph;if(!mxEvent.isShiftDown(p.getEvent())&&!mxEvent.isControlDown(p.getEvent())&&(v.isTableRow(c.cell)||v.isTableCell(c.cell))){p=v.getSwimlaneDirection(c.style);var A=v.model.getParent(c.cell);A=v.model.getChildCells(A,!0);for(var B=[],ha=0;ha<A.length;ha++)A[ha]!=c.cell&&v.isSwimlane(A[ha])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[ha]))==p&&B.push(A[ha]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:ub(),ext:ub(),rectangle:ub(),
-triangle:ub(),rhombus:ub(),umlLifeline:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},umlFrame:function(c){return[gb(c,["width","height"],function(l){var x=Math.max(W.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",W.prototype.width))),
-p=Math.max(1.5*W.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",W.prototype.height)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.width=Math.round(Math.max(W.prototype.corner,Math.min(l.width,x.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*W.prototype.corner,Math.min(l.height,x.y-l.y)))},!1)]},process:function(c){var l=[gb(c,["size"],function(x){var p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,
-"size",ea.prototype.size));return p?new mxPoint(x.x+v,x.y+x.height/4):new mxPoint(x.x+x.width*v,x.y+x.height/4)},function(x,p){x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*x.width,p.x-x.x)):Math.max(0,Math.min(.5,(p.x-x.x)/x.width));this.state.style.size=x},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},cross:function(c){return[gb(c,["size"],function(l){var x=Math.min(l.width,l.height);x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"size",La.prototype.size)))*x/2;return new mxPoint(l.getCenterX()-x,l.getCenterY()-x)},function(l,x){var p=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-x.y)/p*2,Math.max(0,l.getCenterX()-x.x)/p*2)))})]},note:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=
-Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},note2:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},manualInput:function(c){var l=[gb(c,["size"],function(x){var p=
-Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Ta.prototype.size)));return new mxPoint(x.x+x.width/4,x.y+3*p/4)},function(x,p){this.state.style.size=Math.round(Math.max(0,Math.min(x.height,4*(p.y-x.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},dataStorage:function(c){return[gb(c,["size"],function(l){var x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",x?L.prototype.fixedSize:
-L.prototype.size));return new mxPoint(l.x+l.width-p*(x?1:l.width),l.getCenterY())},function(l,x){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-x.x)):Math.max(0,Math.min(1,(l.x+l.width-x.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[gb(c,["size","position"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"position",ja.prototype.position)));mxUtils.getValue(this.state.style,"base",ja.prototype.base);return new mxPoint(x.x+v*x.width,x.y+x.height-p)},function(x,p){mxUtils.getValue(this.state.style,"base",ja.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(x.height,x.y+x.height-p.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),gb(c,["position2"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ja.prototype.position2)));
-return new mxPoint(x.x+p*x.width,x.y+x.height)},function(x,p){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),gb(c,["base"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position))),A=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"base",ja.prototype.base)));return new mxPoint(x.x+Math.min(x.width,
-v*x.width+A),x.y+x.height-p)},function(x,p){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(x.width,p.x-x.x-v*x.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},internalStorage:function(c){var l=[gb(c,["dx","dy"],function(x){var p=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"dx",Va.prototype.dx))),v=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,
-"dy",Va.prototype.dy)));return new mxPoint(x.x+p,x.y+v)},function(x,p){this.state.style.dx=Math.round(Math.max(0,Math.min(x.width,p.x-x.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(x.height,p.y-x.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(kb(c));return l},module:function(c){return[gb(c,["jettyWidth","jettyHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",wa.prototype.jettyWidth))),p=Math.max(0,Math.min(l.height,
-mxUtils.getValue(this.state.style,"jettyHeight",wa.prototype.jettyHeight)));return new mxPoint(l.x+x/2,l.y+2*p)},function(l,x){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y))/2)})]},corner:function(c){return[gb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Ja.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,
-"dy",Ja.prototype.dy)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},tee:function(c){return[gb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Wa.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Wa.prototype.dy)));return new mxPoint(l.x+(l.width+x)/2,l.y+p)},function(l,
-x){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,x.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},singleArrow:tb(1),doubleArrow:tb(.5),folder:function(c){return[gb(c,["tabWidth","tabHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",C.prototype.tabWidth))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",C.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(x=l.width-x);return new mxPoint(l.x+x,l.y+p)},function(l,x){var p=Math.max(0,Math.min(l.width,x.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(p=l.width-p);this.state.style.tabWidth=Math.round(p);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},document:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",da.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},tape:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x*l.height/2)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(x.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[gb(c,
-["isoAngle"],function(l){var x=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",m.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(x),.5*l.height))},function(l,x){this.state.style.isoAngle=Math.max(0,50*(x.y-l.y)/l.height)},!0)]},cylinder2:vb(q.prototype.size),cylinder3:vb(y.prototype.size),offPageConnector:function(c){return[gb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ia.prototype.size))));
+c.view.graph;if(!mxEvent.isShiftDown(p.getEvent())&&!mxEvent.isControlDown(p.getEvent())&&(v.isTableRow(c.cell)||v.isTableCell(c.cell))){p=v.getSwimlaneDirection(c.style);var A=v.model.getParent(c.cell);A=v.model.getChildCells(A,!0);for(var B=[],fa=0;fa<A.length;fa++)A[fa]!=c.cell&&v.isSwimlane(A[fa])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[fa]))==p&&B.push(A[fa]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:tb(),ext:tb(),rectangle:tb(),
+triangle:tb(),rhombus:tb(),umlLifeline:function(c){return[ib(c,["size"],function(l){var x=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",N.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},umlFrame:function(c){return[ib(c,["width","height"],function(l){var x=Math.max(W.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",W.prototype.width))),
+p=Math.max(1.5*W.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",W.prototype.height)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.width=Math.round(Math.max(W.prototype.corner,Math.min(l.width,x.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*W.prototype.corner,Math.min(l.height,x.y-l.y)))},!1)]},process:function(c){var l=[ib(c,["size"],function(x){var p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,
+"size",ea.prototype.size));return p?new mxPoint(x.x+v,x.y+x.height/4):new mxPoint(x.x+x.width*v,x.y+x.height/4)},function(x,p){x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*x.width,p.x-x.x)):Math.max(0,Math.min(.5,(p.x-x.x)/x.width));this.state.style.size=x},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(lb(c));return l},cross:function(c){return[ib(c,["size"],function(l){var x=Math.min(l.width,l.height);x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",Ma.prototype.size)))*x/2;return new mxPoint(l.getCenterX()-x,l.getCenterY()-x)},function(l,x){var p=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-x.y)/p*2,Math.max(0,l.getCenterX()-x.x)/p*2)))})]},note:function(c){return[ib(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=
+Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},note2:function(c){return[ib(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},manualInput:function(c){var l=[ib(c,["size"],function(x){var p=
+Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Qa.prototype.size)));return new mxPoint(x.x+x.width/4,x.y+3*p/4)},function(x,p){this.state.style.size=Math.round(Math.max(0,Math.min(x.height,4*(p.y-x.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(lb(c));return l},dataStorage:function(c){return[ib(c,["size"],function(l){var x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",x?L.prototype.fixedSize:
+L.prototype.size));return new mxPoint(l.x+l.width-p*(x?1:l.width),l.getCenterY())},function(l,x){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-x.x)):Math.max(0,Math.min(1,(l.x+l.width-x.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[ib(c,["size","position"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"position",ja.prototype.position)));mxUtils.getValue(this.state.style,"base",ja.prototype.base);return new mxPoint(x.x+v*x.width,x.y+x.height-p)},function(x,p){mxUtils.getValue(this.state.style,"base",ja.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(x.height,x.y+x.height-p.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),ib(c,["position2"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ja.prototype.position2)));
+return new mxPoint(x.x+p*x.width,x.y+x.height)},function(x,p){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),ib(c,["base"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ja.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position))),A=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"base",ja.prototype.base)));return new mxPoint(x.x+Math.min(x.width,
+v*x.width+A),x.y+x.height-p)},function(x,p){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ja.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(x.width,p.x-x.x-v*x.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(lb(c));return l},internalStorage:function(c){var l=[ib(c,["dx","dy"],function(x){var p=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),v=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,
+"dy",Za.prototype.dy)));return new mxPoint(x.x+p,x.y+v)},function(x,p){this.state.style.dx=Math.round(Math.max(0,Math.min(x.width,p.x-x.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(x.height,p.y-x.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(lb(c));return l},module:function(c){return[ib(c,["jettyWidth","jettyHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",va.prototype.jettyWidth))),p=Math.max(0,Math.min(l.height,
+mxUtils.getValue(this.state.style,"jettyHeight",va.prototype.jettyHeight)));return new mxPoint(l.x+x/2,l.y+2*p)},function(l,x){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y))/2)})]},corner:function(c){return[ib(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",cb.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,
+"dy",cb.prototype.dy)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},tee:function(c){return[ib(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Ua.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",Ua.prototype.dy)));return new mxPoint(l.x+(l.width+x)/2,l.y+p)},function(l,
+x){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,x.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},singleArrow:ob(1),doubleArrow:ob(.5),folder:function(c){return[ib(c,["tabWidth","tabHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",C.prototype.tabWidth))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",C.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(x=l.width-x);return new mxPoint(l.x+x,l.y+p)},function(l,x){var p=Math.max(0,Math.min(l.width,x.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(p=l.width-p);this.state.style.tabWidth=Math.round(p);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},document:function(c){return[ib(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",da.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},tape:function(c){return[ib(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",aa.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x*l.height/2)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(x.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[ib(c,
+["isoAngle"],function(l){var x=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",m.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(x),.5*l.height))},function(l,x){this.state.style.isoAngle=Math.max(0,50*(x.y-l.y)/l.height)},!0)]},cylinder2:vb(q.prototype.size),cylinder3:vb(y.prototype.size),offPageConnector:function(c){return[ib(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ha.prototype.size))));
return new mxPoint(l.getCenterX(),l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(x){var p=Math.max(0,Math.min(x.width/2,x.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(x.x+p,x.y+p)},function(x,p){this.state.style.size=Math.round(100*Math.max(0,Math.min(x.height/2,x.width/2,p.x-x.x)))/100})];c=Graph.createHandle(c,
-["indent"],function(x){var p=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(x.x+.75*x.width,x.y+p*x.height/200)},function(x,p){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(p.y-x.y)/x.height)))/100});l.push(c);return l},step:Ab(U.prototype.size,!0,null,!0,U.prototype.fixedSize),hexagon:Ab(I.prototype.size,!0,.5,!0,I.prototype.fixedSize),curlyBracket:Ab(pa.prototype.size,!1),display:Ab(ua.prototype.size,!1),cube:qb(1,
-n.prototype.size,!1),card:qb(.5,G.prototype.size,!0),loopLimit:qb(.5,ca.prototype.size,!0),trapezoid:Bb(.5,Y.prototype.size,Y.prototype.fixedSize),parallelogram:Bb(1,ba.prototype.size,ba.prototype.fixedSize)};Graph.createHandle=gb;Graph.handleFactory=lb;var wb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=wb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
-null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=lb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=lb[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
-c=lb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var rb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);rb=mxUtils.getRotatedPoint(rb,Math.cos(zb),Math.sin(zb));var yb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,x,p,v){var A=c.view;p=null!=p&&0<p.length?p[0]:null;var B=c.absolutePoints,ha=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
-null==ha&&null!=l&&(ha=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var K=rb.x,xa=rb.y,ma=xb.x,ab=xb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ha){c=function(Da,Ia,Ha){Da-=fb.x;var Fa=Ia-fb.y;Ia=(ab*Da-ma*Fa)/(K*ab-xa*ma);Da=(xa*Da-K*Fa)/(xa*ma-K*ab);jb?(Ha&&(fb=new mxPoint(fb.x+K*Ia,fb.y+xa*Ia),v.push(fb)),fb=new mxPoint(fb.x+ma*Da,fb.y+ab*Da)):(Ha&&(fb=new mxPoint(fb.x+ma*Da,fb.y+ab*Da),v.push(fb)),
-fb=new mxPoint(fb.x+K*Ia,fb.y+xa*Ia));v.push(fb)};var fb=ha;null==p&&(p=new mxPoint(ha.x+(B.x-ha.x)/2,ha.y+(B.y-ha.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var ob=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return ob.apply(this,arguments)};t.prototype.constraints=[];E.prototype.getConstraints=
+["indent"],function(x){var p=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(x.x+.75*x.width,x.y+p*x.height/200)},function(x,p){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(p.y-x.y)/x.height)))/100});l.push(c);return l},step:Ab(U.prototype.size,!0,null,!0,U.prototype.fixedSize),hexagon:Ab(J.prototype.size,!0,.5,!0,J.prototype.fixedSize),curlyBracket:Ab(pa.prototype.size,!1),display:Ab(ua.prototype.size,!1),cube:qb(1,
+n.prototype.size,!1),card:qb(.5,G.prototype.size,!0),loopLimit:qb(.5,ca.prototype.size,!0),trapezoid:Bb(.5,Y.prototype.size,Y.prototype.fixedSize),parallelogram:Bb(1,ba.prototype.size,ba.prototype.fixedSize)};Graph.createHandle=ib;Graph.handleFactory=mb;var wb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=wb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
+null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=mb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=mb[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
+c=mb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var rb=new mxPoint(1,0),xb=new mxPoint(1,0),zb=mxUtils.toRadians(-30);rb=mxUtils.getRotatedPoint(rb,Math.cos(zb),Math.sin(zb));var yb=mxUtils.toRadians(-150);xb=mxUtils.getRotatedPoint(xb,Math.cos(yb),Math.sin(yb));mxEdgeStyle.IsometricConnector=function(c,l,x,p,v){var A=c.view;p=null!=p&&0<p.length?p[0]:null;var B=c.absolutePoints,fa=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
+null==fa&&null!=l&&(fa=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var K=rb.x,wa=rb.y,ma=xb.x,bb=xb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=fa){c=function(Ea,Ja,Ia){Ea-=eb.x;var Ha=Ja-eb.y;Ja=(bb*Ea-ma*Ha)/(K*bb-wa*ma);Ea=(wa*Ea-K*Ha)/(wa*ma-K*bb);jb?(Ia&&(eb=new mxPoint(eb.x+K*Ja,eb.y+wa*Ja),v.push(eb)),eb=new mxPoint(eb.x+ma*Ea,eb.y+bb*Ea)):(Ia&&(eb=new mxPoint(eb.x+ma*Ea,eb.y+bb*Ea),v.push(eb)),
+eb=new mxPoint(eb.x+K*Ja,eb.y+wa*Ja));v.push(eb)};var eb=fa;null==p&&(p=new mxPoint(fa.x+(B.x-fa.x)/2,fa.y+(B.y-fa.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var pb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return pb.apply(this,arguments)};t.prototype.constraints=[];E.prototype.getConstraints=
function(c,l,x){c=[];var p=Math.tan(mxUtils.toRadians(30)),v=(.5-p)/2;p=Math.min(l,x/(.5+p));l=(l-p)/2;x=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*p,x+p*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+p,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+p,x+.75*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*p,x+(1-v)*p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,x+.75*p));return c};m.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;p=Math.min(l*Math.tan(p),.5*x);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x-p));c.push(new mxConnectionConstraint(new mxPoint(.5,
1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));return c};ja.prototype.getConstraints=function(c,l,x){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var p=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=l*Math.max(0,
@@ -2897,14 +2897,14 @@ mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwim
function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Va.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;ra.prototype.constraints=mxEllipse.prototype.constraints;
-qa.prototype.constraints=mxEllipse.prototype.constraints;Qa.prototype.constraints=mxEllipse.prototype.constraints;Ta.prototype.constraints=mxRectangleShape.prototype.constraints;Ua.prototype.constraints=mxRectangleShape.prototype.constraints;ua.prototype.getConstraints=function(c,l,x){c=[];var p=Math.min(l,x/2),v=Math.min(l-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};wa.prototype.getConstraints=function(c,l,x){l=parseFloat(mxUtils.getValue(c,
-"jettyWidth",wa.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",wa.prototype.jettyHeight));var p=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Za.prototype.constraints=mxRectangleShape.prototype.constraints;L.prototype.constraints=mxRectangleShape.prototype.constraints;oa.prototype.constraints=mxEllipse.prototype.constraints;ra.prototype.constraints=mxEllipse.prototype.constraints;
+qa.prototype.constraints=mxEllipse.prototype.constraints;Oa.prototype.constraints=mxEllipse.prototype.constraints;Qa.prototype.constraints=mxRectangleShape.prototype.constraints;Ta.prototype.constraints=mxRectangleShape.prototype.constraints;ua.prototype.getConstraints=function(c,l,x){c=[];var p=Math.min(l,x/2),v=Math.min(l-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};va.prototype.getConstraints=function(c,l,x){l=parseFloat(mxUtils.getValue(c,
+"jettyWidth",va.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",va.prototype.jettyHeight));var p=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,3.5*c))];x>5*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));x>8*c&&p.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,l));x>15*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return p};ca.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
-.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!1,null,l));x>15*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return p};ca.prototype.constraints=mxRectangleShape.prototype.constraints;ha.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ia.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
+.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];Ba.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];F.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
@@ -2914,20 +2914,20 @@ qa.prototype.constraints=mxEllipse.prototype.constraints;Qa.prototype.constraint
.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];ba.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Wa.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;Ua.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,.5*(l+p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};Ja.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};cb.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return c};bb.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];$a.prototype.getConstraints=
+1),!1));return c};Ka.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];$a.prototype.getConstraints=
function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,
.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));return c};z.prototype.getConstraints=function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};La.prototype.getConstraints=
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};Ma.prototype.getConstraints=
function(c,l,x){c=[];var p=Math.min(x,l),v=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(x-v)/2;var A=p+v,B=(l-v)/2;v=B+v;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,v,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+v),p));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+v),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,p));return c};N.prototype.constraints=null;M.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];oa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+.9),!1)];S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
Actions.prototype.init=function(){function b(g){t.escape();g=t.deleteCells(t.getDeletableCells(t.getSelectionCells()),g);null!=g&&t.setSelectionCells(g)}function e(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{for(var g=t.getSelectionCells(),m=0;m<g.length;m++)t.cellLabelChanged(g[m],"")}finally{t.getModel().endUpdate()}}}function k(g,m,q,y,F){F.getModel().beginUpdate();try{var C=F.getCellGeometry(g);null!=C&&q&&y&&(q/=y,C=C.clone(),1<q?C.height=C.width/q:C.width=C.height*q,F.getModel().setGeometry(g,
C));F.setCellStyles(mxConstants.STYLE_CLIP_PATH,m,[g]);F.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[g])}finally{F.getModel().endUpdate()}}var n=this.editorUi,D=n.editor,t=D.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&t.isEnabled()};this.addAction("new...",function(){t.openLink(n.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";n.openFile()});this.addAction("smartFit",function(){t.popupMenuHandler.hideMenu();var g=t.view.scale,
@@ -3103,56 +3103,56 @@ IMAGE_PATH+"/img-lo-res.png";Editor.cameraImage="data:image/svg+xml;base64,PHN2Z
Editor.tagsImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGVuYWJsZS1iYWNrZ3JvdW5kPSJuZXcgMCAwIDI0IDI0IiBoZWlnaHQ9IjE4cHgiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE4cHgiIGZpbGw9IiMwMDAwMDAiPjxnPjxwYXRoIGQ9Ik0wLDBoMjR2MjRIMFYweiIgZmlsbD0ibm9uZSIvPjwvZz48Zz48Zz48cGF0aCBkPSJNMjEuNDEsMTEuNDFsLTguODMtOC44M0MxMi4yMSwyLjIxLDExLjcsMiwxMS4xNywySDRDMi45LDIsMiwyLjksMiw0djcuMTdjMCwwLjUzLDAuMjEsMS4wNCwwLjU5LDEuNDFsOC44Myw4LjgzIGMwLjc4LDAuNzgsMi4wNSwwLjc4LDIuODMsMGw3LjE3LTcuMTdDMjIuMiwxMy40NiwyMi4yLDEyLjIsMjEuNDEsMTEuNDF6IE0xMi44MywyMEw0LDExLjE3VjRoNy4xN0wyMCwxMi44M0wxMi44MywyMHoiLz48Y2lyY2xlIGN4PSI2LjUiIGN5PSI2LjUiIHI9IjEuNSIvPjwvZz48L2c+PC9zdmc+";
Editor.svgBrokenImage=Graph.createSvgImage(10,10,'<rect x="0" y="0" width="10" height="10" stroke="#000" fill="transparent"/><path d="m 0 0 L 10 10 L 0 10 L 10 0" stroke="#000" fill="transparent"/>');Editor.errorImage="data:image/gif;base64,R0lGODlhEAAQAPcAAADGAIQAAISEhP8AAP///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////yH5BAEAAAAALAAAAAAQABAAAAhoAAEIFBigYMGBCAkGGMCQ4cGECxtKHBAAYUQCEzFSHLiQgMeGHjEGEAAg4oCQJz86LCkxpEqHAkwyRClxpEyXGmGaREmTIsmOL1GO/DkzI0yOE2sKIMlRJsWhCQHENDiUaVSpS5cmDAgAOw==";
Editor.configurationKey=".configuration";Editor.settingsKey=".drawio-config";Editor.defaultCustomLibraries=[];Editor.enableCustomLibraries=!0;Editor.enableCustomProperties=!0;Editor.defaultIncludeDiagram=!0;Editor.enableServiceWorker="0"!=urlParams.pwa&&"serviceWorker"in navigator&&("1"==urlParams.offline||/.*\.diagrams\.net$/.test(window.location.hostname)||/.*\.draw\.io$/.test(window.location.hostname));Editor.enableWebFonts="1"!=urlParams["safe-style-src"];Editor.enableShadowOption=!mxClient.IS_SF;
-Editor.enableExportUrl=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(u){u.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"enumerate","0")}},
-{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(u,J){return"1"!=mxUtils.getValue(u.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"comic","0")||"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},
-{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,
-"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(u,
-J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",
-type:"int",defVal:-1,isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(u,J){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
+Editor.enableExportUrl=!0;Editor.compressXml=!0;Editor.oneDriveInlinePicker=null!=window.urlParams&&"0"==window.urlParams.inlinePicker?!1:!0;Editor.globalVars=null;Editor.config=null;Editor.configVersion=null;Editor.defaultBorder=5;Editor.commonProperties=[{name:"enumerate",dispName:"Enumerate",type:"bool",defVal:!1,onChange:function(u){u.refresh()}},{name:"enumerateValue",dispName:"Enumerate Value",type:"string",defVal:"",isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"enumerate","0")}},
+{name:"comic",dispName:"Comic",type:"bool",defVal:!1,isVisible:function(u,I){return"1"!=mxUtils.getValue(u.style,"sketch","0")}},{name:"jiggle",dispName:"Jiggle",type:"float",min:0,defVal:1,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"comic","0")||"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"fillWeight",dispName:"Fill Weight",type:"int",defVal:-1,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},
+{name:"hachureGap",dispName:"Hachure Gap",type:"int",defVal:-1,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"hachureAngle",dispName:"Hachure Angle",type:"int",defVal:-41,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"curveFitting",dispName:"Curve Fitting",type:"float",defVal:.95,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,
+"sketch","1"==urlParams.rough?"1":"0")}},{name:"simplification",dispName:"Simplification",type:"float",defVal:0,min:0,max:1,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStroke",dispName:"Disable Multi Stroke",type:"bool",defVal:!1,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}},{name:"disableMultiStrokeFill",dispName:"Disable Multi Stroke Fill",type:"bool",defVal:!1,isVisible:function(u,
+I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"dashOffset",dispName:"Dash Offset",type:"int",defVal:-1,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"dashGap",dispName:"Dash Gap",type:"int",defVal:-1,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"zigzagOffset",dispName:"ZigZag Offset",
+type:"int",defVal:-1,isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")&&0<u.vertices.length}},{name:"sketchStyle",dispName:"Sketch Style",type:"enum",defVal:"rough",enumList:[{val:"rough",dispName:"Rough"},{val:"comic",dispName:"Comic"}],isVisible:function(u,I){return"1"==mxUtils.getValue(u.style,"sketch","1"==urlParams.rough?"1":"0")}}];Editor.commonEdgeProperties=[{type:"separator"},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
{name:"sourcePortConstraint",dispName:"Source Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"targetPortConstraint",dispName:"Target Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"jettySize",
dispName:"Jetty Size",type:"int",min:0,defVal:"auto",allowAuto:!0,isVisible:function(u){return"orthogonalEdgeStyle"==mxUtils.getValue(u.style,mxConstants.STYLE_EDGE,null)}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"startFill",dispName:"Start Fill",type:"bool",defVal:!0},{name:"endFill",dispName:"End Fill",type:"bool",defVal:!0},{name:"perimeterSpacing",dispName:"Terminal Spacing",
type:"float",defVal:0},{name:"anchorPointDirection",dispName:"Anchor Direction",type:"bool",defVal:!0},{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"bendable",dispName:"Bendable",type:"bool",defVal:!0},{name:"movable",
dispName:"Movable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"noJump",dispName:"No Jumps",type:"bool",defVal:!1},{name:"flowAnimation",dispName:"Flow Animation",type:"bool",defVal:!1},{name:"ignoreEdge",dispName:"Ignore Edge",type:"bool",defVal:!1},{name:"orthogonalLoop",dispName:"Loop Routing",type:"bool",defVal:!1},{name:"orthogonal",dispName:"Orthogonal",type:"bool",defVal:!1}].concat(Editor.commonProperties);
-Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(u,J){J=J.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&J.isTableCell(u.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(u,J){J=J.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&J.isTableCell(u.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(u,
-J){u=J.editorUi.editor.graph.getCellStyle(1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null);return"1"==mxUtils.getValue(u,"resizeLastRow","0")},isVisible:function(u,J){J=J.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&J.isTable(u.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(u,J){u=J.editorUi.editor.graph.getCellStyle(1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null);return"1"==mxUtils.getValue(u,"resizeLast",
-"0")},isVisible:function(u,J){J=J.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&J.isTable(u.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},
+Editor.commonVertexProperties=[{name:"colspan",dispName:"Colspan",type:"int",min:1,defVal:1,isVisible:function(u,I){I=I.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&I.isTableCell(u.vertices[0])}},{name:"rowspan",dispName:"Rowspan",type:"int",min:1,defVal:1,isVisible:function(u,I){I=I.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&I.isTableCell(u.vertices[0])}},{type:"separator"},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",getDefaultValue:function(u,
+I){u=I.editorUi.editor.graph.getCellStyle(1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null);return"1"==mxUtils.getValue(u,"resizeLastRow","0")},isVisible:function(u,I){I=I.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&I.isTable(u.vertices[0])}},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",getDefaultValue:function(u,I){u=I.editorUi.editor.graph.getCellStyle(1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null);return"1"==mxUtils.getValue(u,"resizeLast",
+"0")},isVisible:function(u,I){I=I.editorUi.editor.graph;return 1==u.vertices.length&&0==u.edges.length&&I.isTable(u.vertices[0])}},{name:"fillOpacity",dispName:"Fill Opacity",type:"int",min:0,max:100,defVal:100},{name:"strokeOpacity",dispName:"Stroke Opacity",type:"int",min:0,max:100,defVal:100},{name:"overflow",dispName:"Text Overflow",defVal:"visible",type:"enum",enumList:[{val:"visible",dispName:"Visible"},{val:"hidden",dispName:"Hidden"},{val:"block",dispName:"Block"},{val:"fill",dispName:"Fill"},
{val:"width",dispName:"Width"}]},{name:"noLabel",dispName:"Hide Label",type:"bool",defVal:!1},{name:"labelPadding",dispName:"Label Padding",type:"float",defVal:0},{name:"direction",dispName:"Direction",type:"enum",defVal:"east",enumList:[{val:"north",dispName:"North"},{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraint",dispName:"Constraint",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"None"},{val:"north",dispName:"North"},
-{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(u,J){return J.editorUi.editor.graph.isCellConnectable(0<u.vertices.length&&0==u.edges.length?u.vertices[0]:null)},isVisible:function(u,J){return 0<u.vertices.length&&0==u.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
+{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(u,I){return I.editorUi.editor.graph.isCellConnectable(0<u.vertices.length&&0==u.edges.length?u.vertices[0]:null)},isVisible:function(u,I){return 0<u.vertices.length&&0==u.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",
-dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(u,J){return 1==u.vertices.length&&0==u.edges.length}},
-{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(u,J){u=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;J=J.editorUi.editor.graph;return null!=u&&(J.isSwimlane(u)||0<J.model.getChildCount(u))},isVisible:function(u,J){return 1==u.vertices.length&&0==u.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(u,J){var N=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;J=J.editorUi.editor.graph;return null!=N&&(J.isContainer(N)&&
-"0"!=u.style.collapsible||!J.isContainer(N)&&"1"==u.style.collapsible)},isVisible:function(u,J){return 1==u.vertices.length&&0==u.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(u,J){return 1==u.vertices.length&&0==u.edges.length&&!J.editorUi.editor.graph.isSwimlane(u.vertices[0])&&null==mxUtils.getValue(u.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,
-isVisible:function(u,J){J=J.editorUi.editor.graph.model;return 0<u.vertices.length?J.isVertex(J.getParent(u.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(u,J){u=0<u.vertices.length?
-J.editorUi.editor.graph.getCellGeometry(u.vertices[0]):null;return null!=u&&!u.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",
-type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(u,J){var N=mxUtils.getValue(u.style,mxConstants.STYLE_FILLCOLOR,null);return J.editorUi.editor.graph.isSwimlane(u.vertices[0])||null==N||N==mxConstants.NONE||0==mxUtils.getValue(u.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(u.style,mxConstants.STYLE_OPACITY,100)||null!=u.style.pointerEvents}},{name:"moveCells",
-dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(u,J){return 0<u.vertices.length&&J.editorUi.editor.graph.isContainer(u.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(u){var J=rough.canvas({getContext:function(){return u}});J.draw=function(N){var W=N.sets||[];N=N.options||this.getDefaultOptions();for(var T=0;T<W.length;T++){var Q=W[T];switch(Q.type){case "path":null!=N.stroke&&this._drawToContext(u,Q,N);break;case "fillPath":this._drawToContext(u,Q,N);break;case "fillSketch":this.fillSketch(u,Q,N)}}};J.fillSketch=function(N,W,T){var Q=u.state.strokeColor,Z=u.state.strokeWidth,oa=u.state.strokeAlpha,wa=u.state.dashed,Aa=T.fillWeight;
-0>Aa&&(Aa=T.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(T.fill||"");u.setStrokeWidth(Aa);u.setDashed(!1);this._drawToContext(N,W,T);u.setDashed(wa);u.setStrokeWidth(Z);u.setStrokeColor(Q);u.setStrokeAlpha(oa)};J._drawToContext=function(N,W,T){N.begin();for(var Q=0;Q<W.ops.length;Q++){var Z=W.ops[Q],oa=Z.data;switch(Z.op){case "move":N.moveTo(oa[0],oa[1]);break;case "bcurveTo":N.curveTo(oa[0],oa[1],oa[2],oa[3],oa[4],oa[5]);break;case "lineTo":N.lineTo(oa[0],oa[1])}}N.end();
-"fillPath"===W.type&&T.filled?N.fill():N.stroke()};return J};(function(){function u(Q,Z,oa){this.canvas=Q;this.rc=Z;this.shape=oa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,u.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,u.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,u.prototype.rect);this.originalRoundrect=this.canvas.roundrect;
+dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(u,I){return 1==u.vertices.length&&0==u.edges.length}},
+{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(u,I){u=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;I=I.editorUi.editor.graph;return null!=u&&(I.isSwimlane(u)||0<I.model.getChildCount(u))},isVisible:function(u,I){return 1==u.vertices.length&&0==u.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(u,I){var N=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;I=I.editorUi.editor.graph;return null!=N&&(I.isContainer(N)&&
+"0"!=u.style.collapsible||!I.isContainer(N)&&"1"==u.style.collapsible)},isVisible:function(u,I){return 1==u.vertices.length&&0==u.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(u,I){return 1==u.vertices.length&&0==u.edges.length&&!I.editorUi.editor.graph.isSwimlane(u.vertices[0])&&null==mxUtils.getValue(u.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,
+isVisible:function(u,I){I=I.editorUi.editor.graph.model;return 0<u.vertices.length?I.isVertex(I.getParent(u.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(u,I){u=0<u.vertices.length?
+I.editorUi.editor.graph.getCellGeometry(u.vertices[0]):null;return null!=u&&!u.relative}},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},{name:"treeFolding",dispName:"Tree Folding",
+type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(u,I){var N=mxUtils.getValue(u.style,mxConstants.STYLE_FILLCOLOR,null);return I.editorUi.editor.graph.isSwimlane(u.vertices[0])||null==N||N==mxConstants.NONE||0==mxUtils.getValue(u.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(u.style,mxConstants.STYLE_OPACITY,100)||null!=u.style.pointerEvents}},{name:"moveCells",
+dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(u,I){return 0<u.vertices.length&&I.editorUi.editor.graph.isContainer(u.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
+Editor.createRoughCanvas=function(u){var I=rough.canvas({getContext:function(){return u}});I.draw=function(N){var W=N.sets||[];N=N.options||this.getDefaultOptions();for(var T=0;T<W.length;T++){var Q=W[T];switch(Q.type){case "path":null!=N.stroke&&this._drawToContext(u,Q,N);break;case "fillPath":this._drawToContext(u,Q,N);break;case "fillSketch":this.fillSketch(u,Q,N)}}};I.fillSketch=function(N,W,T){var Q=u.state.strokeColor,Z=u.state.strokeWidth,na=u.state.strokeAlpha,va=u.state.dashed,Ba=T.fillWeight;
+0>Ba&&(Ba=T.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(T.fill||"");u.setStrokeWidth(Ba);u.setDashed(!1);this._drawToContext(N,W,T);u.setDashed(va);u.setStrokeWidth(Z);u.setStrokeColor(Q);u.setStrokeAlpha(na)};I._drawToContext=function(N,W,T){N.begin();for(var Q=0;Q<W.ops.length;Q++){var Z=W.ops[Q],na=Z.data;switch(Z.op){case "move":N.moveTo(na[0],na[1]);break;case "bcurveTo":N.curveTo(na[0],na[1],na[2],na[3],na[4],na[5]);break;case "lineTo":N.lineTo(na[0],na[1])}}N.end();
+"fillPath"===W.type&&T.filled?N.fill():N.stroke()};return I};(function(){function u(Q,Z,na){this.canvas=Q;this.rc=Z;this.shape=na;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,u.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,u.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,u.prototype.rect);this.originalRoundrect=this.canvas.roundrect;
this.canvas.roundrect=mxUtils.bind(this,u.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,u.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,u.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,u.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,u.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
mxUtils.bind(this,u.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,u.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,u.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,u.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,u.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=mxUtils.bind(this,
-u.prototype.fillAndStroke);this.path=[];this.passThrough=!1}u.prototype.moveOp="M";u.prototype.lineOp="L";u.prototype.quadOp="Q";u.prototype.curveOp="C";u.prototype.closeOp="Z";u.prototype.getStyle=function(Q,Z){var oa=1;if(null!=this.shape.state){var wa=this.shape.state.cell.id;if(null!=wa)for(var Aa=0;Aa<wa.length;Aa++)oa=(oa<<5)-oa+wa.charCodeAt(Aa)<<0}oa={strokeWidth:this.canvas.state.strokeWidth,seed:oa,preserveVertices:!0};wa=this.rc.getDefaultOptions();oa.stroke=Q?this.canvas.state.strokeColor===
-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;Q=null;(oa.filled=Z)?(oa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Q=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):oa.fill="";oa.bowing=mxUtils.getValue(this.shape.style,"bowing",wa.bowing);oa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",wa.hachureAngle);oa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",wa.curveFitting);
-oa.roughness=mxUtils.getValue(this.shape.style,"jiggle",wa.roughness);oa.simplification=mxUtils.getValue(this.shape.style,"simplification",wa.simplification);oa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",wa.disableMultiStroke);oa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",wa.disableMultiStrokeFill);Z=mxUtils.getValue(this.shape.style,"hachureGap",-1);oa.hachureGap="auto"==Z?-1:Z;oa.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
-Z);oa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",Z);oa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",Z);Z=mxUtils.getValue(this.shape.style,"fillWeight",-1);oa.fillWeight="auto"==Z?-1:Z;Z=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==Z&&(Z=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),Z=null!=oa.fill&&(null!=Q||null!=Z&&oa.fill==Z)?"solid":wa.fillStyle);oa.fillStyle=
-Z;return oa};u.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};u.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};u.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Q=2;Q<arguments.length;Q+=2)this.lastX=arguments[Q-1],this.lastY=arguments[Q],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};u.prototype.lineTo=
-function(Q,Z){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,Q,Z),this.lastX=Q,this.lastY=Z)};u.prototype.moveTo=function(Q,Z){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,Z),this.lastX=Q,this.lastY=Z,this.firstX=Q,this.firstY=Z)};u.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};u.prototype.quadTo=function(Q,Z,oa,wa){this.passThrough?this.originalQuadTo.apply(this.canvas,
-arguments):(this.addOp(this.quadOp,Q,Z,oa,wa),this.lastX=oa,this.lastY=wa)};u.prototype.curveTo=function(Q,Z,oa,wa,Aa,ta){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,Z,oa,wa,Aa,ta),this.lastX=Aa,this.lastY=ta)};u.prototype.arcTo=function(Q,Z,oa,wa,Aa,ta,Ba){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var va=mxUtils.arcToCurves(this.lastX,this.lastY,Q,Z,oa,wa,Aa,ta,Ba);if(null!=va)for(var Oa=0;Oa<va.length;Oa+=6)this.curveTo(va[Oa],
-va[Oa+1],va[Oa+2],va[Oa+3],va[Oa+4],va[Oa+5]);this.lastX=ta;this.lastY=Ba}};u.prototype.rect=function(Q,Z,oa,wa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,Z,oa,wa,this.getStyle(!0,!0)))};u.prototype.ellipse=function(Q,Z,oa,wa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+oa/2,Z+wa/2,oa,wa,this.getStyle(!0,!0)))};u.prototype.roundrect=function(Q,
-Z,oa,wa,Aa,ta){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(Q+Aa,Z),this.lineTo(Q+oa-Aa,Z),this.quadTo(Q+oa,Z,Q+oa,Z+ta),this.lineTo(Q+oa,Z+wa-ta),this.quadTo(Q+oa,Z+wa,Q+oa-Aa,Z+wa),this.lineTo(Q+Aa,Z+wa),this.quadTo(Q,Z+wa,Q,Z+wa-ta),this.lineTo(Q,Z+ta),this.quadTo(Q,Z,Q+Aa,Z))};u.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(oa){}this.passThrough=!1}else if(null!=this.nextShape){for(var Z in Q)this.nextShape.options[Z]=
+u.prototype.fillAndStroke);this.path=[];this.passThrough=!1}u.prototype.moveOp="M";u.prototype.lineOp="L";u.prototype.quadOp="Q";u.prototype.curveOp="C";u.prototype.closeOp="Z";u.prototype.getStyle=function(Q,Z){var na=1;if(null!=this.shape.state){var va=this.shape.state.cell.id;if(null!=va)for(var Ba=0;Ba<va.length;Ba++)na=(na<<5)-na+va.charCodeAt(Ba)<<0}na={strokeWidth:this.canvas.state.strokeWidth,seed:na,preserveVertices:!0};va=this.rc.getDefaultOptions();na.stroke=Q?this.canvas.state.strokeColor===
+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;Q=null;(na.filled=Z)?(na.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,Q=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):na.fill="";na.bowing=mxUtils.getValue(this.shape.style,"bowing",va.bowing);na.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",va.hachureAngle);na.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",va.curveFitting);
+na.roughness=mxUtils.getValue(this.shape.style,"jiggle",va.roughness);na.simplification=mxUtils.getValue(this.shape.style,"simplification",va.simplification);na.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",va.disableMultiStroke);na.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",va.disableMultiStrokeFill);Z=mxUtils.getValue(this.shape.style,"hachureGap",-1);na.hachureGap="auto"==Z?-1:Z;na.dashGap=mxUtils.getValue(this.shape.style,"dashGap",
+Z);na.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",Z);na.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",Z);Z=mxUtils.getValue(this.shape.style,"fillWeight",-1);na.fillWeight="auto"==Z?-1:Z;Z=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==Z&&(Z=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),Z=null!=na.fill&&(null!=Q||null!=Z&&na.fill==Z)?"solid":va.fillStyle);na.fillStyle=
+Z;return na};u.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};u.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};u.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var Q=2;Q<arguments.length;Q+=2)this.lastX=arguments[Q-1],this.lastY=arguments[Q],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};u.prototype.lineTo=
+function(Q,Z){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,Q,Z),this.lastX=Q,this.lastY=Z)};u.prototype.moveTo=function(Q,Z){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,Q,Z),this.lastX=Q,this.lastY=Z,this.firstX=Q,this.firstY=Z)};u.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};u.prototype.quadTo=function(Q,Z,na,va){this.passThrough?this.originalQuadTo.apply(this.canvas,
+arguments):(this.addOp(this.quadOp,Q,Z,na,va),this.lastX=na,this.lastY=va)};u.prototype.curveTo=function(Q,Z,na,va,Ba,sa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,Q,Z,na,va,Ba,sa),this.lastX=Ba,this.lastY=sa)};u.prototype.arcTo=function(Q,Z,na,va,Ba,sa,Da){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Aa=mxUtils.arcToCurves(this.lastX,this.lastY,Q,Z,na,va,Ba,sa,Da);if(null!=Aa)for(var za=0;za<Aa.length;za+=6)this.curveTo(Aa[za],
+Aa[za+1],Aa[za+2],Aa[za+3],Aa[za+4],Aa[za+5]);this.lastX=sa;this.lastY=Da}};u.prototype.rect=function(Q,Z,na,va){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(Q,Z,na,va,this.getStyle(!0,!0)))};u.prototype.ellipse=function(Q,Z,na,va){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(Q+na/2,Z+va/2,na,va,this.getStyle(!0,!0)))};u.prototype.roundrect=function(Q,
+Z,na,va,Ba,sa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(Q+Ba,Z),this.lineTo(Q+na-Ba,Z),this.quadTo(Q+na,Z,Q+na,Z+sa),this.lineTo(Q+na,Z+va-sa),this.quadTo(Q+na,Z+va,Q+na-Ba,Z+va),this.lineTo(Q+Ba,Z+va),this.quadTo(Q,Z+va,Q,Z+va-sa),this.lineTo(Q,Z+sa),this.quadTo(Q,Z,Q+Ba,Z))};u.prototype.drawPath=function(Q){if(0<this.path.length){this.passThrough=!0;try{this.rc.path(this.path.join(" "),Q)}catch(na){}this.passThrough=!1}else if(null!=this.nextShape){for(var Z in Q)this.nextShape.options[Z]=
Q[Z];Q.stroke!=mxConstants.NONE&&null!=Q.stroke||delete this.nextShape.options.stroke;Q.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};u.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};u.prototype.fill=function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};u.prototype.fillAndStroke=function(){this.passThrough?
this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};u.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;
-this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new u(Q,Editor.createRoughCanvas(Q),this)};var J=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?J.apply(this,arguments):"comic"==mxUtils.getValue(this.style,
-"sketchStyle","rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var N=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,Z,oa,wa,Aa){null!=Q.handJiggle&&Q.handJiggle.passThrough||N.apply(this,arguments)};var W=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var Z=Q.addTolerance,oa=!0;null!=this.style&&(oa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==u&&!this.outline){Q.save();
-var wa=this.fill,Aa=this.stroke;this.stroke=this.fill=null;var ta=this.configurePointerEvents,Ba=Q.setStrokeColor;Q.setStrokeColor=function(){};var va=Q.setFillColor;Q.setFillColor=function(){};oa||null==wa||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;W.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=va;Q.setStrokeColor=Ba;this.configurePointerEvents=ta;this.stroke=Aa;this.fill=wa;Q.restore();oa&&null!=wa&&(Q.addTolerance=function(){})}W.apply(this,arguments);
-Q.addTolerance=Z};var T=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,Z,oa,wa,Aa,ta){null!=Q.handJiggle&&Q.handJiggle.constructor==u?(Q.handJiggle.passThrough=!0,T.apply(this,arguments),Q.handJiggle.passThrough=!1):T.apply(this,arguments)}})();Editor.fastCompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:Graph.arrayBufferToString(pako.deflateRaw(u))};Editor.fastDecompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?
-u:pako.inflateRaw(Graph.stringToArrayBuffer(atob(u)),{to:"string"})};Editor.extractGraphModel=function(u,J,N){if(null!=u&&"undefined"!==typeof pako){var W=u.ownerDocument.getElementsByTagName("div"),T=[];if(null!=W&&0<W.length)for(var Q=0;Q<W.length;Q++)if("mxgraph"==W[Q].getAttribute("class")){T.push(W[Q]);break}0<T.length&&(W=T[0].getAttribute("data-mxgraph"),null!=W?(T=JSON.parse(W),null!=T&&null!=T.xml&&(u=mxUtils.parseXml(T.xml),u=u.documentElement)):(T=T[0].getElementsByTagName("div"),0<T.length&&
-(W=mxUtils.getTextContent(T[0]),W=Graph.decompress(W,null,N),0<W.length&&(u=mxUtils.parseXml(W),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(W=u.getAttribute("content"),null!=W&&"<"!=W.charAt(0)&&"%"!=W.charAt(0)&&(W=unescape(window.atob?atob(W):Base64.decode(cont,W))),null!=W&&"%"==W.charAt(0)&&(W=decodeURIComponent(W)),null!=W&&0<W.length)u=mxUtils.parseXml(W).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||J||(T=null,"diagram"==u.nodeName?T=u:"mxfile"==
-u.nodeName&&(W=u.getElementsByTagName("diagram"),0<W.length&&(T=W[Math.max(0,Math.min(W.length-1,urlParams.page||0))])),null!=T&&(u=Editor.parseDiagramNode(T,N)));null==u||"mxGraphModel"==u.nodeName||J&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,J){var N=mxUtils.trim(mxUtils.getTextContent(u)),W=null;0<N.length?(u=Graph.decompress(N,null,J),null!=u&&0<u.length&&(W=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(W=mxUtils.createXmlDocument(),
-W.appendChild(W.importNode(u[0],!0)),W=W.documentElement));return W};Editor.getDiagramNodeXml=function(u){var J=mxUtils.getTextContent(u),N=null;0<J.length?N=Graph.decompress(J):null!=u.firstChild&&(N=mxUtils.getXml(u.firstChild));return N};Editor.extractGraphModelFromPdf=function(u){u=u.substring(u.indexOf(",")+1);u=window.atob&&!mxClient.IS_SF?atob(u):Base64.decode(u,!0);if("%PDF-1.7"==u.substring(0,8)){var J=u.indexOf("EmbeddedFile");if(-1<J){var N=u.indexOf("stream",J)+9;if(0<u.substring(J,N).indexOf("application#2Fvnd.jgraph.mxfile"))return J=
-u.indexOf("endstream",N-1),pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(N,J)),{to:"string"})}return null}N=null;J="";for(var W=0,T=0,Q=[],Z=null;T<u.length;){var oa=u.charCodeAt(T);T+=1;10!=oa&&(J+=String.fromCharCode(oa));oa=="/Subject (%3Cmxfile".charCodeAt(W)?W++:W=0;if(19==W){var wa=u.indexOf("%3C%2Fmxfile%3E)",T)+15;T-=9;if(wa>T){N=u.substring(T,wa);break}}10==oa&&("endobj"==J?Z=null:"obj"==J.substring(J.length-3,J.length)||"xref"==J||"trailer"==J?(Z=[],Q[J.split(" ")[0]]=Z):null!=Z&&
-Z.push(J),J="")}null==N&&(N=Editor.extractGraphModelFromXref(Q));null!=N&&(N=decodeURIComponent(N.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return N};Editor.extractGraphModelFromXref=function(u){var J=u.trailer,N=null;null!=J&&(J=/.* \/Info (\d+) (\d+) R/g.exec(J.join("\n")),null!=J&&0<J.length&&(J=u[J[1]],null!=J&&(J=/.* \/Subject (\d+) (\d+) R/g.exec(J.join("\n")),null!=J&&0<J.length&&(u=u[J[1]],null!=u&&(u=u.join("\n"),N=u.substring(1,u.length-1))))));return N};Editor.extractParserError=function(u,
-J){var N=null;u=null!=u?u.getElementsByTagName("parsererror"):null;null!=u&&0<u.length&&(N=J||mxResources.get("invalidChars"),J=u[0].getElementsByTagName("div"),0<J.length&&(N=mxUtils.getTextContent(J[0])));return null!=N?mxUtils.trim(N):N};Editor.addRetryToError=function(u,J){null!=u&&(u=null!=u.error?u.error:u,null==u.retry&&(u.retry=J))};Editor.configure=function(u,J){if(null!=u){Editor.config=u;Editor.configVersion=u.version;Menus.prototype.defaultFonts=u.defaultFonts||Menus.prototype.defaultFonts;
+this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(Q){return new u(Q,Editor.createRoughCanvas(Q),this)};var I=mxShape.prototype.createHandJiggle;mxShape.prototype.createHandJiggle=function(Q){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?I.apply(this,arguments):"comic"==mxUtils.getValue(this.style,
+"sketchStyle","rough")?this.createComicCanvas(Q):this.createRoughCanvas(Q)};var N=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(Q,Z,na,va,Ba){null!=Q.handJiggle&&Q.handJiggle.passThrough||N.apply(this,arguments)};var W=mxShape.prototype.paint;mxShape.prototype.paint=function(Q){var Z=Q.addTolerance,na=!0;null!=this.style&&(na="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=Q.handJiggle&&Q.handJiggle.constructor==u&&!this.outline){Q.save();
+var va=this.fill,Ba=this.stroke;this.stroke=this.fill=null;var sa=this.configurePointerEvents,Da=Q.setStrokeColor;Q.setStrokeColor=function(){};var Aa=Q.setFillColor;Q.setFillColor=function(){};na||null==va||(this.configurePointerEvents=function(){});Q.handJiggle.passThrough=!0;W.apply(this,arguments);Q.handJiggle.passThrough=!1;Q.setFillColor=Aa;Q.setStrokeColor=Da;this.configurePointerEvents=sa;this.stroke=Ba;this.fill=va;Q.restore();na&&null!=va&&(Q.addTolerance=function(){})}W.apply(this,arguments);
+Q.addTolerance=Z};var T=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(Q,Z,na,va,Ba,sa){null!=Q.handJiggle&&Q.handJiggle.constructor==u?(Q.handJiggle.passThrough=!0,T.apply(this,arguments),Q.handJiggle.passThrough=!1):T.apply(this,arguments)}})();Editor.fastCompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:Graph.arrayBufferToString(pako.deflateRaw(u))};Editor.fastDecompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?
+u:pako.inflateRaw(Graph.stringToArrayBuffer(atob(u)),{to:"string"})};Editor.extractGraphModel=function(u,I,N){if(null!=u&&"undefined"!==typeof pako){var W=u.ownerDocument.getElementsByTagName("div"),T=[];if(null!=W&&0<W.length)for(var Q=0;Q<W.length;Q++)if("mxgraph"==W[Q].getAttribute("class")){T.push(W[Q]);break}0<T.length&&(W=T[0].getAttribute("data-mxgraph"),null!=W?(T=JSON.parse(W),null!=T&&null!=T.xml&&(u=mxUtils.parseXml(T.xml),u=u.documentElement)):(T=T[0].getElementsByTagName("div"),0<T.length&&
+(W=mxUtils.getTextContent(T[0]),W=Graph.decompress(W,null,N),0<W.length&&(u=mxUtils.parseXml(W),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(W=u.getAttribute("content"),null!=W&&"<"!=W.charAt(0)&&"%"!=W.charAt(0)&&(W=unescape(window.atob?atob(W):Base64.decode(cont,W))),null!=W&&"%"==W.charAt(0)&&(W=decodeURIComponent(W)),null!=W&&0<W.length)u=mxUtils.parseXml(W).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||I||(T=null,"diagram"==u.nodeName?T=u:"mxfile"==
+u.nodeName&&(W=u.getElementsByTagName("diagram"),0<W.length&&(T=W[Math.max(0,Math.min(W.length-1,urlParams.page||0))])),null!=T&&(u=Editor.parseDiagramNode(T,N)));null==u||"mxGraphModel"==u.nodeName||I&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,I){var N=mxUtils.trim(mxUtils.getTextContent(u)),W=null;0<N.length?(u=Graph.decompress(N,null,I),null!=u&&0<u.length&&(W=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(W=mxUtils.createXmlDocument(),
+W.appendChild(W.importNode(u[0],!0)),W=W.documentElement));return W};Editor.getDiagramNodeXml=function(u){var I=mxUtils.getTextContent(u),N=null;0<I.length?N=Graph.decompress(I):null!=u.firstChild&&(N=mxUtils.getXml(u.firstChild));return N};Editor.extractGraphModelFromPdf=function(u){u=u.substring(u.indexOf(",")+1);u=window.atob&&!mxClient.IS_SF?atob(u):Base64.decode(u,!0);if("%PDF-1.7"==u.substring(0,8)){var I=u.indexOf("EmbeddedFile");if(-1<I){var N=u.indexOf("stream",I)+9;if(0<u.substring(I,N).indexOf("application#2Fvnd.jgraph.mxfile"))return I=
+u.indexOf("endstream",N-1),pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(N,I)),{to:"string"})}return null}N=null;I="";for(var W=0,T=0,Q=[],Z=null;T<u.length;){var na=u.charCodeAt(T);T+=1;10!=na&&(I+=String.fromCharCode(na));na=="/Subject (%3Cmxfile".charCodeAt(W)?W++:W=0;if(19==W){var va=u.indexOf("%3C%2Fmxfile%3E)",T)+15;T-=9;if(va>T){N=u.substring(T,va);break}}10==na&&("endobj"==I?Z=null:"obj"==I.substring(I.length-3,I.length)||"xref"==I||"trailer"==I?(Z=[],Q[I.split(" ")[0]]=Z):null!=Z&&
+Z.push(I),I="")}null==N&&(N=Editor.extractGraphModelFromXref(Q));null!=N&&(N=decodeURIComponent(N.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return N};Editor.extractGraphModelFromXref=function(u){var I=u.trailer,N=null;null!=I&&(I=/.* \/Info (\d+) (\d+) R/g.exec(I.join("\n")),null!=I&&0<I.length&&(I=u[I[1]],null!=I&&(I=/.* \/Subject (\d+) (\d+) R/g.exec(I.join("\n")),null!=I&&0<I.length&&(u=u[I[1]],null!=u&&(u=u.join("\n"),N=u.substring(1,u.length-1))))));return N};Editor.extractParserError=function(u,
+I){var N=null;u=null!=u?u.getElementsByTagName("parsererror"):null;null!=u&&0<u.length&&(N=I||mxResources.get("invalidChars"),I=u[0].getElementsByTagName("div"),0<I.length&&(N=mxUtils.getTextContent(I[0])));return null!=N?mxUtils.trim(N):N};Editor.addRetryToError=function(u,I){null!=u&&(u=null!=u.error?u.error:u,null==u.retry&&(u.retry=I))};Editor.configure=function(u,I){if(null!=u){Editor.config=u;Editor.configVersion=u.version;Menus.prototype.defaultFonts=u.defaultFonts||Menus.prototype.defaultFonts;
ColorDialog.prototype.presetColors=u.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=u.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=u.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=u.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=u.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=u.autosaveDelay||
DrawioFile.prototype.autosaveDelay;u.debug&&(urlParams.test="1");null!=u.templateFile&&(EditorUi.templateFile=u.templateFile);null!=u.styles&&(Array.isArray(u.styles)?Editor.styles=u.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=u.globalVars&&(Editor.globalVars=u.globalVars);null!=u.compressXml&&(Editor.compressXml=u.compressXml);null!=u.includeDiagram&&(Editor.defaultIncludeDiagram=u.includeDiagram);null!=u.simpleLabels&&(Editor.simpleLabels=u.simpleLabels);null!=
u.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=u.oneDriveInlinePicker);null!=u.darkColor&&(Editor.darkColor=u.darkColor);null!=u.lightColor&&(Editor.lightColor=u.lightColor);null!=u.settingsName&&(Editor.configurationKey="."+u.settingsName+"-configuration",Editor.settingsKey="."+u.settingsName+"-config",mxSettings.key=Editor.settingsKey);u.customFonts&&(Menus.prototype.defaultFonts=u.customFonts.concat(Menus.prototype.defaultFonts));u.customPresetColors&&(ColorDialog.prototype.presetColors=
@@ -3161,53 +3161,53 @@ u.enabledLibraries&&(Array.isArray(u.enabledLibraries)?Sidebar.prototype.enabled
u.defaultVertexStyle);null!=u.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=u.defaultEdgeStyle);null!=u.defaultPageVisible&&(Graph.prototype.defaultPageVisible=u.defaultPageVisible);null!=u.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=u.defaultGridEnabled);null!=u.zoomWheel&&(Graph.zoomWheel=u.zoomWheel);null!=u.zoomFactor&&(N=parseFloat(u.zoomFactor),!isNaN(N)&&1<N?Graph.prototype.zoomFactor=N:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=u.gridSteps&&
(N=parseInt(u.gridSteps),!isNaN(N)&&0<N?mxGraphView.prototype.gridSteps=N:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=u.pageFormat&&(N=parseInt(u.pageFormat.width),W=parseInt(u.pageFormat.height),!isNaN(N)&&0<N&&!isNaN(W)&&0<W?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,N,W),mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));u.thumbWidth&&(Sidebar.prototype.thumbWidth=
u.thumbWidth);u.thumbHeight&&(Sidebar.prototype.thumbHeight=u.thumbHeight);u.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=u.emptyLibraryXml);u.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=u.emptyDiagramXml);u.sidebarWidth&&(EditorUi.prototype.hsplitPosition=u.sidebarWidth);u.sidebarTitles&&(Sidebar.prototype.sidebarTitles=u.sidebarTitles);u.sidebarTitleSize&&(N=parseInt(u.sidebarTitleSize),!isNaN(N)&&0<N?Sidebar.prototype.sidebarTitleSize=N:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));
-u.fontCss&&("string"===typeof u.fontCss?Editor.configureFontCss(u.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=u.autosaveDelay&&(N=parseInt(u.autosaveDelay),!isNaN(N)&&0<N?DrawioFile.prototype.autosaveDelay=N:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=u.plugins&&!J)for(App.initPluginCallback(),J=0;J<u.plugins.length;J++)mxscript(u.plugins[J]);null!=u.maxImageBytes&&(EditorUi.prototype.maxImageBytes=u.maxImageBytes);null!=
-u.maxImageSize&&(EditorUi.prototype.maxImageSize=u.maxImageSize);null!=u.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=u.shareCursorPosition);null!=u.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=u.showRemoteCursors)}};Editor.configureFontCss=function(u){if(null!=u){Editor.prototype.fontCss=u;var J=document.getElementsByTagName("script")[0];if(null!=J&&null!=J.parentNode){var N=document.createElement("style");N.setAttribute("type","text/css");N.appendChild(document.createTextNode(u));
-J.parentNode.insertBefore(N,J);u=u.split("url(");for(N=1;N<u.length;N++){var W=u[N].indexOf(")");W=Editor.trimCssUrl(u[N].substring(0,W));var T=document.createElement("link");T.setAttribute("rel","preload");T.setAttribute("href",W);T.setAttribute("as","font");T.setAttribute("crossorigin","");J.parentNode.insertBefore(T,J)}}}};Editor.trimCssUrl=function(u){return u.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";
-Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(u){u=null!=u?u:Editor.GUID_LENGTH;for(var J=[],N=0;N<u;N++)J.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return J.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=
-!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(u){u=null!=u&&"mxlibrary"!=u.nodeName?this.extractGraphModel(u):null;if(null!=u){var J=Editor.extractParserError(u,mxResources.get("invalidOrMissingFile"));if(J)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[u],"cause",[J]),Error(mxResources.get("notADiagramFile")+" ("+J+")");if("mxGraphModel"==u.nodeName){J=u.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=J&&""!=
-J)J!=this.graph.currentStyle&&(N=null!=this.graph.themes?this.graph.themes[J]:mxUtils.load(STYLE_PATH+"/"+J+".xml").getDocumentElement(),null!=N&&(W=new mxCodec(N.ownerDocument),W.decode(N,this.graph.getStylesheet())));else{var N=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=N){var W=new mxCodec(N.ownerDocument);W.decode(N,this.graph.getStylesheet())}}this.graph.currentStyle=J;this.graph.mathEnabled="1"==urlParams.math||
-"1"==u.getAttribute("math");J=u.getAttribute("backgroundImage");null!=J?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(J)):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==u.getAttribute("shadow"),!1);if(J=u.getAttribute("extFonts"))try{for(J=
-J.split("|").map(function(T){T=T.split("^");return{name:T[0],url:T[1]}}),N=0;N<J.length;N++)this.graph.addExtFont(J[N].name,J[N].url)}catch(T){console.log("ExtFonts format error: "+T.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(u,J){u=null!=
-u?u:!0;var N=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&N.setAttribute("style",this.graph.currentStyle);var W=this.graph.getBackgroundImageObject(this.graph.backgroundImage,J);null!=W&&N.setAttribute("backgroundImage",JSON.stringify(W));N.setAttribute("math",this.graph.mathEnabled?"1":"0");N.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(W=this.graph.extFonts.map(function(T){return T.name+
-"^"+T.url}),N.setAttribute("extFonts",W.join("|")));return N};Editor.prototype.isDataSvg=function(u){try{var J=mxUtils.parseXml(u).documentElement.getAttribute("content");if(null!=J&&(null!=J&&"<"!=J.charAt(0)&&"%"!=J.charAt(0)&&(J=unescape(window.atob?atob(J):Base64.decode(cont,J))),null!=J&&"%"==J.charAt(0)&&(J=decodeURIComponent(J)),null!=J&&0<J.length)){var N=mxUtils.parseXml(J).documentElement;return"mxfile"==N.nodeName||"mxGraphModel"==N.nodeName}}catch(W){}return!1};Editor.prototype.extractGraphModel=
-function(u,J,N){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};
+u.fontCss&&("string"===typeof u.fontCss?Editor.configureFontCss(u.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=u.autosaveDelay&&(N=parseInt(u.autosaveDelay),!isNaN(N)&&0<N?DrawioFile.prototype.autosaveDelay=N:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));if(null!=u.plugins&&!I)for(App.initPluginCallback(),I=0;I<u.plugins.length;I++)mxscript(u.plugins[I]);null!=u.maxImageBytes&&(EditorUi.prototype.maxImageBytes=u.maxImageBytes);null!=
+u.maxImageSize&&(EditorUi.prototype.maxImageSize=u.maxImageSize);null!=u.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=u.shareCursorPosition);null!=u.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=u.showRemoteCursors)}};Editor.configureFontCss=function(u){if(null!=u){Editor.prototype.fontCss=u;var I=document.getElementsByTagName("script")[0];if(null!=I&&null!=I.parentNode){var N=document.createElement("style");N.setAttribute("type","text/css");N.appendChild(document.createTextNode(u));
+I.parentNode.insertBefore(N,I);u=u.split("url(");for(N=1;N<u.length;N++){var W=u[N].indexOf(")");W=Editor.trimCssUrl(u[N].substring(0,W));var T=document.createElement("link");T.setAttribute("rel","preload");T.setAttribute("href",W);T.setAttribute("as","font");T.setAttribute("crossorigin","");I.parentNode.insertBefore(T,I)}}}};Editor.trimCssUrl=function(u){return u.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";
+Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(u){u=null!=u?u:Editor.GUID_LENGTH;for(var I=[],N=0;N<u;N++)I.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return I.join("")};Editor.prototype.timeout=25E3;Editor.prototype.useForeignObjectForMath=!0;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=
+!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(u){u=null!=u&&"mxlibrary"!=u.nodeName?this.extractGraphModel(u):null;if(null!=u){var I=Editor.extractParserError(u,mxResources.get("invalidOrMissingFile"));if(I)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[u],"cause",[I]),Error(mxResources.get("notADiagramFile")+" ("+I+")");if("mxGraphModel"==u.nodeName){I=u.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=I&&""!=
+I)I!=this.graph.currentStyle&&(N=null!=this.graph.themes?this.graph.themes[I]:mxUtils.load(STYLE_PATH+"/"+I+".xml").getDocumentElement(),null!=N&&(W=new mxCodec(N.ownerDocument),W.decode(N,this.graph.getStylesheet())));else{var N=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=N){var W=new mxCodec(N.ownerDocument);W.decode(N,this.graph.getStylesheet())}}this.graph.currentStyle=I;this.graph.mathEnabled="1"==urlParams.math||
+"1"==u.getAttribute("math");I=u.getAttribute("backgroundImage");null!=I?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(I)):this.graph.setBackgroundImage(null);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==u.getAttribute("shadow"),!1);if(I=u.getAttribute("extFonts"))try{for(I=
+I.split("|").map(function(T){T=T.split("^");return{name:T[0],url:T[1]}}),N=0;N<I.length;N++)this.graph.addExtFont(I[N].name,I[N].url)}catch(T){console.log("ExtFonts format error: "+T.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(u,I){u=null!=
+u?u:!0;var N=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&N.setAttribute("style",this.graph.currentStyle);var W=this.graph.getBackgroundImageObject(this.graph.backgroundImage,I);null!=W&&N.setAttribute("backgroundImage",JSON.stringify(W));N.setAttribute("math",this.graph.mathEnabled?"1":"0");N.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(W=this.graph.extFonts.map(function(T){return T.name+
+"^"+T.url}),N.setAttribute("extFonts",W.join("|")));return N};Editor.prototype.isDataSvg=function(u){try{var I=mxUtils.parseXml(u).documentElement.getAttribute("content");if(null!=I&&(null!=I&&"<"!=I.charAt(0)&&"%"!=I.charAt(0)&&(I=unescape(window.atob?atob(I):Base64.decode(cont,I))),null!=I&&"%"==I.charAt(0)&&(I=decodeURIComponent(I)),null!=I&&0<I.length)){var N=mxUtils.parseXml(I).documentElement;return"mxfile"==N.nodeName||"mxGraphModel"==N.nodeName}}catch(W){}return!1};Editor.prototype.extractGraphModel=
+function(u,I,N){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};
var n=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){n.apply(this,arguments);mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath&&null!=Editor.MathJaxRender?!0:this.originalNoForeignObject;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.mathJaxWebkitCss="div.MathJax_SVG_Display { position: static; }\nspan.MathJax_SVG { position: static !important; }";
-Editor.initMath=function(u,J){if("undefined"===typeof window.MathJax){u=(null!=u?u:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full,Safe";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(Z){window.setTimeout(function(){"hidden"!=Z.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,Z])},0)};var N=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";J=null!=J?J:{"HTML-CSS":{availableFonts:[N],imageFont:null},
-SVG:{font:N,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(J);MathJax.Hub.Register.StartupHook("Begin",function(){for(var Z=0;Z<Editor.mathJaxQueue.length;Z++)Editor.doMathJaxRender(Editor.mathJaxQueue[Z])})}};Editor.MathJaxRender=function(Z){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(Z):Editor.mathJaxQueue.push(Z)};
-Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var W=Editor.prototype.init;Editor.prototype.init=function(){W.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(Z,oa){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};N=document.getElementsByTagName("script");if(null!=N&&0<N.length){var T=document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",
+Editor.initMath=function(u,I){if("undefined"===typeof window.MathJax){u=(null!=u?u:DRAW_MATH_URL+"/MathJax.js")+"?config=TeX-MML-AM_"+("html"==urlParams["math-output"]?"HTMLorMML":"SVG")+"-full,Safe";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(Z){window.setTimeout(function(){"hidden"!=Z.style.visibility&&MathJax.Hub.Queue(["Typeset",MathJax.Hub,Z])},0)};var N=null!=urlParams["math-font"]?decodeURIComponent(urlParams["math-font"]):"TeX";I=null!=I?I:{"HTML-CSS":{availableFonts:[N],imageFont:null},
+SVG:{font:N,useFontCache:!1},tex2jax:{ignoreClass:"mxCellEditor"},asciimath2jax:{ignoreClass:"mxCellEditor"}};window.MathJax={skipStartupTypeset:!0,showMathMenu:!1,messageStyle:"none",AuthorInit:function(){MathJax.Hub.Config(I);MathJax.Hub.Register.StartupHook("Begin",function(){for(var Z=0;Z<Editor.mathJaxQueue.length;Z++)Editor.doMathJaxRender(Editor.mathJaxQueue[Z])})}};Editor.MathJaxRender=function(Z){"undefined"!==typeof MathJax&&"undefined"!==typeof MathJax.Hub?Editor.doMathJaxRender(Z):Editor.mathJaxQueue.push(Z)};
+Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};var W=Editor.prototype.init;Editor.prototype.init=function(){W.apply(this,arguments);this.graph.addListener(mxEvent.SIZE,mxUtils.bind(this,function(Z,na){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)}))};N=document.getElementsByTagName("script");if(null!=N&&0<N.length){var T=document.createElement("script");T.setAttribute("type","text/javascript");T.setAttribute("src",
u);N[0].parentNode.appendChild(T)}try{if(mxClient.IS_GC||mxClient.IS_SF){var Q=document.createElement("style");Q.type="text/css";Q.innerHTML=Editor.mathJaxWebkitCss;document.getElementsByTagName("head")[0].appendChild(Q)}}catch(Z){}}};Editor.prototype.csvToArray=function(u){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(u))return null;
-var J=[];u.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(N,W,T,Q){void 0!==W?J.push(W.replace(/\\'/g,"'")):void 0!==T?J.push(T.replace(/\\"/g,'"')):void 0!==Q&&J.push(Q);return""});/,\s*$/.test(u)&&J.push("");return J};Editor.prototype.isCorsEnabledForUrl=function(u){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||u.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&
-null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(u)||"https://raw.githubusercontent.com/"===u.substring(0,34)||"https://fonts.googleapis.com/"===u.substring(0,29)||"https://fonts.gstatic.com/"===u.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var u=new mxUrlConverter;u.updateBaseUrl();var J=u.convert,N=this;u.convert=function(W){if(null!=W){var T="http://"==W.substring(0,7)||"https://"==
-W.substring(0,8);T&&!navigator.onLine?W=Editor.svgBrokenImage.src:!T||W.substring(0,u.baseUrl.length)==u.baseUrl||N.crossOriginImages&&N.isCorsEnabledForUrl(W)?"chrome-extension://"==W.substring(0,19)||mxClient.IS_CHROMEAPP||(W=J.apply(this,arguments)):W=PROXY_URL+"?url="+encodeURIComponent(W)}return W};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,J){try{var N=!0,W=window.setTimeout(mxUtils.bind(this,
-function(){N=!1;J(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(Q){window.clearTimeout(W);N&&J(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(W);N&&J(Editor.svgBrokenImage.src)});else{var T=new Image;this.crossOriginImages&&(T.crossOrigin="anonymous");T.onload=function(){window.clearTimeout(W);if(N)try{var Q=document.createElement("canvas"),Z=Q.getContext("2d");Q.height=T.height;Q.width=T.width;Z.drawImage(T,0,0);
-J(Q.toDataURL())}catch(oa){J(Editor.svgBrokenImage.src)}};T.onerror=function(){window.clearTimeout(W);N&&J(Editor.svgBrokenImage.src)};T.src=u}}catch(Q){J(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(u,J,N,W){null==W&&(W=this.createImageUrlConverter());var T=0,Q=N||{};N=mxUtils.bind(this,function(Z,oa){Z=u.getElementsByTagName(Z);for(var wa=0;wa<Z.length;wa++)mxUtils.bind(this,function(Aa){try{if(null!=Aa){var ta=W.convert(Aa.getAttribute(oa));if(null!=ta&&"data:"!=ta.substring(0,
-5)){var Ba=Q[ta];null==Ba?(T++,this.convertImageToDataUri(ta,function(va){null!=va&&(Q[ta]=va,Aa.setAttribute(oa,va));T--;0==T&&J(u)})):Aa.setAttribute(oa,Ba)}else null!=ta&&Aa.setAttribute(oa,ta)}}catch(va){}})(Z[wa])});N("image","xlink:href");N("img","src");0==T&&J(u)};Editor.base64Encode=function(u){for(var J="",N=0,W=u.length,T,Q,Z;N<W;){T=u.charCodeAt(N++)&255;if(N==W){J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&
-3)<<4);J+="==";break}Q=u.charCodeAt(N++);if(N==W){J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(Q&240)>>4);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);J+="=";break}Z=u.charCodeAt(N++);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&
-3)<<4|(Q&240)>>4);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2|(Z&192)>>6);J+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Z&63)}return J};Editor.prototype.loadUrl=function(u,J,N,W,T,Q,Z,oa){try{var wa=!Z&&(W||/(\.png)($|\?)/i.test(u)||/(\.jpe?g)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.pdf)($|\?)/i.test(u));T=null!=T?T:!0;var Aa=mxUtils.bind(this,function(){mxUtils.get(u,mxUtils.bind(this,function(ta){if(200<=ta.getStatus()&&
-299>=ta.getStatus()){if(null!=J){var Ba=ta.getText();if(wa){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){ta=mxUtilsBinaryToArray(ta.request.responseBody).toArray();Ba=Array(ta.length);for(var va=0;va<ta.length;va++)Ba[va]=String.fromCharCode(ta[va]);Ba=Ba.join("")}Q=null!=Q?Q:"data:image/png;base64,";Ba=Q+Editor.base64Encode(Ba)}J(Ba)}}else null!=N&&(0==ta.getStatus()?N({message:mxResources.get("accessDenied")},ta):N({message:mxResources.get("error")+
-" "+ta.getStatus()},ta))}),function(ta){null!=N&&N({message:mxResources.get("error")+" "+ta.getStatus()})},wa,this.timeout,function(){T&&null!=N&&N({code:App.ERROR_TIMEOUT,retry:Aa})},oa)});Aa()}catch(ta){null!=N&&N(ta)}};Editor.prototype.absoluteCssFonts=function(u){var J=null;if(null!=u){var N=u.split("url(");if(0<N.length){J=[N[0]];u=window.location.pathname;var W=null!=u?u.lastIndexOf("/"):-1;0<=W&&(u=u.substring(0,W+1));W=document.getElementsByTagName("base");var T=null;null!=W&&0<W.length&&
-(T=W[0].getAttribute("href"));for(var Q=1;Q<N.length;Q++)if(W=N[Q].indexOf(")"),0<W){var Z=Editor.trimCssUrl(N[Q].substring(0,W));this.graph.isRelativeUrl(Z)&&(Z=null!=T?T+Z:window.location.protocol+"//"+window.location.hostname+("/"==Z.charAt(0)?"":u)+Z);J.push('url("'+Z+'"'+N[Q].substring(W))}else J.push(N[Q])}else J=[u]}return null!=J?J.join(""):null};Editor.prototype.mapFontUrl=function(u,J,N){/^https?:\/\//.test(J)&&!this.isCorsEnabledForUrl(J)&&(J=PROXY_URL+"?url="+encodeURIComponent(J));N(u,
-J)};Editor.prototype.embedCssFonts=function(u,J){var N=u.split("url("),W=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==W){for(var wa=[N[0]],Aa=1;Aa<N.length;Aa++){var ta=N[Aa].indexOf(")");wa.push('url("');wa.push(this.cachedFonts[Editor.trimCssUrl(N[Aa].substring(0,ta))]);wa.push('"'+N[Aa].substring(ta))}J(wa.join(""))}});if(0<N.length){for(u=1;u<N.length;u++){var Q=N[u].indexOf(")"),Z=null,oa=N[u].indexOf("format(",Q);0<oa&&(Z=Editor.trimCssUrl(N[u].substring(oa+
-7,N[u].indexOf(")",oa))));mxUtils.bind(this,function(wa){if(null==this.cachedFonts[wa]){this.cachedFonts[wa]=wa;W++;var Aa="application/x-font-ttf";if("svg"==Z||/(\.svg)($|\?)/i.test(wa))Aa="image/svg+xml";else if("otf"==Z||"embedded-opentype"==Z||/(\.otf)($|\?)/i.test(wa))Aa="application/x-font-opentype";else if("woff"==Z||/(\.woff)($|\?)/i.test(wa))Aa="application/font-woff";else if("woff2"==Z||/(\.woff2)($|\?)/i.test(wa))Aa="application/font-woff2";else if("eot"==Z||/(\.eot)($|\?)/i.test(wa))Aa=
-"application/vnd.ms-fontobject";else if("sfnt"==Z||/(\.sfnt)($|\?)/i.test(wa))Aa="application/font-sfnt";this.mapFontUrl(Aa,wa,mxUtils.bind(this,function(ta,Ba){this.loadUrl(Ba,mxUtils.bind(this,function(va){this.cachedFonts[wa]=va;W--;T()}),mxUtils.bind(this,function(va){W--;T()}),!0,null,"data:"+ta+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(N[u].substring(0,Q)),Z)}T()}else J(u)};Editor.prototype.loadFonts=function(u){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,
-mxUtils.bind(this,function(J){this.resolvedFontCss=J;null!=u&&u()})):null!=u&&u()};Editor.prototype.createGoogleFontCache=function(){var u={},J;for(J in Graph.fontMapping)Graph.isCssFontUrl(J)&&(u[J]=Graph.fontMapping[J]);return u};Editor.prototype.embedExtFonts=function(u){var J=this.graph.getCustomFonts();if(0<J.length){var N=[],W=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var T=mxUtils.bind(this,function(){0==W&&this.embedCssFonts(N.join(""),u)}),
-Q=0;Q<J.length;Q++)mxUtils.bind(this,function(Z,oa){Graph.isCssFontUrl(oa)?null==this.cachedGoogleFonts[oa]?(W++,this.loadUrl(oa,mxUtils.bind(this,function(wa){this.cachedGoogleFonts[oa]=wa;N.push(wa+"\n");W--;T()}),mxUtils.bind(this,function(wa){W--;N.push("@import url("+oa+");\n");T()}))):N.push(this.cachedGoogleFonts[oa]+"\n"):N.push('@font-face {font-family: "'+Z+'";src: url("'+oa+'")}\n')})(J[Q].name,J[Q].url);T()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");
-if(null!=u&&0<u.length)for(var J=document.getElementsByTagName("style"),N=0;N<J.length;N++){var W=mxUtils.getTextContent(J[N]);0>W.indexOf("mxPageSelector")&&0<W.indexOf("MathJax")&&u[0].appendChild(J[N].cloneNode(!0))}};Editor.prototype.addFontCss=function(u,J){J=null!=J?J:this.absoluteCssFonts(this.fontCss);if(null!=J){var N=u.getElementsByTagName("defs"),W=u.ownerDocument;0==N.length?(N=null!=W.createElementNS?W.createElementNS(mxConstants.NS_SVG,"defs"):W.createElement("defs"),null!=u.firstChild?
-u.insertBefore(N,u.firstChild):u.appendChild(N)):N=N[0];u=null!=W.createElementNS?W.createElementNS(mxConstants.NS_SVG,"style"):W.createElement("style");u.setAttribute("type","text/css");mxUtils.setTextContent(u,J);N.appendChild(u)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(u,J,N){var W=mxClient.IS_FF?8192:16384;return Math.min(N,Math.min(W/u,W/J))};Editor.prototype.exportToCanvas=function(u,J,N,
-W,T,Q,Z,oa,wa,Aa,ta,Ba,va,Oa,Ca,Ta,Va,Ja){try{Q=null!=Q?Q:!0;Z=null!=Z?Z:!0;Ba=null!=Ba?Ba:this.graph;va=null!=va?va:0;var bb=wa?null:Ba.background;bb==mxConstants.NONE&&(bb=null);null==bb&&(bb=W);null==bb&&0==wa&&(bb=Ta?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Ba.getSvg(null,null,va,Oa,null,Z,null,null,null,Aa,null,Ta,Va,Ja),mxUtils.bind(this,function(Wa){try{var $a=new Image;$a.onload=mxUtils.bind(this,function(){try{var L=function(){mxClient.IS_SF?window.setTimeout(function(){ia.drawImage($a,
-0,0);u(M,Wa)},0):(ia.drawImage($a,0,0),u(M,Wa))},M=document.createElement("canvas"),S=parseInt(Wa.getAttribute("width")),ca=parseInt(Wa.getAttribute("height"));oa=null!=oa?oa:1;null!=J&&(oa=Q?Math.min(1,Math.min(3*J/(4*ca),J/S)):J/S);oa=this.getMaxCanvasScale(S,ca,oa);S=Math.ceil(oa*S);ca=Math.ceil(oa*ca);M.setAttribute("width",S);M.setAttribute("height",ca);var ia=M.getContext("2d");null!=bb&&(ia.beginPath(),ia.rect(0,0,S,ca),ia.fillStyle=bb,ia.fill());1!=oa&&ia.scale(oa,oa);if(Ca){var na=Ba.view,
-ra=na.scale;na.scale=1;var qa=btoa(unescape(encodeURIComponent(na.createSvgGrid(na.gridColor))));na.scale=ra;qa="data:image/svg+xml;base64,"+qa;var ya=Ba.gridSize*na.gridSteps*oa,Ea=Ba.getGraphBounds(),Na=na.translate.x*ra,Pa=na.translate.y*ra,Qa=Na+(Ea.x-Na)/ra-va,Ua=Pa+(Ea.y-Pa)/ra-va,La=new Image;La.onload=function(){try{for(var ua=-Math.round(ya-mxUtils.mod((Na-Qa)*oa,ya)),za=-Math.round(ya-mxUtils.mod((Pa-Ua)*oa,ya));ua<S;ua+=ya)for(var Ka=za;Ka<ca;Ka+=ya)ia.drawImage(La,ua/oa,Ka/oa);L()}catch(Ga){null!=
-T&&T(Ga)}};La.onerror=function(ua){null!=T&&T(ua)};La.src=qa}else L()}catch(ua){null!=T&&T(ua)}});$a.onerror=function(L){null!=T&&T(L)};Aa&&this.graph.addSvgShadow(Wa);this.graph.mathEnabled&&this.addMathCss(Wa);var z=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Wa,this.resolvedFontCss),$a.src=Editor.createSvgDataUri(mxUtils.getXml(Wa))}catch(L){null!=T&&T(L)}});this.embedExtFonts(mxUtils.bind(this,function(L){try{null!=L&&this.addFontCss(Wa,L),this.loadFonts(z)}catch(M){null!=
-T&&T(M)}}))}catch(L){null!=T&&T(L)}}),N,ta)}catch(Wa){null!=T&&T(Wa)}};Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=D,E=0;8>E;E++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,J,N,W){for(var T=0;T<W;T++)u=Editor.crcTable[(u^J.charCodeAt(N+T))&255]^u>>>8;return u};Editor.crc32=function(u){for(var J=-1,N=0;N<u.length;N++)J=J>>>8^Editor.crcTable[(J^u.charCodeAt(N))&255];return(J^-1)>>>0};Editor.writeGraphModelToPng=function(u,J,N,W,T){function Q(ta,Ba){var va=
-wa;wa+=Ba;return ta.substring(va,wa)}function Z(ta){ta=Q(ta,4);return ta.charCodeAt(3)+(ta.charCodeAt(2)<<8)+(ta.charCodeAt(1)<<16)+(ta.charCodeAt(0)<<24)}function oa(ta){return String.fromCharCode(ta>>24&255,ta>>16&255,ta>>8&255,ta&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var wa=0;if(Q(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(Q(u,4),"IHDR"!=Q(u,4))null!=T&&T();else{Q(u,17);T=u.substring(0,wa);do{var Aa=Z(u);if("IDAT"==
-Q(u,4)){T=u.substring(0,wa-8);"pHYs"==J&&"dpi"==N?(N=Math.round(W/.0254),N=oa(N)+oa(N)+String.fromCharCode(1)):N=N+String.fromCharCode(0)+("zTXt"==J?String.fromCharCode(0):"")+W;W=4294967295;W=Editor.updateCRC(W,J,0,4);W=Editor.updateCRC(W,N,0,N.length);T+=oa(N.length)+J+N+oa(W^4294967295);T+=u.substring(wa-8,u.length);break}T+=u.substring(wa-8,wa-4+Aa);Q(u,Aa);Q(u,4)}while(Aa);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink=
-"https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(u,J){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(u,J){var N=null;null!=u.editor.graph.getModel().getParent(J)?
-N=J.getId():null!=u.currentPage&&(N=u.currentPage.getId());return N});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?m.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var u=
-this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=u&&u.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(u){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(u){u=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var J=this.editorUi,N=J.editor.graph,W=this.createOption(mxResources.get("shadow"),function(){return N.shadowVisible},function(T){var Q=new ChangePageSetup(J);
-Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=T;N.model.execute(Q)},{install:function(T){this.listener=function(){T(N.shadowVisible)};J.addListener("shadowVisibleChanged",this.listener)},destroy:function(){J.removeListener(this.listener)}});Editor.enableShadowOption||(W.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(W,60));u.appendChild(W)}return u};var y=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(u){u=y.apply(this,
-arguments);var J=this.editorUi,N=J.editor.graph;if(N.isEnabled()){var W=J.getCurrentFile();if(null!=W&&W.isAutosaveOptional()){var T=this.createOption(mxResources.get("autosave"),function(){return J.editor.autosave},function(Z){J.editor.setAutosave(Z);J.editor.autosave&&W.isModified()&&W.fileChanged()},{install:function(Z){this.listener=function(){Z(J.editor.autosave)};J.editor.addListener("autosaveChanged",this.listener)},destroy:function(){J.editor.removeListener(this.listener)}});u.appendChild(T)}}if(this.isMathOptionVisible()&&
-N.isEnabled()&&"undefined"!==typeof MathJax){T=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return N.mathEnabled},function(Z){J.actions.get("mathematicalTypesetting").funct()},{install:function(Z){this.listener=function(){Z(N.mathEnabled)};J.addListener("mathEnabledChanged",this.listener)},destroy:function(){J.removeListener(this.listener)}});T.style.paddingTop="5px";u.appendChild(T);var Q=J.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Q.style.position=
+var I=[];u.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,function(N,W,T,Q){void 0!==W?I.push(W.replace(/\\'/g,"'")):void 0!==T?I.push(T.replace(/\\"/g,'"')):void 0!==Q&&I.push(Q);return""});/,\s*$/.test(u)&&I.push("");return I};Editor.prototype.isCorsEnabledForUrl=function(u){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||u.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&
+null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(u)||"https://raw.githubusercontent.com/"===u.substring(0,34)||"https://fonts.googleapis.com/"===u.substring(0,29)||"https://fonts.gstatic.com/"===u.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var u=new mxUrlConverter;u.updateBaseUrl();var I=u.convert,N=this;u.convert=function(W){if(null!=W){var T="http://"==W.substring(0,7)||"https://"==
+W.substring(0,8);T&&!navigator.onLine?W=Editor.svgBrokenImage.src:!T||W.substring(0,u.baseUrl.length)==u.baseUrl||N.crossOriginImages&&N.isCorsEnabledForUrl(W)?"chrome-extension://"==W.substring(0,19)||mxClient.IS_CHROMEAPP||(W=I.apply(this,arguments)):W=PROXY_URL+"?url="+encodeURIComponent(W)}return W};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,I){try{var N=!0,W=window.setTimeout(mxUtils.bind(this,
+function(){N=!1;I(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(Q){window.clearTimeout(W);N&&I(Editor.createSvgDataUri(Q.getText()))}),function(){window.clearTimeout(W);N&&I(Editor.svgBrokenImage.src)});else{var T=new Image;this.crossOriginImages&&(T.crossOrigin="anonymous");T.onload=function(){window.clearTimeout(W);if(N)try{var Q=document.createElement("canvas"),Z=Q.getContext("2d");Q.height=T.height;Q.width=T.width;Z.drawImage(T,0,0);
+I(Q.toDataURL())}catch(na){I(Editor.svgBrokenImage.src)}};T.onerror=function(){window.clearTimeout(W);N&&I(Editor.svgBrokenImage.src)};T.src=u}}catch(Q){I(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(u,I,N,W){null==W&&(W=this.createImageUrlConverter());var T=0,Q=N||{};N=mxUtils.bind(this,function(Z,na){Z=u.getElementsByTagName(Z);for(var va=0;va<Z.length;va++)mxUtils.bind(this,function(Ba){try{if(null!=Ba){var sa=W.convert(Ba.getAttribute(na));if(null!=sa&&"data:"!=sa.substring(0,
+5)){var Da=Q[sa];null==Da?(T++,this.convertImageToDataUri(sa,function(Aa){null!=Aa&&(Q[sa]=Aa,Ba.setAttribute(na,Aa));T--;0==T&&I(u)})):Ba.setAttribute(na,Da)}else null!=sa&&Ba.setAttribute(na,sa)}}catch(Aa){}})(Z[va])});N("image","xlink:href");N("img","src");0==T&&I(u)};Editor.base64Encode=function(u){for(var I="",N=0,W=u.length,T,Q,Z;N<W;){T=u.charCodeAt(N++)&255;if(N==W){I+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);I+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&
+3)<<4);I+="==";break}Q=u.charCodeAt(N++);if(N==W){I+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);I+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&3)<<4|(Q&240)>>4);I+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2);I+="=";break}Z=u.charCodeAt(N++);I+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(T>>2);I+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&
+3)<<4|(Q&240)>>4);I+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&15)<<2|(Z&192)>>6);I+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Z&63)}return I};Editor.prototype.loadUrl=function(u,I,N,W,T,Q,Z,na){try{var va=!Z&&(W||/(\.png)($|\?)/i.test(u)||/(\.jpe?g)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.pdf)($|\?)/i.test(u));T=null!=T?T:!0;var Ba=mxUtils.bind(this,function(){mxUtils.get(u,mxUtils.bind(this,function(sa){if(200<=sa.getStatus()&&
+299>=sa.getStatus()){if(null!=I){var Da=sa.getText();if(va){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){sa=mxUtilsBinaryToArray(sa.request.responseBody).toArray();Da=Array(sa.length);for(var Aa=0;Aa<sa.length;Aa++)Da[Aa]=String.fromCharCode(sa[Aa]);Da=Da.join("")}Q=null!=Q?Q:"data:image/png;base64,";Da=Q+Editor.base64Encode(Da)}I(Da)}}else null!=N&&(0==sa.getStatus()?N({message:mxResources.get("accessDenied")},sa):N({message:mxResources.get("error")+
+" "+sa.getStatus()},sa))}),function(sa){null!=N&&N({message:mxResources.get("error")+" "+sa.getStatus()})},va,this.timeout,function(){T&&null!=N&&N({code:App.ERROR_TIMEOUT,retry:Ba})},na)});Ba()}catch(sa){null!=N&&N(sa)}};Editor.prototype.absoluteCssFonts=function(u){var I=null;if(null!=u){var N=u.split("url(");if(0<N.length){I=[N[0]];u=window.location.pathname;var W=null!=u?u.lastIndexOf("/"):-1;0<=W&&(u=u.substring(0,W+1));W=document.getElementsByTagName("base");var T=null;null!=W&&0<W.length&&
+(T=W[0].getAttribute("href"));for(var Q=1;Q<N.length;Q++)if(W=N[Q].indexOf(")"),0<W){var Z=Editor.trimCssUrl(N[Q].substring(0,W));this.graph.isRelativeUrl(Z)&&(Z=null!=T?T+Z:window.location.protocol+"//"+window.location.hostname+("/"==Z.charAt(0)?"":u)+Z);I.push('url("'+Z+'"'+N[Q].substring(W))}else I.push(N[Q])}else I=[u]}return null!=I?I.join(""):null};Editor.prototype.mapFontUrl=function(u,I,N){/^https?:\/\//.test(I)&&!this.isCorsEnabledForUrl(I)&&(I=PROXY_URL+"?url="+encodeURIComponent(I));N(u,
+I)};Editor.prototype.embedCssFonts=function(u,I){var N=u.split("url("),W=0;null==this.cachedFonts&&(this.cachedFonts={});var T=mxUtils.bind(this,function(){if(0==W){for(var va=[N[0]],Ba=1;Ba<N.length;Ba++){var sa=N[Ba].indexOf(")");va.push('url("');va.push(this.cachedFonts[Editor.trimCssUrl(N[Ba].substring(0,sa))]);va.push('"'+N[Ba].substring(sa))}I(va.join(""))}});if(0<N.length){for(u=1;u<N.length;u++){var Q=N[u].indexOf(")"),Z=null,na=N[u].indexOf("format(",Q);0<na&&(Z=Editor.trimCssUrl(N[u].substring(na+
+7,N[u].indexOf(")",na))));mxUtils.bind(this,function(va){if(null==this.cachedFonts[va]){this.cachedFonts[va]=va;W++;var Ba="application/x-font-ttf";if("svg"==Z||/(\.svg)($|\?)/i.test(va))Ba="image/svg+xml";else if("otf"==Z||"embedded-opentype"==Z||/(\.otf)($|\?)/i.test(va))Ba="application/x-font-opentype";else if("woff"==Z||/(\.woff)($|\?)/i.test(va))Ba="application/font-woff";else if("woff2"==Z||/(\.woff2)($|\?)/i.test(va))Ba="application/font-woff2";else if("eot"==Z||/(\.eot)($|\?)/i.test(va))Ba=
+"application/vnd.ms-fontobject";else if("sfnt"==Z||/(\.sfnt)($|\?)/i.test(va))Ba="application/font-sfnt";this.mapFontUrl(Ba,va,mxUtils.bind(this,function(sa,Da){this.loadUrl(Da,mxUtils.bind(this,function(Aa){this.cachedFonts[va]=Aa;W--;T()}),mxUtils.bind(this,function(Aa){W--;T()}),!0,null,"data:"+sa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(N[u].substring(0,Q)),Z)}T()}else I(u)};Editor.prototype.loadFonts=function(u){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,
+mxUtils.bind(this,function(I){this.resolvedFontCss=I;null!=u&&u()})):null!=u&&u()};Editor.prototype.createGoogleFontCache=function(){var u={},I;for(I in Graph.fontMapping)Graph.isCssFontUrl(I)&&(u[I]=Graph.fontMapping[I]);return u};Editor.prototype.embedExtFonts=function(u){var I=this.graph.getCustomFonts();if(0<I.length){var N=[],W=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var T=mxUtils.bind(this,function(){0==W&&this.embedCssFonts(N.join(""),u)}),
+Q=0;Q<I.length;Q++)mxUtils.bind(this,function(Z,na){Graph.isCssFontUrl(na)?null==this.cachedGoogleFonts[na]?(W++,this.loadUrl(na,mxUtils.bind(this,function(va){this.cachedGoogleFonts[na]=va;N.push(va+"\n");W--;T()}),mxUtils.bind(this,function(va){W--;N.push("@import url("+na+");\n");T()}))):N.push(this.cachedGoogleFonts[na]+"\n"):N.push('@font-face {font-family: "'+Z+'";src: url("'+na+'")}\n')})(I[Q].name,I[Q].url);T()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");
+if(null!=u&&0<u.length)for(var I=document.getElementsByTagName("style"),N=0;N<I.length;N++){var W=mxUtils.getTextContent(I[N]);0>W.indexOf("mxPageSelector")&&0<W.indexOf("MathJax")&&u[0].appendChild(I[N].cloneNode(!0))}};Editor.prototype.addFontCss=function(u,I){I=null!=I?I:this.absoluteCssFonts(this.fontCss);if(null!=I){var N=u.getElementsByTagName("defs"),W=u.ownerDocument;0==N.length?(N=null!=W.createElementNS?W.createElementNS(mxConstants.NS_SVG,"defs"):W.createElement("defs"),null!=u.firstChild?
+u.insertBefore(N,u.firstChild):u.appendChild(N)):N=N[0];u=null!=W.createElementNS?W.createElementNS(mxConstants.NS_SVG,"style"):W.createElement("style");u.setAttribute("type","text/css");mxUtils.setTextContent(u,I);N.appendChild(u)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(u,I,N){var W=mxClient.IS_FF?8192:16384;return Math.min(N,Math.min(W/u,W/I))};Editor.prototype.exportToCanvas=function(u,I,N,
+W,T,Q,Z,na,va,Ba,sa,Da,Aa,za,Ca,Qa,Za,cb){try{Q=null!=Q?Q:!0;Z=null!=Z?Z:!0;Da=null!=Da?Da:this.graph;Aa=null!=Aa?Aa:0;var Ka=va?null:Da.background;Ka==mxConstants.NONE&&(Ka=null);null==Ka&&(Ka=W);null==Ka&&0==va&&(Ka=Qa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Da.getSvg(null,null,Aa,za,null,Z,null,null,null,Ba,null,Qa,Za,cb),mxUtils.bind(this,function(Ua){try{var $a=new Image;$a.onload=mxUtils.bind(this,function(){try{var L=function(){mxClient.IS_SF?window.setTimeout(function(){ha.drawImage($a,
+0,0);u(M,Ua)},0):(ha.drawImage($a,0,0),u(M,Ua))},M=document.createElement("canvas"),S=parseInt(Ua.getAttribute("width")),ca=parseInt(Ua.getAttribute("height"));na=null!=na?na:1;null!=I&&(na=Q?Math.min(1,Math.min(3*I/(4*ca),I/S)):I/S);na=this.getMaxCanvasScale(S,ca,na);S=Math.ceil(na*S);ca=Math.ceil(na*ca);M.setAttribute("width",S);M.setAttribute("height",ca);var ha=M.getContext("2d");null!=Ka&&(ha.beginPath(),ha.rect(0,0,S,ca),ha.fillStyle=Ka,ha.fill());1!=na&&ha.scale(na,na);if(Ca){var oa=Da.view,
+ra=oa.scale;oa.scale=1;var qa=btoa(unescape(encodeURIComponent(oa.createSvgGrid(oa.gridColor))));oa.scale=ra;qa="data:image/svg+xml;base64,"+qa;var xa=Da.gridSize*oa.gridSteps*na,Ga=Da.getGraphBounds(),La=oa.translate.x*ra,Pa=oa.translate.y*ra,Oa=La+(Ga.x-La)/ra-Aa,Ta=Pa+(Ga.y-Pa)/ra-Aa,Ma=new Image;Ma.onload=function(){try{for(var ua=-Math.round(xa-mxUtils.mod((La-Oa)*na,xa)),ya=-Math.round(xa-mxUtils.mod((Pa-Ta)*na,xa));ua<S;ua+=xa)for(var Na=ya;Na<ca;Na+=xa)ha.drawImage(Ma,ua/na,Na/na);L()}catch(Fa){null!=
+T&&T(Fa)}};Ma.onerror=function(ua){null!=T&&T(ua)};Ma.src=qa}else L()}catch(ua){null!=T&&T(ua)}});$a.onerror=function(L){null!=T&&T(L)};Ba&&this.graph.addSvgShadow(Ua);this.graph.mathEnabled&&this.addMathCss(Ua);var z=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ua,this.resolvedFontCss),$a.src=Editor.createSvgDataUri(mxUtils.getXml(Ua))}catch(L){null!=T&&T(L)}});this.embedExtFonts(mxUtils.bind(this,function(L){try{null!=L&&this.addFontCss(Ua,L),this.loadFonts(z)}catch(M){null!=
+T&&T(M)}}))}catch(L){null!=T&&T(L)}}),N,sa)}catch(Ua){null!=T&&T(Ua)}};Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=D,E=0;8>E;E++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,I,N,W){for(var T=0;T<W;T++)u=Editor.crcTable[(u^I.charCodeAt(N+T))&255]^u>>>8;return u};Editor.crc32=function(u){for(var I=-1,N=0;N<u.length;N++)I=I>>>8^Editor.crcTable[(I^u.charCodeAt(N))&255];return(I^-1)>>>0};Editor.writeGraphModelToPng=function(u,I,N,W,T){function Q(sa,Da){var Aa=
+va;va+=Da;return sa.substring(Aa,va)}function Z(sa){sa=Q(sa,4);return sa.charCodeAt(3)+(sa.charCodeAt(2)<<8)+(sa.charCodeAt(1)<<16)+(sa.charCodeAt(0)<<24)}function na(sa){return String.fromCharCode(sa>>24&255,sa>>16&255,sa>>8&255,sa&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var va=0;if(Q(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=T&&T();else if(Q(u,4),"IHDR"!=Q(u,4))null!=T&&T();else{Q(u,17);T=u.substring(0,va);do{var Ba=Z(u);if("IDAT"==
+Q(u,4)){T=u.substring(0,va-8);"pHYs"==I&&"dpi"==N?(N=Math.round(W/.0254),N=na(N)+na(N)+String.fromCharCode(1)):N=N+String.fromCharCode(0)+("zTXt"==I?String.fromCharCode(0):"")+W;W=4294967295;W=Editor.updateCRC(W,I,0,4);W=Editor.updateCRC(W,N,0,N.length);T+=na(N.length)+I+N+na(W^4294967295);T+=u.substring(va-8,u.length);break}T+=u.substring(va-8,va-4+Ba);Q(u,Ba);Q(u,4)}while(Ba);return"data:image/png;base64,"+(window.btoa?btoa(T):Base64.encode(T,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink=
+"https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(u,I){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(u,I){var N=null;null!=u.editor.graph.getModel().getParent(I)?
+N=I.getId():null!=u.currentPage&&(N=u.currentPage.getId());return N});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?m.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var u=
+this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=u&&u.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(u){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(u){u=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var I=this.editorUi,N=I.editor.graph,W=this.createOption(mxResources.get("shadow"),function(){return N.shadowVisible},function(T){var Q=new ChangePageSetup(I);
+Q.ignoreColor=!0;Q.ignoreImage=!0;Q.shadowVisible=T;N.model.execute(Q)},{install:function(T){this.listener=function(){T(N.shadowVisible)};I.addListener("shadowVisibleChanged",this.listener)},destroy:function(){I.removeListener(this.listener)}});Editor.enableShadowOption||(W.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(W,60));u.appendChild(W)}return u};var y=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(u){u=y.apply(this,
+arguments);var I=this.editorUi,N=I.editor.graph;if(N.isEnabled()){var W=I.getCurrentFile();if(null!=W&&W.isAutosaveOptional()){var T=this.createOption(mxResources.get("autosave"),function(){return I.editor.autosave},function(Z){I.editor.setAutosave(Z);I.editor.autosave&&W.isModified()&&W.fileChanged()},{install:function(Z){this.listener=function(){Z(I.editor.autosave)};I.editor.addListener("autosaveChanged",this.listener)},destroy:function(){I.editor.removeListener(this.listener)}});u.appendChild(T)}}if(this.isMathOptionVisible()&&
+N.isEnabled()&&"undefined"!==typeof MathJax){T=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return N.mathEnabled},function(Z){I.actions.get("mathematicalTypesetting").funct()},{install:function(Z){this.listener=function(){Z(N.mathEnabled)};I.addListener("mathEnabledChanged",this.listener)},destroy:function(){I.removeListener(this.listener)}});T.style.paddingTop="5px";u.appendChild(T);var Q=I.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");Q.style.position=
"relative";Q.style.marginLeft="6px";Q.style.top="2px";T.appendChild(Q)}return u};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
@@ -3230,94 +3230,94 @@ min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:
stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
-{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(u,J,N){if(null!=J){var W=function(Q){if(null!=Q)if(N)for(var Z=0;Z<Q.length;Z++)J[Q[Z].name]=Q[Z];else for(var oa in J){var wa=!1;for(Z=0;Z<Q.length;Z++)if(Q[Z].name==oa&&Q[Z].type==J[oa].type){wa=!0;break}wa||delete J[oa]}},
+{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(u,I,N){if(null!=I){var W=function(Q){if(null!=Q)if(N)for(var Z=0;Z<Q.length;Z++)I[Q[Z].name]=Q[Z];else for(var na in I){var va=!1;for(Z=0;Z<Q.length;Z++)if(Q[Z].name==na&&Q[Z].type==I[na].type){va=!0;break}va||delete I[na]}},
T=this.editorUi.editor.graph.view.getState(u);null!=T&&null!=T.shape&&(T.shape.commonCustomPropAdded||(T.shape.commonCustomPropAdded=!0,T.shape.customProperties=T.shape.customProperties||[],T.cell.vertex?Array.prototype.push.apply(T.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(T.shape.customProperties,Editor.commonEdgeProperties)),W(T.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{W(JSON.parse(u))}catch(Q){}}};var F=StyleFormatPanel.prototype.init;
-StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));F.apply(this,arguments);if(Editor.enableCustomProperties){for(var J={},N=u.vertices,W=u.edges,T=0;T<N.length;T++)this.findCommonProperties(N[T],J,0==T);for(T=0;T<W.length;T++)this.findCommonProperties(W[T],J,0==N.length&&0==T);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(J).length&&
-this.container.appendChild(this.addProperties(this.createPanel(),J,u))}};var C=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(u){this.addActions(u,["copyStyle","pasteStyle"]);return C.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(u,J,N){function W(ia,na,ra,qa){Ba.getModel().beginUpdate();try{var ya=[],Ea=[];if(null!=ra.index){for(var Na=[],Pa=ra.parentRow.nextSibling;Pa&&Pa.getAttribute("data-pName")==
-ia;)Na.push(Pa.getAttribute("data-pValue")),Pa=Pa.nextSibling;ra.index<Na.length?null!=qa?Na.splice(qa,1):Na[ra.index]=na:Na.push(na);null!=ra.size&&Na.length>ra.size&&(Na=Na.slice(0,ra.size));na=Na.join(",");null!=ra.countProperty&&(Ba.setCellStyles(ra.countProperty,Na.length,Ba.getSelectionCells()),ya.push(ra.countProperty),Ea.push(Na.length))}Ba.setCellStyles(ia,na,Ba.getSelectionCells());ya.push(ia);Ea.push(na);if(null!=ra.dependentProps)for(ia=0;ia<ra.dependentProps.length;ia++){var Qa=ra.dependentPropsDefVal[ia],
-Ua=ra.dependentPropsVals[ia];if(Ua.length>na)Ua=Ua.slice(0,na);else for(var La=Ua.length;La<na;La++)Ua.push(Qa);Ua=Ua.join(",");Ba.setCellStyles(ra.dependentProps[ia],Ua,Ba.getSelectionCells());ya.push(ra.dependentProps[ia]);Ea.push(Ua)}if("function"==typeof ra.onChange)ra.onChange(Ba,na);ta.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ya,"values",Ea,"cells",Ba.getSelectionCells()))}finally{Ba.getModel().endUpdate()}}function T(ia,na,ra){var qa=mxUtils.getOffset(u,!0),ya=mxUtils.getOffset(ia,
-!0);na.style.position="absolute";na.style.left=ya.x-qa.x+"px";na.style.top=ya.y-qa.y+"px";na.style.width=ia.offsetWidth+"px";na.style.height=ia.offsetHeight-(ra?4:0)+"px";na.style.zIndex=5}function Q(ia,na,ra){var qa=document.createElement("div");qa.style.width="32px";qa.style.height="4px";qa.style.margin="2px";qa.style.border="1px solid black";qa.style.background=na&&"none"!=na?na:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(ta,function(ya){this.editorUi.pickColor(na,
-function(Ea){qa.style.background="none"==Ea?"url('"+Dialog.prototype.noColorImage+"')":Ea;W(ia,Ea,ra)});mxEvent.consume(ya)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(qa);return btn}function Z(ia,na,ra,qa,ya,Ea,Na){null!=na&&(na=na.split(","),va.push({name:ia,values:na,type:ra,defVal:qa,countProperty:ya,parentRow:Ea,isDeletable:!0,flipBkg:Na}));btn=mxUtils.button("+",mxUtils.bind(ta,function(Pa){for(var Qa=Ea,Ua=0;null!=Qa.nextSibling;)if(Qa.nextSibling.getAttribute("data-pName")==
-ia)Qa=Qa.nextSibling,Ua++;else break;var La={type:ra,parentRow:Ea,index:Ua,isDeletable:!0,defVal:qa,countProperty:ya};Ua=Aa(ia,"",La,0==Ua%2,Na);W(ia,qa,La);Qa.parentNode.insertBefore(Ua,Qa.nextSibling);mxEvent.consume(Pa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function oa(ia,na,ra,qa,ya,Ea,Na){if(0<ya){var Pa=Array(ya);na=null!=na?na.split(","):[];for(var Qa=0;Qa<ya;Qa++)Pa[Qa]=null!=na[Qa]?na[Qa]:null!=qa?qa:"";va.push({name:ia,values:Pa,type:ra,
-defVal:qa,parentRow:Ea,flipBkg:Na,size:ya})}return document.createElement("div")}function wa(ia,na,ra){var qa=document.createElement("input");qa.type="checkbox";qa.checked="1"==na;mxEvent.addListener(qa,"change",function(){W(ia,qa.checked?"1":"0",ra)});return qa}function Aa(ia,na,ra,qa,ya){var Ea=ra.dispName,Na=ra.type,Pa=document.createElement("tr");Pa.className="gePropRow"+(ya?"Dark":"")+(qa?"Alt":"")+" gePropNonHeaderRow";Pa.setAttribute("data-pName",ia);Pa.setAttribute("data-pValue",na);qa=!1;
-null!=ra.index&&(Pa.setAttribute("data-index",ra.index),Ea=(null!=Ea?Ea:"")+"["+ra.index+"]",qa=!0);var Qa=document.createElement("td");Qa.className="gePropRowCell";Ea=mxResources.get(Ea,null,Ea);mxUtils.write(Qa,Ea);Qa.setAttribute("title",Ea);qa&&(Qa.style.textAlign="right");Pa.appendChild(Qa);Qa=document.createElement("td");Qa.className="gePropRowCell";if("color"==Na)Qa.appendChild(Q(ia,na,ra));else if("bool"==Na||"boolean"==Na)Qa.appendChild(wa(ia,na,ra));else if("enum"==Na){var Ua=ra.enumList;
-for(ya=0;ya<Ua.length;ya++)if(Ea=Ua[ya],Ea.val==na){mxUtils.write(Qa,mxResources.get(Ea.dispName,null,Ea.dispName));break}mxEvent.addListener(Qa,"click",mxUtils.bind(ta,function(){var La=document.createElement("select");T(Qa,La);for(var ua=0;ua<Ua.length;ua++){var za=Ua[ua],Ka=document.createElement("option");Ka.value=mxUtils.htmlEntities(za.val);mxUtils.write(Ka,mxResources.get(za.dispName,null,za.dispName));La.appendChild(Ka)}La.value=na;u.appendChild(La);mxEvent.addListener(La,"change",function(){var Ga=
-mxUtils.htmlEntities(La.value);W(ia,Ga,ra)});La.focus();mxEvent.addListener(La,"blur",function(){u.removeChild(La)})}))}else"dynamicArr"==Na?Qa.appendChild(Z(ia,na,ra.subType,ra.subDefVal,ra.countProperty,Pa,ya)):"staticArr"==Na?Qa.appendChild(oa(ia,na,ra.subType,ra.subDefVal,ra.size,Pa,ya)):"readOnly"==Na?(ya=document.createElement("input"),ya.setAttribute("readonly",""),ya.value=na,ya.style.width="96px",ya.style.borderWidth="0px",Qa.appendChild(ya)):(Qa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(na)),
-mxEvent.addListener(Qa,"click",mxUtils.bind(ta,function(){function La(){var za=ua.value;za=0==za.length&&"string"!=Na?0:za;ra.allowAuto&&(null!=za.trim&&"auto"==za.trim().toLowerCase()?(za="auto",Na="string"):(za=parseFloat(za),za=isNaN(za)?0:za));null!=ra.min&&za<ra.min?za=ra.min:null!=ra.max&&za>ra.max&&(za=ra.max);za=encodeURIComponent(("int"==Na?parseInt(za):za)+"");W(ia,za,ra)}var ua=document.createElement("input");T(Qa,ua,!0);ua.value=decodeURIComponent(na);ua.className="gePropEditor";"int"!=
-Na&&"float"!=Na||ra.allowAuto||(ua.type="number",ua.step="int"==Na?"1":"any",null!=ra.min&&(ua.min=parseFloat(ra.min)),null!=ra.max&&(ua.max=parseFloat(ra.max)));u.appendChild(ua);mxEvent.addListener(ua,"keypress",function(za){13==za.keyCode&&La()});ua.focus();mxEvent.addListener(ua,"blur",function(){La()})})));ra.isDeletable&&(ya=mxUtils.button("-",mxUtils.bind(ta,function(La){W(ia,"",ra,ra.index);mxEvent.consume(La)})),ya.style.height="16px",ya.style.width="25px",ya.style.float="right",ya.className=
-"geColorBtn",Qa.appendChild(ya));Pa.appendChild(Qa);return Pa}var ta=this,Ba=this.editorUi.editor.graph,va=[];u.style.position="relative";u.style.padding="0";var Oa=document.createElement("table");Oa.className="geProperties";Oa.style.whiteSpace="nowrap";Oa.style.width="100%";var Ca=document.createElement("tr");Ca.className="gePropHeader";var Ta=document.createElement("th");Ta.className="gePropHeaderCell";var Va=document.createElement("img");Va.src=Sidebar.prototype.expandedImage;Va.style.verticalAlign=
-"middle";Ta.appendChild(Va);mxUtils.write(Ta,mxResources.get("property"));Ca.style.cursor="pointer";var Ja=function(){var ia=Oa.querySelectorAll(".gePropNonHeaderRow");if(ta.editorUi.propertiesCollapsed){Va.src=Sidebar.prototype.collapsedImage;var na="none";for(var ra=u.childNodes.length-1;0<=ra;ra--)try{var qa=u.childNodes[ra],ya=qa.nodeName.toUpperCase();"INPUT"!=ya&&"SELECT"!=ya||u.removeChild(qa)}catch(Ea){}}else Va.src=Sidebar.prototype.expandedImage,na="";for(ra=0;ra<ia.length;ra++)ia[ra].style.display=
-na};mxEvent.addListener(Ca,"click",function(){ta.editorUi.propertiesCollapsed=!ta.editorUi.propertiesCollapsed;Ja()});Ca.appendChild(Ta);Ta=document.createElement("th");Ta.className="gePropHeaderCell";Ta.innerHTML=mxResources.get("value");Ca.appendChild(Ta);Oa.appendChild(Ca);var bb=!1,Wa=!1;Ca=null;1==N.vertices.length&&0==N.edges.length?Ca=N.vertices[0].id:0==N.vertices.length&&1==N.edges.length&&(Ca=N.edges[0].id);null!=Ca&&Oa.appendChild(Aa("id",mxUtils.htmlEntities(Ca),{dispName:"ID",type:"readOnly"},
-!0,!1));for(var $a in J)if(Ca=J[$a],"function"!=typeof Ca.isVisible||Ca.isVisible(N,this)){var z=null!=N.style[$a]?mxUtils.htmlEntities(N.style[$a]+""):null!=Ca.getDefaultValue?Ca.getDefaultValue(N,this):Ca.defVal;if("separator"==Ca.type)Wa=!Wa;else{if("staticArr"==Ca.type)Ca.size=parseInt(N.style[Ca.sizeProperty]||J[Ca.sizeProperty].defVal)||0;else if(null!=Ca.dependentProps){var L=Ca.dependentProps,M=[],S=[];for(Ta=0;Ta<L.length;Ta++){var ca=N.style[L[Ta]];S.push(J[L[Ta]].subDefVal);M.push(null!=
-ca?ca.split(","):[])}Ca.dependentPropsDefVal=S;Ca.dependentPropsVals=M}Oa.appendChild(Aa($a,z,Ca,bb,Wa));bb=!bb}}for(Ta=0;Ta<va.length;Ta++)for(Ca=va[Ta],J=Ca.parentRow,N=0;N<Ca.values.length;N++)$a=Aa(Ca.name,Ca.values[N],{type:Ca.type,parentRow:Ca.parentRow,isDeletable:Ca.isDeletable,index:N,defVal:Ca.defVal,countProperty:Ca.countProperty,size:Ca.size},0==N%2,Ca.flipBkg),J.parentNode.insertBefore($a,J.nextSibling),J=$a;u.appendChild(Oa);Ja();return u};StyleFormatPanel.prototype.addStyles=function(u){function J(Ca){mxEvent.addListener(Ca,
+StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));F.apply(this,arguments);if(Editor.enableCustomProperties){for(var I={},N=u.vertices,W=u.edges,T=0;T<N.length;T++)this.findCommonProperties(N[T],I,0==T);for(T=0;T<W.length;T++)this.findCommonProperties(W[T],I,0==N.length&&0==T);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(I).length&&
+this.container.appendChild(this.addProperties(this.createPanel(),I,u))}};var C=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(u){this.addActions(u,["copyStyle","pasteStyle"]);return C.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(u,I,N){function W(ha,oa,ra,qa){Da.getModel().beginUpdate();try{var xa=[],Ga=[];if(null!=ra.index){for(var La=[],Pa=ra.parentRow.nextSibling;Pa&&Pa.getAttribute("data-pName")==
+ha;)La.push(Pa.getAttribute("data-pValue")),Pa=Pa.nextSibling;ra.index<La.length?null!=qa?La.splice(qa,1):La[ra.index]=oa:La.push(oa);null!=ra.size&&La.length>ra.size&&(La=La.slice(0,ra.size));oa=La.join(",");null!=ra.countProperty&&(Da.setCellStyles(ra.countProperty,La.length,Da.getSelectionCells()),xa.push(ra.countProperty),Ga.push(La.length))}Da.setCellStyles(ha,oa,Da.getSelectionCells());xa.push(ha);Ga.push(oa);if(null!=ra.dependentProps)for(ha=0;ha<ra.dependentProps.length;ha++){var Oa=ra.dependentPropsDefVal[ha],
+Ta=ra.dependentPropsVals[ha];if(Ta.length>oa)Ta=Ta.slice(0,oa);else for(var Ma=Ta.length;Ma<oa;Ma++)Ta.push(Oa);Ta=Ta.join(",");Da.setCellStyles(ra.dependentProps[ha],Ta,Da.getSelectionCells());xa.push(ra.dependentProps[ha]);Ga.push(Ta)}if("function"==typeof ra.onChange)ra.onChange(Da,oa);sa.editorUi.fireEvent(new mxEventObject("styleChanged","keys",xa,"values",Ga,"cells",Da.getSelectionCells()))}finally{Da.getModel().endUpdate()}}function T(ha,oa,ra){var qa=mxUtils.getOffset(u,!0),xa=mxUtils.getOffset(ha,
+!0);oa.style.position="absolute";oa.style.left=xa.x-qa.x+"px";oa.style.top=xa.y-qa.y+"px";oa.style.width=ha.offsetWidth+"px";oa.style.height=ha.offsetHeight-(ra?4:0)+"px";oa.style.zIndex=5}function Q(ha,oa,ra){var qa=document.createElement("div");qa.style.width="32px";qa.style.height="4px";qa.style.margin="2px";qa.style.border="1px solid black";qa.style.background=oa&&"none"!=oa?oa:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(sa,function(xa){this.editorUi.pickColor(oa,
+function(Ga){qa.style.background="none"==Ga?"url('"+Dialog.prototype.noColorImage+"')":Ga;W(ha,Ga,ra)});mxEvent.consume(xa)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(qa);return btn}function Z(ha,oa,ra,qa,xa,Ga,La){null!=oa&&(oa=oa.split(","),Aa.push({name:ha,values:oa,type:ra,defVal:qa,countProperty:xa,parentRow:Ga,isDeletable:!0,flipBkg:La}));btn=mxUtils.button("+",mxUtils.bind(sa,function(Pa){for(var Oa=Ga,Ta=0;null!=Oa.nextSibling;)if(Oa.nextSibling.getAttribute("data-pName")==
+ha)Oa=Oa.nextSibling,Ta++;else break;var Ma={type:ra,parentRow:Ga,index:Ta,isDeletable:!0,defVal:qa,countProperty:xa};Ta=Ba(ha,"",Ma,0==Ta%2,La);W(ha,qa,Ma);Oa.parentNode.insertBefore(Ta,Oa.nextSibling);mxEvent.consume(Pa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function na(ha,oa,ra,qa,xa,Ga,La){if(0<xa){var Pa=Array(xa);oa=null!=oa?oa.split(","):[];for(var Oa=0;Oa<xa;Oa++)Pa[Oa]=null!=oa[Oa]?oa[Oa]:null!=qa?qa:"";Aa.push({name:ha,values:Pa,type:ra,
+defVal:qa,parentRow:Ga,flipBkg:La,size:xa})}return document.createElement("div")}function va(ha,oa,ra){var qa=document.createElement("input");qa.type="checkbox";qa.checked="1"==oa;mxEvent.addListener(qa,"change",function(){W(ha,qa.checked?"1":"0",ra)});return qa}function Ba(ha,oa,ra,qa,xa){var Ga=ra.dispName,La=ra.type,Pa=document.createElement("tr");Pa.className="gePropRow"+(xa?"Dark":"")+(qa?"Alt":"")+" gePropNonHeaderRow";Pa.setAttribute("data-pName",ha);Pa.setAttribute("data-pValue",oa);qa=!1;
+null!=ra.index&&(Pa.setAttribute("data-index",ra.index),Ga=(null!=Ga?Ga:"")+"["+ra.index+"]",qa=!0);var Oa=document.createElement("td");Oa.className="gePropRowCell";Ga=mxResources.get(Ga,null,Ga);mxUtils.write(Oa,Ga);Oa.setAttribute("title",Ga);qa&&(Oa.style.textAlign="right");Pa.appendChild(Oa);Oa=document.createElement("td");Oa.className="gePropRowCell";if("color"==La)Oa.appendChild(Q(ha,oa,ra));else if("bool"==La||"boolean"==La)Oa.appendChild(va(ha,oa,ra));else if("enum"==La){var Ta=ra.enumList;
+for(xa=0;xa<Ta.length;xa++)if(Ga=Ta[xa],Ga.val==oa){mxUtils.write(Oa,mxResources.get(Ga.dispName,null,Ga.dispName));break}mxEvent.addListener(Oa,"click",mxUtils.bind(sa,function(){var Ma=document.createElement("select");T(Oa,Ma);for(var ua=0;ua<Ta.length;ua++){var ya=Ta[ua],Na=document.createElement("option");Na.value=mxUtils.htmlEntities(ya.val);mxUtils.write(Na,mxResources.get(ya.dispName,null,ya.dispName));Ma.appendChild(Na)}Ma.value=oa;u.appendChild(Ma);mxEvent.addListener(Ma,"change",function(){var Fa=
+mxUtils.htmlEntities(Ma.value);W(ha,Fa,ra)});Ma.focus();mxEvent.addListener(Ma,"blur",function(){u.removeChild(Ma)})}))}else"dynamicArr"==La?Oa.appendChild(Z(ha,oa,ra.subType,ra.subDefVal,ra.countProperty,Pa,xa)):"staticArr"==La?Oa.appendChild(na(ha,oa,ra.subType,ra.subDefVal,ra.size,Pa,xa)):"readOnly"==La?(xa=document.createElement("input"),xa.setAttribute("readonly",""),xa.value=oa,xa.style.width="96px",xa.style.borderWidth="0px",Oa.appendChild(xa)):(Oa.innerHTML=mxUtils.htmlEntities(decodeURIComponent(oa)),
+mxEvent.addListener(Oa,"click",mxUtils.bind(sa,function(){function Ma(){var ya=ua.value;ya=0==ya.length&&"string"!=La?0:ya;ra.allowAuto&&(null!=ya.trim&&"auto"==ya.trim().toLowerCase()?(ya="auto",La="string"):(ya=parseFloat(ya),ya=isNaN(ya)?0:ya));null!=ra.min&&ya<ra.min?ya=ra.min:null!=ra.max&&ya>ra.max&&(ya=ra.max);ya=encodeURIComponent(("int"==La?parseInt(ya):ya)+"");W(ha,ya,ra)}var ua=document.createElement("input");T(Oa,ua,!0);ua.value=decodeURIComponent(oa);ua.className="gePropEditor";"int"!=
+La&&"float"!=La||ra.allowAuto||(ua.type="number",ua.step="int"==La?"1":"any",null!=ra.min&&(ua.min=parseFloat(ra.min)),null!=ra.max&&(ua.max=parseFloat(ra.max)));u.appendChild(ua);mxEvent.addListener(ua,"keypress",function(ya){13==ya.keyCode&&Ma()});ua.focus();mxEvent.addListener(ua,"blur",function(){Ma()})})));ra.isDeletable&&(xa=mxUtils.button("-",mxUtils.bind(sa,function(Ma){W(ha,"",ra,ra.index);mxEvent.consume(Ma)})),xa.style.height="16px",xa.style.width="25px",xa.style.float="right",xa.className=
+"geColorBtn",Oa.appendChild(xa));Pa.appendChild(Oa);return Pa}var sa=this,Da=this.editorUi.editor.graph,Aa=[];u.style.position="relative";u.style.padding="0";var za=document.createElement("table");za.className="geProperties";za.style.whiteSpace="nowrap";za.style.width="100%";var Ca=document.createElement("tr");Ca.className="gePropHeader";var Qa=document.createElement("th");Qa.className="gePropHeaderCell";var Za=document.createElement("img");Za.src=Sidebar.prototype.expandedImage;Za.style.verticalAlign=
+"middle";Qa.appendChild(Za);mxUtils.write(Qa,mxResources.get("property"));Ca.style.cursor="pointer";var cb=function(){var ha=za.querySelectorAll(".gePropNonHeaderRow");if(sa.editorUi.propertiesCollapsed){Za.src=Sidebar.prototype.collapsedImage;var oa="none";for(var ra=u.childNodes.length-1;0<=ra;ra--)try{var qa=u.childNodes[ra],xa=qa.nodeName.toUpperCase();"INPUT"!=xa&&"SELECT"!=xa||u.removeChild(qa)}catch(Ga){}}else Za.src=Sidebar.prototype.expandedImage,oa="";for(ra=0;ra<ha.length;ra++)ha[ra].style.display=
+oa};mxEvent.addListener(Ca,"click",function(){sa.editorUi.propertiesCollapsed=!sa.editorUi.propertiesCollapsed;cb()});Ca.appendChild(Qa);Qa=document.createElement("th");Qa.className="gePropHeaderCell";Qa.innerHTML=mxResources.get("value");Ca.appendChild(Qa);za.appendChild(Ca);var Ka=!1,Ua=!1;Ca=null;1==N.vertices.length&&0==N.edges.length?Ca=N.vertices[0].id:0==N.vertices.length&&1==N.edges.length&&(Ca=N.edges[0].id);null!=Ca&&za.appendChild(Ba("id",mxUtils.htmlEntities(Ca),{dispName:"ID",type:"readOnly"},
+!0,!1));for(var $a in I)if(Ca=I[$a],"function"!=typeof Ca.isVisible||Ca.isVisible(N,this)){var z=null!=N.style[$a]?mxUtils.htmlEntities(N.style[$a]+""):null!=Ca.getDefaultValue?Ca.getDefaultValue(N,this):Ca.defVal;if("separator"==Ca.type)Ua=!Ua;else{if("staticArr"==Ca.type)Ca.size=parseInt(N.style[Ca.sizeProperty]||I[Ca.sizeProperty].defVal)||0;else if(null!=Ca.dependentProps){var L=Ca.dependentProps,M=[],S=[];for(Qa=0;Qa<L.length;Qa++){var ca=N.style[L[Qa]];S.push(I[L[Qa]].subDefVal);M.push(null!=
+ca?ca.split(","):[])}Ca.dependentPropsDefVal=S;Ca.dependentPropsVals=M}za.appendChild(Ba($a,z,Ca,Ka,Ua));Ka=!Ka}}for(Qa=0;Qa<Aa.length;Qa++)for(Ca=Aa[Qa],I=Ca.parentRow,N=0;N<Ca.values.length;N++)$a=Ba(Ca.name,Ca.values[N],{type:Ca.type,parentRow:Ca.parentRow,isDeletable:Ca.isDeletable,index:N,defVal:Ca.defVal,countProperty:Ca.countProperty,size:Ca.size},0==N%2,Ca.flipBkg),I.parentNode.insertBefore($a,I.nextSibling),I=$a;u.appendChild(za);cb();return u};StyleFormatPanel.prototype.addStyles=function(u){function I(Ca){mxEvent.addListener(Ca,
"mouseenter",function(){Ca.style.opacity="1"});mxEvent.addListener(Ca,"mouseleave",function(){Ca.style.opacity="0.5"})}var N=this.editorUi,W=N.editor.graph,T=document.createElement("div");T.style.whiteSpace="nowrap";T.style.paddingLeft="24px";T.style.paddingRight="20px";u.style.paddingLeft="16px";u.style.paddingBottom="6px";u.style.position="relative";u.appendChild(T);var Q="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),
-Z=document.createElement("div");Z.style.whiteSpace="nowrap";Z.style.position="relative";Z.style.textAlign="center";Z.style.width="210px";for(var oa=[],wa=0;wa<this.defaultColorSchemes.length;wa++){var Aa=document.createElement("div");Aa.style.display="inline-block";Aa.style.width="6px";Aa.style.height="6px";Aa.style.marginLeft="4px";Aa.style.marginRight="3px";Aa.style.borderRadius="3px";Aa.style.cursor="pointer";Aa.style.background="transparent";Aa.style.border="1px solid #b5b6b7";mxUtils.bind(this,
-function(Ca){mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){ta(Ca)}))})(wa);oa.push(Aa);Z.appendChild(Aa)}var ta=mxUtils.bind(this,function(Ca){null!=oa[Ca]&&(null!=this.format.currentScheme&&null!=oa[this.format.currentScheme]&&(oa[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ca,Ba(this.defaultColorSchemes[this.format.currentScheme]),oa[this.format.currentScheme].style.background="#84d7ff")}),Ba=mxUtils.bind(this,function(Ca){var Ta=mxUtils.bind(this,
-function(Ja){var bb=mxUtils.button("",mxUtils.bind(this,function(z){W.getModel().beginUpdate();try{for(var L=N.getSelectionState().cells,M=0;M<L.length;M++){for(var S=W.getModel().getStyle(L[M]),ca=0;ca<Q.length;ca++)S=mxUtils.removeStylename(S,Q[ca]);var ia=W.getModel().isVertex(L[M])?W.defaultVertexStyle:W.defaultEdgeStyle;null!=Ja?(mxEvent.isShiftDown(z)||(S=""==Ja.fill?mxUtils.setStyle(S,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(S,mxConstants.STYLE_FILLCOLOR,Ja.fill||mxUtils.getValue(ia,
-mxConstants.STYLE_FILLCOLOR,null)),S=mxUtils.setStyle(S,mxConstants.STYLE_GRADIENTCOLOR,Ja.gradient||mxUtils.getValue(ia,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(z)||mxClient.IS_MAC&&mxEvent.isMetaDown(z)||!W.getModel().isVertex(L[M])||(S=mxUtils.setStyle(S,mxConstants.STYLE_FONTCOLOR,Ja.font||mxUtils.getValue(ia,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(z)||(S=""==Ja.stroke?mxUtils.setStyle(S,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(S,mxConstants.STYLE_STROKECOLOR,
-Ja.stroke||mxUtils.getValue(ia,mxConstants.STYLE_STROKECOLOR,null)))):(S=mxUtils.setStyle(S,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(ia,mxConstants.STYLE_FILLCOLOR,"#ffffff")),S=mxUtils.setStyle(S,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(ia,mxConstants.STYLE_STROKECOLOR,"#000000")),S=mxUtils.setStyle(S,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(ia,mxConstants.STYLE_GRADIENTCOLOR,null)),W.getModel().isVertex(L[M])&&(S=mxUtils.setStyle(S,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(ia,
-mxConstants.STYLE_FONTCOLOR,null))));W.getModel().setStyle(L[M],S)}}finally{W.getModel().endUpdate()}}));bb.className="geStyleButton";bb.style.width="36px";bb.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";bb.style.margin="0px 6px 6px 0px";if(null!=Ja){var Wa="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ja.gradient?mxClient.IS_IE&&10>document.documentMode?bb.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ja.fill+"', EndColorStr='"+Ja.gradient+"', GradientType=0)":
-bb.style.backgroundImage="linear-gradient("+Ja.fill+" 0px,"+Ja.gradient+" 100%)":Ja.fill==mxConstants.NONE?bb.style.background="url('"+Dialog.prototype.noColorImage+"')":bb.style.backgroundColor=""==Ja.fill?mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ja.fill||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");bb.style.border=Ja.stroke==mxConstants.NONE?Wa+" transparent":
-""==Ja.stroke?Wa+" "+mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Wa+" "+(Ja.stroke||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ja.title&&bb.setAttribute("title",Ja.title)}else{Wa=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var $a=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");bb.style.backgroundColor=
-Wa;bb.style.border="1px solid "+$a}bb.style.borderRadius="0";T.appendChild(bb)});T.innerHTML="";for(var Va=0;Va<Ca.length;Va++)0<Va&&0==mxUtils.mod(Va,4)&&mxUtils.br(T),Ta(Ca[Va])});null==this.format.currentScheme?ta(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):ta(this.format.currentScheme);wa=10>=this.defaultColorSchemes.length?28:8;var va=document.createElement("div");va.style.cssText="position:absolute;left:10px;top:8px;bottom:"+wa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(va,"click",mxUtils.bind(this,function(){ta(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Oa=document.createElement("div");Oa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+wa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(u.appendChild(va),u.appendChild(Oa));mxEvent.addListener(Oa,"click",mxUtils.bind(this,function(){ta(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));J(va);J(Oa);Ba(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&u.appendChild(Z);return u};StyleFormatPanel.prototype.addEditOps=function(u){var J=this.editorUi.getSelectionState(),N=this.editorUi.editor.graph,W=null;1==J.cells.length&&(W=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(T){this.editorUi.actions.get("editStyle").funct()})),W.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),W.style.width="210px",W.style.marginBottom="2px",u.appendChild(W));N=1==J.cells.length?N.view.getState(J.cells[0]):null;null!=N&&null!=N.shape&&null!=N.shape.stencil?(J=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(T){this.editorUi.actions.get("editShape").funct()})),J.setAttribute("title",
-mxResources.get("editShape")),J.style.marginBottom="2px",null==W?J.style.width="210px":(W.style.width="104px",J.style.width="104px",J.style.marginLeft="2px"),u.appendChild(J)):J.image&&0<J.cells.length&&(J=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(T){this.editorUi.actions.get("image").funct()})),J.setAttribute("title",mxResources.get("editImage")),J.style.marginBottom="2px",null==W?J.style.width="210px":(W.style.width="104px",J.style.width="104px",J.style.marginLeft="2px"),
-u.appendChild(J));return u}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(u){return u.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(u){return Graph.isGoogleFontUrl(u)};Graph.createFontElement=function(u,
-J){var N=Graph.fontMapping[J];null==N&&Graph.isCssFontUrl(J)?(u=document.createElement("link"),u.setAttribute("rel","stylesheet"),u.setAttribute("type","text/css"),u.setAttribute("charset","UTF-8"),u.setAttribute("href",J)):(null==N&&(N='@font-face {\nfont-family: "'+u+'";\nsrc: url("'+J+'");\n}'),u=document.createElement("style"),mxUtils.write(u,N));return u};Graph.addFont=function(u,J,N){if(null!=u&&0<u.length&&null!=J&&0<J.length){var W=u.toLowerCase();if("helvetica"!=W&&"arial"!=u&&"sans-serif"!=
-W){var T=Graph.customFontElements[W];null!=T&&T.url!=J&&(T.elt.parentNode.removeChild(T.elt),T=null);null==T?(T=J,"http:"==J.substring(0,5)&&(T=PROXY_URL+"?url="+encodeURIComponent(J)),T={name:u,url:J,elt:Graph.createFontElement(u,T)},Graph.customFontElements[W]=T,Graph.recentCustomFonts[W]=T,J=document.getElementsByTagName("head")[0],null!=N&&("link"==T.elt.nodeName.toLowerCase()?(T.elt.onload=N,T.elt.onerror=N):N()),null!=J&&J.appendChild(T.elt)):null!=N&&N()}else null!=N&&N()}else null!=N&&N();
-return u};Graph.getFontUrl=function(u,J){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(J=u.url);return J};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var J=0;J<u.length;J++){var N=u[J].getAttribute("data-font-src");if(null!=N){var W="FONT"==u[J].nodeName?u[J].getAttribute("face"):u[J].style.fontFamily;null!=W&&Graph.addFont(W,N)}}};Graph.processFontStyle=function(u){if(null!=u){var J=mxUtils.getValue(u,"fontSource",null);if(null!=J){var N=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY,
-null);null!=N&&Graph.addFont(N,decodeURIComponent(J))}}return u};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var H=Graph.prototype.init;Graph.prototype.init=function(){function u(T){J=T}H.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var J=null;mxEvent.addListener(this.container,"mouseenter",u);mxEvent.addListener(this.container,"mousemove",u);mxEvent.addListener(this.container,"mouseleave",function(T){J=null});this.isMouseInsertPoint=function(){return null!=J};var N=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=J?this.getPointForEvent(J):N.apply(this,arguments)};var W=this.layoutManager.getLayout;this.layoutManager.getLayout=function(T){var Q=this.graph.getCellStyle(T);if(null!=Q&&"rack"==Q.childLayout){var Z=new mxStackLayout(this.graph,!1);Z.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;Z.marginLeft=Q.marginLeft||0;Z.marginRight=Q.marginRight||0;Z.marginTop=Q.marginTop||0;Z.marginBottom=
-Q.marginBottom||0;Z.allowGaps=Q.allowGaps||0;Z.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");Z.resizeParent=!1;Z.fill=!0;return Z}return W.apply(this,arguments)};this.updateGlobalUrlVariables()};var G=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,J){return Graph.processFontStyle(G.apply(this,arguments))};var aa=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,J,N,W,T,Q,Z,oa,wa,Aa,ta){aa.apply(this,arguments);
-Graph.processFontAttributes(ta)};var da=mxText.prototype.redraw;mxText.prototype.redraw=function(){da.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,J,N){function W(){for(var Ca=Z.getSelectionCells(),Ta=[],Va=0;Va<Ca.length;Va++)Z.isCellVisible(Ca[Va])&&Ta.push(Ca[Va]);Z.setSelectionCells(Ta)}function T(Ca){Z.setHiddenTags(Ca?[]:oa.slice());W();Z.refresh()}function Q(Ca,Ta){Aa.innerHTML="";if(0<
-Ca.length){var Va=document.createElement("table");Va.setAttribute("cellpadding","2");Va.style.boxSizing="border-box";Va.style.tableLayout="fixed";Va.style.width="100%";var Ja=document.createElement("tbody");if(null!=Ca&&0<Ca.length)for(var bb=0;bb<Ca.length;bb++)(function(Wa){var $a=0>mxUtils.indexOf(Z.hiddenTags,Wa),z=document.createElement("tr"),L=document.createElement("td");L.style.align="center";L.style.width="16px";var M=document.createElement("img");M.setAttribute("src",$a?Editor.visibleImage:
-Editor.hiddenImage);M.setAttribute("title",mxResources.get($a?"hideIt":"show",[Wa]));mxUtils.setOpacity(M,$a?75:25);M.style.verticalAlign="middle";M.style.cursor="pointer";M.style.width="16px";if(J||Editor.isDarkMode())M.style.filter="invert(100%)";L.appendChild(M);mxEvent.addListener(M,"click",function(ca){mxEvent.isShiftDown(ca)?T(0<=mxUtils.indexOf(Z.hiddenTags,Wa)):(Z.toggleHiddenTag(Wa),W(),Z.refresh());mxEvent.consume(ca)});z.appendChild(L);L=document.createElement("td");L.style.overflow="hidden";
-L.style.whiteSpace="nowrap";L.style.textOverflow="ellipsis";L.style.verticalAlign="middle";L.style.cursor="pointer";L.setAttribute("title",Wa);a=document.createElement("a");mxUtils.write(a,Wa);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,$a?100:40);L.appendChild(a);mxEvent.addListener(L,"click",function(ca){if(mxEvent.isShiftDown(ca)){T(!0);var ia=Z.getCellsForTags([Wa],null,null,!0);Z.isEnabled()?Z.setSelectionCells(ia):Z.highlightCells(ia)}else if($a&&0<Z.hiddenTags.length)T(!0);
-else{ia=oa.slice();var na=mxUtils.indexOf(ia,Wa);ia.splice(na,1);Z.setHiddenTags(ia);W();Z.refresh()}mxEvent.consume(ca)});z.appendChild(L);if(Z.isEnabled()){L=document.createElement("td");L.style.verticalAlign="middle";L.style.textAlign="center";L.style.width="18px";if(null==Ta){L.style.align="center";L.style.width="16px";M=document.createElement("img");M.setAttribute("src",Editor.crossImage);M.setAttribute("title",mxResources.get("removeIt",[Wa]));mxUtils.setOpacity(M,$a?75:25);M.style.verticalAlign=
-"middle";M.style.cursor="pointer";M.style.width="16px";if(J||Editor.isDarkMode())M.style.filter="invert(100%)";mxEvent.addListener(M,"click",function(ca){var ia=mxUtils.indexOf(oa,Wa);0<=ia&&oa.splice(ia,1);Z.removeTagsForCells(Z.model.getDescendants(Z.model.getRoot()),[Wa]);Z.refresh();mxEvent.consume(ca)});L.appendChild(M)}else{var S=document.createElement("input");S.setAttribute("type","checkbox");S.style.margin="0px";S.defaultChecked=null!=Ta&&0<=mxUtils.indexOf(Ta,Wa);S.checked=S.defaultChecked;
-S.style.background="transparent";S.setAttribute("title",mxResources.get(S.defaultChecked?"removeIt":"add",[Wa]));mxEvent.addListener(S,"change",function(ca){S.checked?Z.addTagsForCells(Z.getSelectionCells(),[Wa]):Z.removeTagsForCells(Z.getSelectionCells(),[Wa]);mxEvent.consume(ca)});L.appendChild(S)}z.appendChild(L)}Ja.appendChild(z)})(Ca[bb]);Va.appendChild(Ja);Aa.appendChild(Va)}}var Z=this,oa=Z.hiddenTags.slice(),wa=document.createElement("div");wa.style.userSelect="none";wa.style.overflow="hidden";
-wa.style.padding="10px";wa.style.height="100%";var Aa=document.createElement("div");Aa.style.boxSizing="border-box";Aa.style.borderRadius="4px";Aa.style.userSelect="none";Aa.style.overflow="auto";Aa.style.position="absolute";Aa.style.left="10px";Aa.style.right="10px";Aa.style.top="10px";Aa.style.border=Z.isEnabled()?"1px solid #808080":"none";Aa.style.bottom=Z.isEnabled()?"48px":"10px";wa.appendChild(Aa);var ta=mxUtils.button(mxResources.get("reset"),function(Ca){Z.setHiddenTags([]);mxEvent.isShiftDown(Ca)||
-(oa=Z.hiddenTags.slice());W();Z.refresh()});ta.setAttribute("title",mxResources.get("reset"));ta.className="geBtn";ta.style.margin="0 4px 0 0";var Ba=mxUtils.button(mxResources.get("add"),function(){null!=N&&N(oa,function(Ca){oa=Ca;va()})});Ba.setAttribute("title",mxResources.get("add"));Ba.className="geBtn";Ba.style.margin="0";Z.addListener(mxEvent.ROOT,function(){oa=Z.hiddenTags.slice()});var va=mxUtils.bind(this,function(Ca,Ta){if(u()){Ca=Z.getAllTags();for(Ta=0;Ta<Ca.length;Ta++)0>mxUtils.indexOf(oa,
-Ca[Ta])&&oa.push(Ca[Ta]);oa.sort();Z.isSelectionEmpty()?Q(oa):Q(oa,Z.getCommonTagsForCells(Z.getSelectionCells()))}});Z.selectionModel.addListener(mxEvent.CHANGE,va);Z.model.addListener(mxEvent.CHANGE,va);Z.addListener(mxEvent.REFRESH,va);var Oa=document.createElement("div");Oa.style.boxSizing="border-box";Oa.style.whiteSpace="nowrap";Oa.style.position="absolute";Oa.style.overflow="hidden";Oa.style.bottom="0px";Oa.style.height="42px";Oa.style.right="10px";Oa.style.left="10px";Z.isEnabled()&&(Oa.appendChild(ta),
-Oa.appendChild(Ba),wa.appendChild(Oa));return{div:wa,refresh:va}};Graph.prototype.getCustomFonts=function(){var u=this.extFonts;u=null!=u?u.slice():[];for(var J in Graph.customFontElements){var N=Graph.customFontElements[J];u.push({name:N.name,url:N.url})}return u};Graph.prototype.setFont=function(u,J){Graph.addFont(u,J);document.execCommand("fontname",!1,u);if(null!=J){var N=this.cellEditor.textarea.getElementsByTagName("font");J=Graph.getFontUrl(u,J);for(var W=0;W<N.length;W++)N[W].getAttribute("face")==
-u&&N[W].getAttribute("data-font-src")!=J&&N[W].setAttribute("data-font-src",J)}};var ba=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return ba.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var u=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=u)for(var J in u)this.globalVars[J]=
-u[J]}catch(N){null!=window.console&&console.log("Error in vars URL parameter: "+N)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var Y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var J=Y.apply(this,arguments);null==J&&null!=this.globalVars&&(J=this.globalVars[u]);return J};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=this.themes["default-style2"];this.defaultStylesheet=
-(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var pa=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,J,N,W,T,Q,Z,oa,wa,Aa,ta,Ba,va,Oa){var Ca=null,Ta=null,Va=null;Ba||null==this.themes||"darkTheme"!=this.defaultThemeName||(Ca=this.stylesheet,Ta=this.shapeForegroundColor,Va=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
-"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ja=pa.apply(this,arguments),bb=this.getCustomFonts();if(ta&&0<bb.length){var Wa=Ja.ownerDocument,$a=null!=Wa.createElementNS?Wa.createElementNS(mxConstants.NS_SVG,"style"):Wa.createElement("style");null!=Wa.setAttributeNS?$a.setAttributeNS("type","text/css"):$a.setAttribute("type","text/css");for(var z="",L="",M=0;M<bb.length;M++){var S=bb[M].name,ca=bb[M].url;Graph.isCssFontUrl(ca)?
-z+="@import url("+ca+");\n":L+='@font-face {\nfont-family: "'+S+'";\nsrc: url("'+ca+'");\n}\n'}$a.appendChild(Wa.createTextNode(z+L));Ja.getElementsByTagName("defs")[0].appendChild($a)}null!=Ca&&(this.shapeBackgroundColor=Va,this.shapeForegroundColor=Ta,this.stylesheet=Ca,this.refresh());return Ja};var O=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var u=O.apply(this,arguments);if(this.mathEnabled){var J=u.drawText;u.drawText=function(N,W){if(null!=N.text&&
-null!=N.text.value&&N.text.checkBounds()&&(mxUtils.isNode(N.text.value)||N.text.dialect==mxConstants.DIALECT_STRICTHTML)){var T=N.text.getContentNode();if(null!=T){T=T.cloneNode(!0);if(T.getElementsByTagNameNS)for(var Q=T.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<Q.length;)Q[0].parentNode.removeChild(Q[0]);null!=T.innerHTML&&(Q=N.text.value,N.text.value=T.innerHTML,J.apply(this,arguments),N.text.value=Q)}}else J.apply(this,arguments)}}return u};var X=mxCellRenderer.prototype.destroy;
+Z=document.createElement("div");Z.style.whiteSpace="nowrap";Z.style.position="relative";Z.style.textAlign="center";Z.style.width="210px";for(var na=[],va=0;va<this.defaultColorSchemes.length;va++){var Ba=document.createElement("div");Ba.style.display="inline-block";Ba.style.width="6px";Ba.style.height="6px";Ba.style.marginLeft="4px";Ba.style.marginRight="3px";Ba.style.borderRadius="3px";Ba.style.cursor="pointer";Ba.style.background="transparent";Ba.style.border="1px solid #b5b6b7";mxUtils.bind(this,
+function(Ca){mxEvent.addListener(Ba,"click",mxUtils.bind(this,function(){sa(Ca)}))})(va);na.push(Ba);Z.appendChild(Ba)}var sa=mxUtils.bind(this,function(Ca){null!=na[Ca]&&(null!=this.format.currentScheme&&null!=na[this.format.currentScheme]&&(na[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=Ca,Da(this.defaultColorSchemes[this.format.currentScheme]),na[this.format.currentScheme].style.background="#84d7ff")}),Da=mxUtils.bind(this,function(Ca){var Qa=mxUtils.bind(this,
+function(cb){var Ka=mxUtils.button("",mxUtils.bind(this,function(z){W.getModel().beginUpdate();try{for(var L=N.getSelectionState().cells,M=0;M<L.length;M++){for(var S=W.getModel().getStyle(L[M]),ca=0;ca<Q.length;ca++)S=mxUtils.removeStylename(S,Q[ca]);var ha=W.getModel().isVertex(L[M])?W.defaultVertexStyle:W.defaultEdgeStyle;null!=cb?(mxEvent.isShiftDown(z)||(S=""==cb.fill?mxUtils.setStyle(S,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(S,mxConstants.STYLE_FILLCOLOR,cb.fill||mxUtils.getValue(ha,
+mxConstants.STYLE_FILLCOLOR,null)),S=mxUtils.setStyle(S,mxConstants.STYLE_GRADIENTCOLOR,cb.gradient||mxUtils.getValue(ha,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(z)||mxClient.IS_MAC&&mxEvent.isMetaDown(z)||!W.getModel().isVertex(L[M])||(S=mxUtils.setStyle(S,mxConstants.STYLE_FONTCOLOR,cb.font||mxUtils.getValue(ha,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(z)||(S=""==cb.stroke?mxUtils.setStyle(S,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(S,mxConstants.STYLE_STROKECOLOR,
+cb.stroke||mxUtils.getValue(ha,mxConstants.STYLE_STROKECOLOR,null)))):(S=mxUtils.setStyle(S,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(ha,mxConstants.STYLE_FILLCOLOR,"#ffffff")),S=mxUtils.setStyle(S,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(ha,mxConstants.STYLE_STROKECOLOR,"#000000")),S=mxUtils.setStyle(S,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(ha,mxConstants.STYLE_GRADIENTCOLOR,null)),W.getModel().isVertex(L[M])&&(S=mxUtils.setStyle(S,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(ha,
+mxConstants.STYLE_FONTCOLOR,null))));W.getModel().setStyle(L[M],S)}}finally{W.getModel().endUpdate()}}));Ka.className="geStyleButton";Ka.style.width="36px";Ka.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Ka.style.margin="0px 6px 6px 0px";if(null!=cb){var Ua="1"==urlParams.sketch?"2px solid":"1px solid";null!=cb.gradient?mxClient.IS_IE&&10>document.documentMode?Ka.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+cb.fill+"', EndColorStr='"+cb.gradient+"', GradientType=0)":
+Ka.style.backgroundImage="linear-gradient("+cb.fill+" 0px,"+cb.gradient+" 100%)":cb.fill==mxConstants.NONE?Ka.style.background="url('"+Dialog.prototype.noColorImage+"')":Ka.style.backgroundColor=""==cb.fill?mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):cb.fill||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Ka.style.border=cb.stroke==mxConstants.NONE?Ua+" transparent":
+""==cb.stroke?Ua+" "+mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ua+" "+(cb.stroke||mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=cb.title&&Ka.setAttribute("title",cb.title)}else{Ua=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var $a=mxUtils.getValue(W.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Ka.style.backgroundColor=
+Ua;Ka.style.border="1px solid "+$a}Ka.style.borderRadius="0";T.appendChild(Ka)});T.innerHTML="";for(var Za=0;Za<Ca.length;Za++)0<Za&&0==mxUtils.mod(Za,4)&&mxUtils.br(T),Qa(Ca[Za])});null==this.format.currentScheme?sa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):sa(this.format.currentScheme);va=10>=this.defaultColorSchemes.length?28:8;var Aa=document.createElement("div");Aa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var za=document.createElement("div");za.style.cssText="position:absolute;left:202px;top:8px;bottom:"+va+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(u.appendChild(Aa),u.appendChild(za));mxEvent.addListener(za,"click",mxUtils.bind(this,function(){sa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));I(Aa);I(za);Da(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&u.appendChild(Z);return u};StyleFormatPanel.prototype.addEditOps=function(u){var I=this.editorUi.getSelectionState(),N=this.editorUi.editor.graph,W=null;1==I.cells.length&&(W=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(T){this.editorUi.actions.get("editStyle").funct()})),W.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),W.style.width="210px",W.style.marginBottom="2px",u.appendChild(W));N=1==I.cells.length?N.view.getState(I.cells[0]):null;null!=N&&null!=N.shape&&null!=N.shape.stencil?(I=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(T){this.editorUi.actions.get("editShape").funct()})),I.setAttribute("title",
+mxResources.get("editShape")),I.style.marginBottom="2px",null==W?I.style.width="210px":(W.style.width="104px",I.style.width="104px",I.style.marginLeft="2px"),u.appendChild(I)):I.image&&0<I.cells.length&&(I=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(T){this.editorUi.actions.get("image").funct()})),I.setAttribute("title",mxResources.get("editImage")),I.style.marginBottom="2px",null==W?I.style.width="210px":(W.style.width="104px",I.style.width="104px",I.style.marginLeft="2px"),
+u.appendChild(I));return u}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(u){return u.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(u){return Graph.isGoogleFontUrl(u)};Graph.createFontElement=function(u,
+I){var N=Graph.fontMapping[I];null==N&&Graph.isCssFontUrl(I)?(u=document.createElement("link"),u.setAttribute("rel","stylesheet"),u.setAttribute("type","text/css"),u.setAttribute("charset","UTF-8"),u.setAttribute("href",I)):(null==N&&(N='@font-face {\nfont-family: "'+u+'";\nsrc: url("'+I+'");\n}'),u=document.createElement("style"),mxUtils.write(u,N));return u};Graph.addFont=function(u,I,N){if(null!=u&&0<u.length&&null!=I&&0<I.length){var W=u.toLowerCase();if("helvetica"!=W&&"arial"!=u&&"sans-serif"!=
+W){var T=Graph.customFontElements[W];null!=T&&T.url!=I&&(T.elt.parentNode.removeChild(T.elt),T=null);null==T?(T=I,"http:"==I.substring(0,5)&&(T=PROXY_URL+"?url="+encodeURIComponent(I)),T={name:u,url:I,elt:Graph.createFontElement(u,T)},Graph.customFontElements[W]=T,Graph.recentCustomFonts[W]=T,I=document.getElementsByTagName("head")[0],null!=N&&("link"==T.elt.nodeName.toLowerCase()?(T.elt.onload=N,T.elt.onerror=N):N()),null!=I&&I.appendChild(T.elt)):null!=N&&N()}else null!=N&&N()}else null!=N&&N();
+return u};Graph.getFontUrl=function(u,I){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(I=u.url);return I};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var I=0;I<u.length;I++){var N=u[I].getAttribute("data-font-src");if(null!=N){var W="FONT"==u[I].nodeName?u[I].getAttribute("face"):u[I].style.fontFamily;null!=W&&Graph.addFont(W,N)}}};Graph.processFontStyle=function(u){if(null!=u){var I=mxUtils.getValue(u,"fontSource",null);if(null!=I){var N=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY,
+null);null!=N&&Graph.addFont(N,decodeURIComponent(I))}}return u};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var H=Graph.prototype.init;Graph.prototype.init=function(){function u(T){I=T}H.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var I=null;mxEvent.addListener(this.container,"mouseenter",u);mxEvent.addListener(this.container,"mousemove",u);mxEvent.addListener(this.container,"mouseleave",function(T){I=null});this.isMouseInsertPoint=function(){return null!=I};var N=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=I?this.getPointForEvent(I):N.apply(this,arguments)};var W=this.layoutManager.getLayout;this.layoutManager.getLayout=function(T){var Q=this.graph.getCellStyle(T);if(null!=Q&&"rack"==Q.childLayout){var Z=new mxStackLayout(this.graph,!1);Z.gridSize=null!=Q.rackUnitSize?parseFloat(Q.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;Z.marginLeft=Q.marginLeft||0;Z.marginRight=Q.marginRight||0;Z.marginTop=Q.marginTop||0;Z.marginBottom=
+Q.marginBottom||0;Z.allowGaps=Q.allowGaps||0;Z.horizontal="1"==mxUtils.getValue(Q,"horizontalRack","0");Z.resizeParent=!1;Z.fill=!0;return Z}return W.apply(this,arguments)};this.updateGlobalUrlVariables()};var G=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,I){return Graph.processFontStyle(G.apply(this,arguments))};var aa=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,I,N,W,T,Q,Z,na,va,Ba,sa){aa.apply(this,arguments);
+Graph.processFontAttributes(sa)};var da=mxText.prototype.redraw;mxText.prototype.redraw=function(){da.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,I,N){function W(){for(var Ca=Z.getSelectionCells(),Qa=[],Za=0;Za<Ca.length;Za++)Z.isCellVisible(Ca[Za])&&Qa.push(Ca[Za]);Z.setSelectionCells(Qa)}function T(Ca){Z.setHiddenTags(Ca?[]:na.slice());W();Z.refresh()}function Q(Ca,Qa){Ba.innerHTML="";if(0<
+Ca.length){var Za=document.createElement("table");Za.setAttribute("cellpadding","2");Za.style.boxSizing="border-box";Za.style.tableLayout="fixed";Za.style.width="100%";var cb=document.createElement("tbody");if(null!=Ca&&0<Ca.length)for(var Ka=0;Ka<Ca.length;Ka++)(function(Ua){var $a=0>mxUtils.indexOf(Z.hiddenTags,Ua),z=document.createElement("tr"),L=document.createElement("td");L.style.align="center";L.style.width="16px";var M=document.createElement("img");M.setAttribute("src",$a?Editor.visibleImage:
+Editor.hiddenImage);M.setAttribute("title",mxResources.get($a?"hideIt":"show",[Ua]));mxUtils.setOpacity(M,$a?75:25);M.style.verticalAlign="middle";M.style.cursor="pointer";M.style.width="16px";if(I||Editor.isDarkMode())M.style.filter="invert(100%)";L.appendChild(M);mxEvent.addListener(M,"click",function(ca){mxEvent.isShiftDown(ca)?T(0<=mxUtils.indexOf(Z.hiddenTags,Ua)):(Z.toggleHiddenTag(Ua),W(),Z.refresh());mxEvent.consume(ca)});z.appendChild(L);L=document.createElement("td");L.style.overflow="hidden";
+L.style.whiteSpace="nowrap";L.style.textOverflow="ellipsis";L.style.verticalAlign="middle";L.style.cursor="pointer";L.setAttribute("title",Ua);a=document.createElement("a");mxUtils.write(a,Ua);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,$a?100:40);L.appendChild(a);mxEvent.addListener(L,"click",function(ca){if(mxEvent.isShiftDown(ca)){T(!0);var ha=Z.getCellsForTags([Ua],null,null,!0);Z.isEnabled()?Z.setSelectionCells(ha):Z.highlightCells(ha)}else if($a&&0<Z.hiddenTags.length)T(!0);
+else{ha=na.slice();var oa=mxUtils.indexOf(ha,Ua);ha.splice(oa,1);Z.setHiddenTags(ha);W();Z.refresh()}mxEvent.consume(ca)});z.appendChild(L);if(Z.isEnabled()){L=document.createElement("td");L.style.verticalAlign="middle";L.style.textAlign="center";L.style.width="18px";if(null==Qa){L.style.align="center";L.style.width="16px";M=document.createElement("img");M.setAttribute("src",Editor.crossImage);M.setAttribute("title",mxResources.get("removeIt",[Ua]));mxUtils.setOpacity(M,$a?75:25);M.style.verticalAlign=
+"middle";M.style.cursor="pointer";M.style.width="16px";if(I||Editor.isDarkMode())M.style.filter="invert(100%)";mxEvent.addListener(M,"click",function(ca){var ha=mxUtils.indexOf(na,Ua);0<=ha&&na.splice(ha,1);Z.removeTagsForCells(Z.model.getDescendants(Z.model.getRoot()),[Ua]);Z.refresh();mxEvent.consume(ca)});L.appendChild(M)}else{var S=document.createElement("input");S.setAttribute("type","checkbox");S.style.margin="0px";S.defaultChecked=null!=Qa&&0<=mxUtils.indexOf(Qa,Ua);S.checked=S.defaultChecked;
+S.style.background="transparent";S.setAttribute("title",mxResources.get(S.defaultChecked?"removeIt":"add",[Ua]));mxEvent.addListener(S,"change",function(ca){S.checked?Z.addTagsForCells(Z.getSelectionCells(),[Ua]):Z.removeTagsForCells(Z.getSelectionCells(),[Ua]);mxEvent.consume(ca)});L.appendChild(S)}z.appendChild(L)}cb.appendChild(z)})(Ca[Ka]);Za.appendChild(cb);Ba.appendChild(Za)}}var Z=this,na=Z.hiddenTags.slice(),va=document.createElement("div");va.style.userSelect="none";va.style.overflow="hidden";
+va.style.padding="10px";va.style.height="100%";var Ba=document.createElement("div");Ba.style.boxSizing="border-box";Ba.style.borderRadius="4px";Ba.style.userSelect="none";Ba.style.overflow="auto";Ba.style.position="absolute";Ba.style.left="10px";Ba.style.right="10px";Ba.style.top="10px";Ba.style.border=Z.isEnabled()?"1px solid #808080":"none";Ba.style.bottom=Z.isEnabled()?"48px":"10px";va.appendChild(Ba);var sa=mxUtils.button(mxResources.get("reset"),function(Ca){Z.setHiddenTags([]);mxEvent.isShiftDown(Ca)||
+(na=Z.hiddenTags.slice());W();Z.refresh()});sa.setAttribute("title",mxResources.get("reset"));sa.className="geBtn";sa.style.margin="0 4px 0 0";var Da=mxUtils.button(mxResources.get("add"),function(){null!=N&&N(na,function(Ca){na=Ca;Aa()})});Da.setAttribute("title",mxResources.get("add"));Da.className="geBtn";Da.style.margin="0";Z.addListener(mxEvent.ROOT,function(){na=Z.hiddenTags.slice()});var Aa=mxUtils.bind(this,function(Ca,Qa){if(u()){Ca=Z.getAllTags();for(Qa=0;Qa<Ca.length;Qa++)0>mxUtils.indexOf(na,
+Ca[Qa])&&na.push(Ca[Qa]);na.sort();Z.isSelectionEmpty()?Q(na):Q(na,Z.getCommonTagsForCells(Z.getSelectionCells()))}});Z.selectionModel.addListener(mxEvent.CHANGE,Aa);Z.model.addListener(mxEvent.CHANGE,Aa);Z.addListener(mxEvent.REFRESH,Aa);var za=document.createElement("div");za.style.boxSizing="border-box";za.style.whiteSpace="nowrap";za.style.position="absolute";za.style.overflow="hidden";za.style.bottom="0px";za.style.height="42px";za.style.right="10px";za.style.left="10px";Z.isEnabled()&&(za.appendChild(sa),
+za.appendChild(Da),va.appendChild(za));return{div:va,refresh:Aa}};Graph.prototype.getCustomFonts=function(){var u=this.extFonts;u=null!=u?u.slice():[];for(var I in Graph.customFontElements){var N=Graph.customFontElements[I];u.push({name:N.name,url:N.url})}return u};Graph.prototype.setFont=function(u,I){Graph.addFont(u,I);document.execCommand("fontname",!1,u);if(null!=I){var N=this.cellEditor.textarea.getElementsByTagName("font");I=Graph.getFontUrl(u,I);for(var W=0;W<N.length;W++)N[W].getAttribute("face")==
+u&&N[W].getAttribute("data-font-src")!=I&&N[W].setAttribute("data-font-src",I)}};var ba=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return ba.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=null!=this.globalVars?mxUtils.clone(this.globalVars):{};var u=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=u)for(var I in u)this.globalVars[I]=
+u[I]}catch(N){null!=window.console&&console.log("Error in vars URL parameter: "+N)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var Y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var I=Y.apply(this,arguments);null==I&&null!=this.globalVars&&(I=this.globalVars[u]);return I};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=this.themes["default-style2"];this.defaultStylesheet=
+(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var pa=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,I,N,W,T,Q,Z,na,va,Ba,sa,Da,Aa,za){var Ca=null,Qa=null,Za=null;Da||null==this.themes||"darkTheme"!=this.defaultThemeName||(Ca=this.stylesheet,Qa=this.shapeForegroundColor,Za=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?"#000000":Editor.lightColor,this.shapeBackgroundColor=
+"darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var cb=pa.apply(this,arguments),Ka=this.getCustomFonts();if(sa&&0<Ka.length){var Ua=cb.ownerDocument,$a=null!=Ua.createElementNS?Ua.createElementNS(mxConstants.NS_SVG,"style"):Ua.createElement("style");null!=Ua.setAttributeNS?$a.setAttributeNS("type","text/css"):$a.setAttribute("type","text/css");for(var z="",L="",M=0;M<Ka.length;M++){var S=Ka[M].name,ca=Ka[M].url;Graph.isCssFontUrl(ca)?
+z+="@import url("+ca+");\n":L+='@font-face {\nfont-family: "'+S+'";\nsrc: url("'+ca+'");\n}\n'}$a.appendChild(Ua.createTextNode(z+L));cb.getElementsByTagName("defs")[0].appendChild($a)}null!=Ca&&(this.shapeBackgroundColor=Za,this.shapeForegroundColor=Qa,this.stylesheet=Ca,this.refresh());return cb};var O=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var u=O.apply(this,arguments);if(this.mathEnabled){var I=u.drawText;u.drawText=function(N,W){if(null!=N.text&&
+null!=N.text.value&&N.text.checkBounds()&&(mxUtils.isNode(N.text.value)||N.text.dialect==mxConstants.DIALECT_STRICTHTML)){var T=N.text.getContentNode();if(null!=T){T=T.cloneNode(!0);if(T.getElementsByTagNameNS)for(var Q=T.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<Q.length;)Q[0].parentNode.removeChild(Q[0]);null!=T.innerHTML&&(Q=N.text.value,N.text.value=T.innerHTML,I.apply(this,arguments),N.text.value=Q)}}else I.apply(this,arguments)}}return u};var X=mxCellRenderer.prototype.destroy;
mxCellRenderer.prototype.destroy=function(u){X.apply(this,arguments);null!=u.secondLabel&&(u.secondLabel.destroy(),u.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(u){return[u.shape,u.text,u.secondLabel,u.control]};var ea=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){ea.apply(this,arguments);this.enumerationState=0};var ka=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(u){null!=u.shape&&
-this.redrawEnumerationState(u);return ka.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(u){u=decodeURIComponent(mxUtils.getValue(u.style,"enumerateValue",""));""==u&&(u=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(u)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(u){var J="1"==mxUtils.getValue(u.style,"enumerate",0);J&&null==u.secondLabel?(u.secondLabel=new mxText("",
-new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),u.secondLabel.size=12,u.secondLabel.state=u,u.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(u,u.secondLabel)):J||null==u.secondLabel||(u.secondLabel.destroy(),u.secondLabel=null);J=u.secondLabel;if(null!=J){var N=u.view.scale,W=this.createEnumerationValue(u);u=this.graph.model.isVertex(u.cell)?new mxRectangle(u.x+u.width-4*N,u.y+4*N,0,0):mxRectangle.fromPoint(u.view.getPoint(u));J.bounds.equals(u)&&
-J.value==W&&J.scale==N||(J.bounds=u,J.value=W,J.scale=N,J.redraw())}};var ja=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){ja.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var u=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&
+this.redrawEnumerationState(u);return ka.apply(this,arguments)};mxGraphView.prototype.createEnumerationValue=function(u){u=decodeURIComponent(mxUtils.getValue(u.style,"enumerateValue",""));""==u&&(u=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(u)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(u){var I="1"==mxUtils.getValue(u.style,"enumerate",0);I&&null==u.secondLabel?(u.secondLabel=new mxText("",
+new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),u.secondLabel.size=12,u.secondLabel.state=u,u.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(u,u.secondLabel)):I||null==u.secondLabel||(u.secondLabel.destroy(),u.secondLabel=null);I=u.secondLabel;if(null!=I){var N=u.view.scale,W=this.createEnumerationValue(u);u=this.graph.model.isVertex(u.cell)?new mxRectangle(u.x+u.width-4*N,u.y+4*N,0,0):mxRectangle.fromPoint(u.view.getPoint(u));I.bounds.equals(u)&&
+I.value==W&&I.scale==N||(I.bounds=u,I.value=W,I.scale=N,I.redraw())}};var ja=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){ja.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var u=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&
("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",u.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,u.ownerSVGElement))}};var U=Graph.prototype.refresh;
-Graph.prototype.refresh=function(){U.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var I=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){I.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(u){"data:action/json,"==u.substring(0,
-17)&&(u=JSON.parse(u.substring(17)),null!=u.actions&&this.executeCustomActions(u.actions))};Graph.prototype.executeCustomActions=function(u,J){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var N=!1,W=0,T=0,Q=mxUtils.bind(this,function(){N||(N=
-!0,this.model.beginUpdate())}),Z=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),oa=mxUtils.bind(this,function(){0<W&&W--;0==W&&wa()}),wa=mxUtils.bind(this,function(){if(T<u.length){var Aa=this.stoppingCustomActions,ta=u[T++],Ba=[];if(null!=ta.open)if(Z(),this.isCustomLink(ta.open)){if(!this.customLinkClicked(ta.open))return}else this.openLink(ta.open);null==ta.wait||Aa||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=
-null;oa()}),W++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=ta.wait?parseInt(ta.wait):1E3),Z());null!=ta.opacity&&null!=ta.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(ta.opacity,!0)),ta.opacity.value);null!=ta.fadeIn&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ta.fadeIn,!0)),0,1,oa,Aa?0:ta.fadeIn.delay));null!=ta.fadeOut&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ta.fadeOut,!0)),
-1,0,oa,Aa?0:ta.fadeOut.delay));null!=ta.wipeIn&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(ta.wipeIn,!0),!0)));null!=ta.wipeOut&&(Ba=Ba.concat(this.createWipeAnimations(this.getCellsForAction(ta.wipeOut,!0),!1)));null!=ta.toggle&&(Q(),this.toggleCells(this.getCellsForAction(ta.toggle,!0)));if(null!=ta.show){Q();var va=this.getCellsForAction(ta.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(va),1);this.setCellsVisible(va,!0)}null!=ta.hide&&(Q(),va=this.getCellsForAction(ta.hide,
-!0),Graph.setOpacityForNodes(this.getNodesForCells(va),0),this.setCellsVisible(va,!1));null!=ta.toggleStyle&&null!=ta.toggleStyle.key&&(Q(),this.toggleCellStyles(ta.toggleStyle.key,null!=ta.toggleStyle.defaultValue?ta.toggleStyle.defaultValue:"0",this.getCellsForAction(ta.toggleStyle,!0)));null!=ta.style&&null!=ta.style.key&&(Q(),this.setCellStyles(ta.style.key,ta.style.value,this.getCellsForAction(ta.style,!0)));va=[];null!=ta.select&&this.isEnabled()&&(va=this.getCellsForAction(ta.select),this.setSelectionCells(va));
-null!=ta.highlight&&(va=this.getCellsForAction(ta.highlight),this.highlightCells(va,ta.highlight.color,ta.highlight.duration,ta.highlight.opacity));null!=ta.scroll&&(va=this.getCellsForAction(ta.scroll));null!=ta.viewbox&&this.fitWindow(ta.viewbox,ta.viewbox.border);0<va.length&&this.scrollCellToVisible(va[0]);if(null!=ta.tags){va=[];null!=ta.tags.hidden&&(va=va.concat(ta.tags.hidden));if(null!=ta.tags.visible)for(var Oa=this.getAllTags(),Ca=0;Ca<Oa.length;Ca++)0>mxUtils.indexOf(ta.tags.visible,Oa[Ca])&&
-0>mxUtils.indexOf(va,Oa[Ca])&&va.push(Oa[Ca]);this.setHiddenTags(va);this.refresh()}0<Ba.length&&(W++,this.executeAnimations(Ba,oa,Aa?1:ta.steps,Aa?0:ta.delay));0==W?wa():Z()}else this.stoppingCustomActions=this.executingCustomActions=!1,Z(),null!=J&&J()});wa()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,J){var N=this.getLinkForCell(J);null!=N&&"data:action/json,"==N.substring(0,17)&&this.setLinkForCell(J,this.updateCustomLink(u,N));if(this.isHtmlLabel(J)){var W=document.createElement("div");
-W.innerHTML=this.sanitizeHtml(this.getLabel(J));for(var T=W.getElementsByTagName("a"),Q=!1,Z=0;Z<T.length;Z++)N=T[Z].getAttribute("href"),null!=N&&"data:action/json,"==N.substring(0,17)&&(T[Z].setAttribute("href",this.updateCustomLink(u,N)),Q=!0);Q&&this.labelChanged(J,W.innerHTML)}};Graph.prototype.updateCustomLink=function(u,J){if("data:action/json,"==J.substring(0,17))try{var N=JSON.parse(J.substring(17));null!=N.actions&&(this.updateCustomLinkActions(u,N.actions),J="data:action/json,"+JSON.stringify(N))}catch(W){}return J};
-Graph.prototype.updateCustomLinkActions=function(u,J){for(var N=0;N<J.length;N++){var W=J[N],T;for(T in W)this.updateCustomLinkAction(u,W[T],"cells"),this.updateCustomLinkAction(u,W[T],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,J,N){if(null!=J&&null!=J[N]){for(var W=[],T=0;T<J[N].length;T++)if("*"==J[N][T])W.push(J[N][T]);else{var Q=u[J[N][T]];null!=Q?""!=Q&&W.push(Q):W.push(J[N][T])}J[N]=W}};Graph.prototype.getCellsForAction=function(u,J){J=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,
-null,J));if(null!=u.excludeCells){for(var N=[],W=0;W<J.length;W++)0>u.excludeCells.indexOf(J[W].id)&&N.push(J[W]);J=N}return J};Graph.prototype.getCellsById=function(u){var J=[];if(null!=u)for(var N=0;N<u.length;N++)if("*"==u[N]){var W=this.model.getRoot();J=J.concat(this.model.filterDescendants(function(Q){return Q!=W},W))}else{var T=this.model.getCell(u[N]);null!=T&&J.push(T)}return J};var V=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return V.apply(this,arguments)&&
-!this.isAllTagsHidden(this.getTagsForCell(u))};Graph.prototype.setHiddenTags=function(u){this.hiddenTags=u;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(u){var J=mxUtils.indexOf(this.hiddenTags,u);0>J?this.hiddenTags.push(u):0<=J&&this.hiddenTags.splice(J,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(u){if(null==u||0==u.length||0==this.hiddenTags.length)return!1;u=u.split(" ");if(u.length>this.hiddenTags.length)return!1;
-for(var J=0;J<u.length;J++)if(0>mxUtils.indexOf(this.hiddenTags,u[J]))return!1;return!0};Graph.prototype.getCellsForTags=function(u,J,N,W){var T=[];if(null!=u){J=null!=J?J:this.model.getDescendants(this.model.getRoot());for(var Q=0,Z={},oa=0;oa<u.length;oa++)0<u[oa].length&&(Z[u[oa]]=!0,Q++);for(oa=0;oa<J.length;oa++)if(N&&this.model.getParent(J[oa])==this.model.root||this.model.isVertex(J[oa])||this.model.isEdge(J[oa])){var wa=this.getTagsForCell(J[oa]),Aa=!1;if(0<wa.length&&(wa=wa.split(" "),wa.length>=
-u.length)){for(var ta=Aa=0;ta<wa.length&&Aa<Q;ta++)null!=Z[wa[ta]]&&Aa++;Aa=Aa==Q}Aa&&(1!=W||this.isCellVisible(J[oa]))&&T.push(J[oa])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(u){for(var J=null,N=[],W=0;W<u.length;W++){var T=this.getTagsForCell(u[W]);N=[];if(0<T.length){T=T.split(" ");for(var Q={},Z=0;Z<T.length;Z++)if(null==J||null!=J[T[Z]])Q[T[Z]]=!0,N.push(T[Z]);
-J=Q}else return[]}return N};Graph.prototype.getTagsForCells=function(u){for(var J=[],N={},W=0;W<u.length;W++){var T=this.getTagsForCell(u[W]);if(0<T.length){T=T.split(" ");for(var Q=0;Q<T.length;Q++)null==N[T[Q]]&&(N[T[Q]]=!0,J.push(T[Q]))}}return J};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,"tags","")};Graph.prototype.addTagsForCells=function(u,J){if(0<u.length&&0<J.length){this.model.beginUpdate();try{for(var N=0;N<u.length;N++){for(var W=this.getTagsForCell(u[N]),
-T=W.split(" "),Q=!1,Z=0;Z<J.length;Z++){var oa=mxUtils.trim(J[Z]);""!=oa&&0>mxUtils.indexOf(T,oa)&&(W=0<W.length?W+" "+oa:oa,Q=!0)}Q&&this.setAttributeForCell(u[N],"tags",W)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,J){if(0<u.length&&0<J.length){this.model.beginUpdate();try{for(var N=0;N<u.length;N++){var W=this.getTagsForCell(u[N]);if(0<W.length){for(var T=W.split(" "),Q=!1,Z=0;Z<J.length;Z++){var oa=mxUtils.indexOf(T,J[Z]);0<=oa&&(T.splice(oa,1),Q=!0)}Q&&this.setAttributeForCell(u[N],
-"tags",T.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(u){this.model.beginUpdate();try{for(var J=0;J<u.length;J++)this.model.setVisible(u[J],!this.model.isVisible(u[J]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(u,J){this.model.beginUpdate();try{for(var N=0;N<u.length;N++)this.model.setVisible(u[N],J)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(u,J,N,W){for(var T=0;T<u.length;T++)this.highlightCell(u[T],
-J,N,W)};Graph.prototype.highlightCell=function(u,J,N,W,T){J=null!=J?J:mxConstants.DEFAULT_VALID_COLOR;N=null!=N?N:1E3;u=this.view.getState(u);var Q=null;null!=u&&(T=null!=T?T:4,T=Math.max(T+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+T),Q=new mxCellHighlight(this,J,T,!1),null!=W&&(Q.opacity=W),Q.highlight(u),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,"transition","all 1200ms ease-in-out"),Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},
-1200)},N));return Q};Graph.prototype.addSvgShadow=function(u,J,N,W){N=null!=N?N:!1;W=null!=W?W:!0;var T=u.ownerDocument,Q=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"filter"):T.createElement("filter");Q.setAttribute("id",this.shadowId);var Z=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):T.createElement("feGaussianBlur");Z.setAttribute("in","SourceAlpha");Z.setAttribute("stdDeviation",this.svgShadowBlur);Z.setAttribute("result","blur");Q.appendChild(Z);
+Graph.prototype.refresh=function(){U.apply(this,arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var J=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){J.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(u){"data:action/json,"==u.substring(0,
+17)&&(u=JSON.parse(u.substring(17)),null!=u.actions&&this.executeCustomActions(u.actions))};Graph.prototype.executeCustomActions=function(u,I){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var N=!1,W=0,T=0,Q=mxUtils.bind(this,function(){N||(N=
+!0,this.model.beginUpdate())}),Z=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),na=mxUtils.bind(this,function(){0<W&&W--;0==W&&va()}),va=mxUtils.bind(this,function(){if(T<u.length){var Ba=this.stoppingCustomActions,sa=u[T++],Da=[];if(null!=sa.open)if(Z(),this.isCustomLink(sa.open)){if(!this.customLinkClicked(sa.open))return}else this.openLink(sa.open);null==sa.wait||Ba||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=
+null;na()}),W++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,""!=sa.wait?parseInt(sa.wait):1E3),Z());null!=sa.opacity&&null!=sa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(sa.opacity,!0)),sa.opacity.value);null!=sa.fadeIn&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeIn,!0)),0,1,na,Ba?0:sa.fadeIn.delay));null!=sa.fadeOut&&(W++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(sa.fadeOut,!0)),
+1,0,na,Ba?0:sa.fadeOut.delay));null!=sa.wipeIn&&(Da=Da.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeIn,!0),!0)));null!=sa.wipeOut&&(Da=Da.concat(this.createWipeAnimations(this.getCellsForAction(sa.wipeOut,!0),!1)));null!=sa.toggle&&(Q(),this.toggleCells(this.getCellsForAction(sa.toggle,!0)));if(null!=sa.show){Q();var Aa=this.getCellsForAction(sa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Aa),1);this.setCellsVisible(Aa,!0)}null!=sa.hide&&(Q(),Aa=this.getCellsForAction(sa.hide,
+!0),Graph.setOpacityForNodes(this.getNodesForCells(Aa),0),this.setCellsVisible(Aa,!1));null!=sa.toggleStyle&&null!=sa.toggleStyle.key&&(Q(),this.toggleCellStyles(sa.toggleStyle.key,null!=sa.toggleStyle.defaultValue?sa.toggleStyle.defaultValue:"0",this.getCellsForAction(sa.toggleStyle,!0)));null!=sa.style&&null!=sa.style.key&&(Q(),this.setCellStyles(sa.style.key,sa.style.value,this.getCellsForAction(sa.style,!0)));Aa=[];null!=sa.select&&this.isEnabled()&&(Aa=this.getCellsForAction(sa.select),this.setSelectionCells(Aa));
+null!=sa.highlight&&(Aa=this.getCellsForAction(sa.highlight),this.highlightCells(Aa,sa.highlight.color,sa.highlight.duration,sa.highlight.opacity));null!=sa.scroll&&(Aa=this.getCellsForAction(sa.scroll));null!=sa.viewbox&&this.fitWindow(sa.viewbox,sa.viewbox.border);0<Aa.length&&this.scrollCellToVisible(Aa[0]);if(null!=sa.tags){Aa=[];null!=sa.tags.hidden&&(Aa=Aa.concat(sa.tags.hidden));if(null!=sa.tags.visible)for(var za=this.getAllTags(),Ca=0;Ca<za.length;Ca++)0>mxUtils.indexOf(sa.tags.visible,za[Ca])&&
+0>mxUtils.indexOf(Aa,za[Ca])&&Aa.push(za[Ca]);this.setHiddenTags(Aa);this.refresh()}0<Da.length&&(W++,this.executeAnimations(Da,na,Ba?1:sa.steps,Ba?0:sa.delay));0==W?va():Z()}else this.stoppingCustomActions=this.executingCustomActions=!1,Z(),null!=I&&I()});va()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,I){var N=this.getLinkForCell(I);null!=N&&"data:action/json,"==N.substring(0,17)&&this.setLinkForCell(I,this.updateCustomLink(u,N));if(this.isHtmlLabel(I)){var W=document.createElement("div");
+W.innerHTML=this.sanitizeHtml(this.getLabel(I));for(var T=W.getElementsByTagName("a"),Q=!1,Z=0;Z<T.length;Z++)N=T[Z].getAttribute("href"),null!=N&&"data:action/json,"==N.substring(0,17)&&(T[Z].setAttribute("href",this.updateCustomLink(u,N)),Q=!0);Q&&this.labelChanged(I,W.innerHTML)}};Graph.prototype.updateCustomLink=function(u,I){if("data:action/json,"==I.substring(0,17))try{var N=JSON.parse(I.substring(17));null!=N.actions&&(this.updateCustomLinkActions(u,N.actions),I="data:action/json,"+JSON.stringify(N))}catch(W){}return I};
+Graph.prototype.updateCustomLinkActions=function(u,I){for(var N=0;N<I.length;N++){var W=I[N],T;for(T in W)this.updateCustomLinkAction(u,W[T],"cells"),this.updateCustomLinkAction(u,W[T],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,I,N){if(null!=I&&null!=I[N]){for(var W=[],T=0;T<I[N].length;T++)if("*"==I[N][T])W.push(I[N][T]);else{var Q=u[I[N][T]];null!=Q?""!=Q&&W.push(Q):W.push(I[N][T])}I[N]=W}};Graph.prototype.getCellsForAction=function(u,I){I=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,
+null,I));if(null!=u.excludeCells){for(var N=[],W=0;W<I.length;W++)0>u.excludeCells.indexOf(I[W].id)&&N.push(I[W]);I=N}return I};Graph.prototype.getCellsById=function(u){var I=[];if(null!=u)for(var N=0;N<u.length;N++)if("*"==u[N]){var W=this.model.getRoot();I=I.concat(this.model.filterDescendants(function(Q){return Q!=W},W))}else{var T=this.model.getCell(u[N]);null!=T&&I.push(T)}return I};var V=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return V.apply(this,arguments)&&
+!this.isAllTagsHidden(this.getTagsForCell(u))};Graph.prototype.setHiddenTags=function(u){this.hiddenTags=u;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(u){var I=mxUtils.indexOf(this.hiddenTags,u);0>I?this.hiddenTags.push(u):0<=I&&this.hiddenTags.splice(I,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(u){if(null==u||0==u.length||0==this.hiddenTags.length)return!1;u=u.split(" ");if(u.length>this.hiddenTags.length)return!1;
+for(var I=0;I<u.length;I++)if(0>mxUtils.indexOf(this.hiddenTags,u[I]))return!1;return!0};Graph.prototype.getCellsForTags=function(u,I,N,W){var T=[];if(null!=u){I=null!=I?I:this.model.getDescendants(this.model.getRoot());for(var Q=0,Z={},na=0;na<u.length;na++)0<u[na].length&&(Z[u[na]]=!0,Q++);for(na=0;na<I.length;na++)if(N&&this.model.getParent(I[na])==this.model.root||this.model.isVertex(I[na])||this.model.isEdge(I[na])){var va=this.getTagsForCell(I[na]),Ba=!1;if(0<va.length&&(va=va.split(" "),va.length>=
+u.length)){for(var sa=Ba=0;sa<va.length&&Ba<Q;sa++)null!=Z[va[sa]]&&Ba++;Ba=Ba==Q}Ba&&(1!=W||this.isCellVisible(I[na]))&&T.push(I[na])}}return T};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(u){for(var I=null,N=[],W=0;W<u.length;W++){var T=this.getTagsForCell(u[W]);N=[];if(0<T.length){T=T.split(" ");for(var Q={},Z=0;Z<T.length;Z++)if(null==I||null!=I[T[Z]])Q[T[Z]]=!0,N.push(T[Z]);
+I=Q}else return[]}return N};Graph.prototype.getTagsForCells=function(u){for(var I=[],N={},W=0;W<u.length;W++){var T=this.getTagsForCell(u[W]);if(0<T.length){T=T.split(" ");for(var Q=0;Q<T.length;Q++)null==N[T[Q]]&&(N[T[Q]]=!0,I.push(T[Q]))}}return I};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,"tags","")};Graph.prototype.addTagsForCells=function(u,I){if(0<u.length&&0<I.length){this.model.beginUpdate();try{for(var N=0;N<u.length;N++){for(var W=this.getTagsForCell(u[N]),
+T=W.split(" "),Q=!1,Z=0;Z<I.length;Z++){var na=mxUtils.trim(I[Z]);""!=na&&0>mxUtils.indexOf(T,na)&&(W=0<W.length?W+" "+na:na,Q=!0)}Q&&this.setAttributeForCell(u[N],"tags",W)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,I){if(0<u.length&&0<I.length){this.model.beginUpdate();try{for(var N=0;N<u.length;N++){var W=this.getTagsForCell(u[N]);if(0<W.length){for(var T=W.split(" "),Q=!1,Z=0;Z<I.length;Z++){var na=mxUtils.indexOf(T,I[Z]);0<=na&&(T.splice(na,1),Q=!0)}Q&&this.setAttributeForCell(u[N],
+"tags",T.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(u){this.model.beginUpdate();try{for(var I=0;I<u.length;I++)this.model.setVisible(u[I],!this.model.isVisible(u[I]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(u,I){this.model.beginUpdate();try{for(var N=0;N<u.length;N++)this.model.setVisible(u[N],I)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(u,I,N,W){for(var T=0;T<u.length;T++)this.highlightCell(u[T],
+I,N,W)};Graph.prototype.highlightCell=function(u,I,N,W,T){I=null!=I?I:mxConstants.DEFAULT_VALID_COLOR;N=null!=N?N:1E3;u=this.view.getState(u);var Q=null;null!=u&&(T=null!=T?T:4,T=Math.max(T+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+T),Q=new mxCellHighlight(this,I,T,!1),null!=W&&(Q.opacity=W),Q.highlight(u),window.setTimeout(function(){null!=Q.shape&&(mxUtils.setPrefixedStyle(Q.shape.node.style,"transition","all 1200ms ease-in-out"),Q.shape.node.style.opacity=0);window.setTimeout(function(){Q.destroy()},
+1200)},N));return Q};Graph.prototype.addSvgShadow=function(u,I,N,W){N=null!=N?N:!1;W=null!=W?W:!0;var T=u.ownerDocument,Q=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"filter"):T.createElement("filter");Q.setAttribute("id",this.shadowId);var Z=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):T.createElement("feGaussianBlur");Z.setAttribute("in","SourceAlpha");Z.setAttribute("stdDeviation",this.svgShadowBlur);Z.setAttribute("result","blur");Q.appendChild(Z);
Z=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feOffset"):T.createElement("feOffset");Z.setAttribute("in","blur");Z.setAttribute("dx",this.svgShadowSize);Z.setAttribute("dy",this.svgShadowSize);Z.setAttribute("result","offsetBlur");Q.appendChild(Z);Z=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feFlood"):T.createElement("feFlood");Z.setAttribute("flood-color",this.svgShadowColor);Z.setAttribute("flood-opacity",this.svgShadowOpacity);Z.setAttribute("result","offsetColor");
Q.appendChild(Z);Z=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feComposite"):T.createElement("feComposite");Z.setAttribute("in","offsetColor");Z.setAttribute("in2","offsetBlur");Z.setAttribute("operator","in");Z.setAttribute("result","offsetBlur");Q.appendChild(Z);Z=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"feBlend"):T.createElement("feBlend");Z.setAttribute("in","SourceGraphic");Z.setAttribute("in2","offsetBlur");Q.appendChild(Z);Z=u.getElementsByTagName("defs");
-0==Z.length?(T=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=u.firstChild?u.insertBefore(T,u.firstChild):u.appendChild(T)):T=Z[0];T.appendChild(Q);N||(J=null!=J?J:u.getElementsByTagName("g")[0],null!=J&&(J.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(u.getAttribute("width")))&&W&&(u.setAttribute("width",parseInt(u.getAttribute("width"))+6),u.setAttribute("height",parseInt(u.getAttribute("height"))+6),J=u.getAttribute("viewBox"),
-null!=J&&0<J.length&&(J=J.split(" "),3<J.length&&(w=parseFloat(J[2])+6,h=parseFloat(J[3])+6,u.setAttribute("viewBox",J[0]+" "+J[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(u,J){mxClient.IS_SVG&&!mxClient.IS_SF&&(J=null!=J?J:!0,(this.shadowVisible=u)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),J&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
-function(){if(null==this.defaultParent){var u=this.model.getChildCount(this.model.root),J=0;do var N=this.model.getChildAt(this.model.root,J);while(J++<u&&"1"==mxUtils.getValue(this.getCellStyle(N),"locked","0"));null!=N&&this.setDefaultParent(N)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
+0==Z.length?(T=null!=T.createElementNS?T.createElementNS(mxConstants.NS_SVG,"defs"):T.createElement("defs"),null!=u.firstChild?u.insertBefore(T,u.firstChild):u.appendChild(T)):T=Z[0];T.appendChild(Q);N||(I=null!=I?I:u.getElementsByTagName("g")[0],null!=I&&(I.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(u.getAttribute("width")))&&W&&(u.setAttribute("width",parseInt(u.getAttribute("width"))+6),u.setAttribute("height",parseInt(u.getAttribute("height"))+6),I=u.getAttribute("viewBox"),
+null!=I&&0<I.length&&(I=I.split(" "),3<I.length&&(w=parseFloat(I[2])+6,h=parseFloat(I[3])+6,u.setAttribute("viewBox",I[0]+" "+I[1]+" "+w+" "+h))))));return Q};Graph.prototype.setShadowVisible=function(u,I){mxClient.IS_SVG&&!mxClient.IS_SF&&(I=null!=I?I:!0,(this.shadowVisible=u)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),I&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
+function(){if(null==this.defaultParent){var u=this.model.getChildCount(this.model.root),I=0;do var N=this.model.getChildAt(this.model.root,I);while(I++<u&&"1"==mxUtils.getValue(this.getCellStyle(N),"locked","0"));null!=N&&this.setDefaultParent(N)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",
STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",
STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=
@@ -3328,36 +3328,36 @@ STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[S
STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];
mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=
[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+
-"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(u){var J=null;null!=u&&0<u.length&&("ER"==u.substring(0,2)?J="mxgraph.er":"sysML"==u.substring(0,5)&&(J="mxgraph.sysml"));return J};var P=mxMarker.createMarker;mxMarker.createMarker=
-function(u,J,N,W,T,Q,Z,oa,wa,Aa){if(null!=N&&null==mxMarker.markers[N]){var ta=this.getPackageForType(N);null!=ta&&mxStencilRegistry.getStencil(ta)}return P.apply(this,arguments)};var R=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(u,J,N,W,T,Q){"1"==mxUtils.getValue(J.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(J.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return R.apply(this,arguments)};PrintDialog.prototype.create=function(u,J){function N(){va.value=Math.max(1,
-Math.min(oa,Math.max(parseInt(va.value),parseInt(Ba.value))));Ba.value=Math.max(1,Math.min(oa,Math.min(parseInt(va.value),parseInt(Ba.value))))}function W(Ea){function Na(cb,eb,hb){var tb=cb.useCssTransforms,vb=cb.currentTranslate,qb=cb.currentScale,Ab=cb.view.translate,Bb=cb.view.scale;cb.useCssTransforms&&(cb.useCssTransforms=!1,cb.currentTranslate=new mxPoint(0,0),cb.currentScale=1,cb.view.translate=new mxPoint(0,0),cb.view.scale=1);var ub=cb.getGraphBounds(),kb=0,gb=0,lb=qa.get(),wb=1/cb.pageScale,
-rb=Ja.checked;if(rb){wb=parseInt(na.value);var xb=parseInt(ra.value);wb=Math.min(lb.height*xb/(ub.height/cb.view.scale),lb.width*wb/(ub.width/cb.view.scale))}else wb=parseInt(Va.value)/(100*cb.pageScale),isNaN(wb)&&(Pa=1/cb.pageScale,Va.value="100 %");lb=mxRectangle.fromRectangle(lb);lb.width=Math.ceil(lb.width*Pa);lb.height=Math.ceil(lb.height*Pa);wb*=Pa;!rb&&cb.pageVisible?(ub=cb.getPageLayout(),kb-=ub.x*lb.width,gb-=ub.y*lb.height):rb=!0;if(null==eb){eb=PrintDialog.createPrintPreview(cb,wb,lb,
-0,kb,gb,rb);eb.pageSelector=!1;eb.mathEnabled=!1;Oa.checked&&(eb.isCellVisible=function(ob){return cb.isCellSelected(ob)});kb=u.getCurrentFile();null!=kb&&(eb.title=kb.getTitle());var zb=eb.writeHead;eb.writeHead=function(ob){zb.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)ob.writeln('<style type="text/css">'),ob.writeln(Editor.mathJaxWebkitCss),ob.writeln("</style>");mxClient.IS_GC&&(ob.writeln('<style type="text/css">'),ob.writeln("@media print {"),ob.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),
-ob.writeln("}"),ob.writeln("</style>"));null!=u.editor.fontCss&&(ob.writeln('<style type="text/css">'),ob.writeln(u.editor.fontCss),ob.writeln("</style>"));for(var c=cb.getCustomFonts(),l=0;l<c.length;l++){var x=c[l].name,p=c[l].url;Graph.isCssFontUrl(p)?ob.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(p)+'" charset="UTF-8" type="text/css">'):(ob.writeln('<style type="text/css">'),ob.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(x)+'";\nsrc: url("'+mxUtils.htmlEntities(p)+
-'");\n}'),ob.writeln("</style>"))}};if("undefined"!==typeof MathJax){var yb=eb.renderPage;eb.renderPage=function(ob,c,l,x,p,v){var A=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!u.editor.useForeignObjectForMath?!0:u.editor.originalNoForeignObject;var B=yb.apply(this,arguments);mxClient.NO_FO=A;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:B.className="geDisableMathJax";return B}}kb=null;gb=T.shapeForegroundColor;rb=T.shapeBackgroundColor;lb=T.enableFlowAnimation;T.enableFlowAnimation=
-!1;null!=T.themes&&"darkTheme"==T.defaultThemeName&&(kb=T.stylesheet,T.stylesheet=T.getDefaultStylesheet(),T.shapeForegroundColor="#000000",T.shapeBackgroundColor="#ffffff",T.refresh());eb.open(null,null,hb,!0);T.enableFlowAnimation=lb;null!=kb&&(T.shapeForegroundColor=gb,T.shapeBackgroundColor=rb,T.stylesheet=kb,T.refresh())}else{lb=cb.background;if(null==lb||""==lb||lb==mxConstants.NONE)lb="#ffffff";eb.backgroundColor=lb;eb.autoOrigin=rb;eb.appendGraph(cb,wb,kb,gb,hb,!0);hb=cb.getCustomFonts();
-if(null!=eb.wnd)for(kb=0;kb<hb.length;kb++)gb=hb[kb].name,rb=hb[kb].url,Graph.isCssFontUrl(rb)?eb.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(rb)+'" charset="UTF-8" type="text/css">'):(eb.wnd.document.writeln('<style type="text/css">'),eb.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(gb)+'";\nsrc: url("'+mxUtils.htmlEntities(rb)+'");\n}'),eb.wnd.document.writeln("</style>"))}tb&&(cb.useCssTransforms=tb,cb.currentTranslate=vb,cb.currentScale=
-qb,cb.view.translate=Ab,cb.view.scale=Bb);return eb}var Pa=parseInt(ya.value)/100;isNaN(Pa)&&(Pa=1,ya.value="100 %");Pa*=.75;var Qa=null,Ua=T.shapeForegroundColor,La=T.shapeBackgroundColor;null!=T.themes&&"darkTheme"==T.defaultThemeName&&(Qa=T.stylesheet,T.stylesheet=T.getDefaultStylesheet(),T.shapeForegroundColor="#000000",T.shapeBackgroundColor="#ffffff",T.refresh());var ua=Ba.value,za=va.value,Ka=!Aa.checked,Ga=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,Aa.checked,ua,za,Ja.checked,
-na.value,ra.value,parseInt(Va.value)/100,parseInt(ya.value)/100,qa.get());else{Ka&&(Ka=Oa.checked||ua==wa&&za==wa);if(!Ka&&null!=u.pages&&u.pages.length){var Ma=0;Ka=u.pages.length-1;Aa.checked||(Ma=parseInt(ua)-1,Ka=parseInt(za)-1);for(var db=Ma;db<=Ka;db++){var Ra=u.pages[db];ua=Ra==u.currentPage?T:null;if(null==ua){ua=u.createTemporaryGraph(T.stylesheet);ua.shapeForegroundColor=T.shapeForegroundColor;ua.shapeBackgroundColor=T.shapeBackgroundColor;za=!0;Ma=!1;var ib=null,mb=null;null==Ra.viewState&&
-null==Ra.root&&u.updatePageRoot(Ra);null!=Ra.viewState&&(za=Ra.viewState.pageVisible,Ma=Ra.viewState.mathEnabled,ib=Ra.viewState.background,mb=Ra.viewState.backgroundImage,ua.extFonts=Ra.viewState.extFonts);null!=mb&&null!=mb.originalSrc&&(mb=u.createImageForPageLink(mb.originalSrc,Ra));ua.background=ib;ua.backgroundImage=null!=mb?new mxImage(mb.src,mb.width,mb.height,mb.x,mb.y):null;ua.pageVisible=za;ua.mathEnabled=Ma;var nb=ua.getGraphBounds;ua.getGraphBounds=function(){var cb=nb.apply(this,arguments),
-eb=this.backgroundImage;if(null!=eb&&null!=eb.width&&null!=eb.height){var hb=this.view.translate,tb=this.view.scale;cb=mxRectangle.fromRectangle(cb);cb.add(new mxRectangle((hb.x+eb.x)*tb,(hb.y+eb.y)*tb,eb.width*tb,eb.height*tb))}return cb};var pb=ua.getGlobalVariable;ua.getGlobalVariable=function(cb){return"page"==cb?Ra.getName():"pagenumber"==cb?db+1:"pagecount"==cb?null!=u.pages?u.pages.length:1:pb.apply(this,arguments)};document.body.appendChild(ua.container);u.updatePageRoot(Ra);ua.model.setRoot(Ra.root)}Ga=
-Na(ua,Ga,db!=Ka);ua!=T&&ua.container.parentNode.removeChild(ua.container)}}else Ga=Na(T);null==Ga?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(Ga.mathEnabled&&(Ka=Ga.wnd.document,Ea&&(Ga.wnd.IMMEDIATE_PRINT=!0),Ka.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Ga.closeDocument(),!Ga.mathEnabled&&Ea&&PrintDialog.printPreview(Ga));null!=Qa&&(T.shapeForegroundColor=Ua,T.shapeBackgroundColor=La,T.stylesheet=Qa,T.refresh())}}var T=
-u.editor.graph,Q=document.createElement("div"),Z=document.createElement("h3");Z.style.width="100%";Z.style.textAlign="center";Z.style.marginTop="0px";mxUtils.write(Z,J||mxResources.get("print"));Q.appendChild(Z);var oa=1,wa=1;Z=document.createElement("div");Z.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var Aa=document.createElement("input");Aa.style.cssText="margin-right:8px;margin-bottom:8px;";Aa.setAttribute("value","all");Aa.setAttribute("type","radio");
-Aa.setAttribute("name","pages-printdialog");Z.appendChild(Aa);J=document.createElement("span");mxUtils.write(J,mxResources.get("printAllPages"));Z.appendChild(J);mxUtils.br(Z);var ta=Aa.cloneNode(!0);Aa.setAttribute("checked","checked");ta.setAttribute("value","range");Z.appendChild(ta);J=document.createElement("span");mxUtils.write(J,mxResources.get("pages")+":");Z.appendChild(J);var Ba=document.createElement("input");Ba.style.cssText="margin:0 8px 0 8px;";Ba.setAttribute("value","1");Ba.setAttribute("type",
-"number");Ba.setAttribute("min","1");Ba.style.width="50px";Z.appendChild(Ba);J=document.createElement("span");mxUtils.write(J,mxResources.get("to"));Z.appendChild(J);var va=Ba.cloneNode(!0);Z.appendChild(va);mxEvent.addListener(Ba,"focus",function(){ta.checked=!0});mxEvent.addListener(va,"focus",function(){ta.checked=!0});mxEvent.addListener(Ba,"change",N);mxEvent.addListener(va,"change",N);if(null!=u.pages&&(oa=u.pages.length,null!=u.currentPage))for(J=0;J<u.pages.length;J++)if(u.currentPage==u.pages[J]){wa=
-J+1;Ba.value=wa;va.value=wa;break}Ba.setAttribute("max",oa);va.setAttribute("max",oa);u.isPagesEnabled()?1<oa&&(Q.appendChild(Z),ta.checked=!0):ta.checked=!0;mxUtils.br(Z);var Oa=document.createElement("input");Oa.setAttribute("value","all");Oa.setAttribute("type","radio");Oa.style.marginRight="8px";T.isSelectionEmpty()&&Oa.setAttribute("disabled","disabled");var Ca=document.createElement("div");Ca.style.marginBottom="10px";1==oa?(Oa.setAttribute("type","checkbox"),Oa.style.marginBottom="12px",Ca.appendChild(Oa)):
-(Oa.setAttribute("name","pages-printdialog"),Oa.style.marginBottom="8px",Z.appendChild(Oa));J=document.createElement("span");mxUtils.write(J,mxResources.get("selectionOnly"));Oa.parentNode.appendChild(J);1==oa&&mxUtils.br(Oa.parentNode);var Ta=document.createElement("input");Ta.style.marginRight="8px";Ta.setAttribute("value","adjust");Ta.setAttribute("type","radio");Ta.setAttribute("name","printZoom");Ca.appendChild(Ta);J=document.createElement("span");mxUtils.write(J,mxResources.get("adjustTo"));
-Ca.appendChild(J);var Va=document.createElement("input");Va.style.cssText="margin:0 8px 0 8px;";Va.setAttribute("value","100 %");Va.style.width="50px";Ca.appendChild(Va);mxEvent.addListener(Va,"focus",function(){Ta.checked=!0});Q.appendChild(Ca);Z=Z.cloneNode(!1);var Ja=Ta.cloneNode(!0);Ja.setAttribute("value","fit");Ta.setAttribute("checked","checked");J=document.createElement("div");J.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";J.appendChild(Ja);Z.appendChild(J);Ca=
-document.createElement("table");Ca.style.display="inline-block";var bb=document.createElement("tbody"),Wa=document.createElement("tr"),$a=Wa.cloneNode(!0),z=document.createElement("td"),L=z.cloneNode(!0),M=z.cloneNode(!0),S=z.cloneNode(!0),ca=z.cloneNode(!0),ia=z.cloneNode(!0);z.style.textAlign="right";S.style.textAlign="right";mxUtils.write(z,mxResources.get("fitTo"));var na=document.createElement("input");na.style.cssText="margin:0 8px 0 8px;";na.setAttribute("value","1");na.setAttribute("min",
-"1");na.setAttribute("type","number");na.style.width="40px";L.appendChild(na);J=document.createElement("span");mxUtils.write(J,mxResources.get("fitToSheetsAcross"));M.appendChild(J);mxUtils.write(S,mxResources.get("fitToBy"));var ra=na.cloneNode(!0);ca.appendChild(ra);mxEvent.addListener(na,"focus",function(){Ja.checked=!0});mxEvent.addListener(ra,"focus",function(){Ja.checked=!0});J=document.createElement("span");mxUtils.write(J,mxResources.get("fitToSheetsDown"));ia.appendChild(J);Wa.appendChild(z);
-Wa.appendChild(L);Wa.appendChild(M);$a.appendChild(S);$a.appendChild(ca);$a.appendChild(ia);bb.appendChild(Wa);bb.appendChild($a);Ca.appendChild(bb);Z.appendChild(Ca);Q.appendChild(Z);Z=document.createElement("div");J=document.createElement("div");J.style.fontWeight="bold";J.style.marginBottom="12px";mxUtils.write(J,mxResources.get("paperSize"));Z.appendChild(J);J=document.createElement("div");J.style.marginBottom="12px";var qa=PageSetupDialog.addPageFormatPanel(J,"printdialog",u.editor.graph.pageFormat||
-mxConstants.PAGE_FORMAT_A4_PORTRAIT);Z.appendChild(J);J=document.createElement("span");mxUtils.write(J,mxResources.get("pageScale"));Z.appendChild(J);var ya=document.createElement("input");ya.style.cssText="margin:0 8px 0 8px;";ya.setAttribute("value","100 %");ya.style.width="60px";Z.appendChild(ya);Q.appendChild(Z);J=document.createElement("div");J.style.cssText="text-align:right;margin:48px 0 0 0;";Z=mxUtils.button(mxResources.get("cancel"),function(){u.hideDialog()});Z.className="geBtn";u.editor.cancelFirst&&
-J.appendChild(Z);u.isOffline()||(Ca=mxUtils.button(mxResources.get("help"),function(){T.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),Ca.className="geBtn",J.appendChild(Ca));PrintDialog.previewEnabled&&(Ca=mxUtils.button(mxResources.get("preview"),function(){u.hideDialog();W(!1)}),Ca.className="geBtn",J.appendChild(Ca));Ca=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){u.hideDialog();W(!0)});Ca.className="geBtn gePrimaryBtn";J.appendChild(Ca);u.editor.cancelFirst||
-J.appendChild(Z);Q.appendChild(J);this.container=Q};var fa=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var u=this.image;null!=u&&null!=u.src&&Graph.isPageLink(u.src)&&(u={originalSrc:u.src});this.page.viewState.backgroundImage=u}null!=this.format&&(this.page.viewState.pageFormat=
-this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else fa.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=
-!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var la=document.createElement("canvas"),sa=new Image;sa.onload=function(){try{la.getContext("2d").drawImage(sa,0,0);var u=la.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(J){}};sa.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}})();
+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(u){var I=null;null!=u&&0<u.length&&("ER"==u.substring(0,2)?I="mxgraph.er":"sysML"==u.substring(0,5)&&(I="mxgraph.sysml"));return I};var P=mxMarker.createMarker;mxMarker.createMarker=
+function(u,I,N,W,T,Q,Z,na,va,Ba){if(null!=N&&null==mxMarker.markers[N]){var sa=this.getPackageForType(N);null!=sa&&mxStencilRegistry.getStencil(sa)}return P.apply(this,arguments)};var R=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(u,I,N,W,T,Q){"1"==mxUtils.getValue(I.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(I.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return R.apply(this,arguments)};PrintDialog.prototype.create=function(u,I){function N(){Aa.value=Math.max(1,
+Math.min(na,Math.max(parseInt(Aa.value),parseInt(Da.value))));Da.value=Math.max(1,Math.min(na,Math.min(parseInt(Aa.value),parseInt(Da.value))))}function W(Ga){function La(Ya,gb,hb){var ob=Ya.useCssTransforms,vb=Ya.currentTranslate,qb=Ya.currentScale,Ab=Ya.view.translate,Bb=Ya.view.scale;Ya.useCssTransforms&&(Ya.useCssTransforms=!1,Ya.currentTranslate=new mxPoint(0,0),Ya.currentScale=1,Ya.view.translate=new mxPoint(0,0),Ya.view.scale=1);var tb=Ya.getGraphBounds(),lb=0,ib=0,mb=qa.get(),wb=1/Ya.pageScale,
+rb=cb.checked;if(rb){wb=parseInt(oa.value);var xb=parseInt(ra.value);wb=Math.min(mb.height*xb/(tb.height/Ya.view.scale),mb.width*wb/(tb.width/Ya.view.scale))}else wb=parseInt(Za.value)/(100*Ya.pageScale),isNaN(wb)&&(Pa=1/Ya.pageScale,Za.value="100 %");mb=mxRectangle.fromRectangle(mb);mb.width=Math.ceil(mb.width*Pa);mb.height=Math.ceil(mb.height*Pa);wb*=Pa;!rb&&Ya.pageVisible?(tb=Ya.getPageLayout(),lb-=tb.x*mb.width,ib-=tb.y*mb.height):rb=!0;if(null==gb){gb=PrintDialog.createPrintPreview(Ya,wb,mb,
+0,lb,ib,rb);gb.pageSelector=!1;gb.mathEnabled=!1;za.checked&&(gb.isCellVisible=function(pb){return Ya.isCellSelected(pb)});lb=u.getCurrentFile();null!=lb&&(gb.title=lb.getTitle());var zb=gb.writeHead;gb.writeHead=function(pb){zb.apply(this,arguments);if(mxClient.IS_GC||mxClient.IS_SF)pb.writeln('<style type="text/css">'),pb.writeln(Editor.mathJaxWebkitCss),pb.writeln("</style>");mxClient.IS_GC&&(pb.writeln('<style type="text/css">'),pb.writeln("@media print {"),pb.writeln("span.MathJax_SVG svg { shape-rendering: crispEdges; }"),
+pb.writeln("}"),pb.writeln("</style>"));null!=u.editor.fontCss&&(pb.writeln('<style type="text/css">'),pb.writeln(u.editor.fontCss),pb.writeln("</style>"));for(var c=Ya.getCustomFonts(),l=0;l<c.length;l++){var x=c[l].name,p=c[l].url;Graph.isCssFontUrl(p)?pb.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(p)+'" charset="UTF-8" type="text/css">'):(pb.writeln('<style type="text/css">'),pb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(x)+'";\nsrc: url("'+mxUtils.htmlEntities(p)+
+'");\n}'),pb.writeln("</style>"))}};if("undefined"!==typeof MathJax){var yb=gb.renderPage;gb.renderPage=function(pb,c,l,x,p,v){var A=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!u.editor.useForeignObjectForMath?!0:u.editor.originalNoForeignObject;var B=yb.apply(this,arguments);mxClient.NO_FO=A;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:B.className="geDisableMathJax";return B}}lb=null;ib=T.shapeForegroundColor;rb=T.shapeBackgroundColor;mb=T.enableFlowAnimation;T.enableFlowAnimation=
+!1;null!=T.themes&&"darkTheme"==T.defaultThemeName&&(lb=T.stylesheet,T.stylesheet=T.getDefaultStylesheet(),T.shapeForegroundColor="#000000",T.shapeBackgroundColor="#ffffff",T.refresh());gb.open(null,null,hb,!0);T.enableFlowAnimation=mb;null!=lb&&(T.shapeForegroundColor=ib,T.shapeBackgroundColor=rb,T.stylesheet=lb,T.refresh())}else{mb=Ya.background;if(null==mb||""==mb||mb==mxConstants.NONE)mb="#ffffff";gb.backgroundColor=mb;gb.autoOrigin=rb;gb.appendGraph(Ya,wb,lb,ib,hb,!0);hb=Ya.getCustomFonts();
+if(null!=gb.wnd)for(lb=0;lb<hb.length;lb++)ib=hb[lb].name,rb=hb[lb].url,Graph.isCssFontUrl(rb)?gb.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(rb)+'" charset="UTF-8" type="text/css">'):(gb.wnd.document.writeln('<style type="text/css">'),gb.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(ib)+'";\nsrc: url("'+mxUtils.htmlEntities(rb)+'");\n}'),gb.wnd.document.writeln("</style>"))}ob&&(Ya.useCssTransforms=ob,Ya.currentTranslate=vb,Ya.currentScale=
+qb,Ya.view.translate=Ab,Ya.view.scale=Bb);return gb}var Pa=parseInt(xa.value)/100;isNaN(Pa)&&(Pa=1,xa.value="100 %");Pa*=.75;var Oa=null,Ta=T.shapeForegroundColor,Ma=T.shapeBackgroundColor;null!=T.themes&&"darkTheme"==T.defaultThemeName&&(Oa=T.stylesheet,T.stylesheet=T.getDefaultStylesheet(),T.shapeForegroundColor="#000000",T.shapeBackgroundColor="#ffffff",T.refresh());var ua=Da.value,ya=Aa.value,Na=!Ba.checked,Fa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,Ba.checked,ua,ya,cb.checked,
+oa.value,ra.value,parseInt(Za.value)/100,parseInt(xa.value)/100,qa.get());else{Na&&(Na=za.checked||ua==va&&ya==va);if(!Na&&null!=u.pages&&u.pages.length){var Ra=0;Na=u.pages.length-1;Ba.checked||(Ra=parseInt(ua)-1,Na=parseInt(ya)-1);for(var db=Ra;db<=Na;db++){var Va=u.pages[db];ua=Va==u.currentPage?T:null;if(null==ua){ua=u.createTemporaryGraph(T.stylesheet);ua.shapeForegroundColor=T.shapeForegroundColor;ua.shapeBackgroundColor=T.shapeBackgroundColor;ya=!0;Ra=!1;var fb=null,kb=null;null==Va.viewState&&
+null==Va.root&&u.updatePageRoot(Va);null!=Va.viewState&&(ya=Va.viewState.pageVisible,Ra=Va.viewState.mathEnabled,fb=Va.viewState.background,kb=Va.viewState.backgroundImage,ua.extFonts=Va.viewState.extFonts);null!=kb&&null!=kb.originalSrc&&(kb=u.createImageForPageLink(kb.originalSrc,Va));ua.background=fb;ua.backgroundImage=null!=kb?new mxImage(kb.src,kb.width,kb.height,kb.x,kb.y):null;ua.pageVisible=ya;ua.mathEnabled=Ra;var ub=ua.getGraphBounds;ua.getGraphBounds=function(){var Ya=ub.apply(this,arguments),
+gb=this.backgroundImage;if(null!=gb&&null!=gb.width&&null!=gb.height){var hb=this.view.translate,ob=this.view.scale;Ya=mxRectangle.fromRectangle(Ya);Ya.add(new mxRectangle((hb.x+gb.x)*ob,(hb.y+gb.y)*ob,gb.width*ob,gb.height*ob))}return Ya};var nb=ua.getGlobalVariable;ua.getGlobalVariable=function(Ya){return"page"==Ya?Va.getName():"pagenumber"==Ya?db+1:"pagecount"==Ya?null!=u.pages?u.pages.length:1:nb.apply(this,arguments)};document.body.appendChild(ua.container);u.updatePageRoot(Va);ua.model.setRoot(Va.root)}Fa=
+La(ua,Fa,db!=Na);ua!=T&&ua.container.parentNode.removeChild(ua.container)}}else Fa=La(T);null==Fa?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(Fa.mathEnabled&&(Na=Fa.wnd.document,Ga&&(Fa.wnd.IMMEDIATE_PRINT=!0),Na.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Fa.closeDocument(),!Fa.mathEnabled&&Ga&&PrintDialog.printPreview(Fa));null!=Oa&&(T.shapeForegroundColor=Ta,T.shapeBackgroundColor=Ma,T.stylesheet=Oa,T.refresh())}}var T=
+u.editor.graph,Q=document.createElement("div"),Z=document.createElement("h3");Z.style.width="100%";Z.style.textAlign="center";Z.style.marginTop="0px";mxUtils.write(Z,I||mxResources.get("print"));Q.appendChild(Z);var na=1,va=1;Z=document.createElement("div");Z.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var Ba=document.createElement("input");Ba.style.cssText="margin-right:8px;margin-bottom:8px;";Ba.setAttribute("value","all");Ba.setAttribute("type","radio");
+Ba.setAttribute("name","pages-printdialog");Z.appendChild(Ba);I=document.createElement("span");mxUtils.write(I,mxResources.get("printAllPages"));Z.appendChild(I);mxUtils.br(Z);var sa=Ba.cloneNode(!0);Ba.setAttribute("checked","checked");sa.setAttribute("value","range");Z.appendChild(sa);I=document.createElement("span");mxUtils.write(I,mxResources.get("pages")+":");Z.appendChild(I);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","1");Da.setAttribute("type",
+"number");Da.setAttribute("min","1");Da.style.width="50px";Z.appendChild(Da);I=document.createElement("span");mxUtils.write(I,mxResources.get("to"));Z.appendChild(I);var Aa=Da.cloneNode(!0);Z.appendChild(Aa);mxEvent.addListener(Da,"focus",function(){sa.checked=!0});mxEvent.addListener(Aa,"focus",function(){sa.checked=!0});mxEvent.addListener(Da,"change",N);mxEvent.addListener(Aa,"change",N);if(null!=u.pages&&(na=u.pages.length,null!=u.currentPage))for(I=0;I<u.pages.length;I++)if(u.currentPage==u.pages[I]){va=
+I+1;Da.value=va;Aa.value=va;break}Da.setAttribute("max",na);Aa.setAttribute("max",na);u.isPagesEnabled()?1<na&&(Q.appendChild(Z),sa.checked=!0):sa.checked=!0;mxUtils.br(Z);var za=document.createElement("input");za.setAttribute("value","all");za.setAttribute("type","radio");za.style.marginRight="8px";T.isSelectionEmpty()&&za.setAttribute("disabled","disabled");var Ca=document.createElement("div");Ca.style.marginBottom="10px";1==na?(za.setAttribute("type","checkbox"),za.style.marginBottom="12px",Ca.appendChild(za)):
+(za.setAttribute("name","pages-printdialog"),za.style.marginBottom="8px",Z.appendChild(za));I=document.createElement("span");mxUtils.write(I,mxResources.get("selectionOnly"));za.parentNode.appendChild(I);1==na&&mxUtils.br(za.parentNode);var Qa=document.createElement("input");Qa.style.marginRight="8px";Qa.setAttribute("value","adjust");Qa.setAttribute("type","radio");Qa.setAttribute("name","printZoom");Ca.appendChild(Qa);I=document.createElement("span");mxUtils.write(I,mxResources.get("adjustTo"));
+Ca.appendChild(I);var Za=document.createElement("input");Za.style.cssText="margin:0 8px 0 8px;";Za.setAttribute("value","100 %");Za.style.width="50px";Ca.appendChild(Za);mxEvent.addListener(Za,"focus",function(){Qa.checked=!0});Q.appendChild(Ca);Z=Z.cloneNode(!1);var cb=Qa.cloneNode(!0);cb.setAttribute("value","fit");Qa.setAttribute("checked","checked");I=document.createElement("div");I.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";I.appendChild(cb);Z.appendChild(I);Ca=
+document.createElement("table");Ca.style.display="inline-block";var Ka=document.createElement("tbody"),Ua=document.createElement("tr"),$a=Ua.cloneNode(!0),z=document.createElement("td"),L=z.cloneNode(!0),M=z.cloneNode(!0),S=z.cloneNode(!0),ca=z.cloneNode(!0),ha=z.cloneNode(!0);z.style.textAlign="right";S.style.textAlign="right";mxUtils.write(z,mxResources.get("fitTo"));var oa=document.createElement("input");oa.style.cssText="margin:0 8px 0 8px;";oa.setAttribute("value","1");oa.setAttribute("min",
+"1");oa.setAttribute("type","number");oa.style.width="40px";L.appendChild(oa);I=document.createElement("span");mxUtils.write(I,mxResources.get("fitToSheetsAcross"));M.appendChild(I);mxUtils.write(S,mxResources.get("fitToBy"));var ra=oa.cloneNode(!0);ca.appendChild(ra);mxEvent.addListener(oa,"focus",function(){cb.checked=!0});mxEvent.addListener(ra,"focus",function(){cb.checked=!0});I=document.createElement("span");mxUtils.write(I,mxResources.get("fitToSheetsDown"));ha.appendChild(I);Ua.appendChild(z);
+Ua.appendChild(L);Ua.appendChild(M);$a.appendChild(S);$a.appendChild(ca);$a.appendChild(ha);Ka.appendChild(Ua);Ka.appendChild($a);Ca.appendChild(Ka);Z.appendChild(Ca);Q.appendChild(Z);Z=document.createElement("div");I=document.createElement("div");I.style.fontWeight="bold";I.style.marginBottom="12px";mxUtils.write(I,mxResources.get("paperSize"));Z.appendChild(I);I=document.createElement("div");I.style.marginBottom="12px";var qa=PageSetupDialog.addPageFormatPanel(I,"printdialog",u.editor.graph.pageFormat||
+mxConstants.PAGE_FORMAT_A4_PORTRAIT);Z.appendChild(I);I=document.createElement("span");mxUtils.write(I,mxResources.get("pageScale"));Z.appendChild(I);var xa=document.createElement("input");xa.style.cssText="margin:0 8px 0 8px;";xa.setAttribute("value","100 %");xa.style.width="60px";Z.appendChild(xa);Q.appendChild(Z);I=document.createElement("div");I.style.cssText="text-align:right;margin:48px 0 0 0;";Z=mxUtils.button(mxResources.get("cancel"),function(){u.hideDialog()});Z.className="geBtn";u.editor.cancelFirst&&
+I.appendChild(Z);u.isOffline()||(Ca=mxUtils.button(mxResources.get("help"),function(){T.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),Ca.className="geBtn",I.appendChild(Ca));PrintDialog.previewEnabled&&(Ca=mxUtils.button(mxResources.get("preview"),function(){u.hideDialog();W(!1)}),Ca.className="geBtn",I.appendChild(Ca));Ca=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){u.hideDialog();W(!0)});Ca.className="geBtn gePrimaryBtn";I.appendChild(Ca);u.editor.cancelFirst||
+I.appendChild(Z);Q.appendChild(I);this.container=Q};var ia=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var u=this.image;null!=u&&null!=u.src&&Graph.isPageLink(u.src)&&(u={originalSrc:u.src});this.page.viewState.backgroundImage=u}null!=this.format&&(this.page.viewState.pageFormat=
+this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=this.shadowVisible)}}else ia.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=
+!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var la=document.createElement("canvas"),ta=new Image;ta.onload=function(){try{la.getContext("2d").drawImage(ta,0,0);var u=la.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(I){}};ta.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(u){}})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){n.previousColor=n.color;n.previousImage=n.image;n.previousFormat=n.format;null!=n.foldingEnabled&&(n.foldingEnabled=!n.foldingEnabled);null!=n.mathEnabled&&(n.mathEnabled=!n.mathEnabled);null!=n.shadowVisible&&(n.shadowVisible=!n.shadowVisible);return n};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="18.2.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="19.0.0";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,m,q,y,F){y=null!=y?y:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
@@ -3409,14 +3409,14 @@ urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.cr
F=y.getChildren(y.root);for(m=0;m<F.length;m++){var C=F[m];y.setVisible(C,f[C.id]||!1)}}catch(H){}};EditorUi.prototype.getBaseFilename=function(d){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(d,f,g,m,q,y,F,C,H,G,aa,da){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var ba=this.getBaseFilename("remoteSvg"==d?!1:!q),Y=ba+("xml"==d||"pdf"==d&&aa?".drawio":"")+"."+d;if("xml"==d){var pa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,q,null,null,null,f);this.saveData(Y,d,pa,"text/xml")}else if("html"==d)pa=this.getHtml2(this.getFileData(!0),this.editor.graph,
ba),this.saveData(Y,d,pa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)Y=ba+".png";else if("jpeg"==d)Y=ba+".jpg";else if("remoteSvg"==d){Y=ba+".svg";d="svg";var O=parseInt(H);"string"===typeof C&&0<C.indexOf("%")&&(C=parseInt(C)/100);if(0<O){var X=this.editor.graph,ea=X.getGraphBounds();var ka=Math.ceil(ea.width*C/X.view.scale+2*O);var ja=Math.ceil(ea.height*C/X.view.scale+2*O)}}this.saveRequest(Y,d,mxUtils.bind(this,function(R,
-fa){try{var la=this.editor.graph.pageVisible;0==y&&(this.editor.graph.pageVisible=y);var sa=this.createDownloadRequest(R,d,m,fa,F,q,C,H,G,aa,da,ka,ja);this.editor.graph.pageVisible=la;return sa}catch(u){this.handleError(u)}}))}else{var U=null,I=mxUtils.bind(this,function(R){R.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",R,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});if("svg"==d){var V=this.editor.graph.background;
-if(F||V==mxConstants.NONE)V=null;var P=this.editor.graph.getSvg(V,null,null,null,null,m);g&&this.editor.graph.addSvgShadow(P);this.editor.convertImages(P,mxUtils.bind(this,mxUtils.bind(this,function(R){this.spinner.stop();I(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(R))})))}else Y=ba+".svg",U=this.getFileData(!1,!0,null,mxUtils.bind(this,function(R){this.spinner.stop();I(R)}),m)}}catch(R){this.handleError(R)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,m,q,y,F,C,H,
+ia){try{var la=this.editor.graph.pageVisible;0==y&&(this.editor.graph.pageVisible=y);var ta=this.createDownloadRequest(R,d,m,ia,F,q,C,H,G,aa,da,ka,ja);this.editor.graph.pageVisible=la;return ta}catch(u){this.handleError(u)}}))}else{var U=null,J=mxUtils.bind(this,function(R){R.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",R,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(U)}))});if("svg"==d){var V=this.editor.graph.background;
+if(F||V==mxConstants.NONE)V=null;var P=this.editor.graph.getSvg(V,null,null,null,null,m);g&&this.editor.graph.addSvgShadow(P);this.editor.convertImages(P,mxUtils.bind(this,mxUtils.bind(this,function(R){this.spinner.stop();J(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(R))})))}else Y=ba+".svg",U=this.getFileData(!1,!0,null,mxUtils.bind(this,function(R){this.spinner.stop();J(R)}),m)}}catch(R){this.handleError(R)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,m,q,y,F,C,H,
G,aa,da,ba){var Y=this.editor.graph,pa=Y.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==y?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var O="",X="";if(pa.width*pa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=aa?X="&from="+aa.from+"&to="+aa.to:0==y&&(X="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(y=0;y<this.pages.length;y++)if(this.pages[y]==
this.currentPage){O="&from="+y;break}y=Y.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=y&&y!=mxConstants.NONE||(y="#ffffff"):y=mxConstants.NONE;q={globalVars:Y.getExportVariables()};H&&(q.grid={size:Y.gridSize,steps:Y.view.gridSteps,color:Y.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+O+X+"&bg="+(null!=y?y:mxConstants.NONE)+"&base64="+m+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):
"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=F?"&scale="+F:"")+(null!=C?"&border="+C:"")+(da&&isFinite(da)?"&w="+da:"")+(ba&&isFinite(ba)?"&h="+ba:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var m=window.location.hash,q=mxUtils.bind(this,function(y){var F=null!=d.data?d.data:"";null!=y&&0<y.length&&(0<F.length&&(F+="\n"),F+=y);y=new LocalFile(this,"csv"!=d.format&&0<F.length?F:this.emptyDiagramXml,null!=urlParams.title?
decodeURIComponent(urlParams.title):this.defaultFilename,!0);y.getHash=function(){return m};this.fileLoaded(y);"csv"==d.format&&this.importCsv(F,mxUtils.bind(this,function(da){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=null!=d.interval?parseInt(d.interval):6E4,H=null,G=mxUtils.bind(this,function(){var da=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,
function(ba){da===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),aa()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),aa=mxUtils.bind(this,function(){window.clearTimeout(H);H=window.setTimeout(G,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){aa();G()}));aa();G()}null!=f&&f()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,mxUtils.bind(this,
-function(y){q(y)}),mxUtils.bind(this,function(y){null!=g&&g(y)})):q("")};EditorUi.prototype.updateDiagram=function(d){function f(ja){var U=new mxCellOverlay(ja.image||q.warningImage,ja.tooltip,ja.align,ja.valign,ja.offset);U.addListener(mxEvent.CLICK,function(I,V){m.alert(ja.tooltip)});return U}var g=null,m=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,y=q.getModel();y.beginUpdate();var F=null;try{for(d=
+function(y){q(y)}),mxUtils.bind(this,function(y){null!=g&&g(y)})):q("")};EditorUi.prototype.updateDiagram=function(d){function f(ja){var U=new mxCellOverlay(ja.image||q.warningImage,ja.tooltip,ja.align,ja.valign,ja.offset);U.addListener(mxEvent.CLICK,function(J,V){m.alert(ja.tooltip)});return U}var g=null,m=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,y=q.getModel();y.beginUpdate();var F=null;try{for(d=
d.firstChild;null!=d;){if("update"==d.nodeName){var C=y.getCell(d.getAttribute("id"));if(null!=C){try{var H=d.getAttribute("value");if(null!=H){var G=mxUtils.parseXml(H).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))y.setValue(C,G);else for(var aa=G.attributes,da=0;da<aa.length;da++)q.setAttributeForCell(C,aa[da].nodeName,0<aa[da].nodeValue.length?aa[da].nodeValue:null)}}catch(ja){null!=window.console&&console.log("Error in value for "+C.id+": "+ja)}try{var ba=d.getAttribute("style");
null!=ba&&q.model.setStyle(C,ba)}catch(ja){null!=window.console&&console.log("Error in style for "+C.id+": "+ja)}try{var Y=d.getAttribute("icon");if(null!=Y){var pa=0<Y.length?JSON.parse(Y):null;null!=pa&&pa.append||q.removeCellOverlays(C);null!=pa&&q.addCellOverlay(C,f(pa))}}catch(ja){null!=window.console&&console.log("Error in icon for "+C.id+": "+ja)}try{var O=d.getAttribute("geometry");if(null!=O){O=JSON.parse(O);var X=q.getCellGeometry(C);if(null!=X){X=X.clone();for(key in O){var ea=parseFloat(O[key]);
"dx"==key?X.x+=ea:"dy"==key?X.y+=ea:"dw"==key?X.width+=ea:"dh"==key?X.height+=ea:X[key]=parseFloat(O[key])}q.model.setGeometry(C,X)}}}catch(ja){null!=window.console&&console.log("Error in icon for "+C.id+": "+ja)}}}else if("model"==d.nodeName){for(var ka=d.firstChild;null!=ka&&ka.nodeType!=mxConstants.NODETYPE_ELEMENT;)ka=ka.nextSibling;null!=ka&&(new mxCodec(d.firstChild)).decode(ka,y)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(q.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||
@@ -3440,15 +3440,15 @@ null!=m&&0<m.length&&".scratchpad"!=d.title&&H.setAttribute("title",this.getLibr
"relative";aa.style.top="2px";aa.style.width="14px";aa.style.cursor="pointer";aa.style.margin="0 3px";Editor.isDarkMode()&&(aa.style.filter="invert(100%)");var da=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(aa),mxEvent.addListener(aa,"click",mxUtils.bind(this,function(ka){if(!mxEvent.isConsumed(ka)){var ja=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=da?this.confirm(mxResources.get("allChangesLost"),null,ja,mxResources.get("cancel"),mxResources.get("discardChanges")):
ja();mxEvent.consume(ka)}}));if(d.isEditable()){var ba=this.editor.graph,Y=null,pa=mxUtils.bind(this,function(ka){this.showLibraryDialog(d.getTitle(),C,f,d,d.getMode());mxEvent.consume(ka)}),O=mxUtils.bind(this,function(ka){d.setModified(!0);d.isAutosave()?(null!=Y&&null!=Y.parentNode&&Y.parentNode.removeChild(Y),Y=aa.cloneNode(!1),Y.setAttribute("src",Editor.spinImage),Y.setAttribute("title",mxResources.get("saving")),Y.style.cursor="default",Y.style.marginRight="2px",Y.style.marginTop="-2px",G.insertBefore(Y,
G.firstChild),H.style.paddingRight=18*G.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=Y&&null!=Y.parentNode&&(Y.parentNode.removeChild(Y),H.style.paddingRight=18*G.childNodes.length+"px")})):null==da&&(da=aa.cloneNode(!1),da.setAttribute("src",Editor.saveImage),da.setAttribute("title",mxResources.get("save")),G.insertBefore(da,G.firstChild),mxEvent.addListener(da,"click",mxUtils.bind(this,function(ja){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==
-LocalLibrary,!0,function(){null==da||d.isModified()||(H.style.paddingRight=18*G.childNodes.length+"px",da.parentNode.removeChild(da),da=null)});mxEvent.consume(ja)})),H.style.paddingRight=18*G.childNodes.length+"px")}),X=mxUtils.bind(this,function(ka,ja,U,I){ka=ba.cloneCells(mxUtils.sortCells(ba.model.getTopmostCells(ka)));for(var V=0;V<ka.length;V++){var P=ba.getCellGeometry(ka[V]);null!=P&&P.translate(-ja.x,-ja.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(ka,ja.width,ja.height,I||
-"",!0,null,!1));ka={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(ka))),w:ja.width,h:ja.height};null!=I&&(ka.title=I);f.push(ka);O(U);null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)}),ea=mxUtils.bind(this,function(ka){if(ba.isSelectionEmpty())ba.getRubberband().isActive()?(ba.getRubberband().execute(ka),ba.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ja=ba.getSelectionCells(),
-U=ba.view.getBounds(ja),I=ba.view.scale;U.x/=I;U.y/=I;U.width/=I;U.height/=I;U.x-=ba.view.translate.x;U.y-=ba.view.translate.y;X(ja,U)}mxEvent.consume(ka)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(ka){ba.isMouseDown&&null!=ba.panningManager&&null!=ba.graphHandler.first&&(ba.graphHandler.suspend(),null!=ba.graphHandler.hint&&(ba.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="#f1f3f4",C.style.cursor="copy",ba.panningManager.stop(),ba.autoScroll=!1,
+LocalLibrary,!0,function(){null==da||d.isModified()||(H.style.paddingRight=18*G.childNodes.length+"px",da.parentNode.removeChild(da),da=null)});mxEvent.consume(ja)})),H.style.paddingRight=18*G.childNodes.length+"px")}),X=mxUtils.bind(this,function(ka,ja,U,J){ka=ba.cloneCells(mxUtils.sortCells(ba.model.getTopmostCells(ka)));for(var V=0;V<ka.length;V++){var P=ba.getCellGeometry(ka[V]);null!=P&&P.translate(-ja.x,-ja.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(ka,ja.width,ja.height,J||
+"",!0,null,!1));ka={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(ka))),w:ja.width,h:ja.height};null!=J&&(ka.title=J);f.push(ka);O(U);null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)}),ea=mxUtils.bind(this,function(ka){if(ba.isSelectionEmpty())ba.getRubberband().isActive()?(ba.getRubberband().execute(ka),ba.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ja=ba.getSelectionCells(),
+U=ba.view.getBounds(ja),J=ba.view.scale;U.x/=J;U.y/=J;U.width/=J;U.height/=J;U.x-=ba.view.translate.x;U.y-=ba.view.translate.y;X(ja,U)}mxEvent.consume(ka)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(ka){ba.isMouseDown&&null!=ba.panningManager&&null!=ba.graphHandler.first&&(ba.graphHandler.suspend(),null!=ba.graphHandler.hint&&(ba.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="#f1f3f4",C.style.cursor="copy",ba.panningManager.stop(),ba.autoScroll=!1,
mxEvent.consume(ka))}),mxUtils.bind(this,function(ka){ba.isMouseDown&&null!=ba.panningManager&&null!=ba.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,ba.panningManager.stop(),ba.graphHandler.reset(),ba.isMouseDown=!1,ba.autoScroll=!0,ea(ka),mxEvent.consume(ka))}));mxEvent.addListener(C,"mouseleave",mxUtils.bind(this,function(ka){ba.isMouseDown&&null!=ba.graphHandler.first&&(ba.graphHandler.resume(),null!=ba.graphHandler.hint&&(ba.graphHandler.hint.style.visibility=
"visible"),C.style.backgroundColor="",C.style.cursor="",ba.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(ka){C.style.backgroundColor="#f1f3f4";ka.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();ka.stopPropagation();ka.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(ka){C.style.cursor="";C.style.backgroundColor="";0<ka.dataTransfer.files.length&&this.importFiles(ka.dataTransfer.files,0,0,
-this.maxImageSize,mxUtils.bind(this,function(ja,U,I,V,P,R,fa,la,sa){if(null!=ja&&"image/"==U.substring(0,6))ja="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ja),ja=[new mxCell("",new mxGeometry(0,0,P,R),ja)],ja[0].vertex=!0,X(ja,new mxRectangle(0,0,P,R),ka,mxEvent.isAltDown(ka)?null:fa.substring(0,fa.lastIndexOf(".")).replace(/_/g," ")),null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null);else{var u=!1,J=
-mxUtils.bind(this,function(N,W){null!=N&&"application/pdf"==W&&(W=Editor.extractGraphModelFromPdf(N),null!=W&&0<W.length&&(N=W));if(null!=N)if(N=mxUtils.parseXml(N),"mxlibrary"==N.documentElement.nodeName)try{var T=JSON.parse(mxUtils.getTextContent(N.documentElement));F(T,C);f=f.concat(T);O(ka);this.spinner.stop();u=!0}catch(wa){}else if("mxfile"==N.documentElement.nodeName)try{var Q=N.documentElement.getElementsByTagName("diagram");for(T=0;T<Q.length;T++){var Z=this.stringToCells(Editor.getDiagramNodeXml(Q[T])),
-oa=this.editor.graph.getBoundingBoxFromGeometry(Z);X(Z,new mxRectangle(0,0,oa.width,oa.height),ka)}u=!0}catch(wa){null!=window.console&&console.log("error in drop handler:",wa)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)});null!=sa&&null!=fa&&(/(\.v(dx|sdx?))($|\?)/i.test(fa)||/(\.vs(x|sx?))($|\?)/i.test(fa))?this.importVisio(sa,function(N){J(N,"text/xml")},null,fa):(new XMLHttpRequest).upload&&
-this.isRemoteFileFormat(ja,fa)&&null!=sa?this.isExternalDataComms()?this.parseFile(sa,mxUtils.bind(this,function(N){4==N.readyState&&(this.spinner.stop(),200<=N.status&&299>=N.status?J(N.responseText,"text/xml"):this.handleError({message:mxResources.get(413==N.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):J(ja,U)}}));ka.stopPropagation();ka.preventDefault()})),
+this.maxImageSize,mxUtils.bind(this,function(ja,U,J,V,P,R,ia,la,ta){if(null!=ja&&"image/"==U.substring(0,6))ja="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ja),ja=[new mxCell("",new mxGeometry(0,0,P,R),ja)],ja[0].vertex=!0,X(ja,new mxRectangle(0,0,P,R),ka,mxEvent.isAltDown(ka)?null:ia.substring(0,ia.lastIndexOf(".")).replace(/_/g," ")),null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null);else{var u=!1,I=
+mxUtils.bind(this,function(N,W){null!=N&&"application/pdf"==W&&(W=Editor.extractGraphModelFromPdf(N),null!=W&&0<W.length&&(N=W));if(null!=N)if(N=mxUtils.parseXml(N),"mxlibrary"==N.documentElement.nodeName)try{var T=JSON.parse(mxUtils.getTextContent(N.documentElement));F(T,C);f=f.concat(T);O(ka);this.spinner.stop();u=!0}catch(va){}else if("mxfile"==N.documentElement.nodeName)try{var Q=N.documentElement.getElementsByTagName("diagram");for(T=0;T<Q.length;T++){var Z=this.stringToCells(Editor.getDiagramNodeXml(Q[T])),
+na=this.editor.graph.getBoundingBoxFromGeometry(Z);X(Z,new mxRectangle(0,0,na.width,na.height),ka)}u=!0}catch(va){null!=window.console&&console.log("error in drop handler:",va)}u||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=y&&null!=y.parentNode&&0<f.length&&(y.parentNode.removeChild(y),y=null)});null!=ta&&null!=ia&&(/(\.v(dx|sdx?))($|\?)/i.test(ia)||/(\.vs(x|sx?))($|\?)/i.test(ia))?this.importVisio(ta,function(N){I(N,"text/xml")},null,ia):(new XMLHttpRequest).upload&&
+this.isRemoteFileFormat(ja,ia)&&null!=ta?this.isExternalDataComms()?this.parseFile(ta,mxUtils.bind(this,function(N){4==N.readyState&&(this.spinner.stop(),200<=N.status&&299>=N.status?I(N.responseText,"text/xml"):this.handleError({message:mxResources.get(413==N.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):I(ja,U)}}));ka.stopPropagation();ka.preventDefault()})),
mxEvent.addListener(C,"dragleave",function(ka){C.style.cursor="";C.style.backgroundColor="";ka.stopPropagation();ka.preventDefault()}));aa=aa.cloneNode(!1);aa.setAttribute("src",Editor.editImage);aa.setAttribute("title",mxResources.get("edit"));G.insertBefore(aa,G.firstChild);mxEvent.addListener(aa,"click",pa);mxEvent.addListener(C,"dblclick",function(ka){mxEvent.getSource(ka)==C&&pa(ka)});m=aa.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));G.insertBefore(m,
G.firstChild);mxEvent.addListener(m,"click",ea);this.isOffline()||".scratchpad"!=d.title||null==EditorUi.scratchpadHelpLink||(m=document.createElement("span"),m.setAttribute("title",mxResources.get("help")),m.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(m,"?"),mxEvent.addGestureListeners(m,mxUtils.bind(this,function(ka){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(ka)})),G.insertBefore(m,G.firstChild))}H.appendChild(G);H.style.paddingRight=
18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=0;g<d.length;g++){var m=d[g],q=m.data;if(null!=q){q=this.convertDataUri(q);var y="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==m.aspect&&(y+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(y+"image="+q,m.w,m.h,"",m.title||"",!1,null,!0))}else null!=m.xml&&(q=this.stringToCells(Graph.decompress(m.xml)),0<q.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(q,
@@ -3519,8 +3519,8 @@ q.style.whiteSpace="nowrap";var y=document.createElement("h3");mxUtils.write(y,m
ja.style.marginBottom="16px";F+=50;mxEvent.addListener(ea,"change",function(){ea.checked?ja.removeAttribute("disabled"):ja.setAttribute("disabled","disabled");ja.checked&&ea.checked?ka.getEditSelect().removeAttribute("disabled"):ka.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){m(C.checked?g:null,da.checked,ba.value,aa.getTarget(),aa.getColor(),Y.checked,pa.checked,O.checked,X.checked,ea.checked,null!=ka?ka.getLink():null)}),null,d,f);
this.showDialog(d.container,340,F,!0,!0);y.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,m,q,y,F,C){var H=document.createElement("div");H.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";H.appendChild(G);var aa=this.getCurrentFile();d=0;if(null==aa||aa.constructor!=window.DriveFile||f)F=null!=F?F:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";
else{d=80;F=null!=F?F:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var da=document.createElement("div");da.style.whiteSpace="normal";mxUtils.write(da,mxResources.get("linkAccountRequired"));G.appendChild(da);da=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(aa.getId())}));
-da.style.marginTop="12px";da.className="geBtn";G.appendChild(da);H.appendChild(G);da=document.createElement("a");da.style.paddingLeft="12px";da.style.color="gray";da.style.fontSize="11px";da.style.cursor="pointer";mxUtils.write(da,mxResources.get("check"));G.appendChild(da);mxEvent.addListener(da,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(I){this.spinner.stop();I=new ErrorDialog(this,
-null,mxResources.get(null!=I?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(I.container,300,80,!0,!1);I.init()}))}))}var ba=null,Y=null;if(null!=g||null!=m)d+=30,mxUtils.write(H,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value="100%",H.appendChild(ba),mxUtils.write(H,mxResources.get("height")+
+da.style.marginTop="12px";da.className="geBtn";G.appendChild(da);H.appendChild(G);da=document.createElement("a");da.style.paddingLeft="12px";da.style.color="gray";da.style.fontSize="11px";da.style.cursor="pointer";mxUtils.write(da,mxResources.get("check"));G.appendChild(da);mxEvent.addListener(da,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(J){this.spinner.stop();J=new ErrorDialog(this,
+null,mxResources.get(null!=J?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(J.container,300,80,!0,!1);J.init()}))}))}var ba=null,Y=null;if(null!=g||null!=m)d+=30,mxUtils.write(H,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value="100%",H.appendChild(ba),mxUtils.write(H,mxResources.get("height")+
":"),Y=document.createElement("input"),Y.setAttribute("type","text"),Y.style.width="50px",Y.style.marginLeft="6px",Y.style.marginBottom="10px",Y.value=m+"px",H.appendChild(Y),mxUtils.br(H);var pa=this.addLinkSection(H,y);g=null!=this.pages&&1<this.pages.length;var O=null;if(null==aa||aa.constructor!=window.DriveFile||f)O=this.addCheckbox(H,mxResources.get("allPages"),g,!g);var X=this.addCheckbox(H,mxResources.get("lightbox"),!0,null,null,!y),ea=this.addEditButton(H,X),ka=ea.getEditInput();y&&(ka.style.marginLeft=
X.style.marginLeft,X.style.display="none",d-=20);var ja=this.addCheckbox(H,mxResources.get("layers"),!0);ja.style.marginLeft=ka.style.marginLeft;ja.style.marginTop="8px";var U=this.addCheckbox(H,mxResources.get("tags"),!0);U.style.marginLeft=ka.style.marginLeft;U.style.marginBottom="16px";U.style.marginTop="16px";mxEvent.addListener(X,"change",function(){X.checked?(ja.removeAttribute("disabled"),ka.removeAttribute("disabled")):(ja.setAttribute("disabled","disabled"),ka.setAttribute("disabled","disabled"));
ka.checked&&X.checked?ea.getEditSelect().removeAttribute("disabled"):ea.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,H,mxUtils.bind(this,function(){q(pa.getTarget(),pa.getColor(),null==O?!0:O.checked,X.checked,ea.getLink(),ja.checked,null!=ba?ba.value:null,null!=Y?Y.value:null,U.checked)}),null,mxResources.get("create"),F,C);this.showDialog(f.container,340,300+d,!0,!0);null!=ba?(ba.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",
@@ -3531,13 +3531,13 @@ function(d,f,g,m,q,y,F,C,H){F=null!=F?F:Editor.defaultIncludeDiagram;var G=docum
"4px";Y.style.marginRight="12px";Y.value=this.lastExportZoom||"100%";G.appendChild(Y);mxUtils.write(G,mxResources.get("borderWidth")+":");var pa=document.createElement("input");pa.setAttribute("type","text");pa.style.marginRight="16px";pa.style.width="60px";pa.style.marginLeft="4px";pa.value=this.lastExportBorder||"0";G.appendChild(pa);mxUtils.br(G);var O=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,aa.isSelectionEmpty()),X=document.createElement("input");X.style.marginTop="16px";X.style.marginRight=
"8px";X.style.marginLeft="24px";X.setAttribute("disabled","disabled");X.setAttribute("type","checkbox");var ea=document.createElement("select");ea.style.marginTop="16px";ea.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var ka={};for(ba=0;ba<d.length;ba++)if(!aa.isSelectionEmpty()||"selectionOnly"!=d[ba]){var ja=document.createElement("option");mxUtils.write(ja,mxResources.get(d[ba]));ja.setAttribute("value",d[ba]);ea.appendChild(ja);ka[d[ba]]=ja}H?(mxUtils.write(G,mxResources.get("size")+
":"),G.appendChild(ea),mxUtils.br(G),da+=26,mxEvent.addListener(ea,"change",function(){"selectionOnly"==ea.value&&(O.checked=!0)})):y&&(G.appendChild(X),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),da+=30,mxEvent.addListener(O,"change",function(){O.checked?X.removeAttribute("disabled"):X.setAttribute("disabled","disabled")}));aa.isSelectionEmpty()?H&&(O.style.display="none",O.nextSibling.style.display="none",O.nextSibling.nextSibling.style.display="none",da-=30):(ea.value="diagram",X.setAttribute("checked",
-"checked"),X.defaultChecked=!0,mxEvent.addListener(O,"change",function(){ea.value=O.checked?"selectionOnly":"diagram"}));var U=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=C),I=null;Editor.isDarkMode()&&(I=this.addCheckbox(G,mxResources.get("dark"),!0),da+=26);var V=this.addCheckbox(G,mxResources.get("shadow"),aa.shadowVisible),P=null;if("png"==C||"jpeg"==C)P=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var R=
-this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),F,null,null,"jpeg"!=C);R.style.marginBottom="16px";var fa=document.createElement("input");fa.style.marginBottom="16px";fa.style.marginRight="8px";fa.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||fa.setAttribute("disabled","disabled");var la=document.createElement("select");la.style.maxWidth="260px";la.style.marginLeft="8px";la.style.marginRight="10px";la.style.marginBottom="16px";la.className="geBtn";y=document.createElement("option");
-y.setAttribute("value","none");mxUtils.write(y,mxResources.get("noChange"));la.appendChild(y);y=document.createElement("option");y.setAttribute("value","embedFonts");mxUtils.write(y,mxResources.get("embedFonts"));la.appendChild(y);y=document.createElement("option");y.setAttribute("value","lblToSvg");mxUtils.write(y,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||la.appendChild(y);mxEvent.addListener(la,"change",mxUtils.bind(this,function(){"lblToSvg"==la.value?(fa.checked=!0,
-fa.setAttribute("disabled","disabled"),ka.page.style.display="none","page"==ea.value&&(ea.value="diagram"),V.checked=!1,V.setAttribute("disabled","disabled"),u.style.display="inline-block",sa.style.display="none"):"disabled"==fa.getAttribute("disabled")&&(fa.checked=!1,fa.removeAttribute("disabled"),V.removeAttribute("disabled"),ka.page.style.display="",u.style.display="none",sa.style.display="")}));f&&(G.appendChild(fa),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,
-mxResources.get("txtSettings")+":"),G.appendChild(la),mxUtils.br(G),da+=60);var sa=document.createElement("select");sa.style.maxWidth="260px";sa.style.marginLeft="8px";sa.style.marginRight="10px";sa.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));sa.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));sa.appendChild(f);f=document.createElement("option");
-f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));sa.appendChild(f);var u=document.createElement("div");mxUtils.write(u,mxResources.get("LinksLost"));u.style.margin="7px";u.style.display="none";"svg"==C&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(sa),G.appendChild(u),mxUtils.br(G),mxUtils.br(G),da+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=pa.value;this.lastExportZoom=Y.value;q(Y.value,U.checked,!O.checked,
-V.checked,R.checked,fa.checked,pa.value,X.checked,!1,sa.value,null!=P?P.checked:null,null!=I?I.checked:null,ea.value,"embedFonts"==la.value,"lblToSvg"==la.value)}),null,g,m);this.showDialog(g.container,340,da,!0,!0,null,null,null,null,!0);Y.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,m,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var F=this.editor.graph;
+"checked"),X.defaultChecked=!0,mxEvent.addListener(O,"change",function(){ea.value=O.checked?"selectionOnly":"diagram"}));var U=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=C),J=null;Editor.isDarkMode()&&(J=this.addCheckbox(G,mxResources.get("dark"),!0),da+=26);var V=this.addCheckbox(G,mxResources.get("shadow"),aa.shadowVisible),P=null;if("png"==C||"jpeg"==C)P=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),da+=30;var R=
+this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),F,null,null,"jpeg"!=C);R.style.marginBottom="16px";var ia=document.createElement("input");ia.style.marginBottom="16px";ia.style.marginRight="8px";ia.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||ia.setAttribute("disabled","disabled");var la=document.createElement("select");la.style.maxWidth="260px";la.style.marginLeft="8px";la.style.marginRight="10px";la.style.marginBottom="16px";la.className="geBtn";y=document.createElement("option");
+y.setAttribute("value","none");mxUtils.write(y,mxResources.get("noChange"));la.appendChild(y);y=document.createElement("option");y.setAttribute("value","embedFonts");mxUtils.write(y,mxResources.get("embedFonts"));la.appendChild(y);y=document.createElement("option");y.setAttribute("value","lblToSvg");mxUtils.write(y,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||la.appendChild(y);mxEvent.addListener(la,"change",mxUtils.bind(this,function(){"lblToSvg"==la.value?(ia.checked=!0,
+ia.setAttribute("disabled","disabled"),ka.page.style.display="none","page"==ea.value&&(ea.value="diagram"),V.checked=!1,V.setAttribute("disabled","disabled"),u.style.display="inline-block",ta.style.display="none"):"disabled"==ia.getAttribute("disabled")&&(ia.checked=!1,ia.removeAttribute("disabled"),V.removeAttribute("disabled"),ka.page.style.display="",u.style.display="none",ta.style.display="")}));f&&(G.appendChild(ia),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,
+mxResources.get("txtSettings")+":"),G.appendChild(la),mxUtils.br(G),da+=60);var ta=document.createElement("select");ta.style.maxWidth="260px";ta.style.marginLeft="8px";ta.style.marginRight="10px";ta.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));ta.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));ta.appendChild(f);f=document.createElement("option");
+f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));ta.appendChild(f);var u=document.createElement("div");mxUtils.write(u,mxResources.get("LinksLost"));u.style.margin="7px";u.style.display="none";"svg"==C&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(ta),G.appendChild(u),mxUtils.br(G),mxUtils.br(G),da+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=pa.value;this.lastExportZoom=Y.value;q(Y.value,U.checked,!O.checked,
+V.checked,R.checked,ia.checked,pa.value,X.checked,!1,ta.value,null!=P?P.checked:null,null!=J?J.checked:null,ea.value,"embedFonts"==la.value,"lblToSvg"==la.value)}),null,g,m);this.showDialog(g.container,340,da,!0,!0,null,null,null,null,!0);Y.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,m,q){var y=document.createElement("div");y.style.whiteSpace="nowrap";var F=this.editor.graph;
if(null!=f){var C=document.createElement("h3");mxUtils.write(C,f);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";y.appendChild(C)}var H=this.addCheckbox(y,mxResources.get("fit"),!0),G=this.addCheckbox(y,mxResources.get("shadow"),F.shadowVisible&&m,!m),aa=this.addCheckbox(y,g),da=this.addCheckbox(y,mxResources.get("lightbox"),!0),ba=this.addEditButton(y,da),Y=ba.getEditInput(),pa=1<F.model.getChildCount(F.model.getRoot()),O=this.addCheckbox(y,mxResources.get("layers"),
pa,!pa);O.style.marginLeft=Y.style.marginLeft;O.style.marginBottom="12px";O.style.marginTop="8px";mxEvent.addListener(da,"change",function(){da.checked?(pa&&O.removeAttribute("disabled"),Y.removeAttribute("disabled")):(O.setAttribute("disabled","disabled"),Y.setAttribute("disabled","disabled"));Y.checked&&da.checked?ba.getEditSelect().removeAttribute("disabled"):ba.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,y,mxUtils.bind(this,function(){d(H.checked,G.checked,aa.checked,
da.checked,ba.getLink(),O.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,m,q,y,F,C){function H(Y){var pa=" ",O="";m&&(pa=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
@@ -3592,15 +3592,15 @@ g())}),d.name):g()}):H||g()}},function(y){g(y)}):g()});"undefined"!==typeof JSZi
C(X)});"image"==f.substring(0,5)?(H=!1,"image/png"==f.substring(0,9)&&(f=aa?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(Y=this.importXml(f,g,m,G,null,null!=da?mxEvent.isControlDown(da):null),H=!0)),H||(f=this.editor.graph,H=d.indexOf(";"),0<H&&(d=d.substring(0,H)+d.substring(d.indexOf(",",H+1))),G&&f.isGridEnabled()&&(g=f.snap(g),m=f.snap(m)),Y=[f.insertVertex(null,null,"",g,m,q,y,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
d+";")])):/(\.*<graphml )/.test(d)?(ba=!0,this.importGraphML(d,pa)):null!=H&&null!=F&&(/(\.v(dx|sdx?))($|\?)/i.test(F)||/(\.vs(x|sx?))($|\?)/i.test(F))?(ba=!0,this.importVisio(H,pa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,F)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ba=!0,q=mxUtils.bind(this,function(O){4==O.readyState&&(200<=O.status&&299>=O.status?pa(O.responseText):null!=C&&C(null))}),null!=d?this.parseFileData(d,q,F):this.parseFile(H,
q,F)):0==d.indexOf("PK")&&null!=H?(ba=!0,this.importZipFile(H,pa,mxUtils.bind(this,function(){Y=this.insertTextAt(this.validateFileData(d),g,m,!0,null,G);C(Y)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(Y=this.insertTextAt(this.validateFileData(d),g,m,!0,null,G,null,null!=da?mxEvent.isControlDown(da):null));ba||null==C||C(Y);return Y};EditorUi.prototype.importFiles=function(d,f,g,m,q,y,F,C,H,G,aa,da,ba){m=null!=m?m:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var Y=null!=
-f&&null!=g,pa=!0;f=null!=f?f:0;g=null!=g?g:0;var O=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var X=aa||this.resampleThreshold,ea=0;ea<d.length;ea++)if("image/svg"!==d[ea].type.substring(0,9)&&"image/"===d[ea].type.substring(0,6)&&d[ea].size>X){O=!0;break}var ka=mxUtils.bind(this,function(){var ja=this.editor.graph,U=ja.gridSize;q=null!=q?q:mxUtils.bind(this,function(la,sa,u,J,N,W,T,Q,Z){try{return null!=la&&"<mxlibrary"==la.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
-la,T)),null):this.importFile(la,sa,u,J,N,W,T,Q,Z,Y,da,ba)}catch(oa){return this.handleError(oa),null}});y=null!=y?y:mxUtils.bind(this,function(la){ja.setSelectionCells(la)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var I=d.length,V=I,P=[],R=mxUtils.bind(this,function(la,sa){P[la]=sa;if(0==--V){this.spinner.stop();if(null!=C)C(P);else{var u=[];ja.getModel().beginUpdate();try{for(la=0;la<P.length;la++){var J=P[la]();null!=J&&(u=u.concat(J))}}finally{ja.getModel().endUpdate()}}y(u)}}),
-fa=0;fa<I;fa++)mxUtils.bind(this,function(la){var sa=d[la];if(null!=sa){var u=new FileReader;u.onload=mxUtils.bind(this,function(J){if(null==F||F(sa))if("image/"==sa.type.substring(0,6))if("image/svg"==sa.type.substring(0,9)){var N=Graph.clipSvgDataUri(J.target.result),W=N.indexOf(",");W=decodeURIComponent(escape(atob(N.substring(W+1))));var T=mxUtils.parseXml(W);W=T.getElementsByTagName("svg");if(0<W.length){W=W[0];var Q=da?null:W.getAttribute("content");null!=Q&&"<"!=Q.charAt(0)&&"%"!=Q.charAt(0)&&
-(Q=unescape(window.atob?atob(Q):Base64.decode(Q,!0)));null!=Q&&"%"==Q.charAt(0)&&(Q=decodeURIComponent(Q));null==Q||"<mxfile "!==Q.substring(0,8)&&"<mxGraphModel "!==Q.substring(0,14)?R(la,mxUtils.bind(this,function(){try{if(null!=T){var wa=T.getElementsByTagName("svg");if(0<wa.length){var Aa=wa[0],ta=Aa.getAttribute("width"),Ba=Aa.getAttribute("height");ta=null!=ta&&"%"!=ta.charAt(ta.length-1)?parseFloat(ta):NaN;Ba=null!=Ba&&"%"!=Ba.charAt(Ba.length-1)?parseFloat(Ba):NaN;var va=Aa.getAttribute("viewBox");
-if(null==va||0==va.length)Aa.setAttribute("viewBox","0 0 "+ta+" "+Ba);else if(isNaN(ta)||isNaN(Ba)){var Oa=va.split(" ");3<Oa.length&&(ta=parseFloat(Oa[2]),Ba=parseFloat(Oa[3]))}N=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Ca=Math.min(1,Math.min(m/Math.max(1,ta)),m/Math.max(1,Ba)),Ta=q(N,sa.type,f+la*U,g+la*U,Math.max(1,Math.round(ta*Ca)),Math.max(1,Math.round(Ba*Ca)),sa.name);if(isNaN(ta)||isNaN(Ba)){var Va=new Image;Va.onload=mxUtils.bind(this,function(){ta=Math.max(1,Va.width);Ba=Math.max(1,
-Va.height);Ta[0].geometry.width=ta;Ta[0].geometry.height=Ba;Aa.setAttribute("viewBox","0 0 "+ta+" "+Ba);N=Editor.createSvgDataUri(mxUtils.getXml(Aa));var Ja=N.indexOf(";");0<Ja&&(N=N.substring(0,Ja)+N.substring(N.indexOf(",",Ja+1)));ja.setCellStyles("image",N,[Ta[0]])});Va.src=Editor.createSvgDataUri(mxUtils.getXml(Aa))}return Ta}}}catch(Ja){}return null})):R(la,mxUtils.bind(this,function(){return q(Q,"text/xml",f+la*U,g+la*U,0,0,sa.name)}))}else R(la,mxUtils.bind(this,function(){return null}))}else{W=
-!1;if("image/png"==sa.type){var Z=da?null:this.extractGraphModelFromPng(J.target.result);if(null!=Z&&0<Z.length){var oa=new Image;oa.src=J.target.result;R(la,mxUtils.bind(this,function(){return q(Z,"text/xml",f+la*U,g+la*U,oa.width,oa.height,sa.name)}));W=!0}}W||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):
-this.loadImage(J.target.result,mxUtils.bind(this,function(wa){this.resizeImage(wa,J.target.result,mxUtils.bind(this,function(Aa,ta,Ba){R(la,mxUtils.bind(this,function(){if(null!=Aa&&Aa.length<G){var va=pa&&this.isResampleImageSize(sa.size,aa)?Math.min(1,Math.min(m/ta,m/Ba)):1;return q(Aa,sa.type,f+la*U,g+la*U,Math.round(ta*va),Math.round(Ba*va),sa.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),pa,m,aa,sa.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else N=
-J.target.result,q(N,sa.type,f+la*U,g+la*U,240,160,sa.name,function(wa){R(la,function(){return wa})},sa)});/(\.v(dx|sdx?))($|\?)/i.test(sa.name)||/(\.vs(x|sx?))($|\?)/i.test(sa.name)?q(null,sa.type,f+la*U,g+la*U,240,160,sa.name,function(J){R(la,function(){return J})},sa):"image"==sa.type.substring(0,5)||"application/pdf"==sa.type?u.readAsDataURL(sa):u.readAsText(sa)}})(fa)});if(O){O=[];for(ea=0;ea<d.length;ea++)O.push(d[ea]);d=O;this.confirmImageResize(function(ja){pa=ja;ka()},H)}else ka()};EditorUi.prototype.isBlankFile=
+f&&null!=g,pa=!0;f=null!=f?f:0;g=null!=g?g:0;var O=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var X=aa||this.resampleThreshold,ea=0;ea<d.length;ea++)if("image/svg"!==d[ea].type.substring(0,9)&&"image/"===d[ea].type.substring(0,6)&&d[ea].size>X){O=!0;break}var ka=mxUtils.bind(this,function(){var ja=this.editor.graph,U=ja.gridSize;q=null!=q?q:mxUtils.bind(this,function(la,ta,u,I,N,W,T,Q,Z){try{return null!=la&&"<mxlibrary"==la.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,
+la,T)),null):this.importFile(la,ta,u,I,N,W,T,Q,Z,Y,da,ba)}catch(na){return this.handleError(na),null}});y=null!=y?y:mxUtils.bind(this,function(la){ja.setSelectionCells(la)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var J=d.length,V=J,P=[],R=mxUtils.bind(this,function(la,ta){P[la]=ta;if(0==--V){this.spinner.stop();if(null!=C)C(P);else{var u=[];ja.getModel().beginUpdate();try{for(la=0;la<P.length;la++){var I=P[la]();null!=I&&(u=u.concat(I))}}finally{ja.getModel().endUpdate()}}y(u)}}),
+ia=0;ia<J;ia++)mxUtils.bind(this,function(la){var ta=d[la];if(null!=ta){var u=new FileReader;u.onload=mxUtils.bind(this,function(I){if(null==F||F(ta))if("image/"==ta.type.substring(0,6))if("image/svg"==ta.type.substring(0,9)){var N=Graph.clipSvgDataUri(I.target.result),W=N.indexOf(",");W=decodeURIComponent(escape(atob(N.substring(W+1))));var T=mxUtils.parseXml(W);W=T.getElementsByTagName("svg");if(0<W.length){W=W[0];var Q=da?null:W.getAttribute("content");null!=Q&&"<"!=Q.charAt(0)&&"%"!=Q.charAt(0)&&
+(Q=unescape(window.atob?atob(Q):Base64.decode(Q,!0)));null!=Q&&"%"==Q.charAt(0)&&(Q=decodeURIComponent(Q));null==Q||"<mxfile "!==Q.substring(0,8)&&"<mxGraphModel "!==Q.substring(0,14)?R(la,mxUtils.bind(this,function(){try{if(null!=T){var va=T.getElementsByTagName("svg");if(0<va.length){var Ba=va[0],sa=Ba.getAttribute("width"),Da=Ba.getAttribute("height");sa=null!=sa&&"%"!=sa.charAt(sa.length-1)?parseFloat(sa):NaN;Da=null!=Da&&"%"!=Da.charAt(Da.length-1)?parseFloat(Da):NaN;var Aa=Ba.getAttribute("viewBox");
+if(null==Aa||0==Aa.length)Ba.setAttribute("viewBox","0 0 "+sa+" "+Da);else if(isNaN(sa)||isNaN(Da)){var za=Aa.split(" ");3<za.length&&(sa=parseFloat(za[2]),Da=parseFloat(za[3]))}N=Editor.createSvgDataUri(mxUtils.getXml(Ba));var Ca=Math.min(1,Math.min(m/Math.max(1,sa)),m/Math.max(1,Da)),Qa=q(N,ta.type,f+la*U,g+la*U,Math.max(1,Math.round(sa*Ca)),Math.max(1,Math.round(Da*Ca)),ta.name);if(isNaN(sa)||isNaN(Da)){var Za=new Image;Za.onload=mxUtils.bind(this,function(){sa=Math.max(1,Za.width);Da=Math.max(1,
+Za.height);Qa[0].geometry.width=sa;Qa[0].geometry.height=Da;Ba.setAttribute("viewBox","0 0 "+sa+" "+Da);N=Editor.createSvgDataUri(mxUtils.getXml(Ba));var cb=N.indexOf(";");0<cb&&(N=N.substring(0,cb)+N.substring(N.indexOf(",",cb+1)));ja.setCellStyles("image",N,[Qa[0]])});Za.src=Editor.createSvgDataUri(mxUtils.getXml(Ba))}return Qa}}}catch(cb){}return null})):R(la,mxUtils.bind(this,function(){return q(Q,"text/xml",f+la*U,g+la*U,0,0,ta.name)}))}else R(la,mxUtils.bind(this,function(){return null}))}else{W=
+!1;if("image/png"==ta.type){var Z=da?null:this.extractGraphModelFromPng(I.target.result);if(null!=Z&&0<Z.length){var na=new Image;na.src=I.target.result;R(la,mxUtils.bind(this,function(){return q(Z,"text/xml",f+la*U,g+la*U,na.width,na.height,ta.name)}));W=!0}}W||(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):
+this.loadImage(I.target.result,mxUtils.bind(this,function(va){this.resizeImage(va,I.target.result,mxUtils.bind(this,function(Ba,sa,Da){R(la,mxUtils.bind(this,function(){if(null!=Ba&&Ba.length<G){var Aa=pa&&this.isResampleImageSize(ta.size,aa)?Math.min(1,Math.min(m/sa,m/Da)):1;return q(Ba,ta.type,f+la*U,g+la*U,Math.round(sa*Aa),Math.round(Da*Aa),ta.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),pa,m,aa,ta.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else N=
+I.target.result,q(N,ta.type,f+la*U,g+la*U,240,160,ta.name,function(va){R(la,function(){return va})},ta)});/(\.v(dx|sdx?))($|\?)/i.test(ta.name)||/(\.vs(x|sx?))($|\?)/i.test(ta.name)?q(null,ta.type,f+la*U,g+la*U,240,160,ta.name,function(I){R(la,function(){return I})},ta):"image"==ta.type.substring(0,5)||"application/pdf"==ta.type?u.readAsDataURL(ta):u.readAsText(ta)}})(ia)});if(O){O=[];for(ea=0;ea<d.length;ea++)O.push(d[ea]);d=O;this.confirmImageResize(function(ja){pa=ja;ka()},H)}else ka()};EditorUi.prototype.isBlankFile=
function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(y,F){if(y||f)mxSettings.setResizeImages(y?F:null),mxSettings.save();g();d(F)};null==m||f?this.showDialog((new ConfirmDialog(this,
mxResources.get("resizeLargeImages"),function(y){q(y,!0)},function(y){q(y,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):q(!1,m)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var m=new FileReader;m.onload=mxUtils.bind(this,function(){this.parseFileData(m.result,
f,g)});m.readAsText(d)};EditorUi.prototype.parseFileData=function(d,f,g){var m=new XMLHttpRequest;m.open("POST",OPEN_URL);m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");m.onreadystatechange=function(){f(m)};m.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>
@@ -3608,32 +3608,32 @@ f};EditorUi.prototype.resizeImage=function(d,f,g,m,q,y,F){q=null!=q?q:this.maxIm
Y!==O&&(f=Y,C=aa,H=da)}}}catch(X){}g(f,C,H)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var m=new Image;m.onload=function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;f(m)};null!=g&&(m.onerror=g);m.src=d}catch(q){if(null!=g)g(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?
urlParams.rough:d)};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());
var d=this,f=this.editor.graph;Editor.isDarkMode()&&(f.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(X){var ea=X.getEvent();return null==X.getState()&&!mxEvent.isMouseEvent(ea)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(ea)&&(null==X.getState()||mxEvent.isControlDown(ea)||mxEvent.isShiftDown(ea))});f.cellEditor.editPlantUmlData=function(X,ea,ka){var ja=JSON.parse(ka);ea=new TextareaDialog(d,mxResources.get("plantUml")+
-":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(U,ja.format,function(I,V,P){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==ja.format)f.labelChanged(X,"<pre>"+I+"</pre>"),f.updateCellSize(X,!0);else{f.setCellStyles("image",d.convertDataUri(I),[X]);var R=f.model.getGeometry(X);null!=R&&(R=R.clone(),R.width=V,R.height=P,f.cellsResized([X],[R],!1))}f.setAttributeForCell(X,"plantUmlData",JSON.stringify({data:U,format:ja.format}))}finally{f.getModel().endUpdate()}},
-function(I){d.handleError(I)})},null,null,400,220);d.showDialog(ea.container,420,300,!0,!0);ea.init()};f.cellEditor.editMermaidData=function(X,ea,ka){var ja=JSON.parse(ka);ea=new TextareaDialog(d,mxResources.get("mermaid")+":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(U,ja.config,function(I,V,P){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",I,[X]);var R=f.model.getGeometry(X);null!=R&&(R=R.clone(),R.width=
-Math.max(R.width,V),R.height=Math.max(R.height,P),f.cellsResized([X],[R],!1));f.setAttributeForCell(X,"mermaidData",JSON.stringify({data:U,config:ja.config},null,2))}finally{f.getModel().endUpdate()}},function(I){d.handleError(I)})},null,null,400,220);d.showDialog(ea.container,420,300,!0,!0);ea.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(X,ea){try{var ka=this.graph.getAttributeForCell(X,"plantUmlData");if(null!=ka)this.editPlantUmlData(X,ea,ka);else if(ka=this.graph.getAttributeForCell(X,
+":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(U,ja.format,function(J,V,P){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==ja.format)f.labelChanged(X,"<pre>"+J+"</pre>"),f.updateCellSize(X,!0);else{f.setCellStyles("image",d.convertDataUri(J),[X]);var R=f.model.getGeometry(X);null!=R&&(R=R.clone(),R.width=V,R.height=P,f.cellsResized([X],[R],!1))}f.setAttributeForCell(X,"plantUmlData",JSON.stringify({data:U,format:ja.format}))}finally{f.getModel().endUpdate()}},
+function(J){d.handleError(J)})},null,null,400,220);d.showDialog(ea.container,420,300,!0,!0);ea.init()};f.cellEditor.editMermaidData=function(X,ea,ka){var ja=JSON.parse(ka);ea=new TextareaDialog(d,mxResources.get("mermaid")+":",ja.data,function(U){null!=U&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(U,ja.config,function(J,V,P){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",J,[X]);var R=f.model.getGeometry(X);null!=R&&(R=R.clone(),R.width=
+Math.max(R.width,V),R.height=Math.max(R.height,P),f.cellsResized([X],[R],!1));f.setAttributeForCell(X,"mermaidData",JSON.stringify({data:U,config:ja.config},null,2))}finally{f.getModel().endUpdate()}},function(J){d.handleError(J)})},null,null,400,220);d.showDialog(ea.container,420,300,!0,!0);ea.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(X,ea){try{var ka=this.graph.getAttributeForCell(X,"plantUmlData");if(null!=ka)this.editPlantUmlData(X,ea,ka);else if(ka=this.graph.getAttributeForCell(X,
"mermaidData"),null!=ka)this.editMermaidData(X,ea,ka);else{var ja=f.getCellStyle(X);"1"==mxUtils.getValue(ja,"metaEdit","0")?d.showDataDialog(X):g.apply(this,arguments)}}catch(U){d.handleError(U)}};f.getLinkTitle=function(X){return d.getLinkTitle(X)};f.customLinkClicked=function(X){var ea=!1;try{d.handleCustomLink(X),ea=!0}catch(ka){d.handleError(ka)}return ea};var m=f.parseBackgroundImage;f.parseBackgroundImage=function(X){var ea=m.apply(this,arguments);null!=ea&&null!=ea.src&&Graph.isPageLink(ea.src)&&
(ea={originalSrc:ea.src});return ea};var q=f.setBackgroundImage;f.setBackgroundImage=function(X){null!=X&&null!=X.originalSrc&&(X=d.createImageForPageLink(X.originalSrc,d.currentPage,this));q.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(X,ea){X=null!=f.backgroundImage?
f.backgroundImage.originalSrc:null;if(null!=X){var ka=X.indexOf(",");if(0<ka)for(X=X.substring(ka+1),ea=ea.getProperty("patches"),ka=0;ka<ea.length;ka++)if(null!=ea[ka][EditorUi.DIFF_UPDATE]&&null!=ea[ka][EditorUi.DIFF_UPDATE][X]||null!=ea[ka][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(ea[ka][EditorUi.DIFF_REMOVE],X)){f.refreshBackgroundImage();break}}}));var y=f.getBackgroundImageObject;f.getBackgroundImageObject=function(X,ea){var ka=y.apply(this,arguments);if(null!=ka&&null!=ka.originalSrc)if(!ea)ka=
-{src:ka.originalSrc};else if(ea&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var ja=this.stylesheet,U=this.shapeForegroundColor,I=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";ka=d.createImageForPageLink(ka.originalSrc);this.shapeBackgroundColor=I;this.shapeForegroundColor=U;this.stylesheet=ja}return ka};var F=this.clearDefaultStyle;this.clearDefaultStyle=function(){F.apply(this,arguments)};
+{src:ka.originalSrc};else if(ea&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var ja=this.stylesheet,U=this.shapeForegroundColor,J=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";ka=d.createImageForPageLink(ka.originalSrc);this.shapeBackgroundColor=J;this.shapeForegroundColor=U;this.stylesheet=ja}return ka};var F=this.clearDefaultStyle;this.clearDefaultStyle=function(){F.apply(this,arguments)};
this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var C=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(X){X=null!=X?X:"";"1"==urlParams.dev&&(X+=(0<X.length?"&":"?")+"dev=1");return C.apply(this,arguments)};var H=
-f.addClickHandler;f.addClickHandler=function(X,ea,ka){var ja=ea;ea=function(U,I){if(null==I){var V=mxEvent.getSource(U);"a"==V.nodeName.toLowerCase()&&(I=V.getAttribute("href"))}null!=I&&f.isCustomLink(I)&&(mxEvent.isTouchEvent(U)||!mxEvent.isPopupTrigger(U))&&f.customLinkClicked(I)&&mxEvent.consume(U);null!=ja&&ja(U,I)};H.call(this,X,ea,ka)};D.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;
+f.addClickHandler;f.addClickHandler=function(X,ea,ka){var ja=ea;ea=function(U,J){if(null==J){var V=mxEvent.getSource(U);"a"==V.nodeName.toLowerCase()&&(J=V.getAttribute("href"))}null!=J&&f.isCustomLink(J)&&(mxEvent.isTouchEvent(U)||!mxEvent.isPopupTrigger(U))&&f.customLinkClicked(J)&&mxEvent.consume(U);null!=ja&&ja(U,J)};H.call(this,X,ea,ka)};D.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;
this.menus.addPopupMenuEditItems=function(X,ea,ka){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(X,"delete - cut copy copyAsImage - duplicate".split(" "),null,ka)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var aa=f.getExportVariables;f.getExportVariables=function(){var X=aa.apply(this,arguments),ea=d.getCurrentFile();
null!=ea&&(X.filename=ea.getTitle());X.pagecount=null!=d.pages?d.pages.length:1;X.page=null!=d.currentPage?d.currentPage.getName():"";X.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return X};var da=f.getGlobalVariable;f.getGlobalVariable=function(X){var ea=d.getCurrentFile();return"filename"==X&&null!=ea?ea.getTitle():"page"==X&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==X?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+
1:1:"pagecount"==X?null!=d.pages?d.pages.length:1:da.apply(this,arguments)};var ba=f.labelLinkClicked;f.labelLinkClicked=function(X,ea,ka){var ja=ea.getAttribute("href");if(null==ja||!f.isCustomLink(ja)||!mxEvent.isTouchEvent(ka)&&mxEvent.isPopupTrigger(ka))ba.apply(this,arguments);else{if(!f.isEnabled()||null!=X&&f.isCellLocked(X.cell))f.customLinkClicked(ja),f.getRubberband().reset();mxEvent.consume(ka)}};this.editor.getOrCreateFilename=function(){var X=d.defaultFilename,ea=d.getCurrentFile();null!=
ea&&(X=null!=ea.getTitle()?ea.getTitle():X);return X};var Y=this.actions.get("print");Y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);Y.visible=Y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),
this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(X){var ea=f.cellEditor.text2,ka=null;null!=ea&&(mxEvent.addListener(ea,"dragleave",function(ja){null!=ka&&(ka.parentNode.removeChild(ka),
-ka=null);ja.stopPropagation();ja.preventDefault()}),mxEvent.addListener(ea,"dragover",mxUtils.bind(this,function(ja){null==ka&&(!mxClient.IS_IE||10<document.documentMode)&&(ka=this.highlightElement(ea));ja.stopPropagation();ja.preventDefault()})),mxEvent.addListener(ea,"drop",mxUtils.bind(this,function(ja){null!=ka&&(ka.parentNode.removeChild(ka),ka=null);if(0<ja.dataTransfer.files.length)this.importFiles(ja.dataTransfer.files,0,0,this.maxImageSize,function(I,V,P,R,fa,la){f.insertImage(I,fa,la)},
-function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var V=0;V<I.length;V++)I[V]()},mxEvent.isControlDown(ja));else if(0<=mxUtils.indexOf(ja.dataTransfer.types,"text/uri-list")){var U=ja.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(I){var V=Math.max(1,I.width);I=Math.max(1,I.height);var P=this.maxImageSize;P=Math.min(1,Math.min(P/Math.max(1,V)),P/Math.max(1,I));f.insertImage(decodeURIComponent(U),
-V*P,I*P)})):document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(ja.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(ja.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"));ja.stopPropagation();ja.preventDefault()})))}));this.isSettingsEnabled()&&(Y=this.editor.graph.view,Y.setUnit(mxSettings.getUnit()),Y.addListener("unitChanged",
+ka=null);ja.stopPropagation();ja.preventDefault()}),mxEvent.addListener(ea,"dragover",mxUtils.bind(this,function(ja){null==ka&&(!mxClient.IS_IE||10<document.documentMode)&&(ka=this.highlightElement(ea));ja.stopPropagation();ja.preventDefault()})),mxEvent.addListener(ea,"drop",mxUtils.bind(this,function(ja){null!=ka&&(ka.parentNode.removeChild(ka),ka=null);if(0<ja.dataTransfer.files.length)this.importFiles(ja.dataTransfer.files,0,0,this.maxImageSize,function(J,V,P,R,ia,la){f.insertImage(J,ia,la)},
+function(){},function(J){return"image/"==J.type.substring(0,6)},function(J){for(var V=0;V<J.length;V++)J[V]()},mxEvent.isControlDown(ja));else if(0<=mxUtils.indexOf(ja.dataTransfer.types,"text/uri-list")){var U=ja.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(U)?this.loadImage(decodeURIComponent(U),mxUtils.bind(this,function(J){var V=Math.max(1,J.width);J=Math.max(1,J.height);var P=this.maxImageSize;P=Math.min(1,Math.min(P/Math.max(1,V)),P/Math.max(1,J));f.insertImage(decodeURIComponent(U),
+V*P,J*P)})):document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(ja.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(ja.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,ja.dataTransfer.getData("text/plain"));ja.stopPropagation();ja.preventDefault()})))}));this.isSettingsEnabled()&&(Y=this.editor.graph.view,Y.setUnit(mxSettings.getUnit()),Y.addListener("unitChanged",
function(X,ea){mxSettings.setUnit(ea.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,Y.unit),this.refresh());if("1"==urlParams.styledev){Y=document.getElementById("geFooter");null!=Y&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top=
"14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),Y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(X,ea){0<this.editor.graph.getSelectionCount()?(X=this.editor.graph.getSelectionCell(),
X=this.editor.graph.getModel().getStyle(X),this.styleInput.value=X||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var pa=this.isSelectionAllowed;this.isSelectionAllowed=function(X){return mxEvent.getSource(X)==this.styleInput?!0:pa.apply(this,arguments)}}Y=document.getElementById("geInfo");null!=Y&&Y.parentNode.removeChild(Y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var O=null;mxEvent.addListener(f.container,"dragleave",
function(X){f.isEnabled()&&(null!=O&&(O.parentNode.removeChild(O),O=null),X.stopPropagation(),X.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(X){null==O&&(!mxClient.IS_IE||10<document.documentMode)&&(O=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();X.stopPropagation();X.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(X){null!=O&&(O.parentNode.removeChild(O),O=null);if(f.isEnabled()){var ea=
-mxUtils.convertPoint(f.container,mxEvent.getClientX(X),mxEvent.getClientY(X)),ka=X.dataTransfer.files,ja=f.view.translate,U=f.view.scale,I=ea.x/U-ja.x,V=ea.y/U-ja.y;if(0<ka.length)ea=1==ka.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===ka[0].type.substring(0,9)||"image/"!==ka[0].type.substring(0,6)||/(\.drawio.png)$/i.test(ka[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(X)||ea)?(!mxEvent.isShiftDown(X)&&ea&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(ka,
-!0)):(mxEvent.isAltDown(X)&&(V=I=null),this.importFiles(ka,I,V,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(X),null,null,mxEvent.isShiftDown(X),X));else{mxEvent.isAltDown(X)&&(V=I=0);var P=0<=mxUtils.indexOf(X.dataTransfer.types,"text/uri-list")?X.dataTransfer.getData("text/uri-list"):null;ka=this.extractGraphModelFromEvent(X,null!=this.pages);if(null!=ka)f.setSelectionCells(this.importXml(ka,I,V,!0));else if(0<=mxUtils.indexOf(X.dataTransfer.types,"text/html")){var R=X.dataTransfer.getData("text/html");
-ka=document.createElement("div");ka.innerHTML=f.sanitizeHtml(R);var fa=null;ea=ka.getElementsByTagName("img");null!=ea&&1==ea.length?(R=ea[0].getAttribute("src"),null==R&&(R=ea[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(R)||(fa=!0)):(ea=ka.getElementsByTagName("a"),null!=ea&&1==ea.length?R=ea[0].getAttribute("href"):(ka=ka.getElementsByTagName("pre"),null!=ka&&1==ka.length&&(R=mxUtils.getTextContent(ka[0]))));var la=!0,sa=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(R,
-I,V,!0,fa,null,la,mxEvent.isControlDown(X)))});fa&&null!=R&&R.length>this.resampleThreshold?this.confirmImageResize(function(u){la=u;sa()},mxEvent.isControlDown(X)):sa()}else null!=P&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),mxUtils.bind(this,function(u){var J=Math.max(1,u.width);u=Math.max(1,u.height);var N=this.maxImageSize;N=Math.min(1,Math.min(N/Math.max(1,J)),N/Math.max(1,u));f.setSelectionCell(f.insertVertex(null,null,"",I,V,J*N,u*N,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-P+";"))}),mxUtils.bind(this,function(u){f.setSelectionCells(this.insertTextAt(P,I,V,!0))})):0<=mxUtils.indexOf(X.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(X.dataTransfer.getData("text/plain"),I,V,!0))}}X.stopPropagation();X.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",
+mxUtils.convertPoint(f.container,mxEvent.getClientX(X),mxEvent.getClientY(X)),ka=X.dataTransfer.files,ja=f.view.translate,U=f.view.scale,J=ea.x/U-ja.x,V=ea.y/U-ja.y;if(0<ka.length)ea=1==ka.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===ka[0].type.substring(0,9)||"image/"!==ka[0].type.substring(0,6)||/(\.drawio.png)$/i.test(ka[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(X)||ea)?(!mxEvent.isShiftDown(X)&&ea&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(ka,
+!0)):(mxEvent.isAltDown(X)&&(V=J=null),this.importFiles(ka,J,V,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(X),null,null,mxEvent.isShiftDown(X),X));else{mxEvent.isAltDown(X)&&(V=J=0);var P=0<=mxUtils.indexOf(X.dataTransfer.types,"text/uri-list")?X.dataTransfer.getData("text/uri-list"):null;ka=this.extractGraphModelFromEvent(X,null!=this.pages);if(null!=ka)f.setSelectionCells(this.importXml(ka,J,V,!0));else if(0<=mxUtils.indexOf(X.dataTransfer.types,"text/html")){var R=X.dataTransfer.getData("text/html");
+ka=document.createElement("div");ka.innerHTML=f.sanitizeHtml(R);var ia=null;ea=ka.getElementsByTagName("img");null!=ea&&1==ea.length?(R=ea[0].getAttribute("src"),null==R&&(R=ea[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(R)||(ia=!0)):(ea=ka.getElementsByTagName("a"),null!=ea&&1==ea.length?R=ea[0].getAttribute("href"):(ka=ka.getElementsByTagName("pre"),null!=ka&&1==ka.length&&(R=mxUtils.getTextContent(ka[0]))));var la=!0,ta=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(R,
+J,V,!0,ia,null,la,mxEvent.isControlDown(X)))});ia&&null!=R&&R.length>this.resampleThreshold?this.confirmImageResize(function(u){la=u;ta()},mxEvent.isControlDown(X)):ta()}else null!=P&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)?this.loadImage(decodeURIComponent(P),mxUtils.bind(this,function(u){var I=Math.max(1,u.width);u=Math.max(1,u.height);var N=this.maxImageSize;N=Math.min(1,Math.min(N/Math.max(1,I)),N/Math.max(1,u));f.setSelectionCell(f.insertVertex(null,null,"",J,V,I*N,u*N,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+P+";"))}),mxUtils.bind(this,function(u){f.setSelectionCells(this.insertTextAt(P,J,V,!0))})):0<=mxUtils.indexOf(X.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(X.dataTransfer.getData("text/plain"),J,V,!0))}}X.stopPropagation();X.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",
mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,m=!1,q=0;q<g.types.length;q++)if("text/"===g.types[q].substring(0,5)){m=!0;break}if(!m){var y=g.items;for(index in y){var F=y[index];if("file"===F.kind){if(d.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,function(H,G,aa,da,ba,Y){d.insertImage(H,ba,Y)},function(){},function(H){return"image/"==H.type.substring(0,6)},function(H){for(var G=0;G<H.length;G++)H[G]()});
else{var C=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(H){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck",
"false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var m=!1;this.keyHandler.bindControlKey(88,
@@ -3689,26 +3689,26 @@ Q.substring(0,26)?Q=atob(Q.substring(26)):"data:image/svg+xml;utf8,"==Q.substrin
mxResources.get(G.messageKey):G.message,null!=G.buttonKey?mxResources.get(G.buttonKey):G.button);null!=G.modified&&(this.editor.modified=G.modified);return}if("layout"==G.action){this.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==G.action){this.spinner.stop();var Y=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(Q){null!=Q?F.postMessage(JSON.stringify({event:"prompt",value:Q,message:G}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",
message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(Y.container,300,80,!0,!1);Y.init();return}if("draft"==G.action){var pa=da(G.xml);this.spinner.stop();Y=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),pa,mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"discard",
message:G}),"*")}),G.editKey?mxResources.get(G.editKey):null,G.discardKey?mxResources.get(G.discardKey):null,G.ignore?mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(Y.container,640,480,!0,!1,mxUtils.bind(this,function(Q){Q&&this.actions.get("exit").funct()}));try{Y.init()}catch(Q){F.postMessage(JSON.stringify({event:"draft",error:Q.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();
-var O=1==G.enableRecent,X=1==G.enableSearch,ea=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var ka=this.getCurrentUser(),ja=new TemplatesDialog(this,function(Q,Z,oa){Q=Q||this.emptyDiagramXml;F.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:Z,tempUrl:oa.url,libs:oa.libs,builtIn:null!=oa.info&&null!=oa.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=
-ka?ka.id:null,O?mxUtils.bind(this,function(Q,Z,oa){this.remoteInvoke("getRecentDiagrams",[oa],null,Q,Z)}):null,X?mxUtils.bind(this,function(Q,Z,oa,wa){this.remoteInvoke("searchDiagrams",[Q,wa],null,Z,oa)}):null,mxUtils.bind(this,function(Q,Z,oa){this.remoteInvoke("getFileContent",[Q.url],null,Z,oa)}),null,ea?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,!1,!1,!0,!0);this.showDialog(ja.container,window.innerWidth,window.innerHeight,!0,
-!1,null,!1,!0);return}Y=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(Q,Z,oa,wa){Q=Q||this.emptyDiagramXml;null!=G.callback?F.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:Z,tempUrl:oa,libs:wa,builtIn:!0,message:G}),"*"):(d(Q,H,Q!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,O?mxUtils.bind(this,function(Q){this.remoteInvoke("getRecentDiagrams",[null],
-null,Q,function(){Q(null,"Network Error!")})}):null,X?mxUtils.bind(this,function(Q,Z){this.remoteInvoke("searchDiagrams",[Q,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(Q,Z,oa){F.postMessage(JSON.stringify({event:"template",docUrl:Q,info:Z,name:oa}),"*")}),null,null,ea?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,1==G.withoutType);this.showDialog(Y.container,620,460,!0,!1,mxUtils.bind(this,function(Q){this.sidebar.hideTooltip();
-Q&&this.actions.get("exit").funct()}));Y.init();return}if("textContent"==G.action){var U=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:U,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var I=null!=G.messageKey?mxResources.get(G.messageKey):
-G.message;null==G.show||G.show?this.spinner.spin(document.body,I):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var V=null!=G.xml?G.xml:
-this.getFileData(!0);this.editor.graph.setEnabled(!1);var P=this.editor.graph,R=mxUtils.bind(this,function(Q){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=G.format;Z.message=G;Z.data=Q;Z.xml=V;F.postMessage(JSON.stringify(Z),"*")}),fa=mxUtils.bind(this,function(Q){null==Q&&(Q=Editor.blankImage);"xmlpng"==G.format&&(Q=Editor.writeGraphModelToPng(Q,"tEXt","mxfile",encodeURIComponent(V)));P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);
-R(Q)}),la=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var sa=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=la){var Q=P.getGlobalVariable;P=this.createTemporaryGraph(P.getStylesheet());for(var Z,oa=0;oa<this.pages.length;oa++)if(this.pages[oa].getId()==la){Z=this.updatePageRoot(this.pages[oa]);break}null==Z&&(Z=this.currentPage);P.getGlobalVariable=function(Ba){return"page"==Ba?Z.getName():
-"pagenumber"==Ba?1:Q.apply(this,arguments)};document.body.appendChild(P.container);P.model.setRoot(Z.root)}if(null!=G.layerIds){var wa=P.model,Aa=wa.getChildCells(wa.getRoot()),ta={};for(oa=0;oa<G.layerIds.length;oa++)ta[G.layerIds[oa]]=!0;for(oa=0;oa<Aa.length;oa++)wa.setVisible(Aa[oa],ta[Aa[oa].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ba){fa(Ba.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){fa(null)}),null,null,G.scale,G.transparent,G.shadow,
-null,P,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length?(g=!0,this.setFileData(V),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(sa)},0):sa()):sa()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=la?"&pageId="+la:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(V))).send(mxUtils.bind(this,
-function(Q){200<=Q.getStatus()&&299>=Q.getStatus()?R("data:image/png;base64,"+Q.getText()):fa(null)}),mxUtils.bind(this,function(){fa(null)}))}}else sa=mxUtils.bind(this,function(){var Q=this.createLoadMessage("export");Q.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Z=this.getXmlFileData();Q.xml=mxUtils.getXml(Z);Q.data=this.getFileData(null,null,!0,null,null,null,Z);Q.format=G.format}else if("html"==G.format)Z=this.editor.getGraphXml(),
-Q.data=this.getHtml(Z,this.editor.graph),Q.xml=mxUtils.getXml(Z),Q.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=G.background?G.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);Q.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Q.format="svg";var oa=mxUtils.bind(this,function(wa){this.editor.graph.setEnabled(!0);this.spinner.stop();Q.data=Editor.createSvgDataUri(wa);F.postMessage(JSON.stringify(Q),"*")});if("xmlsvg"==G.format)(null==G.spin&&
-null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(Q.xml,this.editor.graph,null,!0,oa,null,null,G.embedImages,Z,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),Z=this.editor.graph.getSvg(Z,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),
-(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(Z),this.embedFonts(Z,mxUtils.bind(this,function(wa){G.embedImages||null==G.embedImages?this.editor.convertImages(wa,mxUtils.bind(this,function(Aa){oa(mxUtils.getXml(Aa))})):oa(mxUtils.getXml(wa))}));return}F.postMessage(JSON.stringify(Q),"*")}),null!=G.xml&&0<G.xml.length?(g=!0,this.setFileData(G.xml),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(sa)},0):sa()):sa();return}if("load"==
+var O=1==G.enableRecent,X=1==G.enableSearch,ea=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var ka=this.getCurrentUser(),ja=new TemplatesDialog(this,function(Q,Z,na){Q=Q||this.emptyDiagramXml;F.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:Z,tempUrl:na.url,libs:na.libs,builtIn:null!=na.info&&null!=na.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=
+ka?ka.id:null,O?mxUtils.bind(this,function(Q,Z,na){this.remoteInvoke("getRecentDiagrams",[na],null,Q,Z)}):null,X?mxUtils.bind(this,function(Q,Z,na,va){this.remoteInvoke("searchDiagrams",[Q,va],null,Z,na)}):null,mxUtils.bind(this,function(Q,Z,na){this.remoteInvoke("getFileContent",[Q.url],null,Z,na)}),null,ea?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,!1,!1,!0,!0);this.showDialog(ja.container,window.innerWidth,window.innerHeight,!0,
+!1,null,!1,!0);return}Y=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(Q,Z,na,va){Q=Q||this.emptyDiagramXml;null!=G.callback?F.postMessage(JSON.stringify({event:"template",xml:Q,blank:Q==this.emptyDiagramXml,name:Z,tempUrl:na,libs:va,builtIn:!0,message:G}),"*"):(d(Q,H,Q!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,O?mxUtils.bind(this,function(Q){this.remoteInvoke("getRecentDiagrams",[null],
+null,Q,function(){Q(null,"Network Error!")})}):null,X?mxUtils.bind(this,function(Q,Z){this.remoteInvoke("searchDiagrams",[Q,null],null,Z,function(){Z(null,"Network Error!")})}):null,mxUtils.bind(this,function(Q,Z,na){F.postMessage(JSON.stringify({event:"template",docUrl:Q,info:Z,name:na}),"*")}),null,null,ea?mxUtils.bind(this,function(Q){this.remoteInvoke("getCustomTemplates",null,null,Q,function(){Q({},0)})}):null,1==G.withoutType);this.showDialog(Y.container,620,460,!0,!1,mxUtils.bind(this,function(Q){this.sidebar.hideTooltip();
+Q&&this.actions.get("exit").funct()}));Y.init();return}if("textContent"==G.action){var U=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:U,message:G}),"*");return}if("status"==G.action){null!=G.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(G.messageKey))):null!=G.message&&this.editor.setStatus(mxUtils.htmlEntities(G.message));null!=G.modified&&(this.editor.modified=G.modified);return}if("spinner"==G.action){var J=null!=G.messageKey?mxResources.get(G.messageKey):
+G.message;null==G.show||G.show?this.spinner.spin(document.body,J):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);return}if("export"==G.action){if("png"==G.format||"xmlpng"==G.format){if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin)){var V=null!=G.xml?G.xml:
+this.getFileData(!0);this.editor.graph.setEnabled(!1);var P=this.editor.graph,R=mxUtils.bind(this,function(Q){this.editor.graph.setEnabled(!0);this.spinner.stop();var Z=this.createLoadMessage("export");Z.format=G.format;Z.message=G;Z.data=Q;Z.xml=V;F.postMessage(JSON.stringify(Z),"*")}),ia=mxUtils.bind(this,function(Q){null==Q&&(Q=Editor.blankImage);"xmlpng"==G.format&&(Q=Editor.writeGraphModelToPng(Q,"tEXt","mxfile",encodeURIComponent(V)));P!=this.editor.graph&&P.container.parentNode.removeChild(P.container);
+R(Q)}),la=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var ta=mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=la){var Q=P.getGlobalVariable;P=this.createTemporaryGraph(P.getStylesheet());for(var Z,na=0;na<this.pages.length;na++)if(this.pages[na].getId()==la){Z=this.updatePageRoot(this.pages[na]);break}null==Z&&(Z=this.currentPage);P.getGlobalVariable=function(Da){return"page"==Da?Z.getName():
+"pagenumber"==Da?1:Q.apply(this,arguments)};document.body.appendChild(P.container);P.model.setRoot(Z.root)}if(null!=G.layerIds){var va=P.model,Ba=va.getChildCells(va.getRoot()),sa={};for(na=0;na<G.layerIds.length;na++)sa[G.layerIds[na]]=!0;for(na=0;na<Ba.length;na++)va.setVisible(Ba[na],sa[Ba[na].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Da){ia(Da.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){ia(null)}),null,null,G.scale,G.transparent,G.shadow,
+null,P,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length?(g=!0,this.setFileData(V),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(ta)},0):ta()):ta()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=la?"&pageId="+la:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(V))).send(mxUtils.bind(this,
+function(Q){200<=Q.getStatus()&&299>=Q.getStatus()?R("data:image/png;base64,"+Q.getText()):ia(null)}),mxUtils.bind(this,function(){ia(null)}))}}else ta=mxUtils.bind(this,function(){var Q=this.createLoadMessage("export");Q.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var Z=this.getXmlFileData();Q.xml=mxUtils.getXml(Z);Q.data=this.getFileData(null,null,!0,null,null,null,Z);Q.format=G.format}else if("html"==G.format)Z=this.editor.getGraphXml(),
+Q.data=this.getHtml(Z,this.editor.graph),Q.xml=mxUtils.getXml(Z),Q.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;Z=null!=G.background?G.background:this.editor.graph.background;Z==mxConstants.NONE&&(Z=null);Q.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);Q.format="svg";var na=mxUtils.bind(this,function(va){this.editor.graph.setEnabled(!0);this.spinner.stop();Q.data=Editor.createSvgDataUri(va);F.postMessage(JSON.stringify(Q),"*")});if("xmlsvg"==G.format)(null==G.spin&&
+null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(Q.xml,this.editor.graph,null,!0,na,null,null,G.embedImages,Z,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),Z=this.editor.graph.getSvg(Z,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),
+(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(Z),this.embedFonts(Z,mxUtils.bind(this,function(va){G.embedImages||null==G.embedImages?this.editor.convertImages(va,mxUtils.bind(this,function(Ba){na(mxUtils.getXml(Ba))})):na(mxUtils.getXml(va))}));return}F.postMessage(JSON.stringify(Q),"*")}),null!=G.xml&&0<G.xml.length?(g=!0,this.setFileData(G.xml),g=!1,this.editor.graph.mathEnabled?window.setTimeout(function(){window.MathJax.Hub.Queue(ta)},0):ta()):ta();return}if("load"==
G.action){ba=G.toSketch;m=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var u=Editor.sketchMode;this.doSetSketchMode(G.rough);u!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(u=Editor.darkMode,this.doSetDarkMode(G.dark),
-u!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border);null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var J=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+
-"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";aa=mxUtils.bind(this,function(){var Q=this.editor.graph,Z=Q.maxFitScale;Q.maxFitScale=G.maxFitScale;Q.fit(2*J);Q.maxFitScale=Z;Q.container.scrollTop-=2*J;Q.container.scrollLeft-=2*J;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&
+u!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border);null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var I=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+
+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";aa=mxUtils.bind(this,function(){var Q=this.editor.graph,Z=Q.maxFitScale;Q.maxFitScale=G.maxFitScale;Q.fit(2*I);Q.maxFitScale=Z;Q.container.scrollTop-=2*I;Q.container.scrollLeft-=2*I;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&
(pa=document.createElement("span"),mxUtils.write(pa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(pa),this.embedFilenameSpan=pa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(Q){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var N=this.getCurrentFile();null!=N&&(pa=da(G.xml),null!=pa&&""!=pa&&N.mergeFile(new LocalFile(this,
pa),function(){F.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(Q){F.postMessage(JSON.stringify({event:"merge",message:G,error:Q}),"*")}))}else"remoteInvokeReady"==G.action?this.handleRemoteInvokeReady(F):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,H.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(Q){this.handleError(Q)}}var W=mxUtils.bind(this,
-function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),T=mxUtils.bind(this,function(Q,Z){g=!0;try{d(Q,Z,null,ba)}catch(oa){this.handleError(oa)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");q=W();m&&null==f&&(f=mxUtils.bind(this,function(oa,wa){oa=W();oa==q||g||(wa=this.createLoadMessage("autosave"),wa.xml=oa,(window.opener||window.parent).postMessage(JSON.stringify(wa),"*"));q=oa}),this.editor.graph.model.addListener(mxEvent.CHANGE,
+function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),T=mxUtils.bind(this,function(Q,Z){g=!0;try{d(Q,Z,null,ba)}catch(na){this.handleError(na)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");q=W();m&&null==f&&(f=mxUtils.bind(this,function(na,va){na=W();na==q||g||(va=this.createLoadMessage("autosave"),va.xml=na,(window.opener||window.parent).postMessage(JSON.stringify(va),"*"));q=na}),this.editor.graph.model.addListener(mxEvent.CHANGE,
f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||
"json"==urlParams.proto)Z=this.createLoadMessage("load"),Z.xml=Q,F.postMessage(JSON.stringify(Z),"*");null!=aa&&aa()});null!=G&&"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(da="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(Q){T(Q,H)},mxUtils.bind(this,function(Q){this.handleError(Q)}),da)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,
"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,mxUtils.bind(this,function(Q){4==Q.readyState&&200<=Q.status&&299>=Q.status&&"<mxGraphModel"==Q.responseText.substring(0,13)&&T(Q.responseText,H)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(Q){T(Q)}),mxUtils.bind(this,function(Q){this.handleError(Q)})):null==G||"object"!==typeof G||null==G.format||null==
@@ -3719,84 +3719,84 @@ urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit")
g),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f),g=f);g.style.marginRight="20px";this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d);d.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+
":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||
this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript("js/extensions.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};
-EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),m=[],q=[],y=[],F={};if(0<g.length){var C={},H=this.editor.graph,G=null,aa=null,da=null,ba=null,Y=null,pa=null,O=null,X="whiteSpace=wrap;html=1;",ea=null,ka=null,ja="",U="auto",I="auto",V=null,P=null,R=40,fa=40,la=100,sa=0,u=function(){null!=f?f(na):(H.setSelectionCells(na),H.scrollCellToVisible(H.getSelectionCell()))},J=H.getFreeInsertPoint(),N=J.x,W=J.y;J=W;var T=null,Q="auto";ka=null;for(var Z=[],oa=null,wa=null,Aa=0;Aa<g.length&&
-"#"==g[Aa].charAt(0);){d=g[Aa].replace(/\r$/,"");for(Aa++;Aa<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Aa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Aa].substring(1)),Aa++;if("#"!=d.charAt(1)){var ta=d.indexOf(":");if(0<ta){var Ba=mxUtils.trim(d.substring(1,ta)),va=mxUtils.trim(d.substring(ta+1));"label"==Ba?T=H.sanitizeHtml(va):"labelname"==Ba&&0<va.length&&"-"!=va?Y=va:"labels"==Ba&&0<va.length&&"-"!=va?O=JSON.parse(va):"style"==Ba?aa=va:"parentstyle"==Ba?X=va:"unknownStyle"==Ba&&
-"-"!=va?pa=va:"stylename"==Ba&&0<va.length&&"-"!=va?ba=va:"styles"==Ba&&0<va.length&&"-"!=va?da=JSON.parse(va):"vars"==Ba&&0<va.length&&"-"!=va?G=JSON.parse(va):"identity"==Ba&&0<va.length&&"-"!=va?ea=va:"parent"==Ba&&0<va.length&&"-"!=va?ka=va:"namespace"==Ba&&0<va.length&&"-"!=va?ja=va:"width"==Ba?U=va:"height"==Ba?I=va:"left"==Ba&&0<va.length?V=va:"top"==Ba&&0<va.length?P=va:"ignore"==Ba?wa=va.split(","):"connect"==Ba?Z.push(JSON.parse(va)):"link"==Ba?oa=va:"padding"==Ba?sa=parseFloat(va):"edgespacing"==
-Ba?R=parseFloat(va):"nodespacing"==Ba?fa=parseFloat(va):"levelspacing"==Ba?la=parseFloat(va):"layout"==Ba&&(Q=va)}}}if(null==g[Aa])throw Error(mxResources.get("invalidOrMissingFile"));var Oa=this.editor.csvToArray(g[Aa].replace(/\r$/,""));ta=d=null;Ba=[];for(va=0;va<Oa.length;va++)ea==Oa[va]&&(d=va),ka==Oa[va]&&(ta=va),Ba.push(mxUtils.trim(Oa[va]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==T&&(T="%"+Ba[0]+"%");if(null!=Z)for(var Ca=0;Ca<Z.length;Ca++)null==C[Z[Ca].to]&&
-(C[Z[Ca].to]={});ea=[];for(va=Aa+1;va<g.length;va++){var Ta=this.editor.csvToArray(g[va].replace(/\r$/,""));if(null==Ta){var Va=40<g[va].length?g[va].substring(0,40)+"...":g[va];throw Error(Va+" ("+va+"):\n"+mxResources.get("containsValidationErrors"));}0<Ta.length&&ea.push(Ta)}H.model.beginUpdate();try{for(va=0;va<ea.length;va++){Ta=ea[va];var Ja=null,bb=null!=d?ja+Ta[d]:null;null!=bb&&(Ja=H.model.getCell(bb));g=null!=Ja;var Wa=new mxCell(T,new mxGeometry(N,J,0,0),aa||"whiteSpace=wrap;html=1;");
-Wa.vertex=!0;Wa.id=bb;Va=null!=Ja?Ja:Wa;for(var $a=0;$a<Ta.length;$a++)H.setAttributeForCell(Va,Ba[$a],Ta[$a]);if(null!=Y&&null!=O){var z=O[Va.getAttribute(Y)];null!=z&&H.labelChanged(Va,z)}if(null!=ba&&null!=da){var L=da[Va.getAttribute(ba)];null!=L&&(Va.style=L)}H.setAttributeForCell(Va,"placeholders","1");Va.style=H.replacePlaceholders(Va,Va.style,G);g?(0>mxUtils.indexOf(y,Ja)&&y.push(Ja),H.fireEvent(new mxEventObject("cellsInserted","cells",[Ja]))):H.fireEvent(new mxEventObject("cellsInserted",
-"cells",[Wa]));Ja=Wa;if(!g)for(Ca=0;Ca<Z.length;Ca++)C[Z[Ca].to][Ja.getAttribute(Z[Ca].to)]=Ja;null!=oa&&"link"!=oa&&(H.setLinkForCell(Ja,Ja.getAttribute(oa)),H.setAttributeForCell(Ja,oa,null));var M=this.editor.graph.getPreferredSizeForCell(Ja);ka=null!=ta?H.model.getCell(ja+Ta[ta]):null;if(Ja.vertex){Va=null!=ka?0:N;Aa=null!=ka?0:W;null!=V&&null!=Ja.getAttribute(V)&&(Ja.geometry.x=Va+parseFloat(Ja.getAttribute(V)));null!=P&&null!=Ja.getAttribute(P)&&(Ja.geometry.y=Aa+parseFloat(Ja.getAttribute(P)));
-var S="@"==U.charAt(0)?Ja.getAttribute(U.substring(1)):null;Ja.geometry.width=null!=S&&"auto"!=S?parseFloat(Ja.getAttribute(U.substring(1))):"auto"==U||"auto"==S?M.width+sa:parseFloat(U);var ca="@"==I.charAt(0)?Ja.getAttribute(I.substring(1)):null;Ja.geometry.height=null!=ca&&"auto"!=ca?parseFloat(ca):"auto"==I||"auto"==ca?M.height+sa:parseFloat(I);J+=Ja.geometry.height+fa}g?(null==F[bb]&&(F[bb]=[]),F[bb].push(Ja)):(m.push(Ja),null!=ka?(ka.style=H.replacePlaceholders(ka,X,G),H.addCell(Ja,ka),q.push(ka)):
-y.push(H.addCell(Ja)))}for(va=0;va<q.length;va++)S="@"==U.charAt(0)?q[va].getAttribute(U.substring(1)):null,ca="@"==I.charAt(0)?q[va].getAttribute(I.substring(1)):null,"auto"!=U&&"auto"!=S||"auto"!=I&&"auto"!=ca||H.updateGroupBounds([q[va]],sa,!0);var ia=y.slice(),na=y.slice();for(Ca=0;Ca<Z.length;Ca++){var ra=Z[Ca];for(va=0;va<m.length;va++){Ja=m[va];var qa=mxUtils.bind(this,function(Ma,db,Ra){var ib=db.getAttribute(Ra.from);if(null!=ib&&""!=ib){ib=ib.split(",");for(var mb=0;mb<ib.length;mb++){var nb=
-C[Ra.to][ib[mb]];if(null==nb&&null!=pa){nb=new mxCell(ib[mb],new mxGeometry(N,W,0,0),pa);nb.style=H.replacePlaceholders(db,nb.style,G);var pb=this.editor.graph.getPreferredSizeForCell(nb);nb.geometry.width=pb.width+sa;nb.geometry.height=pb.height+sa;C[Ra.to][ib[mb]]=nb;nb.vertex=!0;nb.id=ib[mb];y.push(H.addCell(nb))}if(null!=nb){pb=Ra.label;null!=Ra.fromlabel&&(pb=(db.getAttribute(Ra.fromlabel)||"")+(pb||""));null!=Ra.sourcelabel&&(pb=H.replacePlaceholders(db,Ra.sourcelabel,G)+(pb||""));null!=Ra.tolabel&&
-(pb=(pb||"")+(nb.getAttribute(Ra.tolabel)||""));null!=Ra.targetlabel&&(pb=(pb||"")+H.replacePlaceholders(nb,Ra.targetlabel,G));var cb="target"==Ra.placeholders==!Ra.invert?nb:Ma;cb=null!=Ra.style?H.replacePlaceholders(cb,Ra.style,G):H.createCurrentEdgeStyle();pb=H.insertEdge(null,null,pb||"",Ra.invert?nb:Ma,Ra.invert?Ma:nb,cb);if(null!=Ra.labels)for(cb=0;cb<Ra.labels.length;cb++){var eb=Ra.labels[cb],hb=new mxCell(eb.label||cb,new mxGeometry(null!=eb.x?eb.x:0,null!=eb.y?eb.y:0,0,0),"resizable=0;html=1;");
-hb.vertex=!0;hb.connectable=!1;hb.geometry.relative=!0;null!=eb.placeholders&&(hb.value=H.replacePlaceholders("target"==eb.placeholders==!Ra.invert?nb:Ma,hb.value,G));if(null!=eb.dx||null!=eb.dy)hb.geometry.offset=new mxPoint(null!=eb.dx?eb.dx:0,null!=eb.dy?eb.dy:0);pb.insert(hb)}na.push(pb);mxUtils.remove(Ra.invert?Ma:nb,ia)}}}});qa(Ja,Ja,ra);if(null!=F[Ja.id])for($a=0;$a<F[Ja.id].length;$a++)qa(Ja,F[Ja.id][$a],ra)}}if(null!=wa)for(va=0;va<m.length;va++)for(Ja=m[va],$a=0;$a<wa.length;$a++)H.setAttributeForCell(Ja,
-mxUtils.trim(wa[$a]),null);if(0<y.length){var ya=new mxParallelEdgeLayout(H);ya.spacing=R;ya.checkOverlap=!0;var Ea=function(){0<ya.spacing&&ya.execute(H.getDefaultParent());for(var Ma=0;Ma<y.length;Ma++){var db=H.getCellGeometry(y[Ma]);db.x=Math.round(H.snap(db.x));db.y=Math.round(H.snap(db.y));"auto"==U&&(db.width=Math.round(H.snap(db.width)));"auto"==I&&(db.height=Math.round(H.snap(db.height)))}};if("["==Q.charAt(0)){var Na=u;H.view.validate();this.executeLayouts(H.createLayouts(JSON.parse(Q)),
-function(){Ea();Na()});u=null}else if("circle"==Q){var Pa=new mxCircleLayout(H);Pa.disableEdgeStyle=!1;Pa.resetEdges=!1;var Qa=Pa.isVertexIgnored;Pa.isVertexIgnored=function(Ma){return Qa.apply(this,arguments)||0>mxUtils.indexOf(y,Ma)};this.executeLayout(function(){Pa.execute(H.getDefaultParent());Ea()},!0,u);u=null}else if("horizontaltree"==Q||"verticaltree"==Q||"auto"==Q&&na.length==2*y.length-1&&1==ia.length){H.view.validate();var Ua=new mxCompactTreeLayout(H,"horizontaltree"==Q);Ua.levelDistance=
-fa;Ua.edgeRouting=!1;Ua.resetEdges=!1;this.executeLayout(function(){Ua.execute(H.getDefaultParent(),0<ia.length?ia[0]:null)},!0,u);u=null}else if("horizontalflow"==Q||"verticalflow"==Q||"auto"==Q&&1==ia.length){H.view.validate();var La=new mxHierarchicalLayout(H,"horizontalflow"==Q?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);La.intraCellSpacing=fa;La.parallelEdgeSpacing=R;La.interRankCellSpacing=la;La.disableEdgeStyle=!1;this.executeLayout(function(){La.execute(H.getDefaultParent(),na);
-H.moveCells(na,N,W)},!0,u);u=null}else if("orgchart"==Q){H.view.validate();var ua=new mxOrgChartLayout(H,2,la,fa),za=ua.isVertexIgnored;ua.isVertexIgnored=function(Ma){return za.apply(this,arguments)||0>mxUtils.indexOf(y,Ma)};this.executeLayout(function(){ua.execute(H.getDefaultParent());Ea()},!0,u);u=null}else if("organic"==Q||"auto"==Q&&na.length>y.length){H.view.validate();var Ka=new mxFastOrganicLayout(H);Ka.forceConstant=3*fa;Ka.disableEdgeStyle=!1;Ka.resetEdges=!1;var Ga=Ka.isVertexIgnored;
-Ka.isVertexIgnored=function(Ma){return Ga.apply(this,arguments)||0>mxUtils.indexOf(y,Ma)};this.executeLayout(function(){Ka.execute(H.getDefaultParent());Ea()},!0,u);u=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=u&&u()}}catch(Ma){this.handleError(Ma)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",m;for(m in urlParams)0>mxUtils.indexOf(d,m)&&null!=urlParams[m]&&(f+=g+m+"="+urlParams[m],
-g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),m;for(m in urlParams)0>mxUtils.indexOf(g,m)&&(d=0==f?d+"?":d+"&",null!=urlParams[m]&&(d+=m+"="+urlParams[m],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,m,q){d=new LinkDialog(this,
-d,f,g,!0,m,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();
-var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);
-Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);
-this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=
-function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),m=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(m);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());
-this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(m&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(m);this.actions.get("createRevision").setEnabled(m);
-this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);
-this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};
-var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,m,q,y,F,C){var H=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,
-"svg",mxUtils.getXml(H.getSvg(m,q,y)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),aa=H.getGraphBounds(),da=Math.floor(aa.width*q/H.view.scale),ba=Math.floor(aa.height*q/H.view.scale);if(G.length<=MAX_REQUEST_SIZE&&da*ba<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var Y={globalVars:H.getExportVariables()};C&&(Y.grid={size:H.gridSize,steps:H.view.gridSteps,color:H.view.gridColor});d.saveRequest(f,g,function(pa,O){return new mxXmlRequest(EXPORT_URL,
-"format="+g+"&base64="+(O||"0")+(null!=pa?"&filename="+encodeURIComponent(pa):"")+"&extras="+encodeURIComponent(JSON.stringify(Y))+(0<F?"&dpi="+F:"")+"&bg="+(null!=m?m:"none")+"&w="+da+"&h="+ba+"&border="+y+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(q,null==m||"none"==m,!0,!1,!1,y,!0,!1,null,C,F):d.exportImage(q,!1,!0,!1,!1,y,!0,!1,"jpeg",C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);
-var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var m=d;this.currentPage!=this.pages[g]&&(m=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),m.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+m.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var m=
-document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(d));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var y={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var C=F[d];if("R"==C.substring(0,1)){var H=JSON.parse(decodeURIComponent(C.substring(1)));
-y[H[0]]={id:H[0],title:H[1],downloadUrl:H[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){q.innerHTML="";if(0==G.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var aa=0;aa<G.length;aa++){var da=G[aa];y[da.id]&&(f[da.id]=da);var ba=this.addCheckbox(q,da.title,y[da.id]);(function(Y,pa){mxEvent.addListener(pa,"change",function(){this.checked?f[Y.id]=Y:delete f[Y.id]})})(da,
-ba)}},mxUtils.bind(this,function(G){q.innerHTML="";var aa=document.createElement("div");aa.style.padding="8px";aa.style.textAlign="center";mxUtils.write(aa,mxResources.get("error")+": ");mxUtils.write(aa,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));q.appendChild(aa)}));g.appendChild(q);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,aa;for(aa in f)null==y[aa]&&(G++,mxUtils.bind(this,function(da){this.remoteInvoke("getFileContent",
-[da.downloadUrl],null,mxUtils.bind(this,function(ba){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ba,da))}catch(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[aa]));for(aa in y)f[aa]||this.closeLibrary(new RemoteLibrary(this,null,y[aa]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");
-this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=
-d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,m,q){var y=
-!0,F=window.setTimeout(mxUtils.bind(this,function(){y=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(F);y&&m.apply(this,arguments)}),H=mxUtils.bind(this,function(){window.clearTimeout(F);y&&q.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:H});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?
-this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,aa){var da={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=aa?da.error={errResp:aa}:null!=G&&(da.resp=G);this.remoteWin.postMessage(JSON.stringify(da),"*")});try{var m=d.funtionName,q=this.remoteInvokableFns[m];if(null!=q&&"function"===typeof this[m]){if(q.allowedDomains){for(var y=!1,F=0;F<q.allowedDomains.length;F++)if(f=="https://"+
-q.allowedDomains[F]){y=!0;break}if(!y){g(null,"Invalid Call: "+m+" is not allowed.");return}}var C=d.functionArgs;Array.isArray(C)||(C=[]);if(q.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),C.push(function(G){g(null,G||"Unkown Error")}),this[m].apply(this,C);else{var H=this[m].apply(this,C);g([H])}}else g(null,"Invalid Call: "+m+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=
-window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var m=g.open("database",2);m.onupgradeneeded=function(q){try{var y=m.result;1>q.oldVersion&&y.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(y.createObjectStore("files",{keyPath:"title"}),y.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};m.onsuccess=mxUtils.bind(this,function(q){var y=m.result;this.database=y;EditorUi.migrateStorageFiles&&
-(StorageFile.migrate(y),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"1"==urlParams.forceMigration){var C=document.createElement("iframe");C.style.display="none";C.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(C);var H=!0,G=!1,aa,da=0,ba=mxUtils.bind(this,function(){G=
-!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),Y=mxUtils.bind(this,function(){da++;pa()}),pa=mxUtils.bind(this,function(){try{if(da>=aa.length)ba();else{var X=aa[da];StorageFile.getFileContent(this,X,mxUtils.bind(this,function(ea){null==ea||".scratchpad"==X&&ea==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[X]}),
-"*"):Y()}),Y)}}catch(ea){console.log(ea)}}),O=mxUtils.bind(this,function(X){try{this.setDatabaseItem(null,[{title:X.title,size:X.data.length,lastModified:Date.now(),type:X.isLib?"L":"F"},{title:X.title,data:X.data}],Y,Y,["filesInfo","files"])}catch(ea){console.log(ea)}});F=mxUtils.bind(this,function(X){try{if(X.source==C.contentWindow){var ea={};try{ea=JSON.parse(X.data)}catch(ka){}"init"==ea.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ea.event||G||(H?null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?(aa=ea.resp[0],H=!1,pa()):ba():null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?O(ea.resp[0]):Y())}}catch(ka){console.log(ka)}});window.addEventListener("message",F)}})));d(y);y.onversionchange=function(){y.close()}});m.onerror=f;m.onblocked=function(){}}catch(q){null!=f&&f(q)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,
-f,g,m,q){this.openDatabase(mxUtils.bind(this,function(y){try{q=q||"objects";Array.isArray(q)||(q=[q],d=[d],f=[f]);var F=y.transaction(q,"readwrite");F.oncomplete=g;F.onerror=m;for(y=0;y<q.length;y++)F.objectStore(q[y]).put(null!=d&&null!=d[y]?{key:d[y],data:f[y]}:f[y])}catch(C){null!=m&&m(C)}}),m)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){m=m||"objects";Array.isArray(m)||(m=[m],d=[d]);q=q.transaction(m,"readwrite");q.oncomplete=f;q.onerror=
-g;for(var y=0;y<m.length;y++)q.objectStore(m[y]).delete(d[y])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){try{m=m||"objects";var y=q.transaction([m],"readonly").objectStore(m).get(d);y.onsuccess=function(){f(y.result)};y.onerror=g}catch(F){null!=g&&g(F)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),
-y=[];q.onsuccess=function(F){null==F.target.result?d(y):(y.push(F.target.result.value),F.target.result.continue())};q.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],"readonly").objectStore(g).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=f}catch(y){null!=f&&f(y)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=
-d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var m=this.getCurrentFile();null!=m?m.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=
-function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=
-function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=
-function(d,f,g,m,q,y,F,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,m,q,y,F,C)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,
-f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,m,q,y,F,C,H,G,aa,da,ba,Y,pa,O){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,m,q,y,F,C,H,G,aa,da,ba,Y,pa,O)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};
-EditorUi.prototype.convertImages=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,m)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");
-return Editor.updateCRC(d,f,g,m)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,m,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,m,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=
-localStorage.key(f),m=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<m.length){var q="<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(q||m)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===
-f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,k,n,D,t){function E(){for(var ja=da.getElementsByTagName("div"),U=0,I=0;I<ja.length;I++)"none"!=ja[I].style.display&&ja[I].parentNode==da&&U++;ba.style.display=0==U?"block":"none"}function d(ja,U,I,V){function P(){U.removeChild(la);U.removeChild(sa);fa.style.display="block";R.style.display="block"}H={div:U,comment:ja,saveCallback:I,deleteOnCancel:V};var R=U.querySelector(".geCommentTxt"),fa=U.querySelector(".geCommentActionsList"),la=document.createElement("textarea");
-la.className="geCommentEditTxtArea";la.style.minHeight=R.offsetHeight+"px";la.value=ja.content;U.insertBefore(la,R);var sa=document.createElement("div");sa.className="geCommentEditBtns";var u=mxUtils.button(mxResources.get("cancel"),function(){V?(U.parentNode.removeChild(U),E()):P();H=null});u.className="geCommentEditBtn";sa.appendChild(u);var J=mxUtils.button(mxResources.get("save"),function(){R.innerHTML="";ja.content=la.value;mxUtils.write(R,ja.content);P();I(ja);H=null});mxEvent.addListener(la,
-"keydown",mxUtils.bind(this,function(N){mxEvent.isConsumed(N)||((mxEvent.isControlDown(N)||mxClient.IS_MAC&&mxEvent.isMetaDown(N))&&13==N.keyCode?(J.click(),mxEvent.consume(N)):27==N.keyCode&&(u.click(),mxEvent.consume(N)))}));J.focus();J.className="geCommentEditBtn gePrimaryBtn";sa.appendChild(J);U.insertBefore(sa,R);fa.style.display="none";R.style.display="none";la.focus()}function f(ja,U){U.innerHTML="";ja=new Date(ja.modifiedDate);var I=b.timeSince(ja);null==I&&(I=mxResources.get("lessThanAMinute"));
-mxUtils.write(U,mxResources.get("timeAgo",[I],"{1} ago"));U.setAttribute("title",ja.toLocaleDateString()+" "+ja.toLocaleTimeString())}function g(ja){var U=document.createElement("img");U.className="geCommentBusyImg";U.src=IMAGE_PATH+"/spin.gif";ja.appendChild(U);ja.busyImg=U}function m(ja){ja.style.border="1px solid red";ja.removeChild(ja.busyImg)}function q(ja){ja.style.border="";ja.removeChild(ja.busyImg)}function y(ja,U,I,V,P){function R(T,Q,Z){var oa=document.createElement("li");oa.className=
-"geCommentAction";var wa=document.createElement("a");wa.className="geCommentActionLnk";mxUtils.write(wa,T);oa.appendChild(wa);mxEvent.addListener(wa,"click",function(Aa){Q(Aa,ja);Aa.preventDefault();mxEvent.consume(Aa)});W.appendChild(oa);Z&&(oa.style.display="none")}function fa(){function T(oa){Q.push(Z);if(null!=oa.replies)for(var wa=0;wa<oa.replies.length;wa++)Z=Z.nextSibling,T(oa.replies[wa])}var Q=[],Z=sa;T(ja);return{pdiv:Z,replies:Q}}function la(T,Q,Z,oa,wa){function Aa(){g(Oa);ja.addReply(va,
-function(Ca){va.id=Ca;ja.replies.push(va);q(Oa);Z&&Z()},function(Ca){ta();m(Oa);b.handleError(Ca,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},oa,wa)}function ta(){d(va,Oa,function(Ca){Aa()},!0)}var Ba=fa().pdiv,va=b.newComment(T,b.getCurrentUser());va.pCommentId=ja.id;null==ja.replies&&(ja.replies=[]);var Oa=y(va,ja.replies,Ba,V+1);Q?ta():Aa()}if(P||!ja.isResolved){ba.style.display="none";var sa=document.createElement("div");sa.className="geCommentContainer";sa.setAttribute("data-commentId",
-ja.id);sa.style.marginLeft=20*V+5+"px";ja.isResolved&&!Editor.isDarkMode()&&(sa.style.backgroundColor="ghostWhite");var u=document.createElement("div");u.className="geCommentHeader";var J=document.createElement("img");J.className="geCommentUserImg";J.src=ja.user.pictureUrl||Editor.userImage;u.appendChild(J);J=document.createElement("div");J.className="geCommentHeaderTxt";u.appendChild(J);var N=document.createElement("div");N.className="geCommentUsername";mxUtils.write(N,ja.user.displayName||"");J.appendChild(N);
-N=document.createElement("div");N.className="geCommentDate";N.setAttribute("data-commentId",ja.id);f(ja,N);J.appendChild(N);sa.appendChild(u);u=document.createElement("div");u.className="geCommentTxt";mxUtils.write(u,ja.content||"");sa.appendChild(u);ja.isLocked&&(sa.style.opacity="0.5");u=document.createElement("div");u.className="geCommentActions";var W=document.createElement("ul");W.className="geCommentActionsList";u.appendChild(W);F||ja.isLocked||0!=V&&!C||R(mxResources.get("reply"),function(){la("",
-!0)},ja.isResolved);J=b.getCurrentUser();null==J||J.id!=ja.user.id||F||ja.isLocked||(R(mxResources.get("edit"),function(){function T(){d(ja,sa,function(){g(sa);ja.editComment(ja.content,function(){q(sa)},function(Q){m(sa);T();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}T()},ja.isResolved),R(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(sa);ja.deleteComment(function(T){if(!0===T){T=sa.querySelector(".geCommentTxt");
-T.innerHTML="";mxUtils.write(T,mxResources.get("msgDeleted"));var Q=sa.querySelectorAll(".geCommentAction");for(T=0;T<Q.length;T++)Q[T].parentNode.removeChild(Q[T]);q(sa);sa.style.opacity="0.5"}else{Q=fa(ja).replies;for(T=0;T<Q.length;T++)da.removeChild(Q[T]);for(T=0;T<U.length;T++)if(U[T]==ja){U.splice(T,1);break}ba.style.display=0==da.getElementsByTagName("div").length?"block":"none"}},function(T){m(sa);b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
-ja.isResolved));F||ja.isLocked||0!=V||R(ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(T){function Q(){var Z=T.target;Z.innerHTML="";ja.isResolved=!ja.isResolved;mxUtils.write(Z,ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var oa=ja.isResolved?"none":"",wa=fa(ja).replies,Aa=Editor.isDarkMode()?"transparent":ja.isResolved?"ghostWhite":"white",ta=0;ta<wa.length;ta++){wa[ta].style.backgroundColor=Aa;for(var Ba=wa[ta].querySelectorAll(".geCommentAction"),
-va=0;va<Ba.length;va++)Ba[va]!=Z.parentNode&&(Ba[va].style.display=oa);O||(wa[ta].style.display="none")}E()}ja.isResolved?la(mxResources.get("reOpened")+": ",!0,Q,!1,!0):la(mxResources.get("markedAsResolved"),!1,Q,!0)});sa.appendChild(u);null!=I?da.insertBefore(sa,I.nextSibling):da.appendChild(sa);for(I=0;null!=ja.replies&&I<ja.replies.length;I++)u=ja.replies[I],u.isResolved=ja.isResolved,y(u,ja.replies,null,V+1,P);null!=H&&(H.comment.id==ja.id?(P=ja.content,ja.content=H.comment.content,d(ja,sa,H.saveCallback,
-H.deleteOnCancel),ja.content=P):null==H.comment.id&&H.comment.pCommentId==ja.id&&(da.appendChild(H.div),d(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return sa}}var F=!b.canComment(),C=b.canReplyToReplies(),H=null,G=document.createElement("div");G.className="geCommentsWin";G.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var aa=EditorUi.compactUi?"26px":"30px",da=document.createElement("div");da.className="geCommentsList";da.style.backgroundColor=Editor.isDarkMode()?
+EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),m=[],q=[],y=[],F={};if(0<g.length){var C={},H=this.editor.graph,G=null,aa=null,da=null,ba=null,Y=null,pa=null,O=null,X="whiteSpace=wrap;html=1;",ea=null,ka=null,ja="",U="auto",J="auto",V=!1,P=null,R=null,ia=40,la=40,ta=100,u=0,I=function(){null!=f?f(ra):(H.setSelectionCells(ra),H.scrollCellToVisible(H.getSelectionCell()))},N=H.getFreeInsertPoint(),W=N.x,T=N.y;N=T;var Q=null,Z="auto";ka=null;for(var na=[],va=null,Ba=null,sa=0;sa<
+g.length&&"#"==g[sa].charAt(0);){d=g[sa].replace(/\r$/,"");for(sa++;sa<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[sa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[sa].substring(1)),sa++;if("#"!=d.charAt(1)){var Da=d.indexOf(":");if(0<Da){var Aa=mxUtils.trim(d.substring(1,Da)),za=mxUtils.trim(d.substring(Da+1));"label"==Aa?Q=H.sanitizeHtml(za):"labelname"==Aa&&0<za.length&&"-"!=za?Y=za:"labels"==Aa&&0<za.length&&"-"!=za?O=JSON.parse(za):"style"==Aa?aa=za:"parentstyle"==Aa?X=za:"unknownStyle"==
+Aa&&"-"!=za?pa=za:"stylename"==Aa&&0<za.length&&"-"!=za?ba=za:"styles"==Aa&&0<za.length&&"-"!=za?da=JSON.parse(za):"vars"==Aa&&0<za.length&&"-"!=za?G=JSON.parse(za):"identity"==Aa&&0<za.length&&"-"!=za?ea=za:"parent"==Aa&&0<za.length&&"-"!=za?ka=za:"namespace"==Aa&&0<za.length&&"-"!=za?ja=za:"width"==Aa?U=za:"height"==Aa?J=za:"collapsed"==Aa&&"-"!=za?V="true"==za:"left"==Aa&&0<za.length?P=za:"top"==Aa&&0<za.length?R=za:"ignore"==Aa?Ba=za.split(","):"connect"==Aa?na.push(JSON.parse(za)):"link"==Aa?
+va=za:"padding"==Aa?u=parseFloat(za):"edgespacing"==Aa?ia=parseFloat(za):"nodespacing"==Aa?la=parseFloat(za):"levelspacing"==Aa?ta=parseFloat(za):"layout"==Aa&&(Z=za)}}}if(null==g[sa])throw Error(mxResources.get("invalidOrMissingFile"));var Ca=this.editor.csvToArray(g[sa].replace(/\r$/,""));Da=d=null;Aa=[];for(za=0;za<Ca.length;za++)ea==Ca[za]&&(d=za),ka==Ca[za]&&(Da=za),Aa.push(mxUtils.trim(Ca[za]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==Q&&(Q="%"+Aa[0]+"%");if(null!=
+na)for(var Qa=0;Qa<na.length;Qa++)null==C[na[Qa].to]&&(C[na[Qa].to]={});ea=[];for(za=sa+1;za<g.length;za++){var Za=this.editor.csvToArray(g[za].replace(/\r$/,""));if(null==Za){var cb=40<g[za].length?g[za].substring(0,40)+"...":g[za];throw Error(cb+" ("+za+"):\n"+mxResources.get("containsValidationErrors"));}0<Za.length&&ea.push(Za)}H.model.beginUpdate();try{for(za=0;za<ea.length;za++){Za=ea[za];var Ka=null,Ua=null!=d?ja+Za[d]:null;null!=Ua&&(Ka=H.model.getCell(Ua));var $a=new mxCell(Q,new mxGeometry(W,
+N,0,0),aa||"whiteSpace=wrap;html=1;");$a.collapsed=V;$a.vertex=!0;$a.id=Ua;null!=Ka&&H.model.setCollapsed(Ka,V);for(var z=0;z<Za.length;z++)H.setAttributeForCell($a,Aa[z],Za[z]),null!=Ka&&H.setAttributeForCell(Ka,Aa[z],Za[z]);if(null!=Y&&null!=O){var L=O[$a.getAttribute(Y)];null!=L&&(H.labelChanged($a,L),null!=Ka&&H.cellLabelChanged(Ka,L))}if(null!=ba&&null!=da){var M=da[$a.getAttribute(ba)];null!=M&&($a.style=M)}H.setAttributeForCell($a,"placeholders","1");$a.style=H.replacePlaceholders($a,$a.style,
+G);null!=Ka?(H.model.setStyle(Ka,$a.style),0>mxUtils.indexOf(y,Ka)&&y.push(Ka),H.fireEvent(new mxEventObject("cellsInserted","cells",[Ka]))):H.fireEvent(new mxEventObject("cellsInserted","cells",[$a]));g=null!=Ka;Ka=$a;if(!g)for(Qa=0;Qa<na.length;Qa++)C[na[Qa].to][Ka.getAttribute(na[Qa].to)]=Ka;null!=va&&"link"!=va&&(H.setLinkForCell(Ka,Ka.getAttribute(va)),H.setAttributeForCell(Ka,va,null));var S=this.editor.graph.getPreferredSizeForCell(Ka);ka=null!=Da?H.model.getCell(ja+Za[Da]):null;if(Ka.vertex){cb=
+null!=ka?0:W;sa=null!=ka?0:T;null!=P&&null!=Ka.getAttribute(P)&&(Ka.geometry.x=cb+parseFloat(Ka.getAttribute(P)));null!=R&&null!=Ka.getAttribute(R)&&(Ka.geometry.y=sa+parseFloat(Ka.getAttribute(R)));var ca="@"==U.charAt(0)?Ka.getAttribute(U.substring(1)):null;Ka.geometry.width=null!=ca&&"auto"!=ca?parseFloat(Ka.getAttribute(U.substring(1))):"auto"==U||"auto"==ca?S.width+u:parseFloat(U);var ha="@"==J.charAt(0)?Ka.getAttribute(J.substring(1)):null;Ka.geometry.height=null!=ha&&"auto"!=ha?parseFloat(ha):
+"auto"==J||"auto"==ha?S.height+u:parseFloat(J);N+=Ka.geometry.height+la}g?(null==F[Ua]&&(F[Ua]=[]),F[Ua].push(Ka)):(m.push(Ka),null!=ka?(ka.style=H.replacePlaceholders(ka,X,G),H.addCell(Ka,ka),q.push(ka)):y.push(H.addCell(Ka)))}for(za=0;za<q.length;za++)ca="@"==U.charAt(0)?q[za].getAttribute(U.substring(1)):null,ha="@"==J.charAt(0)?q[za].getAttribute(J.substring(1)):null,"auto"!=U&&"auto"!=ca||"auto"!=J&&"auto"!=ha||H.updateGroupBounds([q[za]],u,!0);var oa=y.slice(),ra=y.slice();for(Qa=0;Qa<na.length;Qa++){var qa=
+na[Qa];for(za=0;za<m.length;za++){Ka=m[za];var xa=mxUtils.bind(this,function(db,Va,fb){var kb=Va.getAttribute(fb.from);if(null!=kb&&""!=kb){kb=kb.split(",");for(var ub=0;ub<kb.length;ub++){var nb=C[fb.to][kb[ub]];if(null==nb&&null!=pa){nb=new mxCell(kb[ub],new mxGeometry(W,T,0,0),pa);nb.style=H.replacePlaceholders(Va,nb.style,G);var Ya=this.editor.graph.getPreferredSizeForCell(nb);nb.geometry.width=Ya.width+u;nb.geometry.height=Ya.height+u;C[fb.to][kb[ub]]=nb;nb.vertex=!0;nb.id=kb[ub];y.push(H.addCell(nb))}if(null!=
+nb){Ya=fb.label;null!=fb.fromlabel&&(Ya=(Va.getAttribute(fb.fromlabel)||"")+(Ya||""));null!=fb.sourcelabel&&(Ya=H.replacePlaceholders(Va,fb.sourcelabel,G)+(Ya||""));null!=fb.tolabel&&(Ya=(Ya||"")+(nb.getAttribute(fb.tolabel)||""));null!=fb.targetlabel&&(Ya=(Ya||"")+H.replacePlaceholders(nb,fb.targetlabel,G));var gb="target"==fb.placeholders==!fb.invert?nb:db;gb=null!=fb.style?H.replacePlaceholders(gb,fb.style,G):H.createCurrentEdgeStyle();Ya=H.insertEdge(null,null,Ya||"",fb.invert?nb:db,fb.invert?
+db:nb,gb);if(null!=fb.labels)for(gb=0;gb<fb.labels.length;gb++){var hb=fb.labels[gb],ob=new mxCell(hb.label||gb,new mxGeometry(null!=hb.x?hb.x:0,null!=hb.y?hb.y:0,0,0),"resizable=0;html=1;");ob.vertex=!0;ob.connectable=!1;ob.geometry.relative=!0;null!=hb.placeholders&&(ob.value=H.replacePlaceholders("target"==hb.placeholders==!fb.invert?nb:db,ob.value,G));if(null!=hb.dx||null!=hb.dy)ob.geometry.offset=new mxPoint(null!=hb.dx?hb.dx:0,null!=hb.dy?hb.dy:0);Ya.insert(ob)}ra.push(Ya);mxUtils.remove(fb.invert?
+db:nb,oa)}}}});xa(Ka,Ka,qa);if(null!=F[Ka.id])for(z=0;z<F[Ka.id].length;z++)xa(Ka,F[Ka.id][z],qa)}}if(null!=Ba)for(za=0;za<m.length;za++)for(Ka=m[za],z=0;z<Ba.length;z++)H.setAttributeForCell(Ka,mxUtils.trim(Ba[z]),null);if(0<y.length){var Ga=new mxParallelEdgeLayout(H);Ga.spacing=ia;Ga.checkOverlap=!0;var La=function(){0<Ga.spacing&&Ga.execute(H.getDefaultParent());for(var db=0;db<y.length;db++){var Va=H.getCellGeometry(y[db]);Va.x=Math.round(H.snap(Va.x));Va.y=Math.round(H.snap(Va.y));"auto"==U&&
+(Va.width=Math.round(H.snap(Va.width)));"auto"==J&&(Va.height=Math.round(H.snap(Va.height)))}};if("["==Z.charAt(0)){var Pa=I;H.view.validate();this.executeLayouts(H.createLayouts(JSON.parse(Z)),function(){La();Pa()});I=null}else if("circle"==Z){var Oa=new mxCircleLayout(H);Oa.disableEdgeStyle=!1;Oa.resetEdges=!1;var Ta=Oa.isVertexIgnored;Oa.isVertexIgnored=function(db){return Ta.apply(this,arguments)||0>mxUtils.indexOf(y,db)};this.executeLayout(function(){Oa.execute(H.getDefaultParent());La()},!0,
+I);I=null}else if("horizontaltree"==Z||"verticaltree"==Z||"auto"==Z&&ra.length==2*y.length-1&&1==oa.length){H.view.validate();var Ma=new mxCompactTreeLayout(H,"horizontaltree"==Z);Ma.levelDistance=la;Ma.edgeRouting=!1;Ma.resetEdges=!1;this.executeLayout(function(){Ma.execute(H.getDefaultParent(),0<oa.length?oa[0]:null)},!0,I);I=null}else if("horizontalflow"==Z||"verticalflow"==Z||"auto"==Z&&1==oa.length){H.view.validate();var ua=new mxHierarchicalLayout(H,"horizontalflow"==Z?mxConstants.DIRECTION_WEST:
+mxConstants.DIRECTION_NORTH);ua.intraCellSpacing=la;ua.parallelEdgeSpacing=ia;ua.interRankCellSpacing=ta;ua.disableEdgeStyle=!1;this.executeLayout(function(){ua.execute(H.getDefaultParent(),ra);H.moveCells(ra,W,T)},!0,I);I=null}else if("orgchart"==Z){H.view.validate();var ya=new mxOrgChartLayout(H,2,ta,la),Na=ya.isVertexIgnored;ya.isVertexIgnored=function(db){return Na.apply(this,arguments)||0>mxUtils.indexOf(y,db)};this.executeLayout(function(){ya.execute(H.getDefaultParent());La()},!0,I);I=null}else if("organic"==
+Z||"auto"==Z&&ra.length>y.length){H.view.validate();var Fa=new mxFastOrganicLayout(H);Fa.forceConstant=3*la;Fa.disableEdgeStyle=!1;Fa.resetEdges=!1;var Ra=Fa.isVertexIgnored;Fa.isVertexIgnored=function(db){return Ra.apply(this,arguments)||0>mxUtils.indexOf(y,db)};this.executeLayout(function(){Fa.execute(H.getDefaultParent());La()},!0,I);I=null}}this.hideDialog()}finally{H.model.endUpdate()}null!=I&&I()}}catch(db){this.handleError(db)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&
+"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",m;for(m in urlParams)0>mxUtils.indexOf(d,m)&&null!=urlParams[m]&&(f+=g+m+"="+urlParams[m],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),m;for(m in urlParams)0>mxUtils.indexOf(g,
+m)&&(d=0==f?d+"?":d+"&",null!=urlParams[m]&&(d+=m+"="+urlParams[m],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,m,q){d=new LinkDialog(this,d,f,g,!0,m,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=
+this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);
+this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);
+this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=
+function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),
+m=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(m);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(m&&
+0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(m);this.actions.get("createRevision").setEnabled(m);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);
+this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+
+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=
+function(d,f,g,m,q,y,F,C){var H=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(H.getSvg(m,q,y)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),aa=H.getGraphBounds(),da=Math.floor(aa.width*q/H.view.scale),ba=Math.floor(aa.height*q/H.view.scale);if(G.length<=MAX_REQUEST_SIZE&&da*ba<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var Y=
+{globalVars:H.getExportVariables()};C&&(Y.grid={size:H.gridSize,steps:H.view.gridSteps,color:H.view.gridColor});d.saveRequest(f,g,function(pa,O){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(O||"0")+(null!=pa?"&filename="+encodeURIComponent(pa):"")+"&extras="+encodeURIComponent(JSON.stringify(Y))+(0<F?"&dpi="+F:"")+"&bg="+(null!=m?m:"none")+"&w="+da+"&h="+ba+"&border="+y+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(q,null==m||"none"==m,!0,!1,!1,y,!0,!1,null,C,F):d.exportImage(q,
+!1,!0,!1,!1,y,!0,!1,"jpeg",C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var m=d;this.currentPage!=this.pages[g]&&(m=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),m.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+m.getIndexableText()+" "}else f=d.getIndexableText();
+this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(d));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+
+IMAGE_PATH+'/spin.gif"></div>';var y={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var C=F[d];if("R"==C.substring(0,1)){var H=JSON.parse(decodeURIComponent(C.substring(1)));y[H[0]]={id:H[0],title:H[1],downloadUrl:H[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){q.innerHTML="";if(0==G.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var aa=0;aa<
+G.length;aa++){var da=G[aa];y[da.id]&&(f[da.id]=da);var ba=this.addCheckbox(q,da.title,y[da.id]);(function(Y,pa){mxEvent.addListener(pa,"change",function(){this.checked?f[Y.id]=Y:delete f[Y.id]})})(da,ba)}},mxUtils.bind(this,function(G){q.innerHTML="";var aa=document.createElement("div");aa.style.padding="8px";aa.style.textAlign="center";mxUtils.write(aa,mxResources.get("error")+": ");mxUtils.write(aa,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));q.appendChild(aa)}));g.appendChild(q);
+g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,aa;for(aa in f)null==y[aa]&&(G++,mxUtils.bind(this,function(da){this.remoteInvoke("getFileContent",[da.downloadUrl],null,mxUtils.bind(this,function(ba){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ba,da))}catch(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,
+mxResources.get("errorLoadingFile"))}))})(f[aa]));for(aa in y)f[aa]||this.closeLibrary(new RemoteLibrary(this,null,y[aa]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},
+setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+
+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,m,q){var y=!0,F=window.setTimeout(mxUtils.bind(this,function(){y=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(F);y&&m.apply(this,arguments)}),H=mxUtils.bind(this,function(){window.clearTimeout(F);y&&q.apply(this,
+arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:H});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,aa){var da={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=aa?da.error={errResp:aa}:null!=G&&(da.resp=G);this.remoteWin.postMessage(JSON.stringify(da),
+"*")});try{var m=d.funtionName,q=this.remoteInvokableFns[m];if(null!=q&&"function"===typeof this[m]){if(q.allowedDomains){for(var y=!1,F=0;F<q.allowedDomains.length;F++)if(f=="https://"+q.allowedDomains[F]){y=!0;break}if(!y){g(null,"Invalid Call: "+m+" is not allowed.");return}}var C=d.functionArgs;Array.isArray(C)||(C=[]);if(q.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),C.push(function(G){g(null,G||"Unkown Error")}),this[m].apply(this,C);else{var H=this[m].apply(this,C);
+g([H])}}else g(null,"Invalid Call: "+m+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var m=g.open("database",2);m.onupgradeneeded=function(q){try{var y=m.result;1>q.oldVersion&&y.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(y.createObjectStore("files",{keyPath:"title"}),y.createObjectStore("filesInfo",
+{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};m.onsuccess=mxUtils.bind(this,function(q){var y=m.result;this.database=y;EditorUi.migrateStorageFiles&&(StorageFile.migrate(y),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"1"==urlParams.forceMigration){var C=document.createElement("iframe");C.style.display=
+"none";C.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(C);var H=!0,G=!1,aa,da=0,ba=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),Y=mxUtils.bind(this,function(){da++;pa()}),pa=mxUtils.bind(this,function(){try{if(da>=aa.length)ba();else{var X=aa[da];StorageFile.getFileContent(this,X,
+mxUtils.bind(this,function(ea){null==ea||".scratchpad"==X&&ea==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[X]}),"*"):Y()}),Y)}}catch(ea){console.log(ea)}}),O=mxUtils.bind(this,function(X){try{this.setDatabaseItem(null,[{title:X.title,size:X.data.length,lastModified:Date.now(),type:X.isLib?"L":"F"},{title:X.title,data:X.data}],Y,Y,["filesInfo","files"])}catch(ea){console.log(ea)}});F=mxUtils.bind(this,function(X){try{if(X.source==
+C.contentWindow){var ea={};try{ea=JSON.parse(X.data)}catch(ka){}"init"==ea.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ea.event||G||(H?null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?(aa=ea.resp[0],H=!1,pa()):ba():null!=ea.resp&&0<ea.resp.length&&null!=ea.resp[0]?O(ea.resp[0]):Y())}}catch(ka){console.log(ka)}});window.addEventListener("message",
+F)}})));d(y);y.onversionchange=function(){y.close()}});m.onerror=f;m.onblocked=function(){}}catch(q){null!=f&&f(q)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,f,g,m,q){this.openDatabase(mxUtils.bind(this,function(y){try{q=q||"objects";Array.isArray(q)||(q=[q],d=[d],f=[f]);var F=y.transaction(q,"readwrite");F.oncomplete=g;F.onerror=m;for(y=0;y<q.length;y++)F.objectStore(q[y]).put(null!=d&&null!=d[y]?{key:d[y],data:f[y]}:f[y])}catch(C){null!=m&&m(C)}}),m)};
+EditorUi.prototype.removeDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){m=m||"objects";Array.isArray(m)||(m=[m],d=[d]);q=q.transaction(m,"readwrite");q.oncomplete=f;q.onerror=g;for(var y=0;y<m.length;y++)q.objectStore(m[y]).delete(d[y])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){try{m=m||"objects";var y=q.transaction([m],"readonly").objectStore(m).get(d);y.onsuccess=function(){f(y.result)};y.onerror=g}catch(F){null!=
+g&&g(F)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),y=[];q.onsuccess=function(F){null==F.target.result?d(y):(y.push(F.target.result.value),F.target.result.continue())};q.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";
+var q=m.transaction([g],"readonly").objectStore(g).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=f}catch(y){null!=f&&f(y)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};
+EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var m=this.getCurrentFile();null!=m?m.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();
+return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==
+DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,m,q,y,F,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,m,q,y,F,C)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};
+EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,m,q,y,F,C,H,G,aa,da,ba,Y,pa,
+O){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,m,q,y,F,C,H,G,aa,da,ba,Y,pa,O)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,m)};EditorUi.prototype.convertImageToDataUri=function(d,
+f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,m)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=
+function(d,f,g,m,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,m,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),m=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<m.length){var q="<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,
+5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(q||m)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,e,k,n,D,t){function E(){for(var ja=da.getElementsByTagName("div"),U=0,J=0;J<ja.length;J++)"none"!=ja[J].style.display&&ja[J].parentNode==da&&U++;ba.style.display=0==U?"block":"none"}function d(ja,U,J,V){function P(){U.removeChild(la);U.removeChild(ta);ia.style.display="block";R.style.display="block"}H={div:U,comment:ja,saveCallback:J,deleteOnCancel:V};var R=U.querySelector(".geCommentTxt"),ia=U.querySelector(".geCommentActionsList"),la=document.createElement("textarea");
+la.className="geCommentEditTxtArea";la.style.minHeight=R.offsetHeight+"px";la.value=ja.content;U.insertBefore(la,R);var ta=document.createElement("div");ta.className="geCommentEditBtns";var u=mxUtils.button(mxResources.get("cancel"),function(){V?(U.parentNode.removeChild(U),E()):P();H=null});u.className="geCommentEditBtn";ta.appendChild(u);var I=mxUtils.button(mxResources.get("save"),function(){R.innerHTML="";ja.content=la.value;mxUtils.write(R,ja.content);P();J(ja);H=null});mxEvent.addListener(la,
+"keydown",mxUtils.bind(this,function(N){mxEvent.isConsumed(N)||((mxEvent.isControlDown(N)||mxClient.IS_MAC&&mxEvent.isMetaDown(N))&&13==N.keyCode?(I.click(),mxEvent.consume(N)):27==N.keyCode&&(u.click(),mxEvent.consume(N)))}));I.focus();I.className="geCommentEditBtn gePrimaryBtn";ta.appendChild(I);U.insertBefore(ta,R);ia.style.display="none";R.style.display="none";la.focus()}function f(ja,U){U.innerHTML="";ja=new Date(ja.modifiedDate);var J=b.timeSince(ja);null==J&&(J=mxResources.get("lessThanAMinute"));
+mxUtils.write(U,mxResources.get("timeAgo",[J],"{1} ago"));U.setAttribute("title",ja.toLocaleDateString()+" "+ja.toLocaleTimeString())}function g(ja){var U=document.createElement("img");U.className="geCommentBusyImg";U.src=IMAGE_PATH+"/spin.gif";ja.appendChild(U);ja.busyImg=U}function m(ja){ja.style.border="1px solid red";ja.removeChild(ja.busyImg)}function q(ja){ja.style.border="";ja.removeChild(ja.busyImg)}function y(ja,U,J,V,P){function R(T,Q,Z){var na=document.createElement("li");na.className=
+"geCommentAction";var va=document.createElement("a");va.className="geCommentActionLnk";mxUtils.write(va,T);na.appendChild(va);mxEvent.addListener(va,"click",function(Ba){Q(Ba,ja);Ba.preventDefault();mxEvent.consume(Ba)});W.appendChild(na);Z&&(na.style.display="none")}function ia(){function T(na){Q.push(Z);if(null!=na.replies)for(var va=0;va<na.replies.length;va++)Z=Z.nextSibling,T(na.replies[va])}var Q=[],Z=ta;T(ja);return{pdiv:Z,replies:Q}}function la(T,Q,Z,na,va){function Ba(){g(za);ja.addReply(Aa,
+function(Ca){Aa.id=Ca;ja.replies.push(Aa);q(za);Z&&Z()},function(Ca){sa();m(za);b.handleError(Ca,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},na,va)}function sa(){d(Aa,za,function(Ca){Ba()},!0)}var Da=ia().pdiv,Aa=b.newComment(T,b.getCurrentUser());Aa.pCommentId=ja.id;null==ja.replies&&(ja.replies=[]);var za=y(Aa,ja.replies,Da,V+1);Q?sa():Ba()}if(P||!ja.isResolved){ba.style.display="none";var ta=document.createElement("div");ta.className="geCommentContainer";ta.setAttribute("data-commentId",
+ja.id);ta.style.marginLeft=20*V+5+"px";ja.isResolved&&!Editor.isDarkMode()&&(ta.style.backgroundColor="ghostWhite");var u=document.createElement("div");u.className="geCommentHeader";var I=document.createElement("img");I.className="geCommentUserImg";I.src=ja.user.pictureUrl||Editor.userImage;u.appendChild(I);I=document.createElement("div");I.className="geCommentHeaderTxt";u.appendChild(I);var N=document.createElement("div");N.className="geCommentUsername";mxUtils.write(N,ja.user.displayName||"");I.appendChild(N);
+N=document.createElement("div");N.className="geCommentDate";N.setAttribute("data-commentId",ja.id);f(ja,N);I.appendChild(N);ta.appendChild(u);u=document.createElement("div");u.className="geCommentTxt";mxUtils.write(u,ja.content||"");ta.appendChild(u);ja.isLocked&&(ta.style.opacity="0.5");u=document.createElement("div");u.className="geCommentActions";var W=document.createElement("ul");W.className="geCommentActionsList";u.appendChild(W);F||ja.isLocked||0!=V&&!C||R(mxResources.get("reply"),function(){la("",
+!0)},ja.isResolved);I=b.getCurrentUser();null==I||I.id!=ja.user.id||F||ja.isLocked||(R(mxResources.get("edit"),function(){function T(){d(ja,ta,function(){g(ta);ja.editComment(ja.content,function(){q(ta)},function(Q){m(ta);T();b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}T()},ja.isResolved),R(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(ta);ja.deleteComment(function(T){if(!0===T){T=ta.querySelector(".geCommentTxt");
+T.innerHTML="";mxUtils.write(T,mxResources.get("msgDeleted"));var Q=ta.querySelectorAll(".geCommentAction");for(T=0;T<Q.length;T++)Q[T].parentNode.removeChild(Q[T]);q(ta);ta.style.opacity="0.5"}else{Q=ia(ja).replies;for(T=0;T<Q.length;T++)da.removeChild(Q[T]);for(T=0;T<U.length;T++)if(U[T]==ja){U.splice(T,1);break}ba.style.display=0==da.getElementsByTagName("div").length?"block":"none"}},function(T){m(ta);b.handleError(T,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
+ja.isResolved));F||ja.isLocked||0!=V||R(ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(T){function Q(){var Z=T.target;Z.innerHTML="";ja.isResolved=!ja.isResolved;mxUtils.write(Z,ja.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var na=ja.isResolved?"none":"",va=ia(ja).replies,Ba=Editor.isDarkMode()?"transparent":ja.isResolved?"ghostWhite":"white",sa=0;sa<va.length;sa++){va[sa].style.backgroundColor=Ba;for(var Da=va[sa].querySelectorAll(".geCommentAction"),
+Aa=0;Aa<Da.length;Aa++)Da[Aa]!=Z.parentNode&&(Da[Aa].style.display=na);O||(va[sa].style.display="none")}E()}ja.isResolved?la(mxResources.get("reOpened")+": ",!0,Q,!1,!0):la(mxResources.get("markedAsResolved"),!1,Q,!0)});ta.appendChild(u);null!=J?da.insertBefore(ta,J.nextSibling):da.appendChild(ta);for(J=0;null!=ja.replies&&J<ja.replies.length;J++)u=ja.replies[J],u.isResolved=ja.isResolved,y(u,ja.replies,null,V+1,P);null!=H&&(H.comment.id==ja.id?(P=ja.content,ja.content=H.comment.content,d(ja,ta,H.saveCallback,
+H.deleteOnCancel),ja.content=P):null==H.comment.id&&H.comment.pCommentId==ja.id&&(da.appendChild(H.div),d(H.comment,H.div,H.saveCallback,H.deleteOnCancel)));return ta}}var F=!b.canComment(),C=b.canReplyToReplies(),H=null,G=document.createElement("div");G.className="geCommentsWin";G.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var aa=EditorUi.compactUi?"26px":"30px",da=document.createElement("div");da.className="geCommentsList";da.style.backgroundColor=Editor.isDarkMode()?
Dialog.backdropColor:"whiteSmoke";da.style.bottom=parseInt(aa)+7+"px";G.appendChild(da);var ba=document.createElement("span");ba.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(ba,mxResources.get("noCommentsFound"));var Y=document.createElement("div");Y.className="geToolbarContainer geCommentsToolbar";Y.style.height=aa;Y.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";Y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";aa=document.createElement("a");
-aa.className="geButton";if(!F){var pa=aa.cloneNode();pa.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';pa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(pa,"click",function(ja){function U(){d(I,V,function(P){g(V);b.addComment(P,function(R){P.id=R;X.push(P);q(V)},function(R){m(V);U();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var I=b.newComment("",b.getCurrentUser()),V=y(I,X,null,0);
+aa.className="geButton";if(!F){var pa=aa.cloneNode();pa.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';pa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(pa,"click",function(ja){function U(){d(J,V,function(P){g(V);b.addComment(P,function(R){P.id=R;X.push(P);q(V)},function(R){m(V);U();b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var J=b.newComment("",b.getCurrentUser()),V=y(J,X,null,0);
U();ja.preventDefault();mxEvent.consume(ja)});Y.appendChild(pa)}pa=aa.cloneNode();pa.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';pa.setAttribute("title",mxResources.get("showResolved"));var O=!1;Editor.isDarkMode()&&(pa.style.filter="invert(100%)");mxEvent.addListener(pa,"click",function(ja){this.className=(O=!O)?"geButton geCheckedBtn":"geButton";ea();ja.preventDefault();mxEvent.consume(ja)});Y.appendChild(pa);b.commentsRefreshNeeded()&&(pa=aa.cloneNode(),
pa.innerHTML='<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',pa.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(pa.style.filter="invert(100%)"),mxEvent.addListener(pa,"click",function(ja){ea();ja.preventDefault();mxEvent.consume(ja)}),Y.appendChild(pa));b.commentsSaveNeeded()&&(aa=aa.cloneNode(),aa.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',aa.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&
-(aa.style.filter="invert(100%)"),mxEvent.addListener(aa,"click",function(ja){t();ja.preventDefault();mxEvent.consume(ja)}),Y.appendChild(aa));G.appendChild(Y);var X=[],ea=mxUtils.bind(this,function(){this.hasError=!1;if(null!=H)try{H.div=H.div.cloneNode(!0);var ja=H.div.querySelector(".geCommentEditTxtArea"),U=H.div.querySelector(".geCommentEditBtns");H.comment.content=ja.value;ja.parentNode.removeChild(ja);U.parentNode.removeChild(U)}catch(I){b.handleError(I)}da.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
-IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";C=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(I){function V(P){if(null!=P){P.sort(function(fa,la){return new Date(fa.modifiedDate)-new Date(la.modifiedDate)});for(var R=0;R<P.length;R++)V(P[R].replies)}}I.sort(function(P,R){return new Date(P.modifiedDate)-new Date(R.modifiedDate)});da.innerHTML="";da.appendChild(ba);ba.style.display="block";X=I;for(I=0;I<X.length;I++)V(X[I].replies),
-y(X[I],X,null,0,O);null!=H&&null==H.comment.id&&null==H.comment.pCommentId&&(da.appendChild(H.div),d(H.comment,H.div,H.saveCallback,H.deleteOnCancel))},mxUtils.bind(this,function(I){da.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(I&&I.message?": "+I.message:""));this.hasError=!0})):da.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ea();this.refreshComments=ea;Y=mxUtils.bind(this,function(){function ja(R){var fa=I[R.id];if(null!=fa)for(f(R,fa),fa=0;null!=R.replies&&fa<R.replies.length;fa++)ja(R.replies[fa])}
-if(this.window.isVisible()){for(var U=da.querySelectorAll(".geCommentDate"),I={},V=0;V<U.length;V++){var P=U[V];I[P.getAttribute("data-commentId")]=P}for(V=0;V<X.length;V++)ja(X[V])}});setInterval(Y,6E4);this.refreshCommentsTime=Y;this.window=new mxWindow(mxResources.get("comments"),G,e,k,n,D,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(ja,U){var I=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;ja=Math.max(0,Math.min(ja,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));U=Math.max(0,Math.min(U,I-this.table.clientHeight-48));this.getX()==ja&&this.getY()==U||mxWindow.prototype.setLocation.apply(this,arguments)};var ka=mxUtils.bind(this,function(){var ja=
+(aa.style.filter="invert(100%)"),mxEvent.addListener(aa,"click",function(ja){t();ja.preventDefault();mxEvent.consume(ja)}),Y.appendChild(aa));G.appendChild(Y);var X=[],ea=mxUtils.bind(this,function(){this.hasError=!1;if(null!=H)try{H.div=H.div.cloneNode(!0);var ja=H.div.querySelector(".geCommentEditTxtArea"),U=H.div.querySelector(".geCommentEditBtns");H.comment.content=ja.value;ja.parentNode.removeChild(ja);U.parentNode.removeChild(U)}catch(J){b.handleError(J)}da.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";C=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(J){function V(P){if(null!=P){P.sort(function(ia,la){return new Date(ia.modifiedDate)-new Date(la.modifiedDate)});for(var R=0;R<P.length;R++)V(P[R].replies)}}J.sort(function(P,R){return new Date(P.modifiedDate)-new Date(R.modifiedDate)});da.innerHTML="";da.appendChild(ba);ba.style.display="block";X=J;for(J=0;J<X.length;J++)V(X[J].replies),
+y(X[J],X,null,0,O);null!=H&&null==H.comment.id&&null==H.comment.pCommentId&&(da.appendChild(H.div),d(H.comment,H.div,H.saveCallback,H.deleteOnCancel))},mxUtils.bind(this,function(J){da.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(J&&J.message?": "+J.message:""));this.hasError=!0})):da.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ea();this.refreshComments=ea;Y=mxUtils.bind(this,function(){function ja(R){var ia=J[R.id];if(null!=ia)for(f(R,ia),ia=0;null!=R.replies&&ia<R.replies.length;ia++)ja(R.replies[ia])}
+if(this.window.isVisible()){for(var U=da.querySelectorAll(".geCommentDate"),J={},V=0;V<U.length;V++){var P=U[V];J[P.getAttribute("data-commentId")]=P}for(V=0;V<X.length;V++)ja(X[V])}});setInterval(Y,6E4);this.refreshCommentsTime=Y;this.window=new mxWindow(mxResources.get("comments"),G,e,k,n,D,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
+mxUtils.bind(this,function(){this.window.fit()}));this.window.setLocation=function(ja,U){var J=window.innerHeight||document.body.clientHeight||document.documentElement.clientHeight;ja=Math.max(0,Math.min(ja,(window.innerWidth||document.body.clientWidth||document.documentElement.clientWidth)-this.table.clientWidth));U=Math.max(0,Math.min(U,J-this.table.clientHeight-48));this.getX()==ja&&this.getY()==U||mxWindow.prototype.setLocation.apply(this,arguments)};var ka=mxUtils.bind(this,function(){var ja=
this.window.getX(),U=this.window.getY();this.window.setLocation(ja,U)});mxEvent.addListener(window,"resize",ka);this.destroy=function(){mxEvent.removeListener(window,"resize",ka);this.window.destroy()}},ConfirmDialog=function(b,e,k,n,D,t,E,d,f,g,m){var q=document.createElement("div");q.style.textAlign="center";m=null!=m?m:44;var y=document.createElement("div");y.style.padding="6px";y.style.overflow="auto";y.style.maxHeight=m+"px";y.style.lineHeight="1.2em";mxUtils.write(y,e);q.appendChild(y);null!=
g&&(y=document.createElement("div"),y.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",g),y.appendChild(e),q.appendChild(y));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var F=document.createElement("input");F.setAttribute("type","checkbox");t=mxUtils.button(t||mxResources.get("cancel"),function(){b.hideDialog();null!=n&&n(F.checked)});t.className="geBtn";null!=d&&(t.innerHTML=d+"<br>"+t.innerHTML,t.style.paddingBottom="8px",
t.style.paddingTop="8px",t.style.height="auto",t.style.width="40%");b.editor.cancelFirst&&g.appendChild(t);var C=mxUtils.button(D||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(F.checked)});g.appendChild(C);null!=E?(C.innerHTML=E+"<br>"+C.innerHTML+"<br>",C.style.paddingBottom="8px",C.style.paddingTop="8px",C.style.height="auto",C.className="geBtn",C.style.width="40%"):C.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(t);q.appendChild(g);f?(g.style.marginTop="10px",
@@ -3872,35 +3872,35 @@ f=new EmbedDialog(this,this.getLinkForPage(b,t,f));this.showDialog(f.container,4
n));return n};b.beforeDecode=function(e,k,n){n.ui=e.ui;n.relatedPage=n.ui.getPageById(k.getAttribute("relatedPage"));if(null==n.relatedPage){var D=k.ownerDocument.createElement("diagram");D.setAttribute("id",k.getAttribute("relatedPage"));D.setAttribute("name",k.getAttribute("name"));n.relatedPage=new DiagramPage(D);D=k.getAttribute("viewState");null!=D&&(n.relatedPage.viewState=JSON.parse(D),k.removeAttribute("viewState"));k=k.cloneNode(!0);D=k.firstChild;if(null!=D)for(n.relatedPage.root=e.decodeCell(D,
!1),n=D.nextSibling,D.parentNode.removeChild(D),D=n;null!=D;){n=D.nextSibling;if(D.nodeType==mxConstants.NODETYPE_ELEMENT){var t=D.getAttribute("id");null==e.lookup(t)&&e.decodeCell(D)}D.parentNode.removeChild(D);D=n}}return k};b.afterDecode=function(e,k,n){n.index=n.previousIndex;return n};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(n,D,t,E,d){D=null!=D?D:!1;null==t&&(t=this.getFoldableCells(this.getSelectionCells(),n));this.stopEditing();this.model.beginUpdate();try{for(var f=t.slice(),g=0;g<t.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(t[g]),"treeFolding","0")&&this.foldTreeCell(n,t[g]);t=f;t=b.apply(this,arguments)}finally{this.model.endUpdate()}return t};Graph.prototype.foldTreeCell=
function(n,D){this.model.beginUpdate();try{var t=[];this.traverse(D,!0,mxUtils.bind(this,function(d,f){var g=null!=f&&this.isTreeEdge(f);g&&t.push(f);d==D||null!=f&&!g||t.push(d);return(null==f||g)&&(d==D||!this.model.isCollapsed(d))}));this.model.setCollapsed(D,n);for(var E=0;E<t.length;E++)this.model.setVisible(t[E],!n)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(n){return!this.isEdgeIgnored(n)};Graph.prototype.getTreeEdges=function(n,D,t,E,d,f){return this.model.filterCells(this.getEdges(n,
-D,t,E,d,f),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function n(I){return H.isVertex(I)&&t(I)}function D(I){var V=
-!1;null!=I&&(V="1"==C.getCurrentCellStyle(I).treeMoving);return V}function t(I){var V=!1;null!=I&&(I=H.getParent(I),V=C.view.getState(I),V="tree"==(null!=V?V.style:C.getCellStyle(I)).containerType);return V}function E(I){var V=!1;null!=I&&(I=H.getParent(I),V=C.view.getState(I),C.view.getState(I),V=null!=(null!=V?V.style:C.getCellStyle(I)).childLayout);return V}function d(I){I=C.view.getState(I);if(null!=I){var V=C.getIncomingTreeEdges(I.cell);if(0<V.length&&(V=C.view.getState(V[0]),null!=V&&(V=V.absolutePoints,
-null!=V&&0<V.length&&(V=V[V.length-1],null!=V)))){if(V.y==I.y&&Math.abs(V.x-I.getCenterX())<I.width/2)return mxConstants.DIRECTION_SOUTH;if(V.y==I.y+I.height&&Math.abs(V.x-I.getCenterX())<I.width/2)return mxConstants.DIRECTION_NORTH;if(V.x>I.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(I,V){V=null!=V?V:!0;C.model.beginUpdate();try{var P=C.model.getParent(I),R=C.getIncomingTreeEdges(I),fa=C.cloneCells([R[0],I]);C.model.setTerminal(fa[0],C.model.getTerminal(R[0],
-!0),!0);var la=d(I),sa=P.geometry;la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?fa[1].geometry.x+=V?I.geometry.width+10:-fa[1].geometry.width-10:fa[1].geometry.y+=V?I.geometry.height+10:-fa[1].geometry.height-10;C.view.currentRoot!=P&&(fa[1].geometry.x-=sa.x,fa[1].geometry.y-=sa.y);var u=C.view.getState(I),J=C.view.scale;if(null!=u){var N=mxRectangle.fromRectangle(u);la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?N.x+=(V?I.geometry.width+10:-fa[1].geometry.width-
-10)*J:N.y+=(V?I.geometry.height+10:-fa[1].geometry.height-10)*J;var W=C.getOutgoingTreeEdges(C.model.getTerminal(R[0],!0));if(null!=W){for(var T=la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH,Q=sa=R=0;Q<W.length;Q++){var Z=C.model.getTerminal(W[Q],!1);if(la==d(Z)){var oa=C.view.getState(Z);Z!=I&&null!=oa&&(T&&V!=oa.getCenterX()<u.getCenterX()||!T&&V!=oa.getCenterY()<u.getCenterY())&&mxUtils.intersects(N,oa)&&(R=10+Math.max(R,(Math.min(N.x+N.width,oa.x+oa.width)-Math.max(N.x,oa.x))/
-J),sa=10+Math.max(sa,(Math.min(N.y+N.height,oa.y+oa.height)-Math.max(N.y,oa.y))/J))}}T?sa=0:R=0;for(Q=0;Q<W.length;Q++)if(Z=C.model.getTerminal(W[Q],!1),la==d(Z)&&(oa=C.view.getState(Z),Z!=I&&null!=oa&&(T&&V!=oa.getCenterX()<u.getCenterX()||!T&&V!=oa.getCenterY()<u.getCenterY()))){var wa=[];C.traverse(oa.cell,!0,function(Aa,ta){var Ba=null!=ta&&C.isTreeEdge(ta);Ba&&wa.push(ta);(null==ta||Ba)&&wa.push(Aa);return null==ta||Ba});C.moveCells(wa,(V?1:-1)*R,(V?1:-1)*sa)}}}return C.addCells(fa,P)}finally{C.model.endUpdate()}}
-function g(I){C.model.beginUpdate();try{var V=d(I),P=C.getIncomingTreeEdges(I),R=C.cloneCells([P[0],I]);C.model.setTerminal(P[0],R[1],!1);C.model.setTerminal(R[0],R[1],!0);C.model.setTerminal(R[0],I,!1);var fa=C.model.getParent(I),la=fa.geometry,sa=[];C.view.currentRoot!=fa&&(R[1].geometry.x-=la.x,R[1].geometry.y-=la.y);C.traverse(I,!0,function(N,W){var T=null!=W&&C.isTreeEdge(W);T&&sa.push(W);(null==W||T)&&sa.push(N);return null==W||T});var u=I.geometry.width+40,J=I.geometry.height+40;V==mxConstants.DIRECTION_SOUTH?
-u=0:V==mxConstants.DIRECTION_NORTH?(u=0,J=-J):V==mxConstants.DIRECTION_WEST?(u=-u,J=0):V==mxConstants.DIRECTION_EAST&&(J=0);C.moveCells(sa,u,J);return C.addCells(R,fa)}finally{C.model.endUpdate()}}function m(I,V){C.model.beginUpdate();try{var P=C.model.getParent(I),R=C.getIncomingTreeEdges(I),fa=d(I);0==R.length&&(R=[C.createEdge(P,null,"",null,null,C.createCurrentEdgeStyle())],fa=V);var la=C.cloneCells([R[0],I]);C.model.setTerminal(la[0],I,!0);if(null==C.model.getTerminal(la[0],!1)){C.model.setTerminal(la[0],
-la[1],!1);var sa=C.getCellStyle(la[1]).newEdgeStyle;if(null!=sa)try{var u=JSON.parse(sa),J;for(J in u)C.setCellStyles(J,u[J],[la[0]]),"edgeStyle"==J&&"elbowEdgeStyle"==u[J]&&C.setCellStyles("elbow",fa==mxConstants.DIRECTION_SOUTH||fa==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[la[0]])}catch(oa){}}R=C.getOutgoingTreeEdges(I);var N=P.geometry;V=[];C.view.currentRoot==P&&(N=new mxRectangle);for(sa=0;sa<R.length;sa++){var W=C.model.getTerminal(R[sa],!1);null!=W&&V.push(W)}var T=C.view.getBounds(V),
-Q=C.view.translate,Z=C.view.scale;fa==mxConstants.DIRECTION_SOUTH?(la[1].geometry.x=null==T?I.geometry.x+(I.geometry.width-la[1].geometry.width)/2:(T.x+T.width)/Z-Q.x-N.x+10,la[1].geometry.y+=la[1].geometry.height-N.y+40):fa==mxConstants.DIRECTION_NORTH?(la[1].geometry.x=null==T?I.geometry.x+(I.geometry.width-la[1].geometry.width)/2:(T.x+T.width)/Z-Q.x+-N.x+10,la[1].geometry.y-=la[1].geometry.height+N.y+40):(la[1].geometry.x=fa==mxConstants.DIRECTION_WEST?la[1].geometry.x-(la[1].geometry.width+N.x+
-40):la[1].geometry.x+(la[1].geometry.width-N.x+40),la[1].geometry.y=null==T?I.geometry.y+(I.geometry.height-la[1].geometry.height)/2:(T.y+T.height)/Z-Q.y+-N.y+10);return C.addCells(la,P)}finally{C.model.endUpdate()}}function q(I,V,P){I=C.getOutgoingTreeEdges(I);P=C.view.getState(P);var R=[];if(null!=P&&null!=I){for(var fa=0;fa<I.length;fa++){var la=C.view.getState(C.model.getTerminal(I[fa],!1));null!=la&&(!V&&Math.min(la.x+la.width,P.x+P.width)>=Math.max(la.x,P.x)||V&&Math.min(la.y+la.height,P.y+
-P.height)>=Math.max(la.y,P.y))&&R.push(la)}R.sort(function(sa,u){return V?sa.x+sa.width-u.x-u.width:sa.y+sa.height-u.y-u.height})}return R}function y(I,V){var P=d(I),R=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST)==R&&P!=V?F.actions.get("selectParent").funct():P==V?(V=C.getOutgoingTreeEdges(I),null!=V&&0<V.length&&C.setSelectionCell(C.model.getTerminal(V[0],!1))):(P=C.getIncomingTreeEdges(I),null!=P&&0<P.length&&(R=q(C.model.getTerminal(P[0],
-!0),R,I),I=C.view.getState(I),null!=I&&(I=mxUtils.indexOf(R,I),0<=I&&(I+=V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_WEST?-1:1,0<=I&&I<=R.length-1&&C.setSelectionCell(R[I].cell)))))}var F=this,C=F.editor.graph,H=C.getModel(),G=F.menus.createPopupMenu;F.menus.createPopupMenu=function(I,V,P){G.apply(this,arguments);if(1==C.getSelectionCount()){V=C.getSelectionCell();var R=C.getOutgoingTreeEdges(V);I.addSeparator();0<R.length&&(n(C.getSelectionCell())&&this.addMenuItems(I,["selectChildren"],
-null,P),this.addMenuItems(I,["selectDescendants"],null,P));n(C.getSelectionCell())?(I.addSeparator(),0<C.getIncomingTreeEdges(V).length&&this.addMenuItems(I,["selectSiblings","selectParent"],null,P)):0<C.model.getEdgeCount(V)&&this.addMenuItems(I,["selectConnections"],null,P)}};F.actions.addAction("selectChildren",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var I=C.getSelectionCell();I=C.getOutgoingTreeEdges(I);if(null!=I){for(var V=[],P=0;P<I.length;P++)V.push(C.model.getTerminal(I[P],
-!1));C.setSelectionCells(V)}}},null,null,"Alt+Shift+X");F.actions.addAction("selectSiblings",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var I=C.getSelectionCell();I=C.getIncomingTreeEdges(I);if(null!=I&&0<I.length&&(I=C.getOutgoingTreeEdges(C.model.getTerminal(I[0],!0)),null!=I)){for(var V=[],P=0;P<I.length;P++)V.push(C.model.getTerminal(I[P],!1));C.setSelectionCells(V)}}},null,null,"Alt+Shift+S");F.actions.addAction("selectParent",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var I=
-C.getSelectionCell();I=C.getIncomingTreeEdges(I);null!=I&&0<I.length&&C.setSelectionCell(C.model.getTerminal(I[0],!0))}},null,null,"Alt+Shift+P");F.actions.addAction("selectDescendants",function(I,V){I=C.getSelectionCell();if(C.isEnabled()&&C.model.isVertex(I)){if(null!=V&&mxEvent.isAltDown(V))C.setSelectionCells(C.model.getTreeEdges(I,null==V||!mxEvent.isShiftDown(V),null==V||!mxEvent.isControlDown(V)));else{var P=[];C.traverse(I,!0,function(R,fa){var la=null!=fa&&C.isTreeEdge(fa);la&&P.push(fa);
-null!=fa&&!la||null!=V&&mxEvent.isShiftDown(V)||P.push(R);return null==fa||la})}C.setSelectionCells(P)}},null,null,"Alt+Shift+D");var aa=C.removeCells;C.removeCells=function(I,V){V=null!=V?V:!0;null==I&&(I=this.getDeletableCells(this.getSelectionCells()));V&&(I=this.getDeletableCells(this.addAllEdges(I)));for(var P=[],R=0;R<I.length;R++){var fa=I[R];H.isEdge(fa)&&t(fa)&&(P.push(fa),fa=H.getTerminal(fa,!1));if(n(fa)){var la=[];C.traverse(fa,!0,function(sa,u){var J=null!=u&&C.isTreeEdge(u);J&&la.push(u);
-(null==u||J)&&la.push(sa);return null==u||J});0<la.length&&(P=P.concat(la),fa=C.getIncomingTreeEdges(I[R]),I=I.concat(fa))}else null!=fa&&P.push(I[R])}I=P;return aa.apply(this,arguments)};F.hoverIcons.getStateAt=function(I,V,P){return n(I.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,P))};var da=C.duplicateCells;C.duplicateCells=function(I,V){I=null!=I?I:this.getSelectionCells();for(var P=I.slice(0),R=0;R<P.length;R++){var fa=C.view.getState(P[R]);if(null!=fa&&n(fa.cell)){var la=C.getIncomingTreeEdges(fa.cell);
-for(fa=0;fa<la.length;fa++)mxUtils.remove(la[fa],I)}}this.model.beginUpdate();try{var sa=da.call(this,I,V);if(sa.length==I.length)for(R=0;R<I.length;R++)if(n(I[R])){var u=C.getIncomingTreeEdges(sa[R]);la=C.getIncomingTreeEdges(I[R]);if(0==u.length&&0<la.length){var J=this.cloneCell(la[0]);this.addEdge(J,C.getDefaultParent(),this.model.getTerminal(la[0],!0),sa[R])}}}finally{this.model.endUpdate()}return sa};var ba=C.moveCells;C.moveCells=function(I,V,P,R,fa,la,sa){var u=null;this.model.beginUpdate();
-try{var J=fa,N=this.getCurrentCellStyle(fa);if(null!=I&&n(fa)&&"1"==mxUtils.getValue(N,"treeFolding","0")){for(var W=0;W<I.length;W++)if(n(I[W])||C.model.isEdge(I[W])&&null==C.model.getTerminal(I[W],!0)){fa=C.model.getParent(I[W]);break}if(null!=J&&fa!=J&&null!=this.view.getState(I[0])){var T=C.getIncomingTreeEdges(I[0]);if(0<T.length){var Q=C.view.getState(C.model.getTerminal(T[0],!0));if(null!=Q){var Z=C.view.getState(J);null!=Z&&(V=(Z.getCenterX()-Q.getCenterX())/C.view.scale,P=(Z.getCenterY()-
-Q.getCenterY())/C.view.scale)}}}}u=ba.apply(this,arguments);if(null!=u&&null!=I&&u.length==I.length)for(W=0;W<u.length;W++)if(this.model.isEdge(u[W]))n(J)&&0>mxUtils.indexOf(u,this.model.getTerminal(u[W],!0))&&this.model.setTerminal(u[W],J,!0);else if(n(I[W])&&(T=C.getIncomingTreeEdges(I[W]),0<T.length))if(!R)n(J)&&0>mxUtils.indexOf(I,this.model.getTerminal(T[0],!0))&&this.model.setTerminal(T[0],J,!0);else if(0==C.getIncomingTreeEdges(u[W]).length){N=J;if(null==N||N==C.model.getParent(I[W]))N=C.model.getTerminal(T[0],
-!0);R=this.cloneCell(T[0]);this.addEdge(R,C.getDefaultParent(),N,u[W])}}finally{this.model.endUpdate()}return u};if(null!=F.sidebar){var Y=F.sidebar.dropAndConnect;F.sidebar.dropAndConnect=function(I,V,P,R){var fa=C.model,la=null;fa.beginUpdate();try{if(la=Y.apply(this,arguments),n(I))for(var sa=0;sa<la.length;sa++)if(fa.isEdge(la[sa])&&null==fa.getTerminal(la[sa],!0)){fa.setTerminal(la[sa],I,!0);var u=C.getCellGeometry(la[sa]);u.points=null;null!=u.getTerminalPoint(!0)&&u.setTerminalPoint(null,!0)}}finally{fa.endUpdate()}return la}}var pa=
-{88:F.actions.get("selectChildren"),84:F.actions.get("selectSubtree"),80:F.actions.get("selectParent"),83:F.actions.get("selectSiblings")},O=F.onKeyDown;F.onKeyDown=function(I){try{if(C.isEnabled()&&!C.isEditing()&&n(C.getSelectionCell())&&1==C.getSelectionCount()){var V=null;0<C.getIncomingTreeEdges(C.getSelectionCell()).length&&(9==I.which?V=mxEvent.isShiftDown(I)?g(C.getSelectionCell()):m(C.getSelectionCell()):13==I.which&&(V=f(C.getSelectionCell(),!mxEvent.isShiftDown(I))));if(null!=V&&0<V.length)1==
-V.length&&C.model.isEdge(V[0])?C.setSelectionCell(C.model.getTerminal(V[0],!1)):C.setSelectionCell(V[V.length-1]),null!=F.hoverIcons&&F.hoverIcons.update(C.view.getState(C.getSelectionCell())),C.startEditingAtCell(C.getSelectionCell()),mxEvent.consume(I);else if(mxEvent.isAltDown(I)&&mxEvent.isShiftDown(I)){var P=pa[I.keyCode];null!=P&&(P.funct(I),mxEvent.consume(I))}else 37==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(I)):38==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_NORTH),
-mxEvent.consume(I)):39==I.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(I)):40==I.keyCode&&(y(C.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(I))}}catch(R){F.handleError(R)}mxEvent.isConsumed(I)||O.apply(this,arguments)};var X=C.connectVertex;C.connectVertex=function(I,V,P,R,fa,la,sa){var u=C.getIncomingTreeEdges(I);if(n(I)){var J=d(I),N=J==mxConstants.DIRECTION_EAST||J==mxConstants.DIRECTION_WEST,W=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
-return J==V||0==u.length?m(I,V):N==W?g(I):f(I,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return X.apply(this,arguments)};C.getSubtree=function(I){var V=[I];!D(I)&&!n(I)||E(I)||C.traverse(I,!0,function(P,R){var fa=null!=R&&C.isTreeEdge(R);fa&&0>mxUtils.indexOf(V,R)&&V.push(R);(null==R||fa)&&0>mxUtils.indexOf(V,P)&&V.push(P);return null==R||fa});return V};var ea=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ea.apply(this,arguments);(D(this.state.cell)||
-n(this.state.cell))&&!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(I){this.graph.graphHandler.start(this.state.cell,
-mxEvent.getClientX(I),mxEvent.getClientY(I),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(I);this.graph.isMouseDown=!0;F.hoverIcons.reset();mxEvent.consume(I)})))};var ka=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){ka.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
-this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var ja=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(I){ja.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=I?"":"none")};var U=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(I,V){U.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==
+D,t,E,d,f),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function n(J){return H.isVertex(J)&&t(J)}function D(J){var V=
+!1;null!=J&&(V="1"==C.getCurrentCellStyle(J).treeMoving);return V}function t(J){var V=!1;null!=J&&(J=H.getParent(J),V=C.view.getState(J),V="tree"==(null!=V?V.style:C.getCellStyle(J)).containerType);return V}function E(J){var V=!1;null!=J&&(J=H.getParent(J),V=C.view.getState(J),C.view.getState(J),V=null!=(null!=V?V.style:C.getCellStyle(J)).childLayout);return V}function d(J){J=C.view.getState(J);if(null!=J){var V=C.getIncomingTreeEdges(J.cell);if(0<V.length&&(V=C.view.getState(V[0]),null!=V&&(V=V.absolutePoints,
+null!=V&&0<V.length&&(V=V[V.length-1],null!=V)))){if(V.y==J.y&&Math.abs(V.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_SOUTH;if(V.y==J.y+J.height&&Math.abs(V.x-J.getCenterX())<J.width/2)return mxConstants.DIRECTION_NORTH;if(V.x>J.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(J,V){V=null!=V?V:!0;C.model.beginUpdate();try{var P=C.model.getParent(J),R=C.getIncomingTreeEdges(J),ia=C.cloneCells([R[0],J]);C.model.setTerminal(ia[0],C.model.getTerminal(R[0],
+!0),!0);var la=d(J),ta=P.geometry;la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?ia[1].geometry.x+=V?J.geometry.width+10:-ia[1].geometry.width-10:ia[1].geometry.y+=V?J.geometry.height+10:-ia[1].geometry.height-10;C.view.currentRoot!=P&&(ia[1].geometry.x-=ta.x,ia[1].geometry.y-=ta.y);var u=C.view.getState(J),I=C.view.scale;if(null!=u){var N=mxRectangle.fromRectangle(u);la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?N.x+=(V?J.geometry.width+10:-ia[1].geometry.width-
+10)*I:N.y+=(V?J.geometry.height+10:-ia[1].geometry.height-10)*I;var W=C.getOutgoingTreeEdges(C.model.getTerminal(R[0],!0));if(null!=W){for(var T=la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH,Q=ta=R=0;Q<W.length;Q++){var Z=C.model.getTerminal(W[Q],!1);if(la==d(Z)){var na=C.view.getState(Z);Z!=J&&null!=na&&(T&&V!=na.getCenterX()<u.getCenterX()||!T&&V!=na.getCenterY()<u.getCenterY())&&mxUtils.intersects(N,na)&&(R=10+Math.max(R,(Math.min(N.x+N.width,na.x+na.width)-Math.max(N.x,na.x))/
+I),ta=10+Math.max(ta,(Math.min(N.y+N.height,na.y+na.height)-Math.max(N.y,na.y))/I))}}T?ta=0:R=0;for(Q=0;Q<W.length;Q++)if(Z=C.model.getTerminal(W[Q],!1),la==d(Z)&&(na=C.view.getState(Z),Z!=J&&null!=na&&(T&&V!=na.getCenterX()<u.getCenterX()||!T&&V!=na.getCenterY()<u.getCenterY()))){var va=[];C.traverse(na.cell,!0,function(Ba,sa){var Da=null!=sa&&C.isTreeEdge(sa);Da&&va.push(sa);(null==sa||Da)&&va.push(Ba);return null==sa||Da});C.moveCells(va,(V?1:-1)*R,(V?1:-1)*ta)}}}return C.addCells(ia,P)}finally{C.model.endUpdate()}}
+function g(J){C.model.beginUpdate();try{var V=d(J),P=C.getIncomingTreeEdges(J),R=C.cloneCells([P[0],J]);C.model.setTerminal(P[0],R[1],!1);C.model.setTerminal(R[0],R[1],!0);C.model.setTerminal(R[0],J,!1);var ia=C.model.getParent(J),la=ia.geometry,ta=[];C.view.currentRoot!=ia&&(R[1].geometry.x-=la.x,R[1].geometry.y-=la.y);C.traverse(J,!0,function(N,W){var T=null!=W&&C.isTreeEdge(W);T&&ta.push(W);(null==W||T)&&ta.push(N);return null==W||T});var u=J.geometry.width+40,I=J.geometry.height+40;V==mxConstants.DIRECTION_SOUTH?
+u=0:V==mxConstants.DIRECTION_NORTH?(u=0,I=-I):V==mxConstants.DIRECTION_WEST?(u=-u,I=0):V==mxConstants.DIRECTION_EAST&&(I=0);C.moveCells(ta,u,I);return C.addCells(R,ia)}finally{C.model.endUpdate()}}function m(J,V){C.model.beginUpdate();try{var P=C.model.getParent(J),R=C.getIncomingTreeEdges(J),ia=d(J);0==R.length&&(R=[C.createEdge(P,null,"",null,null,C.createCurrentEdgeStyle())],ia=V);var la=C.cloneCells([R[0],J]);C.model.setTerminal(la[0],J,!0);if(null==C.model.getTerminal(la[0],!1)){C.model.setTerminal(la[0],
+la[1],!1);var ta=C.getCellStyle(la[1]).newEdgeStyle;if(null!=ta)try{var u=JSON.parse(ta),I;for(I in u)C.setCellStyles(I,u[I],[la[0]]),"edgeStyle"==I&&"elbowEdgeStyle"==u[I]&&C.setCellStyles("elbow",ia==mxConstants.DIRECTION_SOUTH||ia==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[la[0]])}catch(na){}}R=C.getOutgoingTreeEdges(J);var N=P.geometry;V=[];C.view.currentRoot==P&&(N=new mxRectangle);for(ta=0;ta<R.length;ta++){var W=C.model.getTerminal(R[ta],!1);null!=W&&V.push(W)}var T=C.view.getBounds(V),
+Q=C.view.translate,Z=C.view.scale;ia==mxConstants.DIRECTION_SOUTH?(la[1].geometry.x=null==T?J.geometry.x+(J.geometry.width-la[1].geometry.width)/2:(T.x+T.width)/Z-Q.x-N.x+10,la[1].geometry.y+=la[1].geometry.height-N.y+40):ia==mxConstants.DIRECTION_NORTH?(la[1].geometry.x=null==T?J.geometry.x+(J.geometry.width-la[1].geometry.width)/2:(T.x+T.width)/Z-Q.x+-N.x+10,la[1].geometry.y-=la[1].geometry.height+N.y+40):(la[1].geometry.x=ia==mxConstants.DIRECTION_WEST?la[1].geometry.x-(la[1].geometry.width+N.x+
+40):la[1].geometry.x+(la[1].geometry.width-N.x+40),la[1].geometry.y=null==T?J.geometry.y+(J.geometry.height-la[1].geometry.height)/2:(T.y+T.height)/Z-Q.y+-N.y+10);return C.addCells(la,P)}finally{C.model.endUpdate()}}function q(J,V,P){J=C.getOutgoingTreeEdges(J);P=C.view.getState(P);var R=[];if(null!=P&&null!=J){for(var ia=0;ia<J.length;ia++){var la=C.view.getState(C.model.getTerminal(J[ia],!1));null!=la&&(!V&&Math.min(la.x+la.width,P.x+P.width)>=Math.max(la.x,P.x)||V&&Math.min(la.y+la.height,P.y+
+P.height)>=Math.max(la.y,P.y))&&R.push(la)}R.sort(function(ta,u){return V?ta.x+ta.width-u.x-u.width:ta.y+ta.height-u.y-u.height})}return R}function y(J,V){var P=d(J),R=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;(P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST)==R&&P!=V?F.actions.get("selectParent").funct():P==V?(V=C.getOutgoingTreeEdges(J),null!=V&&0<V.length&&C.setSelectionCell(C.model.getTerminal(V[0],!1))):(P=C.getIncomingTreeEdges(J),null!=P&&0<P.length&&(R=q(C.model.getTerminal(P[0],
+!0),R,J),J=C.view.getState(J),null!=J&&(J=mxUtils.indexOf(R,J),0<=J&&(J+=V==mxConstants.DIRECTION_NORTH||V==mxConstants.DIRECTION_WEST?-1:1,0<=J&&J<=R.length-1&&C.setSelectionCell(R[J].cell)))))}var F=this,C=F.editor.graph,H=C.getModel(),G=F.menus.createPopupMenu;F.menus.createPopupMenu=function(J,V,P){G.apply(this,arguments);if(1==C.getSelectionCount()){V=C.getSelectionCell();var R=C.getOutgoingTreeEdges(V);J.addSeparator();0<R.length&&(n(C.getSelectionCell())&&this.addMenuItems(J,["selectChildren"],
+null,P),this.addMenuItems(J,["selectDescendants"],null,P));n(C.getSelectionCell())?(J.addSeparator(),0<C.getIncomingTreeEdges(V).length&&this.addMenuItems(J,["selectSiblings","selectParent"],null,P)):0<C.model.getEdgeCount(V)&&this.addMenuItems(J,["selectConnections"],null,P)}};F.actions.addAction("selectChildren",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var J=C.getSelectionCell();J=C.getOutgoingTreeEdges(J);if(null!=J){for(var V=[],P=0;P<J.length;P++)V.push(C.model.getTerminal(J[P],
+!1));C.setSelectionCells(V)}}},null,null,"Alt+Shift+X");F.actions.addAction("selectSiblings",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var J=C.getSelectionCell();J=C.getIncomingTreeEdges(J);if(null!=J&&0<J.length&&(J=C.getOutgoingTreeEdges(C.model.getTerminal(J[0],!0)),null!=J)){for(var V=[],P=0;P<J.length;P++)V.push(C.model.getTerminal(J[P],!1));C.setSelectionCells(V)}}},null,null,"Alt+Shift+S");F.actions.addAction("selectParent",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var J=
+C.getSelectionCell();J=C.getIncomingTreeEdges(J);null!=J&&0<J.length&&C.setSelectionCell(C.model.getTerminal(J[0],!0))}},null,null,"Alt+Shift+P");F.actions.addAction("selectDescendants",function(J,V){J=C.getSelectionCell();if(C.isEnabled()&&C.model.isVertex(J)){if(null!=V&&mxEvent.isAltDown(V))C.setSelectionCells(C.model.getTreeEdges(J,null==V||!mxEvent.isShiftDown(V),null==V||!mxEvent.isControlDown(V)));else{var P=[];C.traverse(J,!0,function(R,ia){var la=null!=ia&&C.isTreeEdge(ia);la&&P.push(ia);
+null!=ia&&!la||null!=V&&mxEvent.isShiftDown(V)||P.push(R);return null==ia||la})}C.setSelectionCells(P)}},null,null,"Alt+Shift+D");var aa=C.removeCells;C.removeCells=function(J,V){V=null!=V?V:!0;null==J&&(J=this.getDeletableCells(this.getSelectionCells()));V&&(J=this.getDeletableCells(this.addAllEdges(J)));for(var P=[],R=0;R<J.length;R++){var ia=J[R];H.isEdge(ia)&&t(ia)&&(P.push(ia),ia=H.getTerminal(ia,!1));if(n(ia)){var la=[];C.traverse(ia,!0,function(ta,u){var I=null!=u&&C.isTreeEdge(u);I&&la.push(u);
+(null==u||I)&&la.push(ta);return null==u||I});0<la.length&&(P=P.concat(la),ia=C.getIncomingTreeEdges(J[R]),J=J.concat(ia))}else null!=ia&&P.push(J[R])}J=P;return aa.apply(this,arguments)};F.hoverIcons.getStateAt=function(J,V,P){return n(J.cell)?null:this.graph.view.getState(this.graph.getCellAt(V,P))};var da=C.duplicateCells;C.duplicateCells=function(J,V){J=null!=J?J:this.getSelectionCells();for(var P=J.slice(0),R=0;R<P.length;R++){var ia=C.view.getState(P[R]);if(null!=ia&&n(ia.cell)){var la=C.getIncomingTreeEdges(ia.cell);
+for(ia=0;ia<la.length;ia++)mxUtils.remove(la[ia],J)}}this.model.beginUpdate();try{var ta=da.call(this,J,V);if(ta.length==J.length)for(R=0;R<J.length;R++)if(n(J[R])){var u=C.getIncomingTreeEdges(ta[R]);la=C.getIncomingTreeEdges(J[R]);if(0==u.length&&0<la.length){var I=this.cloneCell(la[0]);this.addEdge(I,C.getDefaultParent(),this.model.getTerminal(la[0],!0),ta[R])}}}finally{this.model.endUpdate()}return ta};var ba=C.moveCells;C.moveCells=function(J,V,P,R,ia,la,ta){var u=null;this.model.beginUpdate();
+try{var I=ia,N=this.getCurrentCellStyle(ia);if(null!=J&&n(ia)&&"1"==mxUtils.getValue(N,"treeFolding","0")){for(var W=0;W<J.length;W++)if(n(J[W])||C.model.isEdge(J[W])&&null==C.model.getTerminal(J[W],!0)){ia=C.model.getParent(J[W]);break}if(null!=I&&ia!=I&&null!=this.view.getState(J[0])){var T=C.getIncomingTreeEdges(J[0]);if(0<T.length){var Q=C.view.getState(C.model.getTerminal(T[0],!0));if(null!=Q){var Z=C.view.getState(I);null!=Z&&(V=(Z.getCenterX()-Q.getCenterX())/C.view.scale,P=(Z.getCenterY()-
+Q.getCenterY())/C.view.scale)}}}}u=ba.apply(this,arguments);if(null!=u&&null!=J&&u.length==J.length)for(W=0;W<u.length;W++)if(this.model.isEdge(u[W]))n(I)&&0>mxUtils.indexOf(u,this.model.getTerminal(u[W],!0))&&this.model.setTerminal(u[W],I,!0);else if(n(J[W])&&(T=C.getIncomingTreeEdges(J[W]),0<T.length))if(!R)n(I)&&0>mxUtils.indexOf(J,this.model.getTerminal(T[0],!0))&&this.model.setTerminal(T[0],I,!0);else if(0==C.getIncomingTreeEdges(u[W]).length){N=I;if(null==N||N==C.model.getParent(J[W]))N=C.model.getTerminal(T[0],
+!0);R=this.cloneCell(T[0]);this.addEdge(R,C.getDefaultParent(),N,u[W])}}finally{this.model.endUpdate()}return u};if(null!=F.sidebar){var Y=F.sidebar.dropAndConnect;F.sidebar.dropAndConnect=function(J,V,P,R){var ia=C.model,la=null;ia.beginUpdate();try{if(la=Y.apply(this,arguments),n(J))for(var ta=0;ta<la.length;ta++)if(ia.isEdge(la[ta])&&null==ia.getTerminal(la[ta],!0)){ia.setTerminal(la[ta],J,!0);var u=C.getCellGeometry(la[ta]);u.points=null;null!=u.getTerminalPoint(!0)&&u.setTerminalPoint(null,!0)}}finally{ia.endUpdate()}return la}}var pa=
+{88:F.actions.get("selectChildren"),84:F.actions.get("selectSubtree"),80:F.actions.get("selectParent"),83:F.actions.get("selectSiblings")},O=F.onKeyDown;F.onKeyDown=function(J){try{if(C.isEnabled()&&!C.isEditing()&&n(C.getSelectionCell())&&1==C.getSelectionCount()){var V=null;0<C.getIncomingTreeEdges(C.getSelectionCell()).length&&(9==J.which?V=mxEvent.isShiftDown(J)?g(C.getSelectionCell()):m(C.getSelectionCell()):13==J.which&&(V=f(C.getSelectionCell(),!mxEvent.isShiftDown(J))));if(null!=V&&0<V.length)1==
+V.length&&C.model.isEdge(V[0])?C.setSelectionCell(C.model.getTerminal(V[0],!1)):C.setSelectionCell(V[V.length-1]),null!=F.hoverIcons&&F.hoverIcons.update(C.view.getState(C.getSelectionCell())),C.startEditingAtCell(C.getSelectionCell()),mxEvent.consume(J);else if(mxEvent.isAltDown(J)&&mxEvent.isShiftDown(J)){var P=pa[J.keyCode];null!=P&&(P.funct(J),mxEvent.consume(J))}else 37==J.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(J)):38==J.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_NORTH),
+mxEvent.consume(J)):39==J.keyCode?(y(C.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(J)):40==J.keyCode&&(y(C.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(J))}}catch(R){F.handleError(R)}mxEvent.isConsumed(J)||O.apply(this,arguments)};var X=C.connectVertex;C.connectVertex=function(J,V,P,R,ia,la,ta){var u=C.getIncomingTreeEdges(J);if(n(J)){var I=d(J),N=I==mxConstants.DIRECTION_EAST||I==mxConstants.DIRECTION_WEST,W=V==mxConstants.DIRECTION_EAST||V==mxConstants.DIRECTION_WEST;
+return I==V||0==u.length?m(J,V):N==W?g(J):f(J,V!=mxConstants.DIRECTION_NORTH&&V!=mxConstants.DIRECTION_WEST)}return X.apply(this,arguments)};C.getSubtree=function(J){var V=[J];!D(J)&&!n(J)||E(J)||C.traverse(J,!0,function(P,R){var ia=null!=R&&C.isTreeEdge(R);ia&&0>mxUtils.indexOf(V,R)&&V.push(R);(null==R||ia)&&0>mxUtils.indexOf(V,P)&&V.push(P);return null==R||ia});return V};var ea=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ea.apply(this,arguments);(D(this.state.cell)||
+n(this.state.cell))&&!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height="24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(J){this.graph.graphHandler.start(this.state.cell,
+mxEvent.getClientX(J),mxEvent.getClientY(J),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(J);this.graph.isMouseDown=!0;F.hoverIcons.reset();mxEvent.consume(J)})))};var ka=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){ka.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=
+this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var ja=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(J){ja.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=J?"":"none")};var U=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(J,V){U.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==
typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var n=k.apply(this,arguments),D=this.graph;return n.concat([this.addEntry("tree container",function(){var t=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
E.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);t.insert(f);t.insert(E);t.insert(d);return sb.createVertexTemplateFromCells([t],t.geometry.width,
t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var t=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var E=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');E.vertex=!0;var d=new mxCell("Topic",
@@ -3919,18 +3919,18 @@ m.geometry.relative=!0;m.edge=!0;E.insertEdge(m,!0);g.insertEdge(m,!1);t.insert(
E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);return sb.createVertexTemplateFromCells([t,E],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree sub sections",function(){var t=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");f.geometry.setTerminalPoint(new mxPoint(110,-40),!0);f.geometry.relative=
!0;f.edge=!0;d.insertEdge(f,!1);return sb.createVertexTemplateFromCells([E,f,t,d],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(O,X){if(EditorUi.windowed){var ea=O.editor.graph;ea.popupMenuHandler.hideMenu();if(null==O.formatWindow){X="1"==urlParams.sketch?Math.max(10,O.diagramContainer.clientWidth-241):Math.max(10,O.diagramContainer.clientWidth-248);var ka="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;ea="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,ea.container.clientHeight-10);O.formatWindow=new t(O,mxResources.get("format"),X,ka,240,ea,function(U){var I=
-O.createFormat(U);I.init();O.addListener("darkModeChanged",mxUtils.bind(this,function(){I.refresh()}));return I});O.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){O.formatWindow.window.fit()}));O.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else O.formatWindow.window.setVisible(null!=X?X:!O.formatWindow.window.isVisible())}else{if(null==O.formatElt){O.formatElt=D();var ja=O.createFormat(O.formatElt);ja.init();O.formatElt.style.border="none";O.formatElt.style.width=
-"240px";O.formatElt.style.borderLeft="1px solid gray";O.formatElt.style.right="0px";O.addListener("darkModeChanged",mxUtils.bind(this,function(){ja.refresh()}))}ea=O.diagramContainer.parentNode;null!=O.formatElt.parentNode?(O.formatElt.parentNode.removeChild(O.formatElt),ea.style.right="0px"):(ea.parentNode.appendChild(O.formatElt),ea.style.right=O.formatElt.style.width)}}function e(O,X){function ea(I,V){var P=O.menus.get(I);I=U.addMenu(V,mxUtils.bind(this,function(){P.funct.apply(this,arguments)}));
-I.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";I.className="geTitle";X.appendChild(I);return I}var ka=document.createElement("div");ka.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";ka.className="geTitle";var ja=document.createElement("span");ja.style.fontSize="18px";ja.style.marginRight=
+EditorUi.initMinimalTheme=function(){function b(O,X){if(EditorUi.windowed){var ea=O.editor.graph;ea.popupMenuHandler.hideMenu();if(null==O.formatWindow){X="1"==urlParams.sketch?Math.max(10,O.diagramContainer.clientWidth-241):Math.max(10,O.diagramContainer.clientWidth-248);var ka="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;ea="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,ea.container.clientHeight-10);O.formatWindow=new t(O,mxResources.get("format"),X,ka,240,ea,function(U){var J=
+O.createFormat(U);J.init();O.addListener("darkModeChanged",mxUtils.bind(this,function(){J.refresh()}));return J});O.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){O.formatWindow.window.fit()}));O.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else O.formatWindow.window.setVisible(null!=X?X:!O.formatWindow.window.isVisible())}else{if(null==O.formatElt){O.formatElt=D();var ja=O.createFormat(O.formatElt);ja.init();O.formatElt.style.border="none";O.formatElt.style.width=
+"240px";O.formatElt.style.borderLeft="1px solid gray";O.formatElt.style.right="0px";O.addListener("darkModeChanged",mxUtils.bind(this,function(){ja.refresh()}))}ea=O.diagramContainer.parentNode;null!=O.formatElt.parentNode?(O.formatElt.parentNode.removeChild(O.formatElt),ea.style.right="0px"):(ea.parentNode.appendChild(O.formatElt),ea.style.right=O.formatElt.style.width)}}function e(O,X){function ea(J,V){var P=O.menus.get(J);J=U.addMenu(V,mxUtils.bind(this,function(){P.funct.apply(this,arguments)}));
+J.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";J.className="geTitle";X.appendChild(J);return J}var ka=document.createElement("div");ka.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";ka.className="geTitle";var ja=document.createElement("span");ja.style.fontSize="18px";ja.style.marginRight=
"5px";ja.innerHTML="+";ka.appendChild(ja);mxUtils.write(ka,mxResources.get("moreShapes"));X.appendChild(ka);mxEvent.addListener(ka,"click",function(){O.actions.get("shapes").funct()});var U=new Menubar(O,X);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?ka.style.bottom="0":null!=O.actions.get("newLibrary")?(ka=document.createElement("div"),ka.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
ka.className="geTitle",ja=document.createElement("span"),ja.style.cssText="position:relative;top:6px;",mxUtils.write(ja,mxResources.get("newLibrary")),ka.appendChild(ja),X.appendChild(ka),mxEvent.addListener(ka,"click",O.actions.get("newLibrary").funct),ka=document.createElement("div"),ka.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",ka.className="geTitle",ja=
document.createElement("span"),ja.style.cssText="position:relative;top:6px;",mxUtils.write(ja,mxResources.get("openLibrary")),ka.appendChild(ja),X.appendChild(ka),mxEvent.addListener(ka,"click",O.actions.get("openLibrary").funct)):(ka=ea("newLibrary",mxResources.get("newLibrary")),ka.style.boxSizing="border-box",ka.style.paddingRight="6px",ka.style.paddingLeft="6px",ka.style.height="32px",ka.style.left="0",ka=ea("openLibraryFrom",mxResources.get("openLibraryFrom")),ka.style.borderLeft="1px solid lightgray",
ka.style.boxSizing="border-box",ka.style.paddingRight="6px",ka.style.paddingLeft="6px",ka.style.height="32px",ka.style.left="50%");X.appendChild(O.sidebar.container);X.style.overflow="hidden"}function k(O,X){if(EditorUi.windowed){var ea=O.editor.graph;ea.popupMenuHandler.hideMenu();if(null==O.sidebarWindow){X=Math.min(ea.container.clientWidth-10,218);var ka="1"==urlParams.embedInline?650:Math.min(ea.container.clientHeight-40,650);O.sidebarWindow=new t(O,mxResources.get("shapes"),"1"==urlParams.sketch&&
"1"!=urlParams.embedInline?66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(ea.container.clientHeight-ka)/2):56,X-6,ka-6,function(ja){e(O,ja)});O.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){O.sidebarWindow.window.fit()}));O.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);O.sidebarWindow.window.setVisible(!0);O.getLocalData("sidebar",function(ja){O.sidebar.showEntries(ja,null,!0)});O.restoreLibraries()}else O.sidebarWindow.window.setVisible(null!=
X?X:!O.sidebarWindow.window.isVisible())}else null==O.sidebarElt&&(O.sidebarElt=D(),e(O,O.sidebarElt),O.sidebarElt.style.border="none",O.sidebarElt.style.width="210px",O.sidebarElt.style.borderRight="1px solid gray"),ea=O.diagramContainer.parentNode,null!=O.sidebarElt.parentNode?(O.sidebarElt.parentNode.removeChild(O.sidebarElt),ea.style.left="0px"):(ea.parentNode.appendChild(O.sidebarElt),ea.style.left=O.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||
-"undefined"===typeof window.Menus)window.uiTheme=null;else{var n=0;try{n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(O){}var D=function(){var O=document.createElement("div");O.className="geSidebarContainer";O.style.position="absolute";O.style.width="100%";O.style.height="100%";O.style.border="1px solid whiteSmoke";O.style.overflowX="hidden";O.style.overflowY="auto";return O},t=function(O,X,ea,ka,ja,U,I){var V=D();I(V);this.window=new mxWindow(X,V,ea,ka,
-ja,U,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(P,R){var fa=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,la=this.table.firstChild.firstChild.firstChild;P=Math.max(0,Math.min(P,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-la.clientWidth-2));R=Math.max(0,Math.min(R,fa-la.clientHeight-
+"undefined"===typeof window.Menus)window.uiTheme=null;else{var n=0;try{n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(O){}var D=function(){var O=document.createElement("div");O.className="geSidebarContainer";O.style.position="absolute";O.style.width="100%";O.style.height="100%";O.style.border="1px solid whiteSmoke";O.style.overflowX="hidden";O.style.overflowY="auto";return O},t=function(O,X,ea,ka,ja,U,J){var V=D();J(V);this.window=new mxWindow(X,V,ea,ka,
+ja,U,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.setLocation=function(P,R){var ia=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,la=this.table.firstChild.firstChild.firstChild;P=Math.max(0,Math.min(P,(window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth)-la.clientWidth-2));R=Math.max(0,Math.min(R,ia-la.clientHeight-
2));this.getX()==P&&this.getY()==R||mxWindow.prototype.setLocation.apply(this,arguments)};mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(P){null==P&&(P=window.event);return null!=P&&O.isSelectionAllowed(P)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;mxWindow.prototype.closeImage=
Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
@@ -3970,80 +3970,80 @@ mxResources.get("outline")+"...";O.actions.get("layers").label=mxResources.get("
ea.setToggleAction(!0);ea.setSelectedCallback(function(){return Editor.sketchMode});ea=O.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(R){O.setPagesVisible(!Editor.pagesVisible)}));ea.setToggleAction(!0);ea.setSelectedCallback(function(){return Editor.pagesVisible});O.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){X.popupMenuHandler.hideMenu();O.showImportCsvDialog()}));O.actions.put("importText",new Action(mxResources.get("text")+"...",
function(){var R=new ParseDialog(O,"Insert from Text");O.showDialog(R.container,620,420,!0,!1);R.init()}));O.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var R=new ParseDialog(O,"Insert from Text","formatSql");O.showDialog(R.container,620,420,!0,!1);R.init()}));O.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){k(O)},null,null,Editor.ctrlKey+"+Shift+K"));O.actions.put("toggleFormat",new Action(mxResources.get("format")+
"...",function(){b(O)})).shortcut=O.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!O.isOffline()&&O.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var R=new ParseDialog(O,mxResources.get("plantUml")+"...","plantUml");O.showDialog(R.container,620,420,!0,!1);R.init()}));O.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var R=new ParseDialog(O,mxResources.get("mermaid")+"...","mermaid");O.showDialog(R.container,620,420,!0,!1);
-R.init()}));var ka=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(R,fa){var la=this.editorUi.editor.graph,sa=la.getSelectionCell();ka.call(this,R,sa,null,fa);this.addMenuItems(R,["editTooltip"],fa);la.model.isVertex(sa)&&this.addMenuItems(R,["editGeometry"],fa);this.addMenuItems(R,["-","edit"],fa)})));this.addPopupMenuCellEditItems=function(R,fa,la,sa){R.addSeparator();this.addSubmenu("editCell",R,sa,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,
-function(R,fa){var la=O.getCurrentFile();O.menus.addMenuItems(R,["new"],fa);O.menus.addSubmenu("openFrom",R,fa);isLocalStorage&&this.addSubmenu("openRecent",R,fa);R.addSeparator(fa);null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(R,["save","rename","makeCopy","moveToFolder"],fa):(O.menus.addMenuItems(R,["save","saveAs","-","rename"],fa),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(R,["upload"],fa):O.menus.addMenuItems(R,["makeCopy"],
-fa));R.addSeparator(fa);null!=la&&(la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["revisionHistory"],fa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile&&null==la.fileHandle||O.menus.addMenuItems(R,["synchronize"],fa));O.menus.addMenuItems(R,["autosave"],fa);if(null!=la&&(R.addSeparator(fa),la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],fa),null!=O.fileNode&&"1"!=urlParams.embedInline)){var sa=null!=la.getTitle()?la.getTitle():O.defaultFilename;(la.constructor==
-DriveFile&&null!=la.sync&&la.sync.isConnected()||!/(\.html)$/i.test(sa)&&!/(\.svg)$/i.test(sa))&&this.addMenuItems(R,["-","properties"],fa)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(R,fa){var la=O.getCurrentFile();O.menus.addSubmenu("extras",R,fa,mxResources.get("preferences"));R.addSeparator(fa);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)O.menus.addMenuItems(R,"new open - synchronize - save saveAs -".split(" "),fa);else if("1"==urlParams.embed||O.mode==App.MODE_ATLAS){"1"!=
-urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&O.menus.addMenuItems(R,["-","save"],fa);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||O.mode==App.MODE_ATLAS)O.menus.addMenuItems(R,["saveAndExit"],fa),null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["revisionHistory"],fa);R.addSeparator(fa)}else O.mode==App.MODE_ATLAS?O.menus.addMenuItems(R,["save","synchronize","-"],fa):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(O.menus.addMenuItems(R,
-["new"],fa),O.menus.addSubmenu("openFrom",R,fa),isLocalStorage&&this.addSubmenu("openRecent",R,fa),R.addSeparator(fa),null!=la&&(la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],fa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile||O.menus.addMenuItems(R,["synchronize"],fa)),R.addSeparator(fa),O.menus.addSubmenu("save",R,fa)):O.menus.addSubmenu("file",R,fa));O.menus.addSubmenu("exportAs",R,fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?O.menus.addMenuItems(R,
-["import"],fa):"1"!=urlParams.noFileMenu&&O.menus.addSubmenu("importFrom",R,fa);O.commentsSupported()&&O.menus.addMenuItems(R,["-","comments"],fa);O.menus.addMenuItems(R,"- findReplace outline layers tags - pageSetup".split(" "),fa);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||O.menus.addMenuItems(R,["print"],fa);"1"!=urlParams.sketch&&null!=la&&null!=O.fileNode&&"1"!=urlParams.embedInline&&(la=null!=la.getTitle()?la.getTitle():O.defaultFilename,/(\.html)$/i.test(la)||/(\.svg)$/i.test(la)||
-this.addMenuItems(R,["-","properties"]));R.addSeparator(fa);O.menus.addSubmenu("help",R,fa);"1"==urlParams.embed||O.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||O.mode==App.MODE_ATLAS)&&O.menus.addMenuItems(R,["-","exit"],fa):"1"!=urlParams.noFileMenu&&O.menus.addMenuItems(R,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(R,fa){var la=O.getCurrentFile();null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(R,["save","makeCopy","-","rename","moveToFolder"],fa):(O.menus.addMenuItems(R,
-["save","saveAs","-","rename"],fa),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(R,["upload"],fa):O.menus.addMenuItems(R,["makeCopy"],fa));O.menus.addMenuItems(R,["-","autosave"],fa);null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["-","revisionHistory"],fa)})));var ja=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(R,fa){ja.funct(R,fa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||O.menus.addMenuItems(R,
-["publishLink"],fa);O.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(R.addSeparator(fa),O.menus.addSubmenu("embed",R,fa))})));var U=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(R,fa){O.menus.addInsertTableCellItem(R,fa)})));if("1"==urlParams.sketch){var I=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(R,fa){I.funct(R,fa);this.addMenuItems(R,["-","pageScale","-","ruler"],fa)})))}this.put("extras",new Menu(mxUtils.bind(this,function(R,fa){null!=U&&
-O.menus.addSubmenu("language",R,fa);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&O.mode!=App.MODE_ATLAS&&O.menus.addSubmenu("theme",R,fa);O.menus.addSubmenu("units",R,fa);R.addSeparator(fa);"1"!=urlParams.sketch&&O.menus.addMenuItems(R,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),fa);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItems(R,["-","showStartScreen",
-"search","scratchpad"],fa);R.addSeparator(fa);"1"==urlParams.sketch?O.menus.addMenuItems(R,"configuration - copyConnect collapseExpand tooltips -".split(" "),fa):(O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"configuration",fa),!O.isOfflineApp()&&isLocalStorage&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"plugins",fa));var la=O.getCurrentFile();null!=la&&la.isRealtimeEnabled()&&la.isRealtimeSupported()&&this.addMenuItems(R,["-","showRemoteCursors","shareCursor","-"],fa);R.addSeparator(fa);O.mode!=
-App.MODE_ATLAS&&this.addMenuItems(R,["fullscreen"],fa);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(R,["toggleDarkMode"],fa);R.addSeparator(fa)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(R,fa){O.menus.addMenuItems(R,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),fa)})));mxUtils.bind(this,function(){var R=this.get("insert"),fa=R.funct;R.funct=function(la,sa){"1"==urlParams.sketch?
-(O.insertTemplateEnabled&&!O.isOffline()&&O.menus.addMenuItems(la,["insertTemplate"],sa),O.menus.addMenuItems(la,["insertImage","insertLink","-"],sa),O.menus.addSubmenu("insertAdvanced",la,sa,mxResources.get("advanced")),O.menus.addSubmenu("layout",la,sa)):(fa.apply(this,arguments),O.menus.addSubmenu("table",la,sa))}})();var V="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),P=function(R,fa,la,sa){R.addItem(la,null,mxUtils.bind(this,function(){var u=
-new CreateGraphDialog(O,la,sa);O.showDialog(u.container,620,420,!0,!1);u.init()}),fa)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(R,fa){for(var la=0;la<V.length;la++)"-"==V[la]?R.addSeparator(fa):P(R,fa,mxResources.get(V[la])+"...",V[la])})))};EditorUi.prototype.installFormatToolbar=function(O){var X=this.editor.graph,ea=document.createElement("div");ea.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
+R.init()}));var ka=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(R,ia){var la=this.editorUi.editor.graph,ta=la.getSelectionCell();ka.call(this,R,ta,null,ia);this.addMenuItems(R,["editTooltip"],ia);la.model.isVertex(ta)&&this.addMenuItems(R,["editGeometry"],ia);this.addMenuItems(R,["-","edit"],ia)})));this.addPopupMenuCellEditItems=function(R,ia,la,ta){R.addSeparator();this.addSubmenu("editCell",R,ta,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,
+function(R,ia){var la=O.getCurrentFile();O.menus.addMenuItems(R,["new"],ia);O.menus.addSubmenu("openFrom",R,ia);isLocalStorage&&this.addSubmenu("openRecent",R,ia);R.addSeparator(ia);null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(R,["save","rename","makeCopy","moveToFolder"],ia):(O.menus.addMenuItems(R,["save","saveAs","-","rename"],ia),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(R,["upload"],ia):O.menus.addMenuItems(R,["makeCopy"],
+ia));R.addSeparator(ia);null!=la&&(la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["revisionHistory"],ia),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile&&null==la.fileHandle||O.menus.addMenuItems(R,["synchronize"],ia));O.menus.addMenuItems(R,["autosave"],ia);if(null!=la&&(R.addSeparator(ia),la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],ia),null!=O.fileNode&&"1"!=urlParams.embedInline)){var ta=null!=la.getTitle()?la.getTitle():O.defaultFilename;(la.constructor==
+DriveFile&&null!=la.sync&&la.sync.isConnected()||!/(\.html)$/i.test(ta)&&!/(\.svg)$/i.test(ta))&&this.addMenuItems(R,["-","properties"],ia)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(R,ia){var la=O.getCurrentFile();O.menus.addSubmenu("extras",R,ia,mxResources.get("preferences"));R.addSeparator(ia);if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)O.menus.addMenuItems(R,"new open - synchronize - save saveAs -".split(" "),ia);else if("1"==urlParams.embed||O.mode==App.MODE_ATLAS){"1"!=
+urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&O.menus.addMenuItems(R,["-","save"],ia);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||O.mode==App.MODE_ATLAS)O.menus.addMenuItems(R,["saveAndExit"],ia),null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["revisionHistory"],ia);R.addSeparator(ia)}else O.mode==App.MODE_ATLAS?O.menus.addMenuItems(R,["save","synchronize","-"],ia):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(O.menus.addMenuItems(R,
+["new"],ia),O.menus.addSubmenu("openFrom",R,ia),isLocalStorage&&this.addSubmenu("openRecent",R,ia),R.addSeparator(ia),null!=la&&(la.constructor==DriveFile&&O.menus.addMenuItems(R,["share"],ia),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile||O.menus.addMenuItems(R,["synchronize"],ia)),R.addSeparator(ia),O.menus.addSubmenu("save",R,ia)):O.menus.addSubmenu("file",R,ia));O.menus.addSubmenu("exportAs",R,ia);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?O.menus.addMenuItems(R,
+["import"],ia):"1"!=urlParams.noFileMenu&&O.menus.addSubmenu("importFrom",R,ia);O.commentsSupported()&&O.menus.addMenuItems(R,["-","comments"],ia);O.menus.addMenuItems(R,"- findReplace outline layers tags - pageSetup".split(" "),ia);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||O.menus.addMenuItems(R,["print"],ia);"1"!=urlParams.sketch&&null!=la&&null!=O.fileNode&&"1"!=urlParams.embedInline&&(la=null!=la.getTitle()?la.getTitle():O.defaultFilename,/(\.html)$/i.test(la)||/(\.svg)$/i.test(la)||
+this.addMenuItems(R,["-","properties"]));R.addSeparator(ia);O.menus.addSubmenu("help",R,ia);"1"==urlParams.embed||O.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||O.mode==App.MODE_ATLAS)&&O.menus.addMenuItems(R,["-","exit"],ia):"1"!=urlParams.noFileMenu&&O.menus.addMenuItems(R,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,function(R,ia){var la=O.getCurrentFile();null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(R,["save","makeCopy","-","rename","moveToFolder"],ia):(O.menus.addMenuItems(R,
+["save","saveAs","-","rename"],ia),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(R,["upload"],ia):O.menus.addMenuItems(R,["makeCopy"],ia));O.menus.addMenuItems(R,["-","autosave"],ia);null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(R,["-","revisionHistory"],ia)})));var ja=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(R,ia){ja.funct(R,ia);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||O.menus.addMenuItems(R,
+["publishLink"],ia);O.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(R.addSeparator(ia),O.menus.addSubmenu("embed",R,ia))})));var U=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(R,ia){O.menus.addInsertTableCellItem(R,ia)})));if("1"==urlParams.sketch){var J=this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(R,ia){J.funct(R,ia);this.addMenuItems(R,["-","pageScale","-","ruler"],ia)})))}this.put("extras",new Menu(mxUtils.bind(this,function(R,ia){null!=U&&
+O.menus.addSubmenu("language",R,ia);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&O.mode!=App.MODE_ATLAS&&O.menus.addSubmenu("theme",R,ia);O.menus.addSubmenu("units",R,ia);R.addSeparator(ia);"1"!=urlParams.sketch&&O.menus.addMenuItems(R,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),ia);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItems(R,["-","showStartScreen",
+"search","scratchpad"],ia);R.addSeparator(ia);"1"==urlParams.sketch?O.menus.addMenuItems(R,"configuration - copyConnect collapseExpand tooltips -".split(" "),ia):(O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"configuration",ia),!O.isOfflineApp()&&isLocalStorage&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(R,"plugins",ia));var la=O.getCurrentFile();null!=la&&la.isRealtimeEnabled()&&la.isRealtimeSupported()&&this.addMenuItems(R,["-","showRemoteCursors","shareCursor","-"],ia);R.addSeparator(ia);O.mode!=
+App.MODE_ATLAS&&this.addMenuItems(R,["fullscreen"],ia);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(R,["toggleDarkMode"],ia);R.addSeparator(ia)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(R,ia){O.menus.addMenuItems(R,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),ia)})));mxUtils.bind(this,function(){var R=this.get("insert"),ia=R.funct;R.funct=function(la,ta){"1"==urlParams.sketch?
+(O.insertTemplateEnabled&&!O.isOffline()&&O.menus.addMenuItems(la,["insertTemplate"],ta),O.menus.addMenuItems(la,["insertImage","insertLink","-"],ta),O.menus.addSubmenu("insertAdvanced",la,ta,mxResources.get("advanced")),O.menus.addSubmenu("layout",la,ta)):(ia.apply(this,arguments),O.menus.addSubmenu("table",la,ta))}})();var V="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),P=function(R,ia,la,ta){R.addItem(la,null,mxUtils.bind(this,function(){var u=
+new CreateGraphDialog(O,la,ta);O.showDialog(u.container,620,420,!0,!1);u.init()}),ia)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(R,ia){for(var la=0;la<V.length;la++)"-"==V[la]?R.addSeparator(ia):P(R,ia,mxResources.get(V[la])+"...",V[la])})))};EditorUi.prototype.installFormatToolbar=function(O){var X=this.editor.graph,ea=document.createElement("div");ea.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
X.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(ka,ja){0<X.getSelectionCount()?(O.appendChild(ea),ea.innerHTML="Selected: "+X.getSelectionCount()):null!=ea.parentNode&&ea.parentNode.removeChild(ea)}))};var Y=!1;EditorUi.prototype.initFormatWindow=function(){if(!Y&&null!=this.formatWindow){Y=!0;this.formatWindow.window.setClosable(!1);var O=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){O.apply(this,arguments);this.minimized?
(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(X){mxEvent.getSource(X)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var pa=EditorUi.prototype.init;EditorUi.prototype.init=
-function(){function O(ua,za,Ka){var Ga=U.menus.get(ua),Ma=R.addMenu(mxResources.get(ua),mxUtils.bind(this,function(){Ga.funct.apply(this,arguments)}),P);Ma.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ma.style.display="inline-block";Ma.style.boxSizing="border-box";Ma.style.top="6px";Ma.style.marginRight="6px";Ma.style.height="30px";Ma.style.paddingTop="6px";Ma.style.paddingBottom="6px";Ma.style.cursor="pointer";Ma.setAttribute("title",mxResources.get(ua));U.menus.menuCreated(Ga,
-Ma,"geMenuItem");null!=Ka?(Ma.style.backgroundImage="url("+Ka+")",Ma.style.backgroundPosition="center center",Ma.style.backgroundRepeat="no-repeat",Ma.style.backgroundSize="24px 24px",Ma.style.width="34px",Ma.innerHTML=""):za||(Ma.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ma.style.backgroundPosition="right 6px center",Ma.style.backgroundRepeat="no-repeat",Ma.style.paddingRight="22px");return Ma}function X(ua,za,Ka,Ga,Ma,db){var Ra=document.createElement("a");Ra.className=
-"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ra.style.display="inline-block";Ra.style.boxSizing="border-box";Ra.style.height="30px";Ra.style.padding="6px";Ra.style.position="relative";Ra.style.verticalAlign="top";Ra.style.top="0px";"1"==urlParams.sketch&&(Ra.style.borderStyle="none",Ra.style.boxShadow="none",Ra.style.padding="6px",Ra.style.margin="0px");null!=U.statusContainer?V.insertBefore(Ra,U.statusContainer):V.appendChild(Ra);null!=db?(Ra.style.backgroundImage="url("+db+")",Ra.style.backgroundPosition=
-"center center",Ra.style.backgroundRepeat="no-repeat",Ra.style.backgroundSize="24px 24px",Ra.style.width="34px"):mxUtils.write(Ra,ua);mxEvent.addListener(Ra,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(ib){ib.preventDefault()}));mxEvent.addListener(Ra,"click",function(ib){"disabled"!=Ra.getAttribute("disabled")&&za(ib);mxEvent.consume(ib)});null==Ka&&(Ra.style.marginRight="4px");null!=Ga&&Ra.setAttribute("title",Ga);null!=Ma&&(ua=function(){Ma.isEnabled()?(Ra.removeAttribute("disabled"),
-Ra.style.cursor="pointer"):(Ra.setAttribute("disabled","disabled"),Ra.style.cursor="default")},Ma.addListener("stateChanged",ua),I.addListener("enabledChanged",ua),ua());return Ra}function ea(ua,za,Ka){Ka=document.createElement("div");Ka.className="geMenuItem";Ka.style.display="inline-block";Ka.style.verticalAlign="top";Ka.style.marginRight="6px";Ka.style.padding="0 4px 0 4px";Ka.style.height="30px";Ka.style.position="relative";Ka.style.top="0px";"1"==urlParams.sketch&&(Ka.style.boxShadow="none");
-for(var Ga=0;Ga<ua.length;Ga++)null!=ua[Ga]&&("1"==urlParams.sketch&&(ua[Ga].style.padding="10px 8px",ua[Ga].style.width="30px"),ua[Ga].style.margin="0px",ua[Ga].style.boxShadow="none",Ka.appendChild(ua[Ga]));null!=za&&mxUtils.setOpacity(Ka,za);null!=U.statusContainer&&"1"!=urlParams.sketch?V.insertBefore(Ka,U.statusContainer):V.appendChild(Ka);return Ka}function ka(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(T.style.left=58>W.offsetTop-W.offsetHeight/2?"70px":"10px");else{for(var ua=
-V.firstChild;null!=ua;){var za=ua.nextSibling;"geMenuItem"!=ua.className&&"geItem"!=ua.className||ua.parentNode.removeChild(ua);ua=za}P=V.firstChild;n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ua=1E3>n||"1"==urlParams.sketch;var Ka=null;ua||(Ka=O("diagram"));za=ua?O("diagram",null,Editor.drawLogoImage):null;null!=za&&(Ka=za);ea([Ka,X(mxResources.get("shapes"),U.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),U.actions.get("image"),ua?Editor.shapesImage:
-null),X(mxResources.get("format"),U.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+U.actions.get("formatPanel").shortcut+")",U.actions.get("image"),ua?Editor.formatImage:null)],ua?60:null);za=O("insert",!0,ua?J:null);ea([za,X(mxResources.get("delete"),U.actions.get("delete").funct,null,mxResources.get("delete"),U.actions.get("delete"),ua?Editor.trashImage:null)],ua?60:null);411<=n&&(ea([z,L],60),520<=n&&ea([ya,640<=n?X("",Va.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+
-" +)",Va,Editor.zoomInImage):null,640<=n?X("",Ja.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Ja,Editor.zoomOutImage):null],60))}null!=Ka&&(mxEvent.disableContextMenu(Ka),mxEvent.addGestureListeners(Ka,mxUtils.bind(this,function(Ga){(mxEvent.isShiftDown(Ga)||mxEvent.isAltDown(Ga)||mxEvent.isMetaDown(Ga)||mxEvent.isControlDown(Ga)||mxEvent.isPopupTrigger(Ga))&&U.appIconClicked(Ga)}),null,null));za=U.menus.get("language");null!=za&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
-n&&"1"!=urlParams.sketch?(null==Na&&(za=R.addMenu("",za.funct),za.setAttribute("title",mxResources.get("language")),za.className="geToolbarButton",za.style.backgroundImage="url("+Editor.globeImage+")",za.style.backgroundPosition="center center",za.style.backgroundRepeat="no-repeat",za.style.backgroundSize="24px 24px",za.style.position="absolute",za.style.height="24px",za.style.width="24px",za.style.zIndex="1",za.style.right="8px",za.style.cursor="pointer",za.style.top="1"==urlParams.embed?"12px":
-"11px",V.appendChild(za),Na=za),U.buttonContainer.style.paddingRight="34px"):(U.buttonContainer.style.paddingRight="4px",null!=Na&&(Na.parentNode.removeChild(Na),Na=null))}pa.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);var ja=document.createElement("div");ja.style.cssText=
+function(){function O(ua,ya,Na){var Fa=U.menus.get(ua),Ra=R.addMenu(mxResources.get(ua),mxUtils.bind(this,function(){Fa.funct.apply(this,arguments)}),P);Ra.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ra.style.display="inline-block";Ra.style.boxSizing="border-box";Ra.style.top="6px";Ra.style.marginRight="6px";Ra.style.height="30px";Ra.style.paddingTop="6px";Ra.style.paddingBottom="6px";Ra.style.cursor="pointer";Ra.setAttribute("title",mxResources.get(ua));U.menus.menuCreated(Fa,
+Ra,"geMenuItem");null!=Na?(Ra.style.backgroundImage="url("+Na+")",Ra.style.backgroundPosition="center center",Ra.style.backgroundRepeat="no-repeat",Ra.style.backgroundSize="24px 24px",Ra.style.width="34px",Ra.innerHTML=""):ya||(Ra.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ra.style.backgroundPosition="right 6px center",Ra.style.backgroundRepeat="no-repeat",Ra.style.paddingRight="22px");return Ra}function X(ua,ya,Na,Fa,Ra,db){var Va=document.createElement("a");Va.className=
+"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Va.style.display="inline-block";Va.style.boxSizing="border-box";Va.style.height="30px";Va.style.padding="6px";Va.style.position="relative";Va.style.verticalAlign="top";Va.style.top="0px";"1"==urlParams.sketch&&(Va.style.borderStyle="none",Va.style.boxShadow="none",Va.style.padding="6px",Va.style.margin="0px");null!=U.statusContainer?V.insertBefore(Va,U.statusContainer):V.appendChild(Va);null!=db?(Va.style.backgroundImage="url("+db+")",Va.style.backgroundPosition=
+"center center",Va.style.backgroundRepeat="no-repeat",Va.style.backgroundSize="24px 24px",Va.style.width="34px"):mxUtils.write(Va,ua);mxEvent.addListener(Va,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fb){fb.preventDefault()}));mxEvent.addListener(Va,"click",function(fb){"disabled"!=Va.getAttribute("disabled")&&ya(fb);mxEvent.consume(fb)});null==Na&&(Va.style.marginRight="4px");null!=Fa&&Va.setAttribute("title",Fa);null!=Ra&&(ua=function(){Ra.isEnabled()?(Va.removeAttribute("disabled"),
+Va.style.cursor="pointer"):(Va.setAttribute("disabled","disabled"),Va.style.cursor="default")},Ra.addListener("stateChanged",ua),J.addListener("enabledChanged",ua),ua());return Va}function ea(ua,ya,Na){Na=document.createElement("div");Na.className="geMenuItem";Na.style.display="inline-block";Na.style.verticalAlign="top";Na.style.marginRight="6px";Na.style.padding="0 4px 0 4px";Na.style.height="30px";Na.style.position="relative";Na.style.top="0px";"1"==urlParams.sketch&&(Na.style.boxShadow="none");
+for(var Fa=0;Fa<ua.length;Fa++)null!=ua[Fa]&&("1"==urlParams.sketch&&(ua[Fa].style.padding="10px 8px",ua[Fa].style.width="30px"),ua[Fa].style.margin="0px",ua[Fa].style.boxShadow="none",Na.appendChild(ua[Fa]));null!=ya&&mxUtils.setOpacity(Na,ya);null!=U.statusContainer&&"1"!=urlParams.sketch?V.insertBefore(Na,U.statusContainer):V.appendChild(Na);return Na}function ka(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(T.style.left=58>W.offsetTop-W.offsetHeight/2?"70px":"10px");else{for(var ua=
+V.firstChild;null!=ua;){var ya=ua.nextSibling;"geMenuItem"!=ua.className&&"geItem"!=ua.className||ua.parentNode.removeChild(ua);ua=ya}P=V.firstChild;n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;ua=1E3>n||"1"==urlParams.sketch;var Na=null;ua||(Na=O("diagram"));ya=ua?O("diagram",null,Editor.drawLogoImage):null;null!=ya&&(Na=ya);ea([Na,X(mxResources.get("shapes"),U.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),U.actions.get("image"),ua?Editor.shapesImage:
+null),X(mxResources.get("format"),U.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+U.actions.get("formatPanel").shortcut+")",U.actions.get("image"),ua?Editor.formatImage:null)],ua?60:null);ya=O("insert",!0,ua?I:null);ea([ya,X(mxResources.get("delete"),U.actions.get("delete").funct,null,mxResources.get("delete"),U.actions.get("delete"),ua?Editor.trashImage:null)],ua?60:null);411<=n&&(ea([z,L],60),520<=n&&ea([xa,640<=n?X("",Za.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+
+" +)",Za,Editor.zoomInImage):null,640<=n?X("",cb.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",cb,Editor.zoomOutImage):null],60))}null!=Na&&(mxEvent.disableContextMenu(Na),mxEvent.addGestureListeners(Na,mxUtils.bind(this,function(Fa){(mxEvent.isShiftDown(Fa)||mxEvent.isAltDown(Fa)||mxEvent.isMetaDown(Fa)||mxEvent.isControlDown(Fa)||mxEvent.isPopupTrigger(Fa))&&U.appIconClicked(Fa)}),null,null));ya=U.menus.get("language");null!=ya&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=
+n&&"1"!=urlParams.sketch?(null==La&&(ya=R.addMenu("",ya.funct),ya.setAttribute("title",mxResources.get("language")),ya.className="geToolbarButton",ya.style.backgroundImage="url("+Editor.globeImage+")",ya.style.backgroundPosition="center center",ya.style.backgroundRepeat="no-repeat",ya.style.backgroundSize="24px 24px",ya.style.position="absolute",ya.style.height="24px",ya.style.width="24px",ya.style.zIndex="1",ya.style.right="8px",ya.style.cursor="pointer",ya.style.top="1"==urlParams.embed?"12px":
+"11px",V.appendChild(ya),La=ya),U.buttonContainer.style.paddingRight="34px"):(U.buttonContainer.style.paddingRight="4px",null!=La&&(La.parentNode.removeChild(La),La=null))}pa.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);var ja=document.createElement("div");ja.style.cssText=
"position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";ja.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(ja);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=
-urlParams.sketch&&1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var U=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==U.embedViewport)mxUtils.fit(this.div);else{var ua=parseInt(this.div.offsetLeft),za=parseInt(this.div.offsetWidth),Ka=U.embedViewport.x+
-U.embedViewport.width,Ga=parseInt(this.div.offsetTop),Ma=parseInt(this.div.offsetHeight),db=U.embedViewport.y+U.embedViewport.height;this.div.style.left=Math.max(U.embedViewport.x,Math.min(ua,Ka-za))+"px";this.div.style.top=Math.max(U.embedViewport.y,Math.min(Ga,db-Ma))+"px";this.div.style.height=Math.min(U.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(U.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",
-!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),ja=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>n||708>ja)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));U=this;var I=U.editor.graph;U.toolbar=this.createToolbar(U.createDiv("geToolbar"));U.defaultLibraryName=
-mxResources.get("untitledLibrary");var V=document.createElement("div");V.className="geMenubarContainer";var P=null,R=new Menubar(U,V);U.statusContainer=U.createStatusContainer();U.statusContainer.style.position="relative";U.statusContainer.style.maxWidth="";U.statusContainer.style.marginTop="7px";U.statusContainer.style.marginLeft="6px";U.statusContainer.style.color="gray";U.statusContainer.style.cursor="default";var fa=U.hideCurrentMenu;U.hideCurrentMenu=function(){fa.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};
-var la=U.descriptorChanged;U.descriptorChanged=function(){la.apply(this,arguments);var ua=U.getCurrentFile();if(null!=ua&&null!=ua.getTitle()){var za=ua.getMode();"google"==za?za="googleDrive":"github"==za?za="gitHub":"gitlab"==za?za="gitLab":"onedrive"==za&&(za="oneDrive");za=mxResources.get(za);V.setAttribute("title",ua.getTitle()+(null!=za?" ("+za+")":""))}else V.removeAttribute("title")};U.setStatusText(U.editor.getStatus());V.appendChild(U.statusContainer);U.buttonContainer=document.createElement("div");
-U.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";V.appendChild(U.buttonContainer);U.menubarContainer=U.buttonContainer;U.tabContainer=document.createElement("div");U.tabContainer.className="geTabContainer";U.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";ja=U.diagramContainer.parentNode;var sa=document.createElement("div");
-sa.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";U.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){sa.style.top="20px";U.titlebar=document.createElement("div");U.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var u=document.createElement("div");u.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";
-U.titlebar.appendChild(u);ja.appendChild(U.titlebar)}u=U.menus.get("viewZoom");var J="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,N="1"==urlParams.sketch?document.createElement("div"):null,W="1"==urlParams.sketch?document.createElement("div"):null,T="1"==urlParams.sketch?document.createElement("div"):null,Q=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();I.refresh();I.view.validateBackground()});U.addListener("darkModeChanged",Q);U.addListener("sketchModeChanged",
+urlParams.sketch&&1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var U=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==U.embedViewport)mxUtils.fit(this.div);else{var ua=parseInt(this.div.offsetLeft),ya=parseInt(this.div.offsetWidth),Na=U.embedViewport.x+
+U.embedViewport.width,Fa=parseInt(this.div.offsetTop),Ra=parseInt(this.div.offsetHeight),db=U.embedViewport.y+U.embedViewport.height;this.div.style.left=Math.max(U.embedViewport.x,Math.min(ua,Na-ya))+"px";this.div.style.top=Math.max(U.embedViewport.y,Math.min(Fa,db-Ra))+"px";this.div.style.height=Math.min(U.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(U.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",
+!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),ja=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>n||708>ja)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));U=this;var J=U.editor.graph;U.toolbar=this.createToolbar(U.createDiv("geToolbar"));U.defaultLibraryName=
+mxResources.get("untitledLibrary");var V=document.createElement("div");V.className="geMenubarContainer";var P=null,R=new Menubar(U,V);U.statusContainer=U.createStatusContainer();U.statusContainer.style.position="relative";U.statusContainer.style.maxWidth="";U.statusContainer.style.marginTop="7px";U.statusContainer.style.marginLeft="6px";U.statusContainer.style.color="gray";U.statusContainer.style.cursor="default";var ia=U.hideCurrentMenu;U.hideCurrentMenu=function(){ia.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};
+var la=U.descriptorChanged;U.descriptorChanged=function(){la.apply(this,arguments);var ua=U.getCurrentFile();if(null!=ua&&null!=ua.getTitle()){var ya=ua.getMode();"google"==ya?ya="googleDrive":"github"==ya?ya="gitHub":"gitlab"==ya?ya="gitLab":"onedrive"==ya&&(ya="oneDrive");ya=mxResources.get(ya);V.setAttribute("title",ua.getTitle()+(null!=ya?" ("+ya+")":""))}else V.removeAttribute("title")};U.setStatusText(U.editor.getStatus());V.appendChild(U.statusContainer);U.buttonContainer=document.createElement("div");
+U.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";V.appendChild(U.buttonContainer);U.menubarContainer=U.buttonContainer;U.tabContainer=document.createElement("div");U.tabContainer.className="geTabContainer";U.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";ja=U.diagramContainer.parentNode;var ta=document.createElement("div");
+ta.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";U.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){ta.style.top="20px";U.titlebar=document.createElement("div");U.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var u=document.createElement("div");u.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";
+U.titlebar.appendChild(u);ja.appendChild(U.titlebar)}u=U.menus.get("viewZoom");var I="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,N="1"==urlParams.sketch?document.createElement("div"):null,W="1"==urlParams.sketch?document.createElement("div"):null,T="1"==urlParams.sketch?document.createElement("div"):null,Q=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();J.refresh();J.view.validateBackground()});U.addListener("darkModeChanged",Q);U.addListener("sketchModeChanged",
Q);var Z=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)T.style.left="10px",T.style.top="10px",W.style.left="10px",W.style.top="60px",N.style.top="10px",N.style.right="12px",N.style.left="",U.diagramContainer.setAttribute("data-bounds",U.diagramContainer.style.top+" "+U.diagramContainer.style.left+" "+U.diagramContainer.style.width+" "+U.diagramContainer.style.height),U.diagramContainer.style.top="0px",U.diagramContainer.style.left="0px",U.diagramContainer.style.bottom="0px",U.diagramContainer.style.right=
-"0px",U.diagramContainer.style.width="",U.diagramContainer.style.height="";else{var ua=U.diagramContainer.getAttribute("data-bounds");if(null!=ua){U.diagramContainer.style.background="transparent";U.diagramContainer.removeAttribute("data-bounds");var za=I.getGraphBounds();ua=ua.split(" ");U.diagramContainer.style.top=ua[0];U.diagramContainer.style.left=ua[1];U.diagramContainer.style.width=za.width+50+"px";U.diagramContainer.style.height=za.height+46+"px";U.diagramContainer.style.bottom="";U.diagramContainer.style.right=
+"0px",U.diagramContainer.style.width="",U.diagramContainer.style.height="";else{var ua=U.diagramContainer.getAttribute("data-bounds");if(null!=ua){U.diagramContainer.style.background="transparent";U.diagramContainer.removeAttribute("data-bounds");var ya=J.getGraphBounds();ua=ua.split(" ");U.diagramContainer.style.top=ua[0];U.diagramContainer.style.left=ua[1];U.diagramContainer.style.width=ya.width+50+"px";U.diagramContainer.style.height=ya.height+46+"px";U.diagramContainer.style.bottom="";U.diagramContainer.style.right=
"";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:U.diagramContainer.getBoundingClientRect()}),"*");U.refresh()}T.style.left=U.diagramContainer.offsetLeft+"px";T.style.top=U.diagramContainer.offsetTop-T.offsetHeight-4+"px";W.style.display="";W.style.left=U.diagramContainer.offsetLeft-W.offsetWidth-4+"px";W.style.top=U.diagramContainer.offsetTop+"px";N.style.left=U.diagramContainer.offsetLeft+U.diagramContainer.offsetWidth-N.offsetWidth+"px";N.style.top=T.style.top;
N.style.right="";U.bottomResizer.style.left=U.diagramContainer.offsetLeft+(U.diagramContainer.offsetWidth-U.bottomResizer.offsetWidth)/2+"px";U.bottomResizer.style.top=U.diagramContainer.offsetTop+U.diagramContainer.offsetHeight-U.bottomResizer.offsetHeight/2-1+"px";U.rightResizer.style.left=U.diagramContainer.offsetLeft+U.diagramContainer.offsetWidth-U.rightResizer.offsetWidth/2-1+"px";U.rightResizer.style.top=U.diagramContainer.offsetTop+(U.diagramContainer.offsetHeight-U.bottomResizer.offsetHeight)/
-2+"px"}U.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";U.rightResizer.style.visibility=U.bottomResizer.style.visibility;V.style.display="none";T.style.visibility="";N.style.visibility=""}),oa=mxUtils.bind(this,function(){M.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";Z()});Q=mxUtils.bind(this,
-function(){oa();b(U,!0);U.initFormatWindow();var ua=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ua.x+ua.width+4,ua.y)});U.addListener("inlineFullscreenChanged",oa);U.addListener("editInlineStart",Q);"1"==urlParams.embedInline&&U.addListener("darkModeChanged",Q);U.addListener("editInlineStop",mxUtils.bind(this,function(ua){U.diagramContainer.style.width="10px";U.diagramContainer.style.height="10px";U.diagramContainer.style.border="";U.bottomResizer.style.visibility=
-"hidden";U.rightResizer.style.visibility="hidden";T.style.visibility="hidden";N.style.visibility="hidden";W.style.display="none"}));if(null!=U.hoverIcons){var wa=U.hoverIcons.update;U.hoverIcons.update=function(){I.freehand.isDrawing()||wa.apply(this,arguments)}}if(null!=I.freehand){var Aa=I.freehand.createStyle;I.freehand.createStyle=function(ua){return Aa.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){W.className="geToolbarContainer";N.className="geToolbarContainer";T.className="geToolbarContainer";
-V.className="geToolbarContainer";U.picker=W;var ta=!1;"1"!=urlParams.embed&&"atlassian"!=U.getServiceName()&&(mxEvent.addListener(V,"mouseenter",function(){U.statusContainer.style.display="inline-block"}),mxEvent.addListener(V,"mouseleave",function(){ta||(U.statusContainer.style.display="none")}));var Ba=mxUtils.bind(this,function(ua){null!=U.notificationBtn&&(null!=ua?U.notificationBtn.setAttribute("title",ua):U.notificationBtn.removeAttribute("title"))});V.style.visibility=20>V.clientWidth?"hidden":
-"";U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=U.getServiceName())if(U.statusContainer.style.display="inline-block",ta=!0,1==U.statusContainer.children.length&&""==U.editor.getStatus())V.style.visibility="hidden";else{if(0==U.statusContainer.children.length||1==U.statusContainer.children.length&&"function"===typeof U.statusContainer.firstChild.getAttribute&&null==U.statusContainer.firstChild.getAttribute("class")){var ua=
-null!=U.statusContainer.firstChild&&"function"===typeof U.statusContainer.firstChild.getAttribute?U.statusContainer.firstChild.getAttribute("title"):U.editor.getStatus();Ba(ua);var za=U.getCurrentFile();za=null!=za?za.savingStatusKey:DrawioFile.prototype.savingStatusKey;ua==mxResources.get(za)+"..."?(U.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(za))+'..."src="'+Editor.tailSpin+'">',U.statusContainer.style.display="inline-block",ta=!0):6<U.buttonContainer.clientWidth&&
-(U.statusContainer.style.display="none",ta=!1)}else U.statusContainer.style.display="inline-block",Ba(null),ta=!0;V.style.visibility=20>V.clientWidth&&!ta?"hidden":""}}));qa=O("diagram",null,Editor.menuImage);qa.style.boxShadow="none";qa.style.padding="6px";qa.style.margin="0px";T.appendChild(qa);mxEvent.disableContextMenu(qa);mxEvent.addGestureListeners(qa,mxUtils.bind(this,function(ua){(mxEvent.isShiftDown(ua)||mxEvent.isAltDown(ua)||mxEvent.isMetaDown(ua)||mxEvent.isControlDown(ua)||mxEvent.isPopupTrigger(ua))&&
-this.appIconClicked(ua)}),null,null);U.statusContainer.style.position="";U.statusContainer.style.display="none";U.statusContainer.style.margin="0px";U.statusContainer.style.padding="6px 0px";U.statusContainer.style.maxWidth=Math.min(n-240,280)+"px";U.statusContainer.style.display="inline-block";U.statusContainer.style.textOverflow="ellipsis";U.buttonContainer.style.position="";U.buttonContainer.style.paddingRight="0px";U.buttonContainer.style.display="inline-block";var va=document.createElement("a");
-va.style.padding="0px";va.style.boxShadow="none";va.className="geMenuItem";va.style.display="inline-block";va.style.width="40px";va.style.height="12px";va.style.marginBottom="-2px";va.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";va.style.backgroundPosition="top center";va.style.backgroundRepeat="no-repeat";va.setAttribute("title","Minimize");var Oa=!1,Ca=mxUtils.bind(this,function(){W.innerHTML="";if(!Oa){var ua=function(Ga,Ma,db){Ga=X("",Ga.funct,null,Ma,Ga,db);Ga.style.width=
-"40px";Ga.style.opacity="0.7";return za(Ga,null,"pointer")},za=function(Ga,Ma,db){null!=Ma&&Ga.setAttribute("title",Ma);Ga.style.cursor=null!=db?db:"default";Ga.style.margin="2px 0px";W.appendChild(Ga);mxUtils.br(W);return Ga};za(U.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");za(U.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
-140,160,"",mxResources.get("note"),!0,!1,null,!0),mxResources.get("note"));za(U.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");za(U.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var Ga=new mxCell("",new mxGeometry(0,0,I.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
-Ga.geometry.setTerminalPoint(new mxPoint(0,0),!0);Ga.geometry.setTerminalPoint(new mxPoint(Ga.geometry.width,0),!1);Ga.geometry.points=[];Ga.geometry.relative=!0;Ga.edge=!0;za(U.sidebar.createEdgeTemplateFromCells([Ga],Ga.geometry.width,Ga.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));Ga=Ga.clone();Ga.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";Ga.geometry.width=I.defaultEdgeLength+20;Ga.geometry.setTerminalPoint(new mxPoint(0,
-20),!0);Ga.geometry.setTerminalPoint(new mxPoint(Ga.geometry.width,20),!1);Ga=za(U.sidebar.createEdgeTemplateFromCells([Ga],Ga.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));Ga.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");Ga.style.paddingBottom="14px";Ga.style.marginBottom="14px"})();ua(U.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var Ka=U.actions.get("toggleShapes");ua(Ka,mxResources.get("shapes")+
-" ("+Ka.shortcut+")",J);qa=O("table",null,Editor.calendarImage);qa.style.boxShadow="none";qa.style.opacity="0.7";qa.style.padding="6px";qa.style.margin="0px";qa.style.width="37px";za(qa,null,"pointer");qa=O("insert",null,Editor.plusImage);qa.style.boxShadow="none";qa.style.opacity="0.7";qa.style.padding="6px";qa.style.margin="0px";qa.style.width="37px";za(qa,null,"pointer")}"1"!=urlParams.embedInline&&W.appendChild(va)});mxEvent.addListener(va,"click",mxUtils.bind(this,function(){Oa?(mxUtils.setPrefixedStyle(W.style,
-"transform","translate(0, -50%)"),W.style.padding="8px 6px 4px",W.style.top="50%",W.style.bottom="",W.style.height="",va.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",va.style.width="40px",va.style.height="12px",va.setAttribute("title","Minimize"),Oa=!1,Ca()):(W.innerHTML="",W.appendChild(va),mxUtils.setPrefixedStyle(W.style,"transform","translate(0, 0)"),W.style.top="",W.style.bottom="12px",W.style.padding="0px",W.style.height="24px",va.style.height="24px",va.style.backgroundImage=
-"url("+Editor.plusImage+")",va.setAttribute("title",mxResources.get("insert")),va.style.width="24px",Oa=!0)}));Ca();U.addListener("darkModeChanged",Ca);U.addListener("sketchModeChanged",Ca)}else U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus())}));if(null!=u){var Ta=function(ua){mxEvent.isShiftDown(ua)?(U.hideCurrentMenu(),U.actions.get("smartFit").funct(),mxEvent.consume(ua)):mxEvent.isAltDown(ua)&&(U.hideCurrentMenu(),U.actions.get("customZoom").funct(),
-mxEvent.consume(ua))},Va=U.actions.get("zoomIn"),Ja=U.actions.get("zoomOut"),bb=U.actions.get("resetView");Q=U.actions.get("fullscreen");var Wa=U.actions.get("undo"),$a=U.actions.get("redo"),z=X("",Wa.funct,null,mxResources.get("undo")+" ("+Wa.shortcut+")",Wa,Editor.undoImage),L=X("",$a.funct,null,mxResources.get("redo")+" ("+$a.shortcut+")",$a,Editor.redoImage),M=X("",Q.funct,null,mxResources.get("fullscreen"),Q,Editor.fullscreenImage);if(null!=N){bb=function(){ra.style.display=null!=U.pages&&("0"!=
-urlParams.pages||1<U.pages.length||Editor.pagesVisible)?"inline-block":"none"};var S=function(){ra.innerHTML="";if(null!=U.currentPage){mxUtils.write(ra,U.currentPage.getName());var ua=null!=U.pages?U.pages.length:1,za=U.getPageIndex(U.currentPage);za=null!=za?za+1:1;var Ka=U.currentPage.getId();ra.setAttribute("title",U.currentPage.getName()+" ("+za+"/"+ua+")"+(null!=Ka?" ["+Ka+"]":""))}};M.parentNode.removeChild(M);var ca=U.actions.get("delete"),ia=X("",ca.funct,null,mxResources.get("delete"),ca,
-Editor.trashImage);ia.style.opacity="0.1";T.appendChild(ia);ca.addListener("stateChanged",function(){ia.style.opacity=ca.enabled?"":"0.1"});var na=function(){z.style.display=0<U.editor.undoManager.history.length||I.isEditing()?"inline-block":"none";L.style.display=z.style.display;z.style.opacity=Wa.enabled?"":"0.1";L.style.opacity=$a.enabled?"":"0.1"};T.appendChild(z);T.appendChild(L);Wa.addListener("stateChanged",na);$a.addListener("stateChanged",na);na();var ra=this.createPageMenuTab(!1,!0);ra.style.display=
+2+"px"}U.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";U.rightResizer.style.visibility=U.bottomResizer.style.visibility;V.style.display="none";T.style.visibility="";N.style.visibility=""}),na=mxUtils.bind(this,function(){M.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";Z()});Q=mxUtils.bind(this,
+function(){na();b(U,!0);U.initFormatWindow();var ua=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(ua.x+ua.width+4,ua.y)});U.addListener("inlineFullscreenChanged",na);U.addListener("editInlineStart",Q);"1"==urlParams.embedInline&&U.addListener("darkModeChanged",Q);U.addListener("editInlineStop",mxUtils.bind(this,function(ua){U.diagramContainer.style.width="10px";U.diagramContainer.style.height="10px";U.diagramContainer.style.border="";U.bottomResizer.style.visibility=
+"hidden";U.rightResizer.style.visibility="hidden";T.style.visibility="hidden";N.style.visibility="hidden";W.style.display="none"}));if(null!=U.hoverIcons){var va=U.hoverIcons.update;U.hoverIcons.update=function(){J.freehand.isDrawing()||va.apply(this,arguments)}}if(null!=J.freehand){var Ba=J.freehand.createStyle;J.freehand.createStyle=function(ua){return Ba.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){W.className="geToolbarContainer";N.className="geToolbarContainer";T.className="geToolbarContainer";
+V.className="geToolbarContainer";U.picker=W;var sa=!1;"1"!=urlParams.embed&&"atlassian"!=U.getServiceName()&&(mxEvent.addListener(V,"mouseenter",function(){U.statusContainer.style.display="inline-block"}),mxEvent.addListener(V,"mouseleave",function(){sa||(U.statusContainer.style.display="none")}));var Da=mxUtils.bind(this,function(ua){null!=U.notificationBtn&&(null!=ua?U.notificationBtn.setAttribute("title",ua):U.notificationBtn.removeAttribute("title"))});V.style.visibility=20>V.clientWidth?"hidden":
+"";U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=U.getServiceName())if(U.statusContainer.style.display="inline-block",sa=!0,1==U.statusContainer.children.length&&""==U.editor.getStatus())V.style.visibility="hidden";else{if(0==U.statusContainer.children.length||1==U.statusContainer.children.length&&"function"===typeof U.statusContainer.firstChild.getAttribute&&null==U.statusContainer.firstChild.getAttribute("class")){var ua=
+null!=U.statusContainer.firstChild&&"function"===typeof U.statusContainer.firstChild.getAttribute?U.statusContainer.firstChild.getAttribute("title"):U.editor.getStatus();Da(ua);var ya=U.getCurrentFile();ya=null!=ya?ya.savingStatusKey:DrawioFile.prototype.savingStatusKey;ua==mxResources.get(ya)+"..."?(U.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(ya))+'..."src="'+Editor.tailSpin+'">',U.statusContainer.style.display="inline-block",sa=!0):6<U.buttonContainer.clientWidth&&
+(U.statusContainer.style.display="none",sa=!1)}else U.statusContainer.style.display="inline-block",Da(null),sa=!0;V.style.visibility=20>V.clientWidth&&!sa?"hidden":""}}));qa=O("diagram",null,Editor.menuImage);qa.style.boxShadow="none";qa.style.padding="6px";qa.style.margin="0px";T.appendChild(qa);mxEvent.disableContextMenu(qa);mxEvent.addGestureListeners(qa,mxUtils.bind(this,function(ua){(mxEvent.isShiftDown(ua)||mxEvent.isAltDown(ua)||mxEvent.isMetaDown(ua)||mxEvent.isControlDown(ua)||mxEvent.isPopupTrigger(ua))&&
+this.appIconClicked(ua)}),null,null);U.statusContainer.style.position="";U.statusContainer.style.display="none";U.statusContainer.style.margin="0px";U.statusContainer.style.padding="6px 0px";U.statusContainer.style.maxWidth=Math.min(n-240,280)+"px";U.statusContainer.style.display="inline-block";U.statusContainer.style.textOverflow="ellipsis";U.buttonContainer.style.position="";U.buttonContainer.style.paddingRight="0px";U.buttonContainer.style.display="inline-block";var Aa=document.createElement("a");
+Aa.style.padding="0px";Aa.style.boxShadow="none";Aa.className="geMenuItem";Aa.style.display="inline-block";Aa.style.width="40px";Aa.style.height="12px";Aa.style.marginBottom="-2px";Aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Aa.style.backgroundPosition="top center";Aa.style.backgroundRepeat="no-repeat";Aa.setAttribute("title","Minimize");var za=!1,Ca=mxUtils.bind(this,function(){W.innerHTML="";if(!za){var ua=function(Fa,Ra,db){Fa=X("",Fa.funct,null,Ra,Fa,db);Fa.style.width=
+"40px";Fa.style.opacity="0.7";return ya(Fa,null,"pointer")},ya=function(Fa,Ra,db){null!=Ra&&Fa.setAttribute("title",Ra);Fa.style.cursor=null!=db?db:"default";Fa.style.margin="2px 0px";W.appendChild(Fa);mxUtils.br(W);return Fa};ya(U.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");ya(U.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
+140,160,"",mxResources.get("note"),!0,!1,null,!0),mxResources.get("note"));ya(U.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");ya(U.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var Fa=new mxCell("",new mxGeometry(0,0,J.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
+Fa.geometry.setTerminalPoint(new mxPoint(0,0),!0);Fa.geometry.setTerminalPoint(new mxPoint(Fa.geometry.width,0),!1);Fa.geometry.points=[];Fa.geometry.relative=!0;Fa.edge=!0;ya(U.sidebar.createEdgeTemplateFromCells([Fa],Fa.geometry.width,Fa.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));Fa=Fa.clone();Fa.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";Fa.geometry.width=J.defaultEdgeLength+20;Fa.geometry.setTerminalPoint(new mxPoint(0,
+20),!0);Fa.geometry.setTerminalPoint(new mxPoint(Fa.geometry.width,20),!1);Fa=ya(U.sidebar.createEdgeTemplateFromCells([Fa],Fa.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));Fa.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");Fa.style.paddingBottom="14px";Fa.style.marginBottom="14px"})();ua(U.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var Na=U.actions.get("toggleShapes");ua(Na,mxResources.get("shapes")+
+" ("+Na.shortcut+")",I);qa=O("table",null,Editor.calendarImage);qa.style.boxShadow="none";qa.style.opacity="0.7";qa.style.padding="6px";qa.style.margin="0px";qa.style.width="37px";ya(qa,null,"pointer");qa=O("insert",null,Editor.plusImage);qa.style.boxShadow="none";qa.style.opacity="0.7";qa.style.padding="6px";qa.style.margin="0px";qa.style.width="37px";ya(qa,null,"pointer")}"1"!=urlParams.embedInline&&W.appendChild(Aa)});mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){za?(mxUtils.setPrefixedStyle(W.style,
+"transform","translate(0, -50%)"),W.style.padding="8px 6px 4px",W.style.top="50%",W.style.bottom="",W.style.height="",Aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Aa.style.width="40px",Aa.style.height="12px",Aa.setAttribute("title","Minimize"),za=!1,Ca()):(W.innerHTML="",W.appendChild(Aa),mxUtils.setPrefixedStyle(W.style,"transform","translate(0, 0)"),W.style.top="",W.style.bottom="12px",W.style.padding="0px",W.style.height="24px",Aa.style.height="24px",Aa.style.backgroundImage=
+"url("+Editor.plusImage+")",Aa.setAttribute("title",mxResources.get("insert")),Aa.style.width="24px",za=!0)}));Ca();U.addListener("darkModeChanged",Ca);U.addListener("sketchModeChanged",Ca)}else U.editor.addListener("statusChanged",mxUtils.bind(this,function(){U.setStatusText(U.editor.getStatus())}));if(null!=u){var Qa=function(ua){mxEvent.isShiftDown(ua)?(U.hideCurrentMenu(),U.actions.get("smartFit").funct(),mxEvent.consume(ua)):mxEvent.isAltDown(ua)&&(U.hideCurrentMenu(),U.actions.get("customZoom").funct(),
+mxEvent.consume(ua))},Za=U.actions.get("zoomIn"),cb=U.actions.get("zoomOut"),Ka=U.actions.get("resetView");Q=U.actions.get("fullscreen");var Ua=U.actions.get("undo"),$a=U.actions.get("redo"),z=X("",Ua.funct,null,mxResources.get("undo")+" ("+Ua.shortcut+")",Ua,Editor.undoImage),L=X("",$a.funct,null,mxResources.get("redo")+" ("+$a.shortcut+")",$a,Editor.redoImage),M=X("",Q.funct,null,mxResources.get("fullscreen"),Q,Editor.fullscreenImage);if(null!=N){Ka=function(){ra.style.display=null!=U.pages&&("0"!=
+urlParams.pages||1<U.pages.length||Editor.pagesVisible)?"inline-block":"none"};var S=function(){ra.innerHTML="";if(null!=U.currentPage){mxUtils.write(ra,U.currentPage.getName());var ua=null!=U.pages?U.pages.length:1,ya=U.getPageIndex(U.currentPage);ya=null!=ya?ya+1:1;var Na=U.currentPage.getId();ra.setAttribute("title",U.currentPage.getName()+" ("+ya+"/"+ua+")"+(null!=Na?" ["+Na+"]":""))}};M.parentNode.removeChild(M);var ca=U.actions.get("delete"),ha=X("",ca.funct,null,mxResources.get("delete"),ca,
+Editor.trashImage);ha.style.opacity="0.1";T.appendChild(ha);ca.addListener("stateChanged",function(){ha.style.opacity=ca.enabled?"":"0.1"});var oa=function(){z.style.display=0<U.editor.undoManager.history.length||J.isEditing()?"inline-block":"none";L.style.display=z.style.display;z.style.opacity=Ua.enabled?"":"0.1";L.style.opacity=$a.enabled?"":"0.1"};T.appendChild(z);T.appendChild(L);Ua.addListener("stateChanged",oa);$a.addListener("stateChanged",oa);oa();var ra=this.createPageMenuTab(!1,!0);ra.style.display=
"none";ra.style.position="";ra.style.marginLeft="";ra.style.top="";ra.style.left="";ra.style.height="100%";ra.style.lineHeight="";ra.style.borderStyle="none";ra.style.padding="3px 0";ra.style.margin="0px";ra.style.background="";ra.style.border="";ra.style.boxShadow="none";ra.style.verticalAlign="top";ra.style.width="auto";ra.style.maxWidth="160px";ra.style.position="relative";ra.style.padding="6px";ra.style.textOverflow="ellipsis";ra.style.opacity="0.8";N.appendChild(ra);U.editor.addListener("pagesPatched",
-S);U.editor.addListener("pageSelected",S);U.editor.addListener("pageRenamed",S);U.editor.addListener("fileLoaded",S);S();U.addListener("fileDescriptorChanged",bb);U.addListener("pagesVisibleChanged",bb);U.editor.addListener("pagesPatched",bb);bb();bb=X("",Ja.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Ja,Editor.zoomOutImage);N.appendChild(bb);var qa=R.addMenu("100%",u.funct);qa.setAttribute("title",mxResources.get("zoom"));qa.innerHTML="100%";qa.style.display="inline-block";
-qa.style.color="inherit";qa.style.cursor="pointer";qa.style.textAlign="center";qa.style.whiteSpace="nowrap";qa.style.paddingRight="10px";qa.style.textDecoration="none";qa.style.verticalAlign="top";qa.style.padding="6px 0";qa.style.fontSize="14px";qa.style.width="40px";qa.style.opacity="0.4";N.appendChild(qa);u=X("",Va.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Va,Editor.zoomInImage);N.appendChild(u);Q.visible&&(N.appendChild(M),mxEvent.addListener(document,"fullscreenchange",
+S);U.editor.addListener("pageSelected",S);U.editor.addListener("pageRenamed",S);U.editor.addListener("fileLoaded",S);S();U.addListener("fileDescriptorChanged",Ka);U.addListener("pagesVisibleChanged",Ka);U.editor.addListener("pagesPatched",Ka);Ka();Ka=X("",cb.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",cb,Editor.zoomOutImage);N.appendChild(Ka);var qa=R.addMenu("100%",u.funct);qa.setAttribute("title",mxResources.get("zoom"));qa.innerHTML="100%";qa.style.display="inline-block";
+qa.style.color="inherit";qa.style.cursor="pointer";qa.style.textAlign="center";qa.style.whiteSpace="nowrap";qa.style.paddingRight="10px";qa.style.textDecoration="none";qa.style.verticalAlign="top";qa.style.padding="6px 0";qa.style.fontSize="14px";qa.style.width="40px";qa.style.opacity="0.4";N.appendChild(qa);u=X("",Za.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Za,Editor.zoomInImage);N.appendChild(u);Q.visible&&(N.appendChild(M),mxEvent.addListener(document,"fullscreenchange",
function(){M.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(u=U.actions.get("exit"),N.appendChild(X("",u.funct,null,mxResources.get("exit"),u,Editor.closeImage)));U.tabContainer.style.visibility="hidden";V.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-T.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";N.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";sa.appendChild(T);sa.appendChild(N);W.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
-mxClient.IS_POINTER&&(W.style.touchAction="none");sa.appendChild(W);window.setTimeout(function(){mxUtils.setPrefixedStyle(W.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(sa)}else{var ya=X("",Ta,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",bb,Editor.zoomFitImage);V.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";qa=R.addMenu("100%",
+T.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";N.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";ta.appendChild(T);ta.appendChild(N);W.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
+mxClient.IS_POINTER&&(W.style.touchAction="none");ta.appendChild(W);window.setTimeout(function(){mxUtils.setPrefixedStyle(W.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(ta)}else{var xa=X("",Qa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",Ka,Editor.zoomFitImage);V.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";qa=R.addMenu("100%",
u.funct);qa.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");qa.style.whiteSpace="nowrap";qa.style.paddingRight="10px";qa.style.textDecoration="none";qa.style.textDecoration="none";qa.style.overflow="hidden";qa.style.visibility="hidden";qa.style.textAlign="center";qa.style.cursor="pointer";qa.style.height=parseInt(U.tabContainerHeight)-1+"px";qa.style.lineHeight=parseInt(U.tabContainerHeight)+1+"px";qa.style.position="absolute";qa.style.display="block";qa.style.fontSize="12px";qa.style.width=
-"59px";qa.style.right="0px";qa.style.bottom="0px";qa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";qa.style.backgroundPosition="right 6px center";qa.style.backgroundRepeat="no-repeat";sa.appendChild(qa)}(function(ua){mxEvent.addListener(ua,"click",Ta);var za=mxUtils.bind(this,function(){ua.innerHTML="";mxUtils.write(ua,Math.round(100*U.editor.graph.view.scale)+"%")});U.editor.graph.view.addListener(mxEvent.EVENT_SCALE,za);U.editor.addListener("resetGraphView",za);U.editor.addListener("pageSelected",
-za)})(qa);var Ea=U.setGraphEnabled;U.setGraphEnabled=function(){Ea.apply(this,arguments);null!=this.tabContainer&&(qa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==N?this.tabContainerHeight+"px":"0px")}}sa.appendChild(V);sa.appendChild(U.diagramContainer);ja.appendChild(sa);U.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&b(this,!0);null==N&&sa.appendChild(U.tabContainer);
-var Na=null;ka();mxEvent.addListener(window,"resize",function(){ka();null!=U.sidebarWindow&&U.sidebarWindow.window.fit();null!=U.formatWindow&&U.formatWindow.window.fit();null!=U.actions.outlineWindow&&U.actions.outlineWindow.window.fit();null!=U.actions.layersWindow&&U.actions.layersWindow.window.fit();null!=U.menus.tagsWindow&&U.menus.tagsWindow.window.fit();null!=U.menus.findWindow&&U.menus.findWindow.window.fit();null!=U.menus.findReplaceWindow&&U.menus.findReplaceWindow.window.fit()});if("1"==
+"59px";qa.style.right="0px";qa.style.bottom="0px";qa.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";qa.style.backgroundPosition="right 6px center";qa.style.backgroundRepeat="no-repeat";ta.appendChild(qa)}(function(ua){mxEvent.addListener(ua,"click",Qa);var ya=mxUtils.bind(this,function(){ua.innerHTML="";mxUtils.write(ua,Math.round(100*U.editor.graph.view.scale)+"%")});U.editor.graph.view.addListener(mxEvent.EVENT_SCALE,ya);U.editor.addListener("resetGraphView",ya);U.editor.addListener("pageSelected",
+ya)})(qa);var Ga=U.setGraphEnabled;U.setGraphEnabled=function(){Ga.apply(this,arguments);null!=this.tabContainer&&(qa.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==N?this.tabContainerHeight+"px":"0px")}}ta.appendChild(V);ta.appendChild(U.diagramContainer);ja.appendChild(ta);U.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&b(this,!0);null==N&&ta.appendChild(U.tabContainer);
+var La=null;ka();mxEvent.addListener(window,"resize",function(){ka();null!=U.sidebarWindow&&U.sidebarWindow.window.fit();null!=U.formatWindow&&U.formatWindow.window.fit();null!=U.actions.outlineWindow&&U.actions.outlineWindow.window.fit();null!=U.actions.layersWindow&&U.actions.layersWindow.window.fit();null!=U.menus.tagsWindow&&U.menus.tagsWindow.window.fit();null!=U.menus.findWindow&&U.menus.findWindow.window.fit();null!=U.menus.findReplaceWindow&&U.menus.findReplaceWindow.window.fit()});if("1"==
urlParams.embedInline){document.body.style.cursor="text";W.style.transform="";mxEvent.addGestureListeners(U.diagramContainer.parentNode,function(ua){mxEvent.getSource(ua)==U.diagramContainer.parentNode&&(U.embedExitPoint=new mxPoint(mxEvent.getClientX(ua),mxEvent.getClientY(ua)),U.sendEmbeddedSvgExport())});ja=document.createElement("div");ja.style.position="absolute";ja.style.width="10px";ja.style.height="10px";ja.style.borderRadius="5px";ja.style.border="1px solid gray";ja.style.background="#ffffff";
-ja.style.cursor="row-resize";U.diagramContainer.parentNode.appendChild(ja);U.bottomResizer=ja;var Pa=null,Qa=null,Ua=null,La=null;mxEvent.addGestureListeners(ja,function(ua){La=parseInt(U.diagramContainer.style.height);Qa=mxEvent.getClientY(ua);I.popupMenuHandler.hideMenu();mxEvent.consume(ua)});ja=ja.cloneNode(!1);ja.style.cursor="col-resize";U.diagramContainer.parentNode.appendChild(ja);U.rightResizer=ja;mxEvent.addGestureListeners(ja,function(ua){Ua=parseInt(U.diagramContainer.style.width);Pa=
-mxEvent.getClientX(ua);I.popupMenuHandler.hideMenu();mxEvent.consume(ua)});mxEvent.addGestureListeners(document.body,null,function(ua){var za=!1;null!=Pa&&(U.diagramContainer.style.width=Math.max(20,Ua+mxEvent.getClientX(ua)-Pa)+"px",za=!0);null!=Qa&&(U.diagramContainer.style.height=Math.max(20,La+mxEvent.getClientY(ua)-Qa)+"px",za=!0);za&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:U.diagramContainer.getBoundingClientRect()}),
-"*"),Z(),U.refresh())},function(ua){null==Pa&&null==Qa||mxEvent.consume(ua);Qa=Pa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";U.bottomResizer.style.visibility="hidden";U.rightResizer.style.visibility="hidden";T.style.visibility="hidden";N.style.visibility="hidden";W.style.display="none"}"1"==urlParams.prefetchFonts&&U.editor.loadFonts()}}};
+ja.style.cursor="row-resize";U.diagramContainer.parentNode.appendChild(ja);U.bottomResizer=ja;var Pa=null,Oa=null,Ta=null,Ma=null;mxEvent.addGestureListeners(ja,function(ua){Ma=parseInt(U.diagramContainer.style.height);Oa=mxEvent.getClientY(ua);J.popupMenuHandler.hideMenu();mxEvent.consume(ua)});ja=ja.cloneNode(!1);ja.style.cursor="col-resize";U.diagramContainer.parentNode.appendChild(ja);U.rightResizer=ja;mxEvent.addGestureListeners(ja,function(ua){Ta=parseInt(U.diagramContainer.style.width);Pa=
+mxEvent.getClientX(ua);J.popupMenuHandler.hideMenu();mxEvent.consume(ua)});mxEvent.addGestureListeners(document.body,null,function(ua){var ya=!1;null!=Pa&&(U.diagramContainer.style.width=Math.max(20,Ta+mxEvent.getClientX(ua)-Pa)+"px",ya=!0);null!=Oa&&(U.diagramContainer.style.height=Math.max(20,Ma+mxEvent.getClientY(ua)-Oa)+"px",ya=!0);ya&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:U.diagramContainer.getBoundingClientRect()}),
+"*"),Z(),U.refresh())},function(ua){null==Pa&&null==Oa||mxEvent.consume(ua);Oa=Pa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";U.bottomResizer.style.visibility="hidden";U.rightResizer.style.visibility="hidden";T.style.visibility="hidden";N.style.visibility="hidden";W.style.display="none"}"1"==urlParams.prefetchFonts&&U.editor.loadFonts()}}};
(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,n,D,t,E){this.file=b;this.id=e;this.content=k;this.modifiedDate=n;this.createdDate=D;this.isResolved=t;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,n,D){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,n,D){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=n;this.locale=D};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,e,k){this.init(b,e,k)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
@@ -4079,8 +4079,8 @@ null!=d||0!=this.graphConfig.resize||""==b.style.height?(d=null!=d?d:new mxPoint
GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,n=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/n+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/n+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var n=this.graphConfig.layerIds,D=null!=n&&0<n.length,t=!1;if(0<k.length||D||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==e){e=!1;t={};if(D)for(var d=0;d<n.length;d++){var f=b.getCell(n[d]);null!=f&&(e=!0,t[f.id]=!0)}else for(d=0;d<k.length;d++)f=b.getChildAt(b.root,parseInt(k[d])),null!=f&&(e=!0,t[f.id]=!0);for(d=0;e&&
d<E;d++)f=b.getChildAt(b.root,d),b.setVisible(f,t[f.id]||!1)}else for(d=0;d<E;d++)b.setVisible(b.getChildAt(b.root,d),e.isVisible(e.getChildAt(e.root,d)))}finally{b.endUpdate()}t=!0}return t};
-GraphViewer.prototype.addToolbar=function(){function b(ea,ka,ja,U){var I=document.createElement("div");I.style.borderRight="1px solid #d0d0d0";I.style.padding="3px 6px 3px 6px";mxEvent.addListener(I,"click",ea);null!=ja&&I.setAttribute("title",ja);I.style.display="inline-block";ea=document.createElement("img");ea.setAttribute("border","0");ea.setAttribute("src",ka);ea.style.width="18px";null==U||U?(mxEvent.addListener(I,"mouseenter",function(){I.style.backgroundColor="#ddd"}),mxEvent.addListener(I,
-"mouseleave",function(){I.style.backgroundColor="#eee"}),mxUtils.setOpacity(ea,60),I.style.cursor="pointer"):mxUtils.setOpacity(I,30);I.appendChild(ea);k.appendChild(I);m++;return I}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
+GraphViewer.prototype.addToolbar=function(){function b(ea,ka,ja,U){var J=document.createElement("div");J.style.borderRight="1px solid #d0d0d0";J.style.padding="3px 6px 3px 6px";mxEvent.addListener(J,"click",ea);null!=ja&&J.setAttribute("title",ja);J.style.display="inline-block";ea=document.createElement("img");ea.setAttribute("border","0");ea.setAttribute("src",ka);ea.style.width="18px";null==U||U?(mxEvent.addListener(J,"mouseenter",function(){J.style.backgroundColor="#ddd"}),mxEvent.addListener(J,
+"mouseleave",function(){J.style.backgroundColor="#eee"}),mxUtils.setOpacity(ea,60),J.style.cursor="pointer"):mxUtils.setOpacity(J,30);J.appendChild(ea);k.appendChild(J);m++;return J}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
"border-box";k.style.whiteSpace="nowrap";k.style.textAlign="left";k.style.zIndex=this.toolbarZIndex;k.style.backgroundColor="#eee";k.style.height=this.toolbarHeight+"px";this.toolbar=k;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(k.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(k,30);var n=null,D=null,t=mxUtils.bind(this,function(ea){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,
function(){mxUtils.setOpacity(k,0);n=null;D=window.setTimeout(mxUtils.bind(this,function(){k.style.display="none";D=null}),100)}),ea||200)}),E=mxUtils.bind(this,function(ea){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);k.style.display="";mxUtils.setOpacity(k,ea||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||(E(30),t())}));mxEvent.addListener(k,
mxClient.IS_POINTER?"pointermove":"mousemove",function(ea){mxEvent.consume(ea)});mxEvent.addListener(k,"mouseenter",mxUtils.bind(this,function(ea){E(100)}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(ea){E(100);mxEvent.consume(ea)}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(ea){mxEvent.isTouchEvent(ea)||E(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ea,ka){this.startX=ka.getGraphX();
diff --git a/src/main/webapp/mxgraph/mxClient.js b/src/main/webapp/mxgraph/mxClient.js
index d506dcda..12ba960a 100644
--- a/src/main/webapp/mxgraph/mxClient.js
+++ b/src/main/webapp/mxgraph/mxClient.js
@@ -1,4 +1,4 @@
-var mxClient={VERSION:"18.2.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+var mxClient={VERSION:"19.0.0",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
diff --git a/src/main/webapp/service-worker.js b/src/main/webapp/service-worker.js
index 20e53b58..d69a6eaf 100644
--- a/src/main/webapp/service-worker.js
+++ b/src/main/webapp/service-worker.js
@@ -1,2 +1,2 @@
-if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Module ${e} didn’t register its module`);return r[e]}))},i=(i,r)=>{Promise.all(i.map(e)).then((e=>r(1===e.length?e[0]:e)))},r={require:Promise.resolve(i)};self.define=(i,a,c)=>{r[i]||(r[i]=Promise.resolve().then((()=>{let r={};const s={uri:location.origin+i.slice(1)};return Promise.all(a.map((i=>{switch(i){case"exports":return r;case"module":return s;default:return e(i)}}))).then((e=>{const i=c(...e);return r.default||(r.default=i),r}))})))}}define("./service-worker.js",["./workbox-7a2a8380"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"08b1952fa880e4ea6baabbb055dba10c"},{url:"js/extensions.min.js",revision:"aff14308089d33fd3c6e5495246438cd"},{url:"js/stencils.min.js",revision:"4dbdbc7cee6fc00d1b8c6fe1022a0989"},{url:"js/shapes-14-6-5.min.js",revision:"f0e1d4c09054df2f3ea3793491e9fe08"},{url:"js/math-print.js",revision:"0611491c663261a732ff18224906184d"},{url:"index.html",revision:"8b5b1cf07fc74454cf354717e9d18534"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"4f2c07c4585347249c95cd9158872fb2"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"3179f617dd02efd2cefeb8c06f965880"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"1108544a4b2fb98cc794ead2f467ee1b"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"c96db1790184cb35781f791e8d1dafd9"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"6d5a85e70c7b82ba685782ca6df2b9d5"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"01caa325f3ad3f6565e0b4228907fb63"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"c6552981ba1add209fe3e12ffcf79c9a"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"fab9a95f19a57bb836e42f67a1c0078b"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"d089f12446d443ca01752a5115456fcc"},{url:"connect/confluence/viewer-init.js",revision:"2bd677096ebffd3aa5cab0c347851e3f"},{url:"connect/confluence/viewer.js",revision:"a9d84488d17425d28e5d85d464e0a8f8"},{url:"connect/confluence/viewer-1-4-42.html",revision:"4c58f3a1a4c99b1c4264593b6e05100b"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"352d2782274de07617d117926b68c205"},{url:"connect/confluence/includeDiagram.html",revision:"5cefef0227d058cf716d1f51f2cf202f"},{url:"connect/confluence/macro-editor.js",revision:"412bc4b87e630b697a40f247c579d398"},{url:"math/MathJax.js",revision:"b2c103388b71bb3d11cbf9aa45fe9b68"},{url:"math/config/TeX-MML-AM_SVG-full.js",revision:"d5cb8ac04050983170ae4af145bc66ff"},{url:"math/jax/output/SVG/fonts/TeX/fontdata.js",revision:"495e5a410955d1b6178870e605890ede"},{url:"math/jax/element/mml/optable/BasicLatin.js",revision:"cac9b2e71382e62270baa55fab07cc13"},{url:"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js",revision:"e3e5e4d5924beed29f0844550b5c8f46"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js",revision:"0767cbad7275b53da128e7e5e1109f7c"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js",revision:"346302a5c5ee00e01c302148c56dbfe3"},{url:"resources/dia.txt",revision:"2d474154fe5893976198647ea505ac96"},{url:"resources/dia_am.txt",revision:"d767c66fc3d828f01790d5145a43f944"},{url:"resources/dia_ar.txt",revision:"326cf12a2eb475cfd18ca0aa8f454c27"},{url:"resources/dia_bg.txt",revision:"d935ebdf513f6d6c8b2488ca53edc48d"},{url:"resources/dia_bn.txt",revision:"9a066d6e0cb91240a5de909c09ad5f00"},{url:"resources/dia_bs.txt",revision:"834558d329362244813342c858ee0bb3"},{url:"resources/dia_ca.txt",revision:"7ea27e2cedf5a72c2d6acc3882f1107f"},{url:"resources/dia_cs.txt",revision:"73d43bc65e16f28055cc70302d8f5b23"},{url:"resources/dia_da.txt",revision:"9684d36e43a503a7923220702367e1bd"},{url:"resources/dia_de.txt",revision:"492ec6381d7a44fbc5da1adf674cdd3c"},{url:"resources/dia_el.txt",revision:"134ef55f7ede4d1ec364fc275c1dc560"},{url:"resources/dia_eo.txt",revision:"df44330c02c251217f68199902bb71b4"},{url:"resources/dia_es.txt",revision:"f4782a7a893fc58ac5138a94ee506ff1"},{url:"resources/dia_et.txt",revision:"ab5d6547dbef2866651d5854cd44ad54"},{url:"resources/dia_eu.txt",revision:"78de7c722cdc7079dbce68df02ab0ef9"},{url:"resources/dia_fa.txt",revision:"44639b4c2018027b39e998d527c444e3"},{url:"resources/dia_fi.txt",revision:"01b3890a6db98ef3a43485ba49ac7992"},{url:"resources/dia_fil.txt",revision:"53c542d5fea30e409eca8fe10048859b"},{url:"resources/dia_fr.txt",revision:"ff0e55a0b6321a7d0fbe35a4d37a9908"},{url:"resources/dia_gl.txt",revision:"fd421cae2d65a12f45743d029d1f2d1e"},{url:"resources/dia_gu.txt",revision:"54fffb1c7c7da120cb22f71d4fef3c49"},{url:"resources/dia_he.txt",revision:"9bb0be8fd970a9640d5b5f59afb22326"},{url:"resources/dia_hi.txt",revision:"353564fdcbdec14435e22cc10ea340a9"},{url:"resources/dia_hr.txt",revision:"cfefa39b02d5ff3a718c5ca688675a22"},{url:"resources/dia_hu.txt",revision:"b1e4b3e78529cbae7f9b41b95d8d015f"},{url:"resources/dia_id.txt",revision:"43353905b8e9180461055b1ed17dc53d"},{url:"resources/dia_it.txt",revision:"c55df5f591ed818e1ff6f60bf2eb0dcd"},{url:"resources/dia_ja.txt",revision:"185602e27366d4c4155de476bb5010ff"},{url:"resources/dia_kn.txt",revision:"7f4970fd5a35520e5871334bb8154c03"},{url:"resources/dia_ko.txt",revision:"6478a7552215d6c5b782cba0908ffa0e"},{url:"resources/dia_lt.txt",revision:"521711aef9fcf41ee833e5e669de1b6e"},{url:"resources/dia_lv.txt",revision:"70558cca334ed3d090ecda7423aad8df"},{url:"resources/dia_ml.txt",revision:"d827e98625dfa9d320d2a00fa5709f54"},{url:"resources/dia_mr.txt",revision:"3510ad556be2f84f7aefc617e49fa773"},{url:"resources/dia_ms.txt",revision:"fe33d70d3b621e0f511388d9ef3667aa"},{url:"resources/dia_my.txt",revision:"2d474154fe5893976198647ea505ac96"},{url:"resources/dia_nl.txt",revision:"ec08e8294289a952b8ec15ef9615b927"},{url:"resources/dia_no.txt",revision:"62c693c6ea9a58bc0dd4eec7b1b1ea7d"},{url:"resources/dia_pl.txt",revision:"db85c32f7458bbdb4dabd8ee04c5e6e5"},{url:"resources/dia_pt-br.txt",revision:"2cffd3b30b81113406236b29ec19fcf4"},{url:"resources/dia_pt.txt",revision:"faa525cfd933d9b28bab4ba9958d2a91"},{url:"resources/dia_ro.txt",revision:"4f0c51dc49be417530a88e264acc8ac7"},{url:"resources/dia_ru.txt",revision:"2454d71cf5eda2fca6da0a4ac02c0ce0"},{url:"resources/dia_si.txt",revision:"2d474154fe5893976198647ea505ac96"},{url:"resources/dia_sk.txt",revision:"a65bba3698e3cb60764146a1d6a1b494"},{url:"resources/dia_sl.txt",revision:"03e8bdd1584030ef4bd3e59311806bde"},{url:"resources/dia_sr.txt",revision:"7377e7c4b5f5e768bd4f9a32c40f0143"},{url:"resources/dia_sv.txt",revision:"3106d87ab7710b789ca481df9f9eaa20"},{url:"resources/dia_sw.txt",revision:"a4b2cdef952b5e6b5a1cb569ecb48347"},{url:"resources/dia_ta.txt",revision:"cfd99e1386d7a0310a1ba24a1bd39f26"},{url:"resources/dia_te.txt",revision:"f0ded6e2695a8715bbbfb9868a42be5e"},{url:"resources/dia_th.txt",revision:"991c7523fdab1db1590ecf71075f85de"},{url:"resources/dia_tr.txt",revision:"ebe2bdd67274dc832f2a1c06e0415c99"},{url:"resources/dia_uk.txt",revision:"352152d7c79d70c2d7451d10cb9db4d1"},{url:"resources/dia_vi.txt",revision:"077de6f062ffe2fdf09369c41490caf6"},{url:"resources/dia_zh-tw.txt",revision:"0c405f3473c213c97287b9706bdaf5e6"},{url:"resources/dia_zh.txt",revision:"1379897fd5f960954a075507b559b7e9"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
+if(!self.define){const e=e=>{"require"!==e&&(e+=".js");let i=Promise.resolve();return r[e]||(i=new Promise((async i=>{if("document"in self){const r=document.createElement("script");r.src=e,document.head.appendChild(r),r.onload=i}else importScripts(e),i()}))),i.then((()=>{if(!r[e])throw new Error(`Module ${e} didn’t register its module`);return r[e]}))},i=(i,r)=>{Promise.all(i.map(e)).then((e=>r(1===e.length?e[0]:e)))},r={require:Promise.resolve(i)};self.define=(i,a,c)=>{r[i]||(r[i]=Promise.resolve().then((()=>{let r={};const s={uri:location.origin+i.slice(1)};return Promise.all(a.map((i=>{switch(i){case"exports":return r;case"module":return s;default:return e(i)}}))).then((e=>{const i=c(...e);return r.default||(r.default=i),r}))})))}}define("./service-worker.js",["./workbox-7a2a8380"],(function(e){"use strict";self.addEventListener("message",(e=>{e.data&&"SKIP_WAITING"===e.data.type&&self.skipWaiting()})),e.precacheAndRoute([{url:"js/app.min.js",revision:"8856b392ace29f3e6292a241b0351f9e"},{url:"js/extensions.min.js",revision:"45df373f567b94c1dce78ba61b591983"},{url:"js/stencils.min.js",revision:"4dbdbc7cee6fc00d1b8c6fe1022a0989"},{url:"js/shapes-14-6-5.min.js",revision:"f0e1d4c09054df2f3ea3793491e9fe08"},{url:"js/math-print.js",revision:"0611491c663261a732ff18224906184d"},{url:"index.html",revision:"8b5b1cf07fc74454cf354717e9d18534"},{url:"open.html",revision:"d71816b3b00e769fc6019fcdd6921662"},{url:"styles/fonts/ArchitectsDaughter-Regular.ttf",revision:"31c2153c0530e32553b31a49b3d70736"},{url:"styles/grapheditor.css",revision:"4f2c07c4585347249c95cd9158872fb2"},{url:"styles/atlas.css",revision:"e8152cda9233d3a3af017422993abfce"},{url:"styles/dark.css",revision:"3179f617dd02efd2cefeb8c06f965880"},{url:"js/dropbox/Dropbox-sdk.min.js",revision:"4b9842892aa37b156db0a8364b7a83b0"},{url:"js/onedrive/OneDrive.js",revision:"505e8280346666f7ee801bc59521fa67"},{url:"js/viewer-static.min.js",revision:"6b5d7470392f84f7a84e14191257bf8b"},{url:"connect/jira/editor-1-3-3.html",revision:"a2b0e7267a08a838f3cc404eba831ec0"},{url:"connect/jira/viewerPanel-1-3-12.html",revision:"c96db1790184cb35781f791e8d1dafd9"},{url:"connect/jira/fullScreenViewer-1-3-3.html",revision:"ba7ece2dfb2833b72f97280d7092f25e"},{url:"connect/jira/viewerPanel.js",revision:"6d5a85e70c7b82ba685782ca6df2b9d5"},{url:"connect/jira/spinner.gif",revision:"7d857ab9d86123e93d74d48e958fe743"},{url:"connect/jira/editor.js",revision:"01caa325f3ad3f6565e0b4228907fb63"},{url:"connect/jira/fullscreen-viewer-init.js",revision:"e00ad51fc16b87c362d6eaf930ab1fa5"},{url:"connect/jira/fullscreen-viewer.js",revision:"4e0775a6c156a803e777870623ac7c3e"},{url:"plugins/connectJira.js",revision:"4cefa13414e0d406550f3c073923080c"},{url:"plugins/cConf-comments.js",revision:"c787357209cff2986dcca567b599e2ef"},{url:"plugins/cConf-1-4-8.js",revision:"c6552981ba1add209fe3e12ffcf79c9a"},{url:"connect/confluence/connectUtils-1-4-8.js",revision:"fab9a95f19a57bb836e42f67a1c0078b"},{url:"connect/new_common/cac.js",revision:"3d8c436c566db645fb1e6e6ba9f69bbc"},{url:"connect/gdrive_common/gac.js",revision:"38f1df3ecc4d78290493f47e62202138"},{url:"connect/onedrive_common/ac.js",revision:"d089f12446d443ca01752a5115456fcc"},{url:"connect/confluence/viewer-init.js",revision:"2bd677096ebffd3aa5cab0c347851e3f"},{url:"connect/confluence/viewer.js",revision:"a9d84488d17425d28e5d85d464e0a8f8"},{url:"connect/confluence/viewer-1-4-42.html",revision:"4c58f3a1a4c99b1c4264593b6e05100b"},{url:"connect/confluence/macroEditor-1-4-8.html",revision:"8cd74a2fb60bf2e3e86026d66107cf11"},{url:"connect/confluence/includeDiagram-1-4-8.js",revision:"352d2782274de07617d117926b68c205"},{url:"connect/confluence/includeDiagram.html",revision:"5cefef0227d058cf716d1f51f2cf202f"},{url:"connect/confluence/macro-editor.js",revision:"412bc4b87e630b697a40f247c579d398"},{url:"math/MathJax.js",revision:"b2c103388b71bb3d11cbf9aa45fe9b68"},{url:"math/config/TeX-MML-AM_SVG-full.js",revision:"d5cb8ac04050983170ae4af145bc66ff"},{url:"math/jax/output/SVG/fonts/TeX/fontdata.js",revision:"495e5a410955d1b6178870e605890ede"},{url:"math/jax/element/mml/optable/BasicLatin.js",revision:"cac9b2e71382e62270baa55fab07cc13"},{url:"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js",revision:"e3e5e4d5924beed29f0844550b5c8f46"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js",revision:"0767cbad7275b53da128e7e5e1109f7c"},{url:"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js",revision:"346302a5c5ee00e01c302148c56dbfe3"},{url:"resources/dia.txt",revision:"2d474154fe5893976198647ea505ac96"},{url:"resources/dia_am.txt",revision:"d767c66fc3d828f01790d5145a43f944"},{url:"resources/dia_ar.txt",revision:"326cf12a2eb475cfd18ca0aa8f454c27"},{url:"resources/dia_bg.txt",revision:"d935ebdf513f6d6c8b2488ca53edc48d"},{url:"resources/dia_bn.txt",revision:"9a066d6e0cb91240a5de909c09ad5f00"},{url:"resources/dia_bs.txt",revision:"834558d329362244813342c858ee0bb3"},{url:"resources/dia_ca.txt",revision:"7ea27e2cedf5a72c2d6acc3882f1107f"},{url:"resources/dia_cs.txt",revision:"73d43bc65e16f28055cc70302d8f5b23"},{url:"resources/dia_da.txt",revision:"9684d36e43a503a7923220702367e1bd"},{url:"resources/dia_de.txt",revision:"492ec6381d7a44fbc5da1adf674cdd3c"},{url:"resources/dia_el.txt",revision:"134ef55f7ede4d1ec364fc275c1dc560"},{url:"resources/dia_eo.txt",revision:"df44330c02c251217f68199902bb71b4"},{url:"resources/dia_es.txt",revision:"f4782a7a893fc58ac5138a94ee506ff1"},{url:"resources/dia_et.txt",revision:"ab5d6547dbef2866651d5854cd44ad54"},{url:"resources/dia_eu.txt",revision:"78de7c722cdc7079dbce68df02ab0ef9"},{url:"resources/dia_fa.txt",revision:"44639b4c2018027b39e998d527c444e3"},{url:"resources/dia_fi.txt",revision:"01b3890a6db98ef3a43485ba49ac7992"},{url:"resources/dia_fil.txt",revision:"53c542d5fea30e409eca8fe10048859b"},{url:"resources/dia_fr.txt",revision:"ff0e55a0b6321a7d0fbe35a4d37a9908"},{url:"resources/dia_gl.txt",revision:"fd421cae2d65a12f45743d029d1f2d1e"},{url:"resources/dia_gu.txt",revision:"54fffb1c7c7da120cb22f71d4fef3c49"},{url:"resources/dia_he.txt",revision:"9bb0be8fd970a9640d5b5f59afb22326"},{url:"resources/dia_hi.txt",revision:"353564fdcbdec14435e22cc10ea340a9"},{url:"resources/dia_hr.txt",revision:"cfefa39b02d5ff3a718c5ca688675a22"},{url:"resources/dia_hu.txt",revision:"b1e4b3e78529cbae7f9b41b95d8d015f"},{url:"resources/dia_id.txt",revision:"43353905b8e9180461055b1ed17dc53d"},{url:"resources/dia_it.txt",revision:"c55df5f591ed818e1ff6f60bf2eb0dcd"},{url:"resources/dia_ja.txt",revision:"185602e27366d4c4155de476bb5010ff"},{url:"resources/dia_kn.txt",revision:"7f4970fd5a35520e5871334bb8154c03"},{url:"resources/dia_ko.txt",revision:"6478a7552215d6c5b782cba0908ffa0e"},{url:"resources/dia_lt.txt",revision:"521711aef9fcf41ee833e5e669de1b6e"},{url:"resources/dia_lv.txt",revision:"70558cca334ed3d090ecda7423aad8df"},{url:"resources/dia_ml.txt",revision:"d827e98625dfa9d320d2a00fa5709f54"},{url:"resources/dia_mr.txt",revision:"3510ad556be2f84f7aefc617e49fa773"},{url:"resources/dia_ms.txt",revision:"fe33d70d3b621e0f511388d9ef3667aa"},{url:"resources/dia_my.txt",revision:"2d474154fe5893976198647ea505ac96"},{url:"resources/dia_nl.txt",revision:"ec08e8294289a952b8ec15ef9615b927"},{url:"resources/dia_no.txt",revision:"62c693c6ea9a58bc0dd4eec7b1b1ea7d"},{url:"resources/dia_pl.txt",revision:"db85c32f7458bbdb4dabd8ee04c5e6e5"},{url:"resources/dia_pt-br.txt",revision:"2cffd3b30b81113406236b29ec19fcf4"},{url:"resources/dia_pt.txt",revision:"faa525cfd933d9b28bab4ba9958d2a91"},{url:"resources/dia_ro.txt",revision:"4f0c51dc49be417530a88e264acc8ac7"},{url:"resources/dia_ru.txt",revision:"2454d71cf5eda2fca6da0a4ac02c0ce0"},{url:"resources/dia_si.txt",revision:"2d474154fe5893976198647ea505ac96"},{url:"resources/dia_sk.txt",revision:"a65bba3698e3cb60764146a1d6a1b494"},{url:"resources/dia_sl.txt",revision:"03e8bdd1584030ef4bd3e59311806bde"},{url:"resources/dia_sr.txt",revision:"7377e7c4b5f5e768bd4f9a32c40f0143"},{url:"resources/dia_sv.txt",revision:"3106d87ab7710b789ca481df9f9eaa20"},{url:"resources/dia_sw.txt",revision:"a4b2cdef952b5e6b5a1cb569ecb48347"},{url:"resources/dia_ta.txt",revision:"cfd99e1386d7a0310a1ba24a1bd39f26"},{url:"resources/dia_te.txt",revision:"f0ded6e2695a8715bbbfb9868a42be5e"},{url:"resources/dia_th.txt",revision:"991c7523fdab1db1590ecf71075f85de"},{url:"resources/dia_tr.txt",revision:"ebe2bdd67274dc832f2a1c06e0415c99"},{url:"resources/dia_uk.txt",revision:"352152d7c79d70c2d7451d10cb9db4d1"},{url:"resources/dia_vi.txt",revision:"077de6f062ffe2fdf09369c41490caf6"},{url:"resources/dia_zh-tw.txt",revision:"0c405f3473c213c97287b9706bdaf5e6"},{url:"resources/dia_zh.txt",revision:"1379897fd5f960954a075507b559b7e9"},{url:"favicon.ico",revision:"fab2d88b37c72d83607527573de45281"},{url:"images/manifest.json",revision:"c6236bde53ed79aaaec60a1aca8ee2ef"},{url:"images/logo.png",revision:"89630b64b911ebe0daa3dfe442087cfa"},{url:"images/drawlogo.svg",revision:"4bf4d14ebcf072d8bd4c5a1c89e88fc6"},{url:"images/drawlogo48.png",revision:"8b13428373aca67b895364d025f42417"},{url:"images/drawlogo-gray.svg",revision:"0aabacbc0873816e1e09e4736ae44c7d"},{url:"images/drawlogo-text-bottom.svg",revision:"f6c438823ab31f290940bd4feb8dd9c2"},{url:"images/default-user.jpg",revision:"2c399696a87c8921f12d2f9e1990cc6e"},{url:"images/logo-flat-small.png",revision:"4b178e59ff499d6dd1894fc498b59877"},{url:"images/apple-touch-icon.png",revision:"73da7989a23ce9a4be565ec65658a239"},{url:"images/favicon-16x16.png",revision:"1a79d5461a5d2bf21f6652e0ac20d6e5"},{url:"images/favicon-32x32.png",revision:"e3b92da2febe70bad5372f6f3474b034"},{url:"images/android-chrome-196x196.png",revision:"f8c045b2d7b1c719fda64edab04c415c"},{url:"images/android-chrome-512x512.png",revision:"959b5fac2453963ff6d60fb85e4b73fd"},{url:"images/delete.png",revision:"5f2350f2fd20f1a229637aed32ed8f29"},{url:"images/droptarget.png",revision:"bbf7f563fb6784de1ce96f329519b043"},{url:"images/help.png",revision:"9266c6c3915bd33c243d80037d37bf61"},{url:"images/download.png",revision:"35418dd7bd48d87502c71b578cc6c37f"},{url:"images/logo-flat.png",revision:"038070ab43aee6e54a791211859fc67b"},{url:"images/google-drive-logo.svg",revision:"5d9f2f5bbc7dcc252730a0072bb23059"},{url:"images/onedrive-logo.svg",revision:"3645b344ec0634c1290dd58d7dc87b97"},{url:"images/dropbox-logo.svg",revision:"e6be408c77cf9c82d41ac64fa854280a"},{url:"images/github-logo.svg",revision:"a1a999b69a275eac0cb918360ac05ae1"},{url:"images/gitlab-logo.svg",revision:"0faea8c818899e58533e153c44b10517"},{url:"images/trello-logo.svg",revision:"006fd0d7d70d7e95dc691674cb12e044"},{url:"images/osa_drive-harddisk.png",revision:"b954e1ae772087c5b4c6ae797e1f9649"},{url:"images/osa_database.png",revision:"c350d9d9b95f37b6cfe798b40ede5fb0"},{url:"images/google-drive-logo-white.svg",revision:"f329d8b1be7778515a85b93fc35d9f26"},{url:"images/dropbox-logo-white.svg",revision:"4ea8299ac3bc31a16f199ee3aec223bf"},{url:"images/onedrive-logo-white.svg",revision:"b3602fa0fc947009cff3f33a581cff4d"},{url:"images/github-logo-white.svg",revision:"537b1127b3ca0f95b45782d1304fb77a"},{url:"images/gitlab-logo-white.svg",revision:"5fede9ac2f394c716b8c23e3fddc3910"},{url:"images/trello-logo-white-orange.svg",revision:"e2a0a52ba3766682f138138d10a75eb5"},{url:"images/logo-confluence.png",revision:"ed1e55d44ae5eba8f999aba2c93e8331"},{url:"images/logo-jira.png",revision:"f8d460555a0d1f87cfd901e940666629"},{url:"images/clear.gif",revision:"db13c778e4382e0b55258d0f811d5d70"},{url:"images/spin.gif",revision:"487cbb40b9ced439aa1ad914e816d773"},{url:"images/checkmark.gif",revision:"ba764ce62f2bf952df5bbc2bb4d381c5"},{url:"images/hs.png",revision:"fefa1a03d92ebad25c88dca94a0b63db"},{url:"images/aui-wait.gif",revision:"5a474bcbd8d2f2826f03d10ea44bf60e"},{url:"mxgraph/css/common.css",revision:"b5b7280ec98671bb6c3847a36bc7ea12"},{url:"mxgraph/images/expanded.gif",revision:"2b67c2c035af1e9a5cc814f0d22074cf"},{url:"mxgraph/images/collapsed.gif",revision:"73cc826da002a3d740ca4ce6ec5c1f4a"},{url:"mxgraph/images/maximize.gif",revision:"5cd13d6925493ab51e876694cc1c2ec2"},{url:"mxgraph/images/minimize.gif",revision:"8957741b9b0f86af9438775f2aadbb54"},{url:"mxgraph/images/close.gif",revision:"8b84669812ac7382984fca35de8da48b"},{url:"mxgraph/images/resize.gif",revision:"a6477612b3567a34033f9cac6184eed3"},{url:"mxgraph/images/separator.gif",revision:"7819742ff106c97da7a801c2372bbbe5"},{url:"mxgraph/images/window.gif",revision:"fd9a21dd4181f98052a202a0a01f18ab"},{url:"mxgraph/images/window-title.gif",revision:"3fb1d6c43246cdf991a11dfe826dfe99"},{url:"mxgraph/images/button.gif",revision:"00759bdc3ad218fa739f584369541809"},{url:"mxgraph/images/point.gif",revision:"83a43717b284902442620f61bc4e9fa6"}],{ignoreURLParametersMatching:[/.*/]})}));
//# sourceMappingURL=service-worker.js.map
diff --git a/src/main/webapp/service-worker.js.map b/src/main/webapp/service-worker.js.map
index cc52cbd8..90fbd090 100644
--- a/src/main/webapp/service-worker.js.map
+++ b/src/main/webapp/service-worker.js.map
@@ -1 +1 @@
-{"version":3,"file":"service-worker.js","sources":["../../../../../../../tmp/14fefb1161d2f744158245da39429feb/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/hostedtoolcache/node/14.19.3/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"08b1952fa880e4ea6baabbb055dba10c\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"aff14308089d33fd3c6e5495246438cd\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"4dbdbc7cee6fc00d1b8c6fe1022a0989\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"f0e1d4c09054df2f3ea3793491e9fe08\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"0611491c663261a732ff18224906184d\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"8b5b1cf07fc74454cf354717e9d18534\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"4f2c07c4585347249c95cd9158872fb2\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"3179f617dd02efd2cefeb8c06f965880\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"1108544a4b2fb98cc794ead2f467ee1b\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"c96db1790184cb35781f791e8d1dafd9\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"6d5a85e70c7b82ba685782ca6df2b9d5\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"01caa325f3ad3f6565e0b4228907fb63\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"c6552981ba1add209fe3e12ffcf79c9a\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"fab9a95f19a57bb836e42f67a1c0078b\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"d089f12446d443ca01752a5115456fcc\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"2bd677096ebffd3aa5cab0c347851e3f\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"a9d84488d17425d28e5d85d464e0a8f8\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"4c58f3a1a4c99b1c4264593b6e05100b\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"352d2782274de07617d117926b68c205\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"5cefef0227d058cf716d1f51f2cf202f\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"412bc4b87e630b697a40f247c579d398\"\n },\n {\n \"url\": \"math/MathJax.js\",\n \"revision\": \"b2c103388b71bb3d11cbf9aa45fe9b68\"\n },\n {\n \"url\": \"math/config/TeX-MML-AM_SVG-full.js\",\n \"revision\": \"d5cb8ac04050983170ae4af145bc66ff\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/fontdata.js\",\n \"revision\": \"495e5a410955d1b6178870e605890ede\"\n },\n {\n \"url\": \"math/jax/element/mml/optable/BasicLatin.js\",\n \"revision\": \"cac9b2e71382e62270baa55fab07cc13\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js\",\n \"revision\": \"e3e5e4d5924beed29f0844550b5c8f46\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js\",\n \"revision\": \"0767cbad7275b53da128e7e5e1109f7c\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js\",\n \"revision\": \"346302a5c5ee00e01c302148c56dbfe3\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"2d474154fe5893976198647ea505ac96\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"d767c66fc3d828f01790d5145a43f944\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"326cf12a2eb475cfd18ca0aa8f454c27\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"d935ebdf513f6d6c8b2488ca53edc48d\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"9a066d6e0cb91240a5de909c09ad5f00\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"834558d329362244813342c858ee0bb3\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"7ea27e2cedf5a72c2d6acc3882f1107f\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"73d43bc65e16f28055cc70302d8f5b23\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"9684d36e43a503a7923220702367e1bd\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"492ec6381d7a44fbc5da1adf674cdd3c\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"134ef55f7ede4d1ec364fc275c1dc560\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"df44330c02c251217f68199902bb71b4\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"f4782a7a893fc58ac5138a94ee506ff1\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"ab5d6547dbef2866651d5854cd44ad54\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"78de7c722cdc7079dbce68df02ab0ef9\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"44639b4c2018027b39e998d527c444e3\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"01b3890a6db98ef3a43485ba49ac7992\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"53c542d5fea30e409eca8fe10048859b\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"ff0e55a0b6321a7d0fbe35a4d37a9908\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"fd421cae2d65a12f45743d029d1f2d1e\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"54fffb1c7c7da120cb22f71d4fef3c49\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"9bb0be8fd970a9640d5b5f59afb22326\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"353564fdcbdec14435e22cc10ea340a9\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"cfefa39b02d5ff3a718c5ca688675a22\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"b1e4b3e78529cbae7f9b41b95d8d015f\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"43353905b8e9180461055b1ed17dc53d\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"c55df5f591ed818e1ff6f60bf2eb0dcd\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"185602e27366d4c4155de476bb5010ff\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"7f4970fd5a35520e5871334bb8154c03\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"6478a7552215d6c5b782cba0908ffa0e\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"521711aef9fcf41ee833e5e669de1b6e\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"70558cca334ed3d090ecda7423aad8df\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"d827e98625dfa9d320d2a00fa5709f54\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"3510ad556be2f84f7aefc617e49fa773\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"fe33d70d3b621e0f511388d9ef3667aa\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"2d474154fe5893976198647ea505ac96\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"ec08e8294289a952b8ec15ef9615b927\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"62c693c6ea9a58bc0dd4eec7b1b1ea7d\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"db85c32f7458bbdb4dabd8ee04c5e6e5\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"2cffd3b30b81113406236b29ec19fcf4\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"faa525cfd933d9b28bab4ba9958d2a91\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"4f0c51dc49be417530a88e264acc8ac7\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"2454d71cf5eda2fca6da0a4ac02c0ce0\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"2d474154fe5893976198647ea505ac96\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"a65bba3698e3cb60764146a1d6a1b494\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"03e8bdd1584030ef4bd3e59311806bde\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"7377e7c4b5f5e768bd4f9a32c40f0143\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"3106d87ab7710b789ca481df9f9eaa20\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"a4b2cdef952b5e6b5a1cb569ecb48347\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"cfd99e1386d7a0310a1ba24a1bd39f26\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"f0ded6e2695a8715bbbfb9868a42be5e\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"991c7523fdab1db1590ecf71075f85de\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"ebe2bdd67274dc832f2a1c06e0415c99\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"352152d7c79d70c2d7451d10cb9db4d1\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"077de6f062ffe2fdf09369c41490caf6\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"0c405f3473c213c97287b9706bdaf5e6\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"1379897fd5f960954a075507b559b7e9\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,iBAYTC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,sDACPC,SAAY,oCAEd,CACED,IAAO,kEACPC,SAAY,oCAEd,CACED,IAAO,+DACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"} \ No newline at end of file
+{"version":3,"file":"service-worker.js","sources":["../../../../../../../tmp/405791616b2f3ab9c2a59811cfff79b4/service-worker.js"],"sourcesContent":["import {precacheAndRoute as workbox_precaching_precacheAndRoute} from '/opt/hostedtoolcache/node/14.19.3/x64/lib/node_modules/workbox-cli/node_modules/workbox-precaching/precacheAndRoute.mjs';/**\n * Welcome to your Workbox-powered service worker!\n *\n * You'll need to register this file in your web app.\n * See https://goo.gl/nhQhGp\n *\n * The rest of the code is auto-generated. Please don't update this file\n * directly; instead, make changes to your Workbox build configuration\n * and re-run your build process.\n * See https://goo.gl/2aRDsh\n */\n\n\n\n\n\n\n\n\nself.addEventListener('message', (event) => {\n if (event.data && event.data.type === 'SKIP_WAITING') {\n self.skipWaiting();\n }\n});\n\n\n\n\n/**\n * The precacheAndRoute() method efficiently caches and responds to\n * requests for URLs in the manifest.\n * See https://goo.gl/S9QRab\n */\nworkbox_precaching_precacheAndRoute([\n {\n \"url\": \"js/app.min.js\",\n \"revision\": \"8856b392ace29f3e6292a241b0351f9e\"\n },\n {\n \"url\": \"js/extensions.min.js\",\n \"revision\": \"45df373f567b94c1dce78ba61b591983\"\n },\n {\n \"url\": \"js/stencils.min.js\",\n \"revision\": \"4dbdbc7cee6fc00d1b8c6fe1022a0989\"\n },\n {\n \"url\": \"js/shapes-14-6-5.min.js\",\n \"revision\": \"f0e1d4c09054df2f3ea3793491e9fe08\"\n },\n {\n \"url\": \"js/math-print.js\",\n \"revision\": \"0611491c663261a732ff18224906184d\"\n },\n {\n \"url\": \"index.html\",\n \"revision\": \"8b5b1cf07fc74454cf354717e9d18534\"\n },\n {\n \"url\": \"open.html\",\n \"revision\": \"d71816b3b00e769fc6019fcdd6921662\"\n },\n {\n \"url\": \"styles/fonts/ArchitectsDaughter-Regular.ttf\",\n \"revision\": \"31c2153c0530e32553b31a49b3d70736\"\n },\n {\n \"url\": \"styles/grapheditor.css\",\n \"revision\": \"4f2c07c4585347249c95cd9158872fb2\"\n },\n {\n \"url\": \"styles/atlas.css\",\n \"revision\": \"e8152cda9233d3a3af017422993abfce\"\n },\n {\n \"url\": \"styles/dark.css\",\n \"revision\": \"3179f617dd02efd2cefeb8c06f965880\"\n },\n {\n \"url\": \"js/dropbox/Dropbox-sdk.min.js\",\n \"revision\": \"4b9842892aa37b156db0a8364b7a83b0\"\n },\n {\n \"url\": \"js/onedrive/OneDrive.js\",\n \"revision\": \"505e8280346666f7ee801bc59521fa67\"\n },\n {\n \"url\": \"js/viewer-static.min.js\",\n \"revision\": \"6b5d7470392f84f7a84e14191257bf8b\"\n },\n {\n \"url\": \"connect/jira/editor-1-3-3.html\",\n \"revision\": \"a2b0e7267a08a838f3cc404eba831ec0\"\n },\n {\n \"url\": \"connect/jira/viewerPanel-1-3-12.html\",\n \"revision\": \"c96db1790184cb35781f791e8d1dafd9\"\n },\n {\n \"url\": \"connect/jira/fullScreenViewer-1-3-3.html\",\n \"revision\": \"ba7ece2dfb2833b72f97280d7092f25e\"\n },\n {\n \"url\": \"connect/jira/viewerPanel.js\",\n \"revision\": \"6d5a85e70c7b82ba685782ca6df2b9d5\"\n },\n {\n \"url\": \"connect/jira/spinner.gif\",\n \"revision\": \"7d857ab9d86123e93d74d48e958fe743\"\n },\n {\n \"url\": \"connect/jira/editor.js\",\n \"revision\": \"01caa325f3ad3f6565e0b4228907fb63\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer-init.js\",\n \"revision\": \"e00ad51fc16b87c362d6eaf930ab1fa5\"\n },\n {\n \"url\": \"connect/jira/fullscreen-viewer.js\",\n \"revision\": \"4e0775a6c156a803e777870623ac7c3e\"\n },\n {\n \"url\": \"plugins/connectJira.js\",\n \"revision\": \"4cefa13414e0d406550f3c073923080c\"\n },\n {\n \"url\": \"plugins/cConf-comments.js\",\n \"revision\": \"c787357209cff2986dcca567b599e2ef\"\n },\n {\n \"url\": \"plugins/cConf-1-4-8.js\",\n \"revision\": \"c6552981ba1add209fe3e12ffcf79c9a\"\n },\n {\n \"url\": \"connect/confluence/connectUtils-1-4-8.js\",\n \"revision\": \"fab9a95f19a57bb836e42f67a1c0078b\"\n },\n {\n \"url\": \"connect/new_common/cac.js\",\n \"revision\": \"3d8c436c566db645fb1e6e6ba9f69bbc\"\n },\n {\n \"url\": \"connect/gdrive_common/gac.js\",\n \"revision\": \"38f1df3ecc4d78290493f47e62202138\"\n },\n {\n \"url\": \"connect/onedrive_common/ac.js\",\n \"revision\": \"d089f12446d443ca01752a5115456fcc\"\n },\n {\n \"url\": \"connect/confluence/viewer-init.js\",\n \"revision\": \"2bd677096ebffd3aa5cab0c347851e3f\"\n },\n {\n \"url\": \"connect/confluence/viewer.js\",\n \"revision\": \"a9d84488d17425d28e5d85d464e0a8f8\"\n },\n {\n \"url\": \"connect/confluence/viewer-1-4-42.html\",\n \"revision\": \"4c58f3a1a4c99b1c4264593b6e05100b\"\n },\n {\n \"url\": \"connect/confluence/macroEditor-1-4-8.html\",\n \"revision\": \"8cd74a2fb60bf2e3e86026d66107cf11\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram-1-4-8.js\",\n \"revision\": \"352d2782274de07617d117926b68c205\"\n },\n {\n \"url\": \"connect/confluence/includeDiagram.html\",\n \"revision\": \"5cefef0227d058cf716d1f51f2cf202f\"\n },\n {\n \"url\": \"connect/confluence/macro-editor.js\",\n \"revision\": \"412bc4b87e630b697a40f247c579d398\"\n },\n {\n \"url\": \"math/MathJax.js\",\n \"revision\": \"b2c103388b71bb3d11cbf9aa45fe9b68\"\n },\n {\n \"url\": \"math/config/TeX-MML-AM_SVG-full.js\",\n \"revision\": \"d5cb8ac04050983170ae4af145bc66ff\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/fontdata.js\",\n \"revision\": \"495e5a410955d1b6178870e605890ede\"\n },\n {\n \"url\": \"math/jax/element/mml/optable/BasicLatin.js\",\n \"revision\": \"cac9b2e71382e62270baa55fab07cc13\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Size2/Regular/Main.js\",\n \"revision\": \"e3e5e4d5924beed29f0844550b5c8f46\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/LetterlikeSymbols.js\",\n \"revision\": \"0767cbad7275b53da128e7e5e1109f7c\"\n },\n {\n \"url\": \"math/jax/output/SVG/fonts/TeX/Main/Regular/GreekAndCoptic.js\",\n \"revision\": \"346302a5c5ee00e01c302148c56dbfe3\"\n },\n {\n \"url\": \"resources/dia.txt\",\n \"revision\": \"2d474154fe5893976198647ea505ac96\"\n },\n {\n \"url\": \"resources/dia_am.txt\",\n \"revision\": \"d767c66fc3d828f01790d5145a43f944\"\n },\n {\n \"url\": \"resources/dia_ar.txt\",\n \"revision\": \"326cf12a2eb475cfd18ca0aa8f454c27\"\n },\n {\n \"url\": \"resources/dia_bg.txt\",\n \"revision\": \"d935ebdf513f6d6c8b2488ca53edc48d\"\n },\n {\n \"url\": \"resources/dia_bn.txt\",\n \"revision\": \"9a066d6e0cb91240a5de909c09ad5f00\"\n },\n {\n \"url\": \"resources/dia_bs.txt\",\n \"revision\": \"834558d329362244813342c858ee0bb3\"\n },\n {\n \"url\": \"resources/dia_ca.txt\",\n \"revision\": \"7ea27e2cedf5a72c2d6acc3882f1107f\"\n },\n {\n \"url\": \"resources/dia_cs.txt\",\n \"revision\": \"73d43bc65e16f28055cc70302d8f5b23\"\n },\n {\n \"url\": \"resources/dia_da.txt\",\n \"revision\": \"9684d36e43a503a7923220702367e1bd\"\n },\n {\n \"url\": \"resources/dia_de.txt\",\n \"revision\": \"492ec6381d7a44fbc5da1adf674cdd3c\"\n },\n {\n \"url\": \"resources/dia_el.txt\",\n \"revision\": \"134ef55f7ede4d1ec364fc275c1dc560\"\n },\n {\n \"url\": \"resources/dia_eo.txt\",\n \"revision\": \"df44330c02c251217f68199902bb71b4\"\n },\n {\n \"url\": \"resources/dia_es.txt\",\n \"revision\": \"f4782a7a893fc58ac5138a94ee506ff1\"\n },\n {\n \"url\": \"resources/dia_et.txt\",\n \"revision\": \"ab5d6547dbef2866651d5854cd44ad54\"\n },\n {\n \"url\": \"resources/dia_eu.txt\",\n \"revision\": \"78de7c722cdc7079dbce68df02ab0ef9\"\n },\n {\n \"url\": \"resources/dia_fa.txt\",\n \"revision\": \"44639b4c2018027b39e998d527c444e3\"\n },\n {\n \"url\": \"resources/dia_fi.txt\",\n \"revision\": \"01b3890a6db98ef3a43485ba49ac7992\"\n },\n {\n \"url\": \"resources/dia_fil.txt\",\n \"revision\": \"53c542d5fea30e409eca8fe10048859b\"\n },\n {\n \"url\": \"resources/dia_fr.txt\",\n \"revision\": \"ff0e55a0b6321a7d0fbe35a4d37a9908\"\n },\n {\n \"url\": \"resources/dia_gl.txt\",\n \"revision\": \"fd421cae2d65a12f45743d029d1f2d1e\"\n },\n {\n \"url\": \"resources/dia_gu.txt\",\n \"revision\": \"54fffb1c7c7da120cb22f71d4fef3c49\"\n },\n {\n \"url\": \"resources/dia_he.txt\",\n \"revision\": \"9bb0be8fd970a9640d5b5f59afb22326\"\n },\n {\n \"url\": \"resources/dia_hi.txt\",\n \"revision\": \"353564fdcbdec14435e22cc10ea340a9\"\n },\n {\n \"url\": \"resources/dia_hr.txt\",\n \"revision\": \"cfefa39b02d5ff3a718c5ca688675a22\"\n },\n {\n \"url\": \"resources/dia_hu.txt\",\n \"revision\": \"b1e4b3e78529cbae7f9b41b95d8d015f\"\n },\n {\n \"url\": \"resources/dia_id.txt\",\n \"revision\": \"43353905b8e9180461055b1ed17dc53d\"\n },\n {\n \"url\": \"resources/dia_it.txt\",\n \"revision\": \"c55df5f591ed818e1ff6f60bf2eb0dcd\"\n },\n {\n \"url\": \"resources/dia_ja.txt\",\n \"revision\": \"185602e27366d4c4155de476bb5010ff\"\n },\n {\n \"url\": \"resources/dia_kn.txt\",\n \"revision\": \"7f4970fd5a35520e5871334bb8154c03\"\n },\n {\n \"url\": \"resources/dia_ko.txt\",\n \"revision\": \"6478a7552215d6c5b782cba0908ffa0e\"\n },\n {\n \"url\": \"resources/dia_lt.txt\",\n \"revision\": \"521711aef9fcf41ee833e5e669de1b6e\"\n },\n {\n \"url\": \"resources/dia_lv.txt\",\n \"revision\": \"70558cca334ed3d090ecda7423aad8df\"\n },\n {\n \"url\": \"resources/dia_ml.txt\",\n \"revision\": \"d827e98625dfa9d320d2a00fa5709f54\"\n },\n {\n \"url\": \"resources/dia_mr.txt\",\n \"revision\": \"3510ad556be2f84f7aefc617e49fa773\"\n },\n {\n \"url\": \"resources/dia_ms.txt\",\n \"revision\": \"fe33d70d3b621e0f511388d9ef3667aa\"\n },\n {\n \"url\": \"resources/dia_my.txt\",\n \"revision\": \"2d474154fe5893976198647ea505ac96\"\n },\n {\n \"url\": \"resources/dia_nl.txt\",\n \"revision\": \"ec08e8294289a952b8ec15ef9615b927\"\n },\n {\n \"url\": \"resources/dia_no.txt\",\n \"revision\": \"62c693c6ea9a58bc0dd4eec7b1b1ea7d\"\n },\n {\n \"url\": \"resources/dia_pl.txt\",\n \"revision\": \"db85c32f7458bbdb4dabd8ee04c5e6e5\"\n },\n {\n \"url\": \"resources/dia_pt-br.txt\",\n \"revision\": \"2cffd3b30b81113406236b29ec19fcf4\"\n },\n {\n \"url\": \"resources/dia_pt.txt\",\n \"revision\": \"faa525cfd933d9b28bab4ba9958d2a91\"\n },\n {\n \"url\": \"resources/dia_ro.txt\",\n \"revision\": \"4f0c51dc49be417530a88e264acc8ac7\"\n },\n {\n \"url\": \"resources/dia_ru.txt\",\n \"revision\": \"2454d71cf5eda2fca6da0a4ac02c0ce0\"\n },\n {\n \"url\": \"resources/dia_si.txt\",\n \"revision\": \"2d474154fe5893976198647ea505ac96\"\n },\n {\n \"url\": \"resources/dia_sk.txt\",\n \"revision\": \"a65bba3698e3cb60764146a1d6a1b494\"\n },\n {\n \"url\": \"resources/dia_sl.txt\",\n \"revision\": \"03e8bdd1584030ef4bd3e59311806bde\"\n },\n {\n \"url\": \"resources/dia_sr.txt\",\n \"revision\": \"7377e7c4b5f5e768bd4f9a32c40f0143\"\n },\n {\n \"url\": \"resources/dia_sv.txt\",\n \"revision\": \"3106d87ab7710b789ca481df9f9eaa20\"\n },\n {\n \"url\": \"resources/dia_sw.txt\",\n \"revision\": \"a4b2cdef952b5e6b5a1cb569ecb48347\"\n },\n {\n \"url\": \"resources/dia_ta.txt\",\n \"revision\": \"cfd99e1386d7a0310a1ba24a1bd39f26\"\n },\n {\n \"url\": \"resources/dia_te.txt\",\n \"revision\": \"f0ded6e2695a8715bbbfb9868a42be5e\"\n },\n {\n \"url\": \"resources/dia_th.txt\",\n \"revision\": \"991c7523fdab1db1590ecf71075f85de\"\n },\n {\n \"url\": \"resources/dia_tr.txt\",\n \"revision\": \"ebe2bdd67274dc832f2a1c06e0415c99\"\n },\n {\n \"url\": \"resources/dia_uk.txt\",\n \"revision\": \"352152d7c79d70c2d7451d10cb9db4d1\"\n },\n {\n \"url\": \"resources/dia_vi.txt\",\n \"revision\": \"077de6f062ffe2fdf09369c41490caf6\"\n },\n {\n \"url\": \"resources/dia_zh-tw.txt\",\n \"revision\": \"0c405f3473c213c97287b9706bdaf5e6\"\n },\n {\n \"url\": \"resources/dia_zh.txt\",\n \"revision\": \"1379897fd5f960954a075507b559b7e9\"\n },\n {\n \"url\": \"favicon.ico\",\n \"revision\": \"fab2d88b37c72d83607527573de45281\"\n },\n {\n \"url\": \"images/manifest.json\",\n \"revision\": \"c6236bde53ed79aaaec60a1aca8ee2ef\"\n },\n {\n \"url\": \"images/logo.png\",\n \"revision\": \"89630b64b911ebe0daa3dfe442087cfa\"\n },\n {\n \"url\": \"images/drawlogo.svg\",\n \"revision\": \"4bf4d14ebcf072d8bd4c5a1c89e88fc6\"\n },\n {\n \"url\": \"images/drawlogo48.png\",\n \"revision\": \"8b13428373aca67b895364d025f42417\"\n },\n {\n \"url\": \"images/drawlogo-gray.svg\",\n \"revision\": \"0aabacbc0873816e1e09e4736ae44c7d\"\n },\n {\n \"url\": \"images/drawlogo-text-bottom.svg\",\n \"revision\": \"f6c438823ab31f290940bd4feb8dd9c2\"\n },\n {\n \"url\": \"images/default-user.jpg\",\n \"revision\": \"2c399696a87c8921f12d2f9e1990cc6e\"\n },\n {\n \"url\": \"images/logo-flat-small.png\",\n \"revision\": \"4b178e59ff499d6dd1894fc498b59877\"\n },\n {\n \"url\": \"images/apple-touch-icon.png\",\n \"revision\": \"73da7989a23ce9a4be565ec65658a239\"\n },\n {\n \"url\": \"images/favicon-16x16.png\",\n \"revision\": \"1a79d5461a5d2bf21f6652e0ac20d6e5\"\n },\n {\n \"url\": \"images/favicon-32x32.png\",\n \"revision\": \"e3b92da2febe70bad5372f6f3474b034\"\n },\n {\n \"url\": \"images/android-chrome-196x196.png\",\n \"revision\": \"f8c045b2d7b1c719fda64edab04c415c\"\n },\n {\n \"url\": \"images/android-chrome-512x512.png\",\n \"revision\": \"959b5fac2453963ff6d60fb85e4b73fd\"\n },\n {\n \"url\": \"images/delete.png\",\n \"revision\": \"5f2350f2fd20f1a229637aed32ed8f29\"\n },\n {\n \"url\": \"images/droptarget.png\",\n \"revision\": \"bbf7f563fb6784de1ce96f329519b043\"\n },\n {\n \"url\": \"images/help.png\",\n \"revision\": \"9266c6c3915bd33c243d80037d37bf61\"\n },\n {\n \"url\": \"images/download.png\",\n \"revision\": \"35418dd7bd48d87502c71b578cc6c37f\"\n },\n {\n \"url\": \"images/logo-flat.png\",\n \"revision\": \"038070ab43aee6e54a791211859fc67b\"\n },\n {\n \"url\": \"images/google-drive-logo.svg\",\n \"revision\": \"5d9f2f5bbc7dcc252730a0072bb23059\"\n },\n {\n \"url\": \"images/onedrive-logo.svg\",\n \"revision\": \"3645b344ec0634c1290dd58d7dc87b97\"\n },\n {\n \"url\": \"images/dropbox-logo.svg\",\n \"revision\": \"e6be408c77cf9c82d41ac64fa854280a\"\n },\n {\n \"url\": \"images/github-logo.svg\",\n \"revision\": \"a1a999b69a275eac0cb918360ac05ae1\"\n },\n {\n \"url\": \"images/gitlab-logo.svg\",\n \"revision\": \"0faea8c818899e58533e153c44b10517\"\n },\n {\n \"url\": \"images/trello-logo.svg\",\n \"revision\": \"006fd0d7d70d7e95dc691674cb12e044\"\n },\n {\n \"url\": \"images/osa_drive-harddisk.png\",\n \"revision\": \"b954e1ae772087c5b4c6ae797e1f9649\"\n },\n {\n \"url\": \"images/osa_database.png\",\n \"revision\": \"c350d9d9b95f37b6cfe798b40ede5fb0\"\n },\n {\n \"url\": \"images/google-drive-logo-white.svg\",\n \"revision\": \"f329d8b1be7778515a85b93fc35d9f26\"\n },\n {\n \"url\": \"images/dropbox-logo-white.svg\",\n \"revision\": \"4ea8299ac3bc31a16f199ee3aec223bf\"\n },\n {\n \"url\": \"images/onedrive-logo-white.svg\",\n \"revision\": \"b3602fa0fc947009cff3f33a581cff4d\"\n },\n {\n \"url\": \"images/github-logo-white.svg\",\n \"revision\": \"537b1127b3ca0f95b45782d1304fb77a\"\n },\n {\n \"url\": \"images/gitlab-logo-white.svg\",\n \"revision\": \"5fede9ac2f394c716b8c23e3fddc3910\"\n },\n {\n \"url\": \"images/trello-logo-white-orange.svg\",\n \"revision\": \"e2a0a52ba3766682f138138d10a75eb5\"\n },\n {\n \"url\": \"images/logo-confluence.png\",\n \"revision\": \"ed1e55d44ae5eba8f999aba2c93e8331\"\n },\n {\n \"url\": \"images/logo-jira.png\",\n \"revision\": \"f8d460555a0d1f87cfd901e940666629\"\n },\n {\n \"url\": \"images/clear.gif\",\n \"revision\": \"db13c778e4382e0b55258d0f811d5d70\"\n },\n {\n \"url\": \"images/spin.gif\",\n \"revision\": \"487cbb40b9ced439aa1ad914e816d773\"\n },\n {\n \"url\": \"images/checkmark.gif\",\n \"revision\": \"ba764ce62f2bf952df5bbc2bb4d381c5\"\n },\n {\n \"url\": \"images/hs.png\",\n \"revision\": \"fefa1a03d92ebad25c88dca94a0b63db\"\n },\n {\n \"url\": \"images/aui-wait.gif\",\n \"revision\": \"5a474bcbd8d2f2826f03d10ea44bf60e\"\n },\n {\n \"url\": \"mxgraph/css/common.css\",\n \"revision\": \"b5b7280ec98671bb6c3847a36bc7ea12\"\n },\n {\n \"url\": \"mxgraph/images/expanded.gif\",\n \"revision\": \"2b67c2c035af1e9a5cc814f0d22074cf\"\n },\n {\n \"url\": \"mxgraph/images/collapsed.gif\",\n \"revision\": \"73cc826da002a3d740ca4ce6ec5c1f4a\"\n },\n {\n \"url\": \"mxgraph/images/maximize.gif\",\n \"revision\": \"5cd13d6925493ab51e876694cc1c2ec2\"\n },\n {\n \"url\": \"mxgraph/images/minimize.gif\",\n \"revision\": \"8957741b9b0f86af9438775f2aadbb54\"\n },\n {\n \"url\": \"mxgraph/images/close.gif\",\n \"revision\": \"8b84669812ac7382984fca35de8da48b\"\n },\n {\n \"url\": \"mxgraph/images/resize.gif\",\n \"revision\": \"a6477612b3567a34033f9cac6184eed3\"\n },\n {\n \"url\": \"mxgraph/images/separator.gif\",\n \"revision\": \"7819742ff106c97da7a801c2372bbbe5\"\n },\n {\n \"url\": \"mxgraph/images/window.gif\",\n \"revision\": \"fd9a21dd4181f98052a202a0a01f18ab\"\n },\n {\n \"url\": \"mxgraph/images/window-title.gif\",\n \"revision\": \"3fb1d6c43246cdf991a11dfe826dfe99\"\n },\n {\n \"url\": \"mxgraph/images/button.gif\",\n \"revision\": \"00759bdc3ad218fa739f584369541809\"\n },\n {\n \"url\": \"mxgraph/images/point.gif\",\n \"revision\": \"83a43717b284902442620f61bc4e9fa6\"\n }\n], {\n \"ignoreURLParametersMatching\": [/.*/]\n});\n\n\n\n\n\n\n\n\n"],"names":["self","addEventListener","event","data","type","skipWaiting","workbox_precaching_precacheAndRoute","url","revision","ignoreURLParametersMatching"],"mappings":"szBAmBAA,KAAKC,iBAAiB,WAAYC,IAC5BA,EAAMC,MAA4B,iBAApBD,EAAMC,KAAKC,MAC3BJ,KAAKK,iBAYTC,EAAAA,iBAAoC,CAClC,CACEC,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,qBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,aACPC,SAAY,oCAEd,CACED,IAAO,YACPC,SAAY,oCAEd,CACED,IAAO,8CACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,uCACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,2CACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,wCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,yCACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,4CACPC,SAAY,oCAEd,CACED,IAAO,6CACPC,SAAY,oCAEd,CACED,IAAO,sDACPC,SAAY,oCAEd,CACED,IAAO,kEACPC,SAAY,oCAEd,CACED,IAAO,+DACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,cACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oCACPC,SAAY,oCAEd,CACED,IAAO,oBACPC,SAAY,oCAEd,CACED,IAAO,wBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,0BACPC,SAAY,oCAEd,CACED,IAAO,qCACPC,SAAY,oCAEd,CACED,IAAO,gCACPC,SAAY,oCAEd,CACED,IAAO,iCACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,sCACPC,SAAY,oCAEd,CACED,IAAO,6BACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,mBACPC,SAAY,oCAEd,CACED,IAAO,kBACPC,SAAY,oCAEd,CACED,IAAO,uBACPC,SAAY,oCAEd,CACED,IAAO,gBACPC,SAAY,oCAEd,CACED,IAAO,sBACPC,SAAY,oCAEd,CACED,IAAO,yBACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,8BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,+BACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,kCACPC,SAAY,oCAEd,CACED,IAAO,4BACPC,SAAY,oCAEd,CACED,IAAO,2BACPC,SAAY,qCAEb,CACDC,4BAA+B,CAAC"} \ No newline at end of file